:root {
  --rose-950: #4a1028;
  --rose-800: #9d174d;
  --rose-600: #db2777;
  --rose-500: #ec4899;
  --rose-400: #f472b6;
  --rose-300: #f9a8d4;
  --rose-200: #fbcfe8;
  --rose-100: #fce7f3;
  --blush: #fff0f6;
  --cream-pink: #ffe4f0;
  --hot: #ff4d94;
  --gold: #f6c1d0;
  --ink: #3b1020;
  --ink-soft: #6b2a45;
  --white: #fffafc;
  --shadow: 0 18px 50px rgba(157, 23, 77, 0.18);
  --radius: 28px;
  --font-display: "Cormorant Infant", Georgia, serif;
  --font-script: "Marck Script", cursive;
  --font-body: "Nunito", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, #ffd6e8 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, #ffb8d9 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, #ffc9e0 0%, transparent 55%),
    linear-gradient(165deg, #fff5f9 0%, #ffe0ef 45%, #ffd0e5 100%);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: float 12s ease-in-out infinite;
}

.blob-a {
  width: 420px;
  height: 420px;
  background: #ff8fbf;
  top: -120px;
  left: -80px;
}

.blob-b {
  width: 360px;
  height: 360px;
  background: #ffb3d4;
  right: -100px;
  top: 30%;
  animation-delay: -4s;
}

.blob-c {
  width: 480px;
  height: 480px;
  background: #ff9ec8;
  bottom: -180px;
  left: 25%;
  animation-delay: -7s;
}

.sparkles span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--rose-400) 70%, transparent 100%);
  opacity: 0.7;
  animation: twinkle 3.5s ease-in-out infinite;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.teaser {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.teaser-card {
  margin-top: 1.75rem;
  padding: 1.25rem 1.4rem;
  max-width: 34rem;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 250, 252, 0.92), rgba(255, 214, 232, 0.88));
  border: 1px solid rgba(244, 114, 182, 0.4);
  box-shadow: var(--shadow);
}

.teaser-hint {
  margin: 0;
  font-weight: 700;
  line-height: 1.55;
  color: var(--ink-soft);
}

.teaser-hint code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.92em;
  color: var(--rose-800);
  word-break: break-all;
}

.screen {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen[hidden] {
  display: none !important;
}

.brand-mark {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-600);
  margin-bottom: 0.85rem;
}

.hero-title,
.congrats-title {
  margin: 0 0 1rem;
  line-height: 0.95;
}

.hero-title .script,
.congrats-title .script {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  color: var(--rose-600);
  font-weight: 400;
}

.hero-title .display,
.congrats-title .display {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 700;
  color: var(--rose-950);
  letter-spacing: -0.02em;
}

.lead,
.congrats-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 38rem;
}

.password-panel {
  margin: 2rem 0 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(145deg, rgba(255, 250, 252, 0.92), rgba(255, 228, 240, 0.85));
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.field-label {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-800);
  margin-bottom: 0.65rem;
}

.password-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.password-row input {
  flex: 1 1 220px;
  min-height: 54px;
  border: 2px solid var(--rose-300);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.password-row input:focus {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2);
}

.form-error {
  margin: 0.85rem 0 0;
  color: #be123c;
  font-weight: 700;
}

.btn {
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--hot), var(--rose-600));
  color: white;
  box-shadow: 0 10px 28px rgba(219, 39, 119, 0.35);
  min-height: 54px;
  min-width: 140px;
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(219, 39, 119, 0.45);
}

.btn-ghost {
  display: inline-flex;
  margin-top: 2rem;
  background: transparent;
  color: var(--rose-800);
  border: 2px solid var(--rose-300);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.55);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 1rem;
  color: var(--rose-950);
}

.hint-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.hint-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 1.25rem;
  border-radius: 22px;
  background: rgba(255, 250, 252, 0.78);
  border: 1px solid rgba(249, 168, 212, 0.65);
  box-shadow: 0 8px 24px rgba(190, 24, 93, 0.08);
}

.hint-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(145deg, var(--rose-400), var(--rose-600));
  box-shadow: 0 6px 16px rgba(219, 39, 119, 0.3);
}

.hint-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--rose-800);
}

.hint-item p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.quiz-top {
  margin-bottom: 1.5rem;
}

