/* ПЕРИМЕТР — альтернативные темы оформления.
   Включение: <html data-theme="…">: pda, wasteland, monolith, blowout, duty, freedom, mercs,
   covenant, science (светлая), journal (светлая), retro, artifact, swamp,
   rad, agit (светлая), thermal, frost, noir, synth, glitch, graffiti, blueprint, trader, rust, camo,
   medbay (светлая), bar, anomaly, minimal, paper (светлая), autumn, panel, bio. Без атрибута файл ничего не меняет.
   «Основа тем» ниже собрана автоматически из style.css и tools.css:
   те же правила, но зашитые цвета заменены на токены --acid/--ember/--blood/--bg/--ink. */
@import url("https://fonts.googleapis.com/css2?family=Russo+One&family=Oswald:wght@500;700&family=Tektur:wght@500;800&family=Comfortaa:wght@500;700&family=Exo+2:wght@500;800&family=Yeseva+One&family=IBM+Plex+Mono:wght@500;700&family=Neucha&family=Press+Start+2P&family=Play:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Stalinist+One&family=Jost:wght@500;700&family=Rubik:wght@500;800&family=Tenor+Sans&family=Playfair+Display:ital,wght@0,800;1,800&family=Rubik+Mono+One&family=Rubik+Glitch&family=Rubik+Wet+Paint&family=Fira+Code:wght@500;700&family=Forum&family=Kelly+Slab&family=Sofia+Sans+Extra+Condensed:wght@700;900&family=Onest:wght@500;800&family=Lobster&family=Golos+Text:wght@500;700&family=Inter:wght@500;800&family=Lora:ital,wght@1,700&family=Jura:wght@500;700&family=Rubik+Microbe&display=swap");

/* ═════════ основа тем (сгенерировано из style.css и tools.css) ═════════ */
/* ── из style.css: 55 правил ── */
html[data-theme] #sky.fallback { background: radial-gradient(1200px 700px at 70% 20%, #2b3a0a 0%, #0b0e08 45%, var(--panel) 100%); }
html[data-theme] .cursor { border: 1px solid rgb(from var(--acid) r g b / .6); }
html[data-theme] .cursor.hot { background: rgb(from var(--acid) r g b / .12); }
html[data-theme] .top { background: linear-gradient(to bottom, rgb(from var(--bg) r g b / .85), rgb(from var(--bg) r g b / .45)); }
html[data-theme] .nav a.nav-clan { box-shadow: inset 0 0 0 1px rgb(from var(--acid) r g b / .35); }
html[data-theme] .em-chip.active { background: rgb(from var(--blood) r g b / .18); }
@keyframes ping {0% { box-shadow: 0 0 0 0 rgb(from var(--acid) r g b / .6); } 100% { box-shadow: 0 0 0 10px rgb(from var(--acid) r g b / 0); }}
html[data-theme] .login.on { box-shadow: inset 0 0 0 1px rgb(from var(--acid) r g b / .4); }
html[data-theme] .rk.r-colonel, html[data-theme] .rk.r-officer { background: rgb(from var(--acid) r g b / .14); }
html[data-theme] .demo-banner { border: 1px dashed rgb(from var(--ember) r g b / .5); background: rgb(from var(--ember) r g b / .08); }
html[data-theme] .page-head h1 em, html[data-theme] .holo { background-image: repeating-linear-gradient(180deg, var(--acid) 0 2px, rgb(from var(--acid) r g b / .25) 2px 5px); }
html[data-theme] .hero h1 .stroke { background-image: repeating-linear-gradient(180deg, var(--ink) 0 3px, rgb(from var(--ink) r g b / .12) 3px 7px); }
html[data-theme] .reactor .r-prog { filter: drop-shadow(0 0 14px rgb(from var(--acid) r g b / .6)); }
html[data-theme] .reactor .r-ticks line { stroke: rgb(from var(--ink) r g b / .25); }
html[data-theme] .reactor .r-ticks line.big { stroke: rgb(from var(--ink) r g b / .6); }
html[data-theme] .reactor .r-dash { stroke: rgb(from var(--acid) r g b / .35); }
html[data-theme] .ticker { background: rgb(from var(--bg) r g b / .6); }
html[data-theme] .card::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgb(from var(--acid) r g b / .13), transparent 60%); }
html[data-theme] .card::after { background: radial-gradient(260px circle at var(--mx) var(--my), rgb(from var(--acid) r g b / .85), transparent 60%); }
html[data-theme] .field input:focus, html[data-theme] .sel:focus { box-shadow: 0 0 0 4px rgb(from var(--acid) r g b / .12); }
html[data-theme] .table tbody tr:hover { background: rgb(from var(--acid) r g b / .05); }
html[data-theme] .lvl { background: rgb(from var(--acid) r g b / .1); }
html[data-theme] .bars div { background: linear-gradient(to top, rgb(from var(--acid) r g b / .15), var(--acid)); }
html[data-theme] .em-status.active { border-color: rgb(from var(--blood) r g b / .5); background: linear-gradient(140deg, rgb(from var(--blood) r g b / .2), var(--glass)); }
html[data-theme] .search-xl input:focus { box-shadow: 0 0 0 6px rgb(from var(--acid) r g b / .1); }
html[data-theme] .avatar.online::after { border: 4px solid var(--panel); }
html[data-theme] .ach span { background: rgb(from var(--acid) r g b / .08); border: 1px solid rgb(from var(--acid) r g b / .2); }
html[data-theme] .wcard img { filter: brightness(1.5) drop-shadow(0 0 18px rgb(from var(--acid) r g b / .25)); }
html[data-theme] input[type=range]::-webkit-slider-thumb { box-shadow: 0 0 20px rgb(from var(--acid) r g b / .6); }
html[data-theme] .out .huge { text-shadow: 0 0 80px rgb(from var(--acid) r g b / .35); }
html[data-theme] .shots i { box-shadow: 0 0 12px rgb(from var(--acid) r g b / .5); }
html[data-theme] .drawer { background: var(--panel); }
html[data-theme] .err { border: 1px solid rgb(from var(--blood) r g b / .4); background: rgb(from var(--blood) r g b / .08); }
html[data-theme] .mc-mode.on { border-color: rgb(from var(--acid) r g b / .5); }
html[data-theme] .mc-order { background: linear-gradient(135deg, rgb(from var(--acid) r g b / .09), var(--glass)); border-color: rgb(from var(--acid) r g b / .28); }
html[data-theme] .mc-card.has { border-color: rgb(from var(--acid) r g b / .25); }
html[data-theme] .mc-dev.on { border-color: rgb(from var(--ember) r g b / .5); background: rgb(from var(--ember) r g b / .06); }
html[data-theme] .kv-board { background: var(--panel); }
html[data-theme] .kv-m.sel circle, html[data-theme] .kv-m:hover { filter: drop-shadow(0 0 6px rgb(from var(--acid) r g b / .8)); }
html[data-theme] .kv-drop.over { background: rgb(from var(--acid) r g b / .06); }
html[data-theme] .kv-chip { background: rgb(from var(--ember) r g b / .15); border: 1px solid rgb(from var(--ember) r g b / .4); }
html[data-theme] .kv-bar2 { background: rgb(from var(--blood) r g b / .45); }
html[data-theme] .sq-mode.on { background: linear-gradient(140deg, rgb(from var(--acid) r g b / .12), var(--glass)); }
html[data-theme] .sq-warn { border: 1px solid rgb(from var(--ember) r g b / .45); background: rgb(from var(--ember) r g b / .07); }
html[data-theme] .sq-good { border: 1px solid rgb(from var(--acid) r g b / .4); }
html[data-theme] .sq-tag.bad { background: rgb(from var(--blood) r g b / .18); }
html[data-theme] .kv-chip.lead { background: rgb(from var(--acid) r g b / .15); border-color: rgb(from var(--acid) r g b / .45); }
html[data-theme] .bo-rec.in { border-color: rgb(from var(--acid) r g b / .45); background: rgb(from var(--acid) r g b / .06); }
@media (max-width: 1400px) {
  html[data-theme] .nav { background: rgb(from var(--bg) r g b / .96); }
}
html[data-theme] .foot-brand { background-image: repeating-linear-gradient(180deg, rgb(from var(--ink) r g b / .4) 0 2px, rgb(from var(--ink) r g b / .06) 2px 6px); }
@media (max-width: 1100px) {
  html[data-theme] .nav { background: rgb(from var(--bg) r g b / .96); }
}
html[data-theme] { scrollbar-color: rgb(from var(--acid) r g b / .45) #07080a; }
html[data-theme] * { scrollbar-color: rgb(from var(--acid) r g b / .35) transparent; }
html[data-theme] *:hover { scrollbar-color: rgb(from var(--acid) r g b / .6) transparent; }
@supports (appearance: base-select) {
  html[data-theme] ::picker(select) { box-shadow: 0 24px 60px -12px rgba(0,0,0,.8), 0 0 0 1px rgb(from var(--acid) r g b / .06); }
  html[data-theme] select option:hover, html[data-theme] select option:focus-visible { background: rgb(from var(--acid) r g b / .1); }
}

/* ── из tools.css: 16 правил ── */
html[data-theme] .tl-ok { border: 1px solid rgb(from var(--acid) r g b / .45); background: var(--panel); }
html[data-theme] .tl-mod.on { border-color: rgb(from var(--acid) r g b / .4); }
html[data-theme] .tl-mod.dev.on { border-color: rgb(from var(--ember) r g b / .5); }
html[data-theme] .tl-sw[aria-checked="true"] { background: rgb(from var(--acid) r g b / .2); }
html[data-theme] .tl-mod.dev .tl-sw[aria-checked="true"] { background: rgb(from var(--ember) r g b / .2); }
html[data-theme] .tl-bars i { background: linear-gradient(90deg, rgb(from var(--ember) r g b / .25) var(--w), rgba(255,255,255,.05) var(--w)); }
html[data-theme] .adv { border-color: rgb(from var(--acid) r g b / .28); background: linear-gradient(135deg, rgb(from var(--acid) r g b / .07), var(--glass)); }
html[data-theme] .adv-tier.best { background: rgb(from var(--acid) r g b / .1); }
html[data-theme] .bo-ext { border: 1px solid rgb(from var(--acid) r g b / .4); background: rgb(from var(--acid) r g b / .07); }
html[data-theme] .act-row.act-gone, html[data-theme] .act-row.act-dead { border-color: rgb(from var(--blood) r g b / .3); }
html[data-theme] .pw-sel { background: rgb(from var(--acid) r g b / .06); border: 1px solid rgb(from var(--acid) r g b / .3); }
html[data-theme] .pw-row.hit { border-color: rgb(from var(--ember) r g b / .6); background: rgb(from var(--ember) r g b / .08); }
html[data-theme] .ph-side { border: 1px dashed rgb(from var(--acid) r g b / .35); background: linear-gradient(135deg, rgb(from var(--acid) r g b / .07), rgba(0,0,0,.35)); }
html[data-theme] .ph-side:hover, html[data-theme] .ph-side:focus-visible { box-shadow: 0 0 40px rgb(from var(--acid) r g b / .12); }
html[data-theme] .ttk-zb i { background: linear-gradient(90deg, rgb(from var(--acid) r g b / .35), var(--acid)); }
html[data-theme] .ttk-dist i { background: linear-gradient(to top, rgb(from var(--acid) r g b / .12), rgb(from var(--acid) r g b / .6)); }

/* ═════════ сами темы ═════════ */


html[data-theme] { --panel: #0b0d0b; }
/* небо краснеет перед выбросом — его цвет не трогаем, когда выброс близко */
html[data-theme] body:has(#emChip.active) #sky, html[data-theme] body:has(#emChip.warn) #sky { filter: none !important; }
html[data-theme] #sky { transition: filter 1.2s; }
/* кольцо таймера выброса — в цвет темы (по умолчанию там зашитый жёлто-зелёный градиент) */
html[data-theme]:not([data-theme="thermal"], [data-theme="rad"], [data-theme="wasteland"]) .reactor:not(.active) .r-prog { stroke: var(--acid); filter: drop-shadow(0 0 14px rgb(from var(--acid) r g b / .55)); }

/* ═════════ КПК — зелёный терминал сталкерского наладонника ═════════ */
html[data-theme="pda"] {
  --bg: #020805; --ink: #c6ffd6; --ink-2: #8ed9a7; --muted: #4f8b63;
  --line: rgba(120,255,170,.12); --line-2: rgba(120,255,170,.26);
  --glass: rgba(3,14,7,.72); --glass-2: rgba(5,20,10,.82); --panel: #030c06;
  --acid: #3dff8b; --acid-d: #19b85a; --ember: #ffd23f; --blood: #ff4b4b; --ice: #6fe3ff;
  --r: 6px;
  --display: "JetBrains Mono", ui-monospace, monospace;
  --body: "JetBrains Mono", ui-monospace, monospace;
}
html[data-theme="pda"] body { font-size: 14px; }
html[data-theme="pda"] #sky { filter: hue-rotate(66deg) saturate(1.2) brightness(.8); }
html[data-theme="pda"] .scan { opacity: .55; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.28) 2px 3px); }
html[data-theme="pda"] body::before { content: ""; position: fixed; inset: 0; z-index: 48; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6) 100%); }
html[data-theme="pda"] .page-head h1, html[data-theme="pda"] .hero h1, html[data-theme="pda"] .section-h h2 { letter-spacing: -.06em; text-shadow: 0 0 28px rgb(from var(--acid) r g b / .35); }
html[data-theme="pda"] .page-head h1::after, html[data-theme="pda"] .hero h1 .ln:last-child::after { content: "_"; color: var(--acid); animation: blink 1s steps(2) infinite; }
html[data-theme="pda"] .eyebrow::before { content: ">"; width: auto; height: auto; background: none; }
/* уголки-скобки на карточках, как рамка экрана КПК */
html[data-theme="pda"] .card {
  background:
    linear-gradient(var(--acid), var(--acid)) top left / 14px 1px no-repeat,
    linear-gradient(var(--acid), var(--acid)) top left / 1px 14px no-repeat,
    linear-gradient(var(--acid), var(--acid)) top right / 14px 1px no-repeat,
    linear-gradient(var(--acid), var(--acid)) top right / 1px 14px no-repeat,
    linear-gradient(var(--acid), var(--acid)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--acid), var(--acid)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--acid), var(--acid)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--acid), var(--acid)) bottom right / 1px 14px no-repeat,
    var(--glass);
}
html[data-theme="pda"] .btn, html[data-theme="pda"] .pill, html[data-theme="pda"] .nav a, html[data-theme="pda"] .login,
html[data-theme="pda"] .em-chip, html[data-theme="pda"] .region select, html[data-theme="pda"] .field input, html[data-theme="pda"] .sel,
html[data-theme="pda"] .search-xl input, html[data-theme="pda"] .burger, html[data-theme="pda"] .hdr-ico { border-radius: 3px; }
html[data-theme="pda"] .btn, html[data-theme="pda"] .nav a { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
html[data-theme="pda"] .btn:not(.ghost) { box-shadow: 0 0 24px rgb(from var(--acid) r g b / .35); }
html[data-theme="pda"] .bignum, html[data-theme="pda"] .stat .v, html[data-theme="pda"] .reactor-c .big { text-shadow: 0 0 18px rgb(from var(--acid) r g b / .4); }

/* ═════════ ПУСТОШЬ — военный планшет: песок, янтарь, трафарет ═════════ */
html[data-theme="wasteland"] {
  --bg: #0c0905; --ink: #f0e4cc; --ink-2: #c8b897; --muted: #8d7d61;
  --line: rgba(240,228,204,.1); --line-2: rgba(240,228,204,.22);
  --glass: rgba(22,17,10,.7); --glass-2: rgba(30,23,13,.8); --panel: #100c07;
  --acid: #ffb21e; --acid-d: #c47c00; --ember: #ff6a2b; --blood: #e8392b; --ice: #9fd3c7;
  --r: 4px;
  --display: "Russo One", "Unbounded", system-ui, sans-serif;
  font-synthesis-weight: none;
}
html[data-theme="wasteland"] #sky { filter: hue-rotate(-42deg) saturate(.75) sepia(.35) brightness(.85); }
html[data-theme="wasteland"] :is(h1, h2, h3, .brand-word, .bignum, .stat .v, .foot-brand, .mc-h, .out .huge, .kv-score b, .kv-big, .em-status .state, .diff, .avatar, .mc-sign, .op .map, .mc-name, .drawer h2) { font-weight: 400; }
html[data-theme="wasteland"] .page-head h1, html[data-theme="wasteland"] .hero h1 { letter-spacing: -.01em; line-height: .95; }
/* полоса «осторожно» под заголовком раздела */
html[data-theme="wasteland"] .page-head::after { content: ""; display: block; width: 180px; height: 8px; margin-top: 26px;
  background: repeating-linear-gradient(-45deg, var(--acid) 0 10px, transparent 10px 20px); opacity: .85; }
html[data-theme="wasteland"] .card {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px), var(--glass);
  border-color: var(--line-2); box-shadow: inset 0 3px 0 -1px rgb(from var(--acid) r g b / .55);
}
html[data-theme="wasteland"] .btn, html[data-theme="wasteland"] .pill, html[data-theme="wasteland"] .nav a, html[data-theme="wasteland"] .login,
html[data-theme="wasteland"] .em-chip, html[data-theme="wasteland"] .region select, html[data-theme="wasteland"] .field input, html[data-theme="wasteland"] .sel,
html[data-theme="wasteland"] .search-xl input, html[data-theme="wasteland"] .burger, html[data-theme="wasteland"] .hdr-ico { border-radius: 2px; }
html[data-theme="wasteland"] .btn, html[data-theme="wasteland"] .nav a { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
html[data-theme="wasteland"] .eyebrow { color: var(--acid); }
html[data-theme="wasteland"] .eyebrow::before { height: 6px; width: 30px; background: repeating-linear-gradient(-45deg, currentColor 0 3px, transparent 3px 6px); }
html[data-theme="wasteland"] .grain { opacity: .14; }

/* ═════════ МОНОЛИТ — холодный неон: лёд, фиолет, мягкое стекло ═════════ */
html[data-theme="monolith"] {
  --bg: #03060c; --ink: #e6f1ff; --ink-2: #a9bdd6; --muted: #6c809b;
  --line: rgba(180,210,255,.1); --line-2: rgba(180,210,255,.2);
  --glass: rgba(10,16,30,.5); --glass-2: rgba(14,22,40,.66); --panel: #060b15;
  --acid: #7df9ff; --acid-d: #2bb7d6; --ember: #b38bff; --blood: #ff3d7f; --ice: #7df9ff;
  --r: 28px;
}
html[data-theme="monolith"] #sky { filter: hue-rotate(120deg) saturate(1.35); }
html[data-theme="monolith"] .page-head h1 em, html[data-theme="monolith"] .holo, html[data-theme="monolith"] .hero h1 .acid {
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, var(--acid) 0%, var(--ember) 45%, var(--acid) 90%); background-size: 220% 100%;
  animation: mono-shine 7s linear infinite;
}
/* строка героя сначала «выезжает» (анимация rise из style.css) — своя анимация темы её не должна подменять,
   иначе строка остаётся спрятанной под маской .ln. Поэтому для героя — обе анимации списком. */
html[data-theme="monolith"] .hero h1 .ln > span.acid { animation: rise 1.1s var(--ease) .24s forwards, mono-shine 7s linear infinite; }
@keyframes mono-shine { to { background-position: -220% 0; } }
html[data-theme="monolith"] .card { backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 30px 70px -40px rgb(from var(--ember) r g b / .55); }
html[data-theme="monolith"] .btn:not(.ghost), html[data-theme="monolith"] .nav a.on, html[data-theme="monolith"] .login:not(.on), html[data-theme="monolith"] .pill.on {
  background: linear-gradient(120deg, var(--acid), #b9c4ff 55%, var(--ember)); color: #050814; border-color: transparent; }
html[data-theme="monolith"] .btn:not(.ghost) { box-shadow: 0 10px 40px -10px rgb(from var(--ember) r g b / .7); }
html[data-theme="monolith"] .reactor .r-prog { stroke: var(--acid); }
html[data-theme="monolith"] .bars div, html[data-theme="monolith"] .kbar i { background: linear-gradient(to top, rgb(from var(--ember) r g b / .25), var(--acid)); }
html[data-theme="monolith"] .eyebrow::before { background: linear-gradient(90deg, var(--ember), var(--acid)); }

/* ─── общее для тем со шрифтом в одно начертание: без «ложного» жирного ─── */
html:is([data-theme="covenant"], [data-theme="journal"], [data-theme="retro"], [data-theme="rad"], [data-theme="agit"], [data-theme="frost"], [data-theme="synth"], [data-theme="glitch"], [data-theme="graffiti"], [data-theme="trader"], [data-theme="rust"], [data-theme="bar"], [data-theme="bio"]) { font-synthesis-weight: none; }
html:is([data-theme="covenant"], [data-theme="journal"], [data-theme="retro"], [data-theme="rad"], [data-theme="agit"], [data-theme="frost"], [data-theme="synth"], [data-theme="glitch"], [data-theme="graffiti"], [data-theme="trader"], [data-theme="rust"], [data-theme="bar"], [data-theme="bio"]) :is(h1, h2, h3, .brand-word, .bignum, .stat .v, .foot-brand, .mc-h, .out .huge, .kv-score b, .kv-big, .em-status .state, .diff, .avatar, .mc-sign, .op .map, .mc-name, .drawer h2) { font-weight: 400; }

/* ─── общее для светлых тем (Учёные, Дневник) ─── */
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) { color-scheme: light; }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) body { background: var(--bg); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) #sky { opacity: 0; }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) .scan { opacity: .06; }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) .grain { opacity: .12; mix-blend-mode: multiply; }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) .pill.on { color: var(--bg); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) .foot { background: rgb(from var(--panel) r g b / .85); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) :is(.field input, .sel, .search-xl input, .mc-ta, .kv-form :is(input, select, textarea), .bo-inputs :is(input, select), .bo-n, .sq-table select, .kv-mname, .kv-inline input) { background: rgba(255,255,255,.7); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) :is(.stat-grid .s, .ring, .kv-li, .bo-rec, .bo-row, .sq-squad, .gun, .kv-score > div, .timeline, .sz-text, .mc-note,
  .ttk-facts > div, .tl-row, .adv-tier, .adv-row, .adv-tips li, .sb-kit, .sb-sqrow, .sb-tot .sb-item, .act-row, .kv-stagebar, .pw-row, .pw-sug button) { background: rgba(255,255,255,.5); border-color: var(--line); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) :is(.tl-fields :is(input, select), .adv-in :is(input, select), .adv-pick, .sb-st input, .sb-item input, .sb-add, .sb-as select, .ph-form :is(input, textarea), .tl-sel) { background: rgba(255,255,255,.75); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) .tl-ok { background: var(--panel); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) select option { background: var(--panel); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) ::picker(select) { background: var(--panel); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) :is(.tag, .rk, code, .sq-tag) { background: rgb(from var(--ink) r g b / .08); }
html:is([data-theme="science"], [data-theme="journal"], [data-theme="agit"], [data-theme="medbay"], [data-theme="paper"]) .cursor { mix-blend-mode: multiply; }

/* ═════════ ВЫБРОС — красная тревога: багровое небо, сжатый шрифт, пульс ═════════ */
html[data-theme="blowout"] {
  --bg: #0b0306; --ink: #ffe9ee; --ink-2: #e0b5c0; --muted: #96707b;
  --line: rgba(255,200,215,.1); --line-2: rgba(255,200,215,.22);
  --glass: rgba(26,6,12,.62); --glass-2: rgba(36,8,16,.75); --panel: #120509;
  --acid: #ff2d55; --acid-d: #b3002a; --ember: #ffb020; --blood: #ffd400;
  --r: 10px; --display: "Oswald", "Unbounded", sans-serif;
}
html[data-theme="blowout"] #sky { filter: hue-rotate(-88deg) saturate(1.6) brightness(.9); }
html[data-theme="blowout"] :is(.page-head h1, .hero h1, .section-h h2) { letter-spacing: .01em; }
html[data-theme="blowout"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign) { color: #1a0006; }
html[data-theme="blowout"] body::before { content: ""; position: fixed; inset: 0; z-index: 48; pointer-events: none;
  box-shadow: inset 0 0 120px rgb(from var(--acid) r g b / .35); animation: bo-pulse 2.6s ease-in-out infinite; }
@keyframes bo-pulse { 50% { box-shadow: inset 0 0 60px rgb(from var(--acid) r g b / .12); } }
html[data-theme="blowout"] .card { border-color: rgb(from var(--acid) r g b / .22); }

/* ═════════ ДОЛГ — строгий армейский: чёрный, белый, красная звезда ═════════ */
html[data-theme="duty"] {
  --bg: #080808; --ink: #f4f4f4; --ink-2: #c4c4c4; --muted: #7d7d7d;
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.2);
  --glass: rgba(16,16,16,.78); --glass-2: rgba(24,24,24,.86); --panel: #0e0e0e;
  --acid: #ff3b30; --acid-d: #9e1b14; --ember: #f2c14e; --blood: #ff5a5a;
  --r: 0px; --display: "Tektur", "Unbounded", sans-serif;
}
html[data-theme="duty"] #sky { filter: grayscale(1) brightness(.55) contrast(1.2); }
html[data-theme="duty"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign) { color: #000; }
html[data-theme="duty"] .page-head h1 em, html[data-theme="duty"] .holo { background-image: none; color: var(--acid); }
html[data-theme="duty"] .eyebrow::before { content: "★"; width: auto; height: auto; background: none; color: var(--acid); }
html[data-theme="duty"] .card { border-left: 3px solid var(--acid); }
html[data-theme="duty"] :is(.btn, .pill, .nav a, .login, .em-chip, .region select, .burger, .hdr-ico, .field input, .sel, .search-xl input) { border-radius: 0; }
html[data-theme="duty"] :is(.btn, .nav a) { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }

/* ═════════ СВОБОДА — зелень и солнце: мягкие формы, округлый шрифт ═════════ */
html[data-theme="freedom"] {
  --bg: #04100a; --ink: #eefbe8; --ink-2: #b9d8b0; --muted: #77966e;
  --line: rgba(200,255,190,.1); --line-2: rgba(200,255,190,.22);
  --glass: rgba(8,28,16,.58); --glass-2: rgba(12,38,22,.72); --panel: #071a0f;
  --acid: #ffe14d; --acid-d: #c9a800; --ember: #4cdb6e; --blood: #ff5c5c;
  --r: 32px; --display: "Comfortaa", "Unbounded", sans-serif;
}
html[data-theme="freedom"] #sky { filter: hue-rotate(40deg) saturate(1.3); }
html[data-theme="freedom"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 700; letter-spacing: -.03em; text-transform: none; }
html[data-theme="freedom"] .page-head h1 em, html[data-theme="freedom"] .holo, html[data-theme="freedom"] .hero h1 .acid {
  background-image: linear-gradient(90deg, var(--ember), var(--acid)); color: transparent; -webkit-background-clip: text; background-clip: text; }
html[data-theme="freedom"] .card { box-shadow: 0 20px 50px -30px rgb(from var(--ember) r g b / .6); }
html[data-theme="freedom"] .btn:not(.ghost) { background: linear-gradient(120deg, var(--acid), var(--ember)); }

/* ═════════ НАЁМНИКИ — сталь и графит: срезанные углы, техно-шрифт ═════════ */
html[data-theme="mercs"] {
  --bg: #06080b; --ink: #e7edf3; --ink-2: #aab6c3; --muted: #6d7a88;
  --line: rgba(190,210,230,.1); --line-2: rgba(190,210,230,.22);
  --glass: rgba(14,19,26,.7); --glass-2: rgba(20,27,36,.8); --panel: #0b1016;
  --acid: #4da3ff; --acid-d: #1f6fc4; --ember: #ff8a3d; --blood: #ff4d5e;
  --r: 0px; --display: "Exo 2", "Unbounded", sans-serif;
}
html[data-theme="mercs"] #sky { filter: hue-rotate(140deg) saturate(.6) brightness(.8); }
html[data-theme="mercs"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 800; font-style: italic; letter-spacing: -.02em; }
html[data-theme="mercs"] .card { clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); border-color: var(--line-2); }
html[data-theme="mercs"] :is(.btn, .pill, .nav a, .login) { border-radius: 0; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
html[data-theme="mercs"] :is(.btn, .pill, .login) { padding-inline: 18px; }
html[data-theme="mercs"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on)) { color: #04121f; }
html[data-theme="mercs"] .page-head h1 em, html[data-theme="mercs"] .holo { background-image: repeating-linear-gradient(90deg, var(--acid) 0 3px, rgb(from var(--acid) r g b / .3) 3px 5px); }

/* ═════════ ЗАВЕТ — пурпур и золото: орден, засечки, орнамент ═════════ */
html[data-theme="covenant"] {
  --bg: #08040e; --ink: #f4ecff; --ink-2: #c9b8e0; --muted: #85769c;
  --line: rgba(220,200,255,.1); --line-2: rgba(220,200,255,.22);
  --glass: rgba(20,10,32,.62); --glass-2: rgba(28,14,44,.75); --panel: #10081a;
  --acid: #e6c35c; --acid-d: #a8862a; --ember: #b46bff; --blood: #ff4f7b;
  --r: 14px; --display: "Yeseva One", Georgia, serif;
}
html[data-theme="covenant"] #sky { filter: hue-rotate(200deg) saturate(1.2) brightness(.85); }
html[data-theme="covenant"] :is(.page-head h1, .hero h1, .section-h h2) { text-transform: none; letter-spacing: 0; line-height: 1; }
html[data-theme="covenant"] .page-head h1 em, html[data-theme="covenant"] .holo, html[data-theme="covenant"] .hero h1 .acid {
  background-image: linear-gradient(180deg, #fff3c4, var(--acid) 55%, var(--acid-d)); color: transparent; -webkit-background-clip: text; background-clip: text; }
html[data-theme="covenant"] .eyebrow::before { content: "✦"; width: auto; height: auto; background: none; }
html[data-theme="covenant"] .card { border-color: rgb(from var(--acid) r g b / .2); box-shadow: inset 0 0 0 4px var(--glass), inset 0 0 0 5px rgb(from var(--acid) r g b / .14); }

/* ═════════ УЧЁНЫЕ — светлая лаборатория: белый, бирюза, моноширинный ═════════ */
html[data-theme="science"] {
  --bg: #eef3f6; --ink: #0e1a24; --ink-2: #3b4d5c; --muted: #5a6a79;
  --line: rgba(14,26,36,.1); --line-2: rgba(14,26,36,.2);
  --glass: rgba(255,255,255,.72); --glass-2: rgba(255,255,255,.85); --panel: #f8fbfd;
  --acid: #007a87; --acid-d: #005c66; --ember: #ff7a1a; --blood: #e5254b;
  --r: 12px; --display: "IBM Plex Mono", ui-monospace, monospace;
}
html[data-theme="science"] body { background-image: linear-gradient(rgba(0,128,140,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(0,128,140,.07) 1px, transparent 1px); background-size: 32px 32px; }
html[data-theme="science"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 700; letter-spacing: -.05em; }
html[data-theme="science"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign) { color: #fff; }
html[data-theme="science"] .page-head h1 em, html[data-theme="science"] .holo { background-image: repeating-linear-gradient(180deg, var(--acid-d) 0 2px, rgb(from var(--acid) r g b / .3) 2px 5px); }
html[data-theme="science"] .card { box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 12px 30px -18px rgba(14,26,36,.35); }

/* ═════════ ДНЕВНИК — записки сталкера: бумага, карандаш, рукописный шрифт ═════════ */
html[data-theme="journal"] {
  --bg: #efe5d0; --ink: #2a2118; --ink-2: #5a4a38; --muted: #6e5c47;
  --line: rgba(42,33,24,.12); --line-2: rgba(42,33,24,.24);
  --glass: rgba(250,244,230,.75); --glass-2: rgba(250,244,230,.88); --panel: #f6eedc;
  --acid: #b33a24; --acid-d: #8f2a17; --ember: #2f6db3; --blood: #b31d1d;
  --r: 3px; --display: "Neucha", "Comic Sans MS", cursive;
}
html[data-theme="journal"] body { background-image: repeating-linear-gradient(transparent 0 31px, rgba(47,109,179,.14) 31px 32px); }
html[data-theme="journal"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign) { color: #fff; }
html[data-theme="journal"] :is(.page-head h1, .hero h1, .section-h h2) { text-transform: none; letter-spacing: 0; line-height: 1; }
html[data-theme="journal"] .page-head h1 em, html[data-theme="journal"] .holo, html[data-theme="journal"] .hero h1 .acid { background: none; color: var(--acid); text-decoration: underline wavy rgb(from var(--acid) r g b / .5); text-decoration-thickness: .025em; text-underline-offset: .14em; }
html[data-theme="journal"] .hero h1 .stroke { background: none; color: var(--ink-2); }
html[data-theme="journal"] .card { box-shadow: 2px 3px 0 rgba(42,33,24,.12); }
html[data-theme="journal"] .card:nth-child(odd) { rotate: -.25deg; } html[data-theme="journal"] .card:nth-child(even) { rotate: .2deg; }

/* ═════════ 8-БИТ — ретро-игра: пиксельный шрифт, ступенчатые тени ═════════ */
html[data-theme="retro"] {
  --bg: #0b0b1e; --ink: #f5f5ff; --ink-2: #b8b8e0; --muted: #7c7caa;
  --line: rgba(160,160,255,.14); --line-2: rgba(160,160,255,.3);
  --glass: rgba(20,20,52,.85); --glass-2: rgba(28,28,70,.9); --panel: #121230;
  --acid: #ffe600; --acid-d: #c2ad00; --ember: #ff4fd8; --blood: #ff3b3b;
  --r: 0px; --display: "Press Start 2P", monospace;
}
html[data-theme="retro"] #sky { filter: hue-rotate(170deg) saturate(1.5); image-rendering: pixelated; }
html[data-theme="retro"] :is(h1, h2, h3, .brand-word, .bignum, .stat .v, .foot-brand, .em-status .state, .out .huge, .mc-h, .kv-score b, .kv-big, .diff, .avatar, .mc-sign, .op .map, .mc-name, .drawer h2) { font-size-adjust: .4; letter-spacing: 0; line-height: 1.25; }
html[data-theme="retro"] .hero h1 .ln { white-space: normal; }
html[data-theme="retro"] .card { border: 3px solid var(--line-2); box-shadow: 6px 6px 0 rgba(0,0,0,.55); }
html[data-theme="retro"] :is(.btn, .pill, .nav a, .login, .em-chip, .region select, .burger, .hdr-ico, .field input, .sel, .search-xl input) { border-radius: 0; }
html[data-theme="retro"] .btn:not(.ghost) { box-shadow: 4px 4px 0 var(--ember); }
html[data-theme="retro"] .btn:not(.ghost):active { translate: 4px 4px; box-shadow: none; }
html[data-theme="retro"] .page-head h1 em, html[data-theme="retro"] .holo { background: none; color: var(--acid); text-shadow: 4px 4px 0 var(--ember); }

/* ═════════ АРТЕФАКТ — переливы «Медузы»: перламутр, мягкое свечение ═════════ */
html[data-theme="artifact"] {
  --bg: #07050d; --ink: #fbf2ff; --ink-2: #d2bfe0; --muted: #8f7fa3;
  --line: rgba(255,210,250,.1); --line-2: rgba(255,210,250,.22);
  --glass: rgba(22,12,30,.55); --glass-2: rgba(30,16,42,.7); --panel: #110a19;
  --acid: #ff6bd6; --acid-d: #c22b9a; --ember: #52f2e4; --blood: #ff4f4f;
  --r: 26px;
}
html[data-theme="artifact"] #sky { filter: hue-rotate(230deg) saturate(1.5); }
html[data-theme="artifact"] .page-head h1 em, html[data-theme="artifact"] .holo, html[data-theme="artifact"] .hero h1 .acid {
  background-image: linear-gradient(110deg, var(--acid), #ffd36b 30%, var(--ember) 60%, var(--acid) 90%); background-size: 250% 100%;
  color: transparent; -webkit-background-clip: text; background-clip: text; animation: mono-shine 9s linear infinite; }
html[data-theme="artifact"] .hero h1 .ln > span.acid { animation: rise 1.1s var(--ease) .24s forwards, mono-shine 9s linear infinite; }
html[data-theme="artifact"] .card::after { opacity: .35; background: conic-gradient(from var(--a, 0deg) at var(--mx) var(--my), var(--acid), var(--ember), #ffd36b, var(--acid)); }
html[data-theme="artifact"] .card:hover::after { opacity: 1; }
html[data-theme="artifact"] .btn:not(.ghost) { background: linear-gradient(120deg, var(--acid), #ffd36b, var(--ember)); }
html[data-theme="artifact"] .reactor .r-prog { stroke: var(--acid); filter: drop-shadow(0 0 16px var(--acid)); }

/* ═════════ БОЛОТО — туман и токсичная жижа: мутная бирюза, кислотный жёлтый ═════════ */
html[data-theme="swamp"] {
  --bg: #050b09; --ink: #e2efe4; --ink-2: #a7bfae; --muted: #6a8573;
  --line: rgba(190,230,200,.1); --line-2: rgba(190,230,200,.2);
  --glass: rgba(10,24,20,.6); --glass-2: rgba(14,32,27,.74); --panel: #081310;
  --acid: #d6f53a; --acid-d: #9bb81a; --ember: #3fbfa0; --blood: #ff5d4a;
  --r: 18px; --display: "Play", "Unbounded", sans-serif;
}
html[data-theme="swamp"] #sky { filter: hue-rotate(50deg) saturate(.55) brightness(.75) blur(2px); }
html[data-theme="swamp"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 700; letter-spacing: -.02em; }
html[data-theme="swamp"] body::before { content: ""; position: fixed; inset: auto 0 0 0; height: 45vh; z-index: 48; pointer-events: none;
  background: linear-gradient(to top, rgb(from var(--ember) r g b / .16), transparent); animation: sw-fog 9s ease-in-out infinite alternate; }
@keyframes sw-fog { to { opacity: .45; transform: translateY(4%); } }
html[data-theme="swamp"] .page-head h1 em, html[data-theme="swamp"] .holo { background-image: repeating-linear-gradient(180deg, var(--acid) 0 3px, rgb(from var(--ember) r g b / .35) 3px 6px); }

/* ─── темы с меню капслоком: на ноутбуках чуть плотнее, чтобы влезали все разделы ─── */
@media (min-width: 1401px) and (max-width: 1640px) {
  html:is([data-theme="wasteland"], [data-theme="duty"], [data-theme="pda"], [data-theme="camo"], [data-theme="agit"]) .nav a { letter-spacing: .01em; font-size: 12px; padding-inline: 6px; }
}

/* ─── общее: спокойные темы без зерна, сканлайнов и неба ─── */
html:is([data-theme="minimal"], [data-theme="paper"], [data-theme="medbay"]) :is(.grain, .scan, .cursor) { display: none; }
html:is([data-theme="minimal"], [data-theme="paper"], [data-theme="medbay"]) #sky { opacity: 0; }
html:is([data-theme="minimal"], [data-theme="paper"], [data-theme="medbay"]) .card { backdrop-filter: none; -webkit-backdrop-filter: none; }
html:is([data-theme="minimal"], [data-theme="paper"], [data-theme="medbay"]) .card::after { display: none; }
/* очень широкие шрифты заголовков ужимаем, чтобы не вылезали */
html:is([data-theme="agit"], [data-theme="synth"], [data-theme="rad"]) :is(.page-head h1, .hero h1, .section-h h2, .foot-brand) { font-size-adjust: .5; }
html:is([data-theme="agit"], [data-theme="synth"]) .hero h1 .ln { white-space: normal; }
html[data-theme="agit"] :is(.page-head h1, .hero h1, .section-h h2, .foot-brand) { font-size-adjust: .4; }

/* ═════════ РАДИАЦИЯ — чёрный и радиоактивный жёлтый, лента «опасно» ═════════ */
html[data-theme="rad"] {
  --bg: #090906; --ink: #f6f3dc; --ink-2: #c9c4a0; --muted: #8b8768;
  --line: rgba(255,240,150,.1); --line-2: rgba(255,240,150,.22);
  --glass: rgba(18,17,10,.72); --glass-2: rgba(26,24,12,.82); --panel: #11100a;
  --acid: #ffe100; --acid-d: #c2aa00; --ember: #ff7a00; --blood: #ff3b30;
  --r: 6px; --display: "Dela Gothic One", "Unbounded", sans-serif;
}
html[data-theme="rad"] #sky { filter: hue-rotate(-25deg) saturate(1.4) brightness(.8); }
html[data-theme="rad"] .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: repeating-linear-gradient(-45deg, var(--acid) 0 12px, #111 12px 24px); }
html[data-theme="rad"] .eyebrow::before { content: "☢"; width: auto; height: auto; background: none; font-size: 14px; }
html[data-theme="rad"] .card { background: linear-gradient(135deg, var(--acid) 0 12px, transparent 12px), var(--glass); }
html[data-theme="rad"] .page-head h1 em, html[data-theme="rad"] .holo { background-image: repeating-linear-gradient(-45deg, var(--acid) 0 6px, rgb(from var(--acid) r g b / .45) 6px 12px); }

/* ═════════ АГИТПЛАКАТ — конструктивизм: кремовая бумага, красный клин, чёрный ═════════ */
html[data-theme="agit"] {
  --bg: #efe4cc; --ink: #1b1512; --ink-2: #4a3d33; --muted: #685848;
  --line: rgba(27,21,18,.14); --line-2: rgba(27,21,18,.3);
  --glass: rgba(246,238,220,.88); --glass-2: rgba(250,244,230,.94); --panel: #f6eedc;
  --acid: #b51f14; --acid-d: #8e140c; --ember: #1b1512; --blood: #b51f14;
  --r: 0px; --display: "Stalinist One", "Unbounded", sans-serif; --body: "Jost", system-ui, sans-serif;
}
html[data-theme="agit"] body::before { content: ""; position: fixed; z-index: -2; top: -10vh; right: -12vw; width: 55vw; height: 120vh; pointer-events: none;
  background: var(--acid); clip-path: polygon(38% 0, 100% 0, 100% 100%, 82% 100%); opacity: .92; }
html[data-theme="agit"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign) { color: #fff; }
html[data-theme="agit"] .card { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--acid); }
html[data-theme="agit"] .page-head h1 em, html[data-theme="agit"] .holo, html[data-theme="agit"] .hero h1 .acid { background: none; color: var(--acid); }
html[data-theme="agit"] .hero h1 .stroke { background: none; color: var(--ink); -webkit-text-stroke: 0; }
html[data-theme="agit"] :is(.btn, .pill, .nav a, .login, .em-chip, .region select, .burger, .hdr-ico, .field input, .sel, .search-xl input) { border-radius: 0; }

/* ═════════ ТЕПЛОВИЗОР — палитра «инферно»: фиолет → малиновый → жёлтый ═════════ */
html[data-theme="thermal"] {
  --bg: #07020f; --ink: #fff4e6; --ink-2: #d6bfd0; --muted: #937d96;
  --line: rgba(255,200,230,.1); --line-2: rgba(255,200,230,.22);
  --glass: rgba(22,6,30,.64); --glass-2: rgba(32,8,40,.76); --panel: #12051a;
  --acid: #ffcf33; --acid-d: #e0731a; --ember: #ff3d8b; --blood: #ffffff;
  --r: 16px; --display: "Rubik", "Unbounded", sans-serif;
}
html[data-theme="thermal"] #sky { filter: hue-rotate(250deg) saturate(1.6) contrast(1.15); }
html[data-theme="thermal"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 800; }
html[data-theme="thermal"] .page-head h1 em, html[data-theme="thermal"] .holo, html[data-theme="thermal"] .hero h1 .acid {
  background-image: linear-gradient(90deg, #6b2bd9, #c2207a 30%, #ff6b1a 60%, #ffe24a 85%, #fff8d6); color: transparent; -webkit-background-clip: text; background-clip: text; }
html[data-theme="thermal"] .card { box-shadow: 0 0 0 1px rgb(from var(--ember) r g b / .12), 0 30px 80px -40px rgb(from var(--ember) r g b / .7); }
html[data-theme="thermal"] .bars div, html[data-theme="thermal"] .kbar i { background: linear-gradient(to top, #6b2bd9, #c2207a, #ff6b1a, #ffe24a); }

/* ═════════ МОРОЗ — ночь и иней: матовое стекло, разреженные капители ═════════ */
html[data-theme="frost"] {
  --bg: #050a14; --ink: #eef6ff; --ink-2: #b7c9df; --muted: #7d91aa;
  --line: rgba(220,235,255,.12); --line-2: rgba(220,235,255,.26);
  --glass: rgba(200,225,255,.06); --glass-2: rgba(200,225,255,.1); --panel: #0a1220;
  --acid: #bfe6ff; --acid-d: #7fb2ff; --ember: #7fb2ff; --blood: #ff6b8b;
  --r: 20px; --display: "Tenor Sans", "Unbounded", sans-serif;
}
html[data-theme="frost"] #sky { filter: hue-rotate(140deg) saturate(.5) brightness(1.1); }
html[data-theme="frost"] :is(.page-head h1, .hero h1, .section-h h2) { letter-spacing: .04em; }
html[data-theme="frost"] .card { backdrop-filter: blur(30px) saturate(1.4) brightness(1.1); -webkit-backdrop-filter: blur(30px) saturate(1.4) brightness(1.1);
  border-color: rgba(220,235,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 40px rgba(190,225,255,.05); }
html[data-theme="frost"] .eyebrow::before { content: "❄"; width: auto; height: auto; background: none; }
html[data-theme="frost"] .page-head h1 em, html[data-theme="frost"] .holo, html[data-theme="frost"] .hero h1 .acid {
  background-image: linear-gradient(180deg, #ffffff, var(--acid) 50%, var(--acid-d)); color: transparent; -webkit-background-clip: text; background-clip: text; }

/* ═════════ НУАР — чёрно-белое кино: засечки, сильное зерно, без цвета ═════════ */
html[data-theme="noir"] {
  --bg: #050505; --ink: #f2f2f2; --ink-2: #bdbdbd; --muted: #858585;
  --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.24);
  --glass: rgba(14,14,14,.74); --glass-2: rgba(22,22,22,.84); --panel: #0d0d0d;
  --acid: #f5f5f5; --acid-d: #9e9e9e; --ember: #bdbdbd; --blood: #e0193a;
  --r: 2px; --display: "Playfair Display", Georgia, serif;
}
html[data-theme="noir"] #sky { filter: grayscale(1) contrast(1.3) brightness(.7); }
html[data-theme="noir"] .grain { opacity: .2; }
html[data-theme="noir"] :is(.page-head h1, .hero h1, .section-h h2) { font-style: italic; text-transform: none; letter-spacing: -.01em; }
html[data-theme="noir"] .page-head h1 em, html[data-theme="noir"] .holo, html[data-theme="noir"] .hero h1 .acid { background: none; color: var(--acid); text-decoration: underline 2px; text-underline-offset: .12em; }
html[data-theme="noir"] body::before { content: ""; position: fixed; inset: 0; z-index: 48; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(0,0,0,.7)); }
html[data-theme="noir"] .wi, html[data-theme="noir"] .avatar { filter: grayscale(1) brightness(1.3); }

/* ═════════ СИНТВЕЙВ — закат 80-х: розовый и бирюза, неоновая сетка-пол ═════════ */
html[data-theme="synth"] {
  --bg: #0d0221; --ink: #fdf0ff; --ink-2: #d2b6e6; --muted: #9479ad;
  --line: rgba(255,120,240,.12); --line-2: rgba(255,120,240,.26);
  --glass: rgba(30,6,52,.6); --glass-2: rgba(40,8,70,.74); --panel: #170536;
  --acid: #ff3cac; --acid-d: #b8167a; --ember: #2de2e6; --blood: #ffe14d;
  --r: 12px; --display: "Rubik Mono One", "Unbounded", sans-serif;
}
html[data-theme="synth"] #sky { filter: hue-rotate(220deg) saturate(1.6); }
html[data-theme="synth"] body::after { content: ""; position: fixed; z-index: -2; left: -50%; right: -50%; bottom: 0; height: 70vh; pointer-events: none;
  background: linear-gradient(rgb(from var(--ember) r g b / .85) 2px, transparent 2px) 0 0 / 100% 46px, linear-gradient(90deg, rgb(from var(--ember) r g b / .85) 2px, transparent 2px) 0 0 / 70px 100%,
    linear-gradient(to top, rgb(from var(--acid) r g b / .25), transparent 80%);
  transform: perspective(300px) rotateX(62deg); transform-origin: bottom; -webkit-mask: linear-gradient(transparent, #000 35%); mask: linear-gradient(transparent, #000 35%); opacity: .85; }
html[data-theme="synth"] .page-head h1 em, html[data-theme="synth"] .holo, html[data-theme="synth"] .hero h1 .acid {
  background-image: linear-gradient(180deg, #ffe14d 10%, #ff7b39 45%, var(--acid) 80%); color: transparent; -webkit-background-clip: text; background-clip: text; }
html[data-theme="synth"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on)) { color: #14002b; }
html[data-theme="synth"] .card { box-shadow: 0 0 0 1px rgb(from var(--acid) r g b / .2), 0 0 40px -10px rgb(from var(--acid) r g b / .45); }

/* ═════════ ГЛИТЧ — сбой сигнала: RGB-разлом, дёрганые заголовки ═════════ */
html[data-theme="glitch"] {
  --bg: #050508; --ink: #f2f2f7; --ink-2: #b9b9c8; --muted: #7e7e92;
  --line: rgba(220,220,255,.1); --line-2: rgba(220,220,255,.24);
  --glass: rgba(12,12,20,.74); --glass-2: rgba(18,18,30,.84); --panel: #0b0b12;
  --acid: #00f0ff; --acid-d: #00a6b3; --ember: #ff00a8; --blood: #ff2b4f;
  --r: 0px; --display: "Rubik Glitch", "Unbounded", sans-serif;
}
html[data-theme="glitch"] #sky { filter: hue-rotate(120deg) saturate(1.2) contrast(1.3); }
html[data-theme="glitch"] :is(.page-head h1, .hero h1, .section-h h2) { text-shadow: 3px 0 0 rgb(from var(--ember) r g b / .8), -3px 0 0 rgb(from var(--acid) r g b / .8); animation: gl-jit 3.2s steps(1) infinite; }
@keyframes gl-jit { 0%, 92%, 100% { transform: none; } 93% { transform: translate(-3px, 1px) skewX(-4deg); } 95% { transform: translate(4px, -1px); } 97% { transform: translate(-1px, 2px) skewX(3deg); } }
html[data-theme="glitch"] .page-head h1 em, html[data-theme="glitch"] .holo, html[data-theme="glitch"] .hero h1 .acid { background: none; color: var(--acid); }
html[data-theme="glitch"] .card { border-left: 2px solid var(--acid); border-right: 2px solid var(--ember); }
html[data-theme="glitch"] .scan { opacity: .45; }

/* ═════════ ГРАФФИТИ — бетонная стена, потёки краски, наклейки ═════════ */
html[data-theme="graffiti"] {
  --bg: #141416; --ink: #f7f7f2; --ink-2: #c6c6bd; --muted: #8b8b84;
  --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.24);
  --glass: rgba(30,30,32,.8); --glass-2: rgba(40,40,44,.88); --panel: #1b1b1e;
  --acid: #ff4ecd; --acid-d: #c21c96; --ember: #29e0c3; --blood: #ffd600;
  --r: 10px; --display: "Rubik Wet Paint", "Unbounded", sans-serif;
}
html[data-theme="graffiti"] #sky { opacity: .25; filter: grayscale(.8); }
html[data-theme="graffiti"] body { background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.5px), radial-gradient(rgba(0,0,0,.25) 1px, transparent 1.5px); background-size: 7px 7px, 11px 11px; }
html[data-theme="graffiti"] .page-head h1 em, html[data-theme="graffiti"] .holo, html[data-theme="graffiti"] .hero h1 .acid { background: none; color: var(--acid); }
html[data-theme="graffiti"] .hero h1 .stroke { background: none; color: var(--ember); }
html[data-theme="graffiti"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on)) { color: #000; }
html[data-theme="graffiti"] .card:nth-child(3n+1) { rotate: -.4deg; } html[data-theme="graffiti"] .card:nth-child(3n+2) { rotate: .3deg; }
html[data-theme="graffiti"] .card { box-shadow: 0 10px 0 -6px rgb(from var(--ember) r g b / .5); }

/* ═════════ ЧЕРТЁЖ — синька: белая сетка, пунктир, инженерный шрифт ═════════ */
html[data-theme="blueprint"] {
  --bg: #0b2f5c; --ink: #f0f6ff; --ink-2: #c4d7f2; --muted: #93aed4;
  --line: rgba(255,255,255,.16); --line-2: rgba(255,255,255,.34);
  --glass: rgba(12,52,100,.55); --glass-2: rgba(14,60,115,.7); --panel: #0d3566;
  --acid: #ffffff; --acid-d: #c4d7f2; --ember: #ffd166; --blood: #ff7a7a;
  --r: 0px; --display: "Fira Code", ui-monospace, monospace;
}
html[data-theme="blueprint"] #sky { opacity: 0; }
html[data-theme="blueprint"] body { background-color: var(--bg);
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px; }
html[data-theme="blueprint"] .card { border: 1px dashed var(--line-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-theme="blueprint"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 700; letter-spacing: -.04em; }
html[data-theme="blueprint"] .page-head h1 em, html[data-theme="blueprint"] .holo, html[data-theme="blueprint"] .hero h1 .acid { background: none; color: var(--ember); }
html[data-theme="blueprint"] .scan { display: none; }

/* ═════════ ТОРГОВЕЦ — изумруд и золото: дорого, с засечками ═════════ */
html[data-theme="trader"] {
  --bg: #04110c; --ink: #f3f0e2; --ink-2: #c9c4a8; --muted: #8b8a6e;
  --line: rgba(226,184,76,.14); --line-2: rgba(226,184,76,.3);
  --glass: rgba(6,28,20,.7); --glass-2: rgba(8,36,26,.8); --panel: #071a12;
  --acid: #e2b84c; --acid-d: #a8822a; --ember: #2fbf71; --blood: #ff5c5c;
  --r: 4px; --display: "Forum", Georgia, serif;
}
html[data-theme="trader"] #sky { filter: hue-rotate(70deg) saturate(.8) brightness(.7); }
html[data-theme="trader"] :is(.page-head h1, .hero h1, .section-h h2) { letter-spacing: .04em; line-height: .95; }
html[data-theme="trader"] .card { border-color: var(--line-2); box-shadow: inset 0 0 0 5px var(--glass), inset 0 0 0 6px rgb(from var(--acid) r g b / .18); }
html[data-theme="trader"] .page-head h1 em, html[data-theme="trader"] .holo, html[data-theme="trader"] .hero h1 .acid {
  background-image: linear-gradient(180deg, #fff1b8, var(--acid) 50%, var(--acid-d)); color: transparent; -webkit-background-clip: text; background-clip: text; }
html[data-theme="trader"] .eyebrow::before { content: "◆"; width: auto; height: auto; background: none; }

/* ═════════ РЖАВЧИНА — окисленный металл: рыжий, патина, заклёпки ═════════ */
html[data-theme="rust"] {
  --bg: #0e0806; --ink: #f6e7da; --ink-2: #d0b6a2; --muted: #957a66;
  --line: rgba(255,200,170,.1); --line-2: rgba(255,200,170,.22);
  --glass: rgba(30,16,10,.74); --glass-2: rgba(40,20,12,.84); --panel: #170c08;
  --acid: #ec6a2f; --acid-d: #a8401a; --ember: #45b5a8; --blood: #ff4747;
  --r: 6px; --display: "Kelly Slab", "Unbounded", serif;
}
html[data-theme="rust"] #sky { filter: hue-rotate(-60deg) saturate(.9) sepia(.4) brightness(.8); }
html[data-theme="rust"] .card { border-color: var(--line-2);
  background:
    radial-gradient(circle at 12px 12px, #8a5a44 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 12px) 12px, #8a5a44 2.5px, transparent 3px),
    radial-gradient(circle at 12px calc(100% - 12px), #8a5a44 2.5px, transparent 3px), radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), #8a5a44 2.5px, transparent 3px),
    radial-gradient(120% 80% at 100% 0%, rgb(from var(--acid) r g b / .1), transparent 60%), radial-gradient(80% 60% at 0% 100%, rgb(from var(--ember) r g b / .08), transparent 60%),
    var(--glass); }
html[data-theme="rust"] .page-head h1 em, html[data-theme="rust"] .holo { background-image: repeating-linear-gradient(180deg, var(--acid) 0 3px, rgb(from var(--acid-d) r g b / .5) 3px 6px); }

/* ═════════ КАМУФЛЯЖ — олива и хаки: пятна, узкий армейский шрифт ═════════ */
html[data-theme="camo"] {
  --bg: #0b0d07; --ink: #efeeda; --ink-2: #c6c4a4; --muted: #8b8a6c;
  --line: rgba(230,230,190,.1); --line-2: rgba(230,230,190,.24);
  --glass: rgba(20,24,14,.78); --glass-2: rgba(28,32,18,.86); --panel: #12150c;
  --acid: #d4c25c; --acid-d: #9c8d33; --ember: #9aad48; --blood: #ff5a3c;
  --r: 4px; --display: "Sofia Sans Extra Condensed", "Unbounded", sans-serif;
}
html[data-theme="camo"] #sky { opacity: .35; filter: hue-rotate(-20deg) saturate(.4); }
html[data-theme="camo"] body { background-image:
  radial-gradient(ellipse 260px 140px at 15% 20%, rgba(70,80,40,.35), transparent 70%), radial-gradient(ellipse 320px 160px at 70% 35%, rgba(60,45,25,.35), transparent 70%),
  radial-gradient(ellipse 240px 200px at 40% 75%, rgba(80,90,45,.3), transparent 70%), radial-gradient(ellipse 300px 120px at 90% 85%, rgba(35,40,22,.45), transparent 70%);
  background-size: 900px 700px; }
html[data-theme="camo"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 900; letter-spacing: .01em; line-height: .85; }
html[data-theme="camo"] .page-head h1 { font-size: clamp(48px, 9vw, 130px); }
html[data-theme="camo"] :is(.btn, .nav a) { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; }

/* ═════════ ЛАЗАРЕТ — светлый медпункт: белый, красный крест, мята ═════════ */
html[data-theme="medbay"] {
  --bg: #f3f7f6; --ink: #0f2320; --ink-2: #3a524e; --muted: #56706b;
  --line: rgba(15,35,32,.1); --line-2: rgba(15,35,32,.2);
  --glass: rgba(255,255,255,.92); --glass-2: #fff; --panel: #ffffff;
  --acid: #d62839; --acid-d: #a01422; --ember: #137266; --blood: #d62839;
  --r: 18px; --display: "Onest", system-ui, sans-serif; --body: "Onest", system-ui, sans-serif;
}
html[data-theme="medbay"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign) { color: #fff; }
html[data-theme="medbay"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 800; letter-spacing: -.04em; text-transform: none; }
html[data-theme="medbay"] .page-head h1 em, html[data-theme="medbay"] .holo, html[data-theme="medbay"] .hero h1 .acid { background: none; color: var(--acid); }
html[data-theme="medbay"] .hero h1 .stroke { background: none; color: var(--ember); }
html[data-theme="medbay"] .eyebrow::before { content: "✚"; width: auto; height: auto; background: none; color: var(--acid); }
html[data-theme="medbay"] .card { border-top: 3px solid var(--ember); box-shadow: 0 14px 40px -24px rgba(15,35,32,.35); }

/* ═════════ БАР «100 РЕНТГЕН» — неоновые вывески, кирпич, тёплый свет ═════════ */
html[data-theme="bar"] {
  --bg: #0c0608; --ink: #ffeef2; --ink-2: #dcb9c2; --muted: #9a7a83;
  --line: rgba(255,180,200,.1); --line-2: rgba(255,180,200,.22);
  --glass: rgba(26,10,14,.74); --glass-2: rgba(36,14,20,.84); --panel: #160a0d;
  --acid: #ff4f9a; --acid-d: #c2166a; --ember: #ffb347; --blood: #ff3030;
  --r: 14px; --display: "Lobster", Georgia, cursive;
}
html[data-theme="bar"] #sky { opacity: .3; filter: hue-rotate(-100deg); }
html[data-theme="bar"] body { background-image: linear-gradient(rgba(255,255,255,.025) 2px, transparent 2px), linear-gradient(90deg, rgba(255,255,255,.025) 2px, transparent 2px);
  background-size: 64px 28px, 64px 56px; }
html[data-theme="bar"] :is(.page-head h1, .hero h1, .section-h h2) { text-transform: none; letter-spacing: 0; line-height: 1; }
html[data-theme="bar"] .page-head h1 em, html[data-theme="bar"] .holo, html[data-theme="bar"] .hero h1 .acid { background: none; color: #ffd6e7;
  text-shadow: 0 0 6px var(--acid), 0 0 18px var(--acid), 0 0 42px var(--acid); animation: bar-flick 5s steps(1) infinite; }
html[data-theme="bar"] .hero h1 .ln > span.acid { animation: rise 1.1s var(--ease) .24s forwards, bar-flick 5s steps(1) 1.4s infinite; }
@keyframes bar-flick { 0%, 47%, 49%, 52%, 100% { opacity: 1; } 48%, 51% { opacity: .55; } }
html[data-theme="bar"] .hero h1 .stroke { background: none; color: #ffe2b8; text-shadow: 0 0 6px var(--ember), 0 0 24px var(--ember); }
html[data-theme="bar"] .card { border-color: rgb(from var(--acid) r g b / .4); box-shadow: 0 0 0 1px rgb(from var(--acid) r g b / .15), 0 0 30px -8px rgb(from var(--acid) r g b / .5), inset 0 0 30px -12px rgb(from var(--acid) r g b / .4); }

/* ═════════ АНОМАЛИЯ — гравитационный вихрь: тонкий шрифт, электрический синий ═════════ */
html[data-theme="anomaly"] {
  --bg: #02040a; --ink: #eaf6ff; --ink-2: #a9c3d8; --muted: #6f889e;
  --line: rgba(120,200,255,.12); --line-2: rgba(120,200,255,.26);
  --glass: rgba(6,14,28,.58); --glass-2: rgba(10,20,40,.72); --panel: #060c18;
  --acid: #4cc9f0; --acid-d: #2a8bb8; --ember: #f0f4ff; --blood: #ff4d6d;
  --r: 28px;
}
html[data-theme="anomaly"] #sky { filter: hue-rotate(130deg) saturate(1.3) brightness(.7); }
html[data-theme="anomaly"] body::before { content: ""; position: fixed; z-index: -2; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; pointer-events: none;
  background: conic-gradient(from 0deg, transparent, rgb(from var(--acid) r g b / .14), transparent 25%, rgb(from var(--acid) r g b / .1), transparent 50%, rgb(from var(--acid) r g b / .14), transparent 75%);
  -webkit-mask: radial-gradient(circle, #000 0 15%, transparent 60%); mask: radial-gradient(circle, #000 0 15%, transparent 60%); animation: spin 40s linear infinite; }
html[data-theme="anomaly"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 300; letter-spacing: -.03em; }
html[data-theme="anomaly"] .card { border-radius: 28px; }
html[data-theme="anomaly"] .page-head h1 em, html[data-theme="anomaly"] .holo, html[data-theme="anomaly"] .hero h1 .acid { background: none; color: var(--acid); text-shadow: 0 0 40px rgb(from var(--acid) r g b / .6); }

/* ═════════ МИНИМАЛ — спокойная тёмная: без эффектов, только данные ═════════ */
html[data-theme="minimal"] {
  --bg: #0f1012; --ink: #f2f3f5; --ink-2: #b1b5bd; --muted: #80858f;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
  --glass: #16181b; --glass-2: #1c1f23; --panel: #16181b;
  --acid: #f2f3f5; --acid-d: #a0a4ab; --ember: #7aa2ff; --blood: #ff6b6b;
  --r: 16px; --display: "Golos Text", system-ui, sans-serif; --body: "Golos Text", system-ui, sans-serif;
}
html[data-theme="minimal"] body { background: var(--bg); }
html[data-theme="minimal"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 700; letter-spacing: -.04em; text-transform: none; }
html[data-theme="minimal"] .page-head h1 em, html[data-theme="minimal"] .holo, html[data-theme="minimal"] .hero h1 :is(.acid, .stroke) { background: none; color: var(--ink-2); }
html[data-theme="minimal"] .card::before { display: none; }

/* ═════════ ЧИСТЫЙ ЛИСТ — светлая минималистичная: белое, чёрное, синий ═════════ */
html[data-theme="paper"] {
  --bg: #fafaf9; --ink: #111111; --ink-2: #444444; --muted: #737373;
  --line: rgba(0,0,0,.08); --line-2: rgba(0,0,0,.16);
  --glass: #ffffff; --glass-2: #ffffff; --panel: #ffffff;
  --acid: #111111; --acid-d: #444444; --ember: #1d5bd8; --blood: #dc2626;
  --r: 14px; --display: "Inter", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
}
html[data-theme="paper"] :is(.btn:not(.ghost), .nav a.on, .login:not(.on), .rk.r-leader, .diff, .mc-sign, .pill.on) { color: #fff; }
html[data-theme="paper"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 800; letter-spacing: -.05em; text-transform: none; }
html[data-theme="paper"] .page-head h1 em, html[data-theme="paper"] .holo, html[data-theme="paper"] .hero h1 :is(.acid, .stroke) { background: none; color: var(--ember); }
html[data-theme="paper"] .card { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -16px rgba(0,0,0,.18); }
html[data-theme="paper"] .card::before { display: none; }

/* ═════════ ЛИСТОПАД — тёплая осень: рыжий, охра, курсивные засечки ═════════ */
html[data-theme="autumn"] {
  --bg: #120a05; --ink: #fbeee0; --ink-2: #d9c1a8; --muted: #9c8268;
  --line: rgba(255,210,170,.1); --line-2: rgba(255,210,170,.22);
  --glass: rgba(34,18,8,.7); --glass-2: rgba(44,24,10,.8); --panel: #1a0e06;
  --acid: #ff8c32; --acid-d: #c45a12; --ember: #e8b931; --blood: #ff4d3a;
  --r: 20px; --display: "Lora", Georgia, serif;
}
html[data-theme="autumn"] #sky { filter: hue-rotate(-55deg) saturate(1.2) sepia(.2); }
html[data-theme="autumn"] :is(.page-head h1, .hero h1, .section-h h2) { font-style: italic; font-weight: 700; text-transform: none; letter-spacing: -.02em; }
html[data-theme="autumn"] .page-head h1 em, html[data-theme="autumn"] .holo, html[data-theme="autumn"] .hero h1 .acid {
  background-image: linear-gradient(90deg, var(--ember), var(--acid) 50%, #d9481c); color: transparent; -webkit-background-clip: text; background-clip: text; }
html[data-theme="autumn"] body::after { content: "🍂"; position: fixed; z-index: -1; top: -40px; left: 78%; font-size: 26px; pointer-events: none; opacity: .7; animation: au-fall 14s linear infinite; }
@keyframes au-fall { to { transform: translate(-30vw, 110vh) rotate(540deg); } }

/* ═════════ ПУЛЬТ — советская аппаратная: металл, винты, лампы ═════════ */
html[data-theme="panel"] {
  --bg: #15170f; --ink: #ece9d6; --ink-2: #c1bea6; --muted: #8a8873;
  --line: rgba(240,236,210,.1); --line-2: rgba(240,236,210,.22);
  --glass: #23261d; --glass-2: #2a2d23; --panel: #1d2018;
  --acid: #ffb000; --acid-d: #c27f00; --ember: #6fd36f; --blood: #ff4a3d;
  --r: 10px; --display: "Jura", "Unbounded", sans-serif;
}
html[data-theme="panel"] #sky { opacity: .2; filter: grayscale(.7); }
html[data-theme="panel"] :is(.page-head h1, .hero h1, .section-h h2) { font-weight: 700; letter-spacing: .02em; }
html[data-theme="panel"] .card { backdrop-filter: none; -webkit-backdrop-filter: none; border-color: #3a3d31;
  background:
    radial-gradient(circle at 10px 10px, #6c6e60 2px, #2b2d24 2.5px, transparent 3.5px), radial-gradient(circle at calc(100% - 10px) 10px, #6c6e60 2px, #2b2d24 2.5px, transparent 3.5px),
    radial-gradient(circle at 10px calc(100% - 10px), #6c6e60 2px, #2b2d24 2.5px, transparent 3.5px), radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), #6c6e60 2px, #2b2d24 2.5px, transparent 3.5px),
    linear-gradient(180deg, #2a2d23, #1f2219);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -2px 0 rgba(0,0,0,.4), 0 6px 18px -8px rgba(0,0,0,.7); }
html[data-theme="panel"] .btn:not(.ghost) { box-shadow: inset 0 -3px 0 rgba(0,0,0,.3), 0 0 18px rgb(from var(--acid) r g b / .45); }
html[data-theme="panel"] .page-head h1 em, html[data-theme="panel"] .holo, html[data-theme="panel"] .hero h1 .acid { background: none; color: var(--acid); text-shadow: 0 0 22px rgb(from var(--acid) r g b / .55); }
html[data-theme="panel"] .eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); }

/* ═════════ БИОЛАБ — биоугроза: токсично-зелёный, пурпур, слизь ═════════ */
html[data-theme="bio"] {
  --bg: #070510; --ink: #f1ecff; --ink-2: #c4b8e0; --muted: #85799f;
  --line: rgba(200,180,255,.1); --line-2: rgba(200,180,255,.22);
  --glass: rgba(18,10,32,.66); --glass-2: rgba(26,14,44,.78); --panel: #100a1d;
  --acid: #7dff4f; --acid-d: #3fbf1a; --ember: #b44bff; --blood: #ff4f6d;
  --r: 22px; --display: "Rubik Microbe", "Unbounded", sans-serif;
}
html[data-theme="bio"] #sky { filter: hue-rotate(190deg) saturate(1.4) brightness(.8); }
html[data-theme="bio"] .eyebrow::before { content: "☣"; width: auto; height: auto; background: none; font-size: 14px; }
html[data-theme="bio"] .card { border: 1px dashed rgb(from var(--acid) r g b / .35); box-shadow: 0 0 40px -18px rgb(from var(--acid) r g b / .6), inset 0 -30px 40px -30px rgb(from var(--ember) r g b / .35); }
html[data-theme="bio"] .page-head h1 em, html[data-theme="bio"] .holo, html[data-theme="bio"] .hero h1 .acid { background: none; color: var(--acid); text-shadow: 0 0 30px rgb(from var(--acid) r g b / .5); }
html[data-theme="bio"] .hero h1 .stroke { background-image: repeating-linear-gradient(180deg, var(--ember) 0 3px, rgb(from var(--ember) r g b / .2) 3px 7px); }

