/* Results summary (views/result-summary.js) and the existing result screen, on the brand tokens. No literal colors. */

/* the existing result screen (result.css) keeps its own --sr-* names: point them at the brand tokens */
body .simon-result, body .simon-viewer { /* body: wins over result.css, which loads later */
  --sr-bg: var(--color-bg);
  --sr-surface: var(--color-surface);
  --sr-raised: var(--color-raised);
  --sr-line: var(--color-line);
  --sr-text: var(--color-text);
  --sr-muted: var(--color-text-muted);
  --sr-trainer: var(--color-text);
  --sr-you: var(--color-accent);
  --sr-hot: var(--color-bad);
  --sr-a: var(--color-good); --sr-b: var(--color-good); --sr-c: var(--color-warn); --sr-d: var(--color-bad); --sr-f: var(--color-bad);
  font-family: var(--font-sans);
}
/* pink text on the raised cards: the lighter brand pink, as the brand pink alone is under 4.5:1 there (axe), beside the block above */
body .simon-result, body .simon-viewer { --sr-hot-text: var(--color-bad-text); }
body .simon-result .sr-moment, body .simon-result .sr-worst[aria-pressed="true"] { color: var(--sr-hot-text); }
/* the summary ring carries the number; the old panel keeps only the grade and its bands (tap the grade for the rules) */
.simon-result[data-summary="true"] .sr-score-head { display: none; }
.simon-result[data-summary="true"] .sr-score-top { justify-content: flex-start; }

.rs { display: grid; gap: var(--space-4); }
.rs h3 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-bold); }

.rs-head { display: flex; align-items: center; gap: var(--space-4); }
.rs-eyebrow { margin: 0 0 var(--space-1); color: var(--color-accent); font: var(--weight-bold) var(--text-xs)/1 var(--font-sans);
  letter-spacing: 0.08em; text-transform: uppercase; }
.rs-title { margin: 0; font-size: var(--text-lg); line-height: 1.15; }

.rs-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.rs-stats[data-layout="stack"] .rs-stat { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.rs-stats[data-layout="stack"] .rs-stat-value { font-size: var(--text-xl, 30px); }
.rs-stat { display: flex; align-items: baseline; justify-content: space-between; padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--card-fill); border: 1px solid var(--color-line); }
.rs-stat-label { color: var(--color-accent); font-size: var(--text-sm); }
.rs-stat-value { font: var(--weight-black) var(--text-lg)/1 var(--font-sans); }

.rs-card { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--card-fill); border: 1px solid var(--color-line); }
.rs-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.rs-play { width: var(--target-min); height: var(--target-min); border-radius: var(--radius-pill); border: 1.5px solid var(--color-accent); background: transparent;
  color: var(--color-accent); font-size: var(--text-xs); cursor: pointer; }
