:root {
  color-scheme: dark;
  --ink: #eafcff;
  --muted: #9db9c4;
  --deep: #06131d;
  --panel: #0b2631;
  --aqua: #53d9ff;
  --green: #8ee86f;
  --yellow: #ffd85c;
  --pink: #ff769b;
  --line: rgba(111, 224, 240, .28);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--deep); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 13%, rgba(83, 217, 255, .12), transparent 28rem),
    linear-gradient(135deg, #06131d 0 45%, #09212a 45% 46%, #06131d 46% 100%);
  touch-action: manipulation;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .13;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(113, 236, 255, .16) 6px);
}
.app-shell { width: min(1180px, 100%); min-height: 100vh; margin: auto; padding: 0 clamp(14px, 3vw, 36px) 32px; }
.brand-bar { min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.back-link { color: var(--muted); text-decoration: none; font-size: .86rem; font-weight: 700; }
.back-link:hover { color: var(--ink); }
.brand-mark { display: flex; gap: 9px; align-items: baseline; letter-spacing: .14em; font-size: .66rem; color: var(--aqua); }
.brand-mark b { color: var(--ink); font-size: .76rem; }
.sound-button { justify-self: end; border: 1px solid var(--line); background: #081c26; color: var(--ink); border-radius: 2px; padding: 8px 12px; font-size: .78rem; font-weight: 800; cursor: pointer; }

.screen { animation: screen-in .42s cubic-bezier(.2, .8, .2, 1); }
.start-screen { min-height: calc(100vh - 100px); display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 5vw, 72px); }
.hero-copy { padding: 40px 0; position: relative; z-index: 2; }
.eyebrow { color: var(--aqua); font-weight: 900; letter-spacing: .14em; font-size: clamp(.68rem, 1.5vw, .82rem); }
h1 { margin: .22em 0; font-size: clamp(3rem, 7vw, 6rem); line-height: .88; letter-spacing: -.07em; text-shadow: 0 0 36px rgba(83, 217, 255, .18); }
h1 span { color: transparent; -webkit-text-stroke: 1px var(--aqua); text-shadow: 4px 4px 0 rgba(255, 118, 155, .22); }
.lead { max-width: 45rem; color: #c9e3e9; font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.85; }
.quick-rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.quick-rule span { border-left: 3px solid var(--aqua); background: rgba(83, 217, 255, .07); padding: 9px 11px; font-weight: 800; font-size: .86rem; }
.quick-rule b { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; color: var(--deep); background: var(--aqua); border-radius: 50%; }
.quick-rule i { color: var(--pink); font-style: normal; }
.launch-button, .check-button {
  position: relative; border: 0; border-radius: 3px; color: #06131d; background: var(--yellow); box-shadow: 7px 7px 0 #bb536e; cursor: pointer; font-weight: 900;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.launch-button { display: inline-flex; min-width: 255px; padding: 14px 20px; flex-direction: column; align-items: flex-start; }
.launch-button span { font-size: 1.16rem; }
.launch-button small { margin-top: 3px; font-weight: 800; opacity: .67; }
.launch-button:hover, .check-button:hover { filter: brightness(1.08); transform: translate(2px, 2px); box-shadow: 5px 5px 0 #bb536e; }
.launch-button:active, .check-button:active { transform: translate(6px, 6px); box-shadow: 1px 1px 0 #bb536e; }
.launch-button.compact { min-width: 0; align-items: center; box-shadow: 5px 5px 0 #bb536e; }
.privacy-note { max-width: 36rem; margin-top: 20px; color: var(--muted); font-size: .78rem; line-height: 1.6; }

.incubator { position: relative; height: min(620px, 72vh); min-height: 440px; border: 2px solid var(--line); border-top: 8px solid #193d48; border-radius: 42% 42% 16px 16px / 12% 12% 16px 16px; overflow: hidden; background: linear-gradient(180deg, rgba(29, 92, 104, .45), rgba(6, 30, 39, .9)); box-shadow: inset 0 0 60px rgba(83, 217, 255, .12), 0 20px 80px rgba(0,0,0,.38); }
.incubator::before { content: ''; position: absolute; inset: 6% 8% 18%; border: 1px solid rgba(162, 246, 255, .25); border-radius: 45% 45% 12px 12px; background: linear-gradient(110deg, rgba(255,255,255,.08), transparent 22%); }
.antenna { position: absolute; width: 70px; height: 38px; left: 50%; top: 0; transform: translate(-50%, -90%); border: 4px solid #315a64; border-bottom: 0; border-radius: 50px 50px 0 0; }
.antenna::after { content: ''; position: absolute; width: 12px; height: 12px; left: 25px; top: -8px; background: var(--pink); border-radius: 50%; box-shadow: 0 0 18px var(--pink); }
.tank-glow { position: absolute; width: 70%; aspect-ratio: 1; left: 15%; top: 24%; border-radius: 50%; background: radial-gradient(circle, rgba(142,232,111,.22), rgba(83,217,255,.08) 42%, transparent 70%); animation: pulse 2.5s ease-in-out infinite; }
.tank-base { position: absolute; inset: auto 7% 5%; height: 64px; border: 2px solid #305661; background: #071820; display: flex; align-items: center; padding: 14px; gap: 12px; clip-path: polygon(4% 0, 96% 0, 100% 35%, 100% 100%, 0 100%, 0 35%); }
.tank-base i { width: 13px; height: 13px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px currentColor; }
.tank-base i:nth-child(2) { background: var(--yellow); }
.tank-base i:nth-child(3) { background: var(--pink); }
.tank-base strong { margin-left: auto; letter-spacing: .2em; color: var(--aqua); }
.orbit { position: absolute; width: 72px; height: 72px; border: 1px dashed rgba(83,217,255,.6); border-radius: 50%; display: grid; place-items: center; color: var(--aqua); font-size: .56rem; font-weight: 900; letter-spacing: .1em; }
.orbit::before { content: ''; position: absolute; width: 14px; height: 14px; top: -7px; background: currentColor; transform: rotate(45deg); box-shadow: 0 0 14px currentColor; }
.orbit-a { left: 12%; top: 28%; animation: float 3.1s ease-in-out infinite; }
.orbit-b { right: 10%; top: 38%; color: var(--pink); animation: float 3.8s ease-in-out infinite reverse; }
.orbit-c { left: 20%; bottom: 23%; color: var(--yellow); animation: float 3.5s ease-in-out infinite .4s; }

.creature { --form-color: var(--aqua); position: absolute; left: 50%; top: 50%; width: 190px; height: 220px; transform: translate(-50%, -45%); filter: drop-shadow(0 0 20px var(--form-color)); transition: transform .45s cubic-bezier(.2,.9,.2,1.2), filter .3s; }
.creature::before { content: ''; position: absolute; inset: 35px 20px 4px; background: linear-gradient(145deg, #d8ffff, var(--form-color)); border: 5px solid #d9fcff; border-radius: 50% 50% 44% 44% / 45% 45% 55% 55%; box-shadow: inset -18px -18px 0 rgba(0,0,0,.12), inset 14px 12px 0 rgba(255,255,255,.14); }
.creature.egg::before { inset: 30px 30px 5px; border-radius: 50% 50% 45% 45% / 58% 58% 42% 42%; }
.creature.egg .face, .creature.egg .ear, .creature.egg .belly-mark { opacity: .42; }
.creature.hatchling { transform: translate(-50%, -45%) scale(.82); }
.creature.junior { transform: translate(-50%, -45%) scale(.94); }
.creature.guardian { transform: translate(-50%, -45%) scale(1.08); }
.creature .ear { position: absolute; z-index: -1; width: 66px; height: 90px; top: 11px; background: var(--form-color); border: 5px solid #d9fcff; border-radius: 80% 20% 55% 45%; transform: rotate(-27deg); }
.creature .ear.right { right: 0; transform: rotate(27deg) scaleX(-1); }
.creature .ear.left { left: 0; }
.creature.form-ask .ear { height: 112px; width: 38px; border-radius: 70% 70% 35% 35%; transform: rotate(-14deg); }
.creature.form-ask .ear.right { transform: rotate(14deg) scaleX(-1); }
.creature.form-private .ear { width: 92px; height: 66px; top: 70px; border-radius: 50%; }
.creature.form-hide { --form-color: var(--aqua); }
.creature.form-ask { --form-color: var(--yellow); }
.creature.form-private { --form-color: var(--pink); }
.creature.form-rainbow { --form-color: #90f0c9; }
.face { position: absolute; z-index: 2; inset: 68px 45px auto; height: 62px; transition: opacity .3s; }
.eye { position: absolute; top: 8px; width: 19px; height: 25px; background: #071820; border-radius: 50%; }
.eye::after { content: ''; position: absolute; width: 6px; height: 7px; left: 4px; top: 3px; background: #fff; border-radius: 50%; }
.eye.left { left: 8px; }.eye.right { right: 8px; }
.mouth { position: absolute; width: 30px; height: 13px; left: 50%; bottom: 5px; transform: translateX(-50%); border-bottom: 5px solid #071820; border-radius: 0 0 30px 30px; }
.belly-mark { position: absolute; z-index: 2; bottom: 35px; left: 50%; transform: translateX(-50%); width: 64px; height: 70px; display: grid; place-items: center; color: #06131d; font: 900 2rem/1 monospace; background: rgba(255,255,255,.55); border: 4px solid #eaffff; clip-path: polygon(50% 0, 92% 16%, 82% 78%, 50% 100%, 18% 78%, 8% 16%); }
.creature.is-happy { animation: creature-hop .7s cubic-bezier(.2,.8,.2,1); }
.creature.is-sad .mouth { border: 0; border-top: 5px solid #071820; border-radius: 30px 30px 0 0; bottom: -2px; }

.hud { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; background: rgba(6, 22, 29, .92); }
.hud-cell { min-height: 64px; padding: 10px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.hud-cell:last-child { border-right: 0; }
.hud-cell small { color: var(--muted); font: 800 .66rem/1.2 ui-monospace, monospace; letter-spacing: .13em; }
.hud-cell strong { margin-top: 4px; color: var(--ink); font: 900 clamp(1.15rem,2vw,1.6rem)/1 ui-monospace, monospace; }
.day-cell strong { color: var(--aqua); }
.shell-meter { display: flex; gap: 5px; margin-top: 7px; }
.shell-meter i { width: 24px; height: 9px; background: var(--pink); clip-path: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%, 15% 50%); box-shadow: 0 0 10px var(--pink); }
.shell-meter i.off { background: #29404a; box-shadow: none; }

.mission-layout { min-height: calc(100vh - 132px); display: grid; grid-template-columns: 245px 1fr; gap: 18px; padding-top: 18px; }
.nursery-rail { position: relative; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(12,51,61,.82), rgba(5,20,28,.9)); overflow: hidden; }
.nursery-rail::after { content: 'CARE UNIT 03'; position: absolute; writing-mode: vertical-rl; right: 7px; top: 10px; color: rgba(142,232,111,.3); font: 800 .62rem ui-monospace, monospace; letter-spacing: .18em; }
.mini-incubator { position: relative; height: 270px; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 52%, rgba(83,217,255,.2), transparent 55%); }
.mini-incubator .creature { width: 150px; height: 180px; }
.mini-incubator .creature::before { inset: 28px 17px 3px; }
.mini-incubator .creature.egg::before { inset: 25px 25px 4px; }
.mini-incubator .creature .ear { width: 52px; height: 72px; }
.mini-incubator .creature.form-ask .ear { width: 31px; height: 90px; }
.mini-incubator .creature.form-private .ear { width: 70px; height: 52px; top: 58px; }
.mini-incubator .face { inset: 56px 34px auto; transform: scale(.8); }
.mini-incubator .belly-mark { width: 52px; height: 57px; bottom: 28px; font-size: 1.5rem; }
.growth-readout { padding: 15px 18px; }
.growth-readout > p { color: var(--aqua); font: 800 .68rem ui-monospace, monospace; letter-spacing: .12em; }
.growth-readout label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 13px 0; font-weight: 800; font-size: .78rem; }
.growth-readout label span { color: var(--yellow); }
.growth-readout i { grid-column: 1 / -1; display: block; height: 7px; background: #17333c; overflow: hidden; }
.growth-readout i b { display: block; height: 100%; width: 0; background: var(--aqua); transition: width .45s ease; }
.growth-readout label:nth-of-type(2) i b { background: var(--yellow); }
.growth-readout label:nth-of-type(3) i b { background: var(--pink); }
.speech { margin: 8px 15px 20px; padding: 12px; border-left: 3px solid var(--green); color: #cce7ea; background: rgba(142,232,111,.07); font-size: .8rem; line-height: 1.6; }

.link-console { min-width: 0; border: 1px solid var(--line); background: rgba(5, 20, 28, .72); padding: clamp(14px, 2vw, 24px); }
.mission-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.mission-head span { color: var(--pink); font: 900 .7rem ui-monospace, monospace; letter-spacing: .13em; }
.mission-head h2 { margin: 4px 0 0; font-size: clamp(1.45rem, 3vw, 2.25rem); }
.audience { margin: 0; max-width: 220px; padding: 8px 10px; color: var(--yellow); border: 1px dashed currentColor; font-size: .77rem; font-weight: 800; text-align: right; }
.scene-prompt { min-height: 2.8em; margin: 12px 0; color: #c7e2e7; line-height: 1.5; }
.network-board { position: relative; min-height: 395px; display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; gap: 10px; border: 1px solid var(--line); overflow: hidden; background-image: linear-gradient(rgba(83,217,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(83,217,255,.045) 1px, transparent 1px); background-size: 24px 24px; }
.network-board::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(83,217,255,.13), transparent 33%); }
.link-lines { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.link-lines line { stroke-width: 4; stroke-linecap: round; stroke-dasharray: 8 7; animation: dash 1s linear infinite; filter: drop-shadow(0 0 5px currentColor); }
.token-field, .action-dock { position: relative; z-index: 2; display: grid; gap: 11px; padding: 16px; }
.data-token, .action-button { position: relative; min-height: 60px; width: 100%; border: 1px solid var(--line); color: var(--ink); background: #0a222d; cursor: pointer; text-align: left; transition: transform .16s ease, border-color .16s, background .16s; }
.data-token { padding: 10px 12px 10px 46px; font-weight: 900; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.data-token::before { content: 'DATA'; position: absolute; left: 9px; top: 50%; transform: translateY(-50%) rotate(-90deg); color: var(--aqua); font: 800 .55rem ui-monospace, monospace; letter-spacing: .1em; }
.data-token::after { content: ''; position: absolute; right: -4px; top: 50%; width: 9px; height: 9px; transform: translateY(-50%) rotate(45deg); background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.data-token:hover, .data-token.is-selected { transform: translateX(5px); border-color: var(--aqua); background: #103442; }
.data-token.is-selected { box-shadow: inset 4px 0 var(--aqua), 0 0 14px rgba(83,217,255,.18); }
.data-token.is-linked { border-color: var(--token-color, var(--green)); }
.data-token.is-wrong { border-color: var(--pink); animation: nudge .3s ease; }
.data-token small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.core-node { position: relative; z-index: 2; width: 62px; height: 62px; display: grid; place-items: center; color: var(--aqua); border: 3px solid var(--aqua); transform: rotate(45deg); box-shadow: 0 0 30px rgba(83,217,255,.25), inset 0 0 20px rgba(83,217,255,.2); }
.core-node span { transform: rotate(-45deg); font: 800 .54rem ui-monospace, monospace; letter-spacing: .08em; }
.action-button { --action: var(--green); padding: 8px 10px 8px 55px; border-left: 5px solid var(--action); }
.action-button::before { content: attr(data-symbol); position: absolute; left: 7px; top: 50%; transform: translateY(-50%); width: 36px; text-align: center; color: var(--action); font: 900 .58rem ui-monospace, monospace; }
.action-button::after { content: ''; position: absolute; left: -9px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%) rotate(45deg); background: var(--action); box-shadow: 0 0 10px var(--action); }
.action-button b { display: block; font-size: .9rem; }.action-button small { color: var(--muted); font-size: .65rem; }
.action-button:hover, .action-button.is-selected { transform: translateX(-5px); background: color-mix(in srgb, var(--action) 13%, #0a222d); border-color: var(--action); }
.selection-hint { min-height: 1.6em; color: var(--muted); font-size: .82rem; }
.check-button { width: 100%; min-height: 48px; padding: 12px; font-size: 1rem; }
.check-button:disabled { cursor: not-allowed; color: #74868c; background: #243943; box-shadow: none; }

.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(2, 11, 16, .84); backdrop-filter: blur(8px); }
.overlay-panel { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border: 1px solid var(--aqua); background: linear-gradient(145deg, #0d2c37, #071821); padding: clamp(20px, 4vw, 38px); box-shadow: 10px 10px 0 rgba(83,217,255,.15); animation: panel-in .35s cubic-bezier(.2,.9,.2,1.2); }
.overlay-panel h2 { margin: 5px 0 12px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.feedback-icon { float: right; width: 70px; height: 70px; display: grid; place-items: center; color: #071821; background: var(--green); border-radius: 50%; font: 900 2.4rem/1 monospace; box-shadow: 0 0 26px rgba(142,232,111,.4); }
.feedback-panel.is-error { border-color: var(--pink); }.feedback-panel.is-error .feedback-icon { background: var(--pink); }
.feedback-details { margin: 18px 0; display: grid; gap: 8px; }
.feedback-details p { margin: 0; padding: 10px; border-left: 3px solid var(--green); background: rgba(255,255,255,.035); line-height: 1.5; font-size: .86rem; }
.feedback-details p.wrong { border-color: var(--pink); }
.growth-panel { border-color: var(--green); }
.growth-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.growth-choices button { min-height: 190px; border: 1px solid var(--line); background: #071a23; color: var(--ink); padding: 16px 12px; cursor: pointer; }
.growth-choices button:hover { border-color: var(--yellow); transform: translateY(-4px); }
.growth-choices i { position: relative; display: block; width: 66px; height: 66px; margin: 0 auto 14px; border: 3px solid currentColor; border-radius: 50%; color: var(--aqua); }
.growth-choices button:nth-child(2) i { color: var(--yellow); }.growth-choices button:nth-child(3) i { color: var(--pink); }
.growth-choices i::before, .growth-choices i::after { content: ''; position: absolute; background: currentColor; }
.wing-icon::before { width: 26px; height: 42px; left: 5px; top: 9px; border-radius: 100% 0; transform: rotate(-15deg); }.wing-icon::after { width: 26px; height: 42px; right: 5px; top: 9px; border-radius: 0 100%; transform: rotate(15deg); }
.antenna-icon::before { width: 4px; height: 44px; left: 29px; top: 5px; }.antenna-icon::after { width: 18px; height: 18px; left: 22px; top: 4px; border-radius: 50%; box-shadow: 0 0 14px currentColor; }
.shell-icon::before { width: 42px; height: 37px; left: 9px; top: 12px; border-radius: 50% 50% 40% 40%; }.shell-icon::after { width: 4px; height: 34px; left: 30px; top: 14px; background: #071a23; box-shadow: -11px 2px #071a23, 11px 2px #071a23; }
.growth-choices b { display: block; font-size: 1rem; }.growth-choices span { display: block; margin-top: 8px; color: var(--muted); line-height: 1.5; font-size: .76rem; }
.quiz-choices { display: grid; gap: 9px; margin: 18px 0; }
.quiz-choices button { min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); background: #0a222d; color: var(--ink); text-align: left; font-weight: 800; cursor: pointer; }
.quiz-choices button:hover:not(:disabled) { border-color: var(--aqua); transform: translateX(4px); }
.quiz-choices button.correct { border-color: var(--green); background: rgba(142,232,111,.13); }.quiz-choices button.wrong { border-color: var(--pink); background: rgba(255,118,155,.13); }
.quiz-explanation { margin: 14px 0; padding: 13px; border-left: 4px solid var(--yellow); background: rgba(255,216,92,.08); line-height: 1.65; }

.result-screen { min-height: calc(100vh - 100px); display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 28px; padding: 38px 0; }
.result-creature-zone { position: relative; min-height: 500px; padding-top: 22px; text-align: center; border: 1px solid var(--line); background: radial-gradient(circle at 50% 50%, rgba(83,217,255,.2), transparent 53%); }
.result-creature-zone .creature { top: 45%; }
.result-creature-zone h2 { position: absolute; inset: auto 12px 62px; margin: 0; font-size: clamp(1.7rem, 4vw, 2.7rem); }
.result-creature-zone > p:last-child { position: absolute; inset: auto 28px 18px; margin: 0; color: var(--muted); line-height: 1.5; }
.score-terminal { border-top: 6px solid var(--aqua); border-bottom: 6px solid #173843; background: #0a2029; padding: clamp(22px, 4vw, 40px); box-shadow: 14px 14px 0 rgba(83,217,255,.1); }
.score-terminal > p { margin: 0; color: var(--pink); font: 900 .75rem ui-monospace, monospace; letter-spacing: .18em; }
.score-terminal > strong { display: block; margin: 6px 0 20px; color: var(--yellow); font: 900 clamp(3.2rem, 8vw, 6.2rem)/1 ui-monospace, monospace; text-shadow: 0 0 25px rgba(255,216,92,.25); }
.result-grid { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.result-grid span { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.result-grid b { display: block; margin-top: 4px; color: var(--ink); font-size: 1rem; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.secondary-button { border: 1px solid var(--aqua); color: var(--aqua); background: transparent; font-weight: 900; cursor: pointer; }
#ranking { margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--line); }

.burst-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.particle { position: absolute; width: 10px; height: 10px; background: var(--particle, var(--aqua)); transform: translate(-50%,-50%) rotate(45deg); animation: burst .75s ease-out forwards; }
.score-pop { position: fixed; z-index: 60; color: var(--yellow); font: 900 1.35rem ui-monospace, monospace; text-shadow: 2px 2px #06131d; pointer-events: none; animation: score-pop .9s ease-out forwards; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes panel-in { from { opacity: 0; transform: scale(.93) translateY(18px); } }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .7; } }
@keyframes float { 50% { transform: translateY(-16px) rotate(6deg); } }
@keyframes creature-hop { 35% { transform: translate(-50%, -62%) scale(1.08, .92); } 70% { transform: translate(-50%, -42%) scale(.95, 1.05); } }
@keyframes nudge { 30% { transform: translateX(-6px); } 70% { transform: translateX(5px); } }
@keyframes dash { to { stroke-dashoffset: -30; } }
@keyframes burst { to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(220deg) scale(.2); } }
@keyframes score-pop { to { opacity: 0; transform: translateY(-55px) scale(1.1); } }

@media (max-width: 820px) {
  .brand-mark { display: none; }.brand-bar { grid-template-columns: 1fr 1fr; }
  .start-screen { grid-template-columns: 1fr; padding-bottom: 35px; }.hero-copy { padding-bottom: 0; }.hero-incubator { height: 470px; min-height: 0; }
  .mission-layout { grid-template-columns: 1fr; }.nursery-rail { display: grid; grid-template-columns: 150px 1fr; min-height: 180px; }.mini-incubator { height: 180px; border-bottom: 0; border-right: 1px solid var(--line); }.mini-incubator .creature { transform: translate(-50%,-50%) scale(.62); }.growth-readout { padding-right: 28px; }.speech { grid-column: 1 / -1; margin-top: 0; }
  .result-screen { grid-template-columns: 1fr; }.result-creature-zone { min-height: 440px; }
}

@media (max-width: 590px) {
  .app-shell { padding-inline: 10px; }.brand-bar { min-height: 54px; }
  h1 { font-size: clamp(2.7rem, 15vw, 4.3rem); }.quick-rule i { display: none; }.quick-rule span { width: 100%; }
  .hud { grid-template-columns: repeat(2,1fr); }.hud-cell:nth-child(2) { border-right: 0; }.hud-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nursery-rail { grid-template-columns: 120px 1fr; }.mini-incubator { height: 170px; }.growth-readout { padding: 8px 22px 8px 12px; }.growth-readout label { margin: 8px 0; }.speech { display: none; }
  .mission-head { display: block; }.audience { max-width: none; margin-top: 10px; text-align: left; }.scene-prompt { font-size: .88rem; }
  .network-board { min-height: 0; display: grid; grid-template-columns: 1fr; gap: 0; padding: 9px 0; }.token-field, .action-dock { width: 100%; padding: 9px 12px; }.core-node { width: 42px; height: 42px; justify-self: center; }.data-token { min-height: 52px; }.action-dock { grid-template-columns: repeat(2,1fr); }.action-button { min-height: 54px; padding-left: 42px; }.action-button::before { width: 30px; font-size: .5rem; }.action-button b { font-size: .78rem; }.action-button small { display: none; }.action-button::after { left: 50%; top: -7px; transform: translateX(-50%) rotate(45deg); }
  .growth-choices { grid-template-columns: 1fr; }.growth-choices button { min-height: 105px; display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto auto; text-align: left; align-items: center; }.growth-choices i { grid-row: 1 / 3; margin: 0; }.growth-choices span { margin: 0; }
  .result-actions { grid-template-columns: 1fr; }.score-terminal { padding-inline: 16px; }.result-creature-zone { min-height: 400px; }.result-creature-zone .creature { transform: translate(-50%,-48%) scale(.86); }
}

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