:root {
  --navy-900: #0b132b;
  --navy-800: #121c38;
  --navy-700: #1a2747;
  --navy-600: #243355;
  --navy-line: #2e3f63;
  --brass-400: #e6b65a;
  --brass-300: #f0c878;
  --brass-500: #cf9f3e;
  --brass-600: #b3862f;
  --ink: #2a2014;
  --parchment: #f5efde;
  --parchment-shade: #ece4cf;
  --text: #e8edf7;
  --text-dim: #9fb0d1;
  --text-faint: #6f80a3;
  --good: #7ee0a0;
  --shadow: 0 18px 48px rgba(0,0,0,0.45);
  --radius: 16px;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(207,159,62,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(46,63,99,0.55), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-900) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  margin-bottom: 34px;
}
.hero-mark {
  font-size: 34px;
  color: var(--brass-400);
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 14px rgba(230,182,90,0.4));
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 54px);
  margin: 0 0 10px;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #fff 0%, var(--brass-300) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}
.subtitle strong { color: var(--brass-300); font-weight: 600; }

/* ---------- Controls ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
  flex: 1 1 150px;
  max-width: 220px;
}
.control-narrow {
  min-width: 130px;
  flex: 0 1 130px;
  max-width: 150px;
}
.control-toggle {
  min-width: 120px;
  flex: 0 0 auto;
  max-width: 150px;
  align-items: flex-start;
  padding-top: 2px;
}

/* ---------- Toggle switch ---------- */
.switch {
  position: relative;
  display: inline-block;
  cursor: pointer;
  height: 44px;
  display: flex;
  align-items: center;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-track {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: var(--navy-900);
  border: 1px solid var(--navy-line);
  position: relative;
  transition: background 0.22s ease, border-color 0.22s ease;
  flex-shrink: 0;
}
.switch-thumb {
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.22s ease;
}
.switch input:checked + .switch-track {
  background: linear-gradient(180deg, var(--brass-300), var(--brass-500));
  border-color: var(--brass-600);
}
.switch input:checked + .switch-track .switch-thumb {
  transform: translateY(-50%) translateX(24px);
  background: var(--navy-900);
}
.switch input:focus-visible + .switch-track {
  outline: none;
  box-shadow: 0 0 0 3px rgba(230,182,90,0.22);
}

/* ---------- Label row (label + shuffle button) ---------- */
.label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Shuffle button ---------- */
.shuffle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  line-height: 1;
  opacity: 0.45;
  transition: opacity 0.18s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: grayscale(0.4);
}
.shuffle-btn:hover {
  opacity: 0.9;
  filter: grayscale(0);
}
.shuffle-btn:active {
  transform: scale(0.85);
}
.shuffle-btn.shuffling {
  animation: shuffleSpin 0.35s ease;
  opacity: 0.9;
  filter: grayscale(0);
}
@keyframes shuffleSpin {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(-20deg) scale(1.2); }
  50%  { transform: rotate(15deg) scale(1.15); }
  75%  { transform: rotate(-8deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

.control label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brass-300);
}

/* ---------- Settings toggle ---------- */
.settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--navy-800);
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  align-self: flex-end;
  height: 44px;
}
.settings-toggle:hover {
  color: var(--brass-300);
  border-color: var(--brass-600);
  background: var(--navy-700);
}
.settings-toggle[aria-expanded="true"] {
  color: var(--brass-300);
  border-color: var(--brass-600);
  background: var(--navy-700);
}
.settings-icon { font-size: 15px; }
.settings-caret {
  font-size: 10px;
  transition: transform 0.25s ease;
}
.settings-toggle[aria-expanded="true"] .settings-caret {
  transform: rotate(180deg);
}

/* ---------- Advanced controls panel ---------- */
.advanced-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  width: 100%;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.3s ease;
  max-height: 2000px;
  opacity: 1;
}
.advanced-controls.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Hide mobile-only octave controls on desktop */
.octave-control-mobile { display: none; }
.select-wrap {
  position: relative;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--navy-900);
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  padding: 12px 36px 12px 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.select-wrap select:hover {
  border-color: var(--brass-600);
  background: #0d1730;
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--brass-400);
  box-shadow: 0 0 0 3px rgba(230,182,90,0.22);
}
.select-wrap select option {
  background: var(--navy-900);
  color: var(--text);
}
.select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brass-400);
  pointer-events: none;
  font-size: 12px;
}

