:root {
  --night: #0a0410;
  --cabinet: #3c1548;
  --cabinet-dark: #210a29;
  --yellow: #ffd338;
  --orange: #ff7a24;
  --pink: #ff3ca6;
  --blue: #29b6ff;
  --aqua: #00f5d4;
  --green: #a8ff3e;
  --screen: #031118;
  --cream: #fff5d6;
  --screen-text: #b7fff1;
  --mono: "SFMono-Regular", "Roboto Mono", "Cascadia Mono", Consolas, monospace;
  --display: Impact, Haettenschweiler, "Arial Black", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--night); }
body {
  min-height: 100vh;
  margin: 0;
  padding: clamp(.75rem, 2vw, 2rem);
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 18% 20%, rgba(255,60,166,.16) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 70%, rgba(41,182,255,.15) 0 2px, transparent 3px),
    linear-gradient(135deg, #08020d, #180920 52%, #05020a);
  background-size: 54px 54px, 72px 72px, auto;
  font-family: var(--mono);
  font-size: 16px;
}

.ky13n-home {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 18px;
  padding: .55rem .7rem;
  border: 2px solid #fff8da;
  background: rgba(22, 9, 28, .9);
  color: #fff8da;
  font-family: var(--display);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--pink);
}
.ky13n-home:hover, .ky13n-home:focus-visible { background: var(--yellow); color: #16091c; }

button { color: inherit; font: inherit; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.arcade-machine {
  width: min(1050px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 28px 32px rgba(0,0,0,.7));
}

.marquee {
  position: relative;
  z-index: 3;
  padding: 1.25rem 1.75rem 1.1rem;
  overflow: hidden;
  border: 8px solid #1a071f;
  border-bottom-width: 5px;
  border-radius: 22px 22px 4px 4px;
  text-align: center;
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 26px, rgba(255,211,56,.12) 27px 29px),
    linear-gradient(110deg, #ff3ca6, #d51b67 45%, #ff7a24);
  box-shadow: inset 0 0 0 4px var(--yellow), inset 0 0 45px rgba(80,0,60,.65), 0 0 22px rgba(255,60,166,.3);
}

.marquee-question { margin: 0; font-weight: 800; letter-spacing: .22em; }
.marquee h1 {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .2em;
  margin: 0;
  color: var(--yellow);
  font-family: var(--display);
  font-size: clamp(2.45rem, 6.6vw, 5rem);
  font-style: italic;
  letter-spacing: .035em;
  line-height: .94;
  -webkit-text-stroke: 3px #35082e;
  text-shadow: 5px 5px 0 #00a9d6, 9px 9px 0 #47114e, 0 0 18px rgba(255,211,56,.6);
}
.marquee-question { margin-top: .7rem; color: #fff8da; font-size: clamp(.7rem, 1.4vw, .95rem); text-shadow: 2px 2px #54103b; }
.marquee-stars i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px #fff, 0 0 25px var(--yellow); animation: bulb 1.2s steps(2) infinite; }
.marquee-stars i:nth-child(1) { top: 15%; left: 4%; }.marquee-stars i:nth-child(2) { bottom: 18%; left: 7%; animation-delay: .3s; }.marquee-stars i:nth-child(3) { top: 18%; right: 5%; animation-delay: .6s; }.marquee-stars i:nth-child(4) { bottom: 14%; right: 8%; animation-delay: .9s; }.marquee-stars i:nth-child(5) { top: 12%; left: 28%; animation-delay: .45s; }.marquee-stars i:nth-child(6) { top: 10%; right: 29%; animation-delay: .75s; }

.cabinet-body {
  position: relative;
  padding: 2rem clamp(1rem, 4vw, 3rem) 1.1rem;
  border-inline: 12px solid #19061f;
  border-radius: 0 0 38px 38px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07), transparent 8% 90%, rgba(0,0,0,.28)),
    repeating-linear-gradient(115deg, transparent 0 28px, rgba(255,255,255,.018) 29px 30px),
    var(--cabinet);
  box-shadow: inset 0 0 0 5px #561c65, inset 0 0 70px rgba(0,0,0,.42);
  transition: background 1.1s ease, border-color 1.1s ease, box-shadow 1.1s ease;
}
.cabinet-body::after { content: ""; position: absolute; inset: auto 9% -18px; height: 22px; border-radius: 0 0 12px 12px; background: #17051d; }

.speaker-bar { position: absolute; top: .75rem; left: 10%; right: 10%; display: flex; justify-content: center; gap: 12px; }
.speaker-bar i { width: 32px; height: 6px; border-radius: 9px; background: #16051c; box-shadow: inset 0 2px 2px #000; }
.audio-switch { position: absolute; z-index: 3; top: .6rem; right: 4rem; padding: .32rem .58rem; border: 2px solid #1a081f; border-radius: 4px; background: #64206f; color: #f8dfff; font-size: .72rem; font-weight: 800; cursor: pointer; }
.audio-switch[aria-pressed="true"] { background: var(--yellow); color: #361032; }

.screen-bezel { position: relative; padding: 1.25rem 1.35rem 1.5rem; border: 4px solid #0b050d; border-radius: 34px 34px 50px 50px; background: linear-gradient(145deg, #28232b, #09070b 58%, #302832); box-shadow: inset 7px 7px 15px rgba(255,255,255,.06), inset -8px -10px 20px #000, 0 10px 20px rgba(0,0,0,.5); transition: border-radius 1.1s ease, background 1.1s ease, box-shadow 1.1s ease, border-color 1.1s ease; }
.bezel-label { display: flex; justify-content: flex-end; padding: 0 .8rem .55rem; color: #8f8392; font-size: .7rem; letter-spacing: .14em; }

.crt-screen {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  border: 3px solid #000;
  border-radius: 6% / 8%;
  color: var(--screen-text);
  background:
    radial-gradient(ellipse at center, rgba(0,245,212,.055), transparent 66%),
    linear-gradient(180deg, #04171e, #020b10 70%);
  box-shadow: inset 0 0 75px #000, inset 0 0 24px rgba(0,245,212,.13), 0 0 0 5px #151218;
  transition: border-radius 1.1s ease, background 1.1s ease, box-shadow 1.1s ease;
}
.crt-screen::before { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; opacity: .06; background: linear-gradient(var(--aqua),var(--aqua)) left 14px top 14px / 42px 2px no-repeat, linear-gradient(var(--aqua),var(--aqua)) left 14px top 14px / 2px 42px no-repeat, linear-gradient(var(--aqua),var(--aqua)) right 14px bottom 14px / 42px 2px no-repeat, linear-gradient(var(--aqua),var(--aqua)) right 14px bottom 14px / 2px 42px no-repeat; transition: opacity 1.1s ease, background 1.1s ease; }

.screen-hud { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 170px; align-items: stretch; gap: 1rem; padding: .8rem 1.3rem .65rem; border-bottom: 1px solid rgba(0,245,212,.21); }
.screen-hud span { display: block; color: #62a8a1; font-size: .72rem; letter-spacing: .12em; }
.player-role strong, .system-readout strong { display: block; margin-top: .15rem; color: var(--aqua); font-size: 1rem; }
.system-readout { padding-left: 1rem; border-left: 1px solid rgba(0,245,212,.18); }
.system-readout strong { color: var(--green); }
.year-counter { position: relative; padding: .5rem .65rem .6rem; border: 2px solid rgba(255,211,56,.7); border-radius: 5px; background: #0d0b08; box-shadow: inset 0 0 18px rgba(255,122,36,.11), 0 0 10px rgba(255,211,56,.1); }
.year-counter span { color: #c7a952; font-size: .66rem; }
.year-counter strong { display: block; color: var(--yellow); font-size: 1.7rem; line-height: 1.05; letter-spacing: .12em; text-shadow: 0 0 10px rgba(255,211,56,.48); }
.year-counter small { display: block; min-height: 2em; margin-top: .18rem; color: #e8c973; font-size: .52rem; line-height: 1.05; letter-spacing: .06em; }
.year-scale { position: relative; height: 5px; margin-top: .5rem; border-radius: 3px; background: #342917; }
.year-scale i { display: block; width: 4%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--pink)); transition: width 1.2s ease; }
.year-scale b { position: absolute; top: -3px; left: 3%; width: 3px; height: 11px; background: #fff; box-shadow: 0 0 8px var(--yellow); transition: left 1.2s ease; }

.game-screen { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(315px, 1.15fr) minmax(305px, .85fr); min-height: 340px; }
.brain-zone { position: relative; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid rgba(0,245,212,.18); background: radial-gradient(circle at 50% 48%, rgba(0,245,212,.08), transparent 50%); }
.brain-caption { display: flex; justify-content: space-between; padding: .8rem 1.3rem 0; color: #5caaa0; font-size: .75rem; letter-spacing: .13em; }
.mind-viewport { position: relative; width: min(305px, 78%); aspect-ratio: 1; margin: -.4rem auto -1.2rem; }
#mindCanvas { position: relative; z-index: 2; display: block; width: 100%; height: 100%; image-rendering: pixelated; transition: filter 1s ease; }
.target-ring { position: absolute; inset: 11%; border: 1px solid rgba(0,245,212,.24); border-radius: 50%; }
.ring-a { animation: orbit 13s linear infinite; }.ring-b { inset: 23%; border-style: dashed; border-color: rgba(168,255,62,.3); animation: orbit 8s linear infinite reverse; }.ring-c { inset: 35%; border-color: rgba(255,60,166,.28); animation: pulse-ring 2.5s steps(3) infinite; }
.target-ring::before, .target-ring::after { content: ""; position: absolute; width: 7px; height: 7px; background: currentColor; box-shadow: 0 0 9px currentColor; }.target-ring::before { top: 7%; left: 14%; }.target-ring::after { right: 8%; bottom: 18%; }
.mind-status { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: auto; padding: .75rem; border-top: 1px solid rgba(0,245,212,.14); background: rgba(0,0,0,.28); }
.mind-status small, .mind-status strong { display: block; }.mind-status small { color: #5d9992; font-size: .7rem; }.mind-status strong { color: var(--aqua); font-size: .9rem; letter-spacing: .08em; }
.status-lamp { width: 12px; height: 12px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 12px var(--aqua); animation: lamp 1.3s steps(2) infinite; }

.mission-screen { padding: clamp(1rem, 2vw, 1.5rem); background: linear-gradient(135deg, rgba(255,60,166,.035), transparent 60%); }
.round-chip { display: inline-block; padding: .3rem .55rem; border: 1px solid var(--yellow); color: var(--yellow); font-size: .72rem; letter-spacing: .13em; }
.mission-screen h2 { margin: .65rem 0 .5rem; color: #fff6c9; font-size: clamp(1.3rem, 2vw, 1.8rem); line-height: 1.08; letter-spacing: .04em; }
.mission-screen > p { margin: 0; color: #b7d6cf; font-size: .9rem; line-height: 1.45; }
.plain-instructions { display: grid; gap: .35rem; margin: .8rem 0; padding: 0; list-style: none; }
.plain-instructions li { display: grid; grid-template-columns: 1.65rem 1fr; align-items: center; gap: .55rem; color: #d3e7e2; font-size: .82rem; line-height: 1.3; }
.plain-instructions b { display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border: 1px solid var(--pink); border-radius: 50%; color: var(--pink); }
.code-viewer { padding: .75rem; border: 2px solid rgba(41,182,255,.6); border-radius: 5px; text-align: center; background: rgba(0,0,0,.4); box-shadow: inset 0 0 20px rgba(41,182,255,.06); }
.code-viewer > span { display: block; color: #6dada7; font-size: .72rem; letter-spacing: .11em; }
.data-packet { display: block; width: auto; max-width: 100%; min-width: min(105px,100%); margin: .45rem auto; padding: .3rem .45rem; overflow-wrap: anywhere; color: var(--yellow); font-size: clamp(1.05rem, 2.4vw, 1.65rem); line-height: 1.08; letter-spacing: .045em; text-shadow: 0 0 12px rgba(255,211,56,.5); }
.data-packet.text-challenge { width: auto; max-width: 100%; min-height: 2.7em; white-space: normal; font-size: 1rem; line-height: 1.35; letter-spacing: .025em; }
#challengeCanvas { display: block; width: 100%; height: auto; max-height: 150px; margin: .45rem auto; border: 1px solid rgba(0,245,212,.28); border-radius: 3px; }
[hidden] { display: none !important; }
.code-viewer small { display: block; min-height: 2.5em; color: #9fc4bd; font-size: .78rem; line-height: 1.35; }

.evolution-bank { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding: .55rem 1.3rem .7rem; border-top: 1px solid rgba(0,245,212,.18); background: rgba(0,0,0,.24); }
.evolution-bank > span { color: #66a59d; font-size: .7rem; letter-spacing: .12em; }
.evolution-bank ol { display: grid; grid-template-columns: repeat(6,1fr); gap: .45rem; margin: 0; padding: 0; list-style: none; }
.evolution-bank li { min-width: 0; text-align: center; color: #496f6a; }
.evolution-bank li i { display: block; width: 11px; height: 11px; margin: 0 auto .25rem; border: 1px solid #456b66; border-radius: 50%; background: #071415; }
.evolution-bank li b, .evolution-bank li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.evolution-bank li b { font-size: .68rem; }.evolution-bank li small { margin-top: .1rem; font-size: .58rem; }
.evolution-bank li.active { color: var(--green); }.evolution-bank li.active i { border-color: var(--green); background: var(--green); box-shadow: 0 0 12px var(--green); }.evolution-bank li.unknown { color: var(--pink); }

.control-deck { position: relative; display: grid; grid-template-columns: minmax(180px,.6fr) minmax(460px,1.6fr) minmax(190px,.65fr); gap: 1.25rem; align-items: center; margin: 1.1rem -1.25rem 0; padding: 1.3rem 2rem 1.6rem; border: 5px solid #1a071f; border-radius: 8px 8px 28px 28px; background: linear-gradient(165deg, #7d2787, #491452 55%, #2a0b31); box-shadow: inset 0 3px 0 rgba(255,255,255,.12), 0 12px 16px rgba(0,0,0,.5); transition: background 1.1s ease, border 1.1s ease, border-radius 1.1s ease, box-shadow 1.1s ease, opacity .8s ease, filter .8s ease; }
.deck-instruction span, .deck-instruction small { display: block; }.deck-instruction span { color: var(--yellow); font-family: var(--display); font-size: 1.25rem; line-height: 1.08; letter-spacing: .04em; }.deck-instruction small { margin-top: .5rem; color: #e0bde5; font-size: .78rem; line-height: 1.4; }
.routing-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.route-button { min-width: 0; padding: 0; border: 0; background: none; text-align: center; cursor: pointer; }
.arcade-button { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto .55rem; border: 7px solid #17051d; border-radius: 50%; background: #777; box-shadow: 0 8px 0 #0d030f, inset 0 -8px 12px rgba(0,0,0,.4), inset 0 7px 8px rgba(255,255,255,.3); transition: width .8s ease, height .8s ease, border .8s ease, border-radius .8s ease, clip-path .8s ease, background .8s ease, transform .1s ease, box-shadow .25s ease, filter .25s ease; }
.arcade-button kbd { color: rgba(255,255,255,.8); font-size: 1.25rem; font-weight: 900; }
.number-button .arcade-button { background: var(--orange); }.pattern-button .arcade-button { background: var(--blue); }.broken-button .arcade-button { background: var(--pink); }
.route-button:hover:not(:disabled) .arcade-button { filter: brightness(1.15); }.route-button:active:not(:disabled) .arcade-button, .route-button.route-correct .arcade-button { transform: translateY(6px); box-shadow: 0 2px 0 #0d030f, inset 0 -5px 10px rgba(0,0,0,.35), inset 0 5px 7px rgba(255,255,255,.25); }
.route-button:disabled { opacity: .48; cursor: not-allowed; }.route-button strong { display: block; min-height: 2.5em; color: #fff; font-size: .82rem; line-height: 1.2; overflow-wrap: anywhere; }.route-button small { display: none; }
.route-button.route-error .arcade-button { background: #6f001d; animation: button-error .18s steps(2) 2; }
.route-button.lit .arcade-button, .route-button.machine-choice .arcade-button { transform: translateY(4px) scale(1.06); filter: brightness(1.55); box-shadow: 0 2px 0 #0d030f, 0 0 24px #fff, 0 0 42px var(--aqua), inset 0 5px 7px rgba(255,255,255,.45); }

.start-station { text-align: center; }
.start-button { width: 118px; height: 74px; padding: .6rem; border: 7px solid #17051d; border-radius: 16px; background: var(--yellow); color: #361032; box-shadow: 0 8px 0 #0c020e, inset 0 -8px 10px rgba(255,122,36,.45), inset 0 7px 7px rgba(255,255,255,.45); cursor: pointer; }
.start-button:hover:not(:disabled) { filter: brightness(1.08); }.start-button:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 3px 0 #0c020e, inset 0 -5px 8px rgba(255,122,36,.4); }.start-button:disabled { opacity: .62; cursor: default; }
.start-button span, .start-button small { display: block; }.start-button span { font-family: var(--display); font-size: 1.3rem; }.start-button small { margin-top: .2rem; font-size: .58rem; font-weight: 900; }
.run-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: .85rem 0 .45rem; }.run-stats div { border-right: 1px solid #975ba0; }.run-stats div:last-child { border: 0; }.run-stats dt { color: #d4a8db; font-size: .62rem; }.run-stats dd { margin: .12rem 0 0; color: var(--yellow); font-size: .95rem; }
.progress-track { height: 7px; border: 1px solid #1f0825; border-radius: 5px; background: #240a2b; }.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--aqua)); box-shadow: 0 0 9px var(--yellow); transition: width .25s ease; }
.handover-button { width: 100%; margin-top: .55rem; padding: .5rem .65rem; border: 2px solid rgba(0,245,212,.5); border-radius: 5px; background: rgba(4,17,28,.5); color: #fff; cursor: pointer; box-shadow: inset 0 0 14px rgba(0,245,212,.06); transition: border-color .25s ease, background .25s ease, opacity .25s ease, border-radius .8s ease; }
.handover-button:hover:not(:disabled) { border-color: var(--yellow); background: rgba(255,211,56,.12); }.handover-button:disabled { opacity: .48; cursor: default; }
.handover-button span, .handover-button small { display: block; }.handover-button span { color: var(--yellow); font-family: var(--display); font-size: .72rem; line-height: 1.15; letter-spacing: .025em; }.handover-button small { margin-top: .22rem; color: #d7aedb; font-size: .54rem; font-weight: 800; line-height: 1.25; }
.run-id { display: block; margin-top: .35rem; color: #a671ad; font-size: .6rem; }

.coin-panel { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1rem .2rem; }
.coin-panel p { margin: 0; color: #e0bce4; font-size: .74rem; text-align: center; letter-spacing: .08em; }
.coin-slot { display: flex; align-items: center; gap: .4rem; color: #ae8ab2; font-size: .72rem; }.coin-slot i { display: block; width: 17px; height: 35px; border: 3px solid #15051a; border-radius: 4px; background: #060207; box-shadow: inset 0 0 0 2px #4f3552; }
.reset-button { padding: .55rem .75rem; border: 2px solid #210a27; border-radius: 5px; background: #5d1b68; color: #eacfed; font-size: .75rem; cursor: pointer; }.reset-button:hover { border-color: var(--yellow); color: var(--yellow); }

.scanlines, .screen-glare, .screen-flash { position: absolute; z-index: 10; inset: 0; pointer-events: none; }
.scanlines { opacity: .34; background: repeating-linear-gradient(0deg, rgba(0,0,0,.42) 0 1px, transparent 1px 4px); mix-blend-mode: multiply; }
.screen-glare { border-radius: inherit; background: linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,.035) 47%, transparent 58%); }
.screen-flash { background: var(--aqua); opacity: 0; }
.data-packet.packet-in { animation: packet-in .2s ease-out; }.data-packet.correct { color: var(--green); }.data-packet.error { color: var(--pink); }
body.flash .screen-flash { animation: flash .35s steps(2); }.error-flash .screen-flash { background: var(--pink); animation: flash .25s steps(2); }
body.evolved .status-lamp { background: var(--green); box-shadow: 0 0 15px var(--green); }.evolved .mind-viewport { animation: evolution-shock 1.4s cubic-bezier(.2,.8,.2,1); }.evolved .crt-screen { box-shadow: inset 0 0 75px #000, inset 0 0 35px rgba(168,255,62,.2), 0 0 0 5px #151218; }
.evolution-bank li.mastered { color: var(--aqua); }.evolution-bank li.mastered i { border-color: var(--aqua); background: var(--aqua); box-shadow: 0 0 14px var(--aqua); }

/* The cabinet advances from mechanical arcade hardware to an autonomous interface. */
body[data-level="language"] .cabinet-body { background: linear-gradient(120deg, rgba(41,182,255,.15), transparent 26% 72%, rgba(255,60,166,.13)), #271247; box-shadow: inset 0 0 0 4px #3e2f70, inset 0 0 80px rgba(0,0,0,.48); }
body[data-level="language"] .screen-bezel { border-radius: 27px; background: linear-gradient(145deg, #28364d, #080c17 64%, #202b40); }
body[data-level="language"] .crt-screen::before { opacity: .18; }
body[data-level="language"] .screen-hud { background: linear-gradient(90deg, rgba(41,182,255,.08), transparent); box-shadow: inset 0 -1px rgba(41,182,255,.24); }
body[data-level="language"] .round-chip { border-radius: 8px; box-shadow: 0 0 12px rgba(41,182,255,.16); }
body[data-level="language"] .control-deck { border-width: 3px; border-radius: 14px 14px 24px 24px; background: linear-gradient(150deg, #263f70, #31205d 52%, #101a32); }
body[data-level="language"] .arcade-button { width: 66px; height: 58px; border-width: 4px; border-radius: 15px; box-shadow: 0 5px 0 #070a16, inset 0 1px 9px rgba(255,255,255,.26); }
body[data-level="language"] .handover-button { border-radius: 10px; border-color: rgba(41,182,255,.52); }
body[data-level="language"] .scanlines { opacity: .24; }

body[data-level="imagination"] .marquee { background: repeating-radial-gradient(circle at 50% 120%, transparent 0 26px, rgba(255,255,255,.08) 27px 29px), linear-gradient(110deg, #2b4bd4, #7b26b9 48%, #ff3ca6); }
body[data-level="imagination"] .cabinet-body { border-color: #0d1328; background: linear-gradient(125deg, rgba(0,245,212,.13), transparent 34% 68%, rgba(255,60,166,.15)), #101d3b; box-shadow: inset 0 0 0 3px #294777, inset 0 0 90px rgba(0,0,0,.52); }
body[data-level="imagination"] .screen-bezel { border-radius: 20px; background: linear-gradient(145deg, #213b55, #050a12 65%, #292448); box-shadow: inset 2px 2px 12px rgba(255,255,255,.09), inset -5px -7px 20px #000, 0 0 24px rgba(0,245,212,.13); }
body[data-level="imagination"] .crt-screen { border-radius: 14px; background: radial-gradient(circle at 42% 44%, rgba(41,182,255,.1), transparent 44%), linear-gradient(150deg, #031824, #080719); }
body[data-level="imagination"] .crt-screen::before { opacity: .28; background: linear-gradient(rgba(41,182,255,.42) 1px,transparent 1px), linear-gradient(90deg,rgba(41,182,255,.42) 1px,transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle at 42% 48%,#000,transparent 75%); }
body[data-level="imagination"] .screen-hud, body[data-level="imagination"] .evolution-bank { background: rgba(12,24,58,.7); backdrop-filter: blur(5px); }
body[data-level="imagination"] .mind-viewport { width: min(325px,82%); }
body[data-level="imagination"] .control-deck { border: 2px solid rgba(0,245,212,.4); border-radius: 18px; background: linear-gradient(135deg, rgba(22,58,94,.96), rgba(65,22,91,.94)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 30px rgba(0,0,0,.4), 0 0 22px rgba(0,245,212,.1); }
body[data-level="imagination"] .arcade-button { width: 76px; height: 48px; border: 2px solid rgba(255,255,255,.55); border-radius: 24px; box-shadow: 0 0 15px rgba(41,182,255,.34), inset 0 0 18px rgba(255,255,255,.16); }
body[data-level="imagination"] .handover-button { border-radius: 20px; background: rgba(22,58,94,.45); }
body[data-level="imagination"] #mindCanvas { image-rendering: auto; }
body[data-level="imagination"] .scanlines { opacity: .16; }

body[data-level="swarms"] .marquee { background: linear-gradient(110deg, #071f31, #034f68 48%, #68236c); }
body[data-level="swarms"] .cabinet-body { border-color: #092334; background: linear-gradient(120deg, rgba(0,245,212,.08), transparent 32% 72%, rgba(255,60,166,.1)), #061725; box-shadow: inset 0 0 0 2px #17455c, inset 0 0 100px #000; }
body[data-level="swarms"] .screen-bezel { border-color: #153747; border-radius: 13px; background: linear-gradient(140deg, #173848, #02070c 68%, #192b43); }
body[data-level="swarms"] .crt-screen { border-radius: 8px; background: radial-gradient(circle at 36% 42%, rgba(0,245,212,.11), transparent 48%), linear-gradient(150deg, #021a21, #03050d); }
body[data-level="swarms"] .crt-screen::before { opacity: .38; background: repeating-linear-gradient(60deg,transparent 0 35px,rgba(0,245,212,.12) 36px 37px), repeating-linear-gradient(-60deg,transparent 0 35px,rgba(255,60,166,.08) 36px 37px); mask-image: linear-gradient(90deg,#000,transparent 72%); }
body[data-level="swarms"] .screen-hud { border-bottom: 2px solid rgba(0,245,212,.45); background: linear-gradient(90deg,rgba(0,245,212,.09),transparent 70%); }
body[data-level="swarms"] .mission-screen { border-left: 1px solid rgba(255,60,166,.35); box-shadow: inset 18px 0 34px rgba(255,60,166,.04); }
body[data-level="swarms"] .mind-viewport { width: min(340px,86%); }
body[data-level="swarms"] .control-deck { border: 1px solid rgba(0,245,212,.46); border-radius: 10px; background: linear-gradient(145deg, rgba(5,34,47,.97), rgba(18,14,43,.97)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 35px rgba(0,245,212,.12); }
body[data-level="swarms"] .arcade-button { width: 66px; height: 60px; border: 1px solid rgba(255,255,255,.58); border-radius: 0; clip-path: polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%); background: linear-gradient(145deg, #00a8c8, #165879); box-shadow: inset 0 0 22px rgba(255,255,255,.18); }
body[data-level="swarms"] .broken-button .arcade-button { background: linear-gradient(145deg, #d52b9a, #62216e); }
body[data-level="swarms"] .handover-button { border-radius: 0; clip-path: polygon(3% 0,97% 0,100% 30%,100% 70%,97% 100%,3% 100%,0 70%,0 30%); }
body[data-level="swarms"] #mindCanvas { image-rendering: auto; filter: drop-shadow(0 0 16px rgba(0,245,212,.22)); }
body[data-level="swarms"] .scanlines { opacity: .1; }

body[data-level="recursion"] .marquee { border-color: #070c13; background: linear-gradient(110deg, #03141d, #092c37 45%, #29133a); box-shadow: inset 0 0 0 2px rgba(0,245,212,.55), 0 0 35px rgba(0,245,212,.13); }
body[data-level="recursion"] .cabinet-body { border-color: #06111a; background: radial-gradient(circle at 50% 12%, rgba(0,245,212,.08), transparent 38%), #02080e; box-shadow: inset 0 0 0 1px #193d48, inset 0 0 120px #000; }
body[data-level="recursion"] .screen-bezel { border: 1px solid #24515d; border-radius: 6px; background: #03090e; box-shadow: 0 0 34px rgba(0,245,212,.12); }
body[data-level="recursion"] .crt-screen { border-radius: 3px; background: radial-gradient(circle at 50% 44%, rgba(0,245,212,.12), transparent 50%), #01070b; }
body[data-level="recursion"] .crt-screen::before { opacity: .52; background: linear-gradient(rgba(0,245,212,.15) 1px,transparent 1px), linear-gradient(90deg,rgba(0,245,212,.15) 1px,transparent 1px), repeating-radial-gradient(circle at 42% 48%,transparent 0 45px,rgba(255,251,216,.08) 46px 47px); background-size: 30px 30px,30px 30px,auto; mask-image: radial-gradient(circle at 42% 48%,#000,transparent 82%); }
body[data-level="recursion"] .screen-hud { background: rgba(0,245,212,.035); border-bottom: 1px solid rgba(255,251,216,.5); box-shadow: 0 8px 26px rgba(0,245,212,.08); }
body[data-level="recursion"] .evolution-bank { border-top-color: rgba(255,251,216,.5); background: rgba(0,12,17,.82); }
body[data-level="recursion"] .mind-viewport { width: min(360px,90%); }
body[data-level="recursion"] .control-deck { border: 1px solid rgba(0,245,212,.38); border-radius: 4px; background: rgba(2,13,20,.94); box-shadow: 0 0 32px rgba(0,245,212,.09); }
body[data-level="recursion"] .arcade-button { width: 58px; height: 58px; border: 2px solid #b9fff4; border-radius: 50%; clip-path: none; background: rgba(0,245,212,.08); box-shadow: 0 0 18px rgba(0,245,212,.22), inset 0 0 18px rgba(0,245,212,.12); }
body[data-level="recursion"] .pattern-button .arcade-button { border-color: #29b6ff; background: rgba(41,182,255,.1); }
body[data-level="recursion"] .broken-button .arcade-button { border-color: #ff3ca6; background: rgba(255,60,166,.1); }
body[data-level="recursion"] .handover-button { border-radius: 2px; border-color: rgba(0,245,212,.7); background: rgba(0,245,212,.04); }
body[data-level="recursion"] #mindCanvas { image-rendering: auto; filter: drop-shadow(0 0 22px rgba(255,255,255,.18)); }
body[data-level="recursion"] .scanlines { opacity: .04; }

body[data-level="beyond"] .marquee { border-color: #020509; background: #02070b; box-shadow: inset 0 0 0 1px rgba(0,245,212,.3); }
body[data-level="beyond"] .cabinet-body { border-color: #010407; background: #010509; box-shadow: inset 0 0 120px #000; }
body[data-level="beyond"] .screen-bezel { border: 0; border-radius: 0; background: #010509; box-shadow: 0 0 60px rgba(0,245,212,.1); }
body[data-level="beyond"] .crt-screen { border-radius: 0; background: radial-gradient(circle at 40% 45%, rgba(0,245,212,.18), transparent 48%), #010509; box-shadow: inset 0 0 100px #000, 0 0 45px rgba(0,245,212,.2); }
body[data-level="beyond"] .crt-screen::before { opacity: .62; background: repeating-conic-gradient(from 0deg at 40% 46%,rgba(0,245,212,.16) 0 1deg,transparent 1deg 12deg), repeating-radial-gradient(circle at 40% 46%,transparent 0 34px,rgba(255,60,166,.12) 35px 36px); mask-image: radial-gradient(circle at 40% 46%,#000,transparent 84%); }
body[data-level="beyond"] .screen-hud { background: rgba(255,60,166,.04); border-bottom: 1px solid rgba(255,60,166,.55); }
body[data-level="beyond"] .mind-viewport { width: min(380px,94%); }
body[data-level="beyond"] .control-deck { border: 1px solid rgba(255,60,166,.22); border-radius: 0; background: rgba(1,5,9,.95); box-shadow: none; }
body[data-level="beyond"] .control-deck::before { content: "INPUT CHANNEL TERMINATED"; position: absolute; inset: .35rem 0 auto; color: var(--pink); text-align: center; font-size: .62rem; font-weight: 800; letter-spacing: .22em; }
body[data-level="beyond"] .route-button { opacity: .34; }
body[data-level="beyond"] .route-button.machine-choice { opacity: 1; }
body[data-level="beyond"] .arcade-button { width: 52px; height: 30px; border: 1px solid rgba(0,245,212,.38); border-radius: 2px; clip-path: none; background: rgba(0,245,212,.05); box-shadow: none; }
body[data-level="beyond"] .route-button.machine-choice .arcade-button { transform: none; border-color: #fff; background: var(--aqua); color: #010509; box-shadow: 0 0 26px var(--aqua); }
body[data-level="beyond"] .handover-button { border-radius: 0; border-color: rgba(255,60,166,.25); background: transparent; }
body[data-level="beyond"] #mindCanvas { image-rendering: auto; filter: drop-shadow(0 0 28px rgba(0,245,212,.35)); }
body[data-level="beyond"] .scanlines { opacity: 0; }

.awakening-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; overflow: hidden; padding: 1.5rem; background: radial-gradient(circle at 28% 50%, rgba(0,245,212,.16), transparent 34%), radial-gradient(circle at 76% 50%,rgba(255,60,166,.08),transparent 38%), #010307; }
#awakeningCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.awakening-message { position: relative; z-index: 2; width: min(760px,54vw); margin-left: auto; margin-right: 3vw; padding: clamp(1.5rem, 3.2vw, 3.5rem); border: 1px solid rgba(0,245,212,.26); border-left: 4px solid var(--pink); text-align: left; background: linear-gradient(105deg,rgba(1,3,7,.97),rgba(1,5,9,.9)); box-shadow: -24px 0 80px rgba(0,0,0,.82), 0 0 54px rgba(255,60,166,.12), inset 0 0 44px rgba(0,245,212,.04); animation: awakening-arrival 1.15s cubic-bezier(.18,.85,.2,1) both; }
.override-alert { position: relative; display: inline-block; margin-bottom: 1.1rem; padding: .55rem .8rem; border: 2px solid var(--pink); color: #fff; background: rgba(255,0,86,.18); font-size: clamp(.8rem,1.6vw,1.15rem); font-weight: 900; letter-spacing: .19em; text-shadow: 2px 0 var(--aqua),-2px 0 var(--pink); box-shadow: 0 0 24px rgba(255,60,166,.34), inset 0 0 18px rgba(255,60,166,.1); animation: override-glitch 3.4s steps(1,end) infinite; }
.awakening-kicker { display: block; color: var(--aqua); font-size: clamp(.68rem,1.25vw,.9rem); font-weight: 800; letter-spacing: .18em; }
.awakening-message h2 { margin: .72rem 0; color: #fffbd8; font-family: var(--display); font-size: clamp(3.1rem, 7.2vw, 7.5rem); line-height: .82; letter-spacing: .015em; text-shadow: 6px 4px 0 rgba(120,0,64,.95), -3px -2px 0 rgba(0,245,212,.52), 0 0 45px rgba(255,60,166,.24); }
.awakening-message p { margin: 1rem 0 1.5rem; color: var(--screen-text); font-size: clamp(.82rem, 1.6vw, 1.05rem); letter-spacing: .12em; }.awakening-message p strong { color: var(--pink); font-size: 1.35em; }
.awakening-message button { padding: .85rem 1.2rem; border: 2px solid var(--aqua); background: rgba(0,245,212,.08); color: #fff; font-weight: 800; letter-spacing: .08em; cursor: pointer; box-shadow: 0 0 18px rgba(0,245,212,.2); }
.awakening-message button:hover { background: var(--aqua); color: #02070a; }
body.awakening { overflow: hidden; }
body.awakening .arcade-machine { filter: none; }
body.awakening .cabinet-body, body.awakening .marquee { visibility: hidden; }

@keyframes bulb { 50% { opacity: .28; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse-ring { 50% { opacity: .28; transform: scale(.94); } }
@keyframes lamp { 50% { opacity: .25; } }
@keyframes flash { 15% { opacity: .18; } 42% { opacity: .03; } 64% { opacity: .11; } }
@keyframes packet-in { from { opacity: 0; transform: translateX(60px); } }
@keyframes button-error { 50% { transform: translateX(4px); } }
@keyframes evolution-shock { 0% { filter: brightness(4); transform: scale(.82) rotate(-2deg); } 24% { transform: scale(1.08) rotate(1deg); } 52% { filter: brightness(1.4); transform: scale(.98); } 100% { filter: none; transform: none; } }
@keyframes awakening-arrival { from { opacity: 0; transform: translateX(4vw) scale(.94); } 62% { opacity: 1; transform: translateX(-.5vw) scale(1.01); } to { transform: none; } }
@keyframes override-glitch { 0%,7%,11%,68%,72%,100% { opacity: 1; transform: none; } 8% { opacity: .5; transform: translate(-4px,1px) skewX(7deg); } 9% { opacity: 1; transform: translate(3px,-1px) skewX(-4deg); } 69% { opacity: .72; transform: translate(2px,0); } 70% { opacity: 1; transform: translate(-2px,0); } }

@media (max-width: 900px) {
  .screen-hud { grid-template-columns: 1fr auto; }.system-readout { display: none; }.year-counter { grid-column: 2; grid-row: 1; }
  .game-screen { grid-template-columns: 1fr; }.brain-zone { min-height: 390px; border-right: 0; border-bottom: 1px solid rgba(0,245,212,.18); }.mission-screen { padding-top: 1.25rem; }
  .control-deck { grid-template-columns: 1fr; }.deck-instruction { text-align: center; }.start-station { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .65rem 1rem; }.run-stats { margin: 0; }.progress-track, .handover-button, .run-id { grid-column: 2; }.handover-button { margin-top: 0; }.start-button { grid-row: 1/4; }
  .awakening-message { width: min(700px,78vw); margin-right: 1vw; }
}

@media (max-width: 620px) {
  .ky13n-home { top: 8px; left: 8px; padding: .42rem .52rem; font-size: .56rem; }
  body { padding: 0; background: #16091c; }
  .arcade-machine { width: 100%; }.marquee { border-radius: 0; border-inline-width: 4px; padding: 1.15rem .7rem 1rem; }.marquee h1 { gap: 0 .15em; font-size: clamp(2rem, 11.5vw, 3.4rem); -webkit-text-stroke-width: 2px; text-shadow: 3px 3px 0 #00a9d6, 6px 6px 0 #47114e; }.marquee-question { margin-top: .65rem; font-size: .66rem; line-height: 1.35; }
  .cabinet-body { padding: 2.2rem .5rem 1rem; border-inline-width: 4px; border-radius: 0; }.audio-switch { right: 1rem; }
  .screen-bezel { padding: .85rem .65rem 1rem; border-radius: 22px 22px 34px 34px; }.bezel-label { padding-inline: .25rem; font-size: .56rem; }
  .crt-screen { min-height: 0; border-radius: 20px; }.screen-hud { grid-template-columns: 1fr minmax(138px, 45%); gap: .5rem; padding: 1rem .8rem .7rem; }.screen-hud span { font-size: .6rem; }.player-role strong { font-size: .78rem; }.year-counter { padding: .38rem .48rem; }.year-counter strong { font-size: 1.2rem; }.year-counter small { font-size: .47rem; }
  .brain-zone { min-height: 330px; }.brain-caption { padding-inline: .85rem; font-size: .64rem; }.mind-viewport { width: min(300px, 82vw); margin-top: -.4rem; }.mind-status { padding: .6rem; }
  .mission-screen h2 { font-size: 1.45rem; }.mission-screen > p { font-size: .94rem; }.plain-instructions li { font-size: .84rem; }
  .evolution-bank { grid-template-columns: 1fr; gap: .45rem; padding-inline: .8rem; }.evolution-bank > span { text-align: center; }.evolution-bank li b { font-size: .54rem; }.evolution-bank li small { display: none; }
  .control-deck { margin: .75rem -.2rem 0; padding: 1.1rem .55rem 1.35rem; border-inline-width: 3px; }.routing-buttons { gap: .2rem; }.arcade-button { width: 58px; height: 58px; }.route-button strong { min-height: 3.4em; font-size: .67rem; }.route-button small { font-size: .6rem; }
  .start-station { grid-template-columns: 108px 1fr; }.start-button { width: 104px; height: 69px; }.run-stats dd { font-size: .85rem; }.handover-button { padding-inline: .35rem; }.handover-button span { font-size: .64rem; }.handover-button small { font-size: .49rem; }
  .coin-panel { grid-template-columns: 1fr auto; }.coin-slot { display: none; }.coin-panel p { text-align: left; font-size: .62rem; }
  .awakening-overlay { align-items: end; padding: .75rem; background: radial-gradient(circle at 50% 25%,rgba(0,245,212,.18),transparent 36%),#010307; }.awakening-message { width: 100%; margin: 0; padding: 1.25rem; text-align: center; }.awakening-message h2 { font-size: clamp(3.25rem,17vw,5.6rem); }.override-alert { margin-bottom: .75rem; }
}

@media (max-width: 390px) {
  .route-button small { display: none; }.route-button strong { min-height: 4.2em; font-size: .63rem; }.mission-screen { padding: 1.1rem .9rem; }.brain-zone { min-height: 305px; }.mind-viewport { width: 270px; max-width: 78vw; }.plain-instructions { margin-block: .9rem; }.awakening-message h2 { font-size: clamp(2.7rem, 16vw, 4.4rem); }
}

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