/* Theme tokens change the app around the work, never canvas/export colors. */
html[data-theme="starry"] body.aether-ui { --paper:#0b1224; --surface:#172238; --ink:#e8edf8; --muted:#b4c1d8; --line:#384966; --soft:#263654; --accent:#aac5ff; --theme-action:#29487c; --theme-on-action:#fff; }
html[data-theme="solar"] body.aether-ui { --paper:#edf3dd; --surface:#fcfff4; --ink:#253d2d; --muted:#536650; --line:#bdcfaa; --soft:#dcebc8; --accent:#35603b; --theme-action:#35603b; --theme-on-action:#fff; }
html[data-theme="cyber"] body.aether-ui { --paper:#140e22; --surface:#241a35; --ink:#f3eafb; --muted:#c9b8db; --line:#574269; --soft:#392547; --accent:#edb2f4; --theme-action:#67376f; --theme-on-action:#fff; }
html[data-theme="paper"] body.aether-ui { --paper:#efe4d3; --surface:#fff9ed; --ink:#493a30; --muted:#6b5545; --line:#d6bea5; --soft:#eed8bf; --accent:#895038; --theme-action:#895038; --theme-on-action:#fff; }
html[data-theme]:not([data-theme="default"]) { background:var(--theme-page,#0b1224); }
html[data-theme="solar"] { --theme-page:#edf3dd; }
html[data-theme="cyber"] { --theme-page:#140e22; }
html[data-theme="paper"] { --theme-page:#efe4d3; }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(header,nav) { background:var(--paper) !important; }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(.creation-card,.creation-card .prose,.creation-meta p,.creation-meta a,.post-title,#profile-author-name,.profile-stats dd,#profile-bio,.brand-home,.project-workspace) { color:var(--ink) !important; }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(.creation-card time,.creation-actions button,.post-comments,.profile-eyebrow,#profile-handle,.profile-stats dt,.profile-tabs button,.profile-filters,.project-workspace small) { color:var(--muted); }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(.project-workspace,.project-menu-panel,.publish-actions,.profile-tabs button[aria-selected="true"]) { background:var(--surface); border-color:var(--line); }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(.brand-symbol,#post-btn,#create-new-post-btn) { background:var(--theme-action) !important; color:var(--theme-on-action) !important; }
html[data-theme]:not([data-theme="default"]) .aether-ui nav #nav-account { background:var(--soft) !important; color:var(--ink) !important; }
html[data-theme]:not([data-theme="default"]) .aether-ui .post-comments input { background:var(--surface); color:var(--ink); border-color:var(--line); }
html[data-theme]:not([data-theme="default"]) .aether-ui .post-comments summary { color:var(--muted); }
html[data-theme]:not([data-theme="default"]) .aether-ui .creation-actions .support-creator-btn { background:var(--soft); color:var(--ink); border-color:var(--line); }
html[data-theme]:not([data-theme="default"]) .aether-ui .creation-card :is(.border-t,.creation-actions,.post-comments) { border-color:var(--line); }
html[data-theme]:not([data-theme="default"]) .aether-ui .creator-avatar { color:#25322d; }
html[data-theme]:not([data-theme="default"]) .aether-ui nav .nav-button:hover { background:var(--soft) !important; }
html[data-theme]:not([data-theme="default"]) .aether-ui #save-status { color:var(--muted); }
html[data-theme]:not([data-theme="default"]) .aether-ui .shell-search { color:var(--ink); }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(.profile-filters select,.collection-empty h3,#back-to-timeline-btn) { color:var(--ink) !important; }
html[data-theme]:not([data-theme="default"]) .aether-ui .profile-filters select { color-scheme:dark; }
html:is([data-theme="solar"],[data-theme="paper"]) .aether-ui .profile-filters select { color-scheme:light; }
html[data-theme]:not([data-theme="default"]) .aether-ui :is(.profile-collection-header,.profile-filters) { border-color:var(--line); }
html[data-theme]:not([data-theme="default"]) .aether-ui .collection-empty button { background:var(--theme-action); color:var(--theme-on-action); }
/* Writing remains a neutral page so authored text colors remain true. */
html[data-theme]:not([data-theme="default"]) .aether-ui #writing-area { --paper:#f6f5f1; --surface:#fff; --chrome:#fff; --ink:#25322d; --muted:#626d66; --line:#d9dfd8; --soft:#e7eee7; --accent:#32624d; background:#fff; color:#25322d; }
html[data-theme]:not([data-theme="default"]) .studio-workbench { --chrome-soft:var(--soft); }
html[data-theme]:not([data-theme="default"]) .aether-ui .studio-workbench #art-content-panel :is(#anim-play-pause,#audio-play-stop) { background:var(--theme-action) !important; color:var(--theme-on-action) !important; }
html:is([data-theme="starry"],[data-theme="cyber"]) .aether-ui .studio-workbench #art-content-panel :is(#draw-clear,#delete-object-btn,#film-delete) { color:var(--theme-danger,#ffb9af) !important; }
/* Sheets keep a common readable palette, including validation and provider forms. */
html[data-theme]:not([data-theme="default"]) .aether-ui dialog { --paper:#f6f5f1; --surface:#fff; --chrome:#fff; --chrome-soft:#f3f6f1; --ink:#25322d; --muted:#626d66; --line:#d9dfd8; --soft:#e7eee7; --accent:#32624d; --theme-action:#32624d; --theme-on-action:#fff; --theme-danger:#9a342d; color:var(--ink); }
.theme-sky { display:none; position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:0; }
html[data-theme="starry"] .theme-sky { display:block; }
.theme-sky div { position:absolute; inset:-10%; opacity:.5; background-image:radial-gradient(circle,#dbeaff 1px,transparent 1.5px),radial-gradient(circle,#8daee4 1px,transparent 1.5px); background-size:137px 173px,211px 239px; background-position:17px 31px,89px 127px; animation:theme-drift 55s ease-in-out infinite alternate; }
.theme-sky div+div { background-size:307px 281px,419px 367px; opacity:.35; animation-duration:80s; animation-direction:alternate-reverse; }
.aether-ui > .container { position:relative; }
@keyframes theme-drift { to { transform:translate3d(12px,-24px,0); } }
html[data-theme-motion="off"] .theme-sky div { animation-play-state:paused; }
@media(prefers-reduced-motion:reduce) { .theme-sky div { animation:none; } }
html[data-theme="solar"] body { background-image:radial-gradient(ellipse at 95% 15%,#d7e8a3 0,transparent 55%) !important; background-attachment:fixed !important; }
html[data-theme="cyber"] body { background-image:linear-gradient(135deg,transparent 60%,#67376f35),repeating-linear-gradient(0deg,transparent 0 79px,#edb2f409 80px) !important; }
html[data-theme="paper"] body { background-image:repeating-linear-gradient(0deg,transparent 0 5px,#89503805 6px) !important; }
.appearance-open { display:flex; align-items:center; min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; color:var(--ink); }
.timeline-options-fields > .appearance-open { width:100%; margin-top:12px; }
.profile-back-row > .appearance-open { margin-left:auto; }
.profile-back-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#appearance-dialog { width:min(520px,calc(100vw - 24px)); }
.appearance-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.appearance-heading button { width:44px; min-width:44px; border-radius:10px; }
.appearance-intro,.appearance-note { color:#626d66; line-height:1.5; margin:8px 0 16px; }
.appearance-note { font-size:12px; margin:12px 0; }
.theme-choices { border:0; padding:0; margin:0; display:grid; gap:8px; }
.theme-choices legend { font-size:13px; font-weight:600; margin-bottom:8px; }
.theme-choice { display:flex; align-items:center; gap:12px; min-height:74px; padding:10px; border:1px solid #d9dfd8; border-radius:12px; cursor:pointer; }
.theme-choice:has(input:checked) { border-color:#32624d; background:#edf3ed; box-shadow:inset 0 0 0 1px #32624d; }
.aether-ui #appearance-dialog .theme-choice input,.aether-ui #appearance-dialog .theme-motion input { min-height:20px; width:20px; height:20px; flex:0 0 20px; accent-color:#32624d; }
.theme-choice strong,.theme-choice small { display:block; }
.theme-choice strong { font-size:14px; color:#25322d; }
.theme-choice small { font-size:12px; color:#626d66; line-height:1.4; margin-top:3px; }
.theme-preview { width:48px; height:48px; flex:0 0 48px; border-radius:10px; border:1px solid #0002; background:linear-gradient(135deg,#f6f5f1 60%,#32624d 60%); }
.theme-preview[data-palette="starry"] { background:radial-gradient(circle at 25% 25%,#fff 1px,transparent 2px),radial-gradient(circle at 75% 60%,#aac5ff 2px,transparent 3px),linear-gradient(135deg,#0b1224,#29487c); }
.theme-preview[data-palette="solar"] { background:linear-gradient(135deg,#edf3dd 40%,#d7e8a3 40% 65%,#35603b 65%); }
.theme-preview[data-palette="cyber"] { background:linear-gradient(135deg,#140e22 45%,#edb2f4 46% 51%,#392547 52%); }
.theme-preview[data-palette="paper"] { background:linear-gradient(135deg,#efe4d3 60%,#895038 60%); }
.theme-motion { display:flex; gap:12px; align-items:center; min-height:44px; margin-top:12px; font-size:14px; }
.appearance-status { color:#713d31; font-size:13px; }
.appearance-done { width:100%; min-height:44px; border-radius:10px; background:#32624d; color:#fff; margin-top:8px; }
@media(max-width:380px) { .theme-choice { gap:8px; }.theme-preview { width:36px; height:44px; flex-basis:36px; } }
