/* SportsBadger Scores (web/scores/, sb-scores.js): the approved "Scores & live scores" design, option A, with Upset
   Watch and the live Keys to Victory from the "Scores: what the competition doesn't have" canvas (picked Nov 27).
   Phones: one card per row, the chips and the day strip stacked under the title. Bigger screens: the chips on the
   left and the day strip on the right of one row, three cards a row. Light and dark from sb.css's colors, plus the
   live red and the delay amber below. A red dot only ever means live; a hollow one means we've lost touch.
   The last play on each live card and the big-plays ticker are from the "Scores: live plays and scoring ticker" canvas
   (Nov 28): on a phone the ticker shows one play at a time and flips; on bigger screens it crawls across. */
/* --live (the live red) is sb.css's, shared with the Scores tab's dot */
:root {
  --live-on-ink: #FF8A7D; --delay: #8A5A00;
  --upset-bg: #FFF3D6; --upset-line: #E9C77A; --upset-ink: #7A4E00;   /* Upset Watch's amber */
  /* the plays' tags: the defense's orange, a big play's blue; and the green a score tints its line */
  --tag-def: #A4501F; --tag-big: #2B5FB5; --score-bg: #E3F1E8; --score-line: #B5D6C2;
  /* a flag (Nov 29, 2026): the penalty flag's yellow, the same in both themes, and the yellow a new flag tints its line */
  --flag: #F5C518; --flag-ink: #2A2100; --flag-bg: #FFF6C7; --flag-line: #EBD27A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --live-on-ink: #C4281C; --delay: #E7B55A; --upset-bg: #3A2D10; --upset-line: #5C4718; --upset-ink: #FFD27A;
    --tag-def: #E59A6E; --tag-big: #7FA8E8; --score-bg: #1A2E22; --score-line: #2F5A41;
    --flag-bg: #33300F; --flag-line: #6B5E1A;
  }
}
:root[data-theme="dark"] {
  --live-on-ink: #C4281C; --delay: #E7B55A; --upset-bg: #3A2D10; --upset-line: #5C4718; --upset-ink: #FFD27A;
  --tag-def: #E59A6E; --tag-big: #7FA8E8; --score-bg: #1A2E22; --score-line: #2F5A41;
  --flag-bg: #33300F; --flag-line: #6B5E1A;
}

.scb { padding: 16px 0 56px; }
.scb-title { margin: 0; font: 700 clamp(2.6rem, 6vw, 4.1rem)/.95 var(--font-display); letter-spacing: .01em; }

/* ---------- the league chips and the day strip ---------- */
.scb-bar { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.scb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.scb-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .91rem/1 var(--font-body);
  white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.scb-chip[aria-pressed="true"] { background: var(--ink); color: var(--chalk); border-color: var(--ink); }
.scb-chip:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; }
.scb-chip-live { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .81rem; color: var(--live); }
.scb-chip-live i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.scb-chip[aria-pressed="true"] .scb-chip-live { color: var(--live-on-ink); }
.scb-chip-live.stale { color: var(--muted); }
.scb-chip-live.stale i { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.scb-chip[aria-pressed="true"] .scb-chip-live.stale { color: var(--chalk); }

.scb-strip {
  padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.scb-strip::-webkit-scrollbar { display: none; }
.scb-cells { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 5); gap: 4px; }
.scb-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 46px; padding: 0;
  border: 1.5px solid transparent; border-radius: 10px; background: none; color: var(--muted); font: inherit;
  cursor: pointer; scroll-snap-align: center; -webkit-tap-highlight-color: transparent;
}
.scb-cell-top { font: 600 .66rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.scb-cell-num { font: 700 1.19rem/1 var(--font-display); color: var(--ink); }
.scb-cell.none .scb-cell-num, .scb-cell.future .scb-cell-num { color: var(--muted); font-weight: 600; }
.scb-cell[aria-pressed="true"] { border-color: var(--turf); background: var(--chalk); color: var(--turf); }
.scb-cell[aria-pressed="true"] .scb-cell-top { font-weight: 700; }
.scb-cell:focus-visible { outline: 3px solid var(--turf); outline-offset: -1px; }
@media (hover: hover) { .scb-cell:hover:not([aria-pressed="true"]) { background: var(--chalk); } }

.scb-note { margin: 14px 2px 0; color: var(--muted); font-size: .9rem; }
.scb-note a { color: var(--turf); font-weight: 600; }

/* ---------- section headings: LIVE NOW 3 · Updated 6s ago ---------- */
.scb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 16px; margin: 18px 2px 8px; }
.scb-head h2 {
  margin: 0; display: flex; align-items: center; gap: 8px; font: 700 .94rem/1 var(--font-display); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.scb-head.live h2 { color: var(--live); }
.scb-count { color: var(--muted); }
.scb-fresh { font-size: .78rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.scb.is-stale .scb-head.live h2 { color: var(--muted); }
.scb.is-stale .scb-fresh { color: var(--delay); }

/* the dot: red and pulsing while live, hollow once we've lost touch */
.scb-dot { position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.scb-head .scb-dot { width: 8px; height: 8px; }
.scb-head .scb-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live);
  animation: scb-pulse 1.8s ease-out infinite;
}
.scb-dot.hollow { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.scb-dot.hollow::after { display: none; }
@keyframes scb-pulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.7); opacity: 0; } }

