:root {
  --bg:#10131b;
  --surface:#181d28;
  --surface2:#202737;
  --border:#30384a;
  --border2:#46516a;
  --text:#edf1fa;
  --muted:#adb8cd;
  --hint:#99a7c0;
  --accent:#9bbcff;
  --accent-text:#101d38;
  --serif:var(--font);
}
html[data-theme=light] {
  --bg:#f3f5fa;
  --surface:#ffffff;
  --surface2:#eaf0fa;
  --border:#dce2ed;
  --border2:#b5c2d9;
  --text:#19243b;
  --muted:#52617b;
  --hint:#5f6e87;
  --accent:#295dbe;
  --accent-text:#fff;
  --key-bg:#ffffff;
}
body {
  padding:0;
  font-size:14px;
}
button,input,select {
  font:inherit;
}
button,a,input,select {
  touch-action:manipulation;
}
select,input {
  color:var(--text);
  background:var(--surface2);
  border:1px solid var(--border2);
  border-radius:9px;
  padding:10px;
  min-height:44px;
}
select:focus-visible,a:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:4px;
}
button {
  min-height:44px;
}
a {
  color:inherit;
  text-decoration:none;
}
.topbar,header,main,footer {
  max-width:1200px;
  margin:auto;
}
.topbar {
  display:flex;
  justify-content:space-between;
  padding:25px 32px;
  border-bottom:1px solid var(--border);
  font-weight:700;
}
.topbar span {
  color:var(--muted);
  font-weight:400;
}
.lab-label,.eyebrow,.header-eyebrow {
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.lab-label {
  align-self:center;
}
header {
  padding:42px 32px 38px;
  overflow:hidden;
  min-height:258px;
  border:0;
}
header h1 {
  font-size:clamp(42px,5vw,62px);
  font-weight:400;
  letter-spacing:-.045em;
  line-height:1.04;
}
header h1 em {
  color:var(--accent);
  font-weight:400;
}
header p {
  font-size:13px;
  line-height:1.8;
  margin-top:17px;
}
.header-eyebrow {
  margin-bottom:19px;
}
.status-dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:100%;
  background:var(--accent);
  margin-right:8px;
}
.header-actions {
  right:32px;
  top:40px;
}
.hero-art {
  position:absolute;
  right:148px;
  top:67px;
  width:290px;
  height:152px;
  display:flex;
  gap:10px;
  align-items:center;
  transform:rotate(-8deg);
}
.hero-art i {
  flex:1;
  border-radius:25px;
  height:50%;
  background:var(--accent);
  opacity:.65;
}
.hero-art i:nth-child(2) {
  height:72%;
  opacity:.8;
}
.hero-art i:nth-child(3) {
  height:94%;
  opacity:1;
}
.hero-art i:nth-child(4) {
  height:65%;
  opacity:.7;
}
.hero-art i:nth-child(5) {
  height:84%;
  opacity:.9;
}
.hero-art i:nth-child(6) {
  height:50%;
  opacity:.55;
}
.hero-art i:nth-child(7) {
  height:30%;
  opacity:.4;
}
.hero-art span {
  position:absolute;
  bottom:-30px;
  width:100%;
  text-align:center;
  letter-spacing:.3em;
  font-size:10px;
  color:var(--muted);
}
main {
  padding:0 32px;
}
.control-panel {
  display:flex;
  gap:30px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  padding:18px 0;
}
.seg-wrap {
  padding:0;
  margin:0;
  max-width:none;
  min-width:0;
}
.seg-wrap:first-child {
  flex:1;
}
.seg-label {
  color:var(--muted);
  font-size:10px;
}
.seg-btn {
  height:38px;
  min-width:37px;
  padding:0 10px;
  border-radius:7px;
  font-size:12px;
}
.seg-scroll {
  gap:5px;
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:15px;
  margin:30px 0 18px;
}
.section-heading h2 {
  font-size:25px;
  font-weight:400;
  font-family:var(--serif);
  letter-spacing:-.03em;
  margin-top:4px;
}
.section-heading>span,.subtle {
  font-size:12px;
  color:var(--muted);
}
.eyebrow {
  color:var(--accent);
}
.workspace {
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);
  gap:18px;
}
.panel {
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:16px;
  padding:22px;
  min-width:0;
}
.panel-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:17px;
}
.panel h3 {
  font-size:17px;
  font-weight:500;
}
.panel-head select {
  max-width:210px;
}
.scale-title-big {
  font:36px var(--serif);
  letter-spacing:-.035em;
}
.scale-title-big span {
  color:var(--accent);
}
.scale-description {
  color:var(--muted);
  margin:6px 0 19px;
  font-size:12px;
}
.note-strip {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin:20px 0;
}
.note-btn {
  flex:1;
  min-width:45px;
  background:var(--surface2);
  border:1px solid var(--border);
  border-radius:9px;
  padding:8px 4px;
  color:var(--text);
  font-size:16px;
}
.note-btn small {
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-top:3px;
}
.note-btn:first-child {
  border-color:var(--accent);
  color:var(--accent);
}
.note-btn:hover {
  background:var(--border2);
}
.studio-keyboard .kbd-inner {
  height:128px;
  min-width:420px;
}
.studio-keyboard button {
  cursor:pointer;
  padding:0 0 9px;
}
.studio-keyboard .wkey {
  font-size:10px;
}
.studio-keyboard .bkey {
  font-size:9px;
}
.studio-keyboard button:active {
  filter:brightness(.7);
}
.legend {
  display:flex;
  gap:17px;
  margin-top:10px;
  font-size:10px;
  color:var(--muted);
}
.legend b {
  color:var(--accent);
}
.button {
  border:1px solid var(--border2);
  background:var(--surface2);
  color:var(--text);
  border-radius:8px;
  padding:9px 14px;
  font-size:12px;
  white-space:nowrap;
}
.button:hover {
  border-color:var(--accent);
}
.button.primary {
  background:var(--accent);
  color:var(--accent-text);
  border-color:var(--accent);
  font-weight:700;
}
.button:disabled {
  opacity:.4;
  cursor:default;
}
.small-action {
  background:transparent;
  border:0;
  color:var(--muted);
  font-size:12px;
  padding:8px;
}
.small-action:hover {
  color:var(--accent);
}
.chord-palette {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-top:14px;
}
.palette-item {
  border:1px solid var(--border);
  border-radius:9px;
  overflow:hidden;
  background:var(--surface2);
  position:relative;
}
.palette-item.selected {
  border-color:var(--accent);
}
.chord-preview {
  display:block;
  width:100%;
  border:0;
  color:var(--text);
  background:transparent;
  text-align:left;
  padding:10px 11px 0;
}
.chord-preview small {
  font-size:10px;
  color:var(--muted);
  display:block;
}
.chord-preview strong {
  font-size:19px;
  font-weight:500;
}
.chord-add {
  width:100%;
  min-height:30px;
  font-size:10px;
  border:0;
  background:transparent;
  color:var(--accent);
  padding:2px 9px 8px;
  text-align:left;
}
.chord-detail {
  margin-top:15px;
}
.chord-detail .chord-box {
  background:transparent;
  padding:0;
  border:0;
}
.chord-detail .chord-box-name {
  display:none;
}
.chord-detail .inst-card {
  background:transparent;
}
.chord-detail .cc {
  display:block;
  width:max-content;
  margin:auto;
}
.chord-detail .vc-label {
  font-size:10px;
}
.toggle {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  color:var(--muted);
}
.toggle input {
  min-height:0;
  accent-color:var(--accent);
  width:15px;
  height:15px;
}
.builder {
  margin-top:18px;
}
.builder-head {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.builder-head h3 {
  font:23px var(--serif);
}
.builder-head select {
  max-width:300px;
  width:100%;
}
.sequence {
  display:flex;
  gap:10px;
  margin:20px 0;
  overflow-x:auto;
  padding:2px 2px 9px;
  min-height:135px;
}
.step {
  flex:0 0 132px;
  border:1px solid var(--border2);
  border-radius:11px;
  background:var(--surface2);
  overflow:hidden;
  transition:border-color .15s,background .15s;
}
.step.playing {
  border-color:var(--accent);
  background:var(--border);
}
.step-preview {
  border:0;
  background:transparent;
  color:var(--text);
  width:100%;
  padding:12px 13px 0;
  text-align:left;
}
.step-preview small {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  color:var(--muted);
}
.step-preview strong {
  font:28px var(--serif);
  display:block;
  margin:3px 0;
}
.step-controls {
  display:flex;
  justify-content:space-around;
}
.step-controls button {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:4px 8px;
  min-height:30px;
}
.step-controls button:disabled {
  opacity:.2;
}
.empty-sequence {
  margin:auto;
  color:var(--muted);
  text-align:center;
}
.transport {
  display:flex;
  flex-wrap:wrap;
  gap:15px;
  align-items:center;
  padding-top:16px;
  border-top:1px solid var(--border);
}
.tempo {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  color:var(--muted);
}
.tempo input {
  width:66px;
  padding:8px;
}
.transport .grow {
  flex:1;
}
.custom-chord {
  display:flex;
  gap:7px;
  margin-top:15px;
  align-items:center;
  flex-wrap:wrap;
}
.custom-chord input {
  width:160px;
  font-size:12px;
}
.custom-chord label {
  font-size:12px;
  color:var(--muted);
}
.borrowed {
  color:#e1b684;
  font-size:10px;
}
.saved-row {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px;
}
.saved-row select {
  flex:1;
  min-width:140px;
  font-size:12px;
}
.saved-row .button {
  padding:8px 11px;
}
.library {
  margin-top:40px;
  padding-top:5px;
  border-top:1px solid var(--border);
}
.search-wrap {
  max-width:none;
  padding:0;
}
.filter-wrap {
  position:static;
  padding:14px 0;
  background:transparent;
}
.filter-inner {
  max-width:none;
}
.filter-btn {
  min-height:32px;
}
.scale-list {
  max-width:none;
  padding:8px 0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:start;
  gap:12px;
}
.scale-card.open {
  grid-column:1/-1;
}
.scale-title {
  font-size:18px;
}
.scale-title>span {
  display:block;
  margin-left:0!important;
  margin-top:2px;
}
.scale-mood {
  font-size:12px;
}
.scale-summary {
  padding-top:18px;
  padding-bottom:18px;
}
.scale-accent-bar {
  width:3px;
}
.scale-detail {
  padding:8px 20px 20px;
}
.scale-detail .kbd-inner {
  max-width:700px;
}
.altref {
  max-width:none;
  padding:0;
  margin:20px 0 40px;
}
.detail-label {
  color:var(--muted);
}
.degree-grid {
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}
.no-results {
  grid-column:1/-1;
}
footer {
  padding:24px 32px;
  border-top:1px solid var(--border);
  font-size:11px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
}
.studio-neck {
  margin-top:14px;
}
.studio-neck .neck-cell {
  flex:1;
  min-width:30px;
}
.studio-neck .neck {
  display:block;
}
.studio-neck .neck-wrap {
  max-width:100%;
}
.info-note {
  margin-top:12px;
  color:var(--muted);
  font-size:11px;
}
.library-open {
  margin:12px 0;
}
.saved-row input {
  min-width:100px;
  width:140px;
  font-size:12px;
}
.panel .scale-title-big {
  font:36px var(--serif);
  letter-spacing:-.035em;
}
.secondary-panel {
  margin-top:18px;
}
.secondary-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
  gap:10px;
  margin-top:18px;
}
.secondary-card {
  border:1px solid var(--border2);
  background:var(--surface2);
  border-radius:10px;
  padding:14px 12px 5px;
}
.secondary-card strong {
  display:block;
  font:24px var(--serif);
  margin:9px 0 4px;
}
.secondary-card strong span {
  color:var(--muted);
  font-size:17px;
}
.secondary-card small {
  color:var(--muted);
  font-size:11px;
}
.secondary-card>div {
  display:flex;
  justify-content:space-between;
  gap:4px;
}
.secondary-card .small-action {
  font-size:11px;
  padding:6px 0;
  color:var(--accent);
}
.info-note a {
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px;
}
@media(min-width:1050px) {
  .seg-scroll {
    flex-wrap:wrap;
  }
  .seg-wrap:first-child .seg-scroll {
    flex-wrap:nowrap;
  }
}
@media(max-width:950px) {
  .hero-art {
    right:115px;
    width:210px;
  }
  .control-panel {
    flex-direction:column;
    gap:14px;
  }
  .workspace {
    grid-template-columns:minmax(0,1.3fr) minmax(240px,1fr);
  }
  .scale-list {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .chord-palette {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:650px) {
  main {
    padding:0 18px;
  }
  .topbar {
    padding:18px;
  }
  header {
    padding:30px 18px;
    min-height:0;
  }
  header h1 {
    font-size:44px;
  }
  header p {
    max-width:270px;
  }
  .hero-art {
    display:none;
  }
  .header-actions {
    right:18px;
    top:30px;
  }
  .workspace {
    grid-template-columns:1fr;
  }
  .panel {
    padding:18px;
  }
  .scale-list {
    grid-template-columns:1fr;
  }
  .chord-palette {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .section-heading>span {
    display:none;
  }
  .section-heading h2 {
    font-size:24px;
  }
  .panel-head select {
    max-width:170px;
  }
  .builder-head select {
    max-width:none;
  }
  .transport {
    gap:12px;
  }
  .transport .grow {
    display:none;
  }
  .saved-row {
    gap:7px;
  }
  .saved-row input {
    flex:1;
  }
  .saved-row select {
    flex-basis:100%;
  }
  footer {
    padding:20px 18px;
    gap:20px;
  }
  .scale-title-big {
    font-size:30px;
  }
}
.jump-nav {
  display:flex;
  gap:22px;
  font-size:12px;
  font-weight:400;
  color:var(--muted);
}
.jump-nav a:hover {
  color:var(--accent);
}
.theory {
  margin-top:40px;
  border-top:1px solid var(--border);
  padding-top:5px;
  scroll-margin-top:20px;
}
.theory-tabs {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin:22px 0;
}
.theory-tabs .button {
  font-size:12px;
}
.theory-tabs .button span {
  opacity:.6;
  font-size:10px;
  margin-right:4px;
}
.chapter-title {
  font:30px var(--serif);
  letter-spacing:-.025em;
  margin:24px 0 18px;
}
.lesson-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.lesson-card,.theory-lab {
  min-width:0;
  border:1px solid var(--border);
  border-radius:13px;
  padding:22px;
  background:var(--surface);
}
.lesson-card h4 {
  font:21px var(--serif);
  margin-bottom:12px;
  line-height:1.3;
}
.lesson-card p {
  font-size:13px;
  line-height:1.85;
  color:var(--muted);
  margin:10px 0;
}
.lesson-card b {
  color:var(--text);
  font-weight:600;
}
.theory-table {
  max-width:100%;
  overflow-x:auto;
  margin:14px 0;
}
.theory-table table {
  border-collapse:collapse;
  width:100%;
  font-size:12px;
  text-align:left;
}
.theory-table td,.theory-table th {
  padding:9px 8px;
  border-bottom:1px solid var(--border);
  line-height:1.5;
  vertical-align:top;
}
.theory-table th {
  color:var(--accent);
  font-weight:500;
  font-size:11px;
}
.theory-table td {
  color:var(--muted);
}
.theory-table td:first-child {
  color:var(--text);
}
.theory-lab {
  grid-column:1/-1;
  background:var(--surface2);
}
.interval-picker {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:18px 0;
}
.lab-result {
  display:flex;
  align-items:baseline;
  gap:20px;
  flex-wrap:wrap;
  margin:20px 0;
}
.lab-result strong {
  font:32px var(--serif);
  color:var(--accent);
}
.lab-result span {
  color:var(--muted);
  font-size:13px;
}
.lab-controls {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:16px;
}
.lab-controls label {
  color:var(--muted);
  font-size:12px;
}
.ear-training {
  border-top:1px solid var(--border2);
  margin-top:25px;
  padding-top:20px;
}
.ear-training>p {
  font-size:12px;
  color:var(--muted);
  margin-top:8px;
}
.ear-training #quizAnswer {
  color:var(--accent);
  min-height:20px;
}
.inversion-keyboard .kbd-inner {
  height:115px;
  min-width:550px;
}
.theory-example {
  border-top:1px solid var(--border);
  margin-top:15px;
  padding-top:15px;
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}
.theory-example>div {
  flex:1;
  min-width:130px;
}
.theory-example span {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-bottom:4px;
}
.theory-example strong {
  font-size:14px;
  color:var(--accent);
  font-weight:500;
}
.theory-example .button {
  font-size:11px;
}
.theory-bottom {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:20px 0;
  color:var(--muted);
  font-size:12px;
}
.theory-sources {
  margin-bottom:25px;
}
.secondary-grid {
  grid-template-columns:repeat(auto-fit,minmax(135px,1fr));
}
#studio,#libraryTitle {
  scroll-margin-top:20px;
}
@media(max-width:650px) {
  .lesson-grid {
    grid-template-columns:1fr;
  }
  .lesson-card,.theory-lab {
    padding:18px;
  }
  .theory-tabs {
    gap:6px;
  }
  .theory-tabs .button {
    padding:8px 10px;
    font-size:11px;
  }
  .jump-nav {
    gap:12px;
    font-size:11px;
  }
  .lab-result {
    gap:8px;
  }
  .lab-result span {
    display:block;
    width:100%;
  }
  .secondary-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .secondary-card strong {
    font-size:21px;
  }
  .secondary-card .eyebrow {
    font-size:9px;
  }
  .theory-table td,.theory-table th {
    padding:7px 6px;
  }
  .panel .scale-title-big {
    font-size:30px;
  }
}
@media(max-width:350px) {
  .jump-nav {
    gap:8px;
    font-size:10px;
  }
  .topbar>a {
    font-size:12px;
  }
  .secondary-grid {
    grid-template-columns:1fr;
  }
}
/* Focused views keep the tools usable on a phone without a very long page. */
[hidden] { display: none !important; }
.workspace-nav { position: sticky; top: 0; z-index: 15; display: flex; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border); background: var(--bg); overflow-x: auto; scroll-margin-top: 0; }
.workspace-nav a { display: flex; gap: 9px; align-items: center; min-height: 46px; padding: 11px 20px; border-radius: 8px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.workspace-nav a span { font-size: 13px; }
.workspace-nav a[aria-current] { color: var(--accent); background: var(--surface2); }
.workspace-nav a:hover { color: var(--text); }
.theory, .library { margin-top: 0; border-top: 0; }
.pattern-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.pattern-filters input { flex: 1; min-width: 200px; }
.pattern-filters select { max-width: 240px; font-size: 12px; }
.pattern-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 32px; }
.pattern-card { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); min-width: 0; }
.pattern-card h3 { font: 20px var(--serif); margin: 12px 0 7px; overflow-wrap: anywhere; }
.pattern-chords { color: var(--accent); font-size: 13px; margin-bottom: 10px; }
.pattern-mood { color: var(--muted); font-size: 12px; line-height: 1.7; flex: 1; }
.pattern-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 13px; margin-top: 17px; }
.pattern-bottom>span { font-size: 10px; color: var(--muted); }
.pattern-bottom .button { font-size: 11px; padding: 8px 10px; }
#studio { padding-bottom: 30px; }
#patterns { min-height: 450px; }
header { padding-top: 28px; padding-bottom: 28px; min-height: 240px; }
header h1 { font-size: clamp(40px,4.3vw,55px); }
header .hero-art { top: 45px; height: 135px; }
@media(max-width:950px) { .pattern-results { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:650px) {
  .workspace-nav { gap: 3px; }
  .workspace-nav a { flex: 1; gap: 0; padding: 10px 7px; font-size: 0; justify-content: center; }
  .workspace-nav a span { font-size: 11px; }
  .pattern-results { grid-template-columns: 1fr; }
  .pattern-filters input { flex-basis: 100%; }
  .pattern-filters select { flex: 1; min-width: 0; width: 45%; }
  header { padding-top: 26px; padding-bottom: 24px; min-height: 0; }
  header h1 { font-size: 40px; }
  header p { font-size: 12px; margin-top: 12px; }
  .header-eyebrow { margin-bottom: 14px; font-size: 9px; }
  .header-actions { top: 24px; }
}
#studio, #patterns, #theory, #library, #libraryTitle { scroll-margin-top: 85px; }
.secondary-card .eyebrow { text-transform: none; }
.theory-instruments { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:16px 0; border-bottom:1px solid var(--border); }
.theory-instruments>span { font-size:12px; color:var(--muted); margin-right:8px; }
.theory-neck { max-width:100%; margin:20px 0 10px; }
.theory-neck-scroll { overflow-x:auto; padding-bottom:8px; }
.theory-neck .neck { min-width:max-content; }
.theory-neck .neck-cell { width:38px; flex-basis:38px; height:34px; }
.theory-neck .neck-dot { font-size:10px; }
.theory-fret-voicing { width:max-content; max-width:100%; padding:20px 25px; background:var(--surface); border:1px solid var(--border2); border-radius:12px; margin:18px 0; }
@media(max-width:650px) { .theory-instruments>span { flex-basis:100%; } }

/* Shared visual language: neutral surfaces, blue selection, quiet separators. */
:root { --key-bg:#f5f7fc; }
header { min-height:0; padding:36px 32px 30px; }
header h1 { font-size:clamp(30px,4vw,44px); font-weight:650; letter-spacing:-.04em; padding-right:96px; }
header p { margin-top:10px; font-size:14px; }
.hero-art { display:none; }
.header-actions { top:36px; }
.section-heading h2 { font-weight:650; font-size:23px; }
.eyebrow { color:var(--muted); letter-spacing:.09em; }
.panel { border-radius:10px; padding:24px; box-shadow:0 3px 14px #00000008; }
.workspace-nav { gap:24px; padding:0; margin-bottom:24px; }
.workspace-nav a { border-radius:0; border-bottom:3px solid transparent; padding:16px 4px; }
.workspace-nav a[aria-current] { background:transparent; border-bottom-color:var(--accent); }
.workspace-nav a span { font-weight:600; }
.seg-btn { border-radius:6px; }
.chord-palette { gap:6px; }
.palette-item { border-radius:6px; background:transparent; }
.palette-item.selected { background:var(--surface2); box-shadow:inset 0 2px var(--accent); }
.chord-detail { border-top:1px solid var(--border); margin-top:20px; padding-top:16px; }
.chord-box { border-radius:6px; box-shadow:none; }
.secondary-card { border-radius:6px; background:transparent; border-width:0 0 1px; }
.pattern-card { border-radius:8px; border-width:0 0 1px; box-shadow:none; }
.pattern-card h3 { font-weight:600; font-size:18px; }
.theory-tabs { gap:4px; border-bottom:1px solid var(--border); padding-bottom:10px; }
.theory-tabs .button { background:transparent; border-color:transparent; border-radius:6px; }
.theory-tabs .button.primary { background:var(--surface2); color:var(--accent); border-color:var(--border2); }
.practice { margin-top:24px; border-top:1px solid var(--border); padding-top:22px; }
.practice-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.practice-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:16px; margin-top:18px; }
.practice-item { min-width:0; border-top:2px solid var(--border2); padding-top:14px; }
.practice-item .chord-box { background:transparent; border:0; }
.practice-reading { font-size:13px; line-height:1.7; padding:14px 0; }
.practice-reading strong { display:block; color:var(--accent); margin-bottom:6px; }
.practice-reading p+p { margin-top:8px; }
.practice-item>.button { width:100%; }
.practice-meta { font-size:12px; color:var(--muted); min-height:3em; margin:10px 0; }
@media(max-width:600px) {
  header { padding:26px 18px 22px; }
  header h1 { font-size:30px; }
  .header-actions { top:26px; right:18px; }
  .panel { padding:16px; border-radius:8px; }
  .workspace-nav { gap:6px; }
  .workspace-nav a { padding:14px 4px; }
  .practice-list { grid-template-columns:1fr; }
}

/* Rehearsal transport, portable library and guided exercises. */
.step-duration { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:4px 8px; font-size:11px; color:var(--muted); }
.step-duration input { width:64px; padding:6px; }
.rhythm-controls,.backup-controls,.perform-transport,.exercise-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:18px 0; }
.rhythm-controls label { display:flex; align-items:center; gap:8px; }
.rhythm-controls output,.perform-transport output { min-width:100px; font-variant-numeric:tabular-nums; color:var(--accent); }
.backup-controls input[type=file] { display:block; max-width:230px; border:0; padding:4px 0; font-size:11px; background:transparent; }
.backup-controls output { flex-basis:100%; }
.saved-row input { min-width:120px; }
.lesson-exercise { margin-top:24px; }
.exercise-answers { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
#exerciseHear { margin-top:14px; }
#exerciseFeedback { line-height:1.8; }
#exerciseSolution { max-width:360px; margin-top:16px; }
#exerciseSolution:empty { display:none; }
.is-performance header,.is-performance .topbar,.is-performance .control-panel,.is-performance footer { display:none; }
.perform-transport { position:sticky; top:62px; z-index:10; background:var(--bg); padding:12px 0; border-bottom:1px solid var(--border); }
.perform-transport .button { min-height:56px; font-size:18px; padding:12px 24px; }
.perform-transport input[type=number] { width:84px; font-size:18px; }
.perform-sequence { display:flex; gap:10px; overflow-x:auto; padding:8px 0 18px; }
.perform-sequence .button { flex:0 0 auto; min-width:100px; }
.perform-sequence strong { display:block; font-size:22px; }
.perform-sequence small { display:block; margin-top:4px; color:var(--muted); }
.perform-sequence .selected { border-color:var(--accent); background:var(--surface2); }
.perform-current { display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center; padding:30px 0; }
#performChord { font-size:clamp(44px,8vw,88px); line-height:1.2; }
#performNext { font-size:20px; margin:12px 0; color:var(--muted); }
#performDiagram { min-width:0; max-width:480px; }
#performDiagram .chord-box { padding:22px; }
#performDiagram .chord-box-name { display:none; }
@media(max-width:600px) {
  .workspace-nav a { flex:none; padding:14px 8px; }
  .workspace-nav { gap:2px; }
  .perform-current { grid-template-columns:1fr; gap:12px; padding:16px 0; }
  .perform-transport { top:49px; gap:10px; }
  .perform-transport output { flex-basis:100%; }
  .rhythm-controls label { flex-wrap:wrap; }
  .rhythm-controls select { max-width:100%; }
}
