/* Shen Radio — colour themes. Loaded after style.css; html[data-theme] beats :root regardless of order.
   Palettes mirror js/themes.js (tests/unit/themes.test.mjs keeps them identical). */
/* Shen Radio */
html[data-theme="radio-original"]{--bg:#090b10;--bg2:#10131a;--bg3:#171b24;--fg:#f3f4f6;--mid:#b9bfca;--dim:#9198a6;--acc:#3ee9ff;--acc-ink:#031317;--err:#ff7a5f;--accent-rgb:62,233,255;--secondary:#ff6fd8;--secondary-rgb:255,111,216}
/* Human & Machine */
html[data-theme="human-machine"]{--bg:#101214;--bg2:#171a1d;--bg3:#1e2226;--fg:#eef3f1;--mid:#b8c2be;--dim:#939d9a;--acc:#baf6e5;--acc-ink:#0b1a16;--err:#ff8a7a;--accent-rgb:186,246,229;--secondary:#c6b9f0;--secondary-rgb:198,185,240}
/* Shen Link */
html[data-theme="shen-link"]{--bg:#0c1018;--bg2:#121824;--bg3:#19202e;--fg:#eef2f8;--mid:#b6bfd0;--dim:#8f9ab0;--acc:#65e9df;--acc-ink:#04161a;--err:#ff8170;--accent-rgb:101,233,223;--secondary:#f286d5;--secondary-rgb:242,134,213}
/* Shen Nexus */
html[data-theme="shen-nexus"]{--bg:#101018;--bg2:#171722;--bg3:#1f1f2c;--fg:#f4f1ec;--mid:#c4beb8;--dim:#9d98a8;--acc:#ffb56f;--acc-ink:#1f1100;--err:#ff8080;--accent-rgb:255,181,111;--secondary:#61f3ff;--secondary-rgb:97,243,255}
/* Ultraviolet */
html[data-theme="ultraviolet"]{--bg:#0f0b19;--bg2:#161125;--bg3:#1e1831;--fg:#f1edfb;--mid:#bfb6d6;--dim:#9b91b4;--acc:#b69cff;--acc-ink:#170b33;--err:#ff8095;--accent-rgb:182,156,255;--secondary:#5ee6ff;--secondary-rgb:94,230,255}
/* Cobalt */
html[data-theme="cobalt"]{--bg:#0a0f1c;--bg2:#101729;--bg3:#172036;--fg:#edf2fc;--mid:#b3bdd3;--dim:#8f9bb5;--acc:#72a9ff;--acc-ink:#04122b;--err:#ff836f;--accent-rgb:114,169,255;--secondary:#ffd36e;--secondary-rgb:255,211,110}
/* Jade */
html[data-theme="jade"]{--bg:#09120f;--bg2:#0f1a16;--bg3:#15231e;--fg:#ebf5f0;--mid:#b2c6bc;--dim:#8ba497;--acc:#5ee0a0;--acc-ink:#03170d;--err:#ff8a72;--accent-rgb:94,224,160;--secondary:#e8d27a;--secondary-rgb:232,210,122}
/* Copper */
html[data-theme="copper"]{--bg:#130e0c;--bg2:#1b1411;--bg3:#241b17;--fg:#f6efea;--mid:#cbbcb2;--dim:#a8978c;--acc:#f0a070;--acc-ink:#2a1206;--err:#ff8a99;--accent-rgb:240,160,112;--secondary:#7fe0d0;--secondary-rgb:127,224,208}
/* Rose Noir */
html[data-theme="rose-noir"]{--bg:#140b10;--bg2:#1c1117;--bg3:#26171f;--fg:#f8eef2;--mid:#d0b9c3;--dim:#ab949f;--acc:#ff8fb8;--acc-ink:#2d0717;--err:#ffa366;--accent-rgb:255,143,184;--secondary:#ffc48a;--secondary-rgb:255,196,138}
/* Glacial */
html[data-theme="glacial"]{--bg:#0b1116;--bg2:#111a21;--bg3:#18232c;--fg:#eef6fa;--mid:#b5c5cf;--dim:#8fa3af;--acc:#a8e4ff;--acc-ink:#06202e;--err:#ff8c7c;--accent-rgb:168,228,255;--secondary:#c9b8ff;--secondary-rgb:201,184,255}

/* Theme control (#themeControl / #btnTheme) and its non-modal menu (#themeMenu). */
.theme-control{position:relative;display:flex;flex:none}
.theme-btn{position:relative;touch-action:manipulation;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.theme-btn .theme-dot{position:absolute;inset-inline-end:7px;bottom:7px;width:9px;height:9px;border-radius:50%;
  background:linear-gradient(135deg,var(--acc) 0 50%,var(--secondary) 50% 100%);box-shadow:0 0 0 2px var(--bg2)}
.theme-control.open .theme-btn{border-color:rgba(var(--accent-rgb),.55);color:var(--fg)}
.theme-menu{position:fixed;z-index:60;top:0;left:0;box-sizing:border-box;width:min(260px,calc(100vw - 16px));max-height:calc(100dvh - 16px);
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;margin:0;padding:6px;
  border-radius:16px;border:1px solid var(--line2);background:var(--bg2);color:var(--fg);
  box-shadow:0 18px 44px rgba(0,0,0,.5),0 0 0 1px rgba(var(--accent-rgb),.10),0 0 28px rgba(var(--accent-rgb),.08)}
.theme-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;margin:0;padding:6px 10px;border:0;border-radius:11px;
  background:transparent;color:var(--fg);font:500 14px/1.2 var(--sans);text-align:start;transition:background-color .12s var(--ease)}
@media (hover:hover) and (pointer:fine){.theme-item:hover{background:var(--bg3)}}
.theme-item:focus-visible{outline:2px solid var(--acc);outline-offset:-2px;border-radius:11px}
.theme-item[aria-checked="true"]{background:rgba(var(--accent-rgb),.12)}
.theme-sw{flex:none;width:30px;height:22px;border-radius:7px;background:linear-gradient(135deg,var(--sw-a) 0 50%,var(--sw-b) 50% 100%);
  box-shadow:inset 0 0 0 3px var(--sw-bg),0 0 0 1px var(--line2)}
.theme-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}
.theme-menu[dir="rtl"] .theme-name{text-align:right}
.theme-ck{flex:none;width:16px;height:16px}
.theme-item[aria-checked="true"] .theme-ck::before{content:"";display:block;width:5px;height:10px;margin:1px auto 0;border:solid var(--acc);border-width:0 2px 2px 0;transform:rotate(45deg)}
@media (prefers-contrast:more){.theme-menu{border-color:var(--mid)}}
/* No continuous animation anywhere; even the hover tint is instant when motion is reduced. */
html.rm .theme-item,html.rm .theme-menu{transition:none;animation:none}
@media (prefers-reduced-motion:reduce){.theme-item,.theme-menu{transition:none;animation:none}}
