/* Theme engine v1 — scoped CSS overrides. Default theme retains original Fallout stylesheet. */
html {color-scheme:dark}
html[data-theme="light"],html[data-theme="sakura"]{color-scheme:light}

html[data-theme="light"] {
  --green:#1d3345; --green-bright:#112b42; --green-dark:#b3c3d1;
  --background:#f2f7fb; --panel:#ffffff; --panel-light:#e8f0f7;
  --muted:#516b80; --danger:#b34349; --theme-input:#ffffff;
  --theme-footer:#d9e8f3; --theme-terminal:#f6faff;
  --theme-secondary:#e5eef7; --theme-on-accent:#ffffff;
  --theme-glow:#1d334530;
}

html[data-theme="night"] {
  --green:#80c7ff; --green-bright:#b7e0ff; --green-dark:#345a86;
  --background:#070e21; --panel:#101d38; --panel-light:#172b4c;
  --muted:#87a9d3; --danger:#ff759f; --theme-input:#0a1228;
  --theme-footer:#0b1730; --theme-terminal:#0a1935;
  --theme-secondary:#142544; --theme-on-accent:#050812;
  --theme-glow:#80c7ff30;
}

html[data-theme="dark"] {
  --green:#c4cbd5; --green-bright:#f1f5fa; --green-dark:#3b4554;
  --background:#0d0f14; --panel:#181c24; --panel-light:#242a35;
  --muted:#a1aaba; --danger:#ef8088; --theme-input:#0b0e13;
  --theme-footer:#10141d; --theme-terminal:#141922;
  --theme-secondary:#232a35; --theme-on-accent:#050812;
  --theme-glow:#c4cbd530;
}

html[data-theme="contrast"] {
  --green:#ffffff; --green-bright:#ffffff; --green-dark:#e8e8e8;
  --background:#000000; --panel:#070707; --panel-light:#161616;
  --muted:#f2f2f2; --danger:#ffdc2e; --theme-input:#000000;
  --theme-footer:#000000; --theme-terminal:#0b0b0b;
  --theme-secondary:#171717; --theme-on-accent:#050812;
  --theme-glow:#ffffff30;
}

html[data-theme="sakura"] {
  --green:#a52e71; --green-bright:#7b245c; --green-dark:#d28bb5;
  --background:#fff2f8; --panel:#fffafd; --panel-light:#f9e0ee;
  --muted:#865b79; --danger:#b82555; --theme-input:#ffffff;
  --theme-footer:#ffe6f2; --theme-terminal:#fff4fa;
  --theme-secondary:#f8e4ef; --theme-on-accent:#ffffff;
  --theme-glow:#a52e7130;
}

html[data-theme="bloodmoon"] {
  --green:#ff4b55; --green-bright:#ff9c96; --green-dark:#7b2937;
  --background:#11070c; --panel:#210c14; --panel-light:#32101c;
  --muted:#d39ba0; --danger:#ff8e36; --theme-input:#0f070a;
  --theme-footer:#1d0b12; --theme-terminal:#240d18;
  --theme-secondary:#33101b; --theme-on-accent:#050812;
  --theme-glow:#ff4b5530;
}

html[data-theme="spooky"] {
  --green:#ff9b2c; --green-bright:#ffd078; --green-dark:#7a4d27;
  --background:#100c1c; --panel:#21152e; --panel-light:#30213d;
  --muted:#c9a2d3; --danger:#a6ff69; --theme-input:#110c1c;
  --theme-footer:#1b112b; --theme-terminal:#2b1835;
  --theme-secondary:#3b2142; --theme-on-accent:#050812;
  --theme-glow:#ff9b2c30;
}

html[data-theme="hollybeard"] {
  --green:#f1d8a3; --green-bright:#fff3d4; --green-dark:#477761;
  --background:#081a17; --panel:#112d26; --panel-light:#183d31;
  --muted:#a6c5b4; --danger:#f27272; --theme-input:#0b1e19;
  --theme-footer:#102e26; --theme-terminal:#183c30;
  --theme-secondary:#244333; --theme-on-accent:#050812;
  --theme-glow:#f1d8a330;
}

html[data-theme="murica"] {
  --green:#fff9ee; --green-bright:#ffffff; --green-dark:#b32a3e;
  --background:#08152e; --panel:#14274b; --panel-light:#264a7a;
  --muted:#e7d9d2; --danger:#ff6674; --theme-input:#08182f;
  --theme-footer:#0e2040; --theme-terminal:#102445;
  --theme-secondary:#ae2438; --theme-on-accent:#0b1b37;
  --theme-glow:#ff485747;
}

html[data-theme="voidwalker"] {
  --green:#bb91ff; --green-bright:#e1caff; --green-dark:#60428c;
  --background:#0c0718; --panel:#18102b; --panel-light:#241839;
  --muted:#ac98c9; --danger:#6ef5ef; --theme-input:#0c091b;
  --theme-footer:#150e27; --theme-terminal:#211537;
  --theme-secondary:#2a1c43; --theme-on-accent:#050812;
  --theme-glow:#bb91ff30;
}

html[data-theme="royal"] {
  --green:#f3cc74; --green-bright:#ffebad; --green-dark:#8b713b;
  --background:#100d12; --panel:#211a20; --panel-light:#322730;
  --muted:#c6ad89; --danger:#e88b65; --theme-input:#110d13;
  --theme-footer:#241b23; --theme-terminal:#2d232b;
  --theme-secondary:#35292e; --theme-on-accent:#050812;
  --theme-glow:#f3cc7430;
}

