:root {
  --canvas: #f4e4b7;
  --surface: #fff4d6;
  --paper: #fffbe9;
  --sage: #b9d79f;
  --sage-light: #e7f0d9;
  --peach: #f5bf92;
  --rose: #d96b78; /* shadows and decoration only: 3.0:1 on surface */
  --rose-strong: #a8414f; /* fills under surface text (5.4:1) and rose text on surface/paper/canvas */
  --rose-deep: #8e3442; /* rose text on sage or peach (4.9:1 on sage) */
  --ink: #28433a;
  --ink-soft: #3d5a4c;
  --muted: #566955; /* ≥4.5:1 on surface, paper, canvas and sage-light */
  --line: #9db591;
  --shadow: #365247;
  /* Type scale. 12px is only for uppercase labels; Jersey never goes below 16px. */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  /* Spacing rhythm */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  /* Controls: one family, two sizes. Small = chips, segmented, small buttons; medium = Hear it, Random. */
  --border: 2px;
  --border-thick: 3px;
  --control-sm: 36px;
  --control-md: 44px;
  --press: translate(2px, 2px);
  --press-ms: 120ms;
  --radius: 14px;
  --radius-small: 9px;
  --font-display: "Jersey 10", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body { margin: 0; background-color: var(--canvas); background-image: linear-gradient(rgba(40,67,58,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(40,67,58,.08) 1px, transparent 1px); background-size: 16px 16px; color: var(--ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; font-weight: 600; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
/* Controls fire on tap without the double-tap-zoom wait, and a long press doesn't select their labels. */
button, a, select, label, summary { touch-action: manipulation; }
button { -webkit-user-select: none; user-select: none; }
html { scroll-padding-top: 88px; } /* keeps focused/scrolled-to content clear of the sticky top bar */
/* One focus ring everywhere: ink is ≥6.5:1 against every surface it can sit on (the rose ring was 2.1–2.6:1). */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
h1, h2, p { margin-top: 0; }
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; color: var(--muted); font: 600 var(--text-xs) var(--font-body); white-space: nowrap; }
/* viewport-fit=cover paints edge to edge; content keeps clear of notches and rounded corners. */
.topbar, main, footer { --gutter: 48px; width: min(1080px, calc(100% - var(--gutter) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); margin: 0 auto; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 4; min-height: 68px; padding-top: env(safe-area-inset-top, 0px); display: flex; align-items: center; gap: 28px; border-bottom: 3px solid var(--ink); background: var(--canvas); }
.brand { display: flex; align-items: center; gap: 2px; color: var(--ink); font: 400 26px/1 var(--font-display); letter-spacing: .3px; text-decoration: none; }
.brand-name { display: flex; gap: 2px; } /* keeps the 2px between "chord" and "byte" */
.brand-accent { color: var(--rose); }
.brand-mark { width: 34px; height: 34px; margin-right: 8px; } /* the chord-box logo, shadow included */
.tabs { display: flex; gap: 6px; }
.tabs a { padding: 7px 12px; border: 2px solid transparent; border-radius: var(--radius-small); color: var(--ink-soft); font: 400 18px var(--font-display); text-decoration: none; }
.tabs a.active { border-color: var(--ink); }
.text-button { --shadow-color: var(--rose); margin-left: auto; padding: 8px 11px; color: var(--surface); background: var(--ink); font: 400 var(--text-md) var(--font-display); text-decoration: none; }
.text-button span[aria-hidden] { color: var(--sage); }
/* The streak: a pixel flame and the number of days, lit once there is a streak. It opens Progress. */
.streak-chip { display: inline-flex; flex: none; align-items: center; gap: 6px; margin-left: auto; padding: 5px 10px; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink-soft); background: var(--paper); font: 400 var(--text-lg)/1 var(--font-display); text-decoration: none; }
.streak-chip .flame-icon { width: 18px; height: 20px; fill: var(--line); }
.streak-chip.lit { color: var(--ink); }
.streak-chip.lit .flame-icon { fill: var(--rose-strong); }
.streak-chip.active { color: var(--surface); background: var(--ink); box-shadow: 3px 3px 0 var(--rose); }
.streak-chip.active .flame-icon { fill: var(--peach); }
@media (hover: hover) and (pointer: fine) { .streak-chip:not(.active):hover { border-color: var(--rose-strong); } }
/* Left-handed is a switch under the chord diagram: the knob slides right and the track turns sage when it is on. */
.lefty-toggle { gap: 9px; }
.lefty-switch { position: relative; flex: none; width: 32px; height: 18px; border: 2px solid currentColor; border-radius: 9px; transition: background-color 200ms ease, border-color 200ms ease; }
.lefty-switch i { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: currentColor; transition: transform 200ms var(--ease-out), background-color 200ms ease; }
.lefty-toggle.active { --shadow-color: var(--rose); color: var(--surface); background: var(--ink); }
.lefty-toggle.active .lefty-switch { border-color: var(--sage); background: var(--sage); }
.lefty-toggle.active .lefty-switch i { transform: translateX(14px); background: var(--ink); }
/* While it is on, the chord diagram says so. */
.diagram-stage { position: relative; }
.lefty-tag { display: none; position: absolute; z-index: 1; top: 8px; left: 8px; padding: 1px 8px; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--sage); font: 800 var(--text-xs)/1.4 var(--font-body); letter-spacing: .4px; text-transform: uppercase; }
body.lefty .lefty-tag { display: inline-block; }
.lefty-tag-short { display: none; }

/* Intro line */
/* Headings take focus only so screen readers announce a view switch; they aren't controls, so no ring (Safari draws one). */
.intro .view-title:focus, .intro .view-title:focus-visible { outline: none; }
.intro { margin: 26px 0 20px; color: var(--ink-soft); font-size: var(--text-md); line-height: 1.55; }
.intro .view-title { margin: 0 0 4px; color: var(--ink); font: 400 clamp(30px, 3.4vw, 40px)/1.05 var(--font-display); letter-spacing: .3px; }

/* Shared panel pieces */
/* Panels come in two weights. Most sections are light (thin border, small shadow) so they don't all shout; the one
   thing a page is for (the tuner, the chord card, the drill, the streak) is a .hero with the full weight. */
.panel { border: var(--border) solid var(--ink); border-radius: var(--radius); padding: var(--s5); background: var(--surface); box-shadow: 4px 4px 0 var(--shadow); }
.panel.hero { border-width: var(--border-thick); box-shadow: 7px 7px 0 var(--shadow); }
.eyebrow { color: var(--ink-soft); font: 700 var(--text-xs) var(--font-body); letter-spacing: .6px; text-transform: uppercase; margin: 0 0 10px; }
/* Every pressable shares one shape: ink border, hard offset shadow, lift on hover, sink on press. */
.chip, .small-button, .sound-button, .text-button {
  --depth: 3px;
  --shadow-color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--control-sm); border: var(--border) solid var(--ink); border-radius: var(--radius-small);
  box-shadow: var(--depth) var(--depth) 0 var(--shadow-color);
  transition: transform var(--press-ms) var(--ease-out), box-shadow var(--press-ms) var(--ease-out), background-color var(--press-ms) ease, color var(--press-ms) ease;
}
.sound-button, .text-button { --depth: 4px; min-height: var(--control-md); border-width: var(--border-thick); }
.chip { padding: 0 10px; color: var(--ink); background: var(--paper); font: 400 18px var(--font-display); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row.roots { display: grid; grid-template-columns: repeat(6, 1fr); }
.chip-row.roots .chip { padding: 0; }
#popularChips .chip:not(.active) { background: var(--sage); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border: var(--border) solid var(--ink); border-radius: var(--radius-small); background: var(--paper); }
.segmented button { min-height: 32px; border: 0; border-radius: 6px; padding: 6px 10px; background: transparent; color: var(--ink-soft); font: 400 18px var(--font-display); transition: transform var(--press-ms) var(--ease-out), box-shadow var(--press-ms) var(--ease-out), background-color var(--press-ms) ease, color var(--press-ms) ease; }
.segmented.small button { padding: 4px 10px; font-size: var(--text-md); }
.small-button { padding: 6px 12px; color: var(--ink); background: var(--paper); font: 400 var(--text-md) var(--font-display); }
.sound-button { padding: 8px 12px 8px 8px; color: var(--surface); background: var(--rose-strong); font: 400 19px var(--font-display); }
.sound-button span:first-child { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink); background: var(--surface); font-size: 12px; }
.sound-button:disabled { --depth: 2px; opacity: .45; cursor: not-allowed; }
.small-link { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 4px; margin: -2px -4px; color: var(--ink-soft); font-size: var(--text-xs); font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }

/* Selected looks the same everywhere: ink fill, surface text, rose offset shadow. Rose fill is only for the primary action. */
.chip.active, .segmented button.active, .tabs a.active { --shadow-color: var(--rose); color: var(--surface); background: var(--ink); }
.segmented button.active { box-shadow: 2px 2px 0 var(--rose); }
.tabs a.active { box-shadow: 3px 3px 0 var(--rose); }

@media (hover: hover) and (pointer: fine) {
  .chip:hover, .small-button:hover, .sound-button:not(:disabled):hover, .text-button:hover { transform: translate(-1px, -1px); box-shadow: calc(var(--depth) + 1px) calc(var(--depth) + 1px) 0 var(--shadow-color); }
  .chip:not(.active):hover { background: #f1f7e6; }
  .segmented button:not(.active):hover { color: var(--ink); background: var(--sage-light); }
  .tabs a:not(.active):hover, .small-link:hover { color: var(--rose-strong); }
}
/* One press rule: everything sinks into its shadow. */
.chip:active, .small-button:active, .sound-button:not(:disabled):active, .text-button:active, .segmented button:active { transform: var(--press); box-shadow: 0 0 0 transparent; }
@media (pointer: coarse) {
  .chip, .small-button, .segmented button { min-height: var(--control-md); }
}

/* Chords view */
.workspace { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: var(--s5); align-items: start; margin-bottom: 40px; }
.finder { position: sticky; top: 88px; max-height: calc(100dvh - 108px); overflow-y: auto; overscroll-behavior: contain; }
.finder-block { padding-top: var(--s4); margin-top: var(--s4); border-top: 2px dashed var(--line); }
.finder-block h2 { margin: 0 0 var(--s2); color: var(--muted); font: 700 var(--text-xs) var(--font-body); letter-spacing: .5px; text-transform: uppercase; }
.chip-group + .chip-group { margin-top: var(--s3); }
.chip-group > span { display: block; margin-bottom: var(--s1); color: var(--ink-soft); font-size: var(--text-sm); }
.chip-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.search-wrap { position: relative; }
.search-box { display: flex; align-items: center; gap: 9px; padding: 10px; border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); color: var(--muted); }
.search-box:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }
.search-icon { color: var(--rose); font: 400 24px/1 var(--font-display); }
@media (hover: none) { .search-box kbd, .kbd-hint { display: none; } }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: none; font: 600 var(--text-md) var(--font-body); } /* ≥16px or iOS zooms on focus */
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.suggestions { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); box-shadow: 4px 4px 0 var(--ink); }
.suggestions { max-height: min(60vh, 360px); overflow-y: auto; overscroll-behavior: contain; }
.suggestions [role=option] { display: flex; justify-content: space-between; align-items: baseline; min-height: 40px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: 400 20px var(--font-display); }
.suggestions [role=option] span { color: var(--muted); font: 700 var(--text-xs) var(--font-body); text-transform: uppercase; }
.suggestions [role=option].active { background: var(--sage-light); box-shadow: inset 3px 0 0 var(--ink); }
@media (hover: hover) and (pointer: fine) { .suggestions [role=option]:hover { background: var(--sage-light); } }
.search-empty { padding: 10px 12px; color: var(--ink-soft); font-size: var(--text-sm); }

