/* UI unification candidate. Presentation only: do not change generation, credit or auth. */
html { --ui-ink:#182638;--ui-muted:#485c70;--ui-panel:#ffffff;--ui-line:#d6e0e9;--ui-soft:#f3f7fa;--ui-primary:#176350;--ui-primary-ink:#ffffff; }
@media (prefers-color-scheme: dark) {
 html[data-toolbox-theme="auto"] { --ui-ink:#edf3f7;--ui-muted:#c2d1df;--ui-panel:#202c36;--ui-line:#526473;--ui-soft:#273641;--ui-primary:#4cc49e;--ui-primary-ink:#10271f; }
}
html[data-toolbox-theme="dark"] { --ui-ink:#edf3f7;--ui-muted:#c2d1df;--ui-panel:#202c36;--ui-line:#526473;--ui-soft:#273641;--ui-primary:#4cc49e;--ui-primary-ink:#10271f; }
/* Single identity in every shell. A tenant can still replace the image/title via existing site settings. */
body[data-page] .ui-brand { display:inline-flex!important;align-items:center;gap:12px;max-width:240px;min-width:0;flex:0 0 auto;text-decoration:none;line-height:1.25;white-space:normal; }
body[data-page] .ui-brand :is(.brand-mark,.workspace-brand-mark) { display:grid!important;place-items:center;flex:0 0 52px;width:52px!important;height:52px!important;padding:0!important;overflow:hidden;border-radius:14px!important;border:0!important;box-shadow:none!important;background:transparent!important; }
body[data-page] .ui-brand :is(.toolbox-brand-logo,img) { display:block;width:52px!important;height:52px!important;max-width:none;object-fit:cover;border-radius:14px; }
body[data-page] .ui-brand .ui-brand-copy { display:grid!important;align-content:center;min-width:0!important;width:auto!important;gap:3px;overflow:hidden;color:var(--ui-ink)!important; }
body[data-page] .ui-brand .ui-brand-copy strong { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 18px/1.2 Inter,"Noto Sans SC","Microsoft YaHei",sans-serif!important;letter-spacing:-.02em!important;color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important; }
body[data-page] .ui-brand .ui-brand-copy small { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 12px/1.35 Inter,"Noto Sans SC","Microsoft YaHei",sans-serif!important;letter-spacing:0!important;color:var(--ui-muted)!important;-webkit-text-fill-color:var(--ui-muted)!important; }
body[data-page] :is(.ui-brand,.workspace-icon-button,.mvp-main-menu-button):focus-visible { outline:3px solid var(--ui-primary)!important;outline-offset:3px; }
body[data-page="fzadmin"] .fzadmin-site-context { display:grid;gap:2px;min-width:0;margin-right:auto;padding-left:16px;border-left:1px solid var(--ui-line);color:var(--ui-ink); }
body[data-page="fzadmin"] .fzadmin-site-context strong { font-size:14px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
body[data-page="fzadmin"] .fzadmin-site-context small { color:var(--ui-muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
body[data-page="fzadmin"] .fzadmin-login-mark.ui-brand { margin:0 auto 24px;max-width:270px; }
/* The injected mode bar duplicates the visible form choices and history panel. Keep the DOM for compatibility, hide only its visual navigation. */
body[data-page="image"] .toolbox-subnav,body[data-page="video"] .toolbox-subnav { display:none!important; }
html:not(.portal-embedded) body[data-page="image"] .app-shell,html:not(.portal-embedded) body[data-page="video"] .app-shell { padding-top:65px!important; }
/* Header balance and account: light text was inherited from a dark panel onto a white background. */
body:is([data-page="image"],[data-page="video"]) .topbar .global-recharge-panel { background:var(--ui-panel)!important;border:1px solid var(--ui-line)!important;color:var(--ui-ink)!important;box-shadow:none!important;min-width:0!important; }
body:is([data-page="image"],[data-page="video"]) .topbar .global-member-badge { border-color:var(--ui-line)!important; }
body:is([data-page="image"],[data-page="video"]) .topbar :is(.global-member-badge span,.global-credit-copy span,.global-credit-copy small) { color:var(--ui-muted)!important;-webkit-text-fill-color:var(--ui-muted)!important; }
body:is([data-page="image"],[data-page="video"]) .topbar :is(.global-member-badge strong,.global-credit-copy strong,.global-credit-copy b) { color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important; }
body:is([data-page="image"],[data-page="video"]) .topbar .global-logout-button { color:var(--ui-ink)!important;background:var(--ui-soft)!important;border:1px solid var(--ui-line)!important; }
body:is([data-page="image"],[data-page="video"]) .topbar .global-recharge-button { background:var(--ui-primary)!important;border-color:var(--ui-primary)!important;color:var(--ui-primary-ink)!important;-webkit-text-fill-color:var(--ui-primary-ink)!important; }
/* History: clear visual difference between actionable and disabled downloads; readable count/status. */
body:is([data-page="image"],[data-page="video"]) .history-action-row :is(#downloadSelectedImages,#downloadSelectedVideos):not(:disabled) { background:#176350!important;border-color:#176350!important;color:#fff!important;-webkit-text-fill-color:#fff!important;box-shadow:none!important; }
body:is([data-page="image"],[data-page="video"]) .history-action-row :is(#downloadSelectedImages,#downloadSelectedVideos):disabled { background:#e8eef4!important;border-color:#c9d5df!important;color:#42546a!important;-webkit-text-fill-color:#42546a!important;opacity:1!important;box-shadow:none!important;cursor:not-allowed!important; }
body:is([data-page="image"],[data-page="video"]) :is(#historySelectStatus,.history-status-tab,.history-list.empty) { color:var(--ui-muted)!important;-webkit-text-fill-color:var(--ui-muted)!important; }
body:is([data-page="image"],[data-page="video"]) .history-action-row button { min-height:40px!important;font-size:12px!important;line-height:1.25!important; }
body:is([data-page="image"],[data-page="video"]) .history-action-row button:focus-visible { outline:3px solid var(--ui-primary)!important;outline-offset:2px; }
html[data-toolbox-theme="dark"] body:is([data-page="image"],[data-page="video"]) .history-action-row :is(#downloadSelectedImages,#downloadSelectedVideos):disabled { background:#293b48!important;border-color:#607485!important;color:#d9e4ed!important;-webkit-text-fill-color:#d9e4ed!important; }
@media(prefers-color-scheme:dark){html[data-toolbox-theme="auto"] body:is([data-page="image"],[data-page="video"]) .history-action-row :is(#downloadSelectedImages,#downloadSelectedVideos):disabled { background:#293b48!important;border-color:#607485!important;color:#d9e4ed!important;-webkit-text-fill-color:#d9e4ed!important; }}
/* Earlier auto-dark video title bug: use one semantic token in both dark paths. */
html[data-toolbox-theme="dark"] body[data-page="video"] :is(.production-direction-field>legend,.production-direction-group-title strong) { color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important; }
@media(prefers-color-scheme:dark){html[data-toolbox-theme="auto"] body[data-page="video"] :is(.production-direction-field>legend,.production-direction-group-title strong) { color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important; }}
/* Workspace: one primary navigation, secondary tools in a real, reachable drawer. */
body.workspace-page .workspace-shell { grid-template-rows:65px minmax(0,1fr)!important; }
body.workspace-page .workspace-main {grid-row:2!important;}
body.workspace-page .workspace-visit-tabs-shell { display:none!important; }
body.workspace-page .workspace-topbar { display:flex!important;align-items:center;gap:12px!important;padding:0 20px!important; }
body.workspace-page .workspace-topbar>.workspace-brand { flex:0 0 222px!important;width:222px!important;max-width:222px!important;padding:0!important;background:none!important;border:none!important;grid-column:auto!important; }
body.workspace-page .workspace-global-nav { flex:0 1 auto;max-width:100%;overflow-x:auto;min-width:0; }
body.workspace-page .workspace-topbar-actions { flex:0 0 auto;margin-left:auto!important;min-width:0; }
body.workspace-page #workspaceMenuButton { display:grid!important;place-items:center;flex:0 0 40px;width:40px;height:40px;color:var(--ui-ink)!important; }
body.workspace-page .workspace-sidebar { display:none!important; }
body.workspace-page .workspace-sidebar.is-open { position:fixed!important;top:65px!important;left:0!important;bottom:0!important;right:auto!important;z-index:1100!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;width:min(350px,92vw)!important;height:calc(100dvh - 65px)!important;max-height:none!important;min-height:0!important;padding:18px!important;background:var(--ui-panel)!important;color:var(--ui-ink)!important;border-right:1px solid var(--ui-line)!important;box-shadow:20px 20px 50px #101b2930!important;overflow-y:auto!important;overflow-x:hidden!important;transform:none!important; }
body.workspace-page .workspace-sidebar .workspace-search { display:flex!important;width:100%!important;min-height:42px;flex:0 0 auto;grid-column:auto!important; }
body.workspace-page .workspace-sidebar .workspace-nav { display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px;width:100%!important;overflow:visible!important;padding:0!important; }
body.workspace-page .workspace-sidebar .workspace-nav-group { display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:3px!important;padding:8px 0!important;border:0!important;border-bottom:1px solid var(--ui-line)!important; }
body.workspace-page .workspace-sidebar .workspace-nav-group>span { display:block!important;color:var(--ui-muted)!important;font-size:12px!important;letter-spacing:.06em; }
body.workspace-page .workspace-sidebar .workspace-nav-group a { display:flex!important;align-items:center;gap:10px;min-height:42px!important;padding:8px 10px!important;font-size:14px!important;color:var(--ui-ink)!important;white-space:normal!important; }
body.workspace-page .workspace-sidebar .workspace-nav-group a[hidden] { display:none!important; }
body.workspace-page .workspace-sidebar .workspace-service { display:flex!important;margin:0; }
body.workspace-page .workspace-sidebar .workspace-nav-group a:is(:hover,:focus-visible,.active) { background:var(--ui-soft)!important;border-radius:8px; }
body.workspace-page .workspace-scrim:not([hidden]) { z-index:1050!important; }
body.workspace-page .workspace-topbar-actions :is(#workspaceTopBalance,#workspaceTopRecharge) { color:var(--ui-ink)!important; }
body.workspace-page .workspace-profile :is(strong,small),body.workspace-page .workspace-balance-chip strong { color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important; }
body.workspace-page .workspace-profile small { color:var(--ui-muted)!important;-webkit-text-fill-color:var(--ui-muted)!important; }
body.workspace-page .workspace-tool-subnav { max-width:100%;overflow-x:auto; }
/* Backend headings are route context, not a competing second logo. */
body[data-page="admin"] .aurora-admin-brand { display:block!important;padding:12px 14px!important; }
body[data-page="admin"] .aurora-admin-brand strong { color:var(--ui-ink)!important;font-size:14px!important;letter-spacing:0!important; }
@media(max-width:1280px){ body.workspace-page .workspace-topbar-actions :is(#workspaceTopBalance,#workspaceNoticeButton){display:none!important} }
@media(max-width:1060px){ body.workspace-page .workspace-global-nav { display:none!important; } body.workspace-page .workspace-topbar-actions>a.workspace-icon-button {display:none!important} }
@media(max-width:760px){
 body[data-page] .ui-brand { gap:8px;max-width:202px; }
 body[data-page] .ui-brand :is(.brand-mark,.workspace-brand-mark) { width:42px!important;height:42px!important;flex-basis:42px; }
 body[data-page] .ui-brand :is(.toolbox-brand-logo,img) { width:42px!important;height:42px!important; }
 body[data-page] .ui-brand .ui-brand-copy strong { font-size:15px!important; }
 body[data-page] .ui-brand .ui-brand-copy small { font-size:11px!important; }
 body.workspace-page .workspace-topbar { gap:7px!important;padding:0 12px!important;height:65px!important; }
 body.workspace-page .workspace-topbar>.workspace-brand { flex:0 1 auto!important;width:auto!important;max-width:202px!important; }
 body.workspace-page .workspace-topbar-actions { gap:5px!important; }
 body.workspace-page .workspace-topbar-actions :is(#workspaceTopRecharge,#workspaceNoticeButton,#auroraTaskCenterButton) { display:none!important; }
 body.workspace-page .workspace-sidebar.is-open { width:min(350px,90vw)!important; }
 body[data-page="fzadmin"] .fzadmin-header { flex-wrap:wrap; }
 body[data-page="fzadmin"] .fzadmin-site-context { order:3;width:100%;margin:0;border:0;padding:0; }
 body[data-page="admin"] .topbar .topnav { display:none!important; }
}
@media(max-width:390px){body.workspace-page .workspace-topbar-actions .workspace-profile :is(strong,small){display:none!important}body.workspace-page .workspace-topbar>.workspace-brand{flex:1 1 auto!important;}}
@media(prefers-reduced-motion:reduce){body.workspace-page .workspace-sidebar{transition:none!important}}
/* Final shared header: the admin shell used to hide its own brand in aurora-ui. */
body[data-page="admin"] .topbar {
 display:flex!important;align-items:center;gap:16px;
 background:var(--ui-panel)!important;color:var(--ui-ink)!important;
 border:1px solid var(--ui-line)!important;box-shadow:none!important;
}
body[data-page="admin"] .topbar .topnav a {color:var(--ui-muted)!important;}
body[data-page="admin"] .topbar .topnav a:is(.active,:hover,:focus-visible) {color:var(--ui-ink)!important;background:var(--ui-soft)!important;}
/* The station console has its own theme attribute; share the same brand contrast. */
html[data-subsite-color-scheme="dark"] body[data-page="fzadmin"] {
 --ui-ink:#edf3f7;--ui-muted:#c2d1df;--ui-panel:#202c36;--ui-line:#526473;--ui-soft:#273641;--ui-primary:#4cc49e;
}
body[data-page="fzadmin"] .fzadmin-login-mark.ui-brand {display:flex!important;max-width:270px!important;width:max-content;}
/* The workspace's legacy phone rules hide the name even with an icon in place. */
body.workspace-page .workspace-topbar>.workspace-brand .ui-brand-copy {display:grid!important;}
/* No duplicated mobile navigation; keep the original menu and account usable. */
@media(max-width:350px) {
 body[data-page="home"] .haomj-topbar-inner>.ui-brand {flex:0 0 158px!important;width:158px!important;max-width:158px!important;}
 body[data-page="home"] .haomj-topbar-actions .theme-switcher {display:none!important;}
 body.workspace-page .workspace-topbar-actions #auroraThemeButton {display:none!important;}
 body.workspace-page .workspace-topbar>.workspace-brand {flex:1 1 auto!important;min-width:154px!important;}
}
/* Legend status must consume space instead of painting over the first radio group. */
@media(max-width:420px) {
 body[data-page="video"] .production-direction-field {padding-top:14px!important;}
 body[data-page="video"] .production-direction-field>legend {max-width:100%!important;white-space:normal!important;line-height:1.45!important;}
 body[data-page="video"] .production-direction-field>legend span {display:block!important;margin:5px 0 0!important;line-height:1.45!important;white-space:normal!important;}
 body[data-page="video"] .production-direction-group {clear:both;margin-top:10px!important;}
 body[data-page="video"] .production-direction-group-title {position:relative!important;display:grid!important;gap:4px!important;min-height:0!important;line-height:1.45!important;}
 body[data-page="video"] .production-direction-group-title span {position:static!important;white-space:normal!important;}
}
body[data-page="video"] .production-direction-group-title strong {color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;}
body[data-page="video"] .production-direction-group-title span {color:var(--ui-muted)!important;-webkit-text-fill-color:var(--ui-muted)!important;}
@media(max-width:350px) {
 html body[data-page="home"] .haomj-topbar-inner {width:calc(100vw - 24px)!important;max-width:none!important;gap:6px!important;margin-inline:auto!important;}
 html body[data-page="home"] .haomj-topbar-inner>.brand.nt-brand.ui-brand {flex:0 0 158px!important;width:158px!important;min-width:158px!important;max-width:158px!important;}
 body[data-page="home"] .haomj-topbar-actions #toolboxThemeButton {display:none!important;}
 body[data-page="home"] #mvpMainMenuButton {width:40px!important;flex-basis:40px!important;}
}

/* End-to-end brand rhythm: older mobile styles removed the subtitle or the whole copy. */
@media(max-width:760px) {
 body[data-page="home"] .nt-brand__copy small,
 body:is([data-page="image"],[data-page="video"]) .topbar .brand > .ui-brand-copy,
 body[data-page] .ui-brand .ui-brand-copy small {display:block!important;}
 body[data-page] .ui-brand .ui-brand-copy {display:grid!important;gap:2px!important;}
 body:is([data-page="image"],[data-page="video"]) .topbar .brand {min-width:0!important;}
}
/* Keep status on its own line and the direction label fully readable at all widths. */
body[data-page="video"] .production-direction-field>legend {max-width:100%!important;white-space:normal!important;line-height:1.45!important;}
body[data-page="video"] .production-direction-field>legend span {display:block!important;margin:4px 0 0!important;white-space:normal!important;line-height:1.45!important;}
body[data-page="video"] .production-direction-group {margin-top:12px!important;clear:both;}
body[data-page="video"] .production-direction-group-title {display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:start!important;gap:4px!important;line-height:1.45!important;min-height:0!important;}
body[data-page="video"] .production-direction-group-title :is(strong,span) {display:block!important;position:static!important;float:none!important;width:auto!important;line-height:1.45!important;white-space:normal!important;}
/* 760px legacy rule hides the entire second span, not just its label. Reopen only the actual shared brand. */
@media (max-width:760px) {
 body:is([data-page="image"],[data-page="video"]) .topbar .brand.ui-brand > span.ui-brand-copy:last-child { display:grid!important;flex:1 1 auto;min-width:0!important; }
 /* The common main-nav script also injects a mobile hamburger on workspace; its destinations live in the function drawer. */
 body.workspace-page.mvp-nav-ready #mvpMainMenuButton { display:none!important; }
}
@media (max-width:420px) {
 body.workspace-page .workspace-view .workspace-metrics { grid-template-columns:minmax(0,1fr)!important;gap:10px!important; }
 body.workspace-page .workspace-view .workspace-metrics article { min-width:0;display:flex;align-items:center;gap:14px!important;min-height:90px!important;padding:14px 16px!important; }
 body.workspace-page .workspace-view .workspace-metrics article > div { min-width:0; }
 body.workspace-page .workspace-view .workspace-metrics article strong { display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(18px,6vw,23px)!important;line-height:1.35!important;letter-spacing:-.02em; }
}
/* History is part of the dark workbench, not a light-on-dark pasted widget. */
body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) > .section-head h2 {
 color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;
}
/* The inherited Aurora group was hard-coded light even though its tabs are dark. */
html[data-toolbox-theme="dark"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tabs {
 background:var(--ui-panel)!important;border-color:var(--ui-line)!important;
}
@media (prefers-color-scheme:dark) {
 html[data-toolbox-theme="auto"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tabs {
  background:var(--ui-panel)!important;border-color:var(--ui-line)!important;
 }
}
html[data-toolbox-theme="dark"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab {
 background:var(--ui-soft)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;
}
html[data-toolbox-theme="dark"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab strong {
 background:var(--ui-panel)!important;color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;
}
html[data-toolbox-theme="dark"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab.active {border-color:var(--ui-primary)!important;}
@media (prefers-color-scheme:dark) {
 html[data-toolbox-theme="auto"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab {
  background:var(--ui-soft)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;
 }
 html[data-toolbox-theme="auto"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab strong {
  background:var(--ui-panel)!important;color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;
 }
 html[data-toolbox-theme="auto"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab.active {border-color:var(--ui-primary)!important;}
}
/* The same balance is already visible in the overview metric and the account section. Keep Recharge and account navigation. */
body.workspace-page .workspace-topbar-actions #workspaceTopBalance,
body.workspace-page .workspace-topbar-actions > a.workspace-icon-button[href="./index.html"] {display:none!important;}
@media(max-width:420px) {
 body.workspace-page .workspace-view .workspace-metrics article {
  flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;text-align:left!important;
  min-height:90px!important;
 }
 body.workspace-page .workspace-view .workspace-metrics article .metric-icon {flex:0 0 42px;}
 body.workspace-page .workspace-view .workspace-metrics article > div {flex:1 1 auto;min-width:0;}
}
/* Give the image status groups opaque, reliably legible pastel surfaces in light mode. */
body[data-page="image"] .panel:has(#historyList) .history-status-tab.accent {background:#eaf7fd!important;}
body[data-page="image"] .panel:has(#historyList) .history-status-tab.warning {background:#fff8e8!important;}
body[data-page="image"] .panel:has(#historyList) .history-status-tab.success {background:#e9f7ee!important;}
/* Match the image history filter to the chosen dark canvas; keep retention notices visually distinct. */
html[data-toolbox-theme="dark"] body[data-page="image"] .panel:has(#historyList) .history-date-filter {background:var(--ui-soft)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important;}
html[data-toolbox-theme="dark"] body[data-page="image"] .panel:has(#historyList) .history-date-filter :is(strong,span) {color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;}
html[data-toolbox-theme="dark"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-date-filter input {background:var(--ui-panel)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important;color-scheme:dark;}
@media(prefers-color-scheme:dark) {
 html[data-toolbox-theme="auto"] body[data-page="image"] .panel:has(#historyList) .history-date-filter {background:var(--ui-soft)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important;}
 html[data-toolbox-theme="auto"] body[data-page="image"] .panel:has(#historyList) .history-date-filter :is(strong,span) {color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;}
 html[data-toolbox-theme="auto"] body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-date-filter input {background:var(--ui-panel)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important;color-scheme:dark;}
}
/* Preserve backend theme choices while making the default admin accent share the product's green. */
html[data-aurora-theme="pure"] body[data-page="admin"],
html[data-aurora-theme="jade"] body[data-page="admin"] {--admin-accent:#176350;--admin-accent-soft:rgba(23,99,80,.12);}
/* Shared identity: light/dark canvases may differ, but the primary navigation has one brand grammar. */
body[data-page="home"] .haomj-topbar .topnav,
body:is([data-page="image"],[data-page="video"]) .topbar .topnav,
body.workspace-page .workspace-topbar .workspace-global-nav {
 background:color-mix(in srgb,var(--ui-primary) 11%,var(--ui-panel))!important;
 border:1px solid var(--ui-line)!important;
}
body[data-page="home"] .haomj-topbar .topnav a:is(.active,:hover,:focus-visible),
body:is([data-page="image"],[data-page="video"]) .topbar .topnav a:is(.active,:hover,:focus-visible),
body.workspace-page .workspace-topbar .workspace-global-nav a:is(.active,:hover,:focus-visible) {
 background:var(--ui-panel)!important;color:var(--ui-primary)!important;
 box-shadow:0 2px 8px rgba(18,52,43,.08)!important;
}
/* Legacy aurora positioned the icon absolutely while the shared theme control injected a label. */
body.workspace-page #auroraThemeButton {width:76px!important;min-width:76px!important;flex:0 0 76px!important;}
body.workspace-page #auroraThemeButton > summary {
 position:relative!important;inset:auto!important;display:inline-flex!important;
 align-items:center!important;justify-content:center!important;gap:6px!important;
 width:100%!important;box-sizing:border-box!important;min-height:40px!important;height:40px!important;padding:0 10px!important;
 color:var(--ui-ink)!important;background:var(--ui-panel)!important;border-color:var(--ui-line)!important;
}
body.workspace-page #auroraThemeButton > summary > svg {
 position:static!important;inset:auto!important;transform:none!important;
 flex:0 0 16px;width:16px!important;height:16px!important;
}
body.workspace-page #auroraThemeButton > summary > span {
 display:inline!important;position:static!important;line-height:1.3!important;white-space:nowrap!important;
}
body.workspace-page #auroraThemeButton > summary:focus-visible {
 outline:3px solid var(--ui-primary)!important;outline-offset:2px;
}
@media(max-width:480px) {
 body.workspace-page #auroraThemeButton {width:44px!important;min-width:44px!important;flex-basis:44px!important;}
 body.workspace-page #auroraThemeButton > summary {width:100%!important;padding:0!important;}
 body.workspace-page #auroraThemeButton > summary > span {display:none!important;}
}
/* Unify non-semantic section labels without repainting status, warnings, or generation modes. */
body:is([data-page="image"],[data-page="video"]) .panel .eyebrow,
body.workspace-page .workspace-section-head p,
body.workspace-page .workspace-hero p {
 color:var(--ui-primary)!important;-webkit-text-fill-color:var(--ui-primary)!important;
}
/* Image history actions: the legacy ghost theme supplied a dark translucent surface in light mode. */
body[data-page="image"] .history-action-row {align-items:start!important;}
body[data-page="image"] .history-action-row > button {align-self:start!important;}
body[data-page="image"] .history-action-row button {height:40px!important;min-height:40px!important;opacity:1!important;}
body[data-page="image"] .history-action-row button.ghost {background:var(--ui-panel)!important;border:1px solid var(--ui-line)!important;color:var(--ui-ink)!important;-webkit-text-fill-color:var(--ui-ink)!important;box-shadow:none!important;}
body[data-page="image"] .history-action-row button.ghost:not(:disabled):is(:hover,:focus-visible) {background:var(--ui-soft)!important;}
body[data-page="image"] .history-action-row button.ghost:disabled {background:var(--ui-soft)!important;color:var(--ui-muted)!important;-webkit-text-fill-color:var(--ui-muted)!important;cursor:not-allowed!important;}
/* Tool pages: legacy 44px icon buttons cannot also contain a readable text label. */
body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton {
 width:76px!important;min-width:76px!important;flex:0 0 76px!important;padding:0!important;
}
body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton > summary {
 position:relative!important;inset:auto!important;box-sizing:border-box!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
 width:100%!important;min-height:36px!important;height:36px!important;padding:0 8px!important;
 color:var(--ui-ink)!important;background:var(--ui-panel)!important;border-color:var(--ui-line)!important;
}
body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton > summary > svg {
 position:static!important;inset:auto!important;transform:none!important;flex:0 0 16px;width:16px!important;height:16px!important;
}
body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton > summary > span {
 display:inline!important;position:static!important;white-space:nowrap!important;line-height:1.3!important;
}
body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton > summary:focus-visible {
 outline:3px solid var(--ui-primary)!important;outline-offset:2px;
}
@media(max-width:760px) {
 body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton {
  width:44px!important;min-width:44px!important;flex-basis:44px!important;
 }
 body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton > summary {padding:0!important;}
 body:is([data-page="image"],[data-page="video"]) .topbar #auroraThemeButton > summary > span {display:none!important;}
}
/* Preserve the original three radio choices; let longer Chinese mode titles wrap rather than ellipsize. */
body[data-page="image"] .image-workbench-panel .mode-tab-copy strong {
 white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
 overflow-wrap:anywhere;line-height:1.4!important;
}
/* The overview has no padding in the inherited theme, putting copy and tiles against the card border. */
body.workspace-page .workspace-view[data-view="overview"] > .workspace-section {
 padding:20px!important;
}
@media(max-width:760px) {
 body.workspace-page .workspace-view[data-view="overview"] > .workspace-section {padding:14px!important;}
}/* Retention rules must be readable in full, especially when images are due to expire. */
body[data-page="image"] .panel:has(#historyList) .history-toolbar .image-retention-notice {
 display:block!important;white-space:normal!important;overflow:visible!important;
 text-overflow:clip!important;max-width:100%;text-align:left!important;line-height:1.5!important;
}
@media(max-width:390px) {
 body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab {
  display:grid!important;justify-items:center!important;align-content:center!important;gap:4px!important;
  min-height:64px!important;padding:7px 3px!important;text-align:center!important;
 }
 body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab span {
  overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;
  font-size:12px!important;line-height:1.25!important;
 }
 body:is([data-page="image"],[data-page="video"]) .panel:has(#historyList) .history-status-tab strong {
  justify-self:center!important;min-width:24px!important;height:22px!important;
 }
}
/* A lighter numeric-placeholder weight makes the repeated unauthenticated state scan cleanly. */
body.workspace-page .workspace-view[data-view="overview"] .workspace-metrics article strong {
 font-weight:600!important;font-size:22px!important;letter-spacing:0!important;line-height:1.4!important;
}
@media(max-width:420px) {
 body.workspace-page .workspace-view[data-view="overview"] .workspace-metrics article strong {font-size:19px!important;}
}/* Deep surfaces should not inherit Aurora's light-theme white inset stroke. */
body.workspace-page .workspace-topbar > .workspace-brand {box-shadow:none!important;}
html[data-toolbox-theme="dark"] body.workspace-page .workspace-tool-grid > a {
 box-shadow:0 10px 25px rgba(0,0,0,.18),inset 0 0 0 1px rgba(236,247,243,.06)!important;
}
html[data-toolbox-theme="dark"] body[data-page="image"] :is(.mode-tabs,.workbench-upload-card),
html[data-toolbox-theme="dark"] body[data-page="video"] :is(.production-direction-field,.workbench-upload-card) {
 box-shadow:inset 0 0 0 1px rgba(236,247,243,.06)!important;
}
html[data-toolbox-theme="dark"] body[data-page="image"] #historyList.empty {
 border-color:var(--ui-line)!important;background:var(--ui-soft)!important;color:var(--ui-muted)!important;
}
@media (prefers-color-scheme:dark) {
 html[data-toolbox-theme="auto"] body.workspace-page .workspace-tool-grid > a {
  box-shadow:0 10px 25px rgba(0,0,0,.18),inset 0 0 0 1px rgba(236,247,243,.06)!important;
 }
 html[data-toolbox-theme="auto"] body[data-page="image"] :is(.mode-tabs,.workbench-upload-card),
 html[data-toolbox-theme="auto"] body[data-page="video"] :is(.production-direction-field,.workbench-upload-card) {
  box-shadow:inset 0 0 0 1px rgba(236,247,243,.06)!important;
 }
 html[data-toolbox-theme="auto"] body[data-page="image"] #historyList.empty {
  border-color:var(--ui-line)!important;background:var(--ui-soft)!important;color:var(--ui-muted)!important;
 }
}
/* Legacy video buttons were 82% opaque even when disabled; preserve status through fill, not faded type. */
body[data-page="video"] .panel:has(#historyList) .history-action-row button {opacity:1!important;}
/* Keep video history actions as compact as image history on phone-sized screens. */
@media (max-width:759px) {
 body[data-page="video"] .panel:has(#historyList) .history-action-row {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;gap:8px!important;
 }
}

/* Maintain readable status contrast on white without changing the dark palette. */
html:not([data-toolbox-theme="dark"]) body[data-page="video"] .production-direction-field>legend span {
  color:#915300!important;-webkit-text-fill-color:#915300!important;
}
@media (prefers-color-scheme:dark) {
  html[data-toolbox-theme="auto"] body[data-page="video"] .production-direction-field>legend span {
    color:#fbbf24!important;-webkit-text-fill-color:#fbbf24!important;
  }
}
/* Never show an empty page while the session check is pending. */
body[data-page="fzadmin"] .fzadmin-pending {
  max-width:460px;margin:clamp(32px,12vh,100px) auto;padding:28px 22px;
  border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-panel);
  color:var(--ui-ink);text-align:center;
}
body[data-page="fzadmin"] .fzadmin-pending .ui-brand {justify-content:center;margin:0 auto 22px;}
body[data-page="fzadmin"] .fzadmin-pending p {margin:0;color:var(--ui-muted);font-size:14px;line-height:1.65;}
body[data-page="fzadmin"] .fzadmin-shell:has(#fzadminLogin:not([hidden])) .fzadmin-pending,
body[data-page="fzadmin"] .fzadmin-shell:has(#fzadminApp:not([hidden])) .fzadmin-pending {display:none!important;}
/* The status lives in the hidden app during an initial 5xx; surface a recovery path without changing auth. */
body[data-page="fzadmin"] .fzadmin-pending-retry {display:none;}
body[data-page="fzadmin"] .fzadmin-shell:has(#fzadminStatus.is-error:not(:empty)) .fzadmin-pending-wait {display:none;}
body[data-page="fzadmin"] .fzadmin-shell:has(#fzadminStatus.is-error:not(:empty)) .fzadmin-pending-retry {display:block;}
body[data-page="fzadmin"] .fzadmin-pending-retry a {
 display:inline-flex;align-items:center;justify-content:center;margin-top:16px;padding:10px 18px;
 border:1px solid var(--ui-line);border-radius:9px;color:var(--ui-ink);background:var(--ui-panel);
 font-size:14px;font-weight:650;text-decoration:none;
}
body[data-page="fzadmin"] .fzadmin-pending-retry a:hover,body[data-page="fzadmin"] .fzadmin-pending-retry a:focus-visible {border-color:currentColor;outline-offset:3px;}
/* Keep the required-status caption off the fieldset stroke at narrow widths. */
body[data-page="video"] .production-direction-field>legend {
  padding:0 8px 5px!important;background:inherit!important;
}
body[data-page="video"] .production-direction-field>legend span {background:inherit!important;}
