:root {
  --bg: #0d1117;
  --panel: #151b23;
  --panel-2: #1c2430;
  --line: #2a3441;
  --text: #e6edf3;
  --muted: #8b98a8;
  --accent: #f5b83d;     /* gold: the gavel */
  --accent-ink: #1a1203;
  --good: #3fb97a;
  --warn: #e5a03a;
  --bad: #f06a5f;
  --video: #7aa7ff;
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 var(--sans); }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); }

header.top {
  display: flex; align-items: center; gap: 18px; padding: 10px 18px;
  border-bottom: 1px solid var(--line); background: #0a0e13; position: sticky; top: 0; z-index: 10;
}
header.top .brand { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
header.top .brand b { color: var(--accent); }
header.top nav { display: flex; gap: 4px; }
header.top nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; font-weight: 600; }
header.top nav a.on, header.top nav a:hover { color: var(--text); background: var(--panel-2); }
header.top .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.live .dot { background: var(--good); box-shadow: 0 0 0 3px rgba(63,185,122,.2); }
.pill.down .dot { background: var(--bad); }
.pill.phase { color: var(--accent); }

main { padding: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel h2 .right { margin-left: auto; }

.btn { border: 1px solid var(--line); background: var(--panel-2); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn:hover { border-color: #3b4757; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--bad); }
.btn.good { color: var(--good); }
.btn.small { padding: 4px 8px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input.field, select.field { background: #0a0e13; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
input.field:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.muted { color: var(--muted); }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--panel-2); color: var(--muted); letter-spacing: .03em; }
.tag.QB { color: #ff8fa3; } .tag.RB { color: #6fe3b0; } .tag.WR { color: #7cc3ff; } .tag.TE { color: #ffb86b; } .tag.K { color: #c9a7ff; } .tag.DEF { color: #b8c2cc; }
.tag.rfa { background: rgba(245,184,61,.15); color: var(--accent); }
.tag.video { background: rgba(122,167,255,.15); color: var(--video); }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.toast.err { border-color: var(--bad); color: var(--bad); }

/* ---- login */
.login { max-width: 420px; margin: 12vh auto; }
.login h1 { font-size: 22px; margin: 0 0 6px; }

/* ---- draft console */
.draft-grid { display: grid; grid-template-columns: minmax(380px, 1.1fr) minmax(360px, 1fr) minmax(300px, .8fr); gap: 14px; align-items: start; }
@media (max-width: 1200px) { .draft-grid { grid-template-columns: 1fr 1fr; } .draft-grid .strip { grid-column: 1 / -1; } }
.block-card { background: linear-gradient(160deg, #1d2633, #141a22); border: 1px solid #334155; border-radius: 14px; padding: 18px; min-height: 170px; position: relative; overflow: hidden; }
.block-card .label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.block-card .player { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 8px 0 6px; }
.block-card .meta { color: var(--muted); font-size: 15px; display: flex; gap: 10px; align-items: center; }
.block-card.empty .player { color: #4b5563; font-size: 24px; }
.block-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(rgba(245,184,61,.18), transparent 70%); }

.up-next { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.up-next .now { background: var(--accent); color: var(--accent-ink); font-weight: 800; padding: 6px 12px; border-radius: 8px; font-size: 15px; }
.up-next .later { color: var(--muted); font-weight: 600; }

.results { margin-top: 8px; max-height: 340px; overflow: auto; border-radius: 8px; }
.result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.result:hover { background: var(--panel-2); }
.result .name { font-weight: 600; flex: 1; }
.result.taken { opacity: .5; cursor: default; }

.team-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.team-pick button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.team-pick button .n { font-weight: 700; display: block; }
.team-pick button .m { font-size: 12px; color: var(--muted); }
.team-pick button.sel { border-color: var(--accent); background: rgba(245,184,61,.12); }
.team-pick button:disabled { opacity: .35; }
.amount-row { display: flex; gap: 8px; margin-top: 10px; }
.amount-row input { font-size: 24px; font-weight: 800; text-align: center; font-family: var(--mono); }
.amount-row .btn.primary { font-size: 16px; padding: 0 22px; }
.sign-msg { min-height: 20px; margin-top: 8px; font-size: 13px; }

.strip table { width: 100%; border-collapse: collapse; }
.strip td, .strip th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.strip th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.strip td:first-child, .strip th:first-child { text-align: left; }
.strip td.max { font-size: 20px; font-weight: 800; color: var(--accent); }
.strip tr.full td { opacity: .35; }
.strip tr.nominating td:first-child { box-shadow: inset 3px 0 var(--accent); padding-left: 10px; }
.strip tr.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(245,184,61,.28); } to { background: transparent; } }

.ticker { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.ticker .sig { flex: 0 0 auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.ticker .sig b { color: var(--accent); }

/* ---- league grid */
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.team-card .head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.team-card .head .nm { font-size: 17px; font-weight: 800; }
.team-card .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.team-card .stat { background: #0a0e13; border-radius: 6px; padding: 6px; text-align: center; }
.team-card .stat .v { font-size: 17px; font-weight: 800; font-family: var(--mono); }
.team-card .stat .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.roster { width: 100%; border-collapse: collapse; font-size: 13px; }
.roster td { padding: 4px 4px; border-bottom: 1px solid #1f2833; }
.roster td.slot { color: var(--muted); font-size: 11px; font-weight: 700; width: 38px; }
.roster td.sal, .roster td.yrs { text-align: right; font-family: var(--mono); width: 40px; }
.roster tr.open td { color: #4b5563; font-style: italic; }
.roster tr.over td { color: var(--bad); }
.yrs.y1 { color: var(--warn); }

/* ---- queue */
.queue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .queue-grid { grid-template-columns: 1fr; } }
.item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; background: var(--panel-2); }
.item .row { display: flex; align-items: center; gap: 8px; }
.item .checks { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; }
.item .checks li::before { content: "✓ "; color: var(--good); }
.item .checks li.fail::before { content: "✗ "; color: var(--bad); }
.bids { width: 100%; font-size: 13px; margin-top: 6px; }
.bids td { padding: 3px 0; }
.sealed { letter-spacing: .3em; color: var(--muted); }

/* ---- seating */
.seat-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
.room { position: relative; height: 560px; background: radial-gradient(ellipse at center, #121922, #0b0f14); border: 1px solid var(--line); border-radius: 14px; }
.table-oval { position: absolute; left: 22%; right: 7%; top: 31%; bottom: 31%; border-radius: 999px; background: linear-gradient(#2a1f14, #1e160e); border: 2px solid #4a3725; box-shadow: inset 0 0 40px rgba(0,0,0,.5); display: grid; place-items: center; color: #6b5640; font-weight: 800; letter-spacing: .2em; }
.video-wall { position: absolute; left: 2%; top: 14%; bottom: 14%; width: 14%; border: 2px solid #2c4a7a; border-radius: 10px; background: #0d1626; display: flex; flex-direction: column; gap: 8px; padding: 8px; justify-content: center; }
.video-wall .cap { font-size: 10px; text-align: center; letter-spacing: .14em; color: var(--video); font-weight: 800; }
.seat { position: absolute; width: 104px; height: 46px; margin: -23px 0 0 -52px; border: 2px dashed #3a4656; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); background: rgba(13,17,23,.7); }
.video-wall .seat { position: relative; margin: 0; width: 100%; border-color: #2c4a7a; }
.seat.filled { border-style: solid; border-color: var(--accent); color: var(--text); background: #1c2430; cursor: grab; }
.seat .ord { position: absolute; top: -9px; left: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; display: grid; place-items: center; }
.seat.first { box-shadow: 0 0 0 3px rgba(245,184,61,.4); }
.seat.over { border-color: var(--good); background: rgba(63,185,122,.12); }
.tray { display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.chip { padding: 8px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); cursor: grab; font-weight: 700; }
.chip:active, .seat.filled:active { cursor: grabbing; }
