@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap");

:root {
  color-scheme: dark;
  --bg: #061114;
  --bg-deep: #020708;
  --panel: rgba(10, 28, 31, 0.76);
  --line: rgba(157, 220, 200, 0.2);
  --text: #f5f1e8;
  --muted: #aebdb8;
  --accent: #e8c66e;
  --accent-soft: #ffe7a8;
  --green: #70d6ae;
  --rose: #df6e79;
  --display: "Cinzel", Georgia, serif;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(40, 106, 91, 0.22), transparent 42%),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
  color: var(--text);
  font-family: var(--sans);
  transition: background 1.8s ease;
}

body.modal-open { overflow: hidden; }

body[data-theme="forest"] { --accent: #efc85e; --green: #7bd99b; --line: rgba(133, 213, 160, .25); }
body[data-theme="race"] { --accent: #ffc64c; --green: #5fe4ff; --line: rgba(95, 228, 255, .24); }
body[data-theme="choice"] { --accent: #75e8ff; --green: #75e8ff; --line: rgba(117, 232, 255, .25); }
body[data-theme="survival"] { --accent: #d3c28c; --green: #a6bd8c; --line: rgba(166, 189, 140, .22); }
body[data-theme="together"] { --accent: #ef9ec1; --green: #8fdbea; --line: rgba(239, 158, 193, .23); }
body[data-theme="romance"] {
  --bg: #26090d;
  --bg-deep: #080305;
  --panel: rgba(53, 15, 21, 0.6);
  --line: rgba(246, 164, 161, 0.2);
  --accent: #f3b6a9;
  --accent-soft: #ffe0d4;
  --green: #e78088;
  background:
    radial-gradient(circle at 50% 10%, rgba(161, 43, 56, 0.3), transparent 44%),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
}

button { font: inherit; }

.noise, .stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  z-index: 20;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.stars {
  opacity: .5;
  background-image:
    radial-gradient(circle at 15% 20%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 16%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 63% 72%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 24% 82%, #fff 0 1px, transparent 1.5px);
  background-size: 270px 270px, 350px 350px, 420px 420px, 500px 500px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  animation: drift 120s linear infinite;
  will-change: background-position;
}

.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
}

.screen {
  position: relative;
  min-height: 100svh;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: screen-in .8s both;
}

.is-hidden { display: none !important; }

.profile-modal,
.collect-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(1, 6, 7, .84);
  backdrop-filter: blur(18px);
  animation: screen-in .55s both;
}

.profile-panel,
.collect-panel {
  width: min(560px, 100%);
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), transparent 44%),
    #081517;
  box-shadow: 0 35px 120px rgba(0,0,0,.65);
  text-align: center;
}

.profile-panel__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 1.7rem;
}

.profile-panel h2,
.collect-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.profile-panel > p:not(.eyebrow) { margin: 15px auto 28px; color: var(--muted); line-height: 1.6; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; text-align: left; }
.profile-fields label { display: grid; gap: 8px; }
.profile-fields span { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.profile-fields input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  color: var(--text);
  background: rgba(255,255,255,.035);
}
.profile-fields input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.profile-panel .primary-button { width: 100%; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.start-screen { text-align: center; }

.quiz-intro-screen,
.quest-intro-screen { text-align: center; }

.quiz-intro-screen h2,
.quest-intro-screen h2,
.baby-screen h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.06;
}

.quest-intro-screen h2 em { color: var(--accent); font-style: normal; }
.quiz-badge { width: 82px; height: 82px; margin-bottom: 28px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-family: var(--display); font-size: 2.3rem; box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 14%, transparent); }
.quiz-rules { width: min(820px, 100%); margin: 0 auto 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quiz-rules span { padding: 16px; border: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.quiz-rules b { display: block; margin-bottom: 7px; color: var(--accent); font-family: var(--display); }

.start-screen::before,
.game-screen::before {
  content: "";
  position: absolute;
  inset: 4.5%;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 24% 0, 24% 1px, 76% 1px, 76% 0, 100% 0, 100% 100%, 76% 100%, 76% calc(100% - 1px), 24% calc(100% - 1px), 24% 100%, 0 100%);
  pointer-events: none;
}

.start-emblem {
  position: relative;
  width: 86px;
  height: 74px;
  margin-bottom: 30px;
  filter: drop-shadow(0 0 25px rgba(232, 198, 110, .25));
}

.start-emblem span {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

.start-emblem span:nth-child(1) { left: 2px; top: 20px; }
.start-emblem span:nth-child(2) { right: 2px; top: 20px; }
.start-emblem span:nth-child(3) { left: 20px; top: 0; }

h1, h2, p { text-wrap: balance; }

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .95;
}

h1 em {
  display: block;
  color: var(--accent);
  font-style: normal;
  letter-spacing: .08em;
}

.lead {
  max-width: 600px;
  margin: 28px auto 36px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.player-card {
  min-width: min(390px, 90vw);
  padding: 18px 24px;
  margin-bottom: 30px;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
}

.player-card__label, .hud-label, .inventory__label, .relationship-status span, .duo-card span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.player-card strong { font-family: var(--display); font-size: 1.2rem; }

.status { color: var(--green); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.status i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

.primary-button, .soft-button, .yes-button, .no-button {
  cursor: pointer;
  border: 0;
  color: #07110f;
  background: var(--accent);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  min-width: 230px;
  min-height: 56px;
  padding: 0 22px 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.primary-button:hover, .soft-button:hover, .yes-button:hover { transform: translateY(-3px); box-shadow: 0 12px 35px color-mix(in srgb, var(--accent) 24%, transparent); }

.sound-hint { margin: 16px 0 0; color: #82908c; font-size: .74rem; }

.sound-toggle {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(5, 14, 15, .72);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.sound-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle .sound-off { display: none; }
.sound-toggle[aria-pressed="false"] .sound-on { display: none; }
.sound-toggle[aria-pressed="false"] .sound-off { display: block; }

.game-screen { justify-content: space-between; }
.cover-quiz-screen { justify-content: space-between; }
.game-hud { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.game-hud > div:first-child { display: grid; gap: 6px; }
.game-hud strong { font-family: var(--display); font-size: 1.05rem; }
.progress-wrap { width: min(260px, 42vw); text-align: right; }
.progress-wrap span { color: var(--accent); font-family: var(--display); font-size: .8rem; }
.progress-track { width: 100%; height: 3px; margin-top: 9px; background: rgba(255,255,255,.09); overflow: hidden; }
.progress-track i { display: block; width: 20%; height: 100%; background: var(--accent); box-shadow: 0 0 14px var(--accent); transition: width .8s ease; }

.chapter {
  width: min(820px, 100%);
  margin: clamp(40px, 8vh, 90px) auto;
  text-align: center;
}

.chapter-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  font-size: 2rem;
  box-shadow: inset 0 0 24px rgba(255,255,255,.025), 0 0 40px color-mix(in srgb, var(--accent) 12%, transparent);
}

.chapter-kicker { margin: 0 0 12px; color: var(--green); font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.chapter h2 { margin: 0; font-family: var(--display); font-size: clamp(2rem, 5vw, 4.1rem); font-weight: 600; line-height: 1.08; }
.chapter-text { max-width: 640px; margin: 22px auto 30px; color: var(--muted); font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.6; }

.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice-card {
  min-height: 112px;
  padding: 20px 16px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border .2s, background .2s, transform .2s;
}
.choice-card:hover, .choice-card:focus-visible { transform: translateY(-3px); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); outline: none; }
.choice-card span { display: block; margin-bottom: 10px; font-size: 1.35rem; }
.choice-card strong { font-family: var(--display); font-size: .86rem; letter-spacing: .04em; }

.sync-panel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.sync-player { padding: 26px 18px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.sync-player span { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; }
.sync-player strong { display: block; margin: 8px 0 18px; font-family: var(--display); }
.sync-player button { padding: 10px 16px; border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer; text-transform: uppercase; font-size: .7rem; font-weight: 800; letter-spacing: .1em; }
.sync-player.is-active { border-color: var(--green); box-shadow: inset 0 0 30px color-mix(in srgb, var(--green) 8%, transparent); }
.sync-player.is-active button { color: #06110f; background: var(--green); border-color: var(--green); }
.sync-link { width: 90px; height: 2px; background: var(--line); position: relative; }
.sync-link::after { content: ""; position: absolute; inset: -4px 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.sync-panel.is-complete .sync-link { background: var(--green); box-shadow: 0 0 12px var(--green); }

.chapter-result { margin-top: 26px; min-height: 42px; color: var(--green); font-family: var(--display); }

.cover-quiz-content { width: min(1040px, 100%); margin: 42px auto 0; text-align: center; }
.cover-quiz-content h2 { max-width: 820px; min-height: 92px; margin: 0 auto 28px; font-family: var(--display); font-size: clamp(1.6rem, 4vw, 3.2rem); font-weight: 600; line-height: 1.2; }
.cover-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.cover-card { position: relative; padding: 0; aspect-ratio: 2 / 3; border: 1px solid var(--line); color: var(--text); background: #0b171a; cursor: pointer; overflow: hidden; transition: transform .25s, border .25s, opacity .25s; }
.cover-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 58%, rgba(1,6,7,.93)); }
.cover-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s, filter .3s; }
.cover-card strong { position: absolute; z-index: 2; left: 9px; right: 9px; bottom: 11px; font-family: var(--display); font-size: clamp(.62rem, 1.2vw, .82rem); line-height: 1.2; }
.cover-card:hover, .cover-card:focus-visible { transform: translateY(-7px); border-color: var(--accent); outline: none; }
.cover-card:hover img { transform: scale(1.035); }
.cover-card.is-wrong { animation: shake .36s ease; border-color: #f16f75; }
.cover-card.is-correct { border-color: var(--green); box-shadow: 0 0 35px color-mix(in srgb, var(--green) 24%, transparent); }
.cover-grid.is-answered .cover-card:not(.is-correct) { opacity: .28; }
.cover-feedback { min-height: 26px; margin: 20px 0 0; color: var(--green); font-family: var(--display); }

.baby-screen { text-align: center; }
.baby-options { width: min(780px, 100%); display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.baby-options button { min-height: 126px; padding: 10px; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 18px; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.025); cursor: pointer; text-align: left; overflow: hidden; transition: transform .2s, border .2s; }
.baby-options button:hover { transform: translateY(-3px); border-color: var(--accent); }
.baby-options img { width: 112px; height: 104px; display: block; object-fit: cover; object-position: center 28%; filter: saturate(.85) contrast(1.04); transition: transform .35s, filter .35s; }
.baby-options button:hover img { transform: scale(1.045); filter: saturate(1) contrast(1.04); }
.baby-options strong { font-family: var(--display); font-size: .9rem; }
.baby-options button.is-wrong { animation: shake .36s ease; border-color: #f16f75; }
.baby-options button.is-correct { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, transparent); }

.inventory { width: 100%; display: flex; align-items: center; gap: 16px; }
.fragments { display: flex; gap: 8px; }
.fragment { width: 34px; height: 8px; border: 1px solid var(--line); transform: skewX(-28deg); }
.fragment.is-found { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }

.transition-screen { text-align: center; }
.scan-orb { position: relative; width: 110px; height: 110px; margin-bottom: 38px; border: 1px solid var(--line); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
.scan-orb::before, .scan-orb::after { content: ""; position: absolute; inset: 13px; border: 1px dashed var(--accent); border-radius: 50%; animation: spin 7s linear infinite; }
.scan-orb::after { inset: 30px; animation-direction: reverse; animation-duration: 4s; }
.scan-orb i { position: absolute; inset: 45px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 30px var(--accent); }
.transition-copy { min-height: 160px; display: grid; place-content: center; gap: 13px; }
.transition-copy p { margin: 0; font-family: var(--display); font-size: clamp(1.2rem, 3vw, 2rem); animation: copy-in .7s both; }
.transition-copy p.is-done { color: var(--green); }
.loading-line { width: min(440px, 80vw); height: 2px; overflow: hidden; background: rgba(255,255,255,.08); }
.loading-line i { display: block; width: 30%; height: 100%; background: var(--accent); animation: loading 1.5s ease-in-out infinite; }

.reveal-screen, .letter-screen, .proposal-screen, .success-screen, .rewards-screen { text-align: center; }
.floating-hearts { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.floating-hearts i { position: absolute; bottom: -30px; color: rgba(226, 96, 111, .35); animation: float-heart var(--duration) linear infinite; animation-delay: var(--delay); }
.reveal-copy { max-width: 780px; display: grid; gap: 26px; }
.reveal-line { margin: 0; color: rgba(255,255,255,.72); font-family: var(--serif); font-size: clamp(1.2rem, 3vw, 2rem); line-height: 1.55; opacity: 0; animation: reveal-line 1.2s forwards; }
.reveal-line:nth-child(2) { animation-delay: 3.8s; }
.reveal-line:nth-child(3) { animation-delay: 8s; }
.reveal-line--accent { color: var(--accent-soft); font-size: clamp(1.4rem, 4vw, 2.7rem); }
.soft-button { margin-top: 46px; padding: 13px 25px; color: var(--accent-soft); border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); opacity: 0; animation: reveal-line .8s 12.5s forwards; }

.letter-card { position: relative; max-width: 760px; padding: clamp(32px, 7vw, 72px); border: 1px solid var(--line); background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.06), transparent 60%); box-shadow: 0 35px 100px rgba(0,0,0,.38); }
.letter-card::before, .letter-card::after { content: ""; position: absolute; width: 60px; height: 60px; border-color: var(--accent); opacity: .4; }
.letter-card::before { top: 12px; left: 12px; border-top: 1px solid; border-left: 1px solid; }
.letter-card::after { right: 12px; bottom: 12px; border-right: 1px solid; border-bottom: 1px solid; }
.letter-card__ornament { color: var(--accent); }
.letter-card p { margin: 17px 0; color: rgba(255,255,255,.75); font-family: var(--serif); font-size: clamp(1.05rem, 2.4vw, 1.45rem); line-height: 1.55; }
.letter-card .letter-card__final { color: var(--accent-soft); font-size: clamp(1.25rem, 3vw, 1.8rem); }
.letter-beat { opacity: 0; transform: translateY(10px); transition: opacity 1.1s ease, transform 1.1s ease; }
.letter-beat.is-visible { opacity: 1; transform: translateY(0); }
.letter-continue { animation: none; pointer-events: none; }
.letter-continue.is-visible { opacity: 1; pointer-events: auto; animation: reveal-line .9s both; }

.proposal-screen h2 { margin: 0 0 10px; font-family: var(--serif); font-size: clamp(2.5rem, 7vw, 5.8rem); font-weight: 500; }
.proposal-question { margin: 0; color: var(--accent-soft); font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 3.3rem); }
.proposal-actions { position: relative; width: min(760px, 94vw); min-height: 230px; margin-top: 48px; display: flex; align-items: flex-start; justify-content: center; gap: 16px; }
.yes-button, .no-button { min-width: 190px; padding: 16px 22px; font-weight: 800; }
.no-button { color: var(--text); border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); }
.no-button.is-running { position: absolute; transition: left .14s ease, top .14s ease; }
.proposal-message { min-height: 20px; color: var(--muted); font-size: .84rem; }

.success-screen h2, .rewards-heading h2 { margin: 0 0 36px; font-family: var(--serif); font-size: clamp(2.3rem, 6vw, 5rem); font-weight: 500; }
.duo-card { width: min(780px, 100%); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; }
.duo-card div { padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.duo-card strong { display: block; margin-top: 8px; font-family: var(--display); font-size: clamp(1rem, 2.4vw, 1.45rem); }
.duo-card i { color: var(--accent); font-family: var(--serif); font-size: 2.6rem; font-style: normal; }
.relationship-status { margin: 24px 0 34px; display: grid; gap: 8px; }
.relationship-status strong { font-family: var(--serif); font-size: 1.4rem; }
.relationship-status b { color: var(--rose); }

.rewards-heading { max-width: 760px; opacity: 0; transform: translateY(16px); }
.rewards-heading h2 { margin-bottom: 14px; font-size: clamp(2rem, 5vw, 4rem); }
.rewards-heading > p:last-child { color: var(--muted); }
.reward-grid { width: 100%; margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.reward-card { position: relative; min-height: 300px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.025); cursor: pointer; overflow: hidden; opacity: 0; transform: translateY(24px); transition: transform .3s, border .3s, opacity .3s; }
.reward-card:not(:disabled):hover { transform: translateY(-5px); border-color: var(--accent); }
.reward-card.is-locked { opacity: .34; cursor: not-allowed; filter: grayscale(.6); }
.reward-number { position: absolute; top: 16px; left: 18px; color: var(--muted); font-family: var(--display); font-size: .7rem; }
.reward-state { margin: 22px 0 12px; color: var(--accent); font-size: .65rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.reward-card strong { min-height: 44px; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s; }
.gift-box { position: relative; width: 74px; height: 58px; margin-top: 18px; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); transition: transform .5s, border-radius .5s; }
.gift-box::before { content: ""; position: absolute; left: -7px; right: -7px; top: -13px; height: 14px; border: 2px solid var(--accent); background: #2c1116; }
.gift-box::after { content: ""; position: absolute; top: -13px; bottom: 0; left: calc(50% - 5px); width: 10px; background: var(--accent); }
.gift-box i::before, .gift-box i::after { content: ""; position: absolute; top: -31px; width: 27px; height: 20px; border: 2px solid var(--accent); border-radius: 50% 50% 0 50%; }
.gift-box i::before { left: 10px; transform: rotate(17deg); }
.gift-box i::after { right: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-17deg); }
.reward-card.is-revealed { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.reward-card.is-revealed strong { opacity: 1; transform: translateY(0); }
.reward-card.is-revealed .gift-box { transform: rotateY(180deg) scale(.82); border-radius: 50%; box-shadow: 0 0 45px color-mix(in srgb, var(--accent) 35%, transparent); }
.reward-card.is-revealed .gift-box::before, .reward-card.is-revealed .gift-box::after, .reward-card.is-revealed .gift-box i { opacity: 0; }
.reward-card.is-revealed .gift-box { display: none; }
.reward-thumb { display: none; width: 128px; height: 128px; object-fit: contain; filter: drop-shadow(0 16px 25px rgba(0,0,0,.35)); animation: item-pop .7s both; }
.reward-card.is-revealed .reward-thumb { display: block; }
.reward-prompt { min-height: 24px; margin: 28px 0 0; color: var(--accent-soft); font-family: var(--serif); opacity: 0; }
.rewards-screen.is-entered .rewards-heading { animation: reveal-line .9s .2s forwards; }
.rewards-screen:not(.is-entered) .reward-card { opacity: 0; }
.rewards-screen.is-entered .reward-card:nth-child(1) { animation: reward-in .8s 1.2s forwards; }
.rewards-screen.is-entered .reward-card:nth-child(2) { animation: reward-in .8s 1.65s forwards; }
.rewards-screen.is-entered .reward-card:nth-child(3) { animation: reward-in .8s 2.1s forwards; }
.rewards-screen.is-entered .reward-prompt { animation: reveal-line .8s 2.8s forwards; }

.collect-modal { background: rgba(18, 4, 7, .88); }
.collect-panel { position: relative; background: radial-gradient(circle at 50% 32%, rgba(177,67,80,.18), transparent 55%), #17080b; }
.collect-panel img { width: min(360px, 78vw); height: min(360px, 42vh); margin: -4px auto 10px; display: block; object-fit: contain; filter: drop-shadow(0 24px 35px rgba(0,0,0,.4)); animation: item-pop .85s both; }
.collect-panel h2 { margin-bottom: 28px; color: var(--accent-soft); font-family: var(--serif); }
.collect-panel .primary-button { margin: auto; }

@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes copy-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes drift {
  to {
    background-position: -270px -270px, -350px -350px, -420px -420px, -500px -500px;
  }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.05); box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 12%, transparent); } }
@keyframes loading { 0% { transform: translateX(-110%); } 100% { transform: translateX(440%); } }
@keyframes reveal-line { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(12px); } }
@keyframes float-heart { to { transform: translateY(-115vh) rotate(35deg); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-3px); } }
@keyframes reward-in { to { opacity: 1; transform: translateY(0); } }
@keyframes item-pop { from { opacity: 0; transform: scale(.72) rotate(-3deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

@media (max-width: 720px) {
  .screen { padding: 25px 20px 72px; }
  .start-screen::before, .game-screen::before { inset: 12px; }
  .game-hud { align-items: center; }
  .game-hud strong { font-size: .85rem; }
  .choice-grid { grid-template-columns: 1fr; }
  .profile-fields { grid-template-columns: 1fr; }
  .quiz-rules { grid-template-columns: 1fr; }
  .cover-quiz-screen { padding-left: 12px; padding-right: 12px; }
  .cover-quiz-content { margin-top: 28px; }
  .cover-quiz-content h2 { min-height: 82px; }
  .cover-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .cover-card:last-child { width: calc(50% - 4px); grid-column: 1 / -1; justify-self: center; }
  .baby-options { grid-template-columns: 1fr; }
  .baby-options button { grid-template-columns: 96px 1fr; min-height: 112px; }
  .baby-options img { width: 96px; height: 92px; }
  .choice-card { min-height: 78px; display: grid; grid-template-columns: 40px 1fr; align-items: center; text-align: left; }
  .choice-card span { margin: 0; }
  .sync-panel { grid-template-columns: 1fr; }
  .sync-link { width: 2px; height: 34px; margin: auto; }
  .sync-link::after { inset: 50% -4px auto; }
  .inventory { justify-content: center; }
  .inventory__label { display: none; }
  .proposal-actions { min-height: 290px; flex-direction: column; align-items: center; justify-content: flex-start; }
  .yes-button, .no-button { min-width: 230px; }
  .duo-card { grid-template-columns: 1fr; gap: 8px; }
  .duo-card i { line-height: .7; }
  .reward-grid { grid-template-columns: 1fr; }
  .reward-card { min-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
