:root {
  --ink: #2b2420;
  --paper: #fff7ee;
  --accent: #ff4d6d;
  --accent-2: #5ad1ff;
  --accent-3: #ffd166;
  --shadow: rgba(43, 36, 32, 0.15);
  --tape: #f1e1c6;
  --tape-edge: #e0caa0;
  --tunnel: #0d0d12;
  --calm: #ffe9f4;
  --flash: #0a0a0a;
  --font-display: "Yeseva One", serif;
  --font-body: "Shantell Sans", cursive;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #ffe1f1 0, transparent 40%),
    radial-gradient(circle at 80% 10%, #d7f7ff 0, transparent 45%),
    radial-gradient(circle at 50% 90%, #fff0d8 0, transparent 40%),
    #f8efe4;
  min-height: 100vh;
}

.paper {
  position: relative;
  max-width: 920px;
  margin: 32px auto 48px;
  background: var(--paper);
  border-radius: 28px;
  padding: 28px 24px 32px;
  box-shadow: 0 18px 40px var(--shadow);
  overflow: hidden;
}

.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.06'/></svg>");
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero {
  position: relative;
  padding: 18px 18px 28px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  font-size: 1.05rem;
}

.stamp {
  position: absolute;
  right: 16px;
  top: 8px;
  width: 76px;
  height: 76px;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  transform: rotate(8deg);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  background: #fff1f7;
  box-shadow: 0 6px 14px var(--shadow);
}

.stamp span {
  font-size: 1.2rem;
}

.tape {
  position: absolute;
  width: 110px;
  height: 28px;
  background: linear-gradient(120deg, var(--tape), var(--tape-edge));
  opacity: 0.9;
  border-radius: 6px;
  box-shadow: 0 3px 8px var(--shadow);
}

.tape-left {
  left: 0;
  top: 18px;
  transform: rotate(-12deg) translateX(-10px);
}

.tape-right {
  right: 0;
  top: 12px;
  transform: rotate(12deg) translateX(10px);
}

.story {
  display: grid;
  gap: 26px;
  padding: 0 10px;
}

.panel {
  background: #fffdfa;
  border: 2px solid #f3e7d7;
  border-radius: 22px;
  padding: 18px 18px 22px;
  box-shadow: 0 12px 18px rgba(28, 22, 20, 0.05);
  display: none;
  position: relative;
  animation: reveal 0.8s ease forwards;
}

.panel.active {
  display: block;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.panel p {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.5;
}

.choices {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.choice {
  border: 2px dashed var(--ink);
  background: #fff3f8;
  font-family: var(--font-body);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.choice:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 8px 16px var(--shadow);
}

.tunnel {
  position: relative;
  background: radial-gradient(circle at center, #141827 0%, #050608 70%);
  border-radius: 50% / 60%;
  height: 260px;
  overflow: hidden;
  width: calc(100% + 36px);
  margin: 0 -18px 16px;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.75),
    0 10px 22px rgba(13, 14, 20, 0.35);
}

.tunnel.circle {
  width: min(520px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto 12px;
  border-radius: 50%;
}

.tunnel::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.75) 70%, rgba(0, 0, 0, 0.98) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.tunnel::after {
  content: "";
  position: absolute;
  inset: -15%;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.95) 0, rgba(0, 0, 0, 0.85) 20%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0) 60%);
  mix-blend-mode: multiply;
  opacity: 0.95;
  pointer-events: none;
}

.streaks {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 0, 80, 0.9) 0px,
      rgba(255, 0, 80, 0.08) 10px,
      rgba(0, 183, 255, 0.85) 18px,
      rgba(0, 183, 255, 0.08) 28px,
      rgba(255, 199, 0, 0.9) 36px,
      rgba(255, 199, 0, 0.08) 46px,
      rgba(90, 255, 150, 0.8) 54px,
      rgba(90, 255, 150, 0.08) 64px,
      rgba(189, 77, 255, 0.85) 72px,
      rgba(189, 77, 255, 0.08) 82px,
      rgba(255, 120, 200, 0.8) 90px,
      rgba(255, 120, 200, 0.08) 100px,
      rgba(120, 255, 240, 0.85) 108px,
      rgba(120, 255, 240, 0.08) 118px,
      rgba(255, 140, 40, 0.8) 126px,
      rgba(255, 140, 40, 0.08) 136px);
  mix-blend-mode: screen;
  filter: blur(0.45px) saturate(2);
  mask-image: radial-gradient(circle at center,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.02) 38%,
    rgba(255, 255, 255, 0.95) 62%,
    rgba(255, 255, 255, 0.6) 78%,
    rgba(255, 255, 255, 0) 94%);
  background-size: 120px 100%;
  animation: forward 0.38s linear infinite;
  transform-origin: center center;
}

