/* Audio controls shared by the case, exercise and local draft. */
.listening,.capture-head,.capture-panel [data-cap=previewBox] {
    --studio-ink:#f6f8fa;
    --studio-muted:#bac6d2;
    --studio-line:#566473;
    --studio-key:#344452;
    --studio-active:#aed3f8;
    color:var(--studio-ink);
    background:#253441;
    border:none;
    border-radius:16px;
}
.listening {position:sticky;top:8px;z-index:3;grid-column:1/-1;padding:20px 24px 16px}
.listening:has(.audio-tools:not([hidden])) {position:relative;top:auto}
.listening audio:not([controls]),.capture-panel audio:not([controls]) {display:none}
.listening audio[controls]{width:100%}
.player-host {display:block; min-width:0}
.audio-heading,.audio-heading-title,.audio-clock,.capture-heading,.capture-title,.audio-transport,.audio-main-controls,.audio-end-controls,.tool-line,.capture-foot,.rec-level,.preview-file {
    display:flex;align-items:center;
}
.audio-heading,.capture-heading,.capture-foot,.preview-file {justify-content:space-between;gap:12px}
.audio-heading-title,.capture-title {gap:12px;min-width:0}
.audio-insignia {display:grid;place-items:center;background:#354a5b;color:#d2e7fa;width:38px;height:38px;border-radius:11px;flex:none}
.audio-insignia svg {width:21px;height:21px}
.audio-heading h2 {font-size:1.12rem;line-height:1.25;font-weight:var(--weight-heading);margin:0;letter-spacing:-.025em}
.audio-state,.rec-state {color:var(--studio-muted);font-size:.81rem}
.audio-state {display:flex;align-items:center;gap:7px}
.audio-state::before,.rec-state::before {content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#aab8c5}
[data-playing=true] .audio-state::before {background:#9ce8cd}
.audio-clock,.rec-clock,.audio-scale,.rec-level,.audio-range-info,.tool-line [data-player$="-time"] {font-variant-numeric:tabular-nums}
.audio-clock {align-items:baseline;gap:8px;white-space:nowrap}
.audio-clock strong,.rec-clock {font-size:1.75rem;line-height:1.12;letter-spacing:-.02em;font-weight:var(--weight-label)}
.audio-clock>span {font-size:.83rem;color:var(--studio-muted)}
.audio-track {margin:14px 0 12px;background:#1b2935;padding:5px 10px 4px;border-radius:7px}
.timeline {position:relative;height:43px}
.timeline canvas,.rec-monitor canvas {display:block;width:100%;height:100%}
.timeline input {position:absolute;inset:0;margin:0;opacity:0;width:100%;height:100%;cursor:pointer;touch-action:pan-y}
.timeline:focus-within {outline:2px solid var(--studio-active);outline-offset:2px}
.audio-scale {display:flex;justify-content:space-between;color:#beccd7;font-size:.69rem;line-height:1.4}
.audio-scale span {position:relative;padding-top:3px}
.audio-scale span::before {content:"";display:block;width:1px;height:3px;background:#607589;position:absolute;top:0;left:50%}
.audio-transport,.audio-main-controls,.audio-end-controls,.tool-line {gap:6px}
.audio-transport {gap:14px}
.audio-end-controls {margin-left:auto}
.player-host button,.audio-speed,.capture-transport button:not(.primary),.capture-transport .file-choice,.home-capture .capture-transport .file-choice {
    min-height:42px;border:1px solid var(--studio-line);background:var(--studio-key);color:var(--studio-ink);border-radius:8px;
}
.player-host button:hover,.audio-speed:hover,.capture-transport button:not(.primary):hover,.capture-transport .file-choice:hover {background:#45596a;color:white;border-color:#8498a9}
.player-host button:focus-visible,.capture-head button:focus-visible,.audio-speed:focus-within {outline:3px solid #b3d6fa;outline-offset:3px}
.player-host .audio-play,.capture-transport [data-cap=start],.home-capture [data-cap=start] {
    border:0;background:#c8e1fa;color:#17324c;font-weight:var(--weight-heading);
}
.player-host .audio-play:hover,.capture-transport [data-cap=start]:hover {background:#edf6ff;color:#17324c}
.audio-play {min-width:116px}
.player-host .audio-icon {width:42px;padding:0}
.audio-icon svg,.audio-play svg,.audio-loop svg {width:19px;height:19px}
.audio-loop {font-size:.86rem}
.audio-loop[aria-pressed=true],.player-host [data-player=options][aria-expanded=true] {background:#395774;border-color:#a4c9ec;color:white}
.audio-speed {display:flex;align-items:center;gap:1px;font-variant-numeric:tabular-nums;padding:0 9px 0 0;font-size:.9rem;line-height:1}
.audio-speed select {appearance:none;background:transparent;border:0;color:inherit;padding:9px 1px 9px 10px;font:inherit;text-align:center;cursor:pointer;min-height:40px}
.audio-speed option {background:white;color:var(--ink)}
.audio-range-info:empty,.audio-message:empty {display:none}
.audio-range-info {margin-top:8px;font-size:.78rem;color:#c1ddf8}
.audio-message,.capture-panel .audio-message[role=status] {margin:10px 0 0;font-size:.88rem;color:var(--studio-ink)}
.audio-tools {display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:16px 24px;margin-top:15px;padding-top:15px;border-top:1px solid var(--studio-line)}
.audio-tools h3 {color:var(--studio-muted);font-size:.83rem;letter-spacing:0;margin:0 0 6px}
.tool-line {flex-wrap:wrap;font-size:.83rem}
.tool-line button {padding:6px 10px;font-size:.83rem;min-height:36px}
.tool-line input {width:min(38vw,125px);accent-color:#aacff0}
.tool-line [data-player=marks] {display:flex;flex-wrap:wrap;gap:6px}
.tool-line [data-player=marks]>span {display:inline-flex}
.tool-line [data-player=marks] button:first-child {border-radius:7px 0 0 7px}
.tool-line [data-player=marks] button:last-child {padding:0 6px;border-radius:0 7px 7px 0}
.audio-bookmarks {grid-column:1/-1}
.passage-help {margin-top:.5rem;color:var(--muted);font-size:.86rem}
.capture-head,.home-capture .capture-head {position:relative;isolation:isolate;overflow:hidden;padding:24px 28px 16px;background:#253441}
.capture-head::before,.home-capture .capture-head::before {
    content:"";position:absolute;inset:0 0 0 31%;z-index:-1;pointer-events:none;
    background:none;
}
#capture:is([data-phase=recording],[data-phase=paused]) .capture-head::before {opacity:.27}
.capture-title .audio-insignia {width:46px;height:46px;background:#354a5b;color:#d2e7fa}
.capture-heading {margin-bottom:20px}
.capture-head h2 {font-size:1.45rem;margin:0}
.rec-state {display:flex;align-items:center;gap:7px;margin-top:3px}
#capture[data-phase=recording] .rec-state::before {background:#ff9b90}
#capture[data-phase=paused] .rec-state::before {background:#f3cd87}
.rec-clock {font-size:1.95rem;color:#f6f8fa}
.rec-monitor {margin-bottom:16px;background:#1b2935;padding:8px 12px;border-radius:7px}
.rec-monitor canvas {height:51px}
.rec-level {gap:8px;color:#c3d1de;font-size:.76rem;justify-content:flex-end;line-height:1.3}
.rec-level meter {width:68px;max-width:23vw;accent-color:#addec9}
.rec-level [data-cap=decibels] {min-width:56px;text-align:right}
.capture-transport {gap:8px}
.capture-transport button,.capture-transport .file-choice {min-height:44px}
.capture-transport [data-cap=stop] {background:#ffe1da;color:#401b18;border-color:#ffe1da}
.capture-transport [data-cap=stop]:hover {background:white;color:#401b18}
.capture-foot {border-top:1px solid #ffffff30;margin-top:16px;padding-top:9px;align-items:baseline}
.capture-foot .mic-choice {margin:0;color:var(--studio-muted)}
.capture-foot .mic-choice summary,.home-capture .capture-foot .mic-choice summary {color:var(--studio-muted);padding:3px 0}
.capture-foot .drop-hint {font-size:.8rem;color:var(--studio-muted);margin:0}
.capture-panel .fields label,.capture-panel legend,.capture-panel fieldset label {color:#f2f6fa}
.capture-panel .fields select {margin-top:4px}
.capture-panel [data-cap=previewBox] {background:#253441;color:#f6f8fa;border:0;padding:18px 24px 12px}
.preview-file {border-top:1px solid var(--studio-line);margin-top:12px;padding-top:9px;font-size:.82rem;color:var(--studio-muted)}
.preview-file span {min-width:0;overflow-wrap:anywhere}.preview-file a {color:#c7e5ff;flex:none}
@media(max-width:700px) {
    .listening {padding:14px 15px;top:2px}
    .audio-heading h2 {font-size:1rem}
    .audio-heading-title {gap:8px;flex-wrap:wrap}
    .audio-insignia {width:31px;height:31px;border-radius:8px}
    .audio-heading-title .audio-state {display:none}
    .audio-clock strong {font-size:1.4rem}
    .audio-track {margin:10px 0;padding-inline:5px}
    .timeline {height:35px}
    .audio-transport {flex-wrap:wrap;gap:7px}
    .audio-main-controls,.audio-end-controls {gap:4px}
    .player-host .audio-play {min-width:44px;width:44px;padding:0}
    .audio-play span {display:none}
    .player-host .audio-icon {width:40px}
    .player-host .audio-loop {padding:7px 9px}
    .audio-tools {grid-template-columns:1fr;gap:12px}
    .capture-head,.home-capture .capture-head,.capture-panel [data-cap=previewBox]{padding:18px 16px 13px}
    .capture-transport .file-choice,.capture-transport button {padding-inline:11px}
    .capture-foot {flex-wrap:wrap;gap:5px}
}
@media(max-width:510px) {
    .passage-help span {display:none}
    .audio-transport {display:grid;grid-template-columns:1fr auto}
    .audio-end-controls {grid-row:1;grid-column:2}
    .audio-loop {grid-column:1/-1;justify-self:start}
    .audio-clock {gap:4px}
    .audio-heading-title {flex-wrap:nowrap}
    .audio-scale span:nth-child(even){visibility:hidden}
    .capture-title .audio-insignia {width:36px;height:36px}
    .capture-title {gap:8px}.rec-clock {font-size:1.5rem}
    .capture-foot .drop-hint {display:none}
    .capture-head h2 {font-size:1.15rem}
    .preview-file {align-items:flex-start;flex-direction:column;gap:4px}
}
@media(max-height:550px) { .listening {position:relative;top:auto} }