.progress-wrap {
  margin-top: 0.5rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: var(--rose-800);
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(244, 114, 182, 0.35);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 10%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose-300), var(--hot), var(--rose-600));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.question-panel {
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(160deg, rgba(255, 250, 252, 0.95), rgba(255, 214, 232, 0.88)),
    var(--blush);
  border: 1px solid rgba(244, 114, 182, 0.4);
  box-shadow: var(--shadow);
}

.question-kicker {
  margin: 0 0 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--rose-600);
}

.question-text {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  color: var(--rose-950);
}

.answers {
  display: grid;
  gap: 0.8rem;
}

.answer-btn {
  text-align: left;
  width: 100%;
  border: 2px solid rgba(244, 114, 182, 0.45);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  transition: transform 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.answer-btn:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--rose-500);
  background: #fff;
  box-shadow: 0 10px 24px rgba(219, 39, 119, 0.15);
}

.answer-btn.is-picked {
  border-color: var(--rose-600);
  background: linear-gradient(135deg, #ffe4f1, #ffd0e6);
  box-shadow: 0 12px 28px rgba(219, 39, 119, 0.22);
}

.answer-btn.is-correct {
  border-color: #16a34a;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.answer-btn.is-wrong {
  border-color: #e11d48;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.75rem;
  z-index: 40;
  width: min(360px, calc(100% - 2rem));
  padding: 1rem 1.25rem 1.1rem;
  border-radius: 22px;
  text-align: center;
  color: var(--rose-950);
  background: linear-gradient(145deg, #fff7fb, #ffd6e8);
  border: 1px solid rgba(244, 114, 182, 0.55);
  box-shadow: 0 18px 40px rgba(157, 23, 77, 0.28);
  transform: translate(-50%, 20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast-kicker {
  margin: 0;
  font-family: var(--font-script);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--rose-600);
}

.toast-text {
  margin: 0.35rem 0 0;
  font-weight: 800;
  color: var(--ink-soft);
}

.answer-letter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(145deg, var(--rose-400), var(--rose-600));
}

.congrats-layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) minmax(180px, 280px);
  gap: 1.25rem;
  align-items: stretch;
}

.congrats-hero {
  text-align: center;
  padding: 0.5rem 0.25rem;
  min-width: 0;
}

.congrats-hero .brand-mark {
  margin-bottom: 1rem;
}

.photo-slideshow,
.photo-bottom {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(244, 114, 182, 0.45);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.85), transparent 45%),
    linear-gradient(145deg, #ffe0ef, #ffc2de);
  box-shadow: 0 12px 28px rgba(219, 39, 119, 0.12);
}

.photo-slideshow {
  min-height: 360px;
}

.photo-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.photo-slideshow img.is-active {
  opacity: 1;
}

.bottom-video {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  background: transparent;
  border: 0;
  vertical-align: middle;
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-weight: 800;
  color: var(--rose-800);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.photo-bottom {
  margin: 1.5rem auto 0;
  width: min(100%, 680px);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 22px;
}

.score-banner {
  margin: 1.5rem auto 0;
  max-width: 28rem;
  padding: 1.15rem 1.35rem;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 250, 252, 0.95), rgba(255, 214, 232, 0.9));
  border: 1px solid rgba(244, 114, 182, 0.45);
  box-shadow: 0 12px 30px rgba(219, 39, 119, 0.14);
}

.score-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--rose-800);
  line-height: 1.15;
}

.score-phrase {
  margin: 0.55rem 0 0;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 1.02rem;
}

.congrats-text {
  margin: 1.25rem auto 0;
  white-space: pre-line;
  font-size: 1.12rem;
  max-width: 40rem;
}

#screen-congrats {
  text-align: center;
}

#screen-congrats .btn-ghost {
  display: inline-flex;
  margin: 1.75rem auto 0;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, 30px, 0) scale(1.06);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.7);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.2);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSoft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.is-shake {
  animation: shake 0.35s ease;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 1.25rem, 920px);
    padding-top: 1.5rem;
  }

  .password-panel,
  .question-panel {
    padding: 1.15rem;
  }

  .congrats-layout {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .congrats-hero {
    grid-column: 1 / -1;
    order: -1;
  }

  .photo-slideshow {
    min-height: 180px;
  }

  .bottom-video {
    max-height: 300px;
  }

  .hint-item {
    grid-template-columns: 36px 1fr;
    gap: 0.75rem;
  }

  .hint-num {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
}
