:root {
    color-scheme: light;
    --bg: #0d1f1a;
    --panel: #ffffff;
    --ink: #17201d;
    --muted: #66736e;
    --line: #dfe7e3;
    --accent: #1f6a4f;
    --accent-dark: #15523d;
    --danger-bg: #fff0f0;
    --danger-ink: #8c1d1d;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #f4f7f5;
}

.auth-page {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(145deg, #0a1714, var(--bg));
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 430px);
    padding: 34px;
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #e7f2ed;
    font-size: 26px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(1.8rem, 5vw, 2.35rem);
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.subtle,
.field-help {
    color: var(--muted);
}

form {
    display: grid;
    gap: 12px;
}

label {
    margin-top: 8px;
    font-size: 0.92rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input:focus {
    outline: 3px solid rgba(31, 106, 79, 0.18);
    border-color: var(--accent);
}

button {
    min-height: 48px;
    margin-top: 10px;
    padding: 11px 17px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    background: var(--accent-dark);
}

.button-secondary {
    min-height: 42px;
    margin: 0;
    background: #fff;
    color: var(--accent-dark);
}

.alert {
    margin: 20px 0 12px;
    padding: 13px 14px;
    border-radius: 9px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-ink);
}

.field-help {
    margin: -7px 0 3px;
    font-size: 0.82rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px clamp(20px, 5vw, 64px);
    background: var(--bg);
    color: #fff;
}

.topbar h1 {
    margin: 0;
    font-size: 1.65rem;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 38px auto;
}

.welcome-card {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.dashboard-card {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.dashboard-card span {
    color: var(--muted);
}

.dashboard-card strong {
    font-size: 1.1rem;
}

.dashboard-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

@media (max-width: 850px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .auth-card {
        padding: 26px 21px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Player administration */
select {
    width: 100%;
    min-height: 48px;
    padding: 11px 38px 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

select:focus {
    outline: 3px solid rgba(31, 106, 79, 0.18);
    border-color: var(--accent);
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 17px;
    border-radius: 9px;
    font-weight: 800;
    text-decoration: none;
}

.button-primary {
    background: var(--accent);
    color: #fff;
}

.button-primary:hover {
    background: var(--accent-dark);
}

.button-muted {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.button-muted:hover {
    border-color: var(--accent);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-actions form,
.row-actions form {
    display: inline-flex;
    gap: 0;
}

.admin-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 34px auto 60px;
}

.form-shell {
    width: min(900px, calc(100% - 40px));
    margin: 34px auto 60px;
}

.page-heading,
.panel-heading,
.form-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-heading {
    margin-bottom: 22px;
}

.page-heading h2,
.panel-heading h2,
.form-card-heading h2 {
    margin-bottom: 7px;
}

.page-heading p,
.panel-heading p,
.form-card-heading p {
    margin-bottom: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card,
.panel,
.form-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.stat-card {
    padding: 18px 20px;
}

.stat-card span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card strong {
    font-size: 1.8rem;
}

.panel {
    margin-bottom: 20px;
    padding: 20px;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-panel .panel-heading {
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.filter-form {
    display: flex;
    align-items: end;
    gap: 14px;
}

.filter-form button {
    min-width: 120px;
    margin: 0;
}

.filter-field {
    min-width: 180px;
}

.filter-search {
    flex: 1;
}

.filter-field label {
    display: block;
    margin: 0 0 7px;
}

.filter-clear {
    align-self: center;
    margin-top: 23px;
}

.text-link {
    color: var(--accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.text-link:hover {
    text-decoration-thickness: 2px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #f8faf9;
    color: #4d5a55;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fbfcfb;
}

.actions-column {
    width: 220px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid #cbd8d2;
    border-radius: 8px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

button.small-button:hover,
a.small-button:hover {
    background: #edf5f1;
}

.small-button-danger {
    border-color: #eccaca;
    color: #8c1d1d;
}

button.small-button-danger:hover {
    background: #fff0f0;
}

.small-button-success {
    border-color: #badbc9;
    color: #17633f;
}

button.small-button-success:hover {
    background: #edf8f2;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-active {
    background: #e7f5ed;
    color: #17633f;
}

.status-inactive {
    background: #f0f1f1;
    color: #626b68;
}

.alert-success {
    background: #e7f5ed;
    color: #17633f;
}

.muted-dash {
    color: var(--muted);
    font-size: 0.9rem;
}

.empty-state {
    padding: 52px 20px;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin-bottom: 20px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 17px 20px;
    border-top: 1px solid var(--line);
}

.pagination a {
    color: var(--accent-dark);
    font-weight: 800;
}

.pagination span {
    color: var(--muted);
}

.form-card {
    padding: 28px;
}

.form-card-heading {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.admin-form {
    gap: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
}

.field-group {
    min-width: 0;
}

.field-group label:not(.checkbox-label) {
    display: block;
    margin: 0 0 7px;
}

.field-group .field-help {
    margin: 7px 0 0;
}

.field-error {
    margin: 7px 0 0;
    color: var(--danger-ink);
    font-size: 0.84rem;
    font-weight: 700;
}

.checkbox-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 13px 0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
}

.checkbox-label input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: var(--accent);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-top: 4px;
}

.form-actions button {
    min-width: 140px;
    margin: 0;
}

@media (max-width: 760px) {
    .page-heading,
    .panel-heading,
    .form-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stat-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .filter-form {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-field {
        width: 100%;
    }

    .filter-clear {
        align-self: flex-start;
        margin-top: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        padding: 10px 0;
        border-bottom: 1px solid var(--line);
    }

    .data-table tr:last-child {
        border-bottom: 0;
    }

    .data-table td {
        display: grid;
        grid-template-columns: 105px 1fr;
        gap: 10px;
        padding: 8px 18px;
        border: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .row-actions {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .admin-shell,
    .form-shell {
        width: min(100% - 24px, 1240px);
        margin-top: 20px;
    }

    .form-card {
        padding: 20px 17px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions button,
    .form-actions .button-link {
        width: 100%;
    }

    .data-table td {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Player form layout correction - 2026-07-13 */
.topbar .eyebrow {
    color: #b9e0cf;
}

.form-card-heading {
    display: block;
    margin-bottom: 24px;
    padding-bottom: 20px;
}

.form-card-heading h2 {
    margin: 0 0 7px;
}

.form-card-heading p {
    max-width: 680px;
    margin: 0;
    line-height: 1.5;
}

.admin-form {
    display: block;
}

.form-grid {
    column-gap: 24px;
    row-gap: 22px;
}

.field-group label:not(.checkbox-label) {
    line-height: 1.35;
}

.field-group input:not([type="checkbox"]) {
    display: block;
}

.field-group input[aria-invalid="true"] {
    border-color: #b42318;
}

.checkbox-field {
    align-self: stretch;
    justify-content: center;
    min-height: 96px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8faf9;
}

.checkbox-field .field-help {
    margin-left: 30px;
    line-height: 1.45;
}

.form-actions {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-actions .button-link {
    min-width: 110px;
}

@media (max-width: 760px) {
    .form-card-heading {
        display: block;
    }

    .checkbox-field {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .topbar .button-link {
        width: 100%;
    }

    .form-card-heading {
        margin-bottom: 20px;
        padding-bottom: 17px;
    }

    .checkbox-field .field-help {
        margin-left: 0;
    }
}

/* Player directory layout alignment - 2026-07-13 */
.directory-shell {
    width: min(1120px, calc(100% - 40px));
}

.directory-card {
    padding: 28px;
}

.directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.directory-heading h2 {
    margin: 0 0 7px;
}

.directory-heading p {
    max-width: 720px;
    margin: 0;
    line-height: 1.5;
}

.directory-heading .button-link {
    flex: 0 0 auto;
}

.directory-card .stat-grid {
    margin-bottom: 20px;
}

.directory-filter {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8faf9;
}

.directory-table {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.directory-table .panel-heading {
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.directory-table .pagination {
    background: #f8faf9;
}

@media (max-width: 760px) {
    .directory-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .directory-heading .button-link {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .directory-shell {
        width: min(100% - 24px, 1120px);
    }

    .directory-card {
        padding: 20px 17px;
    }

    .directory-filter {
        padding: 17px;
    }

    .directory-table .panel-heading {
        padding: 17px;
    }

    .directory-table .data-table td {
        padding-left: 17px;
        padding-right: 17px;
    }
}

/* Substitute player list - 2026-07-13 */
.player-options {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.player-options .checkbox-field {
    min-height: 104px;
    margin: 0;
}

.substitute-directory {
    margin-top: 22px;
}

.substitute-directory .panel-heading {
    align-items: center;
}

.add-sub-button {
    flex: 0 0 auto;
}

.compact-empty-state {
    padding-top: 36px;
    padding-bottom: 36px;
}

.inline-status {
    display: inline-flex;
    margin-left: 8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f0f1f1;
    color: #626b68;
    font-size: 0.7rem;
    font-weight: 800;
    vertical-align: middle;
}

.inactive-row {
    background: #fafafa;
    color: #707a76;
}

@media (max-width: 760px) {
    .player-options {
        grid-template-columns: 1fr;
    }

    .substitute-directory .panel-heading {
        align-items: stretch;
    }

    .add-sub-button {
        width: 100%;
    }
}

/* Multiple administrator management - 2026-07-13 */
.admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
}

.admin-table th,
.admin-table td {
    vertical-align: middle;
}

.admin-table td:nth-child(2) {
    overflow-wrap: anywhere;
}

.single-option {
    grid-template-columns: minmax(0, 1fr);
}

.security-note {
    margin-top: 22px;
    padding: 15px 17px;
    border: 1px solid #cfe2d9;
    border-radius: 10px;
    background: #f0f7f4;
    color: #28483c;
    line-height: 1.5;
}

.security-note a {
    color: var(--accent-dark);
    font-weight: 800;
}

@media (max-width: 560px) {
    .admin-stat-grid {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

/* Administrator-to-player account link - 2026-07-13 */
.form-grid-full {
    grid-column: 1 / -1;
}

.admin-table td[data-label="Player"] strong {
    display: inline-block;
    margin-right: 6px;
}

@media (max-width: 760px) {
    .form-grid-full {
        grid-column: auto;
    }
}

/* Team management - 2026-07-13 */
.team-directory-shell,
.team-form-shell {
    width: min(1080px, calc(100% - 40px));
}

.team-season-filter {
    margin-bottom: 20px;
}

.team-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-table td:nth-child(2) {
    min-width: 320px;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.member-chip,
.assignment-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef4f1;
    color: #29483c;
    font-size: 0.78rem;
    font-weight: 800;
}

.assignment-badge {
    background: #fff3d6;
    color: #795300;
}

.assignment-current {
    background: #e7f5ed;
    color: #17633f;
}

.team-detail-grid {
    margin-bottom: 26px;
}

.readonly-field {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f8faf9;
    color: var(--ink);
    font-weight: 700;
}

.player-assignment-panel {
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.player-assignment-panel > .panel-heading {
    padding: 19px 20px;
    border-bottom: 1px solid var(--line);
    background: #f8faf9;
}

.player-assignment-panel > .alert {
    margin: 16px 20px;
}

.assignment-table-wrap {
    max-height: 520px;
    overflow: auto;
}

.assignment-table th:first-child,
.assignment-table td:first-child {
    width: 76px;
    text-align: center;
}

.row-checkbox {
    width: 21px;
    min-height: 21px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.row-checkbox:disabled {
    cursor: not-allowed;
}

.unavailable-player-row {
    background: #fafafa;
    color: #707a76;
}

@media (max-width: 900px) {
    .team-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .team-table td:nth-child(2) {
        min-width: 0;
    }

    .assignment-table th:first-child,
    .assignment-table td:first-child {
        width: auto;
        text-align: left;
    }

    .assignment-table-wrap {
        max-height: none;
    }
}

@media (max-width: 560px) {
    .team-directory-shell,
    .team-form-shell {
        width: min(100% - 24px, 1080px);
    }

    .team-stat-grid {
        grid-template-columns: 1fr;
    }
}


/* Senior player designation - 2026-07-13 */
.player-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.designation-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e8eef8;
    color: #254a78;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .player-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .player-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Weekly match administration - 2026-07-13 */
.matches-shell,
.match-form-shell {
    width: min(1080px, calc(100% - 40px));
}

.match-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.match-week-selector {
    display: flex;
    align-items: end;
    gap: 14px;
    margin: 22px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8faf9;
}

.match-week-selector .filter-field {
    flex: 1;
}

.match-week-selector button {
    min-width: 130px;
    margin: 0;
}

.week-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.week-summary-card {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.week-summary-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.week-summary-heading h2 {
    margin-bottom: 0;
}

.week-summary-heading .eyebrow {
    margin-bottom: 6px;
}

.week-status-form {
    display: block;
}

.week-status-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.week-status-actions button {
    min-width: 140px;
    margin: 0;
}

.match-directory {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.match-directory > .panel-heading {
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.match-table td:first-child {
    min-width: 230px;
}

.match-versus {
    display: inline-block;
    margin: 0 5px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.match-row-note {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.82rem;
}

.match-empty-state {
    padding-top: 42px;
    padding-bottom: 42px;
}

.status-scheduled {
    background: #e8eef8;
    color: #254a78;
}

.status-progress {
    background: #fff3d6;
    color: #795300;
}

.status-postponed {
    background: #fff3d6;
    color: #795300;
}

.status-cancelled {
    background: #fff0f0;
    color: #8c1d1d;
}

@media (max-width: 760px) {
    .match-week-selector {
        align-items: stretch;
        flex-direction: column;
    }

    .match-week-selector button {
        width: 100%;
    }

    .week-summary-heading {
        flex-direction: column;
    }

    .week-status-actions {
        justify-content: stretch;
    }

    .week-status-actions button {
        width: 100%;
    }

    .match-table td:first-child {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .matches-shell,
    .match-form-shell {
        width: min(100% - 24px, 1080px);
    }

    .match-stat-grid {
        grid-template-columns: 1fr;
    }

    .week-navigation .button-link {
        min-width: 0;
        padding-right: 12px;
        padding-left: 12px;
        font-size: 0.86rem;
    }
}

/* Match score entry - 2026-07-13 */
.match-team-score {
    display: block;
    white-space: nowrap;
}

.match-team-score + .match-team-score {
    margin-top: 4px;
}

.score-entry-shell {
    width: min(1180px, calc(100% - 40px));
}

.score-entry-form {
    display: block;
}

.match-settings-card {
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8faf9;
}

.match-settings-card .panel-heading {
    margin-bottom: 18px;
}

.team-scorecard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.team-scorecard {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.team-scorecard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    background: #f8faf9;
}

.team-scorecard-heading h2,
.team-scorecard-heading .eyebrow {
    margin-bottom: 0;
}

.team-scorecard-heading .eyebrow {
    margin-bottom: 5px;
}

.team-total-box {
    min-width: 104px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    text-align: center;
}

.team-total-box span {
    display: block;
    margin-bottom: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.team-total-box strong {
    font-size: 1.6rem;
    line-height: 1;
}

.score-table-wrap {
    overflow-x: auto;
}

.score-entry-table {
    margin: 0;
}

.score-entry-table th:last-child,
.score-entry-table td:last-child {
    width: 150px;
}

.gross-score-input {
    width: 100%;
    min-width: 92px;
    margin: 0;
    text-align: center;
    font-weight: 700;
}

.team-score-count {
    margin: 0;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.compact-empty-state {
    padding: 28px 20px;
}

.score-help {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .team-scorecard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .score-entry-shell {
        width: min(100% - 24px, 1180px);
    }

    .team-scorecard-heading {
        align-items: flex-start;
    }

    .team-total-box {
        min-width: 92px;
    }

    .score-entry-table th:last-child,
    .score-entry-table td:last-child {
        width: auto;
    }

    .gross-score-input {
        max-width: 130px;
    }
}

/* Thursday Night Mens Golf League logo - 2026-07-13 */
.auth-card {
    width: min(100%, 480px);
}

.auth-logo {
    display: block;
    width: min(100%, 285px);
    height: auto;
    margin: 0 auto 22px;
    border-radius: 12px;
}

.topbar-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-title {
    min-width: 0;
}

.topbar-title .eyebrow {
    margin-bottom: 6px;
}

.topbar-logo {
    width: 150px;
    height: auto;
    flex: 0 0 auto;
    display: block;
    padding: 5px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

@media (max-width: 760px) {
    .topbar-logo {
        width: 125px;
    }

    .topbar-brand {
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .topbar {
        width: 100%;
    }

    .topbar-brand {
        width: 100%;
        align-items: center;
    }

    .topbar-logo {
        width: 108px;
        border-radius: 10px;
    }

    .topbar-title h1 {
        font-size: 1.35rem;
    }

    .topbar-title .eyebrow {
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }

    .auth-logo {
        width: min(100%, 240px);
        margin-bottom: 18px;
    }
}

/* Temporary all-player weekly score entry - 2026-07-13 */
.weekly-score-shell {
    width: min(1280px, calc(100% - 40px));
}

.weekly-score-card {
    max-width: none;
}

.weekly-score-week-selector {
    display: flex;
    align-items: end;
    gap: 14px;
    margin: 22px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8faf9;
}

.weekly-score-week-selector .filter-field {
    flex: 1;
}

.weekly-score-week-selector button {
    min-width: 130px;
    margin: 0;
}

.weekly-score-week-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.weekly-score-week-heading h2,
.weekly-score-week-heading .eyebrow,
.weekly-score-week-heading .subtle {
    margin-bottom: 0;
}

.weekly-score-week-heading .eyebrow {
    margin-bottom: 6px;
}

.weekly-score-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.weekly-score-form {
    display: block;
}

.weekly-score-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: end;
    gap: 16px;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(8px);
}

.weekly-score-search-field {
    flex: 1;
}

.weekly-score-toolbar button {
    min-width: 210px;
    margin: 0;
}

.weekly-score-table-wrap {
    max-height: none;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.weekly-score-table {
    margin: 0;
}

.weekly-score-table thead th {
    position: sticky;
    top: 88px;
    z-index: 4;
    background: #f1f5f3;
    box-shadow: inset 0 -1px 0 var(--line);
}

.weekly-score-table td:first-child {
    min-width: 220px;
}

.weekly-score-table td:nth-child(3) {
    min-width: 145px;
}

.weekly-score-table td:nth-child(4),
.weekly-score-table td:nth-child(5),
.weekly-score-table td:nth-child(6) {
    width: 130px;
}

.weekly-gross-input,
.weekly-handicap-input,
.weekly-team-select {
    width: 100%;
    min-width: 92px;
    margin: 0;
}

.weekly-gross-input,
.weekly-handicap-input {
    text-align: center;
    font-weight: 700;
}

.weekly-net-score {
    display: inline-block;
    min-width: 42px;
    font-size: 1.05rem;
    text-align: center;
}

.weekly-score-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8faf9;
}

.weekly-score-save-bar p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.weekly-score-save-bar button {
    min-width: 210px;
    margin: 0;
    flex: 0 0 auto;
}

.substitute-badge {
    background: #fff3d6;
    color: #795300;
}

tr[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .weekly-score-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-score-table thead th {
        top: 88px;
    }
}

@media (max-width: 760px) {
    .weekly-score-week-selector,
    .weekly-score-toolbar,
    .weekly-score-save-bar,
    .weekly-score-week-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .weekly-score-week-selector button,
    .weekly-score-toolbar button,
    .weekly-score-save-bar button {
        width: 100%;
    }

    .weekly-score-toolbar {
        position: static;
    }

    .weekly-score-table thead th {
        position: static;
    }
}

@media (max-width: 560px) {
    .weekly-score-shell {
        width: min(100% - 24px, 1280px);
    }

    .weekly-score-stats {
        grid-template-columns: 1fr;
    }

    .weekly-score-table td:first-child,
    .weekly-score-table td:nth-child(3),
    .weekly-score-table td:nth-child(4),
    .weekly-score-table td:nth-child(5),
    .weekly-score-table td:nth-child(6) {
        width: auto;
        min-width: 0;
    }

    .weekly-gross-input,
    .weekly-handicap-input,
    .weekly-team-select {
        max-width: 170px;
    }
}

/* Compact Weekly Score Entry layout - 2026-07-13 */
.weekly-score-card {
    padding: 22px;
}

.weekly-score-card > .directory-heading {
    margin-bottom: 10px;
}

.weekly-score-card > .directory-heading h2 {
    font-size: 1.35rem;
}

.weekly-score-card > .directory-heading .subtle {
    font-size: 0.82rem;
    line-height: 1.35;
}

.weekly-score-week-selector {
    gap: 10px;
    margin: 14px 0;
    padding: 10px 12px;
}

.weekly-score-week-selector label,
.weekly-score-toolbar label {
    margin-bottom: 4px;
    font-size: 0.72rem;
}

.weekly-score-week-selector select,
.weekly-score-toolbar input {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.82rem;
}

.weekly-score-week-selector button,
.weekly-score-toolbar button {
    min-height: 34px;
    padding: 7px 13px;
    font-size: 0.78rem;
}

.weekly-score-week-heading {
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.weekly-score-week-heading h2 {
    font-size: 1.2rem;
}

.weekly-score-week-heading .eyebrow,
.weekly-score-week-heading .subtle {
    font-size: 0.72rem;
}

.weekly-score-stats {
    gap: 8px;
    margin-bottom: 12px;
}

.weekly-score-stats .stat-card {
    min-height: 68px;
    padding: 10px 12px;
}

.weekly-score-stats .stat-card span {
    font-size: 0.67rem;
}

.weekly-score-stats .stat-card strong {
    font-size: 1.25rem;
}

.weekly-score-toolbar {
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 9px;
}

.weekly-score-table-wrap {
    border-radius: 9px;
}

.weekly-score-table {
    font-size: 0.78rem;
    line-height: 1.15;
}

.weekly-score-table th,
.weekly-score-table td {
    padding: 6px 8px;
}

.weekly-score-table th {
    font-size: 0.65rem;
    letter-spacing: 0.035em;
}

.weekly-score-table thead th {
    top: 62px;
}

.weekly-score-table td:first-child {
    min-width: 175px;
}

.weekly-score-table td:nth-child(3) {
    min-width: 112px;
}

.weekly-score-table td:nth-child(4),
.weekly-score-table td:nth-child(5),
.weekly-score-table td:nth-child(6) {
    width: 96px;
}

.weekly-score-table td strong {
    font-size: 0.8rem;
}

.weekly-score-table .designation-badge,
.weekly-score-table .status-badge {
    padding: 2px 5px;
    font-size: 0.59rem;
}

.weekly-team-select,
.weekly-gross-input,
.weekly-handicap-input {
    min-width: 72px;
    min-height: 30px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.76rem;
    line-height: 1;
}

.weekly-team-select {
    min-width: 104px;
}

.weekly-net-score {
    min-width: 28px;
    font-size: 0.88rem;
}

.weekly-score-table .field-error {
    margin-top: 3px;
    font-size: 0.65rem;
    line-height: 1.15;
}

.weekly-score-save-bar {
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 9px;
}

.weekly-score-save-bar p {
    font-size: 0.72rem;
    line-height: 1.3;
}

.weekly-score-save-bar button {
    min-width: 180px;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.78rem;
}

@media (max-width: 760px) {
    .weekly-score-card {
        padding: 15px 11px;
    }

    .weekly-score-table {
        font-size: 0.75rem;
    }

    .weekly-score-table td {
        padding: 5px 7px;
    }

    .weekly-score-table td::before {
        font-size: 0.61rem;
    }

    .weekly-team-select,
    .weekly-gross-input,
    .weekly-handicap-input {
        min-height: 29px;
        padding: 3px 5px;
        font-size: 0.74rem;
    }
}

@media (max-width: 560px) {
    .weekly-score-card > .directory-heading h2 {
        font-size: 1.18rem;
    }

    .weekly-score-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-score-stats .stat-card {
        min-height: 60px;
    }

    .weekly-team-select,
    .weekly-gross-input,
    .weekly-handicap-input {
        max-width: 135px;
    }
}

/* Team Points on Weekly Score Entry - 2026-07-13 */
.weekly-team-points-card {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.weekly-team-points-heading {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: #f8faf9;
}

.weekly-team-points-heading h3 {
    margin: 0 0 2px;
    font-size: 0.95rem;
}

.weekly-team-points-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.7rem;
}

.weekly-team-points-table {
    margin: 0;
    font-size: 0.76rem;
}

.weekly-team-points-table th,
.weekly-team-points-table td {
    padding: 5px 8px;
}

.weekly-team-points-table th {
    font-size: 0.63rem;
    letter-spacing: 0.035em;
}

.weekly-team-points-table td:first-child {
    min-width: 170px;
}

.team-points-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.team-points-input-wrap span {
    min-width: 48px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.weekly-team-points-input {
    width: 72px;
    min-height: 28px;
    margin: 0;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.weekly-team-points-total {
    display: inline-block;
    min-width: 30px;
    font-size: 0.85rem;
    text-align: center;
}

.team-points-total-valid .weekly-team-points-total {
    color: #17633a;
}

.team-points-total-invalid .weekly-team-points-total {
    color: #9b1c1c;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 760px) {
    .weekly-team-points-table td:first-child {
        min-width: 0;
    }

    .team-points-input-wrap {
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .weekly-team-points-input {
        width: 82px;
    }
}

/* Disabled rainout and future week options - 2026-07-13 */
select option.week-option-locked,
select option:disabled {
    color: #8a928e;
    background: #ecefed;
}

.alert-info {
    border-color: #b7c5bf;
    background: #eef3f1;
    color: #42524b;
}

/* Matches current-week and team-points update - 2026-07-13 */
.match-team-points {
    display: block;
    white-space: nowrap;
    font-size: 0.92rem;
}

.match-team-points + .match-team-points {
    margin-top: 5px;
}

.match-team-points strong {
    display: inline-block;
    min-width: 34px;
    text-align: right;
}

.team-points-entry-box {
    min-width: 128px;
    text-align: right;
}

.team-points-entry-box label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.match-team-points-input {
    width: 92px;
    min-height: 36px;
    margin: 0;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
}

.team-points-entry-box .field-error {
    max-width: 170px;
    margin: 4px 0 0 auto;
    text-align: right;
}

@media (max-width: 560px) {
    .team-points-entry-box {
        min-width: 105px;
    }

    .match-team-points-input {
        width: 82px;
    }
}

/* Aligned Team Points column - 2026-07-13 */
.team-points-column {
    width: 150px;
}

.match-points-grid {
    display: inline-grid;
    grid-template-columns: minmax(62px, auto) 42px;
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    min-width: 116px;
}

.match-points-team {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.match-points-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 28px;
    padding: 3px 7px;
    border: 1px solid #d5dfda;
    border-radius: 7px;
    background: #f8faf9;
    color: var(--text);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    text-align: center;
}

@media (max-width: 760px) {
    .team-points-column {
        width: 100%;
    }

    .match-points-grid {
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .match-points-grid {
        grid-template-columns: minmax(58px, auto) 40px;
        column-gap: 8px;
    }

    .match-points-value {
        min-width: 40px;
        min-height: 27px;
        font-size: 0.86rem;
    }
}

/* Matches automatic selector and team roster hover - 2026-07-13 */
.match-week-selector {
    align-items: flex-end;
}

.match-week-selector .filter-field {
    flex: 1 1 360px;
}

.match-week-selector .subtle {
    margin: 4px 0 0;
    font-size: 0.7rem;
}

.match-team-pairing {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.team-roster-hover {
    position: relative;
    display: inline-flex;
    align-items: center;
    outline: none;
}

.team-roster-trigger {
    cursor: help;
    border-bottom: 1px dotted currentColor;
    line-height: 1.25;
}

.team-roster-hover:focus-visible .team-roster-trigger {
    border-radius: 4px;
    outline: 2px solid #477c65;
    outline-offset: 2px;
}

.team-roster-tooltip {
    position: absolute;
    z-index: 1000;
    left: 50%;
    bottom: calc(100% + 9px);
    display: none;
    width: max-content;
    min-width: 180px;
    max-width: 260px;
    padding: 10px 12px;
    transform: translateX(-50%);
    border: 1px solid #cbd8d2;
    border-radius: 9px;
    background: #16251f;
    color: #fff;
    box-shadow: 0 10px 28px rgba(13, 35, 27, 0.22);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
}

.team-roster-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #16251f;
}

.team-roster-tooltip > strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 0.78rem;
}

.team-roster-player,
.team-roster-empty {
    display: block;
    padding: 2px 0;
}

.team-roster-player em {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.team-roster-hover:hover .team-roster-tooltip,
.team-roster-hover:focus .team-roster-tooltip,
.team-roster-hover:focus-within .team-roster-tooltip {
    display: block;
}

.match-directory .table-wrap,
.match-table,
.match-table td {
    overflow: visible;
}

.match-points-team .team-roster-hover {
    font-size: inherit;
    font-weight: inherit;
}

@media (max-width: 760px) {
    .team-roster-tooltip {
        left: 0;
        min-width: 170px;
        transform: none;
    }

    .team-roster-tooltip::after {
        left: 18px;
        transform: none;
    }
}

@media (hover: none) {
    .team-roster-trigger {
        cursor: pointer;
    }
}

/* Prevent Match-column roster popovers from crossing table edges. */
.match-team-pairing > .team-roster-hover:first-child .team-roster-tooltip {
    right: auto;
    left: 0;
    transform: none;
}

.match-team-pairing > .team-roster-hover:first-child .team-roster-tooltip::after {
    right: auto;
    left: 18px;
    transform: none;
}

.match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip {
    right: 0;
    left: auto;
    transform: none;
}

.match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip::after {
    right: 18px;
    left: auto;
    transform: none;
}

/* Keep the first table column above adjacent cells while a roster is open. */
.match-table td:first-child {
    position: relative;
    z-index: 2;
}

.match-table tr:hover td:first-child,
.match-table td:first-child:focus-within {
    z-index: 20;
}

@media (max-width: 760px) {
    .match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip {
        right: auto;
        left: 0;
    }

    .match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip::after {
        right: auto;
        left: 18px;
    }
}

/* Prevent Team Points column roster popovers from clipping right. */
.team-points-column {
    position: relative;
    z-index: 3;
}

.team-points-column:focus-within,
.match-table tr:hover .team-points-column {
    z-index: 30;
}

/*
 * Both team names in the right-side Team Points column open their
 * popovers toward the left, keeping the roster inside the table.
 */
.team-points-column .team-roster-tooltip {
    right: 0;
    left: auto;
    transform: none;
}

.team-points-column .team-roster-tooltip::after {
    right: 18px;
    left: auto;
    transform: none;
}

/* Ensure adjacent columns do not paint over an open roster box. */
.match-table td {
    position: relative;
}

.match-table td:focus-within {
    z-index: 30;
}

@media (max-width: 760px) {
    .team-points-column .team-roster-tooltip {
        right: 0;
        left: auto;
        max-width: min(260px, calc(100vw - 36px));
    }

    .team-points-column .team-roster-tooltip::after {
        right: 18px;
        left: auto;
    }
}

/*
 * Right team in the Match column:
 * keep the roster above the team name, but expand toward the right
 * so it is not clipped against the left side of the table.
 */
.match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip {
    top: auto;
    right: auto;
    bottom: calc(100% + 9px);
    left: 0;
    transform: none;
}

.match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip::after {
    top: 100%;
    right: auto;
    bottom: auto;
    left: 18px;
    transform: none;
    border-color: transparent;
    border-top-color: #16251f;
}

/* Keep the active right-team popup above all neighboring cells. */
.match-team-pairing > .team-roster-hover:last-child {
    z-index: 40;
}

.match-team-pairing > .team-roster-hover:last-child:hover,
.match-team-pairing > .team-roster-hover:last-child:focus,
.match-team-pairing > .team-roster-hover:last-child:focus-within {
    z-index: 80;
}

@media (max-width: 760px) {
    .match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip {
        right: auto;
        left: 0;
        max-width: min(260px, calc(100vw - 36px));
    }

    .match-team-pairing > .team-roster-hover:last-child .team-roster-tooltip::after {
        right: auto;
        left: 18px;
    }
}

/* Strike through the regular player replaced by a substitute. */
.team-roster-player.is-subbed-out .team-roster-player-name {
    text-decoration-line: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #ffb4b4;
    opacity: 0.72;
}

.team-roster-player.is-subbed-out {
    color: #e6dede;
}

/* Enter Match Scores: compact Sub button layout - 2026-07-14 */
.score-entry-table th:nth-child(1),
.score-entry-table td:nth-child(1) {
    width: auto;
    min-width: 175px;
}

.score-entry-table th:nth-child(2),
.score-entry-table td:nth-child(2) {
    width: 86px;
    min-width: 86px;
    text-align: center;
}

.score-entry-table th:nth-child(3),
.score-entry-table td:nth-child(3) {
    width: 112px;
    min-width: 112px;
    text-align: center;
}

.score-player-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.score-player-name-wrap {
    min-width: 0;
}

.score-slot-regular-name {
    display: inline;
}

.score-player-slot.is-substitution .score-slot-regular-name {
    text-decoration-line: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: #a23c3c;
    opacity: 0.62;
}

.substitute-toggle-button {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 7px;
    font-size: 0.7rem;
    line-height: 1;
}

.selected-substitute-summary {
    margin-top: 6px;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
}

.substitute-badge {
    margin-left: 4px;
    border-color: #b9d9c9;
    background: #eaf7f0;
    color: #236044;
}

.substitute-picker {
    margin-top: 8px;
    padding: 9px;
    border: 1px solid #d5e0da;
    border-radius: 8px;
    background: #f6f9f7;
}

.substitute-picker[hidden] {
    display: none;
}

.substitute-picker label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.substitute-player-select {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
}

.substitute-picker-help {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.35;
}

.score-handicap-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
    .score-entry-table th:nth-child(1),
    .score-entry-table td:nth-child(1),
    .score-entry-table th:nth-child(2),
    .score-entry-table td:nth-child(2),
    .score-entry-table th:nth-child(3),
    .score-entry-table td:nth-child(3) {
        width: auto;
        min-width: 0;
        text-align: left;
    }

    .score-player-main {
        align-items: flex-start;
    }

    .score-handicap-display {
        justify-content: flex-start;
    }
}

/* Manage Matches: compact visible team names beneath Team #. */
.match-team-pairing {
    align-items: flex-start;
    gap: 9px;
}

.match-team-pairing > .team-roster-hover {
    min-width: 104px;
    align-items: flex-start;
    flex-direction: column;
}

.match-team-pairing .team-roster-trigger {
    font-size: 0.84rem;
    font-weight: 900;
}

.team-roster-inline {
    width: 100%;
    display: grid;
    gap: 1px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.61rem;
    font-weight: 650;
    line-height: 1.18;
}

.team-roster-inline-player {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 3px;
}

.team-roster-inline-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.team-roster-inline-player em {
    flex: 0 0 auto;
    display: inline-block;
    margin-top: 1px;
    padding: 1px 3px;
    border-radius: 999px;
    background: #e7f2ed;
    color: #1f6a4f;
    font-size: 0.46rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
}

.team-roster-inline-player.is-subbed-out .team-roster-inline-name {
    color: #8a7777;
    text-decoration-line: line-through;
    text-decoration-color: #b94b4b;
    text-decoration-thickness: 1.5px;
}

.team-roster-inline-empty {
    color: var(--muted);
    font-style: italic;
    font-weight: 500;
}

.match-team-pairing .match-versus {
    margin: 3px 0 0;
    font-size: 0.7rem;
}

.match-table td:first-child {
    min-width: 270px;
}

@media screen and (max-width: 760px) {
    .match-team-pairing {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: start;
        gap: 5px;
    }

    .match-team-pairing > .team-roster-hover {
        width: 100%;
        min-width: 0;
    }

    .match-team-pairing .team-roster-trigger {
        font-size: 0.75rem;
    }

    .team-roster-inline {
        margin-top: 2px;
        font-size: 0.57rem;
        line-height: 1.15;
    }

    .match-team-pairing .match-versus {
        margin-top: 3px;
        font-size: 0.6rem;
    }

    .match-table td:first-child {
        min-width: 0;
    }
}

/* Manage Matches reformatted to match the public Matches presentation. */
.manage-matches-page .admin-matches-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 24px auto 42px;
}

.manage-matches-page .admin-matches-page-card {
    padding: 22px;
}

.admin-matches-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.admin-matches-page-heading h2 {
    margin: 0;
    color: #123126;
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    line-height: 1;
}

.admin-matches-page-heading .subtle {
    margin: 7px 0 0;
}

.admin-matches-controls {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.admin-matches-controls .match-week-selector {
    width: min(100%, 350px);
    margin: 0;
}

.admin-matches-controls .filter-field {
    gap: 5px;
}

.admin-matches-controls select {
    min-height: 43px;
}

.admin-week-navigation {
    display: flex;
    align-items: center;
    gap: 7px;
}

.admin-week-navigation .button-muted {
    min-height: 38px;
    padding: 8px 11px;
}

.admin-matches-week-summary {
    display: grid;
    grid-template-columns: 0.9fr 1.5fr;
    gap: 1px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid #d8e2dd;
    border-radius: 12px;
    background: #d8e2dd;
    box-shadow: 0 8px 24px rgba(19, 48, 37, 0.07);
}

.admin-matches-week-summary > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 14px 17px;
}

.admin-matches-week-summary span {
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.admin-matches-week-summary strong {
    font-size: 1rem;
    line-height: 1.15;
}

.admin-current-week-block {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            #123126,
            #1f6a4f
        );
    color: #fff;
}

.admin-current-week-block::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -34px;
    width: 100px;
    height: 100px;
    border: 17px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.admin-current-week-block span,
.admin-current-week-block strong {
    position: relative;
    z-index: 1;
}

.admin-current-week-block strong {
    font-size: 1.45rem;
}

.admin-play-date-block {
    background: #fff;
    color: #123126;
}

.admin-match-directory {
    overflow: visible;
    border: 1px solid #d8e2dd;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 15px 40px rgba(19, 48, 37, 0.09);
}

.admin-match-list-heading {
    padding: 15px 17px 13px;
    border-bottom: 1px solid #dfe8e3;
}

.admin-match-list-heading h2 {
    margin: 0;
    color: #123126;
    font-size: 1.13rem;
}

.admin-match-list {
    display: grid;
}

.admin-match-card {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 174px;
    min-height: 116px;
    border-bottom: 1px solid #dfe8e3;
    background: #fff;
}

.admin-match-card:last-child {
    border-bottom: 0;
}

.admin-match-card:nth-child(even) {
    background: #fbfdfc;
}

.admin-match-hole {
    display: grid;
    place-content: center;
    gap: 3px;
    padding: 12px 8px;
    border-right: 1px solid #dfe8e3;
    background: #f8f5ec;
    color: #755516;
    text-align: center;
}

.admin-match-hole span {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-match-hole strong {
    font-size: 1.45rem;
    line-height: 1;
}

.admin-match-teams {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
}

.admin-match-team {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
}

.admin-match-team-roster {
    min-width: 0;
}

.admin-match-team-roster .team-roster-hover {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.admin-match-team-roster .team-roster-trigger {
    color: #123126;
    font-size: 0.91rem;
    font-weight: 900;
}

.admin-match-team-roster .team-roster-inline {
    margin-top: 4px;
    color: #65726d;
    font-size: 0.65rem;
    line-height: 1.2;
}

.admin-match-team-points {
    min-width: 52px;
    display: grid;
    gap: 2px;
    padding: 7px 8px;
    border-radius: 8px;
    background: #e7f2ed;
    color: #123126;
    text-align: center;
}

.admin-match-team-points span {
    font-size: 0.51rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-match-team-points strong {
    font-size: 0.9rem;
    line-height: 1;
}

.admin-match-versus {
    align-self: center;
    color: #7b8882;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-match-meta {
    display: grid;
    align-content: center;
    justify-items: stretch;
    gap: 9px;
    padding: 13px;
    border-left: 1px solid #dfe8e3;
}

.admin-match-meta .status-badge {
    justify-self: center;
}

.admin-match-edit-button {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    text-align: center;
}

.manage-matches-page .team-roster-tooltip {
    z-index: 30;
}

@media screen and (max-width: 820px) {
    .manage-matches-page .admin-matches-shell {
        width: calc(100% - 16px);
        margin-top: 14px;
    }

    .manage-matches-page .admin-matches-page-card {
        padding: 11px;
        border-radius: 11px;
    }

    .admin-matches-page-heading {
        margin-bottom: 10px;
    }

    .admin-matches-page-heading h2 {
        font-size: 1.5rem;
    }

    .admin-matches-controls {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 9px;
    }

    .admin-matches-controls .match-week-selector {
        width: 100%;
    }

    .admin-matches-controls select {
        min-height: 39px;
        font-size: 0.77rem;
    }

    .admin-week-navigation {
        justify-content: space-between;
    }

    .admin-week-navigation .button-muted {
        min-height: 33px;
        padding: 6px 9px;
        font-size: 0.67rem;
    }

    .admin-matches-week-summary {
        grid-template-columns: 0.9fr 1.35fr;
        margin-bottom: 9px;
        border-radius: 9px;
    }

    .admin-matches-week-summary > div {
        min-height: 56px;
        padding: 8px 9px;
    }

    .admin-matches-week-summary span {
        font-size: 0.56rem;
    }

    .admin-current-week-block strong {
        font-size: 1.05rem;
    }

    .admin-play-date-block strong {
        font-size: 0.72rem;
    }

    .admin-match-directory {
        border-radius: 10px;
    }

    .admin-match-list-heading {
        padding: 10px 11px 8px;
    }

    .admin-match-list-heading h2 {
        font-size: 0.92rem;
    }

    .admin-match-card {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 0;
    }

    .admin-match-hole {
        grid-row: 1;
        grid-column: 1;
        padding: 8px 2px;
    }

    .admin-match-hole span {
        font-size: 0.48rem;
    }

    .admin-match-hole strong {
        font-size: 0.93rem;
    }

    .admin-match-teams {
        grid-row: 1;
        grid-column: 2;
    }

    .admin-match-team {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 5px;
        padding: 9px 7px;
    }

    .admin-match-team-roster .team-roster-trigger {
        font-size: 0.73rem;
    }

    .admin-match-team-roster .team-roster-inline {
        margin-top: 2px;
        font-size: 0.58rem;
        line-height: 1.15;
    }

    .admin-match-team-points {
        min-width: 0;
        width: max-content;
        grid-template-columns: auto auto;
        gap: 4px;
        padding: 4px 6px;
    }

    .admin-match-team-points span {
        font-size: 0.46rem;
    }

    .admin-match-team-points strong {
        font-size: 0.68rem;
    }

    .admin-match-versus {
        font-size: 0.55rem;
    }

    .admin-match-meta {
        grid-row: 2;
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 7px;
        padding: 7px 8px;
        border-top: 1px solid #dfe8e3;
        border-left: 0;
        background: #f8fbf9;
    }

    .admin-match-meta .status-badge {
        justify-self: auto;
        font-size: 0.58rem;
    }

    .admin-match-edit-button {
        width: auto;
        min-height: 31px;
        padding: 5px 8px;
        font-size: 0.62rem;
    }
}

@media screen and (max-width: 430px) {
    .manage-matches-page .admin-matches-shell {
        width: calc(100% - 8px);
        margin-top: 8px;
    }

    .manage-matches-page .admin-matches-page-card {
        padding: 7px;
    }

    .admin-matches-page-heading .eyebrow,
    .admin-match-list-heading .eyebrow {
        display: none;
    }

    .admin-matches-page-heading h2 {
        font-size: 1.3rem;
    }

    .admin-match-card {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .admin-match-hole strong {
        font-size: 0.84rem;
    }

    .admin-match-team {
        padding: 7px 5px;
    }

    .admin-match-team-roster .team-roster-trigger {
        font-size: 0.69rem;
    }

    .admin-match-team-roster .team-roster-inline {
        font-size: 0.54rem;
    }

    .admin-match-meta {
        padding: 6px;
    }
}

/* Manage Matches table layout matching the public Matches page. */
.admin-match-table-directory {
    overflow: hidden;
}

.admin-match-table-wrap {
    overflow-x: auto;
}

.admin-match-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-variant-numeric: tabular-nums;
}

.admin-match-table th,
.admin-match-table td {
    padding: 11px 12px;
    border-right: 1px solid #e0e9e4;
    border-bottom: 1px solid #e0e9e4;
    vertical-align: middle;
}

.admin-match-table thead th {
    background: #123126;
    color: #fff;
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
}

.admin-match-table thead th:nth-child(3) {
    text-align: left;
}

.admin-match-table th:last-child,
.admin-match-table td:last-child {
    border-right: 0;
}

.admin-match-table tbody tr:last-child > * {
    border-bottom: 0;
}

.admin-match-table .admin-match-start > * {
    border-top: 4px solid #b9cec3;
}

.admin-match-table tbody .admin-match-start:first-child > * {
    border-top: 0;
}

.admin-match-table .admin-match-team-row > * {
    background: #fbfdfc;
}

.admin-hole-column {
    width: 76px;
}

.admin-team-column {
    width: 105px;
}

.admin-members-column {
    width: auto;
}

.admin-score-column {
    width: 110px;
}

.admin-action-column {
    width: 175px;
}

.admin-table-hole {
    background: #f8f5ec;
    color: #755516;
    font-size: 1.3rem;
    font-weight: 900;
    text-align: center;
}

.admin-table-team {
    background: #e7f2ed;
    color: #123126;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.admin-table-members {
    min-width: 0;
}

.admin-member-stack {
    display: grid;
    gap: 3px;
}

.admin-member-name {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #18221e;
    font-size: 0.79rem;
    font-weight: 750;
    line-height: 1.18;
}

.admin-member-name > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-member-name em {
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 999px;
    background: #e7f2ed;
    color: #1f6a4f;
    font-size: 0.5rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-member-name.is-subbed-out > span {
    color: #8a7777;
    text-decoration-line: line-through;
    text-decoration-color: #b94b4b;
    text-decoration-thickness: 1.5px;
}

.admin-member-empty {
    color: #65726d;
    font-size: 0.72rem;
    font-style: italic;
}

.admin-table-score {
    background: #f4f8f6;
    color: #123126;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}

.admin-table-action {
    text-align: center;
}

.admin-table-edit-button {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    line-height: 1.15;
    text-align: center;
}

@media screen and (max-width: 760px) {
    .admin-match-table th,
    .admin-match-table td {
        padding: 7px 5px;
    }

    .admin-match-table thead th {
        font-size: 0.52rem;
        letter-spacing: 0.01em;
    }

    .admin-hole-column {
        width: 43px;
    }

    .admin-team-column {
        width: 60px;
    }

    .admin-score-column {
        width: 61px;
    }

    .admin-action-column {
        width: 91px;
    }

    .admin-table-hole {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 0.84rem;
    }

    .admin-table-team {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 0.65rem;
        white-space: normal;
    }

    .admin-table-members {
        padding-right: 5px;
        padding-left: 7px;
    }

    .admin-member-stack {
        gap: 2px;
    }

    .admin-member-name {
        gap: 3px;
        font-size: 0.7rem;
        line-height: 1.16;
    }

    .admin-member-name em {
        padding: 1px 3px;
        font-size: 0.42rem;
    }

    .admin-member-empty {
        font-size: 0.61rem;
    }

    .admin-table-score {
        font-size: 0.75rem;
    }

    .admin-table-action {
        padding-right: 4px;
        padding-left: 4px;
    }

    .admin-table-edit-button {
        min-height: 32px;
        padding: 5px 4px;
        font-size: 0.57rem;
        line-height: 1.1;
        white-space: normal;
    }
}

@media screen and (max-width: 420px) {
    .admin-match-table th,
    .admin-match-table td {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .admin-hole-column {
        width: 38px;
    }

    .admin-team-column {
        width: 54px;
    }

    .admin-score-column {
        width: 55px;
    }

    .admin-action-column {
        width: 82px;
    }

    .admin-match-table thead th {
        font-size: 0.47rem;
    }

    .admin-table-hole {
        font-size: 0.77rem;
    }

    .admin-table-team {
        font-size: 0.61rem;
    }

    .admin-member-name {
        font-size: 0.66rem;
    }

    .admin-table-score {
        font-size: 0.7rem;
    }

    .admin-table-edit-button {
        font-size: 0.53rem;
    }
}


/* Individual gross-score column on Manage Matches. */
.admin-individual-score-column {
    width: 130px;
}

.admin-table-individual-scores {
    background: #fff;
    color: #194a37;
    text-align: center;
}

.admin-individual-score-stack {
    display: grid;
    gap: 3px;
}

.admin-individual-score-stack > span {
    min-height: 0.93rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.79rem;
    font-weight: 900;
    line-height: 1.18;
}

.admin-individual-score-stack > span.is-subbed-out {
    color: #a59999;
    font-weight: 650;
}

@media screen and (max-width: 760px) {
    .admin-individual-score-column {
        width: 73px;
    }

    .admin-table-individual-scores {
        padding-right: 3px !important;
        padding-left: 3px !important;
    }

    .admin-individual-score-stack {
        gap: 2px;
    }

    .admin-individual-score-stack > span {
        min-height: 0.81rem;
        font-size: 0.7rem;
        line-height: 1.16;
    }
}

@media screen and (max-width: 420px) {
    .admin-individual-score-column {
        width: 66px;
    }

    .admin-individual-score-stack > span {
        min-height: 0.76rem;
        font-size: 0.66rem;
    }
}

/* Starting Hole column label. */
.admin-starting-hole-heading {
    line-height: 1.05;
    white-space: normal;
}

@media screen and (max-width: 760px) {
    .admin-starting-hole-heading {
        font-size: 0.48rem !important;
        line-height: 1.05;
    }
}

@media screen and (max-width: 420px) {
    .admin-starting-hole-heading {
        font-size: 0.44rem !important;
    }
}

/* Whole-page editing for Admin Manage Matches. */
.whole-page-match-editor .admin-matches-page-heading {
    align-items: center;
}

.whole-page-match-editor .admin-matches-page-heading > a {
    flex: 0 0 auto;
}

.whole-match-edit-notice {
    margin-bottom: 10px;
    padding: 9px 11px;
    border: 1px solid #bdd2c7;
    border-radius: 9px;
    background: #edf5f1;
    color: #194a37;
    font-size: 0.74rem;
    line-height: 1.35;
}

.whole-edit-table input,
.whole-edit-table select {
    width: 100%;
    min-height: 34px;
    padding: 5px 6px;
    border: 1px solid #bdccc4;
    border-radius: 7px;
    background: #fff;
    color: #18221e;
    font: inherit;
}

.whole-edit-table input:focus,
.whole-edit-table select:focus {
    border-color: #1f6a4f;
    outline: 3px solid rgba(31, 106, 79, 0.13);
}

.whole-edit-hole {
    padding-right: 7px !important;
    padding-left: 7px !important;
}

.whole-edit-hole input {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 900;
}

.whole-edit-player-stack,
.whole-edit-score-stack {
    display: grid;
    gap: 5px;
}

.whole-edit-player-row {
    min-height: 55px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #dce6e1;
}

.whole-edit-player-row:last-child,
.whole-edit-score-stack > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.whole-edit-regular-name {
    color: #123126;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.15;
}

.whole-edit-player-row.is-substitution
.whole-edit-regular-name {
    color: #8a7777;
    text-decoration-line: line-through;
    text-decoration-color: #b94b4b;
    text-decoration-thickness: 1.5px;
}

.whole-edit-player-row select {
    font-size: 0.68rem;
}

.whole-edit-score-stack > div {
    min-height: 55px;
    display: grid;
    align-content: center;
    padding-bottom: 4px;
    border-bottom: 1px dashed #dce6e1;
}

.whole-edit-score-stack input {
    max-width: 76px;
    margin: 0 auto;
    text-align: center;
    font-weight: 900;
}

.whole-edit-team-score input {
    max-width: 78px;
    margin: 0 auto;
    text-align: center;
    font-weight: 900;
}

.whole-edit-table .field-error {
    margin: 3px 0 0;
    font-size: 0.57rem;
    line-height: 1.2;
}

.whole-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 13px;
}

.whole-edit-actions button,
.whole-edit-actions a {
    min-height: 40px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

@media screen and (max-width: 760px) {
    .whole-page-match-editor .admin-matches-page-heading {
        gap: 8px;
    }

    .whole-page-match-editor
    .admin-matches-page-heading > a {
        min-height: 32px;
        padding: 5px 8px;
        font-size: 0.63rem;
    }

    .whole-match-edit-notice {
        margin-bottom: 7px;
        padding: 7px 8px;
        font-size: 0.63rem;
    }

    .whole-edit-table input,
    .whole-edit-table select {
        min-height: 29px;
        padding: 4px;
    }

    .whole-edit-hole {
        padding-right: 2px !important;
        padding-left: 2px !important;
    }

    .whole-edit-hole input {
        padding-right: 1px;
        padding-left: 1px;
        font-size: 0.72rem;
    }

    .whole-edit-player-stack,
    .whole-edit-score-stack {
        gap: 3px;
    }

    .whole-edit-player-row,
    .whole-edit-score-stack > div {
        min-height: 51px;
        padding-bottom: 3px;
    }

    .whole-edit-regular-name {
        font-size: 0.61rem;
    }

    .whole-edit-player-row select {
        font-size: 0.57rem;
    }

    .whole-edit-score-stack input,
    .whole-edit-team-score input {
        max-width: 52px;
        font-size: 0.68rem;
    }

    .whole-edit-actions {
        position: sticky;
        z-index: 8;
        bottom: 0;
        margin: 8px -7px -7px;
        padding: 8px;
        border-top: 1px solid #d8e2dd;
        background: rgba(255, 255, 255, 0.96);
    }

    .whole-edit-actions button,
    .whole-edit-actions a {
        flex: 1 1 0;
        min-height: 35px;
        padding: 6px 8px;
        font-size: 0.66rem;
    }
}

@media screen and (max-width: 420px) {
    .whole-edit-player-row,
    .whole-edit-score-stack > div {
        min-height: 48px;
    }

    .whole-edit-regular-name {
        font-size: 0.57rem;
    }

    .whole-edit-player-row select {
        font-size: 0.53rem;
    }

    .whole-edit-score-stack input,
    .whole-edit-team-score input {
        max-width: 47px;
        font-size: 0.64rem;
    }
}

/* Week summary action button beside Play Date. */
.admin-play-date-block {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-play-date-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.admin-week-edit-button {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    white-space: nowrap;
}

@media screen and (max-width: 760px) {
    .admin-play-date-block {
        gap: 8px;
    }

    .admin-week-edit-button {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 0.59rem;
        line-height: 1.05;
        white-space: normal;
        text-align: center;
    }
}

@media screen and (max-width: 420px) {
    .admin-play-date-block {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .admin-week-edit-button {
        width: 100%;
    }
}

/* Make Update Scores and Points more noticeable. */
.admin-week-edit-button-primary {
    position: relative;
    overflow: hidden;
    min-height: 44px;
    padding: 10px 16px;
    border: 2px solid #f3d47a;
    background:
        linear-gradient(
            135deg,
            #1f7a55,
            #0f5136
        );
    color: #ffffff;
    box-shadow:
        0 7px 18px rgba(15, 81, 54, 0.28),
        0 0 0 3px rgba(243, 212, 122, 0.18);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.015em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
    transform: translateZ(0);
}

.admin-week-edit-button-primary::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -55%;
    width: 45%;
    height: 180%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.35),
            transparent
        );
    transform: rotate(18deg);
    animation: admin-update-button-shine 3.4s ease-in-out infinite;
}

.admin-week-edit-button-primary:hover,
.admin-week-edit-button-primary:focus-visible {
    border-color: #ffe7a3;
    background:
        linear-gradient(
            135deg,
            #248a61,
            #123f2d
        );
    color: #ffffff;
    box-shadow:
        0 9px 22px rgba(15, 81, 54, 0.34),
        0 0 0 4px rgba(243, 212, 122, 0.24);
    transform: translateY(-1px);
}

@keyframes admin-update-button-shine {
    0%,
    58% {
        left: -55%;
    }

    82%,
    100% {
        left: 125%;
    }
}

@media screen and (max-width: 760px) {
    .admin-week-edit-button-primary {
        min-height: 39px;
        padding: 8px 10px;
        font-size: 0.66rem;
        box-shadow:
            0 5px 14px rgba(15, 81, 54, 0.26),
            0 0 0 2px rgba(243, 212, 122, 0.2);
    }
}

@media screen and (max-width: 420px) {
    .admin-week-edit-button-primary {
        min-height: 42px;
        font-size: 0.69rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-week-edit-button-primary::before {
        animation: none;
    }
}

/* Handicap column after Team Members. */
.admin-handicap-column {
    width: 92px;
}

.admin-table-handicaps {
    background: #f8fbf9;
    color: #194a37;
    text-align: center;
}

.admin-handicap-stack,
.whole-edit-handicap-stack {
    display: grid;
    gap: 3px;
}

.admin-handicap-stack > span {
    min-height: 0.93rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.79rem;
    font-weight: 900;
    line-height: 1.18;
}

.admin-handicap-stack > span.is-subbed-out {
    color: #a59999;
    font-weight: 650;
}

.whole-edit-handicap-stack {
    gap: 5px;
}

.whole-edit-handicap-stack > div {
    min-height: 55px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding-bottom: 4px;
    border-bottom: 1px dashed #dce6e1;
}

.whole-edit-handicap-stack > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.whole-edit-handicap-value {
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 7px;
    border: 1px solid #c9d8d0;
    border-radius: 7px;
    background: #edf5f1;
    color: #123126;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

@media screen and (max-width: 760px) {
    .admin-handicap-column {
        width: 57px;
    }

    .admin-table-handicaps {
        padding-right: 3px !important;
        padding-left: 3px !important;
    }

    .admin-handicap-stack {
        gap: 2px;
    }

    .admin-handicap-stack > span {
        min-height: 0.81rem;
        font-size: 0.7rem;
        line-height: 1.16;
    }

    .whole-edit-handicap-stack {
        gap: 3px;
    }

    .whole-edit-handicap-stack > div {
        min-height: 51px;
        padding-bottom: 3px;
    }

    .whole-edit-handicap-value {
        min-width: 31px;
        padding: 5px 4px;
        font-size: 0.66rem;
    }
}

@media screen and (max-width: 420px) {
    .admin-handicap-column {
        width: 52px;
    }

    .admin-handicap-stack > span {
        min-height: 0.76rem;
        font-size: 0.66rem;
    }

    .whole-edit-handicap-stack > div {
        min-height: 48px;
    }

    .whole-edit-handicap-value {
        min-width: 28px;
        font-size: 0.62rem;
    }
}

/* Simplified three-option Admin Dashboard. */
body.dashboard-page .dashboard-shell {
    width: min(980px, calc(100% - 32px));
    margin: 24px auto 42px;
}

body.dashboard-page .welcome-card {
    padding: 20px 22px;
}

body.dashboard-page .welcome-card h2 {
    margin-bottom: 5px;
}

body.dashboard-page .welcome-card p {
    margin-bottom: 0;
}

body.dashboard-page .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

body.dashboard-page .dashboard-card {
    min-height: 142px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid #d6e1db;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f3f8f5
        );
    box-shadow: 0 12px 28px rgba(18, 49, 38, 0.09);
    color: #123126;
    text-decoration: none;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

body.dashboard-page .dashboard-card:hover,
body.dashboard-page .dashboard-card:focus-visible {
    border-color: #8fb3a1;
    box-shadow: 0 16px 34px rgba(18, 49, 38, 0.15);
    transform: translateY(-2px);
}

body.dashboard-page .dashboard-card span {
    color: #65726d;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.065em;
    line-height: 1.1;
    text-transform: uppercase;
}

body.dashboard-page .dashboard-card strong {
    font-size: 1.05rem;
    line-height: 1.2;
}

@media screen and (max-width: 760px) {
    body.dashboard-page .topbar {
        width: 100%;
        min-height: 58px;
        align-items: center;
        flex-direction: row;
        gap: 8px;
        padding: 7px 9px;
    }

    body.dashboard-page .topbar-brand {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        align-items: center;
        gap: 8px;
    }

    body.dashboard-page .topbar-logo {
        width: 58px;
        padding: 3px;
        border-radius: 7px;
        box-shadow: 0 3px 9px rgba(0, 0, 0, 0.16);
    }

    body.dashboard-page .topbar-title {
        min-width: 0;
    }

    body.dashboard-page .topbar-title .eyebrow {
        margin: 0 0 2px;
        font-size: 0.52rem;
        letter-spacing: 0.055em;
        line-height: 1.05;
    }

    body.dashboard-page .topbar-title h1 {
        margin: 0;
        font-size: 1rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    body.dashboard-page .topbar > form {
        flex: 0 0 auto;
        display: block;
    }

    body.dashboard-page .topbar .button-secondary {
        min-height: 31px;
        margin: 0;
        padding: 5px 8px;
        border-radius: 7px;
        font-size: 0.65rem;
        line-height: 1;
    }

    body.dashboard-page .dashboard-shell {
        width: calc(100% - 14px);
        margin: 10px auto 20px;
    }

    body.dashboard-page .welcome-card {
        padding: 10px 11px;
        border-radius: 9px;
    }

    body.dashboard-page .welcome-card h2 {
        margin-bottom: 2px;
        font-size: 0.9rem;
        line-height: 1.15;
    }

    body.dashboard-page .welcome-card p {
        font-size: 0.65rem;
        line-height: 1.25;
    }

    body.dashboard-page .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-top: 8px;
    }

    body.dashboard-page .dashboard-card {
        min-height: 76px;
        justify-content: center;
        gap: 6px;
        padding: 11px 13px;
        border-radius: 9px;
    }

    body.dashboard-page .dashboard-card span {
        font-size: 0.56rem;
    }

    body.dashboard-page .dashboard-card strong {
        font-size: 0.82rem;
    }

    body.dashboard-page .dashboard-card:hover {
        transform: none;
    }
}

@media screen and (max-width: 380px) {
    body.dashboard-page .topbar {
        min-height: 53px;
        padding: 6px 7px;
    }

    body.dashboard-page .topbar-logo {
        width: 51px;
    }

    body.dashboard-page .topbar-title .eyebrow {
        display: none;
    }

    body.dashboard-page .topbar-title h1 {
        font-size: 0.92rem;
    }

    body.dashboard-page .topbar .button-secondary {
        min-height: 29px;
        padding: 4px 7px;
        font-size: 0.61rem;
    }

    body.dashboard-page .dashboard-shell {
        width: calc(100% - 10px);
        margin-top: 7px;
    }

    body.dashboard-page .welcome-card {
        padding: 8px 9px;
    }

    body.dashboard-page .welcome-card h2 {
        font-size: 0.84rem;
    }

    body.dashboard-page .welcome-card p {
        font-size: 0.6rem;
    }

    body.dashboard-page .dashboard-grid {
        gap: 5px;
        margin-top: 6px;
    }

    body.dashboard-page .dashboard-card {
        min-height: 68px;
        padding: 9px 10px;
        border-radius: 8px;
    }

    body.dashboard-page .dashboard-card span {
        font-size: 0.51rem;
    }

    body.dashboard-page .dashboard-card strong {
        font-size: 0.75rem;
    }
}


/* Four-option Admin Dashboard. */
@media screen and (min-width: 761px) {
    body.dashboard-page .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 760px;
        margin-right: auto;
        margin-left: auto;
    }
}

/* Admin Matches mobile week selector and Play Date improvements. */
.admin-play-date-mobile {
    display: none;
}

@media screen and (max-width: 760px) {
    .admin-matches-controls {
        align-items: flex-start;
    }

    .admin-matches-controls .match-week-selector {
        width: min(100%, 245px);
    }

    .admin-matches-controls .match-week-selector .filter-field {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 7px;
    }

    .admin-matches-controls .match-week-selector label {
        margin: 0;
        font-size: 0.62rem;
        white-space: nowrap;
    }

    .admin-matches-controls select {
        width: 100%;
        min-width: 0;
        max-width: 190px;
        min-height: 36px;
        padding-right: 25px;
        overflow: hidden;
        font-size: 0.7rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-week-navigation {
        width: min(100%, 245px);
    }

    .admin-matches-week-summary {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .admin-play-date-block {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 7px;
    }

    .admin-play-date-copy {
        gap: 2px;
        text-align: left;
    }

    .admin-play-date-desktop {
        display: none;
    }

    .admin-play-date-mobile {
        display: block;
        color: #123126;
        font-size: 0.82rem;
        font-weight: 900;
        line-height: 1.15;
        white-space: nowrap;
    }

    .admin-week-edit-button {
        width: 100%;
        min-height: 36px;
        padding: 7px 9px;
    }

    .admin-week-edit-button-primary {
        min-height: 39px;
        font-size: 0.65rem;
    }
}

@media screen and (max-width: 420px) {
    .admin-matches-controls .match-week-selector {
        width: min(100%, 220px);
    }

    .admin-matches-controls select {
        max-width: 168px;
        font-size: 0.66rem;
    }

    .admin-week-navigation {
        width: min(100%, 220px);
    }

    .admin-matches-week-summary {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .admin-matches-week-summary > div {
        padding: 7px;
    }

    .admin-play-date-mobile {
        font-size: 0.75rem;
    }

    .admin-week-edit-button-primary {
        min-height: 38px;
        font-size: 0.63rem;
    }
}

/* Compact Current Week and Play Date summary on mobile. */
@media screen and (max-width: 760px) {
    .admin-matches-week-summary {
        grid-template-columns: 82px minmax(0, 1fr);
        align-items: stretch;
    }

    .admin-matches-week-summary > div {
        min-height: 48px;
        padding: 6px 8px;
    }

    .admin-current-week-block {
        align-content: center;
        gap: 1px;
    }

    .admin-current-week-block span,
    .admin-play-date-block span {
        font-size: 0.5rem;
        line-height: 1;
    }

    .admin-current-week-block strong {
        font-size: 0.94rem;
        line-height: 1;
    }

    .admin-play-date-block {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
    }

    .admin-play-date-copy {
        gap: 2px;
    }

    .admin-play-date-mobile {
        font-size: 0.72rem;
        line-height: 1.05;
    }

    .admin-week-edit-button {
        width: auto;
        min-height: 31px;
        padding: 5px 7px;
    }

    .admin-week-edit-button-primary {
        min-height: 34px;
        max-width: 124px;
        font-size: 0.56rem;
        line-height: 1.05;
    }
}

@media screen and (max-width: 420px) {
    .admin-matches-week-summary {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .admin-matches-week-summary > div {
        min-height: 45px;
        padding: 5px 6px;
    }

    .admin-current-week-block strong {
        font-size: 0.87rem;
    }

    .admin-play-date-mobile {
        font-size: 0.67rem;
    }

    .admin-week-edit-button-primary {
        max-width: 112px;
        min-height: 32px;
        padding: 4px 6px;
        font-size: 0.52rem;
    }
}

/* Full-width, compact Select Week panel on mobile. */
@media screen and (max-width: 760px) {
    .admin-matches-controls {
        width: 100%;
    }

    .admin-matches-controls .match-week-selector {
        box-sizing: border-box;
        width: 100% !important;
        max-width: none;
        min-height: 0;
        margin: 0;
        padding: 7px 8px;
        border-radius: 8px;
    }

    .admin-matches-controls
    .match-week-selector
    .filter-field {
        width: 100%;
        min-width: 0;
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 6px;
    }

    .admin-matches-controls
    .match-week-selector
    label {
        margin: 0;
        font-size: 0.59rem;
        line-height: 1;
    }

    .admin-matches-controls
    .match-week-selector
    select {
        width: 100%;
        max-width: none;
        min-height: 32px;
        height: 32px;
        padding-top: 3px;
        padding-bottom: 3px;
        font-size: 0.68rem;
        line-height: 1;
    }

    .admin-week-navigation {
        width: 100%;
    }
}

@media screen and (max-width: 420px) {
    .admin-matches-controls .match-week-selector {
        width: 100% !important;
        padding: 6px 7px;
    }

    .admin-matches-controls
    .match-week-selector
    .filter-field {
        grid-template-columns: 63px minmax(0, 1fr);
        gap: 5px;
    }

    .admin-matches-controls
    .match-week-selector
    select {
        max-width: none;
        min-height: 31px;
        height: 31px;
        font-size: 0.65rem;
    }
}

/* Extra-compact Select Week container and dropdown on mobile. */
@media screen and (max-width: 760px) {
    .admin-matches-controls {
        gap: 5px;
        margin-bottom: 6px;
    }

    .admin-matches-controls .match-week-selector {
        min-height: 0 !important;
        padding: 3px 5px !important;
        border-radius: 7px;
    }

    .admin-matches-controls
    .match-week-selector
    .filter-field {
        min-height: 0;
        grid-template-columns: 61px minmax(0, 1fr);
        gap: 4px;
    }

    .admin-matches-controls
    .match-week-selector
    label {
        font-size: 0.55rem;
        line-height: 1;
    }

    .admin-matches-controls
    .match-week-selector
    select {
        min-height: 27px !important;
        height: 27px !important;
        padding: 1px 23px 1px 5px !important;
        border-radius: 6px;
        font-size: 0.64rem;
        line-height: 1;
    }
}

@media screen and (max-width: 420px) {
    .admin-matches-controls .match-week-selector {
        padding: 2px 4px !important;
    }

    .admin-matches-controls
    .match-week-selector
    .filter-field {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 3px;
    }

    .admin-matches-controls
    .match-week-selector
    label {
        font-size: 0.52rem;
    }

    .admin-matches-controls
    .match-week-selector
    select {
        min-height: 26px !important;
        height: 26px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        font-size: 0.61rem;
    }
}

/*
 * Mobile Select Week height correction.
 *
 * An older rule uses:
 *     flex: 1 1 360px
 *
 * When the selector changes to a vertical flex layout on mobile,
 * that 360px flex-basis becomes vertical height. Resetting the flex
 * basis removes the large blank area around the selector.
 */
@media screen and (max-width: 760px) {
    .admin-matches-controls .match-week-selector {
        height: auto !important;
        max-height: none !important;
        align-items: center !important;
        flex-direction: row !important;
    }

    .admin-matches-controls
    .match-week-selector
    .filter-field {
        flex: 0 0 auto !important;
        flex-basis: auto !important;
        height: auto !important;
        min-height: 0 !important;
        align-self: center;
    }
}

@media screen and (max-width: 420px) {
    .admin-matches-controls
    .match-week-selector
    .filter-field {
        flex: 0 0 auto !important;
        flex-basis: auto !important;
    }
}

/* Senior and weekly Closest-to-Pin administration. */
.admin-member-name {
    flex-wrap: wrap;
}

.admin-member-name .designation-badge {
    flex: 0 0 auto;
    margin-left: 1px;
}

.admin-member-name.is-closest-pin {
    margin: -1px -3px;
    padding: 3px;
    border-radius: 6px;
    background: #f5eaf6;
    box-shadow: inset 3px 0 0 #9a4c9d;
}

.closest-pin-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 999px;
    background: #f1e4f3;
    color: #713874;
    font-size: 0.43rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-closest-pin-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -5px 0 10px;
    padding: 8px 10px;
    border: 1px solid #dec9e1;
    border-left: 5px solid #9a4c9d;
    border-radius: 8px;
    background: #faf4fb;
}

.admin-closest-pin-summary > span {
    color: #77647a;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-closest-pin-summary > strong {
    color: #4f2851;
    font-size: 0.78rem;
}

.closest-pin-editor {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(260px, 1.2fr);
    align-items: center;
    gap: 13px;
    margin-bottom: 11px;
    padding: 11px 13px;
    border: 1px solid #dec9e1;
    border-left: 5px solid #9a4c9d;
    border-radius: 10px;
    background: #faf4fb;
}

.closest-pin-editor label {
    display: block;
    color: #4f2851;
    font-size: 0.78rem;
    font-weight: 900;
}

.closest-pin-editor p {
    margin: 3px 0 0;
    color: #77647a;
    font-size: 0.66rem;
    line-height: 1.3;
}

.closest-pin-editor select {
    width: 100%;
    min-height: 39px;
    padding: 7px 34px 7px 9px;
    border: 1px solid #c9b2cd;
    border-radius: 8px;
    background: #fff;
    color: #2f2430;
    font-weight: 800;
}

.whole-edit-regular-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.member-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.senior-substitute-badge[hidden] {
    display: none !important;
}

@media screen and (max-width: 760px) {
    .admin-closest-pin-summary {
        gap: 5px;
        margin-bottom: 7px;
        padding: 6px 7px;
    }

    .admin-closest-pin-summary > span {
        font-size: 0.49rem;
    }

    .admin-closest-pin-summary > strong {
        font-size: 0.67rem;
    }

    .closest-pin-editor {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 7px;
        padding: 8px;
        border-radius: 8px;
    }

    .closest-pin-editor label {
        font-size: 0.67rem;
    }

    .closest-pin-editor p {
        font-size: 0.57rem;
    }

    .closest-pin-editor select {
        min-height: 34px;
        padding-top: 5px;
        padding-bottom: 5px;
        font-size: 0.65rem;
    }

    .closest-pin-badge {
        padding: 1px 3px;
        font-size: 0.38rem;
    }
}

/*
 * Manage Matches action bar:
 * - Sticky sliding toolbar on desktop and mobile.
 * - Mobile order: Cancel left, Save All Changes right.
 */
.whole-edit-actions {
    position: sticky;
    z-index: 25;
    bottom: 10px;
    align-items: center;
    margin: 14px -10px -10px;
    padding: 10px;
    border: 1px solid rgba(184, 204, 194, 0.95);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 -4px 18px rgba(18, 49, 38, 0.09),
        0 9px 25px rgba(18, 49, 38, 0.15);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    animation: whole-edit-actions-slide-up 240ms ease-out both;
}

.whole-edit-actions button {
    min-width: 180px;
}

.whole-edit-actions a {
    min-width: 100px;
}

@keyframes whole-edit-actions-slide-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 760px) {
    .whole-edit-actions {
        bottom: 0;
        margin: 8px -7px -7px;
        padding: 8px;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0;
    }

    /* Cancel first on the left, Save second on the right. */
    .whole-edit-actions a {
        order: 1;
        min-width: 0;
    }

    .whole-edit-actions button {
        order: 2;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whole-edit-actions {
        animation: none;
    }
}

/* Manage Players: standings-style mobile rows. */
.mobile-stat-label,
.mobile-player-contact {
    display: none;
}

@media screen and (max-width: 760px) {
    .manage-players-page .directory-shell {
        width: calc(100% - 10px);
        margin-top: 8px;
    }

    .manage-players-page .directory-card {
        padding: 8px;
        border-radius: 10px;
    }

    /* Compact title and Add Player into one line. */
    .manage-players-page .directory-heading {
        min-height: 40px;
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin-bottom: 7px;
        padding-bottom: 7px;
    }

    .manage-players-page .directory-heading > div {
        min-width: 0;
        flex: 1 1 auto;
    }

    .manage-players-page .directory-heading h2 {
        overflow: hidden;
        margin: 0;
        font-size: 0.88rem;
        line-height: 1.05;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .manage-players-page .directory-heading .subtle {
        display: none;
    }

    .manage-players-page .directory-heading .button-link {
        width: auto;
        min-height: 30px;
        flex: 0 0 auto;
        padding: 5px 8px;
        font-size: 0.61rem;
        white-space: nowrap;
    }

    /* Four totals remain in one compact information row. */
    .manage-players-page .player-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3px;
        margin-bottom: 7px;
    }

    .manage-players-page .player-stat-grid .stat-card {
        min-width: 0;
        min-height: 42px;
        display: grid;
        place-content: center;
        gap: 2px;
        padding: 4px 2px;
        border-radius: 7px;
        text-align: center;
    }

    .manage-players-page .player-stat-grid .stat-card span {
        font-size: 0.46rem;
        letter-spacing: 0.025em;
        line-height: 1;
        white-space: nowrap;
    }

    .manage-players-page .player-stat-grid .stat-card strong {
        font-size: 0.8rem;
        line-height: 1;
    }

    .manage-players-page .desktop-stat-label {
        display: none;
    }

    .manage-players-page .mobile-stat-label {
        display: block;
    }

    /* Compact filters into one line. */
    .manage-players-page .directory-filter {
        margin-bottom: 7px;
        padding: 5px;
        border-radius: 8px;
    }

    .manage-players-page .filter-form {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            76px
            54px;
        align-items: end;
        gap: 4px;
    }

    .manage-players-page .filter-field {
        min-width: 0;
    }

    .manage-players-page .filter-field label {
        margin-bottom: 2px;
        font-size: 0.48rem;
        line-height: 1;
    }

    .manage-players-page .filter-form input,
    .manage-players-page .filter-form select,
    .manage-players-page .filter-form button {
        min-height: 29px;
        height: 29px;
        margin: 0;
        padding-top: 2px;
        padding-bottom: 2px;
        font-size: 0.62rem;
    }

    .manage-players-page .filter-form button {
        min-width: 0;
        padding-right: 4px;
        padding-left: 4px;
    }

    .manage-players-page .filter-clear {
        grid-column: 1 / -1;
        justify-self: end;
        margin: 0;
        font-size: 0.56rem;
    }

    .manage-players-page .directory-table {
        border-radius: 8px;
    }

    .manage-players-page .substitute-directory {
        margin-top: 8px;
    }

    .manage-players-page .directory-table .panel-heading {
        min-height: 37px;
        align-items: center;
        flex-direction: row;
        gap: 6px;
        padding: 6px 7px;
    }

    .manage-players-page .panel-heading > div {
        min-width: 0;
        flex: 1 1 auto;
    }

    .manage-players-page .panel-heading h2 {
        margin: 0;
        font-size: 0.77rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .manage-players-page .panel-heading .subtle {
        margin: 2px 0 0;
        font-size: 0.5rem;
        line-height: 1;
    }

    .manage-players-page .add-sub-button {
        width: auto;
        min-height: 28px;
        flex: 0 0 auto;
        padding: 4px 7px;
        font-size: 0.56rem;
        white-space: nowrap;
    }

    /*
     * Override the generic mobile card conversion.
     * Each player remains one horizontal table row, like Standings.
     */
    .manage-players-page .mobile-player-table {
        width: 100%;
        display: table;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
    }

    .manage-players-page .mobile-player-table thead {
        display: table-header-group;
    }

    .manage-players-page .mobile-player-table tbody {
        display: table-row-group;
    }

    .manage-players-page .mobile-player-table tr {
        width: auto;
        display: table-row;
        padding: 0;
        border: 0;
    }

    .manage-players-page .mobile-player-table th,
    .manage-players-page .mobile-player-table td {
        width: auto;
        display: table-cell;
        padding: 6px 4px;
        border-bottom: 1px solid var(--line);
        vertical-align: middle;
    }

    .manage-players-page .mobile-player-table td::before {
        display: none;
        content: none;
    }

    .manage-players-page .mobile-player-table thead th {
        background: #123126;
        color: #fff;
        font-size: 0.48rem;
        letter-spacing: 0.015em;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    .manage-players-page .mobile-player-table thead th:first-child {
        width: 49%;
        padding-left: 7px;
        text-align: left;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(2) {
        width: 12%;
        font-size: 0;
    }

    .manage-players-page
    .mobile-player-table
    thead
    th:nth-child(2)::after {
        content: "Hcp";
        font-size: 0.48rem;
    }

    /* Hide desktop Phone and Email columns on mobile. */
    .manage-players-page .mobile-player-table th:nth-child(3),
    .manage-players-page .mobile-player-table td:nth-child(3),
    .manage-players-page .mobile-player-table th:nth-child(4),
    .manage-players-page .mobile-player-table td:nth-child(4) {
        display: none;
    }

    .manage-players-page .mobile-player-table th:nth-child(5) {
        width: 15%;
    }

    .manage-players-page .mobile-player-table th:nth-child(6) {
        width: 24%;
    }

    .manage-players-page .mobile-player-table td:first-child {
        min-width: 0;
        padding-left: 7px;
        text-align: left;
    }

    .manage-players-page .mobile-player-table td:first-child > strong {
        min-width: 0;
        display: inline;
        font-size: 0.68rem;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .manage-players-page .designation-badge,
    .manage-players-page .inline-status {
        margin-left: 3px;
        padding: 1px 3px;
        font-size: 0.38rem;
        line-height: 1;
    }

    .manage-players-page .mobile-player-contact {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 3px;
        margin-top: 2px;
        overflow: hidden;
        color: var(--muted);
        font-size: 0.45rem;
        line-height: 1.05;
        white-space: nowrap;
    }

    .manage-players-page .mobile-player-contact a,
    .manage-players-page .mobile-player-contact span {
        min-width: 0;
        overflow: hidden;
        color: inherit;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .manage-players-page .mobile-player-contact a:last-of-type {
        flex: 1 1 auto;
    }

    .manage-players-page .mobile-player-contact i {
        flex: 0 0 auto;
        font-style: normal;
    }

    .manage-players-page .mobile-player-table td:nth-child(2) {
        color: #123126;
        font-size: 0.68rem;
        font-weight: 900;
        text-align: center;
    }

    .manage-players-page .mobile-player-table td:nth-child(5) {
        padding-right: 2px;
        padding-left: 2px;
        text-align: center;
    }

    .manage-players-page .status-badge {
        padding: 2px 3px;
        font-size: 0.42rem;
        line-height: 1;
    }

    .manage-players-page .mobile-player-table .row-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding-right: 3px;
        padding-left: 3px;
    }

    .manage-players-page .mobile-player-table .row-actions form {
        margin: 0;
    }

    .manage-players-page .mobile-player-table .small-button {
        min-height: 25px;
        padding: 3px 4px;
        border-radius: 5px;
        font-size: 0.48rem;
        line-height: 1;
        white-space: nowrap;
    }

    .manage-players-page .pagination {
        gap: 8px;
        padding: 7px;
        font-size: 0.58rem;
    }
}

@media screen and (max-width: 390px) {
    .manage-players-page .directory-shell {
        width: calc(100% - 6px);
    }

    .manage-players-page .directory-card {
        padding: 5px;
    }

    .manage-players-page .player-stat-grid {
        gap: 2px;
    }

    .manage-players-page .player-stat-grid .stat-card {
        min-height: 39px;
        padding: 3px 1px;
    }

    .manage-players-page .filter-form {
        grid-template-columns:
            minmax(0, 1fr)
            70px
            49px;
        gap: 3px;
    }

    .manage-players-page .mobile-player-table thead th:first-child {
        width: 47%;
    }

    .manage-players-page .mobile-player-table th:nth-child(2) {
        width: 12%;
    }

    .manage-players-page .mobile-player-table th:nth-child(5) {
        width: 15%;
    }

    .manage-players-page .mobile-player-table th:nth-child(6) {
        width: 26%;
    }

    .manage-players-page .mobile-player-table th,
    .manage-players-page .mobile-player-table td {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .manage-players-page .mobile-player-table td:first-child > strong {
        font-size: 0.63rem;
    }

    .manage-players-page .mobile-player-contact {
        font-size: 0.41rem;
    }

    .manage-players-page .mobile-player-table .small-button {
        padding-right: 3px;
        padding-left: 3px;
        font-size: 0.44rem;
    }
}

/*
 * Manage Players mobile refinement:
 * - Remove Status column.
 * - Add phone/email icons with hover/focus tooltips.
 * - Increase player-name and handicap size.
 */
.mobile-contact-icons {
    display: none;
}

@media screen and (max-width: 760px) {
    .manage-players-page .mobile-player-table th:nth-child(5),
    .manage-players-page .mobile-player-table td:nth-child(5) {
        display: none !important;
    }

    .manage-players-page .mobile-player-table thead th:first-child {
        width: 58%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(2) {
        width: 14%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(6) {
        width: 28%;
    }

    .manage-players-page
    .mobile-player-table
    td:first-child
    > strong {
        font-size: 0.82rem;
        font-weight: 900;
        line-height: 1.12;
    }

    .manage-players-page .mobile-player-table td:nth-child(2) {
        font-size: 0.9rem;
        font-weight: 950;
        line-height: 1;
    }

    .manage-players-page .mobile-player-contact {
        display: none !important;
    }

    .manage-players-page .mobile-contact-icons {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 3px;
        margin-left: 5px;
        vertical-align: middle;
    }

    .manage-players-page .mobile-contact-icon {
        position: relative;
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #bfd1c8;
        border-radius: 50%;
        background: #eef6f2;
        color: #17583e;
        text-decoration: none;
        cursor: pointer;
    }

    .manage-players-page .mobile-contact-icon svg {
        width: 13px;
        height: 13px;
        display: block;
        fill: currentColor;
    }

    .manage-players-page .mobile-contact-icon:hover,
    .manage-players-page .mobile-contact-icon:focus-visible {
        border-color: #1f7a55;
        background: #dff0e7;
        color: #0f5136;
        outline: 2px solid rgba(31, 122, 85, 0.16);
        outline-offset: 1px;
    }

    .manage-players-page .mobile-contact-icon.is-disabled {
        border-color: #d9dfdc;
        background: #f4f6f5;
        color: #a2aaa6;
        cursor: default;
    }

    .manage-players-page .mobile-contact-icon::before,
    .manage-players-page .mobile-contact-icon::after {
        position: absolute;
        z-index: 60;
        left: 50%;
        pointer-events: none;
        opacity: 0;
        transform: translate(-50%, 5px);
        transition:
            opacity 130ms ease,
            transform 130ms ease;
    }

    .manage-players-page .mobile-contact-icon::before {
        content: "";
        bottom: calc(100% + 3px);
        border: 5px solid transparent;
        border-top-color: #123126;
    }

    .manage-players-page .mobile-contact-icon::after {
        content: attr(data-tooltip);
        bottom: calc(100% + 12px);
        width: max-content;
        max-width: min(230px, 78vw);
        overflow: hidden;
        padding: 6px 8px;
        border-radius: 6px;
        background: #123126;
        color: #fff;
        box-shadow: 0 6px 18px rgba(18, 49, 38, 0.24);
        font-size: 0.62rem;
        font-weight: 750;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .manage-players-page .mobile-contact-icon:hover::before,
    .manage-players-page .mobile-contact-icon:hover::after,
    .manage-players-page .mobile-contact-icon:focus-visible::before,
    .manage-players-page .mobile-contact-icon:focus-visible::after {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    .manage-players-page .mobile-player-table .row-actions {
        gap: 3px;
    }

    .manage-players-page .mobile-player-table .small-button {
        min-height: 27px;
        padding-right: 5px;
        padding-left: 5px;
        font-size: 0.5rem;
    }
}

@media screen and (max-width: 390px) {
    .manage-players-page .mobile-player-table thead th:first-child {
        width: 56%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(2) {
        width: 14%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(6) {
        width: 30%;
    }

    .manage-players-page
    .mobile-player-table
    td:first-child
    > strong {
        font-size: 0.76rem;
    }

    .manage-players-page .mobile-player-table td:nth-child(2) {
        font-size: 0.84rem;
    }

    .manage-players-page .mobile-contact-icons {
        gap: 2px;
        margin-left: 3px;
    }

    .manage-players-page .mobile-contact-icon {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .manage-players-page .mobile-contact-icon svg {
        width: 12px;
        height: 12px;
    }
}

/* Manage Players: live search and simplified actions. */
.manage-players-page .player-stat-grid {
    display: none !important;
}

.manage-players-page .player-live-search-form {
    width: 100%;
    display: flex;
    align-items: end;
    gap: 8px;
}

.manage-players-page
.player-live-search-form
.filter-search {
    min-width: 0;
    flex: 1 1 auto;
}

.player-search-input-wrap {
    position: relative;
    width: 100%;
}

.player-search-input-wrap > svg {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 10px;
    width: 17px;
    height: 17px;
    fill: #65726d;
    pointer-events: none;
    transform: translateY(-50%);
}

.player-search-input-wrap input {
    width: 100%;
    padding-left: 34px;
    padding-right: 84px;
}

.player-search-status {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #65726d;
    font-size: 0.62rem;
    font-weight: 750;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

.manage-players-page .row-actions form {
    display: none !important;
}

@media screen and (max-width: 760px) {
    .manage-players-page .directory-heading {
        margin-bottom: 5px;
    }

    .manage-players-page .directory-filter {
        margin-bottom: 6px;
        padding: 4px 5px;
    }

    .manage-players-page .player-live-search-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 5px;
    }

    .manage-players-page
    .player-live-search-form
    .filter-field {
        min-width: 0;
    }

    .manage-players-page
    .player-live-search-form
    label {
        margin-bottom: 2px;
        font-size: 0.5rem;
        line-height: 1;
    }

    .manage-players-page
    .player-live-search-form
    input {
        min-height: 31px;
        height: 31px;
        padding-top: 2px;
        padding-bottom: 2px;
        padding-left: 30px;
        padding-right: 67px;
        font-size: 0.67rem;
    }

    .player-search-input-wrap > svg {
        left: 8px;
        width: 15px;
        height: 15px;
    }

    .player-search-status {
        right: 8px;
        font-size: 0.53rem;
    }

    .manage-players-page
    .player-live-search-form
    .filter-clear {
        margin: 0 2px 6px 0;
        font-size: 0.55rem;
        white-space: nowrap;
    }

    .manage-players-page
    .mobile-player-table
    .row-actions {
        justify-content: center;
    }

    .manage-players-page
    .mobile-player-table
    .small-button {
        min-width: 47px;
        min-height: 29px;
        padding: 5px 8px;
        font-size: 0.56rem;
    }
}

/* Manage Players: full desktop width and aligned mobile columns. */
.mobile-inline-handicap,
.mobile-contact-cell {
    display: none;
}

@media screen and (min-width: 761px) {
    .manage-players-page .directory-shell {
        width: min(1380px, calc(100% - 40px));
    }

    .manage-players-page .mobile-player-table {
        width: 100%;
        table-layout: fixed;
    }

    .manage-players-page .mobile-player-table th:nth-child(1) {
        width: 24%;
    }

    .manage-players-page .mobile-player-table th:nth-child(2) {
        width: 9%;
    }

    .manage-players-page .mobile-player-table th:nth-child(3) {
        width: 17%;
    }

    .manage-players-page .mobile-player-table th:nth-child(4) {
        width: 31%;
    }

    .manage-players-page .mobile-player-table th:nth-child(5) {
        width: 10%;
    }

    .manage-players-page .mobile-player-table th:nth-child(6),
    .manage-players-page .mobile-player-table .actions-column {
        width: 9%;
    }

    .manage-players-page .mobile-player-table .row-actions {
        justify-content: stretch;
    }

    .manage-players-page
    .mobile-player-table
    .row-actions
    .small-button {
        width: 100%;
        min-width: 0;
    }

    .manage-players-page .desktop-contact-value {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media screen and (max-width: 760px) {
    /*
     * Player + Hcp | Phone | Email | Edit
     */
    .manage-players-page .mobile-player-table th:nth-child(2),
    .manage-players-page .mobile-player-table td:nth-child(2),
    .manage-players-page .mobile-player-table th:nth-child(5),
    .manage-players-page .mobile-player-table td:nth-child(5) {
        display: none !important;
    }

    .manage-players-page .mobile-player-table th:nth-child(3),
    .manage-players-page .mobile-player-table td:nth-child(3),
    .manage-players-page .mobile-player-table th:nth-child(4),
    .manage-players-page .mobile-player-table td:nth-child(4) {
        display: table-cell !important;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(1) {
        width: 59%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(3) {
        width: 10%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(4) {
        width: 10%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(6) {
        width: 21%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(3),
    .manage-players-page .mobile-player-table thead th:nth-child(4) {
        padding-right: 1px;
        padding-left: 1px;
        font-size: 0.42rem;
        letter-spacing: 0;
        text-align: center;
    }

    .manage-players-page
    .mobile-player-table
    td:first-child
    > strong {
        display: inline;
        font-size: 0.82rem;
        font-weight: 900;
        line-height: 1.12;
    }

    .manage-players-page .mobile-inline-handicap {
        display: inline-flex;
        align-items: baseline;
        gap: 2px;
        margin-left: 5px;
        padding: 2px 5px;
        border-radius: 999px;
        background: #e5f2eb;
        color: #0f5136;
        font-size: 0.78rem;
        font-weight: 950;
        line-height: 1;
        vertical-align: middle;
        white-space: nowrap;
    }

    .manage-players-page .mobile-inline-handicap small {
        font-size: 0.42rem;
        font-weight: 900;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .manage-players-page .desktop-contact-value {
        display: none !important;
    }

    .manage-players-page .mobile-contact-cell {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .manage-players-page .player-phone-column,
    .manage-players-page .player-email-column {
        overflow: visible;
        padding-right: 1px !important;
        padding-left: 1px !important;
        text-align: center;
    }

    .manage-players-page .mobile-contact-icon {
        width: 25px;
        height: 25px;
        flex: 0 0 25px;
        margin: 0 auto;
    }

    .manage-players-page .mobile-player-table .row-actions {
        justify-content: center;
        padding-right: 3px;
        padding-left: 3px;
    }

    .manage-players-page .mobile-player-table .small-button {
        width: 100%;
        max-width: 62px;
        min-width: 0;
    }
}

@media screen and (max-width: 390px) {
    .manage-players-page .mobile-player-table thead th:nth-child(1) {
        width: 57%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(3),
    .manage-players-page .mobile-player-table thead th:nth-child(4) {
        width: 10%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(6) {
        width: 23%;
    }

    .manage-players-page
    .mobile-player-table
    td:first-child
    > strong {
        font-size: 0.76rem;
    }

    .manage-players-page .mobile-inline-handicap {
        margin-left: 3px;
        padding: 2px 4px;
        font-size: 0.72rem;
    }

    .manage-players-page .mobile-contact-icon {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }
}

/*
 * Manage Players final mobile layout:
 * Name | HCP | Phone | Email | Edit
 */
@media screen and (max-width: 760px) {
    .manage-players-page .mobile-inline-handicap {
        display: none !important;
    }

    /* Restore the dedicated Handicap column. */
    .manage-players-page .mobile-player-table th:nth-child(2),
    .manage-players-page .mobile-player-table td:nth-child(2) {
        display: table-cell !important;
    }

    /* Status remains hidden. */
    .manage-players-page .mobile-player-table th:nth-child(5),
    .manage-players-page .mobile-player-table td:nth-child(5) {
        display: none !important;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(1) {
        width: 47%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(2) {
        width: 12%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(3) {
        width: 9%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(4) {
        width: 9%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(6) {
        width: 23%;
    }

    .manage-players-page
    .mobile-player-table
    thead
    th:nth-child(2) {
        font-size: 0 !important;
        text-align: center;
    }

    .manage-players-page
    .mobile-player-table
    thead
    th:nth-child(2)::after {
        content: "HCP";
        font-size: 0.48rem;
        letter-spacing: 0.015em;
    }

    .manage-players-page .mobile-player-table td:nth-child(2) {
        padding-right: 2px;
        padding-left: 2px;
        color: #123126;
        font-size: 0.88rem;
        font-weight: 950;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    .manage-players-page .player-phone-column,
    .manage-players-page .player-email-column {
        padding-right: 1px !important;
        padding-left: 1px !important;
        text-align: center;
    }

    .manage-players-page .mobile-contact-cell {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .manage-players-page .mobile-contact-icon {
        margin: 0 auto;
    }
}

@media screen and (max-width: 390px) {
    .manage-players-page .mobile-player-table thead th:nth-child(1) {
        width: 45%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(2) {
        width: 12%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(3),
    .manage-players-page .mobile-player-table thead th:nth-child(4) {
        width: 9%;
    }

    .manage-players-page .mobile-player-table thead th:nth-child(6) {
        width: 25%;
    }

    .manage-players-page .mobile-player-table td:nth-child(2) {
        font-size: 0.82rem;
    }
}

/*
 * Admin Player Scores & HCP
 */
.player-score-history-shell {
    width: min(1480px, calc(100% - 34px));
    max-width: 1480px;
}

.score-history-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(500px, 0.95fr);
    align-items: end;
    gap: 24px;
    margin-bottom: 14px;
}

.score-history-intro h2,
.score-history-results-heading h3 {
    margin: 0;
    color: #0c3325;
}

.score-history-intro .subtle {
    max-width: 720px;
    margin-bottom: 0;
    line-height: 1.45;
}

.score-history-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.7fr) auto;
    align-items: end;
    gap: 9px;
}

.score-history-filters .field-group {
    margin: 0;
}

.score-history-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.score-history-filter-actions .button-primary,
.score-history-filter-actions .button-secondary {
    min-height: 41px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.score-history-results {
    overflow: hidden;
    padding: 0;
}

.score-history-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #cfddd5;
    background:
        linear-gradient(
            135deg,
            #f0f7f3,
            #fff
        );
}

.score-history-results-heading h3 {
    font-size: 1.05rem;
}

.score-history-results-heading .subtle {
    margin: 3px 0 0;
    font-size: 0.68rem;
}

.score-history-table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.score-history-table {
    width: 100%;
    min-width: 1260px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.score-history-table th,
.score-history-table td {
    padding: 9px 8px;
    border-right: 1px solid #dce6e1;
    border-bottom: 1px solid #dce6e1;
    vertical-align: middle;
}

.score-history-table thead th {
    background: #123126;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 950;
    letter-spacing: 0.045em;
    text-align: center;
    text-transform: uppercase;
}

.score-history-table thead th:first-child {
    width: 190px;
    text-align: left;
}

.score-history-table thead th:nth-child(2) {
    width: 130px;
}

.score-history-table thead th:nth-child(3) {
    width: 90px;
}

.score-history-table tbody tr:nth-child(even) {
    background: #fafcfb;
}

.score-history-table tbody th {
    text-align: left;
}

.score-history-player-link {
    color: #0c3325;
    font-size: 0.75rem;
    font-weight: 950;
    line-height: 1.2;
    text-decoration: none;
}

.score-history-player-link:hover,
.score-history-player-link:focus-visible {
    color: #1f6d4d;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.score-history-player-link:focus-visible {
    outline: 3px solid rgba(31, 109, 77, 0.16);
    outline-offset: 2px;
    border-radius: 4px;
}

.score-history-senior,
.score-history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 3px 5px;
    border-radius: 999px;
    font-size: 0.42rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.score-history-senior {
    margin-left: 4px;
    background: #ece8f6;
    color: #604c88;
}

.score-history-badge {
    margin-right: 3px;
}

.score-history-badge.is-regular {
    background: #e2f1e8;
    color: #17583e;
}

.score-history-badge.is-substitute {
    background: #efe6f4;
    color: #74468c;
}

.score-history-current-hcp {
    color: #17583e;
    font-size: 1rem;
    font-weight: 950;
    text-align: center;
}

.score-history-score {
    display: grid;
    justify-items: center;
    gap: 2px;
    text-align: center;
}

.score-history-score strong {
    color: #0c3325;
    font-size: 0.93rem;
    font-weight: 950;
    line-height: 1;
}

.score-history-score span {
    color: #69766f;
    font-size: 0.47rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.score-history-score small {
    color: #1f6d4d;
    font-size: 0.44rem;
    font-weight: 950;
    letter-spacing: 0.025em;
}

.score-history-empty {
    display: block;
    color: #a4afa9;
    font-size: 0.85rem;
    text-align: center;
}

.score-history-no-results {
    padding: 34px 18px;
    color: #69766f;
    text-align: center;
}

.score-history-mobile-list {
    display: none;
}

@media screen and (max-width: 920px) {
    .score-history-intro {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .score-history-filters {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 0.65fr) auto;
    }
}

@media screen and (max-width: 760px) {
    .player-score-history-shell {
        width: calc(100% - 10px);
        margin-top: 8px;
    }

    .score-history-intro {
        gap: 11px;
        margin-bottom: 8px;
        padding: 12px 10px;
    }

    .score-history-intro h2 {
        font-size: 1rem;
        line-height: 1.15;
    }

    .score-history-intro .subtle {
        margin-top: 5px;
        font-size: 0.62rem;
    }

    .score-history-filters {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .score-history-filter-actions {
        grid-column: 1 / -1;
    }

    .score-history-filter-actions > * {
        flex: 1 1 0;
    }

    .score-history-results {
        border-radius: 9px;
    }

    .score-history-results-heading {
        padding: 10px;
    }

    .score-history-results-heading h3 {
        font-size: 0.84rem;
    }

    .score-history-results-heading .subtle {
        font-size: 0.56rem;
    }

    .score-history-table-wrap {
        display: none;
    }

    .score-history-mobile-list {
        display: grid;
        gap: 8px;
        padding: 8px;
    }

    .score-history-mobile-card {
        overflow: hidden;
        border: 1px solid #cadbd2;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 5px 14px rgba(8, 39, 29, 0.06);
    }

    .score-history-mobile-card > header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 10px;
        border-bottom: 1px solid #d9e5df;
        background:
            linear-gradient(
                135deg,
                #f2f8f5,
                #fff
            );
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.8rem;
    }

    .score-history-mobile-badges {
        margin-top: 3px;
    }

    .score-history-mobile-hcp {
        flex: 0 0 auto;
        min-width: 72px;
        padding: 6px 8px;
        border: 1px solid #bdd2c7;
        border-radius: 8px;
        background: #fff;
        text-align: center;
    }

    .score-history-mobile-hcp span {
        display: block;
        color: #69766f;
        font-size: 0.42rem;
        font-weight: 950;
        letter-spacing: 0.035em;
        text-transform: uppercase;
    }

    .score-history-mobile-hcp strong {
        display: block;
        margin-top: 2px;
        color: #17583e;
        font-size: 1.05rem;
        line-height: 1;
    }

    .score-history-mobile-scores {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1px;
        background: #d9e5df;
    }

    .score-history-mobile-score {
        min-height: 82px;
        display: grid;
        align-content: start;
        justify-items: center;
        gap: 5px;
        padding: 7px 4px;
        background: #fff;
    }

    .score-history-mobile-score:nth-child(even) {
        background: #fafcfb;
    }

    .score-history-mobile-score .score-position {
        color: #75827b;
        font-size: 0.42rem;
        font-weight: 950;
        letter-spacing: 0.045em;
        text-transform: uppercase;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 1rem;
    }

    .score-history-mobile-score
    .score-history-score span {
        font-size: 0.43rem;
        white-space: normal;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-score small {
        font-size: 0.42rem;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-scores {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .score-history-mobile-score {
        min-height: 78px;
    }
}

/*
 * Player score-history refinement:
 * - removes Active/Inactive status
 * - separates substitute players
 * - uses the actual week as each score heading
 */
.score-history-week-heading {
    display: block;
    color: #17583e;
    font-size: 0.5rem;
    font-weight: 950;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: uppercase;
}

.score-history-date {
    color: #69766f;
    font-size: 0.46rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.score-history-score.is-empty {
    min-height: 47px;
    align-content: center;
}

.score-history-divider-row th {
    padding: 12px 14px !important;
    border-top: 3px solid #8cac9b;
    border-right: 0 !important;
    background:
        linear-gradient(
            90deg,
            #e8f2ed,
            #f8fbf9
        ) !important;
    color: #17583e;
    text-align: left !important;
}

.score-history-divider-row span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.score-history-divider-row span::after {
    height: 2px;
    flex: 1 1 auto;
    content: "";
    background:
        linear-gradient(
            90deg,
            #8cac9b,
            transparent
        );
}

.score-history-mobile-divider {
    display: none;
}

@media screen and (max-width: 760px) {
    .score-history-mobile-divider {
        display: flex;
        align-items: center;
        gap: 9px;
        margin: 7px 1px 0;
        padding: 11px 3px 4px;
        color: #17583e;
        font-size: 0.59rem;
        font-weight: 950;
        letter-spacing: 0.065em;
        text-transform: uppercase;
    }

    .score-history-mobile-divider::before,
    .score-history-mobile-divider::after {
        height: 2px;
        flex: 1 1 auto;
        content: "";
        background: #9ab5a6;
    }

    .score-history-mobile-score {
        min-height: 88px;
        gap: 3px;
        padding-top: 8px;
    }

    .score-history-mobile-score
    .score-history-week-heading {
        margin-bottom: 3px;
        font-size: 0.51rem;
    }

    .score-history-mobile-score
    .score-history-date {
        font-size: 0.43rem;
        white-space: normal;
        text-align: center;
    }
}

/*
 * Player score-history cleanup:
 * - Player Type column removed
 * - missing score cells display only an em dash
 */
.score-history-table thead th:first-child {
    width: 220px;
}

.score-history-table thead th:nth-child(2) {
    width: 105px;
}

.score-history-score.is-empty {
    min-height: 38px;
    place-content: center;
}

.score-history-score.is-empty
.score-history-empty {
    font-size: 1rem;
}

/*
 * Current Handicap emphasis.
 */
.score-history-table thead th:nth-child(2) {
    background:
        linear-gradient(
            145deg,
            #7b5a12,
            #a77b1c
        );
    color: #fff;
}

.score-history-table tbody td.score-history-current-hcp {
    background:
        linear-gradient(
            145deg,
            #fff8df,
            #f6ebbf
        );
    color: #6b4c08;
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: -0.025em;
    box-shadow:
        inset 3px 0 0 rgba(167, 123, 28, 0.42),
        inset -3px 0 0 rgba(167, 123, 28, 0.18);
}

.score-history-table tbody tr:nth-child(even)
td.score-history-current-hcp {
    background:
        linear-gradient(
            145deg,
            #f9efc9,
            #eee0a8
        );
}

.score-history-mobile-hcp {
    border-color: #c49a37;
    background:
        linear-gradient(
            145deg,
            #fff8df,
            #f4e6ae
        );
    box-shadow:
        inset 0 0 0 1px rgba(167, 123, 28, 0.08);
}

.score-history-mobile-hcp span {
    color: #7b5a12;
}

.score-history-mobile-hcp strong {
    color: #6b4c08;
    font-size: 1.3rem;
    font-weight: 950;
}

@media screen and (max-width: 760px) {
    .score-history-mobile-hcp {
        min-width: 82px;
        padding: 7px 9px;
    }

    .score-history-mobile-hcp strong {
        font-size: 1.45rem;
    }
}

/*
 * Player score-history search-only filter layout.
 */
.score-history-filters {
    grid-template-columns: minmax(240px, 1fr) auto;
}

@media screen and (max-width: 760px) {
    .score-history-filters {
        grid-template-columns: 1fr;
    }

    .score-history-filter-actions {
        grid-column: auto;
    }
}

/*
 * Compact mobile score history:
 * one horizontal row per player.
 */
@media screen and (max-width: 760px) {
    .score-history-mobile-list {
        display: block;
        width: 100%;
        padding: 6px;
        overflow-x: auto;
        overflow-y: visible;
        background: #edf4f0;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .score-history-mobile-card {
        width: max-content;
        min-width: 586px;
        display: grid;
        grid-template-columns:
            142px
            62px
            repeat(6, 63px);
        align-items: stretch;
        gap: 0;
        margin: 0 0 5px;
        overflow: visible;
        border: 1px solid #c8d8d0;
        border-radius: 7px;
        background: #fff;
        box-shadow: 0 2px 7px rgba(8, 39, 29, 0.05);
    }

    .score-history-mobile-card > header,
    .score-history-mobile-scores {
        display: contents;
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        position: sticky;
        z-index: 4;
        left: 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 6px 8px;
        border-right: 2px solid #9eb7aa;
        background:
            linear-gradient(
                90deg,
                #f7fbf9 0%,
                #f7fbf9 88%,
                #edf5f1 100%
            );
        box-shadow: 4px 0 7px rgba(8, 39, 29, 0.08);
    }

    .score-history-mobile-card
    .score-history-player-link {
        overflow: hidden;
        font-size: 0.7rem;
        line-height: 1.12;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .score-history-mobile-badges {
        min-height: 0;
        margin-top: 2px;
        line-height: 1;
    }

    .score-history-mobile-badges
    .score-history-senior {
        margin: 0;
        padding: 2px 4px;
        font-size: 0.35rem;
    }

    .score-history-mobile-hcp {
        min-width: 0;
        display: grid;
        align-content: center;
        justify-items: center;
        gap: 1px;
        padding: 4px;
        border: 0;
        border-right: 1px solid #d3dfd9;
        border-radius: 0;
        background:
            linear-gradient(
                145deg,
                #fff8df,
                #f4e6ae
            );
        box-shadow: none;
    }

    .score-history-mobile-hcp span {
        font-size: 0.36rem;
        line-height: 1;
    }

    .score-history-mobile-hcp strong {
        margin: 0;
        font-size: 1.08rem;
        line-height: 1;
    }

    .score-history-mobile-score {
        min-width: 0;
        min-height: 54px;
        display: grid;
        place-items: center;
        gap: 0;
        padding: 4px 2px;
        border-right: 1px solid #d8e3dd;
        background: #fff;
    }

    .score-history-mobile-score:nth-child(even) {
        background: #f8fbf9;
    }

    .score-history-mobile-score:last-child {
        border-right: 0;
    }

    .score-history-mobile-score
    .score-history-score {
        min-height: 0;
        gap: 2px;
    }

    .score-history-mobile-score
    .score-history-week-heading {
        margin: 0 0 1px;
        font-size: 0.4rem;
        line-height: 1;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 0.84rem;
        line-height: 1;
    }

    .score-history-mobile-score
    .score-history-date {
        display: none;
    }

    .score-history-mobile-score
    .score-history-score small {
        font-size: 0.36rem;
        line-height: 1;
    }

    .score-history-mobile-score
    .score-history-empty {
        font-size: 0.8rem;
    }

    .score-history-mobile-divider {
        width: 586px;
        min-width: 586px;
        margin: 7px 0 5px;
        padding: 6px 3px 4px;
        font-size: 0.5rem;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-card {
        min-width: 548px;
        grid-template-columns:
            128px
            58px
            repeat(6, 60px);
    }

    .score-history-mobile-divider {
        width: 548px;
        min-width: 548px;
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.66rem;
    }

    .score-history-mobile-hcp strong {
        font-size: 1rem;
    }
}

/*
 * Narrower, centered mobile score columns.
 */
@media screen and (max-width: 760px) {
    .score-history-mobile-card {
        min-width: 514px;
        grid-template-columns:
            138px
            58px
            repeat(6, 53px);
    }

    .score-history-mobile-divider {
        width: 514px;
        min-width: 514px;
    }

    .score-history-mobile-score {
        min-height: 52px;
        padding: 3px 1px;
        align-items: center;
        justify-items: center;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-score {
        width: 100%;
        min-height: 0;
        display: grid;
        align-content: center;
        justify-content: center;
        justify-items: center;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-week-heading,
    .score-history-mobile-score
    .score-history-score strong,
    .score-history-mobile-score
    .score-history-score small,
    .score-history-mobile-score
    .score-history-empty {
        width: 100%;
        display: block;
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-week-heading {
        font-size: 0.38rem;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 0.82rem;
    }

    .score-history-mobile-score
    .score-history-score small {
        font-size: 0.34rem;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-card {
        min-width: 482px;
        grid-template-columns:
            124px
            56px
            repeat(6, 50px);
    }

    .score-history-mobile-divider {
        width: 482px;
        min-width: 482px;
    }
}

/*
 * Extra-narrow mobile score columns with full vertical centering.
 */
@media screen and (max-width: 760px) {
    .score-history-mobile-card {
        min-width: 466px;
        grid-template-columns:
            132px
            56px
            repeat(6, 46px);
        align-items: stretch;
    }

    .score-history-mobile-divider {
        width: 466px;
        min-width: 466px;
    }

    .score-history-mobile-score {
        min-height: 54px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2px 0;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-score {
        width: 100%;
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        margin: 0;
        padding: 0;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-week-heading,
    .score-history-mobile-score
    .score-history-score strong,
    .score-history-mobile-score
    .score-history-score small,
    .score-history-mobile-score
    .score-history-empty {
        width: 100%;
        margin: 0;
        padding: 0;
        line-height: 1;
        text-align: center;
    }

    .score-history-mobile-score
    .score-history-week-heading {
        font-size: 0.36rem;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 0.8rem;
    }

    .score-history-mobile-score
    .score-history-score small {
        font-size: 0.32rem;
        white-space: nowrap;
    }

    .score-history-mobile-score
    .score-history-empty {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        font-size: 0.82rem;
    }

    .score-history-score.is-empty {
        height: 100%;
        min-height: 0;
        place-content: initial;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-card {
        min-width: 442px;
        grid-template-columns:
            120px
            52px
            repeat(6, 45px);
    }

    .score-history-mobile-divider {
        width: 442px;
        min-width: 442px;
    }
}

/*
 * Live player-score-history search state.
 */
.score-history-filters.is-searching
[data-score-history-search-input] {
    background-image:
        linear-gradient(
            90deg,
            transparent,
            rgba(31, 109, 77, 0.08),
            transparent
        );
    background-size: 200% 100%;
    animation: score-history-search-pulse 850ms linear infinite;
}

@keyframes score-history-search-pulse {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .score-history-filters.is-searching
    [data-score-history-search-input] {
        animation: none;
    }
}

/*
 * Fit all six recent scores across common mobile phone widths.
 */
@media screen and (max-width: 760px) {
    .score-history-mobile-list {
        padding: 4px;
        overflow-x: hidden;
    }

    .score-history-mobile-card {
        width: 100%;
        min-width: 0;
        grid-template-columns:
            minmax(88px, 1fr)
            40px
            repeat(6, 33px);
    }

    .score-history-mobile-divider {
        width: 100%;
        min-width: 0;
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        padding: 5px 5px;
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.61rem;
        line-height: 1.05;
    }

    .score-history-mobile-badges
    .score-history-senior {
        padding: 1px 3px;
        font-size: 0.31rem;
    }

    .score-history-mobile-hcp {
        padding: 3px 1px;
    }

    .score-history-mobile-hcp span {
        font-size: 0.3rem;
    }

    .score-history-mobile-hcp strong {
        font-size: 0.88rem;
    }

    .score-history-mobile-score {
        min-height: 50px;
        padding: 1px 0;
    }

    .score-history-mobile-score
    .score-history-score {
        gap: 1px;
    }

    .score-history-mobile-score
    .score-history-week-heading {
        font-size: 0.31rem;
        letter-spacing: 0.025em;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 0.72rem;
    }

    .score-history-mobile-score
    .score-history-score small {
        font-size: 0.27rem;
        letter-spacing: 0;
    }

    .score-history-mobile-score
    .score-history-empty {
        font-size: 0.72rem;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-card {
        grid-template-columns:
            minmax(82px, 1fr)
            38px
            repeat(6, 31px);
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.58rem;
    }

    .score-history-mobile-hcp strong {
        font-size: 0.83rem;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 0.69rem;
    }
}

@media screen and (max-width: 340px) {
    .score-history-mobile-card {
        grid-template-columns:
            minmax(76px, 1fr)
            36px
            repeat(6, 29px);
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.54rem;
    }

    .score-history-mobile-score
    .score-history-week-heading {
        font-size: 0.28rem;
    }

    .score-history-mobile-score
    .score-history-score strong {
        font-size: 0.65rem;
    }

    .score-history-mobile-score
    .score-history-score small {
        font-size: 0.24rem;
    }
}

/*
 * Narrow mobile player-name column.
 * Score columns divide all remaining width evenly.
 */
@media screen and (max-width: 760px) {
    .score-history-mobile-card {
        width: 100%;
        min-width: 0;
        grid-template-columns:
            76px
            38px
            repeat(6, minmax(0, 1fr));
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        width: 76px;
        min-width: 76px;
        max-width: 76px;
        padding: 4px 4px;
    }

    .score-history-mobile-card
    .score-history-player-link {
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.57rem;
        line-height: 1.08;
        text-overflow: ellipsis;
        white-space: normal;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .score-history-mobile-hcp {
        width: 38px;
        min-width: 38px;
        max-width: 38px;
    }

    .score-history-mobile-score {
        width: auto;
        min-width: 0;
        max-width: none;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-card {
        grid-template-columns:
            70px
            36px
            repeat(6, minmax(0, 1fr));
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
    }

    .score-history-mobile-hcp {
        width: 36px;
        min-width: 36px;
        max-width: 36px;
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.54rem;
    }
}

@media screen and (max-width: 340px) {
    .score-history-mobile-card {
        grid-template-columns:
            64px
            34px
            repeat(6, minmax(0, 1fr));
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        width: 64px;
        min-width: 64px;
        max-width: 64px;
    }

    .score-history-mobile-hcp {
        width: 34px;
        min-width: 34px;
        max-width: 34px;
    }

    .score-history-mobile-card
    .score-history-player-link {
        font-size: 0.51rem;
    }
}

/*
 * Latest handicap-change arrow.
 */
.score-history-table thead th:nth-child(3) {
    width: 66px;
    background:
        linear-gradient(
            145deg,
            #394a43,
            #52675e
        );
}

.score-history-change-column {
    background: #f3f7f5;
    text-align: center;
}

.score-history-handicap-change {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1;
    cursor: help;
}

.score-history-handicap-change.is-up {
    border: 1px solid #d5a6a6;
    background: #f9e8e8;
    color: #a02f2f;
}

.score-history-handicap-change.is-down {
    border: 1px solid #9fcbb4;
    background: #e2f3e9;
    color: #16623f;
}

.score-history-handicap-change.is-same,
.score-history-handicap-change.is-none {
    border: 1px solid #ccd6d1;
    background: #eef2f0;
    color: #7a8780;
}

.score-history-handicap-change:focus-visible {
    outline: 3px solid rgba(31, 109, 77, 0.2);
    outline-offset: 2px;
}

.score-history-mobile-change {
    display: none;
}

@media screen and (max-width: 760px) {
    .score-history-mobile-card {
        grid-template-columns:
            70px
            36px
            22px
            repeat(6, minmax(0, 1fr));
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
    }

    .score-history-mobile-hcp {
        width: 36px;
        min-width: 36px;
        max-width: 36px;
    }

    .score-history-mobile-change {
        width: 22px;
        min-width: 22px;
        max-width: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-right: 1px solid #d3dfd9;
        background: #f3f7f5;
    }

    .score-history-mobile-change
    .score-history-handicap-change {
        width: 18px;
        height: 30px;
        border: 0;
        border-radius: 0;
        background: transparent;
        font-size: 1.05rem;
    }
}

@media screen and (max-width: 390px) {
    .score-history-mobile-card {
        grid-template-columns:
            64px
            34px
            20px
            repeat(6, minmax(0, 1fr));
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        width: 64px;
        min-width: 64px;
        max-width: 64px;
    }

    .score-history-mobile-hcp {
        width: 34px;
        min-width: 34px;
        max-width: 34px;
    }

    .score-history-mobile-change {
        width: 20px;
        min-width: 20px;
        max-width: 20px;
    }
}

@media screen and (max-width: 340px) {
    .score-history-mobile-card {
        grid-template-columns:
            58px
            32px
            18px
            repeat(6, minmax(0, 1fr));
    }

    .score-history-mobile-card
    > header
    > div:first-child {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
    }

    .score-history-mobile-hcp {
        width: 32px;
        min-width: 32px;
        max-width: 32px;
    }

    .score-history-mobile-change {
        width: 18px;
        min-width: 18px;
        max-width: 18px;
    }

    .score-history-mobile-change
    .score-history-handicap-change {
        font-size: 0.95rem;
    }
}

/*
 * Handicap arrow behavior correction.
 * Use a normal pointer instead of the browser's question-mark cursor.
 */
.score-history-handicap-change {
    cursor: default;
    user-select: none;
}

.score-history-handicap-change.is-up,
.score-history-handicap-change.is-down {
    cursor: pointer;
}

.score-history-handicap-change.is-up {
    font-size: 1.5rem;
}

.score-history-handicap-change.is-down {
    font-size: 1.5rem;
}

@media screen and (max-width: 760px) {
    .score-history-mobile-change
    .score-history-handicap-change.is-up,
    .score-history-mobile-change
    .score-history-handicap-change.is-down {
        font-size: 1.15rem;
    }
}

/*
 * Manage Matches week-status controls.
 */
.week-status-editor,
.admin-week-status-readout {
    border: 1px solid #c9dbd1;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            #f1f8f4,
            #fff
        );
}

.week-status-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.45fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px 14px;
}

.week-status-editor label {
    color: #123126;
    font-size: 0.75rem;
    font-weight: 950;
}

.week-status-editor p {
    margin: 3px 0 0;
    color: #66766e;
    font-size: 0.59rem;
    line-height: 1.35;
}

.week-status-editor select {
    min-height: 42px;
    margin: 0;
    border-color: #9ebcae;
    background-color: #fff;
    font-weight: 900;
}

.admin-week-status-readout {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    padding: 7px 11px;
}

.admin-week-status-readout span {
    color: #68766f;
    font-size: 0.5rem;
    font-weight: 950;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.admin-week-status-readout strong {
    font-size: 0.68rem;
}

.admin-week-status-readout.is-completed {
    border-color: #a9cdb9;
    background: #e8f5ed;
    color: #17583e;
}

.admin-week-status-readout.is-rained_out {
    border-color: #b9c4ce;
    background: #eef2f5;
    color: #53636f;
}

.admin-week-status-readout.is-in_progress {
    border-color: #d4bd72;
    background: #fff7dc;
    color: #76590e;
}

/*
 * Email Players admin page.
 */
.email-players-shell {
    width: min(1320px, calc(100% - 34px));
    max-width: 1320px;
}

.email-players-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 14px;
}

.email-players-intro h2,
.email-standings-heading h3 {
    margin: 0;
    color: #123126;
}

.email-players-intro .subtle {
    margin-bottom: 0;
}

.email-recipient-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 8px;
}

.email-recipient-summary > div {
    min-width: 112px;
    padding: 9px 12px;
    border: 1px solid #cadbd2;
    border-radius: 9px;
    background:
        linear-gradient(
            145deg,
            #f4f9f6,
            #fff
        );
    text-align: center;
}

.email-recipient-summary span,
.email-recipient-summary strong {
    display: block;
}

.email-recipient-summary span {
    color: #68766f;
    font-size: 0.5rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.email-recipient-summary strong {
    margin-top: 2px;
    color: #17583e;
    font-size: 1.18rem;
}

.email-players-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr);
    align-items: start;
    gap: 14px;
}

.email-players-form textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.55;
}

.email-subs-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #cadbd2;
    border-radius: 9px;
    background: #f6faf8;
    cursor: pointer;
}

.email-subs-option input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 1px 0 0;
}

.email-subs-option span,
.email-subs-option strong,
.email-subs-option small {
    display: block;
}

.email-subs-option strong {
    color: #123126;
    font-size: 0.72rem;
}

.email-subs-option small {
    margin-top: 3px;
    color: #68766f;
    font-size: 0.58rem;
    line-height: 1.35;
}

.email-automatic-content {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border-left: 4px solid #b4871e;
    border-radius: 7px;
    background: #fff8df;
}

.email-automatic-content strong {
    color: #604806;
    font-size: 0.68rem;
}

.email-automatic-content span {
    color: #77652f;
    font-size: 0.57rem;
}

.email-players-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.email-players-actions button {
    min-width: 180px;
}

.email-standings-preview {
    overflow: hidden;
    padding: 0;
}

.email-standings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #cdded5;
    background:
        linear-gradient(
            135deg,
            #edf6f1,
            #fff
        );
}

.email-standings-heading h3 {
    font-size: 1rem;
}

.email-standings-heading > span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #17583e;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 950;
}

.email-standings-table-wrap {
    overflow-x: auto;
}

.email-standings-table {
    width: 100%;
    border-collapse: collapse;
}

.email-standings-table th,
.email-standings-table td {
    padding: 8px 9px;
    border-right: 1px solid #d9e5df;
    border-bottom: 1px solid #d9e5df;
    font-size: 0.64rem;
    text-align: center;
}

.email-standings-table thead th {
    background: #123126;
    color: #fff;
    font-size: 0.51rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.email-standings-table tbody th {
    color: #123126;
    text-align: left;
}

.email-standings-table tbody tr:nth-child(even) {
    background: #f8fbf9;
}

.email-standings-table tbody td strong {
    color: #17583e;
    font-size: 0.72rem;
}

@media screen and (max-width: 900px) {
    .email-players-layout {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 760px) {
    .week-status-editor {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .week-status-editor select {
        width: 100%;
    }

    .admin-week-status-readout {
        margin-left: 4px;
    }

    .email-players-shell {
        width: calc(100% - 10px);
        margin-top: 7px;
    }

    .email-players-intro {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 10px;
    }

    .email-players-intro h2 {
        font-size: 1.03rem;
    }

    .email-recipient-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .email-recipient-summary > div {
        min-width: 0;
        padding: 7px;
    }

    .email-players-layout {
        gap: 8px;
    }

    .email-players-form {
        padding: 11px 10px;
    }

    .email-players-form textarea {
        min-height: 180px;
    }

    .email-players-actions button {
        width: 100%;
        min-width: 0;
    }

    .email-standings-heading {
        padding: 11px 10px;
    }

    .email-standings-heading h3 {
        font-size: 0.82rem;
    }

    .email-standings-table th,
    .email-standings-table td {
        padding: 7px 5px;
        font-size: 0.58rem;
    }
}

/*
 * Detailed automatic email standings and debug delivery.
 */
.email-debug-delivery {
    margin-top: 12px;
    padding: 12px;
    border: 2px solid #d0a329;
    border-radius: 9px;
    background:
        linear-gradient(
            135deg,
            #fff7dc,
            #fffdf5
        );
}

.email-debug-delivery label {
    color: #614900;
}

.email-debug-delivery select {
    width: 100%;
    min-height: 43px;
    margin-top: 5px;
    border-color: #c49a28;
    background: #fff;
    font-weight: 850;
}

.email-debug-delivery > p {
    margin: 6px 0 0;
    color: #766127;
    font-size: 0.57rem;
    line-height: 1.4;
}

.email-standings-preview {
    min-width: 0;
}

.email-standings-table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.email-standings-table {
    width: 100%;
    min-width: 880px;
    table-layout: fixed;
}

.email-standings-table th,
.email-standings-table td {
    padding: 7px 4px;
    vertical-align: middle;
    text-align: center;
}

.email-standings-table thead th:nth-child(1) {
    width: 70px;
}

.email-standings-table thead th:nth-child(2) {
    width: 54px;
}

.email-standings-table thead th:nth-child(3) {
    width: 245px;
    text-align: left;
}

.email-standings-table thead th:nth-child(4),
.email-standings-table thead th:nth-child(6) {
    width: 50px;
}

.email-standings-table thead th:nth-child(5),
.email-standings-table thead th:nth-child(9) {
    width: 64px;
}

.email-standings-table thead th:nth-child(7),
.email-standings-table thead th:nth-child(8) {
    width: 92px;
}

.email-standings-table tbody th {
    text-align: center;
}

.email-standings-table .email-team-name {
    overflow-wrap: anywhere;
    color: #123126;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
}

.email-standings-table .email-team-number,
.email-standings-table .email-match-points,
.email-standings-table .email-ytd-points {
    font-weight: 950;
}

.email-standings-table .email-ytd-points,
.email-standings-table .email-new-handicap {
    color: #17583e;
    font-weight: 950;
}

.email-standings-table tr.team-start > * {
    border-top-width: 2px;
    border-top-color: #93aa9e;
}

.email-standings-table tr.team-continuation {
    background: #fff;
}

.email-standings-note {
    margin: 10px 14px 14px;
    color: #68766f;
    font-size: 0.56rem;
    line-height: 1.45;
}

@media screen and (max-width: 900px) {
    .email-standings-table {
        min-width: 820px;
    }
}

@media screen and (max-width: 760px) {
    .email-debug-delivery {
        padding: 10px;
    }

    .email-debug-delivery select {
        font-size: 0.63rem;
    }

    .email-standings-table {
        min-width: 760px;
    }

    .email-standings-table th,
    .email-standings-table td {
        padding: 6px 3px;
        font-size: 0.53rem;
    }

    .email-standings-table thead th {
        font-size: 0.45rem;
    }

    .email-standings-note {
        margin-right: 10px;
        margin-left: 10px;
        font-size: 0.52rem;
    }
}

.email-subject-note {
    margin: 5px 0 0;
    color: #68766f;
    font-size: 0.55rem;
    line-height: 1.35;
}

/*
 * Authenticated SMTP delivery status.
 */
.email-smtp-status {
    display: grid;
    gap: 9px;
    margin: 12px 0;
    padding: 12px;
    border: 2px solid;
    border-radius: 9px;
}

.email-smtp-status.is-ready {
    border-color: #88b59d;
    background:
        linear-gradient(
            135deg,
            #e8f5ed,
            #fbfefc
        );
}

.email-smtp-status.is-error {
    border-color: #cf8d8d;
    background:
        linear-gradient(
            135deg,
            #fbeaea,
            #fffafa
        );
}

.email-smtp-status > div > span,
.email-smtp-status > div > strong {
    display: block;
}

.email-smtp-status > div > span {
    color: #68766f;
    font-size: 0.5rem;
    font-weight: 950;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.email-smtp-status > div > strong {
    margin-top: 2px;
    color: #123126;
    font-size: 0.76rem;
}

.email-smtp-status.is-error > div > strong {
    color: #8e2f2f;
}

.email-smtp-status dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.email-smtp-status dl > div {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(88, 126, 106, 0.25);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
}

.email-smtp-status dt {
    color: #68766f;
    font-size: 0.45rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.email-smtp-status dd {
    overflow: hidden;
    margin: 2px 0 0;
    color: #123126;
    font-size: 0.58rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-smtp-status p {
    margin: 0;
    color: #7e3030;
    font-size: 0.59rem;
    line-height: 1.45;
}

.email-smtp-status code {
    width: fit-content;
    padding: 4px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.8);
    color: #5d2929;
    font-size: 0.56rem;
}

@media screen and (max-width: 760px) {
    .email-smtp-status {
        padding: 10px;
    }

    .email-smtp-status dl {
        grid-template-columns: 1fr;
    }

    .email-smtp-status dd {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/*
 * Wider desktop email editor and substitution styling.
 */
.email-team-name .email-replaced-player {
    color: #727b76;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.email-team-name .email-substitute-name {
    display: block;
    margin-top: 2px;
    color: #b42318;
    font-weight: 950;
    text-decoration: none;
}

.email-players-form textarea {
    width: 100%;
    box-sizing: border-box;
}

@media screen and (min-width: 901px) {
    .email-players-shell {
        width: min(1480px, calc(100% - 34px));
        max-width: 1480px;
    }

    .email-players-layout {
        grid-template-columns:
            minmax(650px, 1.4fr)
            minmax(450px, 0.8fr);
    }

    .email-players-form textarea {
        min-height: 280px;
    }
}

/*
 * Compact desktop email form with wider standings preview.
 */
@media screen and (min-width: 901px) {
    .email-players-shell {
        width: min(1540px, calc(100% - 30px));
        max-width: 1540px;
    }

    .email-players-layout {
        grid-template-columns:
            minmax(390px, 0.62fr)
            minmax(760px, 1.38fr);
        gap: 12px;
    }

    .email-players-form {
        padding: 13px 14px;
    }

    .email-players-form .field-group {
        margin-bottom: 9px;
    }

    .email-players-form label {
        margin-bottom: 3px;
    }

    .email-players-form input[type="text"],
    .email-players-form select {
        min-height: 38px;
    }

    .email-players-form textarea {
        min-height: 170px;
        max-height: 260px;
        padding: 9px 10px;
    }

    .email-subs-option {
        gap: 8px;
        margin: 8px 0;
        padding: 9px 10px;
    }

    .email-subs-option input {
        width: 18px;
        height: 18px;
    }

    .email-smtp-status,
    .email-debug-delivery {
        margin: 8px 0;
        padding: 9px 10px;
    }

    .email-smtp-status {
        gap: 6px;
    }

    .email-smtp-status dl {
        gap: 5px;
    }

    .email-smtp-status dl > div {
        padding: 5px 6px;
    }

    .email-automatic-content {
        padding: 8px 9px;
    }

    .email-players-actions {
        margin-top: 9px;
    }

    .email-players-actions button {
        min-width: 150px;
        min-height: 40px;
    }

    .email-standings-preview {
        width: 100%;
    }

    .email-standings-heading {
        padding: 12px 14px;
    }

    .email-standings-heading h3 {
        font-size: 1.08rem;
    }

    .email-standings-table {
        min-width: 1000px;
    }

    .email-standings-table th,
    .email-standings-table td {
        padding: 8px 6px;
        font-size: 0.66rem;
    }

    .email-standings-table thead th {
        font-size: 0.52rem;
    }

    .email-standings-table thead th:nth-child(3) {
        width: 300px;
    }
}

/*
 * Optional email content and bottom delivery status.
 */
.email-stats-option {
    border-color: #c8ad57;
    background:
        linear-gradient(
            135deg,
            #fff7dc,
            #fffdf5
        );
}

.email-next-matches-option {
    border-color: #a8c8b7;
}

.email-next-matches-option input:disabled + span {
    opacity: 0.62;
}

.email-players-form
.email-smtp-status {
    margin-top: 10px;
    margin-bottom: 0;
}

.email-players-actions {
    align-items: center;
}

@media screen and (min-width: 901px) {
    .email-players-form {
        align-self: start;
    }

    .email-subs-option {
        margin-top: 6px;
        margin-bottom: 6px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .email-subs-option small {
        margin-top: 2px;
        line-height: 1.3;
    }

    .email-debug-delivery {
        margin-top: 6px;
        margin-bottom: 6px;
    }

    .email-players-actions {
        margin-top: 8px;
    }

    .email-players-form
    .email-smtp-status {
        margin-top: 8px;
    }
}
