/* The approved Writer components are shared, not recreated, in Table Read. */
@media screen {
  body.studio-refined.read-layout #sidebar #writerDrawer {display:flex;flex:1;min-height:0;}
  body.read-layout #sideScroll,body.read-layout #mobileDrawer,body.read-layout .tableReadBottomDock {display:none!important;}
  body.read-layout #writerDrawer .writerDetails:has(#writerTitlePageTitle),body.read-layout #writerDrawer .writerDetails:has(#writerSnapshotList) {display:none;}
  body.studio-refined.read-layout #sidebar #writerDrawer>.workspaceDrawerScroll {padding:0 16px 24px;gap:4px;}
  body.studio-refined #sidebar .writerNotesToolbar {align-items:center;}
  body.studio-refined #sidebar .writerNotesToolbar :is(#writerNewNote,.writerReviewFilters) {box-sizing:border-box;height:28px;min-height:28px;max-height:28px;align-self:center;}
  body.studio-refined #sidebar .writerNotesToolbar .writerReviewFilters button {font:500 11px/18px var(--sans);}
  body.studio-refined #sidebar #writerNewNote {order:-1;font:500 11px/18px var(--sans);}
  /* Match the selector's outer frame and inset face, not a full-height fill. */
  body.studio-refined #sidebar #writerNewNote,
  body.studio-refined #sidebar #writerNewNote:is(:hover,[aria-expanded="true"]) {isolation:isolate;border-color:var(--workspace-edge);background:var(--surface-0);box-shadow:none;}
  body.studio-refined #sidebar #writerNewNote {padding:2px;gap:0;}
  body.studio-refined #sidebar #writerNewNote .writerNewNoteFace {position:static;display:flex;align-items:center;justify-content:center;gap:3px;box-sizing:border-box;height:22px;margin:0;padding:0 6px 0 4px;border-radius:3px;background:color-mix(in srgb,var(--icon-mint) 7%,var(--surface-2));}
  #writerNewNote:is(:hover,[aria-expanded="true"]) .writerNewNoteFace {background:color-mix(in srgb,var(--icon-mint) 15%,var(--surface-2));}
  body.studio-refined.read-layout #sidebar #writerDrawer :is(#castSection,#optSection) {flex:none;margin:0;padding:0;border:0;background:none;box-shadow:none;}
  body.studio-refined.read-layout #sidebar #writerDrawer .secToggle {box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;gap:8px;height:44px;min-height:44px;margin:0;padding:0 11px;border:2px solid transparent;border-radius:6px;background:none;color:var(--text);font:550 14px/20px var(--sans);}
  body.studio-refined.read-layout #sidebar #writerDrawer .secToggle :is(.sidebarSectionLabel,.sidebarSectionCount) {position:relative;top:-1px;font:inherit;}
  body.studio-refined.read-layout #sidebar #writerDrawer .secToggle .sidebarSectionIcon {display:grid;place-items:center;width:20px;height:20px;flex:none;}
  body.studio-refined.read-layout #sidebar #writerDrawer .secToggle .sidebarSectionIcon svg {width:20px;height:20px;stroke-width:1.6;}
  body.studio-refined.read-layout #sidebar #writerDrawer .secToggle .sidebarSectionChevron {margin-left:auto;display:grid;place-items:center;width:16px;height:16px;transform:none;}
  body.read-layout #writerDrawer .secToggle .sidebarSectionChevron svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4;transition:transform 180ms ease;}
  body.read-layout #writerDrawer .section.open .sidebarSectionChevron svg {transform:rotate(90deg);}
  body.studio-refined.read-layout #sidebar #writerDrawer .section.open>.secToggle {border-color:color-mix(in srgb,var(--read-section-tone) 32%,var(--line));background:color-mix(in srgb,var(--read-section-tone) 14%,var(--surface-1));}
  body.read-layout #castSection {--read-section-tone:#ce9c83;}
  body.read-layout #optSection {--read-section-tone:#a9a0c8;}
  body.read-layout #writerDrawer .sidebarSectionIcon svg {color:var(--read-section-tone);}
  body.read-layout #writerDrawer .sidebarSectionIcon .iconAccent {stroke:var(--text);}
  body.studio-refined.read-layout #sidebar #writerDrawer :is(#castSection,#optSection)>.secBody {max-height:480px;overflow:auto;padding:8px 0;}
  body.read-layout #castSection :is(#roleIntro,.readExtraTools,#rehearsalHint) {display:none!important;}
  body.studio-refined.read-layout #castSection .readModePanel {padding:0 0 8px;margin:0;border:0;}
  body.studio-refined.read-layout #castSection #readRolePicker {display:grid;gap:6px;margin:0;}
  body.read-layout #readRolePicker>label {font:500 12px/18px var(--sans);}
  body.studio-refined.read-layout #castSection :is(select,input:not([type=range]):not([type=checkbox])) {box-sizing:border-box;width:100%;height:28px;min-height:0;margin:0;padding:4px 26px 4px 8px;border:1px solid var(--writer-resting-border);border-radius:5px;background-color:var(--surface-0);color:var(--text);font:500 11px/18px var(--sans);}
  body.studio-refined.read-layout #sidebar #writerDrawer #castSection #readRole {height:28px;min-height:0;padding:4px 26px 4px 8px;border-radius:5px;font:500 11px/18px var(--sans);}
  body.studio-refined.read-layout #sidebar #castList {display:grid;gap:8px;}
  body.studio-refined.read-layout #castList .studioCast {display:block;min-width:0;margin:0;padding:10px;border:1px solid var(--writer-resting-border);border-radius:8px;background:var(--surface-1);box-shadow:none;}
  body.studio-refined.read-layout #castList .studioCast.mine {background:color-mix(in srgb,var(--icon-mint) 7%,var(--surface-1));}
  body.read-layout #castList .studioCastHeading {display:flex;align-items:center;gap:6px;min-height:18px;margin:0 0 8px;}
  body.read-layout #castList .studioCastName {min-width:0;font:550 12px/18px var(--sans);color:var(--text);}
  body.read-layout #castList .studioCastCount {margin-left:auto;font:400 11px/18px var(--sans);color:var(--dim);}
  body.read-layout #castList .studioCastDot {display:none;}
  body.read-layout #castList .studioVoiceControls {display:grid;grid-template-columns:minmax(0,1fr) 28px 28px;gap:4px;}
  body.studio-refined.read-layout :is(#castList,.readOwnRoleRow) :is(.studioSample,.studioTuneButton) {box-sizing:border-box;display:grid;place-items:center;width:28px;min-width:28px;height:28px;min-height:0;margin:0;padding:5px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);color:var(--icon-mint);}
  body.read-layout :is(#castList,.readOwnRoleRow) :is(.studioSample,.studioTuneButton) svg {display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  body.read-layout :is(#castList,.readOwnRoleRow) .studioSample svg {fill:color-mix(in srgb,var(--icon-mint) 12%,transparent);}
  body.studio-refined.read-layout #castList .studioTuning {display:none;margin:8px 0 0;padding:0;border:0;background:none;}
  body.studio-refined.read-layout #castList .studioTuning.open {display:grid;gap:8px;animation:read-detail-in 180ms ease;}
  .readTuneChoices,.readPaceControls {display:flex;align-items:center;gap:2px;box-sizing:border-box;min-height:28px;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);}
  body.studio-refined #sidebar :is(.readTuneChoices,.readPaceControls)>button {display:flex;align-items:center;justify-content:center;flex:1;gap:4px;box-sizing:border-box;height:22px;min-height:0;margin:0;padding:0 6px;border:0;border-radius:3px;background:var(--surface-2);color:var(--text);font:500 11px/18px var(--sans);}
  body.studio-refined #sidebar :is(.readTuneChoices,.readPaceControls)>button:hover {background:var(--surface-3);}
  .readInlineSlider {display:flex;align-items:center;gap:8px;width:100%;min-width:0;height:22px;}
  .readSettingValue {flex:none;min-width:36px;text-align:center;font:500 11px/18px var(--sans);font-variant-numeric:tabular-nums;}
  body.studio-refined #sidebar .readInlineSlider input {flex:1;min-width:0;width:auto;height:18px;margin:0;padding:0;accent-color:var(--icon-mint);}
  body.studio-refined #sidebar .readInlineSlider input:focus {outline:none!important;box-shadow:none!important;}
  .readPaceControls:focus-within {border-color:var(--icon-mint);}
  body.studio-refined #sidebar .readSettingDone {display:grid;place-items:center;box-sizing:border-box;flex:none;width:22px;height:22px;min-height:0;margin:0;padding:4px;border:0;border-radius:3px;background:color-mix(in srgb,var(--icon-mint) 14%,var(--surface-1));color:var(--icon-mint);}
  .readSettingDone svg {display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
  body.studio-refined.read-layout #castList .studioRoleButton,body.read-layout #readRehearsalTools button {display:flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;height:28px;min-height:0;margin:0;padding:0 8px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);font:500 11px/18px var(--sans);}
  body.read-layout .readVoiceSource {margin-top:8px;border:1px solid var(--writer-resting-border);border-radius:8px;background:var(--surface-1);}
  body.read-layout .readVoiceSource>summary {padding:8px 10px;font:500 12px/18px var(--sans);cursor:pointer;}
  body.studio-refined.read-layout .readVoiceSource .speechProvider {display:block;margin:0;padding:0 10px 10px;border:0;background:none;}
  body.read-layout .speechProviderHeading {margin-bottom:6px;}
  body.read-layout .speechProviderHeading>label {display:none;}
  body.read-layout .speechProviderHeading>span {font:400 11px/18px var(--sans);}
  body.read-layout #speechProviderNote {margin:6px 0 0;font:400 11px/17px var(--sans);}
  body.studio-refined.read-layout #readPronunciation {display:flex;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;height:28px;min-height:0;margin:0 10px 10px;padding:0 8px;border:1px solid var(--line);border-radius:5px;font:500 11px/18px var(--sans);}
  body.read-layout #readPronunciation svg {width:14px;height:14px;}
  body.read-layout #optSection .readExtraTools,body.read-layout #optSection .optRow[hidden],body.read-layout #castList .studioTuneRow[hidden] {display:none!important;}
  body.read-layout #optSection .readPaceControls {margin-bottom:8px;}
  body.read-layout .readPaceControls>button {flex-direction:row;}
  body.read-layout .readPaceControls>button>b {font:inherit;color:var(--icon-mint);}
  .readOptionSwitches {padding:2px 10px;border:1px solid var(--writer-resting-border);border-radius:8px;background:var(--surface-1);}
  .readOptionSwitch {position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;margin:0;font:450 12px/18px var(--sans);cursor:pointer;}
  .readOptionSwitch+.readOptionSwitch {border-top:1px solid var(--line-soft);}
  .readOptionSwitch input {position:absolute;right:0;opacity:0;width:30px;height:18px;}
  .readOptionSwitch i {box-sizing:border-box;flex:none;width:28px;height:16px;padding:2px;border-radius:8px;background:var(--surface-3);transition:background 160ms ease;}
  .readOptionSwitch i::after {content:'';display:block;width:12px;height:12px;border-radius:50%;background:var(--dim);transition:transform 180ms ease,background 180ms ease;}
  .readOptionSwitch input:checked+i {background:color-mix(in srgb,var(--icon-mint) 45%,var(--surface-0));}
  .readOptionSwitch input:checked+i::after {transform:translateX(12px);background:var(--text);}
  .readOptionSwitch input:focus-visible+i {outline:1px solid var(--icon-mint);outline-offset:2px;}
  .readSpacingLabel {display:block;margin:10px 0 6px;font:500 12px/18px var(--sans);}
  .readSpacingGroup {display:flex;gap:2px;box-sizing:border-box;height:28px;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);}
  body.studio-refined #sidebar .readSpacingGroup>button {display:grid;place-items:center;flex:1;min-width:0;height:22px;min-height:0;margin:0;padding:0 5px;border:0;border-radius:3px;background:none;font:500 11px/18px var(--sans);color:var(--dim);}
  body.studio-refined #sidebar .readSpacingGroup>button[aria-pressed=true] {background:var(--surface-3);color:var(--text);}
  /* Playback lives in the same 44px utility row as Writer; only scene position
     remains in the quiet footer. Legacy nodes stay mounted for existing hooks. */
  body.studio-refined.read-layout #main #readerBar {box-sizing:border-box;display:flex;align-items:center;gap:8px;flex:none;flex-wrap:nowrap;position:relative;top:auto;z-index:24;width:100%;height:auto;min-height:0;margin:0;padding:8px;border:0;border-bottom:1px solid #000;background:var(--bg);}
  body.studio-refined.read-layout #main #readerBar #controls {display:contents!important;}
  body.read-layout #readerBar :is(#readPlayerState,#readerScene,.readerTrack,#readReplay,#readRestart,.studioTransportInfo,.studioTransportHint) {display:none!important;}
  body.studio-refined.read-layout #readerBar #controls .btns {box-sizing:border-box;display:flex;align-items:center;gap:2px;flex:none;width:var(--workspace-view-control-width);height:28px;margin:0;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);}
  body.studio-refined.read-layout #readerBar #controls .btns {order:0;}
  body.studio-refined.read-layout #readerBar #controls .btns>button {box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:4px;flex:none;width:24px;min-width:24px;height:22px;min-height:0;margin:0;padding:0 4px;border:0;border-radius:3px;background:none;color:var(--icon-mint);}
  body.studio-refined.read-layout #readerBar #controls .btns>#playBtn {flex:1;width:auto;min-width:0;background:var(--surface-2);color:var(--text);font:500 11px/18px var(--sans);}
  body.read-layout #readerBar #controls .btns button svg {display:block;width:14px;height:14px;stroke-width:1.8;}
  body.read-layout #readerBar .controlContent {display:flex;align-items:center;justify-content:center;gap:4px;}
  body.read-layout #readerBar #playBtn .controlContent>span {position:relative;top:var(--writer-label-offset);}
  body.studio-refined.read-layout #readerBar #controls .readTimeline {display:flex;align-items:center;gap:0;flex:1;min-width:80px;width:auto;margin:0;}
  body.studio-refined.read-layout #readerBar .readViewSwitch {margin:0;}
  body.read-layout #readerBar .readSeekRail {position:relative;width:100%;}
  body.read-layout #readerBar #readSeekPreview {position:absolute;z-index:100;flex:none;width:max-content;max-width:min(320px,calc(100vw - 32px));margin:0;padding:8px 10px;border:1px solid var(--line-strong);border-radius:6px;background:var(--panel);box-shadow:0 6px 20px #0003;color:var(--text);font:500 11px/17px var(--sans);transform:translateX(-50%);pointer-events:none;}
  body.studio-refined.read-layout #readerBar #controls #readSeek {width:100%;height:16px;margin:0;accent-color:var(--icon-mint);}
  body.studio-refined.read-layout #readerBar #controls #readSeek:focus {outline:none;box-shadow:none;}
  body.studio-refined.read-layout #readerBar #controls #readSeek:focus-visible {outline:1px solid var(--icon-mint);outline-offset:2px;}
  body.read-layout #readerBar .readerBarCopy {display:none;}
  body.read-layout #readerBar #readerSpeaker {font:500 11px/18px var(--sans);color:var(--dim);}
  body.read-layout #readerBar #readerSpeaker[hidden] {display:none;}
  body.studio-refined.read-layout #readerBar #readerTextZoom {box-sizing:border-box;display:flex;align-items:center;gap:2px;flex:none;height:28px;margin:0;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);}
  body.studio-refined.read-layout #readerBar #readerTextZoom button {display:grid;place-items:center;box-sizing:border-box;flex:none;width:24px;height:22px;min-height:0;margin:0;padding:0;border:0;border-radius:3px;background:none;color:var(--icon-mint);}
  body.studio-refined.read-layout #readerBar #readerTextZoom .workspaceReadZoomValue {position:relative;display:grid;place-items:center;flex:none;width:56px;height:22px;border-radius:3px;background:var(--surface-2);font:500 11px/18px var(--sans);}
  body.read-layout #readerBar #readerTextZoom select {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;}
  body.read-layout #readPosition {display:none;}
  body.read-layout #optSection .workspaceSpacingField[hidden] {display:none!important;}
  body.read-layout #script {position:relative;padding-bottom:24px!important;}
  body.read-layout #readerBar #status {display:none!important;}
  body.read-layout.read-feedback #readerBar #status {display:block!important;position:absolute;top:calc(100% + 6px);left:8px;right:8px;z-index:4;padding:8px 12px;border:1px solid var(--line);border-radius:6px;background:var(--panel);font:400 12px/18px var(--sans);}
  body.studio-refined.read-layout.read-sidebar-hidden #sidebar {width:0;min-width:0;border:0;overflow:hidden;}
  body.studio-refined.read-layout.read-sidebar-hidden #brand {--workspace-photo-rail:0px;grid-template-columns:0 minmax(0,1fr)!important;}
  body.studio-refined.read-layout.read-sidebar-hidden #brand .brandHeading {display:none!important;}
  body.read-layout.read-sidebar-hidden #headerSaveStatus {left:12px;}
  body.studio-refined.read-layout.read-sidebar-hidden #sidebar header#brand::after {left:0;}
  body.studio-refined.read-layout #script .inlineNoteMarker {box-sizing:border-box;display:grid;place-items:center;width:24px;height:24px;min-height:24px;padding:4px;border:1px solid #c9ac6240;border-radius:5px;background:#f2ead5;color:#80692e;box-shadow:none;}
  body.read-layout #script .inlineNoteMarker svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;}
  body.studio-refined.read-layout #script .inlineNoteMarker:hover {background:#f2ead5;box-shadow:0 0 0 1px #c9ac6240;transform:translateY(-50%)!important;}
  body.studio-refined.production-mode:not(.splash-home) #insWrap {display:block!important;}
  #productionWorkspaceBar {position:sticky;top:0;z-index:24;display:flex;align-items:center;box-sizing:border-box;width:100%;margin:0;padding:8px;border-bottom:1px solid #000;background:var(--bg);}
  body.studio-refined.production-mode #insights {min-height:calc(100% - 45px);}
  @media(min-width:981px){
    body.studio-refined.workspace-sidebar-hidden:not(.splash-home) #sidebar {width:0;min-width:0;border:0;overflow:hidden;}
    body.studio-refined.workspace-sidebar-hidden:not(.splash-home) #brand {--workspace-photo-rail:0px;grid-template-columns:0 minmax(0,1fr)!important;}
    body.studio-refined.workspace-sidebar-hidden:not(.splash-home) #brand .brandHeading {display:none!important;}
    body.workspace-sidebar-hidden #headerSaveStatus {left:12px;}
    body.studio-refined.production-mode.workspace-sidebar-hidden #insWrap {left:0;}
  }
  body.read-layout #script .inlineNoteCount {display:none;}
  @keyframes read-detail-in {from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
  @media(prefers-reduced-motion:reduce) {.readOptionSwitch i,.readOptionSwitch i::after {transition:none;}body.read-layout #castList .studioTuning.open {animation:none;}}
  /* Compact voice rows use the same fold disclosure as outline cards. */
  body.studio-refined.read-layout #castList .studioCast {position:relative;padding:8px;border-bottom-right-radius:0;overflow:hidden;}
  .readCastRow,.readOwnRoleRow {display:grid;grid-template-columns:minmax(0,1fr) 100px 28px;align-items:center;gap:var(--writer-content-gap);min-width:0;}
  body.read-layout #castList .studioCastName {display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;margin:0;text-align:center;}
  .readCastNameText {position:relative;top:var(--writer-label-offset);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .readVoiceField {position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:28px;padding:0 8px;border:1px solid var(--writer-resting-border);border-radius:5px;background:var(--surface-0);font:500 11px/18px var(--sans);}
  .readVoiceField>.workspaceControlLabel {position:relative;top:var(--writer-label-offset);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;}
  body.studio-refined.read-layout #castSection .readVoiceField select {position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;}
  .readVoiceField:focus-within {outline:1px solid var(--icon-mint);outline-offset:0;}
  body.read-layout :is(#castList,.readOwnRoleRow) .studioSample svg {fill:var(--icon-mint);stroke:var(--icon-mint);stroke-width:1;}
  body.read-layout :is(#castList,.readOwnRoleRow) .studioSample .sampleBtnLabel {display:none!important;}
  body.studio-refined.read-layout :is(#castList,.readOwnRoleRow) .studioSample {padding:0;}
  body.studio-refined.read-layout #sidebar :is(#castList,.readOwnRoleRow) .studioSample .sampleBtnIcon {display:grid;place-items:center;min-width:16px;width:16px;height:16px;line-height:0;}
  body.studio-refined.read-layout #sidebar :is(#castList,.readOwnRoleRow) .studioSample .sampleBtnIcon svg {width:16px;height:16px;}
  body.read-layout #castList .studioCastName {gap:3px;font-size:11.5px;}
  body.studio-refined.read-layout #castList .studioCast {background:color-mix(in srgb,var(--card-color,var(--icon-mint)) 8%,var(--surface-1));}
  body.studio-refined #sidebar .readTuneChoices>button {flex:1 1 auto;}
  .readTuneChoices>button>.workspaceControlLabel {position:relative;top:var(--writer-label-offset);}
  .readOwnRoleRow {box-sizing:border-box;min-height:46px;margin-bottom:8px;padding:8px;border:1px solid var(--writer-resting-border);border-radius:8px;background:color-mix(in srgb,var(--icon-mint) 7%,var(--surface-1));}
  .readOwnRoleRow>label {position:relative;top:var(--writer-label-offset);min-width:0;text-align:center;font:550 11.5px/18px var(--sans);color:var(--text);white-space:nowrap;}
  .readOwnRoleRow>.readVoiceField {grid-column:2;min-width:0;}
  .readOwnRoleRow>label {color:var(--icon-mint);text-shadow:0 0 12px #a8c9bc22;}
  .readRoleGuideButton {cursor:pointer;}
  
  
  #readRoleGuide {--guide-rail:var(--studio-side,304px);box-sizing:border-box;position:fixed;inset:auto auto 64px calc(var(--guide-rail) + (100vw - var(--guide-rail))/2);transform:translateX(-50%);width:min(420px,calc(100vw - var(--guide-rail) - 32px));max-height:calc(100dvh - 140px);overflow:auto;margin:0;}
  body.workspace-sidebar-hidden #readRoleGuide {--guide-rail:0px;}
  #readRoleGuide::backdrop {background:transparent;}
  #readRoleGuide:focus {outline:none;}
  #readRoleGuide h2 {margin:0 0 10px;color:#e1ca8e;font:600 17px/24px var(--sans);}
  #readRoleGuide p {margin:10px 0;}
  #readRoleGuide footer {margin-top:14px;padding-top:10px;border-top:1px solid #dac08430;color:#c6b784;font:500 11px/18px var(--sans);}
  .readVoiceField.is-placeholder {color:var(--text);font-weight:500;}
  body.read-layout #optSection,body.read-layout .readCastFooter[hidden] {display:none!important;}
  body.studio-refined :is(input,textarea)::placeholder {color:var(--dim)!important;font:400 11px/18px var(--sans)!important;letter-spacing:normal;opacity:1!important;}
  body.studio-refined :is(#writerSceneSearch,#writerReplaceInput),body.studio-refined #writerOutlineAddMenu .writerOutlineEntry input {color:var(--text);font:500 11px/18px var(--sans);}
  body.studio-refined #writerOutlineView [data-outline-field]:empty::before {color:var(--dim);font:400 11px/18px var(--sans);opacity:1;}
  body.studio-refined.read-layout #castList .studioTuneButton.writerCardFold {position:absolute;right:0;bottom:0;display:grid;place-items:center;width:28px;height:28px;min-height:0;padding:0;border:0;border-radius:5px 0 0 0;background:transparent;box-shadow:none;overflow:hidden;clip-path:polygon(100% 12px,100% 100%,12px 100%);}
  body.studio-refined.read-layout #castList .studioTuneButton.writerCardFold:is(:hover,:focus-visible) {background:transparent;box-shadow:none;}
  .readCastFooter {display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;}
  body.studio-refined.read-layout #castList .readCastFooter .studioRoleButton {height:28px;padding:0 7px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);font:500 11px/18px var(--sans);}
  .readCastFooter .studioRoleButton>span:last-child {position:relative;top:var(--writer-label-offset);}
  body.read-layout .readCastFooter .studioRoleCheck {display:grid;place-items:center;width:14px;height:14px;padding:0;border:0;background:none;color:var(--icon-coral);}
  body.read-layout .readCastFooter .studioRoleCheck svg {display:block;width:14px;height:14px;opacity:1;fill:none;stroke:currentColor;stroke-width:1.8;}
  body.read-layout .readCastFooter .studioRoleButton.on .studioRoleCheck {background:none;color:var(--icon-mint);}
  body.studio-refined.read-layout #castSection .readModePanel {padding:0;margin:0;}
  body.read-layout #castSection .readModePanel:has(:is(#readRehearsalTools,#readCloudNotice):not([hidden])) {margin-bottom:8px;}
  body.read-layout :is(#readRolePicker,.readVoiceSource,.readPaceControls,#readRehearsalTools label)[hidden],body.read-layout #optSection input[hidden] {display:none!important;}
  body.read-layout .readOptionSwitches {display:grid;gap:8px;padding:0;border:0;background:none;}
  body.studio-refined.read-layout #sidebar .readOptionButton {display:flex;align-items:center;justify-content:space-between;gap:8px;box-sizing:border-box;width:100%;height:28px;min-height:0;margin:0;padding:0 8px;border:1px solid var(--line);border-radius:5px;background:var(--surface-2);color:var(--text);font:500 11px/18px var(--sans);text-align:left;}
  :is(.readOptionButton,#readNextCue)>.workspaceControlLabel {position:relative;top:var(--writer-label-offset);}
  .readOptionButton>i {display:grid;place-items:center;flex:none;width:14px;height:14px;font-style:normal;color:var(--icon-coral);}
  .readOptionButton[aria-pressed="true"]>i {color:var(--icon-mint);}
  .readOptionButton>i svg {display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  body.read-layout .readSpacingLabel {margin:8px 0;}
}

/* The same compact dialog language in every workspace. */
@media screen {
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .utilityDialog {width:min(560px,calc(100vw - 48px));max-height:calc(100dvh - 48px);border-radius:10px;overflow:hidden;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .utilityDialogHead {box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;margin:0;padding:12px 16px;border-bottom:1px solid var(--line-soft);}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .utilityDialogHead>div>span {display:none;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .utilityDialogHead h2 {margin:0;font:550 16px/22px var(--sans);}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .systemModalClose {display:grid;place-items:center;box-sizing:border-box;flex:none;width:28px;height:28px;min-height:0;margin:0;padding:5px;border:0;border-radius:5px;background:none;color:var(--dim);}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .systemModalClose svg {display:block;width:16px;height:16px;stroke-width:1.8;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .utilityDialogBody {display:grid;align-content:start;gap:12px;min-height:0;margin:0;padding:16px;overflow:auto;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) :is(label,.shareField) {display:grid;gap:6px;margin:0;font:500 12px/18px var(--sans);}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) :is(label,.shareField) {text-transform:none;letter-spacing:normal;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) :is(input:not([type=checkbox]),select) {box-sizing:border-box;width:100%;min-width:0;min-height:0;height:28px;margin:0;padding:4px 8px;border:1px solid var(--workspace-edge);border-radius:5px;background-color:var(--surface-0);font:500 11px/18px var(--sans);color:var(--text);}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) select {padding-right:26px;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) :is(input,select):focus-visible {outline:1px solid var(--icon-mint);outline-offset:1px;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) :is(.shareSettings,.writerExportFieldRow) {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) :is(button:not(.systemModalClose),.utilityDialogFoot button) {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:0;height:28px;margin:0;padding:0 9px;border-radius:5px;font:500 11px/18px var(--sans);}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) [hidden] {display:none!important;}
  body.studio-refined #shareWrap .utilityDialogFoot,body.studio-refined #writerSelectiveExportCancel {display:none!important;}
  body.studio-refined #shareDialog .shareField small {margin:0;font:400 11px/17px var(--sans);color:var(--dim);}
  body.studio-refined #shareDialog .shareCreateRow {display:flex;align-items:center;gap:8px;margin:0;padding:0;}
  body.studio-refined #shareDialog #shareCreate {flex:none;min-width:0;}
  body.studio-refined #shareDialog #shareStatus {font:400 11px/17px var(--sans);}
  body.studio-refined #shareDialog .shareLinkRow {display:flex;align-items:center;gap:8px;margin:0;}
  body.studio-refined #shareDialog .shareLinkRow input {flex:1;}
  body.studio-refined #shareDialog .shareLinkRow button {flex:none;}
  body.studio-refined #shareDialog #shareResult {display:grid;gap:10px;margin:0;padding:12px;border:1px solid var(--workspace-edge);border-radius:8px;background:var(--surface-1);}
  body.studio-refined #shareDialog :is(.shareResultHead,.shareMeta,.shareActions) {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;}
  body.studio-refined #shareDialog .shareResultHead {justify-content:space-between;}
  body.studio-refined #shareDialog :is(.shareResultHead,.shareKeyNote,.shareSyncStatus) {font:400 12px/18px var(--sans);}
  body.studio-refined #shareDialog .shareKeyNote {margin:0;}
  body.studio-refined #shareDialog .shareMeta {font:400 11px/17px var(--sans);color:var(--dim);}
  .sharePrivacyDetails {margin:0;padding:0;border:1px solid var(--workspace-edge);border-radius:8px;background:var(--surface-1);}
  .sharePrivacyDetails>summary {padding:8px 10px;font:500 12px/18px var(--sans);color:var(--dim);cursor:pointer;}
  body.studio-refined #shareDialog .sharePrivacyHero {display:block;margin:0;padding:0 10px 10px;border:0;background:none;}
  body.studio-refined #shareDialog .sharePrivacyMark {display:none;}
  body.studio-refined #shareDialog .sharePrivacyHero :is(b,p) {margin:0;font:400 11px/17px var(--sans);color:var(--dim);}
  body.studio-refined #shareDialog .sharePrivacyHero b {display:block;margin-bottom:4px;color:var(--text);font-weight:500;}
  body.studio-refined #writerSelectiveExportWrap .writerExportOptions {display:grid;gap:8px;margin:0;padding:10px;border:1px solid var(--workspace-edge);border-radius:8px;background:var(--surface-1);}
  body.studio-refined #writerSelectiveExportWrap .writerExportOptions>label {display:flex;align-items:center;gap:8px;min-height:0;height:24px;margin:0;padding:0;font:400 12px/18px var(--sans);}
  body.studio-refined #writerSelectiveExportWrap .writerExportOptions input {width:14px;height:14px;margin:0;accent-color:var(--icon-mint);}
  body.studio-refined #writerSelectiveExportWrap .writerExportScopeSummary {min-height:0;margin:0;font:400 11px/18px var(--sans);color:var(--dim);}
  body.studio-refined #writerSelectiveExportWrap .utilityDialogFoot {display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:0;height:auto;margin:0;padding:0 16px 16px;border:0;background:none;}
  body.studio-refined :is(#shareWrap,#writerSelectiveExportWrap) .workspaceControlLabel {position:relative;top:var(--writer-label-offset,-1px);}
  body.studio-refined :is(#shareCreate,#writerSelectiveExportPdf) {border:1px solid color-mix(in srgb,var(--icon-mint) 35%,var(--line));background:color-mix(in srgb,var(--icon-mint) 14%,var(--surface-2));color:var(--text);font-weight:550;}
  body.studio-refined :is(#shareCreate,#writerSelectiveExportPdf):hover {background:color-mix(in srgb,var(--icon-mint) 22%,var(--surface-2));}
  body.studio-refined #writerSelectiveExportWrap .writerExportScopeSummary {padding:10px 12px;border:1px solid var(--line-soft);border-radius:8px;background:var(--surface-1);}
  body.studio-refined #shareDialog #shareStatus:empty {display:none;}
}

/* Shared tuning geometry: one inset, fixed value column, equal slider gaps. */
 body.studio-refined.read-layout #castList .readTuneChoices {height:28px;min-height:28px;padding:2px;}
 body.read-layout .readInlineSlider {display:grid;grid-template-columns:42px minmax(0,1fr) 22px;gap:8px;height:22px;align-items:center;}
 body.read-layout .readSettingValue {position:static!important;display:grid;place-items:center;min-width:0;height:22px;font:550 11px/1 var(--sans);}
 body.studio-refined.read-layout #castList .readInlineSlider .readSettingDone {width:22px;height:22px;padding:4px;justify-self:end;}
 body.studio-refined.read-layout #sidebar :is(#castList,.readOwnRoleRow) .studioSample .sampleBtnIcon {position:static!important;transform:none!important;}
 body.read-layout .readOwnRoleRow .readVoiceField {justify-content:center;}
 body.read-layout .readOwnRoleRow .readVoiceField>.workspaceControlLabel {text-align:center;}
 body.studio-refined.read-layout #readerBar #controls .btns>#playBtn {background:color-mix(in srgb,var(--icon-mint) 10%,var(--surface-2));color:var(--text);border-color:transparent;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--icon-mint) 28%,transparent);animation:none;transition:background-color .18s,color .18s;}
 body.studio-refined.read-layout #readerBar #controls .btns>#playBtn:hover {background:color-mix(in srgb,var(--icon-mint) 17%,var(--surface-2));}
 body.studio-refined.read-layout #castList .readInlinePronunciation {display:flex;align-items:center;gap:2px;box-sizing:border-box;min-width:0;width:100%;height:22px;margin:0;padding:0;border:0;background:transparent;}
 body.studio-refined.read-layout #sidebar #castList .readInlinePronunciation input {display:block;flex:1;box-sizing:border-box;min-width:0;width:0;height:22px;min-height:0;margin:0;padding:calc(2px + var(--writer-label-offset,-1px)) 6px calc(2px - var(--writer-label-offset,-1px));border:0;border-radius:3px;background:var(--surface-2);color:var(--text);font:500 11px/18px var(--sans);outline:0;box-shadow:none;}
 body.studio-refined.read-layout #castList .readInlinePronunciation input::placeholder {color:var(--dim);font:inherit;opacity:1;}
 body.studio-refined.read-layout #castList .readInlinePronunciation .readSettingDone {display:grid;place-items:center;flex:none;box-sizing:border-box;width:22px;height:22px;min-height:0;margin:0;padding:4px;border:0;border-radius:3px;background:color-mix(in srgb,var(--icon-mint) 14%,var(--surface-1));color:var(--icon-mint);}
 .readInlinePronunciation .readSettingDone svg {display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}

/* Live tuning has no confirmation cell or detached morph layer. */
body.studio-refined.read-layout #castList .readTuneChoices {box-sizing:border-box;height:28px;min-height:28px;padding:2px;}
body.studio-refined.read-layout #castList .readInlineSlider {display:grid;grid-template-columns:28px minmax(0,1fr);gap:2px;align-items:center;width:100%;height:22px;padding:0;}
body.studio-refined.read-layout #castList .readSettingValue {position:static!important;transform:none!important;display:grid;place-items:center;box-sizing:border-box;min-width:0;width:28px;height:22px;font:550 11px/1 var(--sans);}
body.studio-refined.read-layout #castList .readInlineSlider input {box-sizing:border-box;width:100%;height:18px;min-width:0;margin:0;padding:0;}

body.studio-refined.read-layout :is(#cueContinue,#readCueReveal,#readReveal,#readNextCue) {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:0;height:28px;margin:0;padding:0 9px;border-radius:5px;font:550 11px/18px var(--sans);}
body.studio-refined.read-layout .readCueTransport {display:flex;align-items:center;gap:8px;}
body.studio-refined.read-layout #readRehearsalTools {border-top:0;margin-top:0;padding-top:0;padding-bottom:8px;border-bottom:1px solid var(--line);}
body.read-layout #readReveal[hidden] {display:none!important;}
body.read-layout #readRehearsalTools .readCueActions {gap:4px;}
body.studio-refined.read-layout #readRehearsalTools #readNextCue {gap:8px;}
body.read-layout #readNextCue .readCueJumpIcon {display:block;flex:none;width:14px;height:14px;fill:none;stroke:var(--icon-mint);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
body.studio-refined.read-layout #cueBar .cueLine {font-size:18px;line-height:1.55;max-height:min(28vh,180px);}
body.studio-refined.read-layout #cueBar :is(#cueContinue,#readCueReveal),body.studio-refined.read-layout #readRehearsalTools :is(#readReveal,#readNextCue,.readOptionButton) {box-sizing:border-box;min-height:0;height:28px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;font:550 11px/18px var(--sans);}

body.studio-refined.read-layout #script .item.now {border-left-color:transparent!important;outline:none!important;box-shadow:none!important;}
body.studio-refined :is(.writerNoteMarker,#script .inlineNoteMarker) {box-sizing:border-box;width:18px!important;height:16px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:2px!important;background:#e9c95e!important;box-shadow:0 1px 0 #0003!important;}
body.studio-refined :is(.writerNoteMarker,#script .inlineNoteMarker)::after {content:'';position:absolute;right:0;bottom:0;border:4px solid transparent;border-right-color:#c9a843;border-bottom-color:#c9a843;}
body.studio-refined :is(.writerNoteMarker,#script .inlineNoteMarker)>svg {display:none;}

/* Keep the same quiet transport surface during workspace transitions. */
body.studio-refined #readerBar #controls .btns>#playBtn {background:color-mix(in srgb,var(--icon-mint) 10%,var(--surface-2));color:var(--text);}
/* The native select stays transparent even while this toolbar is hidden. */
@media screen {
 body.studio-refined #readerBar #readerTextZoom {box-sizing:border-box;display:flex;align-items:center;gap:2px;flex:none;height:28px;margin:0;padding:2px;border:1px solid var(--line);border-radius:5px;background:var(--surface-0);}
 body.studio-refined #readerBar #readerTextZoom .workspaceReadZoomValue {position:relative;display:grid;place-items:center;flex:none;width:56px;height:22px;border-radius:3px;background:var(--surface-2);font:500 11px/18px var(--sans);}
 body.studio-refined #readerBar #readerTextZoom .workspaceReadZoomValue>select {position:absolute;inset:0;z-index:1;box-sizing:border-box;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;opacity:0!important;transition:none!important;cursor:pointer;}
}

body.studio-refined.read-layout #castList .readInlineSlider {gap:2px;}
body.studio-refined.read-layout #castList .readSettingValue {display:grid;grid-template-columns:minmax(0,1fr);justify-content:center;align-content:center;gap:0;}
.readSettingNumber {position:relative;top:1px;text-align:center;}
body.studio-refined.read-layout #castList .readInlineSlider input {appearance:none;width:calc(100% - 4px);height:14px;margin:0 4px 0 0;background:transparent;}
body.studio-refined.read-layout #castList .readInlineSlider input::-webkit-slider-runnable-track {height:2px;border:0;border-radius:2px;background:var(--line-strong);}
body.studio-refined.read-layout #castList .readInlineSlider input::-webkit-slider-thumb {appearance:none;width:14px;height:14px;margin-top:-6px;border:0;border-radius:50%;background:var(--icon-mint);box-shadow:none;}
body.studio-refined.read-layout #castList .readInlineSlider input::-moz-range-track {height:2px;border:0;border-radius:2px;background:var(--line-strong);}
body.studio-refined.read-layout #castList .readInlineSlider input::-moz-range-thumb {width:14px;height:14px;border:0;border-radius:50%;background:var(--icon-mint);}
body.studio-refined.read-layout #castList .readInlineSlider input:focus-visible::-webkit-slider-thumb {outline:1px solid var(--icon-mint);outline-offset:2px;}
body.studio-refined.read-layout #castList .readInlineSlider input:focus-visible::-moz-range-thumb {outline:1px solid var(--icon-mint);outline-offset:2px;}

/* Blank Reader projects use the same compact utility language as Writer. */
@media screen {
 body.studio-refined.project-empty-read #script .projectEmptyWorkspace {box-sizing:border-box;width:min(100%,440px);margin:clamp(24px,9vh,72px) auto;padding:16px;border:1px solid var(--writer-resting-border,var(--line));border-radius:8px;background:var(--surface-1);}
 body.studio-refined.project-empty-read .projectEmptyWorkspace>span {margin:0 0 8px;color:var(--icon-mint);font:550 11px/18px var(--sans);letter-spacing:0;text-transform:none;}
 body.studio-refined.project-empty-read .projectEmptyWorkspace h1 {margin:0 0 8px;font:550 18px/24px var(--sans);}
 body.studio-refined.project-empty-read .projectEmptyWorkspace p {margin:0;font:400 12px/20px var(--sans);}
 body.studio-refined.project-empty-read .projectEmptyWorkspace>div {align-items:center;gap:8px;margin-top:16px;}
 body.studio-refined.project-empty-read .projectEmptyWorkspace button {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:0;height:28px;margin:0;padding:0 9px;border:1px solid var(--writer-resting-border,var(--line));border-radius:5px;background:var(--surface-0);color:var(--text);font:550 11px/18px var(--sans);}
 body.studio-refined.project-empty-read .projectEmptyWorkspace button.primary {border-color:color-mix(in srgb,var(--icon-mint) 28%,var(--line));background:color-mix(in srgb,var(--icon-mint) 12%,var(--surface-2));color:var(--text);}
 body.studio-refined.project-empty-read .projectEmptyWorkspace button:hover {background:var(--surface-2);filter:none;}
 body.studio-refined.project-empty-read .projectEmptyWorkspace button.primary:hover {background:color-mix(in srgb,var(--icon-mint) 18%,var(--surface-2));}
}

body.studio-refined.read-layout #castSection .readVoiceField select {font:500 11px/18px var(--sans);text-align:center;text-align-last:center;color:var(--text);}
body.studio-refined.read-layout #castSection .readVoiceField option {font:500 11px/18px var(--sans);text-align:center;color:var(--text);background:var(--surface-0);}
#readRoleGuide blockquote {margin:10px 0;padding:0;max-height:180px;overflow:auto;font:400 17px/1.5 var(--script-font,"Courier Prime",monospace);color:var(--text);}

/* A rehearsal cue floats over the script, matching its preview instead of
   taking a full-width strip out of the reading area. */
#readRoleGuide.roleCueCard,body.studio-refined.read-layout #cueBar .roleCueCard {box-sizing:border-box;display:block;width:100%;max-height:calc(100dvh - 140px);overflow:auto;margin:0;padding:16px 18px;border:1px solid #dac084;border-radius:9px;background:linear-gradient(180deg,#2a2410,#211c0c);box-shadow:0 14px 40px #0006;color:var(--text);font:400 14px/1.6 var(--sans);}
#readRoleGuide.roleCueCard {width:min(420px,calc(100vw - var(--guide-rail) - 32px));}
#readRoleGuide:not([open]) {display:none!important;}
body.studio-refined.script-loaded.read-layout:not(.writer-mode):not(.production-mode):not(.splash-home) #cueBar {--guide-rail:var(--studio-side,304px);position:fixed;inset:auto auto 64px calc(var(--guide-rail) + (100vw - var(--guide-rail))/2);transform:translateX(-50%);display:block;width:min(420px,calc(100vw - var(--guide-rail) - 32px));max-width:none;margin:0;padding:0;z-index:30;}
body.studio-refined.read-layout.workspace-sidebar-hidden #cueBar {--guide-rail:0px;}
body.studio-refined.read-layout #cueBar .cueMeta {display:block;margin:0 0 10px;}
body.studio-refined.read-layout #cueBar .cueWho {display:block;color:#e1ca8e;font:600 17px/24px var(--sans);letter-spacing:0;}
body.studio-refined.read-layout #cueBar .cueLine {margin:10px 0;padding:0;max-height:180px;overflow:auto;font:400 17px/1.5 var(--script-font,"Courier Prime",monospace);color:var(--text);}
#readRoleGuide footer,body.studio-refined.read-layout #cueBar .readCueTransport {display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:14px 0 0;padding:10px 0 0;border-top:1px solid #dac08430;color:#c6b784;font:500 11px/18px var(--sans);}
#readRoleGuide footer>span,body.studio-refined.read-layout #cueBar .cueTag {flex:1;margin:0;padding:0;border:0;border-radius:0;background:none;color:#c6b784;font:500 11px/18px var(--sans);letter-spacing:0;text-transform:none;}
#readRoleGuide .roleCuePreviewFooter {min-height:28px;text-align:center;}
#readRoleGuide footer>button,body.studio-refined.read-layout #cueBar #cueContinue {box-sizing:border-box;display:grid;place-items:center;flex:0 0 28px;width:28px;min-width:28px;height:28px;min-height:0;margin:0;padding:0;border:1px solid #dac08450;border-radius:5px;background:#dac08414;color:#e1ca8e;cursor:pointer;}
#readRoleGuide footer>button svg,body.studio-refined.read-layout #cueBar #cueContinue svg {display:block;width:16px;height:16px;fill:currentColor;stroke:currentColor;stroke-width:1;}
body.studio-refined.read-layout #cueBar #readCueReveal {flex:none;min-width:0;width:auto;}
body.studio-refined.read-layout #cueBar #cueContinue {flex:0 0 auto;width:auto;min-width:0;padding:0 10px;border-color:#dac08470;background:#8c753c;color:#fff;font:600 12px/18px var(--sans);}
body.studio-refined.read-layout #cueBar #cueContinue .workspaceControlLabel {position:relative;top:var(--writer-label-offset);white-space:nowrap;}

/* Rehearsal cards borrow the voice controls' quiet mint accent. */
#readRoleGuide.roleCueCard,body.studio-refined.read-layout #cueBar .roleCueCard {border-color:#91b6a780;background:linear-gradient(180deg,#1f2723ed,#181e1ce8);-webkit-backdrop-filter:blur(12px) saturate(.8);backdrop-filter:blur(12px) saturate(.8);}
#readRoleGuide h2,body.studio-refined.read-layout #cueBar .cueWho {color:#bdd5ca;}
#readRoleGuide footer,body.studio-refined.read-layout #cueBar .readCueTransport {border-top-color:#a8c9bc30;}
#readRoleGuide footer>span {color:#b9c9c0;}
#readRoleGuide[data-empty-role="true"] h2 {display:flex;align-items:center;justify-content:center;min-height:44px;margin:0;text-align:center;font:600 19px/26px var(--sans);letter-spacing:-.2px;}
@supports not ((backdrop-filter:blur(12px)) or (-webkit-backdrop-filter:blur(12px))) {
  #readRoleGuide.roleCueCard,body.studio-refined.read-layout #cueBar .roleCueCard {background:linear-gradient(180deg,#1f2723,#181e1c);}
}

/* Narrow physical margins turn pages; text and note flags remain interactive. */
#readPacket .pkPageEdge{position:absolute;z-index:3;top:0;bottom:0;width:64px;height:auto;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#68716b;cursor:pointer;}
#readPacket .pkPreviousPage{left:0;}
#readPacket .pkNextPage{right:0;}
#readPacket .pkPageEdge svg{position:absolute;top:var(--page-edge-y,50%);left:50%;width:18px;height:18px;transform:translate(-50%,-50%);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .18s;}
#readPacket .pkPageEdge:enabled:hover svg,#readPacket .pkPageEdge:focus-visible svg{opacity:.75;}
#readPacket .pkPreviousPage:enabled:hover{background:linear-gradient(90deg,#35453d0a,transparent);}
#readPacket .pkNextPage:enabled:hover{background:linear-gradient(-90deg,#35453d0a,transparent);}
#readPacket .pkPageEdge:focus-visible{outline:2px solid #749387;outline-offset:-4px;}
#readPacket .pkPageEdge:disabled{cursor:default;}
#readPacket .pkNoteTab{z-index:4;}

/* Voice and rehearsal lists share the selected label's actual font and center. */
body.studio-refined.read-layout #castSection .readVoiceField select[hidden] {display:none!important;}
body.studio-refined.read-layout #castSection .readVoiceField>.readVoiceTrigger {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;min-height:0;margin:0;padding:0 8px;border:0;border-radius:inherit;background:transparent;color:inherit;font:inherit;cursor:pointer;box-shadow:none;}
body.studio-refined.read-layout #castSection .readVoiceTrigger>.workspaceControlLabel {position:relative;top:var(--writer-label-offset);min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center;}
body.studio-refined.read-layout #castSection .readVoiceTrigger:focus-visible {outline:0;}
body.studio-refined.read-layout #castSection .readVoiceField:has([aria-expanded="true"]) {border-color:var(--icon-mint);}
.readVoiceMenu {position:fixed;z-index:1200;box-sizing:border-box;width:max-content;max-width:calc(100vw - 16px);margin:0;padding:3px;border:1px solid var(--writer-resting-border,var(--line));border-radius:6px;background:var(--surface-0);color:var(--text);box-shadow:0 8px 24px #0005;font:500 11px/18px var(--sans);}
.readVoiceOptions {position:relative;max-height:224px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable both-edges;}
.readVoiceOptions>[role="option"] {box-sizing:border-box;display:flex;align-items:center;justify-content:center;height:28px;min-height:28px;margin:0;padding:0 8px;border:1px solid transparent;border-radius:3px;background:transparent;font:inherit;color:inherit;cursor:pointer;text-align:center;}
.readVoiceOptions>[role="option"]>.workspaceControlLabel {position:relative;top:var(--writer-label-offset,-1px);min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.readVoiceOptions>[role="option"][aria-selected="true"] {background:color-mix(in srgb,var(--icon-mint) 9%,var(--surface-0));}
.readVoiceOptions>[role="option"].is-active {border-color:color-mix(in srgb,var(--icon-mint) 32%,transparent);background:color-mix(in srgb,var(--icon-mint) 16%,var(--surface-0));}
