.music-recorder { min-width: 0; padding: 20px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--app-accent, #ff8a1f) 3%, var(--panel)); }
.music-recorder[hidden], .music-recorder [hidden] { display: none !important; }
.recorder-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.recorder-heading > div { min-width: 0; }
.recorder-heading .eyebrow { margin: 0 0 5px; font-size: 8px; }
.recorder-heading h3 { margin: 0; color: var(--fg); font: 600 21px/1.3 var(--font); letter-spacing: -.03em; }
.recorder-state { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: var(--bg); font: 10px/1.5 var(--mono); }
.recorder-state:before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.music-recorder[data-recorder-state=recording] .recorder-state, .music-recorder[data-recorder-state=playing] .recorder-state { color: var(--accent-text, #ff8a1f); border-color: color-mix(in srgb, var(--app-accent, #ff8a1f) 45%, var(--line)); }
.recorder-transport { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.recorder-transport button { min-height: 44px; min-width: 0; padding: 9px 12px; font-size: 11px; }
.recorder-record { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-color: var(--app-accent, #ff8a1f); }
.recorder-record-dot { display: inline-block; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--app-accent, #ff8a1f); }
.music-recorder[data-recorder-state=recording] .recorder-record { color: #241507; background: var(--app-accent, #ff8a1f); }
.music-recorder[data-recorder-state=recording] .recorder-record-dot { border-radius: 2px; background: #241507; }
.recorder-speed { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 5px; color: var(--muted); font-size: 10px; }
.recorder-speed select { width: 78px; min-width: 0; min-height: 44px; padding-inline: 9px; }
.recorder-secondary { display: flex; gap: 8px; margin-left: auto; }
.recorder-clear { color: var(--muted); background: transparent; }
.recorder-timeline { position: relative; min-width: 0; overflow: hidden; height: 176px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.recorder-timeline canvas { display: block; width: 100%; height: 176px; }
.recorder-playhead { position: absolute; top: 9px; bottom: 25px; width: 2px; background: var(--fg); pointer-events: none; box-shadow: 0 0 6px #ff8a1f88; }
.recorder-playhead:before { content: ''; position: absolute; top: -2px; left: -4px; width: 10px; height: 6px; background: var(--app-accent, #ff8a1f); clip-path: polygon(0 0,100% 0,50% 100%); }
.recorder-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; color: var(--fg); background: color-mix(in srgb, var(--bg) 85%, transparent); pointer-events: none; }
.recorder-empty strong { font: 500 15px/1.5 var(--font); }
.recorder-empty span { max-width: 430px; color: var(--muted); font: 11px/1.6 var(--font); }
.recorder-readout { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; min-width: 0; margin-top: 11px; }
.recorder-clock { display: flex; align-items: baseline; gap: 7px; flex: none; font: 11px/1.5 var(--mono); }
.recorder-clock strong { color: var(--accent-text, #ff8a1f); font-weight: 500; font-size: 17px; }
.recorder-clock > span { color: var(--muted); }
.recorder-current { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 170px; margin: 0; }
.recorder-current > span { color: var(--muted); font-size: 10px; }
.recorder-current > strong { color: var(--fg); font: 500 12px/1.5 var(--mono); overflow-wrap: anywhere; }
.recorder-note-count { color: var(--muted); font-size: 10px; }
.recorder-seek { display: block; }
#musicWorkbench .recorder-seek input, .recorder-seek input { width: 100%; min-height: 44px; accent-color: var(--app-accent, #ff8a1f); }
.recorder-help { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px 24px; }
.recorder-help p, .recorder-storage { margin: 0; color: var(--muted); font: 10px/1.7 var(--font); }
.recorder-storage { margin-top: 8px; color: var(--accent-text, #ff8a1f); }
.recorder-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 760px) {
  .music-recorder { padding: 18px 16px; }
  .recorder-transport { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; }
  .recorder-transport button { padding-inline: 7px; }
  .recorder-speed { grid-column: span 2; justify-content: start; padding-left: 0; }
  .recorder-speed select { flex: 1; max-width: 130px; }
  .recorder-secondary { display: contents; }
  .recorder-clear { grid-column: 1 / -1; }
  .recorder-readout { gap: 7px 14px; }
  .recorder-current { flex-basis: 130px; }
  .recorder-help { gap: 8px 16px; }
}
@media (max-width: 480px) {
  .music-recorder { padding: 14px 10px; }
  .recorder-heading { gap: 8px; margin-bottom: 11px; }
  .recorder-heading h3 { font-size: 19px; }
  .recorder-heading .eyebrow { display: none; }
  .recorder-state { font-size: 9px; padding: 4px 8px; }
  .recorder-transport { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .recorder-transport button { font-size: 10px; padding-inline: 6px; }
  .recorder-speed { grid-column: auto; gap: 4px; font-size: 9px; }
  .recorder-speed select { width: 62px; flex: 1; padding-inline: 5px; }
  .recorder-clear { grid-column: auto; }
  .recorder-clock strong { font-size: 16px; }
  .recorder-current { flex-basis: 130px; }
  .recorder-note-count { flex-basis: 100%; }
  .recorder-help { grid-template-columns: minmax(0,1fr); gap: 5px; }
  .recorder-empty { padding: 16px 24px; }
  .recorder-empty strong { font-size: 13px; }
}
