/* 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]) {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"] body[data-lb-product=publish] .pub-platform-card[aria-pressed=true] :is(span,.pub-warning,.hint) {color:var(--lb-primary-text)!important;}
