/* Silver Bullet: extra themes (skins) and the theme picker. Load AFTER theme.css. */

/* ---- skin palettes: bg, surface, text, accent, accent-2, text-on-accent, muted, glow (r,g,b), fonts ---- */
html[data-skin=ember]{--sk-bg:#0E0705;--sk-surf:#1A0E09;--sk-text:#FFF1E6;--sk-acc:#FF6A2B;--sk-acc2:#FFB36B;--sk-on:#1A0A02;--sk-mute:#C9A894;--sk-glow:255,106,43;--sk-display:'Syne',sans-serif;--sk-body:'DM Sans',sans-serif;--sk-mono:'DM Mono',monospace}
html[data-skin=tide]{--sk-bg:#031318;--sk-surf:#08222A;--sk-text:#E3F8F6;--sk-acc:#2DD4BF;--sk-acc2:#7CF0E0;--sk-on:#02201C;--sk-mute:#9CC9C4;--sk-glow:45,212,191;--sk-display:'Outfit',sans-serif;--sk-body:'Plus Jakarta Sans',sans-serif;--sk-mono:'IBM Plex Mono',monospace}
html[data-skin=orchid]{--sk-bg:#0C0816;--sk-surf:#170F28;--sk-text:#F2ECFF;--sk-acc:#B794F6;--sk-acc2:#E0C8FF;--sk-on:#1A0B33;--sk-mute:#B9A9DB;--sk-glow:183,148,246;--sk-display:'Chakra Petch',sans-serif;--sk-body:'Rubik',sans-serif;--sk-mono:'Space Mono',monospace}
html[data-skin=fern]{--sk-display:'Fraunces',serif;--sk-body:'Figtree',sans-serif;--sk-mono:'Fira Code',monospace}
html[data-skin]{--display:var(--sk-display);--body:var(--sk-body);--mono:var(--sk-mono)}

/* ---- dark skins: recolour the dark theme with the skin palette ---- */
html[data-theme=dark][data-skin]{background:var(--sk-bg);--ink:var(--sk-text);--ink-soft:var(--sk-text);--bone:var(--sk-bg);--bone-dim:var(--sk-surf);--gold:var(--sk-acc);--gold-dim:var(--sk-acc2);--camel:var(--sk-mute);--apricot:var(--sk-acc2);--stone:var(--sk-mute);--muted:var(--sk-mute);--line:rgba(var(--sk-glow),.18);--line-dark:rgba(var(--sk-glow),.2)}
html[data-theme=dark][data-skin] body::before{background:radial-gradient(70% 38% at 88% 0%,rgba(var(--sk-glow),.18),transparent 70%),radial-gradient(60% 40% at 0% 42%,rgba(var(--sk-glow),.09),transparent 70%)}
html[data-theme=dark][data-skin] main.dash{background:radial-gradient(90% 360px at 50% 0,rgba(var(--sk-glow),.10),transparent 72%)}
html[data-theme=dark][data-skin] ::selection{background:var(--sk-acc);color:var(--sk-on)}
html[data-theme=dark][data-skin] .nav{background:color-mix(in srgb,var(--sk-bg) 82%,transparent);border-color:rgba(var(--sk-glow),.24)}
html[data-theme=dark][data-skin] .hero{background:radial-gradient(120% 90% at 100% 0,rgba(var(--sk-glow),.30),transparent 58%),linear-gradient(160deg,var(--sk-surf),var(--sk-bg) 70%)}
html[data-theme=dark][data-skin] .hero::before{background:linear-gradient(140deg,rgba(var(--sk-glow),.9),rgba(var(--sk-glow),.1) 36%,rgba(var(--sk-glow),.04) 62%,rgba(var(--sk-glow),.6))}
html[data-theme=dark][data-skin] .hero::after{background:linear-gradient(90deg,transparent,rgba(var(--sk-glow),.16),transparent)}
html[data-theme=dark][data-skin] .hero .dot.on{background:var(--sk-acc)}
html[data-theme=dark][data-skin] .hero .me__av{box-shadow:0 0 0 2px var(--sk-acc),0 0 0 6px rgba(var(--sk-glow),.14)}
html[data-theme=dark][data-skin] .hero .stat:nth-child(2) b,html[data-theme=dark][data-skin] .bil__price b,html[data-theme=dark][data-skin] .wl__tot b{background:linear-gradient(180deg,var(--sk-acc2),var(--sk-acc));-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
html[data-theme=dark][data-skin] .dash .tabs{background:repeating-linear-gradient(135deg,rgba(var(--sk-glow),.38) 0 5px,transparent 5px 10px) left bottom/100% 2px no-repeat}
html[data-theme=dark][data-skin] .dash .tabs button[aria-selected="true"]::after{background:linear-gradient(90deg,var(--sk-acc),rgba(var(--sk-glow),.25))}
html[data-theme=dark][data-skin] .btn--dark,html[data-theme=dark][data-skin] .btn--gold,html[data-theme=dark][data-skin] .tg__btn--solid{background:linear-gradient(180deg,var(--sk-acc2),var(--sk-acc));color:var(--sk-on);border-color:transparent;box-shadow:0 12px 26px -14px rgba(var(--sk-glow),.7),inset 0 1px 0 rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.18)}
html[data-theme=dark][data-skin] .btn--dark:hover,html[data-theme=dark][data-skin] .btn--gold:hover{background:linear-gradient(180deg,#fff,var(--sk-acc2))}
html[data-theme=dark][data-skin] .btn--outline,html[data-theme=dark][data-skin] .tg__btn{background:transparent;color:var(--sk-text);border:1px solid rgba(var(--sk-glow),.42);box-shadow:none}
html[data-theme=dark][data-skin] .btn--outline:hover,html[data-theme=dark][data-skin] .tg__btn:hover{border-color:var(--sk-acc);color:var(--sk-acc2);box-shadow:0 0 28px -8px rgba(var(--sk-glow),.5)}
html[data-theme=dark][data-skin] .nav .btn--dark{background:transparent;color:var(--sk-text);border:1px solid rgba(var(--sk-glow),.42);box-shadow:none}
html[data-theme=dark][data-skin] .nav .btn--dark:hover{background:rgba(var(--sk-glow),.1);border-color:var(--sk-acc)}
html[data-theme=dark][data-skin] .linkbtn{color:var(--sk-acc2)}
html[data-theme=dark][data-skin] .sheet__panel,html[data-theme=dark][data-skin] .sheet__head{background:var(--sk-surf)}
html[data-theme=dark][data-skin] .sheet__panel{border-top:1px solid rgba(var(--sk-glow),.32);box-shadow:0 -30px 80px -30px rgba(var(--sk-glow),.2)}
html[data-theme=dark][data-skin] .sheet__grip{background:linear-gradient(90deg,rgba(var(--sk-glow),.2),var(--sk-acc),rgba(var(--sk-glow),.2))}
html[data-theme=dark][data-skin] .sheet__close{background:rgba(var(--sk-glow),.14);color:var(--sk-text)}
html[data-theme=dark][data-skin] .sheet .wcard,html[data-theme=dark][data-skin] .bil__plan,html[data-theme=dark][data-skin] .wl__tot{background:radial-gradient(120% 90% at 100% 0,rgba(var(--sk-glow),.24),transparent 58%),linear-gradient(160deg,var(--sk-surf),var(--sk-bg) 70%);box-shadow:0 24px 44px -26px #000,inset 0 0 0 1px rgba(var(--sk-glow),.3)}
html[data-theme=dark][data-skin] .day{--okbg:var(--sk-acc);--okfg:var(--sk-on);--rail:rgba(var(--sk-glow),.2)}
html[data-theme=dark][data-skin] .day--today{background:radial-gradient(120% 90% at 100% 0,rgba(var(--sk-glow),.22),transparent 58%),linear-gradient(160deg,var(--sk-surf),var(--sk-bg))}
html[data-theme=dark][data-skin] .seg button[aria-pressed="true"],html[data-theme=dark][data-skin] .cc .seg button[aria-pressed="true"],html[data-theme=dark][data-skin] .chip[aria-pressed="true"],html[data-theme=dark][data-skin] .pk__grid button[aria-pressed=true],html[data-theme=dark][data-skin] .pk__ap button[aria-pressed=true]{background:linear-gradient(180deg,var(--sk-acc2),var(--sk-acc));color:var(--sk-on)}
html[data-theme=dark][data-skin] .seg,html[data-theme=dark][data-skin] .cc .seg{background:rgba(var(--sk-glow),.1)}
html[data-theme=dark][data-skin] .switch[aria-checked=true],html[data-theme=dark][data-skin] .cc .switch[aria-checked=true]{background:var(--sk-acc)}
html[data-theme=dark][data-skin] .switch[aria-checked=true]::after,html[data-theme=dark][data-skin] .cc .switch[aria-checked=true]::after{background:var(--sk-on)}
html[data-theme=dark][data-skin] .bil__n,html[data-theme=dark][data-skin] .sncard__n,html[data-theme=dark][data-skin] .soon__tag{background:var(--sk-acc);color:var(--sk-on)}
html[data-theme=dark][data-skin] .wlbtn{background:var(--sk-acc);color:var(--sk-on);box-shadow:0 10px 24px -12px rgba(var(--sk-glow),.6)}
html[data-theme=dark][data-skin] .wlbtn b{background:var(--sk-on);color:var(--sk-acc);box-shadow:0 0 0 2px var(--sk-acc)}
html[data-theme=dark][data-skin] .wl__chip[aria-pressed=true]{background:var(--sk-acc);border-color:var(--sk-acc);color:var(--sk-on)}
html[data-theme=dark][data-skin] .opt[aria-selected=true]{background:rgba(var(--sk-glow),.1);box-shadow:inset 0 0 0 1.5px var(--sk-acc)}
html[data-theme=dark][data-skin] .opt[aria-selected=true] i{border-color:var(--sk-acc);background:radial-gradient(circle,var(--sk-bg) 0 30%,var(--sk-acc) 34%)}
html[data-theme=dark][data-skin] .snstage[data-on="1"]{border-color:var(--sk-acc)}
html[data-theme=dark][data-skin] .sncount[data-state=set]{color:var(--sk-acc2);background:rgba(var(--sk-glow),.08);border-color:rgba(var(--sk-glow),.4)}
html[data-theme=dark][data-skin] .snchip[data-status=pending]{background:rgba(var(--sk-glow),.14);color:var(--sk-acc2)}

/* ---- Fern: a light skin ---- */
html[data-theme=light][data-skin=fern]{--ink:#14301F;--ink-soft:#1F4A31;--bone:#EEF4EA;--bone-dim:#E1EBDB;--gold:#2F7D4F;--gold-dim:#25663F;--camel:#7FB08C;--wine:#9B2C2C;--apricot:#D9F2C4;--stone:#7A8C7E;--muted:#4F6455;--line:rgba(20,48,31,.13);--line-dark:rgba(238,244,234,.14)}
html[data-theme=light][data-skin=fern] body .btn--dark,html[data-theme=light][data-skin=fern] .btn--dark{background:linear-gradient(180deg,#2F6B47,#14301F);color:#EEF4EA;box-shadow:0 8px 18px -10px rgba(20,48,31,.8),inset 0 1px 0 rgba(217,242,196,.2)}
html[data-theme=light][data-skin=fern] .btn--dark:hover{background:linear-gradient(180deg,#38805a,#1a3d28)}
html[data-theme=light][data-skin=fern] .bil__plan{background:radial-gradient(120% 100% at 100% 0,rgba(127,176,140,.3),transparent 60%),linear-gradient(160deg,#1F4A31,#14301F 50%,#0B1D13);box-shadow:inset 0 0 0 1px rgba(217,242,196,.22),0 18px 36px -22px rgba(20,48,31,.7)}
html[data-theme=light][data-skin=fern] .hero{background:radial-gradient(120% 90% at 100% 0,rgba(127,176,140,.28),transparent 58%),linear-gradient(160deg,#1F4A31,#14301F 60%,#0B1D13)}

/* ---- theme picker: a pill of swatches that opens under the theme button ---- */
.thpop{position:absolute;top:calc(100% + 14px);right:-6px;z-index:70;display:flex;justify-content:center;gap:2px;padding:10px;width:max-content;max-width:calc(100vw - 20px);background:var(--bone-dim);color:var(--ink);border:1px solid var(--line);border-radius:24px;box-shadow:0 22px 50px -18px rgba(0,0,0,.55);opacity:0;transform:translateY(-6px) scale(.97);transform-origin:top right;pointer-events:none;visibility:hidden;transition:opacity .18s,transform .18s,visibility 0s .18s}
.thpop[data-open]{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .18s,transform .18s}
.thpop button{display:grid;justify-items:center;gap:5px;width:48px;padding:6px 0 4px;border-radius:14px;color:inherit;font:500 9px var(--mono);letter-spacing:.06em;text-transform:uppercase;opacity:.75;transition:opacity .15s,transform .12s}
.thpop button:hover{opacity:1}
.thpop button:active{transform:scale(.94)}
.thpop button[aria-checked="true"]{opacity:1}
.thsw{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;font-size:15px;font-weight:700;line-height:1;box-shadow:inset 0 0 0 1px rgba(128,128,128,.4);transition:box-shadow .15s}
.thpop button[aria-checked="true"] .thsw{box-shadow:0 0 0 2px var(--bone-dim),0 0 0 4px var(--ink)}
@media(prefers-reduced-motion:reduce){.thpop{transition:none}}