/* ---------- Print button ---------- */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--navy-800);
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.12s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  align-self: flex-end;
  height: 44px;
}
/* Print button inside advanced controls — compact on desktop */
.print-btn-settings {
  flex: 0 0 auto;
  padding: 10px 16px;
  height: 40px;
  font-size: 13px;
}
.print-btn:hover { color: var(--brass-300); border-color: var(--brass-600); background: var(--navy-700); }
.print-btn:active { transform: translateY(1px); }
.print-icon { font-size: 16px; }

/* ---------- MusicXML button ---------- */
.musicxml-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--navy-800);
  border: 1px solid var(--navy-line);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.12s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  align-self: flex-end;
  height: 40px;
  flex: 0 0 auto;
}
.musicxml-btn:hover { color: var(--brass-300); border-color: var(--brass-600); background: var(--navy-700); }
.musicxml-btn:active { transform: translateY(1px); }
.musicxml-icon { font-size: 14px; }

/* ---------- BPM slider ---------- */
.control-bpm {
  min-width: 300px;
  flex: 1 1 300px;
  max-width: 480px;
}
.control-bpm label {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
#bpmSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--navy-600);
  outline: none;
  border: 1px solid var(--navy-line);
  cursor: pointer;
  margin-top: 6px;
}
#bpmSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brass-300), var(--brass-500));
  border: 2px solid var(--brass-600);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(207,159,62,0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
#bpmSlider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 12px rgba(207,159,62,0.5);
}
#bpmSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brass-300), var(--brass-500));
  border: 2px solid var(--brass-600);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(207,159,62,0.35);
}
#bpmSlider:focus-visible {
  box-shadow: 0 0 0 3px rgba(230,182,90,0.22);
}

/* ---------- Play button ---------- */
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-900);
  background: linear-gradient(180deg, var(--brass-300), var(--brass-500));
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 18px rgba(207,159,62,0.28);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
  align-self: flex-end;
  height: 44px;
}
.play-btn:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(207,159,62,0.4); }
.play-btn:active { transform: translateY(1px); }
.play-btn:disabled { opacity: 0.5; cursor: default; filter: grayscale(0.3); box-shadow: none; }
.play-icon { font-size: 11px; }
.play-btn.playing .play-icon { font-size: 12px; }

/* Desktop: show in BPM row, hide mobile button */
.play-btn-desktop { display: inline-flex; }
.play-btn-mobile { display: none; }

/* ---------- Info bar ---------- */
.info-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 22px 0 6px;
  flex-wrap: wrap;
}
.info-chip {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--brass-300);
  background: rgba(230,182,90,0.08);
  border: 1px solid rgba(230,182,90,0.2);
  border-radius: 999px;
  padding: 6px 14px;
}
.info-chip.muted { color: var(--text-faint); background: rgba(159,176,209,0.06); border-color: rgba(159,176,209,0.16); }

/* ---------- Notation ---------- */
.notation {
  margin-top: 18px;
  background: linear-gradient(180deg, var(--parchment) 0%, var(--parchment-shade) 100%);
  border: 1px solid #d9cfb4;
  border-radius: var(--radius);
  padding: 26px 18px 18px;
  min-height: 240px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.4);
  position: relative;
  overflow-x: auto;
}
.notation::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: inset 0 60px 70px -50px rgba(120,100,50,0.25);
}
#vexflow-output {
  display: flex;
  justify-content: center;
}
/* Visually hidden so Firefox pre-loads fonts; revealed via @media print */
#vexflow-output-print {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.print-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.staff-system {
  display: flex;
  justify-content: center;
}
#vexflow-output svg,
.staff-system svg {
  max-width: 100%;
  height: auto;
  display: block;
}
.notation-hint {
  text-align: center;
  color: var(--ink);
  opacity: 0.6;
  font-size: 14px;
  margin-top: 14px;
}
.hidden { display: none !important; }

