:root {
  --bg: #0f1115; --fg: #e8e6e3; --muted: #9aa0a6; --accent: #f5b83d;
  --light: #e9dcc3; --dark: #a67d5d; --good: #4caf50; --bad: #e5534b; --line: #2a2f3a;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
#app { max-width: 560px; margin: 0 auto; padding: 16px; }

.home { text-align: center; padding-top: 10vh; }
.brand { font-size: 1.4rem; margin: 0; }
.tagline { color: var(--muted); margin: .25rem 0 2.5rem; }
.depth { display: flex; flex-direction: column; align-items: center; }
.depth-num { font-size: 6rem; font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.depth-label { text-transform: uppercase; letter-spacing: .2em; color: var(--muted); font-size: .8rem; }
.aid { color: var(--muted); margin: .5rem 0 2rem; }
.note { color: var(--muted); font-size: .8rem; margin-top: 2.5rem; }

.btn {
  appearance: none; border: 1px solid var(--line); background: #1b1f27; color: var(--fg);
  padding: .8rem 1.4rem; border-radius: 10px; font-size: 1rem; cursor: pointer;
  text-decoration: none; display: inline-block; min-width: 6rem; text-align: center;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1a1a; font-weight: 700; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 12px; }
.back { color: var(--fg); text-decoration: none; font-weight: 700; }
.level { color: var(--muted); font-size: .9rem; }
.pace { background: #1b1f27; color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: .2rem .3rem; }

.board { width: 100%; aspect-ratio: 1; display: block; border-radius: 6px; user-select: none; touch-action: manipulation; }
.sq.light { fill: var(--light); }
.sq.dark { fill: var(--dark); }
.sq.pick { cursor: pointer; }
.sq.good { fill: var(--good); }
.sq.bad { fill: var(--bad); }
.pc { font-size: 90px; pointer-events: none; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif; }
.pc.w { fill: #fff; stroke: #111; stroke-width: 7px; paint-order: stroke; stroke-linejoin: round; }
.pc.b { fill: #111; stroke: #111; stroke-width: 2px; }
.pc.ghost { opacity: .4; }
.coord { font-size: 22px; fill: rgba(0, 0, 0, .55); pointer-events: none; }

.moves { display: flex; flex-wrap: wrap; gap: .4rem 1rem; list-style: none; padding: 0; margin: 12px 0; min-height: 1.5rem; font-variant-numeric: tabular-nums; }
.moves li:last-child { color: var(--accent); font-weight: 700; }
.prompt { min-height: 1.5rem; font-size: 1.1rem; }
.prompt.ok { color: var(--good); }
.prompt.ko { color: var(--bad); }
.actions { display: flex; gap: .75rem; }