:root {--theme-input:#08120b;--theme-footer:#102016;--theme-terminal:rgba(12,23,15,.97);--theme-secondary:#102016;--theme-on-accent:#07100a;--theme-glow:#91ffa022}
/* All theme overrides are enabled only when a non-default theme is chosen. */
html[data-theme]:not([data-theme="fallout"]) body {
  color:var(--green);
  background:radial-gradient(ellipse at 12% 0%,var(--panel-light),transparent 57%),var(--background);
}
html[data-theme]:not([data-theme="fallout"]) .terminal {
  background:var(--theme-terminal);border-color:var(--green-dark);
  box-shadow:0 12px 45px var(--theme-glow);
}
html[data-theme]:not([data-theme="fallout"]) :is(input,select,textarea,.weapon-btn,.monster-info,.sp-progress-panel,.sp-farming,.sp-boosts label,.enemy-list,.target-button,.area-buttons button,.enemy-list button,.unit,.admin-secondary,#admin-logout,.monster-edit){
  background:var(--theme-input);color:var(--green-bright);border-color:var(--green-dark);
}
html[data-theme]:not([data-theme="fallout"]) :is(.sp-actions button,.spl-site-footer .spl-footer-links a){
  background:var(--theme-secondary);color:var(--green-bright);border-color:var(--green-dark);
}
html[data-theme]:not([data-theme="fallout"]) :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active,.admin-action){
  background:var(--green);color:var(--theme-on-accent);border-color:var(--green);
}
html[data-theme]:not([data-theme="fallout"]) :is(.target-button:hover,.area-buttons button:hover,.enemy-list button:hover,.weapon-btn:hover,.sp-actions button:hover,.spl-site-footer .spl-footer-links a:hover){
  border-color:var(--green);box-shadow:0 0 0 1px var(--theme-glow);
}
html[data-theme]:not([data-theme="fallout"]) :is(.sp-farm-stat,.sp-farm-next,.sp-result,.panel,.admin-area){background:var(--panel);border-color:var(--green-dark)}
html[data-theme]:not([data-theme="fallout"]) .spl-site-footer {background:linear-gradient(155deg,var(--theme-footer),var(--panel-light));border-color:var(--green-dark)}
html[data-theme]:not([data-theme="fallout"]) :is(.topbar,.section-heading,.sp-farm-heading,.sp-fields,.spl-footer-credit){border-color:var(--green-dark)}
html[data-theme]:not([data-theme="fallout"]) :is(.defense-indicator,.one-shot){background:var(--panel-light)}
html[data-theme]:not([data-theme="fallout"]) :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-preview,.spl-guide-card){color:var(--green);border-color:var(--green-dark)}
html[data-theme]:not([data-theme="fallout"]) :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card){background:var(--panel)}
html[data-theme]:not([data-theme="fallout"]) :is(button,select,input){accent-color:var(--green)}
html[data-theme]:not([data-theme="fallout"]) :is(input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible){outline:2px solid var(--green);outline-offset:2px}
/* Decorative personality, no extra assets or requests */
html[data-theme="sakura"] body{background:radial-gradient(ellipse at 85% 0%,#ffd3e8,transparent 54%),linear-gradient(135deg,#fff5fb,#f8e2f0)}
html[data-theme="sakura"] .terminal{border-radius:12px;box-shadow:0 12px 50px #ad57822c}
html[data-theme="sakura"] .panel{border-radius:9px}
html[data-theme="sakura"] .topbar{border-bottom:2px solid #d88bb7}
html[data-theme="sakura"] h1::after{content:' ✿';color:#d76fa8}
html[data-theme="bloodmoon"] body{background:radial-gradient(circle at 85% 7%,#8c1c30 0,#3c0d1c 9%,transparent 29%),#11070c}
html[data-theme="bloodmoon"] .topbar{border-bottom:2px solid #b92e40}
html[data-theme="spooky"] body{background:radial-gradient(ellipse at 8% 4%,#4d275b,transparent 47%),radial-gradient(ellipse at 90% 0%,#60351c,transparent 43%),#100c1c}
html[data-theme="spooky"] .terminal{box-shadow:0 0 35px #e477252b}
html[data-theme="spooky"] h1::after{content:' 🎃';font-size:.7em}
html[data-theme="hollybeard"] body{background:radial-gradient(ellipse at 5% 0%,#255c45,transparent 55%),radial-gradient(ellipse at 95% 2%,#552127,transparent 55%),#081a17}
html[data-theme="hollybeard"] .topbar{border-bottom:2px solid #b53c48}
html[data-theme="hollybeard"] .section-heading{color:#e9d6a5}
html[data-theme="hollybeard"] h1::after{content:' ❄';color:#f5e7c5}

html[data-theme="voidwalker"] body{background:radial-gradient(ellipse at 85% 0%,#332154,transparent 55%),#0c0718}
html[data-theme="voidwalker"] .terminal{box-shadow:0 0 42px #bb91ff22}
html[data-theme="royal"] body{background:radial-gradient(ellipse at 50% 0%,#3a2b24,transparent 65%),#100d12}
html[data-theme="royal"] .topbar{border-bottom:2px solid #b58b43}
html[data-theme="contrast"] :is(.terminal,.panel,input,select,button,.sp-result,.sp-farm-stat,.sp-farm-next){border-width:2px!important}
html[data-theme="contrast"] :is(.eyebrow,.section-heading,label,.stat span,.result-item span,.kill-result span){color:#fff}
@media(prefers-reduced-motion:reduce){html[data-theme] *{transition:none!important;animation:none!important}}

/* ── STAR-SPANGLED: full red / white / blue treatment ── */
html[data-theme="murica"] body {
  background:
    radial-gradient(ellipse at 10% 0%,#b7284b50,transparent 50%),
    radial-gradient(ellipse at 95% 15%,#e4e9ff26,transparent 42%),
    repeating-linear-gradient(164deg,transparent 0 110px,#bf233126 111px 155px,transparent 156px 265px),
    linear-gradient(125deg,#06132b 0%,#183e70 46%,#101d3b 74%,#4d162d 100%);
  background-attachment:fixed;
}
html[data-theme="murica"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#122c55 0%,#0a1b35 52%,#361a34 100%);
  border:2px solid #e5ebff;
  border-top:8px solid transparent;
  border-image:none;
  border-radius:9px;
  box-shadow:0 0 0 3px #b72d42,0 0 0 6px #e9f0ff,0 0 0 9px #234f8d,0 20px 70px #050a19b3;
}
html[data-theme="murica"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:8px;
  background:repeating-linear-gradient(90deg,#bd2338 0 72px,#fff 72px 144px,#244c87 144px 216px);
}
html[data-theme="murica"] .terminal::after {
  content:"★  ★  ★  ★  ★  ★  ★  ★  ★  ★  ★  ★";
  position:absolute;z-index:-1;top:15px;right:12px;pointer-events:none;
  color:#e9efff;opacity:.07;font-size:clamp(14px,2.8vw,34px);
  letter-spacing:8px;max-width:46%;line-height:2.1;text-align:right;
}
html[data-theme="murica"] .topbar {
  position:relative;padding:18px 16px 22px;margin:-2px -2px 18px;
  background:linear-gradient(112deg,#173a70 0%,#1d4780 46%,#e7ebf4 46.3%,#e7ebf4 48.2%,#b3233c 48.5%,#881c31 100%);
  border-bottom:5px solid #fff7eb;box-shadow:0 5px 0 #ba2a3e;
  border-radius:5px 5px 0 0;
}
html[data-theme="murica"] .topbar :is(h1,.eyebrow,p,label) {color:#fff!important;text-shadow:0 2px 5px #09142d9e}
html[data-theme="murica"] .topbar h1 {
  color:#fff!important;text-shadow:2px 2px 0 #ba273e,4px 4px 0 #123b76,0 0 22px #fff8;
  animation:murica-title-shine 6s ease-in-out infinite;
}
html[data-theme="murica"] .topbar h1::after{content:" ★ ★ ★";font-size:.52em;letter-spacing:4px;color:#fff}
html[data-theme="murica"] .topbar :is(select,input){background:#10294e!important;color:#fff!important;border:1px solid #f4f4ff!important}
html[data-theme="murica"] .main-grid>.panel:nth-child(4n + 1),
html[data-theme="murica"] .main-grid>.panel:nth-child(4n + 4){
  background:linear-gradient(145deg,#153966 0%,#112848 60%,#091b34 100%);
  border-color:#e2eaff;
}
html[data-theme="murica"] .main-grid>.panel:nth-child(4n + 2),
html[data-theme="murica"] .main-grid>.panel:nth-child(4n + 3){
  background:linear-gradient(140deg,#5e1d31 0%,#341c37 44%,#152c50 100%);
  border-color:#e66b7b;
}
html[data-theme="murica"] .panel,
html[data-theme="murica"] .sp-progress-panel,
html[data-theme="murica"] .sp-farming {
  border-radius:7px;box-shadow:inset 0 3px 0 #fff5,0 8px 24px #050c1b55;
}
html[data-theme="murica"] .section-heading,
html[data-theme="murica"] .sp-farm-heading {
  color:#fff!important;
  background:linear-gradient(90deg,#b5213a 0%,#d83449 38%,#f5f5f5 38.3%,#f5f5f5 41%,#214a84 41.3%,#16335c 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #fff9;border-radius:3px;
  text-shadow:0 2px 3px #081b36;
  letter-spacing:1.5px;
}
html[data-theme="murica"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(130deg,#183d70 0%,#152b50 55%,#581e38 100%);
  border:1px solid #a9bbd8;color:#fff;
}
html[data-theme="murica"] :is(input,select,textarea,.enemy-list,.unit){
  background:linear-gradient(145deg,#071a35,#142f54);color:#fff;border-color:#92add4;
}
html[data-theme="murica"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a){
  background:linear-gradient(125deg,#a91e37 0%,#d4364d 49%,#81172c 100%);
  border:1px solid #ffb9c0;color:#fff;
  box-shadow:inset 0 1px 0 #ffffff4a,0 3px 8px #050b1a44;
  transition:transform .2s,filter .2s,box-shadow .2s;
}
html[data-theme="murica"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover{
  background:linear-gradient(120deg,#fff 0%,#e7efff 100%);
  color:#0d3266;border-color:#c82a40;transform:translateY(-2px);
  box-shadow:0 5px 16px #e52e4c55;
}
html[data-theme="murica"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active){
  background:linear-gradient(135deg,#fff 0%,#e9efff 48%,#bdd4ff 100%);
  color:#0d3064;border:2px solid #d62c42;
  box-shadow:0 0 0 2px #ffffff55,0 0 20px #c7304b65;
}
html[data-theme="murica"] :is(.spl-site-footer,.results-panel){
  background:linear-gradient(100deg,#ad243c 0%,#a72138 29%,#f6f6ff 29.3%,#f6f6ff 31%,#153b70 31.3%,#0a234b 100%);
  border:2px solid #eaf0ff;
}
html[data-theme="murica"] .spl-site-footer :is(.spl-footer-credit,p,span){color:#fff;text-shadow:0 1px 3px #081831}
html[data-theme="murica"] .spl-site-footer .spl-footer-links a:nth-child(even){
  background:linear-gradient(120deg,#173f78,#275b9b);border-color:#e7f1ff;
}
html[data-theme="murica"] .spl-site-footer .spl-footer-links a:last-child{
  background:linear-gradient(120deg,#eaf0ff,#fff);color:#173d73;border-color:#b92b41;
}
html[data-theme="murica"] :is(.sp-progress-panel,.sp-farming,.results-panel){border-top:4px solid #c02c44;border-bottom:4px solid #e8edff}
html[data-theme="murica"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card){
  background:linear-gradient(145deg,#142e58,#311e3e);color:#fff;border-color:#f1e9ef;
}
html[data-theme="murica"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even){
  background:linear-gradient(135deg,#5b1d35,#21294e);
}
@keyframes murica-title-shine{
  0%,100%{filter:drop-shadow(0 0 0 transparent)}
  50%{filter:drop-shadow(0 0 9px #fff9)}
}
@media(prefers-reduced-motion:reduce){html[data-theme="murica"] .topbar h1{animation:none}}
@media(max-width:600px){
 html[data-theme="murica"] .terminal{box-shadow:0 0 0 2px #b72d42,0 0 0 4px #e9f0ff}
 html[data-theme="murica"] .topbar{background:linear-gradient(135deg,#193d74 0%,#17325c 65%,#a8223c 100%)}
 html[data-theme="murica"] .topbar h1::after{content:" ★"}
}


/* ===== Expanded illustrated palettes: high-personality themes ===== */

html[data-theme="sakura"] body {
  background:radial-gradient(circle at 8% 12%,#ffb6d97a,transparent 24%),radial-gradient(circle at 93% 30%,#ffcde5aa,transparent 34%),repeating-linear-gradient(145deg,transparent 0 62px,#ffc6df30 64px 69px,transparent 71px 135px), #fff0f7;
  background-attachment:fixed;
}
html[data-theme="sakura"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#fffafd,#ffe1ef 62%,#f8c5df);border:2px solid #ffd3e9;
  border-top:7px solid #d74792;border-radius:12px;
  box-shadow:0 0 0 3px #bd5e9880,0 20px 65px #0006,0 0 65px #d7479222;
}
html[data-theme="sakura"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:7px;
  background:repeating-linear-gradient(90deg,#d74792 0 60px,#ffd3e9 60px 92px,#6e234f 92px 124px);
}
html[data-theme="sakura"] .terminal::after {
  content:"✿   ✿   ✿   ✿   ✿";
  position:absolute;z-index:-1;pointer-events:none;top:100px;right:14px;
  font-size:clamp(15px,2.5vw,29px);opacity:.10;letter-spacing:9px;
  color:#ffd3e9;max-width:45%;line-height:2.5;text-align:right;
}
html[data-theme="sakura"] .topbar {
  position:relative;margin:-2px -2px 18px;padding:18px 16px 21px;
  background:linear-gradient(115deg,#a93677,#ee88b7 43%,#fff2f9 43.3%,#fff2f9 48%,#b94185 48.3%,#75234f);border-bottom:5px solid #ffd3e9;
  box-shadow:0 4px 0 #d74792;border-radius:8px 8px 0 0;
}
html[data-theme="sakura"] .topbar :is(h1,.eyebrow,p,label) {
  color:#fff!important;text-shadow:0 2px 5px #0009;
}
html[data-theme="sakura"] .topbar h1 {
  color:#fff!important;text-shadow:0 2px 5px #0009,0 0 16px #d7479290;
  animation:spl-themed-glow 5s ease-in-out infinite;
}
html[data-theme="sakura"] .topbar h1::after {
  content:" ✿";color:#ffd3e9;font-size:.7em;
}
html[data-theme="sakura"] .topbar :is(select,input) {
  background:#6e234f!important;color:#fff!important;border:1px solid #ffd3e9!important;
}
html[data-theme="sakura"] .main-grid>.panel:nth-child(odd) {
  background:linear-gradient(145deg,#fffafd,#ffe1ef 62%,#f8c5df);border-color:#ffd3e9;
}
html[data-theme="sakura"] .main-grid>.panel:nth-child(even) {
  background:linear-gradient(145deg,#fff5fa,#f7d1e8 60%,#f5b7d6);border-color:#d74792;
}
html[data-theme="sakura"] :is(.panel,.sp-progress-panel,.sp-farming) {
  border-radius:9px;box-shadow:inset 0 3px 0 #ffd3e950,0 7px 22px #0004;
}
html[data-theme="sakura"] :is(.section-heading,.sp-farm-heading) {
  color:#fff!important;
  background:linear-gradient(100deg,#d74792 0%,#bd5e98 40%,#ffd3e9 40.5%,#ffd3e9 43%,#6e234f 43.5%,#fff8fc 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #ffd3e9a0;border-radius:4px;
  text-shadow:0 2px 4px #000a;letter-spacing:1.2px;
}
html[data-theme="sakura"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(135deg,#fff8fc,#6e234f);
  border:1px solid #ffd3e99a;color:#7b245c;
}
html[data-theme="sakura"] :is(input,select,textarea,.enemy-list,.unit) {
  background:#6e234f;color:#fff;border-color:#ffd3e999;
}
html[data-theme="sakura"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a) {
  background:linear-gradient(125deg,#a32b70,#df5296,#a02e73);color:#fff;border:1px solid #ffd3e9;
  box-shadow:inset 0 1px 0 #ffffff38,0 3px 9px #0005;
  transition:transform .18s,filter .18s,box-shadow .18s;
}
html[data-theme="sakura"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover {
  filter:brightness(1.15);transform:translateY(-2px);
  box-shadow:0 5px 17px #d7479270;
}
html[data-theme="sakura"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active) {
  background:linear-gradient(130deg,#fff1f8,#ffd3e9);
  color:#6b174d;border:2px solid #d74792;
  box-shadow:0 0 0 2px #ffd3e945,0 0 17px #d7479255;
}
html[data-theme="sakura"] :is(.sp-progress-panel,.sp-farming,.results-panel) {
  border-top:4px solid #d74792;border-bottom:4px solid #ffd3e9;
}
html[data-theme="sakura"] .spl-site-footer {
  background:linear-gradient(115deg,#a93677,#ee88b7 43%,#fff2f9 43.3%,#fff2f9 48%,#b94185 48.3%,#75234f);border:2px solid #ffd3e9;
}
html[data-theme="sakura"] .spl-site-footer :is(.spl-footer-credit,p,span) {
  color:#fff;text-shadow:0 1px 4px #0009;
}
html[data-theme="sakura"] .spl-site-footer .spl-footer-links a:nth-child(even) {
  background:linear-gradient(125deg,#6e234f,#fff8fc);border-color:#ffd3e9;
}
html[data-theme="sakura"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card) {
  background:linear-gradient(145deg,#fff5fa,#f7d1e8 60%,#f5b7d6);color:#7b245c;border-color:#ffd3e9;
}
html[data-theme="sakura"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even) {
  background:linear-gradient(145deg,#fff5fa,#f7d1e8 60%,#f5b7d6);
}

html[data-theme="bloodmoon"] body {
  background:radial-gradient(circle at 83% 10%,#f75b60 0 4%,#8f1730 4.3% 8%,transparent 17%),radial-gradient(ellipse at 9% 60%,#64112988,transparent 48%),repeating-linear-gradient(140deg,transparent 0 120px,#ff243014 121px 140px,transparent 141px 255px), #0b0409;
  background-attachment:fixed;
}
html[data-theme="bloodmoon"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#3b101d,#1b0810 72%,#4c1021);border:2px solid #ff9d68;
  border-top:7px solid #e63b4e;border-radius:12px;
  box-shadow:0 0 0 3px #a4162f80,0 20px 65px #0006,0 0 65px #e63b4e22;
}
html[data-theme="bloodmoon"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:7px;
  background:repeating-linear-gradient(90deg,#e63b4e 0 60px,#ff9d68 60px 92px,#220910 92px 124px);
}
html[data-theme="bloodmoon"] .terminal::after {
  content:"☾   ☾   ☾   ☾   ☾";
  position:absolute;z-index:-1;pointer-events:none;top:100px;right:14px;
  font-size:clamp(15px,2.5vw,29px);opacity:.10;letter-spacing:9px;
  color:#ff9d68;max-width:45%;line-height:2.5;text-align:right;
}
html[data-theme="bloodmoon"] .topbar {
  position:relative;margin:-2px -2px 18px;padding:18px 16px 21px;
  background:linear-gradient(112deg,#2a0713,#8f172b 45%,#e84b45 47%,#3c0d1b 50%,#13070d);border-bottom:5px solid #ff9d68;
  box-shadow:0 4px 0 #e63b4e;border-radius:8px 8px 0 0;
}
html[data-theme="bloodmoon"] .topbar :is(h1,.eyebrow,p,label) {
  color:#fff0e7!important;text-shadow:0 2px 5px #0009;
}
html[data-theme="bloodmoon"] .topbar h1 {
  color:#fff0e7!important;text-shadow:0 2px 5px #0009,0 0 16px #e63b4e90;
  animation:spl-themed-glow 5s ease-in-out infinite;
}
html[data-theme="bloodmoon"] .topbar h1::after {
  content:" ☾";color:#ff9d68;font-size:.7em;
}
html[data-theme="bloodmoon"] .topbar :is(select,input) {
  background:#220910!important;color:#fff0e7!important;border:1px solid #ff9d68!important;
}
html[data-theme="bloodmoon"] .main-grid>.panel:nth-child(odd) {
  background:linear-gradient(145deg,#3b101d,#1b0810 72%,#4c1021);border-color:#ff9d68;
}
html[data-theme="bloodmoon"] .main-grid>.panel:nth-child(even) {
  background:linear-gradient(145deg,#260912,#501124 58%,#1a0810);border-color:#e63b4e;
}
html[data-theme="bloodmoon"] :is(.panel,.sp-progress-panel,.sp-farming) {
  border-radius:9px;box-shadow:inset 0 3px 0 #ff9d6850,0 7px 22px #0004;
}
html[data-theme="bloodmoon"] :is(.section-heading,.sp-farm-heading) {
  color:#fff0e7!important;
  background:linear-gradient(100deg,#e63b4e 0%,#a4162f 40%,#ff9d68 40.5%,#ff9d68 43%,#220910 43.5%,#3e111e 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #ff9d68a0;border-radius:4px;
  text-shadow:0 2px 4px #000a;letter-spacing:1.2px;
}
html[data-theme="bloodmoon"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(135deg,#3e111e,#220910);
  border:1px solid #ff9d689a;color:#ffd4cf;
}
html[data-theme="bloodmoon"] :is(input,select,textarea,.enemy-list,.unit) {
  background:#220910;color:#fff0e7;border-color:#ff9d6899;
}
html[data-theme="bloodmoon"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a) {
  background:linear-gradient(120deg,#7f122a,#d02c43,#5d0d23);color:#fff0e7;border:1px solid #ff9d68;
  box-shadow:inset 0 1px 0 #ffffff38,0 3px 9px #0005;
  transition:transform .18s,filter .18s,box-shadow .18s;
}
html[data-theme="bloodmoon"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover {
  filter:brightness(1.15);transform:translateY(-2px);
  box-shadow:0 5px 17px #e63b4e70;
}
html[data-theme="bloodmoon"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active) {
  background:linear-gradient(130deg,#ffb9a2,#ff9d68);
  color:#3c0610;border:2px solid #e63b4e;
  box-shadow:0 0 0 2px #ff9d6845,0 0 17px #e63b4e55;
}
html[data-theme="bloodmoon"] :is(.sp-progress-panel,.sp-farming,.results-panel) {
  border-top:4px solid #e63b4e;border-bottom:4px solid #ff9d68;
}
html[data-theme="bloodmoon"] .spl-site-footer {
  background:linear-gradient(112deg,#2a0713,#8f172b 45%,#e84b45 47%,#3c0d1b 50%,#13070d);border:2px solid #ff9d68;
}
html[data-theme="bloodmoon"] .spl-site-footer :is(.spl-footer-credit,p,span) {
  color:#fff0e7;text-shadow:0 1px 4px #0009;
}
html[data-theme="bloodmoon"] .spl-site-footer .spl-footer-links a:nth-child(even) {
  background:linear-gradient(125deg,#220910,#3e111e);border-color:#ff9d68;
}
html[data-theme="bloodmoon"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card) {
  background:linear-gradient(145deg,#260912,#501124 58%,#1a0810);color:#ffd4cf;border-color:#ff9d68;
}
html[data-theme="bloodmoon"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even) {
  background:linear-gradient(145deg,#260912,#501124 58%,#1a0810);
}

html[data-theme="spooky"] body {
  background:radial-gradient(ellipse at 5% 10%,#7d328b88,transparent 42%),radial-gradient(ellipse at 95% 30%,#ff871c55,transparent 42%),repeating-linear-gradient(115deg,transparent 0 115px,#b968e013 116px 133px,transparent 134px 220px), #0e071a;
  background-attachment:fixed;
}
html[data-theme="spooky"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#352045,#21112f 65%,#4b214e);border:2px solid #abff71;
  border-top:7px solid #ff9828;border-radius:12px;
  box-shadow:0 0 0 3px #7a378f80,0 20px 65px #0006,0 0 65px #ff982822;
}
html[data-theme="spooky"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:7px;
  background:repeating-linear-gradient(90deg,#ff9828 0 60px,#abff71 60px 92px,#271037 92px 124px);
}
html[data-theme="spooky"] .terminal::after {
  content:"🎃   🎃   🎃   🎃   🎃";
  position:absolute;z-index:-1;pointer-events:none;top:100px;right:14px;
  font-size:clamp(15px,2.5vw,29px);opacity:.10;letter-spacing:9px;
  color:#abff71;max-width:45%;line-height:2.5;text-align:right;
}
html[data-theme="spooky"] .topbar {
  position:relative;margin:-2px -2px 18px;padding:18px 16px 21px;
  background:linear-gradient(115deg,#4c1e66,#27113c 43%,#ff9828 44%,#ff9828 47%,#4a205c 48%,#1b0d2c);border-bottom:5px solid #abff71;
  box-shadow:0 4px 0 #ff9828;border-radius:8px 8px 0 0;
}
html[data-theme="spooky"] .topbar :is(h1,.eyebrow,p,label) {
  color:#fff1d6!important;text-shadow:0 2px 5px #0009;
}
html[data-theme="spooky"] .topbar h1 {
  color:#fff1d6!important;text-shadow:0 2px 5px #0009,0 0 16px #ff982890;
  animation:spl-themed-glow 5s ease-in-out infinite;
}
html[data-theme="spooky"] .topbar h1::after {
  content:" 🎃";color:#abff71;font-size:.7em;
}
html[data-theme="spooky"] .topbar :is(select,input) {
  background:#271037!important;color:#fff1d6!important;border:1px solid #abff71!important;
}
html[data-theme="spooky"] .main-grid>.panel:nth-child(odd) {
  background:linear-gradient(145deg,#352045,#21112f 65%,#4b214e);border-color:#abff71;
}
html[data-theme="spooky"] .main-grid>.panel:nth-child(even) {
  background:linear-gradient(145deg,#3b1c45,#472045 55%,#20112c);border-color:#ff9828;
}
html[data-theme="spooky"] :is(.panel,.sp-progress-panel,.sp-farming) {
  border-radius:9px;box-shadow:inset 0 3px 0 #abff7150,0 7px 22px #0004;
}
html[data-theme="spooky"] :is(.section-heading,.sp-farm-heading) {
  color:#fff1d6!important;
  background:linear-gradient(100deg,#ff9828 0%,#7a378f 40%,#abff71 40.5%,#abff71 43%,#271037 43.5%,#3d2050 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #abff71a0;border-radius:4px;
  text-shadow:0 2px 4px #000a;letter-spacing:1.2px;
}
html[data-theme="spooky"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(135deg,#3d2050,#271037);
  border:1px solid #abff719a;color:#ffe4b2;
}
html[data-theme="spooky"] :is(input,select,textarea,.enemy-list,.unit) {
  background:#271037;color:#fff1d6;border-color:#abff7199;
}
html[data-theme="spooky"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a) {
  background:linear-gradient(120deg,#71326b,#a24b67,#ef8a25);color:#fff1d6;border:1px solid #abff71;
  box-shadow:inset 0 1px 0 #ffffff38,0 3px 9px #0005;
  transition:transform .18s,filter .18s,box-shadow .18s;
}
html[data-theme="spooky"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover {
  filter:brightness(1.15);transform:translateY(-2px);
  box-shadow:0 5px 17px #ff982870;
}
html[data-theme="spooky"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active) {
  background:linear-gradient(130deg,#a9ff80,#abff71);
  color:#1b1031;border:2px solid #ff9828;
  box-shadow:0 0 0 2px #abff7145,0 0 17px #ff982855;
}
html[data-theme="spooky"] :is(.sp-progress-panel,.sp-farming,.results-panel) {
  border-top:4px solid #ff9828;border-bottom:4px solid #abff71;
}
html[data-theme="spooky"] .spl-site-footer {
  background:linear-gradient(115deg,#4c1e66,#27113c 43%,#ff9828 44%,#ff9828 47%,#4a205c 48%,#1b0d2c);border:2px solid #abff71;
}
html[data-theme="spooky"] .spl-site-footer :is(.spl-footer-credit,p,span) {
  color:#fff1d6;text-shadow:0 1px 4px #0009;
}
html[data-theme="spooky"] .spl-site-footer .spl-footer-links a:nth-child(even) {
  background:linear-gradient(125deg,#271037,#3d2050);border-color:#abff71;
}
html[data-theme="spooky"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card) {
  background:linear-gradient(145deg,#3b1c45,#472045 55%,#20112c);color:#ffe4b2;border-color:#abff71;
}
html[data-theme="spooky"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even) {
  background:linear-gradient(145deg,#3b1c45,#472045 55%,#20112c);
}

html[data-theme="hollybeard"] body {
  background:radial-gradient(circle at 8% 10%,#1e6e4caa,transparent 40%),radial-gradient(circle at 92% 18%,#a5283f77,transparent 37%),repeating-linear-gradient(135deg,transparent 0 70px,#e7e6ca13 71px 79px,transparent 80px 155px), #071b15;
  background-attachment:fixed;
}
html[data-theme="hollybeard"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#144e3a,#0b3028 70%,#285841);border:2px solid #f6d58d;
  border-top:7px solid #d3344b;border-radius:12px;
  box-shadow:0 0 0 3px #ad3e3f80,0 20px 65px #0006,0 0 65px #d3344b22;
}
html[data-theme="hollybeard"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:7px;
  background:repeating-linear-gradient(90deg,#d3344b 0 60px,#f6d58d 60px 92px,#0c3028 92px 124px);
}
html[data-theme="hollybeard"] .terminal::after {
  content:"❄   ❄   ❄   ❄   ❄";
  position:absolute;z-index:-1;pointer-events:none;top:100px;right:14px;
  font-size:clamp(15px,2.5vw,29px);opacity:.10;letter-spacing:9px;
  color:#f6d58d;max-width:45%;line-height:2.5;text-align:right;
}
html[data-theme="hollybeard"] .topbar {
  position:relative;margin:-2px -2px 18px;padding:18px 16px 21px;
  background:linear-gradient(112deg,#114c37,#1a6647 42%,#f3e8cf 42.3%,#f3e8cf 46%,#bd283e 46.3%,#7e182c);border-bottom:5px solid #f6d58d;
  box-shadow:0 4px 0 #d3344b;border-radius:8px 8px 0 0;
}
html[data-theme="hollybeard"] .topbar :is(h1,.eyebrow,p,label) {
  color:#fff5dc!important;text-shadow:0 2px 5px #0009;
}
html[data-theme="hollybeard"] .topbar h1 {
  color:#fff5dc!important;text-shadow:0 2px 5px #0009,0 0 16px #d3344b90;
  animation:spl-themed-glow 5s ease-in-out infinite;
}
html[data-theme="hollybeard"] .topbar h1::after {
  content:" ❄";color:#f6d58d;font-size:.7em;
}
html[data-theme="hollybeard"] .topbar :is(select,input) {
  background:#0c3028!important;color:#fff5dc!important;border:1px solid #f6d58d!important;
}
html[data-theme="hollybeard"] .main-grid>.panel:nth-child(odd) {
  background:linear-gradient(145deg,#144e3a,#0b3028 70%,#285841);border-color:#f6d58d;
}
html[data-theme="hollybeard"] .main-grid>.panel:nth-child(even) {
  background:linear-gradient(145deg,#551e2b,#3d1928 52%,#123d31);border-color:#d3344b;
}
html[data-theme="hollybeard"] :is(.panel,.sp-progress-panel,.sp-farming) {
  border-radius:9px;box-shadow:inset 0 3px 0 #f6d58d50,0 7px 22px #0004;
}
html[data-theme="hollybeard"] :is(.section-heading,.sp-farm-heading) {
  color:#fff5dc!important;
  background:linear-gradient(100deg,#d3344b 0%,#ad3e3f 40%,#f6d58d 40.5%,#f6d58d 43%,#0c3028 43.5%,#1c4935 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #f6d58da0;border-radius:4px;
  text-shadow:0 2px 4px #000a;letter-spacing:1.2px;
}
html[data-theme="hollybeard"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(135deg,#1c4935,#0c3028);
  border:1px solid #f6d58d9a;color:#fff0c9;
}
html[data-theme="hollybeard"] :is(input,select,textarea,.enemy-list,.unit) {
  background:#0c3028;color:#fff5dc;border-color:#f6d58d99;
}
html[data-theme="hollybeard"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a) {
  background:linear-gradient(120deg,#9b1c35,#d43a4b,#a61c36);color:#fff5dc;border:1px solid #f6d58d;
  box-shadow:inset 0 1px 0 #ffffff38,0 3px 9px #0005;
  transition:transform .18s,filter .18s,box-shadow .18s;
}
html[data-theme="hollybeard"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover {
  filter:brightness(1.15);transform:translateY(-2px);
  box-shadow:0 5px 17px #d3344b70;
}
html[data-theme="hollybeard"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active) {
  background:linear-gradient(130deg,#f6d58d,#f6d58d);
  color:#253b30;border:2px solid #d3344b;
  box-shadow:0 0 0 2px #f6d58d45,0 0 17px #d3344b55;
}
html[data-theme="hollybeard"] :is(.sp-progress-panel,.sp-farming,.results-panel) {
  border-top:4px solid #d3344b;border-bottom:4px solid #f6d58d;
}
html[data-theme="hollybeard"] .spl-site-footer {
  background:linear-gradient(112deg,#114c37,#1a6647 42%,#f3e8cf 42.3%,#f3e8cf 46%,#bd283e 46.3%,#7e182c);border:2px solid #f6d58d;
}
html[data-theme="hollybeard"] .spl-site-footer :is(.spl-footer-credit,p,span) {
  color:#fff5dc;text-shadow:0 1px 4px #0009;
}
html[data-theme="hollybeard"] .spl-site-footer .spl-footer-links a:nth-child(even) {
  background:linear-gradient(125deg,#0c3028,#1c4935);border-color:#f6d58d;
}
html[data-theme="hollybeard"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card) {
  background:linear-gradient(145deg,#551e2b,#3d1928 52%,#123d31);color:#fff0c9;border-color:#f6d58d;
}
html[data-theme="hollybeard"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even) {
  background:linear-gradient(145deg,#551e2b,#3d1928 52%,#123d31);
}

html[data-theme="voidwalker"] body {
  background:radial-gradient(circle at 86% 9%,#9d60ec65,transparent 28%),radial-gradient(circle at 10% 55%,#19a4e240,transparent 42%),repeating-radial-gradient(circle at 85% 0%,transparent 0 45px,#c292ff10 47px 48px,transparent 50px 110px), #090414;
  background-attachment:fixed;
}
html[data-theme="voidwalker"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#27103f,#1b0b30 65%,#2d1955);border:2px solid #51d7ef;
  border-top:7px solid #b57bff;border-radius:12px;
  box-shadow:0 0 0 3px #7842be80,0 20px 65px #0006,0 0 65px #b57bff22;
}
html[data-theme="voidwalker"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:7px;
  background:repeating-linear-gradient(90deg,#b57bff 0 60px,#51d7ef 60px 92px,#1c0d33 92px 124px);
}
html[data-theme="voidwalker"] .terminal::after {
  content:"✦   ✦   ✦   ✦   ✦";
  position:absolute;z-index:-1;pointer-events:none;top:100px;right:14px;
  font-size:clamp(15px,2.5vw,29px);opacity:.10;letter-spacing:9px;
  color:#51d7ef;max-width:45%;line-height:2.5;text-align:right;
}
html[data-theme="voidwalker"] .topbar {
  position:relative;margin:-2px -2px 18px;padding:18px 16px 21px;
  background:linear-gradient(115deg,#301350,#4f247b 43%,#62cde5 44%,#62cde5 46%,#241046 47%,#100823);border-bottom:5px solid #51d7ef;
  box-shadow:0 4px 0 #b57bff;border-radius:8px 8px 0 0;
}
html[data-theme="voidwalker"] .topbar :is(h1,.eyebrow,p,label) {
  color:#f5eaff!important;text-shadow:0 2px 5px #0009;
}
html[data-theme="voidwalker"] .topbar h1 {
  color:#f5eaff!important;text-shadow:0 2px 5px #0009,0 0 16px #b57bff90;
  animation:spl-themed-glow 5s ease-in-out infinite;
}
html[data-theme="voidwalker"] .topbar h1::after {
  content:" ✦";color:#51d7ef;font-size:.7em;
}
html[data-theme="voidwalker"] .topbar :is(select,input) {
  background:#1c0d33!important;color:#f5eaff!important;border:1px solid #51d7ef!important;
}
html[data-theme="voidwalker"] .main-grid>.panel:nth-child(odd) {
  background:linear-gradient(145deg,#27103f,#1b0b30 65%,#2d1955);border-color:#51d7ef;
}
html[data-theme="voidwalker"] .main-grid>.panel:nth-child(even) {
  background:linear-gradient(145deg,#19294e,#27113d 55%,#170b31);border-color:#b57bff;
}
html[data-theme="voidwalker"] :is(.panel,.sp-progress-panel,.sp-farming) {
  border-radius:9px;box-shadow:inset 0 3px 0 #51d7ef50,0 7px 22px #0004;
}
html[data-theme="voidwalker"] :is(.section-heading,.sp-farm-heading) {
  color:#f5eaff!important;
  background:linear-gradient(100deg,#b57bff 0%,#7842be 40%,#51d7ef 40.5%,#51d7ef 43%,#1c0d33 43.5%,#311a4d 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #51d7efa0;border-radius:4px;
  text-shadow:0 2px 4px #000a;letter-spacing:1.2px;
}
html[data-theme="voidwalker"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(135deg,#311a4d,#1c0d33);
  border:1px solid #51d7ef9a;color:#f0dcff;
}
html[data-theme="voidwalker"] :is(input,select,textarea,.enemy-list,.unit) {
  background:#1c0d33;color:#f5eaff;border-color:#51d7ef99;
}
html[data-theme="voidwalker"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a) {
  background:linear-gradient(120deg,#55258c,#8743cf,#3a659e);color:#f5eaff;border:1px solid #51d7ef;
  box-shadow:inset 0 1px 0 #ffffff38,0 3px 9px #0005;
  transition:transform .18s,filter .18s,box-shadow .18s;
}
html[data-theme="voidwalker"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover {
  filter:brightness(1.15);transform:translateY(-2px);
  box-shadow:0 5px 17px #b57bff70;
}
html[data-theme="voidwalker"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active) {
  background:linear-gradient(130deg,#62d7f0,#51d7ef);
  color:#130b2c;border:2px solid #b57bff;
  box-shadow:0 0 0 2px #51d7ef45,0 0 17px #b57bff55;
}
html[data-theme="voidwalker"] :is(.sp-progress-panel,.sp-farming,.results-panel) {
  border-top:4px solid #b57bff;border-bottom:4px solid #51d7ef;
}
html[data-theme="voidwalker"] .spl-site-footer {
  background:linear-gradient(115deg,#301350,#4f247b 43%,#62cde5 44%,#62cde5 46%,#241046 47%,#100823);border:2px solid #51d7ef;
}
html[data-theme="voidwalker"] .spl-site-footer :is(.spl-footer-credit,p,span) {
  color:#f5eaff;text-shadow:0 1px 4px #0009;
}
html[data-theme="voidwalker"] .spl-site-footer .spl-footer-links a:nth-child(even) {
  background:linear-gradient(125deg,#1c0d33,#311a4d);border-color:#51d7ef;
}
html[data-theme="voidwalker"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card) {
  background:linear-gradient(145deg,#19294e,#27113d 55%,#170b31);color:#f0dcff;border-color:#51d7ef;
}
html[data-theme="voidwalker"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even) {
  background:linear-gradient(145deg,#19294e,#27113d 55%,#170b31);
}

html[data-theme="royal"] body {
  background:radial-gradient(ellipse at 50% 0%,#95622b60,transparent 45%),radial-gradient(ellipse at 90% 65%,#63264755,transparent 45%),repeating-linear-gradient(130deg,transparent 0 110px,#d6a44d12 111px 114px,transparent 115px 225px), #0c0810;
  background-attachment:fixed;
}
html[data-theme="royal"] .terminal {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(145deg,#32202e,#1b101d 70%,#4b2e3b);border:2px solid #a92d61;
  border-top:7px solid #e5b85f;border-radius:12px;
  box-shadow:0 0 0 3px #95612c80,0 20px 65px #0006,0 0 65px #e5b85f22;
}
html[data-theme="royal"] .terminal::before {
  content:"";position:absolute;z-index:-1;inset:0 0 auto;height:7px;
  background:repeating-linear-gradient(90deg,#e5b85f 0 60px,#a92d61 60px 92px,#251624 92px 124px);
}
html[data-theme="royal"] .terminal::after {
  content:"♛   ♛   ♛   ♛   ♛";
  position:absolute;z-index:-1;pointer-events:none;top:100px;right:14px;
  font-size:clamp(15px,2.5vw,29px);opacity:.10;letter-spacing:9px;
  color:#a92d61;max-width:45%;line-height:2.5;text-align:right;
}
html[data-theme="royal"] .topbar {
  position:relative;margin:-2px -2px 18px;padding:18px 16px 21px;
  background:linear-gradient(110deg,#24121f,#533044 43%,#efca83 44%,#efca83 47%,#4b2037 48%,#190e1a);border-bottom:5px solid #a92d61;
  box-shadow:0 4px 0 #e5b85f;border-radius:8px 8px 0 0;
}
html[data-theme="royal"] .topbar :is(h1,.eyebrow,p,label) {
  color:#fff0d0!important;text-shadow:0 2px 5px #0009;
}
html[data-theme="royal"] .topbar h1 {
  color:#fff0d0!important;text-shadow:0 2px 5px #0009,0 0 16px #e5b85f90;
  animation:spl-themed-glow 5s ease-in-out infinite;
}
html[data-theme="royal"] .topbar h1::after {
  content:" ♛";color:#a92d61;font-size:.7em;
}
html[data-theme="royal"] .topbar :is(select,input) {
  background:#251624!important;color:#fff0d0!important;border:1px solid #a92d61!important;
}
html[data-theme="royal"] .main-grid>.panel:nth-child(odd) {
  background:linear-gradient(145deg,#32202e,#1b101d 70%,#4b2e3b);border-color:#a92d61;
}
html[data-theme="royal"] .main-grid>.panel:nth-child(even) {
  background:linear-gradient(145deg,#412236,#231422 65%,#503b2e);border-color:#e5b85f;
}
html[data-theme="royal"] :is(.panel,.sp-progress-panel,.sp-farming) {
  border-radius:9px;box-shadow:inset 0 3px 0 #a92d6150,0 7px 22px #0004;
}
html[data-theme="royal"] :is(.section-heading,.sp-farm-heading) {
  color:#fff0d0!important;
  background:linear-gradient(100deg,#e5b85f 0%,#95612c 40%,#a92d61 40.5%,#a92d61 43%,#251624 43.5%,#3a2734 100%);
  padding:11px 13px;margin:-4px -4px 17px;
  border:1px solid #a92d61a0;border-radius:4px;
  text-shadow:0 2px 4px #000a;letter-spacing:1.2px;
}
html[data-theme="royal"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot) {
  background:linear-gradient(135deg,#3a2734,#251624);
  border:1px solid #a92d619a;color:#ffe7ae;
}
html[data-theme="royal"] :is(input,select,textarea,.enemy-list,.unit) {
  background:#251624;color:#fff0d0;border-color:#a92d6199;
}
html[data-theme="royal"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a) {
  background:linear-gradient(120deg,#6b2948,#a34a62,#bd8a43);color:#fff0d0;border:1px solid #a92d61;
  box-shadow:inset 0 1px 0 #ffffff38,0 3px 9px #0005;
  transition:transform .18s,filter .18s,box-shadow .18s;
}
html[data-theme="royal"] :is(.weapon-btn,.target-button,.area-buttons button,.enemy-list button,.sp-actions button,.spl-footer-links a):hover {
  filter:brightness(1.15);transform:translateY(-2px);
  box-shadow:0 5px 17px #e5b85f70;
}
html[data-theme="royal"] :is(.weapon-btn.active,.target-button.active,.area-buttons button.active,.enemy-list button.active) {
  background:linear-gradient(130deg,#f9d98d,#a92d61);
  color:#321e25;border:2px solid #e5b85f;
  box-shadow:0 0 0 2px #a92d6145,0 0 17px #e5b85f55;
}
html[data-theme="royal"] :is(.sp-progress-panel,.sp-farming,.results-panel) {
  border-top:4px solid #e5b85f;border-bottom:4px solid #a92d61;
}
html[data-theme="royal"] .spl-site-footer {
  background:linear-gradient(110deg,#24121f,#533044 43%,#efca83 44%,#efca83 47%,#4b2037 48%,#190e1a);border:2px solid #a92d61;
}
html[data-theme="royal"] .spl-site-footer :is(.spl-footer-credit,p,span) {
  color:#fff0d0;text-shadow:0 1px 4px #0009;
}
html[data-theme="royal"] .spl-site-footer .spl-footer-links a:nth-child(even) {
  background:linear-gradient(125deg,#251624,#3a2734);border-color:#a92d61;
}
html[data-theme="royal"] :is(.spl-guide-dialog,.spl-guide-panel,.spl-guide-card) {
  background:linear-gradient(145deg,#412236,#231422 65%,#503b2e);color:#ffe7ae;border-color:#a92d61;
}
html[data-theme="royal"] :is(.sp-result,.sp-farm-stat,.sp-farm-next):nth-child(even) {
  background:linear-gradient(145deg,#412236,#231422 65%,#503b2e);
}

/* Sakura: translucent blossom petals floating outside the calculator */
html[data-theme="sakura"] body::before {
  content:"✿  ❀     ✿       ❀   ✿";position:fixed;top:5%;left:0;right:0;
  text-align:center;letter-spacing:clamp(16px,6vw,95px);font-size:clamp(20px,4vw,44px);
  color:#e96aa3;opacity:.23;pointer-events:none;z-index:0;
  animation:spl-petal-drift 18s ease-in-out infinite alternate;
}
html[data-theme="sakura"] :is(.panel,.sp-progress-panel,.sp-farming){border-radius:14px}
html[data-theme="sakura"] :is(.section-heading,.sp-farm-heading){color:#fff!important}
html[data-theme="sakura"] :is(.sp-farm-stat,.sp-farm-next,.sp-result,.monster-info,.defense-indicator,.one-shot){color:#7b245c}
html[data-theme="sakura"] :is(.panel,.sp-progress-panel,.sp-farming) label{color:#77355d}
html[data-theme="sakura"] .topbar h1::after{content:" ❀ ✿"}
/* Blood Moon: eclipsed moon and angular gothic borders */
html[data-theme="bloodmoon"] .terminal{border-radius:3px;box-shadow:0 0 0 3px #721527,0 0 50px #dc263855}
html[data-theme="bloodmoon"] .topbar h1::after{content:" ☾ ⛧";color:#ffae88}
html[data-theme="bloodmoon"] :is(.panel,.sp-farm-stat,.sp-farm-next){clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,0 100%)}
/* Halloween: luminous orange pumpkins and purple atmospheric glow */
html[data-theme="spooky"] .topbar h1::after{content:" 🎃 👻";font-size:.58em}
html[data-theme="spooky"] .terminal{box-shadow:0 0 0 3px #6e2b79,0 0 75px #fb7e2840}
html[data-theme="spooky"] .section-heading{box-shadow:0 0 16px #ff9b2c33}
/* Christmas: candy cane bands, gold trim and drifting snow */
html[data-theme="hollybeard"] .terminal::before{
  background:repeating-linear-gradient(45deg,#b5223b 0 15px,#fff1db 15px 30px,#1d7751 30px 45px,#fff1db 45px 60px)
}
html[data-theme="hollybeard"] body::before{
  content:"❄       ❅       ❄       ❅";position:fixed;inset:0;z-index:0;
  pointer-events:none;color:#fff;opacity:.24;font-size:30px;letter-spacing:7vw;
  text-align:center;animation:spl-snowfall 18s linear infinite;
}
html[data-theme="hollybeard"] .topbar h1::after{content:" ❄ 🎄";font-size:.65em}
/* Voidwalker: cosmic rings and neon starfield */
html[data-theme="voidwalker"] body::before{
  content:"✦  ·     ✧       ✦    ·    ✧";position:fixed;top:5%;left:0;right:0;
  z-index:0;pointer-events:none;color:#a9dfff;opacity:.32;
  text-align:center;font-size:clamp(20px,4vw,43px);letter-spacing:6vw;
  animation:spl-star-pulse 8s ease-in-out infinite alternate;
}
html[data-theme="voidwalker"] .terminal{box-shadow:0 0 0 3px #6a3e9c,0 0 85px #9d4dfc45}
html[data-theme="voidwalker"] .topbar h1::after{content:" ✦ ✧"}
/* Royal Gold: jewel-like gilded ornament and embossed panels */
html[data-theme="royal"] .terminal{border:3px double #e8bb67;box-shadow:0 0 0 4px #6d3c45,0 0 0 7px #d6ac63,0 20px 60px #000a}
html[data-theme="royal"] .topbar h1::after{content:" ♛ ✦"}
html[data-theme="royal"] :is(.panel,.sp-progress-panel,.sp-farming){box-shadow:inset 0 0 0 1px #e9bb6844,inset 0 3px 0 #e7c97e80,0 9px 25px #0008}
html[data-theme="royal"] :is(.section-heading,.sp-farm-heading){border:2px ridge #e4b85f}
@keyframes spl-themed-glow{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 8px currentColor)}}
@keyframes spl-petal-drift{from{transform:translateY(-12px) translateX(-2%)}to{transform:translateY(45px) translateX(3%)}}
@keyframes spl-snowfall{from{transform:translateY(-25%)}to{transform:translateY(100%)}}
@keyframes spl-star-pulse{from{opacity:.12;transform:translateY(0)}to{opacity:.42;transform:translateY(12px)}}
@media(prefers-reduced-motion:reduce){
 html[data-theme] :is(.topbar h1,body::before){animation:none!important}
}
@media(max-width:600px){
 html[data-theme="sakura"] body::before,html[data-theme="hollybeard"] body::before,html[data-theme="voidwalker"] body::before{font-size:18px;letter-spacing:12px}
}
