/* Choice previews use their own palettes, independent of the selected theme. */
.theme-previews{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.theme-preview{font:inherit;text-align:left;background:var(--surface);color:var(--ink);border:2px solid var(--line);border-radius:16px;padding:8px;cursor:pointer;min-width:0}
.theme-preview[aria-pressed=true]{border-color:var(--rose);box-shadow:0 0 0 2px var(--surface),0 0 0 3px var(--rose)}
.theme-preview>strong{display:block;font-size:.85rem;padding:8px 2px;overflow-wrap:anywhere}
.theme-sample{display:flex;flex-direction:column;gap:8px;min-height:145px;border-radius:10px;padding:14px;background:#fff2e8;color:#382c37;font-size:.7rem;line-height:1.4}
.theme-sample b{font-size:.9rem}.theme-sample i{display:block;height:28px;border-radius:8px;background:#eae0f7}.theme-sample small{align-self:flex-start;border-radius:7px;padding:6px 12px;background:#62394e;color:white}
.theme-sample-blue{background:#121c29;color:#e9f1fb;font-family:system-ui,sans-serif}.theme-sample-blue i{background:#25364d;border-radius:3px}.theme-sample-blue small{background:#a9d2fa;color:#172131;border-radius:3px}
.theme-sample-pink{background:#fff0f4;color:#703750;font-family:Georgia,serif}.theme-sample-pink i{background:#f8d5e3;border-radius:18px}.theme-sample-pink small{background:#703750;border-radius:18px}
.theme-sample-neutral{background:#f3f4f6;color:#303b4e}.theme-sample-neutral i{background:#e2e7ef}.theme-sample-neutral small{background:#303b4e}
.survey-next{padding:18px;border:1px solid var(--line);background:var(--lavender);border-radius:14px;margin:12px 0 20px}.survey-next h3{margin:8px 0 14px}.survey-milestone{font-size:.85rem;margin:0 0 12px;color:var(--muted)}
.all-surveys>summary,.exercise-help>summary,.appearance-setup>summary{min-height:44px;padding:12px 0;cursor:pointer;font-weight:600}
.exercise-instruction>p{font-size:1.05rem;line-height:1.65}.exercise-help{margin:16px 0;padding:0 14px;border:1px solid var(--line);border-radius:12px}.exercise-help p{line-height:1.65}.exercise-help h4{margin-bottom:8px}
.profile-conflict{margin-bottom:18px;border-top:4px solid var(--rose)}.profile-conflict h2{margin-top:12px}.profile-conflict .actions{gap:12px;flex-wrap:wrap}
.weekly-alternatives{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.weekly-alternatives [aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--rose)}
.home-discoveries{margin-top:20px}.home-discoveries .survey-next{margin-bottom:14px}.appearance-setup .card{padding:8px 0;box-shadow:none;border:0}
/* Yö replaces the old blue palette, retaining its persisted preference ID. */
body[data-theme=blue]{color-scheme:dark;--bg:#101822;--surface:#182434;--ink:#edf2f8;--muted:#b7c5d5;--plum:#b9dafb;--rose:#8bc5ff;--pink:#253b53;--line:#3d5168;--peach:#26394b;--lavender:#283349;--sage:#223d39;--gold:#403c2a;--canvas-glow:#172b44;--accent-soft:#2c4360}
body[data-theme=blue] .intro h1{font-family:inherit;font-weight:650;letter-spacing:-.4px}
body[data-theme=blue] :is(.card,.practice-list-item,.btn,.survey-next){border-radius:9px}
body[data-theme=blue] :is(input,textarea,select){background:var(--bg);color:var(--ink);border-color:var(--line)}
body[data-theme=blue] input::placeholder,body[data-theme=blue] textarea::placeholder{color:var(--muted)}
body[data-theme=blue] :is(.mood,.chip,.deep-answer,.content-note,.day-dot b,.card-head>.icon,.badge,.close,.chart-row,.table-wrap){background:var(--surface);color:var(--ink);border-color:var(--line)}
body[data-theme=blue] :is(.btn,.brandmark){background:#b9dafb;color:#152435}
body[data-theme=blue] :is(.btn.secondary,.btn.light,.btn.soft){background:var(--pink);color:var(--plum)}
body[data-theme=blue] .hero{background:#203650;color:var(--ink)}body[data-theme=blue] .hero h2{color:var(--ink)}
body[data-theme=blue] a{color:var(--plum)}body[data-theme=blue] progress{accent-color:#86c1a8}
/* Night surfaces and semantic colours also cover secondary views and transient states. */
body[data-theme=blue]{--text:var(--ink);--accent:var(--plum);--soft:var(--lavender);--paper:var(--lavender);--border:var(--line);--chart-mood:#cba6ed;--chart-energy:#78d5ce;--chart-sleep:#aab8ff;--chart-movement:#8cdaa7;--chart-meals:#e9ba7f;--chart-social:#f1a4cf;--chart-outdoors:#b7d788;--chart-ownTime:#9bcde8;--chart-stress:#f1aaa7;--chart-custom:#bdcbd5}
body[data-theme=blue] :is(.account-card,.agent-form,.agent-result,.practice-sync-panel,.life-sync,.discovery-option){background:var(--surface);color:var(--ink);border-color:var(--line)}
body[data-theme=blue] :is(.bubble,.bubble.self,[data-intelligence-panel] details,#connect-status:not(:empty)){background:var(--lavender);color:var(--ink);border-color:var(--line)}
body[data-theme=blue] :is(.connect-pending,.life-warning,.milestone.earned){background:var(--gold);color:var(--ink);border-color:#a89360}
body[data-theme=blue] :is(.account-message,.onboarding [data-state=done] .onboarding-number){background:var(--sage);color:#b6e4cc}
body[data-theme=blue] :is(.account-message.error,.field-error,#connect-status[role=alert]:not(:empty)){background:#452c36;color:#ffd2da;border-color:#cf8b9b}
body[data-theme=blue] .account-view .danger{background:#452c36;color:#ffd2da}
body[data-theme=blue] :is(.progress-number small,.settings-checks small,.tracking-associations small){color:var(--muted)}
body[data-theme=blue] :is(.survey-state[data-state=done],.shared-unread,.compact-checkin .icon){color:#9edbb9}
body[data-theme=blue] .milestone.earned>span{color:#f2d18a}
body[data-theme=blue] :is(.toast,.skip-link,.idea[aria-pressed=true],.work-days input:checked+span){background:var(--plum);color:#152435}
body[data-theme=blue] .idea{background:var(--pink);color:var(--ink)}
body[data-theme=blue] .day-dot.done b{background:#426b50;color:#fff}
body[data-theme=blue] :is(.when-options label:has(input:checked),.feedback-options [aria-pressed=true],.notice-choices [aria-pressed=true],.mood.selected){background:var(--pink);color:var(--plum);border-color:var(--rose);box-shadow:inset 0 0 0 1px var(--rose)}
body[data-theme=blue] .diary-legend span:first-child,body[data-theme=blue] .home-mood-chart{color:var(--chart-mood)}
body[data-theme=blue] .diary-legend span:last-child{color:var(--chart-energy)}
body[data-theme=blue] :is(.bar-track,progress),body[data-theme=blue] progress::-webkit-progress-bar{background:var(--line)}
body[data-theme=blue] progress::-webkit-progress-value{background:#86c1a8}
body[data-theme=blue] progress::-moz-progress-bar{background:#86c1a8}
body[data-theme=pink] :is(.card,.survey-next,.btn){border-radius:24px}
body[data-theme=pink] .intro h1{font-family:Georgia,serif}body[data-theme=neutral] .intro h1{font-family:inherit;font-weight:600}
@media(max-width:700px){.theme-previews{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-sample{min-height:130px}.profile-conflict .actions>a{width:100%;text-align:center}.survey-next{padding:15px}.home-discoveries .card-head{gap:12px;flex-wrap:wrap}}
