/* Project shell: geometry is parameterized independently from its theme. */
body:not(.scripts-home) .line.record-in-range { background:var(--app-hover); border-radius:var(--shell-radius); }
body:not(.scripts-home) #stage .line.record-range-start { position:relative; padding-top:calc(var(--layout-unit) * 3); }
body:not(.scripts-home) #stage .line.record-range-start::before { display:block; content:attr(data-record-marker); position:absolute; top:0; bottom:auto; left:calc(var(--layout-unit) * 4); width:auto; height:auto; background:none; opacity:1; white-space:nowrap; color:var(--app-accent); font:400 .75rem/1.5 var(--font-body); }
body:not(.scripts-home) .sentence-piece.record-in-range { background:var(--app-accent); }
:root[data-skin="vivi"] .btn.p,:root[data-skin="vivi"] .play { color:var(--app-on-accent); }
:root[data-skin="vivi"] .btn.p:hover:not(:disabled) { background:var(--app-accent); border-color:var(--app-accent-strong); color:var(--app-on-accent); }
:root[data-skin="vivi"] #importDialog .import-picker > summary { background:var(--app-accent); color:var(--app-on-accent); }
.custom-select { position:relative; width:100%; min-width:0; }
.custom-select > select[hidden] { display:none!important; }
.select-trigger { display:flex; align-items:center; justify-content:space-between; gap:.5rem; width:100%; min-width:0; height:2.5rem; padding:0 .75rem; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-text); font:400 1rem/1.5 var(--font-body); text-align:left; }
.select-trigger > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.select-arrow { width:1rem; height:1rem; flex:none; }.select-arrow svg{display:block;width:100%;height:100%;}
.select-trigger:hover { background:var(--app-hover); }
.select-trigger:focus-visible,.select-trigger[aria-expanded="true"] { outline:none!important; box-shadow:none!important; border-color:var(--app-accent); }
.select-menu { position:fixed; inset:auto; margin:0; padding:.5rem; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-text); overflow:auto; overscroll-behavior:contain; font:400 1rem/1.5 var(--font-body); }
.select-menu [role="option"] { display:flex; width:100%; min-height:2rem; padding:.5rem; gap:.5rem; border:1px solid transparent; border-radius:var(--shell-radius); background:none; text-align:left; font:inherit; color:inherit; }
.select-menu [role="option"]::after { content:""; width:1rem; margin-left:auto; flex:none; }
.select-menu [aria-selected="true"]::after { content:"✓"; color:var(--app-accent-strong); }
.select-menu [aria-selected="true"],.select-menu [role="option"]:hover { background:var(--app-selected); }
.select-menu [role="option"]:focus-visible { outline:none!important; box-shadow:none!important; border-color:var(--app-accent); background:var(--app-hover); }
.tp .custom-select { width:8rem; flex:none; }.tp .select-trigger { height:2rem; font-size:.875rem; padding:0 .5rem; }
.task-dialog .dw-bd > label,.settings-dialog #storageSettings > label { display:block; margin:0; font:400 .875rem/1.5 var(--font-body); }
.task-dialog .dw-bd > label + .custom-select,.task-dialog .dw-bd > label + .field,.settings-dialog #storageSettings > label + .field { margin-top:.5rem; }
.task-dialog .field input[type="text"],.settings-dialog .field input[type="text"],#importDialog.task-dialog .import-title-label input { height:2.5rem; width:100%; padding:0 .75rem; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-text); font:400 1rem/1.5 var(--font-body); }
.task-dialog .dw-bd > .hint,.settings-dialog #storageSettings > .hint { margin:.5rem 0 1.5rem; font:.75rem/1.5 var(--font-body); }
.task-dialog .dw-bd > .hint:empty,.settings-dialog #storageSettings > .hint:empty { display:none; }
.settings-dialog #storageSettings h3 { margin:0 0 1rem; font:500 .875rem/1.5 var(--font-body); }
.skin-settings { border:0; padding:0 0 1.5rem; margin:0 0 1.5rem; border-bottom:1px solid var(--app-border); }
.skin-settings legend { font:500 .875rem/1.5 var(--font-body); margin-bottom:1rem; }
.skin-options { display:flex; flex-wrap:wrap; gap:1rem; }
.skin-options label { display:flex; align-items:center; gap:.5rem; min-height:2.5rem; padding:.5rem .75rem; border:1px solid var(--app-border); border-radius:var(--shell-radius); font-size:.875rem; cursor:pointer; }
.skin-options label:has(input:checked) { border-color:var(--app-accent); background:var(--app-accent-pale); }
.skin-options input { accent-color:var(--app-accent); width:1rem; height:1rem; }
.settings-dialog .skin-options input { width:1rem; height:1rem; flex:none; }
.settings-dialog .skin-options label { white-space:nowrap; }
.skin-swatch { flex:none; }
.skin-swatch { width:1rem; height:1rem; border-radius:.25rem; background:var(--skin-purple-accent); }.skin-swatch.vivi { background:var(--skin-vivi-accent); }
.skin-settings .hint { margin:.5rem 0 0; font:.75rem/1.5 var(--font-body); }.skin-settings .hint:empty{display:none;}
.task-dialog .btn,.settings-dialog .btn,.modal .acts .btn { min-height:2.5rem; height:2.5rem; padding:0 1rem; border-radius:var(--shell-radius); font:.875rem/1.5 var(--font-body); }
#btnConfirmExport { margin-top:1.5rem!important; }
.date-filter-panel label { gap:.5rem; margin-bottom:1rem; font:.875rem/1.5 var(--font-body); }
.date-filter-panel input { height:2.5rem; padding:0 .75rem; border-radius:var(--shell-radius); font:1rem/1.5 var(--font-body); }
.sort-options button { min-height:2.5rem; font:.875rem/1.5 var(--font-body); border-radius:var(--shell-radius); }
#importDialog .import-picker summary { min-height:2.5rem; padding:0 1rem; display:flex; align-items:center; justify-content:center; font:.875rem/1.5 var(--font-body); }
#importDialog .import-picker button { min-height:2.5rem; font:.875rem/1.5 var(--font-body); }
#importDialog .import-picker > div { top:calc(100% + .5rem); padding:.5rem; border-radius:var(--shell-radius); }
#importDialog.task-dialog .import-title-label { margin:1.5rem 0 0; font:.875rem/1.5 var(--font-body); }
@media(max-width:640px){.select-menu [role="option"]{min-height:3rem;}.tp .custom-select{width:7rem;}.tp .select-trigger{min-height:2.75rem;}}
.task-dialog { position:fixed; inset:0; width:min(40rem,calc(100vw - 2rem)); max-height:calc(100dvh - 4rem); margin:auto; padding:0; overflow:auto; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-text); }
.task-dialog::backdrop { background:color-mix(in oklab,var(--app-text) 20%,transparent); }
.task-dialog .dw-hd { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.5rem; min-height:4rem; border-bottom:1px solid var(--app-border); }
.task-dialog .dw-hd .t { font:500 1.25rem var(--font-head); }
.task-dialog .dw-hd .x { width:2rem; height:2rem; border-radius:var(--shell-radius); }
.task-dialog .dw-bd { padding:1.5rem; font-size:.875rem; }
.task-dialog input,.task-dialog select { font-size:1rem; }
.task-dialog button:focus-visible { outline:none!important; box-shadow:none!important; border:1px solid var(--app-accent); }
.task-dialog input:focus,.task-dialog select:focus { outline:none!important; box-shadow:none!important; border:1px solid var(--app-accent)!important; }
.task-dialog .hist-item.on { box-shadow:none; background:var(--app-selected); }
#dw-history.task-dialog { width:min(56rem,calc(100vw - 2rem)); }
#dw-history.task-dialog .dw-bd { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:1.5rem; }
#dw-history.task-dialog #histList { max-height:24rem; overflow:auto; }
#dw-history.task-dialog #histPreview { max-height:24rem; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
#importDialog.task-dialog { inset:0; width:min(44rem,calc(100vw - 2rem)); max-height:calc(100dvh - 4rem); margin:auto; padding:0; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); }
#importDialog.task-dialog::backdrop { background:color-mix(in oklab,var(--app-text) 20%,transparent); }
#importDialog.task-dialog .import-content { width:auto; max-width:none; margin:0; padding:1.5rem; }
#importDialog.task-dialog #importClose { position:absolute; top:1rem; right:1rem; width:2rem; height:2rem; display:block; }
#importDialog.task-dialog input { font-size:1rem; }
.rail.vv-island .resume-group { min-height:2rem; margin-bottom:1rem; }
.rail.vv-island #btnResumeProject:disabled { opacity:.5; cursor:default; }
#transportMode:focus,#transportMode:focus-visible { outline:none!important; box-shadow:none!important; }
#transportMode:hover { background:var(--app-hover)!important; }
#transportMode:focus:not(:focus-visible) { border-color:var(--app-border)!important; }
#transportMode:focus-visible { border-color:var(--app-accent)!important; }
#transportMode { height:2rem!important; font-size:.75rem!important; }
.workflow-stages .stage-pending { margin-left:.5rem; font-size:.625rem; color:var(--app-text-faint); }
.workflow-stages button:disabled { opacity:.7; cursor:not-allowed; }
.settings-dialog { position:fixed; inset:0; width:min(35rem,calc(100vw - 2rem)); max-height:calc(100dvh - 4rem); margin:auto; padding:0; overflow:auto; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-text); }
.settings-dialog::backdrop { background:color-mix(in oklab,var(--app-text) 20%,transparent); }
.settings-dialog .dw-hd { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.5rem; min-height:4rem; border-bottom:1px solid var(--app-border); }
.settings-dialog .dw-hd .t { font:500 1.25rem var(--font-head); }
.settings-dialog .dw-hd .x { width:2rem; height:2rem; border-radius:var(--shell-radius); }
.settings-dialog .dw-bd { padding:1.5rem; }
.settings-dialog input { width:100%; font-size:1rem; }
.settings-dialog input:focus { outline:none!important; box-shadow:none!important; border:1px solid var(--app-accent)!important; }
.settings-dialog button:focus-visible,.modal button:focus-visible { outline:none!important; box-shadow:none!important; border:1px solid var(--app-accent); }
/* Dialogs share viewport centering, typography, spacing and theme tokens. */
.task-dialog,.settings-dialog,#importDialog.task-dialog,.modal .cd {
  position:fixed; inset:auto; left:50%; top:50%; transform:translate(-50%,-50%);
  margin:0; width:min(40rem,calc(100vw - 2rem)); max-height:calc(100dvh - 4rem);
  padding:0; overflow:auto; overscroll-behavior:contain;
  border:1px solid var(--app-border); border-radius:var(--shell-radius);
  background:var(--app-surface); color:var(--app-text);
}
.task-dialog .dw-hd,.settings-dialog .dw-hd {
  background:var(--app-accent-pale); border-bottom:1px solid var(--app-border);
  padding:1rem 1.5rem; margin:0; min-height:4rem;
}
.modal #mBody { padding:1.5rem; font-size:.875rem; }
.modal .acts { margin:0; padding:0 1.5rem 1.5rem; }
.modal .bd { background:color-mix(in oklab,var(--app-text) 20%,transparent); }
#btnResumeProject { position:absolute; top:50%; right:2rem; transform:translateY(-50%); display:flex; align-items:center; gap:.5rem; height:2rem; padding:0 .75rem; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-accent-strong); font-size:.8125rem; }
#btnResumeProject svg { width:1rem; height:1rem; }
#btnResumeProject[hidden] { display:none!important; }
#scriptsPage .project-page-header { position:relative; padding-right:11rem; }
.rail [data-open="agent"]:disabled { opacity:.55; cursor:not-allowed; }
@media(max-width:600px){#btnResumeProject{right:1rem;}}
.rail.vv-island #btnResumeProject[hidden] { display:none!important; }
body:not(.scripts-home) { --editor-content-inset:2rem; background:var(--app-bg); color:var(--app-text); }
/* One continuous perimeter, independent of navigation and open inspectors. */
body:not(.scripts-home)::before {
  content:""; position:fixed;
  inset:var(--shell-margin) var(--shell-margin) var(--shell-margin) calc(var(--shell-nav-width) + var(--shell-margin));
  border:1px solid var(--app-border); border-radius:var(--shell-radius);
  pointer-events:none; z-index:80;
}
body:not(.scripts-home) .rail.vv-island {
  width:var(--shell-nav-width); padding:var(--shell-margin) 1rem 1rem;
  background:var(--app-bg); gap:0; box-shadow:none;
}
body:not(.scripts-home) .rail.vv-island .home-logo { width:2rem; height:2rem; min-height:2rem; max-height:2rem; flex:0 0 2rem; margin:0 .5rem 1.5rem; padding:0; display:block; }
body:not(.scripts-home) .home-logo svg { width:100%; height:100%; }
body:not(.scripts-home) .nav-group { gap:var(--layout-unit); margin-bottom:1rem; }
body:not(.scripts-home) .nav-history { flex-direction:column; }
body:not(.scripts-home) .rail.vv-island button {
  width:var(--shell-nav-item-width); min-height:2rem; height:2rem;
  padding:0 .5rem; font-size:.8125rem; border-radius:var(--shell-radius);
}
body:not(.scripts-home) .rail button:hover { background:var(--app-hover); }
body:not(.scripts-home) .rail button.on { background:var(--app-selected); color:var(--app-accent-strong); }
body:not(.scripts-home) .rail button[hidden] { display:none!important; }
body:not(.scripts-home) .top {
  inset:var(--shell-margin) var(--shell-margin) auto calc(var(--shell-nav-width) + var(--shell-margin));
  height:var(--editor-header-height); padding:1rem 2rem; background:var(--app-accent-pale);
  border:0; border-radius:var(--shell-radius) var(--shell-radius) 0 0;
  display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:2.5rem 2rem;
  gap:var(--layout-unit) 1rem; align-items:center;
}
body:not(.scripts-home) .top .script-title {
  position:static; transform:none; width:100%; max-width:none; height:2.5rem;
  text-align:left; font:500 1.5rem var(--font-head);
  border:1px solid transparent; border-radius:var(--shell-radius); padding:0;
}
body:not(.scripts-home) .top .savest { font-size:.75rem; }
.workflow-stages { grid-row:2; grid-column:1 / -1; display:flex; gap:var(--layout-unit); }
.workflow-stages button {
  min-width:5rem; height:2rem; padding:0 1rem; font-size:.8125rem;
  color:var(--app-text-soft); border:1px solid transparent; border-radius:var(--shell-radius);
}
.workflow-stages button:hover { background:var(--app-hover); }
.workflow-stages button[aria-pressed="true"] { background:var(--app-accent); color:var(--app-on-accent); }
body.scripts-home .workflow-stages { display:none; }
body:not(.scripts-home) .stage {
  inset:calc(var(--shell-margin) + var(--editor-header-height)) var(--shell-margin)
    calc(var(--shell-margin) + var(--editor-transport-height)) calc(var(--shell-nav-width) + var(--shell-margin));
  background:var(--app-surface); border:0; border-radius:0; padding:0; overflow:auto; overflow-anchor:none;
}
body:not(.scripts-home) .sheet {
  width:100%; max-width:var(--editor-document-width); margin:0;
  padding:var(--editor-content-inset) 2rem; padding-bottom:3rem;
}
body:not(.scripts-home)[data-inspector] .sheet { width:calc(100% - var(--editor-inspector-width)); }
body:not(.scripts-home) .seg {
  border:1px solid var(--app-border); border-radius:var(--shell-radius);
  background:var(--app-bg); padding:1.5rem; box-shadow:none;
}
body:not(.scripts-home) .seg-hd { display:grid; grid-template-columns:2rem minmax(0,1fr) 2rem; gap:1rem; align-items:center; margin:0; }
body:not(.scripts-home) .chapter-handle { width:2rem; min-width:2rem; height:2rem; border-radius:var(--shell-radius); font:700 1.125rem/1 var(--font-head); color:var(--app-on-accent); background:var(--app-accent); }
body:not(.scripts-home) .chapter-handle::after { display:none; }
body:not(.scripts-home) .chapter-tools { padding:0 0 1rem 3rem; margin:0 0 1rem; min-height:0; border-bottom:1px solid var(--app-border); }
body:not(.scripts-home) .seg-hd .del { display:flex; align-items:center; justify-content:center; width:2rem; height:2rem; border-radius:var(--shell-radius); color:var(--app-text-soft); }
body:not(.scripts-home) .seg-hd .del svg { width:1rem; height:1rem; }
body:not(.scripts-home) .seg-hd .del:hover { color:var(--status-error); background:var(--app-hover); }
body:not(.scripts-home) .line::before { display:none; }
body:not(.scripts-home) .line { gap:1rem; padding:.25rem 0; }
body:not(.scripts-home) .line .ln { width:2rem; min-width:2rem; flex:0 0 2rem; padding:.25rem 0 0; text-align:center; color:var(--app-text-soft); }
body:not(.scripts-home) .ln i { font-style:normal; }
body:not(.scripts-home) .line.on .ln { color:var(--app-accent-strong); font-weight:600; }
body:not(.scripts-home) .line.u-break { margin-top:0; }
body:not(.scripts-home) .chapter-insert { display:flex; align-items:center; justify-content:center; gap:.5rem; width:100%; height:2rem; margin:1rem 0; padding:0 1rem; font-size:.75rem; color:var(--app-text-soft); border:1px solid transparent; border-radius:var(--shell-radius); }
body:not(.scripts-home) .chapter-insert svg { width:1rem; height:1rem; }
body:not(.scripts-home) .chapter-insert:hover { color:var(--app-accent-strong); border-color:var(--app-border); background:var(--app-hover); }
body:not(.scripts-home) .seg-hd .ttl { font-size:1.125rem; line-height:1.5; }
body:not(.scripts-home) .chapter-tools .meta,
body:not(.scripts-home) .chapter-tools .del,
body:not(.scripts-home) .seg-add { font-size:.75rem; }
body:not(.scripts-home) .chapter-tools .del { min-height:2rem; }
body:not(.scripts-home) .line { min-height:2rem; }
body:not(.scripts-home) .line .txt { font-size:1rem; line-height:1.5; border:1px solid transparent; }
body:not(.scripts-home) .ln { font-size:.75rem; }
body:not(.scripts-home) .dw {
  inset:calc(var(--shell-margin) + var(--editor-header-height)) var(--shell-margin)
    calc(var(--shell-margin) + var(--editor-transport-height)) auto;
  width:var(--editor-inspector-width)!important; border:0; border-left:1px solid var(--app-border);
  border-radius:0; background:var(--app-surface);
}
body:not(.scripts-home) .dw .dw-hd { min-height:3rem; height:3rem; padding:0 1.5rem; }
body:not(.scripts-home) .dw .dw-hd .t { font-size:1rem; }
body:not(.scripts-home) .dw-bd { padding:1.5rem; font-size:.875rem; overscroll-behavior:contain; }
body:not(.scripts-home) .dw h3 { font-size:.875rem; }
body:not(.scripts-home) .dw .hint { font-size:.75rem; }
body:not(.scripts-home) .dw .btn { height:2rem; font-size:.8125rem; }
body:not(.scripts-home) .dw .btn.p { min-height:2.5rem; }
body:not(.scripts-home) .record-script { font-size:1rem; line-height:1.5; }
body:not(.scripts-home) .tp {
  inset:auto var(--shell-margin) var(--shell-margin) calc(var(--shell-nav-width) + var(--shell-margin));
  height:var(--editor-transport-height); padding:1rem 2rem; gap:1rem;
  background:var(--app-surface); border:0; border-top:1px solid var(--app-border);
  border-radius:0 0 var(--shell-radius) var(--shell-radius);
}
/* Form headers never inherit page-header geometry or inspector sizing. */
.sound-tabs { display:flex; gap:.5rem; margin-bottom:1.5rem; }
.audio-lane { position:relative; height:1.5rem; margin-top:1rem; margin-bottom:.5rem; }
.audio-clip { position:absolute; top:0; height:1.5rem; min-width:0; padding:0 .25rem; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-hover); color:var(--app-text-soft); font:400 .75rem var(--font-body); cursor:pointer; }
.audio-clip.ready { background:var(--app-accent); color:var(--app-on-accent); border-color:var(--app-accent); }
.audio-clip.missing { background:transparent; border-style:dashed; }
.audio-clip.stale { background:var(--app-accent-pale); }
.time-lanes { padding-bottom:1rem; }
#recordScript[hidden],#dw-record .record-controls[hidden],#recordUse[hidden],#recordImport[hidden] { display:none!important; }
.record-versions { margin-top:1rem; }
.record-versions summary { cursor:pointer; font-size:.875rem; color:var(--app-text-soft); }
/* Vivi Tabs #19 exported snapshot; app semantic roles retain both skin palettes. */
.sound-tabs.vv-tabs__bar { gap:1.5rem; border-bottom:2px solid var(--app-border); }
.sound-tabs .vv-tabs__tab { background:none; border:none; padding:.5rem 0; font:inherit; font-size:.875rem; color:var(--app-text-soft); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; }
.sound-tabs .vv-tabs__tab.is-active { color:var(--app-accent); border-bottom-color:var(--app-accent); font-weight:700; }
.inspector-resizer { position:absolute; left:-.25rem; top:0; bottom:0; width:.5rem; cursor:col-resize; touch-action:none; }
.inspector-resizer:hover,.inspector-resizer:focus-visible { background:color-mix(in oklab,var(--app-accent) 20%,transparent); }
body:not(.scripts-home) #dw-voice .dw-hd,body:not(.scripts-home) #dw-record .dw-hd { background:var(--app-accent-pale); min-height:4rem; height:4rem; }
body:not(.scripts-home) #dw-voice .dw-hd .t,body:not(.scripts-home) #dw-record .dw-hd .t { font-size:1.25rem; }
/* Sound inspectors align with the first chapter, not the page-header edge. */
body:not(.scripts-home) #dw-voice,body:not(.scripts-home) #dw-record {
  top:calc(var(--shell-margin) + var(--editor-header-height) + var(--editor-content-inset));
  right:calc(var(--shell-margin) + var(--editor-scrollbar-width, 0px) + var(--editor-inspector-scroll-gap, 2rem));
  max-width:calc(100vw - var(--shell-nav-width) - var(--shell-margin) * 2 - var(--editor-scrollbar-width, 0px) - var(--editor-inspector-scroll-gap, 2rem));
  bottom:calc(var(--shell-margin) + var(--editor-transport-height) + var(--editor-inspector-transport-gap, 2rem));
  border:1px solid var(--app-border); border-radius:var(--shell-radius);
}
@media(min-width:1101px) {
  body:not(.scripts-home)[data-inspector="voice"] .sheet,
  body:not(.scripts-home)[data-inspector="record"] .sheet { width:calc(100% - var(--editor-inspector-width) - var(--editor-inspector-scroll-gap, 2rem)); }
}
@media(max-width:640px) {
  body:not(.scripts-home) #dw-voice,body:not(.scripts-home) #dw-record { width:calc(100vw - var(--shell-nav-width) - var(--shell-margin) * 2 - var(--editor-scrollbar-width, 0px) - var(--editor-inspector-scroll-gap, 2rem))!important; }
}
body:not(.scripts-home) #dw-voice .dw-hd,body:not(.scripts-home) #dw-record .dw-hd {
  border-radius:calc(var(--shell-radius) - 1px) calc(var(--shell-radius) - 1px) 0 0;
}
body:not(.scripts-home) #dw-voice .dw-hd .x,body:not(.scripts-home) #dw-record .dw-hd .x {
  /* Vivi Modal close snapshot (components.md #24); 32px consumer hit area. */
  display:flex; align-items:center; justify-content:center;
  flex:0 0 2rem; width:2rem; height:2rem; padding:0;
  border:none; background:none; color:var(--app-text-faint); font-size:1.5rem; line-height:1;
}
body:not(.scripts-home) #dw-voice .dw-hd .x:hover,body:not(.scripts-home) #dw-record .dw-hd .x:hover {
  background:none; color:var(--app-text);
}
#recordSession[hidden] { display:none; }
#recordSetup { display:grid; gap:1rem; }
#recordSetup[hidden] { display:none; }
#recordSetup label { font-size:.875rem; }
#recordScript { max-height:16rem; overflow:auto; }
#dw-voice .blk[hidden] { display:none; }
#dw-voice label { display:block; margin-top:1rem; margin-bottom:.5rem; font-size:.875rem; }
#dw-voice input[type="text"],#dw-voice input:not([type]) { width:100%; min-width:0; height:2.5rem; border:1px solid var(--app-border); border-radius:var(--shell-radius); background:var(--app-surface); color:var(--app-text); padding:0 .75rem; font:1rem var(--font-body); }
#dw-voice input:focus { outline:none; box-shadow:none; border-color:var(--app-accent); }
body:not(.scripts-home) #dw-voice .btn,body:not(.scripts-home) #dw-record .btn { height:2.5rem; font-size:.875rem; }
@media(max-width:1100px){.inspector-resizer { display:none; }}
.task-dialog > .dialog-header,.settings-dialog > .dialog-header,.modal .cd > .dialog-header {
  position:relative; display:flex; flex-direction:row; align-items:center; justify-content:space-between;
  flex:none; gap:1rem; height:4rem; min-height:4rem; margin:0; padding:1rem 1.5rem;
  background:var(--app-accent-pale); border:0; border-bottom:1px solid var(--app-border); border-radius:0;
}
.task-dialog > .dialog-header .t,.settings-dialog > .dialog-header .t,#importDialog.task-dialog > .dialog-header .t,.modal .dialog-header #mTitle {
  min-height:0; margin:0; padding:0; border:0; background:none; font:500 1.25rem/1.5 var(--font-head);
}
.task-dialog > .dialog-header .x,.settings-dialog > .dialog-header .x,.modal .dialog-header .x,#importDialog.task-dialog #importClose {
  position:static; display:grid; place-items:center; margin:0 0 0 auto; flex:none;
  width:2rem; height:2rem; padding:0; border:1px solid transparent; border-radius:var(--shell-radius);
  background:transparent; color:var(--app-text-soft); font:1.25rem/1 var(--font-body);
}
.dialog-header .x:hover { background:var(--app-hover); }
.dialog-header .x:focus-visible { outline:none; box-shadow:none; border-color:var(--app-accent)!important; }
.task-dialog > .dw-bd > .s { grid-column:1 / -1; font-size:.75rem; color:var(--app-text-soft); }
body.scripts-home .rail.vv-island #btnExport,body.scripts-home .rail.vv-island [data-open="history"] { display:flex; }
#importDialog.task-dialog #importDrop .import-description { margin:.5rem 0 1rem; }
@media(max-width:640px){
  .task-dialog > .dialog-header,.settings-dialog > .dialog-header,.modal .cd > .dialog-header { padding:.5rem 1rem; }
  .task-dialog > .dialog-header .x,.settings-dialog > .dialog-header .x,.modal .dialog-header .x,#importDialog.task-dialog #importClose { width:3rem; height:3rem; }
}
body:not(.scripts-home) .chapter-links { height:2rem; min-height:2rem; }
body:not(.scripts-home) .tp .chapter-link { height:2rem!important; background:var(--app-hover)!important; color:var(--app-text); }
body:not(.scripts-home) .tp .chapter-link.on { background:var(--app-selected)!important; }
body:not(.scripts-home) .tp .chapter-link .name,
body:not(.scripts-home) .tp .time { font-size:.75rem; }
.ph-wrap { background:var(--app-preview-bg); border-radius:var(--shell-radius); }
.sub { color:var(--app-preview-ink); }
.lamp.no-selection { padding:.125rem .5rem; border:0; border-radius:var(--shell-radius); background:var(--app-hover); color:var(--app-text-soft); }
body:not(.scripts-home) input:focus,
body:not(.scripts-home) textarea:focus,
body:not(.scripts-home) .seg-hd .ttl:focus,
body:not(.scripts-home) .script-title:focus {
  outline:none!important; box-shadow:none!important; border:1px solid var(--app-accent)!important;
}
body:not(.scripts-home) button:focus-visible { outline:1px solid var(--app-accent); outline-offset:2px; }
@media(max-width:1100px) {
  body:not(.scripts-home)[data-inspector] .sheet { width:100%; }
  body:not(.scripts-home) .dw { box-shadow:-1rem 0 2rem color-mix(in oklab,var(--app-text) 8%,transparent); max-width:calc(100vw - var(--shell-nav-width) - var(--shell-margin) * 2); }
}
@media(max-width:640px) {
  #dw-history.task-dialog .dw-bd { grid-template-columns:minmax(0,1fr); }
  #dw-history.task-dialog #histList { max-height:12rem; }
  body.scripts-home .rail.vv-island { overflow-x:auto; }
  body.scripts-home .rail.vv-island .home-logo,body.scripts-home .rail.vv-island .nav-group,body.scripts-home .rail.vv-island .nav-footer { flex-shrink:0; }
  body.scripts-home .rail.vv-island .resume-group { min-height:2rem; margin:0 .5rem 0 0; }
  .task-dialog .dw-hd .x,#importDialog.task-dialog #importClose { width:3rem; height:3rem; }
  .settings-dialog .dw-hd .x { width:3rem; height:3rem; }
  body:not(.scripts-home) { --shell-margin:1rem; --shell-nav-width:3rem; --editor-header-height:10rem; --editor-content-inset:1.5rem; }
  body:not(.scripts-home) .rail.vv-island { padding:1rem .5rem; }
  body:not(.scripts-home) .rail.vv-island .home-logo { width:2rem; height:2rem; margin:0 0 1.5rem; }
  body:not(.scripts-home) .rail.vv-island button { width:2rem; min-height:2.75rem; height:2.75rem; padding:0; justify-content:center; }
  body:not(.scripts-home) .rail .nav-label { display:none; }
  body:not(.scripts-home) .nav-group { gap:var(--layout-unit); }
  body:not(.scripts-home) .nav-history { flex-direction:column; }
  body:not(.scripts-home) .top { padding:1rem; gap:var(--layout-unit); grid-template-rows:2.5rem auto; }
  body:not(.scripts-home) .top .script-title { font-size:1.25rem; }
  .workflow-stages { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-stages button { min-width:0; padding:0 .25rem; }
  .workflow-stages .stage-pending { margin-left:.25rem; }
  body:not(.scripts-home) .sheet { padding:var(--editor-content-inset) 1rem; }
  body:not(.scripts-home) .seg { padding:1rem; }
  body:not(.scripts-home) .seg-hd { grid-template-columns:2rem minmax(0,1fr) 2.75rem; gap:.5rem; }
  body:not(.scripts-home) .seg-hd .del { width:2.75rem; height:2.75rem; }
  body:not(.scripts-home) .chapter-tools { padding-left:2.5rem; }
  body:not(.scripts-home) .line { gap:.5rem; }
  body:not(.scripts-home) .line .ln { width:1.5rem; min-width:1.5rem; flex-basis:1.5rem; }
  body:not(.scripts-home) .chapter-insert { min-height:2.75rem; }
  body:not(.scripts-home) .dw { width:calc(100vw - var(--shell-nav-width) - var(--shell-margin) * 2)!important; max-width:none; }
  body:not(.scripts-home) .dw-bd { padding:1rem; }
  body:not(.scripts-home) .tp { padding:.5rem; gap:.5rem; }
  body:not(.scripts-home) .chapter-links { position:relative; inset:auto; display:flex; gap:.5rem; overflow-x:auto; }
  body:not(.scripts-home) .chapter-link { position:relative; left:auto!important; width:auto!important; flex:none; min-width:6rem; max-width:10rem; padding:0 .5rem; }
  body:not(.scripts-home) .tp .chapter-link .num { display:none; }
  body:not(.scripts-home) .tp .time { font-size:.6875rem; }
}