/* A grid so the sound controls can sit top-right on desktop and under the diagram on phones. */
.shape-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; border: 3px solid var(--ink); border-radius: var(--radius); padding: var(--s5); background: var(--sage); box-shadow: 7px 7px 0 var(--rose); }
.shape-card > * { grid-column: 1 / -1; }
.shape-card > .shape-card-head { grid-column: 1; }
.shape-card > .sound-controls { grid-column: 2; grid-row: 1; align-self: start; }
.chord-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shape-card h2 { color: var(--ink); font: 400 80px/.85 var(--font-display); letter-spacing: .3px; margin: 0; }
.position-badge { padding: 5px 7px; border: 2px solid var(--ink); border-radius: var(--radius-small); color: var(--ink); background: var(--peach); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.chord-tones { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 0; color: var(--ink-soft); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.chord-tones strong { color: var(--ink); font: 800 var(--text-md) var(--font-body); letter-spacing: .3px; text-transform: none; }
.sound-controls { display: grid; gap: 8px; justify-items: stretch; }
.voicing-picker { margin-top: var(--s5); }
.seg-level { white-space: nowrap; }
/* Swiping sideways on the diagram switches shape; vertical pans still scroll the page. */
.diagram-stage { display: grid; margin-top: var(--s3); padding: var(--s4) var(--s2); touch-action: pan-y; border: 3px solid var(--ink); border-radius: var(--radius-small); background: var(--surface); }
.diagram-canvas { display: grid; place-items: center; }
.diagram { width: min(100%, 300px); overflow: visible; }
/* Diagram colours and type: the SVG has no styles of its own, so themes (or a left-handed mirror) only touch CSS. */
.diagram .board { fill: var(--sage-light); stroke: var(--ink); stroke-width: 2; }
.diagram .string { fill: none; stroke: #54705b; stroke-width: 2; transition: stroke 240ms ease; }
.diagram .string.ringing { stroke: var(--rose); }
.diagram .fret { stroke: #6f8a6b; stroke-width: 2; } /* 3.2:1 on the board */
.diagram .nut { stroke: var(--ink); stroke-width: 5; }
.diagram .muted-mark { fill: var(--ink-soft); font: 700 20px var(--font-body); }
.diagram .open-mark { fill: var(--peach); }
.diagram .open-mark-edge { fill: var(--ink); }
.diagram .dot-halo { fill: var(--ink); }
.diagram .dot { fill: var(--rose-strong); }
.diagram .finger { fill: var(--surface); font: 800 12px var(--font-body); }
.diagram .base-label { fill: var(--ink); font: 800 13px var(--font-body); }
.diagram .note-name { fill: var(--ink); font: 800 16px var(--font-body); }
.diagram .note-name.root { fill: var(--rose-deep); }
.diagram .note-name.muted { fill: var(--muted); }
.diagram .string-name { fill: var(--muted); font: 700 11px var(--font-body); }
/* A finger that stays down through a change: a peach dot in the same ink outline. */
.diagram .mark.anchor .dot { fill: var(--peach); }
.diagram.compact .base-label { font-size: 20px; }
.diagram.compact .muted-mark { font-size: 26px; }
/* New chord: finger marks settle in, low string first, so the eye follows the shape forming. */
.diagram.enter .mark { transform-box: fill-box; transform-origin: center; animation: mark-in 140ms var(--ease-out) both; animation-delay: calc(var(--order, 0) * 14ms); }
@keyframes mark-in { from { opacity: 0; transform: scale(.7); } }
.shape-info { margin-top: var(--s3); padding: var(--s3); display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--surface); }
.shape-info div { padding-left: var(--s3); border-left: 2px solid var(--line); min-width: 0; }
.shape-info div:first-child { padding-left: 0; border: 0; }
.shape-info span { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.shape-info strong { display: block; color: var(--ink); font: 400 22px/1.1 var(--font-display); letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip { color: var(--ink-soft); font-size: var(--text-md); line-height: 1.55; margin: var(--s4) 0 0; }
.tip::before { content: "TIP > "; color: var(--rose-deep); font-weight: 700; }
.hint { margin: 10px 0 0; color: var(--ink-soft); font-size: var(--text-sm); }
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint-keys { display: none; } .hint-touch { display: inline; } }

/* Practice view */
.practice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; margin-bottom: 40px; }
.practice-panel.four { grid-column: 1 / -1; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.panel-head + .panel-note { margin-top: 0; }
.panel-head > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.panel-head h2 { margin: 0; white-space: nowrap; font: 400 24px/1 var(--font-display); letter-spacing: .3px; }
.panel-note { max-width: 68ch; margin: var(--s2) 0 var(--s4); color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.practice-grid .panel-head h2, .songs-grid .panel-head h2 { scroll-margin-top: 96px; }
.set-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); }
.head-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.set-controls { display: flex; flex-wrap: wrap; gap: var(--s2); }
.beat-dots.mini { gap: 6px; margin: 0 var(--s1) 0 0; }
.beat-dots.mini span { width: 12px; height: 12px; }
.set-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.copy-link { min-height: 30px; padding: 2px 10px; font-size: var(--text-sm); }
.set-name { margin: 0; color: var(--ink-soft); font: 400 var(--text-lg)/1.2 var(--font-display); letter-spacing: .3px; }
.set-name strong { color: var(--ink); font-weight: 400; }
.set-name .numerals { color: var(--rose-strong); }
.practice-chords { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.practice-chord { position: relative; display: grid; gap: var(--s2); padding: var(--s3); cursor: pointer; border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); outline: 3px dashed transparent; outline-offset: 3px; transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms var(--ease-out), outline-color 120ms ease; }
.practice-chord .sound-button { --depth: 3px; padding: 6px 10px 6px 6px; font-size: var(--text-md); }
.practice-chord.active { background: #ffe6c7; box-shadow: inset 0 -4px 0 var(--rose), 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
/* Play along: the chord coming up after this beat. */
.practice-chord.next { outline-color: var(--rose-strong); }
.mini-diagram { position: relative; }
.change-hint { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.4; }
.change-hint b, .change-tip b { color: var(--ink); font-weight: 800; }
.change-tip { margin: var(--s3) 0 0; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.45; text-align: center; }
.anchor-key { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; border: 2px solid var(--ink); border-radius: 50%; background: var(--peach); }
.count-in { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 3px solid var(--ink); border-radius: var(--radius-small); color: var(--surface); background: var(--ink); box-shadow: 4px 4px 0 var(--rose); font: 400 48px/1 var(--font-display); pointer-events: none; }
.practice-chord header { display: flex; align-items: baseline; gap: 8px; }
.practice-chord header .numeral { color: var(--rose-strong); font: 400 var(--text-lg)/1 var(--font-display); }
.practice-chord header strong { font: 400 30px/1 var(--font-display); letter-spacing: .3px; }
.mini-diagram { display: grid; justify-items: center; }
.mini-diagram .diagram { width: min(100%, 150px); }
.practice-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.practice-actions > * { white-space: nowrap; }
.drill-select { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.drill-select label { display: grid; gap: 6px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.drill-select select { width: 100%; min-height: 38px; appearance: none; border: 2px solid var(--ink); border-radius: var(--radius-small); padding: 0 27px 0 10px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%2328433a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 9px center; font: 400 18px var(--font-display); }
.drill-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.drill-pair .mini-diagram .diagram { width: min(100%, 110px); }
.drill-pair strong { font: 400 20px var(--font-display); }
.drill-swap { color: var(--rose); font: 400 28px var(--font-display); }
.drill-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s3); padding: var(--s3); border: 2px dashed var(--rose); border-radius: var(--radius-small); background: #fff0e6; }
.drill-confirm label { flex: 1 0 100%; color: var(--ink); font: 400 var(--text-lg) var(--font-display); }
.stepper { display: flex; align-items: stretch; gap: var(--s1); }
.stepper .small-button { width: var(--control-sm); padding: 0; font-size: var(--text-lg); }
.stepper input { width: 72px; min-height: var(--control-sm); border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); text-align: center; font: 400 26px/1 var(--font-display); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.confirm-actions { display: flex; align-items: center; gap: var(--s3); margin-left: auto; white-space: nowrap; }
.confirm-actions .sound-button { padding: 8px 16px; }
#drillTap { touch-action: manipulation; } /* rapid taps must never wait for a double-tap zoom */
.drill-history { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.drill-history li { display: flex; gap: 6px; align-items: baseline; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: var(--text-sm); color: var(--muted); }
.drill-history li strong { color: var(--ink); font: 400 var(--text-lg) var(--font-display); }
.drill-history li.empty { border: 0; padding: 0; }
.drill-history li.best { border-color: var(--ink); background: var(--sage-light); color: var(--ink); }
.drill-start { margin-top: var(--s3); }
.drill-today { margin: 0 0 2px; color: var(--rose-strong); }

/* ---- Practice: the full-screen minute. Start grows the drill card into this stage (clip-path from the card's box);
   the end of the minute, or Stop, shrinks it back into the card, where the clean count is confirmed. ---- */
body.staged { overflow: hidden; }
.drill-stage {
  --on-ink: rgba(255, 244, 214, .72);
  --ink-line: rgba(255, 244, 214, .18);
  --stage-shadow: #17281f;
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  color: var(--surface); background: var(--ink);
}
.drill-stage[hidden] { display: none; }
.stage-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); padding: 12px 20px; }
.stage-bar h2 { margin: 0; font: 400 32px/1 var(--font-display); letter-spacing: .5px; white-space: nowrap; }
.stage-swap { color: var(--peach); }
.stage-awake { justify-self: end; display: inline-flex; align-items: center; gap: 6px; color: var(--sage); font: 800 var(--text-xs) var(--font-body); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.stage-awake[hidden] { display: none; }
.stage-progress { height: 6px; background: var(--ink-line); }
.stage-progress span { display: block; height: 100%; background: var(--peach); transform-origin: left; transition: transform 200ms linear; }
/* Auto margins centre the body without ever pushing it up under the bar on short screens. */
.stage-body { display: grid; justify-items: center; gap: clamp(10px, 1.6vh, 22px); width: min(940px, calc(100% - 32px)); margin: auto; padding: 14px 0 28px; }
.stage-pair, .stage-tip, .stage-numbers, .stage-tap { transition: opacity 150ms var(--ease-out); }
.drill-stage[data-phase="countin"] :is(.stage-pair, .stage-tip, .stage-numbers, .stage-tap) { opacity: .22; }
.stage-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(8px, 2vw, 24px); width: min(100%, 720px); }
.stage-pair > .stage-swap { font: 400 clamp(28px, 5vw, 44px) var(--font-display); }
.stage-card {
  display: grid; justify-items: center; gap: 2px;
  padding: clamp(8px, 1.6vw, 16px) clamp(4px, 1.2vw, 12px) 10px;
  border: 3px solid var(--paper); border-radius: var(--radius);
  color: var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--stage-shadow);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), border-color 160ms ease;
}
.stage-card .diagram { width: min(100%, 300px, 24vh); }
.stage-card strong { font: 400 clamp(32px, min(6vw, 6vh), 52px)/1 var(--font-display); }
.stage-card.is-now { border-color: var(--peach); transform: translateY(-4px); box-shadow: 6px 10px 0 var(--rose-strong); }
.stage-tip { max-width: 60ch; margin: 0; color: var(--on-ink); font-size: clamp(15px, 2vw, 18px); text-align: center; }
.stage-tip b { color: var(--surface); }
.stage-tip .anchor-key { border-color: var(--surface); }
.stage-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 720px); border-block: 2px solid var(--ink-line); }
.stage-numbers div { display: grid; justify-items: center; padding: 6px 0 2px; }
.stage-numbers div + div { border-left: 2px solid var(--ink-line); }
.stage-numbers span { color: var(--on-ink); font: 800 var(--text-xs) var(--font-body); letter-spacing: .8px; text-transform: uppercase; }
.stage-numbers strong { font: 400 clamp(56px, min(12vw, 11vh), 112px)/.95 var(--font-display); font-variant-numeric: tabular-nums; }
.stage-tap {
  --depth: 5px;
  width: min(100%, 560px); min-height: 84px;
  border: 3px solid var(--paper); border-radius: var(--radius);
  color: var(--surface); background: var(--rose-strong); font: 400 38px/1 var(--font-display);
  box-shadow: var(--depth) var(--depth) 0 var(--stage-shadow);
  transition: transform var(--press-ms) var(--ease-out), box-shadow var(--press-ms) var(--ease-out), opacity 150ms var(--ease-out);
}
.stage-tap:active:not(:disabled) { transform: translate(var(--depth), var(--depth)); box-shadow: 0 0 0 transparent; }
.stage-tap:disabled { cursor: default; }
.stage-hint { min-height: 1.5em; margin: 0; color: var(--on-ink); font-size: var(--text-md); text-align: center; }
.stage-hint b { color: var(--surface); font: 400 24px/1 var(--font-display); }
.stage-ghost {
  min-width: 160px; min-height: 52px; padding: 0 16px;
  border: 2px solid rgba(255, 244, 214, .5); border-radius: var(--radius-small);
  color: var(--surface); background: transparent; font: 400 22px/1 var(--font-display);
  transition: transform var(--press-ms) var(--ease-out), background-color 120ms ease;
}
.stage-ghost:active { transform: translate(1px, 1px); }
@media (hover: hover) and (pointer: fine) { .stage-ghost:hover { background: rgba(255, 244, 214, .1); } }
.drill-stage :focus-visible { outline-color: var(--peach); }
.stage-countin { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stage-countin b { color: var(--peach); font: 400 clamp(160px, 34vw, 280px)/1 var(--font-display); text-shadow: 8px 8px 0 var(--stage-shadow); animation: count-pop 220ms var(--ease-out) both; }
@keyframes count-pop { from { opacity: 0; transform: scale(.86); } }
@media (max-width: 620px) {
  .stage-bar { padding: 10px 12px; }
  .stage-bar h2 { font-size: 26px; }
  .stage-awake { font-size: 10px; }
  .stage-body { width: calc(100% - 24px); }
  .stage-numbers strong { font-size: 64px; }
  .stage-tap { min-height: 76px; font-size: 32px; }
}
/* Narrow phones keep the title centred: the sun stays, its words go to screen readers only. */
@media (max-width: 400px) { .awake-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
/* Short screens (iPhone SE) fit the whole minute without scrolling. */
@media (max-height: 640px) {
  .stage-bar { padding-block: 6px; }
  .stage-body { gap: 8px; padding-block: 8px 12px; }
  .stage-numbers strong { font-size: 48px; }
  .stage-tap { min-height: 64px; }
  .stage-ghost { min-height: 44px; }
}
.bpm { display: flex; align-items: baseline; gap: 8px; }
.bpm strong { font: 400 70px/1 var(--font-display); letter-spacing: .3px; }
.bpm span { color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
input[type="range"] { width: 100%; margin: 14px 0; accent-color: var(--rose-strong); }
.beat-dots { display: flex; gap: 10px; margin-bottom: 16px; }
.beat-dots span { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); transition: background-color 60ms linear, transform 90ms var(--ease-out); }
.beat-dots span:first-child { border-width: 3px; }
.beat-dots span.on { background: var(--rose); transform: scale(1.12); }
.beat-dots span:first-child.on { transform: scale(1.3); } /* the downbeat lands harder */

.practice-panel.progress { grid-column: 1 / -1; }
.link-button { border: 0; background: none; text-decoration: underline; cursor: pointer; }
.progress-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.progress-stats div { padding: var(--s3); border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--sage-light); }
.progress-stats span { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.progress-stats strong { font: 400 42px/1.1 var(--font-display); }
.drill-select option:disabled { color: #9aa597; }
.focus-pair { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border: 2px dashed var(--rose); border-radius: var(--radius-small); background: #fff0e6; }
.focus-pair strong { font: 400 19px var(--font-display); }
.focus-pair span { color: var(--muted); font-size: var(--text-sm); }
.pair-list { margin-top: 16px; }
.pair-row { display: grid; grid-template-columns: minmax(0, 2fr) 1.2fr .6fr 1.2fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 2px dashed var(--line); }
.pair-head { padding: 0 0 6px; border-top: 0; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.pair-name { font: 400 21px/1.2 var(--font-display); }
.pair-name small { display: block; color: var(--muted); font: 600 var(--text-sm) var(--font-body); }
.pair-best { display: grid; gap: 4px; }
.pair-best b { font: 400 21px var(--font-display); }
.pair-best b small { margin-left: 2px; color: var(--muted); font-size: var(--text-md); }
.goal { display: block; height: 7px; border: 2px solid var(--ink); border-radius: 4px; background: linear-gradient(90deg, var(--rose) var(--goal), var(--paper) var(--goal)); }
.sparkline { width: 96px; height: 28px; }
.sparkline polyline { fill: none; stroke: var(--rose); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.sparkline-empty, .progress-empty { color: var(--muted); font-size: var(--text-sm); }
.progress-empty { display: grid; justify-items: center; gap: 12px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--radius-small); text-align: center; }
.progress-empty p { margin: 0; color: var(--ink-soft); font-size: var(--text-md); }
/* No data yet: the zeros step back so the call to action leads. */

/* Mobile sticky play bar */
.mobile-bar { display: none; }

footer { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); border-top: 3px solid var(--ink); padding: 20px 0 30px; color: var(--ink-soft); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s4); }
.toast { position: fixed; z-index: 6; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform 180ms var(--ease-out), opacity 180ms ease; border: 3px solid var(--ink); border-radius: var(--radius-small); padding: 10px 12px; color: var(--surface); background: var(--ink); box-shadow: 4px 4px 0 var(--rose); font: 600 var(--text-sm) var(--font-body); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Microphone: a pixel mic icon on Check my chord and Count by ear. */
.mic-icon { width: 11px; height: 14px; flex: none; fill: currentColor; }
.check-button, .listen-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.check-button.active, .listen-toggle.active { --shadow-color: var(--rose); color: var(--surface); background: var(--ink); }
.check-result { margin-top: var(--s3); padding: var(--s3); border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); font-size: var(--text-sm); line-height: 1.45; }
.check-result p { margin: 0; }
.check-result p + p { margin-top: 6px; }
.check-listening b { color: var(--rose-strong); }
.check-again { text-align: right; }
.key-ok, .key-quiet { font-weight: 800; }
.key-ok { color: var(--ink); }
.key-quiet { color: var(--rose-strong); }
.diagram .string.check-ok { stroke: var(--ink); stroke-width: 3.5; }
.diagram .string.check-quiet { stroke: var(--rose-strong); stroke-width: 3.5; stroke-dasharray: 5 4; }
.diagram .string.check-ringing { stroke: var(--rose-strong); stroke-width: 3.5; }
.listen-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s3); }
.listen-status { flex: 1 1 180px; margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }
.listen-status b { color: var(--ink); font: 400 var(--text-lg) var(--font-display); }

/* Welcome card on a first visit */
.welcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 3px solid var(--ink); border-radius: var(--radius-small); background: var(--peach); box-shadow: 4px 4px 0 var(--ink); }
.welcome p { margin: 0; color: var(--ink); }
.welcome strong { font: 400 var(--text-lg) var(--font-display); letter-spacing: .3px; }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); }

