@media print {
    .sidebar,
    .top-row,
    .navbar,
    .nav-scrollable,
    .page > .sidebar {
        display: none !important;
    }

    .page {
        display: block !important;
    }

    main,
    article,
    .content,
    .px-4 {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }

    .no-print,
    h1 {
        display: none !important;
    }

    .tournament-report {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    table {
        break-inside: auto;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    tr,
    .standings-section,
    .team-detail-block,
    .cart-sign,
    .printed-scorecard {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    html,
    body {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .table-responsive {
        overflow: visible !important;
    }

    a[href]::after {
        content: none !important;
    }
}





.report-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}


html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.slot-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    width: 180px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

    .slot-card.empty {
        border-left: 4px solid #0d6efd;
    }

    .slot-card.filled {
        border-left: 4px solid #198754;
    }

.slot-header {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.slot-name {
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.slot-card:hover {
    transform: translateY(-1px);
    transition: 0.1s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 14px;
}

.group-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

    .group-status.open {
        background: #e7f1ff;
        color: #0d6efd;
    }

    .group-status.full {
        background: #f8d7da;
        color: #dc3545;
    }

.slot-card.mine {
    border: 2px solid #0d6efd;
    background: #f0f6ff;
    box-shadow: 0 0 0 2px rgba(13,110,253,0.15);
}

.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day {
    border: 1px solid #ddd;
    min-height: 90px;
    padding: 6px;
    border-radius: 6px;
    background: white;
    font-size: 12px;
}

    .calendar-day.other-month {
        background: #f8f9fa;
        color: #aaa;
    }
        .calendar-day.other-month .day-number {
            color: #6d756f;
            font-weight: 600;
        }

.day-number {
    font-weight: bold;
    margin-bottom: 4px;
}

.tournament-pill {
    display: block;
    background: #0d6efd;
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    margin-bottom: 3px;
    text-decoration: none;
}


.calendar-day {
    border: 1px solid #e0e0e0;
    min-height: 120px;
    padding: 6px;
    border-radius: 8px;
    background: white;
}

    .calendar-day.other-month {
        background: #e2e6ea;
        color: #6c757d;
        opacity: 0.6;
        border-color: #d0d4d9;
    }

.day-number {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 6px;
}

.tournament-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 6px;
    font-size: 12px;
}

.tournament-title {
    font-size: .90rem;
    font-weight: 700;
    color: var(--club-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

.tournament-actions {
    margin-top: 4px;
    display: flex;
    gap: 4px;
}

.no-event {
    font-size: 11px;
    color: #999;
}

.calendar-day.today {
    border: 2px solid #0d6efd;
    background: #f0f7ff;
}

    .calendar-day.today .day-number {
        display: inline-block;
        background: #0d6efd;
        color: white;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        font-weight: bold;
    }

.item {
    margin-bottom: 12px;
}

.grid-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
}

.admin-grid {
    width: 100%;
    border-collapse: collapse;
}

    .admin-grid thead th {
        position: sticky;
        top: 0;
        background: white;
        cursor: pointer;
        padding: 10px;
        border-bottom: 2px solid #ccc;
        z-index: 2;
    }

    .admin-grid td {
        padding: 8px;
        border-bottom: 1px solid #eee;
    }

.grid-toolbar {
    margin-bottom: 10px;
}

.grid-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.calendar-page {
    --club-primary: #1f3d2b;
    --club-accent: #c9a24a;
    --calendar-border: #d8d8d8;
    --calendar-muted-bg: #f6f7f5;
    border: 1px solid var(--calendar-border);
    border-radius: 14px;
    overflow: hidden;
    background: white;
}

.calendar-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: var(--club-primary);
    color: white;
}

.calendar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.calendar-eyebrow-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}


.club-logo-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid var(--club-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.calendar-eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #e6d6a8;
}

.calendar-title-bar h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.calendar-user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-text {
    font-size: 0.95rem;
}

.calendar-month-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px 20px;
    background: var(--calendar-muted-bg);
    border-bottom: 1px solid var(--calendar-border);
}

.calendar-month-title {
    min-width: 260px;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--club-primary);
}

.calendar-admin-row {
    padding: 10px 20px;
    border-bottom: 1px solid var(--calendar-border);
    background: #fbfbfa;
}

.calendar-weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #eceee9;
    border-bottom: 1px solid var(--calendar-border);
}

    .calendar-weekday-row div {
        padding: 10px 8px;
        text-align: center;
        font-size: 0.82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #39443c;
        border-right: 1px solid var(--calendar-border);
    }

        .calendar-weekday-row div:last-child {
            border-right: none;
        }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day.other-month {
    min-height: 120px;
    background: #f3f3f1;
    color: #aaa;
    border-right: 1px solid var(--calendar-border);
    border-bottom: 1px solid var(--calendar-border);
    padding: 8px;
}

.day-number {
    font-size: 0.85rem;
    font-weight: 600;
}

.club-logo-wrap {
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.calendar-user-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-switch {
    margin-right: 12px;
    padding-right: 18px;
    border-right: 1px solid rgba(255,255,255,.25);
}

    .admin-switch label {
        color: white;
        font-weight: 500;
        cursor: pointer;
        user-select: none;
    }

.admin-pill-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 18px;
    margin-right: 6px;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    user-select: none;
}

    .admin-pill-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.admin-pill-track {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    position: relative;
    transition: background 160ms ease;
}

.admin-pill-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform 160ms ease;
}

.admin-pill-toggle input:checked + .admin-pill-track {
    background: var(--club-accent);
}

    .admin-pill-toggle input:checked + .admin-pill-track .admin-pill-thumb {
        transform: translateX(22px);
    }

.admin-pill-label {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.calendar-day {
    position: relative;
    min-height: 130px;
    padding: 8px;
    border-right: 1px solid var(--calendar-border);
    border-bottom: 1px solid var(--calendar-border);
    background: white;
}

.day-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.day-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #59635c;
}

.calendar-day.today .day-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--club-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tournament-card {
    border-left: 4px solid var(--club-primary);
    background: #f8faf7;
    border-radius: 8px;
    padding: 8px 9px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

    .tournament-card.cancelled {
        opacity: 0.65;
        border-left-color: #999;
    }

.tournament-card-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
}

.tournament-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--club-primary);
    line-height: 1.2;
}



.status-open {
    background: #d9f5d8;
    color: #216b2b;
}

.status-upcoming {
    background: #dceeff;
    color: #0d4b87;
}

.status-in-progress {
    background: #d9ecff;
    color: #084f8f;
}

.status-results-pending {
    background: #fff0c7;
    color: #7a5200;
}

.status-completed {
    background: #ececec;
    color: #555;
}

.status-cancelled {
    background: #ffd9d9;
    color: #8b2020;
}

.status-archived {
    background: #e5e2d8;
    color: #6d6143;
}


.tournament-meta i,
.status-badge i {
    margin-right: 5px;
}

.status-badge i {
    font-size: .75rem;
}

.tournament-meta i {
    color: var(--club-primary);
    width: 14px;
}

.tournament-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.calendar-action {
    border: none;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

    .calendar-action.primary {
        background: var(--club-primary);
        color: white;
    }

    .calendar-action.secondary {
        background: white;
        color: var(--club-primary);
        border: 1px solid var(--club-primary);
    }

.create-tournament-button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--club-accent);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.85;
}

    .create-tournament-button:hover {
        opacity: 1;
    }

.calendar-day.other-month {
    background: #eceee9;
    color: #7f7f7f;
}

.admin-page {
    background: white;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px 22px;
    border: 1px solid var(--calendar-border);
    border-radius: 14px;
    background: #f6f7f5;
}

.admin-eyebrow {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
    color: var(--club-primary);
    margin-bottom: 2px;
}

.admin-page-header h1 {
    margin: 0;
    color: var(--club-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.admin-grid-shell {
    border: 1px solid var(--calendar-border);
    border-radius: 14px;
    overflow: hidden;
    background: white;
}

.archive-pill-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

    .archive-pill-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.archive-pill-track {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #cfd4cf;
    position: relative;
    transition: background 160ms ease;
}

.archive-pill-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform 160ms ease;
}

.archive-pill-toggle input:checked + .archive-pill-track {
    background: var(--club-accent);
}

    .archive-pill-toggle input:checked + .archive-pill-track .archive-pill-thumb {
        transform: translateX(22px);
    }

.archive-pill-label {
    font-size: .9rem;
    font-weight: 700;
    color: var(--club-primary);
}

.tournament-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-open {
    background: #d9f5d8;
    color: #216b2b;
}

.status-upcoming {
    background: #dceeff;
    color: #0d4b87;
}

.status-completed {
    background: #ececec;
    color: #555;
}

.status-cancelled {
    background: #ffd9d9;
    color: #8b2020;
}

.status-archived {
    background: #e5e2d8;
    color: #6d6143;
}

.archive-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.archive-pill-track {
    background: #d3d3d3;
    border: 1px solid #b7b7b7;
}

.archive-pill-toggle input:checked + .archive-pill-track {
    background: var(--club-primary);
    border-color: var(--club-primary);
}

.archive-pill-thumb {
    transition: transform .18s ease, box-shadow .18s ease;
}

.archive-pill-toggle:hover .archive-pill-thumb {
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.calendar-user-area .toggle-switch-label {
    color: white;
}

/* ClubForge Responsive Calendar V10: mobile space optimization */
/* Tournament Calendar Responsive V8: mobile fill + state indicators */
/* ========================================================================== */
/* Tournament Calendar: responsive member experience                          */
/* ========================================================================== */

.admin-tools-toggle-container {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 12px 16px;
    background: var(--calendar-muted-bg);
    border-bottom: 1px solid var(--calendar-border);
}

.calendar-month-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.calendar-month-title {
    min-width: 178px;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--club-primary);
}

.calendar-month-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.1rem;
}


.calendar-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-create-tournament-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--club-accent);
    color: white;
    font-size: 1.15rem;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.list-create-tournament-button:hover,
.list-create-tournament-button:focus-visible {
    filter: brightness(1.05);
    color: white;
}

.calendar-view-selector {
    display: inline-flex;
    flex-shrink: 0;
    padding: 3px;
    border: 1px solid #bfc6bf;
    border-radius: 999px;
    background: white;
}

