:root {
  color-scheme: dark;
  --bg: #101510;
  --panel: #191f18;
  --border: #394437;
  --ink: #f1f3e9;
  --muted: #b3beb0;
  --lime: #d6fb68;
  font: 16px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.wrap { width: min(1150px, calc(100% - 32px)); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--border); }
.bar { display: flex; justify-content: space-between; align-items: center; min-height: 62px; gap: 12px; }
.brand { color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: 950; letter-spacing: -.07em; }
.brand > span:first-child { color: var(--lime); padding-right: 8px; }
.accent, em { color: var(--lime); }
.tag, .eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.tag, .muted, .hint, footer { color: var(--muted); }
.hero {
  padding: clamp(34px, 7vw, 82px) clamp(18px, 5vw, 60px);
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: radial-gradient(ellipse at 85% 35%, #344c22, transparent 68%),
    repeating-linear-gradient(90deg, transparent 0 69px, #d6fb6812 69px 71px),
    linear-gradient(110deg, #1c281a, #172218);
}
.hero .eyebrow { color: var(--lime); }
.hero .eyebrow span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--lime); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.35rem, 8.8vw, 6.75rem); line-height: .92; font-weight: 950; letter-spacing: -.075em; margin-top: 15px; }
h1 em { font-style: normal; }
.hero p { max-width: 41ch; margin: 18px 0 22px; color: var(--muted); }
h2 { font-size: 1.55rem; line-height: 1.2; letter-spacing: -.035em; margin-top: 4px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 305px); gap: 16px; align-items: start; }
.sidebar { display: grid; gap: 16px; }
.card, dialog { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: clamp(14px, 2.5vw, 25px); color: var(--ink); }
.card-head, .legend, .dialog-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head { justify-content: space-between; }
.count { color: var(--lime); border: 1px solid #52643b; border-radius: 99px; padding: 4px 10px; font-size: .78rem; }
.board-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 14px; }
.board-picker label { flex: 1 1 12rem; max-width: 28rem; }
.matchup { margin-top: 14px; font-weight: 750; overflow-wrap: anywhere; }
.hint { font-size: .84rem; margin-top: 8px; }
.hint:empty { display: none; }
.schedule-status { margin-top: 0; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 475px; table-layout: fixed; text-align: center; }
th { color: var(--lime); font-size: .85rem; }
th[scope="colgroup"] { padding-bottom: 5px; }
th[scope="rowgroup"] { writing-mode: vertical-rl; transform: rotate(180deg); overflow-wrap: anywhere; }
.axis, .digit { width: 23px; }
td { padding: 0; }
.square { width: 100%; height: clamp(33px, 4.5vw, 52px); padding: 0 2px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); background: #222a21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.square:not(:disabled):hover { border-color: var(--lime); color: var(--ink); }
.square.locked { display: block; align-content: center; }
.square.claimed, .legend .claimed { background: #34452b; color: #e5f4d8; }
.square.winner, .legend .winner { background: var(--lime); border-color: var(--lime); color: #182311; font-weight: 800; }
.legend { margin-top: 12px; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border: 1px solid #677563; background: #222a21; border-radius: 2px; margin-right: 4px; }
form { display: grid; gap: 9px; margin-top: 12px; }
#team-fields { display: grid; gap: 9px; border: 0; margin: 0; padding: 0; min-width: 0; }
label { display: grid; gap: 3px; font-size: .82rem; color: var(--muted); min-width: 0; }
input, select { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 7px 8px; background: #121812; color: var(--ink); font: inherit; }
button { cursor: pointer; font: inherit; }
.button { display: inline-flex; justify-content: center; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-weight: 750; font-size: .88rem; }
.primary { background: var(--lime); color: #182311; }
.secondary { background: #252e23; border-color: var(--border); color: var(--ink); }
.side-card > .primary { width: 100%; }
.button:hover:not(:disabled) { filter: brightness(1.13); }
.button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.draw-controls { display: grid; gap: 8px; }
.text-button { color: var(--muted); border: 0; background: transparent; padding: 5px 0; font-size: .82rem; text-decoration: underline; }
#new-board { width: 100%; margin-top: 10px; }
.score-row { display: grid; grid-template-columns: 2.15rem repeat(2, minmax(0, 1fr)); align-items: end; gap: 6px; }
.score-row strong { align-self: end; padding-bottom: 6px; font-size: .82rem; }
.score-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.winners { padding: 0; margin: 12px 0 0; list-style: none; font-size: .82rem; overflow-wrap: anywhere; }
.winners li { padding: 5px 0; border-top: 1px solid var(--border); }
footer { padding: 22px 0; font-size: .82rem; }
footer span { padding-inline: 4px; }
dialog { width: min(380px, calc(100% - 32px)); }
dialog::backdrop { background: #000a; }
.dialog-actions { justify-content: flex-end; margin-top: 6px; }
[hidden] { display: none !important; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }
