:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #ecf2ee;
  background: #0b1114;
  font-synthesis: none;
  --mint: #a4f4cb;
  --muted: #849296;
  --line: #243034;
  --purple: #c0a6ff;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 42% 39%, #15232266, transparent 62%); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button, a, .arena { touch-action: manipulation; }
button:focus-visible, a:focus-visible, .arena:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
button svg { display: block; width: 20px; height: 20px; }
[hidden] { display: none !important; }
.site-shell { max-width: 1160px; padding: 0 48px; margin: 0 auto; }
.site-header { height: 100px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #f0f4f1; font-size: 27px; font-weight: 750; letter-spacing: -1.4px; }
.brand img { width: 33px; height: 33px; }
.brand-light { font-weight: 400; }
.brand-period { color: var(--mint); }
.header-right { display: flex; align-items: center; gap: 25px; }
.edition, .eyebrow, .stat-label, .arena-topline, .arena-bottomline, .overlay-kicker, .direction-label, .collect-feedback, .tip-label, .site-footer > span:last-child { font-family: "Consolas", "Courier New", monospace; }
.edition { font-size: 10px; letter-spacing: 1.2px; color: var(--muted); }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; background: #141e22; color: #a6b4b8; border: 1px solid #2a383d; border-radius: 50%; transition: border-color .2s, color .2s; }
.icon-button:hover { border-color: var(--mint); color: var(--mint); }
.intro { display: flex; align-items: center; justify-content: space-between; padding: 43px 0 32px; }
.eyebrow { font-size: 10px; letter-spacing: 1.45px; font-weight: 500; color: var(--mint); margin: 0 0 17px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); margin-right: 8px; vertical-align: 1px; }
h1 { font-size: clamp(35px, 4.8vw, 53px); font-weight: 550; letter-spacing: -2.5px; line-height: 1.1; margin: 0; }
h1 > span { color: var(--mint); }
.intro-copy { font-size: 13px; color: #9aa7ab; margin: 17px 0 0; line-height: 1.6; }
.intro-note { font-family: "Segoe Print", "Comic Sans MS", cursive; font-size: 15px; color: #95a29b; line-height: 1.65; transform: rotate(-8deg); margin: 5px 49px 0 25px; }
.note-arrow { display: block; font-family: Georgia, serif; font-size: 47px; line-height: 1; color: var(--mint); margin: 0 0 8px -28px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 247px; align-items: start; gap: 43px; }
.game-card { min-width: 0; border: 1px solid #2b393e; border-radius: 18px; overflow: hidden; background: #10191de8; box-shadow: 0 20px 65px #00000020; }
.scoreboard { display: grid; grid-template-columns: 1fr 1fr .8fr; padding: 22px 29px 20px; border-bottom: 1px solid var(--line); background: #15202480; }
.score-cell { display: flex; flex-direction: column; gap: 7px; border-right: 1px solid #2b383d; }
.score-cell:nth-child(2) { padding-left: 28px; }
.score-cell:last-child { border-right: 0; align-items: flex-end; }
.stat-label { font-size: 9px; letter-spacing: 1.4px; color: #95a3a7; }
.score-cell strong { font-size: 31px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.score-cell:nth-child(2) strong { color: #bac6c3; }
.tiny-star { color: var(--mint); }
.multiplier-cell strong { color: var(--mint); }
.multiplier-cell strong span { font-size: 24px; }
.arena { position: relative; width: 100%; height: clamp(340px, 47vh, 440px); overflow: hidden; cursor: pointer; background: radial-gradient(circle at center, #1c2e2b44 0%, #10191d00 65%); isolation: isolate; user-select: none; -webkit-user-select: none; }
canvas { display: block; width: 100%; height: 100%; }
.arena-topline, .arena-bottomline { position: absolute; left: 24px; right: 24px; display: flex; align-items: center; justify-content: space-between; font-size: 9px; letter-spacing: 1px; color: #7e9596; pointer-events: none; }
.arena-topline { top: 14px; gap: 12px; }
.arena-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arena-actions { display: flex; align-items: center; flex-shrink: 0; gap: 8px; pointer-events: auto; }
.arena-topline .status-dot { width: 5px; height: 5px; margin-right: 7px; }
.arena-bottomline { bottom: 18px; font-size: 9px; }
.separator { margin: 0 7px; color: #52696b; }
.arena-button, .arena-actions .icon-button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid #35464a; background: #152226; color: #b8ccc6; pointer-events: auto; }
.arena-button:hover { color: var(--mint); border-color: #6c9b83; }
.arena-button svg { width: 18px; height: 18px; }
.game-overlay, .orbit-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 255px; text-align: center; display: flex; align-items: center; flex-direction: column; }
.game-overlay { pointer-events: none; }
.overlay-kicker { font-size: 8px; letter-spacing: 1.7px; color: var(--mint); margin-bottom: 12px; }
.game-overlay h2 { font-size: 30px; line-height: 1.12; font-weight: 550; letter-spacing: -1px; margin: 0; }
.game-overlay p { font-size: 12px; line-height: 1.7; color: #96a8a9; margin: 12px 0 19px; white-space: pre-line; }
.primary-button { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 12px 20px; border: 0; border-radius: 8px; background: var(--mint); color: #102920; font-size: 12px; font-weight: 700; box-shadow: 0 4px 20px #a4f4cb12; transition: background .15s, transform .15s; }
.primary-button:hover { background: #c2ffe0; transform: translateY(-1px); }
.primary-button:active { transform: translateY(1px); }
.primary-button span { font-size: 20px; line-height: 1; font-weight: 400; }
.overlay-hint { font-size: 9px; color: #7e9293; margin-top: 13px; }
kbd { display: inline-block; font-family: "Consolas", monospace; font-size: 10px; border: 1px solid #3a4a4e; border-bottom-width: 2px; border-radius: 4px; padding: 3px 8px; color: #b4c0c0; background: #19252a; line-height: 1.1; }
.overlay-hint kbd { font-size: 9px; padding: 2px 5px; margin-left: 3px; }
.orbit-center { pointer-events: none; gap: 14px; }
.direction-arrow { color: #a4f4cb55; font-size: 58px; line-height: 1; }
.direction-label { font-size: 9px; letter-spacing: 2px; color: #9ab7ab; }
.collect-feedback { font-size: 9px; letter-spacing: 1.1px; color: var(--purple); min-height: 13px; }
.game-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 63px; padding: 12px 24px; border-top: 1px solid var(--line); background: #15202480; }
.control-help { display: flex; gap: 9px; align-items: center; color: #9aa9aa; font-size: 10px; }
.flip-button { display: inline-flex; align-items: center; gap: 9px; padding: 9px 12px; color: #bfd0ca; font-size: 11px; background: #1c2b2d; border: 1px solid #344846; border-radius: 6px; }
.flip-button:hover { color: var(--mint); border-color: #6c9b83; }
.flip-button > span { color: var(--mint); font-size: 17px; line-height: 1; }
.sidebar { padding-top: 15px; }
.sidebar .eyebrow { color: #87999b; font-size: 9px; margin-bottom: 16px; }
.how-to > h2 { font-size: 27px; line-height: 1.25; font-weight: 500; letter-spacing: -.8px; margin: 0 0 28px; }
.rules { display: flex; flex-direction: column; gap: 26px; padding: 0; margin: 0; list-style: none; }
.rules li { display: flex; gap: 16px; align-items: flex-start; }
.rule-icon { display: block; flex: 0 0 20px; margin-top: 3px; }
.ball-icon { height: 12px; max-width: 12px; margin: 5px 4px 0; background: var(--mint); border: 3px solid #e3fbee; border-radius: 50%; box-shadow: 0 0 12px #a4f4cb35; }
.spark-icon { font-size: 27px; line-height: 21px; color: var(--purple); }
.hazard-icon { height: 18px; border: 3px solid #ee8e85; border-bottom: none; border-right-color: transparent; border-radius: 50%; transform: rotate(35deg); }
.rules h3 { font-size: 12px; font-weight: 600; margin: 0 0 6px; color: #d9e2df; }
.rules p { font-size: 11px; line-height: 1.85; color: #8e9fa2; margin: 0; }
.tip-card { border: 1px solid #34443f; background: linear-gradient(125deg, #21362b80, #16232180); border-radius: 11px; padding: 18px; margin-top: 31px; }
.tip-label { color: var(--mint); font-size: 9px; letter-spacing: 1px; }
.tip-label > span { margin-right: 7px; font-size: 15px; }
.tip-card p { font-size: 15px; line-height: 1.65; letter-spacing: -.15px; color: #d8e8dc; margin: 12px 0 10px; }
.tip-footnote { font-size: 10px; color: #8ea298; }
.pause-help { font-size: 9px; color: #889a9c; margin-top: 20px; }
.pause-help kbd { font-size: 9px; padding: 3px 5px; margin-right: 5px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 27px 0 25px; margin-top: 20px; color: #7c8c90; font-size: 10px; }
.footer-accent { color: #becfc5; }
.site-footer > span:last-child { font-size: 8px; letter-spacing: .8px; }
.footer-dot { padding: 0 10px; color: #51646a; }
.storage-note { color: #f0b6a1; font-size: 12px; line-height: 1.5; padding: 12px 0; margin: 0; }
.game-card > .storage-note { padding: 12px 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (min-width: 1400px) {
  .site-shell { padding: 0 28px; }
  .intro { padding-top: 49px; padding-bottom: 36px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 265px; gap: 55px; }
}
@media (max-width: 900px) {
  .site-shell { padding: 0 28px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 25px; }
  .scoreboard { padding: 19px 20px; }
  .score-cell:nth-child(2) { padding-left: 18px; }
  .stat-label { font-size: 8px; letter-spacing: .5px; }
  .game-overlay { width: 210px; }
  .game-overlay h2 { font-size: 25px; }
  .game-overlay p { margin: 9px 0 14px; font-size: 11px; }
  .overlay-kicker { margin-bottom: 9px; font-size: 7px; }
  .overlay-hint { margin-top: 8px; }
  .game-controls { padding: 12px 16px; }
  .control-help { gap: 6px; }
  .control-help > span { max-width: 85px; line-height: 1.5; }
  .intro-note { margin-right: 15px; font-size: 13px; }
}
@media (max-width: 720px) {
  .site-shell { max-width: 620px; padding: 0 20px; }
  .site-header { height: 76px; }
  .edition { font-size: 8px; letter-spacing: .7px; }
  .header-right { gap: 14px; }
  .intro { padding: 29px 0 26px; }
  .intro .eyebrow { font-size: 8px; letter-spacing: .9px; margin-bottom: 15px; }
  h1 { font-size: 42px; letter-spacing: -2px; }
  .intro-copy { font-size: 12px; max-width: 320px; margin-top: 13px; }
  .intro-note { display: none; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .arena { height: auto; aspect-ratio: 600 / 520; }
  .sidebar { padding-top: 0; }
  .how-to > h2 { font-size: 23px; margin-bottom: 23px; }
  .how-to > h2 br { display: none; }
  .rules { gap: 20px; }
  .rules h3 { font-size: 13px; }
  .rules p { font-size: 12px; }
  .rules p br { display: none; }
  .tip-card { margin-top: 24px; }
  .tip-card p br { display: none; }
  .site-footer { flex-direction: column; align-items: flex-start; border-top: 1px solid var(--line); gap: 12px; padding-top: 22px; }
  .control-help > span { max-width: none; }
  .game-overlay { width: 220px; }
}
@media (max-width: 390px) {
  .site-shell { padding: 0 13px; }
  .edition { display: none; }
  h1 { font-size: 36px; }
  .game-overlay h2 { font-size: 22px; }
  .game-overlay p { font-size: 10px; margin: 8px 0 11px; }
  .overlay-kicker { font-size: 6px; margin-bottom: 8px; }
  .primary-button { padding: 10px 16px; font-size: 11px; }
  .overlay-hint { margin-top: 7px; }
  .arena-topline, .arena-bottomline { left: 16px; right: 16px; font-size: 7px; }
  .arena-topline { top: 10px; }
  .arena-bottomline { bottom: 13px; }
  .scoreboard { padding: 17px 16px; }
  .score-cell strong { font-size: 27px; }
  .score-cell:nth-child(2) { padding-left: 15px; }
  .stat-label { font-size: 7px; }
  .game-controls { padding: 10px 12px; }
  .control-help { font-size: 9px; gap: 5px; }
  .control-help kbd { padding: 3px 5px; font-size: 9px; }
  .flip-button { padding: 8px; font-size: 10px; gap: 5px; }
}
.game-expanded { overflow: hidden; }
.game-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border: 0;
  border-radius: 0;
  background: #10191d;
}
.game-card.is-fullscreen::backdrop { background: #10191d; }
.is-fullscreen .scoreboard, .is-fullscreen .game-controls, .is-fullscreen .storage-note { flex-shrink: 0; }
.is-fullscreen .arena { flex: 1; min-height: 0; height: auto; aspect-ratio: auto; }
.is-fullscreen canvas { position: absolute; inset: 0; }
.is-fullscreen .arena-topline { top: 16px; }
.is-fullscreen .arena-button, .is-fullscreen .arena-actions .icon-button { width: 44px; height: 44px; }
@media (max-height: 500px) {
  .is-fullscreen .scoreboard { padding-top: 9px; padding-bottom: 9px; }
  .is-fullscreen .score-cell { gap: 4px; }
  .is-fullscreen .score-cell strong { font-size: 23px; }
  .is-fullscreen .game-controls { min-height: 48px; padding-top: 5px; padding-bottom: 5px; }
  .is-fullscreen .game-overlay h2 { font-size: 22px; }
  .is-fullscreen .game-overlay p { margin: 7px 0 10px; font-size: 10px; }
  .is-fullscreen .overlay-kicker { margin-bottom: 7px; }
  .is-fullscreen .overlay-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
