:root {
    --ink: #18251f;
    --muted: #64726b;
    --line: #dfe6e1;
    --surface: #ffffff;
    --surface-soft: #f4f7f5;
    --brand: #12613c;
    --brand-dark: #0c452b;
    --brand-soft: #dcefe4;
    --red: #d94c45;
    --red-soft: #f9d9d6;
    --yellow: #e8b438;
    --yellow-soft: #fff0bb;
    --green: #3f9d62;
    --green-soft: #d8f0df;
    --shadow: 0 16px 40px rgba(20, 43, 31, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--surface-soft);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--surface-soft); }
button, input, select { font: inherit; }
a { color: inherit; }
.page-shell { min-height: 100vh; }

.auth-page,
.landing-page {
    background:
        radial-gradient(circle at 20% 15%, rgba(63, 157, 98, .16), transparent 34rem),
        radial-gradient(circle at 85% 85%, rgba(232, 180, 56, .16), transparent 32rem),
        #f4f7f5;
}

.auth-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
    width: min(100%, 460px);
    padding: 38px;
    border: 1px solid rgba(18, 97, 60, .12);
    border-radius: 24px;
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
}
.landing-card { text-align: center; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 28px;
    border-radius: 15px;
    background: var(--brand);
    color: white;
    font-weight: 900;
    letter-spacing: -.04em;
}
.landing-card .brand-mark { margin-inline: auto; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.05; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.eyebrow { margin-bottom: 8px; color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }

.stack-form { display: grid; gap: 16px; margin-top: 24px; }
.compact-form { margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; color: #33433b; font-size: .84rem; font-weight: 700; }
.field-help { margin: -7px 0 0; color: var(--muted); font-size: .76rem; }
input, select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccd7d0;
    border-radius: 10px;
    outline: 0;
    background: white;
    color: var(--ink);
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18, 97, 60, .12); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 800;
}
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { border-color: var(--brand); background: white; color: var(--brand); }
.button-success { border-color: var(--brand); background: var(--brand); color: white; }
.button-save { border-color: var(--brand); background: var(--brand); color: white; }
.button-save:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.button-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.button-danger-ghost { border-color: #efc2be; background: white; color: #a52f2a; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: .78rem; }
.button-static { cursor: default; }
.button:disabled { opacity: .45; cursor: not-allowed; }

.alert { margin-bottom: 18px; padding: 13px 15px; border: 1px solid; border-radius: 12px; font-size: .9rem; }
.alert-success { border-color: #b9ddc5; background: var(--green-soft); color: #24603a; }
.alert-error { border-color: #efc2be; background: var(--red-soft); color: #8d2925; }
.alert-info { border-color: #c9d8cf; background: #edf3ef; color: #40534a; }

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 max(24px, calc((100vw - 1440px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(12px);
}
.topbar > div { display: flex; align-items: center; gap: 14px; }
.brand { color: var(--brand); font-size: 1.05rem; font-weight: 900; text-decoration: none; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); }
.user-menu { position: relative; }
.user-menu > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover,
.user-menu[open] > summary { border-color: var(--line); background: var(--surface-soft); }
.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: .82rem;
    font-weight: 900;
}
.user-identity { display: grid; min-width: 0; text-align: left; }
.user-identity strong { max-width: 240px; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { color: var(--muted); font-size: .68rem; }
.user-chevron { color: var(--muted); font-weight: 900; transition: transform .15s ease; }
.user-menu[open] .user-chevron { transform: rotate(180deg); }
.user-menu-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    box-shadow: var(--shadow);
}
.user-menu-item {
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-weight: 750;
    text-align: left;
}
.user-menu-item:hover { background: var(--surface-soft); }
.user-menu-danger { color: #a52f2a; }
.account-dialog {
    width: min(460px, calc(100% - 28px));
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    color: var(--ink);
    box-shadow: 0 28px 80px rgba(20, 43, 31, .22);
}
.account-dialog::backdrop { background: rgba(12, 35, 24, .42); backdrop-filter: blur(3px); }
.confirm-dialog-message { margin: 20px 0 0; color: var(--muted); line-height: 1.55; }
.confirm-dialog-actions { justify-content: flex-end; padding: 24px 0 0; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.3rem;
}
.content { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 72px; }
.dashboard-content { width: min(1600px, calc(100% - 24px)); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading p:last-child { margin-bottom: 0; }
.round-list { display: flex; align-items: center; gap: 12px; }
.round-list-panel { margin-bottom: 24px; padding: 18px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.round-list-label { font-weight: 800; }
.round-list-links { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; max-width: none; overflow-x: auto; padding-bottom: 3px; }
.round-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}
.round-link:hover, .round-link.is-current { border-color: var(--brand); color: var(--brand); }
.round-link.is-complete { border-color: #b9ddc5; background: var(--green-soft); color: #24603a; }
.round-link.is-complete.is-current { box-shadow: 0 0 0 3px rgba(18, 97, 60, .14); }
.round-link span { margin-left: 3px; }
.round-picker, .filter-bar { display: flex; align-items: end; gap: 12px; }
.round-picker { min-width: 220px; }
.filter-bar select { min-width: 150px; }
.admin-heading-actions { display: flex; align-items: end; gap: 12px; }

.panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(20, 43, 31, .035);
}
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-header .eyebrow { margin-bottom: 5px; }
.schedule-note { margin: 18px 24px 0; padding: 11px 13px; border-radius: 10px; background: #f3f5f4; color: var(--muted); font-size: .82rem; }
.schedule-note span { display: block; margin-top: 7px; font-weight: 800; }
.schedule-note.is-invalid { background: var(--yellow-soft); color: #765407; }
.schedule-note.is-valid { background: var(--green-soft); color: #24603a; }
.schedule-panel { overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; }
.schedule-scroll, .matrix-scroll { overflow-x: auto; }
.schedule-scroll { padding: 24px; }
.schedule-table, .admin-matrix { width: 100%; border-collapse: separate; border-spacing: 5px; }
.schedule-table th { min-width: 58px; color: var(--muted); font-size: .75rem; text-align: center; }
.schedule-table tbody th { position: sticky; left: 0; z-index: 2; min-width: 84px; padding-right: 10px; background: white; color: var(--ink); text-align: left; }
.rating-cell {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 50px;
    height: 50px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 900;
    transition: transform .12s ease, box-shadow .12s ease;
}
.rating-cell:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(20, 43, 31, .12); }
.rating-cell > span { display: none; }
.rating--1 { background: #edf1ee; color: #a0aaa4; }
.rating-1 { background: #ef8b83; color: #761d18; }
.rating-2 { background: #f2c94c; color: #654900; }
.rating-3 { background: #69c985; color: #155c2d; }
.form-actions { display: flex; gap: 10px; padding: 0 24px 24px; }
.account-panel { margin-top: 18px; padding: 20px 24px; }
.account-panel summary { cursor: pointer; font-weight: 800; }
.account-panel .compact-form { max-width: 480px; }
.venue-panel { margin-top: 24px; overflow: hidden; scroll-margin-top: 24px; }
.venue-scale-help { margin: 0; font-size: .78rem; font-weight: 700; }
.venue-rating-list { display: grid; gap: 10px; padding: 24px; }
.venue-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}
.venue-rating-row strong, .venue-rating-row small { display: block; }
.venue-rating-row small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.venue-rating-scale { display: grid; grid-template-columns: repeat(5, 42px); gap: 7px; }
.venue-rating-option {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
}
.venue-rating-option:hover { border-color: var(--brand); color: var(--brand); }
.venue-rating-option.is-selected { border-color: var(--brand); background: var(--brand); color: white; }
.rating-cell:disabled, .venue-rating-option:disabled { cursor: default; opacity: .8; transform: none; box-shadow: none; }
.round-preferences-form { display: grid; gap: 24px; }
.team-view-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 20px; }
.team-view-tab { padding: 11px 16px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font-size: .84rem; font-weight: 800; text-decoration: none; }
.team-view-tab:hover { border-color: var(--brand); }
.team-view-tab.is-active { border-color: var(--brand); background: var(--brand); color: white; }
.team-view-tab.is-disabled { opacity: .5; }
.season-reference-panel { margin-bottom: 24px; }
.season-reference-panel .rating-cell { cursor: default; }
.season-reference-panel .rating-cell:hover { transform: none; box-shadow: none; }
.round-preferences-form .venue-panel { margin-top: 0; }
.round-preferences-form + .round-preferences-form,
.round-preferences-form + .change-request-panel { margin-top: 32px; }
.round-preferences-actions { align-items: center; padding: 0; }
.change-request-panel { overflow: hidden; }
.change-request-fields { padding: 20px 24px; }
.change-request-fields textarea { width: 100%; margin-top: 7px; }
.weekend-unavailable-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 24px 20px; padding: 14px 16px; border: 1px solid #e6b7b2; border-radius: 12px; background: #fff5f3; }
.weekend-unavailable-form .weekend-unavailable-action { margin: 0 0 20px; }
.request-create-dialog .weekend-unavailable-form .weekend-unavailable-action { margin-inline: 18px; }
.weekend-unavailable-action span { color: #761d18; font-size: .8rem; font-weight: 800; }
.request-kind-badge { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; background: #fff0ee; color: #8b2720; font-size: .72rem; font-weight: 900; }
.league-progress-panel { margin-bottom: 24px; overflow: hidden; }
.league-progress-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font-size: .8rem; }
.league-progress-meta strong { color: var(--ink); }
.league-progress-form { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.league-progress-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.league-progress-help { flex-basis: 100%; color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.45; }
.league-match-actions { justify-content: flex-start; flex-wrap: wrap; }
.league-match-actions form { margin: 0; }
.league-match-actions .button { min-width: 170px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.checkbox-label input { width: auto; }
.request-list { display: grid; gap: 20px; }
.request-page-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.request-create-dialog { width: min(1180px, calc(100% - 28px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; overflow: auto; }
.request-create-dialog-heading { position: sticky; top: 0; z-index: 4; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); background: white; }
.request-create-help { margin: 16px 24px 0; }
.admin-request-team-picker { display: flex; align-items: end; gap: 14px; padding: 16px 24px 20px; }
.admin-request-team-picker label { width: min(100%, 420px); }
.admin-request-create-message { margin: 0 24px 20px; }
.admin-request-create-form { border-top: 1px solid var(--line); padding-top: 16px; }
.admin-request-create-form .request-matrix-heading { padding-top: 0; }
.admin-request-create-actions { padding: 0 24px 22px; }
.request-filter-panel { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; padding: 16px 18px; }
.request-filter-panel label { min-width: 220px; }
.request-filter-panel .button { min-height: 44px; }
.change-request-card { overflow: hidden; }
.change-request-meta { display: grid; gap: 7px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.change-request-meta p, .change-request-meta small { margin: 0; }
.change-request-meta small { color: var(--muted); }
.request-resolution-form { padding-top: 16px; }
.request-matrix-comparison { display: grid; gap: 18px; padding: 0 20px 18px; }
.request-matrix-comparison-readonly { padding-top: 18px; }
.request-matrix-comparison > section { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: white; }
.request-matrix-heading { padding: 14px 18px 5px; }
.request-matrix-heading .eyebrow { margin-bottom: 3px; }
.request-matrix-heading h3 { margin: 0; font-size: 1.05rem; }
.request-schedule-table { padding: 0 20px; }
.compact-venue-list { padding-top: 12px; }

.invite-box { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding: 18px; border: 1px solid #b9ddc5; border-radius: 14px; background: var(--green-soft); }
.invite-box > div { flex: 1; min-width: 0; }
.invite-box .eyebrow { color: #24603a; }
.invite-box input { background: rgba(255, 255, 255, .72); }
.admin-nav {
    display: flex;
    gap: 5px;
    width: fit-content;
    margin-bottom: 28px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: white;
}
.admin-nav-link {
    padding: 9px 14px;
    border-radius: 9px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}
.admin-nav-link:hover { background: var(--surface-soft); color: var(--ink); }
.admin-nav-link.is-active { background: var(--brand); color: white; }
.initial-entry-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding: 18px 20px; }
.initial-entry-toolbar .filter-bar { flex: 1; }
.initial-entry-toolbar .filter-bar label { width: min(100%, 460px); }
.initial-entry-toolbar select { width: 100%; }
.admin-initial-entry-form { gap: 24px; }
.admin-initial-entry-form .request-schedule-table { padding: 20px; }
.initial-entry-save-actions { align-items: center; padding: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card {
    display: grid;
    gap: 6px;
    min-height: 134px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 18px rgba(20, 43, 31, .035);
}
.metric-card span { color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.metric-card strong { align-self: end; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: .75rem; }
.matrix-panel { overflow: hidden; margin-bottom: 24px; }
.matrix-scroll { padding: 14px; max-height: 620px; }
.season-round-jump {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
}
.season-round-jump span { margin-right: 4px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.season-round-jump a {
    display: grid;
    place-items: center;
    min-width: 31px;
    height: 31px;
    padding: 0 7px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
}
.season-round-jump a:hover { background: var(--brand); color: white; }
.season-matrix-scroll { max-height: calc(100vh - 190px); scroll-behavior: smooth; }
.admin-matrix { border-spacing: 3px; width: max-content; min-width: 100%; font-size: .72rem; }
.admin-matrix th { min-width: 42px; padding: 7px 5px; color: var(--muted); text-align: center; }
.admin-matrix thead th { position: sticky; z-index: 6; top: 0; background: white; }
.admin-matrix thead tr:nth-child(2) th { top: 30px; }
.admin-matrix tbody th {
    position: sticky;
    z-index: 5;
    left: 0;
    min-width: 180px;
    padding: 7px 10px;
    background: white;
    color: var(--ink);
    text-align: left;
}
.matrix-rating { position: relative; min-width: 42px; height: 34px; border-radius: 7px; text-align: center; font-size: 0; font-weight: 900; }
.dashboard-content .matrix-scroll { padding-inline: 8px; }
.dashboard-matrix { border-spacing: 2px; }
.dashboard-matrix th { min-width: 41px; }
.dashboard-matrix .matrix-rating { min-width: 41px; height: 33px; }
.dashboard-matrix tbody th {
    min-width: 145px;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-matrix thead tr:first-child th:first-child { width: 145px; min-width: 145px; }
.dashboard-matrix.all-leagues-matrix tbody .dashboard-league-cell,
.dashboard-matrix.all-leagues-matrix thead tr:first-child th:first-child {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    padding-inline: 4px;
    white-space: normal;
}
.dashboard-matrix.all-leagues-matrix tbody .season-team-cell,
.dashboard-matrix.all-leagues-matrix thead tr:first-child th:nth-child(2) {
    left: 57px;
    width: 125px;
    min-width: 125px;
    max-width: 125px;
}
.matrix-rating.rating--1 { background: #f1f3f2; }
.season-matrix tbody .season-round-cell {
    left: 0;
    width: 74px;
    min-width: 74px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    text-align: center;
    vertical-align: top;
}
.season-round-cell strong { display: block; margin-top: 5px; font-size: 1rem; }
.season-round-cell small { display: block; font-size: .64rem; text-transform: uppercase; }
.season-matrix tbody .season-team-cell { left: 77px; min-width: 190px; }
.season-team-cell span,
.season-team-cell small { display: block; }
.season-team-cell small { margin-top: 3px; color: #a52f2a; font-size: .62rem; font-weight: 700; }
.season-matrix thead tr:first-child th:first-child { left: 0; z-index: 10; }
.season-matrix thead tr:first-child th:nth-child(2) { left: 77px; z-index: 10; }
.season-matrix tr.season-round-start > * { box-shadow: inset 0 3px 0 var(--line); }
.season-matrix tr[id] { scroll-margin-top: 64px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.teams-admin-grid { grid-template-columns: minmax(0, 1fr); }
.team-list { display: grid; gap: 12px; padding: 18px 20px 20px; }
.team-row { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.team-edit-form { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, .85fr) 42px; gap: 10px; align-items: end; }
.team-field { gap: 5px; color: var(--muted); font-size: .7rem; }
.team-edit-form input, .team-edit-form select { min-height: 40px; padding-block: 7px; }
.team-save-action { align-self: end; }
.team-save-action .button { width: 42px; min-height: 40px; padding-inline: 0; }
.team-row-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.team-delivery-meta, .team-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; }
.team-row-actions { justify-content: flex-end; }
.email-status { color: var(--muted); font-size: .7rem; }
.email-status-sent { color: #24603a; }
.email-status-failed { color: #a52f2a; }
.email-status-queued { color: #8c6508; }
.side-stack { display: grid; gap: 18px; }
.side-stack .panel:not(details) { padding-bottom: 20px; }
.side-stack .stack-form { padding: 0 20px; }
.delivery-panel { overflow: hidden; }
.delivery-scroll { overflow-x: auto; }
.delivery-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.delivery-table th, .delivery-table td { padding: 12px 16px; border-bottom: 1px solid #eef1ef; text-align: left; white-space: nowrap; }
.delivery-table th { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.delivery-table td:last-child { width: 100%; white-space: normal; color: var(--muted); }
.games-table .game-teams { min-width: 240px; white-space: normal; }
.games-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.games-day-toggle { width: 36px; min-height: 36px; padding: 8px; flex-shrink: 0; }
.games-round-heading .games-day-toggle { width: 25px; min-height: 25px; padding: 5px; }
.games-round-heading .games-day-toggle svg { width: 13px; height: 13px; }
.games-day-toggle[aria-pressed="true"], .games-day-toggle[aria-pressed="mixed"] { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); }
.games-day-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.games-day-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; }
.games-day-legend[hidden] { display: none; }
.games-day-legend > span { padding: 5px 8px; border-radius: 6px; color: var(--ink); }
.games-day-saturday, .games-round-group.has-day-colors tr[data-match-weekday="6"] > td { background: #e6f4e8; }
.games-day-sunday, .games-round-group.has-day-colors tr[data-match-weekday="7"] > td { background: #fff0df; }
.games-filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; padding: 16px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.games-filter-bar label { min-width: 180px; flex: 1; }
.games-filter-bar .button { min-height: 44px; }
.games-round-list { display: grid; gap: 18px; padding: 20px 24px 24px; background: #f7f9f8; }
.games-round-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 5px 18px rgba(16, 36, 27, .05); scroll-margin-top: 70px; }
.games-round-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #eef1f3; }
.games-round-heading > div { display: flex; align-items: center; gap: 9px; }
.games-round-heading span { color: var(--brand-dark); font-size: .63rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.games-round-heading h3 { margin: 0; color: var(--brand-dark); font-size: 1rem; }
.games-round-heading > strong { color: var(--muted); font-size: .72rem; }
.games-round-group .delivery-table tbody tr:last-child td { border-bottom: 0; }
.game-teams strong, .game-teams small { display: block; }
.mapping-warning { margin-top: 4px; color: #a52f2a; font-weight: 800; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; }
.status-sent { background: var(--green-soft); color: #24603a; }
.status-queued, .status-sending { background: var(--yellow-soft); color: #8c6508; }
.status-failed { background: var(--red-soft); color: #a52f2a; }
.empty-state { padding: 28px !important; color: var(--muted); text-align: center !important; }
.scheduler-page { display: grid; gap: 24px; }
.scheduler-explainer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.scheduler-explainer > div {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 3px 10px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
}
.scheduler-explainer span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: .78rem;
    font-weight: 900;
}
.scheduler-explainer strong { font-size: .84rem; }
.scheduler-explainer small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.scheduler-create-panel, .scheduler-history-panel, .scheduler-result-panel { overflow: hidden; }
.scheduler-quick-create { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; }
.scheduler-quick-create .button { min-width: 220px; }
.scheduler-quick-fields { display: grid; grid-template-columns: minmax(150px, 190px) minmax(190px, 230px); gap: 14px; }
.scheduler-quick-fields label { margin: 0; }
.scheduler-form { display: grid; gap: 0; padding: 0 24px 24px; }
.scheduler-step { display: grid; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.scheduler-step-heading { display: flex; align-items: flex-start; gap: 12px; }
.scheduler-step-heading > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    background: var(--brand);
    color: white;
    font-size: .78rem;
    font-weight: 900;
}
.scheduler-step-heading h3 { margin: 0; font-size: 1rem; }
.scheduler-step-heading p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.scheduler-basics { max-width: 720px; }
.scheduler-input-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scheduler-input-summary > div { display: grid; gap: 5px; padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.scheduler-input-summary small { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.scheduler-input-summary strong { overflow-wrap: anywhere; font-size: 1rem; }
.scheduler-input-note { margin: -4px 0 0; color: var(--muted); font-size: .78rem; }
.scheduler-input-note code, .scheduler-step-heading code { color: var(--brand-dark); }
.scheduler-slot-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-soft); }
.scheduler-slot-toolbar > span { margin-right: auto; color: var(--muted); font-size: .82rem; }
.scheduler-capacity-message { margin: -8px 0 0; color: var(--muted); font-size: .78rem; font-weight: 800; }
.scheduler-capacity-message.is-warning { color: #9a6410; }
.scheduler-capacity-message.is-ready { color: #24603a; }
.scheduler-day { display: grid; gap: 12px; }
.scheduler-day h3 { margin: 0; }
.scheduler-slot-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.scheduler-slot-group { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.scheduler-slot-group legend { padding: 0 6px; font-weight: 800; }
.scheduler-slot-group-actions { display: flex; justify-content: flex-end; gap: 10px; margin: -4px 0 10px; }
.scheduler-slot-group-actions button { padding: 0; border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: .7rem; font-weight: 800; }
.scheduler-slot-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 7px; }
.scheduler-slot-option { position: relative; min-width: 0; }
.scheduler-slot-option > input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.scheduler-slot-option > label { display: block; padding: 8px 6px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--muted); cursor: pointer; font-size: .75rem; font-weight: 800; text-align: center; }
.scheduler-slot-option > input[type="checkbox"]:checked + label { border-color: var(--brand); background: var(--brand); color: white; }
.scheduler-slot-option > input[type="checkbox"]:focus-visible + label { outline: 3px solid rgba(19, 119, 79, .2); outline-offset: 2px; }
.scheduler-slot-time-editor { display: none; width: 100%; min-width: 0; padding: 8px 6px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font: inherit; font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.scheduler-slot-time-editor:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(19, 119, 79, .14); outline: none; }
.scheduler-slot-remove { display: none; width: 100%; margin-top: 4px; padding: 2px 4px; border: 0; background: transparent; color: var(--red); cursor: pointer; font: inherit; font-size: .64rem; font-weight: 800; text-align: center; }
.scheduler-slot-remove:hover, .scheduler-slot-remove:focus-visible { color: #8f241d; text-decoration: underline; outline: none; }
.scheduler-slot-group.is-editing .scheduler-slot-option > label { display: none; }
.scheduler-slot-group.is-editing .scheduler-slot-time-editor { display: block; }
.scheduler-slot-group.is-editing .scheduler-slot-remove { display: block; }
.scheduler-slot-group.is-editing .scheduler-slot-option > input[type="checkbox"]:checked ~ .scheduler-slot-time-editor { border-color: rgba(19, 119, 79, .52); background: var(--brand-soft); }
.scheduler-slot-group.is-editing .scheduler-slot-option > input[type="checkbox"]:checked ~ .scheduler-slot-time-editor:focus { border-color: var(--brand); background: white; }
.scheduler-slot-group.is-editing { border-color: rgba(19, 119, 79, .35); background: rgba(236, 247, 240, .7); }
.scheduler-slot-group-actions [data-slot-group-edit][aria-pressed="true"] { color: var(--ink); }
.round-slot-panel { margin-top: 24px; scroll-margin-top: 24px; }
.weekend-slot-selector { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 0 24px 20px; }
.weekend-slot-selector label { display: grid; gap: 4px; margin: 0; }
.round-slot-form { display: grid; gap: 20px; padding: 0 24px 24px; }
.round-slot-panel .scheduler-slot-groups { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.round-slot-save { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border-radius: 14px; background: var(--brand-soft); }
.round-slot-save p { margin: 0; color: var(--brand-dark); font-size: .82rem; }
.scheduler-submit { padding-top: 4px; }
.scheduler-rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scheduler-rules-grid > div { display: grid; gap: 5px; padding: 14px; border-left: 3px solid var(--brand-soft); background: var(--surface-soft); }
.scheduler-rules-grid strong { font-size: .82rem; }
.scheduler-rules-grid small { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.scheduler-rules-panel { margin-top: 14px; overflow: hidden; }
.scheduler-rules-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; cursor: pointer; list-style: none; }
.scheduler-rules-summary::-webkit-details-marker { display: none; }
.scheduler-rules-summary > span { display: grid; gap: 3px; }
.scheduler-rules-summary strong { font-size: .92rem; }
.scheduler-rules-summary small { color: var(--muted); font-size: .76rem; }
.scheduler-rules-summary::after { content: '⌄'; color: var(--brand); font-size: 1.3rem; font-weight: 800; transition: transform .2s ease; }
.scheduler-rules-panel[open] .scheduler-rules-summary::after { transform: rotate(180deg); }
.scheduler-rules-summary:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.scheduler-rules-panel .scheduler-rules-grid { padding: 0 24px 24px; }
.scheduler-run-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border-radius: 14px; background: var(--brand-soft); }
.scheduler-run-summary > div { display: grid; gap: 4px; }
.scheduler-run-summary small { color: var(--brand-dark); font-size: .76rem; }
.scheduler-run-summary .button { flex: 0 0 auto; }
.scheduler-result-message { margin: 20px 24px; }
.scheduler-tabs { border-top: 1px solid var(--line); }
.scheduler-tab-list { display: flex; gap: 6px; padding: 14px 24px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.scheduler-tab-list button {
    flex: 0 0 auto;
    padding: 11px 14px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
}
.scheduler-tab-list button.is-active { border-bottom-color: var(--brand); color: var(--brand-dark); }
.scheduler-tab-list button:focus-visible { outline: 3px solid rgba(19, 119, 79, .2); outline-offset: -3px; }
.scheduler-tab-panel { padding: 20px 0 0; }
.scheduler-tab-panel[hidden] { display: none; }
.scheduler-tab-heading { padding: 0 24px 16px; }
.scheduler-tab-heading h3 { margin: 0; }
.scheduler-tab-heading p, .scheduler-empty-note { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }
.scheduler-empty-note { padding: 0 24px 24px; }
.scheduler-match-dialog { width: min(680px, calc(100% - 28px)); }
.scheduler-match-dialog form { display: grid; gap: 18px; }
.scheduler-match-dialog .form-actions { padding: 6px 0 0; }
.scheduler-change-history { padding: 6px 24px 24px; border-top: 1px solid var(--line); }
.scheduler-change-history h3 { margin: 18px 0 12px; }
.scheduler-board { display: grid; gap: 24px; padding: 0 24px 24px; }
.scheduler-day-block { display: grid; gap: 12px; }
.scheduler-day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
.scheduler-day-heading h4 { margin: 0; font-size: 1.08rem; }
.scheduler-day-heading span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.scheduler-court-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.scheduler-court-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.scheduler-court-card > h5 { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); background: white; font-size: .86rem; }
.scheduler-court-matches { display: grid; gap: 9px; padding: 10px; }
.scheduler-match-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.scheduler-match-card.has-empty-team { border-style: dashed; border-color: #d09c33; background: #fffaf0; }
.scheduler-match-meta { display: flex; align-items: flex-start; flex-direction: column; gap: 3px; padding-top: 4px; }
.scheduler-match-meta time { color: var(--brand-dark); font-size: .94rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.scheduler-match-meta span, .scheduler-match-meta small { color: var(--muted); font-size: .65rem; font-weight: 800; }
.scheduler-team-pair { display: grid; gap: 5px; min-width: 0; }
.scheduler-team-chip, .scheduler-empty-team { display: grid; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--ink); font: inherit; text-align: left; }
button.scheduler-team-chip, button.scheduler-empty-team { cursor: default; }
.scheduler-team-chip small, .scheduler-empty-team small { color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.scheduler-team-chip strong, .scheduler-empty-team strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.scheduler-empty-team { border-style: dashed; border-color: #d09c33; background: #fff7e7; color: #805300; }
.scheduler-move-button { grid-column: 1 / -1; justify-self: end; }
.scheduler-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 24px 18px; padding: 12px; border-radius: 12px; background: var(--surface-soft); }
.scheduler-editor-toolbar [data-team-editor-help] { margin-left: 4px; font-size: .75rem; }
.scheduler-editor[data-editor-mode="select"] button.scheduler-team-chip { border-color: rgba(19, 119, 79, .45); cursor: pointer; }
.scheduler-editor[data-editor-mode="select"] button.scheduler-team-chip:hover,
.scheduler-team-chip.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(19, 119, 79, .14); }
.scheduler-editor[data-editor-mode="assign"] .scheduler-pool-team:not(:disabled),
.scheduler-editor[data-editor-mode="assign"] .scheduler-empty-team { cursor: pointer; }
.scheduler-editor[data-editor-mode="assign"] .scheduler-empty-team:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.scheduler-editor[data-editor-mode="assign"] .scheduler-empty-team:disabled,
.scheduler-empty-team.is-unavailable { border-color: var(--line); background: #f1f3f2; color: var(--muted); cursor: not-allowed; opacity: .42; }
.scheduler-empty-team.is-drag-over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(19, 119, 79, .18); }
.scheduler-empty-team.is-selected-target { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(19, 119, 79, .18); }
.scheduler-match-card.has-unavailable-empty-team { opacity: .72; }
.scheduler-team-pools { display: grid; gap: 12px; margin: 0 24px 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.scheduler-pool-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.scheduler-pool-heading p, .scheduler-pool-heading h4 { margin: 0; }
.scheduler-pool-heading span { color: var(--muted); font-size: .74rem; font-weight: 800; }
.scheduler-pool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scheduler-pool-list { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.scheduler-pool-list h5 { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: .8rem; }
.scheduler-pool-list h5 span { display: grid; place-items: center; min-width: 23px; height: 23px; border-radius: 999px; background: white; color: var(--brand-dark); font-size: .68rem; }
.scheduler-pool-list > p { min-height: 34px; margin: 5px 0 10px; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.scheduler-pool-teams { display: grid; gap: 6px; }
.scheduler-pool-team { display: grid; gap: 2px; width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font: inherit; text-align: left; }
.scheduler-pool-team strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.scheduler-pool-team small { color: var(--muted); font-size: .62rem; }
.scheduler-pool-team:disabled { opacity: .58; cursor: not-allowed; }
.scheduler-pool-team.is-unavailable { background: #f1f3f2; }
.scheduler-pool-team.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(19, 119, 79, .14); }
.scheduler-editor[data-editor-mode="assign"] .scheduler-pool-team { cursor: grab; }
.scheduler-pool-team.is-dragging { cursor: grabbing; opacity: .55; }
.scheduler-pool-empty { padding: 8px 0; color: var(--muted); font-size: .68rem; }
.scheduler-assignment-footer { position: sticky; z-index: 8; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid rgba(19, 119, 79, .28); border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 12px 34px rgba(16, 36, 27, .16); backdrop-filter: blur(8px); }
.scheduler-assignment-footer span { color: var(--ink); font-size: .76rem; font-weight: 800; line-height: 1.45; }
.scheduler-assignment-footer .button { flex: 0 0 auto; }
.scheduler-team-category-dialog, .scheduler-assign-dialog { width: min(600px, calc(100% - 28px)); }
.scheduler-category-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 16px 0; }
.scheduler-category-option { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.scheduler-category-option:hover, .scheduler-category-option:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.scheduler-category-option strong { font-size: .8rem; }
.scheduler-category-option small { color: var(--muted); font-size: .68rem; }
.scheduler-history-table td:last-child { width: auto; min-width: 220px; }
.scheduler-history-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.scheduler-result-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0 24px 20px;
}
.scheduler-result-meta > div { padding: 13px 15px; border-radius: 12px; background: var(--surface-soft); }
.scheduler-result-meta dt { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.scheduler-result-meta dd { margin: 5px 0 0; color: var(--ink); font-size: .86rem; font-weight: 800; }
.scheduler-wait-overlay {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 36, 27, .72);
    backdrop-filter: blur(5px);
}
.scheduler-wait-overlay[hidden] { display: none; }
.scheduler-wait-card {
    display: grid;
    justify-items: center;
    width: min(100%, 440px);
    padding: 38px 32px;
    border-radius: 22px;
    background: white;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .24);
    text-align: center;
}
.scheduler-wait-card h2 { margin: 20px 0 8px; }
.scheduler-wait-card p { margin: 0; color: var(--ink); font-weight: 800; }
.scheduler-wait-card small { margin-top: 10px; color: var(--muted); line-height: 1.5; }
.scheduler-spinner {
    width: 54px;
    height: 54px;
    border: 5px solid var(--green-soft);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: scheduler-spin .8s linear infinite;
}
@keyframes scheduler-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .scheduler-spinner { animation-duration: 1.8s; }
}

@media (max-width: 900px) {
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .team-edit-form { grid-template-columns: 1fr 1fr; }
    .team-save-action { align-self: end; justify-self: end; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .round-picker, .filter-bar { width: 100%; }
    .round-list { align-items: flex-start; flex-direction: column; }
    .round-list-links { justify-content: flex-start; max-width: none; }
    .admin-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .admin-heading-actions > form:last-child .button { width: 100%; }
    .filter-bar label { flex: 1; }
    .panel-header { align-items: flex-start; flex-direction: column; }
    .scheduler-explainer { grid-template-columns: 1fr 1fr; }
    .scheduler-input-summary { grid-template-columns: 1fr 1fr; }
    .scheduler-result-meta { grid-template-columns: 1fr 1fr; }
    .scheduler-pool-grid { grid-template-columns: 1fr 1fr; }
    .venue-rating-row { align-items: flex-start; flex-direction: column; }
    .league-progress-form { align-items: stretch; flex-direction: column; }
    .league-match-actions .button, .league-match-actions form { width: 100%; }
}

@media (max-width: 620px) {
    .team-view-tabs { display: grid; grid-template-columns: 1fr 1fr; }
    .team-view-tab { display: grid; place-items: center; min-height: 50px; padding: 8px; text-align: center; }
    .content { width: min(100% - 28px, 1440px); padding-top: 28px; }
    .topbar { padding-inline: 14px; }
    .user-identity { display: none; }
    .user-menu-popover { width: 200px; }
    .auth-card { padding: 26px 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .filter-bar label:only-of-type { grid-column: 1 / -1; }
    .admin-nav { width: 100%; overflow-x: auto; }
    .admin-nav-link { flex: 1 0 auto; text-align: center; }
    .initial-entry-toolbar { align-items: stretch; flex-direction: column; }
    .initial-entry-toolbar .filter-bar, .initial-entry-toolbar .filter-bar label { width: 100%; }
    .metric-grid { grid-template-columns: 1fr; }
    .schedule-scroll { padding: 14px 8px; }
    .round-list-panel { padding: 14px; }
    .round-list-links { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; overflow: visible; padding-bottom: 0; }
    .round-link { min-width: 0; width: 100%; }
    .form-actions, .invite-box { align-items: stretch; flex-direction: column; }
    .team-edit-form { grid-template-columns: 1fr; }
    .team-save-action { justify-self: stretch; }
    .team-save-action .button { width: 100%; }
    .team-row-footer { align-items: stretch; flex-direction: column; }
    .team-row-actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; }
    .team-row-actions .button { width: 100%; }
    .form-actions .button { flex: 1; }
    .venue-rating-scale { width: 100%; grid-template-columns: repeat(5, 1fr); }
    .venue-rating-option { width: 100%; }
    .request-filter-panel { align-items: stretch; flex-direction: column; }
    .request-filter-panel label, .request-filter-panel .button { width: 100%; }
    .games-filter-bar { align-items: stretch; flex-direction: column; }
    .games-filter-bar label, .games-filter-bar .button { width: 100%; }
    .games-round-list { padding: 14px; }
    .games-round-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .scheduler-explainer, .scheduler-input-summary, .scheduler-rules-grid { grid-template-columns: 1fr; }
    .scheduler-run-summary { align-items: stretch; flex-direction: column; }
    .scheduler-run-summary .button { width: 100%; }
    .scheduler-quick-create { align-items: stretch; flex-direction: column; }
    .scheduler-quick-create .button { width: 100%; }
    .scheduler-quick-fields { grid-template-columns: 1fr; }
    .round-slot-save { align-items: stretch; flex-direction: column; }
    .round-slot-save .button { width: 100%; }
    .scheduler-result-meta { grid-template-columns: 1fr; }
    .scheduler-board { padding-inline: 14px; }
    .scheduler-court-grid { grid-template-columns: 1fr; }
    .scheduler-editor-toolbar, .scheduler-team-pools { margin-inline: 14px; }
    .scheduler-pool-grid, .scheduler-category-options { grid-template-columns: 1fr; }
    .scheduler-assignment-footer { align-items: stretch; flex-direction: column; }
    .scheduler-assignment-footer .button { width: 100%; }
}

@media (max-width: 380px) {
    .round-list-links { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