.streaks.two {
  animation-duration: 0.65s;
  opacity: 0.75;
  filter: blur(0.9px) saturate(2.1);
  transform: scale(1.4) skewX(-6deg);
}

.streaks.motion {
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.9) 0px,
      rgba(255, 255, 255, 0.15) 18px,
      transparent 48px);
  mix-blend-mode: screen;
  filter: blur(1.2px) saturate(2.2);
  opacity: 0.4;
  background-size: 90px 100%;
  animation: forward 0.28s linear infinite;
  transform: scale(1.6);
}

.core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at center, #000 0, #050608 50%, rgba(5, 6, 8, 0) 70%);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.burst {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.35), transparent 40%),
    radial-gradient(circle at 20% 30%, rgba(255, 90, 140, 0.25), transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(90, 209, 255, 0.25), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(255, 209, 102, 0.2), transparent 50%);
  mix-blend-mode: screen;
  animation: pulse 3s ease-in-out infinite;
}

.ring {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  animation: ring 1.8s ease-in-out infinite;
}

.tunnel.shake {
  animation: shake 0.35s ease-in-out;
}

.r1 { animation-delay: 0s; }
.r2 { animation-delay: 0.4s; }
.r3 { animation-delay: 0.8s; }
.r4 { animation-delay: 1.2s; }
.r5 { animation-delay: 1.6s; }
.r6 { animation-delay: 2s; }

.runner {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #12121a;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.tunnel.calm .streaks {
  animation-duration: 1.4s;
  filter: blur(0.55px) saturate(1.4);
  opacity: 0.55;
}

.tunnel.calm .streaks.two {
  animation-duration: 1.9s;
  filter: blur(0.9px) saturate(1.5);
  opacity: 0.45;
}

.tunnel.calm .streaks.motion {
  animation-duration: 1.2s;
  opacity: 0.2;
  filter: blur(1.2px) saturate(1.3);
}

.glow {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent 75%);
  animation: float 6s ease-in-out infinite;
  opacity: 0.7;
}

.g1 { left: 10%; top: 35%; animation-delay: 0s; }
.g2 { right: 18%; top: 40%; animation-delay: 1.2s; }
.g3 { left: 48%; top: 22%; animation-delay: 2.4s; }