.calendar-view-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 5px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--club-primary);
    font-size: .82rem;
    font-weight: 700;
}

.calendar-view-option.active {
    background: var(--club-primary);
    color: white;
}

.weekday-short {
    display: none;
}

.calendar-grid-scroll,
.calendar-grid-shell {
    width: 100%;
}

.calendar-grid-scroll {
    overflow-x: visible;
}

.calendar-weekday-row,
.calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-grid {
    align-items: stretch;
    grid-auto-rows: minmax(130px, auto);
}

.calendar-day,
.calendar-day.other-month {
    min-width: 0;
    min-height: 130px;
    height: 100%;
    border-radius: 0;
}

.tournament-card.grid-card {
    --appointment-accent: #7b857d;
    --appointment-background: #f1f3f0;
    --appointment-outline: #c7ccc8;
    min-width: 0;
    overflow: hidden;
}

.tournament-card.grid-card.state-open {
    --appointment-accent: #2f7d3b;
    --appointment-background: #dff1e2;
    --appointment-outline: #91bd99;
}

.tournament-card.grid-card.state-closed {
    --appointment-accent: #a66a16;
    --appointment-background: #fff0d8;
    --appointment-outline: #dfbd86;
}

.tournament-card.grid-card.state-in-progress {
    --appointment-accent: #1f6fa8;
    --appointment-background: #e1f0fb;
    --appointment-outline: #98bed8;
}

.tournament-card.grid-card.state-results-pending {
    --appointment-accent: #a66a16;
    --appointment-background: #fff4cf;
    --appointment-outline: #d8b765;
}

.tournament-card.grid-card.state-upcoming {
    --appointment-accent: #2f6795;
    --appointment-background: #e3f0fa;
    --appointment-outline: #9fc0dc;
}

.tournament-card.grid-card.state-completed {
    --appointment-accent: #687169;
    --appointment-background: #ecefed;
    --appointment-outline: #bdc4bf;
}

.tournament-card.grid-card.state-cancelled {
    --appointment-accent: #9a3d3d;
    --appointment-background: #f7e2e2;
    --appointment-outline: #d7a2a2;
}

.tournament-card.grid-card.state-archived {
    --appointment-accent: #7a6b48;
    --appointment-background: #eee9dc;
    --appointment-outline: #c9bea1;
}

.tournament-card.grid-card.registration-open {
    background: #e2f3e5;
    border-left-color: #2f7d3b;
    box-shadow:
        inset 0 0 0 1px #9fc8a6,
        0 1px 2px rgba(47, 125, 59, 0.12);
}

.tournament-card.grid-card.clickable {
    cursor: pointer;
    transition:
        background-color 120ms ease,
        box-shadow 120ms ease,
        transform 80ms ease;
}

.tournament-card.grid-card.registration-open.clickable:hover {
    background: #d7ecd9;
    box-shadow:
        inset 0 0 0 1px #79ae82,
        0 2px 5px rgba(47, 125, 59, 0.18);
}

.tournament-card.grid-card.clickable:focus-visible {
    outline: 2px solid #2f7d3b;
    outline-offset: 2px;
}

.tournament-card.grid-card .tournament-title {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

.calendar-grid-shell,
.calendar-event-list {
    animation: calendar-view-enter 150ms ease-out;
}

@keyframes calendar-view-enter {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.15;
}

.tournament-meta {
    margin-top: 6px;
    color: #505a53;
    font-size: .74rem;
    line-height: 1.35;
}

.tournament-meta > div {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.tournament-course-tee {
    padding-left: 18px;
}

.calendar-event-list {
    padding: 18px;
    background: #f5f6f3;
}

.calendar-list-day {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--calendar-border);
}

.calendar-list-day:first-child { padding-top: 0; }
.calendar-list-day:last-child { padding-bottom: 0; border-bottom: 0; }

.calendar-list-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
}

.calendar-list-weekday {
    color: var(--club-primary);
    font-size: 1rem;
    font-weight: 800;
}

.calendar-list-date-value {
    color: #687169;
    font-size: .9rem;
}

.calendar-list-events {
    display: grid;
    gap: 12px;
}

.tournament-card.list-card {
    margin: 0;
    padding: 14px 16px;
}

.tournament-card.list-card .tournament-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tournament-card.list-card .tournament-title {
    font-size: 1.05rem;
}

.tournament-card.list-card .tournament-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 18px;
    margin-top: 10px;
    font-size: .86rem;
}

.calendar-empty-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 240px;
    color: #687169;
    text-align: center;
}

.calendar-empty-month i {
    font-size: 2.25rem;
    color: var(--club-primary);
}

@media (min-width: 768px) {
    .calendar-page {
        border-radius: 14px;
    }

    .calendar-title-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 22px;
    }

    .calendar-brand {
        gap: 14px;
    }

    .club-logo-wrap {
        width: 82px;
        height: 82px;
    }

    .calendar-title-bar h2 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .calendar-eyebrow {
        margin-top: 0;
        font-size: .8rem;
        letter-spacing: .12em;
    }

    .calendar-user-area {
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }

    .welcome-text {
        max-width: none;
        overflow: visible;
        white-space: normal;
        font-size: .95rem;
    }

    .calendar-toolbar {
        flex-wrap: nowrap;
        gap: 28px;
        padding: 14px 18px;
    }

    .calendar-month-header {
        gap: 4px;
    }

    .calendar-month-title {
        min-width: 176px;
        font-size: 1.65rem;
    }

    .calendar-month-button {
        width: 36px;
        height: 36px;
    }

    .calendar-view-option {
        min-height: 34px;
        padding: 5px 12px;
        font-size: .82rem;
    }

    .weekday-long {
        display: inline;
    }

    .weekday-short {
        display: none;
    }

    .calendar-weekday-row div {
        padding: 10px 8px;
        font-size: .82rem;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    /* Fixed desktop week rows keep every calendar day visually consistent. */
    .calendar-grid {
        grid-auto-rows: 190px;
    }

    .calendar-day,
    .calendar-day.other-month {
        min-height: 0;
        height: 100%;
        padding: 8px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #b8beb9 transparent;
    }

    .calendar-day::-webkit-scrollbar {
        width: 6px;
    }

    .calendar-day::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: #b8beb9;
    }

    /*
       Desktop grid entries use a compact calendar-appointment treatment.
       List view retains the larger detailed card layout.
    */
    .tournament-card.grid-card {
        overflow: hidden;
        padding: 7px 8px 7px 9px;
        margin: 2px 0 7px;
        border: 0;
        border-left: 4px solid var(--club-primary);
        border-radius: 5px;
        background: #f3f6f2;
        box-shadow: inset 0 0 0 1px rgba(31, 61, 43, .08);
    }

    .tournament-card.grid-card.registration-open {
        border-left-color: #2f7d3b;
        background: #e2f3e5;
        box-shadow:
            inset 0 0 0 1px #9fc8a6,
            0 1px 2px rgba(47, 125, 59, .10);
    }

    .tournament-card.grid-card .tournament-card-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 7px;
    }

    .tournament-card.grid-card .tournament-title {
        display: -webkit-box;
        min-width: 0;
        overflow: hidden;
        margin: 0;
        color: var(--club-primary);
        font-size: .86rem;
        font-weight: 750;
        line-height: 1.12;
        letter-spacing: -.005em;
        overflow-wrap: break-word;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .tournament-card.grid-card .status-badge {
        display: inline-flex;
        flex-shrink: 0;
        padding: 2px 6px;
        font-size: .63rem;
        line-height: 1.1;
    }

    .tournament-card.grid-card .status-badge i {
        margin-right: 2px;
        font-size: .66rem;
    }

    .tournament-card.grid-card .tournament-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 2px 8px;
        margin-top: 5px;
        font-size: .69rem;
        line-height: 1.2;
    }

    .tournament-card.grid-card .tournament-meta > div {
        min-width: 0;
    }

    .tournament-card.grid-card .tournament-meta span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tournament-card.grid-card .tournament-course-tee {
        padding-left: 16px;
    }

    .tournament-card.grid-card .tournament-actions {
        display: flex;
        gap: 5px;
        margin-top: 6px;
    }

    .tournament-card.grid-card .calendar-action {
        padding: 2px 9px;
        font-size: .66rem;
        line-height: 1.25;
    }

    .tournament-card.grid-card.registration-open.clickable::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .calendar-page {
        border-radius: 10px;
    }

    .calendar-title-bar {
        align-items: center;
        gap: 10px;
        padding: 11px 12px;
    }

    .calendar-brand {
        align-items: center;
        gap: 9px;
        min-width: 0;
    }

    .club-logo-wrap {
        width: 48px;
        height: 48px;
    }

    .calendar-brand-text {
        min-width: 0;
    }

    .calendar-title-bar h2 {
        font-size: 1rem;
        line-height: 1.12;
    }

    .calendar-eyebrow-row {
        gap: 6px;
        margin-top: 3px;
    }

    .calendar-eyebrow {
        margin-top: 0;
        font-size: .64rem;
        letter-spacing: .08em;
    }

    .calendar-user-area {
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
        flex-shrink: 0;
    }

    /* CSS backup: Admin Tools can never appear at mobile widths. */
    .admin-tools-toggle-container {
        display: none !important;
    }

    .welcome-text {
        max-width: 125px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .72rem;
    }

    .calendar-auth-button {
        padding: 0;
        color: white;
        font-size: .72rem;
    }

    .calendar-toolbar {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding: 9px 7px;
    }

    .calendar-month-header {
        gap: 5px;
    }

    .calendar-month-title {
        min-width: 145px;
        font-size: 1.22rem;
    }

    .calendar-month-button {
        width: 31px;
        height: 31px;
    }

    .calendar-view-option {
        min-height: 30px;
        padding: 4px 9px;
        font-size: .74rem;
    }

    .weekday-long {
        display: none;
    }

    .weekday-short {
        display: inline;
    }

    .calendar-weekday-row div {
        padding: 7px 1px;
        font-size: .65rem;
        letter-spacing: 0;
        text-transform: none;
    }

    
    .calendar-grid {
        grid-auto-rows: minmax(104px, auto);
    }

    .calendar-day,
    .calendar-day.other-month {
        position: relative;
        min-height: 104px;
        padding: 3px;
    }

    /*
       The date floats above the cell content so it no longer consumes
       a separate line of vertical space.
    */
    .day-header {
        position: absolute;
        top: 3px;
        right: 4px;
        z-index: 2;
        margin: 0;
        pointer-events: none;
    }

    .day-number {
        font-size: .79rem;
        font-weight: 800;
        line-height: 1;
    }

    .calendar-day-events {
        min-width: 0;
        height: 100%;
        padding-top: 15px;
    }

    .calendar-day.single-tournament {
        display: flex;
        flex-direction: column;
    }

    .calendar-day.single-tournament .calendar-day-events {
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
    }

    .calendar-day.single-tournament .tournament-card.grid-card {
        display: flex;
        flex: 1 1 auto;
        align-items: stretch;
        min-height: 0;
        margin: 0;
    }

    .calendar-day.single-tournament .tournament-card.grid-card .tournament-card-header {
        display: flex;
        width: 100%;
        align-items: flex-start;
    }

    .calendar-day.single-tournament .tournament-card.grid-card .tournament-title {
        width: 100%;
        -webkit-line-clamp: 8;
    }

    .calendar-day.today .day-number {
        width: 22px;
        height: 22px;
    }

    /* Phone grid entries behave like compact, state-coded appointments. */
    .tournament-card.grid-card {
        position: relative;
        padding: 6px 6px 6px 7px;
        margin: 2px 0 4px;
        border: 0;
        border-left: 3px solid var(--appointment-accent);
        border-radius: 4px;
        background: var(--appointment-background);
        box-shadow: inset 0 0 0 1px var(--appointment-outline);
    }

    .tournament-card.grid-card::after {
        display: none;
    }

    .tournament-card.grid-card.state-open.registration-open.clickable::after {
        content: "";
        display: block;
        position: absolute;
        top: 5px;
        right: 5px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #2f7d3b;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, .78);
    }

    .tournament-card.grid-card .tournament-card-header {
        display: block;
    }

    .tournament-card.grid-card .tournament-title {
        display: -webkit-box;
        overflow: hidden;
        margin: 0;
        font-size: clamp(.69rem, 2.45vw, .78rem);
        font-weight: 750;
        line-height: 1.08;
        letter-spacing: -.012em;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: auto;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 5;
    }

    .tournament-card.grid-card .status-badge,
    .tournament-card.grid-card .tournament-meta,
    .tournament-card.grid-card .tournament-actions {
        display: none !important;
    }

    .tournament-card.grid-card.registration-open.clickable {
        padding-right: 14px;
    }

    .tournament-card.grid-card.registration-open.clickable:active {
        background: #cfe7d2;
        box-shadow:
            inset 0 0 0 1px #6fa679,
            0 1px 2px rgba(47, 125, 59, 0.16);
        transform: scale(.98);
    }

    .calendar-event-list {
        padding: 12px;
    }

    .calendar-list-day {
        display: block;
        padding: 14px 0;
    }

    .calendar-list-date {
        display: block;
        padding: 0 0 7px;
    }

    .calendar-list-weekday::after {
        content: ", ";
    }

    .tournament-card.list-card {
        padding: 12px;
    }

    .tournament-card.list-card .tournament-card-header {
        display: block;
    }

    .tournament-card.list-card .status-badge {
        margin-top: 7px;
    }

    .tournament-card.list-card .tournament-meta {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .tournament-card.list-card .calendar-action {
        min-height: 36px;
        padding: 7px 14px;
    }
}