/* both bodies in one panel, a hairline between them */
.rs-figs { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: stretch; padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md); background: var(--card-fill-raised); }
.rs-figs::before { content: ""; grid-column: 2; grid-row: 1; background: var(--color-line); margin: var(--space-4) 0; }
.rs-figs figure { margin: 0; display: grid; justify-items: center; gap: var(--space-1); }
.rs-figs figure:first-child { grid-column: 1; grid-row: 1; }
.rs-figs figure:last-child { grid-column: 3; grid-row: 1; }
.rs-figs figcaption { font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.rs-fig { width: 100%; max-width: 160px; aspect-ratio: 1; }
.rs-fig line { stroke-width: 3; stroke-linecap: round; }
.rs-fig-ref line, .rs-fig-ref .rs-fig-head { stroke: var(--color-text); fill: none; }
.rs-fig-you line, .rs-fig-you .rs-fig-head { stroke: var(--color-accent); fill: none; }
.rs-fig-head { stroke-width: 3; }
/* TICKET-116: a bone or head the camera never saw (Part 3 unseen mark) is drawn dimmed and dashed, not dropped */
.rs-fig .rs-fig-dim { opacity: 0.35; stroke-dasharray: 3 4; }
.rs-fig-off { fill: none; stroke: var(--color-bad); stroke-width: 2.5; }
.rs-fig-you-wrap figcaption { color: var(--color-accent); }
/* exercise: the reference in the accent, you in the alert color with the off joint ringed in it */
.rs-worst[data-tone="exercise"] .rs-fig-ref line, .rs-worst[data-tone="exercise"] .rs-fig-ref .rs-fig-head { stroke: var(--color-accent); }
.rs-worst[data-tone="exercise"] .rs-fig-you line, .rs-worst[data-tone="exercise"] .rs-fig-you .rs-fig-head { stroke: var(--color-bad); }
.rs-worst[data-tone="exercise"] .rs-fig-you-wrap figcaption { color: var(--color-bad); }
/* dance: the trainer in the text color, you in the accent with the off joint ringed in the accent */
.rs-worst[data-tone="dance"] .rs-fig-off, .rs-drift-detail .rs-fig-off { stroke: var(--color-accent); }

.rs-bars-wrap { display: grid; gap: var(--space-2); }
/* each bar is a 44 px wide tap target; the fill inside is narrower, so many reps still read as separate bars */
.rs-bars { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: flex-end; overflow-x: auto; }
.rs-bar { flex: 1 0 var(--target-min); display: grid; justify-items: center; gap: var(--space-1); }
.rs-bar button { width: 100%; min-width: var(--target-min); height: 56px; display: flex; align-items: flex-end; justify-content: center;
  padding: 0; border: 0; background: transparent; cursor: pointer; }
.rs-bar-fill { display: block; width: 80%; border-radius: 6px 6px 3px 3px; background: var(--color-accent); }
.rs-bar[data-state="focus"] .rs-bar-fill { background: var(--color-bad); }
.rs-bar[data-state="skipped"] .rs-bar-fill { background: var(--color-line); }
.rs-bar-label { font-size: var(--text-xs); color: var(--color-text-muted); }
.rs-bar[data-state="focus"] .rs-bar-label { color: var(--color-bad); }

.rs-drift { display: grid; gap: var(--space-2); }
.rs-drift-head { display: flex; align-items: center; justify-content: space-between; }
.rs-legend { font-size: var(--text-xs); color: var(--color-text-muted); }
.rs-legend::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: var(--radius-pill); background: var(--color-accent); }
.rs-drift-track { position: relative; height: 6px; border-radius: var(--radius-pill); background: var(--color-line); }
/* the mark is a 44 px tap target; the visible pill is its ::after */
.rs-drift-mark { position: absolute; top: calc(3px - var(--target-min) / 2); height: var(--target-min); min-width: var(--target-min);
  padding: 0; border: 0; background: transparent; cursor: pointer; transform: translateX(calc(-1 * var(--target-min) / 4)); }
.rs-drift-mark::after { content: ""; position: absolute; left: calc(var(--target-min) / 4); right: 0; top: 50%; height: 12px; min-width: 12px;
  transform: translateY(-50%); border-radius: var(--radius-pill); background: var(--color-accent); }

.rs-note-title { margin: 0 0 var(--space-2); color: var(--color-accent); font-size: var(--text-sm); font-weight: var(--weight-bold); }
.rs-note-text { margin: 0; }

.rs-actions { display: grid; gap: var(--space-2); }
.rs-actions .btn { width: 100%; min-height: var(--button-height); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* drift detail: the card a drift mark opens */
.rs-drift-mark[aria-expanded="true"]::after { box-shadow: 0 0 0 3px var(--color-accent-soft); }
.rs-drift-detail { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.rs-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--card-fill-raised); color: var(--color-accent); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.rs-pill::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--color-accent); }
.rs-rows { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.rs-rows dt { font-weight: var(--weight-semibold); }
.rs-rows dd { margin: 0; color: var(--color-text-muted); }
.rs-note-inner { background: var(--card-fill-raised); }
/* an open drift card carries the note, so the summary does not repeat it below */
.rs:has(.rs-drift-detail) > .rs-note { display: none; }

/* ----- result-redesign-additions.md ------------------------------------------------------------------------------- */
/* R4 the reveal: the grade lands on the ring once the count-up ends (transform and opacity only: no layout shift) */
@keyframes rs-grade-land { from { opacity: 0; transform: scale(1.8) rotate(-12deg); } to { opacity: 1; transform: none; } }

/* R3 the 3D bodies in the worst moment's card, in place of the stick figures */
.rs-mesh { display: grid; gap: var(--space-2); }
.rs-mesh-stage { aspect-ratio: 1; max-height: 340px; width: 100%; border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-surface); touch-action: pan-y; }
.rs-mesh-legend { margin: 0; display: flex; justify-content: center; gap: var(--space-4); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.rs-mesh-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: var(--radius-pill); }
.rs-mesh-ref::before { background: var(--mesh-trainer); opacity: 0.6; }
.rs-mesh-you { color: var(--color-accent); }
.rs-mesh-you::before { background: var(--mesh-you); }