/* Practice: the drill first, today's three steps beside it, your drills across the bottom. */
.practice-panel.progress { grid-column: 1 / -1; }
.path-line { margin: var(--s4) 0 0; padding-top: var(--s3); border-top: 2px dashed var(--line); color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.45; }
.path-line b { color: var(--ink); }
/* Songs: a song, then Four to play with its tempo (the metronome lives here: play-along follows it). */
.songs-grid { display: grid; gap: var(--s5); margin-bottom: 40px; }
.tempo-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin: var(--s3) 0 0; padding: var(--s3); border: 2px dashed var(--line); border-radius: var(--radius-small); }
.tempo-label { margin: 0; color: var(--ink); font-weight: 800; }
.tempo-row .bpm strong { font-size: 40px; }
.tempo-row input[type="range"] { flex: 1 1 160px; width: auto; margin: 0; }
.tempo-row .beat-dots { margin: 0; }
/* Chords: Random beside the Root heading, Left-handed under the diagram. */
.finder-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.finder-head h2 { margin-bottom: 0; }
.finder-block .finder-head { margin-bottom: var(--s2); }
.shape-tools { display: flex; justify-content: flex-end; margin-top: var(--s3); }
.panel-head .link-button { color: var(--ink-soft); }
.reminder { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s3); padding: var(--s3); border: 2px dashed var(--line); border-radius: var(--radius-small); }
.reminder label { color: var(--ink); font-weight: 800; }
.reminder input { min-height: var(--control-sm); padding: 0 8px; border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); font: 600 var(--text-md) var(--font-body); }
.reminder p { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: var(--text-sm); }
.plan { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.plan-step { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3); border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); }
.plan-step > div { display: grid; gap: 2px; }
.plan-step strong { font: 400 var(--text-lg)/1.1 var(--font-display); letter-spacing: .3px; }
.plan-step > div > span { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.4; }
.plan-step > .small-button { grid-column: 3; grid-row: 1; text-decoration: none; }
.plan-check { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; background: var(--surface); font: 400 18px/1 var(--font-display); }
.plan-step.done { border-style: dashed; border-color: var(--line); background: transparent; }
.plan-step.done .plan-check { color: var(--surface); background: var(--ink); }
.plan-step.done strong { color: var(--ink-soft); }

