:root {
  --bg: #1a1a2e; --ink: #eee6ff; --muted: #9b9db8; --accent: #4c9cff; --cyan: #64e0ff;
  --card: rgba(22, 33, 62, 0.92);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: "Segoe UI", "Avenir Next", Futura, system-ui, sans-serif; user-select: none; touch-action: none; }

#game { display: block; width: 100%; height: 100%; cursor: none; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#hud-left { position: absolute; top: 18px; left: 20px; }
#brand { font-weight: 800; letter-spacing: 0.28em; font-size: 13px; color: var(--accent); text-shadow: 0 0 8px var(--accent); }
#table-name { margin-top: 4px; font-size: 10px; letter-spacing: 0.18em; color: var(--muted); }
#coverage { margin-top: 6px; font-size: 18px; font-variant-numeric: tabular-nums; font-weight: 800; }

#hud-center { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); text-align: center; }
#clock { font-weight: 800; letter-spacing: 0.12em; font-size: 22px; text-shadow: 0 2px 12px #000; }
#toast { min-height: 1.2em; font-weight: 700; text-shadow: 0 2px 12px #000; color: var(--cyan); }

#board { position: absolute; top: 16px; right: 16px; width: 228px; padding: 12px 14px 12px; background: var(--card); border: 1px solid rgba(76,156,255,0.3); border-radius: 12px; backdrop-filter: blur(8px); }
.board-title { font-size: 10px; letter-spacing: 0.22em; color: var(--muted); margin-bottom: 8px; }
.kit-title { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); }
#board-list { list-style: none; font-size: 13px; }
#board-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
#board-list .you { font-weight: 700; color: var(--cyan); }
.swatch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; box-shadow: 0 0 4px rgba(0,0,0,0.5); }
#kit { list-style: none; font-size: 11px; color: var(--muted); line-height: 1.45; }
#kit li { padding: 1px 0; }
#kit b { display: inline-block; width: 16px; text-align: center; margin-right: 4px; font-size: 10px; }
#kit .m { color: #ffd700; }
#kit .s { color: #00ff7f; }
#kit .h { color: #40e0ff; }
#kit .p { color: #ff4500; }
#kit .g { color: #ff1493; }
.kit-note { margin-top: 8px; font-size: 10px; color: var(--muted); letter-spacing: 0.04em; line-height: 1.35; }

.modes { display: flex; gap: 6px; margin: 8px 0 18px; }
.modes button {
  flex: 1; width: auto; padding: 10px 0; border: 1px solid rgba(76,156,255,0.35);
  border-radius: 10px; background: rgba(22,33,62,0.7); color: #eee6ff;
  font-weight: 800; letter-spacing: 0.08em; font-size: 14px; box-shadow: none;
}
.modes button:hover { transform: none; box-shadow: none; filter: brightness(1.12); }
.modes button.on {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #1a1a2e; border-color: transparent;
}

#inkbar-wrap { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2; pointer-events: none; text-align: center; }
#hint { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }

#splash, #over { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: radial-gradient(600px 400px at 50% 50%, rgba(76,156,255,0.15), transparent 60%), var(--bg); }
#splash.hidden, #over.hidden { display: none; }

.splash-card { width: min(420px, 90vw); padding: 36px 32px 28px; background: var(--card); border: 1px solid rgba(76,156,255,0.4); border-radius: 20px; text-align: center; pointer-events: auto; backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0,0,0,0.3); }

.kicker { letter-spacing: 0.32em; font-size: 11px; color: var(--accent); margin-bottom: 10px; text-shadow: 0 0 8px var(--accent); }
h1 { font-size: 44px; letter-spacing: 0.12em; line-height: 1; margin-bottom: 10px; background: linear-gradient(135deg, var(--accent), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tag { color: var(--muted); margin-bottom: 22px; }

label { display: block; text-align: left; font-size: 11px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
input { width: 100%; margin: 8px 0 18px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(76,156,255,0.3); background: rgba(22,33,62,0.6); color: white; font-size: 16px; outline: none; transition: border-color 0.2s; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(76,156,255,0.2); }

button { width: 100%; padding: 14px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--cyan)); color: #1a1a2e; font-weight: 800; letter-spacing: 0.22em; cursor: pointer; font-size: 15px; transition: transform 0.1s, box-shadow 0.2s; }
button:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(76,156,255,0.3); }
button:active { transform: translateY(0); }

.fine { margin-top: 14px; font-size: 11px; color: var(--muted); }