/* Shared design tokens. Keep component colors and spacing on this scale. */
:root {
  --accent: #78d5c4;
  --on-accent: #10201c;
  --surface: #151e1d;
  --surface-inset: #111918;
  --border: #30413d;
  --text: #dce6e2;
  --text-strong: #f1f6f4;
  --text-muted: #a0b3ad;
  --danger: #f0aaaa;
  --warning: #f4c477;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-control: 8px;
  --radius-panel: 12px;
}
:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0b1010; color: var(--text); }
    body { max-width: 1280px; margin: 0 auto; padding: 32px 24px 88px; }
    a { color: var(--accent); }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; margin: 0 0 12px; letter-spacing: -.035em; }
    h2 { margin-top: 0; }
label { display: grid; gap: 6px; color: var(--text-muted); font-size: .8rem; }
    input, select { background: #171f1e; border: 1px solid #364542; color: var(--text-strong); padding: 11px 12px; border-radius: var(--radius-control); font: inherit; }
    input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
    button { background: var(--accent); border: 0; color: var(--on-accent); padding: 11px 15px; border-radius: var(--radius-control); font: inherit; font-weight: 700; cursor: pointer; }
.button-link { display: inline-block; background: var(--accent); color: var(--on-accent); padding: 11px 15px; border-radius: var(--radius-control); text-decoration: none; font-weight: 700; }
    form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: end; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: var(--space-5); margin: var(--space-5) 0; border-radius: var(--radius-panel); }
