@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #294259;
  --muted: #62788a;
  --pink: #ff7195;
  --pink-dark: #e95981;
  --white-glass: rgba(255, 255, 255, 0.79);
  --border: rgba(255, 255, 255, 0.86);
  --shadow: 0 18px 55px rgba(47, 91, 117, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Nunito', 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background: #9bdcff;
}
button { font: inherit; }
button:focus-visible { outline: 3px solid #397fd1; outline-offset: 3px; }
[hidden] { display: none !important; }

.scene {
  --custom-background: none;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background-color: #9bdcff;
  background-image:
    var(--custom-background),
    radial-gradient(ellipse at 8% 82%, #86c95f 0 14%, transparent 14.4%),
    radial-gradient(ellipse at 38% 89%, #b0df79 0 19%, transparent 19.4%),
    radial-gradient(ellipse at 76% 87%, #91ce65 0 18%, transparent 18.4%),
    radial-gradient(ellipse 75px 32px at 14% 19%, rgba(255,255,255,.9) 0 65%, transparent 67%),
    radial-gradient(ellipse 68px 30px at 18% 18%, rgba(255,255,255,.9) 0 65%, transparent 67%),
    radial-gradient(ellipse 70px 31px at 84% 24%, rgba(255,255,255,.88) 0 65%, transparent 67%),
    radial-gradient(ellipse 60px 25px at 88% 23%, rgba(255,255,255,.88) 0 65%, transparent 67%),
    linear-gradient(180deg, #78caff 0%, #c6eeff 57%, #d9f4bf 57%, #a6d975 100%);
  background-size: cover, auto, auto, auto, auto, auto, auto, auto, auto;
  background-position: center, center, center, center, center, center, center, center, center;
  background-attachment: fixed;
  transition: background-image 250ms ease;
}
.scene::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03) 47%, rgba(255,255,255,.12));
}
.topbar {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 2px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 9px; color: #245070; font-weight: 900; font-size: 14px; letter-spacing: .03em; }
.brand-heart { color: #ff7295; font-size: 22px; text-shadow: 0 2px 0 white; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.progress-label { color: #355d75; background: rgba(255,255,255,.56); border: 1px solid rgba(255,255,255,.7); padding: 7px 13px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.music-button { border: 1px solid rgba(255,255,255,.95); border-radius: 99px; color: #315a75; background: rgba(255,255,255,.64); padding: 8px 12px; cursor: pointer; font-size: 12px; font-weight: 800; box-shadow: 0 4px 14px rgba(43,88,116,.07); }
.music-button:hover { background: #fff; }
.experience { position: relative; width: min(1030px, calc(100% - 32px)); margin: auto; padding: 8px 0 22px; display: flex; flex-direction: column; align-items: center; z-index: 1; }
.eyebrow { color: #326580; font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; text-align: center; margin: 4px 0 12px; }
.sparkle { color: #ff7295; margin: 0 5px; }
.question-panel { width: min(790px, 100%); padding: 20px 28px 15px; background: rgba(255,255,255,.61); border: 1px solid var(--border); border-radius: 28px; box-shadow: 0 10px 30px rgba(59,106,131,.08); text-align: center; backdrop-filter: blur(8px); }
h1 { margin: 0; font-size: clamp(24px, 3.3vw, 36px); line-height: 1.18; font-weight: 900; letter-spacing: -.035em; color: #2a4b64; }
.question-hint { margin: 8px 0 0; color: #58758a; font-size: 14px; font-weight: 600; }
.character-stage { position: relative; width: min(780px, 100%); min-height: 355px; margin: 6px auto 0; display: flex; align-items: flex-end; justify-content: center; }
.speech-bubble {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 53%;
  width: clamp(290px, 47vw, 455px);
  min-height: 152px;
  padding: 38px 45px 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #35414a;
  border-radius: 49% / 43%;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 22px rgba(56,91,110,.14);
  transform: translateX(-15%);
  text-align: center;
  transition: opacity .2s ease;
}
.speech-bubble::before { content: ''; position: absolute; width: 20px; height: 14px; right: 19%; bottom: 0px; background: white; border-bottom: 2px solid #35414a; border-right: 2px solid #35414a; transform: rotate(25deg) skew(17deg); border-radius: 0 0 5px 0; }
.speech-bubble p { margin: 0; color: #344858; font-size: clamp(13px, 1.35vw, 16px); line-height: 1.52; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }
.typing-cursor { display: none; width: 2px; height: 1.1em; margin-left: 3px; background: #f46e91; animation: blink .8s steps(2, start) infinite; flex: 0 0 2px; }
.speech-bubble.is-typing .typing-cursor { display: inline-block; }
@keyframes blink { to { visibility: hidden; } }
.sticker-wrap { position: relative; width: 100%; height: 228px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.character-gif { max-width: min(300px, 60vw); width: 260px; max-height: 245px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 12px 9px rgba(54,94,48,.14)); }
.floating-heart { position: absolute; color: #ff7195; text-shadow: 0 2px 0 rgba(255,255,255,.75); animation: bob 2.6s ease-in-out infinite; font-size: 24px; }
.heart-one { left: calc(50% - 150px); bottom: 111px; }
.heart-two { left: calc(50% + 128px); bottom: 70px; animation-delay: .8s; font-size: 27px; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-9px) rotate(7deg); } }
.options { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 13px; margin: 8px 0 0; width: 100%; }
.choice, .start-button { border: 0; border-radius: 999px; padding: 13px 24px; min-width: 180px; cursor: pointer; font-weight: 900; font-size: 14px; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.choice:hover, .start-button:hover { transform: translateY(-2px); }
.choice:active, .start-button:active { transform: translateY(0); }
.choice-primary, .start-button { color: white; background: linear-gradient(135deg, #ff8eac, #f2608a); box-shadow: 0 8px 18px rgba(236,91,133,.25); }
.choice-primary:hover, .start-button:hover { box-shadow: 0 11px 22px rgba(236,91,133,.34); }
.choice-secondary { color: #45647b; background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.98); box-shadow: 0 8px 18px rgba(52,93,115,.12); }
.choice-secondary:hover { background: #fff; }
.choice:disabled { opacity: .65; cursor: default; transform: none; }

/* Answer cards: custom GIF preview above each answer label. */
.options:has(.choice-card) { gap: 16px; margin-top: 14px; }
.choice-card {
  width: min(290px, calc(50% - 8px));
  min-width: 0;
  min-height: 220px;
  flex: 0 1 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 13px 13px 16px;
  border-radius: 25px;
  white-space: normal;
  border: 2px solid rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
}
.choice-card.choice-primary {
  color: #87405a;
  background: linear-gradient(160deg, rgba(255,244,248,.96), rgba(255,220,232,.91));
  border-color: rgba(255,255,255,.98);
  box-shadow: 0 10px 25px rgba(226,105,145,.18);
}
.choice-card.choice-secondary {
  color: #3e5c76;
  background: linear-gradient(160deg, rgba(246,251,255,.97), rgba(220,239,255,.92));
  border-color: rgba(255,255,255,.98);
  box-shadow: 0 10px 25px rgba(83,142,180,.16);
}
.choice-card .choice-gif {
  display: block;
  width: 100%;
  height: 143px;
  flex: 0 0 143px;
  object-fit: contain;
  border-radius: 17px;
  background: rgba(255,255,255,.63);
  border: 1px solid rgba(255,255,255,.84);
}
.choice-card .choice-label {
  display: block;
  width: 100%;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}
.choice-card:hover .choice-gif { background: rgba(255,255,255,.88); }
.continue-button { display: block; margin: 15px auto 0; padding: 10px 18px; border: 1px solid rgba(255,255,255,.9); border-radius: 999px; color: #2f5972; background: rgba(255,255,255,.82); font-weight: 900; cursor: pointer; box-shadow: 0 7px 16px rgba(52,93,115,.1); }
.continue-button:hover { background: white; }
.bottom-note { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 18px; color: #49738a; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bottom-note span:last-child { color: #f46d92; font-size: 16px; }

.welcome-overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 22px; background: rgba(50,94,119,.18); backdrop-filter: blur(7px); transition: opacity .35s ease, visibility .35s ease; }
.welcome-overlay.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.welcome-card { width: min(435px, 100%); padding: 32px 32px 27px; border-radius: 32px; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.91); box-shadow: 0 24px 75px rgba(47,91,117,.22); text-align: center; }
.welcome-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 20px; color: #f5658c; background: #fff0f4; font-size: 31px; transform: rotate(-7deg); }
.welcome-kicker { margin: 0 0 6px; color: #e86689; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.welcome-card h2 { margin: 0; color: #2d4c65; font-size: 32px; letter-spacing: -.04em; font-weight: 900; }
.welcome-copy { color: #61778a; line-height: 1.6; font-size: 14px; margin: 11px 0 22px; }
.start-button { width: 100%; }
.start-button span { margin-left: 9px; font-size: 17px; }
.welcome-footnote { margin: 14px 0 0; color: #8193a1; font-size: 11px; font-weight: 700; }

@media (min-width: 900px) and (min-height: 800px) {
  .experience { padding-top: 15px; }
  .character-stage { min-height: 405px; }
  .sticker-wrap { height: 264px; }
  .character-gif { width: 300px; max-height: 280px; }
  .speech-bubble { top: 5px; }
}
@media (max-width: 620px) {
  .topbar { width: calc(100% - 24px); padding-top: 14px; }
  .brand { font-size: 11px; gap: 5px; }
  .brand-heart { font-size: 18px; }
  .topbar-right { gap: 6px; }
  .progress-label { padding: 6px 9px; font-size: 10px; }
  .music-button { padding: 7px 9px; font-size: 11px; }
  .experience { width: calc(100% - 24px); padding-top: 9px; }
  .eyebrow { font-size: 10px; letter-spacing: .08em; }
  .question-panel { padding: 17px 15px 13px; border-radius: 22px; }
  h1 { font-size: clamp(23px, 6vw, 30px); }
  .question-hint { font-size: 12px; }
  .character-stage { min-height: 390px; margin-top: 4px; }
  .speech-bubble { top: 8px; left: 50%; width: min(390px, 94%); min-height: 142px; padding: 30px 32px 36px; transform: translateX(-50%); border-radius: 48% / 40%; }
  .speech-bubble p { font-size: 13px; }
  .sticker-wrap { height: 205px; }
  .character-gif { width: 230px; max-height: 205px; }
  .heart-one { left: calc(50% - 119px); bottom: 89px; }
  .heart-two { left: calc(50% + 105px); bottom: 55px; }
  .options { gap: 9px; }
  .choice { min-width: 145px; flex: 1 1 40%; padding: 12px 12px; font-size: 13px; }
  .choice-card { min-width: 0; width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); min-height: 178px; padding: 9px 8px 12px; border-radius: 19px; gap: 8px; }
  .choice-card .choice-gif { height: 105px; flex-basis: 105px; border-radius: 13px; }
  .choice-card .choice-label { font-size: 12px; }
  .options:has(.choice-card) { gap: 10px; }
  .bottom-note { margin-top: 13px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
