@font-face { font-family: 'Chakra Petch'; font-weight: 500; font-display: swap; src: url('../fonts/chakra-petch-500.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; font-display: swap; src: url('../fonts/chakra-petch-700.woff2') format('woff2'); }
:root {
--bg: #060a18; --ink: #e9f5ff; --muted: #8ea3cc; --line: #2de2e6; --accent: #ff4fd8; --gold: #ffd166;
--card: rgba(8, 12, 30, 0.86);
--display: 'Chakra Petch', system-ui, sans-serif;
--body: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--body); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { touch-action: none; user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; width: 100%; height: 100%; }
.hud { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 16px; right: 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; pointer-events: none; font-family: var(--display); }
.hud .score { font-size: clamp(40px, 12vw, 64px); font-weight: 700; line-height: 1; text-shadow: 0 0 18px rgba(255,255,255,.45), 0 2px 8px rgba(0,0,0,.5); text-align: center; font-variant-numeric: tabular-nums; }
.hud .side { font-size: 13px; color: var(--muted); letter-spacing: .06em; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.hud .side.r { text-align: right; }
.hud .side b { color: var(--ink); }
.tip { position: fixed; left: 0; right: 0; top: 22%; text-align: center; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 6vw, 34px); letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .18s, transform .18s; pointer-events: none; text-shadow: 0 0 16px currentColor; }
.tip.on { opacity: 1; transform: none; }
.panel { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(4,6,18,.35), rgba(4,6,18,.75)); overflow-y: auto; }
.card { position: relative; width: min(420px, 100%); background: var(--card); border: 1px solid rgba(142,163,204,.22); padding: 26px 22px 20px; text-align: center; display: grid; gap: 14px; backdrop-filter: blur(6px); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
.eyebrow { font-family: var(--display); font-size: 12px; letter-spacing: .24em; color: var(--line); text-transform: uppercase; }
h1 { margin: 0; font-family: var(--display); font-size: clamp(34px, 10vw, 46px); letter-spacing: .04em; line-height: 1.05; text-shadow: 0 0 22px rgba(45,226,230,.55); }
h2, .h2 { margin: 0; font-size: 20px; font-weight: 700; }
p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.lead { font-size: 14px; color: #c7d6f0; }
.bestline { font-family: var(--display); font-size: 14px; color: var(--muted); letter-spacing: .08em; }
.bestline b { color: var(--gold); font-size: 18px; }
.btn { appearance: none; border: 0; cursor: pointer; font: 700 17px var(--display); letter-spacing: .08em; padding: 14px 18px; background: var(--line); color: #04121a; text-decoration: none; display: block; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.btn:hover { filter: brightness(1.1); }
.btn.alt { background: var(--accent); color: #1a0416; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid rgba(142,163,204,.35); clip-path: none; font-size: 15px; padding: 11px 14px; }
.row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.label { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.seg { display: inline-flex; border: 1px solid rgba(142,163,204,.35); }
.seg button { appearance: none; background: transparent; color: var(--muted); border: 0; padding: 7px 14px; font: 500 13px var(--body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(45,226,230,.2); color: var(--ink); }
.link { appearance: none; background: none; border: 0; color: var(--muted); font: 500 12px var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px; }
.langbtn { position: absolute; top: 12px; right: 12px; border: 1px solid rgba(142,163,204,.35); color: var(--ink); font: 600 12px var(--body); padding: 5px 10px; text-decoration: none; line-height: 1.4; }
.backlink { position: absolute; top: 12px; left: 12px; color: var(--muted); font: 600 12px var(--body); padding: 5px 4px; text-decoration: none; line-height: 1.4; }
.backlink:hover, .langbtn:hover { color: var(--line); border-color: var(--line); }
#menu .card > .eyebrow { margin-top: 24px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { border: 1px solid rgba(142,163,204,.2); padding: 12px 6px; display: grid; gap: 2px; }
.stats strong { font: 700 30px var(--display); color: var(--line); font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.more { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 12px; }
.more a { color: var(--muted); }
.more a:hover { color: var(--line); }
.about { text-align: left; max-height: calc(100% - 32px); overflow-y: auto; }
.about h2 { font-size: 20px; }
.about h3 { margin: 6px 0 0; font-size: 15px; color: var(--line); }
.about ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.about b { color: var(--ink); }
.about a { color: var(--line); }
.btn:focus-visible, .seg button:focus-visible, .link:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }