/* Dark version of the site: a deep blue background with see-through (glass) panels. Day is the normal look, so nothing here applies until <html data-theme="dark"> (set by theme.js). */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"][data-version="2"] {
  --bg:#0b2234; --fg:#e8f0f5; --muted:#a3b7c6; --line:rgba(255,255,255,.22);
  --card:rgba(255,255,255,.09); --empty:rgba(255,255,255,.05); --accent:#7aa2f7;
  --head:#242528; --headfg:#f2f8fa; --lunch:rgba(226,182,92,.18); --hit:#e2b65c;
  --bar:#081c2b; --barfg:#e7f1f4; --on:#e2b65c;
}
html[data-theme="dark"][data-version="2"],
html[data-theme="dark"][data-version="2"] body {
  min-height:100vh; color:var(--fg);
  background:radial-gradient(1200px 700px at 15% -10%,#1f4893 0%,transparent 60%),radial-gradient(900px 600px at 95% 10%,#2b5d8c 0%,transparent 55%),linear-gradient(160deg,#0b2234 0%,#0f3a50 55%,#0d2c40 100%) fixed;
}
/* text boxes, dropdowns, text areas */
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background:rgba(255,255,255,.1); color:#fff; border-color:rgba(255,255,255,.3); }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color:rgba(255,255,255,.55); }
html[data-theme="dark"] select option { background:#242528; color:#fff; }
/* pop-up boxes */
html[data-theme="dark"] dialog, html[data-theme="dark"] .dialog { background:#242528; color:var(--fg); }
html[data-theme="dark"] dialog::backdrop { background:rgba(2,10,18,.7); }
/* links, tables, dividers */
html[data-theme="dark"] a { color:#7fa2e4; }
html[data-theme="dark"] hr { border-color:rgba(255,255,255,.2); }
html[data-theme="dark"] table { color:var(--fg); }
html[data-theme="dark"] th, html[data-theme="dark"] td { border-color:rgba(255,255,255,.18); }
/* plain light buttons become glass */
html[data-theme="dark"] button:not(.primary):not(.tv-save):not(.addopen):not([aria-pressed="true"]):not([class*="save"]) { background-color:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.3); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background:rgba(255,255,255,.3); }
/* pop-ups, drop-down lists and menus must be solid, never see-through: the glass panel colour lets the page show through them */
html[data-theme="dark"] :is(#info .formation-picker, #signmodal .sm-box, #signmodal .sm-sug, .bmenu, #buildpanel, #ruleflag, .ulbox) { background:#242528 !important; }
html[data-theme="dark"] #info .avov .box.dlbox:not(#z) { background:#242528 !important; }