/* Four to play: strum pattern, capo, songs */
.set-extras { display: flex; flex-wrap: wrap; align-items: end; gap: var(--s2) var(--s4); margin-top: var(--s3); }
.mini-field { display: grid; gap: 4px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.mini-field select { min-height: 36px; appearance: none; border: 2px solid var(--ink); border-radius: var(--radius-small); padding: 0 27px 0 10px; color: var(--ink); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%2328433a' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 9px center; font: 400 var(--text-md) var(--font-display); text-transform: none; }
.strum-arrows { display: flex; gap: 3px; margin: 0; }
.strum-arrows span { display: grid; place-items: center; width: 26px; height: 36px; border: 2px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: 800 18px/1 var(--font-body); transition: background-color 60ms linear; }
.strum-arrows span:nth-child(odd) { border-color: var(--ink); }
.strum-arrows span.miss { color: var(--line); }
.strum-arrows span.on { color: var(--surface); background: var(--rose-strong); }
.strum-arrows span.miss.on { color: var(--surface); background: var(--rose); }
.strum-arrows .change-only { width: auto; padding: 0 10px; border-style: dashed; color: var(--muted); font: 700 var(--text-sm) var(--font-body); }
.capo-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-left: 4px solid var(--rose); color: var(--ink); background: #fff0e6; font-size: var(--text-sm); }
.set-name .capo-label { color: var(--ink-soft); }
.set-songs { margin: calc(var(--s4) * -1 + 4px) 0 var(--s4); color: var(--ink-soft); font-size: var(--text-sm); }
.set-songs b { color: var(--ink); }

/* Guide */
/* Guide: the usual order in three steps, then a contents list beside four grouped panels. */
.guide-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin: 0 0 var(--s6); padding: 0; list-style: none; }
.guide-path li { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--paper); }
.guide-path li > b { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--surface); background: var(--rose-strong); font: 400 18px/1 var(--font-display); }
.guide-path span { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.4; }
.guide-path strong { display: block; color: var(--ink); font: 400 var(--text-lg)/1.1 var(--font-display); letter-spacing: .3px; }
.guide-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--s6); align-items: start; margin-bottom: 40px; }
.guide-toc { position: sticky; top: 92px; display: grid; gap: 2px; }
.guide-toc .guide-tour { width: 100%; margin-bottom: var(--s2); padding: 8px 12px; font-size: 17px; }
.guide-toc p { margin: var(--s3) 0 2px; color: var(--rose-strong); font-size: var(--text-xs); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.guide-toc a { margin-left: -10px; padding: 4px 10px; border-radius: 6px; color: var(--ink-soft); font-size: var(--text-sm); font-weight: 700; text-decoration: none; transition: background-color 120ms ease, color 120ms ease; }
@media (hover: hover) and (pointer: fine) { .guide-toc a:hover { color: var(--ink); background: var(--sage-light); } }
.guide-body { display: grid; gap: var(--s5); }
.guide-group { padding: var(--s5) var(--s6); }
.guide-eyebrow { margin: 0; color: var(--rose-strong); font-size: var(--text-xs); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.guide-topic { padding: var(--s5) 0; }
.guide-topic:first-of-type { padding-top: var(--s3); }
.guide-topic:last-child { padding-bottom: 0; }
.guide-topic + .guide-topic { border-top: 2px dashed var(--line); }
.guide-topic h2 { margin: 0; font: 400 26px/1.1 var(--font-display); letter-spacing: .3px; scroll-margin-top: 96px; }
/* About sections under the chord finder, practice and the tuner. Each page carries only its own; the app fetches the
   others when they open (data-lazy), and an unfilled one stays out of the layout. */
[data-lazy]:empty { display: none; }
.view-about { margin-bottom: 40px; }
.mic-check + .view-about { margin-top: var(--s5); }
.about-text { margin: var(--s3) 0 0; color: var(--ink-soft); line-height: 1.55; }
.about-text b { color: var(--ink); }
.about-text a, .view-about .guide-list a { color: var(--rose-strong); font-weight: 800; }
.view-about .table-wrap { margin-top: var(--s3); overflow-x: auto; }
.guide-list { display: grid; gap: var(--s2); margin: var(--s3) 0 0; padding-left: 20px; color: var(--ink-soft); line-height: 1.5; }
.guide-list b { color: var(--ink); }
.guide-list a { color: var(--rose-strong); font-weight: 800; }
.guide-diagram-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.guide-diagram-row figure { margin: var(--s3) 0 0; padding: var(--s3); border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--surface); text-align: center; }
.guide-diagram-row figcaption { color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; }
.guide-diagram-row .diagram { width: 100%; }

/* Tour: the spotlight dims everything but its target; the card explains it. */
.tour { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.tour-spot { position: fixed; border: 3px solid var(--rose); border-radius: var(--radius-small); box-shadow: 0 0 0 9999px rgba(40, 67, 58, .55); transition: top 200ms var(--ease-out), left 200ms var(--ease-out), width 200ms var(--ease-out), height 200ms var(--ease-out); }
.tour-card { position: fixed; pointer-events: auto; padding: var(--s4); border: 3px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: 6px 6px 0 var(--rose); }
.tour-card:focus { outline: none; }
.tour-card h2 { margin: 0 0 6px; font: 400 26px/1.05 var(--font-display); letter-spacing: .3px; }
.tour-card p { margin: 0; color: var(--ink-soft); }
.tour-count { margin-bottom: 4px !important; color: var(--rose-strong) !important; font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; }
.tour-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--s3); margin-top: var(--s4); }
.tour-actions .link-button { margin-right: auto; }
.tour-next { color: var(--surface) !important; background: var(--ink) !important; --shadow-color: var(--rose); }

