:root { --bg: #0b0c0f; --card: #15171c; --line: rgba(255, 255, 255, 0.1); --fg: #eef0f3; --fg2: #a8aeb8; --cyan: #00d4ff; --gold: #f5c542;
  --light: #c9b48a; --dark: #8a6f4a; --mark: rgba(0, 212, 255, 0.45); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 12px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: 18px; }
h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg2); }
main { display: grid; gap: 20px; padding: 16px max(16px, env(safe-area-inset-left)); grid-template-columns: minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }
@media (min-width: 900px) { main { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); } }
.dim { color: var(--fg2); }
.small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
button, select, input { font: inherit; color: var(--fg); background: #22252c; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; }
button { cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
button.link { background: none; border: 0; padding: 0; color: var(--cyan); text-decoration: underline; }
input { flex: 1 1 14em; min-width: 0; }
.pick select { margin-left: 6px; }
#board { display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; max-width: 560px; aspect-ratio: 1; border-radius: 6px; overflow: hidden; user-select: none; }
#board button { all: unset; display: grid; place-items: center; aspect-ratio: 1; font-size: clamp(22px, 6.5vw, 50px); line-height: 1; cursor: pointer; position: relative; }
#board .l { background: var(--light); }
#board .d { background: var(--dark); }
#board .sel { box-shadow: inset 0 0 0 4px var(--cyan); }
#board .last { box-shadow: inset 0 0 0 999px rgba(245, 197, 66, 0.28); }
#board .to::after { content: ""; width: 26%; height: 26%; border-radius: 50%; background: var(--mark); position: absolute; }
#board .w { color: #fff; text-shadow: 0 0 2px #000, 0 0 1px #000; }
#board .b { color: #111; text-shadow: 0 0 1px rgba(255, 255, 255, 0.35); }
#board .coord { position: absolute; left: 3px; top: 1px; font-size: 10px; color: rgba(0, 0, 0, 0.45); }
#status { margin: 10px 0 0; font-weight: 600; }
.panel { display: grid; gap: 14px; align-content: start; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.big { margin: 0; font-size: 34px; font-weight: 700; }
svg { width: 100%; display: block; background: rgba(255, 255, 255, 0.02); border-radius: 6px; }
#levels { height: 60px; margin-top: 8px; }
#chart { height: 140px; }
.legend { margin: 6px 0 0; font-size: 13px; }
.legend .you::before, .legend .coach::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; }
.legend .you::before { background: var(--cyan); }
.legend .coach { margin-left: 14px; }
.legend .coach::before { background: var(--gold); }
#verdict { margin: 8px 0 0; font-weight: 600; }
.card table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.card th, .card td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.card th { color: var(--fg2); font-weight: 600; }
.card:has(table) { overflow-x: auto; }
.bad { color: #ff8a80; } .meh { color: var(--gold); } .good { color: #7ee2a8; }
code { font-size: 12px; }
