:root {
  color-scheme: dark;
  --ink: #e8f4ef;
  --muted: #8ba5ac;
  --dim: #506b78;
  --cyan: #72f4d0;
  --blue: #77b8ff;
  --panel: rgba(6, 22, 35, .78);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #07121f; }
body { color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; user-select: none; -webkit-user-select: none; }
button { font: inherit; }
#game { position: relative; width: 100%; height: 100%; min-height: 420px; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 49% 45%, #142c3b 0%, #0b1d2a 49%, #06101c 100%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 52% 46%, transparent 40%, rgba(2, 8, 17, .15) 74%, rgba(2, 8, 17, .66) 130%); z-index: 1; }
#game::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .12; background-image: linear-gradient(rgba(135, 202, 204, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(135, 202, 204, .055) 1px, transparent 1px); background-size: 74px 74px; mask-image: linear-gradient(transparent 4%, #000 36%, #000 83%, transparent); }
.topbar { position: absolute; z-index: 3; top: max(22px, env(safe-area-inset-top)); left: clamp(18px, 4.2vw, 66px); right: clamp(18px, 4.2vw, 66px); height: 62px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.brand-mark { position: relative; width: 31px; height: 31px; border: 1px solid rgba(113, 244, 208, .48); border-radius: 50%; box-shadow: 0 0 18px rgba(70, 242, 198, .11), inset 0 0 12px rgba(70, 242, 198, .08); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 5px; right: 5px; top: 13px; height: 4px; border: 1px solid var(--cyan); border-radius: 100%; transform: rotate(-12deg); }
.brand-mark::after { width: 4px; height: 4px; left: 12px; top: 9px; border: 0; background: #ecffde; box-shadow: 0 0 8px var(--cyan); }
.brand-name { font-size: 12px; letter-spacing: .19em; font-weight: 750; line-height: 1.2; color: #eaf9f4; }
.brand-name span { color: var(--cyan); }
.brand-sub { margin-top: 5px; color: #76909a; font-size: 8px; letter-spacing: .19em; }
.clock-panel { position: absolute; left: 50%; top: 1px; transform: translateX(-50%); width: 146px; text-align: center; padding: 3px 12px 7px; background: linear-gradient(180deg, rgba(10, 30, 43, .79), rgba(6, 20, 32, .36)); border: 1px solid rgba(130, 189, 195, .15); border-top-color: rgba(151, 225, 211, .25); border-radius: 7px 7px 13px 13px; box-shadow: 0 12px 34px rgba(0, 0, 0, .17); }
.clock-label { display: flex; justify-content: center; align-items: center; gap: 6px; color: #91aab1; font-size: 8px; letter-spacing: .2em; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.clock { color: #f3fff8; font-size: 27px; font-variant-numeric: tabular-nums; line-height: 1.16; letter-spacing: .055em; font-weight: 650; text-shadow: 0 0 18px rgba(113, 244, 208, .2); }
.clock.is-low { color: #ffb584; text-shadow: 0 0 18px rgba(255, 142, 106, .37); }
.clock-track { height: 2px; width: 100%; margin-top: 4px; background: rgba(200, 235, 221, .12); overflow: hidden; }
.clock-track i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #73f4d0, #8ccaff); transform-origin: left; box-shadow: 0 0 8px var(--cyan); }
.score-panel { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 240px; }
.score-block { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.score-block span { color: #829ca6; font-size: 8px; letter-spacing: .19em; }
.score-block strong { color: #e7f5ee; font-size: 19px; letter-spacing: .09em; font-variant-numeric: tabular-nums; font-weight: 600; }
.score-divider { height: 28px; border-left: 1px solid rgba(154, 202, 196, .2); }
.telemetry { position: absolute; z-index: 3; left: clamp(20px, 4.4vw, 68px); top: 126px; width: 190px; padding: 11px 13px 10px; border: 1px solid rgba(137, 192, 195, .15); border-left: 2px solid rgba(114, 244, 208, .55); border-radius: 3px 9px 9px 3px; background: linear-gradient(90deg, rgba(6, 22, 33, .63), rgba(6, 22, 33, .19)); backdrop-filter: blur(7px); pointer-events: none; }
.telemetry-head { display: flex; align-items: center; gap: 7px; color: #9ab0b4; font-size: 8px; letter-spacing: .18em; }
.telemetry-icon { color: var(--cyan); font-size: 14px; line-height: 10px; }
.telemetry-head b { margin-left: auto; color: #d9f6e9; font-size: 10px; letter-spacing: .07em; font-variant-numeric: tabular-nums; }
.lock-track { margin: 9px 0 7px; height: 3px; background: rgba(172, 217, 205, .12); }
.lock-track i { display: block; width: 10%; height: 100%; background: linear-gradient(90deg, #6cefcf, #a7ffd7); box-shadow: 0 0 9px rgba(106, 239, 207, .8); transition: width .13s ease-out; }
.telemetry-foot { display: flex; justify-content: space-between; color: #708b95; font-size: 7px; letter-spacing: .13em; }
.telemetry-foot b { color: #b5d4d0; font-weight: 550; }
.toast { position: absolute; z-index: 4; top: 22%; left: 50%; transform: translate(-50%, -5px); padding: 9px 16px; border: 1px solid rgba(131, 235, 203, .28); border-radius: 3px 12px 3px 12px; background: rgba(7, 23, 34, .76); color: #d6fff0; font-size: 10px; letter-spacing: .19em; text-align: center; opacity: 0; transition: opacity .18s ease, transform .18s ease; pointer-events: none; white-space: nowrap; box-shadow: 0 5px 30px rgba(0, 0, 0, .16); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.warning { color: #ffd1a4; border-color: rgba(255, 176, 128, .35); }
.intro-screen, .result-screen { position: absolute; z-index: 3; top: 18.3%; left: 50%; transform: translateX(-50%); width: min(620px, 90vw); text-align: center; pointer-events: none; text-shadow: 0 2px 22px rgba(4, 15, 24, .56); transition: opacity .34s ease, transform .34s ease; }
.intro-screen.leaving { opacity: 0; transform: translate(-50%, -9px); }
.intro-kicker { display: flex; align-items: center; justify-content: center; gap: 9px; color: #83b9b0; font-size: 9px; font-weight: 600; letter-spacing: .25em; }
.kicker-line { display: inline-block; width: 23px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); }
h1 { margin: 12px 0 8px; color: #f0faf2; font-size: clamp(42px, 5.3vw, 70px); line-height: .82; letter-spacing: .08em; font-weight: 260; }
h1 em { color: var(--cyan); font-style: normal; font-size: .72em; letter-spacing: .22em; font-weight: 650; text-shadow: 0 0 24px rgba(72, 238, 202, .26); }
.intro-screen p, .result-screen p { margin: 12px 0 12px; color: #b5c9c8; font-size: 12px; line-height: 1.55; letter-spacing: .035em; }
.howto { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 7px 12px; border: 1px solid rgba(154, 210, 198, .15); border-radius: 3px; color: #91a9ac; background: rgba(7, 21, 31, .45); font-size: 9px; letter-spacing: .055em; }
.howto span { color: #d7fbed; font-size: 8px; letter-spacing: .15em; font-weight: 700; }
.howto i { color: #65847f; font-style: normal; }
.result-screen { top: 22%; }
.result-screen[hidden] { display: none; }
.result-screen h2 { margin: 14px 0 5px; color: var(--cyan); font-weight: 600; font-size: clamp(24px, 4vw, 38px); letter-spacing: .13em; }
.result-stats { display: flex; justify-content: center; gap: 24px; margin: 15px 0; }
.result-stats div { display: flex; flex-direction: column; gap: 3px; min-width: 78px; }
.result-stats strong { color: #f0fcf5; font-size: 22px; font-variant-numeric: tabular-nums; }
.result-stats span { color: #83a29f; font-size: 8px; letter-spacing: .19em; }
.round-tip { position: absolute; z-index: 2; left: 50%; bottom: 139px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: #9ab2ac; font-size: 10px; letter-spacing: .045em; white-space: nowrap; text-shadow: 0 2px 10px #07121f; pointer-events: none; }
.tip-spark { color: var(--cyan); font-size: 13px; text-shadow: 0 0 11px rgba(95, 255, 218, .7); }
.control-dock { position: absolute; z-index: 5; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; width: max-content; }
.control-caption { display: flex; gap: 7px; align-items: center; color: #77969a; font-size: 7px; letter-spacing: .23em; }
.caption-dash { width: 13px; height: 1px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.lift-button { position: relative; display: flex; align-items: center; gap: 12px; width: 258px; min-height: 67px; padding: 8px 15px 8px 10px; overflow: hidden; border: 1px solid rgba(128, 245, 209, .45); border-radius: 16px 5px 16px 5px; color: #effcf6; text-align: left; background: linear-gradient(115deg, rgba(20, 52, 58, .94), rgba(8, 28, 39, .96) 72%); box-shadow: 0 0 0 4px rgba(84, 213, 186, .045), 0 12px 32px rgba(0, 0, 0, .33), inset 0 1px rgba(240, 255, 245, .08); cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.lift-button::before { content: ""; position: absolute; inset: -1px; transform: translateX(-110%); background: linear-gradient(105deg, transparent 28%, rgba(175, 255, 226, .1) 53%, transparent 75%); transition: transform .55s ease; pointer-events: none; }
.lift-button:hover { border-color: rgba(144, 255, 222, .8); box-shadow: 0 0 0 4px rgba(84, 213, 186, .08), 0 12px 35px rgba(0, 0, 0, .36), 0 0 28px rgba(76, 228, 191, .1); }
.lift-button:active, .lift-button.pressed { transform: translateY(2px) scale(.99); border-color: #b0ffe3; background: linear-gradient(115deg, rgba(24, 79, 74, .98), rgba(9, 39, 47, .98)); box-shadow: 0 0 0 5px rgba(84, 213, 186, .09), 0 4px 20px rgba(0, 0, 0, .38), 0 0 27px rgba(76, 228, 191, .18); }
.lift-button:focus-visible { outline: 2px solid #effff7; outline-offset: 4px; }
.lift-button.pressed::before { transform: translateX(110%); }
.button-orb { position: relative; display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(113, 244, 208, .52); border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(102, 242, 208, .22), rgba(39, 113, 107, .14) 52%, rgba(7, 27, 38, .64) 72%); box-shadow: inset 0 0 13px rgba(112, 245, 210, .1), 0 0 13px rgba(94, 230, 197, .1); }
.button-orb::before, .button-orb::after { content: ""; position: absolute; width: 26px; height: 10px; border: 1px solid rgba(126, 255, 219, .83); border-radius: 50%; transform: rotate(-13deg); box-shadow: 0 0 7px rgba(81, 255, 207, .25); }
.button-orb::after { width: 5px; height: 5px; border: 0; background: #f4ffe7; box-shadow: 0 0 8px #a3ffe2; }
.orb-core { position: relative; z-index: 1; margin-top: -22px; color: #eafff5; font-size: 7px; text-shadow: 0 0 8px var(--cyan); }
.pressed .button-orb { box-shadow: inset 0 0 18px rgba(112, 245, 210, .35), 0 0 19px rgba(94, 230, 197, .4); }
.pressed .button-orb::before { animation: orb-spin 1.5s linear infinite; }
@keyframes orb-spin { to { transform: rotate(347deg); } }
.button-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.button-copy strong { color: #dcfff1; font-size: 11px; letter-spacing: .17em; font-weight: 700; }
.button-copy small { color: #87a7a6; font-size: 7px; letter-spacing: .105em; white-space: nowrap; }
.key-hint { margin-left: auto; padding: 5px 6px; border: 1px solid rgba(179, 221, 208, .19); border-radius: 4px; color: #99b7b0; background: rgba(4, 18, 27, .5); font: 8px ui-monospace, monospace; letter-spacing: .05em; }
.edge-label { position: absolute; z-index: 2; bottom: 35px; color: rgba(121, 154, 157, .59); font-size: 7px; letter-spacing: .17em; pointer-events: none; }
.left-edge { left: clamp(18px, 4.2vw, 66px); }
.right-edge { right: clamp(18px, 4.2vw, 66px); }
@media (pointer: coarse) { .key-hint { display: none; } }
@media (max-width: 640px) {
  #game { min-height: 380px; }
  .topbar { top: max(12px, env(safe-area-inset-top)); left: 14px; right: 14px; height: 54px; }
  .brand { min-width: auto; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark::before { top: 11px; }
  .brand-mark::after { left: 10px; top: 7px; }
  .brand-name { font-size: 9px; letter-spacing: .13em; }
  .brand-sub { max-width: 125px; font-size: 6px; letter-spacing: .12em; }
  .clock-panel { top: 1px; width: 102px; padding: 4px 7px 6px; }
  .clock-label { font-size: 6px; letter-spacing: .12em; }
  .clock { font-size: 21px; }
  .clock-track { margin-top: 2px; }
  .score-panel { min-width: auto; gap: 8px; }
  .score-block { gap: 3px; }
  .score-block span { font-size: 6px; letter-spacing: .11em; }
  .score-block strong { font-size: 14px; }
  .score-divider { height: 24px; }
  .telemetry { left: 14px; top: 85px; width: 154px; padding: 8px 9px 7px; }
  .telemetry-head { font-size: 7px; }
  .telemetry-foot { font-size: 6px; }
  .toast { top: 18%; max-width: 91vw; padding: 8px 10px; font-size: 8px; letter-spacing: .13em; }
  .intro-screen { top: 16%; width: 96vw; }
  .intro-kicker { font-size: 7px; }
  h1 { margin: 9px 0 7px; font-size: clamp(39px, 10vw, 58px); }
  .intro-screen p, .result-screen p { margin: 8px 0; font-size: 10px; }
  .howto { gap: 6px; padding: 6px 8px; font-size: 8px; }
  .howto span { font-size: 7px; }
  .result-screen { top: 20%; }
  .result-screen h2 { margin: 10px 0 3px; font-size: 23px; }
  .result-stats { margin: 10px 0; }
  .round-tip { bottom: 119px; font-size: 9px; }
  .control-dock { bottom: max(12px, env(safe-area-inset-bottom)); gap: 5px; }
  .control-caption { font-size: 6px; }
  .lift-button { width: 238px; min-height: 61px; padding: 7px 12px 7px 8px; }
  .button-orb { flex-basis: 42px; width: 42px; height: 42px; }
  .button-copy strong { font-size: 10px; }
  .button-copy small { font-size: 6px; }
  .edge-label { display: none; }
}
@media (max-height: 560px) and (min-width: 641px) {
  .topbar { top: 10px; }
  .telemetry { top: 89px; }
  .intro-screen { top: 16%; transform: translateX(-50%) scale(.83); }
  .control-dock { bottom: 10px; }
  .round-tip { bottom: 112px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