@media (max-width: 860px) {
  .workspace, .practice-grid { grid-template-columns: minmax(0, 1fr); }
  .finder { position: static; max-height: none; overflow: visible; }
  /* Phones and narrow tablets: the finder shrinks to search + two swipeable rows so the chord is on the first screen. */
  .finder-popular { display: none; }
  .finder-block { margin-top: 10px; padding-top: 0; border-top: 0; }
  .finder-block h2, .chip-group > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #rootChips, #qualityChips, .chip-group > div { display: flex; flex-wrap: nowrap; gap: 6px; }
  /* position: relative keeps the hidden group labels inside the scroller; otherwise they widen the page on phones. */
  #rootChips, #qualityChips { position: relative; margin: 0 -16px; padding: 2px 16px 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
  #rootChips::-webkit-scrollbar, #qualityChips::-webkit-scrollbar { display: none; }
  #rootChips .chip { min-width: 44px; padding: 0 8px; }
  #qualityChips .chip-group + .chip-group { margin-top: 0; padding-left: 10px; border-left: 2px dashed var(--line); }
  #finder .chip { flex: none; scroll-snap-align: start; }
  .practice-chords { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan { grid-template-columns: minmax(0, 1fr); }
  /* The contents list becomes a row of jump links above the panels. */
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .guide-toc { position: static; display: block; }
  .guide-toc p, .guide-toc a { display: none; } /* four labelled panels are easy to scroll; the list only crowds a phone */
  .guide-toc .guide-tour { width: auto; margin: 0; }
  /* One column: each step's button sits beside its text instead of under it. */
  .plan-step { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .plan-step > .small-button { grid-column: 3; grid-row: 1; }
}
/* The top bar on one line at every width: tablets drop the Guide and Left-handed labels, then the wordmark. */
@media (max-width: 960px) { .topbar { gap: 16px; } }
@media (max-width: 760px) { .brand-name { display: none; } .tabs a { padding: 7px 8px; } }
@media (max-width: 620px) {
  html { scroll-padding-top: 76px; scroll-padding-bottom: 96px; } /* sticky top bar + fixed play bar */
  .topbar, main, footer { --gutter: 32px; }
  .topbar { min-height: 56px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 26px; height: 26px; margin-right: 6px; }
  .tabs a { padding: 6px 8px; font-size: var(--text-md); }
  .streak-chip { padding: 4px 8px; }
  /* First screen on phones: the chord diagram must clear the fixed play bar at 375×700. The intro heading stays in
     the document (screen readers, view-switch focus) but takes no space; finder, card and frame paddings tighten. */
  .intro { margin: 12px 0 0; }
  .intro .view-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #practiceView .intro, #songsView .intro { margin: 18px 0 14px; }
  #practiceView .intro .view-title, #songsView .intro .view-title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 26px; }
  .intro span { display: none; }
  .workspace { gap: var(--s2); }
  .finder { padding: var(--s3); }
  .search-box { padding: 6px 10px; }
  .finder-block { margin-top: var(--s2); }
  .panel, .shape-card { padding: var(--s4); }
  /* The fixed play bar has Hear it, so the card leads with the shape and moves playback style under the diagram. */
  .shape-card > .sound-controls { grid-column: 1 / -1; grid-row: auto; order: 1; margin-top: 12px; }
  .shape-card > .shape-info, .shape-card > .tip, .shape-card > .shape-tools, .shape-card > .hint { order: 2; }
  body[data-view="chords"] #soundButton { display: none; }
  .shape-card .eyebrow { display: none; }
  .shape-card { padding: var(--s3); }
  /* Name, position and notes share one wrapping row. */
  .shape-card-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
  .chord-tones { margin: 0; }
  .voicing-picker { margin-top: var(--s2); }
  .voicing-picker button { padding: 2px 6px; }
  .diagram-stage { margin-top: var(--s2); padding: 0 var(--s2) var(--s1); }
  /* The SVG keeps 17px of air above its open-string rings; the frame's own border is enough here. */
  .diagram-stage .diagram { width: min(100%, 210px); margin-top: -12px; }
  .shape-card h2 { font-size: 48px; }
  .progress-stats strong { font-size: 26px; }
  .pair-head { display: none; }
  .pair-row { grid-template-columns: 1fr auto auto; row-gap: 8px; }
  .pair-name { grid-column: 1 / -1; }
  .pair-row > span:nth-of-type(2) { display: none; }
  body[data-view="chords"] .mobile-bar { position: fixed; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px calc(16px + env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px)); border-top: 3px solid var(--ink); background: var(--canvas); }
  .mobile-bar strong { font: 400 32px/1 var(--font-display); }
  body[data-view="chords"] footer { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  body[data-view="chords"] .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } /* above the play bar */
  .guide-diagram-row { grid-template-columns: minmax(0, 1fr); }
  .guide-diagram-row figure { justify-self: center; width: 200px; }
  .guide-path { gap: var(--s2); margin-bottom: var(--s4); }
  .guide-path li { flex-direction: column; gap: var(--s1); padding: var(--s2) var(--s3); }
  .guide-path li > b { width: 24px; height: 24px; font-size: 16px; }
  .guide-path strong { font-size: var(--text-md); }
  .guide-path span span, .guide-path .step-note { display: none; }
  .lefty-tag { top: 6px; left: 6px; padding: 0 6px; font-size: 10px; }
  .lefty-tag-long { display: none; }
  .lefty-tag-short { display: inline; }
  .guide-group { padding: var(--s4); }
  .guide-topic h2 { font-size: 23px; }
  #guideView .intro { margin: 18px 0 14px; }
  #guideView .intro .view-title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 26px; }
  .welcome { margin-top: var(--s2); }
  .tour-card { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .tour-card.top { top: calc(68px + env(safe-area-inset-top, 0px)); bottom: auto; }
  .strum-arrows span { width: 22px; }
}
@media (max-width: 420px) {
  .voicing-picker button { line-height: 1.1; }
  .seg-dot { display: none; }
  .chord-tones > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .seg-level { display: block; font: 800 var(--text-xs) var(--font-body); letter-spacing: .4px; text-transform: uppercase; }
}
@media (max-width: 620px) { .topbar { gap: 6px; } .tabs a { padding: 6px; } }
/* Phones keep the logo mark and drop the wordmark so the top bar fits on one line. */
@media (max-width: 620px) { .brand-name { display: none; } }
/* Phones: the logo mark, four tabs and the flame. */
@media (max-width: 420px) {
  .brand-mark { margin-right: 0; }
  .tabs { gap: 2px; }
  .tabs a { padding: 6px 4px; }
}
@media (max-width: 350px) { .topbar { gap: 2px; } .tabs { gap: 0; } .tabs a { padding: 6px 2px; } }

/* Reduced motion: no movement (presses, lifts, toast slide, mark scale-in, beat pulse); colour and opacity stay. */
@media (prefers-reduced-motion: reduce) {
  .chip, .small-button, .sound-button, .text-button, .segmented button { transition: background-color var(--press-ms) ease, color var(--press-ms) ease; }
  .chip:hover, .small-button:hover, .sound-button:hover, .text-button:hover, .chip:active, .small-button:active, .sound-button:active, .text-button:active, .segmented button:active { transform: none !important; }
  .toast, .toast.show { transform: translate(-50%, 0); transition: opacity 180ms ease; }
  .diagram.enter .mark { animation: none; }
  .beat-dots span, .beat-dots span.on { transform: none; transition: background-color 60ms linear; }
  .stage-progress span { transition: none; }
  .stage-card, .stage-card.is-now { transform: none; transition: border-color 120ms ease, box-shadow 120ms ease; }
  .stage-countin b { animation: none; }
  .stage-tap:active:not(:disabled), .stage-ghost:active { transform: none; }
  .practice-chord, .practice-chord.active { transform: none; transition: background-color 120ms ease, outline-color 120ms ease; }
  .tour-spot { transition: none; }
}

/* ---- Practice: songs ---- */
.practice-panel.songs, .practice-panel.loop { grid-column: 1 / -1; }
.song-meta { margin: 0; align-self: center; color: var(--ink-soft); font-size: var(--text-sm); }
.mark-ok { color: var(--ink); font-weight: 800; }
.mark-miss { color: var(--rose-strong); font-weight: 800; }
.song-chords { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }
.song-chord { display: grid; justify-items: center; gap: 2px; width: 104px; padding: var(--s2); border: 2px solid var(--ink); border-radius: var(--radius-small); color: var(--ink); background: var(--paper); font: inherit; cursor: pointer; transition: background-color 120ms ease, box-shadow 120ms ease; }
.song-chord strong { font: 400 24px/1 var(--font-display); }
.song-chord .diagram { width: 100%; }
.song-chord.active { background: #ffe6c7; box-shadow: inset 0 -4px 0 var(--rose), 3px 3px 0 var(--ink); }
.song-sheet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.song-bar { display: grid; align-content: start; gap: 2px; min-height: 72px; padding: var(--s2) var(--s3); border: 2px solid var(--line); border-radius: var(--radius-small); background: var(--paper); transition: background-color 90ms linear, border-color 90ms linear; }
.song-bar.active { border-color: var(--ink); background: #ffe6c7; box-shadow: 3px 3px 0 var(--rose); }
.song-bar.next { border-color: var(--ink); border-style: dashed; }
.bar-chords { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.bar-chord { color: var(--ink); font: 400 22px/1 var(--font-display); }
.bar-chord.now { color: var(--rose-strong); text-decoration: underline 3px; text-underline-offset: 3px; }
.bar-chord[data-mark]::after { margin-left: 3px; font: 800 15px var(--font-body); }
.bar-chord[data-mark=ok]::after { content: "✓"; color: var(--ink); }
.bar-chord[data-mark=miss]::after { content: "✗"; color: var(--rose-strong); }
.bar-words { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.35; }
.song-result { min-height: 1.5em; margin: var(--s3) 0 0; color: var(--ink); font-size: var(--text-md); }
.song-result b { font: 400 var(--text-lg) var(--font-display); }
.song-result .count-big { color: var(--rose-strong); font: 400 28px/1 var(--font-display); }

@media (max-width: 620px) {
  .song-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .song-chords { gap: var(--s2); }
  .song-chord { width: 92px; }
}

/* ---- Tune: one tuner card, then the mic check and what the mic hears ---- */
#tuneView { width: min(640px, 100%); margin: 0 auto 40px; }
.tuner { --pad: var(--s5); margin-top: 28px; padding: var(--pad) var(--pad) 0; overflow: hidden; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: 7px 7px 0 var(--shadow); text-align: center; }
.tuner-head .view-title { margin: 0; font: 400 clamp(32px, 4vw, 40px)/1 var(--font-display); letter-spacing: .3px; }
.tuner-head .view-title:focus { outline: none; }
.tuner-head p { max-width: 36ch; margin: 6px auto 0; color: var(--ink-soft); }
/* The gauge: ticks on an arc, a sage zone at ±5 cents, and a needle that swings around the arc's centre. */
.tuner-dial { position: relative; container-type: inline-size; width: min(100%, 400px); margin: var(--s3) auto 0; }
.tuner-gauge { display: block; width: 100%; height: auto; overflow: visible; }
.tuner-gauge line { stroke-linecap: round; }
.tuner-gauge .tick { stroke: var(--line); stroke-width: 2.5; }
.tuner-gauge .tick-zero { stroke: var(--ink); stroke-width: 4; }
.tuner-gauge text { fill: var(--muted); font: 400 24px var(--font-display); text-anchor: middle; dominant-baseline: middle; }
.gauge-zone { fill: var(--sage-light); transition: fill 200ms ease; }
.tuner-needle { --cents: 0; transform-box: view-box; transform-origin: 160px 162px; transform: rotate(calc(var(--cents) * 1.1deg)); transition: transform 220ms var(--ease-out); }
.tuner-needle line { stroke: var(--line); stroke-width: 7; transition: stroke 160ms ease; }
.tuner-dial.live .tuner-needle line { stroke: var(--rose-strong); }
.tuner-dial.in-tune .tuner-needle line { stroke: var(--ink); }
.tuner-dial.in-tune .gauge-zone { fill: var(--sage); }
/* The note sits inside the arc; in tune it becomes a sage disc. */
.tuner-readout { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 2px; pointer-events: none; }
.tuner-note { display: grid; place-items: center; min-width: 21cqw; height: 21cqw; padding: 0 3cqw; border: 3px solid transparent; border-radius: 999px; color: var(--ink); font: 400 15cqw/1 var(--font-display); transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.tuner-note.idle { border: 3px dashed var(--line); color: var(--line); font-size: 8cqw; }
.tuner-dial.in-tune .tuner-note { border-color: var(--ink); background: var(--sage); }
.tuner-cents { color: var(--ink-soft); font-size: var(--text-sm); font-weight: 800; font-variant-numeric: tabular-nums; }
.tuner-dial.in-tune .tuner-cents { color: var(--ink); }
.tuner-hint { min-height: 1.5em; margin: var(--s3) 0 0; font-weight: 800; }
/* Six strings, low to high: the one being heard fills in ink; a tuned one keeps a ✓ until the page reloads. */
.tuner-strings { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.tuner-string { position: relative; display: flex; align-items: baseline; justify-content: center; gap: 2px; min-height: 52px; padding: 12px 0 0; border: var(--border) solid var(--ink); border-radius: var(--radius-small); color: var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); transition: transform var(--press-ms) var(--ease-out), box-shadow var(--press-ms) var(--ease-out), background-color 160ms ease, color 160ms ease; }
.tuner-string b { font: 400 24px/1 var(--font-display); }
.tuner-string small { font: 700 var(--text-xs) var(--font-body); opacity: .7; }
.tuned-mark { position: absolute; top: -9px; right: -7px; display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); background: var(--sage); font: 800 11px/1 var(--font-body); font-style: normal; opacity: 0; transform: scale(.6); transition: opacity 160ms ease, transform 240ms var(--ease-out); }
.tuner-string.tuned { background: var(--sage-light); }
.tuner-string.tuned .tuned-mark { opacity: 1; transform: scale(1); }
.tuner-string.active { color: var(--surface); background: var(--ink); box-shadow: 3px 3px 0 var(--rose); }
@media (hover: hover) and (pointer: fine) {
  .tuner-string:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
  .tuner-string.active:hover { box-shadow: 4px 4px 0 var(--rose); }
}
.tuner-string:active { transform: var(--press); box-shadow: 0 0 0 transparent; }
.tuner-actions { display: grid; justify-items: center; gap: var(--s2); margin-top: var(--s5); }
.tuner .tuner-start { min-width: 220px; min-height: 52px; padding: 10px 24px; font-size: 22px; }
.tuner-start .mic-icon { width: 14px; height: 18px; }
.tuner-privacy { margin: 0; color: var(--muted); font-size: var(--text-sm); }
/* The way on: quiet until all six strings are tuned, then it fills sage and the button turns primary. */
.tuner-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); margin: var(--s5) calc(-1 * var(--pad)) 0; padding: var(--s3) var(--pad); border-top: 2px dashed var(--line); text-align: left; font-weight: 800; transition: background-color 240ms ease; }
.tuner-next.ready { border-top: 2px solid var(--ink); background: var(--sage); }
.tuner-next .small-button { text-decoration: none; }
.tuner-next.ready .small-button { color: var(--surface); background: var(--rose-strong); }
#tuneView .welcome { margin: var(--s5) 0 0; }
.mic-check { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); margin-top: var(--s5); padding: var(--s4) var(--s5); border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); }
.mic-check-text { flex: 1 1 300px; }
.mic-check h2 { margin: 0 0 4px; font: 400 24px/1 var(--font-display); letter-spacing: .3px; }
.mic-check p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }
.mic-check .listen-row { margin-top: 0; }
.mic-steps { margin: var(--s2) 0; padding-left: 20px; font-size: var(--text-sm); font-weight: 700; }
.mic-steps li { padding: 2px 0; color: var(--ink-soft); }
.mic-steps li[data-state=now] { color: var(--rose-strong); }
.mic-steps li[data-state=done] { color: var(--ink); text-decoration: line-through; }
.mic-debug { margin-top: var(--s4); padding: var(--s3) var(--s5); border: 2px dashed var(--line); border-radius: var(--radius); }
.mic-debug[open] { border: 2px solid var(--ink); background: var(--paper); }
.mic-debug summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; }
.mic-debug summary h2 { display: inline; margin: 0; font: 400 20px/1 var(--font-display); }
.mic-debug summary span { color: var(--ink-soft); font-size: var(--text-sm); }
.debug-readout { display: grid; gap: var(--s2); margin: var(--s4) 0 0; }
.debug-readout > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: var(--s3); }
.debug-readout dt { color: var(--muted); font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; }
.debug-readout dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; overflow-wrap: anywhere; }
.level-bar { position: relative; flex: 1 1 200px; height: 14px; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); }
.level-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sage); }
.level-bar b { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: var(--muted); }
.level-bar b.loud-mark { background: var(--rose-strong); }
@media (max-width: 620px) {
  .tuner { --pad: var(--s4); margin-top: 18px; }
  .tuner-string { min-height: 48px; }
  .tuner-string b { font-size: 21px; }
  .mic-check, .mic-debug { padding: var(--s3) var(--s4); }
}
@media (prefers-reduced-motion: reduce) { .tuner-needle, .tuned-mark { transition: none; } }

