:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf3f8;
  background: #090d13;
  font-synthesis: none;
  --cyan: #66f5ed;
  --muted: #97a4b4;
  --line: #25303d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 75% 0%, #12202a 0%, transparent 48%), #090d13; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 6px; }
.shell { max-width: 1248px; padding: 0 44px; margin: 0 auto; }
.site-header { min-height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 24px; }
.wordmark { color: #f6faff; text-decoration: none; font-size: 23px; font-weight: 850; letter-spacing: 3px; display: flex; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; margin-right: 10px; background: var(--cyan); color: #0b171c; font-size: 27px; letter-spacing: 0; border-radius: 6px; }
.brand-dot { color: var(--cyan); }
.header-caption, .eyebrow, .arena-hud, .arena-footer, .live-label, .site-footer { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: 1.5px; }
.header-caption { color: var(--muted); display: flex; align-items: center; gap: 9px; }
.signal-dot, .hud-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 36px 0 30px; }
.eyebrow { margin: 0 0 13px; color: var(--cyan); font-weight: 600; }
h1 { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.08; letter-spacing: -2.6px; font-weight: 750; margin: 0; max-width: 710px; }
h1 span { color: var(--cyan); }
.intro-copy { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 2px; flex-shrink: 0; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.arena { position: relative; min-height: 350px; overflow: hidden; border: 1px solid #2c3a47; border-radius: 18px; background: radial-gradient(ellipse at center, #152a32 0%, #0d161f 70%); isolation: isolate; }
.arena::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1; opacity: .28; background-image: linear-gradient(#54758325 1px, transparent 1px), linear-gradient(90deg, #54758325 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse, black, transparent 80%); }
.arena::after { content: ""; position: absolute; width: 234px; height: 234px; border: 1px solid #8cbec010; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: -1; box-shadow: 0 0 0 42px #8cbec005, 0 0 0 43px #8cbec009; }
.arena-hud, .arena-footer { position: absolute; left: 23px; right: 23px; display: flex; align-items: center; justify-content: space-between; color: #8495a5; font-size: 9px; gap: 8px; }
.arena-hud { top: 22px; }
.arena-hud > span:first-child { display: flex; align-items: center; gap: 8px; }
.hud-dot { background: #8194a4; }
.arena-footer { bottom: 18px; font-size: 8px; letter-spacing: 2px; }
.corner-cross { font-size: 18px; font-weight: 300; color: #57717f; }
.arena-center { position: absolute; inset: 60px 20px; display: grid; place-items: center; }
.arena-hint { text-align: center; color: #c2d1db; font-size: clamp(17px, 2vw, 23px); font-weight: 500; letter-spacing: -.5px; max-width: 90%; line-height: 1.5; }
#target { width: 116px; height: 116px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid #c3fffb; background: var(--cyan); color: #103c40; cursor: pointer; box-shadow: 0 0 0 10px #66f5ed0c, 0 0 0 11px #66f5ed26, 0 0 65px #66f5ed35, inset 0 0 24px #d2fffa60; transition: none !important; animation: none !important; }
.target-core { font-weight: 250; font-size: 32px; line-height: 1; pointer-events: none; }
.arena[data-state="waiting"] .hud-dot { background: #f5c86e; }
.arena[data-state="active"] .hud-dot { background: var(--cyan); }
.arena[data-state="false-start"] { border-color: #85504b; }
.control-panel { padding: 23px; border: 1px solid var(--line); background: linear-gradient(140deg, #18202b, #111820); border-radius: 18px; display: flex; flex-direction: column; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-top .eyebrow { color: var(--muted); font-size: 9px; letter-spacing: 1.2px; margin: 0; }
.live-label { font-size: 8px; color: var(--cyan); border: 1px solid #66f5ed35; border-radius: 4px; padding: 4px 5px; }
.score-block { padding: 23px 0 18px; }
.stat-label { font-size: 12px; font-weight: 500; color: #bac6d2; margin: 0; }
.result { font-variant-numeric: tabular-nums; letter-spacing: -2px; font-size: clamp(35px, 4vw, 51px); font-weight: 650; margin: 8px 0; line-height: 1.1; overflow-wrap: anywhere; }
.result:empty::before { content: "—"; }
.score-caption { color: var(--muted); font-size: 10px; margin: 0; }
.best-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#best-value { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; font-weight: 600; text-align: right; }
.action-block { margin-top: auto; }
#status { color: #b9c8d5; font-size: 12px; line-height: 1.5; min-height: 36px; margin: 17px 0 12px; }
#status[data-tone="error"], #status[data-tone="warning"] { color: #ffb18f; }
#status[data-tone="success"] { color: var(--cyan); }
#start-button { width: 100%; min-height: 46px; border: 1px solid var(--cyan); background: var(--cyan); color: #092226; border-radius: 8px; font-size: 13px; font-weight: 750; cursor: pointer; transition: background-color 120ms ease, border-color 120ms ease; }
#start-button:hover:not(:disabled) { background: #a0fff8; border-color: #a0fff8; }
#start-button:disabled { cursor: default; color: #9cabb5; background: #25333c; border-color: #3b4b55; }
.keyboard-note { font-size: 10px; text-align: center; color: var(--muted); margin: 13px 0 0; }
kbd { font: inherit; border: 1px solid #43505d; border-radius: 3px; padding: 2px 4px; color: #bdcbd6; }
.storage-note { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 12px 0 0; }
.storage-note:empty { display: none; }
.instructions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 22px; padding: 25px 0 29px; }
.instruction { display: flex; align-items: flex-start; gap: 12px; }
.step-number { color: #7c8fa0; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; padding-top: 3px; }
.instruction p { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0; }
.instruction strong { display: block; color: #dce6ef; font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 19px 0 22px; color: #8493a3; font-size: 8px; letter-spacing: 1.3px; }
.site-footer span span { color: #56717c; margin: 0 7px; }

@media (min-width: 1100px) {
  .intro h1 { max-width: 620px; }
}
@media (max-width: 850px) {
  .shell { padding: 0 25px; }
  .intro { align-items: flex-start; flex-direction: column; gap: 13px; padding-top: 28px; }
  .intro-copy br { display: none; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 13px; }
  .control-panel { padding: 20px; }
  .instructions { gap: 15px; }
}
@media (max-width: 600px) {
  .shell { padding: 0 18px; }
  .site-header { min-height: 66px; }
  .wordmark { font-size: 20px; }
  .header-caption { font-size: 8px; letter-spacing: 1px; max-width: 112px; line-height: 1.7; }
  .intro { padding: 25px 0 23px; }
  h1 { font-size: clamp(35px, 9vw, 49px); letter-spacing: -1.8px; }
  .eyebrow { font-size: 9px; }
  .intro-copy { font-size: 12px; }
  .game-layout { grid-template-columns: 1fr; }
  .arena { min-height: 280px; }
  .control-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 18px; }
  .panel-top, .action-block, .storage-note { grid-column: 1 / -1; }
  .score-block { padding: 17px 0 12px; }
  .result { font-size: 40px; }
  .best-row { border: 0; border-left: 1px solid var(--line); align-self: center; padding: 10px 0 10px 18px; flex-direction: column; align-items: flex-start; gap: 11px; }
  #status { min-height: 18px; margin-top: 9px; }
  .instructions { grid-template-columns: 1fr; gap: 14px; padding: 23px 0; }
  .instruction strong { display: inline; margin-right: 8px; }
  .site-footer { font-size: 7px; letter-spacing: .7px; }
}
@media (max-height: 600px) and (min-width: 601px) {
  .shell { padding: 0 25px; }
  .site-header { min-height: 53px; }
  .intro { padding: 16px 0; flex-direction: row; align-items: flex-end; }
  .intro .eyebrow { margin-bottom: 7px; font-size: 8px; }
  h1 { font-size: 32px; letter-spacing: -1.4px; }
  .intro-copy { font-size: 10px; max-width: 175px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .arena { min-height: 270px; }
  .control-panel { padding: 14px 18px; }
  .score-block { padding: 12px 0; }
  .result { font-size: 36px; margin: 6px 0; }
  .best-row { padding: 9px 0; }
  #status { margin: 10px 0 8px; min-height: 18px; }
  #start-button { min-height: 40px; }
  .keyboard-note { margin-top: 10px; }
  .instructions { padding: 16px 0; }
  .site-footer { padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