.pair {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 700;
  color: #ff6b9a;
  background: rgba(255, 255, 255, 0.6);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 14px rgba(255, 107, 154, 0.25);
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.photo {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #f5d9e5;
  padding: 16px 10px;
  text-align: center;
  font-weight: 600;
  color: #9d6b7a;
  min-height: 86px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 16px rgba(157, 107, 122, 0.15);
  position: relative;
  overflow: hidden;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.doodle {
  position: absolute;
  font-size: 1.1rem;
  color: #ff7aa2;
  text-shadow: 0 2px 6px rgba(255, 122, 162, 0.4);
  pointer-events: none;
  transform: rotate(var(--rot, 0deg));
  font-size: var(--size, 1.1rem);
  color: var(--doodle-color, #ff7aa2);
}

.doodle.heart { font-size: 1.25rem; }
.doodle.star { color: #ffd166; }
.doodle.flower { color: #8de7c4; }
.doodle.dot { color: #7dc4ff; font-size: 1.5rem; }

.h1 { top: 8px; left: 10px; }
.h2 { top: 18px; right: 14px; }
.h3 { bottom: 16px; left: 18px; }
.h4 { bottom: 10px; right: 20px; }
.s1 { top: 42px; right: 22px; }
.d1 { bottom: 32px; left: 6px; }

.h5 { top: 12px; left: 16px; }
.h6 { top: 28px; right: 12px; }
.h7 { bottom: 18px; left: 26px; }
.h8 { bottom: 12px; right: 18px; }
.s2 { top: 44px; left: 8px; }
.d2 { bottom: 30px; right: 6px; }

.h9 { top: 10px; right: 18px; }
.h10 { top: 30px; left: 12px; }
.h11 { bottom: 16px; right: 24px; }
.h12 { bottom: 8px; left: 20px; }
.f1 { top: 44px; left: 30px; }
.d3 { bottom: 28px; right: 8px; }

.h13 { top: 56px; left: 6px; }
.s3 { bottom: 40px; right: 6px; }
.h14 { top: 52px; right: 8px; }
.d4 { bottom: 42px; left: 14px; }
.h15 { top: 56px; right: 10px; }
.s4 { bottom: 36px; left: 6px; }

.tunnel.flash {
  background: radial-gradient(circle at center, #0c0c12 0%, #030304 70%);
}

.tunnel.flash .streaks {
  animation-duration: 0.95s;
  filter: blur(0.45px) saturate(1.5);
}

.tunnel.flash .streaks.two {
  animation-duration: 1.3s;
  filter: blur(0.9px) saturate(1.6);
  opacity: 0.55;
}

.tunnel.flash .streaks.motion {
  animation-duration: 0.9s;
  opacity: 0.25;
  filter: blur(1.2px) saturate(1.4);
}

.tunnel.flash .flash-layer,
.tunnel.flash .heart {
  display: none;
}

.flash-layer {
  position: absolute;
  inset: -30px;
  background: conic-gradient(from 90deg, rgba(255, 77, 109, 0.4), rgba(90, 209, 255, 0.4), rgba(255, 209, 102, 0.4), rgba(163, 255, 134, 0.4), rgba(255, 77, 109, 0.4));
  mix-blend-mode: screen;
  animation: spin 5s linear infinite;
}

.flash-layer.two {
  animation-duration: 7s;
  opacity: 0.7;
}

.flash-layer.three {
  animation-duration: 9s;
  opacity: 0.4;
}

.heart {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

.ask {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  text-align: center;
  margin: 16px 0 20px;
}

.answer-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 80px;
}

.yes,
.no {
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  cursor: pointer;
}

.yes {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 18px rgba(255, 77, 109, 0.35);
}

.no {
  background: #fff5df;
}

.no-caption {
  font-size: 0.9rem;
  color: #6b5a52;
  text-align: center;
  width: 100%;
}

.yes-reveal {
  text-align: center;
  margin-top: 16px;
  display: none;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: confetti 1.2s ease-out forwards;
}

.yes-reveal h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 6px;
}

.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.95rem;
}

.doodles {
  font-size: 1.2rem;
  letter-spacing: 6px;
  color: #ff6b9a;
}

@keyframes ring {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  40% { opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(5); opacity: 0; }
}

@keyframes lights {
  0% { transform: translateX(-20%); }
  100% { transform: translateX(20%); }
}

@keyframes warp {
  0% { transform: scale(0.9) rotate(0deg); }
  100% { transform: scale(1.3) rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes forward {
  0% {
    transform: scale(0.86);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.45);
    opacity: 1;
  }
}

.fireflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fireflies span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  animation: drift 3.6s ease-in-out infinite;
}

.fireflies span:nth-child(1) { left: 35%; top: 42%; animation-delay: 0s; }
.fireflies span:nth-child(2) { left: 52%; top: 38%; animation-delay: 0.4s; }
.fireflies span:nth-child(3) { left: 60%; top: 48%; animation-delay: 0.8s; }
.fireflies span:nth-child(4) { left: 42%; top: 55%; animation-delay: 1.2s; }
.fireflies span:nth-child(5) { left: 48%; top: 62%; animation-delay: 1.6s; }
.fireflies span:nth-child(6) { left: 58%; top: 60%; animation-delay: 2s; }
.fireflies span:nth-child(7) { left: 40%; top: 30%; animation-delay: 2.4s; }
.fireflies span:nth-child(8) { left: 64%; top: 34%; animation-delay: 2.8s; }

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

@keyframes shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-1px, 2px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-18px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-80px) rotate(180deg); opacity: 0; }
}

@media (max-width: 720px) {
  .paper {
    margin: 20px 12px 36px;
    padding: 18px 14px 26px;
    overflow: visible;
  }

  .stamp {
    position: static;
    margin: 0 auto 12px;
  }

  .choices {
    justify-content: center;
  }

  .photo-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .panel h2 {
    font-size: 1.25rem;
  }

  .panel p {
    font-size: 0.95rem;
  }

  .tunnel.circle {
    width: min(360px, 100%);
  }

  .runner {
    bottom: 10px;
    font-size: 0.75rem;
  }

  .choices {
    gap: 10px;
  }

  .choice {
    width: 100%;
    justify-content: center;
  }

  .answer-area {
    gap: 10px;
  }

  .yes,
  .no {
    width: 100%;
    justify-content: center;
  }

  .photo {
    min-height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