@media (max-width: 430px) {
    .calendar-grid-scroll {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-grid-shell {
        min-width: 455px;
    }
}

@media (max-width: 380px) {
    .calendar-title-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        padding: 10px 11px;
    }

    .calendar-brand {
        gap: 8px;
    }

    .club-logo-wrap {
        width: 44px;
        height: 44px;
    }

    .calendar-title-bar h2 {
        font-size: .94rem;
        line-height: 1.08;
    }

    .calendar-eyebrow-row {
        gap: 5px;
    }

    .calendar-eyebrow {
        font-size: .6rem;
    }

    .calendar-user-area {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .welcome-text {
        max-width: 190px;
    }

    .calendar-toolbar {
        display: grid;
        justify-items: center;
        gap: 7px;
        padding: 8px 6px 9px;
    }

    .calendar-month-title {
        min-width: 140px;
    }

    .calendar-grid {
        grid-auto-rows: minmax(108px, auto);
    }

    .calendar-day,
    .calendar-day.other-month {
        min-height: 108px;
        padding: 3px;
    }

    .calendar-day.single-tournament .tournament-card.grid-card .tournament-title {
        font-size: .7rem;
        -webkit-line-clamp: 8;
    }

    .calendar-day:not(.single-tournament) .tournament-card.grid-card .tournament-title {
        font-size: .7rem;
        -webkit-line-clamp: 5;
    }
}


/* Primary compact calendar layout threshold. Narrower 767/430/360 rules remain refinements. */
@media (max-width: 1024px) {
    .admin-tools-toggle-container {
        display: none !important;
    }
}

/* ========================================================================== */
/* Calendar presentation separation                                           */
/*                                                                            */
/* The phone calendar is frozen. Desktop changes belong only in the           */
/* .desktop-calendar-presentation section below.                              */
/* ========================================================================== */

.desktop-calendar-presentation {
    display: block;
}

.mobile-calendar-presentation {
    display: none;
}

.desktop-calendar-weekday-row,
.desktop-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.desktop-calendar-weekday-row {
    background: #eceee9;
    border-bottom: 1px solid var(--calendar-border);
}

.desktop-calendar-weekday-row > div {
    padding: 10px 8px;
    border-right: 1px solid var(--calendar-border);
    color: #39443c;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
    text-transform: uppercase;
}

.desktop-calendar-weekday-row > div:last-child {
    border-right: 0;
}

.desktop-calendar-grid {
    grid-auto-rows: auto;
    align-items: stretch;
}

.desktop-calendar-day {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 72px;
    height: auto;
    padding: 8px;
    overflow: hidden;
    border-right: 1px solid var(--calendar-border);
    border-bottom: 1px solid var(--calendar-border);
    background: white;
    scrollbar-color: #b8beb9 transparent;
    scrollbar-width: thin;
}

.desktop-calendar-day:nth-child(7n) {
    border-right: 0;
}

.desktop-calendar-day::-webkit-scrollbar {
    width: 6px;
}

.desktop-calendar-day::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #b8beb9;
}

.desktop-calendar-day.desktop-other-month {
    background: #f3f3f1;
    color: #9a9f9b;
}

.desktop-day-header {
    display: flex;
    justify-content: flex-end;
    min-height: 22px;
    margin-bottom: 5px;
}

.desktop-day-number {
    color: #59635c;
    font-size: .85rem;
    font-weight: 700;
}

.desktop-other-month .desktop-day-number {
    color: #9a9f9b;
}

.desktop-calendar-day-content {
    display: grid;
    gap: 7px;
    min-height: 0;
    max-height: 245px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-color: #b8beb9 transparent;
    scrollbar-width: thin;
}

.desktop-calendar-day-content::-webkit-scrollbar {
    width: 6px;
}

.desktop-calendar-day-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #b8beb9;
}

.desktop-calendar-day-events {
    display: grid;
    gap: 7px;
}

.desktop-tournament-card {
    --desktop-card-accent: #1f3d2b;
    min-width: 0;
    padding: 8px 9px 8px 10px;
    border: 0;
    border-left: 4px solid var(--desktop-card-accent);
    border-radius: 6px;
    background: #f4f6f3;
    box-shadow: inset 0 0 0 1px rgba(31, 61, 43, .11);
}

.desktop-tournament-card.desktop-state-open {
    --desktop-card-accent: #2f7d3b;
    background: #e2f3e5;
    box-shadow: inset 0 0 0 1px #9fc8a6;
}

.desktop-tournament-card.desktop-state-closed {
    --desktop-card-accent: #a66a16;
    background: #fff0d8;
    box-shadow: inset 0 0 0 1px #dfbd86;
}

.desktop-tournament-card.desktop-state-in-progress {
    --desktop-card-accent: #1f6fa8;
    background: #e1f0fb;
    box-shadow: inset 0 0 0 1px #98bed8;
}

.desktop-tournament-card.desktop-state-results-pending {
    --desktop-card-accent: #a66a16;
    background: #fff4cf;
    box-shadow: inset 0 0 0 1px #d8b765;
}

.desktop-tournament-card.desktop-state-upcoming {
    --desktop-card-accent: #2f6795;
    background: #e8f2fa;
    box-shadow: inset 0 0 0 1px #abc7dd;
}

.desktop-tournament-card.desktop-state-completed {
    --desktop-card-accent: #687169;
    background: #ecefed;
    box-shadow: inset 0 0 0 1px #bdc4bf;
}

.desktop-tournament-card.desktop-state-cancelled {
    --desktop-card-accent: #9a3d3d;
    background: #f7e2e2;
    box-shadow: inset 0 0 0 1px #d7a2a2;
}

.desktop-tournament-card.desktop-state-archived {
    --desktop-card-accent: #7a6b48;
    background: #eee9dc;
    box-shadow: inset 0 0 0 1px #c9bea1;
}

.desktop-tournament-card.desktop-clickable {
    cursor: pointer;
    transition: background-color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

.desktop-tournament-card.desktop-clickable:hover {
    box-shadow: inset 0 0 0 1px rgba(31, 61, 43, .25), 0 2px 5px rgba(31, 61, 43, .14);
    transform: translateY(-1px);
}

.desktop-tournament-card.desktop-clickable:focus-visible {
    outline: 2px solid var(--desktop-card-accent);
    outline-offset: 2px;
}

.desktop-tournament-card-header {
    display: block;
}

.desktop-tournament-title {
    margin: 0 0 6px;
    color: var(--club-primary);
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.desktop-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: normal;
}

.desktop-status-badge i {
    flex-shrink: 0;
    font-size: .68rem;
}

.desktop-status-open {
    background: #cceacc;
    color: #216b2b;
}

.desktop-status-upcoming {
    background: #d7eaff;
    color: #0d4b87;
}

.desktop-status-in-progress {
    background: #d9ecff;
    color: #084f8f;
}

.desktop-status-results-pending {
    background: #fff0c7;
    color: #7a5200;
}

.desktop-status-completed {
    background: #dedfdf;
    color: #555;
}

.desktop-status-cancelled {
    background: #ffd1d1;
    color: #8b2020;
}

.desktop-status-archived {
    background: #e5e2d8;
    color: #6d6143;
}

.desktop-tournament-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    margin-top: 7px;
    color: #505a53;
    font-size: .71rem;
    line-height: 1.25;
}