/* ---------- the cards ---------- */
.scb-grid { display: flex; flex-direction: column; gap: 8px; }
.scb-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 92px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; color: inherit; text-decoration: none; overflow: hidden;
}
/* The state column is 92px: enough for a quarter and clock, a time, Final and Final/OT. The rare longer words
   (Delayed, Started, Starting soon, Postponed, Canceled, Final/2OT) widen it on that card alone, up to 132px, so none
   is cut off; a note under the word ("Q3 11:59", or the feed's reason) wraps. */
.scb-card.is-delayed, .scb-card.is-started, .scb-card.is-soon, .scb-card.is-postponed, .scb-card.is-canceled,
.scb-card.is-final {
  grid-template-columns: minmax(0, 1fr) fit-content(132px);
}
.scb-card.is-final .scb-l1 { margin-right: -4px; }
a.scb-card { transition: border-color .15s ease, box-shadow .15s ease; }
@media (hover: hover) { a.scb-card:hover { border-color: var(--ink); box-shadow: 0 4px 14px rgb(0 0 0 / .08); } }
a.scb-card:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; }
.scb-teams { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 11px 12px 11px 14px; }
.scb-team { display: flex; align-items: center; gap: 10px; height: 28px; }
.scb-team .badge.sm { height: 24px; width: 20px; }
/* the team name keeps room for its letters' tails (the g of "Kings", the p of "Spurs"; Big plays, below, says how), and
   .scb-name around it hides what doesn't fit too, so it gets the same room in its own smaller size (.25em) */
