/* Sim Cup look (also the Commoners Cup): blue against red, a gold trophy between them, and a
   match board where the winning side takes its team colour. */

:root[data-theme="dark"] {
    --sc-1: #2f6fe0;
    --sc-2: #e0354f;
    --sc-1-text: #7aa5f5;
    --sc-2-text: #ff7486;
    --sc-1-soft: rgba(47, 111, 224, 0.16);
    --sc-2-soft: rgba(224, 53, 79, 0.15);
    --sc-gold: #d4af37;
}

:root,
:root[data-theme="light"] {
    --sc-1: #1f5fd1;
    --sc-2: #d0283f;
    --sc-1-text: #164aa8;
    --sc-2-text: #b31d33;
    --sc-1-soft: rgba(31, 95, 209, 0.13);
    --sc-2-soft: rgba(208, 40, 63, 0.12);
    --sc-gold: #b8901c;
}


/* ---------- Scoreboard ---------- */

/* One card: team 1 on the left, team 2 on the right, a thin colour rule across the top */
.sc-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 0 24px;
    margin-bottom: 24px;
    padding: 22px 28px 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, var(--sc-1) 50%, var(--sc-2) 50%) top / 100% 3px no-repeat,
        var(--surface);
    box-shadow: var(--shadow);
}

.sc-team {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sc-team[data-team="2"] {
    align-items: flex-end;
    text-align: right;
}

.sc-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sc-team.is-winner .sc-label::after {
    content: ' · Champions';
    color: var(--sc-gold);
}

.sc-name {
    max-width: 100%;
    overflow: hidden;
    font: 800 20px/1.25 Nunito, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-points {
    margin-top: 2px;
    font: 800 52px/1 Nunito, sans-serif;
    font-variant-numeric: tabular-nums;
}

.sc-team[data-team="1"] .sc-name,
.sc-team[data-team="1"] .sc-points { color: var(--sc-1-text); }
.sc-team[data-team="2"] .sc-name,
.sc-team[data-team="2"] .sc-points { color: var(--sc-2-text); }

.sc-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding-bottom: 4px;
    text-align: center;
}

/* The trophy in the middle: gold for the Sim Cup, a red solo cup for the Commoners Cup */
.sc-solo {
    display: none;
    width: auto;
    height: 32px;
    margin-bottom: 4px;
}

.sc-board[data-trophy="solo"] .sc-solo {
    display: block;
}

.sc-board[data-trophy="solo"] .sc-trophy {
    display: none;
}

.sc-trophy {
    margin-bottom: 4px;
    color: var(--sc-gold);
    font-size: 24px;
}

.sc-status {
    font-weight: 700;
    white-space: nowrap;
}

.sc-status[data-team="1"] { color: var(--sc-1-text); }
.sc-status[data-team="2"] { color: var(--sc-2-text); }

.sc-sub {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

/* Tug of war: team 1 fills from the left, team 2 from the right, a gold mark at halfway */
.sc-bar {
    position: relative;
    grid-column: 1 / -1;
    height: 18px;
    margin-top: 20px;
    border-radius: 999px;
    background: var(--track);
}

.sc-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    transition: width 0.6s ease;
}

.sc-fill[data-team="1"] { left: 0; border-radius: 999px 0 0 999px; background: var(--sc-1); }
.sc-fill[data-team="2"] { right: 0; border-radius: 0 999px 999px 0; background: var(--sc-2); }

.sc-mid {
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--sc-gold);
}


/* ---------- Week picker ---------- */

.sc-weeks {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.sc-wk {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, background-color 0.15s;
}

.sc-wk:hover {
    border-color: var(--muted);
}

.sc-wk.active {
    border-color: var(--sc-gold);
}

.sc-wk.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--sc-gold);
}

.sc-wk-num {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sc-wk-num .chip {
    margin-left: 4px;
    padding: 0 6px;
    font-size: 10px;
}

.sc-wk-format {
    font-weight: 600;
}

.sc-wk-points {
    color: var(--muted);
    font-size: 14px;
}

.sc-wk-points b[data-team="1"],
.sc-week-score [data-team="1"] { color: var(--sc-1-text); }

.sc-wk-points b[data-team="2"],
.sc-week-score [data-team="2"] { color: var(--sc-2-text); }


/* ---------- Week header ---------- */

.sc-week-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 18px;
}

.sc-week-head h2 {
    margin: 0;
    font-size: 22px;
}

.sc-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.sc-facts i {
    margin-right: 6px;
}

.sc-week-score {
    font: 800 28px/1.1 Nunito, sans-serif;
    text-align: right;
}

.sc-dash {
    margin: 0 6px;
    color: var(--muted);
    font-weight: 400;
}

.sc-week-score small {
    display: block;
    color: var(--muted);
    font: 13px Roboto, sans-serif;
}