/* ---------- Note names strip ---------- */
.note-names {
  text-align: center;
  margin: 14px auto 0;
  padding: 14px 18px;
  max-width: 100%;
  line-height: 2.4;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--navy-line);
  border-radius: 12px;
  letter-spacing: 0.3px;
  word-break: break-word;
  position: relative;
  max-height: 8em; /* ~3 lines */
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.note-names.expanded {
  max-height: 9999px;
}

/* Gradient fade at bottom when collapsed */
.note-names.has-overflow:not(.expanded)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3em;
  background: linear-gradient(to bottom, transparent, var(--navy-800));
  pointer-events: none;
  border-radius: 0 0 11px 11px;
}

/* Show more / less toggle button */
.note-toggle {
  display: none;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 6px 16px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass-300);
  background: var(--navy-700);
  border: 1px solid rgba(230,182,90,0.25);
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.note-toggle:hover {
  background: rgba(230,182,90,0.10);
  border-color: var(--brass-500);
}
.note-names.has-overflow .note-toggle { display: block; }
.note-name {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
  font-family: var(--font-ui);
}
.note-name.active {
  background: linear-gradient(180deg, var(--brass-300), var(--brass-500));
  color: var(--navy-900);
  transform: scale(1.18);
  box-shadow: 0 3px 12px rgba(207,159,62,0.5);
  font-weight: 700;
}
.note-sep {
  color: var(--text-faint);
  opacity: 0.4;
  margin: 0 1px;
}

@media print {
  body {
    background: white;
    color: black;
  }
  #vexflow-output {
    display: none !important;
  }
  #vexflow-output-print {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: initial !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    display: block !important;
  }
  .hero, .controls, .info-bar, .note-names, .foot {
    display: none !important;
  }
  .notation {
    background: white;
    border: none;
    box-shadow: none;
  }
  .notation::before {
    display: none;
  }
  /* Ensure SVG text/paths always print in crisp black */
  svg text { fill: #000 !important; }
  svg path { stroke: #000 !important; fill: #000 !important; }
  svg rect { fill: #fff !important; stroke: #000 !important; }
  /* Page-break rules for multi-page print output */
  .print-page {
    page-break-after: always;
  }
  .print-page:last-child {
    page-break-after: auto;
  }
  .staff-system {
    break-inside: avoid;
  }
}
.foot {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.3px;
}
.foot a {
  color: var(--brass-300);
  text-decoration: none;
  position: relative;
  transition: color 0.18s ease;
}
.foot a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--brass-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.foot a:visited {
  color: var(--brass-500);
}
.foot a:hover {
  color: var(--brass-300);
}
.foot a:hover::after {
  transform: scaleX(1);
}
.foot a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(230,182,90,0.22);
  border-radius: 2px;
}

/* ---------- Responsive ---------- */
/* Tablet & small desktop: compact controls but full layout */
@media (max-width: 860px) {
  .controls { gap: 12px; padding: 16px 18px; }
  .control { min-width: 130px; flex: 1 1 140px; max-width: 200px; }
  .control-narrow { min-width: 110px; flex: 0 1 120px; max-width: 140px; }
  .control-toggle { min-width: 110px; max-width: 140px; }
  .control-bpm { min-width: 260px; flex: 1 1 260px; max-width: 440px; }
}

/* Mobile: collapsed advanced panel, 2-col grid, inline toggles */
@media (max-width: 640px) {
  .app { padding: 12px 10px 24px; }
  .hero { margin-bottom: 22px; }
  .hero h1 { font-size: clamp(28px, 8vw, 44px); }
  .subtitle { display: none; }

  .controls {
    gap: 10px;
    padding: 14px 12px;
    justify-content: stretch;
  }

  /* Primary controls in a 2-column grid */
  .control {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    max-width: none;
    gap: 6px;
  }
  .control-narrow {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    max-width: none;
  }
  .control label { font-size: 12px; letter-spacing: 1.1px; }
  .select-wrap select { font-size: 15px; padding: 10px 32px 10px 12px; }
  .select-caret { right: 10px; font-size: 10px; }

  /* Play button full width */
  .play-btn {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
    justify-content: center;
  }

  /* Play + Settings: side by side, each 50% */
  .play-btn-mobile {
    display: inline-flex;
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    max-width: none;
    justify-content: center;
  }
  .play-btn-desktop { display: none; }

  .settings-toggle {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    max-width: none;
    justify-content: center;
  }

  /* Hide main octave controls, show mobile duplicates */
  .octave-control { display: none; }
  .octave-control-mobile { display: flex; }

  /* Advanced controls collapsible on mobile */
  .advanced-controls {
    gap: 10px;
  }
  .advanced-controls .control label { font-size: 12px; letter-spacing: 1.1px; }
  .advanced-controls .control,
  .advanced-controls .control-narrow,
  .advanced-controls .control-bpm {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }

  .advanced-controls .print-btn,
  .advanced-controls .musicxml-btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }

  /* Toggles inline: label beside switch */
  .advanced-controls .control-toggle {
    flex: 1 1 100%;
    max-width: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    gap: 0;
  }
  .advanced-controls .control-toggle label:first-of-type {
    font-size: 13px;
    letter-spacing: 0.8px;
  }

  .info-bar { display: none; }
  .info-chip { font-size: 12px; padding: 5px 10px; }
  .notation { padding: 10px 8px 8px; min-height: 100px; }
  .note-names { font-size: 13px; padding: 8px 10px; }
  .foot { font-size: 11px; margin-top: 12px; }
  .notation { margin-top: 12px; }
}

