/* Reviewed creation pages; generated and uploaded media keep their colours. */
html[data-wwx-appearance]{--ux-paper:#f7f8fa;--ux-surface:#fff;--ux-raised:#f0f2f5;--ux-ink:#25282d;--ux-muted:#616976;--ux-line:#dce1e8;--ux-accent:#426a82;--ux-focus:#416d8b;--ux-hover:#edf2f6;--ux-shadow:0 18px 64px #13223324}
.wwx-motion-target{transition:transform 150ms cubic-bezier(.2,.7,.2,1),background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease}
.wwx-motion-ripple-layer{position:fixed;z-index:1000;overflow:hidden;pointer-events:none;contain:paint}
.wwx-motion-ripple-layer.wwx-motion-ripple-in-dialog{position:absolute}
.wwx-motion-ripple{position:absolute;width:10px;height:10px;border-radius:50%;pointer-events:none;background:color-mix(in srgb,var(--ux-focus) 16%,transparent);transform:translate(-50%,-50%) scale(0);animation:wwx-ripple 420ms cubic-bezier(.2,.7,.2,1) forwards}
@keyframes wwx-ripple{to{transform:translate(-50%,-50%) scale(var(--wwx-ripple-scale,14));opacity:0}}
.wwx-motion-ready .wwx-page-enter-target{animation:wwx-page-enter 260ms cubic-bezier(.2,.7,.2,1) backwards}
@keyframes wwx-page-enter{from{opacity:.72;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.wwx-motion-dialog[open]{animation:wwx-dialog-enter 180ms cubic-bezier(.2,.7,.2,1) both!important}
@keyframes wwx-dialog-enter{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
.video-generation-page .generation-settings:popover-open{transform-origin:bottom left;animation:wwx-popover-enter 170ms cubic-bezier(.2,.7,.2,1) both}
.video-generation-page #model-menu:not([hidden]){transform-origin:top left;animation:wwx-menu-enter 140ms cubic-bezier(.2,.7,.2,1) both}
@keyframes wwx-popover-enter{from{opacity:0}to{opacity:1}}
@keyframes wwx-menu-enter{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.wwx-motion-details.wwx-details-revealing>:not(summary){animation:wwx-details-enter 220ms cubic-bezier(.2,.7,.2,1) both}
@keyframes wwx-details-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(hover:hover) and (pointer:fine){.wwx-motion-target:hover:not(:disabled):not([aria-disabled=true]){transform:translateY(-1px)}.wwx-motion-target:active:not(:disabled):not([aria-disabled=true]){transform:translateY(0) scale(.985)}}
.wwx-experience-controls{display:flex;align-items:center;gap:8px;flex:none;margin-left:auto;order:4}
.wwx-experience-controls button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;width:auto;margin:0;padding:7px 10px;border:1px solid var(--ux-line);border-radius:9px;background:var(--ux-surface);color:var(--ux-ink);font:inherit;font-size:12px;line-height:1.4;cursor:pointer;white-space:nowrap}
.wwx-experience-controls svg{width:17px;height:17px;flex:none}
.wwx-experience-controls .wwx-theme-toggle{width:36px;height:36px;min-height:36px;padding:0;border-radius:50%}
.wwx-theme-symbol{display:block;font-family:system-ui,sans-serif;font-size:20px;line-height:1}
.wwx-find-button kbd{font:inherit;font-size:11px;color:var(--ux-muted);padding-left:4px;border-left:1px solid var(--ux-line)}
.wwx-experience-controls button:hover{background:var(--ux-hover);border-color:var(--ux-focus)}
.wwx-experience-controls button:focus-visible,.wwx-function-dialog :focus-visible{outline:2px solid var(--ux-focus)!important;outline-offset:3px}
.wwx-function-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 48px);margin:clamp(24px,12vh,120px) auto auto;padding:24px;border:1px solid var(--ux-line);border-radius:20px;background:var(--ux-surface);color:var(--ux-ink);box-shadow:var(--ux-shadow);overflow:auto;overscroll-behavior:contain;font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif}
.wwx-function-dialog::backdrop{background:#10182066;backdrop-filter:blur(4px)}
.wwx-find-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.wwx-find-heading h2{margin:0;font-size:20px;line-height:1.5;color:var(--ux-ink)}
.wwx-function-dialog .wwx-find-close{border:0;width:36px;height:36px;min-height:36px;background:var(--ux-raised);color:var(--ux-ink);border-radius:50%;font-size:22px;cursor:pointer;padding:0}
.wwx-find-label{display:block;font-size:13px;color:var(--ux-muted);margin-bottom:8px}
.wwx-function-dialog input{box-sizing:border-box;width:100%;height:48px;padding:12px 14px;border:1px solid var(--ux-line);border-radius:10px;background:var(--ux-paper);color:var(--ux-ink);font:inherit;font-size:16px;margin:0}.wwx-function-dialog input::placeholder{color:var(--ux-muted)}
.wwx-find-results{display:grid;gap:3px;margin:12px 0;max-height:360px;overflow:auto;overscroll-behavior:contain}.wwx-find-results a{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;padding:10px 12px;border-radius:8px;color:var(--ux-ink);font-size:14px;text-decoration:none}.wwx-find-results a>span:last-child{color:var(--ux-muted)}.wwx-find-results a:hover,.wwx-find-results a.is-active{background:var(--ux-hover)}
.wwx-find-count{min-height:20px;margin:10px 0;color:var(--ux-muted);font-size:12px;line-height:1.6}.wwx-find-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px;border-top:1px solid var(--ux-line);color:var(--ux-muted);font-size:11px;line-height:1.5;flex-wrap:wrap}.wwx-find-footer button{min-height:36px;padding:7px 10px;border:1px solid var(--ux-line);border-radius:7px;background:var(--ux-surface);color:var(--ux-ink);font:inherit;cursor:pointer}.wwx-find-footer button[aria-pressed=true]{background:var(--ux-raised)}
html.wwx-theme-transition::view-transition-old(root),html.wwx-theme-transition::view-transition-new(root){animation:none;mix-blend-mode:normal}html.wwx-theme-transition::view-transition-old(root){z-index:1}html.wwx-theme-transition::view-transition-new(root){z-index:2}html.wwx-theme-transition::view-transition-group(root){animation:none}
@media(hover:hover) and (pointer:fine){[data-wwx-appearance] :is(.ws-tool,.ws-journey-link,.method-card,.prompt-suggestions button,.starters button){transition:background 160ms ease,border-color 160ms ease,box-shadow 160ms ease}[data-wwx-appearance] :is(.ws-journey-link,.method-card,.prompt-suggestions button,.starters button):hover{border-color:var(--ux-focus);box-shadow:0 0 0 1px color-mix(in srgb,var(--ux-focus) 16%,transparent)}[data-wwx-appearance] [data-shared-workspace-nav] a[aria-current=page]{box-shadow:inset 3px 0 var(--ux-accent)}}
@media(max-width:1200px){.wwx-find-button kbd{display:none}.wwx-experience-controls{gap:6px}.wwx-experience-controls .wwx-find-button>span{display:none}}
@media(max-width:680px){.wwx-experience-controls{gap:5px;margin-left:0}.wwx-experience-controls button{min-width:36px;min-height:44px;padding:7px}.wwx-experience-controls .wwx-theme-toggle{width:36px;height:44px;min-height:44px}.wwx-find-button>span,.wwx-find-button kbd{display:none!important}.wwx-function-dialog{padding:20px;width:calc(100vw - 24px);max-height:calc(100dvh - 32px);margin-top:16px;border-radius:16px}.wwx-find-results{max-height:45dvh}.wwx-find-close,.wwx-find-footer button{min-height:44px!important}.wwx-find-footer{font-size:12px}.wwx-find-heading h2{font-size:18px}.ws-header-actions{gap:8px!important}.ws-header-help{display:none!important}.studio-header{gap:6px}.studio-header .studio-site-home{padding-inline:7px}}
@media(prefers-reduced-motion:reduce){.wwx-motion-target{transition:none!important;transform:none!important}.wwx-motion-ripple-layer,.wwx-motion-ripple{display:none!important;animation:none!important}.wwx-motion-ready .wwx-page-enter-target,.wwx-motion-dialog[open],.video-generation-page .generation-settings:popover-open,.video-generation-page #model-menu:not([hidden]),.wwx-motion-details.wwx-details-revealing>:not(summary){animation:none!important;transform:none!important;opacity:1!important}.wwx-experience-controls *, .wwx-function-dialog *, .ws-journey-link{transition:none!important;animation:none!important}html.wwx-theme-transition::view-transition-group(root){animation:none}}
@media(max-width:979px){html[data-wwx-appearance] .studio-page[data-shared-navigation] .studio-shell{grid-template-columns:minmax(0,1fr)!important}html[data-wwx-appearance] .studio-page[data-shared-navigation] .unified-workspace-sidebar{width:100%;height:auto;max-height:none;position:relative;top:auto;display:flex;padding:8px 12px;border-right:0;border-bottom:1px solid var(--ux-line)}html[data-wwx-appearance] .studio-page.workspace-nav-collapsed .unified-workspace-sidebar :is(.ws-sidebar-top,.ws-navigation,.ws-sidebar-bottom){display:none}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-sidebar-toggle{min-height:44px;width:auto;max-width:100%}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-navigation{display:flex;flex-direction:column;max-height:48dvh;overflow:auto}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-navigation a{width:auto;height:auto;min-height:44px;display:flex;align-items:center;flex-direction:row;justify-content:flex-start;padding:9px 12px;gap:10px}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-navigation a>span{width:auto}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-nav-group{display:block;width:100%}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-nav-group:not([open])>.ws-nav-children{display:none}}
@media(min-width:1201px){.site-header:has(.header-actions)>.wwx-experience-controls{grid-column:3;grid-row:1}.site-header:has(.header-actions){padding-bottom:12px}.site-header:has(.header-actions) .header-actions{padding-right:180px}}
@media(max-width:979px){html[data-wwx-appearance] .studio-page[data-shared-navigation] .unified-workspace-sidebar{flex-direction:column!important;align-items:stretch;gap:12px;min-height:0!important;flex:none!important}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-navigation{width:100%;min-width:0;flex:none!important}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-sidebar-top{width:100%;white-space:nowrap}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-sidebar-bottom{flex:none;margin-top:0}html[data-wwx-appearance] .studio-page .unified-workspace-sidebar .ws-sidebar-toggle{flex:none;align-self:stretch}html[data-wwx-appearance] .studio-header .avatar-button{white-space:nowrap;width:auto;min-width:44px;padding:4px 10px;height:36px}html[data-wwx-appearance] .studio-header .studio-site-home{margin-left:auto}}
@media(max-width:720px){.cv-header{display:flex;gap:8px!important;flex-wrap:nowrap;justify-content:flex-start}.cv-header .wwx-site-brand{flex:1;min-width:0}.cv-header #cv-account{white-space:nowrap;flex:none;margin-left:auto}.cv-header .wwx-brand-copy small{display:none}.cv-header .wwx-brand-copy strong{font-size:13px}.cv-header .wwx-site-brand{gap:6px}.cv-header .wwx-site-brand img{width:26px;height:26px}.cv-header .wwx-experience-controls{margin-left:0}}
@media(max-width:720px){.cv-header{position:sticky;top:0;z-index:40}.wwx-experience-controls .wwx-theme-toggle{width:44px}.wwx-experience-controls .wwx-find-button{min-width:44px}}
@media(max-width:400px){html[data-wwx-appearance] .studio-header .studio-site-home{display:none}html[data-wwx-appearance] .studio-header .sidebar-account{margin-left:auto;gap:6px}.studio-header{gap:6px!important}.cv-header .wwx-brand-copy strong{font-size:12px}.cv-header #cv-account{font-size:12px}}
html[data-wwx-appearance] .studio-header .avatar-button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;min-width:44px;width:auto;max-width:none;flex:none;padding:4px 10px;line-height:1.4;height:36px}
@media(max-width:979px){html[data-wwx-appearance] .studio-header .sidebar-account{position:static!important;inset:auto!important;transform:none!important;z-index:auto!important;flex:none!important;display:flex!important;order:2;margin:0 0 0 auto!important;padding:0!important}.studio-header .wwx-experience-controls{margin-left:0}}

/* Dark appearance: neutral surfaces, quiet structural lines, clear control states.
   Page media and preview hit areas retain their original colours and transparency. */
html[data-wwx-appearance="dark"] {
  color-scheme: dark !important;
  background: #181a1c;
  color: #e1e4e6;
  --ux-paper: #181a1c;
  --ux-surface: #202326;
  --ux-inset: #1b1e20;
  --ux-raised: #282b2e;
  --ux-ink: #e1e4e6;
  --ux-muted: #a2a9b0;
  --ux-line: #2b3034;
  --ux-control-line: #383e43;
  --ux-accent: #b2c4cc;
  --ux-focus: #94adb9;
  --ux-hover: #282d31;
  --ux-selected: #2b373d;
  --ux-selected-line: #536b75;
  --ux-primary: #bdcbd1;
  --ux-shadow: 0 16px 48px #0005;
  --ink: var(--ux-ink); --text: var(--ux-ink); --body: var(--ux-muted);
  --muted: var(--ux-muted); --line: var(--ux-line); --line-dark: var(--ux-line);
  --silver: var(--ux-raised); --surface: var(--ux-surface); --panel: var(--ux-surface);
  --bg: var(--ux-paper); --accent: var(--ux-accent); --focus: var(--ux-focus);
  --ws-ink: var(--ux-ink); --ws-muted: var(--ux-muted); --ws-line: var(--ux-line); --ws-paper: var(--ux-paper);
  --sc-bg: var(--ux-paper); --sc-text: var(--ux-ink); --sc-muted: var(--ux-muted); --sc-line: var(--ux-line);
  --select-surface: var(--ux-inset); --select-ink: var(--ux-ink); --select-line: var(--ux-control-line);
  --select-muted: var(--ux-muted); --select-hover: var(--ux-hover); --select-selected: var(--ux-selected);
  --error: #ffb8c2;
  --chat-line: var(--ux-line);
}
html[data-wwx-appearance="dark"] body { background: var(--ux-paper) !important; color: var(--ux-ink); }
/* Keep page chrome on the canvas; reserve raised surfaces for useful groups. */
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.site-header,.account-header,.chat-header,.tts-header,.cv-header,.ws-header,.studio-header,.daily-header,.zj-header) { background: var(--ux-paper) !important; border-color: var(--ux-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.site-header,.account-header,.chat-header,.tts-header,.cv-header,.ws-header,.studio-header,.daily-header,.zj-header) :is(a,button) { color: var(--ux-muted); }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.site-header,.account-header,.chat-header,.tts-header,.cv-header,.ws-header,.studio-header,.daily-header,.zj-header) :is(a:hover,button:hover) { color: var(--ux-ink); }
/* Outer layouts use the canvas; only meaningful panels get a separate surface. */
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .studio-shell,.studio-workspace,.workspace,.workspace-main,.workspace-grid,.workbench,
  .chat-scroll,.chat-messages,.messages,.ws-main,.tts-layout,.chat-shell,.studio-body,.stage,
  .cinematic-hero,.cinematic-stage,.page-main,.recharge-main,.pricing-section,.examples-section,
  .input-section,.site-footer,.information-main,.studio-main,.image-workspace,.chat-workspace,
  .tasks-workspace,.tasks-columns,.tasks-kinds
) { background: var(--ux-paper) !important; color: var(--ux-ink); }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .ws-header,.site-header,.studio-header,.chat-header,.tts-header,.cv-header,.account-header,
  .ws-sidebar,.unified-workspace-sidebar,.studio-sidebar,.sidebar-account,
  .studio-chat,.studio-preview,.studio-queue,.chat-panel,.chat-main,.chat-history-panel,.chat-title,
  .chat-history-content,.composer-wrap,.composer,.material-composer,.creator-input,.creator-panel,
  .panel,.draft-panel,.ws-task-row,.ws-welcome,.ws-task-cover,.ws-account-panel,.ws-tool,
  .ws-sidebar-toggle,.ws-sidebar-top,.tts-editor,.tts-setup,.tts-history,.tts-library,.tts-detail,
  .tts-text-space,.tts-price-panel,.tts-selected-voice,.tts-result-empty,.dy-input-panel,.dy-records,
  .dv-panel,.dt-panel,.sc-panel,.va-panel,.cv-panel,.cv-main,.cv-sidebar,.account-card,.account-main,
  .account-panel,.login-card,.recharge-card,.pricing-estimator,.pricing-table-wrap,.pricing-results,
  .pricing-hero,.guide-section,.price-card,.task-card,.task-row,.materials-panel,.material-card,
  .material-library-panel,.video-generation-preview,.generation-preview,.video-segment-workspace,
  .vs-segment,.vs-edit-field,.director-dock,.video-parameters,.creator-settings,.studio-chat-heading,
  .scene-heading,.scene-selector,.director-center-panel,.director-plan-panel,.video-reference-preview,
  .preview-header,.preview-heading,.image-composer,.image-preview,.image-input-panel,.image-queue,
  .creation-panel,.input-panel,.preview-panel,.ls-records-panel,.ls-history,.image-result,.ws-empty,
  .va-source,.va-transcript,.va-analysis,.sr-options,.sr-source-section,.sr-source-records,
  .availability-list,.price-estimator,.pricing-inputs,.pricing-output,.video-config-column,
  .video-task-panel,.video-queue-panel,.queue-panel,.director-panel-top,.director-action-dock,
  .draft-material-save,.draft-material-save-panel,.scene-picker-card,.image-model,.image-settings>summary,
  .ls-layout-voice-entry,.dy-source-panel,.account-session-notice,.video-queue,.queue-header,.queue-empty,
  .queue-pane,.chat-material-save,.director-preview-panel,.ls-panel,.ls-source-panel,.test-ribbon,
  .homepage-film-stage,.homepage-film-viewport,.reference-sample-side,.reference-sample-frame,
  .image-editor,.image-queue-heading,.sr-stage,.calculator-output,.cv-status
) { background: var(--ux-surface) !important; color: var(--ux-ink); border-color: var(--ux-line) !important; box-shadow: none; }
/* Popups sit above the canvas; their shadows provide depth without bright outlines. */
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  dialog,.generation-settings,.image-settings-panel,.settings-panel,.project-settings-panel,
  .creator-settings,.model-menu,.personal-menu,.profile-popover,.nav-more-panel,.homepage-menu,
  .media-modal,.upload-modal,.scene-options
) { background: var(--ux-surface) !important; color: var(--ux-ink); border-color: var(--ux-control-line) !important; box-shadow: var(--ux-shadow); }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .ws-nav-children,.ws-sidebar-bottom,.ws-footer,.preview-heading,.chat-heading,.conversation-heading,
  .composer-bottom,.director-dock,.tts-section-heading,.tts-result-tabs,.tts-steps,.ws-section-heading,
  .pricing-table th,.pricing-table td,.preview-tabs,.image-setting-group,.setting-options,
  .settings-price-note,.scene-tabs,.personal-identity,.ls-layout-tabs,.tasks-kinds,hr
) { border-color: var(--ux-line) !important; }
/* Supporting empty states blend into their parent instead of adding a second rectangle. */
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .chat-welcome,.director-plan-empty,.director-empty,.result-preview-empty,.image-empty,
  .preview-empty,.ws-journeys,.ws-section-heading,.ws-account-panel,.scene-picker-card:not([open])
) { background: transparent !important; color: var(--ux-ink); border-color: var(--ux-line) !important; box-shadow: none; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .ws-welcome-art,.homepage-sample-cover,.ws-cover-fallback,.ws-cover-fallback .ws-task-icon,.attachment-tile,.image-tile,.audio-tile,
  .ws-cover-source,.ws-cover-status,.ws-cover-arrow,.ws-task-icon,.ws-avatar,.avatar-button,
  .ws-badge,.sample-badge,.ls-step,.director-mark,.scene-current-icon,.model-mark,.upload-icon,
  .queue-icon,.chat-welcome-icon,.image-draft-visual,.dy-output-icon,.va-state,.step-dot,.tasks-empty>i,.director-flow article,.pricing-option,.login-showcase,.cinematic-copy,
  .ws-draft-note,.notice,.tts-pending,.notice-banner,.guide-note,.reference-note,.dy-workflow span
) { background: var(--ux-raised) !important; color: var(--ux-muted); border-color: var(--ux-line) !important; box-shadow: none; }
/* Text overrides are kept separate from surfaces so nested copy remains legible. */
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  h1,h2,h3,h4,label,legend,strong,summary,.wwx-site-brand,.wwx-brand-copy strong,.brand b,.brand strong,
  .scene-title,.scene-name,.preview-title,.chat-current-title,.ws-breadcrumb [aria-current],
  .ws-account-caption,.ws-task-content h3,.ws-journey-link,.ws-empty strong,.ws-balance-number,
  .reference-preview-title,.scene-selector strong,.queue-header h2,.scene-heading strong,
  .chat-header a,.voice-create-link,.calculator-title
) { color: var(--ux-ink) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  p,small,.field-hint,.hint,.description,.ws-muted,.ws-task-meta,.ws-task-hint,.ws-task-number,.ws-footer,
  .ws-nav-caption,.ws-breadcrumb,.wwx-brand-copy small,.brand small,.attachment-label,.points-pending,
  .chat-composer-foot,.composer-help,.message-state,.chat-history-footnote,.word-count,.tts-editor-tip,
  .tts-draft-bar,.tts-price-summary,.tts-playback-note,.range-labels,.ws-account-expand,.scene-description,
  .generation-note,.video-status-note,.ws-copy,.creator-settings-summary,.settings-summary,
  .preview-header span,.generation-cost,.draft-material-save span,.draft-material-save-panel span,
  .chat-material-save span,.image-editor span,.image-control-row span,.image-queue-heading span,
  .ls-layout-subtitle,.submit-note,.settings-chevron,.dy-steps li,.dy-steps span,.dy-source-heading span,
  .calculator-output span,.calculator-heading span,.ml-draft-save span,.dy-input-heading span,
  .dy-workflow li,.pricing-lead span,.model-hint,.model-soon,.range-bounds,.settings-section-label,
  .image-draft-details time,.method-card em,.scene-toggle-label,.director-flow span,.scene-options-heading span,.image-task-list time
),html[data-wwx-appearance="dark"][data-wwx-appearance] :where(
  #workspace-balance-summary,#preview-settings-summary,#vt-status,#text-count,#image-text-count,
  #image-count,#dy-availability,#dv-availability,#dt-availability,#tts-status
) { color: var(--ux-muted) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .information-main a,.pricing-section a,.pricing-note a,.site-update-guide a
),html[data-wwx-appearance="dark"][data-wwx-appearance] #tts-login { color: var(--ux-accent) !important; }
/* Fields and buttons: control edges are firmer than structural dividers. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(input,textarea,select) {
  background: var(--ux-inset) !important; color: var(--ux-ink) !important;
  border-color: var(--ux-control-line) !important; accent-color: var(--ux-accent);
}
/* Login and account colors that were baked into the light form stylesheet. */
html[data-wwx-appearance="dark"][data-wwx-appearance] .creation-sheet { background: var(--ux-surface) !important; background-image: none !important; border-color: var(--ux-line) !important; box-shadow: 0 10px 28px #0002; color: var(--ux-ink); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .creation-sheet :is(.sheet-heading,.workflow strong) { color: var(--ux-ink) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .creation-sheet :is(.sheet-caption,.sheet-footnote,.workflow p) { color: var(--ux-muted) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .creation-sheet :is(.step-dot) { background: var(--ux-raised) !important; border-color: var(--ux-line) !important; color: var(--ux-accent) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .creation-sheet .workflow li::after { background: var(--ux-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .creation-sheet .sheet-footnote { border-color: var(--ux-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) { background: transparent !important; box-shadow: none !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) #login-view { color: var(--ux-ink); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) :is(.field-hint,.login-switches,.remember-label) { color: var(--ux-muted) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) input:not([type=checkbox]) { background: var(--ux-inset) !important; border-color: var(--ux-control-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) .phone-field { border-color: var(--ux-control-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) .login-methods { border-color: var(--ux-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .account-panel:has(#login-view:not([hidden])) .login-methods button[aria-pressed=true] { color: var(--ux-ink) !important; border-bottom-color: var(--ux-accent) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] footer { border-color: var(--ux-line) !important; color: var(--ux-muted) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(input,textarea)::placeholder { color: var(--ux-muted) !important; opacity: 1; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.material-composer,.image-composer) textarea { background: transparent !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  button,.button,.ws-button,.secondary,.text-button,.tts-text-button,.chat-layout-button,.ws-text-link,
  .ws-refresh,.sidebar-balance,.profile-toggle,.site-nav a,.ws-navigation a,.ws-navigation summary,
  .ws-sidebar-bottom a,.studio-site-home,.ws-journey-link,.dy-source-actions a,.model-picker,.ws-secondary,.button-light,.prompt-suggestions button,.starters button,.method-card
),html[data-wwx-appearance="dark"][data-wwx-appearance] :where(#dy-local-video,#dy-saved-videos) {
  background: var(--ux-surface) !important; color: var(--ux-ink) !important;
  border-color: var(--ux-control-line) !important; box-shadow: none;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.ws-journey-link,.method-card) { border-color: var(--ux-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.material-upload-grid button,.upload-area) {
  background: var(--ux-inset) !important; color: var(--ux-ink); border-color: var(--ux-control-line) !important;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .settings-trigger,.panel-help,.text-button,.tts-text-button,.ws-text-link,.ws-refresh,
  .personal-menu button,.personal-menu a,.profile-popover a,.model-option,.scene-tabs button,
  .ls-preview-tabs button,.ls-generation-modes button,.ls-audio-tabs button,.preview-tabs button,
  .tts-result-tabs button,.task-filter button,.tasks-kinds button,.login-methods button,.tts-voice-filters button,.va-result-tabs button
) { background: transparent !important; color: var(--ux-muted) !important; border-color: transparent !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.ls-audio-tabs,.ls-preview-tabs,.ls-generation-modes) {
  background: var(--ux-inset) !important; border-color: var(--ux-line) !important;
}
/* Every radio choice has an unselected, selected and keyboard-focus appearance. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(.image-option-grid,.language-options) label>span {
  background: var(--ux-raised) !important; color: var(--ux-muted) !important;
  border: 1px solid transparent; box-shadow: none;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(.image-option-grid,.language-options) input:checked+span {
  background: var(--ux-selected) !important; color: var(--ux-ink) !important;
  border-color: var(--ux-selected-line) !important;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(.image-option-grid,.language-options) input:focus-visible+span {
  outline: 2px solid var(--ux-focus) !important; outline-offset: 2px;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .method-card.is-selected,.scene-tabs .is-active,.model-option.current,
  .ls-generation-modes [aria-selected=true],.ls-generation-modes .is-active,
  .ls-preview-tabs [aria-selected=true],.ls-preview-tabs .is-active,
  .preview-tabs [aria-selected=true],.preview-tabs .is-active,
  .tts-result-tabs [aria-selected=true],.task-filter .is-active,
  .image-draft-select[aria-pressed=true],.tasks-kinds [aria-pressed=true],.login-methods [aria-pressed=true],
  .tts-voice-filters [aria-pressed=true],.va-result-tabs [aria-selected=true],
  .site-nav [aria-current=page],.site-nav>.nav-more>.nav-more-trigger[data-current=true],
  .chat-history-item[aria-current=true],.conversation-item[aria-current=true]
) { background: var(--ux-selected) !important; color: var(--ux-ink) !important; border-color: var(--ux-selected-line) !important; box-shadow: none; }
/* Preserve the existing moving indicator for text/audio tabs without its white flash. */
html[data-wwx-appearance="dark"][data-wwx-appearance] .ls-audio-tabs::before {
  background: var(--ux-selected) !important; box-shadow: inset 0 0 0 1px var(--ux-selected-line);
}
html[data-wwx-appearance="dark"][data-wwx-appearance] .ls-audio-tabs button.is-active { color: var(--ux-ink) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .method-card.is-selected::before { border-color: var(--ux-selected-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .method-card.is-selected::after { background: var(--ux-accent); color: var(--ux-inset); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .method-card>span {
  background: var(--ux-raised) !important; color: var(--ux-muted) !important; border-color: var(--ux-line) !important;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] .method-card.is-selected>span { background: var(--ux-selected) !important; color: var(--ux-accent) !important; }
/* Primary actions stay recognisable; disabled actions use a quiet neutral treatment. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .ws-primary,.ws-button.ws-primary,.button-dark,.primary,.tts-primary,.login-submit,.recharge-submit,.generation-primary,
  .apply-script-button,.director-dock-primary,.generate-button,.director-submit
),html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(#send,#director-apply-script,#image-generate) {
  background: var(--ux-primary) !important; color: #182630 !important; border-color: var(--ux-primary) !important; box-shadow: none;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.generate-button,.tts-primary) :is(span,strong,[data-ui-icon]) { color: inherit !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(button,input,textarea,select,.button):disabled {
  background: var(--ux-raised) !important; color: #919aa6 !important; border-color: var(--ux-line) !important; opacity: .65;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] [data-shared-workspace-nav] :is(a,summary) { background: transparent !important; color: var(--ux-muted) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] [data-shared-workspace-nav] :is(a[aria-current=page],.ws-nav-current-group>summary) {
  background: var(--ux-hover) !important; color: var(--ux-ink) !important;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] .workspace-column-separator { background: transparent !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .workspace-column-separator::before { background: var(--ux-line); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .workspace-column-separator::after { background: #5c6974; border-color: #5c6974; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.brand,.wwx-site-brand)>img,
html[data-wwx-appearance="dark"][data-wwx-appearance] .brand-mark>img { background: #fff !important; padding: 2px; border-radius: 5px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .brand-mark { background: transparent !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .image-settings .ui-icon circle { fill: var(--ux-surface); }
/* Feedback colours are calm but still distinguish errors from normal status. */
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.cv-error,.cv-status.cv-error,.ws-notice.is-error) {
  background: #2d2227 !important; color: #ffb8c2 !important; border-color: #574049 !important;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.is-error,.error-message,.error,.tts-region-error,[data-error=true]),
html[data-wwx-appearance="dark"][data-wwx-appearance] #tts-status[data-error] { color: #ffb8c2 !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.is-completed,.is-active-status,.success-message) { color: #a9d9c0; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .ws-notice p { color: var(--ux-muted) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] :focus-visible { outline: 2px solid var(--ux-focus) !important; outline-offset: 2px; }
@media (hover:hover) and (pointer:fine) {
  html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
    .ws-journey-link,.method-card,.prompt-suggestions button,.starters button,.wwx-experience-controls button,
    .personal-menu button,.personal-menu a,.profile-popover a,.model-option,.scene-tabs button,
    .ls-audio-tabs button,.ls-preview-tabs button,.ls-generation-modes button,.preview-tabs button,
    .ws-secondary,.ws-refresh,.ws-text-link
  ):hover:not(:disabled) { background: var(--ux-hover) !important; border-color: var(--ux-control-line) !important; box-shadow: none; }
  html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
    .method-card.is-selected,.model-option.current,.ls-generation-modes .is-active,
    .ls-preview-tabs .is-active,.preview-tabs .is-active,.tts-result-tabs [aria-selected=true],
    .image-draft-select[aria-pressed=true],.tasks-kinds [aria-pressed=true],.tts-voice-filters [aria-pressed=true]
  ):hover:not(:disabled) { background: var(--ux-selected) !important; color: var(--ux-ink) !important; border-color: var(--ux-selected-line) !important; }
  html[data-wwx-appearance="dark"][data-wwx-appearance] [data-shared-workspace-nav] :is(a,summary):hover { background: var(--ux-hover) !important; color: var(--ux-ink) !important; }
  html[data-wwx-appearance="dark"][data-wwx-appearance] body select:hover:not(:disabled) { background: var(--ux-hover) !important; border-color: var(--ux-selected-line) !important; }
  html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.image-option-grid,.language-options) label:hover>span { border-color: var(--ux-control-line); }
  html[data-wwx-appearance="dark"][data-wwx-appearance] :is(.ws-primary,.button-dark,.tts-primary,.generate-button):hover:not(:disabled) { background: #d5e3eb !important; border-color: #d5e3eb !important; }
}
html[data-wwx-appearance="dark"][data-wwx-appearance] body select::picker(select) { background: var(--ux-surface) !important; color: var(--ux-ink) !important; }
/* The same palette on tutorials, libraries, tables and account pages. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body {
  --tasks-ink: var(--ux-ink); --tasks-muted: var(--ux-muted); --tasks-rule: var(--ux-line); --tasks-surface: var(--ux-raised);
  --tts-line: var(--ux-line); --tts-muted: var(--ux-muted); --tts-blue: var(--ux-accent); --tts-light: var(--ux-selected);
}
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .site-nav,.pl-filters,.tutorial-start a,.tutorial-brief,.billing-summary,.billing-feedback,
  .sr-status,.image-draft-visual small,.tasks-query-note,.tasks-notice
) { background: var(--ux-surface) !important; border-color: var(--ux-line) !important; color: var(--ux-muted); }
html[data-wwx-appearance="dark"][data-wwx-appearance] :is(
  .pl-header,.pl-footer,.pl-notice,.legacy-history-group,.chat-history-footnote,.dy-workflow li,
  .dy-form-actions,.va-upload,.va-source-bottom,.va-result-tabs,.va-help,.cv-heading,
  .guide-index,.guide-page>section,.homepage-samples,.guide-main section,.cost-calculator,.calculator-output p,.tutorial-start,
  .tutorial-basics,.tutorial-chapter-head,.tasks-workspace,.tasks-columns,.tasks-footer,
  .ml-toolbar,table,th,td,footer
) { border-color: var(--ux-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] th { background: var(--ux-raised) !important; color: var(--ux-muted); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .tasks-button { background: var(--ux-surface) !important; color: var(--ux-ink); border-color: var(--ux-control-line) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .queue-heading-label span { background: var(--ux-raised) !important; color: var(--ux-muted); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .sidebar-balance>span { background: transparent !important; color: var(--ux-ink); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .dy-fee-tag { background: #23382c; color: #b1d5ba; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .tts-steps li::before { background: var(--ux-raised) !important; color: var(--ux-muted); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .tts-steps li:first-child::before { background: var(--ux-selected) !important; color: var(--ux-accent); }
html[data-wwx-appearance="dark"][data-wwx-appearance] [data-shared-workspace-nav] a[aria-current=page] { box-shadow: inset 2px 0 var(--ux-selected-line); }
html[data-wwx-appearance="dark"][data-wwx-appearance] .scene-tabs button { background: transparent !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] .scene-tabs .is-active { border-bottom-color: var(--ux-accent) !important; }
/* Range tracks share the existing progress value and retain native keyboard behaviour. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body #video-duration {
  appearance: none; -webkit-appearance: none; background: transparent !important;
  accent-color: var(--ux-accent); border: 0;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] #video-duration::-webkit-slider-runnable-track {
  height: 5px; border-radius: 5px;
  background: linear-gradient(to right,var(--ux-accent) 0 var(--range-progress,20%),var(--ux-control-line) var(--range-progress,20%) 100%);
}
html[data-wwx-appearance="dark"][data-wwx-appearance] #video-duration::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4px;
  border: 2px solid var(--ux-accent); border-radius: 50%; background: var(--ux-surface);
}
html[data-wwx-appearance="dark"][data-wwx-appearance] #video-duration::-moz-range-track { height: 5px; background: var(--ux-control-line); border-radius: 5px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] #video-duration::-moz-range-progress { height: 5px; background: var(--ux-accent); border-radius: 5px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] #video-duration::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid var(--ux-accent); border-radius: 50%; background: var(--ux-surface); }
/* Disabled ID-based primary actions share the same disabled treatment. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(#send,#director-apply-script,#image-generate):disabled {
  background: var(--ux-raised) !important; color: #919aa6 !important; border-color: var(--ux-line) !important; opacity: .65;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] .image-queue-heading span { background: var(--ux-raised) !important; color: var(--ux-ink) !important; }
/* Transparent media hit areas must never be painted over by button rules. */
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .reference-sample-hit,.homepage-film-hit,.homepage-film-stage-hit,.image-example-hit,.attachment-view,.image-task-open
) { background: transparent !important; border-color: transparent !important; }

/* October 16 refinement: spacing defines groups; borders identify controls. */
html[data-wwx-appearance] { --ux-ease: cubic-bezier(.2,.7,.2,1); }
html[data-wwx-appearance] :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),textarea,select) {
  transition: border-color 160ms ease,background-color 160ms ease,box-shadow 160ms ease;
}
html[data-wwx-appearance] :is(button,a[href],summary,input,textarea,select,[role=button]):focus-visible {
  outline: 2px solid var(--ux-focus); outline-offset: 3px;
}
html[data-wwx-appearance] .ws-main { --ws-muted: var(--ux-muted); }
html[data-wwx-appearance] .ws-page-heading h1 { letter-spacing: -.5px; line-height: 1.4; }
html[data-wwx-appearance] .ws-page-heading p { line-height: 1.8; color: var(--ux-muted); }
html[data-wwx-appearance] .ws-welcome { border-color: transparent !important; border-radius: 22px; }
html[data-wwx-appearance] .ws-welcome h2 { letter-spacing: -.6px; line-height: 1.45; }
html[data-wwx-appearance] .ws-welcome-art { border-radius: 14px; }
html[data-wwx-appearance] .ws-journeys { border: 0; padding-block: 20px 24px; }
html[data-wwx-appearance] .ws-journey-heading { margin-bottom: 16px; gap: 8px 16px; }
html[data-wwx-appearance] .ws-journey-link { border-color: transparent !important; border-radius: 14px; padding: 16px; gap: 14px; background: var(--ux-surface); }
html[data-wwx-appearance] .ws-journey-link>span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--ux-raised); color: var(--ux-accent); }
html[data-wwx-appearance] .ws-journey-link strong { font-size: 14px; font-weight: 600; }
html[data-wwx-appearance] .ws-journey-link small { font-size: 12px; line-height: 1.7; }
html[data-wwx-appearance] .ws-journey-link>span:last-child { transition: transform 180ms var(--ux-ease),color 180ms ease; }
html[data-wwx-appearance] .ws-account-panel { padding-bottom: 14px; }
html[data-wwx-appearance] .ws-account-panel>summary { padding: 6px 8px; border-radius: 10px; transition: background-color 160ms ease; }
html[data-wwx-appearance] .ws-section-heading { border: 0 !important; }
html[data-wwx-appearance] .ws-draft-note { padding: 14px 16px; border: 0; border-radius: 12px; background: var(--ux-raised); gap: 10px; }
html[data-wwx-appearance] .ws-draft-note h3 { color: var(--ux-ink); font-weight: 550; }
html[data-wwx-appearance] .ws-tools { border: 0; gap: 10px; }
html[data-wwx-appearance] .ws-tool { border: 0 !important; border-radius: 14px; padding: 18px 16px; background: var(--ux-surface); }
html[data-wwx-appearance] .ws-tool-icon { border-radius: 10px; background: var(--ux-raised); color: var(--ux-accent); }
html[data-wwx-appearance] .ws-tool p { line-height: 1.7; color: var(--ux-muted); }
html[data-wwx-appearance] .wwx-experience-controls button { border-color: transparent !important; background: transparent !important; }
html[data-wwx-appearance] .wwx-experience-controls button:hover { background: var(--ux-hover) !important; }
html[data-wwx-appearance] .wwx-function-dialog { border-radius: 18px; }
html[data-wwx-appearance] .wwx-find-results a { border: 1px solid transparent; transition: background-color 140ms ease,border-color 140ms ease; }
html[data-wwx-appearance] .wwx-find-results a.is-active { border-color: var(--ux-line); }
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.ws-welcome,.ws-tool,.ws-journey-link) { background: var(--ux-surface) !important; border-color: transparent !important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body .wwx-experience-controls button { border-color: transparent !important; background: transparent !important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body .wwx-experience-controls button:hover { background: var(--ux-hover) !important; }
html[data-wwx-appearance=dark][data-wwx-appearance] .ws-draft-note { background: var(--ux-inset) !important; }
html[data-wwx-appearance=dark][data-wwx-appearance] .ws-tool-icon { background: var(--ux-raised) !important; color: var(--ux-accent); }
@media(hover:hover) and (pointer:fine) {
  .wwx-motion-target.wwx-motion-quiet:hover,.wwx-motion-target.wwx-motion-quiet:active { transform: none !important; }
  html[data-wwx-appearance] .wwx-motion-card { transition: transform 180ms var(--ux-ease),background-color 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
  html[data-wwx-appearance] .wwx-motion-card:hover:not(:disabled):not([aria-disabled=true]) { transform: translateY(-2px); }
  html[data-wwx-appearance] .wwx-motion-card:active:not(:disabled):not([aria-disabled=true]) { transform: translateY(0) scale(.995); }
  html[data-wwx-appearance] :is(.ws-tool,.ws-journey-link):hover { background: var(--ux-hover) !important; box-shadow: none; }
  html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.ws-tool,.ws-journey-link):hover:not(:disabled) { background: var(--ux-hover) !important; border-color: transparent !important; box-shadow: none; }
  html[data-wwx-appearance=dark][data-wwx-appearance] body .wwx-experience-controls button:hover:not(:disabled) { border-color: transparent !important; }
  html[data-wwx-appearance] .ws-journey-link:hover>span:last-child { transform: translate(2px,-2px); color: var(--ux-ink); }
  html[data-wwx-appearance] .ws-account-panel>summary:hover { background: var(--ux-hover) !important; }
}
@media(max-width:680px) {
  html[data-wwx-appearance] .ws-welcome { border-radius: 16px; }
  html[data-wwx-appearance] .ws-journey-link { padding: 14px; }
  html[data-wwx-appearance] .ws-tool { padding: 16px 14px; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-wwx-appearance] :is(.wwx-motion-card,.ws-journey-link>span:last-child,.ws-tool>span:last-child svg,.ws-account-panel>summary,.wwx-find-results a,input,textarea,select) { transition: none !important; }
  html[data-wwx-appearance] .wwx-motion-card:hover,html[data-wwx-appearance] .wwx-motion-card:active,html[data-wwx-appearance] .ws-journey-link:hover>span:last-child { transform: none !important; }
}

/* October 16 refinement: large work surfaces stay quiet; controls carry the hierarchy. */
html[data-wwx-appearance="dark"][data-wwx-appearance] {
  --ux-line-soft: #252a2d;
  --ux-surface-soft: #1d2022;
  --ux-surface-strong: #24282b;
}
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .studio-shell,.studio-main,.studio-workspace,.chat-workspace,.tts-layout,
  .video-generation-page,.image-generation-page,.chat-scroll,.chat-messages,.messages
) { border-color: transparent !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .studio-sidebar,.unified-workspace-sidebar,.ws-sidebar,.chat-history-panel
) { background: var(--ux-surface-soft) !important; border-color: var(--ux-line-soft) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .image-composer,.image-preview,.chat-main,.tts-editor,.tts-setup,
  .video-reference-preview,.video-generation-preview,.generation-preview,
  .creator-panel,.creator-input,.composer-wrap,.composer
) { border-color: var(--ux-line-soft) !important; box-shadow: none !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .image-composer,.image-preview,.chat-main,.tts-editor,.tts-setup,
  .video-reference-preview,.video-generation-preview,.generation-preview
) { border-radius: 14px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .studio-header,.chat-header,.tts-header,.ws-header
) { border-bottom-color: var(--ux-line-soft) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .workspace-column-separator,.workspace-divider,.chat-history-divider
) { opacity: .55; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .settings-trigger,.panel-help,.text-button,.tts-text-button,.ws-text-link,.ws-refresh,
  .scene-tabs button,.preview-tabs button,.tts-result-tabs button,.task-filter button,
  .tasks-kinds button,.tts-voice-filters button,.va-result-tabs button
) { border-radius: 8px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .scene-tabs,.preview-tabs,.tts-result-tabs,.task-filter,.tasks-kinds,.tts-voice-filters,.va-result-tabs
) { background: var(--ux-surface-soft) !important; border-color: transparent !important; border-radius: 10px; padding: 3px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .scene-tabs button,.preview-tabs button,.tts-result-tabs button,.task-filter button,
  .tasks-kinds button,.tts-voice-filters button,.va-result-tabs button
) { min-height: 34px; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .scene-tabs button[aria-selected=true],.scene-tabs button.is-active,
  .preview-tabs button[aria-selected=true],.preview-tabs button.is-active,
  .tts-result-tabs button[aria-selected=true],.task-filter .is-active,
  .tasks-kinds [aria-pressed=true],.tts-voice-filters [aria-pressed=true],
  .va-result-tabs button[aria-selected=true]
) { background: var(--ux-selected) !important; color: var(--ux-ink) !important; box-shadow: none !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .image-settings>summary,.model-picker,.scene-toggle,.settings-summary,
  .creator-settings-summary,.video-parameters,.image-queue-heading
) { background: var(--ux-surface-strong) !important; border-color: var(--ux-line-soft) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .chat-welcome,.director-empty,.director-plan-empty,.result-preview-empty,.image-empty,.tts-result-empty
) { background: transparent !important; border: 0 !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .chat-welcome-icon,.director-mark,.image-draft-visual,.queue-icon,.tts-result-empty>svg
) { background: var(--ux-surface-strong) !important; color: var(--ux-accent) !important; }
html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
  .chat-composer-foot,.composer-help,.tts-editor-tip,.tts-playback-note,.settings-price-note,
  .generation-note,.video-status-note,.range-bounds,.model-hint
) { color: var(--ux-muted) !important; }
@media(hover:hover) and (pointer:fine) {
  html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
    .scene-tabs button,.preview-tabs button,.tts-result-tabs button,.task-filter button,
    .tasks-kinds button,.tts-voice-filters button,.va-result-tabs button
  ):hover:not(:disabled) { background: var(--ux-hover) !important; }
}
@media(max-width:680px) {
  html[data-wwx-appearance="dark"][data-wwx-appearance] body :is(
    .image-composer,.image-preview,.chat-main,.tts-editor,.tts-setup,
    .video-reference-preview,.video-generation-preview,.generation-preview
  ) { border-radius: 12px; }
}