.desktop-meta-item {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    gap: 4px;
}

.desktop-meta-item i {
    flex: 0 0 13px;
    width: 13px;
    color: var(--club-primary);
}

.desktop-meta-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-meta-time {
    justify-self: end;
    white-space: nowrap;
}

.desktop-meta-course,
.desktop-meta-tee,
.desktop-meta-format {
    grid-column: 1 / -1;
}

.desktop-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
}

.desktop-card-time {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 4px;
    color: #505a53;
    font-size: .71rem;
    white-space: nowrap;
}

.desktop-card-time i {
    flex-shrink: 0;
    color: var(--club-primary);
}

.desktop-card-footer .desktop-tournament-actions {
    flex-shrink: 0;
    justify-content: flex-end;
    margin-top: 0;
    margin-left: auto;
}

.desktop-tournament-actions {
    display: flex;
    gap: 5px;
    margin-top: 7px;
}

.desktop-calendar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.desktop-primary-action {
    border: 1px solid var(--club-primary);
    background: var(--club-primary);
    color: white;
}

.desktop-secondary-action {
    border: 1px solid var(--club-primary);
    background: white;
    color: var(--club-primary);
}

.desktop-icon-action {
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: .78rem;
}

.desktop-results-indicator {
    cursor: default;
}

.desktop-create-tournament-button {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: var(--club-accent);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 1024px) {
    .desktop-calendar-presentation {
        display: none !important;
    }

    .mobile-calendar-presentation {
        display: block;
    }
}

@media print {
    .tournament-report::after {
        content: "clubforgegolf.com";
        display: block;
        margin-top: 0.18in;
        padding-top: 0.06in;
        border-top: 0.5pt solid #777;
        text-align: center;
        font-size: 8pt;
        color: #333 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}


/* Compact member-facing format label in the mobile calendar card. */
.calendar-format-line {
    min-width: 0;
}

.calendar-format-line span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ========================================================================== */
/* Two-month tournament calendar                                               */
/* ========================================================================== */

.calendar-month-section + .calendar-month-section {
    margin-top: 2.25rem;
    padding-top: 0;
}

.calendar-section-month-title,
.calendar-list-month-title {
    margin: 0;
    color: var(--club-primary);
    font-weight: 750;
    text-align: center;
}

/*
    Full-width month band used by both displayed months.  The stronger tint,
    club-color top rule, and extra breathing room make the transition between
    months unmistakable without adding a large blank gap.
*/
.calendar-section-month-title {
    padding: 1rem 1.25rem 0.9rem;
    background: #e4eadf;
    border-top: 4px solid var(--club-primary);
    border-bottom: 2px solid #bcc9b8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: 0.015em;
}

.calendar-list-month-title {
    margin-top: 1.25rem;
    padding: 0.7rem 0;
    border-bottom: 2px solid var(--club-primary);
    font-size: 1.25rem;
}

.calendar-list-month-title:first-child {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .calendar-month-section + .calendar-month-section {
        margin-top: 1.6rem;
        padding-top: 0;
    }

    .calendar-section-month-title {
        position: relative;
        z-index: 1;
        padding: 0.85rem 0.9rem 0.8rem;
        font-size: 1.3rem;
    }

    .mobile-calendar-month-section .calendar-grid-scroll {
        scroll-behavior: auto;
    }
}


/* ========================================================================== */
/* Mobile calendar sticky controls                                             */
/* ========================================================================== */

.desktop-calendar-toolbar {
    display: flex;
}

.mobile-calendar-toolbar {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-calendar-toolbar {
        display: none !important;
    }

    .mobile-calendar-toolbar {
        position: sticky;
        z-index: 100;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.65rem;
        padding: 0.45rem 0.5rem;
        border-bottom: 1px solid var(--calendar-border);
        background: rgba(247, 248, 245, 0.97);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .mobile-calendar-navigation {
        display: inline-flex;
        align-items: center;
        overflow: hidden;
        border: 1px solid #bfc6bf;
        border-radius: 999px;
        background: white;
    }

    .mobile-calendar-nav-button,
    .mobile-calendar-today-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        border: 0;
        background: transparent;
        color: var(--club-primary);
        font-weight: 700;
    }

    .mobile-calendar-nav-button {
        width: 34px;
        padding: 0;
        font-size: 0.92rem;
    }

    .mobile-calendar-today-button {
        min-width: 58px;
        padding: 0.25rem 0.55rem;
        border-right: 1px solid #d5d9d4;
        border-left: 1px solid #d5d9d4;
        font-size: 0.78rem;
    }

    .mobile-calendar-nav-button:hover,
    .mobile-calendar-nav-button:focus-visible,
    .mobile-calendar-today-button:hover,
    .mobile-calendar-today-button:focus-visible {
        background: #eef1ec;
        outline: none;
    }

    .mobile-calendar-toolbar .calendar-view-selector {
        flex-shrink: 0;
    }

    .mobile-calendar-toolbar .calendar-view-option {
        min-height: 30px;
        padding: 4px 8px;
        font-size: 0.72rem;
    }
}

@media (max-width: 390px) {
    .mobile-calendar-toolbar {
        gap: 0.4rem;
        padding-right: 0.35rem;
        padding-left: 0.35rem;
    }

    .mobile-calendar-nav-button {
        width: 31px;
    }

    .mobile-calendar-today-button {
        min-width: 52px;
        padding-right: 0.4rem;
        padding-left: 0.4rem;
    }

    .mobile-calendar-toolbar .calendar-view-option {
        gap: 3px;
        padding-right: 6px;
        padding-left: 6px;
        font-size: 0.69rem;
    }
}


/* ========================================================================== */
/* Calendar sticky page header and unified navigation                          */
/* ========================================================================== */

/*
   The original calendar shell used overflow:hidden, which creates a clipping
   ancestor that prevents descendants from sticking to the viewport. Keep
   horizontal scrolling on the individual month grids instead.
*/
.calendar-page {
    overflow: visible;
}

.calendar-sticky-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    background: white;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.12);
}

.calendar-sticky-header .calendar-title-bar {
    border-radius: 13px 13px 0 0;
}

.calendar-sticky-header .desktop-calendar-toolbar,
.calendar-sticky-header .mobile-calendar-toolbar {
    position: static;
    top: auto;
    z-index: auto;
    box-shadow: none;
}

.calendar-desktop-today-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 36px;
    padding: 0.35rem 1rem;
    border: 1px solid #bfc6bf;
    border-radius: 999px;
    background: white;
    color: var(--club-primary);
    font-size: 0.9rem;
    font-weight: 750;
}

.calendar-desktop-today-button:hover,
.calendar-desktop-today-button:focus-visible {
    background: #eef1ec;
    outline: none;
}

@media (max-width: 1024px) {
    .calendar-sticky-header {
        /*
           The entire member-facing page header and compact controls stay
           together. Month headings continue to scroll normally below it.
        */
        top: 0;
    }

    .calendar-sticky-header .calendar-title-bar {
        border-radius: 13px 13px 0 0;
    }

    .calendar-sticky-header .mobile-calendar-toolbar {
        position: static;
        border-radius: 0;
    }
}

/* Mobile Calendar View Optimization: view selector and week presentation */
.calendar-week-view {
    margin: 1rem 0 2rem;
    border: 1px solid var(--calendar-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.calendar-week-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--calendar-border);
    background: #f5f7f3;
}

.calendar-week-heading h3 {
    margin: 0;
    color: var(--club-primary);
    font-size: 1.2rem;
}

.calendar-week-eyebrow {
    margin-bottom: .15rem;
    color: #687069;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}


.calendar-week-desk-duty {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--calendar-border);
    background: #fbfcfa;
}

.calendar-week-desk-duty .desk-duty-calendar-marker {
    margin: 0;
}

.calendar-week-day {
    display: grid;
    grid-template-columns: minmax(145px, 190px) minmax(0, 1fr);
    border-bottom: 1px solid var(--calendar-border);
}

.calendar-week-day:last-child {
    border-bottom: 0;
}

.calendar-week-day.today {
    box-shadow: inset 4px 0 0 var(--club-accent);
    background: #fffdf5;
}

.calendar-week-date {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    padding: 1rem;
    background: #f8f9f7;
}

.calendar-week-weekday {
    color: var(--club-primary);
    font-weight: 800;
}

.calendar-week-date-value {
    color: #5f675f;
    font-size: .9rem;
}

.calendar-week-events {
    min-width: 0;
    padding: .8rem 1rem;
}

.calendar-week-empty {
    padding: .45rem 0;
    color: #7a817b;
    font-style: italic;
}

@media (max-width: 1024px) {
    .mobile-calendar-toolbar .calendar-view-selector {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        border-radius: 12px;
    }

    .mobile-calendar-toolbar .calendar-view-option {
        min-width: 0;
        padding: 7px 5px;
        border-radius: 9px;
        font-size: .73rem;
        white-space: nowrap;
    }

    .calendar-week-view {
        margin-top: .7rem;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .calendar-week-heading {
        padding: .85rem .9rem;
    }

    .calendar-week-heading h3 {
        font-size: 1.05rem;
    }


    .calendar-week-desk-duty {
        padding: .7rem .75rem;
    }

    .calendar-week-day {
        display: block;
    }

    .calendar-week-date {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        padding: .7rem .9rem;
        border-bottom: 1px solid #e2e5e0;
    }

    .calendar-week-events {
        padding: .65rem .75rem .9rem;
    }
}


/* Mobile Calendar View Optimization: keep period navigation visible above the three-view selector. */
@media (max-width: 1024px) {
    .mobile-calendar-toolbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .mobile-calendar-navigation {
        order: 1;
        flex: 0 0 auto;
    }

    .mobile-calendar-toolbar .calendar-view-selector {
        order: 2;
        flex: 1 0 100%;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ========================================================================== */
/* Mobile month view: wider, horizontally scrollable day columns              */
/* ========================================================================== */

@media (max-width: 1024px) {
    .mobile-calendar-month-section .calendar-grid-scroll {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .mobile-calendar-month-section .calendar-grid-shell {
        width: max-content;
        min-width: 100%;
    }

    .mobile-calendar-month-section .calendar-weekday-row,
    .mobile-calendar-month-section .calendar-grid {
        width: max-content;
        min-width: 100%;
        grid-template-columns: repeat(7, minmax(170px, 170px));
    }

    .mobile-calendar-month-section .calendar-day,
    .mobile-calendar-month-section .calendar-day.other-month {
        min-width: 170px;
    }
}

/* ========================================================================== */
/* Calendar desktop-first reset — Phase 1                                     */
/*                                                                            */
/* The calendar intentionally uses one stable desktop presentation at every   */
/* viewport width. Narrow viewports scroll horizontally; they do not activate */
/* an alternate layout, card reflow, automatic scaling, or zoom controls.     */
/* ========================================================================== */

.calendar-page {
    width: clamp(1180px, 100%, 1280px) !important;
    min-width: 1180px !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* Sticky descendants cannot track the viewport through an overflow-clipping ancestor. */
    overflow: visible !important;
}

.calendar-sticky-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    min-width: 1180px !important;
    background: white !important;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.12) !important;
    isolation: isolate;
}

.calendar-title-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding: 18px 22px !important;
}

.calendar-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
}