/* R6 slots another session fills; empty ones take no room */
.rs-export:empty, .sr-voice-slot:empty, .sr-second-opinion:empty, .hm-slot:empty { display: none; }
/* the fault card is the li: the row button fills it and the voice slot sits inside it, after the chips */
body .simon-result .sr-fault-item { display: grid; border: 1px solid var(--sr-line); border-radius: 16px; background: var(--card-fill);
  overflow: hidden; transition: background 0.12s ease, border-color 0.12s ease; }
body .simon-result .sr-fault-item > .sr-fault { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body .simon-result .sr-fault-item:has(> .sr-fault:hover) { background: var(--card-fill-raised); }
body .simon-result .sr-fault-item:has(> .sr-fault[aria-pressed="true"]) { border-color: var(--sr-hot);
  background: color-mix(in srgb, var(--sr-hot) 10%, var(--sr-surface)); box-shadow: inset 4px 0 0 var(--sr-hot); }
body .simon-result .sr-fault-item > .sr-voice-slot { padding: 0 16px 14px; }
/* "Low confidence": the coral text on its soft fill (result.css had dark text on a dark fill, unreadable on the brand theme) */
body .simon-result .sr-chip.sr-low { color: var(--color-bad); background: var(--color-bad-soft); border: 1px solid var(--color-bad-line); }
/* any scroll to a part of the result (a seek, a module's own scrollIntoView) stops below the sticky header */
.simon-result :is(section, li, .sr-zone, [data-at-s]) { scroll-margin-top: var(--header-height); }

/* R1 "How this was made": the Meta models that ran, as a pipeline per clip */
.hm { display: grid; gap: var(--space-4); margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); border: 1px solid var(--color-line); }
.hm-head { display: grid; gap: var(--space-1); }
.hm-eyebrow { margin: 0; color: var(--color-text-muted); font: var(--weight-medium) var(--text-sm)/1.2 var(--font-sans); }
.hm-title { margin: 0; font-size: var(--text-lg); line-height: 1.15; }
.hm-made { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.hm-group { display: grid; gap: var(--space-2); }
.hm-clip { margin: 0; color: var(--color-text-muted); font: var(--weight-medium) var(--text-sm)/1.2 var(--font-sans); }
.hm-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.hm-step { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); padding-bottom: var(--space-3); }
.hm-step:last-child { padding-bottom: 0; }
/* the line between the dots: one clip's models ran one after the other */
.hm-step:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--color-line); }
.hm-dot { width: 20px; height: 20px; margin-top: 1px; border-radius: var(--radius-pill); border: 2px solid var(--color-line); background: var(--color-bg); }
.hm-step[data-tone="ran"] .hm-dot { border-color: var(--color-accent); background: var(--color-accent); box-shadow: inset 0 0 0 4px var(--color-bg); }
.hm-step[data-tone="fallback"] .hm-dot { border-color: var(--color-warn); }
.hm-body { display: grid; gap: 2px; min-width: 0; }
.hm-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.hm-model { font-weight: var(--weight-semibold); font-size: var(--text-md); }
.hm-pill { padding: 3px var(--space-2); border-radius: var(--radius-pill); font: var(--weight-semibold) var(--text-xs)/1.2 var(--font-sans);
  color: var(--color-text-muted); background: var(--card-fill-raised); border: 1px solid var(--color-line); }
