:root {
  --bg: #0f1420; --panel: #1a2233; --panel2: #212b40; --line: #2e3a55;
  --ink: #e8edf6; --ink-soft: #9fb0c9; --ink-mute: #64748e;
  --accent: #4cc9f0; --accent2: #ffb02e; --good: #34d399; --bad: #f87171;
  --radius: 14px; --font: "Pretendard Variable", Pretendard, "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
header.site { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
header.site h1 { font-size: 1.5rem; letter-spacing: 0.02em; }
header.site h1 .flag { color: var(--accent2); }
header.site .sub { color: var(--ink-soft); font-size: 0.9rem; }
nav.crumbs { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.grid { display: grid; gap: 14px; }
.grid.runs { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.run-card h3 { margin-bottom: 6px; }
.run-card .meta { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 12px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; border: 1px solid var(--line); color: var(--ink-soft); }
.badge.voting { border-color: var(--good); color: var(--good); }
.badge.closed { border-color: var(--ink-mute); }
.btn { display: inline-block; background: var(--accent); color: #08243a; font-weight: 700; border: none; border-radius: 10px; padding: 10px 18px; cursor: pointer; font-size: 0.95rem; font-family: inherit; }
.btn.alt { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.4; cursor: default; }
table.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.board th, table.board td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.board th { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
table.board tr.top td { color: var(--accent2); font-weight: 700; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
@media (max-width: 800px) { .duel { grid-template-columns: 1fr; } }
.duel .side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.duel .side h4 { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--accent); font-size: 1rem; }
.duel iframe { width: 100%; height: 520px; border: 0; background: #fff; }
.duel pre.text { padding: 14px; white-space: pre-wrap; font-family: inherit; font-size: 0.9rem; line-height: 1.65; color: var(--ink); max-height: 520px; overflow-y: auto; }
.duel .side h4 { display: flex; justify-content: space-between; align-items: center; }
.open-new { font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.md-body { padding: 16px 20px; max-height: 520px; overflow-y: auto; background: #f7fafd; color: #1a2433; font-size: 0.9rem; line-height: 1.7; }
.md-body h2 { font-size: 1.15rem; margin: 14px 0 8px; }
.md-body h3 { font-size: 1.02rem; margin: 12px 0 6px; }
.md-body h4, .md-body h5 { font-size: 0.94rem; margin: 10px 0 5px; }
.md-body p { margin: 6px 0; }
.md-body ul, .md-body ol { margin: 6px 0 6px 22px; }
.md-body table { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: 0.85rem; }
.md-body th, .md-body td { border: 1px solid #d8e2ee; padding: 6px 9px; text-align: left; }
.md-body th { background: #e9f1f8; }
.md-body blockquote { border-left: 4px solid #4cc9f0; background: #eef6fb; padding: 8px 14px; margin: 10px 0; border-radius: 0 8px 8px 0; }
.md-body code { background: #e8eef6; border-radius: 4px; padding: 1px 5px; font-family: ui-monospace, monospace; font-size: 0.85em; }
.md-body pre.code { background: #eef2f8; padding: 10px 14px; border-radius: 8px; overflow-x: auto; font-family: ui-monospace, monospace; font-size: 0.82rem; }
.md-body hr { border: 0; border-top: 1px solid #d8e2ee; margin: 14px 0; }
.namegate #nameform { display: flex; gap: 10px; flex-wrap: wrap; }
.namegate input { flex: 1; min-width: 200px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--ink); font-size: 1rem; font-family: inherit; }
.donescreen { text-align: center; padding: 40px 24px; }
.donescreen .btn { margin: 4px 6px; }
.votebar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 10px 0 30px; }
.notice { color: var(--ink-soft); font-size: 0.85rem; line-height: 1.6; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 20px; }
.spacer { height: 22px; }
h2.sec { font-size: 1.1rem; margin: 26px 0 12px; color: var(--ink-soft); }
