/* Default white palette and shared controls. */
html:root[data-palette="coral"] {--bg:#edf2f7;--surface:#ffffff;--raised:#f4f7fa;--line:#d7e0e8;--text:#202733;--muted:#626d7b;--accent:#c94a29;--accent-ink:#ffffff;--selected:#fff0e9;--selected-text:#a83d22;--status-bg:#e4f2ef;--status-text:#286d66;--radius:18px;--shadow:0 5px 18px #31465a12;--rose:var(--accent);--scroll-track:var(--bg);--scroll-thumb:var(--line);--scroll-thumb-hover:var(--muted);}

html:root[data-palette] body { background:var(--bg); color:var(--text); }
html:root[data-palette] :is(.bar,.foot-links,.card,.pick,.panel,.menu,.toast,.cmp-wrap,.adm-row,.nextup-mini,.side,.hero,.empty,.site-foot,.cal-cell,.preview,.donate,.nextup) { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); border-radius:var(--radius); }
html:root[data-palette] :is(.bar,.site-foot) { border-radius:0; }
html:root[data-palette] :is(.top,.searchbar,#nextup,.tabs,.foot) { background:transparent; }
html:root[data-palette] :is(.btn,.chip,.q-opt,.segmented button,.set-select,.side select,.adm-tabs button,.icon-btn,.me,.poll-opt,.stat,.composer,.adm-edit,.adm-bulk,.cmp tbody tr:nth-child(odd)) { background:var(--raised); color:var(--text); border-color:var(--line); border-radius:min(var(--radius),12px); }
html:root[data-palette] :is(input,textarea,select,.searchbar input,.bar #search,.c-input,.adm-field input,.adm-field select,.adm-field textarea,.adm-search) { background:var(--raised); color:var(--text); border-color:var(--line); border-radius:min(var(--radius),14px); }
html:root[data-palette] input::placeholder { color:var(--muted); }
html:root[data-palette] .btn.btn-primary,html:root[data-palette] .switch[aria-checked="true"] { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
html:root[data-palette] :is(.chip[aria-pressed="true"],.q-opt[aria-pressed="true"],.segmented button[aria-pressed="true"],.adm-tabs button[aria-pressed="true"],.nav a[aria-current="page"],.hype.on,.cal-cell.is-today) { background:var(--selected); color:var(--selected-text); border-color:var(--accent); }
html:root[data-palette] :is(.nav a:hover,.menu-item:hover,.news-item:hover,.rank-row:hover,.star:hover,.linkish:hover) { background:var(--raised); color:var(--text); }
html:root[data-palette] .row { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); border-radius:var(--radius); }
html:root[data-palette] .row:hover,html:root[data-palette] .card:hover { background:var(--surface); border-color:var(--accent); }
html:root[data-palette] :is(.nm-name,.row-name,.card-name,.linkish,.chip,.hov-desc) { color:var(--text); text-shadow:none; }
html:root[data-palette] :is(.nm-label,.nextup-label,.nextup-meta,.timer-label,.row-meta,.tabs button,.sample-note,.hov-line,.hov-plats) { color:var(--muted); }
html:root[data-palette] :is(.tabs button[aria-selected="true"],.linkish[data-open="hot"],.star[aria-pressed="true"],.timer-value) { color:var(--accent); }
html:root[data-palette] :is(.nextup,.nextup-mini)::after { background:linear-gradient(90deg,var(--surface) 15%,color-mix(in srgb,var(--surface) 94%,transparent) 45%,color-mix(in srgb,var(--surface) 15%,transparent) 100%); }
html:root[data-palette] :is(.timer-unit,.nextup-timer,.q-n,.ribbon,.ribbon-sm,.admin-tag) { background:var(--selected); color:var(--selected-text); box-shadow:none; border-radius:min(var(--radius),14px); }
html:root[data-palette] :is(.pill,.hc-chip,.tag) { background:var(--status-bg); color:var(--status-text); border-color:var(--line); }
html:root[data-palette] .pill-upcoming { background:var(--selected); color:var(--selected-text); }
html:root[data-palette] .card-hover { background:color-mix(in srgb,var(--surface) 96%,transparent); }
html:root[data-palette] .cal-cell.is-pad { background:transparent; box-shadow:none; border-color:transparent; }
html:root[data-palette] .cal-cell.is-today { box-shadow:inset 0 0 0 1px var(--accent); }
html:root[data-palette] .poll-fill { background:var(--selected); }
html:root[data-palette] .brand-mark { background:var(--accent); color:var(--accent-ink); border-radius:min(var(--radius),11px); }
html:root[data-palette] .card-media,html:root[data-palette] .cover { border-radius:min(var(--radius),12px); }
.theme-picker { padding:14px 0; }
.theme-group-label { margin:16px 0 8px; color:var(--muted); font-size:12px; font-weight:650; }
.theme-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
.theme-option { display:flex; flex-direction:column; gap:7px; padding:9px; text-align:left; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:12px; }
.theme-option[aria-pressed="true"] { outline:2px solid var(--accent); outline-offset:1px; }
.theme-option:hover { border-color:var(--accent); }
.theme-option-name { font-weight:650; font-size:13px; }
.theme-option-desc { font-size:11px; color:var(--muted); line-height:1.4; }
.theme-sample { display:grid; grid-template-columns:1fr 1fr; gap:6px; width:100%; padding:10px; background:var(--preview-bg); border-radius:7px; }
.theme-sample-bar { grid-column:1/-1; height:8px; width:65%; border-radius:3px; background:var(--preview-accent); }
.theme-sample-card { height:29px; background:var(--preview-surface); border-left:3px solid var(--preview-accent); border-radius:4px; }

html:root[data-palette] .timer-separator { color:var(--accent); }
html:root[data-palette] button.btn.btn-primary, html:root[data-palette] a.btn.btn-primary { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }