/* =========================================
   TOP 10 TRIVIA
   Page-specific styles. Shared tokens, buttons, chips and inputs
   live in assets/global/global.css.
   ========================================= */


/* =========================================
   1. SETUP
   ========================================= */

/* Phones: one column: intro, the board (sport, season, stat), then
   players, rooms, more options and Start. The side panel's own box only
   appears on a laptop (section 5); here its contents join the column. */
.setup {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.setup-panel {
    display: contents;
}

/* Era and timer, folded: "More options   All seasons · No timer ›" */
.setup-more > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
}

.setup-more > summary::-webkit-details-marker {
    display: none;
}

.setup-more > summary .pick-label {
    padding-top: 0;
}

.setup-more-summary {
    color: var(--muted);
    font-size: 15px;
    text-align: right;
}

.setup-more-summary::after {
    content: "›";
    display: inline-block;
    margin-left: 10px;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.15s;
}

.setup-more[open] .setup-more-summary::after {
    transform: rotate(90deg);
}

.setup-more[open] > summary {
    margin-bottom: 20px;
}

/* Rooms */
.room {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.room-join,
.room-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.room-label {
    color: var(--muted);
    font-size: 15px;
}

.join-form {
    display: flex;
    align-items: center;
    gap: 8px 12px;
}

.join-input {
    width: 104px;
    min-height: 44px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.join-form .btn {
    min-height: 44px;
}

.room-code {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    color: var(--accent);
}

.room-status:empty {
    display: none;
}

/* On a TV (pages/tv.html): the button, then the code to type there */
.tv-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding-top: 6px;
}

.tv-status:empty {
    display: none;
}

.tv-status strong {
    color: var(--accent);
    letter-spacing: 0.04em;
}

/* With a TV on, the simple playing screen: the board and the scores are
   on the TV, so the phone keeps whose turn it is, the box and the actions */
.play.tv-simple .scoreboard,
.play.tv-simple .board,
.play.tv-simple .stat-qualifier {
    display: none;
}

.tv-turn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 0 8px;
    text-align: center;
}

.tv-turn-eyebrow {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.tv-turn-name {
    font-size: clamp(40px, 13vw, 64px);
    line-height: 0.95;
    color: var(--accent);
}

.tv-turn-score {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

/* Game options: label on the left, choices on the right */
.picker {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pick-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: start;
    gap: 16px;
}

.pick-label {
    font-family: var(--font-display);
    padding-top: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--muted);
}

.pick-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-hint:empty,
.best-hint:empty {
    display: none;
}

.best-hint {
    color: var(--accent);
}

/* A friend's shared result: the score to beat, then how you did */
.challenge-hint {
    font-weight: 700;
    color: var(--accent);
}

.challenge-hint:empty,
.challenge-result:empty {
    display: none;
}

.challenge-result {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 0.02em;
}

.challenge-result.won {
    color: var(--good);
}

.challenge-result.lost {
    color: var(--muted);
}

/* Random picks: amber outline so they read as actions, not choices */
.chip-random {
    color: var(--accent);
    border-color: var(--accent-edge);
}

.chip-random:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

@media (max-width: 480px) {
    .pick-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pick-label {
        padding-top: 0;
    }
}

/* Player names as editable pills */
.player-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.player-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 6px 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--bg-raise);
    transition: border-color 0.15s;
}

.player-pill:focus-within {
    border-color: var(--accent);
}

.player-pill.me {
    border-color: var(--accent-edge);
}

.player-pill input {
    width: 9ch;
    min-width: 5ch;
    max-width: 16ch;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 16px;   /* under 16px, iPhones zoom the page in when it's tapped */
    field-sizing: content;
}

.player-pill input:focus {
    outline: none;
}

.player-pill input:read-only {
    cursor: default;
}

.pill-tag {
    margin: 0 8px 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.pill-remove {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.pill-remove:hover {
    color: var(--text);
    background: var(--line);
}

.pill-add {
    min-height: 40px;
    padding: 0 16px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-pill);
    background: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.pill-add:hover {
    color: var(--text);
    border-color: var(--muted);
}


/* =========================================
   2. PLAYING
   ========================================= */

/* Phones: one column, with End Game under the board. On a laptop the
   controls sit beside the board (section 5). */
.play,
.play-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.play-side {
    display: contents;
}

.play > .board {
    order: 1;
}

/* Which board, and the turn clock: a panel (--panel), stat lit in the accent. On
   phones it sticks under the tabs while the board scrolls, like a frozen
   row (section 5); on a laptop it heads the controls column. */
.play-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 12px;
    border-radius: var(--radius);
    background: var(--panel);
    border-bottom: var(--panel-edge);
    color: var(--panel-text);
}

.play-head .eyebrow,
.play-head .hint {
    color: var(--panel-muted);
}

.play-head .play-stat {
    color: var(--accent);
    text-shadow: var(--glow);
}

.play-head .turn-bar {
    background: var(--line-strong);
}

.play-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.play-stat {
    font-size: clamp(34px, 6vw, 56px);
}

.play-head .turn-bar {
    margin-top: 6px;
}

/* Scoreboard: one entry per player, current turn lit up */
.scoreboard {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    padding: 10px 0 8px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.score {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 6px;
    color: var(--muted);
    transition: color 0.2s;
}

.score::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.score.is-turn {
    color: var(--text);
}

.score.is-turn::after {
    transform: scaleX(1);
}

.score-name {
    font-weight: 600;
}

.score-num {
    font-family: var(--font-score);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.score.is-turn .score-num {
    color: var(--accent);
    text-shadow: var(--glow);
}

/* Solo strikes, pushed to the right of the score */
.score.strikes {
    margin-left: auto;
}

.strike-marks {
    display: flex;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.strike {
    color: var(--line-strong);
    transition: color 0.2s;
}

.strike.used {
    color: var(--bad);
}

/* The tiebreaker's "Your pick" */
.turn {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
}

.turn-clock {
    font-family: var(--font-clock);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--clock);
    text-shadow: var(--glow-clock);
    transition: color 0.2s;
}

.turn-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
}

.turn-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    transform-origin: left;
    transition: transform 0.25s linear;
}

/* Last 10 seconds: the clock burns brighter */
.turn-clock.low {
    color: var(--bad);
    text-shadow: 0 0 6px var(--bad), var(--glow-clock);
}

.turn-bar.low .turn-bar-fill {
    background: var(--bad);
}

/* Guess box, with the players matching what's typed listed under it */
.guess-form {
    display: flex;
    flex-direction: column;
}

.guess-input {
    flex: 1;
    min-height: 54px;
    font-size: 19px;
    border-radius: var(--radius-pill);
    padding: 0 24px;
}

/* Top 10: on your turn (with others playing) the box says so in amber */
.guess-input.my-turn::placeholder {
    color: var(--accent);
    opacity: 0.85;
}

.guess-results {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.guess-option {
    display: flex;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 0 24px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 18px;
    text-align: left;
    cursor: pointer;
}

.guess-option:hover,
.guess-option.active {
    background: var(--accent-soft);
}

.guess-option-name {
    font-weight: 600;
}

.guess-option-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    color: var(--muted);
    font-size: 15px;
    white-space: nowrap;
}

.guess-option-meta .team-tag {
    font-size: 14px;
}

.guess-option-pos {
    min-width: 2.2em;
    font-weight: 600;
}

/* Already guessed this game: tinted, labelled, can't be picked */
.guess-option:disabled {
    cursor: default;
}

.guess-option:disabled .guess-option-name {
    color: var(--muted);
}

.guess-option.correct {
    background: var(--good-soft);
}

.guess-option.wrong {
    background: var(--bad-soft);
}

.guess-status {
    font-size: 14px;
    font-weight: 600;
}

.guess-option.correct .guess-status {
    color: var(--good);
}

/* Tiebreaker: players on the board are over */
.guess-option.over {
    background: none;
}

.guess-option.over .guess-status {
    color: var(--faint);
}

.guess-option.wrong .guess-status {
    color: var(--bad);
}

.guess-more,
.guess-none {
    padding: 12px 24px 0;
    color: var(--faint);
    font-size: 14px;
}

.guess-form.shake {
    animation: shake 0.4s var(--ease);
}

@keyframes shake {
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(3px); }
}

