/* Visual Triads (js/28-visual-triads.js) — scoped under .vt-root so nothing
   here touches the shell. Palette, type and depth come from css/main.css
   :root tokens (so the ambience the shell has selected applies here too);
   the only hard colours are the three degree colours, which are locked
   (DESIGN.md), and the feedback greens/reds. Board geometry is the shared
   1400-unit full neck from js/03; dots are capped at r=18 (strings sit 44
   apart) so adjacent strings never overlap. */
.vt-root { max-width: 1160px; margin: 0 auto; padding: 0 0 40px; color: var(--ink); font-family: var(--font-ui); font-size: 15px; line-height: 1.5; }
.vt-root * { box-sizing: border-box; }
.vt-root h1, .vt-root h2, .vt-root h3 { font-family: var(--font-display); color: var(--ink); margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
.vt-root h1 { font-size: clamp(26px, 3.2vw, 38px); margin: 10px 0; }
.vt-root h2 { font-size: 22px; margin: 8px 0; }
.vt-root h3 { font-size: 18px; margin: 14px 0 8px; }
.vt-root p { color: var(--ink-dim); margin: 8px 0; }
.vt-root a { color: var(--accent); text-decoration: none; }
.vt-root a:hover { text-decoration: underline; }
.vt-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.vt-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 2px 12px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.vt-head-note { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.vt-notice { border-left: 3px solid var(--accent); background: rgba(232,195,107,.08); padding: 10px 14px; margin: 0 0 14px; font-size: 13px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-dim); }
.vt-notice.compact { padding: 5px 12px; font-size: 11px; }
.vt-notice.error { border-color: var(--danger); color: #ffb6a0; }

/* ---- buttons: the app's look (.btn / .ft-btn), scoped ---- */
.vt-root button { font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; line-height: 1.4; cursor: pointer; border: 1px solid var(--accent); border-radius: 9px; padding: 10px 18px; color: #1a1614; background: var(--accent); transition: filter .15s, border-color .15s, background .15s; }
.vt-root button:hover { filter: brightness(1.06); }
.vt-root button.secondary { background: var(--surface-3); color: var(--ink); border-color: var(--border-strong); }
.vt-root button.quiet { background: transparent; color: var(--ink-dim); border-color: var(--rule); }
.vt-root button.quiet:hover { color: var(--ink); border-color: var(--border-strong); }
.vt-root button.small { padding: 7px 13px; font-size: 12.5px; }
.vt-root button.link-button { padding: 4px 0; background: none; border: 0; color: var(--ink-dim); font-weight: 600; }
.vt-root button.link-button:hover { color: var(--accent); filter: none; }
.vt-root button:disabled { opacity: .35; cursor: not-allowed; filter: none; }
.vt-root button:focus-visible, .vt-root select:focus-visible, .vt-root summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vt-root kbd { display: inline-block; font: 600 11px var(--font-mono); border: 1px solid currentColor; border-radius: 3px; padding: 1px 4px; margin-right: 7px; opacity: .8; }
/* No keyboard on a phone or tablet, so no key hints. */
@media (hover: none) and (pointer: coarse) { .vt-root kbd { display: none; } }
.vt-root select { display: block; min-width: 180px; margin-top: 6px; padding: 9px 32px 9px 12px; border: 1px solid var(--border-strong); border-radius: 7px; color: var(--ink); background: var(--bg); font: 500 14px var(--font-ui); }
.vt-root label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); }
.vt-root details { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 18px; font-size: 13px; }
.vt-root summary { color: var(--ink-faint); cursor: pointer; }
.vt-root table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vt-root th, .vt-root td { padding: 12px 8px; border-bottom: 1px solid var(--rule); text-align: left; }
.vt-root th { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.vt-root td small { display: block; color: var(--ink-faint); font-size: 11px; }

.vt-panel { background: var(--grad-surface); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--elev-2); }
.vt-intro { display: flex; justify-content: space-between; gap: 30px; align-items: center; margin: 6px 0 22px; }
.vt-intro h1 { margin-top: 8px; }
.vt-totals { display: grid; grid-template-columns: auto auto; gap: 2px 12px; align-items: baseline; font-size: 12px; color: var(--ink-faint); }
.vt-totals strong { font-family: var(--font-mono); font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; }
.vt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.vt-root .vt-tab { border: 0; background: none; color: var(--ink-faint); border-radius: 0; padding: 11px 22px; border-bottom: 3px solid transparent; font-size: 14px; }
.vt-root .vt-tab.active { border-color: var(--accent); color: var(--ink); }
.vt-root .vt-tab:hover { filter: none; color: var(--ink); }
.vt-resume-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 18px; border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13px; color: var(--ink-dim); }
.vt-settings { display: flex; align-items: flex-end; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.vt-setting-note { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-faint); line-height: 1.8; }
.vt-setting-note strong { color: var(--ink-dim); font-weight: 500; }
.vt-board-title { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 14px; }
.vt-board-title h2 { font-size: 26px; }
.vt-board-title small { font-size: 13px; font-weight: 400; color: var(--ink-faint); margin-left: 12px; font-family: var(--font-ui); }
.vt-tag { color: var(--accent); font-size: 12px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--bg); white-space: nowrap; }

