/* Shared palette. Illustrations and photographs keep their original colours. */
:root{color-scheme:light;--theme-surface:#fff;--theme-soft:#edf0e8;--theme-text:#292e29;--theme-muted:#6b7862;--theme-border:#e4e7dc}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;min-width:76px;min-height:34px;padding:7px 10px!important;border:1px solid var(--theme-border)!important;border-radius:7px;background:var(--theme-surface)!important;color:var(--theme-text)!important;font:500 11px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;cursor:pointer;white-space:nowrap;transition:background .15s}
.theme-toggle:hover{background:var(--theme-soft)!important}.theme-toggle:focus-visible{outline:3px solid #9aafff;outline-offset:3px}.theme-toggle-floating{position:fixed;z-index:50;top:20px;right:22px;box-shadow:0 3px 12px #1111110c}
html[data-theme=dark]{color-scheme:dark;--paper:#171c20;--sidebar:#1b2226;--white:#222a30;--card:#222a30;--ink:#e7e9e1;--muted:#a5b0a4;--line:#374139;--blue:#91aaff;--blue-deep:#acc0ff;--blue-soft:#29354d;--blue-pale:#283346;--green:#a3b99a;--theme-surface:#222a30;--theme-soft:#2c3837;--theme-text:#e7e9e1;--theme-muted:#abb8a6;--theme-border:#3c4841;background:var(--paper);color:var(--ink)}
html[data-theme=dark] body{background:var(--paper);color:var(--ink)}
html[data-theme=dark] :is(input,textarea,select){background:#1d252a;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#9aa892}
html[data-theme=dark] :is(.site-header,.topbar){background:var(--paper);border-color:var(--line)}
html[data-theme=dark] :is(.project-card,.panel,.recent-file,.loading-card,.login-card,.dialog,.copy-panel,.image-card,.image-card-button,.queue-card,.queue-metrics>div,.media-mode-picker>label,.schedule-review-item,.queue-detail-copy,.outbox-summary,.manual-copy){background:var(--white);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] :is(.sidebar,.account,.panel-footer,.notebook-toolbar,.notebook-footer,.task-form,.task-row,.file-row,.workspace-footer,.site-footer,.dialog-heading,.drafts-footer,.selected-image,.sources-block,.queue-toolbar,.queue-card,.queue-metrics>div,.draft-item){border-color:var(--line)}
html[data-theme=dark] :is(.button.primary,.primary,#login-form>button){background:#4866d9;color:#fff}
html[data-theme=dark] :is(.button.primary,.primary,#login-form>button):hover{background:#5875e8;color:#fff}
html[data-theme=dark] :is(.button.secondary,.project-app-icon,.plus,.channel-avatar){background:#29354d;color:#b4c5ff;border-color:#425477}
html[data-theme=dark] :is(.button.quiet,.secondary,.add-project-card){border-color:#495746;color:#b0c3a0}
html[data-theme=dark] :is(.icon-button,.text-button,.project-open,.file-name a,.recent-file strong,.notebook-label,.source-link,.text-link){color:#b0c4a1}
html[data-theme=dark] :is(.icon-button,.nav-item,.quick-link):hover{background:#2d3831;color:#d0dfc4}
html[data-theme=dark] :is(.nav-item.active,.tab.active,.draft-item.active,.draft-item.active:hover){background:#2b3834;color:#c3d7b5}
html[data-theme=dark] :is(.nav-item.active>span:first-child,.breadcrumbs strong,.today-card strong,.task-copy>span,.home-note-preview,.notebook>textarea,.small-dialog>p,.account-intro,.page-description,.nav-item,.quick-link,.space-note,.project-card p,.guide-steps article p){color:#bbc6b2}
html[data-theme=dark] :is(.eyebrow,.sidebar-section-label,.brand i,.brand small,.nav-count,.nav-shortcut,.account>div>span,.breadcrumbs>span:first-child,.breadcrumbs>span:nth-child(2),.global-search,.global-search kbd,.section-heading h2>span,.project-placeholder-link,.project-status.paused,.home-note-preview.empty,.file-dropzone>span,.file-dropzone p,.file-dropzone strong,.file-row,.file-list-heading,.notebook-toolbar,.notebook-footer,.panel-footer,.task-tally,.completed-toggle,.task-due,.view-toolbar>span,.workspace-footer,.workspace-footer>a,.empty-state,.login-bottom,.footnote,.intro,.story-footer,.story-copy>p:not(.eyebrow),.card-eyebrow,.today-card>span:not(.eyebrow):not(.today-line):not(.today-star)){color:#a9b6a0}
html[data-theme=dark] :is(.draft-item .draft-meta,.draft-item .draft-bottom,.drafts-footer,.field-label,.body-label>span,.editor-meta label,.selected-image>div>span,.required-note,.field-help,.source-link small,.editor-note,.live-dot,.copy-panel>p,.privacy-note,.library-toolbar>span,.image-card-copy p,.image-card-bottom span,.guide-aside p,.dialog>p,.queue-metrics>div>span,.queue-metrics small,.queue-toolbar p,.queue-empty p,.queue-card-kicker>span:not(.queue-badge),.queue-card-time,.queue-card-time small,.queue-footnote,.settings-step p,.settings-note,.publishing-status>span:last-child,.connection-facts,.support-card p,.schedule-fields>label,.media-mode-picker small,.bulk-post-row small,.schedule-review .section-heading>span,.schedule-review-item p,.schedule-review-item pre,.queue-detail-meta,.outbox-summary,.outbox-summary small,.save-state,.tab,.page-heading .eyebrow,.page-heading p){color:#acb7a2}
html[data-theme=dark] :is(.dialog form>label,.dialog .form-row>label,.dialog form>label>small,.checkbox-label,#login-form>label){color:#b6c8a8}
html[data-theme=dark] :is(.search-field,.selected-image,.file-dropzone,.note-icon,.file-symbol,.avatar,.dropzone-icon,.task-add,.post-status,.project-status,.connection-badge,.queue-service-bar,.queue-badge,.check-tag,.saved-note){background:#2a3831;color:#b4cda7;border-color:#43523e}
html[data-theme=dark] :is(.project-status.planned,.check-tag.recheck,.inline-warning,.notes-conflict,.connection-error,.form-error,.bot-result.error,.queue-status-error){background:#40352b;color:#f0caa4;border-color:#66503a}
html[data-theme=dark] :is(.post-status[data-status=ready],.post-status[data-status=published],.queue-badge.queued,.queue-badge.sending,.queue-badge.sent,.connection-badge.connected,.bot-result,.media-mode-picker>label:has(input:checked)){background:#293a43;color:#bdd4e8;border-color:#45586e}
html[data-theme=dark] :is(.queue-badge.failed,.queue-badge.uncertain){background:#44382e;color:#edc6a0}
html[data-theme=dark] :is(.queue-badge.cancelled,.project-status.paused){background:#333c37;color:#bdc4b8}
html[data-theme=dark] :is(.draft-item:hover,.add-project-card:hover,.file-dropzone.dragover){background:#28332f;border-color:#536849}
html[data-theme=dark] .login-story{background:#1c2527;border-color:var(--line)}
html[data-theme=dark] .story-decoration{color:#2c3832}
html[data-theme=dark] .story-tags>span{background:#26322e;color:#b0c4a0;border-color:#43523b}
html[data-theme=dark] .story-tags i{color:#bdcea9}
html[data-theme=dark] .sky-art{background:linear-gradient(145deg,#27334c,#202d2b);border-color:#475374}
html[data-theme=dark] :is(.art-topline,.art-bottomline){color:#b2bfd6}
html[data-theme=dark] .saved-note p{color:#bdc9b7}
html[data-theme=dark] .phone-preview{background:#202e2c;border-color:#3e4d49}
html[data-theme=dark] .telegram-body{background-color:#263631}
html[data-theme=dark] :is(.telegram-header,.telegram-post,.preview-media){background:#253139}
html[data-theme=dark] :is(.telegram-header>div>span,.telegram-menu,.telegram-post-meta,.preview-caption){color:#b0bfaa}
html[data-theme=dark] .date-pill{background:#405447;color:#e0e9d9}
html[data-theme=dark] .preview-media>span{background:#303b32ed;color:#d0dbc2}
html[data-theme=dark] .dialog::backdrop{background:#030706aa}
html[data-theme=dark] :is(.queue-card-image,.selected-image>img){background:#25312d}
html[data-theme=dark] :is(.url-input.invalid,.queue-card-error,.field-help.invalid,.text-button.danger,.body-label>span.over-limit,.schedule-review-item p.invalid){color:#edb99a}
html[data-theme=dark] .url-input.invalid{background:#382f2c;border-color:#b47d62}
html[data-theme=dark] .today-line{background:var(--line)}
@media(max-width:900px){.topbar{gap:14px}.theme-toggle{min-width:65px;padding:7px!important;font-size:10px!important}.header-tools .theme-toggle{display:inline-flex!important}.header-tools{gap:6px}}
@media(max-width:650px){.topbar .theme-toggle{margin-left:auto}.topbar .start-page-link{display:none}.site-header nav .theme-toggle{min-width:57px}.theme-toggle-floating{top:14px;right:14px}.site-header:has(.workspace-link) nav{gap:10px}}
.theme-toggle{width:auto!important;margin:0!important;text-transform:none;letter-spacing:normal}.theme-toggle:hover{transform:none!important}
@media(max-width:650px){.site-header:has(.workspace-link){height:auto;min-height:79px;padding:18px 0;flex-wrap:wrap;gap:12px}.site-header:has(.workspace-link) nav{flex-wrap:wrap;align-items:center}}

/* Appearance presets share the same contrast and component structure. */
html[data-style=sage]{--theme-page:#f7f6f2;--theme-sidebar:#eef1e9;--theme-surface:#fff;--theme-field:#fdfefb;--theme-soft:#e5eee5;--theme-text:#29352d;--theme-muted:#5b695b;--theme-border:#dfe5da;--theme-accent:#3b6450;--theme-accent-hover:#2e513f;--theme-accent-text:#345841}
html[data-theme=dark][data-style=sage]{--theme-page:#171f1b;--theme-sidebar:#1c2620;--theme-surface:#242f28;--theme-field:#1c261f;--theme-soft:#2c4133;--theme-text:#e8eee7;--theme-muted:#b0c1ae;--theme-border:#3c4d3f;--theme-accent:#3f6a55;--theme-accent-hover:#497c62;--theme-accent-text:#b8d8c4}
html[data-style=ocean]{--theme-page:#f5f8fa;--theme-sidebar:#eaf0f4;--theme-surface:#fff;--theme-field:#fbfdfe;--theme-soft:#e2edf3;--theme-text:#283640;--theme-muted:#536975;--theme-border:#dae3e9;--theme-accent:#2f607b;--theme-accent-hover:#234b62;--theme-accent-text:#234c63}
html[data-theme=dark][data-style=ocean]{--theme-page:#151e25;--theme-sidebar:#1a252e;--theme-surface:#1f2c36;--theme-field:#19252e;--theme-soft:#263d4c;--theme-text:#e7eef3;--theme-muted:#a7bbc8;--theme-border:#354b59;--theme-accent:#355f7c;--theme-accent-hover:#406f8e;--theme-accent-text:#a8cfe8}
html[data-style=lavender]{--theme-page:#f8f6fa;--theme-sidebar:#f0ecf5;--theme-surface:#fff;--theme-field:#fdfbff;--theme-soft:#ece5f3;--theme-text:#332c3d;--theme-muted:#6b5e77;--theme-border:#e4ddeb;--theme-accent:#6b5487;--theme-accent-hover:#55416e;--theme-accent-text:#5c4776}
html[data-theme=dark][data-style=lavender]{--theme-page:#201c27;--theme-sidebar:#252130;--theme-surface:#2d2837;--theme-field:#241f2d;--theme-soft:#3a3049;--theme-text:#eee8f5;--theme-muted:#bdb0ce;--theme-border:#4c425b;--theme-accent:#685184;--theme-accent-hover:#795f98;--theme-accent-text:#d1bee8}
html[data-style=amber]{--theme-page:#faf7f1;--theme-sidebar:#f3ede3;--theme-surface:#fff;--theme-field:#fffdf9;--theme-soft:#f3e8d6;--theme-text:#3a3025;--theme-muted:#73624b;--theme-border:#e7decf;--theme-accent:#89612d;--theme-accent-hover:#6e4b21;--theme-accent-text:#735023}
html[data-theme=dark][data-style=amber]{--theme-page:#241f18;--theme-sidebar:#2b251c;--theme-surface:#332c22;--theme-field:#292218;--theme-soft:#443725;--theme-text:#f3ebdd;--theme-muted:#c9b99d;--theme-border:#514635;--theme-accent:#805b2b;--theme-accent-hover:#926a35;--theme-accent-text:#e1c395}
html[data-style]{--paper:var(--theme-page);--sidebar:var(--theme-sidebar);--white:var(--theme-surface);--card:var(--theme-surface);--ink:var(--theme-text);--muted:var(--theme-muted);--line:var(--theme-border);--blue:var(--theme-accent-text);--blue-deep:var(--theme-accent-text);--blue-soft:var(--theme-soft);--blue-pale:var(--theme-soft);--green:var(--theme-accent-text);--theme-button:var(--theme-accent);--theme-button-hover:var(--theme-accent-hover);background:var(--paper);accent-color:var(--theme-accent)}
html[data-style] body:not(.start-page){background:var(--paper);color:var(--ink)}
html[data-style] body:not(.start-page) :is(input,textarea,select){background:var(--theme-field);color:var(--theme-text);border-color:var(--theme-border)}
html[data-style] body:not(.start-page) :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
html[data-style] body:not(.start-page) :is(button,a,input,textarea,select):focus-visible{outline-color:var(--theme-accent-text)}
html[data-style] body:not(.start-page) :is(.site-header,.topbar){background:var(--paper);border-color:var(--line)}
html[data-style] body:not(.start-page) :is(.project-card,.panel,.recent-file,.loading-card,.login-card,.dialog,.copy-panel,.image-card,.image-card-button,.queue-card,.queue-metrics>div,.media-mode-picker>label,.schedule-review-item,.queue-detail-copy,.outbox-summary,.manual-copy,.exchange-card){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
html[data-style] body:not(.start-page) :is(.sidebar,.account,.panel-footer,.notebook-toolbar,.notebook-footer,.task-form,.task-row,.file-row,.workspace-footer,.site-footer,.dialog-heading,.drafts-footer,.selected-image,.sources-block,.queue-toolbar,.queue-card,.draft-item){border-color:var(--line)}
html[data-style] body:not(.start-page) :is(.button.primary,.primary,#login-form>button){background:var(--theme-button);color:#fff}
html[data-style] body:not(.start-page) :is(.button.primary,.primary,#login-form>button):hover{background:var(--theme-button-hover);color:#fff}
html[data-style] body:not(.start-page) :is(.button.secondary,.project-app-icon,.plus,.channel-avatar,.search-field,.file-dropzone,.note-icon,.file-symbol,.avatar,.dropzone-icon,.task-add){background:var(--theme-soft);color:var(--theme-accent-text);border-color:var(--theme-border)}
html[data-style] body:not(.start-page) :is(.button.quiet,.secondary,.add-project-card){border-color:var(--theme-border);color:var(--theme-accent-text)}
html[data-style] body:not(.start-page) :is(.icon-button,.text-button,.project-open,.file-name a,.recent-file strong,.notebook-label,.source-link,.text-link,.breadcrumbs strong,.today-card strong,.task-copy>span,.home-note-preview,.notebook>textarea){color:var(--theme-accent-text)}
html[data-style] body:not(.start-page) :is(.icon-button,.nav-item,.quick-link):hover{background:var(--theme-soft);color:var(--theme-accent-text)}
html[data-style] body:not(.start-page) :is(.nav-item.active,.tab.active,.draft-item.active,.draft-item.active:hover){background:var(--theme-soft);color:var(--theme-accent-text)}
html[data-style] body:not(.start-page) :is(.nav-item.active>span:first-child,.nav-item,.quick-link,.small-dialog>p,.account-intro,.page-description,.space-note,.project-card p,.guide-steps article p,.eyebrow,.sidebar-section-label,.brand i,.brand small,.nav-count,.nav-shortcut,.account>div>span,.global-search,.global-search kbd,.section-heading h2>span,.project-placeholder-link,.home-note-preview.empty,.file-dropzone>span,.file-dropzone p,.file-dropzone strong,.file-row,.file-list-heading,.notebook-toolbar,.notebook-footer,.panel-footer,.task-tally,.completed-toggle,.task-due,.view-toolbar>span,.workspace-footer,.workspace-footer>a,.empty-state,.login-bottom,.footnote,.intro,.story-footer,.story-copy>p:not(.eyebrow),.card-eyebrow){color:var(--theme-muted)}
html[data-style] body:not(.start-page) :is(.draft-item .draft-meta,.draft-item .draft-bottom,.drafts-footer,.field-label,.body-label>span,.editor-meta label,.selected-image>div>span,.required-note,.field-help,.source-link small,.editor-note,.live-dot,.copy-panel>p,.privacy-note,.library-toolbar>span,.image-card-copy p,.image-card-bottom span,.guide-aside p,.dialog>p,.queue-metrics>div>span,.queue-metrics small,.queue-toolbar p,.queue-empty p,.queue-card-kicker>span:not(.queue-badge),.queue-card-time,.queue-card-time small,.queue-footnote,.settings-step p,.settings-note,.publishing-status>span:last-child,.connection-facts,.support-card p,.schedule-fields>label,.media-mode-picker small,.bulk-post-row small,.schedule-review .section-heading>span,.schedule-review-item p,.schedule-review-item pre,.queue-detail-meta,.outbox-summary,.outbox-summary small,.save-state,.tab,.page-heading .eyebrow,.page-heading p){color:var(--theme-muted)}
html[data-style] body:not(.start-page) :is(.dialog form>label,.dialog .form-row>label,.dialog form>label>small,.checkbox-label,#login-form>label){color:var(--theme-accent-text)}
html[data-style] .login-story{background:var(--theme-sidebar);border-color:var(--theme-border)}
html[data-style] .story-decoration{color:var(--theme-soft)}
html[data-style] .story-tags>span{background:var(--theme-soft);color:var(--theme-accent-text);border-color:var(--theme-border)}
html[data-style] .story-tags i{color:var(--theme-accent-text)}
html[data-style] .start-page .settings-dialog{--sheet-bg:var(--theme-page);--sheet-text:var(--theme-text);--sheet-muted:var(--theme-muted);--sheet-border:var(--theme-border);--sheet-field:var(--theme-field)}
html[data-style] .start-page .settings-dialog .primary-button{background:var(--theme-button);border-color:var(--theme-button);color:#fff}
html[data-style] .start-page .settings-dialog :focus-visible{outline-color:var(--theme-accent-text)}
html[data-style]{--theme-danger:#a5362c}
html[data-theme=dark][data-style]{--theme-danger:#f0b199}
html[data-style] body:not(.start-page) :is(.field-help.invalid,.text-button.danger,.body-label>span.over-limit,.schedule-review-item p.invalid,.queue-card-error,.url-input.invalid){color:var(--theme-danger)}
html[data-style] body:not(.start-page) .url-input.invalid{border-color:var(--theme-danger)}

/* Compact spacing leaves the photographic start page and touch targets intact. */
html[data-density=compact] body:not(.start-page) .topbar{height:64px;gap:18px}
html[data-density=compact] body:not(.start-page) .page-heading{padding-top:30px;padding-bottom:25px}
html[data-density=compact] body:not(.start-page) :is(.project-grid,.recent-file-list){gap:12px}
html[data-density=compact] body:not(.start-page) .project-card{padding:15px 17px;min-height:185px}
html[data-density=compact] body:not(.start-page) .project-card-top{margin-bottom:15px}
html[data-density=compact] body:not(.start-page) .project-card-bottom{margin-top:13px}
html[data-density=compact] body:not(.start-page) .add-project-card{min-height:185px;padding:16px}
html[data-density=compact] body:not(.start-page) .panel-heading{padding:16px 18px 11px}
html[data-density=compact] body:not(.start-page) .home-note-preview{padding:8px 18px 18px;min-height:140px}
html[data-density=compact] body:not(.start-page) .panel-footer{padding:10px 18px}
html[data-density=compact] body:not(.start-page) .recent-file{padding:11px 14px}
html[data-density=compact] body:not(.start-page) .file-row{padding-top:10px;padding-bottom:10px}
html[data-density=compact] body:not(.start-page) .task-row{padding-top:7px;padding-bottom:7px}
html[data-density=compact] body:not(.start-page) .home-lower-grid{margin-top:22px;gap:15px}
html[data-density=compact] body:not(.start-page) .recent-files{margin-top:24px}
html[data-density=compact] body:not(.start-page) .workspace-footer{margin-top:30px;padding-top:18px;padding-bottom:20px}
html[data-density=compact] body:not(.start-page) :is(.queue-card,.schedule-review-item){padding-top:14px;padding-bottom:14px}
html[data-density=compact] body:not(.start-page) .draft-item{padding-top:12px;padding-bottom:12px}
html[data-density=compact] body:not(.start-page) :is(.login-card,.dialog){padding-top:25px;padding-bottom:23px}
@media(max-width:650px){html[data-density=compact] body:not(.start-page) .topbar{height:auto;min-height:64px;gap:12px}html[data-density=compact] body:not(.start-page) .page-heading{padding-top:27px;padding-bottom:23px}}