/* Result of the last guess: who guessed (small), then the guess (big) */
.feedback {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 52px;
    margin-top: -8px;
    padding-left: 24px;
    color: var(--muted);
}

.feedback-who {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.feedback-main {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

.feedback-note {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
}

/* Top 10: the last guess on one line, to save room */
.play .feedback {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    min-height: 26px;
    margin-top: -4px;
    padding-left: 20px;
}

.play .feedback-main {
    font-size: 17px;
}

.play .feedback-note {
    font-size: 14px;
}

.feedback.correct .feedback-main { color: var(--good); }
.feedback.wrong .feedback-main,
.feedback.timeout .feedback-main { color: var(--bad); }
.feedback.repeat .feedback-main { color: var(--accent); }

.feedback.fresh {
    animation: rise 0.35s var(--ease);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* The Guessed pop-up: every guess so far, newest first (the sheet itself
   is styled with the How to play one) */
.guessed-btn {
    color: var(--muted);
}

.sheet.guessed-sheet {
    width: min(400px, calc(100% - 32px));
    max-height: min(70vh, 560px);
}

.guess-log {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.guess-chip {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    white-space: nowrap;
}

.guess-chip.correct {
    color: var(--good);
    background: var(--good-soft);
}

.guess-chip.wrong {
    color: var(--muted);
    background: var(--bad-soft);
}

.guess-chip.wrong .guess-chip-name {
    text-decoration: line-through;
    text-decoration-color: var(--bad);
}

/* Hint and End game on one row above the board, and what hints say on
   blank slots */
.play-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
}

.hint-btn:disabled,
.end-btn:disabled {
    color: var(--faint);
    text-decoration: none;
    cursor: default;
}

.hint-btn.voted,
.end-btn.voted {
    text-decoration-style: dashed;
}

.end-btn {
    color: var(--muted);
}

.end-btn.voted {
    color: var(--accent);
}

/* "Waiting on Sam", "Games with hints aren't saved" */
.play-note {
    margin-top: -8px;
    font-size: 13px;
}

.play-note:empty {
    display: none;
}

.slot-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
}

.slot-hint-initials {
    font-size: 18px;
    color: var(--text);
    letter-spacing: 0.04em;
}

/* A division hint's teams, small and in team colors, for players who
   know the teams better than the divisions (see divisionTeamsHTML) */
.division-teams {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;   /* a wrapped row of teams still fits a slot's height */
    letter-spacing: 0.06em;
    color: var(--muted);
}

.division-teams > span {
    color: var(--team, var(--muted));
}

.daily-hint-value .division-teams {
    margin-left: 10px;
}

/* The note under the guess box keeps to one line; the hint row has the teams */
.daily-new-hint .division-teams {
    display: none;
}

.slot-hint.fresh {
    animation: hint-in 1.2s var(--ease);
}

@keyframes hint-in {
    0% { color: var(--accent); opacity: 0; transform: translateX(-6px); }
    30% { opacity: 1; transform: none; }
    100% { color: var(--muted); }
}

.guess-option-years {
    font-size: 13px;
    color: var(--faint);
}


/* =========================================
   3. THE BOARD (top 10 list)
   ========================================= */

.board {
    list-style: none;
    counter-reset: none;
}

.slot {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    column-gap: 12px;
    min-height: 56px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line);
}

.slot:first-child {
    border-top: 1px solid var(--line);
}

.slot-rank {
    font-family: var(--font-rank);
    font-size: 24px;
    font-weight: 800;
    color: var(--faint);
    text-align: right;
}

.slot-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.slot-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.slot-team {
    flex-shrink: 0;
    font-size: 12px;
}

/* Team code in the team's color (set as --team by teamTag) */
.team-tag {
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.team-tag.has-color {
    color: var(--team);
    background: color-mix(in srgb, var(--team) 16%, transparent);
}

.slot-name {
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-by {
    font-size: 13px;
    color: var(--muted);
}

.slot-value {
    font-family: var(--font-value);
    font-size: 21px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

/* Unrevealed: a quiet placeholder bar */
.slot-blank {
    display: block;
    width: 55%;
    height: 10px;
    border-radius: 2px;
    background: var(--line);
}

.slot.filled .slot-rank,
.slot.filled .slot-value {
    color: var(--accent);
    text-shadow: var(--glow);
}

.slot.fresh {
    animation: reveal 0.9s var(--ease);
}

@keyframes reveal {
    0% { background: var(--accent-soft); transform: translateX(-6px); opacity: 0.4; }
    30% { transform: none; opacity: 1; }
    100% { background: transparent; }
}

/* "+5 more tied at 16": ties the source didn't list */
.slot-note {
    list-style: none;
    padding: 12px 4px 0 60px;
}

/* Results screen: answers nobody got */
.slot.missed .slot-rank,
.slot.missed .slot-team,
.slot.missed .slot-name,
.slot.missed .slot-value {
    color: var(--faint);
}

.slot.missed .team-tag {
    background: none;
}


/* =========================================
   4. RESULTS
   ========================================= */

/* Phones: one column, with New Game at the very end. On a laptop the
   outcome sits beside the full list (section 5). */
.results,
.results-side,
.results-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.results-side,
.results-main {
    display: contents;
}

.results-main > * {
    order: 1;
}

.results-actions,
#newGameWaiting {
    order: 2;
}

/* New Game and Next board side by side, Next board the main one */
.results-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.results-actions.hidden {
    display: none;
}

.results-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
}

/* A result's headline in lit scoreboard digits: the one glow in the app */
.results-title {
    font-family: var(--font-led);
    font-weight: 900;
    font-size: clamp(44px, 12vw, 80px);
    line-height: 1;
    text-transform: uppercase;
    color: var(--accent);
    text-shadow: var(--glow-strong);
    animation: rise 0.5s var(--ease);
}

.standings {
    list-style: none;
}

.standing {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: baseline;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
}

.standing:first-child {
    border-top: 1px solid var(--line);
}

.standing-place {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--faint);
}

.standing-name {
    font-size: 18px;
    font-weight: 600;
}

.standing-score {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
}

.standing.leader .standing-place,
.standing.leader .standing-score {
    color: var(--accent);
}

/* Results headings sit close to what they label */
.results .section-label {
    margin-top: 16px;
    margin-bottom: -12px;
}

/* Tiebreaker: who's tied and who's locked in, the pick box, the
   pass-the-phone button. On a phone, the full list comes after. */
.tiebreak .results-title {
    font-size: clamp(48px, 12vw, 80px);
}

#tiebreakPassBtn,
.tiebreak-skip {
    order: 0;
}

.tiebreak-skip {
    align-self: center;
}

.tiebreak-players {
    list-style: none;
}

.tiebreak-player {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
}

.tiebreak-player:first-child {
    border-top: 1px solid var(--line);
}

.tiebreak-player-name {
    font-size: 18px;
    font-weight: 600;
}

.tiebreak-player-state {
    color: var(--faint);
    font-size: 14px;
}

.tiebreak-player.locked .tiebreak-player-state {
    color: var(--good);
    font-weight: 600;
}

.tiebreak-pick {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tiebreak-status:empty {
    display: none;
}

/* Results after a tiebreaker: who was next, and each pick */
.tiebreak-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tiebreak-result .section-label {
    margin: 0;
}

.tiebreak-next {
    color: var(--muted);
}

.tiebreak-next strong {
    color: var(--text);
}

.tiebreak-picks {
    list-style: none;
}

.tiebreak-pick-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
}

.tiebreak-pick-row:first-child {
    border-top: 1px solid var(--line);
}

.tiebreak-pick-by {
    grid-column: 1 / -1;
    color: var(--faint);
    font-size: 13px;
}

.tiebreak-pick-name {
    font-weight: 600;
}

.tiebreak-pick-place {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
}

.tiebreak-pick-row.winner .tiebreak-pick-by,
.tiebreak-pick-row.winner .tiebreak-pick-place {
    color: var(--accent);
}

/* Results: the Share button and its "Copied" line */
.share-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-result .hint:empty {
    display: none;
}

/* Results: wrong guesses this game */
.misses {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.misses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.miss {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.miss-name {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: var(--bad);
}

.miss-by {
    color: var(--faint);
    font-size: 13px;
}

/* Results: bragging rights (best miss, deep cut, the brick) */
.awards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.awards .section-label {
    margin: 0;
}

.awards-list {
    list-style: none;
}

.award {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2px 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
}

.award:first-child {
    border-top: 1px solid var(--line);
}

.award-icon {
    grid-row: span 2;
    font-size: 20px;
}

.award-label {
    grid-column: 2 / -1;
    color: var(--muted);
    font-size: 13px;
}

.award-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.award-detail {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.award-brick .award-detail {
    color: var(--bad);
}

/* Under the full list: the three right below it */
.just-missed {
    color: var(--muted);
    font-size: 14px;
}

.just-missed-name {
    color: var(--text);
}


/* =========================================
   5. SMALL AND WIDE SCREENS
   ========================================= */

@media (max-width: 480px) {
    .guess-option {
        padding: 0 16px;
    }

    .slot {
        grid-template-columns: 34px 1fr auto;
    }
}

/* Phones and tablets: the board's name and the clock stay at the top
   while the board scrolls (just under the tabs, which stay too), and the
   playing board goes in two columns, 1-5 and 6-10, so it all fits */
@media (max-width: 959px) {
    .play-head {
        position: sticky;
        top: 47px;
        z-index: 10;
        margin: -12px -16px 0;
        padding: 10px 16px 10px;
        border-radius: 0;
    }

    /* The pinned header has its own line, and the guess box scrolls to just under it */
    .play .scoreboard {
        border-top: 0;
        padding-top: 4px;
    }

    /* On top of the page's 72px for the tabs (global.css): just under the pinned header */
    .play .guess-form {
        scroll-margin-top: 80px;
    }

    .play.typing {
        padding-bottom: 70vh;
    }

    /* The dailies pin the same header. A sticky header only stays while
       its parent box is on screen, and the board sits outside the
       controls' box, so on phones that box steps aside (the whole puzzle,
       board included, becomes the parent; same gaps). What the dailies
       scroll to lands under the pinned header. */
    .daily-game > .daily-side {
        display: contents;
    }

    .daily-marks,
    .shelf-rounds {
        scroll-margin-top: 80px;
    }

    /* Results and the tiebreaker: "The full list" row pins with the
       board's name (season and stat), so it's there all the way down the
       list and the misses. Its section is the parent (the side boxes are
       display: contents on phones), so it stays to the end of the screen. */
    .results-main > .list-head {
        position: sticky;
        top: 47px;
        z-index: 10;
        margin: -10px -16px 0;
        padding: 10px 16px 8px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }

    .list-board {
        display: block;
        margin-top: 3px;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0;
        text-transform: none;
        color: var(--text);
    }

    .board-split {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: repeat(var(--rows, 5), auto);
        grid-auto-flow: column;
        column-gap: 14px;
        border-top: 1px solid var(--line);
    }

    /* Rank on the left over two lines: the name, then the value and who found it */
    .board-split .slot {
        grid-template-columns: 22px auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-content: center;
        column-gap: 8px;
        min-height: 54px;
        padding: 6px 0;
    }

    .board-split .slot:first-child {
        border-top: 0;
    }

    .board-split .slot-rank {
        grid-row: 1 / span 2;
        font-size: 20px;
    }

    .board-split .slot-main {
        display: contents;
    }

    .board-split .slot-main > * {
        grid-column: 2 / -1;
        grid-row: 1 / span 2;
    }

    .board-split .slot-main > .slot-line {
        grid-row: 1;
    }

    .board-split .slot-main > .slot-by {
        grid-column: 3;
        grid-row: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .board-split .slot-name {
        font-size: 15px;
    }

    /* No room for a found player's team beside the name. A Team hint's
       tag stays: on an NBA board (no positions) it's the whole hint. */
    .board-split .slot-line .slot-team {
        display: none;
    }

    .board-split .slot-value {
        grid-column: 2;
        grid-row: 2;
        font-size: 16px;
    }

    .board-split .slot-hint {
        font-size: 13px;
        gap: 0 6px;
    }

    .board-split .slot-blank {
        width: 80%;
    }

    .board-split .slot-note {
        grid-column: 1 / -1;
        grid-row: var(--note-row);
        padding-left: 30px;
    }
}

@media (min-width: 720px) and (max-width: 959px) {
    .play-head,
    .results-main > .list-head {
        top: 65px;
    }
}

/* Laptops: two columns. Setup: the board picker, with who's playing and
   Start in a panel beside it. Playing, results and the dailies: the
   controls on the left, the board on the right. */
@media (min-width: 960px) {
    .setup {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
        grid-template-areas: "intro intro" "board panel";
        gap: 40px 64px;
        align-items: start;
    }

    .setup-intro {
        grid-area: intro;
    }

    .setup > .setup-board {
        grid-area: board;
    }

    .setup-panel {
        grid-area: panel;
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 24px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(21, 25, 35, 0.55);
    }

    .setup-panel .pick-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .setup-panel .pick-label {
        padding-top: 0;
    }

    .play,
    .results {
        display: grid;
        grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
        gap: 0 64px;
        align-items: start;
    }

    .play-side,
    .results-side,
    .results-main {
        display: flex;
    }

    .play > .board {
        padding-top: 8px;
    }

    .results-title {
        font-size: 72px;
    }

    .results-main > .section-label:first-child {
        margin-top: 24px;
    }

    .list-board {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================
   6. SESSION ("TONIGHT") LEADERBOARD
   ========================================= */

.session {
    display: flex;
    flex-direction: column;
}

/* Game nights: one scorecard per night, tap to open */
.nights {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.night {
    border-bottom: 1px solid var(--line);
}

.night-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
    list-style: none;
    cursor: pointer;
}

.night-summary::-webkit-details-marker {
    display: none;
}

.night-date {
    font-family: var(--font-display);
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.night-mode {
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--faint);
}

.night-names {
    font-weight: 700;
}

.night-meta {
    font-size: 14px;
    color: var(--accent);
}

.night-standings,
.night-games {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.night-standings-head,
.night-player {
    display: grid;
    grid-template-columns: 1fr 48px 48px;
    gap: 8px;
    padding: 4px 0;
}

/* You, in a night's standings */
.night-you {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.night-standings-head {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--faint);
}

.night-standings-head span,
.night-player span:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.night-player.leader {
    color: var(--accent);
}

.night-game {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    border-top: 1px dashed var(--line);
}

.night-game-board {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.night-game-scores {
    font-size: 14px;
}

.night-game-scores strong {
    margin-left: 2px;
    font-variant-numeric: tabular-nums;
}

.night-game-win {
    font-weight: 700;
    color: var(--good);
}

/* Under the Tonight board: saved, or sign in to save */
.session-save {
    margin-top: 10px;
    font-size: 14px;
}

.session-save a {
    font-weight: 700;
    color: var(--accent);
}

.session-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.session-head .section-label {
    margin: 0;
}

.session-cols,
.session-row {
    display: grid;
    grid-template-columns: 32px 1fr 56px 56px;
    align-items: baseline;
    gap: 12px;
    padding: 0 4px;
}

.session-cols {
    font-family: var(--font-display);
    padding-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--faint);
}

.session-cols span,
.session-wins,
.session-points {
    text-align: right;
}

.session-list {
    list-style: none;
}

.session-row {
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid var(--line);
}

.session-row:last-child {
    border-bottom: 1px solid var(--line);
}

.session-place {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--faint);
}

.session-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-wins {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
}

.session-points {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
}

.session-row.leader .session-place,
.session-row.leader .session-wins {
    color: var(--accent);
}


/* =========================================
   7. STATS PAGE (top10-stats.html)
   ========================================= */

.stats-page,
.stats-panel,
.stats-overview,
.stats-detail-body,
.stats-empty {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.stats-page {
    gap: 28px;
}

.stats-empty {
    gap: 16px;
}

/* Where the stats are kept */
.stats-who .link-btn {
    padding: 0;
}

/* Two-way switch (Me | Groups) */
.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 420px;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--bg-raise);
}

.segmented-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.segmented-btn[aria-selected="true"] {
    background: var(--accent);
    color: var(--accent-ink);
}

/* Big numbers, four across */
.stats-totals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats-total {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.stats-total-num {
    font-family: var(--font-display);
    font-size: clamp(34px, 10vw, 48px);
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.stats-total-label {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--muted);
}

.stats-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stats-section .section-label {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--line-strong);
    color: var(--text);
}

.stats-daily-status {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.stats-daily-status.done {
    color: var(--good);
}

/* A smaller heading inside a section */
.stats-sub {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-sub-label {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--muted);
}

/* A section heading with a link or a note at its right */
.stats-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.stats-head-link,
.stats-head-note {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.stats-head-note {
    font-weight: 400;
    color: var(--muted);
    white-space: normal;
    text-align: right;
}

/* The overview's rows: tap one for its detail */
.stats-links {
    display: flex;
    flex-direction: column;
}

.stats-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}

.stats-link-row:hover .stats-chev {
    color: var(--accent);
}

.stats-link-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.stats-link-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
}

.stats-link-line {
    font-size: 13px;
    color: var(--muted);
}

.stats-chev {
    font-size: 24px;
    line-height: 1;
    color: var(--faint);
}

/* A lit number with its label under it (a daily's streak, boards won) */
.stats-led {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 40px;
}

.stats-led-num {
    font-family: var(--font-led);
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
    text-shadow: var(--glow);
}

.stats-led-label {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

/* The last seven days, one light each */
.week-lights {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.week-light {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--line-strong);
}

.week-light.on {
    background: var(--accent);
}

.week-light.miss {
    background: var(--bad);
    opacity: 0.6;
}

.week-light.today {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--muted);
}

/* The Round: a panel with a calendar of dots, brighter for bigger days */
.stats-round {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
    background: var(--panel);
    border-bottom: var(--panel-edge);
    border-radius: var(--radius);
    color: var(--panel-text);
}

.stats-round-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.stats-round-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
}

.stats-round-streak {
    color: var(--panel-muted);
    font-size: 14px;
}

.stats-round-num {
    font-family: var(--font-led);
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
    text-shadow: var(--glow-strong);
    margin-right: 4px;
}

.stats-round-meta {
    font-size: 13px;
    color: var(--panel-muted);
    text-align: right;
}

.cal {
    display: grid;
    grid-template-columns: repeat(7, 16px);
    justify-content: space-between;
    gap: 6px;
    padding: 2px 4px;
}

.cal-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1c1c1c;
}

.cal-dot.part {
    box-shadow: inset 0 0 0 1px var(--accent-edge);
}

.cal-dot.l1 { background: rgba(255, 176, 32, 0.28); }
.cal-dot.l2 { background: rgba(255, 176, 32, 0.52); }
.cal-dot.l3 { background: rgba(255, 176, 32, 0.78); }
.cal-dot.l4 { background: var(--accent); box-shadow: 0 0 7px rgba(255, 176, 32, 0.7); }

.cal-dot.today {
    outline: 1px solid var(--panel-text);
    outline-offset: 2px;
}

.cal-key {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--panel-muted);
}

/* Top 10 on the overview: numbers, the scouting report, the detail link */
.stats-top10 {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stats-top10 .stats-totals {
    border-top: none;
    padding-top: 4px;
}

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

.scout-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 8px;
    padding: 8px 10px;
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.scout-label {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--muted);
}

.scout-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.scout-num {
    font-family: var(--font-led);
    font-size: 18px;
    font-weight: 900;
    color: var(--good);
}

.scout-num.cold {
    color: var(--bad);
}

/* A detail view: back link, title, then its sections */
.stats-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stats-back {
    align-self: flex-start;
    padding: 6px 0;
    font-weight: 600;
    font-size: 15px;
    color: var(--accent);
    text-decoration: none;
}

.stats-detail-title {
    font-size: 36px;
    line-height: 1.05;
    outline: none;
}

.stats-detail-body {
    gap: 32px;
    margin-top: 10px;
}

.stats-detail-body > .stats-daily-status {
    align-self: flex-start;
    margin-bottom: -16px;
}

.stats-sub .section-label {
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--text);
}

.stats-chips .chip {
    min-height: 36px;
    padding: 0 14px;
    font-size: 16px;
}

.stats-note {
    font-size: 15px;
    color: var(--muted);
}

.stats-note strong {
    color: var(--text);
}

.stats-past {
    align-self: flex-start;
}

/* Horizontal bars: label, bar, number */
.stat-bars {
    list-style: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
}

.stat-bar-row {
    display: contents;
}

.stat-bar-label {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    max-width: 11em;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

.stat-bar-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
}

.stat-bar-track {
    display: block;
    height: 14px;
    background: var(--bg-raise);
    border-radius: 2px;
}

.stat-bar {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

.stat-bar.dim {
    background: var(--line-strong);
}

.stat-bar-value {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

/* Columns over time (form, a daily's last 30 days) */
.stat-cols {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 80px;
    border-bottom: 1px solid var(--line-strong);
}

.stat-col {
    flex: 1;
    background: var(--accent);
    border-radius: 1px 1px 0 0;
    opacity: 0.85;
}

.stat-col.empty {
    background: transparent;
}

.stat-col.miss {
    background: var(--bad);
}

/* Form: older games grey, the last ten lit */
.stat-cols:has(.recent) .stat-col:not(.recent):not(.empty) {
    background: var(--muted);
    opacity: 0.45;
}

.stat-cols-avg {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--muted);
    pointer-events: none;
}

.stat-cols-key {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--faint);
}

/* Head to head */
.rivals {
    list-style: none;
}

.rival {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.rival-main {
    display: flex;
    flex-direction: column;
}

.rival-name {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.rival-meta {
    font-size: 12px;
    color: var(--muted);
}

.rival-tag {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius);
    background: var(--bg-raise);
    color: var(--muted);
}

.rival-tag.good {
    background: var(--good-soft);
    color: var(--good);
}

.rival-tag.bad {
    background: var(--bad-soft);
    color: var(--bad);
}

.rival-record {
    font-family: var(--font-led);
    font-size: 22px;
    font-weight: 900;
    min-width: 3.2em;
    text-align: right;
    white-space: nowrap;
}

/* Boards: a link to play one again */
.stats-board-again {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

/* Groups: the pitch (signed out, invites, starting one) */
/* An invite link opened by a guest: the invite leads, not "Your stats" (stats.js) */
.stats-page.invite-landing > .intro,
.stats-page.invite-landing > .segmented {
    display: none;
}

.groups-play-first {
    align-self: center;
    font-size: 16px;
}

.groups-pitch {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.groups-title {
    font-size: clamp(48px, 13vw, 72px);
}

.steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 8px 0;
    border-top: 1px solid var(--line);
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.step strong {
    color: var(--text);
}

.step-num {
    flex-shrink: 0;
    width: 28px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

/* A faded example of a group's standings */
.groups-preview {
    position: relative;
    padding: 16px 0 8px;
    opacity: 0.55;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
    pointer-events: none;
}

.groups-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.groups-preview-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.groups-preview-tag {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--faint);
}

.groups-preview-list {
    list-style: none;
}

.groups-preview-list li {
    display: grid;
    grid-template-columns: 28px 1fr auto 48px;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.gp-place,
.gp-score {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.gp-place {
    color: var(--muted);
}

.gp-name {
    font-weight: 700;
}

.gp-streak {
    font-size: 13px;
    color: var(--muted);
}

.gp-score {
    text-align: right;
}

.groups-preview-list li:first-child .gp-place,
.groups-preview-list li:first-child .gp-score {
    color: var(--accent);
}

/* Groups: the open group */
.groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.groups.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.groups-loading {
    padding: 24px 0;
    text-align: center;
}

.group-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-new {
    border-style: dashed;
    color: var(--muted);
}

.group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.group-name {
    font-size: clamp(36px, 10vw, 56px);
    overflow-wrap: anywhere;
}

.group-sub {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--muted);
}

.segmented.three {
    grid-template-columns: repeat(3, 1fr);
}

/* Today's results you can't see until you play */
.group-banner {
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    font-size: 15px;
    line-height: 1.45;
}

.group-banner a {
    color: var(--accent);
    font-weight: 700;
}

.group-list {
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.group-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.gr-place,
.gr-score {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.gr-place {
    color: var(--muted);
}

.group-row.first .gr-place,
.group-row.first .gr-score {
    color: var(--accent);
}

.gr-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.gr-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.group-row.me .gr-name {
    color: var(--accent);
}

.gr-tag {
    padding: 1px 6px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    vertical-align: 2px;
}

.gr-streak {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.gr-detail {
    font-size: 14px;
    color: var(--muted);
}

.gr-score {
    text-align: right;
    white-space: nowrap;
}

.gr-pts {
    margin-left: 3px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.group-invite,
.group-setting {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.group-link {
    overflow-wrap: anywhere;
    user-select: all;
}

/* Settings, folded away until opened (spaced by margins: older Safari
   can't lay out <details> as flex) */
.group-manage {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.group-manage > summary {
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
}

.group-manage > * + * {
    margin-top: 16px;
}

.group-members {
    list-style: none;
}

.group-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    border-top: 1px solid var(--line);
}

.group-member:last-child {
    border-bottom: 1px solid var(--line);
}

.group-member-actions {
    display: flex;
    gap: 16px;
}

/* Report links stay quiet: there for whoever needs one */
.group-report {
    color: var(--faint);
    font-size: 14px;
}

/* By sport */
.stats-cols,
.stats-row {
    display: grid;
    grid-template-columns: 1fr 64px 56px 64px;
    align-items: baseline;
    gap: 12px;
    padding: 0 4px;
}

.stats-cols {
    font-family: var(--font-display);
    padding-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--faint);
}

.stats-cols span,
.stats-num {
    text-align: right;
}

.stats-list,
.stats-boards {
    list-style: none;
}

.stats-row {
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid var(--line);
}

.stats-row:last-child,
.stats-board:last-child {
    border-bottom: 1px solid var(--line);
}

.stats-sport {
    font-weight: 700;
}

.stats-num {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

/* Boards */
.stats-board {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 4px;
    border-top: 1px solid var(--line);
}

.stats-board-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stats-board-stat {
    font-weight: 600;
}

.stats-board-context {
    font-size: 13px;
    color: var(--muted);
}

.stats-board-best {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.stats-board-total {
    font-size: 18px;
    color: var(--faint);
}

.stats-board.perfect .stats-board-best {
    color: var(--good);
}

.stats-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}


/* Laptops: the overview two across (The Round and the dailies beside
   Top 10 and game nights); a detail and Groups stay a readable width. */
@media (min-width: 900px) {
    .stats-overview {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto;
        grid-auto-flow: column;
        gap: 40px 56px;
        align-items: start;
    }

    .stats-detail,
    #statsGroups {
        max-width: 760px;
    }
}


/* =========================================
   8. ACCOUNT PAGE (account.html, account-page.js)
   ========================================= */

#accountBody {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

#accountBody > p {
    margin: 0;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-profile strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}

.account-profile .account-nickname {
    font-size: 40px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.account-sub {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: var(--muted);
}

.avatar.big {
    width: 64px;
    height: 64px;
    font-size: 36px;
}

/* What signing in gives you */
.perks {
    list-style: none;
    border-top: 1px solid var(--line);
}

.perk {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.perk strong {
    color: var(--text);
}

.perk-icon svg {
    display: block;
    width: 26px;
    height: 26px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Google's own button style: white, with their mark */
.btn-google {
    background: #fff;
    border-color: #fff;
    color: #1f1f1f;
    font-size: 17px;
}

.btn-google:hover:not(:disabled) {
    background: #f1f1f1;
    border-color: #f1f1f1;
}

.google-mark {
    width: 22px;
    height: 22px;
}

.account-fineprint {
    margin-top: -12px !important;
    text-align: center;
}

.account-fineprint .link-btn {
    padding: 0;
}

/* "Settings" sits right on top of its rows */
.account-settings-label {
    margin: 0 0 -18px;
}

/* Settings-style rows */
.account-rows {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 4px;
    border: none;
    border-bottom: 1px solid var(--line);
    background: none;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.account-row:hover {
    background: var(--bg-raise);
}

.account-row-end {
    font-size: 24px;
    line-height: 1;
    color: var(--faint);
}

.account-danger-zone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.account-danger {
    color: var(--bad);
    text-decoration-color: rgba(255, 107, 91, 0.4);
}

.account-notice {
    margin: 0;
    padding: 12px 16px;
    border-left: 3px solid var(--good);
    background: linear-gradient(90deg, var(--good-soft), transparent 80%);
    color: var(--good);
    font-weight: 600;
}

.account-busy {
    font-size: 16px;
}

.account-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.account-form .input,
.account-form .btn {
    align-self: stretch;
}

.account-label {
    font-weight: 600;
}

.account-error {
    margin: 0;
    min-height: 1.4em;
    color: var(--bad);
}


/* =========================================
   9. DAILY CHALLENGE (top10-daily.html)
   ========================================= */

.daily,
.daily-game,
.daily-side,
.daily-play,
.daily-done {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* The puzzle's own stat is the big headline, so the daily's name and
   rules sit a size down */
.daily .intro-title {
    font-size: clamp(44px, 11vw, 72px);
}

.daily .intro .lede {
    font-size: 16px;
}

.daily-done {
    gap: 16px;
}

.daily-status:empty {
    display: none;
}

/* One box per guess */
.daily-marks {
    display: flex;
    gap: 8px;
}

.daily-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-size: 22px;
}

.daily-mark.miss { border-color: var(--bad); background: var(--bad-soft); }
.daily-mark.hint { border-color: var(--accent); background: var(--accent-soft); }
.daily-mark.correct { border-color: var(--good); background: var(--good-soft); }

/* Hints: label on the left, value on the right */
.daily-hints {
    list-style: none;
}

.daily-hint {
    display: grid;
    grid-template-columns: 132px 1fr;
    align-items: baseline;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
}

.daily-hint:first-child {
    border-top: 1px solid var(--line);
}

.daily-hint-label {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.daily-hint-value {
    font-weight: 700;
    font-size: 17px;
}

.daily-hint-value .team-tag {
    font-size: 14px;
}

.daily-hint-pos {
    margin-left: 6px;
    color: var(--muted);
}

.daily-hint.locked .daily-hint-label,
.daily-hint.locked .daily-hint-value {
    color: var(--faint);
    font-weight: 500;
    font-size: 14px;
}

.daily-hint-btn {
    align-self: flex-start;
    margin: -12px 0 0 20px;
}

.daily-hint-btn:disabled {
    color: var(--faint);
    text-decoration: none;
    cursor: default;
}

/* The board: the hidden player's slot stands out */
.slot.daily-answer {
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.slot.daily-answer .slot-rank,
.slot.daily-answer .slot-value {
    color: var(--accent);
}

.daily-unknown {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.slot.daily-answer.solved {
    border: 1px solid var(--good);
    background: var(--good-soft);
}

.slot.daily-answer.solved .slot-rank,
.slot.daily-answer.solved .slot-value,
.slot.daily-answer.solved .slot-name {
    color: var(--good);
}

.slot.daily-answer.failed {
    border: 1px solid var(--bad);
    background: var(--bad-soft);
}

.slot.daily-answer.failed .slot-rank,
.slot.daily-answer.failed .slot-value,
.slot.daily-answer.failed .slot-name {
    color: var(--bad);
}

/* Finished */
/* The dailies' result, lit like the Top 10 result (.results-title) */
.daily-done-title {
    font-family: var(--font-led);
    font-weight: 900;
    font-size: clamp(40px, 11vw, 72px);
    line-height: 1;
    text-transform: uppercase;
    color: var(--accent);
    text-shadow: var(--glow-strong);
    animation: rise 0.5s var(--ease);
}

/* How many guesses each solve took */
.daily-dist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

.daily-dist-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    align-items: center;
    gap: 10px;
}

.daily-dist-label {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
}

.daily-dist-bar {
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--line-strong);
    font-weight: 700;
    font-size: 14px;
    text-align: right;
}

.daily-dist-row.today .daily-dist-bar {
    background: var(--accent);
    color: var(--accent-ink);
}

@media (max-width: 480px) {
    .daily-hint {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    /* Still locked: one short line each, so the guess box stays near the top */
    .daily-hint.locked {
        grid-template-columns: 64px 1fr;
        gap: 12px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

.stat-qualifier:empty {
    display: none;
}

.feedback.hinted .feedback-main {
    color: var(--accent);
}

/* The hint a miss unlocked, under the guess box */
.daily-new-hint {
    margin-top: 4px;
    font-size: 16px;
    color: var(--muted);
}

.daily-new-hint strong {
    color: var(--text);
}

.daily-new-hint .team-tag {
    font-size: 13px;
}

.daily-hint.fresh {
    animation: reveal 1.2s var(--ease);
}

/* Test mode bar */
.daily-test {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 14px;
    border: 1px dashed var(--bad);
    border-radius: var(--radius);
}

.daily-test-label {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--bad);
}

.daily-test-btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 20px;
}

.daily-test-day {
    min-width: 92px;
    text-align: center;
    font-weight: 700;
}

/* Looking back at a past day (?day=): which day, and the way back to the list */
.daily-past {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--bg-raise);
}

.daily-past-day {
    font-weight: 700;
}

.daily-past-link {
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

/* Last Call's misses by name, under the result */
.daily-done-guesses:empty {
    display: none;
}

/* Five quick taps open test mode (owner only). iPhone reads quick taps on
   text as a double-tap and drops some, so: no double-tap gesture here, and
   a finger-sized target around the small label */
#dailyEyebrow {
    display: inline-block;
    padding: 10px 12px 10px 0;
    margin: -10px 0;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* No room saved for feedback until there's a miss to show */
.daily-play .feedback:empty {
    display: none;
}


/* =========================================
   10. TOP SHELF (top10-topshelf.html)
   ========================================= */

/* The three rounds */
.shelf-rounds {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.shelf-round {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--faint);
}

.shelf-round-num {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.shelf-round-label {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
}

.shelf-round-result {
    min-height: 1.5em;
    font-weight: 700;
    color: var(--text);
}

.shelf-round.now {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.shelf-round.done {
    color: var(--muted);
}

/* Finished: points by round */
.shelf-breakdown {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.shelf-breakdown-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.shelf-breakdown-label {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.shelf-breakdown-detail {
    grid-column: 1;
}

.shelf-breakdown-points {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
}

.shelf-breakdown-row.full .shelf-breakdown-points {
    color: var(--good);
}

.shelf-prompt {
    font-size: 19px;
    font-weight: 600;
}

.shelf-prompt strong {
    color: var(--accent);
}

/* Hidden top rows */
.slot.shelf-hidden {
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.slot.shelf-hidden + .slot.shelf-hidden {
    margin-top: 4px;
}

.slot.shelf-hidden .slot-rank {
    color: var(--accent);
}

.slot.shelf-hidden.solved {
    border: 1px solid var(--good);
    background: var(--good-soft);
}

.slot.shelf-hidden.solved .slot-rank,
.slot.shelf-hidden.solved .slot-name {
    color: var(--good);
}

.slot.shelf-hidden.failed {
    border: 1px solid var(--bad);
    background: var(--bad-soft);
}

.slot.shelf-hidden.failed .slot-rank,
.slot.shelf-hidden.failed .slot-name {
    color: var(--bad);
}

.slot.tier-exact .slot-value,
.slot.tier-close .slot-value { color: var(--good); }
.slot.tier-near .slot-value { color: var(--accent); }
.slot.tier-far .slot-value { color: var(--bad); }

/* Round 2: found names and hints, in no particular order */
.shelf-tray {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shelf-tray:empty {
    display: none;
}

.shelf-tray-found {
    font-weight: 700;
    color: var(--good);
}

.shelf-tray-found .team-tag,
.shelf-tray-hint .team-tag {
    font-size: 13px;
}

.shelf-tray-hint .daily-hint-label {
    margin-right: 8px;
}

/* Round 3: tap the names into order */
.shelf-order-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shelf-order-choice:disabled {
    opacity: 0.3;
}

.shelf-order-picked {
    list-style: none;
}

.shelf-order-slot {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    column-gap: 12px;
    min-height: 52px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 18px;
    font-weight: 600;
}

.shelf-order-slot:first-child {
    border-top: 1px solid var(--line);
}

.shelf-order-slot.filled .slot-rank {
    color: var(--accent);
}

.shelf-order-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Rounds 1 and 4: a field and a button side by side */
.shelf-value-form {
    display: flex;
    gap: 10px;
}

.shelf-value-form .guess-input,
.shelf-value-form .select {
    flex: 1;
    min-width: 0;
}

.shelf-value-form .select {
    min-height: 60px;
    font-size: 18px;
}

.shelf-value-form .btn {
    min-height: 60px;
    font-size: 18px;
    white-space: nowrap;
}

/* Round 1: the timeline. The picked season shows big; drag the slider
   to get close, ‹ › move one season (a thumb can't land on one of 47
   seasons reliably) */
.shelf-year {
    display: grid;
    gap: 10px;
}

.shelf-year-picked {
    display: block;
    text-align: center;
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.shelf-year-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shelf-year-nudge {
    flex: none;
    width: 48px;
    min-height: 48px;
    padding: 0;
    font-size: 26px;
    line-height: 1;
}

.shelf-year-slider {
    flex: 1;
    min-width: 0;
    height: 48px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    touch-action: pan-y;
}

.shelf-year-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--line-strong);
}

.shelf-year-slider::-moz-range-track {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--line-strong);
}

.shelf-year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    margin-top: -12px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.shelf-year-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.shelf-year-slider:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* The first and last seasons under the slider's two ends */
.shelf-year-ends {
    display: flex;
    justify-content: space-between;
    padding: 0 58px;
    margin-top: -8px;
    font-size: 13px;
    color: var(--faint);
}

.shelf-year .hint {
    margin: 0;
    text-align: center;
}

.shelf-year-lock {
    display: flex;
    justify-content: center;
}

.btn.shelf-year-lock {
    min-height: 60px;
    font-size: 18px;
}

/* How to play's stand-in for the slider: a track and a thumb that slides */
.shelf-year-track {
    position: relative;
    height: 6px;
    margin: 18px 16px;
    border-radius: var(--radius-pill);
    background: var(--line-strong);
}

.tut-thumb {
    position: absolute;
    top: 50%;
    left: 15%;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%);
    transition: left 0.8s var(--ease);
}

.tut-thumb.on {
    left: 55%;
}

.tutorial-art .shelf-year-picked {
    font-size: 36px;
}


/* =========================================
   11. THE TAB (top10-tab.html)
   Rounds and the finished breakdown reuse Top Shelf's (section 10).
   ========================================= */

.tab-rounds {
    grid-template-columns: repeat(3, 1fr);
}

/* A round's board: the five (no ranks), your pick, then the totals */
.tab-boards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tab-board-title {
    margin-bottom: 8px;
}

.slot.tab-row,
.tut-row.tab-row {
    grid-template-columns: 1fr auto;
    padding-left: 8px;
}

.slot.tab-row {
    min-height: 48px;
}

/* The walkthrough's board: seven rows in the picture */
.tut-row.tab-row {
    min-height: 28px;
    padding-top: 1px;
    padding-bottom: 1px;
    line-height: 1.2;
}

.tut-row.tab-row .slot-value {
    font-size: 17px;
}

.tab-row.tab-pick {
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.tab-row.tab-pick.tier-exact,
.tab-row.tab-pick.tier-close {
    border: 1px solid var(--good);
    background: var(--good-soft);
}

.tab-row.tab-pick.tier-far {
    border: 1px solid var(--bad);
    background: var(--bad-soft);
}

.tab-row.tab-pick .slot-value {
    color: var(--text);
}

.tab-row.tab-total,
.tab-row.tab-goal {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.tab-row.tab-total .slot-value {
    color: var(--text);
}

.tab-row.tab-goal .slot-value {
    font-weight: 700;
    color: var(--accent);
}

.tab-row.tab-total .slot-main,
.tab-row.tab-goal .slot-main {
    flex-direction: row;
}

/* Under "You need 285": what scores */
.tab-bands {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* Picked, not locked in yet */
.tab-picked {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tab-pick-name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
    font-size: 21px;
    font-weight: 700;
}

.tab-pick-name .team-tag {
    font-size: 13px;
}

.tab-pick-name .guess-option-pos {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

/* The round just locked */
.tab-result.tier-exact .feedback-main,
.tab-result.tier-close .feedback-main { color: var(--good); }
.tab-result.tier-near .feedback-main { color: var(--accent); }
.tab-result.tier-far .feedback-main { color: var(--bad); }

.tab-points {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
}

.tab-result.tier-exact .tab-points,
.tab-result.tier-close .tab-points {
    background: var(--good-soft);
    color: var(--good);
}

.tab-exact {
    font-size: 15px;
    color: var(--muted);
}

/* The finished screen: each round's exact answers on their own line */
.tab-exact-done {
    display: block;
    font-size: 14px;
}


/* =========================================
   12. DAILIES ON A LAPTOP
   The puzzle and its controls on the left, the board on the right
   (after sections 9 to 11, so it wins over their one-column rules).
   ========================================= */

@media (min-width: 960px) {
    .daily-game {
        display: grid;
        grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
        gap: 0 64px;
        align-items: start;
    }

    .daily-game > .board,
    .daily-game > .tab-boards {
        padding-top: 8px;
    }
}


/* =========================================
   13. HOW TO PLAY (shared/tutorial.js)
   The ? by a daily's title and the walkthrough it opens. Each step's
   picture is a little scripted example: tutorial.js adds .on to each
   piece at its moment (data-at), so a step plays like a short clip.
   ========================================= */

.intro-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.how-to-play {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: none;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    transition: border-color 0.15s;
}

.how-to-play:hover {
    border-color: var(--accent);
}

/* Round 4's line under the box only shows to say "Type a number." */
.daily-play .hint:empty {
    display: none;
}

/* The sheet (also the Top 10 Guessed pop-up, .sheet) */
.tutorial,
.sheet {
    width: min(440px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    margin: auto;
    padding: 16px 20px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--bg-raise);
    color: var(--text);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.tutorial[open],
.sheet[open] {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: rise 0.3s var(--ease);
}

.tutorial::backdrop,
.sheet::backdrop {
    background: rgba(5, 6, 9, 0.78);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.tutorial-head,
.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Player cards (common.js): a name on a finished board opens one */
[data-card] {
    cursor: pointer;
    text-decoration: underline dotted var(--faint);
    text-underline-offset: 4px;
}

[data-card]:hover,
[data-card]:focus-visible {
    text-decoration-color: var(--accent);
    outline: none;
}

.player-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-card-name {
    font-size: 40px;
    line-height: 1;
}

.player-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 22px;
    color: var(--muted);
    font-size: 14px;
}

.player-card-count {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 17px;
    font-weight: 600;
}

.player-card-boards {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.player-card-boards li {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.player-card-boards li.current {
    color: var(--accent);
}

.player-card-rank,
.player-card-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

.player-card-rank {
    color: var(--muted);
}

.player-card-boards li.current .player-card-rank {
    color: inherit;
}

.tutorial-close,
.sheet-close {
    width: 40px;
    height: 40px;
    margin-right: -10px;
    border: none;
    background: none;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
}

/* The picture: same height every step, so the buttons don't jump */
.tutorial-art {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: 272px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
    cursor: pointer;
}

.tutorial-replay {
    align-self: flex-end;
    margin: -8px 0 -4px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.tutorial-words {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 136px;
}

.tutorial-title {
    font-size: 34px;
}

.tutorial-text {
    color: var(--muted);
}

.tutorial-text strong {
    color: var(--text);
}

.tutorial-foot {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.tutorial-back {
    justify-self: start;
}

.tutorial-next {
    justify-self: end;
    min-height: 48px;
    padding: 0 22px;
    font-size: 20px;
    white-space: nowrap;
}

.tutorial-dots {
    list-style: none;
    display: flex;
    gap: 6px;
}

.tutorial-dots li {
    width: 7px;
    height: 7px;
    border-radius: 4px;
    background: var(--line-strong);
    transition: width 0.2s var(--ease), background 0.2s;
}

.tutorial-dots li.on {
    width: 18px;
    background: var(--accent);
}

/* The moves. Every piece starts in its "before" look; the sheet adds
   .on (and .gone, .solved) on a timer, and transitions do the rest. */
.tut-in {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}

.tut-in.on {
    opacity: 1;
    transform: none;
}

.tut-out.on,
.tutorial-art .gone {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}

.tut-pop {
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.tut-pop.on {
    opacity: 1;
    transform: none;
}

.tut-shake.on {
    animation: shake 0.4s;
}

.tut-glow.on {
    animation: tut-flash 1.6s ease;
}

@keyframes tut-flash {
    0%, 35% { background: var(--accent-soft); }
    100% { background: transparent; }
}

/* Pieces stacked in one spot, swapping as the clip plays */
.tut-swap {
    display: grid;
}

.tut-swap > * {
    grid-area: 1 / 1;
}

/* A finger tap: invisible before and after, a pulse when .on */
.tut-tap {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    background: rgba(243, 239, 230, 0.4);
    opacity: 0;
    pointer-events: none;
}

.tut-tap.on {
    animation: tut-tap 0.55s ease-out;
}

@keyframes tut-tap {
    0% { opacity: 0; transform: scale(0.4); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.5); }
}

/* Typed text fills in a letter at a time (tutorial.js) */
.tut-typed {
    white-space: nowrap;
}

/* Stand-ins for the real controls, a size down */
.tut-box {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-pill);
    font-size: 17px;
}

.tut-select {
    border-color: var(--line-strong);
}

.tut-select::after {
    content: "▾";
    margin-left: auto;
    color: var(--muted);
}

.tut-pick {
    display: flex;
    gap: 10px;
}

.tut-pick .tut-box {
    flex: 1;
    min-width: 0;
}

.tut-btn {
    position: relative;
    min-height: 46px;
    padding: 0 18px;
    font-size: 18px;
    box-shadow: none;
    cursor: inherit;
}

.tut-result {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--accent-soft);
    font-weight: 600;
}

.tut-link {
    position: relative;
    align-self: flex-start;
    font-size: 14px;
}

.tut-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    font-size: 13px;
    transition: opacity 0.2s;
}

.tut-chip.on {
    opacity: 0.3;
}

/* Top 10's three ways to play: labels, not buttons */
.tut-modes {
    display: flex;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.tutorial-art .feedback {
    min-height: 0;
    margin: 0;
    padding-left: 18px;
}

.tutorial-art .feedback-main {
    font-size: 17px;
}

.tutorial-art .feedback-note {
    font-size: 14px;
}

.tut-points {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--good-soft);
    color: var(--good);
    font-weight: 700;
}

/* The board */
.tut-board {
    list-style: none;
}

.tut-row {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    column-gap: 10px;
    min-height: 36px;
    padding: 3px 10px 3px 0;
    border-bottom: 1px solid var(--line);
}

.tut-row:first-child {
    border-top: 1px solid var(--line);
}

.tut-row .slot-rank { font-size: 20px; }
.tut-row .slot-name { font-size: 15px; }
.tut-row .slot-team { font-size: 10px; }
.tut-row .slot-value { font-size: 19px; }
.tut-row .daily-unknown { font-size: 18px; }

.tut-row.tut-hidden {
    border: 1px dashed var(--accent);
    border-radius: 8px;
    background: var(--accent-soft);
}

.tut-row.tut-hidden + .tut-hidden {
    margin-top: 3px;
}

.tut-hidden .slot-rank,
.tut-hidden .slot-value {
    color: var(--accent);
}

/* Hidden rows breathe, so the eye goes there */
.tut-pulse.on {
    animation: tut-pulse 1.8s ease-in-out 0.8s infinite;
}

@keyframes tut-pulse {
    50% { box-shadow: 0 0 0 3px var(--accent-soft), var(--glow); }
}

/* Got it: the row turns green */
.tut-row.tut-solve {
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.35s, background 0.35s;
}

.tut-row.tut-solve.solved {
    border-style: solid;
    border-color: var(--good);
    background: var(--good-soft);
}

.tut-solve .slot-rank,
.tut-solve .slot-name,
.tut-solve .slot-value {
    transition: color 0.35s;
}

.tut-solve.solved .slot-rank,
.tut-solve.solved .slot-name,
.tut-solve.solved .slot-value {
    color: var(--good);
}

/* Guess boxes */
.tut-marks {
    display: flex;
    gap: 6px;
}

.tut-marks .daily-mark {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 17px;
}

.tut-marks .daily-mark > .daily-mark {
    position: absolute;
    inset: -1px;
    width: auto;
    height: auto;
}

/* Last Call's hints */
.tut-hints {
    list-style: none;
}

.tut-hint {
    display: grid;
    border-bottom: 1px solid var(--line);
}

.tut-hint:first-child {
    border-top: 1px solid var(--line);
}

.tut-hint > * {
    grid-area: 1 / 1;
}

.tut-hints .daily-hint,
.tut-hints .daily-hint.locked {
    grid-template-columns: 116px 1fr;
    gap: 10px;
    padding: 6px 4px;
    border: 0;
}

.tut-hints .daily-hint-label { font-size: 11px; }
.tut-hints .daily-hint-value { font-size: 15px; }
.tut-hints .daily-hint.locked .daily-hint-value { font-size: 13px; }
.tut-hints .daily-hint-value .team-tag { font-size: 12px; }
/* The walkthrough's value column is narrow: the teams get a line of their own */
.tut-hints .daily-hint-value .division-teams { display: flex; flex-wrap: nowrap; margin: 2px 0 0; font-size: 10px; gap: 0 5px; letter-spacing: 0.02em; }

/* The result as a text in the group chat */
.tut-bubble {
    align-self: flex-end;
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 8px 8px 2px 8px;
    background: #2f6fed;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
}

/* Top 10's share bubble takes the tie line's place */
.tut-swap > .tut-bubble {
    justify-self: end;
}

/* Top Shelf's order and points */
.tutorial-art .shelf-order-choices {
    gap: 6px;
}

.tut-order .shelf-order-slot {
    min-height: 34px;
    padding: 2px 4px;
    font-size: 15px;
}

.tutorial-art .shelf-order-actions .tut-btn {
    min-height: 38px;
    font-size: 16px;
}

.tut-check {
    transition: background 0.35s, color 0.35s;
}

.tut-check .slot-rank {
    font-size: 20px;
    transition: color 0.35s;
}

.tut-check.on {
    background: var(--good-soft);
    color: var(--good);
}

.tut-check.on .slot-rank {
    color: var(--good);
}

.tut-total {
    font-size: 38px;
    color: var(--accent);
    text-align: center;
}

.tutorial-art .shelf-breakdown-row {
    padding: 4px 0;
}

.tutorial-art .shelf-breakdown-label {
    font-size: 11px;
}

.tutorial-art .shelf-breakdown-detail {
    font-size: 13px;
}

.tutorial-art .shelf-breakdown-points {
    font-size: 20px;
}

/* Reduce Motion on: the steps still play in order, but pieces fade
   in place, with no sliding, shaking, pulsing or growing */
@media (prefers-reduced-motion: reduce) {
    .tut-in,
    .tut-pop {
        transform: none;
    }

    .tut-shake.on,
    .tut-pulse.on {
        animation: none;
    }

    .tut-thumb {
        transition: none;
    }

    .tut-tap.on {
        animation-name: tut-tap-fade;
    }

    @keyframes tut-tap-fade {
        30% { opacity: 1; }
    }
}


/* =========================================
   CHIPS: The Rack (Stats, Chips tab) and the profile row (Account)
   ========================================= */
.rack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.rack-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rack-count {
    margin: 0;
    font-weight: 700;
    color: var(--muted);
}

.rack-count-num {
    font-size: 56px;
    line-height: 1;
    color: var(--accent);
    margin-right: 4px;
}

.rack-bar {
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--line);
    overflow: hidden;
}

.rack-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.rack-set {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rack-set-name {
    display: flex;
    justify-content: space-between;
    margin: 0;
}

.rack-set-count {
    color: var(--faint);
}

.rack-set-about {
    margin: -4px 0 4px;
}

.rack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
}

@media (min-width: 720px) {
    .rack-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.rack-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border: none;
    background: none;
    color: var(--faint);
    font: inherit;
    cursor: pointer;
}

.rack-chip.earned {
    color: var(--text);
}

.rack-chip:active .chip-art {
    transform: scale(0.94);
}

.rack-chip-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.rack-chip-progress {
    margin-top: -4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

/* Earned in the last two days */
.rack-chip.new::after {
    content: "";
    position: absolute;
    top: 2px;
    right: calc(50% - 34px);
    width: 10px;
    height: 10px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
}

/* One chip's sheet */
.chip-sheet {
    width: min(400px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    margin: auto;   /* the base style's margin: 0 would pin the sheet to the top left */
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--bg-raise);
    color: var(--text);
}

.chip-sheet::backdrop {
    background: rgba(5, 6, 9, 0.75);
}

.chip-sheet-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 22px 22px;
    text-align: center;
}

.chip-sheet-body p {
    margin: 0;
}

.chip-sheet-art {
    margin-bottom: 8px;
}

.chip-sheet[open] .chip-sheet-art.earned .chip-art {
    animation: chip-flip 0.7s var(--ease) both;
}

.chip-sheet-name {
    margin: 0;
    font-size: 40px;
    line-height: 1;
}

.chip-sheet-line {
    font-size: 17px;
}

.chip-sheet-bar {
    width: 100%;
    margin-top: 6px;
}

.chip-sheet-when {
    font-weight: 700;
    color: var(--accent);
}

.chip-sheet .btn {
    margin-top: 12px;
}

/* Account: your newest chips */
.profile-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
    .chip-sheet[open] .chip-sheet-art.earned .chip-art {
        animation: none;
    }
}
