:root {
  --void: #070911;
  --ink: #f5f7ff;
  --muted: #7f89ac;
  --dim: #454d71;
  --blue: #637dff;
  --cyan: #32f7df;
  --violet: #8977ff;
  --pink: #ff56bd;
  --amber: #ffc84b;
  --lime: #9be84c;
  --coral: #ff6a72;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--void); }
body { min-width: 320px; color: var(--ink); font-family: "Space Grotesk", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.game-screen {
  position: relative;
  display: grid;
  width: min(100%, 440px);
  height: 100dvh;
  min-height: 560px;
  margin: 0 auto;
  grid-template-rows: 72px minmax(0, 1fr) 174px;
  overflow: hidden;
  isolation: isolate;
  background: #080a16;
  box-shadow: 0 0 0 1px rgba(118, 140, 255, .12), 0 24px 70px rgba(0,0,0,.58);
}
.game-screen::before { position: absolute; z-index: 20; inset: 0; pointer-events: none; content: ""; border: 1px solid rgba(156, 172, 255, .1); }

.hud-top { position: relative; z-index: 10; display: grid; align-items: center; padding: max(10px, env(safe-area-inset-top)) 16px 9px; grid-template-columns: 1fr auto; background: linear-gradient(180deg, rgba(10,13,29,.98) 0%, rgba(10,13,29,.76) 100%); }
.hud-top::after { position: absolute; right: 16px; bottom: 0; left: 16px; height: 1px; content: ""; background: linear-gradient(90deg, transparent, rgba(129,146,255,.32), transparent); }
.hud-button { width: 38px; height: 38px; padding: 0 0 4px; cursor: pointer; border: 1px solid rgba(147,163,255,.48); border-radius: 11px; color: #f1f4ff; background: rgba(27,36,76,.68); font-family: Arial, sans-serif; font-size: 30px; line-height: 1; transition: transform 160ms ease, background 160ms ease; }.hud-button:active { transform: scale(.9); background: rgba(71,81,145,.8); }
.game-title { display: grid; justify-items: start; line-height: 1; }.game-title span { margin-bottom: 4px; color: var(--cyan); font-size: 8px; font-weight: 700; letter-spacing: 1.8px; }.game-title strong { color: #fff; font-family: "Bebas Neue", Impact, sans-serif; font-size: 29px; font-weight: 400; letter-spacing: 3px; text-shadow: 0 0 22px rgba(105,116,255,.7); }
.shard-count { display: inline-flex; align-items: center; gap: 6px; min-width: 75px; padding: 7px 7px 7px 9px; cursor: pointer; border: 1px solid rgba(255,200,75,.56); border-radius: 14px; color: #fff5d0; background: rgba(68,52,17,.44); font-size: 12px; font-weight: 700; }.shard-count:active { transform: scale(.94); }.shard-count i { width: 11px; height: 11px; background: var(--amber); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); filter: drop-shadow(0 0 5px rgba(255,200,75,.9)); }.shard-count b { font-weight: 700; }.shard-count em { display: grid; width: 15px; height: 15px; place-items: center; border-radius: 50%; color: #372506; background: var(--amber); font-size: 14px; font-style: normal; line-height: 1; }

.map-panel { position: relative; min-height: 0; overflow: hidden; background: #080a18; }
.track-shift { position: absolute; z-index: 9; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; pointer-events: none; color: #aab5e3; background: rgba(7,9,20,.88); opacity: 0; }.track-shift span, .track-shift strong { font-size: 9px; font-weight: 700; letter-spacing: 2px; }.track-shift b { color: var(--cyan); font-family: Arial, sans-serif; font-size: 28px; font-weight: 400; line-height: .7; }.track-shift strong { color: #fff; font-size: 14px; }
.game-screen.track-arrival .track-shift { animation: trackShift .95s cubic-bezier(.2,.8,.2,1) both; }
.map-viewport { position: relative; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; scroll-snap-type: y proximity; touch-action: pan-y; }.map-viewport::-webkit-scrollbar { display: none; }
.map-stage { position: relative; width: 100%; height: 1650px; min-height: 1650px; overflow: hidden; background: radial-gradient(ellipse at 50% 4%, rgba(70,60,175,.32), transparent 32%), linear-gradient(180deg, #111440 0%, #09102d 42%, #070912 100%); }
.map-stage::after { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; height: 120px; pointer-events: none; content: ""; background: linear-gradient(0deg, #080a16, transparent); }
.deep-space { position: absolute; z-index: 0; top: 3%; left: 8%; width: 84%; height: 66%; opacity: .75; background: radial-gradient(ellipse at 54% 42%, rgba(69,60,190,.18), transparent 44%), radial-gradient(ellipse at 17% 74%, rgba(16,213,202,.13), transparent 31%), radial-gradient(ellipse at 84% 57%, rgba(230,69,178,.13), transparent 28%); filter: blur(2px); }
.horizon-grid { position: absolute; z-index: 0; right: -20%; bottom: -90px; left: -20%; height: 370px; opacity: .36; background: linear-gradient(rgba(89,106,227,.28) 1px, transparent 1px), linear-gradient(90deg, rgba(89,106,227,.21) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(0deg, #000, transparent 78%); transform: perspective(160px) rotateX(58deg); transform-origin: bottom; }
.orbit-ring { position: absolute; z-index: 0; border: 1px solid rgba(127,124,255,.15); border-radius: 50%; transform: rotate(-25deg); }.ring-one { top: 168px; left: 44%; width: 280px; height: 110px; }.ring-two { top: 720px; left: -34%; width: 370px; height: 145px; border-color: rgba(48,229,211,.12); transform: rotate(19deg); }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #dffcff; box-shadow: 0 0 9px #76efff; opacity: .74; animation: starBlink 3s ease-in-out infinite; }.s1 { top: 92px; left: 11%; }.s2 { top: 222px; left: 89%; animation-delay: -.7s; }.s3 { top: 422px; left: 8%; animation-delay: -1.8s; }.s4 { top: 690px; left: 91%; animation-delay: -.3s; }.s5 { top: 850px; left: 15%; animation-delay: -2s; }.s6 { top: 1025px; left: 90%; animation-delay: -1.2s; }.s7 { top: 1240px; left: 12%; animation-delay: -.9s; }.s8 { top: 1490px; left: 86%; animation-delay: -2.5s; }
.swipe-mark { position: absolute; z-index: 5; top: 17px; left: 50%; display: flex; align-items: center; gap: 5px; color: rgba(165,177,255,.65); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; opacity: 1; pointer-events: none; transform: translateX(-50%); transition: opacity 220ms ease; }.swipe-mark span { color: var(--cyan); font-size: 17px; line-height: .6; animation: climbHint 1.5s ease-in-out infinite; }.swipe-mark small { font-size: inherit; }.game-screen.is-climbing .swipe-mark { opacity: 0; }

.climb-route { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; }.route-halo { fill: none; stroke: url(#routeGradient); stroke-linecap: round; stroke-opacity: .15; stroke-width: 24px; filter: blur(11px); }.route-line { fill: none; stroke: url(#routeGradient); stroke-dasharray: 2 14; stroke-linecap: round; stroke-width: 4px; }
.level-list { position: absolute; z-index: 2; inset: 0; margin: 0; padding: 0; list-style: none; }.level-item { position: absolute; top: var(--top); left: var(--x); width: 128px; height: 132px; opacity: 0; transform: translateX(-50%) scale(.82); animation: nodeEnter .46s cubic-bezier(.16,.9,.24,1.26) var(--delay) forwards; }
.gem-node { position: relative; display: grid; width: 100%; height: 100%; justify-items: center; padding: 0; cursor: pointer; border: 0; color: var(--ink); background: transparent; touch-action: manipulation; }.gem-node:focus-visible { outline: 2px solid white; outline-offset: 3px; border-radius: 12px; }
.gem-tile { position: relative; display: grid; width: 82px; height: 82px; place-items: center; overflow: hidden; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--tile, var(--violet)); transition: transform 170ms ease, filter 170ms ease; }.gem-tile::before { position: absolute; inset: 3px; content: ""; clip-path: inherit; background: conic-gradient(from 45deg, rgba(255,255,255,.16), transparent 0 25%, rgba(0,0,0,.2) 0 50%, rgba(255,255,255,.07) 0 75%, rgba(0,0,0,.22) 0); }.tile-glint { position: absolute; top: 15px; left: 18px; width: 36px; height: 12px; border-top: 2px solid rgba(255,255,255,.62); border-radius: 50%; transform: rotate(-42deg); }.tile-core { position: relative; z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.42); transform: rotate(45deg); }.tile-core b, .tile-core i { position: absolute; transform: rotate(-45deg); }.tile-core b { top: 5px; color: rgba(255,255,255,.95); font-family: "Bebas Neue", Impact, sans-serif; font-size: 19px; font-weight: 400; letter-spacing: 1px; }.tile-core i { bottom: 4px; color: rgba(255,255,255,.9); font-size: 12px; font-style: normal; }
.node-label { display: block; max-width: 128px; margin-top: 9px; overflow: hidden; color: #a8b2dd; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }.node-magenta { --tile: #d83d9c; }.node-violet { --tile: #8269ed; }.node-blue { --tile: #4c9cff; }.node-amber { --tile: #e69b30; }.node-coral { --tile: #ef5968; }.node-lime { --tile: #87d43d; }.node-cyan { --tile: #16d2c9; }.node-current { --tile: #ffbe3c; }
.gem-node:hover .gem-tile, .gem-node:active .gem-tile, .gem-node.is-pressed .gem-tile { transform: translateY(-4px) scale(1.06); filter: brightness(1.13); }.locked .gem-tile { --tile: #454e73; filter: saturate(.34) brightness(.82); }.locked .gem-node:hover .gem-tile { transform: none; filter: saturate(.34) brightness(.82); }.locked .node-label { color: #6c769d; visibility: hidden; }.next-locked .node-label { color: #7c87ad; visibility: visible; }.locked .tile-core { border-color: rgba(209,216,255,.2); }.level-item.is-nudging .gem-tile { animation: lockedNudge .42s ease; }
.node-lock { position: absolute; top: 62px; right: 14px; width: 19px; height: 16px; border: 1px solid #8a94b9; border-radius: 4px; background: #202741; opacity: .65; transform: scale(.76); transform-origin: top right; }.node-lock[hidden] { display: none; }.node-lock::before { position: absolute; top: -8px; left: 4px; width: 9px; height: 10px; content: ""; border: 1px solid #8a94b9; border-bottom: 0; border-radius: 7px 7px 0 0; }.node-lock::after { position: absolute; top: 5px; left: 8px; width: 3px; height: 5px; content: ""; border-radius: 2px; background: #9ba6c9; }
.node-check { position: absolute; top: 59px; right: 9px; display: grid; width: 20px; height: 20px; place-items: center; border: 2px solid #cbff91; border-radius: 50%; color: #122014; background: var(--lime); font-size: 12px; font-weight: 800; }.completed-node .gem-tile { filter: saturate(.8); }.completed-node .node-label { color: #8797c9; }
.node-current .gem-tile { width: 108px; height: 108px; filter: drop-shadow(0 0 13px rgba(255,190,60,.8)); }.node-current .tile-core { width: 53px; height: 53px; }.node-current .tile-core b { font-size: 25px; }.node-current .node-label { margin-top: 11px; color: #ffe0a0; font-size: 10px; }.current-aura { position: absolute; top: -14px; left: 9px; width: 108px; height: 108px; border: 1px solid rgba(255,206,76,.75); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: currentPulse 2.2s ease-out infinite; }.play-node { position: absolute; top: 76px; right: -1px; padding: 5px 7px; border: 1px solid #ffe18b; border-radius: 5px; color: #291b04; background: #ffd268; font-size: 8px; font-weight: 800; letter-spacing: .5px; }

.stage-console { position: relative; z-index: 8; display: grid; align-items: center; padding: 17px 17px max(9px, env(safe-area-inset-bottom)); grid-template-columns: 1fr 112px; grid-template-rows: 1fr 9px; gap: 8px 10px; border-top: 1px solid rgba(121,144,255,.34); background: linear-gradient(180deg, rgba(21,27,64,.98) 0%, rgba(8,10,23,.99) 100%); }.stage-console::before { position: absolute; top: -1px; left: 16%; width: 68%; height: 2px; content: ""; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 16px rgba(50,247,223,.55); }
.console-copy { min-width: 0; }.console-kicker { display: block; margin-bottom: 5px; color: var(--cyan); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }.console-copy h1 { margin: 0; color: #fff; font-family: "Bebas Neue", Impact, sans-serif; font-size: 36px; font-weight: 400; letter-spacing: 2px; line-height: .9; }.console-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #8d98c4; font-size: 9px; font-weight: 700; letter-spacing: .5px; }.console-meta i { color: var(--amber); font-size: 8px; font-style: normal; letter-spacing: 1px; }
.play-button { display: flex; height: 55px; align-items: center; justify-content: space-between; padding: 0 11px 0 15px; cursor: pointer; border: 0; border-radius: 9px; color: #17110a; background: linear-gradient(135deg, #ffd76a, #efa72e); box-shadow: 0 0 20px rgba(255,189,60,.18); font-family: "Bebas Neue", Impact, sans-serif; font-size: 22px; letter-spacing: 1.5px; transition: transform 150ms ease, filter 150ms ease; }.play-button b { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(48,30,5,.38); border-radius: 50%; font-family: Arial, sans-serif; font-size: 17px; font-weight: 400; }.play-button:active { transform: scale(.94); filter: brightness(1.1); }
.return-button { align-self: center; width: 27px; height: 27px; padding: 0 0 3px; cursor: pointer; border: 1px solid rgba(115,242,227,.5); border-radius: 50%; color: var(--cyan); background: rgba(21,52,70,.45); font-size: 20px; }.return-button:active { transform: scale(.9); }.ascent-track { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #262e52; }.ascent-track span { display: block; width: 22%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 8px rgba(50,247,223,.6); }
.toast { position: fixed; z-index: 20; bottom: 192px; left: 50%; width: max-content; max-width: calc(100vw - 44px); padding: 10px 13px; border: 1px solid rgba(50,247,223,.7); border-radius: 9px; color: #e8ffff; background: rgba(10,20,43,.96); box-shadow: 0 8px 23px rgba(0,0,0,.4); font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; text-align: center; transform: translate(-50%, 14px); transition: opacity 180ms ease, transform 180ms ease; }.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes nodeEnter { to { opacity: 1; transform: translateX(-50%) scale(1); } }@keyframes climbHint { 50% { transform: translateY(-4px); } }@keyframes starBlink { 50% { opacity: .18; transform: scale(.65); } }@keyframes currentPulse { 80%, 100% { opacity: 0; transform: scale(1.35); } }@keyframes lockedNudge { 25% { transform: translateX(-5px); } 65% { transform: translateX(5px); } }@keyframes trackShift { 0% { opacity: 0; transform: scale(1.03); } 18%, 72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.98); } }
@media (min-width: 620px) { body { padding: 16px 0; overflow: auto; }.game-screen { height: calc(100dvh - 32px); min-height: 650px; border-radius: 26px; }.hud-top { border-radius: 26px 26px 0 0; }.stage-console { border-radius: 0 0 26px 26px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
