/* Flamm — a practice-room instrument: slate rack panel, brass for controls,
   and one fixed colour language for time: cyan = early, green = in the pocket, coral = late. */

:root {
  color-scheme: dark;
  --bg: #101216;
  --surface: #181b22;
  --surface2: #20242d;
  --surface3: #2a2f3a;
  --line: #2a2f3a;
  --faint: #3b4252;
  --fg: #ece8df;
  --muted: #9198a8;
  --brass: #e8b84a;
  --brass-hi: #f5cf73;
  --brass-ink: #1b1505;
  --early: #57c7ff;
  --pocket: #6fe3a5;
  --late: #ff7d5c;
  --miss: #ff4d6d;
  --warn: #f2c14e;
  --head: #e9e3d6;
  --wood: #dc9462;
  --kick: #b9a0e6;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 12px;
  --lab: 34px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
h2 { font: 600 13px/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
kbd { font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 4px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .14); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.grow { flex: 1 1 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 11.5px; }
.early { color: var(--early); }
.late { color: var(--late); }
.pocket { color: var(--pocket); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: rgba(16, 18, 22, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--brass); font: 700 24px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand-dot { fill: var(--pocket); }
.tabs { display: flex; gap: 2px; }
.tab { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.tab:hover { color: var(--fg); background: var(--surface); }
.tab.on { color: var(--fg); background: var(--surface2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.goal { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.goal svg { transform: rotate(-90deg); }
.goal-bg { fill: none; stroke: var(--surface3); stroke-width: 5; }
.goal-fg { fill: none; stroke: var(--brass); stroke-width: 5; stroke-linecap: round; }
.goal.done { color: var(--pocket); }
.goal.done .goal-fg { stroke: var(--pocket); }
.chip { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); max-width: 240px; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.chip.on { color: var(--fg); }
.chip.on .dot { background: var(--pocket); box-shadow: 0 0 0 3px rgba(111, 227, 165, .18); }
.chip:hover { border-color: var(--faint); color: var(--fg); }

main { max-width: 1352px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
.view { display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.cap { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 70ch; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px;
  background: var(--surface3); color: var(--fg); border: 1px solid transparent; white-space: nowrap;
}
.btn:hover { background: var(--faint); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--fg); font-weight: 500; }
.btn.quiet:hover { border-color: var(--faint); background: var(--surface2); }
.btn.quiet[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); }
.btn.primary { background: var(--brass); color: var(--brass-ink); }
.btn.primary:hover { background: var(--brass-hi); }
.btn.danger { color: var(--late); }
.icon { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--muted); }
.icon:hover { background: var(--surface3); color: var(--fg); }
.icon.on { color: var(--brass); background: rgba(232, 184, 74, .14); }
.icon.armed { width: auto; padding: 0 8px; color: var(--late); font-size: 12px; font-weight: 600; }

select, input[type="number"], input[type="text"], .pat-name {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0;
}
select { padding-right: 28px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239198a8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select:hover, input[type="number"]:hover { border-color: var(--faint); }
input[type="range"] { accent-color: var(--brass); width: 100%; min-width: 0; }
.opt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.opt > span { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { accent-color: var(--brass); width: 16px; height: 16px; }

/* ---------- transport ---------- */
.transport { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 22px; align-items: center; }
.play {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; row-gap: 4px;
  padding: 14px 22px 12px 18px; min-width: 164px; border-radius: 14px;
  background: var(--brass); color: var(--brass-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 22px -10px rgba(232, 184, 74, .7);
}
.play:hover { background: var(--brass-hi); }
.play-ico { grid-row: 1 / 3; width: 0; height: 0; border-left: 22px solid currentColor; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 4px; }
.play-txt { font: 700 30px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.play kbd { justify-self: start; background: rgba(0, 0, 0, .14); border-color: rgba(0, 0, 0, .2); }
.is-practice .play { background: transparent; color: var(--late); box-shadow: 0 0 0 2px var(--late) inset; }
.is-practice .play:hover { background: rgba(255, 125, 92, .1); }
.is-practice .play-ico { width: 24px; height: 24px; border: 0; background: currentColor; border-radius: 4px; margin-left: 0; }
.is-practice .play kbd { background: transparent; border-color: currentColor; }

.tempo { display: flex; flex-direction: column; gap: 6px; width: 290px; }
.tempo-main { display: flex; align-items: center; gap: 8px; }
.step { width: 38px; height: 38px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line); font: 600 22px/1 var(--display); flex: none; }
.step:hover { background: var(--surface3); }
.bpm-box { display: flex; align-items: baseline; gap: 6px; flex: 1; justify-content: center; }
.bpm-box input { width: 3ch; background: none; border: 0; padding: 0; text-align: right; font: 700 60px/0.9 var(--display); font-variant-numeric: tabular-nums; color: var(--fg); border-radius: 6px; }
.bpm-box input:hover { background: var(--surface2); }
.bpm-box span { font: 600 13px/1 var(--body); letter-spacing: .1em; color: var(--muted); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px 12px; align-items: end; }
.opts input[type="range"] { height: 34px; }

/* ---------- coach strip: the top finding of the last run, where the next run starts ---------- */
.coach-strip { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.coach-strip .ins-tag { flex: none; }
.coach-strip p { flex: 1; min-width: 0; font-size: 14.5px; }
.coach-strip p b { font-weight: 600; }
.coach-strip p span { color: var(--muted); }
.coach-strip.hi .ins-tag { background: var(--late); color: #2b0d05; }
.coach-strip.mid .ins-tag { background: var(--warn); color: #2a1e02; }
.coach-strip.next .ins-tag { background: var(--brass); color: var(--brass-ink); }
.pat-stats { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- live ---------- */
.live { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; align-items: stretch; }
.meter-panel { padding: 14px 0 6px; display: flex; flex-direction: column; }
.meter-head { display: flex; align-items: center; gap: 12px; padding: 0 16px 4px; min-height: 24px; }
.phase { font-size: 12px; font-weight: 600; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; background: var(--surface2); color: var(--muted); font-variant-numeric: tabular-nums; }
.phase.on { color: var(--fg); background: var(--surface3); }
.phase.fill { color: var(--brass-ink); background: var(--wood); }
.phase.gap { box-shadow: 0 0 0 1.5px var(--brass) inset; }
.last { font: 600 15px/1 var(--mono); font-variant-numeric: tabular-nums; }
.leds { display: inline-flex; gap: 6px; align-items: center; }
.leds i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface3); }
.leds i.on { background: var(--fg); box-shadow: 0 0 0 3px rgba(236, 232, 223, .15); }
.leds i:first-child.on { background: var(--brass); box-shadow: 0 0 0 3px rgba(232, 184, 74, .25); }
.bpm-box.ramp input { color: var(--brass); }
.keys-hint { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 13px; padding: 0 4px; }
.keys-hint span { display: inline-flex; align-items: center; gap: 5px; }
.meter-wrap { position: relative; flex: 1 1 auto; min-height: 128px; }
.hint { color: var(--muted); font-size: 13px; text-align: right; }
#meter { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.countin {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(24, 27, 34, .78); color: var(--brass);
  font: 700 clamp(64px, 12vw, 104px)/1 var(--display); font-variant-numeric: tabular-nums;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .tl { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile b { font: 700 36px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tile b em { font-style: normal; font-size: 20px; color: var(--muted); }
.tile small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-score { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
.tile-score b { font-size: 56px; color: var(--brass); }

/* ---------- builder ---------- */
.builder-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pat-name { font: 600 22px/1.1 var(--display); letter-spacing: .02em; width: 250px; background: transparent; border-color: transparent; padding: 6px 8px; margin-left: -8px; }
.pat-name:hover { border-color: var(--line); }
.pat-name:focus { background: var(--surface2); border-color: var(--line); }
.about { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 80ch; }
.focus-banner { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 8px; background: rgba(232, 184, 74, .1); color: var(--brass); font-weight: 500; }
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 14px; margin-top: 14px; }
.bars.single { grid-template-columns: minmax(0, 860px); }
.bar { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; background: rgba(0, 0, 0, .14); min-width: 0; transition: opacity .15s; }
.bar.fill { border-color: rgba(220, 148, 98, .6); }
.bar.dim { opacity: .38; }
.bar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 30px; }
.bar-num { font: 700 20px/1 var(--display); color: var(--muted); width: 24px; text-align: center; }
.bar-type { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.bar.fill .bar-type { color: var(--wood); }
.seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; font-size: 12px; font-weight: 600; }
.seg span { padding: 4px 9px; color: var(--muted); }
.seg span.on { background: var(--surface3); color: var(--fg); }
.bar.fill .seg span.on { background: var(--wood); color: var(--brass-ink); }
select.mini { padding: 4px 26px 4px 8px; font-size: 12px; font-weight: 500; }

.row { display: grid; grid-template-columns: var(--lab) repeat(var(--beats), minmax(0, 1fr)); align-items: stretch; }
.row + .row { margin-top: 3px; }
.lab { font: 600 13px/1 var(--display); letter-spacing: .06em; color: var(--muted); display: grid; place-items: center start; padding-left: 2px; }
button.lab:hover { color: var(--fg); }
.beat-h { display: flex; align-items: baseline; gap: 5px; padding: 2px 0 5px 6px; border-left: 1px solid var(--faint); text-align: left; color: var(--muted); min-width: 0; }
.beat-h b { font: 700 15px/1 var(--display); color: var(--fg); }
.beat-h i { font: 400 10px/1 var(--mono); font-style: normal; padding: 2px 4px; border-radius: 4px; border: 1px solid var(--line); }
button.beat-h:hover i { color: var(--brass); border-color: var(--brass); }
.is-practice .beat-h i { border-color: transparent; }
.beat-h.now b { color: var(--brass); }
.beat { display: grid; grid-template-columns: repeat(var(--div), minmax(0, 1fr)); gap: 2px; padding: 0 2px 0 3px; border-left: 1px solid var(--faint); }

.cell { position: relative; height: 28px; border-radius: 5px; background: var(--surface2); min-width: 0; }
.beat .cell:first-child { background: var(--surface3); }
.cell:hover { box-shadow: 0 0 0 1px var(--faint) inset; }
.cell i { position: absolute; inset: 0; margin: auto; pointer-events: none; }
.lane { --c: var(--brass); }
.fam-snare { --c: var(--head); }
.fam-tom { --c: var(--wood); }
.fam-kick { --c: var(--kick); }
.cell.lv2, .beat .cell.lv2:first-child { background: color-mix(in srgb, var(--c) 78%, #000); }
.cell.lv3, .beat .cell.lv3:first-child { background: var(--c); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset; }
.cell.lv3 i { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid rgba(0, 0, 0, .6); }
.cell.lv1 i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); opacity: .9; }
.cell.now { box-shadow: 0 0 0 1.5px rgba(236, 232, 223, .55) inset; }
.cell.lv0.now { background: var(--faint); }
.is-practice .cell, .is-practice .bar-head button, .is-practice .bar-head select, .is-practice button.beat-h { cursor: default; }
.is-practice .bar-head .icon, .is-practice select.mini { opacity: .35; pointer-events: none; }

/* live feedback: a tick shows where the hit landed inside its window */
.cell.fb::after { content: ""; position: absolute; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; left: calc(50% + var(--off, 0) * 46% - 1.5px); background: var(--k); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.cell.fb { outline: 2px solid var(--k); outline-offset: -1px; }
.fb-pocket { --k: var(--pocket); }
.fb-early { --k: var(--early); }
.fb-late { --k: var(--late); }
.cell.fb-miss { --k: var(--miss); opacity: .45; }
.cell.fb-miss::after { display: none; }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 16px; height: 16px; border-radius: 4px; display: inline-block; position: relative; }
.lg.lv2 { background: color-mix(in srgb, var(--brass) 78%, #000); }
.lg.lv3 { background: var(--brass); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset; }
.lg.lv1 { background: var(--surface2); }
.lg.lv1::after { content: ""; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--brass); }

/* ---------- report ---------- */
.r-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 20px 22px; }
.ring { position: relative; width: 128px; height: 128px; --k: var(--pocket); }
.ring.warn { --k: var(--warn); }
.ring.bad { --k: var(--late); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface3); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--k); stroke-width: 9; stroke-linecap: round; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-in b { font: 700 50px/0.9 var(--display); font-variant-numeric: tabular-nums; }
.ring-in span { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--k); margin-top: 4px; }
.eyebrow { color: var(--muted); font-size: 13px; }
.eyebrow i { font-style: normal; opacity: .5; margin: 0 2px; }
.r-head h1 { font: 700 clamp(28px, 3.4vw, 40px)/1.05 var(--display); letter-spacing: .01em; margin: 6px 0 14px; text-wrap: balance; }
.keys { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.keys div { display: flex; flex-direction: column; gap: 2px; }
.keys b { font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.keys span { font-size: 12.5px; color: var(--muted); }
.r-actions { display: flex; flex-direction: column; gap: 8px; }
.r-two { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.r-two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.r-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.r-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }

.coach h2.sub { margin-top: 22px; }
.ins-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ins { background: var(--surface2); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.ins h3 { font: 600 19px/1.2 var(--display); letter-spacing: .01em; }
.ins p { color: #c4c2bb; font-size: 14.5px; max-width: 64ch; }
.ins .drill { color: var(--fg); }
.ins .drill b { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brass); margin-right: 5px; }
.ins .btn { margin-top: 3px; }
.ins-tag { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface3); color: var(--muted); }
.ins.hi .ins-tag { background: var(--late); color: #2b0d05; }
.ins.mid .ins-tag { background: var(--warn); color: #2a1e02; }
.ins.next .ins-tag { background: var(--brass); color: var(--brass-ink); }
.ins.good { background: transparent; border: 1px solid var(--line); }
.ins.good .ins-tag { background: rgba(111, 227, 165, .16); color: var(--pocket); }
.btn.more { margin-top: 10px; }

.aspects .asp { display: grid; grid-template-columns: 118px minmax(0, 1fr) 34px; column-gap: 12px; align-items: center; margin-top: 13px; }
.asp-name { font-weight: 500; }
.asp-bar { height: 8px; border-radius: 4px; background: var(--surface3); overflow: hidden; }
.asp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--pocket); }
.asp-bar i.warn { background: var(--warn); }
.asp-bar i.bad { background: var(--late); }
.asp b { font: 700 20px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.asp small { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; margin-top: 2px; min-height: 2px; }
.aspects p.small { margin-top: 14px; }

.chart { margin-top: 10px; overflow: hidden; }
.chart svg { display: block; max-width: 100%; height: auto; }
.tk { font: 10.5px var(--mono); fill: var(--muted); }
.tk.early { fill: var(--early); }
.tk.late { fill: var(--late); }
.tk.bpm { fill: var(--brass); }
.lbl { font: 600 12px var(--body); }
.lbl.early { fill: var(--early); } .lbl.late { fill: var(--late); } .lbl.pocket { fill: var(--pocket); }
.z-good { fill: rgba(111, 227, 165, .05); }
.z-perfect { fill: rgba(111, 227, 165, .1); }
.ax, .grid { stroke: var(--line); stroke-width: 1; }
.zero { stroke: rgba(236, 232, 223, .45); stroke-width: 1; }
.third { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 4; }
.hb.early, .od.early { fill: var(--early); }
.hb.late, .od.late { fill: var(--late); }
.hb.pocket, .od.pocket { fill: var(--pocket); }
.mean { stroke-width: 2; stroke-dasharray: 4 3; }
.mean.early, .whisk.early { stroke: var(--early); } .mean.late, .whisk.late { stroke: var(--late); } .mean.pocket, .whisk.pocket { stroke: var(--pocket); }
.whisk { stroke-width: 2; opacity: .4; stroke-linecap: round; }
.sb.good { fill: var(--pocket); } .sb.warn { fill: var(--warn); } .sb.bad { fill: var(--late); }
.sb { opacity: .85; }
.bg-fill { fill: rgba(220, 148, 98, .16); }
.bg-gap { fill: rgba(236, 232, 223, .07); }
.oline { fill: none; stroke: rgba(236, 232, 223, .3); stroke-width: 1.25; }
.od { stroke: var(--surface); stroke-width: 1; }
.area { fill: rgba(232, 184, 74, .08); }
.trend { fill: none; stroke: var(--brass); stroke-width: 2; stroke-linejoin: round; }
.pt { stroke: var(--surface); stroke-width: 1.5; }
.pt.good { fill: var(--pocket); } .pt.warn { fill: var(--warn); } .pt.bad { fill: var(--late); }
.key { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; white-space: nowrap; }
.key::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--kc); }
.k-fill { --kc: rgba(220, 148, 98, .5); } .k-gap { --kc: rgba(236, 232, 223, .25); }
.k-early { --kc: var(--early); } .k-late { --kc: var(--late); } .k-pocket { --kc: var(--pocket); } .k-miss { --kc: var(--miss); }

.orows { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.orow { display: grid; grid-template-columns: minmax(64px, 104px) minmax(0, 1fr) 40px 40px 34px; column-gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.orow.oh { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.orow.oh > span { text-align: right; }
.o-scale { display: flex; justify-content: space-between; font-family: var(--mono); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.o-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-name em { font-style: normal; color: var(--muted); font-size: 12px; }
.o-track { position: relative; height: 18px; border-radius: 4px; background: var(--surface2); }
.o-zone { position: absolute; top: 0; bottom: 0; background: rgba(111, 227, 165, .13); }
.o-mid { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: rgba(236, 232, 223, .45); }
.o-sd { position: absolute; top: 7px; height: 4px; border-radius: 2px; background: currentColor; opacity: .45; min-width: 2px; }
.o-dot { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px var(--surface); }
.o-ms, .o-pm, .o-sc { text-align: right; font: 500 12.5px var(--mono); }
.o-pm { color: var(--muted); }
.o-sc { font: 700 17px/1 var(--display); }
.o-sc.good { color: var(--pocket); } .o-sc.warn { color: var(--warn); } .o-sc.bad { color: var(--late); }
.o-none { grid-column: 3 / 5; text-align: right; color: var(--miss); font-size: 12px; }
.mini-h { font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 20px; }
.pairs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pairs li { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.pairs li span { flex: 1; min-width: 0; }
.pairs li b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pairs li small { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }

.vrows { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.vrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 30px 34px; column-gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.v-track { position: relative; height: 18px; border-radius: 4px; background: var(--surface2); }
.v-zone { position: absolute; top: 0; bottom: 0; background: rgba(232, 184, 74, .16); }
.v-sd { position: absolute; top: 7px; height: 4px; border-radius: 2px; background: var(--fg); opacity: .4; }
.v-dot { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 0 2px var(--surface); }
.vrow b { font: 700 17px/1 var(--display); text-align: right; }
.vrow small { color: var(--muted); font: 12px var(--mono); }

.heat .bar { background: transparent; }
.hc { height: 28px; border-radius: 5px; background: rgba(255, 255, 255, .025); display: grid; place-items: center; font: 600 10.5px var(--mono); color: #0c0e12; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.hc.early { background: color-mix(in srgb, var(--early) calc(var(--a) * 100%), var(--surface2)); }
.hc.late { background: color-mix(in srgb, var(--late) calc(var(--a) * 100%), var(--surface2)); }
.hc.pocket { background: color-mix(in srgb, var(--pocket) 62%, var(--surface2)); }
.hc.miss { background: transparent; box-shadow: 0 0 0 1.5px var(--miss) inset; color: var(--miss); font-size: 13px; }
.hc.holes { box-shadow: 0 0 0 2px var(--miss) inset; }

.empty { padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h1 { font: 700 34px/1.1 var(--display); }
.empty p { color: var(--muted); max-width: 58ch; }

/* ---------- progress ---------- */
.pg-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cal { display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); gap: 4px; margin-top: 14px; max-width: 420px; }
.cal-col { display: grid; grid-template-rows: repeat(7, auto); gap: 4px; }
.cal-d { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--surface2); }
.cal-d.lf { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; opacity: .5; }
.cal-d.l1 { background: color-mix(in srgb, var(--brass) 28%, var(--surface2)); }
.cal-d.l2 { background: color-mix(in srgb, var(--brass) 52%, var(--surface2)); }
.cal-d.l3 { background: color-mix(in srgb, var(--brass) 80%, var(--surface2)); }
.cal-d.l4 { background: var(--brass-hi); }
.log { margin-top: 12px; overflow-x: auto; }
.log-row { display: grid; grid-template-columns: 124px minmax(140px, 1.1fr) 64px 58px 50px 50px 56px minmax(180px, 2fr) 112px; column-gap: 12px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; min-width: 940px; }
.log-row small { color: var(--muted); }
.log-h { border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.log-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-top { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-act { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.log-act .btn { padding: 4px 10px; font-size: 12.5px; }

/* ---------- setup ---------- */
.su-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.su-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-top: 14px; }
.form .opt.wide { flex: 1 1 240px; }
.form .opt input[type="number"] { width: 110px; }
.note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface2); font-size: 14px; }
.note.bad { background: rgba(255, 125, 92, .1); color: #ffc2b2; }
.monitor { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface2); display: flex; align-items: baseline; gap: 12px; }
.monitor .tl { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.monitor b { font: 500 13px var(--mono); }
.map { margin-top: 12px; display: flex; flex-direction: column; }
.map-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.map-row.solo { border-top: 0; margin-top: 10px; padding: 0; }
.check.block { margin-top: 12px; }
.map-row.learning { background: rgba(232, 184, 74, .08); box-shadow: -8px 0 0 rgba(232, 184, 74, .08), 8px 0 0 rgba(232, 184, 74, .08); }
.map-name { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.map-name em { font: 600 12px/1 var(--display); font-style: normal; letter-spacing: .06em; color: var(--muted); width: 22px; }
.map-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 8px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--line); font: 500 12.5px var(--mono); }
.tag small { color: var(--muted); }
.tag:hover { border-color: var(--late); color: var(--late); }
.map-row .btn { padding: 5px 10px; font-size: 13px; }
.lat { display: grid; grid-template-columns: auto minmax(0, 1fr) 76px auto; gap: 12px; align-items: center; margin-top: 14px; }
.lat label { font-weight: 500; }
.lat output { font: 600 14px var(--mono); text-align: right; }
.taptest { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.taptest h3 { font: 600 15px/1.2 var(--body); }
.strict { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.strict-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); text-align: left; }
.strict-opt b { font: 600 17px/1.1 var(--display); letter-spacing: .02em; margin-bottom: 3px; }
.strict-opt span { font-size: 12px; color: var(--muted); }
.strict-opt:hover { border-color: var(--faint); }
.strict-opt.on { border-color: var(--brass); background: rgba(232, 184, 74, .1); }
.strict-opt.on b { color: var(--brass); }
.filebtn { position: relative; overflow: hidden; cursor: pointer; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 50; }
.toast { background: var(--fg); color: #14161b; font-weight: 600; padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .7); transition: opacity .4s, transform .4s; }
.toast.bad { background: var(--late); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .transport { grid-template-columns: auto minmax(0, 1fr); }
  .opts { grid-column: 1 / -1; }
  .tempo { width: auto; max-width: 340px; }
  .live { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tile-score { grid-column: auto; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
  .tile-score b { font-size: 36px; }
  .pg-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .r-two, .r-two.even, .su-grid { grid-template-columns: minmax(0, 1fr); }
  .r-hero { grid-template-columns: auto minmax(0, 1fr); }
  .r-actions { grid-column: 1 / -1; flex-direction: row; }
  .strict { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 8px 12px; }
  .tabs { order: 3; width: 100%; }
  .tab { flex: 1; padding: 8px 4px; }
  .goal span { display: none; }
  .transport { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .coach-strip { flex-wrap: wrap; }
  .coach-strip p { flex-basis: 100%; order: 2; }
  .coach-strip .btn { order: 3; }
  .play { width: 100%; justify-content: center; }
  .tempo { max-width: none; }
  .tiles, .pg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-score { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .pg-tiles .tile:first-child { grid-column: 1 / -1; }
  .tile b { font-size: 30px; }
  .r-hero { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .pat-name { width: 100%; }
  .cell, .hc { height: 30px; }
  .orow { grid-template-columns: 62px minmax(0, 1fr) 34px 34px 28px; column-gap: 6px; }
  .map-row { grid-template-columns: 112px minmax(0, 1fr) auto; }
  .lat { grid-template-columns: minmax(0, 1fr) 70px; }
  .lat label { grid-column: 1 / -1; }
  .taptest { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* =====================================================================
   Coach: Today, Skills, guided practice, tempo ladder, rudiment notation
   ===================================================================== */

.banner { padding: 10px 14px; border-radius: 10px; background: rgba(232, 184, 74, .12); color: var(--brass-hi); font-size: 14px; }
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars i { width: 14px; height: 14px; background: var(--surface3); clip-path: polygon(50% 2%, 62% 36%, 98% 36%, 69% 58%, 80% 93%, 50% 72%, 20% 93%, 31% 58%, 2% 36%, 38% 36%); }
.stars i.on { background: var(--brass); }
.btn.big { padding: 13px 22px; font-size: 17px; border-radius: 12px; }
.btn kbd { background: rgba(0, 0, 0, .16); border-color: rgba(0, 0, 0, .2); font-size: 10.5px; }
.btn.quiet kbd { background: rgba(255, 255, 255, .06); border-color: var(--line); }

/* ---------- today ---------- */
.today { padding: 22px; }
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.today-head h1 { font: 700 clamp(30px, 3.6vw, 44px)/1.05 var(--display); letter-spacing: .01em; margin: 6px 0 8px; }
.today-sub { color: #c4c2bb; max-width: 62ch; }
.today-act { display: flex; gap: 10px; align-items: center; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pstep { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--surface2); }
.pstep.now { background: var(--surface3); box-shadow: 0 0 0 1.5px var(--brass) inset; }
.pstep.done, .pstep.skipped { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; }
.s-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--display); background: var(--surface3); color: var(--muted); }
.pstep.now .s-num { background: var(--brass); color: var(--brass-ink); }
.pstep.done .s-num { background: rgba(111, 227, 165, .18); color: var(--pocket); }
.s-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.s-label i, .sk-name small i { font-style: normal; opacity: .5; margin: 0 2px; }
.pstep h3 { font: 600 21px/1.15 var(--display); letter-spacing: .01em; margin: 2px 0; }
.s-why { color: var(--muted); font-size: 13.5px; max-width: 74ch; }
.pstep.done .s-why, .pstep.skipped .s-why { display: none; }
.s-side { display: flex; align-items: center; gap: 10px; }
.s-out { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.s-out.ok { color: var(--pocket); } .s-out.no { color: var(--warn); } .s-out.skip { color: var(--muted); font: 500 13px var(--body); }
.s-out em { font: 600 11px var(--body); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }

.levels { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.level { border-radius: 10px; background: var(--surface2); }
.level summary { display: grid; grid-template-columns: 28px 120px minmax(0, 1fr) 90px 40px; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.level summary::-webkit-details-marker { display: none; }
.lv-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 15px/1 var(--display); background: var(--surface3); color: var(--muted); }
.level.cur .lv-n { background: var(--brass); color: var(--brass-ink); }
.level.done .lv-n { background: rgba(111, 227, 165, .18); color: var(--pocket); }
.lv-name { font: 600 18px/1 var(--display); letter-spacing: .02em; }
.lv-about { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-prog { height: 6px; border-radius: 3px; background: var(--surface3); overflow: hidden; }
.lv-prog i { display: block; height: 100%; background: var(--brass); border-radius: 3px; }
.level summary b { font: 600 13px var(--mono); text-align: right; color: var(--muted); }
.lv-items { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.lv-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; background: var(--surface); text-align: left; font-size: 14px; }
.lv-item:hover { box-shadow: 0 0 0 1px var(--faint) inset; }
.lv-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-item b { font: 700 16px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.near li { align-items: center; }
.near .btn { padding: 4px 10px; font-size: 12.5px; }
.how ol { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: #c4c2bb; font-size: 14.5px; }
.how ol b { color: var(--fg); font-weight: 600; }

/* ---------- skills ---------- */
.sk-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sk-head h1 { font: 700 34px/1.05 var(--display); }
.sk-head .cap b { color: var(--fg); }
.sk-tot { display: flex; gap: 28px; }
.sk-tot div { display: flex; flex-direction: column; gap: 2px; }
.sk-tot b { font: 700 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.sk-tot b em { font-style: normal; font-size: 17px; color: var(--muted); }
.sk-tot span { font-size: 12.5px; color: var(--muted); }
.sk-list { margin-top: 8px; display: flex; flex-direction: column; }
.sk-row { display: grid; grid-template-columns: minmax(170px, 1.3fr) 52px 76px minmax(150px, 1.2fr) 70px auto; gap: 16px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line); }
.sk-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sk-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-name small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-stick { font-family: var(--mono); letter-spacing: .04em; color: #c4c2bb; }
.sk-bpm { display: flex; flex-direction: column; }
.sk-bpm b { font: 700 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.sk-bpm small, .sk-track small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.sk-row.new .sk-bpm b { color: var(--muted); }
.sk-track { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.track { position: relative; height: 8px; border-radius: 4px; background: var(--surface3); }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--brass); }
.track-mark { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; border-radius: 1px; background: var(--faint); }
.track-mark.on { background: var(--brass-hi); }
.spark polyline { fill: none; stroke: var(--brass); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--brass-hi); }
.sk-act { display: flex; gap: 6px; }
.sk-act .btn { padding: 6px 12px; font-size: 13px; }
.ct-list { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 0 28px; }
.ct-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 44px 120px 64px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ct-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-row b { font: 700 20px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.ct-row small { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- guided practice ---------- */
.guide, .step-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 20px; }
.guide-kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.guide .ins-tag { background: var(--brass); color: var(--brass-ink); }
.guide h1, .step-result h1 { font: 700 clamp(26px, 3vw, 36px)/1.08 var(--display); letter-spacing: .01em; margin: 6px 0 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guide p, .step-result p { color: #c4c2bb; max-width: 76ch; }
.guide-tip { margin-top: 4px; color: var(--fg) !important; }
.guide-act, .sr-act { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.step-result .ins-tag.good { background: rgba(111, 227, 165, .18); color: var(--pocket); }
.step-result .ins-tag.warn { background: var(--warn); color: #2a1e02; }
.step-result.good h1 { color: var(--pocket); }
.step-result h1 .stars i { width: 22px; height: 22px; }
.sr-note { margin-top: 8px; }
.sr-note b { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--brass); margin-right: 5px; }
.sr-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; max-width: 520px; }
.sr-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; padding: 5px 0; border-top: 1px solid var(--line); }
.sr-list li b { font: 700 16px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.sr-list li.ok b { color: var(--pocket); } .sr-list li.no b { color: var(--warn); } .sr-list li.skip b { color: var(--muted); font: 500 13px var(--body); }

/* while the coach drives, the screen shows only what you need at the kit */
.is-guided .opts, .is-guided .coach-strip, .is-guided .builder-head, .is-guided .legend, .is-guided .keys-hint, .is-guided .pat-stats, .is-guided .about, .is-guided .focus-banner, .is-guided .tempo input[type="range"], .is-guided .tempo .step, .is-guided #tap { display: none !important; }
.is-guided .transport { grid-template-columns: auto auto; justify-content: start; }
.is-guided .tempo { width: auto; }
.is-guided .bpm-box input { pointer-events: none; }
.is-guided .bar-head { display: none; }
.is-guided .builder { padding-top: 6px; }
.is-guided .cell, .is-guided .st, .is-guided button.beat-h { cursor: default; }
.is-guided .beat-h i { border-color: transparent; }

/* ---------- tempo ladder ---------- */
.ladder { padding: 12px 16px 14px; }
.ladder-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ladder-sum, .ladder-best { color: var(--muted); font-size: 13px; }
.ladder-best { color: var(--brass-hi); }
.rungs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rung { min-width: 58px; padding: 7px 10px 6px; border-radius: 9px; background: var(--surface2); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rung b { font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.rung i { font: 500 11px/1 var(--mono); font-style: normal; color: var(--muted); }
.rung.pass { background: rgba(111, 227, 165, .14); }
.rung.pass b { color: var(--pocket); }
.rung.pass i { color: var(--pocket); opacity: .8; }
.rung.fail { background: rgba(255, 125, 92, .13); }
.rung.fail b { color: var(--late); }
.rung.fail i { color: var(--late); opacity: .85; }
.rung.now { background: var(--surface3); box-shadow: 0 0 0 2px var(--brass) inset; }
.rung.now b { color: var(--brass-hi); }
.rung.dim { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; }
.rung.dim b { color: var(--muted); font-weight: 600; }
.rungs.big .rung { min-width: 66px; padding: 10px 12px 8px; }
.rungs.big .rung b { font-size: 26px; }

.countin { flex-direction: column; gap: 6px; display: flex; align-items: center; justify-content: center; }
.countin b { font: inherit; }
.countin small { font: 500 15px/1.2 var(--body); color: var(--fg); letter-spacing: .02em; }
.countin.word b { font-size: clamp(44px, 7vw, 72px); letter-spacing: .03em; text-transform: uppercase; }
.countin.ok { color: var(--pocket); }
.countin.no { color: var(--late); }

/* ---------- rudiment notation: grace notes and sticking ---------- */
.cell.gr1::before, .cell.gr2::before, .lg.gr1::before, .lg.gr2::before { content: ""; position: absolute; left: 2px; top: 5px; bottom: 5px; width: 3px; border-radius: 2px; background: rgba(0, 0, 0, .62); }
.cell.gr2::before, .lg.gr2::before { width: 7px; background: linear-gradient(90deg, rgba(0, 0, 0, .62) 0 3px, transparent 3px 4px, rgba(0, 0, 0, .62) 4px 7px); }
.lg.gr1, .lg.gr2 { width: 20px; }
.row.stick { margin-top: 5px; }
.st { height: 22px; border-radius: 5px; font: 600 12px/1 var(--mono); color: var(--muted); background: transparent; min-width: 0; }
.st:hover { box-shadow: 0 0 0 1px var(--faint) inset; }
.st.R { color: var(--fg); background: var(--surface2); }
.st.L { color: var(--brass-hi); background: rgba(232, 184, 74, .12); }
.st.now { box-shadow: 0 0 0 1.5px rgba(236, 232, 223, .6) inset; background: var(--faint); }
.st.L.now { background: rgba(232, 184, 74, .32); }

@media (max-width: 900px) {
  .guide, .step-result { grid-template-columns: minmax(0, 1fr); }
  .guide-act, .sr-act { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .sk-row { grid-template-columns: minmax(0, 1fr) 52px 70px auto; row-gap: 6px; }
  .sk-track { grid-column: 1 / 4; grid-row: 2; }
  .sk-spark { display: none; }
  .level summary { grid-template-columns: 28px minmax(0, 1fr) 70px 40px; }
  .lv-about { display: none; }
}
@media (max-width: 640px) {
  .pstep { grid-template-columns: 30px minmax(0, 1fr); }
  .s-side { grid-column: 2; justify-content: flex-start; }
  .today-act { width: 100%; }
  .today-act .btn.big { flex: 1; }
  .sk-row { grid-template-columns: minmax(0, 1fr) 52px 56px; }
  .sk-act { grid-column: 1 / -1; }
  .sk-track { grid-column: 1 / -1; }
  .sk-tot { gap: 18px; }
  .ct-row { grid-template-columns: minmax(0, 1fr) 52px 40px; }
  .ct-row small, .ct-row .spark { display: none; }
  .tabs { overflow-x: auto; }
  .tab { flex: 0 0 auto; padding: 8px 10px; }
}