/* October 16 refinement: scan-friendly filters, tables and task states. */
html[data-wwx-appearance] :is(
  .task-filters,.filters,.billing-filters,.pl-filters,.zm-filter,.ze-filters,
  .account-filter-grid,.zj-filters,.zj-filter-grid,.zc-directory-filters,
  .operations-filters,.task-toolbar,.task-record-heading
) { gap: 10px 12px; }
html[data-wwx-appearance] :is(
  .task-filters,.filters,.billing-filters,.pl-filters,.zm-filter,.ze-filters,
  .account-filter-grid,.zj-filters,.zj-filter-grid,.zc-directory-filters,
  .operations-filters
) :is(input,select,textarea) { min-height: 40px; }
html[data-wwx-appearance] :is(
  .task-filters,.filters,.billing-filters,.pl-filters,.zm-filter,.ze-filters,
  .account-filter-grid,.zj-filters,.zj-filter-grid,.zc-directory-filters,
  .operations-filters
) label { color: var(--ux-muted); line-height: 1.5; }
html[data-wwx-appearance] :is(
  .task-filters,.filters,.billing-filters,.pl-filters,.zm-filter,.ze-filters,
  .account-filter-grid,.zj-filters,.zj-filter-grid,.zc-directory-filters,
  .operations-filters
) :is(input,select,textarea) {
  border-radius: 9px; border-color: var(--ux-line); background: var(--ux-inset); color: var(--ux-ink);
}
html[data-wwx-appearance] :is(
  .task-filters,.filters,.billing-filters,.pl-filters,.zm-filter,.ze-filters,
  .account-filter-grid,.zj-filters,.zj-filter-grid,.zc-directory-filters,
  .operations-filters
) :is(input,select,textarea):focus-visible {
  border-color: var(--ux-focus); box-shadow: 0 0 0 3px color-mix(in srgb,var(--ux-focus) 16%,transparent);
}
html[data-wwx-appearance] :is(
  .billing-table-wrap,.operations-table-wrap,.iv-table-wrap,.table-wrap,
  .tts-list,.task-records,.tasks-list,.ws-task-list
) { overflow-x: auto; border: 1px solid var(--ux-line); border-radius: 12px; background: var(--ux-surface); }
html[data-wwx-appearance] :is(
  .billing-table,.operations-table,.iv-table,.tts-voice-table
) { border-collapse: separate; border-spacing: 0; width: 100%; }
html[data-wwx-appearance] :is(
  .billing-table,.operations-table,.iv-table,.tts-voice-table
) :is(th,td) { padding: 13px 14px; border-bottom: 1px solid var(--ux-line-soft,var(--ux-line)); vertical-align: middle; }
html[data-wwx-appearance] :is(
  .billing-table,.operations-table,.iv-table,.tts-voice-table
) th { background: var(--ux-inset); color: var(--ux-muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
html[data-wwx-appearance] :is(
  .billing-table,.operations-table,.iv-table,.tts-voice-table
) tbody tr:last-child td { border-bottom: 0; }
html[data-wwx-appearance] :is(
  .billing-table,.operations-table,.iv-table,.tts-voice-table
) tbody tr { transition: background-color 150ms ease; }
html[data-wwx-appearance] :is(
  .billing-table,.operations-table,.iv-table,.tts-voice-table
) tbody tr:hover { background: var(--ux-hover); }
html[data-wwx-appearance] :is(
  .task-record,.task-row,.tts-task,.ws-task-row,.iv-table tbody tr
) { transition: background-color 150ms ease, border-color 150ms ease; }
html[data-wwx-appearance] :is(
  .task-record,.task-row,.tts-task,.ws-task-row,.iv-table tbody tr
):hover { background: var(--ux-hover); }
html[data-wwx-appearance] :is(
  .task-state,.task-state-unknown,.task-state-failed,.tts-task-state,
  .cv-status,.iv-status,.dy-fee-tag,.ws-badge,.sample-badge
) { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--ux-raised); color: var(--ux-muted); font-size: 12px; line-height: 1.3; }
html[data-wwx-appearance] :is(
  .task-state[data-state=succeeded],.task-state.is-completed,.task-state-success,
  .tts-task-state[data-state=succeeded],.cv-status.is-success,.iv-status.is-success
) { background: color-mix(in srgb,#4f9a79 18%,var(--ux-surface)); color: #9ed5ba; }
html[data-wwx-appearance] :is(
  .task-state[data-state=failed],.task-state-unknown,.task-state-failed,
  .cv-status.is-error,.iv-status.is-error
) { background: color-mix(in srgb,#bb6875 17%,var(--ux-surface)); color: #f0b3bb; }
html[data-wwx-appearance] :is(
  .task-state[data-state=running],.task-state[data-state=pending],.tts-task-state[data-state=processing],
  .cv-status.is-pending,.iv-status.is-pending
) { background: color-mix(in srgb,var(--ux-focus) 17%,var(--ux-surface)); color: var(--ux-accent); }
html[data-wwx-appearance] :is(
  .tasks-empty,.ws-empty,.iv-empty,.va-empty,.pl-empty,.sc-empty,.sr-empty,.tts-empty,.preview-empty
) { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 36px 20px; color: var(--ux-muted); text-align: center; border: 1px dashed var(--ux-line); border-radius: 12px; background: var(--ux-inset); }
html[data-wwx-appearance] :is(
  .tasks-empty strong,.ws-empty strong,.iv-empty strong,.va-empty strong,.pl-empty strong,.sc-empty strong,.sr-empty strong,.tts-empty strong,.preview-empty strong
) { color: var(--ux-ink); font-weight: 600; }
html[data-wwx-appearance] :is(
  .task-records,.tasks-list,.ws-task-list,.billing-table-wrap,.operations-table-wrap,.iv-table-wrap,.table-wrap,.tts-list
) :is(.empty,.empty-state) { min-height: 150px; display: grid; place-items: center; color: var(--ux-muted); }
@media(hover:hover) and (pointer:fine) {
  html[data-wwx-appearance] :is(.task-record,.task-row,.tts-task,.ws-task-row):hover { transform: translateX(2px); }
}
@media(max-width:680px) {
  html[data-wwx-appearance] :is(.billing-table-wrap,.operations-table-wrap,.iv-table-wrap,.table-wrap,.tts-list) { border-radius: 10px; }
  html[data-wwx-appearance] :is(.billing-table,.operations-table,.iv-table,.tts-voice-table) :is(th,td) { padding: 11px 12px; }
  html[data-wwx-appearance] :is(.task-filters,.filters,.billing-filters,.pl-filters,.zm-filter,.ze-filters,.operations-filters) { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion:reduce) {
  html[data-wwx-appearance] :is(.billing-table,.operations-table,.iv-table,.tts-voice-table) tbody tr,
  html[data-wwx-appearance] :is(.task-record,.task-row,.tts-task,.ws-task-row,.iv-table tbody tr) { transition: none !important; }
  html[data-wwx-appearance] :is(.task-record,.task-row,.tts-task,.ws-task-row):hover { transform: none !important; }
}

/* Complete the existing dark appearance. These rules never match the light theme. */
html[data-wwx-appearance=dark][data-wwx-appearance] body {
 --ls-bg:var(--ux-paper);--ls-panel:var(--ux-surface);--ls-input:var(--ux-inset);
 --ls-line:var(--ux-line);--ls-text:var(--ux-ink);--ls-muted:var(--ux-muted);--ls-accent:var(--ux-accent);
 scrollbar-color:var(--ux-control-line) var(--ux-paper);
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .sidebar-balance,.studio-site-home,.cv-card,.cv-candidate,.cv-pending,.cv-inventory-link,
 .feature-panel,.image-shortcuts,.image-settings-panel,.scene-picker-panel,.model-menu,.chat-settings-panel,
 .cv-dialog-heading,.cv-record,.pl-card,.ml-card,.library-card,.recharge-balance
) {
 background:var(--ux-surface)!important;color:var(--ux-ink)!important;
 border-color:var(--ux-control-line)!important;background-image:none;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .cv-badge,.image-draft-visual,.ls-draft-visual,.sample-badge,.cv-pagination button:disabled
) {
 background:var(--ux-raised)!important;color:var(--ux-muted)!important;border-color:var(--ux-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .cv-card h3,.cv-dialog-heading h2,.cv-explanation strong,.feature-panel-heading,
 .image-feature-card strong,.balance dd,.recharge-balance dd,.image-new-draft,.image-draft-details strong
) { color:var(--ux-ink)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .cv-card p,.cv-note,.cv-heading p,.cv-intro p,.cv-explanation p,.cv-detail-meta dt,.cv-small,
 .cv-picker-note,.cv-candidate p,.cv-record p,.feature-hint,.image-feature-card small,
 .image-draft-details time,.image-draft-details small,.image-queue small,.image-queue>p,
 .balance dt,.profile-uid,.image-shortcuts h3
) { color:var(--ux-muted)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .cv-card a,.cv-candidate button,.cv-record button,.cv-actions button,.cv-pagination button,
 .cv-heading>button,.cv-dialog-heading>button,.cv-inventory-link,.image-clear-drafts
) {
 background:var(--ux-raised)!important;color:var(--ux-ink)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.cv-card,.feature-panel,.image-settings-panel,dialog) {
 box-shadow:none;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.feature-panel,.image-settings-panel,.image-shortcuts,dialog) {
 box-shadow:var(--ux-shadow);border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.cv-tabs,.feature-tabs,.cv-section,.cv-record,.cv-explanation) {
 border-color:var(--ux-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.cv-tabs,.feature-tabs) button {
 min-height:42px;padding:9px 14px;border-radius:7px 7px 0 0;border:0;border-bottom:2px solid transparent;
 background:transparent!important;color:var(--ux-muted)!important;line-height:1.6;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(.cv-tabs,.feature-tabs) :is([aria-pressed=true],.is-active) {
 background:transparent!important;border-bottom-color:var(--ux-accent)!important;color:var(--ux-ink)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body[data-migration-ui=voices] dialog {
 background:var(--ux-surface);color:var(--ux-ink);border-color:var(--ux-control-line);
}
html[data-wwx-appearance=dark][data-wwx-appearance] body .cv-card {
 border-color:var(--ux-line)!important;border-radius:12px;gap:14px;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body .cv-badge {
 border:1px solid var(--ux-control-line);font-size:12px;
}
html[data-wwx-appearance=dark][data-wwx-appearance] footer .icp-filing {
 color:var(--ux-muted)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] :is(.cv-skip,.skip-link,.ws-skip,.pl-skip) {
 background:var(--ux-raised)!important;color:var(--ux-ink)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .guide-page li,.guide-page b,.guide-page a,.guide-page p,.guide-page small,
 [data-prompt][data-mode]>span,.dt-local-link,.panel-title>.muted,.submit-bar>div>span,
 #pl-page,#sw-prepared-count,#sw-job-count,#sw-done-count,#tts-selected-sample-note,
 .va-step,#va-availability,.sr-steps span,.edit-example,.frame-check>span
) { color:var(--ux-muted)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body .state-chip {
 background:var(--ux-raised)!important;color:var(--ux-muted)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 .chat-composer-settings>summary,.tts-editor-tip,#tts-availability,#mt-unavailable
) { background:var(--ux-raised)!important;color:var(--ux-muted)!important;border-color:var(--ux-line)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
 #tts-selected-mark,.tts-result-empty>span
) { background:var(--ux-selected)!important;color:var(--ux-accent)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body .tts-library .tts-section-heading {
 background:var(--ux-surface)!important;border-color:var(--ux-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body .tts-voice-empty {
 color:var(--ux-muted)!important;
}

/* Public information pages contain their own light cards and reading colours. */
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) :is(
 p,li,span,small,dt,dd,figcaption,.eyebrow,.tutorial-meta,.homepage-film-samples-link
) { color:var(--ux-muted)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) :is(
 h1,h2,h3,h4,strong,b,h1 span,h2 span,h3 span
) { color:var(--ux-ink)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) a:not(.button):not(.button-dark) {
 color:var(--ux-accent)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) .button-dark :is(span,strong) {
 color:inherit!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) :is(
 #homepage-featured-case,#homepage-brief-form,.example-guide,#homepage-preview,.script-preview,
 .tutorial-route,.tutorial-effect,.tutorial-end,.tutorial-trial-task,.pricing-company-note
) {
 background:var(--ux-surface)!important;color:var(--ux-ink)!important;border-color:var(--ux-line)!important;
 box-shadow:none;background-image:none;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.homepage .example-guide li {
 background:var(--ux-raised)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) :is(
 .tutorial-route,.tutorial-effect,.tutorial-end,.tutorial-trial-task,.pricing-company-note
) { border-color:var(--ux-control-line)!important; }
html[data-wwx-appearance=dark][data-wwx-appearance] body:is(.homepage,.pricing-page,.tutorial-page) :is(
 footer,.site-footer,.tutorial-meta,.tutorial-nav,.tutorial-steps,.tutorial-troubleshooting,hr
) { border-color:var(--ux-line)!important; }

/* Image editor: comfortable tab hit areas, quieter task selection and dark popovers. */
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .preview-tabs {
 height:auto;min-height:56px;padding:10px 18px;gap:12px;background:var(--ux-surface)!important;
 border-bottom:1px solid var(--ux-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .preview-tabs button {
 flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:100px;min-height:36px;
 height:auto;margin:0;padding:7px 16px;border:1px solid transparent!important;border-radius:8px;
 background:transparent!important;color:var(--ux-muted)!important;font-size:13px;line-height:1.6;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .preview-tabs button.is-active {
 background:var(--ux-selected)!important;color:var(--ux-ink)!important;border-color:var(--ux-selected-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .sample-badge {
 margin-left:auto;min-height:24px;padding:3px 8px;border-radius:6px;font-size:11px;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-composer {
 background:var(--ux-inset)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-composer textarea {
 background:transparent!important;box-shadow:none;color:var(--ux-ink)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-preview {
 background:var(--ux-inset)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page :is(.feature-panel,.image-settings-panel) {
 padding:16px;border-radius:12px;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .feature-toggle {
 border-radius:9px;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-feature-card {
 border-color:var(--ux-line)!important;background:var(--ux-raised)!important;color:var(--ux-ink)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-feature-card.is-active {
 border-color:var(--ux-selected-line)!important;background:var(--ux-selected)!important;box-shadow:inset 0 0 0 1px var(--ux-selected-line);
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .feature-panel-heading .text-button {
 width:32px;min-height:32px;padding:0;border:0;border-radius:6px;background:transparent!important;color:var(--ux-muted)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-draft-select {
 background:var(--ux-surface)!important;color:var(--ux-ink)!important;border-color:var(--ux-line)!important;
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .image-draft-select[aria-pressed=true] {
 background:var(--ux-selected)!important;border-color:var(--ux-selected-line)!important;box-shadow:inset 2px 0 var(--ux-accent);
}
html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page :is(.image-draft-delete,.image-draft-query) {
 background:var(--ux-raised)!important;color:var(--ux-muted)!important;border-color:var(--ux-control-line)!important;
}

/* The digital-human layout has more specific light rules; override at the same component boundary. */
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 {
 color-scheme:dark;--ls-bg:var(--ux-paper);--ls-panel:var(--ux-surface);--ls-input:var(--ux-inset);
 --ls-line:var(--ux-line);--ls-text:var(--ux-ink);--ls-muted:var(--ux-muted);--ls-accent:var(--ux-accent);
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .unified-workspace-sidebar,.ws-sidebar-toggle,.ws-sidebar-top,.studio-header,.studio-site-home,
 .sidebar-balance,.ls-layout-voice-entry,.ls-layout-submit,.ls-submit-area,.ls-records-footer,.ls-dialog-heading,
 .ls-voice-dialog,.ls-voice-dialog-header,.ls-voice-picker,.ls-clip-entry,.ls-draft-card,
 .ls-voice-modal,.ls-voice-modal-header,.ls-voice-modal-frame
) {
 background:var(--ux-surface)!important;color:var(--ux-ink)!important;border-color:var(--ux-line)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .unified-workspace-sidebar .ws-navigation :is(a,summary) {
 color:var(--ux-muted)!important;background:transparent!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .unified-workspace-sidebar .ws-navigation a[aria-current=page] {
 color:var(--ux-ink)!important;background:var(--ux-selected)!important;border-color:var(--ux-selected-line)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .ls-generation-modes,.ls-audio-tabs,.ls-multi-audio>.segmented,.ls-preview-tabs,
 .video-canvas,.ls-multi-preview-empty,.upload-area,.ls-multi-audio-drop,.ls-generation-status,
 .ls-draft-visual,.ls-draft-icon,.ls-voice-modal-search,.ls-voice-modal-filters
) {
 background:var(--ux-inset)!important;color:var(--ux-muted)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(button,.ls-result-download) {
 color:var(--ux-ink)!important;background:var(--ux-raised)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .ls-generation-modes,.ls-audio-tabs,.ls-multi-audio>.segmented,.ls-preview-tabs,.ls-history-tabs
) button {
 background:transparent!important;color:var(--ux-muted)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .ls-generation-modes,.ls-audio-tabs,.ls-multi-audio>.segmented,.ls-preview-tabs
) button.is-active,
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-clip-entry.is-current {
 background:var(--ux-selected)!important;color:var(--ux-ink)!important;border-color:var(--ux-selected-line)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 #speech-text,#ls-multi-speech,.ls-owned-voice-select,.ls-multi-voice-field select,.ls-face-numbers input
) {
 background:var(--ux-inset)!important;color:var(--ux-ink)!important;border-color:var(--ux-control-line)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .setting-block label,.ls-multi-audio label,.ls-readiness,.consent,.ls-quote-summary,.ls-quote-summary strong,
 .ls-submit-explanation,.ls-script-heading h2,.ls-clip-title,.ls-clip-state,.ls-clip-open,
 .canvas-empty strong,.ls-multi-preview-empty strong,.ls-records-title,.ls-draft-copy strong,.ls-step,
 .ls-face-numbers,.ls-multi-material,.ls-multi-material>strong,.ls-elapsed,.ls-effect-review,
 .ls-layout-current-title,.ls-multi-voice-link,.ls-task-state
) { color:var(--ux-ink)!important; }
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .ls-layout-subtitle,.ls-layout-preview-note,.ls-preview-caption,.ls-preview-footer,
 .ls-multi-preview-time,.ls-multi-preview-filename,.ls-clip-file,.ls-voice-note,.ls-multi-audio p,
 .draft-status,.ls-face-tools p,.ls-draft-copy small,.ls-draft-copy time,.ls-records-footer,
 .ls-generation-status p,.ls-review-status,.ls-result-preview>p,.upload-area p,.canvas-empty
) { color:var(--ux-muted)!important; }
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .ls-clip-open,.ls-records-heading,.ls-history-tabs button,.panel-help
) { background:transparent!important; }
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 :is(
 .ls-layout-submit,.ls-history-tabs,.ls-records-footer,.ls-effect-review,.ls-material-row,.ls-multi-material,
 .ls-layout-current-title,.ls-records-help
) { border-color:var(--ux-line)!important; }
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-history-tabs button.is-active {
 color:var(--ux-ink)!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-history-tabs button.is-active::after {
 background:var(--ux-accent);
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .generate-button:not(:disabled) {
 background:var(--ux-primary)!important;border-color:var(--ux-primary)!important;color:#20272b!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .generate-button:disabled {
 background:var(--ux-raised)!important;border-color:var(--ux-control-line)!important;color:var(--ux-muted)!important;opacity:1;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-readiness[data-blocked=true] {
 color:#d8bd8e!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-generation-status[data-state=unknown] {
 background:#30291f!important;border-color:#77613c!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-generation-status[data-state=unknown] :is(strong,p) {
 color:#e4c99e!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-generation-status[data-state=failed] {
 background:#32242a!important;border-color:#805461!important;
}
html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 .ls-generation-status[data-state=failed] :is(strong,p) {
 color:#f0b3bb!important;
}
@media(hover:hover) {
 html[data-wwx-appearance=dark][data-wwx-appearance] body :is(
  .cv-card a,.cv-pagination button,.cv-actions button,.feature-tabs button,.image-feature-card,.image-draft-select
 ):hover:not(:disabled) { background:var(--ux-hover)!important;border-color:var(--ux-selected-line)!important; }
 html[data-wwx-appearance=dark] body.studio-page.lipsync-page.ls-layout-v3 button:hover:not(:disabled) {
  background:var(--ux-hover)!important;border-color:var(--ux-selected-line)!important;
 }
}
@media(max-width:680px) {
 html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page .preview-tabs { padding:10px 14px; }
 html[data-wwx-appearance=dark][data-wwx-appearance] body.image-page :is(.preview-tabs button,.feature-tabs button) { min-height:44px; }
 html[data-wwx-appearance=dark][data-wwx-appearance] body .cv-tabs { gap:0; }
 html[data-wwx-appearance=dark][data-wwx-appearance] body .cv-tabs button { padding-inline:8px; }
}

/* Audit follow-up: shared dark task detail, sample footer and chat content. */

html[data-wwx-appearance="dark"] #task-detail-dialog{background:#202a33;color:#edf2f6;border-color:#46515b}
html[data-wwx-appearance="dark"] #task-detail-dialog .task-detail-heading{background:#202a33!important;color:#edf2f6;border-color:#46515b}
html[data-wwx-appearance="dark"] #task-detail-title{color:#edf2f6!important}
html[data-wwx-appearance="dark"] #task-detail-dialog :is(.task-result,.task-info){background:#202a33!important;color:#edf2f6;--tasks-ink:#edf2f6;--tasks-muted:#c0cbd4;--tasks-rule:#46515b}
html[data-wwx-appearance="dark"] #task-detail-dialog .task-result-media{background:#172028!important;color:#d2dce4}
html[data-wwx-appearance="dark"] #task-detail-dialog :is(.task-info,.task-result) :is(p,dt){color:#c0cbd4!important}
html[data-wwx-appearance="dark"] #task-detail-dialog :is(dd,h3,strong){color:#edf2f6!important}
html[data-wwx-appearance="dark"] #task-detail-dialog .task-billing-breakdown{border-color:#46515b}
html[data-wwx-appearance="dark"] .homepage-sample-actions{background:#202a33!important;color:#edf2f6!important;border-color:#46515b}
html[data-wwx-appearance="dark"] .homepage-sample-dialog-footer{border-color:#46515b}
html[data-wwx-appearance="dark"] .homepage-sample-dialog-footer>p{color:#c0cbd4!important}
html[data-wwx-appearance="dark"] .message.user{background:#263744!important;color:#f2f6f8!important;border-color:#46515b}
html[data-wwx-appearance="dark"] .message.user .message-text{background:#263744!important;color:#f2f6f8!important}
html[data-wwx-appearance="dark"] .message.user .message-label :is(strong,span){color:#c8d7e2!important}

.message-text :is(p,ul,ol,pre){margin:8px 0}.message-text li{margin:4px 0}.message-text pre{overflow:auto;white-space:pre-wrap;padding:12px;background:rgba(128,128,128,.12);border-radius:6px}.message-text code{overflow-wrap:anywhere}.message-text :is(h2,h3,h4){font-size:1.12em;line-height:1.5;margin:16px 0 8px}
