.matches-shell {
    max-width: 1040px;
}

.matches-intro {
    margin-bottom: 18px;
}

.matches-summary {
    grid-template-columns: 0.9fr 1.55fr 0.75fr 0.75fr;
}

.matches-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.current-matches-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.current-matches-table th,
.current-matches-table td {
    padding: 12px 14px;
    border-right: 1px solid #e4ebe7;
    border-bottom: 1px solid #e4ebe7;
    vertical-align: middle;
}

.current-matches-table thead th {
    background: var(--green-900);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-align: center;
    text-transform: uppercase;
}

.current-matches-table thead th:nth-child(2) {
    text-align: left;
}

.current-matches-table th:last-child,
.current-matches-table td:last-child {
    border-right: 0;
}

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

.current-matches-table .matchup-start > * {
    border-top: 4px solid #b9cec3;
}

.current-matches-table tbody .matchup-start:first-child > * {
    border-top: 0;
}

.current-matches-table .team-start-row > * {
    border-top: 2px solid #d8e4de;
}

.current-team-number {
    width: 130px;
    min-width: 130px;
    background: var(--green-100);
    color: var(--green-950);
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.current-player-name {
    min-width: 250px;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 800;
}

.current-hole {
    width: 105px;
    min-width: 105px;
    background: #f8f5ec;
    color: #755516;
    font-size: 1.08rem;
    font-weight: 900;
    text-align: center;
}

.current-handicap {
    width: 160px;
    min-width: 160px;
    color: var(--green-800);
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}

.team-player-row {
    background: #fbfdfc;
}

.matches-note {
    margin: 13px 3px 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.rainout-state {
    border-color: #decfae;
    background: #fffaf0;
}

@media screen and (max-width: 760px) {
    .matches-shell {
        width: calc(100% - 12px);
        margin-top: 14px;
    }

    .matches-intro {
        margin-bottom: 10px;
    }

    .matches-summary {
        grid-template-columns: 1fr 1.3fr;
        margin-bottom: 9px;
    }

    .matches-summary > div {
        min-height: 46px;
        padding: 7px 8px;
    }

    .matches-count-summary,
    .players-count-summary {
        display: none;
    }

    .matches-card {
        border-radius: 10px;
        box-shadow: 0 8px 22px rgba(19, 48, 37, 0.09);
    }

    .current-matches-table {
        width: 100%;
        table-layout: fixed;
    }

    .current-matches-table th,
    .current-matches-table td {
        padding: 7px 5px;
    }

    .current-matches-table thead th {
        font-size: 0.57rem;
        letter-spacing: 0.015em;
    }

    .current-team-number {
        width: 66px;
        min-width: 66px;
        font-size: 0.72rem;
        white-space: normal;
    }

    .current-player-name {
        width: auto;
        min-width: 0;
        font-size: 0.68rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .current-hole {
        width: 49px;
        min-width: 49px;
        font-size: 0.78rem;
    }

    .current-handicap {
        width: 74px;
        min-width: 74px;
        font-size: 0.76rem;
    }

    .current-matches-table .matchup-start > * {
        border-top-width: 3px;
    }

    .matches-note {
        margin-top: 8px;
        font-size: 0.64rem;
    }
}

@media screen and (max-width: 420px) {
    .matches-shell {
        width: calc(100% - 8px);
    }

    .current-team-number {
        width: 59px;
        min-width: 59px;
        font-size: 0.67rem;
    }

    .current-player-name {
        font-size: 0.63rem;
    }

    .current-hole {
        width: 44px;
        min-width: 44px;
    }

    .current-handicap {
        width: 67px;
        min-width: 67px;
        font-size: 0.7rem;
    }
}

@media print {
    .matches-summary {
        grid-template-columns: repeat(4, 1fr);
    }

    .matches-card {
        box-shadow: none;
    }
}

/* Hole number moved to the far-left column - 2026-07-14 */
.current-matches-table thead th:nth-child(1),
.current-matches-table thead th:nth-child(2),
.current-matches-table thead th:nth-child(4) {
    text-align: center;
}

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

.current-hole {
    border-left: 0;
}

@media screen and (max-width: 760px) {
    .current-hole {
        width: 44px;
        min-width: 44px;
    }

    .current-team-number {
        width: 62px;
        min-width: 62px;
    }
}

@media screen and (max-width: 420px) {
    .current-hole {
        width: 40px;
        min-width: 40px;
    }

    .current-team-number {
        width: 56px;
        min-width: 56px;
    }
}

/* One Hole # per matchup and wider mobile player names - 2026-07-14 */
.team-label,
.team-value {
    display: inline;
}

@media screen and (max-width: 760px) {
    .current-matches-table th,
    .current-matches-table td {
        padding-right: 4px;
        padding-left: 4px;
    }

    .current-hole {
        width: 32px;
        min-width: 32px;
        padding-right: 2px;
        padding-left: 2px;
        font-size: 0.72rem;
    }

    .current-team-number {
        width: 40px;
        min-width: 40px;
        padding-right: 2px;
        padding-left: 2px;
        font-size: 0.75rem;
    }

    .team-label {
        display: none;
    }

    .team-value {
        display: block;
        font-size: 0.82rem;
        font-weight: 900;
    }

    .current-player-name {
        width: auto;
        min-width: 0;
        padding-right: 6px;
        padding-left: 7px;
        font-size: 0.77rem;
        line-height: 1.22;
        overflow-wrap: normal;
        word-break: normal;
    }

    .current-handicap {
        width: 66px;
        min-width: 66px;
        padding-right: 3px;
        padding-left: 3px;
        font-size: 0.74rem;
    }
}

@media screen and (max-width: 420px) {
    .current-hole {
        width: 28px;
        min-width: 28px;
        font-size: 0.67rem;
    }

    .current-team-number {
        width: 36px;
        min-width: 36px;
    }

    .team-value {
        font-size: 0.77rem;
    }

    .current-player-name {
        padding-right: 5px;
        padding-left: 6px;
        font-size: 0.72rem;
    }

    .current-handicap {
        width: 61px;
        min-width: 61px;
        font-size: 0.69rem;
    }
}

/* Current week highlight and tighter mobile columns - 2026-07-14 */
.matches-summary {
    grid-template-columns: 0.95fr 1.55fr;
}

.current-week-summary {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            var(--green-900),
            var(--green-700)
        ) !important;
}

.current-week-summary::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -30px;
    width: 90px;
    height: 90px;
    border: 16px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.current-week-summary span,
.current-week-summary strong {
    position: relative;
    z-index: 1;
    color: var(--white);
}

.current-week-summary span {
    font-size: 0.78rem;
    letter-spacing: 0.09em;
}

.current-week-summary strong {
    font-size: 1.45rem;
    line-height: 1.05;
}

.play-date-summary {
    background: var(--white);
}

@media screen and (max-width: 760px) {
    .matches-summary {
        grid-template-columns: 0.9fr 1.35fr;
    }

    .current-week-summary,
    .play-date-summary {
        min-height: 58px !important;
        padding: 9px 10px !important;
    }

    .current-week-summary span {
        font-size: 0.66rem;
    }

    .current-week-summary strong {
        font-size: 1.12rem;
    }

    .play-date-summary span {
        font-size: 0.55rem;
    }

    .play-date-summary strong {
        font-size: 0.72rem;
        white-space: normal;
        line-height: 1.18;
    }

    .current-hole {
        width: 24px;
        min-width: 24px;
        padding-right: 1px;
        padding-left: 1px;
        font-size: 0.65rem;
    }

    .current-team-number {
        width: 36px;
        min-width: 36px;
    }

    .team-value {
        font-size: 0.78rem;
    }

    .current-player-name {
        padding-right: 6px;
        padding-left: 7px;
        font-size: 0.84rem;
        line-height: 1.22;
    }

    .current-handicap {
        width: 60px;
        min-width: 60px;
        font-size: 0.72rem;
    }
}

@media screen and (max-width: 420px) {
    .matches-summary {
        grid-template-columns: 0.85fr 1.4fr;
    }

    .current-week-summary,
    .play-date-summary {
        min-height: 55px !important;
        padding: 8px 7px !important;
    }

    .current-week-summary strong {
        font-size: 1.04rem;
    }

    .current-hole {
        width: 21px;
        min-width: 21px;
        font-size: 0.6rem;
    }

    .current-team-number {
        width: 32px;
        min-width: 32px;
    }

    .team-value {
        font-size: 0.73rem;
    }

    .current-player-name {
        padding-right: 5px;
        padding-left: 6px;
        font-size: 0.79rem;
    }

    .current-handicap {
        width: 57px;
        min-width: 57px;
        font-size: 0.68rem;
    }
}

/* Extra-narrow mobile Hole and Team columns - 2026-07-14 */
.mobile-column-label {
    display: none;
}

.hole-column {
    width: 105px;
}

.team-column {
    width: 130px;
}

.handicap-column {
    width: 160px;
}

@media screen and (max-width: 760px) {
    .desktop-column-label {
        display: none;
    }

    .mobile-column-label {
        display: inline;
    }

    .hole-column {
        width: 20px;
    }

    .team-column {
        width: 28px;
    }

    .handicap-column {
        width: 55px;
    }

    .current-matches-table .hole-heading,
    .current-matches-table .team-heading,
    .current-hole,
    .current-team-number {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .current-matches-table .hole-heading,
    .current-hole {
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
    }

    .current-matches-table .team-heading,
    .current-team-number {
        width: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }

    .current-matches-table .hole-heading,
    .current-matches-table .team-heading {
        font-size: 0.52rem;
    }

    .current-hole {
        font-size: 0.63rem;
    }

    .current-team-number,
    .team-value {
        font-size: 0.7rem;
    }

    .current-player-name {
        padding-right: 6px;
        padding-left: 8px;
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .current-handicap {
        width: 55px;
        min-width: 55px;
        max-width: 55px;
        padding-right: 2px;
        padding-left: 2px;
        font-size: 0.7rem;
    }
}

@media screen and (max-width: 420px) {
    .hole-column {
        width: 18px;
    }

    .team-column {
        width: 25px;
    }

    .handicap-column {
        width: 52px;
    }

    .current-matches-table .hole-heading,
    .current-hole {
        width: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
    }

    .current-matches-table .team-heading,
    .current-team-number {
        width: 25px !important;
        min-width: 25px !important;
        max-width: 25px !important;
    }

    .current-hole {
        font-size: 0.59rem;
    }

    .current-team-number,
    .team-value {
        font-size: 0.66rem;
    }

    .current-player-name {
        padding-right: 5px;
        padding-left: 7px;
        font-size: 0.86rem;
    }

    .current-handicap {
        width: 52px;
        min-width: 52px;
        max-width: 52px;
        font-size: 0.67rem;
    }
}

/* Readable mobile Hole and Team labels with slight padding. */
@media screen and (max-width: 760px) {
    .hole-column {
        width: 34px;
    }

    .team-column {
        width: 42px;
    }

    .current-matches-table .hole-heading,
    .current-hole {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        padding-right: 3px !important;
        padding-left: 3px !important;
    }

    .current-matches-table .team-heading,
    .current-team-number {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding-right: 3px !important;
        padding-left: 3px !important;
    }

    .current-matches-table .hole-heading,
    .current-matches-table .team-heading {
        font-size: 0.5rem;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .current-hole {
        font-size: 0.63rem;
    }

    .current-team-number,
    .team-value {
        font-size: 0.7rem;
    }
}

@media screen and (max-width: 420px) {
    .hole-column {
        width: 32px;
    }

    .team-column {
        width: 39px;
    }

    .current-matches-table .hole-heading,
    .current-hole {
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        padding-right: 2px !important;
        padding-left: 2px !important;
    }

    .current-matches-table .team-heading,
    .current-team-number {
        width: 39px !important;
        min-width: 39px !important;
        max-width: 39px !important;
        padding-right: 2px !important;
        padding-left: 2px !important;
    }

    .current-matches-table .hole-heading,
    .current-matches-table .team-heading {
        font-size: 0.47rem;
    }
}


/* Public substitute assignments, including assignments without scores. */
.public-regular-player {
    display: block;
    color: #776767;
    font-size: 0.78em;
    text-decoration-line: line-through;
    text-decoration-color: #9c3d3d;
    text-decoration-thickness: 2px;
}

.public-substitute-player {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--green-800);
    font-weight: 900;
}

.public-substitute-player small {
    padding: 2px 5px;
    border-radius: 999px;
    background: var(--green-100);
    color: var(--green-800);
    font-size: 0.55em;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media screen and (max-width: 760px) {
    .public-regular-player {
        font-size: 0.72em;
    }

    .public-substitute-player {
        gap: 3px;
    }

    .public-substitute-player small {
        padding: 1px 3px;
    }
}

/* Show the full Team label and number on mobile. */
@media screen and (max-width: 760px) {
    .team-column {
        width: 52px;
    }

    .current-matches-table .team-heading,
    .current-team-number {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        padding-right: 3px !important;
        padding-left: 3px !important;
        white-space: nowrap;
    }

    .team-label,
    .team-value {
        display: inline;
        font-size: 0.65rem;
        line-height: 1;
    }

    .team-label {
        margin-right: 2px;
    }
}

@media screen and (max-width: 420px) {
    .team-column {
        width: 49px;
    }

    .current-matches-table .team-heading,
    .current-team-number {
        width: 49px !important;
        min-width: 49px !important;
        max-width: 49px !important;
        padding-right: 2px !important;
        padding-left: 2px !important;
    }

    .team-label,
    .team-value {
        font-size: 0.6rem;
    }

    .team-label {
        margin-right: 1px;
    }
}

/* Starting Hole header label. */
.current-matches-table .hole-heading {
    line-height: 1.05;
}

@media screen and (max-width: 760px) {
    .current-matches-table .hole-heading {
        white-space: normal;
    }

    .current-matches-table .hole-heading .mobile-column-label {
        display: inline-block;
        line-height: 1.05;
    }
}

/*
 * Match the desktop width of the public Standings page.
 * Mobile widths remain controlled by the existing max-width rules.
 */
@media screen and (min-width: 761px) {
    .matches-shell {
        max-width: 1380px;
    }
}

/* Senior and Closest-to-Pin tags on public Matches. */
.public-player-line,
.public-substitute-player,
.public-regular-player {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.public-senior-tag,
.public-closest-pin-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 999px;
    font-size: 0.46rem;
    font-weight: 900;
    letter-spacing: 0.035em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.public-senior-tag {
    background: #ece8f6;
    color: #604c88;
}

.public-closest-pin-tag {
    background: #f1e4f3;
    color: #713874;
}

.current-player-name.is-closest-pin {
    background: #f7edf8;
    box-shadow: inset 4px 0 0 #a360a6;
}

@media screen and (max-width: 760px) {
    .public-senior-tag,
    .public-closest-pin-tag {
        padding: 1px 3px;
        font-size: 0.39rem;
    }
}

/* Links from Current Matches to each team's season statistics. */
.matches-team-stats-link,
.matches-player-stats-link {
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.matches-team-stats-link {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.matches-player-stats-link {
    border-radius: 4px;
}

.matches-team-stats-link:hover,
.matches-team-stats-link:focus-visible,
.matches-player-stats-link:hover,
.matches-player-stats-link:focus-visible {
    color: #146445;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.matches-team-stats-link:focus-visible,
.matches-player-stats-link:focus-visible {
    outline: 3px solid rgba(31, 109, 77, 0.18);
    outline-offset: 2px;
}

@media screen and (max-width: 760px) {
    .matches-team-stats-link {
        min-height: 48px;
    }

    .matches-player-stats-link {
        min-height: 30px;
        display: inline-flex;
        align-items: center;
    }
}