.hm-step[data-tone="ran"] .hm-pill { color: var(--color-accent); background: var(--color-accent-soft); border-color: transparent; }
.hm-step[data-tone="fallback"] .hm-pill { color: var(--color-warn); background: var(--color-warn-soft); border-color: var(--color-warn-line); }
.hm-time { margin-left: auto; color: var(--color-text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.hm-task { margin: 0; font-size: var(--text-sm); }
.hm-detail { margin: 0; color: var(--color-text-muted); font-size: var(--text-xs); }
.hm-step[data-tone="quiet"] .hm-model, .hm-step[data-tone="quiet"] .hm-task { color: var(--color-text-muted); }
.hm-total { margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--color-line); color: var(--color-text-muted); font-size: var(--text-sm); }

/* R5 the stage: the video with the 3D compare right under it, short enough that both fit one phone screen */
.simon-result .sr-stage-zone { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); scroll-margin-top: var(--header-height); }
.simon-result .sr-stage-zone .sr-coach { position: relative; margin-bottom: 0; }
/* the coach stage on a follow take: the trainer's video left of yours, the same height, each half the width (390 px fits) */
.sr-coach-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); padding: var(--space-2) var(--space-2) 0; }
.sr-coach-pair[data-single="true"] { grid-template-columns: 1fr; }
.sr-coach-pane { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.sr-coach-pair .sr-video-frame { border-radius: var(--radius-md); overflow: hidden; }
.sr-coach-pair .sr-video { width: 100%; height: 28vh; max-height: none; object-fit: contain; }
.sr-coach-label { font-size: var(--text-xs); color: var(--color-text-muted); text-align: center; }
.sr-coach-pane[data-who="you"] .sr-coach-label { color: var(--color-accent); }
@media (min-width: 720px) { .sr-coach-pair .sr-video { height: 36vh; } }
/* "Stop replaying": the pressed replay button takes the accent, not the old theme's amber */
.simon-result .sr-worst[aria-pressed="true"] { border-color: var(--color-accent); color: var(--color-accent); }
.simon-result .sr-stage-zone .sr-stage { aspect-ratio: auto; height: 30vh; min-height: 200px; max-height: 420px; }

/* R2 the skeleton over your video */
.simon-result .sv-host { position: relative; }
.sv-skel { position: absolute; pointer-events: none; }
.sv-toggle { min-height: var(--target-min); padding: 0 var(--space-3); }
.sv-toggle[aria-pressed="false"] { color: var(--color-text-muted); }

/* result-intent.md R2: how the score adds up, under the ring */
.rs-sum { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.45; text-wrap: pretty;
  font-variant-numeric: tabular-nums; }
/* R1: a mark that holds several moments shows how many */
.simon-result .sr-mark-count { position: absolute; top: var(--space-1); right: var(--space-1); min-width: 18px; height: 18px;
  padding: 0 var(--space-1); border-radius: var(--radius-pill); background: var(--color-bg); color: var(--color-text);
  font: var(--weight-semibold) var(--text-xs)/18px var(--font-sans); text-align: center; pointer-events: none; }

/* Side by side (views/side-by-side.js): the trainer's and the follower's original videos with one play button */
.sbs { background: var(--card-fill); border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: var(--space-4); margin: 0 0 var(--space-4); color: var(--color-text); }
.sbs h2 { margin: 0 0 var(--space-1); font-size: 18px; }
.sbs-hint, .sbs-note { margin: 0 0 var(--space-3); color: var(--color-text-muted); font-size: 14px; }
.sbs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.sbs-player { margin: 0; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.sbs-video { width: 100%; aspect-ratio: 9 / 16; max-height: 60vh; object-fit: contain; background: var(--color-bg); border-radius: var(--radius-md); }
.sbs-label { font-size: 13px; color: var(--color-text-muted); text-align: center; }
.sbs-player:last-child .sbs-label { color: var(--color-accent); }
.sbs-controls { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0; }
.sbs-play { flex: none; min-height: 44px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-on-accent); font-weight: 600; cursor: pointer; }
.sbs-seek { flex: 1; min-width: 0; accent-color: var(--color-accent); }
.sbs-time { flex: none; font-variant-numeric: tabular-nums; color: var(--color-text-muted); font-size: 13px; }
.sbs-sound { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.sbs-sound legend { float: left; margin-right: var(--space-2); color: var(--color-text-muted); font-size: 13px; }
.sbs-sound-option { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; font-size: 14px; }
.sbs-sound-option:has(input:disabled) { color: var(--color-text-muted); }
.sbs-note { width: 100%; margin: 0; }
@media (max-width: 420px) { .sbs { padding: var(--space-3); } .sbs-grid { gap: var(--space-2); } }

/* the measured stage split (judge-take.md, TICKET-260): one strip per job, under "How this was made" */
.ss { margin: var(--space-3) 0; padding: var(--space-3); border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-surface); }
.ss-title { font-size: 16px; margin: 0 0 var(--space-2); }
.ss-list { display: grid; gap: var(--space-1); margin: 0; }
.ss-row { display: flex; justify-content: space-between; gap: var(--space-3); }
.ss-row dt { color: var(--color-text-muted); }
.ss-row dd { margin: 0; color: var(--color-text); font-variant-numeric: tabular-nums; }
.ss[data-recorded="false"] .ss-row dt { color: var(--color-text); }
/* TICKET-266: text in another language. The row follows the text direction; times and counts keep their own left-to-right order, so numbers are not mirrored. */
body .simon-result .sr-fault-list[dir] .sr-fault { text-align: start; }
body .simon-result .sr-fault-list[dir="rtl"] .sr-chip { direction: ltr; unicode-bidi: isolate; }
body .simon-result .sr-lang-note { margin: var(--space-1, 4px) 0; font-size: .875rem; opacity: .85; overflow-wrap: anywhere; }
/* Part 5's credit score (model/score-credit.js): "Show score as [ % ] [ Points ]" and the level, under the ring */
.rs-switches { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.rs-switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.rs-switch-label { color: var(--color-text-muted); font-size: var(--text-sm); }
.rs-switch button { min-width: var(--target-min); padding: 0 var(--space-3); }
/* points run to five digits: a smaller number keeps them inside the ring */

/* The score, once, at the top of the result (views/result-summary.js scoreBar): the grade, the headline over a bar that
   fills to the score past the grade marks, and the score, which a tap shows as % or points. On the first paint the bar
   starts slowly, then the score grows big and settles and the grade lands. Lime for A to C, pink for D and F. */
.rs-score-top { display: block; width: 100%; margin-bottom: var(--space-4); }
.rs-meter { --fill: var(--frac); box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-line); border-radius: var(--radius-lg); background: var(--card-fill); }
.rs-meter-grade { flex: none; min-width: 1ch; color: var(--color-pink); font: 400 var(--meter-grade)/1 var(--font-display); text-align: center;
  -webkit-text-stroke: var(--meter-grade-stroke) currentColor; paint-order: stroke fill; }   /* a little bolder than Regular; Sniglet has no middle weight */
.rs-meter-main { flex: 1; min-width: 0; display: grid; gap: var(--space-1); }
.rs-meter-main .rs-title { font-size: var(--text-md); }
.rs-meter-track { position: relative; height: var(--meter-h); margin-top: var(--space-4); border-radius: var(--radius-pill); background: var(--color-line); }
.rs-meter-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--fill) * 100%); border-radius: inherit; background: var(--color-accent);
  box-shadow: 0 0 var(--meter-glow) var(--color-accent); }
