:root {
  --bg: #0f1216; --panel: #171b21; --panel-2: #1e232b; --line: #2a303a;
  --text: #e8ebef; --muted: #8b95a3; --accent: #e4b04a; --discord: #5865f2; --danger: #e5675c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }
.muted { color: var(--muted); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.brand-mark { font-weight: 800; letter-spacing: 0.06em; color: var(--accent); font-size: 1.2em; }
.brand-sub { color: var(--muted); font-size: 0.9em; }
nav { display: flex; align-items: center; gap: 16px; }
nav form { margin: 0; }
.date { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9em; }
.me { display: flex; align-items: center; gap: 8px; }
.me img, .gms img, .chip img, img.inline { border-radius: 50%; vertical-align: middle; }

.btn { display: inline-block; background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.discord { background: var(--discord); border-color: var(--discord); color: #fff; font-weight: 600; }
.btn.big { padding: 10px 18px; margin-top: 8px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; }
.hero h1 { margin: 4px 0; font-size: 1.8em; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75em; color: var(--accent); font-weight: 700; }
.page-title { margin: 0 0 4px; }
.section { margin: 32px 0 12px; font-size: 1.1em; }
.notice { background: var(--panel-2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.grid h3 { margin: 0 0 8px; font-size: 0.95em; color: var(--muted); }
.teams { list-style: none; margin: 0; padding: 0; }
.teams li { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 8px;
  padding: 6px 0; border-top: 1px solid var(--line); }
.teams li:first-child { border-top: 0; }
.teams li.mine .tname { color: var(--accent); font-weight: 600; }
.abbr { font-weight: 700; font-size: 0.8em; color: var(--muted); letter-spacing: 0.04em; }
.gms { display: flex; gap: 4px; }
.open { font-size: 0.8em; color: var(--muted); font-style: italic; }

table.assign { width: 100%; border-collapse: collapse; }
.assign th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8em; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.assign td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.assign tr:last-child td { border-bottom: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 4px 2px 4px; margin: 2px 4px 2px 0; }
.chip em { color: var(--muted); font-size: 0.85em; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1em; line-height: 1; padding: 0 6px; }
.chip button:hover { color: var(--danger); }
.add { display: flex; gap: 6px; flex-wrap: wrap; }
.add select, .add input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 8px; font: inherit; }
.add input { width: 150px; }
.tag { background: var(--accent); color: #1a1a1a; border-radius: 4px; padding: 1px 6px; font-size: 0.75em; font-weight: 700; }
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { padding: 4px 0; }
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; padding: 10px 14px; }
  main { padding: 14px; }
  .assign thead { display: none; }
  .assign td { display: block; border: 0; padding: 4px 0; }
  .assign tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
}

.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.small { font-size: 0.85em; }
.btn.small { padding: 3px 10px; font-size: 0.85em; }
.tracker td.status { width: 28px; text-align: center; }
.tracker tr.mine td { background: rgba(228, 176, 74, 0.06); }
.tracker tr.waiting td:nth-child(2) { color: var(--text); }
.card h3 { margin: 0 0 10px; font-size: 1em; }
.progress { height: 8px; background: var(--panel-2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
code.secret { filter: blur(4px); transition: filter 0.15s; cursor: pointer; }
code.secret:hover { filter: none; }
