:root {
  --bg: #0f1115; --card: #181b22; --line: #262b36; --text: #e7eaf0;
  --muted: #8b93a3; --brand: #4a8cff; --go: #2ecc71; --stop: #e74c3c; --gold: #f5c451;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text); padding: 1.2rem; max-width: 1100px; margin: 0 auto;
}
header h1 { margin: 0 0 0.3rem; font-size: 1.6rem; }
.sub { color: var(--muted); margin: 0 0 1rem; max-width: 60ch; line-height: 1.5; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 0.6rem; }
.muted { color: var(--muted); } .small { font-size: 0.8rem; }

.bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; }
.bar-right { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; overflow: hidden; }
.seg button { background: transparent; color: var(--muted); border: none; padding: 0.5rem 0.9rem; cursor: pointer; font: inherit; }
.seg button.on { background: var(--brand); color: #fff; }
.chk { color: var(--muted); font-size: 0.85rem; display: inline-flex; gap: 0.35rem; align-items: center; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 0.5rem; padding: 0.5rem 0.8rem; cursor: pointer; font: inherit; }
.ghost.danger { border-color: var(--stop); color: var(--stop); }

.brief-box { background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.9rem 1.1rem; margin-top: 0.8rem; white-space: pre-wrap; font-size: 0.85rem; line-height: 1.5; color: #cdd3df; }

.arena { margin-top: 1rem; }
.vs-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
#round { font-weight: 700; font-size: 1.05rem; }
.ring { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.corner { background: var(--card); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.9rem; display: flex; flex-direction: column; }
.corner-tag { font-weight: 700; color: var(--muted); margin-bottom: 0.5rem; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase; }
.corner-tag.revealed { color: var(--gold); }
.sample { white-space: pre-wrap; font: inherit; font-size: 0.92rem; line-height: 1.55; background: var(--bg); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.9rem; flex: 1; min-height: 14rem; overflow: auto; margin: 0 0 0.8rem; }
.pick { background: var(--go); color: #06210f; border: none; border-radius: 0.6rem; padding: 0.8rem; font-weight: 700; font-size: 1rem; cursor: pointer; }
.pick:hover { filter: brightness(1.08); }
.mid { display: flex; gap: 0.6rem; justify-content: center; margin-top: 0.8rem; }

.board table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; overflow: hidden; }
.board td, .board th { padding: 0.55rem 0.8rem; border-top: 1px solid var(--line); text-align: left; font-size: 0.9rem; }
.board tr:first-child td { border-top: none; }
.rank { color: var(--muted); width: 2rem; }
.elo { font-weight: 700; text-align: right; }
.wl { color: var(--muted); text-align: right; font-size: 0.82rem; }
.bar-fill { height: 0.4rem; background: var(--brand); border-radius: 999px; }
.lead { color: var(--gold); }

@media (max-width: 720px) {
  .ring { grid-template-columns: 1fr; }
  .sample { min-height: 10rem; }
}