.eyebrow, .team-race { color: var(--warning); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.lede, .muted { color: var(--text-muted); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.coach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.team-card { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 18px; text-decoration: none; color: inherit; }
.team-card:hover { border-color: var(--accent); }
.team-card strong { color: var(--text-strong); font-size: 1.15rem; }
.coach-card { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 18px; text-decoration: none; color: inherit; }
.coach-card:hover { border-color: var(--accent); }
.coach-card strong { color: var(--text-strong); font-size: 1.15rem; }
.coach-team { margin-top: 20px; }
.coach-team h2 { margin: 4px 0; }
.coach-team code { color: var(--accent); }
.coach-team-picker { margin-top: 24px; }
.coach-team-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.team-select-tile { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--border); color: inherit; padding: 16px; text-decoration: none; }
.team-select-tile:hover, .team-select-tile.active { border-color: var(--accent); }
.team-select-tile.active { background: #192629; }
.team-select-tile strong { color: var(--text-strong); font-size: 1.1rem; }
.public-roster-table { margin-top: 16px; }
.roster-index { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.roster-card { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 18px; text-decoration: none; color: inherit; }
.roster-card:hover { border-color: var(--accent); }
.roster-card strong { color: var(--text-strong); font-size: 1.1rem; }
.roster-error { border-color: #8d4d4d; }
.position-index { display: grid; gap: 8px; }
.top-nav { display: flex; overflow-x: auto; white-space: nowrap; gap: var(--space-1); border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.nav-tab { color: var(--text-muted); padding: 10px 16px; text-decoration: none; border: 1px solid transparent; border-bottom: 0; }
.nav-tab:hover { color: var(--text-strong); }
.nav-tab.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.account-controls { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.account-controls form { display: block; }
.coach-name { color: var(--text-strong); font-weight: 700; }
.secondary-button { background: var(--surface-inset); color: var(--text-strong); border: 1px solid var(--border); }
.team-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.danger-button { background: transparent; color: var(--danger); border: 1px solid #76504c; }
.danger-button:hover { background: #382421; color: #fff; }
.locked-notice { color: var(--warning); border: 1px solid #8d6f3d; background: #2b2418; padding: 12px; }
.locked-panel { border-color: #8d6f3d; }
.confirmation-panel { border-color: var(--border); }
.confirmation-panel h2 { margin-bottom: 8px; }
.confirmation-actions { display: flex; align-items: center; gap: 10px; }
.position-table-scroll { width: 100%; overflow-x: auto; }
.position-table { width: 100%; min-width: 100%; }
.position-table-header, .position-table-row { width: 100%; min-width: 100%; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 2fr) 82px 48px repeat(4, 34px) minmax(0, 1.4fr) 45px 45px; gap: 10px; }
.position-table-header { align-items: center; }
.position-table-row { align-items: start; }
.position-table-header { color: var(--text-muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid #3c4453; padding: 0 0 9px; }
.position-table-header > :nth-child(n+2):nth-child(-n+7), .position-table-header > :nth-child(n+9):nth-child(-n+10), .position-table-row > :nth-child(n+2):nth-child(-n+7), .position-table-row > :nth-child(n+9):nth-child(-n+10) { text-align: center; }
.position-table-entry { width: 100%; box-sizing: border-box; border-top: 1px solid var(--border); padding: 12px 0; }
.position-name { display: flex; gap: 12px; align-items: center; min-width: 0; }
.position-name > span:last-child { display: grid; gap: 4px; min-width: 0; }
.position-name small, .position-starting-summary { color: var(--text-muted); }
.position-starting-summary { min-width: 0; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
.position-stat { text-align: center; color: var(--text-strong); }
.position-skills-cell { display: block; min-width: 0; }
.position-skill-code { color: var(--accent); font-size: 1.05rem; font-weight: 700; }
.no-skill-access { color: #697181 !important; }
.position-choice { display: flex; gap: 12px; align-items: center; }
.position-choice-details { display: grid; gap: 4px; }
.position-choice-details span, .position-choice-details small { color: var(--text-muted); }
.position-sprite { flex: 0 0 56px; width: 56px; height: 56px; display: inline-grid; place-items: center; overflow: hidden; background-color: #10131a; background-repeat: no-repeat; border: 1px solid #3c4453; image-rendering: pixelated; }
.sprite-placeholder { color: var(--warning); font-size: .75rem; letter-spacing: .04em; }
    details { margin-top: 12px; }
summary { cursor: pointer; display: inline-block; list-style: none; }
summary::-webkit-details-marker { display: none; }
.hire-content { margin-top: 18px; }
.hire-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.position-choices { display: grid; gap: 8px; border: 0; margin: 0 0 18px; padding: 0; }
.position-choices legend { color: var(--text-muted); font-size: .8rem; margin-bottom: 4px; }
.position-choice { padding: 9px; border: 1px solid var(--border); background: #14171d; cursor: pointer; }
.position-choice:has(input:checked) { border-color: var(--accent); background: #192629; }
.position-choice input { accent-color: var(--accent); }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 20px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); margin: 24px 0; }
.stats div { background: var(--surface); padding: 16px; display: grid; gap: 7px; }
.stats span { color: var(--text-muted); font-size: .75rem; }
.stats strong { color: var(--text-strong); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; }
.player-value { margin-top: 5px; }
.player-value summary { color: var(--accent); cursor: pointer; font-size: .82rem; }
.player-value-details { margin-top: 8px; padding: 10px; background: var(--surface-inset); border: 1px solid var(--border); border-radius: 6px; }
.player-value-details > div { display: flex; justify-content: space-between; gap: 14px; }
.player-value-details ul { margin: 6px 0; padding-left: 18px; }
.player-value-details li { display: flex; justify-content: space-between; gap: 14px; color: #c8ceda; }
.player-value-total { border-top: 1px solid var(--border); padding-top: 6px; }
.confirmation-summary { display: grid; gap: 10px; }
.confirmation-summary div { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--border); padding-top: 8px; }
.confirmation-summary dt { color: var(--text-muted); }
.confirmation-summary dd { margin: 0; text-align: right; }
.advancement { border-left: 2px solid var(--warning); padding-left: 10px; }
.advancement form { margin-top: 8px; }
.advancement select { max-width: 260px; }
.complete { color: var(--accent); }
.injury { color: var(--danger); }
.game-list { display: grid; gap: 8px; }
.game-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; border-top: 1px solid var(--border); padding: 10px 0; }
.game-summary { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.game-summary strong { color: var(--text-strong); }
.game-summary small, .match-status { color: var(--text-muted); }
.match-status { text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.match-actions { display: flex; gap: 8px; align-items: center; }
.match-actions a { color: var(--accent); }
.match-actions .button-link { color: var(--on-accent); }
    fieldset { border: 1px solid var(--border); padding: 14px; display: grid; gap: 8px; }
fieldset legend { color: var(--text-muted); font-size: .8rem; }
.checkbox-row { display: flex; grid-template-columns: none; align-items: center; gap: 10px; padding: 8px; background: #14171d; border: 1px solid var(--border); color: var(--text-strong); font-size: .9rem; }
.checkbox-row input { accent-color: var(--accent); }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 9px 10px; border-top: 1px solid var(--border); text-align: right; white-space: nowrap; }
.table-wrap th:nth-child(2), .table-wrap td:nth-child(2) { text-align: left; }
.table-wrap th { color: var(--text-muted); font-size: .75rem; text-transform: uppercase; }
.player-link { color: inherit; text-decoration: none; }
.player-link:hover strong { color: var(--accent); }
.leaderboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.leaderboard { margin: 0; padding: 16px; background: #14171d; border: 1px solid var(--border); }
.leaderboard h3 { margin: 0 0 10px; font-size: .95rem; }
.leaderboard-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.leaderboard-player { display: grid; gap: 3px; min-width: 0; }
.leaderboard-player strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-player small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-value { color: var(--accent); font-size: 1.1rem; font-weight: 800; }
.career-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--border); }
.career-stat-grid div { display: grid; gap: 7px; padding: 14px; background: var(--surface); }
.career-stat-grid span { color: var(--text-muted); font-size: .75rem; }
.career-stat-grid strong { color: var(--text-strong); }
.purchase-list { display: grid; gap: 10px; }
.purchase-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; }
.purchase-info { display: flex; gap: 10px; align-items: baseline; }
.purchase-meta { color: var(--text-muted); }
.purchase-actions { display: flex; align-items: center; gap: 8px; }
.purchase-actions form.inline-form { display: block; margin: 0; }
.purchase-actions button { min-width: 42px; min-height: 38px; padding: 6px 12px; font-size: 1.25rem; line-height: 1; }
.purchase-actions button:disabled { background: var(--border); color: #697181; cursor: not-allowed; }
.purchase-row.unavailable { grid-template-columns: auto 1fr; }
.inline-form { display: block; }
.page-back { margin: 0 0 24px; font-size: .85rem; }
.page-back a { color: var(--text-muted); text-decoration: none; }
.page-back a:hover { color: var(--accent); }
.section-kicker { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .14em; margin: 0 0 6px; text-transform: uppercase; }
.tournament-page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin: 34px 0 26px; }
.tournament-page-header .lede { max-width: 650px; font-size: 1rem; line-height: 1.55; margin: 0; }
.tournament-cta { white-space: nowrap; box-shadow: 0 8px 24px rgba(120, 213, 196, .12); }
.tournament-cta span { font-size: 1.1em; margin-right: 4px; }
.tournament-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: transparent; margin: 0 0 28px; }
.tournament-stats div { min-height: 92px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(145deg, var(--surface), #121918); padding: 17px 18px; }
.tournament-stats span { color: var(--text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tournament-stats strong { font-size: 1.7rem; letter-spacing: -.04em; line-height: 1.1; }
.tournament-stats small { color: #687c77; font-size: .75rem; }
.stat-total { color: var(--text-muted) !important; font-size: .95rem !important; font-weight: 500; }
.tournament-list-panel, .tournament-teams-panel, .tournament-standings-panel, .tournament-schedule-panel, .create-panel, .format-guide { border-color: var(--border); border-radius: 16px; background: linear-gradient(145deg, var(--surface), #121918); box-shadow: 0 16px 40px rgba(0, 0, 0, .14); }
.tournament-list-panel { padding: 24px 28px 28px; }
.tournament-list-panel h2, .tournament-teams-panel h2, .tournament-standings-panel h2, .tournament-schedule-panel h2 { margin-bottom: 0; letter-spacing: -.03em; }
.section-heading { align-items: center; }
.section-heading > div { min-width: 0; }
.section-heading .muted { font-size: .78rem; }
.section-count { color: var(--text-muted); font-size: .78rem; }
.tournament-list { display: grid; gap: 10px; margin-top: 20px; }
.tournament-card { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 16px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-inset); color: inherit; text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.tournament-card:hover { border-color: var(--accent); background: #192724; transform: translateY(-1px); }
.tournament-card-content { display: grid; gap: 7px; min-width: 0; }
.tournament-card-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
.tournament-card-topline strong { overflow: hidden; color: var(--text-strong); font-size: 1.03rem; text-overflow: ellipsis; white-space: nowrap; }
.tournament-card-meta { color: var(--text-muted); font-size: .78rem; }
.tournament-card-arrow { color: #66817a; font-size: 1.3rem; text-align: right; }
.format-pill, .status-pill { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 5px 9px; font-size: .64rem; font-weight: 800; letter-spacing: .08em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.format-pill.is-league { color: #8ae3d2; background: #19312d; }
.format-pill.is-knockout { color: #f4c477; background: #342b1c; }
.status-pill.is-active, .status-pill.is-ready { color: #8ae3d2; background: #19312d; }
.status-pill.is-completed, .status-pill.is-bye { color: #aabdb8; background: #25312f; }
.status-pill.is-cancelled, .status-pill.is-attention { color: #f4c477; background: #342b1c; }
.status-pill.is-scheduled, .status-pill.is-muted { color: var(--text-muted); background: #25312f; }
.empty-state { display: grid; justify-items: center; gap: 9px; padding: 54px 18px 42px; text-align: center; }
.empty-state.compact { padding: 26px 14px; }
.empty-state h3, .empty-state p { margin: 0; }
.empty-state h3 { font-size: 1.05rem; }
.empty-state-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--accent); background: #19312d; font-size: 1.3rem; }
.create-page-header { align-items: center; }
.header-note { display: flex; align-items: center; gap: 11px; max-width: 250px; color: var(--text-muted); font-size: .78rem; line-height: 1.45; }
.header-note-mark { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border: 1px solid #35514a; border-radius: 10px; color: var(--accent); font-weight: 800; }
.tournament-create-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr); align-items: start; gap: 20px; }
.create-panel, .format-guide { margin: 0; padding: 0; }
.tournament-form { display: block; }
.form-section { padding: 28px; }
.form-section + .form-section { border-top: 1px solid var(--border); }
.form-section-heading { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 24px; }
.form-section-heading h2 { margin: 0 0 5px; font-size: 1.05rem; }
.form-section-heading p { margin: 0; color: var(--text-muted); font-size: .8rem; line-height: 1.45; }
.section-index { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #0f1716; background: var(--accent); font-size: .72rem; font-weight: 900; }
.form-field { gap: 8px; margin-bottom: 20px; color: #cbd8d4; font-size: .78rem; font-weight: 700; }
.form-field input, .form-field select { margin-top: 0; }
.form-field small { color: var(--text-muted); font-size: .72rem; font-weight: 400; line-height: 1.4; }
.format-picker, .team-picker { margin: 0 0 20px; border: 0; padding: 0; }
.format-picker legend, .team-picker legend { width: 100%; margin-bottom: 10px; padding: 0; color: #cbd8d4; font-size: .78rem; font-weight: 700; }
.format-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.format-option { position: relative; display: block; color: inherit; cursor: pointer; }
.format-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.format-option-card { display: flex; align-items: flex-start; gap: 12px; min-height: 102px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-inset); padding: 15px; transition: border-color .16s ease, background .16s ease; }
.format-option-card strong, .format-option-card small { display: block; }
.format-option-card strong { color: var(--text-strong); font-size: .88rem; margin-bottom: 6px; }
.format-option-card small { color: var(--text-muted); font-size: .75rem; font-weight: 400; line-height: 1.45; }
.format-option-icon, .guide-icon { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-size: 1.1rem; font-weight: 700; }
.format-option:first-child .format-option-icon, .guide-icon.is-league { color: #8ae3d2; background: #19312d; }
.format-option:last-child .format-option-icon, .guide-icon.is-knockout { color: #f4c477; background: #342b1c; }
.format-option:has(input:checked) .format-option-card { border-color: var(--accent); background: #19302c; box-shadow: 0 0 0 2px rgba(120, 213, 196, .08); }
.format-option:has(input:focus-visible) .format-option-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.team-picker { margin-bottom: 0; }
.team-picker legend { display: flex; justify-content: space-between; align-items: baseline; }
.team-picker legend small { color: var(--text-muted); font-size: .72rem; font-weight: 400; }
.team-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-picker-option { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-inset); padding: 12px; color: inherit; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.team-picker-option:hover { border-color: #54766e; }
.team-picker-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.team-picker-check { display: grid; place-items: center; width: 19px; height: 19px; box-sizing: border-box; border: 1px solid #527068; border-radius: 6px; color: #10201d; font-size: .8rem; }
.team-picker-option:has(input:checked) { border-color: var(--accent); background: #19302c; }
.team-picker-option:has(input:checked) .team-picker-check { border-color: var(--accent); background: var(--accent); }
.team-picker-option:has(input:checked) .team-picker-check::after { content: "✓"; }
.team-picker-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.team-picker-copy { display: grid; gap: 4px; min-width: 0; }
.team-picker-copy strong { overflow: hidden; color: var(--text-strong); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.team-picker-copy small { overflow: hidden; color: var(--text-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.team-picker-number { align-self: start; color: #58736c; font-size: .68rem; font-weight: 800; }
.form-submit-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; }
.form-submit-row p { margin: 0; font-size: .73rem; }
.form-submit-row p span { color: var(--accent); }
.primary-button { box-shadow: 0 8px 22px rgba(120, 213, 196, .12); }
button:disabled { opacity: .45; cursor: not-allowed; }
.format-guide { padding: 25px; }
.format-guide h2 { margin: 0 0 24px; font-size: 1.35rem; letter-spacing: -.04em; }
.guide-item { display: grid; grid-template-columns: 32px 1fr; gap: 11px; align-items: start; padding: 16px 0; border-top: 1px solid var(--border); }
.guide-item strong { color: var(--text-strong); font-size: .84rem; }
.guide-item p { margin: 6px 0 0; color: var(--text-muted); font-size: .76rem; line-height: 1.5; }
.guide-note { display: grid; gap: 5px; margin-top: 16px; border-radius: 10px; background: #1a2c28; padding: 13px; }
.guide-note strong { color: #8ae3d2; font-size: .78rem; }
.guide-note span { color: var(--text-muted); font-size: .72rem; line-height: 1.4; }
.tournament-hero { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin: 30px 0 24px; }
.tournament-hero-copy { min-width: 0; }
.tournament-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.kicker-dot { color: #55736b; }
.tournament-hero .lede { margin: 0; font-size: .9rem; }
.tournament-detail-stats { margin-bottom: 24px; }
.tournament-teams-panel, .tournament-standings-panel, .tournament-schedule-panel { padding: 24px 28px 28px; }
.tournament-teams-panel { margin-top: 0; }
.team-chip-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.team-chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-inset); color: inherit; padding: 9px 11px 9px 8px; text-decoration: none; }
.team-chip:hover { border-color: var(--accent); background: #19302c; }
.team-chip > span:last-child { display: grid; gap: 3px; }
.team-chip strong { color: var(--text-strong); font-size: .8rem; }
.team-chip small { color: var(--text-muted); font-size: .68rem; }
.team-chip-seed { display: grid; place-items: center; width: 25px; height: 25px; border-radius: var(--radius-control); color: var(--accent); background: #19312d; font-size: .68rem; font-weight: 800; }
.tournament-standings-panel { padding-bottom: 20px; }
.standings-table-wrap { margin-top: 18px; }
.standings-table { border-collapse: separate !important; border-spacing: 0; }
.standings-table th { padding: 10px 12px !important; border: 0 !important; color: var(--text-muted) !important; font-size: .66rem !important; letter-spacing: .1em; }
.standings-table td { padding: 13px 12px !important; border-top: 1px solid var(--border) !important; color: #b9c9c5; font-size: .82rem; }
.standings-table .standing-rank { width: 30px; color: var(--text-muted); font-weight: 800; }
.standings-table .standing-team { width: 100%; color: var(--text-strong); text-align: left; }
.standings-table .standing-team strong { font-weight: 700; }
.standings-table .standing-points { color: var(--accent); }
.standings-table .standing-row.leader .standing-rank { color: var(--warning); }
.standings-table .standing-row.leader .standing-team strong { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tournament-schedule-panel { margin-top: 24px; }
.schedule-list { display: grid; gap: 22px; margin-top: 20px; }
.round-block { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #121a19; }
.round-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--border); padding: 13px 16px; }
.round-heading > div { display: flex; align-items: center; gap: 11px; }
.round-heading h3 { margin: 0; font-size: .94rem; }
.round-number { color: var(--accent); font-size: .7rem; font-weight: 900; letter-spacing: .08em; }
.round-status { color: var(--text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.round-status.is-complete { color: var(--accent); }
.round-status.is-current { color: var(--warning); }
.fixture-list { display: grid; gap: 9px; padding: 12px; }
.fixture-card { display: grid; gap: 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); padding: 14px 16px; }
.fixture-card.is-ready { border-color: #3f7166; box-shadow: inset 3px 0 var(--accent); }
.fixture-card.is-attention { border-color: #7c6338; box-shadow: inset 3px 0 var(--warning); }
.fixture-card-header, .fixture-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fixture-card-meta { color: var(--text-muted); font-size: .72rem; }
.fixture-matchup { display: grid; grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); align-items: center; gap: 15px; }
.fixture-team { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.fixture-team:hover strong { color: var(--accent); }
.fixture-team.away { flex-direction: row-reverse; text-align: right; }
.fixture-team > span:last-child { display: grid; gap: 4px; min-width: 0; }
.fixture-team strong { overflow: hidden; color: var(--text-strong); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.fixture-team small { color: var(--text-muted); font-size: .67rem; text-transform: uppercase; }
.team-badge { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border: 1px solid #3c5a53; border-radius: 10px; color: var(--accent); background: #19312d; font-size: .67rem; font-weight: 900; }
.fixture-team.away .team-badge { color: #f4c477; border-color: #66502d; background: #342b1c; }
.fixture-score { display: grid; justify-items: center; gap: 3px; }
.fixture-score strong { color: var(--text-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; letter-spacing: .04em; }
.fixture-score span { color: var(--text-muted); font-size: .63rem; text-transform: uppercase; }
.fixture-winner { color: var(--accent); font-size: .72rem; font-weight: 700; }
.fixture-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.fixture-actions a { font-size: .75rem; }
.quiet-link { color: var(--text-muted); text-decoration: none; }
.quiet-link:hover { color: var(--accent); }
.fixture-actions form { display: flex; align-items: flex-end; gap: 8px; }
.fixture-actions form label { display: grid; gap: 4px; color: var(--text-muted); font-size: .65rem; }
.fixture-actions form select { min-width: 150px; padding: 8px 9px; font-size: .75rem; }
.fixture-actions button { padding: 8px 11px; font-size: .73rem; }
.fixture-bye { background: var(--surface-inset); }
.fixture-bye .fixture-matchup { display: block; }
.fixture-bye .fixture-team small { color: var(--accent); }
.tournament-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.status-pill.is-open { color: #8ae3d2; background: #19312d; }
.open-tournament-form { max-width: 760px; margin-top: 0; padding: 28px; }
.open-tournament-form form { display: block; }
.open-tournament-form .format-picker { margin-top: 24px; }
.open-tournament-form .form-submit-row { justify-content: flex-end; margin-top: 24px; }
.open-tournament-form .format-option-card { min-height: 0; align-items: center; }
.open-tournament-form .format-option-card strong { margin: 0; }
.registration-panel { margin-top: 24px; padding: 24px 28px 28px; border-color: #3a504a; border-radius: 16px; background: linear-gradient(145deg, var(--surface), #121918); }
.registration-panel h2 { margin-bottom: 0; }
.signup-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 20px; }
.signup-form .form-field { flex: 1; margin: 0; }
.signup-form button { white-space: nowrap; }
.registration-note { display: flex; align-items: center; gap: 9px; margin: 20px 0 0; color: #cbd8d4; font-size: .8rem; }
.registration-organizer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .78rem; }
.open-tournament-form:has(input[name="format"][value="single_elimination"]:checked) .league-legs-field, .open-tournament-form:has(input[name="format"][value="double_elimination"]:checked) .league-legs-field { display: none; }
.open-tournament-form .format-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fixture-header-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.fixture-bracket { color: var(--text-muted); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.seed-editor { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.seed-editor-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seed-editor-header form, .seed-row-actions form { display: block; margin: 0; }
.seed-editor-header strong { color: #cbd8d4; font-size: .78rem; }
.seed-list { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.seed-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-inset); padding: 8px 10px; }
.seed-number { color: var(--accent); font-size: .72rem; font-weight: 800; }
.seed-team { display: grid; gap: 3px; min-width: 0; color: inherit; text-decoration: none; }
.seed-team strong { overflow: hidden; color: var(--text-strong); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.seed-team small { overflow: hidden; color: var(--text-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.seed-row-actions { display: flex; gap: 6px; }
.seed-row-actions button { padding: 6px 8px; font-size: .68rem; }
.seed-row-actions button:disabled { opacity: .35; cursor: not-allowed; }
    @media (max-width: 700px) { .game-row { grid-template-columns: 1fr; gap: 8px; }
.match-actions { flex-wrap: wrap; }
}
    @media (max-width: 700px) { .page-header { flex-direction: column; }
.account-controls { padding-top: 0; }
.purchase-row { grid-template-columns: 1fr; gap: 10px; }
.purchase-actions { justify-content: flex-start; }
}
    @media (max-width: 760px) { .tournament-page-header, .tournament-hero { align-items: flex-start; flex-direction: column; }
.tournament-cta { align-self: flex-start; }
.header-note { max-width: 360px; }
.tournament-create-layout { grid-template-columns: 1fr; }
.format-guide { order: -1; }
.tournament-card { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.tournament-card-arrow { display: none; }
.format-options, .team-picker-grid { grid-template-columns: 1fr; }
.form-submit-row, .fixture-card-footer { align-items: flex-start; flex-direction: column; }
.fixture-actions { justify-content: flex-start; }
.tournament-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.signup-form, .registration-organizer { align-items: stretch; flex-direction: column; }
}
    @media (max-width: 520px) { body { padding-left: 16px; padding-right: 16px; }
.tournament-stats { gap: 7px; }
.tournament-stats div { padding: 13px 12px; }
.tournament-stats strong { font-size: 1.35rem; }
.tournament-list-panel, .tournament-teams-panel, .tournament-standings-panel, .tournament-schedule-panel, .registration-panel { padding-left: 17px; padding-right: 17px; }
.form-section, .format-guide, .open-tournament-form { padding: 20px 17px; }
.fixture-list { padding: 8px; }
.fixture-matchup { grid-template-columns: 1fr 52px 1fr; gap: 7px; }
.fixture-team { gap: 6px; }
.fixture-team strong { font-size: .74rem; }
.team-badge { flex-basis: 28px; width: 28px; height: 28px; border-radius: 8px; font-size: .58rem; }
.fixture-score strong { font-size: .95rem; }
.standings-table th, .standings-table td { padding-left: 7px !important; padding-right: 7px !important; }
}

/* Shared controls and layout rhythm. */
button, .button-link { box-sizing: border-box; line-height: 1.25; min-height: 40px; }
button:hover, .button-link:hover { filter: brightness(1.08); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input, select, textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; margin: 0 0 var(--space-4); }
.lede { line-height: 1.55; max-width: 72ch; }
.team-card, .coach-card, .roster-card, .team-select-tile, .leaderboard { border-radius: var(--radius-panel); padding: var(--space-4); }
.stats { gap: var(--space-3); background: transparent; }
.stats div { border: 1px solid var(--border); border-radius: var(--radius-panel); padding: var(--space-4); }
.section-heading { gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4); }
.section-heading h2 { margin-bottom: 0; }
.section-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.confirmation-actions { flex-wrap: wrap; }
.confirmation-actions .danger-button { background: #8d3937; color: #fff; border-color: #8d3937; }
.hire-panel > details > summary { cursor: pointer; color: var(--text-muted); }
.development-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); }
.advancement-list { display: grid; gap: var(--space-4); }
.advancement { display: grid; gap: var(--space-2); }
.advancement form { grid-template-columns: 1fr; }
.advancement select { max-width: 100%; }

/* Native tables maintain a shared column width across every roster row. */
.roster-table { width: 100%; overflow-x: auto; }
.roster-data { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: auto; font-size: .875rem; }
.roster-data th, .roster-data td { padding: var(--space-3) var(--space-2); border-top: 1px solid var(--border); vertical-align: middle; text-align: left; }
.roster-data thead th { color: var(--text-muted); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.roster-data .numeric { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.roster-data .roster-player { min-width: 130px; max-width: 230px; overflow-wrap: anywhere; font-weight: 650; }
.roster-data .roster-position { min-width: 100px; }
.roster-data .roster-skills { min-width: 140px; max-width: 260px; color: var(--text-muted); line-height: 1.5; }
.roster-data .roster-actions { min-width: 76px; text-align: center; white-space: nowrap; }
.roster-data tbody tr:hover { background: var(--surface-inset); }
.roster-data .player-link:hover, .spp-link:hover { color: var(--accent); text-decoration: underline; }
.roster-data small { display: block; margin-top: var(--space-1); font-weight: 400; }
.roster-fire { min-height: 32px; padding: 6px 10px; font-size: .76rem; }
.spp-link { color: inherit; text-decoration: none; }
.level-up-link { display: block; margin-top: var(--space-1); font-size: .72rem; }
.player-value-details { line-height: 1.5; }
.player-value-details li > :last-child, .player-value-details > div > :last-child { white-space: nowrap; }

/* Request and validation feedback share one visual language. */
.notice { padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-control); line-height: 1.5; }
.notice-success { color: var(--text-strong); background: #19312b; border-color: #396354; }
.notice-error { color: var(--danger); background: #2c1e1c; border-color: #76504c; }
.form-feedback { grid-column: 1 / -1; margin: var(--space-2) 0 0; }
.field-error { color: var(--danger); font-size: .8rem; }
[aria-invalid="true"] { border-color: var(--danger); }
form[aria-busy="true"] { cursor: progress; }
form[aria-busy="true"] button { opacity: .55; }
@media (max-width: 760px) {
  .development-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .panel { padding: var(--space-4); }
  .team-actions { align-items: flex-start; }
}
.hire-content > form { display: block; }
.roster-scroll-hint { display: none; margin: 0 0 var(--space-2); font-size: .75rem; }
@media (max-width: 1200px) { .roster-scroll-hint { display: block; } }