/* ---------- Match board ---------- */

.sc-matches {
    display: grid;
    gap: 10px;
}

.sc-match {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-solid);
    overflow: hidden;
}

/* Live and finished matches open a scorecard drawer (app/scorecard.js) */
.sc-match.has-card {
    --mc-1: var(--sc-1);
    --mc-2: var(--sc-2);
    --mc-1-text: var(--sc-1-text);
    --mc-2-text: var(--sc-2-text);
    cursor: pointer;
}

.sc-match.has-card:hover {
    border-color: var(--muted);
}

.sc-match.has-card:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.sc-drawer-hint {
    display: block;
    margin-top: -6px;
    padding-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    text-align: center;
}

.sc-drawer-hint i {
    transition: transform 0.15s;
}

.sc-match.open .sc-drawer-hint i {
    transform: rotate(180deg);
}

/* The open drawer has the holes in full, so the strip above it goes */
.sc-match.open .sc-holes {
    display: none;
}

.sc-match .mc,
.sc-match .mp {
    border-top: 1px solid var(--border);
    cursor: default;
}

.sc-row {
    display: grid;
    grid-template-columns: 1fr 140px 1fr;
    min-height: 76px;
}

.sc-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 10px 16px;
    border-left: 3px solid var(--sc-1);
    transition: background-color 0.3s;
}

.sc-side[data-team="2"] {
    align-items: flex-end;
    border-left: 0;
    border-right: 3px solid var(--sc-2);
    text-align: right;
}

