/* Appearance is UI chrome, not a filter over the user's images or website.
   Keep original media, provider logos and authored preview palettes intact. */
.ml-appearance{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;gap:6px;min-height:44px;border:1px solid var(--ob-line,#ffffff30);border-radius:999px;background:transparent;color:var(--ob-ink,#f4efe4);font:500 12px/1.4 var(--sans,system-ui);margin:0}
.ml-appearance>svg{position:absolute;left:10px;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;pointer-events:none}
.ml-appearance select{appearance:auto;box-sizing:border-box;display:block;width:106px;min-height:44px;margin:0;padding:8px 8px 8px 31px;border:0;border-radius:999px;background:transparent;color:inherit;font:inherit;cursor:pointer;color-scheme:dark}
.ml-appearance select:focus-visible{outline:2px solid var(--gold,#dfbc78);outline-offset:3px}
.ml-appearance-label{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#nav .ml-appearance{order:2}#nav .burger{order:3}
.nav-brand .ml-appearance{margin-top:12px}
.hd-l .ml-appearance{margin-left:auto}
.topbar{flex-wrap:wrap}.topbar .ml-appearance{margin-left:auto}
@media(max-width:760px){.nav-brand .ml-appearance{margin:8px 0 0}.ml-appearance select{width:94px;padding-left:28px}.ml-appearance>svg{left:8px;width:15px}#nav .wide{gap:8px}#nav .burger{margin-left:0}#nav .ml-appearance{margin-left:auto}.topbar .wordmark{flex:1}.topbar .account-chip{order:3}.topbar .ml-appearance{order:2}}

html[data-theme="dark"],html[data-theme="dark"] .ml-appearance select{color-scheme:dark}
html[data-theme="light"],html[data-theme="light"] body{
 color-scheme:light;
 --ob-0:#f6f5ef;--ob-1:#fafaf6;--ob-2:#fff;--ob-3:#efefe7;--ob-4:#e7e9df;
 --ob-ink:#202921;--ob-ink2:#3d473d;--ob-muted:#596354;--ob-quiet:#626c60;
 --ob-line:#2837232b;--ob-line2:#28372318;
 --bg:#f6f5ef;--paper:#f6f5ef;--paper-hi:#fff;--paper-lo:#eeeee5;--paper-deep:#e7e9df;
 --ink:#202921;--ink-2:#3d473d;--ink2:#3d473d;--graphite:#596354;--graphite-2:#626c60;
 --line:#2837232b;--line-2:#28372318;
 --gold:#83601d;--gold-hi:#735216;--accent:#83601d;--accent-ink:#735216;--accent-wash:#83601d12;
 --brass:#83601d;--ochre:#83601d;--red:#a63224;
 --draft:#486343;--mist:#52694e;--draft-soft:#48634350;--draft-faint:#48634315;
 --mulberry:#eeeee5;--mulberry-hi:#fff;--porcelain:#202921;
 --aic-bg:transparent;--aic-panel:#ffffffed;--aic-panel-2:#f1f3ea;--aic-panel-3:#e6ebdb;
 --aic-text:#202921;--aic-muted:#596354;--aic-line:#2837232b;--aic-line-hi:#28372355;
 --u-glass-deep:#fffffff0;--u-glass-mid:#ffffffd9;--u-glass-clear:#ffffff35;--u-glass-line:#28372326;
 --member-lime:#476312;--ml-lime:#476312;--ml-focus:#597320;
 --sh-lift:0 24px 60px -28px #35402545;--sh-mount:0 12px 30px -20px #35402535;--sh-pin:0 3px 9px #35402515;
 --theme-panel:#fffffff0;--theme-soft:#eef1e6;--theme-ink:#202921;--theme-muted:#596354;--theme-border:#2837232b;
}
html[data-theme="light"]{background:#f6f5ef;background-image:none}
html[data-theme="light"] body{color:var(--theme-ink);background:transparent}
html[data-theme="light"] .ml-atmosphere,html[data-theme="light"] .sky{background:radial-gradient(ellipse at 82% 8%,#dce7c590,transparent 55%),radial-gradient(ellipse at 8% 75%,#e9d9b470,transparent 50%),#f6f5ef;opacity:1}
html[data-theme="light"] .ml-atmosphere::before,html[data-theme="light"] .ml-atmosphere::after{opacity:.25}
/* Light mode is drawn as a sparse, sharp gold constellation by the engine. */
html[data-theme="light"] #skyCanvas{mix-blend-mode:normal;opacity:1;filter:none}
/* Supplementary routes share the same sky only in their light interface. */
#skyCanvas[data-light-only]{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;display:none}
html[data-theme="light"] #skyCanvas[data-light-only]{display:block}
.light-sky-control{display:none}
html[data-theme="light"] .light-sky-control{display:block;margin-top:24px}
body:has(#skyCanvas[data-light-only])>main{position:relative;z-index:1}
/* The app's night CSS meteors yield to the shared canvas in daylight. */
html[data-theme="light"] .sky:has(~#skyCanvas[data-light-only])::before,
html[data-theme="light"] .sky:has(~#skyCanvas[data-light-only]) i{display:none}

html[data-theme="light"] .sky::before{opacity:.2;filter:brightness(.35)}
html[data-theme="light"] .sky i{background:linear-gradient(90deg,transparent,#687a47)}
html[data-theme="light"] :is(.hero-veil,.uni-veil){background:none!important}
html[data-theme="light"] #hero .hero-in{mix-blend-mode:normal}
/* Baba uses a true alpha cutout; daylight needs no dark portrait disc. */
html[data-theme="light"] #hero .plate img{filter:drop-shadow(0 14px 18px #38412b26)}
html[data-theme="light"] #hero .plate-dust,
html[data-theme="light"] #hero .arrival-lens{filter:invert(1) contrast(.55) sepia(1) saturate(1.4)}
html[data-theme="light"] .baba-hero{mix-blend-mode:normal;isolation:isolate}
html[data-theme="light"] .baba-hero:before{background:transparent;width:250px;height:250px;top:5px;border-color:#b28b3926}
html[data-theme="light"] .baba-hero img{mix-blend-mode:normal;border-radius:0;filter:drop-shadow(0 10px 16px #38412b26)}
html[data-theme="light"] :is(#nav,#nav.on-paper,#drawer,.member-header,.legal-nav,.legal-footer,.topbar,.tabbar){background:var(--theme-panel)!important;border-color:var(--theme-border);color:var(--theme-ink)}
html[data-theme="light"] :is(.paper,.launch-doc,.orders-state,.studio-navigation,.studio-info,.draft-library,.model-dialog,.install-sheet,.asset-detail,.auth-sheet){background:var(--theme-panel)!important;color:var(--theme-ink);border-color:var(--theme-border);box-shadow:var(--sh-lift)}
html[data-theme="light"] :is(dialog::backdrop){background:#27302066;backdrop-filter:blur(6px)}
html[data-theme="light"] .ml-appearance{color:var(--theme-ink);border-color:var(--theme-border)}
html[data-theme="light"] .ml-appearance select{color-scheme:light;background:transparent}
html[data-theme="light"] :is(button,a,input,textarea,select,summary):not(.br-port *):focus-visible{outline-color:#597320!important}
html[data-theme="light"] :is(input,textarea,select):not(.br-port *){accent-color:#597320}
html[data-theme="light"] :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),textarea,select):not(.ml-appearance select):not(.br-port *){color:var(--theme-ink);background-color:#ffffffed;border-color:#66795366;color-scheme:light}
html[data-theme="light"] :is(input,textarea):not(.br-port *)::placeholder{color:#697361;opacity:1}
html[data-theme="light"] :is(.btn-p,.btn.accent,.ml-btn--primary,.primary,.welcome-start,.send){background:#d2af68!important;color:#202515!important;border-color:#b39250}
html[data-theme="light"] :is(.btn-g,.btn.ghost,.secondary,[data-motion-toggle],.mini,.tool,.studio-menu-trigger,.studio-navigation button,.studio-navigation nav a,.recovery-strip button,.draft-library button,.model-dialog-close,.preview-editbar button,.preview-size-controls button,.builder-pages-button){color:var(--theme-ink);border-color:var(--theme-border);background:#ffffff85}
html[data-theme="light"] :is(.paths-heading p,.path-copy p,.home-clarity p,.home-questions p,.member-footer,.plan-card p,.plan-period,.member-section>p,.member-hero p,.account-panel p,.account-panel small,.account-content>p,.account-profile p,.member-field,.member-table caption,.member-table tbody th,.finder-result p,.finder-input small,.asset-tile>p,.asset-detail p,.draft-library>p,.draft-row small,.typing-assist,.auth-hint,.auth-seam,.auth-mark,.model-choice-copy small,.model-dialog header p,.model-dialog-note,.model-selection>small,.compact-setting,.composer-agent small,.composer-mode,.creation-welcome>p,.creation-inspiration>header>span,.signature-engine-copy p,.video-style-copy p,.video-style-copy small,.welcome-explore,.rail-note,.stage-p,.save-state,.preview-scale,.start-hint,.composer-attribution){color:var(--theme-muted)!important}
html[data-theme="light"] :is(.path-copy h3,.path-copy strong,.home-questions summary,.creation-welcome h1,.creation-inspiration h2,.signature-engine-copy h2,.creative-requirements h3,.composer-agent strong,.model-current,.account-metric,.member-table td,.member-table th,.model-choice,.website-start-form label,.studio-back,.studio-link){color:var(--theme-ink)!important}
html[data-theme="light"] :is(.home-questions a,.home-questions summary::after,.path-copy strong span,.signature-engine-copy>small,.model-catalogue-notice a,.model-check,.model-choice-signature .model-choice-copy strong,.member-kicker,.plan-tag,.member-badge,.finder-total,.reward-number,.account-nav a[aria-current="page"],.asset-nav button[aria-pressed="true"],.member-status){color:#476312!important}
html[data-theme="light"] :is(.hero-h em,.home-clarity h2 em,.member-hero h1 em,.creation-welcome h1 em,.canvas-welcome .welcome-title em,.creation-eyebrow,.model-mark-auto,.auth-notice){color:#83601d!important}
html[data-theme="light"] :is(.home-clarity,.path-card,.path-copy strong,.home-questions details,.member-footer,.member-table-wrap,.member-table td,.member-table th,.finder-result,.account-nav .account-support,.model-toolbar,.model-dialog-note,.draft-row){border-color:var(--theme-border)}

/* Member pages: plans, credit history, account and durable assets. */
html[data-theme="light"] :is(.plan-card,.plan-finder,.member-faq details,.account-panel,.account-lock,.asset-prompt,.member-notice){background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-border)}
html[data-theme="light"] .plan-card.featured{background:linear-gradient(145deg,#e5efcc,#ffffffed 70%);border-color:#79994580}
html[data-theme="light"] :is(.plan-card ul,.member-faq details p,.member-header nav a,.account-nav a,.member-footer a){color:var(--theme-muted)}
html[data-theme="light"] .member-button.secondary{background:#ffffffb5;color:var(--theme-ink);border-color:var(--theme-border)}
html[data-theme="light"] .member-button:not(.secondary){background:#d2f86a;color:#1d290d}
html[data-theme="light"] :is(.member-badge,.account-nav a[aria-current="page"],.asset-nav button[aria-pressed="true"]){background:#e6efcf;border-color:#79994565}
html[data-theme="light"] .member-toast{background:#e8f0d5;color:#263a13;border-color:#79994565}
html[data-theme="light"] :is(.asset-preview,.asset-favourite){background:#e6ebd9;color:#476312;border-color:var(--theme-border)}

/* Creation tools: preserve dark logo tiles and overlays on photographs. */
html[data-theme="light"] body.content-studio .model-picker{background:#fafbf5ed;border-color:var(--theme-border)}
html[data-theme="light"] body.content-studio :is(.composer,.settings-body,.studio-controls>.sheet,.studio-grid .canvas){background:var(--theme-panel)!important;color:var(--theme-ink);border-color:var(--theme-border)}
html[data-theme="light"] body.content-studio .cmp-input{color:var(--theme-ink);background:transparent}
html[data-theme="light"] body.content-studio .cmp-input::placeholder{color:#697361}
html[data-theme="light"] .signature-engine{background:linear-gradient(115deg,#e8efdb,#fafbf5);border-color:#7c944666;color:var(--theme-ink)}
html[data-theme="light"] :is(.signature-engine-actions button,.model-nav-tab){color:#3c4b2c;background:transparent;border-color:#6a814450}
html[data-theme="light"] :is(.signature-engine-actions button[aria-pressed="true"],.model-nav-tab[aria-pressed="true"],.model-choice[aria-pressed="true"],.composer-agent-mode[data-auto="true"]){background:#e4efc9;color:#3c5710;border-color:#759436}
html[data-theme="light"] .model-choice-signature{background:#eff5df;border-color:#75943665}
html[data-theme="light"] .model-nav-tab img{background:#283023;border-radius:5px;padding:2px;opacity:1}
html[data-theme="light"] .model-current-icon:has(img){background:#283023;border-radius:4px;padding:2px}
html[data-theme="light"] .model-choice:hover{background:#edf1e5}
html[data-theme="light"] .model-mark{background:#242a27}
html[data-theme="light"] .model-mark-auto{background:#eee9d6}
html[data-theme="light"] :is(.composer-agent-mode,.typing-assist button,.creative-requirements,.recovery-strip){background:#f0f2e6;color:var(--theme-ink);border-color:var(--theme-border)}
html[data-theme="light"] body.content-studio :is(.creative-settings>summary,.cmp-tools .tool){color:var(--theme-muted)}

/* Builder chrome only: .br-port and its authored client preview stay intact. */
html[data-theme="light"] body.builder-easy :is(.foot .notice,.dock,.br-bar,.preview-editbar,.canvas-welcome){color:var(--theme-muted);background:var(--theme-panel);border-color:var(--theme-border)}
html[data-theme="light"] body.builder-easy .canvas-welcome{background:transparent!important}
html[data-theme="light"] body.builder-easy :is(.cm-input,.welcome-explore,.preview-editbar>small){color:var(--theme-muted)}
html[data-theme="light"] .preview-size-controls button[aria-pressed="true"]{background:#e4efc9;color:#3c5710;border-color:#759436}

/* Pocket studio uses the same choice, including offline visits. */
html[data-theme="light"] :is(.app-shell .muted,.intro p,.tool-card small,.feature p,.starter small,.home-footer,.page-head p,.studio-settings label,.studio-settings .live,.empty p,.composer label,.composer-bottom small,.save-line,.writing-top p,.chapter p,.chapter p.direction,.review-note,.details summary,.details-body label,.project-copy small,.project-menu button,.profile-card p,.list-links span,.install-sheet p,.install-sheet li){color:var(--theme-muted)}
html[data-theme="light"] :is(.tool-card,.feature,.agent-note,.studio-settings,.prompt,.app-shell .composer,.writing-card,.project-card,.profile-card,.details-body input,.details-body textarea,.search,.message.user){color:var(--theme-ink);background:var(--theme-panel);border-color:var(--theme-border);box-shadow:none}
html[data-theme="light"] .studio-settings select{background:#fff;color:var(--theme-ink)}
html[data-theme="light"] :is(.connection,.error-box){background:#f3ead5;color:#6c4815;border-color:#a47e4445}
html[data-theme="light"] :is(.starter,.chapter,.tabbar,.app-shell){border-color:var(--theme-border)}
html[data-theme="light"] .tabbar a{color:var(--theme-muted)}
html[data-theme="light"] .tabbar a[aria-current="page"]{color:#735216}
html[data-theme="light"] .auth-err{color:#a63224}
html[data-theme="light"] body.u-night dialog.auth{background:#fffffff5!important;--ink:#202921;--ink-2:#3d473d;--graphite:#596354;--graphite-2:#626c60;--paper:#f6f5ef;--paper-hi:#fff;--line:#2837232b;--accent:#83601d;--accent-ink:#735216;--red:#a63224;color:var(--theme-ink)}
html[data-theme="light"] body.content-studio :is(.studio-head,.workspace-state){background:var(--theme-panel)!important;border-color:var(--theme-border)}
html[data-theme="light"] body.content-studio :is(.nav-action,.nav-action.is-active,.nav-action:hover,.creative-settings>summary){color:var(--theme-ink)}
html[data-theme="light"] body.content-studio .nav-action.is-active{background:#e4efc9;border-color:#75943665}
html[data-theme="light"] body.content-studio[data-view="studio"] .composer{box-shadow:0 12px 36px -20px #52643335}
html[data-theme="light"] :is(.agent-powered,.agent-attribution,.paths-heading .lbl,.paths-heading h2 em,.draft-library .draft-import-status){color:var(--theme-muted)}
html[data-theme="light"] .orders-nav{background:var(--theme-panel);border-color:var(--theme-border)}
html[data-theme="light"] body:has(#resetStatus) :is(p,small){color:var(--theme-muted)}
html[data-theme="light"] body:has(#resetStatus) :is(a,#resetStatus){color:#735216}
html[data-theme="light"] body.builder-easy .rail:not(.open){box-shadow:none}
html[data-theme="light"] :is(.agent-caption small,.welcome-eyebrow,.blueprint-heading>span,.blueprint-heading p,.blueprint-section .mono-s){color:var(--theme-muted)!important}
html[data-theme="light"] :is(.blueprint-heading h2,.blueprint-section h3,.blueprint-arrow){color:var(--theme-ink)!important}
html[data-theme="light"] :is(.blueprint-pages button,.blueprint-section,.dockbtn){color:var(--theme-ink);background:var(--theme-panel)!important;border-color:var(--theme-border)}
html[data-theme="light"] :is(.blueprint-pages button[aria-pressed="true"],.blueprint-section[aria-pressed="true"]){background:#e4efc9!important;border-color:#759436;color:#3c5710}
html[data-theme="light"] .blueprint-lines i{background:#6b7b4940}
html[data-theme="light"] .ma-bubble{color:var(--theme-ink);background:#fff;border-color:var(--theme-border);box-shadow:var(--sh-lift)}
html[data-theme="light"] :is(.ma-credit,.ma-x,.ma-who){color:var(--theme-muted)}
html[data-theme="light"] body.u-night dialog.auth .auth-actions .btn.ghost{color:var(--theme-ink);border-color:var(--theme-border);background:#fff}
html[data-theme="light"] .member-button.secondary[aria-pressed="true"]{background:#e4efc9;color:#3c5710;border-color:#759436}
html[data-theme="light"] body.content-studio .nav-login{color:var(--theme-ink);border-color:var(--theme-border);background:#fff}
@media(forced-colors:active){.ml-appearance{border-color:ButtonText}.ml-appearance select{forced-color-adjust:auto}}
