:root[data-ui-theme=light]{color-scheme:light}
:root[data-ui-theme=dark]{color-scheme:dark;--ui-bg:#111b20;--ui-surface:#1b292f;--ui-soft:#24383e;--ui-ink:#edf5f4;--ui-muted:#b6c9cb;--ui-line:#536b72;--ui-accent:#70d8d5}
.shell .theme-toggle{flex:none;width:44px;min-height:44px;padding:4px;font-size:23px;line-height:1}
html[data-ui-theme=dark] body{background:var(--ui-bg);color:var(--ui-ink)}
html[data-ui-theme=dark] .shell,html[data-ui-theme=dark] .shell button,html[data-ui-theme=dark] .mobile-space-switcher{background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-ui-theme=dark] .shell a{color:var(--ui-ink)}
html[data-ui-theme=dark] .shell button[aria-current=page]{background:var(--ui-accent);color:#102a30}
html[data-ui-theme=dark] .demo-warning,html[data-ui-theme=dark] .coach-v2-note,html[data-ui-theme=dark] .escaparate-v1-notice{background:var(--ui-soft);color:var(--ui-ink)}
html[data-ui-theme=dark] .account-ui{--account-ink:var(--ui-ink);--account-teal:var(--ui-accent);--account-paper:var(--ui-bg);--account-white:var(--ui-surface);--account-line:var(--ui-line);--account-muted:var(--ui-muted)}
html[data-ui-theme=dark] .persistent-lab{--persistent-ink:var(--ui-ink);--persistent-teal:var(--ui-accent);--persistent-paper:var(--ui-bg);--persistent-white:var(--ui-surface);--persistent-line:var(--ui-line);--persistent-muted:var(--ui-muted)}
html[data-ui-theme=dark] .commerce-app{--ink:var(--ui-ink);--muted:var(--ui-muted);--line:var(--ui-line);--paper:var(--ui-bg);--green:#70d8d5}
html[data-ui-theme=dark] :is(.account-ui,.commerce-app,.persistent-lab) :is(input,select,textarea,button,[class$="card"],[class$="form"],[class$="detail"]){background-color:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-ui-theme=dark] :is(.account-ui,.commerce-app,.persistent-lab) :is(button:hover,a:hover){color:var(--ui-accent)}
html[data-ui-theme=dark] :is(.account-ui,.commerce-app,.persistent-lab) :is(.account-primary,.commerce-primary){background:#087f87;color:white}
html[data-ui-theme=dark] :is(.account-ui,.commerce-app,.persistent-lab) a{color:var(--ui-accent)}
html[data-ui-theme=dark] .platform-install-dialog{background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-ui-theme=dark] .platform-install-online-note{background:var(--ui-soft);border-color:var(--ui-accent)}
html[data-ui-theme=dark] .platform-install-status{color:var(--ui-muted)}
html[data-ui-theme=dark] .platform-install-dialog button{background:var(--ui-soft);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-ui-theme=dark] :focus-visible{outline-color:var(--ui-accent)}
html[data-ui-theme=dark] .commerce-app :is(.commerce-sample,.commerce-private-note,.commerce-product-preview,.commerce-create-chooser,.commerce-authoring-section,.commerce-profile-editor,.commerce-create-options article,.commerce-pdf-files,.commerce-profile-summary,.commerce-product-actions,.commerce-pdf-message){background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-ui-theme=dark] .commerce-app :is(.commerce-demo,.commerce-kicker){color:var(--ui-muted)}
html[data-ui-theme=dark] .persistent-lab :is(.persistent-session-bar,.persistent-account-actions,.persistent-selection-notice,.persistent-reminder-details,.persistent-record,.persistent-relationship,.persistent-explainer,.persistent-caution,.persistent-messages,.persistent-message,.persistent-footer,.persistent-version-content,.persistent-delete-confirm){background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-line)}
html[data-ui-theme=dark] .persistent-lab :is(.persistent-relationship[aria-current],.persistent-agenda-item[aria-pressed=true]){background:var(--ui-soft);color:var(--ui-ink);border-color:var(--ui-accent)}
html[data-ui-theme=dark] .persistent-lab .persistent-primary{background:#087f87;color:#fff;border-color:#087f87}
/* Creator-designed previews retain their own palette, not the editor's theme. */
html[data-ui-theme=dark] .commerce-app :is(.commerce-creator-presentation,.commerce-showcase-blocks) :is(button,input,select,textarea){background:#fff;color:var(--ink)}
html[data-ui-theme=dark] .account-ui :is(.account-google-entry-button,.google-preflight-button){background:#fff;color:#1f1f1f;border-color:#747775}
html[data-ui-theme=dark] .account-ui :is(.account-google-entry-button,.google-preflight-button):hover:not(:disabled){background:#f8f9fa;color:#1f1f1f;border-color:#5f6368}
html[data-ui-theme=dark] .account-ui :is(.account-google-entry-button,.google-preflight-button):disabled{background:#f1f3f4;color:#5f6368;border-color:#747775}
@media(max-width:900px){.shell .theme-toggle{width:36px;min-width:36px}.shell{gap:6px}.shell button[data-space=account]{max-width:66px!important}}

/* Account actions in the embedded Coach view float above the iframe without reserving a header row. */
.coach-exact-mode .coach-exact-account-shell{position:fixed;inset-block-start:12px;inset-inline-end:12px;z-index:1000;pointer-events:none}
.coach-exact-mode .coach-exact-account-menu{position:relative;width:min(320px,calc(100vw - 24px));min-width:0;pointer-events:auto}
.coach-exact-mode .coach-exact-account-menu>summary{display:none}
.coach-exact-mode .coach-exact-account-menu>.persistent-account-actions{position:absolute;inset-block-start:0;inset-inline:auto 0;width:min(320px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;box-sizing:border-box;margin:0;padding:12px;border:1px solid var(--persistent-line,#d7e1db);border-radius:14px;background:var(--persistent-white,#fff);color:var(--persistent-ink,#18352e);box-shadow:0 12px 32px #10251f30}
.coach-exact-mode .coach-exact-account-menu:not([open])>.persistent-account-actions{display:none}
.coach-exact-mode .coach-exact-account-menu .persistent-account-heading{margin:2px 0 6px}
.coach-exact-mode .coach-exact-account-menu .persistent-button{min-height:44px}
