.audio-recorder[open]{box-sizing:border-box;display:flex;flex-direction:column;position:fixed;inset:0;margin:auto;width:min(1200px,calc(100% - 24px));height:min(920px,calc(100dvh - 24px));max-width:none;max-height:none;padding:0;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);overflow:hidden;font:14px/1.5 var(--font-ui,Inter,sans-serif)}
.audio-recorder::backdrop{background:#000b;backdrop-filter:blur(5px)}
html:has(.audio-recorder[open]){overflow:hidden}
.audio-recorder header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;border-bottom:1px solid var(--line);flex:none}
.audio-recorder h2{font-size:22px;margin:0}.audio-recorder h3{font-size:16px;margin:0 0 12px}
.audio-recorder-body{overflow:auto;min-height:0;overscroll-behavior:contain;display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:24px;padding:22px;align-items:start}
.audio-recorder-body>section{min-width:0}.audio-recorder label{display:block;margin:10px 0;font-size:13px;color:var(--muted)}
.audio-recorder label>input:not([type=checkbox]),.audio-recorder select,.audio-recorder textarea{box-sizing:border-box;display:block;width:100%;max-width:100%;margin-top:5px;color:var(--ink);background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px;min-height:44px;font:inherit}
.audio-recorder input[type=checkbox]{width:auto;margin-inline-end:8px}.audio-recorder textarea{resize:vertical;min-height:80px}
.audio-recorder button{font:inherit;min-height:44px;cursor:pointer;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:10px;padding:9px 14px}
.audio-recorder button:disabled{opacity:.5;cursor:not-allowed}.audio-recorder button:focus-visible,.audio-recorder input:focus-visible,.audio-recorder select:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.audio-recorder .audio-primary{background:var(--brand);color:var(--brand-ink,#14212a);border-color:var(--brand);font-weight:650}
.audio-recorder-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.audio-recorder-actions>button{flex:none}.audio-recorder button.icon-action{width:44px;height:44px;padding:11px;display:inline-flex;align-items:center;justify-content:center}.audio-recorder button.icon-action svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.audio-recorder video{width:100%;max-height:220px;display:block;background:var(--bg);border-radius:12px}.audio-recorder audio{width:100%;margin:10px 0}
.audio-wave{width:100%;height:60px;display:block;background:var(--surface-2);border:1px solid var(--line);border-radius:10px}
.audio-wave[data-track=original]{color:var(--ui-link,var(--muted))}.audio-wave[data-track=voice]{color:var(--brand)}
.audio-recorder-status{min-height:42px;margin:12px 0;color:var(--muted)}.audio-recorder-status[data-error=true]{color:var(--danger,#ef8f86)}
.audio-recorder-meter{width:100%;height:12px;accent-color:var(--brand)}.audio-recorder-timer{display:block;font-variant-numeric:tabular-nums;font-size:24px;margin:8px 0;color:var(--ink)}
.audio-recorder-note{font-size:12px;color:var(--muted);margin:8px 0}.audio-recorder-takes{display:grid;gap:8px;margin-top:14px}.audio-take{display:flex;gap:6px}.audio-take>button:first-child{flex:1;text-align:start}.audio-take[aria-current=true]>button:first-child{border-color:var(--brand);background:var(--brand-soft)}
.audio-recorder-trim{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.audio-recorder-trim input{min-width:0}.audio-recorder input[type=range]{width:100%;min-height:32px;accent-color:var(--brand)}
.workshop-input-file audio{width:100%;grid-column:1/-1;min-width:0}.workshop-input-limit,.video-input-budget{font-size:12px;color:var(--muted);margin:8px 0}.video-input-budget[data-error=true]{color:var(--danger,#ef8f86)}
@media(max-width:760px){.audio-recorder[open]{width:100%;height:100dvh;border:0;border-radius:0}.audio-recorder header{padding:12px 14px}.audio-recorder h2{font-size:19px}.audio-recorder-body{grid-template-columns:1fr;padding:14px;gap:16px}.audio-recorder-body>video{grid-column:1/-1}.audio-recorder-body>section{grid-column:1/-1}.audio-recorder video{max-height:210px}.audio-recorder-trim{grid-template-columns:repeat(2,minmax(0,1fr))}}

.audio-recorder label:has(>input[type=checkbox]){display:flex;align-items:center;gap:8px}.audio-recorder label>input[type=checkbox]{order:-1;margin:0;flex:none}

/* Match workshop fields without inheriting the tall global select layout. */
html[data-ui] body .audio-recorder select:not([multiple]){height:44px;min-height:44px;max-height:44px;padding-block:8px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;padding-inline-end:36px}
.audio-video-notice[data-error=true]{color:var(--danger,#ef8f86)}
@supports (appearance:base-select){html[data-ui] body .audio-recorder select:not([multiple]){display:flex;align-items:center;padding-inline-end:10px}}