.scb-name {
  display: flex; align-items: baseline; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden;
  padding-block: .25em; margin-block: -.25em;
}
.scb-name b {
  font: 700 1.31rem/1 var(--font-display); letter-spacing: .01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis;
  padding-block: .14em; margin-block: -.14em;
}
.scb-name small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.scb-score {
  margin-left: auto; min-width: 34px; text-align: right; font: 700 1.69rem/1 var(--font-display);
  font-variant-numeric: tabular-nums; color: var(--ink); transition: color 1.4s ease;
}
.scb-score.flash { color: var(--live); transition: none; }
.scb-team.lost .scb-name b, .scb-team.lost .scb-score { color: var(--muted); font-weight: 600; }
/* football, when the feed carries it: the ball after the team that has it, and the down on a third line */
.scb-ball { flex: none; align-self: center; fill: var(--ink); }
.scb-ball path { fill: none; stroke: var(--surface); stroke-width: 1; stroke-linecap: round; }
.scb-down { padding-top: 2px; font-size: .78rem; font-weight: 500; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.scb.is-stale .scb-ball { fill: var(--muted); }

/* the slot on the right carries the state */
.scb-slot {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 8px 0 12px;
  border-left: 1px solid var(--line); min-width: 92px;
}
.scb-l1 {
  display: flex; align-items: center; gap: 6px; font: 700 .94rem/1 var(--font-display); letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap; color: var(--ink);
}
.scb-l1.is-live { color: var(--live); }
.scb-l1.is-time { font-size: 1.06rem; letter-spacing: .02em; }
.scb-l1.is-delay { color: var(--delay); }
/* past its listed time, not under way yet: green, not the live red (a red dot only ever means live). One line in the
   site's font; it wraps rather than being cut off if a phone falls back to a wider one. */
.scb-l1.is-soon { color: var(--turf); white-space: normal; line-height: 1.1; }
.scb-l1.is-off { color: var(--muted); font-size: .84rem; }
.scb-l2 { font: 600 1.19rem/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.scb-l3 { font: 600 .72rem/1.2 var(--font-body); color: var(--muted); letter-spacing: .02em; }
.scb-go { display: flex; align-items: center; gap: 3px; font: 600 .75rem/1 var(--font-body); color: var(--turf); white-space: nowrap; }
.scb-go svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.scb.is-stale .scb-l1.is-live, .scb.is-stale .scb-clock { color: var(--muted); }

.scb .notice { margin-top: 18px; }

/* ---------- the plays: the tags, the last play along the bottom of a live card, and the ticker ---------- */
/* a tag says what kind of play: filled green for a score, an orange outline when the defense made the play, blue for
   a big play, amber for a swing in the win chance. The NBA's the same way: filled green for a lead change, orange for
   a block or a steal, blue for a three, a dunk or a run, amber for a tie or the last two minutes of a close game */
.scb-tag {
  flex: none; padding: 4px 6px 3px; border-radius: 4px; border: 1px solid var(--muted); color: var(--muted);
  font: 700 .75rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.scb-tag.is-td, .scb-tag.is-fg, .scb-tag.is-safety, .scb-tag.is-lead { background: var(--turf); border-color: var(--turf); color: var(--chalk); }
.scb-tag.is-pick, .scb-tag.is-fumble, .scb-tag.is-sack, .scb-tag.is-block, .scb-tag.is-steal { border-color: var(--tag-def); color: var(--tag-def); }
.scb-tag.is-big, .scb-tag.is-three, .scb-tag.is-dunk, .scb-tag.is-run { border-color: var(--tag-big); color: var(--tag-big); }
.scb-tag.is-swing, .scb-tag.is-tie, .scb-tag.is-clutch { border-color: var(--upset-ink); color: var(--upset-ink); }
/* a flag on the play: filled yellow, like the flag itself */
.scb-tag.is-flag { background: var(--flag); border-color: var(--flag); color: var(--flag-ink); }

.scb-last {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 37px; padding: 8px 14px;
  border-top: 1px solid var(--line);
}
.scb-last-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .84rem/1.25 var(--font-body);
  color: var(--ink);
}
.scb-last-note { flex: none; margin-left: auto; padding-left: 4px; font: 600 .72rem/1 var(--font-body); color: var(--muted); white-space: nowrap; }
/* the NBA's line (is-fit): the word on the right is there only when the whole line fits the card. The play and its
   tag are one piece that never wraps; when the word doesn't fit beside it, it drops to a second row, which is never
   shown, and the play gets the whole width. The line keeps its one-row height: the space under the row is each
   piece's own margin instead of the line's padding, so a second row starts past the line's edge, out of sight. */
.scb-last.is-fit { flex-wrap: wrap; align-content: flex-start; height: 38px; padding-bottom: 0; overflow: hidden; }
.scb-last.is-fit > * { margin-bottom: 8px; }
.scb-last-main { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; min-height: 21px; }
/* a score that has just come in: the line is green for a few seconds, then lets go */
.scb-last.is-score { animation: scb-scored 9s ease-out 1 both; }
@keyframes scb-scored {
  0%, 70% { background: var(--score-bg); border-top-color: var(--score-line); }
  100% { background: transparent; border-top-color: var(--line); }
}
/* a flag that has just come in: the line flashes yellow, then lets go */
.scb-last.is-flag { animation: scb-flagged 9s ease-out 1 both; }
@keyframes scb-flagged {
  0%, 8%, 16% { background: var(--flag-bg); border-top-color: var(--flag-line); }
  4%, 12% { background: transparent; }
  70% { background: var(--flag-bg); border-top-color: var(--flag-line); }
  100% { background: transparent; border-top-color: var(--line); }
}
.scb.is-stale .scb-last-text { color: var(--muted); }

/* a Badger note under the last play: a first lead after trailing, a 4th down stopped, a round number of yards */
.scb-badger {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 0 14px 10px;
  font: 500 .81rem/1.35 var(--font-body); color: var(--muted);
}
.scb-badger-tag {
  flex: none; font: 700 .72rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--turf);
  white-space: nowrap;
}
.scb-badger-text { min-width: 0; }

/* the big moment: for a few seconds after a score its card opens up. Above the teams, a band with a bar in the scoring
   team's colors: the tag and the team, who and how far, and what it did. Below them, that team's chance to win before
   and after, with a bar, and the Badger note. */
.scb-card.is-moment { border-color: var(--score-line); }
.scb-moment {
  position: relative; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 7px; min-width: 0;
  padding: 16px 14px 12px; background: var(--score-bg); border-bottom: 1px solid var(--score-line);
  animation: scb-moment-in .35s ease-out 1 both;
}
@keyframes scb-moment-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.scb-moment-bar { position: absolute; left: 0; right: 0; top: 0; height: 5px; }
.scb-moment-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scb-moment-team {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 .81rem/1 var(--font-display);
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.scb-moment-title { font: 700 1.5rem/1.05 var(--font-display); letter-spacing: .01em; color: var(--ink); }
.scb-moment-story { font: 500 .88rem/1.35 var(--font-body); color: var(--ink); }
.scb-chance {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 10px;
  padding: 10px 14px 11px; border-top: 1px solid var(--line); font: 500 .81rem/1 var(--font-body); color: var(--muted);
}
.scb-chance b { font: 700 .94rem/1 var(--font-display); letter-spacing: .02em; color: var(--upset-ink); white-space: nowrap; }
.scb-chance-bar { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.scb-chance-bar i { display: block; height: 5px; border-radius: 3px; background: var(--upset-ink); }
.scb-chance + .scb-badger { padding-top: 0; }

/* the ticker, on a phone: its heading with the Pause button, then one play at a time in a 64px bar */
.scb-tick { margin-top: 14px; }
/* sb-scores.js hides it when there's nothing to show; the computer's band (display: grid, below) would otherwise keep
   an empty box on the page (Nov 30, 2026) */
.scb-tick[hidden] { display: none; }
.scb-tick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 6px; }
.scb-tick-head h2 {
  margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 .94rem/1 var(--font-display);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.scb-tick-head h2 small { font: 500 .78rem/1 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.scb-tick-head .scb-dot { width: 8px; height: 8px; }
.scb-tick-pause {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; margin: -14px -6px -14px 0; padding: 0 8px;
  border: 0; border-radius: 8px; background: none; color: var(--turf); font: 600 .78rem/1 var(--font-body); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scb-tick-pause svg { flex: none; fill: currentColor; }
.scb-tick-pause:focus-visible { outline: 3px solid var(--turf); outline-offset: -3px; }
.scb-tick-view {
  box-sizing: content-box; height: 64px; overflow: hidden; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line);
}
.scb-tick-track { display: flex; flex-direction: column; transition: transform .45s ease; }
.scb-tk {
  flex: none; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 12px; height: 64px;
  padding: 0 12px 0 14px; color: inherit; text-decoration: none;
}
.scb-tk.is-bare { grid-template-columns: minmax(0, 1fr); }   /* a play with no team to its name: no stripes */
.scb-tk .badge.sm { height: 24px; width: 20px; }
.scb-tk:focus-visible { outline: 3px solid var(--turf); outline-offset: -3px; border-radius: 12px; }
.scb-tk-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scb-tk-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* A line one font size tall that hides what doesn't fit also hides the letters' tails (the g in "Young", a y, a comma)
   and an accent on a capital. So these lines, and the team names on the cards (.scb-name), get a little padding above
   and below inside their edge, and the same amount off outside as a negative margin: the letters show whole and
   nothing moves (Nov 30, 2026). */
.scb-tk-title {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 1.19rem/1 var(--font-display);
  letter-spacing: .01em; color: var(--ink); padding-block: .14em; margin-block: -.14em;
}
.scb-tk-long { display: none; }
.scb-tk-sub {
  display: flex; align-items: baseline; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap;
  font: 500 .78rem/1 var(--font-body); color: var(--muted); padding-block: .14em; margin-block: -.14em;
}
.scb-tk-wp { color: var(--upset-ink); }

/* ---------- Upset Watch: the strip above Live now, and the amber line along the bottom of a card ---------- */
/* The strip folds (Dec 2, 2026: with three upsets it filled a phone's screen). Its heading row is the button, 44px
   tall: folded, it shows the count and the teams and nothing else; opened, a sentence for each game under it. It
   starts folded on a phone and open on a computer, and the browser keeps the last choice (sb-scores.js, upsetOpen). */
.scb-upset { margin-top: 16px; border-radius: 12px; background: var(--upset-bg); border: 1px solid var(--upset-line); }
.scb-upset-sum {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 14px; cursor: pointer;
  list-style: none; -webkit-tap-highlight-color: transparent;
}
.scb-upset-sum::-webkit-details-marker { display: none; }
.scb-upset-sum:focus-visible { outline: 3px solid var(--turf); outline-offset: -3px; border-radius: 12px; }
.scb-upset h2 {
  flex: none; margin: 0; display: flex; align-items: center; gap: 8px; color: var(--upset-ink); font: 700 .94rem/1 var(--font-display);
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.scb-upset h2 .scb-count { color: var(--upset-ink); opacity: .75; }
/* folded: the teams, as many as fit (the row never wraps); opened, the sentences name them instead */
.scb-upset-who {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 .84rem/1 var(--font-body); color: var(--ink); padding-block: .14em; margin-block: -.14em;
}
.scb-upset[open] .scb-upset-who { display: none; }
.scb-upset-chev {
  flex: none; margin-left: auto; fill: none; stroke: var(--upset-ink); stroke-width: 1.6; stroke-linecap: round;
  stroke-linejoin: round; transition: transform .15s ease;
}
.scb-upset[open] .scb-upset-chev { transform: rotate(180deg); }
.scb-upset-body { padding: 0 14px 13px; }
.scb-upset p { margin: 9px 0 0; font-size: .94rem; line-height: 1.4; color: var(--ink); }
.scb-upset-body > p:first-child { margin-top: 0; }
.scb-upset p.scb-upset-rule { margin-top: 6px; font-size: .78rem; line-height: 1.35; color: var(--muted); }
.scb-bolt { flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.scb-upset-bar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 14px 9px;
  border-top: 1px solid var(--upset-line); background: var(--upset-bg); color: var(--upset-ink);
}
.scb-upset-tag { flex: none; font: 700 .81rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.scb-upset-text {
  margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 .78rem/1.2 var(--font-body); color: var(--ink);
}

/* ---------- Keys to Victory, live: a row under the card (each key a dot), opened for each key's status ---------- */
.scb-pair { display: flex; flex-direction: column; min-width: 0; }
.scb-pair > .scb-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.scb-keys { border: 1px solid var(--line); border-top: none; border-radius: 0 0 12px 12px; background: var(--surface); }
.scb-keys-sum {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.scb-keys-sum::-webkit-details-marker { display: none; }
.scb-keys-sum:focus-visible { outline: 3px solid var(--turf); outline-offset: -3px; border-radius: 0 0 12px 12px; }
.scb-keys-title {
  margin-right: auto; font: 600 .66rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.scb-keys-side { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--font-body); color: var(--ink); }
.scb-pips { display: inline-flex; gap: 3px; }
.scb-pip { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--muted); }
.scb-pip.is-hit { background: var(--win); box-shadow: none; }
.scb-pip.is-missed { box-shadow: inset 0 0 0 2px var(--loss); }
.scb-pip.is-on_track { box-shadow: inset 0 0 0 1.5px var(--ink); }
.scb-keys-chev {
  flex: none; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s ease;
}
.scb-keys[open] .scb-keys-chev { transform: rotate(180deg); }
@media (hover: hover) { .scb-keys-sum:hover .scb-keys-title { color: var(--ink); } }
.scb-keys-panel { display: flex; flex-direction: column; gap: 6px; padding: 0 14px 12px; border-top: 1px solid var(--line); }
.scb-kteam h3 {
  margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; font: 700 1.19rem/1 var(--font-display); color: var(--ink);
}
.scb-kteam h3 .badge.sm { height: 18px; width: 16px; }
.scb-kteam h3 small { font: 500 .78rem/1 var(--font-body); color: var(--muted); }
.scb-khits {
  margin-left: auto; font: 600 .72rem/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.scb-klist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.scb-klist li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.scb-kicon { margin-top: 1px; fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.scb-kicon .scb-kdot { fill: var(--ink); stroke: none; }
.scb-klist li.is-hit .scb-kicon { stroke: var(--win); }
.scb-klist li.is-missed .scb-kicon { stroke: var(--loss); }
.scb-klist li.is-on_track .scb-kicon { stroke: var(--ink); }
.scb-klist li:not(.is-on_track) .scb-kdot { display: none; }
.scb-khead { margin: 0; font: 700 1.06rem/1.15 var(--font-display); color: var(--ink); }
.scb-kstat { margin: 4px 0 0; font-size: .84rem; line-height: 1.3; color: var(--muted); }
.scb-kstat b { font-weight: 600; color: var(--ink); }
.scb-klist li.is-hit .scb-kstat b { color: var(--win); }
.scb-klist li.is-missed .scb-kstat b { color: var(--loss); }
.scb-klist li.is-behind .scb-kstat b { color: var(--delay); }
.scb-klist li.is-unknown .scb-kstat b, .scb-klist li.is-not_yet .scb-kstat b { color: var(--muted); }
.scb-kstat span { font-weight: 500; }
.scb-kbar { display: block; height: 4px; margin-top: 7px; border-radius: 2px; background: var(--line); overflow: hidden; }
.scb-kbar span { display: block; height: 4px; border-radius: 2px; background: var(--muted); }
.scb-klist li.is-hit .scb-kbar span { background: var(--win); }
.scb-klist li.is-missed .scb-kbar span { background: var(--loss); }
.scb-keys-note { margin: 6px 0 0; font-size: .78rem; line-height: 1.35; color: var(--muted); }

/* ---------- bigger screens: chips left, days right, three cards a row ---------- */
@media (min-width: 720px) {
  .scb { padding-top: 26px; }
  .scb-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
  .scb-strip { flex: 0 1 400px; min-width: 0; }
  .scb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px 14px; }
  /* a row with a game's live Keys in it: an opened list doesn't stretch the cards beside it */
  .scb-grid:has(.scb-pair) { align-items: start; }
  .scb-head { margin-top: 22px; }

  /* the ticker on a bigger screen: one 48px band, its name on the left, Pause on the right, the plays crawling
     between them (each on one line, in full). Without "reduce motion" only: with it, the band changes in place. */
  .scb-tick {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; margin-top: 16px; height: 50px; overflow: hidden;
    border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  }
  .scb-tick-head { display: contents; }
  .scb-tick-head h2 { order: 1; margin: 0; padding: 0 14px 0 16px; border-right: 1px solid var(--line); }
  .scb-tick-head h2 small { display: none; }
  .scb-tick-view { order: 2; height: 48px; border: 0; border-radius: 0; background: none; }
  .scb-tick-pause { order: 3; height: 48px; margin: 0; padding: 0 14px; border-left: 1px solid var(--line); border-radius: 0; }
  .scb-tk { height: 48px; }
  .scb-tick.is-row .scb-tick-track { flex-direction: row; width: max-content; transition: none; }
  .scb-tick.is-row .scb-tk { display: flex; gap: 10px; padding: 0 26px 0 18px; }
  .scb-tick.is-row .scb-tk-body { flex-direction: row; align-items: center; gap: 12px; }
  .scb-tick.is-row .scb-tk-title { overflow: visible; font-size: 1.12rem; }
  .scb-tick.is-row .scb-tk-short { display: none; }
  .scb-tick.is-row .scb-tk-long { display: inline; }
  .scb-tick.is-row .scb-tk-sub { overflow: visible; }
  .scb-tick.is-crawl .scb-tick-track { animation: scb-crawl 60s linear infinite; }
  .scb-tick.is-crawl.is-paused .scb-tick-track,
  .scb-tick.is-crawl .scb-tick-view:hover .scb-tick-track,
  .scb-tick.is-crawl .scb-tick-view:focus-within .scb-tick-track { animation-play-state: paused; }
  .scb-tick.is-flip .scb-tk-title { font-size: 1.12rem; }
  .scb-tick.is-flip .scb-tk-body { gap: 5px; }
}
@keyframes scb-crawl { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .scb-head .scb-dot::after { animation: none; display: none; }
  .scb-score { transition: none; }
  .scb-keys-chev, .scb-upset-chev { transition: none; }
  .scb-tick-track { transition: none; animation: none; }
  .scb-last.is-score { animation: none; background: var(--score-bg); border-top-color: var(--score-line); }
  .scb-last.is-flag { animation: none; background: var(--flag-bg); border-top-color: var(--flag-line); }
  .scb-moment { animation: none; }
}