/* ---- the board: the Drills renderer (js/07) draws the neck; only the frame,
   hover/focus of the click cells and the phone scroll wrapper live here ---- */
.vt-board { border: 1px solid #33291f; border-radius: 12px; background: #1c1712; padding: 10px 8px 4px; }
.vt-board .mini-fb-scroll > svg { display: block; width: 100%; height: auto; }
.vt-board .fb-cell-multi:hover { fill: rgba(232,195,107,0.10); }
.vt-board .fb-cell-multi[role="button"]:focus { outline: none; fill: rgba(232,195,107,0.18); stroke: #76bfff; stroke-width: 2; }
.vt-board .fb-cell-multi[aria-pressed="true"]:hover { fill: rgba(158,213,174,0.14); }
.vt-board .fb-cell-multi[aria-hidden="true"] { cursor: default !important; }
.vt-legend { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: center; margin: 12px 0; color: var(--ink-dim); font-size: 12px; }
.vt-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.vt-hint { color: var(--ink-faint); }

.vt-grip-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 8px; margin: 20px 0 16px; }
.vt-root .vt-grip-tab { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--rule); border-radius: 9px; padding: 12px; background: var(--bg); color: var(--ink-dim); font-size: 12px; font-weight: 500; }
.vt-root .vt-grip-tab.selected { border-color: var(--accent); background: var(--surface-3); color: var(--ink); }
.vt-grip-tab small { display: block; font-size: 10px; color: var(--ink-faint); font-weight: 400; margin-top: 4px; }
.vt-grip-number { font-family: var(--font-mono); font-size: 17px; font-weight: 400; color: var(--accent); opacity: .8; }
.vt-explorer-foot { display: flex; gap: 14px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.vt-explorer-foot p { margin-right: auto; max-width: 560px; font-size: 13px; }
.vt-root .vt-lesson-link { background: var(--surface-3); color: var(--ink); border-color: var(--border-strong); white-space: nowrap; }
.vt-learn-card { display: flex; gap: 30px; align-items: center; justify-content: space-between; margin: 22px 0 26px; padding: 22px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--grad-raised); }
.vt-learn-card h2 { margin: 6px 0; font-size: 24px; }
.vt-learn-card p { font-size: 14px; max-width: 640px; }
.vt-lesson-recommendation { display: block; font-size: 12px; color: var(--accent); margin-top: 10px; }
.vt-practice-heading { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; }
.vt-practice-heading select { min-width: 240px; }
.vt-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.vt-mode-card { border: 1px solid var(--rule); background: var(--surface-1); border-radius: var(--radius-sm); padding: 20px; }
.vt-mode-num { font-family: var(--font-mono); font-size: 26px; color: var(--accent); opacity: .8; }
.vt-mode-card p { font-size: 14px; min-height: 64px; }
.vt-mode-meta { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 22px 0 12px; }
.vt-mode-card button { width: 100%; }
.vt-note { font-size: 12px; color: var(--ink-faint); margin-top: 20px; }
.vt-metrics { display: flex; justify-content: center; gap: 60px; margin: 26px 0; color: var(--ink-dim); font-size: 12px; text-align: center; }
.vt-metrics strong { display: block; font-family: var(--font-mono); color: var(--accent); font-size: 34px; font-weight: 500; }
.vt-section-title { margin-bottom: 20px; }
.vt-coverage { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--rule); }
.vt-coverage .vt-settings { margin: 18px 0 4px; }
.vt-table-scroll { overflow-x: auto; }
.vt-table-scroll table { min-width: 560px; }
.vt-footer { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 22px; align-items: center; font-size: 12px; color: var(--ink-faint); }