.rs-meter[data-grade="D"] .rs-meter-fill, .rs-meter[data-grade="E"] .rs-meter-fill, .rs-meter[data-grade="F"] .rs-meter-fill { background: var(--color-pink); box-shadow: 0 0 var(--meter-glow) var(--color-pink); }
.rs-meter-mark { position: absolute; left: calc(var(--at) * 100%); top: calc(var(--meter-h) * -0.75); bottom: calc(var(--meter-h) * -0.75);
  width: 2px; background: var(--color-text-muted); opacity: 0.5; }
.rs-meter-mark-label { position: absolute; bottom: calc(100% + 4px); left: 50%; translate: -50% 0; font: var(--weight-semibold) var(--text-xs)/1 var(--font-sans);
  color: var(--color-text-muted); }
.rs-meter-mark[data-reached="true"] { opacity: 1; background: var(--color-text); }
.rs-meter-mark[data-start="true"] { background: transparent; }
.rs-meter-mark[data-reached="true"] .rs-meter-mark-label { color: var(--color-text); }
.rs-meter-score { flex: none; min-width: 6ch; display: grid; justify-items: end; gap: var(--space-1); padding: var(--space-1) var(--space-2);
  border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; font: inherit; }
.rs-meter-value { display: inline-block; font: 400 var(--meter-score)/1 var(--font-display); color: var(--color-accent);
  -webkit-text-stroke: var(--meter-grade-stroke) currentColor; paint-order: stroke fill; transform-origin: right center; }
.rs-meter[data-grade="D"] .rs-meter-value, .rs-meter[data-grade="E"] .rs-meter-value, .rs-meter[data-grade="F"] .rs-meter-value { color: var(--color-pink); }
.rs-units { display: inline-flex; margin-top: var(--space-1); padding: 2px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); }
.rs-unit { min-height: var(--target-min); min-width: var(--target-min); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--color-text-muted); font: var(--weight-semibold) var(--text-xs)/1 var(--font-sans); cursor: pointer; }
.rs-unit[aria-pressed="true"] { background: var(--color-accent); color: var(--color-on-accent); }
.rs-unit:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.rs-meter-caption { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.rs-meter[data-reveal="playing"] .rs-meter-value { opacity: 0.8; }
.rs-meter[data-reveal="playing"] .rs-meter-grade { opacity: 0; transform: scale(1.8); }
.rs-meter[data-reveal="done"] .rs-meter-value { animation: rs-meter-land var(--meter-land) var(--ease-out) both; }
.rs-meter[data-reveal="done"] .rs-meter-grade { animation: rs-grade-land var(--meter-land) var(--ease-out) both; }
@keyframes rs-meter-land { 0% { transform: scale(1); } 45% { transform: scale(1.6); } 100% { transform: scale(1); } }
@media (max-width: 520px) {
  .rs-meter { flex-wrap: wrap; gap: var(--space-3); }
  .rs-meter-main { order: 3; flex-basis: 100%; }
  .rs-meter-score { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .rs-meter[data-reveal] .rs-meter-value, .rs-meter[data-reveal] .rs-meter-grade { animation: none; opacity: 1; transform: none; } }