/* Mobile landscape: 3-column grid, Play button inline beside Settings */
@media (max-width: 900px) and (orientation: landscape) {
  .app { padding: 16px 14px 28px; }
  .hero { margin-bottom: 12px; }
  .hero h1 { font-size: clamp(22px, 5vw, 36px); }
  .subtitle { display: none; }

  .controls {
    gap: 8px;
    padding: 12px 14px;
    justify-content: stretch;
  }

  /* Primary controls in a 3-column grid */
  .control,
  .control-narrow {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 0;
    max-width: none;
    gap: 4px;
  }
  .control label { font-size: 11px; letter-spacing: 1px; }
  .select-wrap select { font-size: 14px; padding: 8px 28px 8px 10px; }
  .select-caret { right: 8px; font-size: 9px; }

  /* Play button full width */
  .play-btn {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
    padding: 8px 12px;
    height: 38px;
    font-size: 13px;
    justify-content: center;
  }

  /* Play + Settings: side by side, each 50% */
  .play-btn-mobile {
    display: inline-flex;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    max-width: none;
    padding: 8px 12px;
    height: 38px;
    font-size: 13px;
    justify-content: center;
  }
  .play-btn-desktop { display: none; }

  .settings-toggle {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    max-width: none;
    padding: 8px 12px;
    height: 38px;
    font-size: 12px;
    justify-content: center;
  }

  /* Hide main octave controls, show mobile duplicates */
  .octave-control { display: none; }
  .octave-control-mobile { display: flex; }

  /* Advanced controls: 3-col for dropdowns, toggles in a row */
  .advanced-controls {
    gap: 8px;
  }
  .advanced-controls .control,
  .advanced-controls .control-narrow,
  .advanced-controls .control-bpm {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 0;
    max-width: none;
  }
  .advanced-controls .print-btn,
  .advanced-controls .musicxml-btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    padding: 8px 12px;
    height: 38px;
    font-size: 13px;
  }

  /* Toggles: 3 across in a single row */
  .advanced-controls .control-toggle {
    flex: 1 1 calc(33.33% - 6px);
    max-width: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    gap: 0;
  }
  .advanced-controls .control-toggle label:first-of-type {
    font-size: 12px;
    letter-spacing: 0.6px;
  }

  .info-bar { display: none; }
  .info-chip { font-size: 11px; padding: 3px 8px; }
  .notation { padding: 8px 6px 6px; min-height: 80px; }
  .note-names { font-size: 12px; padding: 8px 12px; line-height: 2; }
  .foot { font-size: 10px; margin-top: 10px; }
}
