/* Light-only ancillary app pages. User-generated exports never import this sheet. */
:root[data-theme="light"] body.lb-morandi-page {background:var(--lb-bg)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] .lb-morandi-page :where(header,main,aside,section,article,nav,footer,details,summary,form,dialog,.card,.panel,.step,.note,.hero,.box) {background-color:var(--lb-surface)!important;color:var(--lb-text)!important;border-color:var(--lb-border)!important;}
:root[data-theme="light"] .lb-morandi-page :where(h1,h2,h3,h4,p,li,strong,small,label,a,span,code,pre,td,th) {color:var(--lb-text)!important;}
:root[data-theme="light"] .lb-morandi-page :where(button,input,textarea,select,.button,.btn) {background:var(--lb-surface)!important;color:var(--lb-text)!important;border-color:var(--lb-border-strong)!important;}
:root[data-theme="light"] .lb-morandi-page [data-liubai-theme-toggle] {min-height:44px;margin:var(--lb-space-4);}

/* Required #6D645D token remains available on sufficiently light surfaces.
   Small chrome text on darker milk-tea backgrounds uses the AA-safe alias. */
:root[data-theme="light"] body[data-lb-product] :is(.muted,small,.hint,.note,.sublogo,.pub-status,.journey-status,.lb-task-hint):not(#preview-slide *,#richBody *,.publish-preview *,.lb-user-content *,.template-mini *) {color:var(--lb-text-secondary)!important;}

/* App chrome only: never target a rendered customer document or slide. */
:root[data-theme="light"] body[data-lb-product] :is(.intro>p,.intro>div>p,.logo>span,.lb-v13-customer-actions>summary,.sidebar a>span,#pubStepTwo,#pubStepThree) {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] body[data-lb-product] :is(button[data-step],button[data-page]) {color:var(--lb-text)!important;background:var(--lb-surface)!important;opacity:1!important;}
:root[data-theme="light"] body[data-lb-product] :is(button[data-step].active,button[data-page].active,[aria-current="page"]) {color:var(--lb-text)!important;background:var(--lb-surface-muted)!important;opacity:1!important;}
:root[data-theme="light"] #sidebarNew {color:var(--lb-primary-text)!important;background:var(--lb-primary)!important;opacity:1!important;}
:root[data-theme="light"] .lb-morandi-page :is(.progress-panel,.notice,.warning,.info,.callout,.screen,.comparison) {background:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] body[data-lb-product] {background:var(--lb-bg)!important;color:var(--lb-text)!important;--ink:var(--lb-text);--muted:var(--lb-text-secondary);--line:var(--lb-border);--paper:var(--lb-bg);}
:root[data-theme="light"] body[data-lb-product=carousel] :is(.app-header,.panel,.preview,.profile-tools,.format-switch,.page-chip,.canvas-stage,.text-toolbar,.export-box) {background:var(--lb-surface)!important;color:var(--lb-text)!important;border-color:var(--lb-border)!important;background-image:none!important;}
:root[data-theme="light"] body[data-lb-product=carousel] :is(label,.wordmark,.wordmark-sub,.intro h1 em,.intro p,.panel-heading p,.count,footer,.page-navigation p,#status,.step,#prompt-preview,.text-toolbar) {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] body[data-lb-product=carousel] :is(input,textarea,select,button,.file-button):not(#preview-slide *,#template-preview-art *) {background:var(--lb-surface)!important;color:var(--lb-text)!important;border-color:var(--lb-border-strong)!important;}
:root[data-theme="light"] body[data-lb-product=carousel] :is(button.primary,.page-chip[aria-current=true],.format-switch button[aria-pressed=true]) {background:var(--lb-primary)!important;color:var(--lb-primary-text)!important;}
:root[data-theme="light"] .lb-morandi-page :is(figcaption,.badge) {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] .lb-morandi-page :is(code,pre) {background:var(--lb-surface-muted)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] .lb-morandi-page :is(a,.badge,.notice) {background-color:var(--lb-surface)!important;border-color:var(--lb-border)!important;}
:root[data-theme="light"] body[data-lb-product=publish] :is(.app-header,.pub-card,.pub-drop,.pub-platform-card,.pub-toolbar,.pub-flow-bar,.pub-draft,.pub-calendar-day) {background:var(--lb-surface)!important;color:var(--lb-text)!important;border-color:var(--lb-border)!important;}
:root[data-theme="light"] body[data-lb-product=publish] :is(button,.button,input,textarea,select,.pub-check):not(.pub-phone *,.pub-preview *) {background:var(--lb-surface)!important;color:var(--lb-text)!important;border-color:var(--lb-border-strong)!important;}
:root[data-theme="light"] body[data-lb-product=publish] :is(.button.lime,button.primary,button.lime,.pub-check:has(input:checked),.pub-platform-card[aria-pressed=true],.liubai-auth-primary) {background:var(--lb-primary)!important;color:var(--lb-primary-text)!important;}
:root[data-theme="light"] body[data-lb-product=article] #status {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] body[data-lb-product=publish] :is(.pub-phone,.pub-preview,#pubConnection) {background-color:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] body[data-lb-product=publish] :is(#pubPreviewPlatform,#pubPreviewName,#pubCopy,#pubDownload,#pubOpen) {background-color:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] body[data-lb-product=carousel] .generation-bar {background:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] body[data-lb-product=crm] :is(.empty>p,footer,footer span,#date,.top span) {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] body[data-lb-product=web] #status {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] .lb-morandi-page :is(.file-map,.checks label) {background:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] body[data-lb-product=publish] .pub-toolbar {display:flex!important;flex-wrap:wrap!important;gap:var(--lb-space-3)!important;}
:root[data-theme="light"] body[data-lb-product=publish] .pub-toolbar :is(button,.button,details) {flex:1 1 10rem!important;width:auto!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere;}
:root[data-theme="light"] body[data-lb-product] :is(input[type=checkbox],input[type=radio]) {accent-color:var(--lb-primary);}
:root[data-theme="light"] .lb-morandi-page .notice {border-color:var(--lb-border-strong)!important;}

/* Expanded library and toolbar are chrome; miniature artwork keeps its own palette. */
:root[data-theme="light"] body[data-lb-product=carousel] :is(#gallery-dialog,#template-dialog,.template-library) {background:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] body[data-lb-product=carousel] :is(#text-target,.template-tags) {color:var(--lb-text-secondary)!important;}

:root[data-theme="light"] body[data-lb-product=publish] #pubStepOne {color:var(--lb-text-secondary)!important;}
:root[data-theme="light"] body[data-lb-product=publish] #pubCustomize {background:var(--lb-surface)!important;color:var(--lb-text)!important;}
:root[data-theme="light"] #publisher .pub-platform-card[aria-pressed=true] :is(span,.pub-warning,.hint) {color:var(--lb-primary-text)!important;}
/* Production publisher mobile header: retain every existing navigation action. */
@media(max-width:819px){
body[data-lb-product=publish]{padding-left:0!important}
body[data-lb-product=publish]>.app-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;position:relative!important;inset:auto!important;width:100%!important;height:auto!important;min-height:0!important;gap:8px!important;padding:12px!important;align-items:center!important}
body[data-lb-product=publish]>.app-header .brand{grid-column:1;padding:0!important;min-width:0;font-size:20px;white-space:nowrap;letter-spacing:2px}
body[data-lb-product=publish]>.app-header .brand span{display:block;font-size:13px;letter-spacing:0}
body[data-lb-product=publish]>.app-header #sidebarNew{grid-column:2;grid-row:1;width:auto!important;white-space:nowrap;min-width:88px}
body[data-lb-product=publish]>.app-header [data-liubai-theme-toggle]{grid-column:3;grid-row:1;white-space:nowrap;min-width:76px;margin:0!important}
body[data-lb-product=publish]>.app-header nav{grid-column:1/-1;display:flex!important;flex-direction:row!important;overflow-x:auto;min-width:0;gap:4px}
body[data-lb-product=publish]>.app-header nav a{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:8px!important}
body[data-lb-product=publish]>.app-header :is(.sidebar-channels,.sidebar-bottom){display:none!important}
}

/* sign-in mode tabs: the selected tab is a selection, not a second primary button */
:root[data-theme="light"] body[data-lb-product=publish] .liubai-auth-modes button[aria-pressed=true]{background:var(--lb-selected-bg)!important;color:var(--lb-text-strong)!important;border-color:var(--lb-border-strong)!important;font-weight:700}