.club-logo-wrap {
    width: 82px !important;
    height: 82px !important;
}

.calendar-brand-text {
    display: block !important;
}

.calendar-title-bar h2 {
    margin: 0 !important;
    font-size: 1.8rem !important;
    white-space: normal !important;
}

.calendar-eyebrow {
    display: block !important;
    font-size: .8rem !important;
}

.calendar-user-area {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 18px !important;
    width: auto !important;
}

.admin-tools-toggle-container {
    display: block !important;
}

.desktop-calendar-toolbar {
    display: flex !important;
    position: static !important;
}

.mobile-calendar-toolbar,
.mobile-calendar-presentation {
    display: none !important;
}

.desktop-calendar-presentation {
    display: block !important;
    min-width: 1178px !important;
}

.desktop-calendar-weekday-row,
.desktop-calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
}

.desktop-calendar-grid {
    grid-auto-rows: auto !important;
    align-items: stretch !important;
}

.desktop-calendar-day {
    min-width: 0 !important;
    min-height: 72px !important;
    height: auto !important;
    padding: 8px !important;
    overflow: hidden !important;
}

.desktop-calendar-day-content {
    max-height: 245px !important;
    overflow-y: auto !important;
}

.calendar-week-view {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 1rem auto 2rem !important;
    border: 1px solid var(--calendar-border) !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

.calendar-week-heading {
    padding: 1rem 1.1rem !important;
}

.calendar-week-heading h3 {
    font-size: 1.2rem !important;
}

.calendar-week-day {
    display: grid !important;
    grid-template-columns: minmax(145px, 190px) minmax(0, 1fr) !important;
}

.calendar-week-date {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: .12rem !important;
    padding: 1rem !important;
    border-bottom: 0 !important;
}

.calendar-week-events {
    padding: .8rem 1rem !important;
}

.calendar-event-list {
    width: 100% !important;
    max-width: 1280px !important;
    margin-inline: auto !important;
    padding: 18px !important;
    box-sizing: border-box !important;
}

.calendar-list-day {
    display: grid !important;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) !important;
    gap: 18px !important;
    padding: 18px 0 !important;
}

.calendar-list-date {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    padding-top: 8px !important;
}

.calendar-list-events {
    min-width: 0 !important;
}

/* ========================================================================== */
/* Calendar desktop-first root horizontal scrolling                           */
/*                                                                            */
/* The desktop calendar deliberately retains a minimum width on narrow        */
/* viewports. Assign horizontal overflow explicitly to the document root so   */
/* Chrome does not alternate scroll ownership between the body and an         */
/* overflowing descendant as the viewport height changes. Vertical scrolling  */
/* remains the browser's normal document scroll.                              */
/* ========================================================================== */

/* CP5: Bootstrap 5 enables smooth scroll on :root by default.
   During navigation to /start-annual or /start-trial the browser can animate
   its automatic scroll restoration, making the old page visibly move first.
   Use instant document-level scroll; intentional section animations can still
   call element.scrollIntoView({ behavior: "smooth" }) explicitly. */
html {
    scroll-behavior: auto !important;
}

html {
    overflow-x: auto;
}

body {
    min-width: 100%;
    overflow-x: visible;
}

/* ========================================================================== */
/* Calendar desktop view-specific minimum widths                              */
/*                                                                            */
/* Month retains the seven-column desktop canvas. Week and List use smaller   */
/* desktop readability floors so horizontal scrolling begins only when their  */
/* own content needs it. These are view constraints, not responsive-mode      */
/* breakpoints, and can be revised independently when compact/mobile modes are */
/* deliberately introduced later.                                             */
/* ========================================================================== */

.calendar-page.calendar-page-week {
    width: max(100%, 760px) !important;
    min-width: 760px !important;
}

.calendar-page.calendar-page-week .calendar-sticky-header {
    min-width: 760px !important;
}

.calendar-page.calendar-page-list {
    width: max(100%, 600px) !important;
    min-width: 600px !important;
}

.calendar-page.calendar-page-list .calendar-sticky-header {
    min-width: 600px !important;
}

/* ========================================================================== */
/* Desktop Week/List presentation refinements                                 */
/*                                                                            */
/* These rules refine only the established desktop Week and List views.       */
/* Month View, calendar behavior, navigation, and future responsive modes are */
/* intentionally unaffected.                                                  */
/* ========================================================================== */

/* List View: make each date group easier to scan in a long continuous list. */
.calendar-event-list .calendar-list-day {
    gap: 20px !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    border-bottom: 2px solid #d5ddd2 !important;
}

.calendar-event-list .calendar-list-day:last-of-type {
    border-bottom: 0 !important;
}

.calendar-event-list .calendar-list-date {
    align-self: stretch !important;
    padding: 10px 12px !important;
    border-left: 3px solid #aab9a6 !important;
    border-radius: 6px !important;
    background: #eef2eb !important;
}

.calendar-event-list .calendar-list-day[data-calendar-list-today="true"] .calendar-list-date {
    border-left-color: var(--club-accent) !important;
    background: #fff8df !important;
}

/* List View: echo the Month View hierarchy with a lighter, compact band. */
.calendar-event-list .calendar-list-month-title {
    margin: 1.75rem 0 0 !important;
    padding: 0.8rem 1rem !important;
    border-top: 3px solid var(--club-primary) !important;
    border-bottom: 1px solid #b9c6b6 !important;
    background: #e8eee4 !important;
    color: var(--club-primary) !important;
    font-size: 1.3rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em !important;
}

.calendar-event-list .calendar-list-month-title:first-of-type {
    margin-top: 0 !important;
}

/* Week View: reduce the boxed-in appearance while retaining day separation. */
.calendar-week-view {
    border-color: #d9dfd6 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.calendar-week-heading {
    border-bottom-color: #ccd5c9 !important;
    background: #f2f5ef !important;
}

.calendar-week-days {
    background: #fff !important;
}

.calendar-week-day {
    border-bottom-color: #d5ddd2 !important;
}

