:root {
  color-scheme: dark;
  --bg: #11140f;
  --ink: #f4efe4;
  --muted: #b7b09f;
  --accent: #d4a017;
  --card: #1b2018;
  --line: #2c3327;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 10% -10%, #2a2414, var(--bg));
  color: var(--ink);
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.eyebrow {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 0.75rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.lede, .muted p { color: var(--muted); line-height: 1.5; }
.fine-print { font-size: 0.85rem; }

.legal-page h2 { margin-top: 1.6rem; }
.legal-page p,
.legal-page li { color: var(--muted); line-height: 1.55; }
.legal-page a { color: var(--accent); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.25rem;
}

label { display: block; margin-bottom: 0.4rem; }
input[type="file"] { display: block; width: 100%; margin-bottom: 1rem; }

.guitar-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 1rem;
  padding: 0.85rem;
}
.guitar-setup legend { color: var(--muted); padding: 0 0.35rem; }
.guitar-setup label { margin: 0; }
.guitar-setup select,
.guitar-setup input {
  min-width: 0;
  width: 100%;
  color: var(--ink);
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.check input { width: auto; margin: 0; }
form .fine-print { margin: 0 0 1rem; }

button,
a.button {
  background: var(--accent);
  color: #1a1406;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

button:disabled { cursor: wait; opacity: 0.65; }

.status { min-height: 1.4em; color: var(--muted); }

.result-meta,
.result-actions { color: var(--muted); }

.quality-summary {
  margin: 0.6rem 0 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
}

.quality-line {
  margin: 0;
  color: var(--muted);
}

.quality-warning {
  margin: 0.35rem 0 0;
  color: #ffd08a;
}

.quality-warning[hidden],
.quality-line[hidden] {
  display: none;
}

.result-actions {
  margin: 0.85rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.audio-compare-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
}

.audio-compare-panel h3 {
  margin-top: 0;
}

.audio-compare-panel .fine-print {
  margin: 0.25rem 0;
}

.audio-compare-panel audio {
  width: 100%;
  margin-top: 0.55rem;
}

h3 { font-size: 0.95rem; margin: 1rem 0 0.45rem; }

.tab-preview,
.note-list {
  margin: 0;
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.35;
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #e8e2d2;
  white-space: pre;
}

.note-list { max-height: 16rem; overflow: auto; }

form.drop-active {
  outline: 2px dashed var(--accent);
  outline-offset: 6px;
}

.practice-panel label { margin-top: 0.35rem; }

.practice-actions {
  margin: 0.35rem 0 0.75rem;
}

.practice-clear {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

.practice-status { min-height: 1.4em; }

.practice-feedback {
  min-width: 0;
  max-width: 100%;
}

.practice-feedback-shell {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
}

.practice-feedback-header {
  margin-bottom: 0.65rem;
}

.practice-status-badge {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.practice-status-ok { color: #b8e6a8; }
.practice-status-needs_review { color: #ffd08a; }
.practice-status-unsupported_polyphony { color: #ffb38a; }
.practice-status-rejected { color: #ff9a9a; }

.practice-score {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.practice-score-untrusted {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.practice-identity-sanity,
.practice-chord-warning {
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-identity-sanity {
  color: #c8d4ff;
  background: rgba(120, 140, 220, 0.12);
  border: 1px solid rgba(150, 170, 240, 0.35);
}

.practice-chord-warning {
  color: #ffd08a;
  background: rgba(255, 180, 80, 0.1);
  border: 1px solid rgba(255, 180, 80, 0.35);
}

.practice-chord-issues { margin-top: 0.75rem; }

.practice-chord-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.practice-chord-item {
  margin: 0.35rem 0;
  padding: 0.35rem 0.45rem;
  border-left: 3px solid #9aa3ff;
  background: rgba(255, 255, 255, 0.03);
}

.practice-chord-title {
  margin: 0;
  font-weight: 600;
}

.practice-chord-detail {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-message,
.practice-rejection,
.practice-next-step {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-rejection { color: #ffbcbc; }

.practice-subheading {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.92rem;
}

.practice-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.practice-metrics dt {
  margin: 0;
  color: var(--muted);
}

.practice-metrics dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.practice-metrics-block {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
}

.practice-events { margin-top: 0.85rem; }

.practice-event-list {
  margin: 0;
  padding-left: 1.2rem;
}

.practice-event {
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-left: 3px solid var(--line);
  background: #12160f;
  border-radius: 0 6px 6px 0;
}

.practice-event-title {
  margin: 0;
  font-weight: 700;
}

.practice-event-detail {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-event-correct { border-left-color: #6fbf73; }
.practice-event-wrong_pitch { border-left-color: #e07a7a; }
.practice-event-early,
.practice-event-late,
.practice-event-too_short,
.practice-event-too_long { border-left-color: #d4a017; }
.practice-event-missed,
.practice-event-extra { border-left-color: #9aa3ff; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.practice-plan {
  min-width: 0;
  max-width: 100%;
  margin-top: 0.85rem;
}

.practice-plan-shell {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.practice-plan-heading,
.practice-metronome-heading {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.practice-plan-summary,
.practice-plan-next,
.practice-plan-tempo,
.practice-plan-item-reason,
.practice-plan-item-meta,
.practice-plan-item-approval,
.practice-metronome-note {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-plan-list {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
}

.practice-plan-item {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
}

.practice-plan-item-done {
  border-color: rgba(111, 191, 115, 0.55);
  background: rgba(111, 191, 115, 0.08);
}

.practice-plan-item-title {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-plan-steps {
  margin: 0.35rem 0;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-plan-toggle {
  margin-top: 0.35rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}

.practice-plan-toggle[aria-pressed="true"] {
  border-color: rgba(111, 191, 115, 0.65);
  color: #b8e6a8;
}

.practice-metronome {
  margin-top: 0.85rem;
  min-width: 0;
}

.practice-metronome-shell {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
}

.practice-metronome-bpm {
  margin: 0.35rem 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.practice-metronome-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.practice-metronome-controls button {
  min-width: 4.5rem;
}

.practice-metronome-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #11140f;
}

.practice-metronome-status {
  min-height: 1.4em;
}

.practice-debrief {
  min-width: 0;
  max-width: min(100%, 390px);
  margin-top: 0.85rem;
  overflow-wrap: anywhere;
}

.practice-debrief-shell {
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10140e;
}

.practice-debrief-heading {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.practice-debrief-headline {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-debrief-disclaimer,
.practice-debrief-strength-evidence,
.practice-debrief-priority-evidence,
.practice-debrief-priority-range,
.practice-debrief-next-objective,
.practice-debrief-next-criterion {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-debrief-disclaimer {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
}

.practice-debrief-subheading {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.9rem;
}

.practice-debrief-strength-label,
.practice-debrief-priority-label {
  margin: 0.25rem 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.practice-debrief-priority-list,
.practice-debrief-warning-list,
.practice-debrief-reason-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.practice-debrief-priority-item {
  margin-bottom: 0.55rem;
}

.practice-debrief-actions {
  max-width: min(100%, 390px);
}

.practice-hotspots {
  min-width: 0;
  max-width: 100%;
  margin-top: 0.85rem;
  overflow-wrap: anywhere;
}

.practice-hotspots-shell {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.practice-hotspots-heading {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.practice-hotspots-summary,
.practice-hotspots-next,
.practice-hotspots-synthetic {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-hotspots-synthetic {
  font-size: 0.88rem;
  color: #ffd08a;
}

.practice-hotspots-cards {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.practice-hotspot-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
  min-width: 0;
}

.practice-hotspot-high {
  border-color: rgba(255, 154, 154, 0.55);
}

.practice-hotspot-medium {
  border-color: rgba(255, 208, 138, 0.45);
}

.practice-hotspot-low {
  border-color: rgba(200, 208, 255, 0.35);
}

.practice-hotspot-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.practice-hotspot-range,
.practice-hotspot-objective,
.practice-hotspot-bpm,
.practice-hotspot-meta {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-hotspot-steps {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.practice-hotspots-reason-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.practice-hotspots-actions {
  margin-top: 0.35rem;
}

.practice-comparison-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.practice-comparison-section label { margin-top: 0.35rem; }

.practice-comparison-status { min-height: 1.4em; }

.practice-comparison {
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}

.practice-comparison-shell {
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.practice-comparison-header { margin-bottom: 0.5rem; }

.practice-comparison-badge {
  font-weight: 600;
  font-size: 1.05rem;
}

.practice-comparison-improved { color: #b8e6a8; }
.practice-comparison-regressed { color: #ff9a9a; }
.practice-comparison-mixed { color: #ffd08a; }
.practice-comparison-unchanged { color: #c8d0ff; }
.practice-comparison-incomparable { color: #ffb38a; }

.practice-comparison-reasons { margin-top: 0.65rem; }

.practice-comparison-reason-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.practice-comparison-reason-list li {
  overflow-wrap: anywhere;
  margin-bottom: 0.25rem;
}

.practice-comparison-metrics { margin-top: 0.75rem; }

.practice-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.practice-comparison-table th,
.practice-comparison-table td {
  padding: 0.35rem 0.45rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-wrap: anywhere;
}

.practice-comparison-table th[scope="col"] {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.practice-comparison-row-positive td:last-child { color: #b8e6a8; }
.practice-comparison-row-negative td:last-child { color: #ff9a9a; }

.practice-comparison-positive,
.practice-comparison-negative {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.practice-comparison-positive { color: #b8e6a8; }
.practice-comparison-negative { color: #ffbcbc; }

.practice-compare-run {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.practice-compare-run:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.practice-curriculum-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.practice-curriculum-section label { margin-top: 0.35rem; }

.practice-curriculum-status { min-height: 1.4em; }

.practice-curriculum {
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}

.practice-curriculum-shell {
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 0;
}

.practice-curriculum-header { margin-bottom: 0.5rem; }

.practice-curriculum-badge {
  font-weight: 600;
  font-size: 1.05rem;
}

.practice-curriculum-ok { color: #b8e6a8; }
.practice-curriculum-needs_review { color: #ffd08a; }
.practice-curriculum-insufficient { color: #ffb38a; }

.practice-curriculum-summary,
.practice-curriculum-next,
.practice-curriculum-order,
.practice-curriculum-day-focus,
.practice-curriculum-exercise-meta {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-curriculum-file-list,
.practice-curriculum-reason-list,
.practice-curriculum-trend-list,
.practice-curriculum-day-list,
.practice-curriculum-exercise-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.practice-curriculum-file-list li,
.practice-curriculum-reason-list li,
.practice-curriculum-trend-list li,
.practice-curriculum-exercise-title {
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-bottom: 0.25rem;
}

.practice-curriculum-trends,
.practice-curriculum-reasons,
.practice-curriculum-days { margin-top: 0.75rem; }

.practice-curriculum-trend-improving { color: #b8e6a8; }
.practice-curriculum-trend-stable { color: #c8d0ff; }
.practice-curriculum-trend-regressing { color: #ff9a9a; }
.practice-curriculum-trend-insufficient { color: #ffb38a; }

.practice-curriculum-day {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
}

.practice-curriculum-day-review {
  border-color: rgba(200, 208, 255, 0.45);
  background: rgba(200, 208, 255, 0.06);
}

.practice-curriculum-day-title {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.practice-curriculum-run {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.practice-curriculum-run:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.practice-curriculum-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .practice-plan-toggle,
  .practice-metronome-controls button {
    transition: none;
  }
}

@media (max-width: 32rem) {
  .practice-metronome-controls {
    flex-direction: column;
  }
  .practice-metronome-controls button {
    width: 100%;
  }
  .practice-curriculum-actions {
    flex-direction: column;
  }
  .practice-curriculum-actions button {
    width: 100%;
  }
}

.beta-passport-panel label { margin-top: 0.35rem; }

.beta-passport-form input[type="text"],
.beta-passport-form select {
  width: 100%;
  color: var(--ink);
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.beta-passport-consent-fieldset,
.beta-passport-device-fieldset,
.beta-passport-onboarding-fieldset,
.beta-passport-a11y-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
}

.beta-passport-consent-fieldset legend,
.beta-passport-device-fieldset legend,
.beta-passport-onboarding-fieldset legend,
.beta-passport-a11y-fieldset legend {
  color: var(--muted);
  padding: 0 0.35rem;
}

.beta-passport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
}

.beta-passport-disclaimer {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.beta-passport-status { min-height: 1.4em; }

.beta-passport-preview {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
  color: #e8e2d2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.beta-cohort-panel label { margin-top: 0.35rem; }

.beta-cohort-rows,
.beta-cohort-matrix {
  display: grid;
  gap: 0.65rem;
}

.beta-cohort-row,
.beta-cohort-matrix-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  margin: 0;
}

.beta-cohort-row label,
.beta-cohort-matrix-row label {
  display: block;
  margin-top: 0.35rem;
}

.beta-cohort-row input[type="text"],
.beta-cohort-row input[type="number"],
.beta-cohort-row select,
.beta-cohort-matrix-row input[type="text"],
.beta-cohort-matrix-row input[type="number"],
.beta-cohort-matrix-row select {
  width: 100%;
  color: var(--ink);
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.beta-cohort-matrix-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
}

.beta-cohort-matrix-fieldset legend {
  color: var(--muted);
  padding: 0 0.35rem;
}

.beta-cohort-row-actions,
.beta-cohort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
}

.beta-cohort-summary {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.beta-cohort-status { min-height: 1.4em; }

.beta-cohort-preview {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
  color: #e8e2d2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.beta-feedback-panel label { margin-top: 0.35rem; }

.beta-feedback-form input[type="text"],
.beta-feedback-form select,
.beta-feedback-form textarea {
  width: 100%;
  color: var(--ink);
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.beta-feedback-form textarea {
  min-height: 5.5rem;
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.beta-run-panel label { margin-top: 0.35rem; }

.beta-run-form input[type="text"],
.beta-run-form select {
  width: 100%;
  color: var(--ink);
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.beta-run-bulk-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
}

.beta-run-bulk-fieldset legend {
  color: var(--muted);
  padding: 0 0.35rem;
}

.beta-run-bulk-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.5rem 0;
}

.beta-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.beta-run-progress {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.beta-run-status { min-height: 1.4em; }

.beta-run-preview {
  background: #0a0d08;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.beta-cockpit-panel label { margin-top: 0.35rem; }

.beta-cockpit-panel input[type="text"] {
  width: 100%;
  max-width: 14rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.beta-cockpit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.beta-cockpit-state {
  font-weight: 600;
  margin-top: 0.5rem;
}

.beta-cockpit-next-step {
  margin-top: 0.35rem;
  color: var(--muted);
}

.beta-cockpit-status { min-height: 1.4em; }

.beta-cockpit-preview {
  background: #0a0d08;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 22rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.first-mission-panel {
  max-width: min(100%, 390px);
}

.first-mission-panel label { margin-top: 0.35rem; }

.first-mission-form input[type="text"],
.first-mission-form select {
  width: 100%;
  max-width: 14rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.first-mission-consent-fieldset,
.first-mission-device-fieldset,
.first-mission-practice-fieldset,
.first-mission-export-fieldset {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem 0.8rem;
}

.first-mission-consent-fieldset legend,
.first-mission-device-fieldset legend,
.first-mission-practice-fieldset legend,
.first-mission-export-fieldset legend {
  font-weight: 600;
  padding: 0 0.25rem;
}

.first-mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.first-mission-state {
  font-weight: 600;
  margin-top: 0.5rem;
}

.first-mission-next {
  margin-top: 0.35rem;
  color: var(--muted);
}

.first-mission-status { min-height: 1.4em; }

.first-mission-scenarios {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  max-width: min(100%, 390px);
}

.first-mission-preview {
  background: #0a0d08;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.guided-first-run-panel {
  max-width: min(100%, 390px);
}

.guided-first-run-steps {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.guided-first-run-steps li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: #12160f;
}

.guided-first-run-steps li[aria-current="step"] {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.guided-step-label {
  display: block;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.guided-step-hint {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.guided-first-run-status {
  font-weight: 600;
  margin-top: 0.65rem;
}

.guided-first-run-next {
  margin-top: 0.25rem;
  color: var(--muted);
}

.guided-first-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.guided-first-run-actions button {
  min-height: 2.5rem;
}

body.guided-first-run-active {
  overflow-x: hidden;
}

body.guided-first-run-active .wrap {
  max-width: 390px;
  overflow-x: hidden;
  padding-left: 1rem;
  padding-right: 1rem;
}

body.guided-first-run-active .first-mission-actions,
body.guided-first-run-active .first-mission-preview,
body.guided-first-run-active #practice-hotspots,
body.guided-first-run-active #practice-plan,
body.guided-first-run-active #practice-metronome,
body.guided-first-run-active #practice-feedback,
body.guided-first-run-active .practice-hotspots-actions,
body.guided-first-run-active .practice-debrief-actions {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .guided-first-run-steps li,
  .guided-first-run-actions button {
    transition: none;
  }
}

.beta-category-fieldset,
.beta-diagnostics-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
}

.beta-category-fieldset legend,
.beta-diagnostics-fieldset legend {
  color: var(--muted);
  padding: 0 0.35rem;
}

.beta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
}

.beta-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

.beta-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.beta-status { min-height: 1.4em; }

.beta-preview {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
  color: #e8e2d2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.audio-provenance-panel label { margin-top: 0.35rem; }

.audio-provenance-form input[type="text"],
.audio-provenance-form select {
  width: 100%;
  color: var(--ink);
  background: #12160f;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
}

.provenance-purpose-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
}

.provenance-purpose-fieldset legend {
  color: var(--muted);
  padding: 0 0.35rem;
}

.provenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
}

.provenance-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

.provenance-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.provenance-status { min-height: 1.4em; }

.provenance-preview {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12160f;
  color: #e8e2d2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 32rem) {
  .guitar-setup { grid-template-columns: 1fr; }
  .practice-metrics { grid-template-columns: 1fr; }
  .practice-metrics dd { text-align: left; }
  .beta-actions { flex-direction: column; }
  .beta-actions button { width: 100%; }
  .beta-passport-actions { flex-direction: column; }
  .beta-passport-actions button { width: 100%; }
  .beta-cohort-actions { flex-direction: column; }
  .beta-cohort-actions button { width: 100%; }
  .beta-cohort-row-actions { flex-direction: column; }
  .beta-cohort-row-actions button { width: 100%; }
  .beta-run-actions { flex-direction: column; }
  .beta-run-actions button { width: 100%; }
  .beta-cockpit-actions { flex-direction: column; }
  .beta-cockpit-actions button { width: 100%; }
  .first-mission-actions { flex-direction: column; }
  .first-mission-actions button { width: 100%; }
  .guided-first-run-actions { flex-direction: column; }
  .guided-first-run-actions button { width: 100%; }
  .provenance-actions { flex-direction: column; }
  .provenance-actions button { width: 100%; }
}