/* ---- a practice round ---- */
.vt-session-top { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; font-size: 12px; color: var(--ink-dim); }
.vt-session-top em { font-style: normal; color: var(--ink-faint); }
.vt-progress-track { height: 3px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.vt-progress-track span { display: block; height: 100%; background: var(--accent); }
.vt-play-panel { padding-top: 16px; }
.vt-prompt-heading { text-align: center; position: relative; }
.vt-prompt-heading h1 { font-size: 42px; margin: 4px 0; }
.vt-prompt-heading h1 span { font-weight: 400; color: var(--ink-dim); }
.vt-prompt-heading p { font-size: 14px; margin: 6px 0 16px; }
.vt-chord-path { position: absolute; right: 0; top: 22px; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-faint); }
.vt-chord-path span { border: 1px solid var(--rule); border-radius: 6px; padding: 4px 12px; }
.vt-chord-path .current { color: var(--accent); border-color: var(--accent); }
.vt-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 18px 0 8px; }
.vt-scoring-note { font-size: 12px; text-align: center; color: var(--ink-faint); margin: 8px 0; }
.vt-movement-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.vt-movement-row span { font-size: 12px; color: var(--ink-dim); border: 1px solid var(--rule); padding: 5px 12px; border-radius: 6px; }
.vt-note-feedback { display: flex; justify-content: center; align-items: center; gap: 16px; min-height: 46px; margin: 8px 0; color: var(--ink-dim); font-size: 14px; text-align: center; }
.vt-note-count { color: var(--accent); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 6px; }
.vt-note-feedback.success { color: #9ed5ae; }
.vt-note-feedback.error { color: #ffaaa4; }
.vt-builder-tools { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.vt-builder-tools span { font-size: 11px; color: var(--ink-faint); }
.vt-shape-clue { max-width: 780px; margin: 16px auto; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); font-size: 14px; border-radius: 0 8px 8px 0; }
.vt-shape-clue b { display: block; color: var(--accent); margin-bottom: 4px; }
.vt-gallery-title { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 8px; }
.vt-gallery-title h2 { font-size: 19px; }
.vt-gallery-title span { font-size: 12px; color: var(--ink-dim); }
.vt-answers { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.vt-root .vt-answer-card { padding: 12px; background: var(--bg); border: 1px solid var(--rule); color: var(--ink); text-align: left; font-weight: 500; }
.vt-root .vt-answer-card.selected { border: 2px solid var(--accent); padding: 11px; background: var(--surface-3); }
.vt-answer-top { display: block; font-size: 12px; color: var(--ink-dim); }
.vt-fret-sequence { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 15px; color: var(--accent); font-variant-numeric: tabular-nums; }
.vt-fret-sequence small { font-size: 10px; font-weight: 400; color: var(--ink-faint); margin-left: 8px; font-family: var(--font-ui); }
.vt-finish-panel { text-align: center; padding: 50px 20px; }

/* ---- the lesson ---- */
.vt-lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 18px; font-size: 13px; }
.vt-lesson-progress { display: flex; align-items: center; gap: 18px; margin: 6px 0 14px; font-size: 12px; color: var(--ink-dim); }
.vt-lesson-progress > span:first-child { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--accent); }
.vt-lesson-progress .vt-progress-track { flex: 1; max-width: 240px; margin-left: auto; }
.vt-lesson-stage { padding: 24px 26px; }
.vt-lesson-header { margin: 0 0 18px; }
.vt-lesson-header h1 { font-size: 32px; margin: 0 0 10px; }
.vt-direction { font-size: 17px; color: var(--ink); max-width: 1000px; line-height: 1.5; margin: 6px 0 16px; }
.vt-lesson-meta { display: flex; gap: 18px; align-items: center; margin: 4px 0 14px; font-size: 13px; color: var(--ink-dim); }
.vt-lesson-meta strong { color: var(--accent); font-family: var(--font-display); font-size: 20px; }
.vt-root-string-tag { font-size: 12px; color: #efb291; }
.vt-degree-key { margin-left: auto; font-size: 11px; color: var(--ink-dim); }
.vt-degree-key i { font-style: normal; font-weight: 700; color: var(--accent); }
.vt-neck-caption { display: flex; justify-content: flex-end; font-family: var(--font-mono); font-size: 11px; margin: 6px 2px 6px; }
.vt-region-label { color: var(--accent); }
.vt-feedback { font-size: 14px; margin: 14px 0 0; color: var(--ink-dim); }
.vt-feedback.success { color: #abd6b7; }
.vt-feedback.error { color: #ffb8b3; }
.vt-clue { padding: 12px 15px; margin: 14px 0; border-left: 3px solid var(--accent); background: var(--surface-2); font-size: 13px; max-width: 900px; border-radius: 0 8px 8px 0; }
.vt-lesson-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 20px 0 0; }
.vt-lesson-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.vt-lesson-tools details { margin: 0; padding: 0; border: 0; position: relative; font-size: 12px; }
.vt-lesson-tools details > div { position: absolute; z-index: 2; right: 0; top: 28px; display: flex; gap: 8px; padding: 12px; border: 1px solid var(--rule); background: var(--surface-1); min-width: 270px; border-radius: 8px; box-shadow: var(--elev-2); }
.vt-disclaimer { font-size: 12px; color: var(--ink-faint); margin: 12px 0; }
.vt-lesson-about { margin: 0 0 0 auto; padding: 0; border: 0; max-width: 500px; font-size: 12px; }
.vt-lesson-start-panel { max-width: 960px; margin: 20px auto; padding: 32px; }
.vt-lesson-start-panel h1 { font-size: 36px; margin: 12px 0; }
.vt-lesson-lead { font-size: 17px; color: var(--accent); }
.vt-roadmap { list-style: none; margin: 26px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: roadmap; }
.vt-roadmap li { border-top: 1px solid var(--rule); padding-top: 14px; counter-increment: roadmap; }
.vt-roadmap li:before { content: counter(roadmap, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 8px; }
.vt-roadmap b { display: block; font-family: var(--font-display); font-size: 18px; margin-bottom: 4px; }
.vt-roadmap span { font-size: 13px; color: var(--ink-dim); }
.vt-start-options { display: flex; gap: 12px; margin: 22px 0 8px; }
.vt-root .vt-start-options button[aria-pressed="true"] { border-color: var(--accent); background: rgba(232,195,107,.16); color: var(--ink); }
.vt-music-cue { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 12px; }
.vt-music-cue > strong { color: var(--accent); font-family: var(--font-display); font-size: 36px; font-weight: 650; letter-spacing: -.03em; }
.vt-music-cue > strong > span { font-size: 20px; font-weight: 400; color: var(--ink-dim); }
.vt-music-cue > span { font-size: 13px; color: var(--ink-dim); }
.vt-music-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 16px 0 0; }
.vt-music-bottom p { font-size: 14px; max-width: 700px; }
.vt-music-complete { color: #abd6b7; font-size: 14px; white-space: nowrap; }
.vt-wrapup { max-width: 900px; margin: 20px auto; }
.vt-wrapup h1 { font-size: 32px; }
.vt-practice-next { margin: 22px 0; border-left: 3px solid var(--accent); padding: 10px 20px; background: var(--surface-2); border-radius: 0 8px 8px 0; }
.vt-practice-next b { color: var(--accent); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.vt-practice-next p { margin: 5px 0; font-size: 17px; color: var(--ink); }
.vt-summary-row { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--rule); padding: 12px 0; font-size: 13px; }
.vt-summary-row small { display: block; color: var(--ink-faint); font-size: 11px; }
.vt-summary-row strong { text-align: right; color: var(--accent); }

@media (max-width: 800px) {
  .vt-panel { padding: 16px; }
  .vt-intro { margin: 16px 0; }
  .vt-totals { display: none; }
  .vt-settings { flex-wrap: wrap; gap: 10px; }
  .vt-setting-note { display: none; }
  .vt-mode-grid { grid-template-columns: 1fr; }
  .vt-mode-card p { min-height: 0; }
  .vt-mode-meta { margin-top: 12px; }
  .vt-mode-num { float: right; }
  .vt-board-title { display: block; }
  .vt-tag { display: inline-block; margin-top: 10px; }
  .vt-explorer-foot { display: block; }
  .vt-explorer-foot button { margin: 10px 10px 0 0; }
  .vt-practice-heading { display: block; }
  .vt-root .vt-tab { padding: 11px; font-size: 12px; }
  .vt-chord-path { position: static; justify-content: center; margin: 8px 0; }
  .vt-prompt-heading h1 { font-size: 34px; }
  .vt-answers { grid-template-columns: repeat(2, 1fr); }
  .vt-metrics { gap: 25px; }
  .vt-actions button { flex: 1; min-width: 130px; }
  .vt-gallery-title { display: block; }
  .vt-legend { gap: 10px; }
  .vt-note-feedback { align-items: flex-start; font-size: 13px; }
  .vt-builder-tools span { width: 100%; text-align: center; }
  .vt-learn-card { display: block; padding: 18px; }
  .vt-learn-card .vt-lesson-link { margin-top: 16px; }
  .vt-lesson-stage { padding: 18px 14px; }
  .vt-lesson-header h1 { font-size: 28px; }
  .vt-direction { font-size: 15px; }
  .vt-lesson-meta { gap: 12px; flex-wrap: wrap; }
  .vt-degree-key { margin-left: 0; }
  .vt-lesson-actions { gap: 12px; }
  .vt-lesson-tools { margin-left: 0; }
  .vt-lesson-start-panel { padding: 22px; }
  .vt-lesson-start-panel h1 { font-size: 30px; }
  .vt-roadmap { gap: 14px; }
  .vt-music-bottom { align-items: flex-start; flex-direction: column; }
  .vt-lesson-about { margin-left: 0; }
  .vt-start-options button { flex: 1; }
  .vt-root button { padding: 12px 16px; }   /* ≥44px touch targets */
}
@media (max-width: 480px) {
  .vt-roadmap { grid-template-columns: 1fr; gap: 12px; }
  .vt-roadmap li { padding-top: 10px; }
  .vt-roadmap li:before { display: inline-block; margin-right: 12px; }
  .vt-roadmap b { display: inline; }
  .vt-roadmap span { display: block; margin: 4px 0 0 30px; }
  .vt-lesson-progress { gap: 12px; }
  .vt-lesson-progress .vt-progress-track { max-width: 100px; }
  .vt-lesson-meta strong { font-size: 17px; }
  .vt-degree-key { display: none; }
  .vt-neck-caption { font-size: 10px; }
  .vt-lesson-tools { gap: 8px; }
  .vt-lesson-actions > button { width: 100%; }
  .vt-music-cue > strong { font-size: 30px; }
  .vt-music-cue > span { font-size: 11px; }
  .vt-lesson-nav .vt-eyebrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vt-root * { transition: none !important; } }

/* ---- large monitors: fill the window the way Find the 3rds does (main.css
   "guided practice" breakpoints), so the neck is the same size as the other
   drills' boards ---- */
@media (min-width: 1600px) {
  .vt-root { max-width: 1280px; }
  #drillContent .ft-wrap:has(.vt-root) > .ft-back { margin-left: max(0px, calc((100% - 1280px) / 2)); }
}
@media (min-width: 2000px) and (min-height: 1100px) {
  .vt-root { max-width: 1760px; }
  #drillContent .ft-wrap:has(.vt-root) > .ft-back { margin-left: max(0px, calc((100% - 1760px) / 2)); }
}

/* ============================================================================
   PHONE SIDEWAYS (Robert 2026-11-23: "This should work pretty flawlessly in sideways mode, and it
   shouldn't jump anywhere"). A lesson step or a practice turn has the whole screen, as a drill round
   does (body.phone-round, set by js/04-phone.js). From the top: one line with the step and the chord,
   the instruction, the board across the width, then the message on the left and the buttons on the
   right. The buttons stay 36px clear of the bottom edge, where an iPhone keeps its swipe-up line.
   ========================================================================== */
body.phone-round .vt-root.lesson,
body.phone-round .vt-root.in-session {
  position: fixed; inset: 0; z-index: 450; max-width: none; margin: 0; background: var(--bg);
  padding: 6px max(12px, env(safe-area-inset-right)) max(36px, calc(env(safe-area-inset-bottom) + 14px)) max(12px, env(safe-area-inset-left));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
body.phone-round .vt-root button { min-height: 44px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
body.phone-round .vt-root button.link-button { padding: 0 2px; min-height: 36px; font-size: 13px; }
body.phone-round .vt-root .vt-board { position: relative; align-self: stretch; min-height: 118px; margin: 0; padding: 0; border: 0; border-radius: 6px; }
body.phone-round .vt-root .vt-board > .mini-fb-scroll { position: absolute; inset: 0; overflow: hidden; }
body.phone-round .vt-root .vt-board > .mini-fb-scroll::after { display: none; }
body.phone-round .vt-root .vt-board > .mini-fb-scroll > svg { width: 100% !important; min-width: 0; height: 100% !important; max-width: none !important; max-height: none; }

/* A lesson step */
body.phone-round .vt-root.lesson {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(40px, auto) minmax(118px, 1fr) auto;
  gap: 4px 14px; align-items: center;
}
body.phone-round .vt-root.lesson > .vt-lesson-nav,
body.phone-round .vt-root.lesson > .vt-lesson-progress,
body.phone-round .vt-root.lesson > .vt-lesson-stage,
body.phone-round .vt-root.lesson .vt-lesson-header,
body.phone-round .vt-root.lesson .vt-music-bottom { display: contents; }
body.phone-round .vt-root.lesson #vt-back-practice,
body.phone-round .vt-root.lesson .vt-lesson-nav .vt-eyebrow,
body.phone-round .vt-root.lesson .vt-lesson-nav > span,
body.phone-round .vt-root.lesson .vt-lesson-progress > span:first-child,
body.phone-round .vt-root.lesson .vt-progress-track,
body.phone-round .vt-root.lesson .vt-degree-key,
body.phone-round .vt-root.lesson .vt-music-complete,
body.phone-round .vt-root.lesson .vt-lesson-actions > button:disabled,
body.phone-round .vt-root.lesson > .vt-footer { display: none; }
body.phone-round .vt-root.lesson .vt-lesson-progress > span { grid-column: 1; grid-row: 1; font-size: 13px; color: var(--ink-dim); white-space: nowrap; }
body.phone-round .vt-root.lesson .vt-lesson-header h1 { grid-column: 2; grid-row: 1; margin: 0; font-size: 19px; line-height: 1.2; white-space: nowrap; }
body.phone-round .vt-root.lesson .vt-lesson-meta,
body.phone-round .vt-root.lesson .vt-music-cue { grid-column: 3; grid-row: 1; margin: 0; gap: 12px; justify-content: flex-start; min-width: 0; white-space: nowrap; overflow: hidden; }
body.phone-round .vt-root.lesson .vt-lesson-meta strong { font-size: 16px; }
body.phone-round .vt-root.lesson .vt-music-cue > strong { font-size: 19px; }
body.phone-round .vt-root.lesson .vt-music-cue > strong > span { font-size: 15px; }
body.phone-round .vt-root.lesson #vt-pause { grid-column: 4; grid-row: 1; justify-self: end; }
body.phone-round .vt-root.lesson .vt-direction { grid-column: 1 / -1; grid-row: 2; margin: 0; max-width: none; font-size: 15px; line-height: 1.3; }
body.phone-round .vt-root.lesson .vt-lesson-stage:has(.vt-neck-caption) .vt-direction { grid-column: 1 / 4; }
body.phone-round .vt-root.lesson .vt-neck-caption { grid-column: 4; grid-row: 2; margin: 0; font-size: 11px; white-space: nowrap; }
/* The second row is two lines high whether it holds one line or two, so the board does not move when the
   instruction changes. A clue takes the place of the instruction. */
body.phone-round .vt-root.lesson .vt-clue { grid-column: 1 / -1; grid-row: 2; margin: 0; max-width: none; padding: 1px 10px; font-size: 14px; line-height: 1.3; }
body.phone-round .vt-root.lesson .vt-lesson-stage:has(.vt-clue) .vt-direction { display: none; }
body.phone-round .vt-root.lesson .vt-board { grid-column: 1 / -1; grid-row: 3; height: 100%; }
/* The message and the buttons share the last row: one from the left, the other from the right. */
body.phone-round .vt-root.lesson .vt-feedback,
body.phone-round .vt-root.lesson .vt-music-bottom > p { grid-column: 1 / -1; grid-row: 4; justify-self: start; margin: 0; max-width: calc(100% - 440px); font-size: 14px; line-height: 1.3; }
body.phone-round .vt-root.lesson .vt-lesson-actions,
body.phone-round .vt-root.lesson .vt-music-bottom > button { grid-column: 1 / -1; grid-row: 4; justify-self: end; margin: 0; }
body.phone-round .vt-root.lesson .vt-lesson-actions { flex-wrap: nowrap; gap: 10px; min-height: 44px; }
body.phone-round .vt-root.lesson .vt-lesson-tools { flex-wrap: nowrap; margin: 0; }
body.phone-round .vt-root.lesson .vt-lesson-tools summary { min-height: 44px; display: flex; align-items: center; padding: 0 6px; font-size: 13px; white-space: nowrap; }
body.phone-round .vt-root.lesson .vt-lesson-tools details > div { top: auto; bottom: 48px; }

/* A practice turn */
body.phone-round .vt-root.in-session { display: flex; flex-direction: column; gap: 4px; }
body.phone-round .vt-root.in-session > .vt-head,
body.phone-round .vt-root.in-session > .vt-progress-track,
body.phone-round .vt-root.in-session .vt-scoring-note,
body.phone-round .vt-root.in-session .vt-session-top > span:nth-child(2) { display: none; }
body.phone-round .vt-root.in-session > .vt-notice { margin: 0; padding: 4px 10px; font-size: 13px; }
body.phone-round .vt-root.in-session > .vt-session-top { position: absolute; z-index: 1; top: 6px; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); margin: 0; height: 36px; font-size: 13px; pointer-events: none; }
body.phone-round .vt-root.in-session > .vt-session-top > * { pointer-events: auto; }
body.phone-round .vt-root.in-session > .vt-play-panel {
  flex: 1 1 auto; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto minmax(118px, 1fr) auto; gap: 4px 10px; align-items: center;
}
body.phone-round .vt-root.in-session .vt-prompt-heading { grid-column: 1 / -1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 14px; min-height: 36px; padding: 0 84px; text-align: center; }
body.phone-round .vt-root.in-session .vt-prompt-heading .vt-eyebrow { order: 2; }
body.phone-round .vt-root.in-session .vt-prompt-heading h1 { order: 1; margin: 0; font-size: 22px; line-height: 36px; }
body.phone-round .vt-root.in-session .vt-chord-path { order: 3; position: static; gap: 6px; font-size: 13px; }
body.phone-round .vt-root.in-session .vt-chord-path span { padding: 1px 8px; }
/* The instruction keeps two lines of height and a clue takes its place, so the board does not move. */
body.phone-round .vt-root.in-session .vt-prompt-heading p { order: 4; flex: 1 0 100%; margin: 0; min-height: 38px; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1.3; }
body.phone-round .vt-root.in-session .vt-play-panel:has(.vt-shape-clue) .vt-prompt-heading p { display: none; }
body.phone-round .vt-root.in-session .vt-shape-clue { grid-column: 1 / -1; grid-row: 2; margin: 0; max-width: none; min-height: 38px; padding: 1px 10px; font-size: 13.5px; line-height: 1.3; display: flex; align-items: center; }
body.phone-round .vt-root.in-session .vt-shape-clue b { display: inline; margin: 0 6px 0 0; white-space: nowrap; }
/* Last row, on the left: the message; without one, which notes stay and which move; without that, the colors. */
body.phone-round .vt-root.in-session .vt-movement-row { grid-column: 1; grid-row: 4; justify-content: flex-start; margin: 0; gap: 4px 6px; }
body.phone-round .vt-root.in-session .vt-movement-row span { padding: 1px 7px; white-space: nowrap; }
body.phone-round .vt-root.in-session .vt-note-feedback ~ .vt-movement-row,
body.phone-round .vt-root.in-session .vt-play-panel:has(.vt-movement-row) .vt-legend,
body.phone-round .vt-root.in-session .vt-play-panel > details { display: none; }
body.phone-round .vt-root.in-session .vt-play-panel > .vt-board { grid-column: 1 / -1; grid-row: 3; height: 100%; }
body.phone-round .vt-root.in-session .vt-note-feedback,
body.phone-round .vt-root.in-session .vt-legend { grid-column: 1; grid-row: 4; justify-content: flex-start; gap: 10px; margin: 0; min-height: 44px; font-size: 13px; line-height: 1.3; text-align: left; }
body.phone-round .vt-root.in-session .vt-builder-tools { grid-column: 2; grid-row: 4; flex-wrap: nowrap; gap: 8px; }
body.phone-round .vt-root.in-session .vt-builder-tools button { padding: 0 11px; font-size: 13px; }
body.phone-round .vt-root.in-session .vt-actions { grid-column: 3; grid-row: 4; flex-wrap: nowrap; gap: 8px; margin: 0; }
/* Choosing which grip you played needs the room: this one screen scrolls. */
body.phone-round .vt-root.in-session > .vt-play-panel:has(.vt-answer-gallery) { display: block; flex: none; }
body.phone-round .vt-root.in-session .vt-answer-gallery .vt-gallery-title { margin: 4px 0; }
body.phone-round .vt-root.in-session .vt-answer-gallery .vt-board { height: 150px; }
body.phone-round .vt-root.in-session .vt-answer-gallery .vt-answers { margin: 8px 0; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
body.phone-round .vt-root.in-session .vt-answer-gallery .vt-answer-card { white-space: normal; padding: 8px 12px; }
body.phone-round .vt-root.in-session > .vt-play-panel:has(.vt-answer-gallery) .vt-actions { justify-content: flex-end; margin: 8px 0 0; }