/* Week/List empty states: consistent, compact desktop spacing. */
.calendar-week-view .calendar-empty-month,
.calendar-event-list > .calendar-empty-month {
    min-height: 150px !important;
    padding: 2rem 1.5rem !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

.calendar-week-view .calendar-empty-month i,
.calendar-event-list > .calendar-empty-month i {
    font-size: 1.9rem !important;
}

/* ========================================================================== */
/* Responsive calendar Stage 1: explicit compact framework + Month View       */
/*                                                                            */
/* One structural threshold governs presentation ownership. The approved wide */
/* layout remains unchanged at 1025px and above. Compact Month View uses a     */
/* fixed seven-column canvas inside its own horizontal scroller; it never      */
/* scales or transforms the page.                                              */
/* ========================================================================== */

.calendar-page.calendar-compact {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.calendar-page.calendar-compact .calendar-sticky-header {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.calendar-page.calendar-wide .desktop-calendar-toolbar {
    display: flex !important;
}

.calendar-page.calendar-wide .mobile-calendar-toolbar,
.calendar-page.calendar-wide .mobile-calendar-presentation {
    display: none !important;
}

@media (max-width: 1024px) {
    .calendar-page.calendar-compact .desktop-calendar-toolbar,
    .calendar-page.calendar-compact .desktop-calendar-presentation {
        display: none !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-toolbar {
        position: static !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.55rem !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0.55rem 0.65rem !important;
        box-sizing: border-box !important;
        border-bottom: 1px solid var(--calendar-border) !important;
        background: #f7f8f5 !important;
        box-shadow: none !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-navigation {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        overflow: hidden !important;
        border: 1px solid #bfc6bf !important;
        border-radius: 999px !important;
        background: white !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-nav-button,
    .calendar-page.calendar-compact .mobile-calendar-today-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 36px !important;
        border: 0 !important;
        background: transparent !important;
        color: var(--club-primary) !important;
        font-weight: 700 !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-nav-button {
        width: 38px !important;
        padding: 0 !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-today-button {
        min-width: 62px !important;
        padding: 0.3rem 0.65rem !important;
        border-right: 1px solid #d5d9d4 !important;
        border-left: 1px solid #d5d9d4 !important;
        font-size: 0.82rem !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-toolbar .calendar-view-selector {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-toolbar .calendar-view-option {
        min-height: 36px !important;
        padding: 5px 10px !important;
        font-size: 0.78rem !important;
    }

    .calendar-page.calendar-compact .compact-calendar-create-button {
        flex: 0 0 auto !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-presentation {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .compact-calendar-month-section {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .compact-calendar-scroll {
        position: relative !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        overscroll-behavior: auto !important;
        -webkit-overflow-scrolling: auto !important;
        touch-action: auto !important;
    }

    /*
        Keep the month at its full 1190px logical layout size. JavaScript then
        applies one transform to the complete canvas so WebKit scales cells,
        cards, text and icons uniformly. The containing scroller is given the
        transformed visual height, so this does not create a second scroll area.
    */
    .compact-calendar-canvas {
        position: relative !important;
        width: 1190px !important;
        min-width: 1190px !important;
        max-width: none !important;
        zoom: 1 !important;
        transform-origin: top left !important;
        touch-action: auto !important;
    }

    .compact-calendar-weekday-row,
    .compact-calendar-grid {
        display: grid !important;
        grid-template-columns: repeat(7, 170px) !important;
        width: 1190px !important;
        min-width: 1190px !important;
        max-width: 1190px !important;
    }

    .compact-calendar-weekday-row {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #f2f5ef;
        border-top: 1px solid var(--calendar-border);
        border-bottom: 1px solid var(--calendar-border);
    }

    .compact-calendar-weekday-row > div {
        padding: 0.6rem 0.35rem;
        border-right: 1px solid var(--calendar-border);
        color: var(--club-primary);
        font-size: 0.78rem;
        font-weight: 750;
        text-align: center;
    }

    .compact-calendar-weekday-row > div:last-child {
        border-right: 0;
    }

    .compact-calendar-grid {
        grid-auto-rows: auto !important;
        align-items: stretch !important;
    }

    /* The Month view is a 1190px logical canvas scaled as one object.
       iOS WebKit text autosizing must not enlarge text independently of that scale. */
    .calendar-page.calendar-compact .compact-calendar-canvas {
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }

    .compact-calendar-grid .desktop-calendar-day {
        min-width: 0 !important;
        min-height: 72px !important;
        height: auto !important;
        padding: 8px !important;
        overflow: hidden !important;
    }

    .compact-calendar-grid .desktop-calendar-day-content {
        max-height: none !important;
        overflow: visible !important;
        touch-action: manipulation !important;
    }

    .compact-calendar-grid .desktop-tournament-meta {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .compact-calendar-grid .desktop-meta-item,
    .compact-calendar-grid .desktop-tournament-title,
    .compact-calendar-grid .desktop-status-badge {
        min-width: 0 !important;
    }

    /* Preserve the desktop card's controlled text treatment inside the scaled canvas.
       Metadata remains nowrap/ellipsis from the desktop rules; titles may wrap at
       normal word boundaries but must not split words arbitrarily. */
    .compact-calendar-grid .desktop-tournament-title {
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

}




@media (max-width: 430px) {
    .calendar-page.calendar-compact .mobile-calendar-toolbar {
        gap: 0.4rem !important;
        padding: 0.45rem !important;
    }

    .calendar-page.calendar-compact .mobile-calendar-toolbar .calendar-view-option {
        padding-right: 8px !important;
        padding-left: 8px !important;
        font-size: 0.74rem !important;
    }
}

@media (max-width: 360px) {
    .calendar-page.calendar-compact .mobile-calendar-navigation {
        order: 1;
    }


    .calendar-page.calendar-compact .mobile-calendar-toolbar .calendar-view-selector {
        order: 2;
    }

    .calendar-page.calendar-compact .compact-calendar-create-button {
        order: 3;
    }
}

/* Resolve the single structural mode before exposing its controls/content. */
.calendar-page.calendar-viewport-pending > .calendar-sticky-header .calendar-toolbar,
.calendar-page.calendar-viewport-pending > .desktop-calendar-presentation,
.calendar-page.calendar-viewport-pending > .mobile-calendar-presentation,
.calendar-page.calendar-viewport-pending > .calendar-week-view,
.calendar-page.calendar-viewport-pending > .calendar-event-list {
    visibility: hidden !important;
}

@media (max-width: 1024px) {
    .calendar-page.calendar-compact .calendar-title-bar {
        align-items: center !important;
        gap: 0.75rem !important;
        padding: 12px 14px !important;
    }

    .calendar-page.calendar-compact .calendar-brand {
        gap: 10px !important;
        min-width: 0 !important;
    }

    .calendar-page.calendar-compact .club-logo-wrap {
        width: 58px !important;
        height: 58px !important;
        flex: 0 0 58px !important;
    }

    .calendar-page.calendar-compact .calendar-brand-text {
        min-width: 0 !important;
    }

    .calendar-page.calendar-compact .calendar-eyebrow-row {
        gap: 6px !important;
        margin-top: 3px !important;
    }

    .calendar-page.calendar-compact .calendar-title-bar h2 {
        font-size: 1.1rem !important;
        line-height: 1.15 !important;
    }

    .calendar-page.calendar-compact .calendar-eyebrow {
        margin-top: 0 !important;
        font-size: 0.65rem !important;
        letter-spacing: 0.09em !important;
    }

    .calendar-page.calendar-compact .calendar-user-area {
        flex: 0 0 auto !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 2px !important;
        width: auto !important;
        text-align: right !important;
    }

    .calendar-page.calendar-compact .welcome-text {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        max-width: 150px !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
    }

    .calendar-page.calendar-compact .welcome-label,
    .calendar-page.calendar-compact .welcome-name {
        display: block !important;
        max-width: 150px !important;
        text-align: right !important;
        overflow-wrap: anywhere !important;
    }

    .calendar-page.calendar-compact .welcome-separator {
        display: none !important;
    }

    .calendar-page.calendar-compact .calendar-user-area form {
        margin: 0 !important;
        line-height: 1 !important;
    }

    .calendar-page.calendar-compact .calendar-auth-button {
        padding: 0 !important;
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
    }
}

/* ========================================================================== */
/* Responsive calendar Stage 2: Compact Week View                             */
/*                                                                            */
/* Compact Week View is a full-width vertical agenda. It deliberately removes */
/* the desktop Week/List readability floor only while compact mode is active. */
/* Empty dates remain omitted by the Razor view; the existing empty-week state */
/* is preserved. Desktop Week View remains unchanged at 1025px and above.      */
/* ========================================================================== */

@media (max-width: 1024px) {
    .calendar-page.calendar-compact.calendar-page-week {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .calendar-page.calendar-compact.calendar-page-week .calendar-sticky-header {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-view {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0.75rem 0 1.5rem !important;
        border-right: 0 !important;
        border-left: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-view .calendar-week-heading {
        padding: 0.8rem 0.9rem !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-view .calendar-week-heading h3 {
        font-size: 1.05rem !important;
        line-height: 1.25 !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-days {
        width: 100% !important;
        min-width: 0 !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-day {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        grid-template-columns: none !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-day .calendar-week-date {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
        padding: 0.7rem 0.9rem !important;
        border-bottom: 1px solid #e2e5e0 !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-day .calendar-week-events {
        width: 100% !important;
        min-width: 0 !important;
        padding: 0.65rem 0.75rem 0.9rem !important;
        box-sizing: border-box !important;
    }

    .calendar-page.calendar-compact .compact-calendar-week-view .calendar-empty-month {
        min-height: 120px !important;
        padding: 1.5rem 1rem !important;
    }
}

/* ========================================================================== */
/* Responsive calendar Stage 3: Compact List View                             */
/*                                                                            */
/* Compact List View is a fully fluid vertical agenda. The desktop 600px      */
/* readability floor and two-column date/event arrangement apply only to wide */
/* mode. Continuous loading, month grouping, Today behavior, and desktop List */
/* View remain unchanged.                                                     */
/* ========================================================================== */

@media (max-width: 1024px) {
    .calendar-page.calendar-compact.calendar-page-list {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-sticky-header {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-event-list {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-month-title {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 1.25rem !important;
        padding: 0.7rem 0.85rem !important;
        box-sizing: border-box !important;
        font-size: 1.15rem !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-day {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        padding: 0.85rem 0 !important;
        box-sizing: border-box !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-date {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 0 0.65rem !important;
        padding: 0.65rem 0.75rem !important;
        box-sizing: border-box !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-weekday,
    .calendar-page.calendar-compact.calendar-page-list .calendar-list-date-value {
        min-width: 0 !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-date-value {
        text-align: right !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-events,
    .calendar-page.calendar-compact.calendar-page-list .tournament-card.list-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-loading,
    .calendar-page.calendar-compact.calendar-page-list .calendar-empty-month {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 430px) {
    .calendar-page.calendar-compact.calendar-page-list .calendar-event-list {
        padding: 0.55rem !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-date {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.15rem !important;
    }

    .calendar-page.calendar-compact.calendar-page-list .calendar-list-date-value {
        text-align: left !important;
    }
}

/* ========================================================================== */
/* Responsive visibility: Admin Tools toggle                                  */
/*                                                                            */
/* The toggle is a desktop-only control. This final, breakpoint-scoped rule   */
/* intentionally follows the desktop-first reset so compact mode cannot be     */
/* overridden by the earlier global desktop display declaration.               */
/* ========================================================================== */

@media (max-width: 1024px) {
    .calendar-page.calendar-compact .admin-tools-toggle-container {
        display: none !important;
    }
}


/* Member-facing completed results: hide print controls on touch-oriented devices.
   Layout remains width-driven, so landscape phones/tablets can continue using
   the wider report presentation without exposing desktop print controls. */
@media (hover: none) and (pointer: coarse) {
    .member-results-print {
        display: none !important;
    }
}

/* Member-facing completed results: phone-first presentation. */
@media (max-width: 767.98px) {
    .member-results-print {
        display: none !important;
    }

    .member-results-view {
        width: 100%;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 .15rem 1rem;
    }

    .member-results-view .report-header {
        margin-bottom: .85rem;
        padding-bottom: .65rem;
    }

    .member-results-view .report-header-main {
        display: block;
    }

    .member-results-view .report-title-block h2 {
        font-size: 1.2rem;
    }

    .member-results-view .report-meta {
        grid-template-columns: 1fr;
        gap: .2rem;
        margin-top: .55rem;
        text-align: left;
        font-size: .86rem;
    }

    .member-results-view .standings-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .member-results-view .standings-section h3,
    .member-results-view .flight-standings-block h2,
    .member-results-view .flight-results-block h2 {
        margin-bottom: .55rem;
        font-size: 1.05rem;
    }

    .member-results-view table {
        display: block;
        width: 100%;
        margin: 0;
        border: 0;
    }

    .member-results-view table thead {
        display: none;
    }

    .member-results-view table tbody {
        display: grid;
        gap: .55rem;
    }

    .member-results-view table tbody tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: .55rem .7rem;
        border: 1px solid var(--bs-border-color);
        border-radius: .6rem;
        background: var(--bs-body-bg);
        box-shadow: 0 1px 2px rgba(0,0,0,.04);
    }

    .member-results-view table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: .75rem;
        width: 100%;
        padding: .22rem 0 !important;
        border: 0 !important;
        text-align: right !important;
        white-space: normal;
    }

    .member-results-view table tbody td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--bs-secondary-color);
        font-size: .76rem;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: uppercase;
        text-align: left;
    }

    .member-results-view table tbody td[data-label="Player"],
    .member-results-view table tbody td[data-label="Team"] {
        padding-bottom: .4rem !important;
        font-size: 1rem;
        font-weight: 700;
    }

    .member-results-view table tbody td[data-label="Players"] {
        align-items: flex-start;
        font-size: .9rem;
    }

    .member-results-view .table-responsive {
        overflow: visible;
    }
}

/* Member-facing completed results: mobile payouts + flight accordions. */
.member-results-mobile-flights,
.member-results-payouts {
    display: none;
}

.member-results-payout-tie-note {
    padding: 0.55rem 0.75rem 0.65rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.84rem;
    line-height: 1.35;
}

@media (max-width: 767.98px) {
    .member-results-desktop-flights {
        display: none !important;
    }

    .member-results-mobile-flights,
    .member-results-payouts {
        display: block;
    }

    .member-results-payouts,
    .member-results-flight-accordion {
        margin-bottom: .65rem;
        border: 1px solid var(--bs-border-color);
        border-radius: .7rem;
        background: var(--bs-body-bg);
        overflow: clip;
    }

    .member-results-payouts {
        margin-top: .9rem;
        margin-bottom: 1.15rem;
    }

    .member-results-payouts > summary,
    .member-results-flight-accordion > summary {
        position: relative;
        padding: .75rem 2.25rem .75rem .8rem;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
        user-select: none;
    }

    .member-results-payouts > summary::-webkit-details-marker,
    .member-results-flight-accordion > summary::-webkit-details-marker {
        display: none;
    }

    .member-results-payouts > summary::after,
    .member-results-flight-accordion > summary::after {
        content: "›";
        position: absolute;
        top: 50%;
        right: .9rem;
        transform: translateY(-50%) rotate(90deg);
        transition: transform .15s ease;
        font-size: 1.25rem;
        line-height: 1;
    }

    .member-results-payouts[open] > summary,
    .member-results-flight-accordion[open] > summary {
        border-bottom: 1px solid var(--bs-border-color);
        background: var(--bs-tertiary-bg);
    }

    .member-results-payouts[open] > summary::after,
    .member-results-flight-accordion[open] > summary::after {
        transform: translateY(-50%) rotate(-90deg);
    }

    .member-results-payout-scroll {
        max-height: min(42vh, 18rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .member-results-payout-list {
        display: grid;
    }

    .member-results-payout-header,
    .member-results-payout-row {
        display: grid;
        grid-template-columns: minmax(2.8rem, .7fr) minmax(3.5rem, .8fr) minmax(0, 2fr) minmax(3.6rem, .8fr);
        gap: .4rem;
        align-items: center;
    }

    .member-results-payout-header {
        position: sticky;
        top: 0;
        z-index: 1;
        padding: .5rem .45rem .4rem;
        border-bottom: 1px solid var(--bs-border-color);
        background: var(--bs-body-bg);
        color: var(--bs-secondary-color);
        font-size: .68rem;
        font-weight: 700;
        letter-spacing: .025em;
        text-transform: uppercase;
    }

    .member-results-payout-row {
        padding: .5rem .45rem;
        border-bottom: 1px solid var(--bs-border-color);
        font-size: .86rem;
    }

    .member-results-payout-row:last-child {
        border-bottom: 0;
    }

    .member-results-payout-row > span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .member-results-payout-row > span[data-label="Player"] {
        font-weight: 700;
    }

    .member-results-payout-amount {
        font-weight: 700;
        text-align: right;
        white-space: nowrap;
    }

    .member-results-flight-content {
        padding: .7rem;
    }
}


/* Member-facing standings: visually group position/value under Gross and Net. */
.member-results-standings-table .member-results-standings-result-group {
    text-align: center !important;
}

.member-results-standings-table.has-both-standings .member-results-net-group,
.member-results-standings-table.has-both-standings .member-results-net-group-start {
    border-left: 1px solid var(--bs-border-color);
}

/* Member-facing completed results: compact, format-aware mobile standings. */
@media (max-width: 767.98px) {
    .member-results-flight-content {
        padding: 0;
    }

    .member-results-standings-scroll {
        max-height: min(50vh, 22rem);
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .member-results-standings-table {
        width: 100%;
        margin: 0;
        border-collapse: separate;
        border-spacing: 0;
        font-size: .82rem;
    }

    /* Keep the complete two-row standings header sticky as one opaque unit.
       Sticky individual rows used to leave a seam where scrolling body values
       could show through between the Gross/Net and Pos/Score header rows. */
    .member-results-standings-table thead {
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--bs-body-bg);
    }

    .member-results-standings-table thead th {
        position: static;
        padding: .45rem .3rem;
        border-bottom: 1px solid var(--bs-border-color);
        background: var(--bs-body-bg);
        color: var(--bs-secondary-color);
        font-size: .66rem;
        font-weight: 800;
        line-height: 1.05;
        letter-spacing: .015em;
        text-transform: uppercase;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
        vertical-align: bottom;
    }

    .member-results-standings-table .member-results-standings-group-header th {
        padding-bottom: .18rem;
        border-bottom: 0;
        vertical-align: middle;
    }

    .member-results-standings-table .member-results-standings-group-header th[rowspan="2"] {
        border-bottom: 1px solid var(--bs-border-color);
    }

    .member-results-standings-table .member-results-standings-subheader th {
        padding-top: .16rem;
        padding-bottom: .36rem;
        font-size: .56rem;
        line-height: 1;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .member-results-standings-table tbody td {
        padding: .48rem .38rem;
        border-bottom: 1px solid var(--bs-border-color);
        vertical-align: middle;
        white-space: nowrap;
    }

    .member-results-standings-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .member-results-standing-name {
        min-width: 8.5rem;
        max-width: 13rem;
        font-weight: 700;
        white-space: normal !important;
    }

    .member-results-standing-details {
        margin-top: .08rem;
        color: var(--bs-secondary-color);
        font-size: .68rem;
        font-weight: 500;
        line-height: 1.15;
    }

    .member-results-payout-header,
    .member-results-payout-row {
        grid-template-columns: minmax(2.25rem, .55fr) minmax(3.2rem, .7fr) minmax(0, 2.2fr) minmax(3.5rem, .8fr);
        gap: .3rem;
    }

    .member-results-payout-row > span[data-label="Flight"],
    .member-results-payout-row > span[data-label="Position"],
    .member-results-payout-row > span[data-label="Prize"] {
        white-space: nowrap;
    }
}

@media (max-width: 767.98px) {
    .member-results-view table.member-results-standings-table {
        display: table;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .member-results-view table.member-results-standings-table thead {
        display: table-header-group;
    }

    .member-results-view table.member-results-standings-table tbody {
        display: table-row-group;
    }

    .member-results-view table.member-results-standings-table tr {
        display: table-row;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .member-results-view table.member-results-standings-table th,
    .member-results-view table.member-results-standings-table td {
        display: table-cell;
        width: auto;
        text-align: inherit !important;
    }

    .member-results-view table.member-results-standings-table td::before {
        content: none;
    }
}

/* Item 5E refinement: shared standings accordion + tighter mobile table alignment. */
@media (max-width: 767.98px) {
    .member-results-standings-accordion {
        gap: .65rem;
    }

    .member-results-standings-accordion-item {
        margin: 0;
        border-radius: .7rem;
        box-shadow: none;
    }

    .member-results-standings-accordion-item .accordion-control-item-header {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: .45rem;
        padding: 0 .8rem;
    }

    .member-results-standings-accordion-item .accordion-control-item-title {
        color: var(--bs-body-color);
        font-size: 1rem;
        font-weight: 700;
    }

    .member-results-standings-accordion-item .accordion-control-item-summary {
        min-width: 0;
    }

    /* The shared workflow accordion normally uses a page-sticky active header.
       Member result flights scroll inside their own bounded table instead. */
    .member-results-standings-accordion-item.is-expanded > .accordion-control-item-header {
        position: static !important;
        top: auto !important;
        box-shadow: inset .22rem 0 0 var(--app-primary) !important;
    }

    .member-results-standings-accordion-item .accordion-control-item-panel {
        padding: 0;
    }

    .member-results-payout-header,
    .member-results-payout-row {
        grid-template-columns: 2.1rem 2.7rem minmax(0, 1fr) 3.9rem;
        gap: .25rem;
    }

    .member-results-payout-header > :nth-child(1),
    .member-results-payout-header > :nth-child(2),
    .member-results-payout-row > :nth-child(1),
    .member-results-payout-row > :nth-child(2) {
        text-align: center;
    }

    .member-results-payout-header > :nth-child(3),
    .member-results-payout-row > :nth-child(3) {
        text-align: left;
    }

    .member-results-payout-header > :nth-child(4),
    .member-results-payout-row > :nth-child(4) {
        text-align: right;
    }

    .member-results-payout-row > span[data-label="Player"] {
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.15;
    }

    .member-results-standings-scroll {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .member-results-standings-table {
        table-layout: fixed;
    }

    .member-results-standings-table thead th.member-results-col-name,
    .member-results-standings-table tbody td.member-results-col-name {
        text-align: left !important;
    }

    .member-results-standing-name {
        min-width: 0;
        max-width: none;
        overflow-wrap: anywhere;
    }

    .member-results-standings-table thead th,
    .member-results-standings-table tbody td {
        box-sizing: border-box;
    }

    .member-results-standings-table thead th.member-results-col-position {
        text-align: center !important;
    }

    .member-results-standings-table thead th.member-results-col-value {
        text-align: right !important;
    }

    .member-results-standings-table thead th.member-results-col-position,
    .member-results-standings-table thead th.member-results-col-value {
        hyphens: none;
    }
}


/* CP6: Skins mobile results omit position columns and reserve breathing room beside vertical scrollbars. */
@media (max-width: 767.98px) {
    .member-results-payout-scroll {
        scrollbar-gutter: stable;
        box-sizing: border-box;
        padding-right: 1rem;
    }

    .member-results-standings-table.positions-hidden.has-both-standings col.member-results-col-name {
        width: 56%;
    }

    .member-results-standings-table.positions-hidden.has-both-standings col.member-results-col-value {
        width: 22%;
    }

    .member-results-standings-table.positions-hidden.has-single-standings col.member-results-col-name {
        width: 72%;
    }

    .member-results-standings-table.positions-hidden.has-single-standings col.member-results-col-value {
        width: 28%;
    }

    .member-results-payout-header > :last-child,
    .member-results-payout-row > :last-child {
        padding-right: .3rem;
    }
}


/* Member-facing positional standings: Gross and Net are two compact result groups.
   Desktop keeps the helper columns effectively invisible; mobile assigns the
   exact visual proportions used by the compact member-results layout. */
.member-results-standings-table col.member-results-col-group-gap,
.member-results-standings-table col.member-results-col-trailing-gap {
    width: 0;
}

.member-results-standings-table th.member-results-col-group-gap,
.member-results-standings-table td.member-results-col-group-gap,
.member-results-standings-table th.member-results-col-trailing-gap,
.member-results-standings-table td.member-results-col-trailing-gap {
    width: 0;
    min-width: 0;
    max-width: 0;
    padding: 0 !important;
    border: 0 !important;
}

@media (max-width: 767.98px) {
    .member-results-standings-scroll {
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-gutter: stable;
        box-sizing: border-box;
    }

    .member-results-standings-table {
        width: 100%;
        table-layout: fixed;
        margin: 0;
    }

    /* Both standings: Player | Gross(Pos,Pts) | gap | Net(Pos,Pts) | gutter. */
    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-col-name {
        width: 46%;
    }

    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-gross-position,
    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-net-position {
        width: 9%;
    }

    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-gross-value,
    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-net-value {
        width: 11%;
    }

    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-col-group-gap {
        width: 5%;
    }

    .member-results-standings-table.has-both-standings:not(.positions-hidden) col.member-results-col-trailing-gap {
        width: 9%;
    }

    .member-results-standings-table.has-both-standings:not(.positions-hidden) th.member-results-col-group-gap,
    .member-results-standings-table.has-both-standings:not(.positions-hidden) td.member-results-col-group-gap {
        width: 5%;
        min-width: 0;
        max-width: none;
        padding: 0 !important;
        border: 0 !important;
        background: var(--bs-body-bg);
    }

    .member-results-standings-table.has-both-standings:not(.positions-hidden) th.member-results-col-trailing-gap,
    .member-results-standings-table.has-both-standings:not(.positions-hidden) td.member-results-col-trailing-gap {
        width: 9%;
        min-width: 0;
        max-width: none;
        padding: 0 !important;
        border: 0 !important;
        background: var(--bs-body-bg);
    }

    /* Single Gross or Net standings keep the same compact numeric relationship. */
    .member-results-standings-table.has-single-standings:not(.positions-hidden) col.member-results-col-name {
        width: 68%;
    }

    .member-results-standings-table.has-single-standings:not(.positions-hidden) col.member-results-col-position {
        width: 13%;
    }

    .member-results-standings-table.has-single-standings:not(.positions-hidden) col.member-results-col-value {
        width: 19%;
    }

    .member-results-standings-table:not(.positions-hidden) thead th,
    .member-results-standings-table:not(.positions-hidden) tbody td {
        box-sizing: border-box;
    }

    .member-results-standings-table:not(.positions-hidden) thead th.member-results-col-name,
    .member-results-standings-table:not(.positions-hidden) tbody td.member-results-col-name {
        padding-left: .65rem;
        padding-right: .25rem;
        text-align: left !important;
    }

    .member-results-standings-table:not(.positions-hidden) .member-results-standings-result-group {
        padding-left: 0;
        padding-right: 0;
        text-align: center !important;
    }

    .member-results-standings-table:not(.positions-hidden) thead th.member-results-col-position,
    .member-results-standings-table:not(.positions-hidden) tbody td.member-results-col-position {
        padding-left: .04rem;
        padding-right: .04rem;
        text-align: center !important;
        white-space: nowrap;
    }

    .member-results-standings-table:not(.positions-hidden) thead th.member-results-col-value,
    .member-results-standings-table:not(.positions-hidden) tbody td.member-results-col-value {
        padding-left: .04rem;
        padding-right: .08rem;
        text-align: right !important;
        white-space: nowrap;
    }

    /* The explicit spacer owns Gross/Net separation. */
    .member-results-standings-table.has-both-standings:not(.positions-hidden) .member-results-net-group,
    .member-results-standings-table.has-both-standings:not(.positions-hidden) .member-results-net-group-start {
        border-left: 0;
    }
}

/* Member-facing single-result headings: preserve visible separation between Pos and Score/Pts. */
@media (max-width: 767.98px) {
    .member-results-standings-table.has-single-standings:not(.positions-hidden) .member-results-standings-subheader th.member-results-col-position {
        padding-right: .18rem;
    }

    .member-results-standings-table.has-single-standings:not(.positions-hidden) .member-results-standings-subheader th.member-results-col-value {
        padding-left: .18rem;
    }
}


/* Member-facing payouts: separate positional Gross and Net awards into clear groups. */
@media (max-width: 767.98px) {
    .member-results-payout-grouped-scroll {
        max-height: min(48vh, 22rem);
    }

    .member-results-payout-flight-group + .member-results-payout-flight-group {
        border-top: 1px solid var(--bs-border-color);
    }

    .member-results-payout-flight-heading {
        padding: .58rem .55rem .42rem;
        background: var(--bs-tertiary-bg);
        border-bottom: 1px solid var(--bs-border-color);
        font-size: .83rem;
        font-weight: 700;
    }

    .member-results-payout-category-group + .member-results-payout-category-group {
        border-top: 1px solid var(--bs-border-color);
    }

    .member-results-payout-category-heading {
        padding: .52rem .55rem .3rem;
        font-size: .82rem;
        font-weight: 700;
    }

    .member-results-payout-category-header,
    .member-results-payout-category-row {
        grid-template-columns: 3.2rem minmax(0, 1fr) 4.25rem;
        gap: .35rem;
    }

    .member-results-payout-category-header {
        position: static;
        padding-top: .28rem;
    }

    .member-results-payout-category-header > :first-child,
    .member-results-payout-category-row > :first-child {
        text-align: center;
    }

    .member-results-payout-category-header > :nth-child(2),
    .member-results-payout-category-row > :nth-child(2) {
        text-align: left;
    }

    .member-results-payout-category-header > :last-child,
    .member-results-payout-category-row > :last-child {
        text-align: right;
    }
}


/* Member-facing payout summary: contest awards use a compact two-line block. */
@media (max-width: 767.98px) {
    .member-results-contest-payout-section {
        border-top: 1px solid var(--bs-border-color);
        padding: .55rem .55rem .7rem;
    }

    .member-results-contest-payout-heading {
        margin-bottom: .35rem;
        font-size: .82rem;
        font-weight: 700;
    }

    .member-results-contest-payout-item {
        min-width: 0;
        padding: .25rem 0;
    }

    .member-results-contest-payout-item + .member-results-contest-payout-item {
        margin-top: .65rem;
    }

    .member-results-contest-payout-name {
        min-width: 0;
        font-size: .86rem;
        font-weight: 700;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .member-results-contest-payout-detail {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .75rem;
        align-items: baseline;
        margin-top: .12rem;
        font-size: .86rem;
        line-height: 1.3;
    }

    .member-results-contest-payout-player {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .member-results-contest-payout-amount {
        font-weight: 700;
        text-align: right;
        white-space: nowrap;
    }
}

/* Member results: on wide touch devices (typically phone/tablet landscape),
 * retain the wide printable report tables while giving every scoring family
 * the same section framing used by the combined Medal + Skins report. */
.member-results-landscape-primary-section {
    display: contents;
}

.member-results-landscape-section-heading {
    display: none;
}

@media (hover: none) and (pointer: coarse) and (min-width: 768px) {
    .member-results-landscape-primary-section-member {
        display: block;
        min-width: 0;
        margin-top: 1.5rem;
        border: 1px solid var(--bs-border-color);
        border-radius: 0.65rem;
        overflow: hidden;
        background: var(--bs-body-bg);
    }

    .member-results-landscape-primary-section-member > .member-results-landscape-section-heading {
        display: block;
        margin: 0;
        padding: 0.7rem 1rem;
        border-bottom: 1px solid var(--bs-border-color);
        background: var(--bs-tertiary-bg);
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .member-results-landscape-primary-section-member > .report-actions,
    .member-results-landscape-primary-section-member > .tournament-report {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    /* Landscape has one page-level sticky header containing navigation.
       Suppress the per-report action row here so Back to Calendar and Print
       controls are not duplicated in the report body. */
    .member-results-landscape-primary-section-member > .report-actions {
        display: none;
    }

    .member-results-landscape-primary-section-member > .tournament-report {
        max-width: none;
        margin-top: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Calendar-only presentation: no surrounding application gutters or shell chrome. */
.calendar-embed-shell,
.calendar-embed-page,
.calendar-embed-page main,
.calendar-embed-content {
    width: 100%;
    min-width: 0;
    max-width: none;
}
.calendar-embed-page {
    display: block;
}
.calendar-embed-content {
    margin: 0;
    padding: 0;
}

/* Calendar-only utility header: keep administration off phone and tablet displays.
   This intentionally lives in the global stylesheet, not the calendar CSS-isolation
   bundle, since the utility header is rendered outside the calendar-page wrapper.
   Keep sign-in, logout, calendar scaling and tournament day controls unchanged. */
/* The calendar-only Admin Tools button is controlled by the Razor authorization
   check and JS device-class detection. A width-only CSS rule incorrectly hid it
   on desktop browsers with Windows display scaling or browser zoom. */


/* CP4: apply the proven document-flow layout only while an inline PDF is
   present in a public page or its CMS preview. The marker is emitted by
   WebsitePageSections; it disappears on navigation or when using cards.
   Global CSS is intentional: the marker belongs to a descendant component. */
@media screen and (min-width: 641px) {
    div.app-shell:has(.public-inline-pdf) {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    div.app-shell:has(.public-inline-pdf) > div.page {
        overflow: visible;
    }
    div.app-shell:has(.public-inline-pdf) > div.page > main {
        overflow: visible;
        overscroll-behavior: auto;
    }
}