/* ---- Progress page ---- */
:root {
  --chart: #4a8458; /* bars: 3.9:1 on surface */
  --heat-1: #dcebc9;
  --heat-2: #a9cf8e;
  --heat-3: #6da55e;
  --heat-4: #3d7449;
}
.progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: stretch; margin-bottom: 40px; }
.goal-picker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s4); font-weight: 800; }
.progress-calendar { grid-column: 1 / -1; }
.chart-tip { position: fixed; z-index: 60; padding: 6px 10px; border: 2px solid var(--ink); border-radius: var(--radius-small); background: var(--ink); color: var(--surface); font-size: var(--text-sm); font-weight: 800; pointer-events: none; white-space: nowrap; }
/* Four tiles, two by two. */
.week-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--s4); }
.week-stats strong { font-size: 32px; }
.streak-now { margin: 0; color: var(--ink-soft); font-weight: 800; }
.streak-now b { color: var(--rose-strong); font: 400 26px/1 var(--font-display); }
.heat-grid { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 22px); gap: 3px; margin-top: var(--s4); }
.heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.heat-cell[data-level="1"] { background: var(--heat-1); }
.heat-cell[data-level="2"] { background: var(--heat-2); }
.heat-cell[data-level="3"] { background: var(--heat-3); box-shadow: none; }
.heat-cell[data-level="4"] { background: var(--heat-4); box-shadow: none; }
.heat-cell.future { visibility: hidden; }
.heat-cell[data-today] { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat-cell.tip-on { outline: 2px solid var(--rose-strong); outline-offset: 1px; }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: var(--s3); color: var(--muted); font-size: var(--text-xs); font-weight: 800; }
.heat-legend .heat-cell { width: 14px; }
.song-bests { display: grid; gap: var(--s3); margin: var(--s4) 0 0; padding: 0; list-style: none; }
.song-bests li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) 44px; align-items: center; gap: var(--s3); font-weight: 700; }
.song-bests li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.best-bar { height: 12px; overflow: hidden; border-radius: 0 4px 4px 0; background: var(--sage-light); }
.best-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--chart); }
.song-bests b { text-align: right; font: 400 var(--text-lg) var(--font-display); }
@media (max-width: 860px) { .progress-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) {
  #progressView .intro { margin: 18px 0 14px; }
  #progressView .intro .view-title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; font-size: 26px; }
  .heat-grid { gap: 2px; }
}