.sc-player {
    max-width: 100%;
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pre-match odds under the names */
.sc-line {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.sc-side.is-winner .sc-line { color: rgba(255, 255, 255, 0.75); }

.sc-player.tbd {
    color: var(--muted);
    font-style: italic;
}

/* Same as the OBS plugin's match cards: a live leader gets a light team tint, the winner the full
   team colour with white names, and the loser fades */
.sc-side.is-leading[data-team="1"] { background: var(--sc-1-soft); }
.sc-side.is-leading[data-team="2"] { background: var(--sc-2-soft); }
.sc-side.is-leading[data-team="1"] .sc-player { color: var(--sc-1-text); }
.sc-side.is-leading[data-team="2"] .sc-player { color: var(--sc-2-text); }
.sc-side.is-leading .sc-player { font-weight: 600; }
.sc-side.is-winner[data-team="1"] { background: var(--sc-1); }
.sc-side.is-winner[data-team="2"] { background: var(--sc-2); }
.sc-side.is-winner .sc-player { color: #fff; font-weight: 700; }
.sc-side.is-loser .sc-player { color: var(--muted); }
.sc-side.is-halved { background: var(--raised); }

.sc-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    text-align: center;
}

.sc-match-num,
.sc-detail {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sc-score {
    min-width: 72px;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--raised);
    font: 800 17px/1.3 Nunito, sans-serif;
}

.sc-score[data-team="1"] { background: var(--sc-1); color: #fff; }
.sc-score[data-team="2"] { background: var(--sc-2); color: #fff; }

.sc-match.upcoming .sc-score,
.sc-match.tbd .sc-score {
    background: none;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.sc-match.live .sc-detail {
    color: var(--live);
}

/* A tee time or countdown in gold; within the hour, a gold pill */
.sc-detail.tee {
    color: var(--sc-gold);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;   /* the ticking clock doesn't jiggle */
}

.sc-detail.tee.soon {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sc-gold);
    color: #1b1608;
}

.sc-match.live .sc-detail::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 1px;
}

/* Hole strip: a small dot per hole, tinted in the colour of the team that won it */
.sc-holes {
    display: grid;
    gap: 3px;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--border);
}

.sc-hole {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 22px;
    aspect-ratio: 1;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    cursor: default;
}

.sc-hole.team1 { border-color: transparent; background: var(--sc-1); color: #fff; font-weight: 700; }
.sc-hole.team2 { border-color: transparent; background: var(--sc-2); color: #fff; font-weight: 700; }
.sc-hole.halved { border-color: transparent; background: var(--raised); color: var(--text); }
.sc-hole.unneeded { border-style: dashed; opacity: 0.4; }


/* ---------- Red Zone link ---------- */

.sc-redzone {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 20px;
    border-left: 4px solid #e5322d;
    background: linear-gradient(90deg, rgba(229, 50, 45, 0.12), rgba(229, 50, 45, 0) 70%), var(--surface, transparent);
    color: var(--text);
    text-decoration: none;
}

.sc-redzone:hover {
    border-color: #e5322d;
}

.sc-redzone[hidden] {
    display: none;
}

.sc-redzone-icon {
    color: #e5322d;
    font-size: 26px;
}

.sc-redzone-text {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
    color: var(--muted);
    font-size: 14px;
}

.sc-redzone-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.sc-redzone-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e5322d;
    animation: sc-redzone-pulse 1.6s ease-in-out infinite;
}

@keyframes sc-redzone-pulse {
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-redzone-dot { animation: none; }
}

.sc-redzone-go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #e5322d;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 599px) {
    .sc-redzone {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .sc-redzone-icon {
        display: none;
    }

    .sc-redzone-go {
        width: 100%;
        justify-content: center;
    }
}


/* ---------- Points race (under the tug-of-war bar) ---------- */

.sc-race {
    grid-column: 1 / -1;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.sc-race[hidden] {
    display: none;
}

.sc-race-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 6px;
}

.sc-race-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sc-race-legend {
    display: flex;
    gap: 14px;
    font-size: 13px;
}

/* Line keys: a short stroke of the team colour, the name in ink */
.sc-race-key,
.sc-race-tip-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sc-race-key i,
.sc-race-tip-row i {
    width: 14px;
    height: 2px;
    border-radius: 1px;
}

.sc-race [data-team="1"] > i { background: var(--sc-1); }
.sc-race [data-team="2"] > i { background: var(--sc-2); }

.sc-race-plot {
    position: relative;
    border-radius: 8px;
    outline-offset: 2px;
}

.sc-race-plot svg {
    display: block;
    overflow: visible;
}

.sc-race-plot .grid { stroke: var(--border); stroke-width: 1; }
.sc-race-plot .week { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.sc-race-plot .axis { fill: var(--muted); font-size: 11px; }
.sc-race-plot .win { stroke: var(--sc-gold); stroke-width: 1.5; stroke-dasharray: 5 4; }
.sc-race-plot .win-label { fill: var(--muted); font-size: 11px; }
.sc-race-plot .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sc-race-plot .line[data-team="1"] { stroke: var(--sc-1); }
.sc-race-plot .line[data-team="2"] { stroke: var(--sc-2); }
.sc-race-plot .dot { stroke: var(--surface-solid); stroke-width: 2; }
.sc-race-plot .dot[data-team="1"] { fill: var(--sc-1); }
.sc-race-plot .dot[data-team="2"] { fill: var(--sc-2); }
.sc-race-plot .end { fill: var(--muted); font-size: 12px; }
.sc-race-plot .end-pts { fill: var(--text); font-weight: 700; }
.sc-race-plot .cross { stroke: var(--muted); stroke-width: 1; }

.sc-race-tip {
    position: absolute;
    top: 0;
    z-index: 2;
    display: grid;
    gap: 3px;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    font-size: 12px;
    pointer-events: none;
}

.sc-race-tip[hidden] {
    display: none;
}

.sc-race-tip-title { font-size: 12px; }
.sc-race-tip-result { color: var(--muted); }
.sc-race-tip-row { color: var(--muted); }
.sc-race-tip-row b { min-width: 2.2em; color: var(--text); font-size: 13px; }

.sc-race-table {
    margin-top: 6px;
    font-size: 13px;
}

.sc-race-table summary {
    color: var(--muted);
    cursor: pointer;
}

.sc-race-table table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
}

.sc-race-table th,
.sc-race-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.sc-race-table th:nth-child(n + 4),
.sc-race-table td:nth-child(n + 4) {
    text-align: right;
}


/* ---------- Phones ---------- */

@media (max-width: 767px) {
    .sc-board {
        grid-template-columns: 1fr 1fr;
        gap: 0 12px;
        padding: 18px 16px 20px;
    }

    .sc-center {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 10px;
        padding: 14px 0 0;
    }

    .sc-trophy {
        margin: 0;
        font-size: 18px;
    }

    .sc-solo {
        height: 24px;
        margin: 0;
    }

    .sc-name {
        font-size: 16px;
    }

    .sc-points {
        font-size: 40px;
    }

    .sc-bar {
        margin-top: 14px;
    }

    .sc-row {
        grid-template-columns: 1fr 100px 1fr;
    }

    .sc-side {
        padding: 8px 10px;
    }

    .sc-player {
        font-size: 14px;
    }

    .sc-score {
        min-width: 0;
        padding: 2px 8px;
        font-size: 16px;
    }

    .sc-week-score {
        text-align: left;
    }

    .sc-holes {
        gap: 2px;
        padding: 8px;
    }

    .sc-hole {
        font-size: 8px;
    }
}


/* ---------- Player records page (views/cupplayers) ---------- */

/* The quiet link to it under the cup page's matches */
.sc-more {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.sc-more:hover {
    color: var(--text);
}

.sc-more[hidden] {
    display: none;
}

.sc-sub-head .eyebrow a {
    color: inherit;
}


/* ---------- Room watch ---------- */

/* Go N-0 or 0-N and the Discord names a live play room after you. Gold for the unbeaten, a
   muted brown for the winless; each name keeps its team colour down the left. */
.sc-watch {
    margin-bottom: 20px;
}

.sc-watch[hidden] {
    display: none;
}

.sc-watch-head {
    flex-wrap: wrap;
}

.sc-watch-head h2 i {
    margin-right: 10px;
    color: var(--sc-gold);
}

.sc-watch-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.sc-watch-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.sc-watch-col h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sc-watch-col h3 i {
    margin-right: 8px;
}

.sc-watch-col[data-kind="unbeaten"] h3 { color: var(--sc-gold); }
.sc-watch-col[data-kind="winless"] h3 { color: #9a6b43; }

.sc-watch-list {
    display: grid;
    gap: 8px;
}

.sc-watch-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 2px 14px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--sc-1);
    border-radius: 10px;
    background: var(--surface-solid);
}

.sc-watch-item[data-team="2"] { border-left-color: var(--sc-2); }

.sc-watch-item.is-done {
    border-color: var(--sc-gold);
    border-left-width: 3px;
    box-shadow: inset 0 0 0 1px var(--sc-gold);
}

.sc-watch-rec {
    grid-row: span 2;
    min-width: 2.6em;
    font: 800 26px/1 Nunito, sans-serif;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.sc-watch-col[data-kind="unbeaten"] .sc-watch-rec { color: var(--sc-gold); }
.sc-watch-col[data-kind="winless"] .sc-watch-rec { color: #9a6b43; }

.sc-watch-who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sc-watch-who b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-watch-who small,
.sc-watch-next {
    color: var(--muted);
    font-size: 12px;
}

.sc-watch-done {
    color: var(--sc-gold);
    font-weight: 700;
}

.sc-watch-done i {
    margin-right: 4px;
}

.sc-watch-next {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
}

.sc-watch-now {
    color: var(--sc-gold);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sc-watch-now.live {
    color: var(--live);
}

.sc-watch-now.live::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 1px;
}

.sc-watch-none {
    margin: 0;
    padding: 12px 0;
    color: var(--muted);
    font-size: 14px;
}


/* ---------- Players ---------- */

.sc-players-head {
    flex-wrap: wrap;
    align-items: center;
}

.sc-players-head .segmented button {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Same columns for the header and every row */
.sc-pl-cols,
.sc-pl-row {
    display: grid;
    grid-template-columns: 1fr 72px 48px 56px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.sc-pl-cols {
    padding-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sc-pl-cols span:not(:first-child),
.sc-pl-row > span:not(:first-child) {
    text-align: right;
}

.sc-pl {
    border-top: 1px solid var(--border);
    border-left: 3px solid var(--sc-1);
}

.sc-pl[data-team="2"] { border-left-color: var(--sc-2); }

.sc-pl-row {
    min-height: 44px;
    cursor: pointer;
    list-style: none;
    font-variant-numeric: tabular-nums;
}

.sc-pl-row::-webkit-details-marker {
    display: none;
}

.sc-pl-row:hover {
    background: var(--raised);
}

.sc-pl-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-pl-name::after {
    content: '\f078';   /* chevron-down */
    margin-left: 8px;
    color: var(--muted);
    font: 900 10px 'Font Awesome 6 Free';
    vertical-align: 1px;
}

.sc-pl[open] .sc-pl-name::after {
    content: '\f077';   /* chevron-up */
}

.sc-pl-rec,
.sc-pl-pts {
    font-weight: 700;
}

.sc-pl-holes { color: var(--muted); }
.sc-pl-holes[data-sign="1"] { color: var(--live); }
.sc-pl-holes[data-sign="-1"] { color: var(--sc-2-text); }

.sc-pl-body {
    padding: 4px 12px 14px;
}

.sc-pl-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.sc-pl-facts > span:first-child {
    margin-right: 6px;
}

.sc-pl-log {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sc-pl-log li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--raised);
    font-size: 14px;
}

/* W, L, H in a square: green, red, grey */
.sc-pl-res {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 4px;
    border-radius: 6px;
    background: var(--surface-solid);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.sc-pl-res[data-result="W"] { background: var(--live); color: var(--live-ink); }
.sc-pl-res[data-result="L"] { background: var(--sc-2); color: #fff; }
.sc-pl-res[data-result="H"] { background: var(--track); color: var(--text); }
.sc-pl-res.live { background: var(--live-soft); color: var(--live); font-size: 10px; }

.sc-pl-match {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sc-pl-week {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sc-pl-score {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .sc-watch-cols {
        grid-template-columns: 1fr;
    }

    .sc-pl-cols,
    .sc-pl-row {
        grid-template-columns: 1fr 56px 36px 44px;
        gap: 6px;
        padding: 0 8px;
    }

    .sc-pl-body {
        padding: 4px 8px 12px;
    }

    .sc-pl-log li {
        grid-template-columns: auto 1fr;
    }

    .sc-pl-score {
        grid-column: 2;
        text-align: left;
    }
}
