:root {
  --bg: #14110f;
  --panel: #221d19;
  --ink: #f6efe6;
  --muted: #a89c8f;
  --accent: #ff5a36;
  --accent-2: #3ad29f;
  --line: #3a322b;
  --radius: 18px;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { overscroll-behavior: none; }
#app {
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 0; line-height: 1; }
h1 span { color: var(--accent); }
h2 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; color: var(--muted); line-height: 1.4; }

.games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-card {
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 18px 14px; text-align: left; color: var(--ink); font: inherit; cursor: pointer;
}
.game-card[aria-pressed='true'] { border-color: var(--accent); }
.game-card .emoji { font-size: 40px; display: block; }
.game-card b { display: block; font-size: 19px; margin-top: 8px; }
.game-card small { color: var(--muted); }

.names { display: flex; flex-direction: column; gap: 8px; }
input {
  font: inherit; font-size: 18px; color: var(--ink); background: var(--panel);
  border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
}
input:focus { outline: none; border-color: var(--accent); }

.btn {
  font: inherit; font-weight: 800; font-size: 19px; border: 0; border-radius: 999px;
  padding: 16px 20px; background: var(--accent); color: #1a0d08; cursor: pointer; width: 100%;
}
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn:disabled { opacity: 0.4; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill { background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); }
.pill.turn { background: var(--accent); color: #1a0d08; font-weight: 800; }

.stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.stage canvas { width: 100%; border-radius: var(--radius); touch-action: none; display: block; background: #0d0b0a; }
.hint { text-align: center; font-size: 14px; color: var(--muted); }

.scores { display: grid; gap: 6px; }
.score-row { display: flex; justify-content: space-between; background: var(--panel); border-radius: 12px; padding: 10px 14px; }
.score-row.me { outline: 2px solid var(--accent); }

.center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; text-align: center; }
.big { font-size: 64px; line-height: 1; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 800;
}
