:root {
    color-scheme: light;
    --ink: #172b36;
    --muted: #526774;
    --line: #dbe5e8;
    --accent: #08695d;
    --soft: #edf6f3;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 32px 24px; background: #f2f5f6; color: var(--ink); font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
.container, .settings-container { max-width: 1200px; margin: auto; }
.settings-container { max-width: 720px; }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -.04em; }
h2 { margin: 0 0 20px; font-size: 1.2rem; letter-spacing: -.02em; }
p { color: var(--muted); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.subtitle { margin: 10px 0 0; }
.site-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: white; font: inherit; font-size: .9rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: #045247; border-color: #045247; color: white; }
.button-secondary { background: white; border-color: var(--line); color: var(--ink); }
.button-secondary:hover { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.button svg { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 3px solid #ba730b; outline-offset: 3px; }
.readonly-badge { color: var(--muted); font-size: .85rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 20px; padding: 18px 22px; margin-bottom: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.filter-field { display: grid; gap: 6px; }
.filter-field label { font-size: .75rem; font-weight: 750; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
select, input[type="text"] { min-height: 44px; max-width: 100%; padding: 9px 12px; border: 1px solid #bcccd2; border-radius: 8px; background: white; color: var(--ink); font: inherit; font-size: .9rem; }
.dashboard-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.dashboard-tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); padding: 12px 18px; }
.dashboard-tab:hover { background: var(--soft); color: var(--accent); }
.dashboard-tab[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
[role="tabpanel"][hidden] { display: none; }
.section, .settings-card { margin-bottom: 24px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 12px #172b3604; }
.table-scroll { overflow-x: auto; }
.standings-table, .roster-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.standings-table th, .roster-table th { padding: 12px 14px; background: #f3f7f8; color: var(--muted); font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; text-align: left; }
.standings-table .sort-button { width: 100%; justify-content: space-between; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; }
.standings-table .sort-button:hover { color: var(--accent); }
.sort-indicator { font-size: 1rem; }
.standings-table td, .roster-table td { padding: 16px 14px; border-bottom: 1px solid var(--line); }
.standings-table tbody tr:last-child td, .roster-table tbody tr:last-child td { border-bottom: 0; }
.standings-table tbody tr:hover, .roster-table tbody tr:hover { background: #f8fbfa; }
.rank, .win-percentage { color: var(--accent); font-weight: 750; }
.standings-table tbody tr.team-standing, .standings-table tbody tr.team-standing:hover { background: var(--team-background); color: var(--team-foreground); }
.team-standing .rank, .team-standing .win-percentage { color: inherit; }
.team-name { color: var(--team-color); }
.winnings { color: var(--accent); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.player-name { font-weight: 650; }
.prize-list { margin: 0; padding-left: 18px; font-size: .85rem; }
.prize-list .no-prizes { list-style: none; margin-left: -18px; color: var(--muted); }
.games-grid, .awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.game-card, .award-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfc; }
.award-card { border-top: 3px solid #92c4b7; }
.award-title, .game-date { color: var(--muted); font-size: .8rem; margin-bottom: 12px; }
.award-title { font-weight: 650; }
.award-leader, .recap-score { color: var(--accent); font-size: 1.3rem; font-weight: 750; }
.award-leader small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.game-teams { font-weight: 650; }
.recap-score { margin: 8px 0; font-variant-numeric: tabular-nums; }
.last-updated { padding: 8px; color: var(--muted); font-size: .8rem; text-align: center; }
.empty { padding: 20px; text-align: center; color: var(--muted); }
.back-link { display: inline-flex; margin-bottom: 20px; font-size: .9rem; font-weight: 650; text-decoration: none; }
.add-form, .inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form input[type="text"] { width: 150px; min-width: 0; }
.messages { list-style: none; padding: 0; }
.message, .messages li { padding: 12px 16px; margin-bottom: 10px; border-radius: 8px; background: var(--soft); color: var(--accent); }
.messages li.error { background: #fff0ef; color: #9e2922; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin: 24px 0; }
legend { font-weight: 700; padding: 0 8px; }
fieldset label { display: flex; align-items: center; gap: 8px; font-weight: 650; }
input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }
fieldset p { margin: 8px 0 24px; font-size: .9rem; }
fieldset p:last-child { margin-bottom: 0; }
@media (max-width: 700px) {
    body { padding: 20px 12px; }
    .site-header { flex-direction: column; align-items: flex-start; gap: 18px; }
    .site-actions { width: 100%; }
    .filters { padding: 16px; gap: 12px; }
    .filter-field { flex: 1 1 180px; }
    .section, .settings-card { padding: 18px 14px; }
    .standings-table { min-width: 580px; }
    .roster-table { min-width: 520px; }
    .dashboard-tab { flex: 1; padding: 12px; }
    .add-form > input, .add-form > select { width: 100%; }
}
