.ha-recorder, .ha-player { color: var(--ink, #1c2d3e); }
.ha-recorder { max-width: 840px; margin: 20px auto; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line, #dce2eb); border-radius: 22px; background: #fff; }
.ha-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ha-heading h2 { margin: 3px 0 0; font-size: clamp(24px, 4vw, 32px); }
.ha-kicker { margin: 0; color: var(--blue, #315edf); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.ha-limit { padding: 7px 11px; border-radius: 999px; background: #f2f5f9; color: var(--muted, #627183); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ha-track { margin: 22px 0 8px; overflow-wrap: anywhere; }
.ha-help { margin: 0 0 18px; color: var(--muted, #627183); line-height: 1.6; max-width: 64ch; }
.ha-record-options { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ha-check { display: flex; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 14px; }
.ha-check input[type="checkbox"] { width: 19px; height: 19px; flex: 0 0 auto; margin: 0; accent-color: var(--blue, #315edf); }
.ha-warning { padding: 11px 14px; border-radius: 10px; background: #fff8e8; color: #76530b; line-height: 1.5; font-size: 13px; }
.ha-capture { display: grid; gap: 14px; margin-top: 20px; }
.ha-record-buttons, .ha-submit, .ha-play-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ha-record-buttons button, .ha-submit button, .ha-play-row button { min-height: 44px; }
.ha-stop { background: #a62236; color: #fff; border: 1px solid #a62236; border-radius: 10px; padding: 10px 20px; font-weight: 700; }
.ha-stop:hover { background: #861c2d; }
.ha-indicator { padding: 12px 16px; background: #f2f5f9; border-radius: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.ha-indicator[data-recording="true"] { background: #fff0f2; color: #a62236; }
.ha-status { color: var(--muted, #627183); font-size: 13px; line-height: 1.5; margin: 14px 0 0; }
.ha-error { color: #a62236; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ha-error:empty { display: none; }
.ha-preview { border-top: 1px solid var(--line, #dce2eb); padding-top: 22px; margin-top: 24px; }
.ha-preview h3 { margin: 0 0 6px; font-size: 18px; }
.ha-preview-track { color: var(--muted, #627183); margin: 0 0 18px; font-size: 13px; overflow-wrap: anywhere; }
.ha-preview[inert] { opacity: .6; }
.ha-play-row output { margin-left: auto; white-space: nowrap; color: var(--muted, #627183); font-variant-numeric: tabular-nums; font-size: 13px; }
.ha-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 14px 24px; margin: 20px 0 10px; }
.ha-levels > label:not(.ha-check), .ha-sync label { display: grid; gap: 8px; font-size: 13px; font-weight: 650; }
.ha-levels input[type="range"], .ha-sync input[type="range"] { width: 100%; min-width: 0; height: 30px; margin: 0; padding: 0; accent-color: var(--blue, #315edf); }
.ha-levels .ha-check { grid-column: 1 / -1; }
.ha-sync { border-top: 1px solid var(--line, #dce2eb); padding-top: 8px; color: var(--muted, #627183); font-size: 13px; }
.ha-sync summary { cursor: pointer; padding: 10px 0; font-weight: 650; min-height: 44px; }
.ha-sync label { margin-top: 6px; grid-template-columns: 1fr auto; }
.ha-sync label input { grid-column: 1 / -1; }
.ha-sync-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.ha-sync p { margin: 12px 0 0; line-height: 1.55; }
.ha-submit { border-top: 1px solid var(--line, #dce2eb); margin-top: 24px; padding-top: 20px; justify-content: flex-end; }
.ha-recorder [hidden], .ha-player [hidden] { display: none !important; }
.ha-recorder :is(button, input, summary):focus-visible, .ha-player :is(button, input, summary):focus-visible { outline: 3px solid var(--blue, #315edf); outline-offset: 3px; }
@media (max-width: 520px) {
  .ha-recorder { border-radius: 16px; margin: 12px 0; padding: 18px; }
  .ha-record-options { display: grid; gap: 4px; }
  .ha-submit > button { flex: 1 1 130px; }
  .ha-levels { gap: 12px 16px; }
  .ha-play-row output { margin-left: 0; flex-basis: 100%; }
}

/* Keep the voice controls beside the lyrics, including on long verses. */
.content.has-recording-dock { padding-bottom: var(--recording-dock-height, 260px); }
.studio-audio-dock { position: fixed; z-index: 40; bottom: 12px; left: 238px; right: 16px; max-width: 1120px; margin-inline: auto; max-height: 48dvh; overflow-y: auto; overscroll-behavior: contain; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border: 1px solid var(--line, #dce2eb); border-radius: 18px; background: #fff; box-shadow: 0 -4px 32px #241b3a20; }
.studio-audio-dock .assignment-audio { max-width: none; margin: 0; }
.studio-audio-dock .audio-homework-label { margin: 0 0 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.studio-audio-dock .ha-recorder { padding: 0; margin: 0; border: 0; max-width: none; }
.studio-audio-dock .ha-heading h2 { font-size: 18px; margin: 0; }
.studio-audio-dock .ha-kicker { display: none; }
.studio-audio-dock .ha-track { margin: 4px 0; font-size: 12px; }
.studio-audio-dock .ha-settings summary, .studio-audio-dock .ha-preview > summary { cursor: pointer; font-size: 13px; font-weight: 650; padding: 8px 0; min-height: 36px; }
.studio-audio-dock .ha-settings[open] { padding-bottom: 8px; }
.studio-audio-dock .ha-settings .assignment-audio-track { max-width: 480px; margin: 8px 0; }
.studio-audio-dock .ha-help { font-size: 13px; margin-bottom: 6px; }
.studio-audio-dock .ha-capture { margin-top: 5px; gap: 6px; }
.studio-audio-dock .ha-submit { margin-top: 8px; padding-top: 8px; justify-content: flex-start; }
.studio-audio-dock .ha-status { margin-top: 6px; }
.studio-audio-dock .ha-preview { margin-top: 6px; padding-top: 0; }
.studio-audio-dock .ha-levels { margin: 8px 0; }
.studio-audio-dock .assignment-audio-status { margin: 0; font-size: 12px; }
.studio-audio-dock [data-audio-remove] { margin-top: 4px; font-size: 12px; }
.studio-audio-dock [hidden] { display: none !important; }
@media (min-width: 800px) {
  .studio-audio-dock .ha-compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; }
  .studio-audio-dock .ha-heading, .studio-audio-dock .ha-track, .studio-audio-dock .ha-settings { grid-column: 1; }
  .studio-audio-dock .ha-capture { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .studio-audio-dock .ha-submit { grid-column: 2; grid-row: 3; border: 0; margin: 0; padding: 0; align-self: start; }
  .studio-audio-dock .ha-status, .studio-audio-dock .ha-error, .studio-audio-dock .ha-preview { grid-column: 1 / -1; }
}
@media (max-width: 1100px) { .studio-audio-dock { left: 202px; } }
@media (max-width: 640px) { .studio-audio-dock { left: 8px; right: 8px; bottom: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); max-height: 45dvh; } }
@media print { .studio-audio-dock { display: none; } .content.has-recording-dock { padding-bottom: 0; } }
