/* ── themes ── Classic = first version (default). Purple = alternative, picked in Settings → Оформление. */
:root {
  --bg: #070b10;
  --pur-rgb: 86, 214, 255;             /* lines, tints, hovers */
  --acc-rgb: 86, 214, 255;             /* accents */
  --panel: rgba(14, 22, 31, .78);
  --panel-2: rgba(22, 34, 46, .85);
  --line: rgba(var(--pur-rgb), .22);
  --line-2: rgba(var(--pur-rgb), .45);
  --tek: #56d6ff;
  --tek-2: #9cf0ff;
  --tek-glow: rgba(var(--acc-rgb), .35);
  --purple: #a870ff;
  --amber: #ffb23e;
  --gold: #ffd56b;
  --red: #ff5a4e;
  --green: #5cf29a;
  --text: #dbe7ef;
  --muted: #7c93a3;
  --shade-rgb: 7, 11, 16;
  --side-rgb: 8, 14, 20;
  --opt-bg: #0d1620;
  --hero-a: rgba(14, 30, 44, .9);
  --hero-b: rgba(10, 18, 26, .8);
  --orb-1: #13283a; --orb-2: #081119; --orb-on: #0b2536;
  --bar-from: #1b6e8f;
  --toast-bg: rgba(10, 20, 28, .95);
  --aur2: rgba(120, 255, 200, .05);
  --bg-glow: radial-gradient(ellipse at 70% -10%, #11324a 0%, transparent 55%), radial-gradient(ellipse at 0% 110%, #1b2a1a 0%, transparent 50%);
  --font: "Bahnschrift", "Bahnschrift SemiCondensed", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --cut: 14px;
}
:root[data-theme="purple"] {
  --bg: #07040d;
  --pur-rgb: 168, 112, 255;
  --panel: rgba(22, 12, 40, .74);
  --panel-2: rgba(36, 20, 62, .82);
  --line: rgba(var(--pur-rgb), .26);
  --line-2: rgba(var(--pur-rgb), .5);
  --red: #ff4f5e;
  --text: #eee7f8;
  --muted: #a194bd;
  --shade-rgb: 7, 4, 13;
  --side-rgb: 12, 6, 22;
  --opt-bg: #160c26;
  --hero-a: rgba(34, 16, 58, .9);
  --hero-b: rgba(16, 8, 30, .8);
  --orb-1: #2a1747; --orb-2: #0e0719; --orb-on: #2d1650;
  --bar-from: #6a3fc0;
  --toast-bg: rgba(20, 10, 34, .95);
  --aur2: rgba(86, 214, 255, .05);
  --bg-glow: radial-gradient(ellipse at 70% -10%, #3b1766 0%, transparent 55%), radial-gradient(ellipse at 0% 110%, #2a1240 0%, transparent 50%);
}
:root[data-theme="black"] {
  --bg: #000;
  --pur-rgb: 210, 210, 218;            /* silver lines */
  --acc-rgb: 235, 235, 240;            /* white accents */
  --panel: rgba(14, 14, 16, .86);
  --panel-2: rgba(26, 26, 30, .9);
  --line: rgba(var(--pur-rgb), .14);
  --line-2: rgba(var(--pur-rgb), .32);
  --tek: #e9e9ee;
  --tek-2: #ffffff;
  --tek-glow: rgba(var(--acc-rgb), .22);
  --text: #e6e6ea;
  --muted: #8a8a94;
  --shade-rgb: 0, 0, 0;
  --side-rgb: 6, 6, 8;
  --opt-bg: #111114;
  --hero-a: rgba(24, 24, 28, .92);
  --hero-b: rgba(8, 8, 10, .85);
  --orb-1: #1c1c21; --orb-2: #050506; --orb-on: #2a2a30;
  --bar-from: #55555e;
  --toast-bg: rgba(14, 14, 16, .96);
  --aur2: rgba(255, 255, 255, .03);
  --bg-glow: radial-gradient(ellipse at 70% -10%, #1d1d22 0%, transparent 55%), radial-gradient(ellipse at 0% 110%, #121214 0%, transparent 50%);
}
/* dark text on light accents (buttons, active tabs) */
:root[data-theme="black"] .btn.accent, :root[data-theme="black"] .srv-tab.on, :root[data-theme="black"] .seg button.on { color: #000; }
:root[data-theme="black"] .obelisk-btn.on { background: radial-gradient(circle, #6a6a74 0%, var(--orb-on) 55%, var(--orb-2) 75%); }
:root[data-theme="black"] .hex { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64v34' fill='none' stroke='%23d2d2da' stroke-width='1'/%3E%3C/svg%3E"); }
:root[data-theme="purple"] .hex { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64v34' fill='none' stroke='%23a870ff' stroke-width='1'/%3E%3C/svg%3E"); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px;
  display: grid; grid-template-columns: 240px 1fr; overflow: hidden;
}
::selection { background: var(--tek); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(var(--pur-rgb), .25); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── atmosphere ── */
/* Background: built-in bg.svg (original artwork) or the user's own picture (--bg-img).
   --dim (0..1, from Settings) controls the dark overlay that keeps text readable. */
:root { --bg-img: none; --dim: 0; }
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(var(--shade-rgb),calc(.25 + var(--dim) * .8)) 0%, rgba(var(--shade-rgb),calc(var(--dim) * .8)) 45%, rgba(var(--shade-rgb),calc(var(--dim) * .5)) 100%),
    linear-gradient(180deg, rgba(var(--shade-rgb),calc(var(--dim) * .6)) 0%, rgba(var(--shade-rgb),calc(var(--dim) * .25)) 30%, rgba(var(--shade-rgb),calc(var(--dim) * .2)) 50%, rgba(var(--shade-rgb),calc(var(--dim) * .85)) 100%),
    var(--bg-img) center / cover no-repeat,
    var(--bg-glow),
    var(--bg); }
.aurora { position: absolute; inset: -30%; background: conic-gradient(from 200deg at 60% 40%, transparent, rgba(var(--pur-rgb),.08), transparent 30%, var(--aur2), transparent 60%);
  filter: blur(60px); }
/* the glow used to rotate slowly: a huge blurred layer redrawn every frame under see-through
   panels — on weak PCs that alone made the game stutter. It stays still now. */

/* «Лёгкий режим» (weak PCs): no blur behind panels, no animations at all */
body.lite .aurora { display: none; }
body.lite .panel, body.lite .side, body.lite .auth-gate, body.lite .profile-btn, body.lite * { backdrop-filter: none !important; }
body.lite *, body.lite *::before, body.lite *::after { animation: none !important; transition: none !important; }
body.lite .panel { background: var(--panel-2, var(--panel)); }
.lite-switch { margin: 14px 0 4px; }
.hex { position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64v34' fill='none' stroke='%2356d6ff' stroke-width='1'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse at 60% 30%, #000 0%, transparent 75%); }
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 1px, transparent 1px 3px); pointer-events: none; }

/* ── sidebar ── */
.side { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(var(--side-rgb),.92), rgba(var(--side-rgb),.75)); backdrop-filter: blur(6px);
  /* 17.11.2026: on a low laptop screen the bottom (status, the raid alarm with «Я здесь») went past the window's edge.
     The sidebar is exactly the window's height: the menu scrolls, the bottom always stays in sight */
  height: 100vh; min-height: 0; overflow: hidden; }
.side > nav { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.side > nav::-webkit-scrollbar { width: 6px; }
.side > .brand, .side > .side-foot, .side > .raid-bar { flex: none; }
.side > .raid-bar { margin: 10px 10px 0; }
@media (max-height: 820px) {
  .brand { padding: 12px 18px 10px; } .brand img { width: 36px; height: 36px; }
  nav a { padding: 7px 14px; } .nav-sec { padding: 10px 16px 3px; }
  .side-foot { padding: 10px 14px; gap: 6px; }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 22px 18px 18px; border-bottom: 1px solid var(--line); }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 0 8px var(--tek-glow)); }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: .28em; color: var(--tek-2); text-shadow: 0 0 12px var(--tek-glow); }
.brand-sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
nav { padding: 10px 10px 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
/* menu sections: a small caption over each group; «Система» pinned to the bottom, set off by a line */
.nav-sec { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); opacity: .6; padding: 14px 16px 4px; }
.nav-sec:first-child { padding-top: 4px; }
.nav-sys { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.nav-dot { display: none; width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; background: #3ddc84; box-shadow: 0 0 6px rgba(61,220,132,.7); }
.nav-dot.on { display: block; }
.nav-dot.warn { display: block; background: #ffb23e; box-shadow: 0 0 6px rgba(255,178,62,.7); }
nav a { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em; font-size: 13px; border-left: 2px solid transparent; transition: .15s; }
nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav a:hover { color: var(--text); background: rgba(var(--pur-rgb),.05); }
nav a.active { color: var(--tek-2); border-left-color: var(--tek); background: linear-gradient(90deg, rgba(var(--pur-rgb),.14), transparent); text-shadow: 0 0 10px var(--tek-glow); }
.side-foot { margin-top: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
/* live sorting: what is on (or on with a problem) goes up, what is off goes down; button and version stay last */
.side-foot .chip { order: 2; }
/* raid alarm: on top of the sidebar foot, red, with «Я здесь» */
.raid-bar { order: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid rgba(255,90,90,.55); background: rgba(80,12,12,.55); border-radius: 6px; font-size: 12px; color: #ffd7d7; animation: raidPulse 1.2s ease-in-out infinite; }
.raid-bar[hidden] { display: none; }
/* a phone opened the link and waits for «Разрешить»: a card under the «Телефон» button (top right), the button pulses */
.pair-pop { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: var(--toast-bg); border: 1px solid rgba(var(--pur-rgb),.6); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.55), 0 0 30px rgba(var(--pur-rgb),.18); animation: ppIn .25s ease-out; }
.pair-pop[hidden] { display: none; }
/* while a phone asks, the request stays above every window (the phone window is 900, «Вы уверены?» is 1000) */
.profile.asking { z-index: 950; }
.pair-pop::before { content: ""; position: absolute; top: -6px; right: var(--arrow, 150px); width: 10px; height: 10px; background: var(--toast-bg); border-left: 1px solid rgba(var(--pur-rgb),.6); border-top: 1px solid rgba(var(--pur-rgb),.6); transform: rotate(45deg); }
.pp-head { display: flex; gap: 10px; align-items: center; }
.pp-head svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--tek-2); stroke-width: 1.5; }
.pp-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-head b { font-size: 13px; }
.pp-head span { font-size: 12px; color: var(--tek-2); }
.pp-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.pair-btns { display: flex; gap: 8px; }
.pair-btns .btn { flex: 1; }
@keyframes ppIn { from { opacity: 0; transform: translateY(-6px); } }
.phone-btn.asking { border-color: var(--tek); animation: ppPulse 1.4s ease-in-out infinite; }
@keyframes ppPulse { 50% { box-shadow: 0 0 16px rgba(var(--pur-rgb),.55); } }
body.lite .pair-pop, body.lite .phone-btn.asking { animation: none; }
/* the phones of this account in the phone window */
.ph-devs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ph-devs:empty { display: none; }
.ph-dev { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); font-size: 13px; }
.ph-dev.wait { border-color: rgba(var(--pur-rgb),.55); background: rgba(var(--pur-rgb),.08); }
.ph-dev svg { width: 18px; height: 18px; fill: none; stroke: var(--tek-2); stroke-width: 1.6; flex: none; }
.ph-dev .dv-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-dev .dv-name small { color: var(--muted); font-size: 11px; }
.ph-dev .btn { flex: none; }
.raid-bar b { color: #ff7a6b; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
@keyframes raidPulse { 50% { box-shadow: 0 0 18px rgba(255,90,90,.45); } }
body.lite .raid-bar { animation: none; }
.side-foot .chip.on, .side-foot .chip.warn { order: 1; }
.side-foot #panic { order: 3; }
.side-foot .ver-link { order: 4; }
.chip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: #3a4a55; }
.chip.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.chip.warn i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.chip.bad i { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ── main ── */
/* the place of the scrollbar is always kept: a short page and a long one have the same width, nothing jumps
   when switching tabs (the user, 14.11.2026) */
main { overflow-y: auto; scrollbar-gutter: stable; padding: 26px 32px 60px; }
.page { display: none; flex-direction: column; gap: 18px; max-width: 1400px; animation: fade .25s ease; }
.page.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
h1 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
h1::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 8px; background: var(--tek); box-shadow: 0 0 10px var(--tek); }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 760px; line-height: 1.5; }
h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tek-2); }

.panel { background: var(--panel); border: 1px solid var(--line); padding: 18px 20px; position: relative; backdrop-filter: blur(4px); }
.panel.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut))); }
.panel.cut::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 2px; background: var(--tek); box-shadow: 0 0 8px var(--tek); }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head .num { font-size: 12px; color: #000; background: var(--tek); padding: 2px 7px; font-weight: 700; letter-spacing: .1em; }
.panel-head .muted { margin-left: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } }
.hint { color: var(--muted); line-height: 1.55; margin: 6px 0 12px; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; }
kbd { font-family: var(--font); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--tek-2); background: rgba(var(--pur-rgb),.06); }
code { color: var(--tek-2); background: rgba(var(--pur-rgb),.08); padding: 1px 5px; }

/* ── controls ── */
.btn { font-family: var(--font); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--tek-2);
  background: rgba(var(--pur-rgb),.06); border: 1px solid var(--line-2); padding: 9px 16px; cursor: pointer; transition: .15s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.btn:hover { background: rgba(var(--pur-rgb),.16); color: #fff; box-shadow: inset 0 0 14px rgba(var(--pur-rgb),.25); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn.accent { background: var(--tek); color: #021018; border-color: var(--tek); font-weight: 600; }
.btn.accent:hover { background: var(--tek-2); color: #000; }
.btn.danger { color: #ffb0a8; border-color: rgba(255,90,78,.5); background: rgba(255,90,78,.08); }
.btn.danger:hover { background: rgba(255,90,78,.2); color: #fff; }
.btn.wide { width: 100%; }
.btn.ghost { border-color: transparent; background: none; padding: 4px 8px; }
input, select { font-family: var(--font); font-size: 14px; color: var(--text); background: rgba(0,0,0,.35); border: 1px solid var(--line);
  padding: 8px 10px; outline: none; transition: .15s; min-width: 0; }
input:focus, select:focus { border-color: var(--tek); box-shadow: 0 0 0 1px var(--tek), 0 0 12px var(--tek-glow); }
select option { background: var(--opt-bg); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; margin-bottom: 8px; align-items: end; }
.form-grid.one { grid-template-columns: 1fr; }
.form-grid label.wide { grid-column: 1 / -1; }

/* Sleep mode parameters: switches together, then values by topic, rare ones folded away */
.params { display: flex; flex-direction: column; gap: 6px; }
.params-group { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.params-group:first-child { border-top: none; padding-top: 0; }
.params-group h3 { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tek-2); }
.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; margin-bottom: 6px; }
details.params-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.params-group summary::-webkit-details-marker { display: none; }
details.params-group summary::before { content: "▸"; color: var(--muted); transition: transform .2s; }
details.params-group[open] summary::before { transform: rotate(90deg); }
details.params-group summary h3 { margin: 0; color: var(--muted); }
details.params-group[open] summary { margin-bottom: 8px; }
.form-grid label[hidden] { display: none; }
.form-grid label, .toolbar > label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.switch { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; cursor: pointer; color: var(--text) !important; font-size: 13px !important; user-select: none; }
.switch input { display: none; }
.switch span { width: 38px; height: 20px; border: 1px solid var(--line-2); position: relative; flex: none; background: rgba(0,0,0,.4); transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--muted); transition: .2s; }
/* «on» is clear but calm: a lighter track and knob, no glow (it used to shine like a torch in the dark theme) */
.switch span, .switch span::after { border-radius: 4px; }
.switch span::after { border-radius: 2px; }
.switch input:checked + span { background: rgba(var(--pur-rgb),.22); border-color: rgba(var(--pur-rgb),.75); }
.switch input:checked + span::after { left: 21px; background: var(--tek-2); opacity: .82; box-shadow: none; }

/* ── hero ── */
.hero { display: grid; grid-template-columns: 200px 1fr 220px; gap: 28px; align-items: center; padding: 26px 28px; background: linear-gradient(110deg, var(--hero-a), var(--hero-b)); }
.obelisk-btn { width: 170px; height: 170px; border-radius: 50%; border: none; cursor: pointer; position: relative; background: radial-gradient(circle, var(--orb-1) 0%, var(--orb-2) 70%);
  font-family: var(--font); color: var(--tek-2); box-shadow: inset 0 0 30px rgba(0,0,0,.8), 0 0 0 1px var(--line-2); transition: .25s; }
.obelisk-btn .ring { position: absolute; inset: 10px; border-radius: 50%; border: 2px dashed rgba(var(--pur-rgb),.35); animation: spin 30s linear infinite; }
.obelisk-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.obelisk-btn .lbl { position: relative; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }

/* Predator skull in the sleep button (shaded bone): asleep (off, dimmed) → watching (on, glow + lit eye) → alarmed (alert) */
.rex { position: relative; width: 116px; height: 105px; margin-top: 4px; overflow: visible;
  filter: grayscale(.5) brightness(.72) drop-shadow(0 4px 4px rgba(0,0,0,.7)); transition: filter .3s; }
.sk-eye { fill: transparent; transition: fill .3s; }
.rex-z text { fill: #c9c2b2; font-family: var(--font); font-size: 22px; animation: rexZ 2.6s ease-in-out infinite; }
.rex-z text:last-child { font-size: 28px; animation-delay: 1.3s; }
@keyframes rexZ { 0% { opacity: 0; transform: translate(0, 8px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translate(8px, -12px); } }
.obelisk-btn:hover .rex { filter: grayscale(.2) brightness(.9) drop-shadow(0 4px 4px rgba(0,0,0,.7)); }
.obelisk-btn.on .rex { filter: drop-shadow(0 0 7px var(--tek-glow)) drop-shadow(0 0 2px var(--tek)); }
.obelisk-btn.on .sk-eye { fill: var(--tek); filter: drop-shadow(0 0 4px var(--tek)); }
.obelisk-btn.on .rex-z { display: none; }
.obelisk-btn.alert .rex { filter: drop-shadow(0 0 7px rgba(255,178,62,.6)) drop-shadow(0 0 2px var(--amber)); }
.obelisk-btn.alert .sk-eye { fill: #ff5a4e; filter: drop-shadow(0 0 5px #ff5a4e); }
.obelisk-btn:hover { box-shadow: inset 0 0 30px rgba(0,0,0,.6), 0 0 0 1px var(--tek), 0 0 30px var(--tek-glow); }
.obelisk-btn.on { background: radial-gradient(circle, #1e6a8c 0%, var(--orb-on) 55%, var(--orb-2) 75%); color: #fff; box-shadow: 0 0 0 2px var(--tek), 0 0 50px var(--tek-glow), inset 0 0 40px rgba(var(--pur-rgb),.4); }
.obelisk-btn.on .ring { border-style: solid; border-color: var(--tek); animation-duration: 6s; border-top-color: transparent; }
.obelisk-btn.alert { box-shadow: 0 0 0 2px var(--amber), 0 0 50px rgba(255,178,62,.45), inset 0 0 40px rgba(255,178,62,.3); }
.obelisk-btn.alert .ring { border-color: var(--amber); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.kicker { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero-status { font-size: 24px; margin: 6px 0 18px; color: #fff; }
.meter-top, .meter-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter-top b { color: var(--tek-2); font-size: 16px; }
.bar { height: 10px; margin: 6px 0; background: rgba(0,0,0,.45); border: 1px solid var(--line); position: relative; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--bar-from), var(--tek)); box-shadow: 0 0 10px var(--tek-glow); transition: width .5s; }
.bar .fill.hot { background: linear-gradient(90deg, #8f5a1b, var(--amber)); box-shadow: 0 0 10px rgba(255,178,62,.5); }
.bar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; box-shadow: 0 0 6px #fff; }
.hero-right { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; justify-items: stretch; }
  .hero-left { display: flex; justify-content: center; }
  .hero-right { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 760px) {
  body { grid-template-columns: 64px 1fr; }
  .brand div, nav a { font-size: 0; } .brand { padding: 14px 10px; } .brand img { width: 40px; height: 40px; }
  nav a { justify-content: center; padding: 12px 0; gap: 0; }   /* the hidden name still took the 12px gap: icons sat 6px left */
  .nav-sec { font-size: 0; padding: 6px 0 0; border-top: 1px solid var(--line); margin: 6px 8px 0; }
  .nav-dot { position: absolute; margin: -14px 0 0 16px; } nav a { position: relative; }
  .side-foot .chip span { display: none; } .side-foot #panic { font-size: 0; padding: 8px; } .side-foot #panic::before { content: "■"; font-size: 14px; }
  /* the icon-only menu (27.11.2026, seen on a phone): the «SOON» plate pushed its icon past the left edge, and
     «Obelisk V.4.1 LIVE» was cut to «OBELIS» — only the icon here, and the version on two short lines */
  nav a .wip-tag { display: none; }
  /* tribe window tabs: 4 tabs didn't fit at 375 px — «Журнал» was cut off on the right */
  #tw .tw-tabs { gap: 0; }
  #tw .tw-tabs button { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; padding: 8px 4px; letter-spacing: .04em; font-size: 11px; line-height: 1.25; }
  .ver-link { font-size: 0; margin: 0 -10px; padding: 4px 0 0; text-align: center; }
  .ver-link b { font-size: 10px; letter-spacing: .06em; }
  main { padding: 18px 16px 40px; }
  .step { grid-template-columns: 22px 1fr; } .step > * { grid-column: auto; }
  .timer-form { grid-template-columns: 1fr 1fr; }
  .srv { grid-template-columns: 14px 1fr; }
}
.stat .k { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-size: 30px; color: var(--tek-2); }
.stat .v.small { font-size: 15px; color: var(--text); }
/* the amber warning box: only on a panel (a bare .warn is also a STATE class — chips, pills, bars, cards —
   and got turned into a brown column box: the sidebar «Режим сна активен» chip, 15.11.2026) */
.panel.warn { border-color: rgba(255,178,62,.35); background: rgba(40,28,10,.6); color: #f0d9b5; line-height: 1.55; display: flex; flex-direction: column; gap: 10px; }
.panel.warn b { color: var(--amber); }

/* ── refs & steps ── */
.refs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 1100px) { .refs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .refs { grid-template-columns: 1fr; } }
.ref .shot.no-area { cursor: default; }
/* users: the standard screens as a plain list */
.refs.refs-list { display: flex; flex-direction: column; gap: 0; }
.ref-row { display: grid; grid-template-columns: 1fr auto 56px; gap: 12px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ref-row .rr-kind { color: var(--muted); font-size: 12px; }
.ref-row .scoreval { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ref-row .scoreval.hit, .ref .scoreval.hit { color: var(--amber); }
.ref .meta .scoreval { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.ref { background: var(--panel-2); border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.ref .shot { position: relative; cursor: crosshair; user-select: none; line-height: 0; overflow: hidden; }
.ref .shot img { width: 100%; display: block; }
.ref .sel { position: absolute; border: 2px solid var(--tek); box-shadow: 0 0 0 9999px rgba(0,0,0,.45), 0 0 10px var(--tek); pointer-events: none; }
.ref .meta { display: flex; gap: 6px; align-items: center; }
.ref .meta input { flex: 1; padding: 4px 6px; font-size: 12px; }
.ref .meta select { padding: 4px 6px; font-size: 12px; }
.ref.ingame { border-color: rgba(92, 242, 154, .45); }
.ref.ingame .sel { border-color: var(--green); box-shadow: 0 0 0 9999px rgba(0,0,0,.45), 0 0 10px var(--green); }
.ref .score { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.ref .score b.hit { color: var(--amber); }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); font-size: 13px; }
.steps { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.step { display: grid; grid-template-columns: 26px minmax(160px, 1fr) 110px minmax(180px, 1fr) 100px auto; gap: 8px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); padding: 6px 8px; }
.step .idx { color: var(--tek); font-weight: 700; text-align: center; }
.step input, .step select { padding: 5px 7px; font-size: 13px; }
.step .xy { display: flex; gap: 6px; } .step .xy input { width: 50%; }
.step .acts { display: flex; gap: 2px; }

/* ── breeding ── */
.toolbar { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.toolbar select { min-width: 220px; }
.seg { display: flex; border: 1px solid var(--line-2); }
.seg button { font-family: var(--font); background: none; border: none; color: var(--muted); padding: 8px 14px; cursor: pointer; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.seg button.on { background: var(--tek); color: #021018; }
.statpick { display: flex; gap: 6px; flex-wrap: wrap; }
.statpick label { font-size: 12px; padding: 5px 9px; border: 1px solid var(--line); cursor: pointer; color: var(--muted); user-select: none; }
.statpick label.on { border-color: var(--tek); color: var(--tek-2); background: rgba(var(--pur-rgb),.1); }
.statpick input { display: none; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid rgba(var(--pur-rgb),.08); white-space: nowrap; }
.tbl tr:hover td { background: rgba(var(--pur-rgb),.04); }
.tbl td.best { color: var(--gold); text-shadow: 0 0 8px rgba(255,213,107,.4); }
.tbl td.best::after { content: " ★"; font-size: 10px; }
.tbl td input.pts { width: 58px; padding: 3px 5px; font-size: 13px; }
.tbl.keys td { border: none; padding: 6px 4px; }
/* «Статус поверх игры»: switch · corner · switch in one row that wraps on narrow screens */
.status-set { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 8px; }
.status-set .switch { margin: 0; }
.status-set .st-corner { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.status-set .st-corner select { width: auto; }
.sex { font-weight: 700; }
.sex.f { color: #ff8fc7; } .sex.m { color: #7fc4ff; }
.mut { color: var(--amber); font-size: 12px; }
.dim { opacity: .45; }
.pair { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--tek); }
.pair .names { font-size: 14px; }
.pair .pct { text-align: right; color: var(--tek-2); font-size: 18px; }
.pair .sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.ideal-row { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(var(--pur-rgb),.08); font-size: 13px; }
.ideal-row .lbl { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .1em; }

/* ── generators ── */
.gen-form { grid-template-columns: 2fr 1.3fr 200px auto; }

/* ── Гача-лист ── */
.ga-form { grid-template-columns: 1.4fr 1fr 1fr auto; align-items: end; }
/* Пегомастаксы: the fill bar. The fill grows smoothly; while counting, light stripes run along it and a soft
   shine sweeps over; the colour goes from teal (collecting) to amber (soon full) to red (full, pulsing). */
.pg-bar { position: relative; height: 34px; border-radius: 9px; overflow: hidden; margin: 6px 0 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2); }
.pg-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px 0 0 8px;
  background: linear-gradient(90deg, #1f8f7a, #2fd1b0); transition: width 1.2s cubic-bezier(.22,.8,.3,1), background .6s;
  box-shadow: 0 0 18px rgba(47,209,176,.35); }
.pg-fill::before { content: ""; position: absolute; inset: 0; opacity: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 10px, transparent 10px 20px); background-size: 28px 28px; }
.pg-fill::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); }
.pg-bar.live .pg-fill::before { opacity: 1; animation: pgStripes 1.2s linear infinite; }
.pg-bar.live .pg-fill::after { opacity: 1; animation: pgShine 2.8s ease-in-out infinite; }
.pg-bar.warn .pg-fill { background: linear-gradient(90deg, #b8741a, #ffb23e); box-shadow: 0 0 18px rgba(255,178,62,.35); }   /* 55–80 % */
.pg-bar.hot .pg-fill { background: linear-gradient(90deg, #b8322b, #ff5e52); box-shadow: 0 0 18px rgba(255,94,82,.4); }     /* 80–100 % */
/* full: the stripes keep running (slower) and the shine keeps sweeping, with a pulsing red glow */
.pg-bar.full .pg-fill { background: linear-gradient(90deg, #b8322b, #ff5e52); border-radius: 8px; animation: pgPulse 1.6s ease-in-out infinite; }
.pg-bar.full .pg-fill::before { opacity: 1; animation: pgStripes 2.2s linear infinite; }
.pg-bar.full .pg-fill::after { opacity: 1; animation: pgShine 3.4s ease-in-out infinite; }
/* the runner: a little Pegomastax at the fill's edge carrying the percent; it runs while the count goes on,
   and hops at 100 %. Near the right end the percent moves to its left side. */
/* the track the runner walks: from the left edge to the gacha sitting at the right end (52 px kept for it) */
.pg-bar { --p: 0; }
.pg-runner { position: absolute; top: 0; bottom: 0; width: 40px; display: flex; align-items: center; pointer-events: none; z-index: 2;
  left: calc((100% - 98px) * var(--p) / 100 + 4px); transition: left 1.2s cubic-bezier(.22,.8,.3,1); }
.pg-pct { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; z-index: 2;
  left: calc((100% - 98px) * var(--p) / 100 + 50px); transition: left 1.2s cubic-bezier(.22,.8,.3,1), right 1.2s cubic-bezier(.22,.8,.3,1); }
/* near the gacha there's no room on the right: the percent goes to the runner's left side */
.pg-bar.flip .pg-pct { left: auto; right: calc(100% - (100% - 98px) * var(--p) / 100 + 2px); }
/* the gacha at the end: the same height and middle line as the runner (centred in the bar, not stuck to its bottom) */
/* centred by the middle of the bar (its body is heavy at the bottom, so a little smaller and lifted a touch) */
.pg-gacha { position: absolute; right: 7px; top: 50%; width: 34px; height: 26px; margin-top: -13px; z-index: 1; pointer-events: none; overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); transform-origin: 50% 60%; animation: gaBreath 2.4s ease-in-out infinite; }
.pg-gacha .ga-fur { fill: #9a6a43; stroke: #3d2614; stroke-width: 1.1; stroke-linejoin: round; }
.pg-gacha .ga-arm { fill: none; stroke: #7d5434; stroke-width: 4; stroke-linecap: round; }
.pg-gacha .ga-belly, .pg-gacha .ga-muzzle { fill: #dcbb8f; }
.pg-gacha .ga-nose { fill: #2a1a10; }
.pg-gacha .ga-eye { fill: #140c06; }
.pg-gacha .ga-mouth { fill: none; stroke: #3d2614; stroke-width: 1.2; stroke-linecap: round; }
.pg-gacha .ga-paw { fill: #7d5434; stroke: #3d2614; stroke-width: .9; }
.pg-bar.full .pg-gacha { animation: gaHappy .9s ease-in-out infinite; }
@keyframes gaBreath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .96); } }
@keyframes gaHappy { 0%, 60%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-4px) scale(1.04, .97); } }
.pg-bar.demo .pg-fill, .pg-bar.demo .pg-runner, .pg-bar.demo .pg-pct { transition-duration: .25s; transition-timing-function: linear; }
.pg-pego { width: 40px; height: 28px; flex: none; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.pg-pego .pg-body, .pg-pego .pg-neck, .pg-pego .pg-head, .pg-pego .pg-tail { fill: #8fd16a; stroke: #2c4a1e; stroke-width: 1.1; stroke-linejoin: round; }
.pg-pego .pg-head { fill: #a5de7e; }
.pg-pego .pg-eye { fill: #1a1a1a; }
.pg-pego .pg-arm, .pg-pego .pg-leg path { fill: none; stroke: #2c4a1e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-pego .pg-leg { transform-box: fill-box; transform-origin: 50% 0; }
.pg-bar.live .pg-pego { animation: pgBob .32s ease-in-out infinite; }
.pg-bar.live .pg-leg.l1 { animation: pgLeg .32s ease-in-out infinite; }
.pg-bar.live .pg-leg.l2 { animation: pgLeg .32s ease-in-out infinite reverse; }
.pg-bar.live .pg-tail { transform-box: fill-box; transform-origin: 100% 60%; animation: pgTail .32s ease-in-out infinite; }
.pg-bar.full .pg-pego { animation: pgHop .9s ease-in-out infinite; }
.pg-pct { font-size: 14px; font-weight: 700; justify-content: flex-start; letter-spacing: .04em; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.85); font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes pgLeg { 0%, 100% { transform: rotate(28deg); } 50% { transform: rotate(-28deg); } }
@keyframes pgBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes pgTail { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-6deg); } }
@keyframes pgHop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
@keyframes pgStripes { from { background-position: 0 0; } to { background-position: 28px 0; } }
@keyframes pgShine { 0% { left: -40%; } 60%, 100% { left: 110%; } }
@keyframes pgPulse { 0%, 100% { box-shadow: 0 0 10px rgba(255,94,82,.35); } 50% { box-shadow: 0 0 26px rgba(255,94,82,.75); } }
.pg-info { font-size: 13px; margin-bottom: 12px; }
.pg-actions { align-items: center; margin-bottom: 14px; }
.pg-actions .switch { margin: 0; }
.pg-form { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* on the red bar (80 % and more): the call to action, over the fill, left of the runner */
.pg-msg { position: absolute; left: 0; right: 150px; z-index: 2; top: 0; bottom: 0; display: none; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.pg-bar.hot .pg-msg, .pg-bar.full .pg-msg { display: flex; }
.lc-state.bad { color: #ff6b5e; border-color: rgba(255,107,94,.5); }
@media (max-width: 900px) { .pg-form { grid-template-columns: 1fr 1fr; } }
.ga-pal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 8px; font-size: 12px; }
.ga-pal { display: flex; flex-wrap: wrap; gap: 6px; }
.ga-pick { font-family: var(--font); font-size: 12px; letter-spacing: .04em; padding: 5px 10px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--text); }
.ga-pick:hover { border-color: var(--tek-2); }
.ga-pick.on { background: var(--tek); border-color: var(--tek); color: #021018; font-weight: 600; }
.ga-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.ga-summary:empty { display: none; }
.ga-ready { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.ga-ready .ga-big { font-size: 26px; color: var(--tek-2); }
.ga-ready .muted { margin-left: 6px; font-size: 12px; letter-spacing: .06em; }
.ga-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ga-chip { font-family: var(--font); font-size: 12px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; }
.ga-chip b { color: var(--text); font-weight: 600; letter-spacing: .04em; }
.ga-chip:hover, .ga-chip.on { border-color: var(--tek-2); color: var(--text); }
.ga-chip.clear { border-style: dashed; }
.ga-list { display: flex; flex-direction: column; }
.ga-row { display: grid; grid-template-columns: 30px minmax(120px, 1.1fr) minmax(90px, .8fr) 14px minmax(90px, .8fr) minmax(140px, 1.6fr) 64px; gap: 8px; align-items: center;
  padding: 6px 6px; border-bottom: 1px solid rgba(var(--pur-rgb),.06); }
.ga-row input:not([type=checkbox]) { height: 32px; font-size: 13px; padding: 4px 9px; }
.ga-row .ga-name { font-weight: 600; letter-spacing: .03em; }
.ga-row .ga-plus { color: var(--muted); text-align: center; }
.ga-row.todo { box-shadow: inset 2px 0 0 var(--amber); background: rgba(255,178,62,.04); }
.ga-row.todo .ga-note { border-color: rgba(255,178,62,.35); }
.ga-chk { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ga-chk input { position: absolute; opacity: 0; pointer-events: none; }
.ga-chk span { width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 13px; color: transparent; }
.ga-row.done .ga-chk span { background: #2fa84f; border-color: #2fa84f; color: #fff; }
.ga-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; justify-self: end; padding: 4px 8px; border-radius: 6px; }
.ga-del:hover { color: #ff6b5e; background: rgba(255,107,94,.08); }
.ga-ask { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--amber); justify-self: end; white-space: nowrap; }
@media (max-width: 900px) { .ga-row { grid-template-columns: 30px 1fr 1fr 14px 1fr; } .ga-row .ga-note { grid-column: 2 / -1; } .ga-form { grid-template-columns: 1fr 1fr; } }
/* game icons (from ARK Wiki, stored in web/icons) */
.ico { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; flex: none; }
.ico.lg { width: 32px; height: 32px; }
.ico.xl { width: 44px; height: 44px; filter: drop-shadow(0 0 6px rgba(var(--pur-rgb),.25)); }
.hint.rates ul { margin: 8px 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hint.rates li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; padding: 6px 10px; background: rgba(0,0,0,.2); border: 1px solid rgba(var(--pur-rgb),.08); }
.hint.rates .ico-gen { display: flex; align-items: center; gap: 8px; min-width: 210px; }
.hint.rates .rate { display: inline-flex; align-items: center; gap: 6px; }
.hint.rates b { color: var(--text); font-weight: 500; }
#gPreview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.formula { display: inline-flex; align-items: center; gap: 6px; }
.gen .fuel { display: inline-flex; align-items: center; gap: 5px; }
.gen .fuel .ico { width: 18px; height: 18px; }
.formula { color: var(--tek-2); border: 1px solid var(--line-2); background: rgba(var(--pur-rgb),.07); padding: 4px 10px; font-size: 13px; letter-spacing: .03em; }
#gPreview .arrow { color: var(--tek); }
.gen-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.gen-summary .panel { padding: 14px 18px; }
.gen-summary .v { font-size: 26px; color: var(--tek-2); margin-top: 4px; }
.gen-summary .v.lv-low { color: var(--amber); } .gen-summary .v.lv-crit { color: var(--red); }
.srv-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srv-tabs .kicker { margin-right: 6px; }
.srv-tab { font-family: var(--font); font-size: 15px; letter-spacing: .06em; color: var(--muted); background: rgba(0,0,0,.3);
  border: 1px solid var(--line); padding: 7px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: .15s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.srv-tab:hover { color: var(--text); border-color: var(--line-2); }
.srv-tab.on { color: #021018; background: var(--tek); border-color: var(--tek); font-weight: 600; box-shadow: 0 0 14px var(--tek-glow); }
.srv-tab .cnt { font-size: 11px; padding: 1px 6px; background: rgba(var(--pur-rgb),.12); color: var(--tek-2); }
.srv-tab.on .cnt { background: rgba(0,0,0,.25); color: #021018; }
/* reordering the server tabs by dragging: the tab being moved fades, a bright line shows where it lands */
.srv-tab[draggable="true"] { cursor: grab; }
.srv-tab.dragging { opacity: .4; }
.srv-tab.drop-l { box-shadow: inset 3px 0 0 var(--tek-2); }
.srv-tab.drop-r { box-shadow: inset -3px 0 0 var(--tek-2); }
.srv-tab .live { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.srv-tab.on .live { background: #0c7a3e; box-shadow: 0 0 0 2px rgba(2,16,24,.5); }
.srv-tab .x { font-size: 11px; opacity: .6; } .srv-tab .x:hover { opacity: 1; color: var(--red); }
.srv-tab.add { border-style: dashed; font-size: 13px; }
.srv-new { display: inline-flex; align-items: center; gap: 6px; }
.srv-new[hidden] { display: none; }
.srv-tab .x { margin-left: 2px; padding: 0 2px; }
.srv-ask { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text); }
.srv-new input { width: 160px; padding: 6px 9px; }
.gen-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gen-top .empty { grid-column: 1 / -1; }
@media (max-width: 1100px) { .gen-top { grid-template-columns: 1fr; } }
.gen .top .name { min-width: 0; }
.gen .left { font-size: 30px; }
/* one line while it fits; on a narrow card the last button moves down instead of sticking out (19.11.2026) */
.gen-top .gen .acts { flex-wrap: wrap; gap: 6px; }
.gen-top .gen .acts input { flex: 1 1 50px; min-width: 50px; width: 0; }
.gen-top .gen .acts .btn { padding: 6px 9px; flex: none; }
.gen .meta .fuel { border: none; padding: 0; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.gen-summary .v.multi { font-size: 16px; line-height: 1.5; }
.gen-search { margin-left: auto; width: 260px; padding: 6px 10px; }
.gen-tbl td { vertical-align: middle; padding: 6px 8px; }
.gen-tbl tr.gen-row td:first-child { border-left: 3px solid var(--green); }
.gen-tbl tr.gen-row.low td:first-child { border-left-color: var(--amber); }
.gen-tbl tr.gen-row.crit td:first-child { border-left-color: var(--red); }
.gen-tbl tr.gen-row.empty td:first-child { border-left-color: #555; }
.gen-tbl .c-ico { width: 44px; }
.gen-tbl input.name { width: 100%; min-width: 140px; background: transparent; border-color: transparent; padding: 5px 6px; }
.gen-tbl input.name:hover { border-color: var(--line); }
.gen-tbl input.name:focus { background: rgba(0,0,0,.35); }
.gen-tbl .c-type { color: var(--muted); }
.gen-tbl .c-type .ico { width: 18px; height: 18px; margin-right: 6px; }
.gen-tbl .left { font-size: 17px; color: var(--green); font-variant-numeric: tabular-nums; }
.gen-tbl tr.low .left { color: var(--amber); } .gen-tbl tr.crit .left { color: var(--red); } .gen-tbl tr.empty .left { color: var(--muted); }
.gen-tbl .units { font-size: 11px; }
.gen-tbl .c-bar { width: 80px; }
.gen-tbl .c-bar .bar { margin: 0; height: 6px; width: 72px; }
.gen-tbl .until { white-space: nowrap; font-size: 12px; }
.gen-tbl .bar .fill { background: linear-gradient(90deg, #1b8f5a, var(--green)); box-shadow: none; }
.gen-tbl tr.low .bar .fill { background: linear-gradient(90deg, #8f5a1b, var(--amber)); }
.gen-tbl tr.crit .bar .fill { background: linear-gradient(90deg, #8f1b1b, var(--red)); }
.gen-tbl .c-acts { text-align: right; white-space: nowrap; }
.gen-tbl .c-acts input { width: 80px; padding: 5px 7px; margin-right: 4px; }
.gen-tbl .c-acts .btn { padding: 5px 9px; }
.gen { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; border-left: 3px solid var(--green); }
.gen.low { border-left-color: var(--amber); } .gen.crit { border-left-color: var(--red); } .gen.empty { border-left-color: #555; }
.gen .top { display: flex; align-items: center; gap: 10px; }
.gen .name { font-size: 16px; flex: 1; }
.gen .fuel { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 2px 7px; }
.gen .left { font-size: 34px; color: var(--green); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gen.low .left { color: var(--amber); } .gen.crit .left { color: var(--red); } .gen.empty .left { color: var(--muted); }
.gen .bar .fill { background: linear-gradient(90deg, #1b8f5a, var(--green)); box-shadow: 0 0 10px rgba(92,242,154,.4); }
.gen.low .bar .fill { background: linear-gradient(90deg, #8f5a1b, var(--amber)); }
.gen.crit .bar .fill { background: linear-gradient(90deg, #8f1b1b, var(--red)); }
.gen .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.gen .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gen .acts input { width: 80px; padding: 5px 7px; }
@media (max-width: 760px) { .gen-form { grid-template-columns: 1fr 1fr; } }

/* ── timers ── */
.timer-form { grid-template-columns: 2fr 90px 90px auto auto; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.timer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.timer { padding: 16px 18px; }
.timer .t-name { font-size: 15px; letter-spacing: .05em; }
.timer .t-left { font-size: 30px; color: var(--tek-2); margin: 6px 0; font-variant-numeric: tabular-nums; }
.timer.done .t-left { color: var(--amber); }
.timer .row { justify-content: space-between; }

/* ── servers ── */
.srv { display: grid; grid-template-columns: 14px 1fr 120px 150px auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid rgba(var(--pur-rgb),.08); }
.srv.w { grid-template-columns: 26px 14px 1fr 110px 150px 140px auto; }
.srv-fav { background: none; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; color: var(--muted); transition: .15s; }
.srv-fav:hover { color: #ffd56b; }
.srv.w.fav .srv-fav { color: #ffd56b; text-shadow: 0 0 8px rgba(255,213,107,.5); }
.spark { width: 150px; height: 28px; color: var(--tek); display: block; }
span.spark { text-align: center; line-height: 28px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.srv .name { font-size: 14px; } .srv .map { font-size: 12px; color: var(--muted); }
.pbar { height: 6px; background: rgba(0,0,0,.4); border: 1px solid var(--line); margin-top: 4px; }
.pbar div { height: 100%; background: var(--tek); }
.srv input { width: 70px; padding: 4px 6px; }
.last-server { display: flex; align-items: center; gap: 18px; }
.last-server .big { font-size: 20px; color: #fff; }

/* ── appearance ── */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 20px; }
.theme-card { font-family: var(--font); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 10px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line); color: var(--text); transition: .15s; }
.theme-card:hover { border-color: var(--line-2); }
.theme-card.on { border-color: var(--tek); box-shadow: 0 0 0 1px var(--tek), 0 0 16px var(--tek-glow); }
.theme-card .sw { height: 90px; display: flex; align-items: center; justify-content: center; gap: 14px; position: relative; }
.theme-card .sw img { width: 54px; height: 54px; }
.theme-card .sw i { width: 46px; height: 10px; box-shadow: 0 0 10px rgba(86,214,255,.6); }
.theme-card .tt { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--tek-2); }
.theme-card.on .tt::after { content: "  ✓"; }
.theme-card .muted { font-size: 12px; }
.logo-pick-head { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.logo-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.logo-card { font-family: var(--font); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; padding: 10px 6px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line); color: var(--muted); font-size: 12px; transition: .15s; }
.logo-card:hover { border-color: var(--line-2); color: var(--text); }
.logo-card.on { border-color: var(--tek); color: var(--tek-2); box-shadow: 0 0 0 1px var(--tek), 0 0 14px var(--tek-glow); }
.logo-card img { width: 48px; height: 48px; }
.logo-card .duo { display: flex; height: 48px; align-items: center; }
.logo-card .duo img { width: 30px; height: 30px; }
.logo-card .duo img + img { margin-left: -12px; }
.bg-setup { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start; }
.bg-preview { aspect-ratio: 16 / 9; border: 1px solid var(--line-2); background: var(--bg-img) center / cover no-repeat,
    var(--bg-glow), var(--bg); position: relative; }
.bg-preview::after { content: ""; position: absolute; inset: 0; background: rgba(var(--shade-rgb),calc(var(--dim) * .6)); }
.bg-controls { display: flex; flex-direction: column; gap: 12px; }
.bg-controls .hint { margin: 0; }
.bg-mode { align-self: flex-start; }
.bg-mode button:disabled { opacity: .4; cursor: not-allowed; }
.theme-card .sw { background-size: cover; }
.bg-dim { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; max-width: 420px; }
.bg-dim b { color: var(--tek-2); }
.bg-dim input[type=range] { accent-color: var(--tek); padding: 0; border: none; box-shadow: none; background: none; }
@media (max-width: 900px) { .bg-setup { grid-template-columns: 1fr; } }

#panic[hidden] { display: none; }
#panic { animation: stopPulse 2s ease-in-out infinite; }
@keyframes stopPulse { 50% { box-shadow: 0 0 14px rgba(255, 90, 78, .45); } }

/* ── collapsible panels ── */
.panel-head.collapsible { cursor: pointer; user-select: none; }
.collapse-btn { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; font-size: 16px;
  color: var(--tek-2); background: rgba(var(--pur-rgb), .06); border: 1px solid var(--line); transition: transform .2s, border-color .15s; }
.panel-head.collapsible:hover .collapse-btn { border-color: var(--line-2); }
.panel.collapsed .collapse-btn { transform: rotate(-90deg); }
.panel.collapsed > :not(.panel-head) { display: none !important; }
.panel.collapsed > .panel-head { margin-bottom: 0; }

/* highlight a block after jumping to it */
.panel.flash { animation: panelFlash 2.2s ease-out; }
@keyframes panelFlash { 0%, 35% { box-shadow: 0 0 0 2px var(--tek), 0 0 24px var(--tek-glow); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ── autoclick ── */
.auto-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 2px 4px; }
.auto-line .dot { width: 8px; height: 8px; border-radius: 50%; background: #555; }
.auto-line .dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.auto-line #autoGoto { margin-left: 6px; padding: 5px 11px; font-size: 11px; }
.switch.big { font-size: 15px !important; margin-bottom: 10px; }
.auto-help { margin: 6px 0 10px; padding-left: 20px; line-height: 1.6; color: var(--text); font-size: 13px; }
.auto-help b { color: var(--tek-2); font-weight: 500; }

/* ── Discord sign-in ── */
.auth-gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(var(--shade-rgb), .82); backdrop-filter: blur(8px); }
.auth-gate[hidden] { display: none; }

/* Versions feed */
.ver-link { background: none; border: none; color: var(--muted); font-family: var(--font); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; padding: 4px 2px 0; text-align: left; }
.ver-link:hover { color: var(--tek-2); }
.ver-link b { color: var(--text); font-weight: 600; }
body.dev-copy .ver-link b { color: #ffb23e; }   /* DEV version: amber */
body.live-copy .ver-link b { color: #4cd97f; }  /* Live version: green */
.ver-modal { z-index: 60; }
.ver-box { width: min(640px, 94vw); max-height: 86vh; display: flex; flex-direction: column; gap: 12px; padding: 24px 26px; }
.ver-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ver-head h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: .08em; }
.ver-box { width: min(860px, 94vw) !important; }
.ver-cols { display: grid; grid-template-columns: 220px 1fr; gap: 18px; min-height: 0; overflow: hidden; }
.ver-index { display: flex; flex-direction: column; gap: 4px; overflow: auto; border-right: 1px solid var(--line); padding-right: 12px; }
.ver-row { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; text-align: left; background: none; border: 1px solid transparent; color: var(--text); font-family: var(--font); padding: 8px 10px; cursor: pointer; }
.ver-row:hover { background: rgba(var(--pur-rgb), .06); }
.ver-row.on { border-color: var(--tek); background: rgba(var(--pur-rgb), .1); }
.ver-row-num { color: var(--tek-2); font-weight: 600; letter-spacing: .05em; }
.ver-row-name { line-height: 1.35; }
.ver-row-date { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) { .ver-cols { grid-template-columns: 1fr; } .ver-index { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 8px; max-height: 140px; } }
.ver-list { overflow: auto; padding-right: 4px; }
.ver-item { display: grid; grid-template-columns: 18px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.ver-item::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.ver-item:last-child::before { display: none; }
.ver-dot { width: 12px; height: 12px; margin: 4px 0 0 3px; border: 2px solid var(--muted); background: var(--bg); transform: rotate(45deg); }
.ver-item.latest .ver-dot { border-color: var(--tek); background: var(--tek); box-shadow: 0 0 10px var(--tek-glow); }
.ver-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.ver-num { font-size: 16px; color: var(--tek-2); letter-spacing: .06em; }
.ver-name { font-size: 15px; font-weight: 600; }
.ver-tag { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #021018; background: var(--tek); padding: 2px 7px; }
.ver-date { margin-left: auto; font-size: 12px; }
.ver-body p { margin: 6px 0 4px; color: var(--text); }
.ver-body ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.6; }
.ver-add summary { cursor: pointer; list-style: none; }
.ver-add summary::-webkit-details-marker { display: none; }
.ver-add[open] summary { margin-bottom: 8px; }
#verAdmin textarea { width: 100%; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); color: var(--text); font-family: var(--font); padding: 8px; resize: vertical; }
.auth-box { width: min(460px, 92vw); text-align: center; padding: 34px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-box img { width: 84px; height: 84px; filter: drop-shadow(0 0 12px var(--tek-glow)); }
.auth-title { font-size: 26px; letter-spacing: .35em; color: var(--tek-2); }
.auth-box p { margin: 0; line-height: 1.55; }
.discord-btn { font-family: var(--font); font-size: 15px; letter-spacing: .06em; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: #5865f2; color: #fff; border: none; padding: 12px 22px; margin-top: 6px; transition: .15s; }
.discord-btn:hover { background: #4752c4; }
.discord-btn svg { width: 22px; height: 22px; fill: #fff; }
.discord-btn.small { font-size: 12px; padding: 7px 14px; margin: 0; }
.auth-box #authSkip { margin-top: 2px; }

/* guest mode: everything visible, nothing clickable inside pages */
.guest-banner { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap;
  max-width: 1400px; margin: 0 130px 16px 0; padding: 12px 16px; border: 1px solid var(--line-2); background: var(--panel); }
.guest-banner[hidden] { display: none; }
/* lost Discord sign-in: signed in, so Tribe / Phone / profile sit at the top right — start below them */
#lostBanner { margin: 50px 0 16px 0; border-color: var(--warn, #c9a227); }
/* «a new version»: below the top-right profile group too; when both show, the second one sits right under it */
#updBanner { margin: 50px 0 16px 0; }
/* «another PC holds the subscription» (28.11.2026): the same place; a plate under another one sits right under it */
#pcBanner { margin: 50px 0 16px 0; border-color: var(--warn, #c9a227); }
#updBanner:not([hidden]) ~ #pcBanner, #updBanner:not([hidden]) ~ #lostBanner, #pcBanner:not([hidden]) ~ #lostBanner { margin-top: 0; }
body.guest main .page:not(#page-help) button, body.guest main .page:not(#page-help) input, body.guest main .page:not(#page-help) select,
body.guest main .page:not(#page-help) label, body.guest main .page:not(#page-help) .ref .shot { pointer-events: none; opacity: .45; }

/* ── tactical map ── */
.map-head-right { display: flex; align-items: center; gap: 12px; }
.map-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .map-wrap { grid-template-columns: 1fr; } }
.map-view { position: relative; padding: 0; height: calc(100vh - 210px); min-height: 480px; overflow: hidden; background: rgba(0,0,0,.35); }
.map-view svg { width: 100%; height: 100%; display: block; cursor: grab; user-select: none; }
.map-view[data-tool="mark"] svg, .map-view[data-tool="tower"] svg, .map-view[data-tool="area"] svg, .map-view[data-tool="ruler"] svg { cursor: crosshair; }
.m-board { fill: rgba(var(--shade-rgb), .55); stroke: var(--line-2); stroke-width: .15; }
.m-play { fill: rgba(var(--pur-rgb), .05); stroke: rgba(var(--pur-rgb), .25); stroke-width: .12; stroke-dasharray: .8 .6; }
.m-grid { stroke: rgba(var(--pur-rgb), .1); }
.m-grid.major { stroke: rgba(var(--pur-rgb), .24); }
.m-glabel { fill: var(--muted); font-family: var(--font); }
.m-poi { fill: var(--muted); stroke: rgba(0,0,0,.6); stroke-width: 1; }
.m-poi.t-cave { fill: #b08a5a; }.m-poi.t-artifact .art-badge { fill: #1c2228; stroke: #ffd56b; stroke-width: 1.4; filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.m-poi.t-artifact .art-relic { fill: #ffd56b; stroke: none; filter: drop-shadow(0 0 2.5px rgba(255,213,107,.8)); }
.m-poi.t-artifact .art-base { fill: #9a8a6a; stroke: none; }
.m-poi.t-peak .peak-badge { fill: #1c2228; stroke: #e9eef3; stroke-width: 1.4; filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.m-poi.t-peak .peak-rock { fill: #b89a72; stroke: none; }
.m-poi.t-peak .peak-snow { fill: #ffffff; stroke: none; }
.m-poi.t-island { fill: var(--tek-2); } .m-poi.t-rescave { fill: #8a8a94; }
.m-poi.t-boss .boss-ring { fill: #2a0d12; stroke: #ff4f5e; stroke-width: 1.8; filter: drop-shadow(0 0 5px rgba(255,79,94,.6)); }
.m-poi.t-boss .boss-bone { fill: #f2ece4; stroke: none; }
.m-poi.t-boss .boss-eye { fill: #2a0d12; stroke: none; }
.m-poi.t-boss .boss-teeth { stroke: #2a0d12; stroke-width: .9; fill: none; }
.m-poi.t-pearl .pearl-drop { fill: #1f5f8a; stroke: #ffffff; stroke-width: 1.5; filter: drop-shadow(0 0 3px rgba(0,0,0,.6)); }
.m-poi.t-pearl .pearl-core { fill: #f7fbff; stroke: #9fc6dc; stroke-width: .8; }
.m-poi.t-pearl .pearl-shine { fill: #ffffff; stroke: none; }
.m-poi.t-cave .cave-rock { stroke: rgba(255,255,255,.85); stroke-width: 1.4; filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.m-poi.t-cave .cave-door { fill: #120a06; stroke: none; }
.m-poi.t-terminal .term-badge { fill: #1c2228; stroke: #56d6ff; stroke-width: 1.4; filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.m-poi.t-terminal .term-screen { fill: #56d6ff; stroke: none; filter: drop-shadow(0 0 2.5px rgba(86,214,255,.8)); }
.m-poi.t-terminal .term-stand { stroke: #9fb3c2; stroke-width: 1.6; fill: none; }
.m-poi.t-place .place-badge { fill: #1c2228; stroke: #e9eef3; stroke-width: 1.4; filter: drop-shadow(0 0 3px rgba(0,0,0,.7)); }
.m-poi.t-place .place-flag { fill: #ffffff; stroke: #ffffff; stroke-width: 1.4; stroke-linejoin: round; }
/* layer groups: just a thin line between them */
.ml-split { height: 0; border-top: 1px solid var(--line); margin: 4px 0; }
/* cave difficulty legend: a column — the caption, then one difficulty per line */
.cave-legend { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cave-legend b { font-weight: 600; margin-bottom: 1px; }
.cave-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cave-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.poi-ed label[hidden] { display: none; }
.m-board.has-img { fill: rgba(0,0,0,.4); }
.m-img { opacity: .95; }
.m-poi.unverified { opacity: .4; }
.m-poi.editable { cursor: move; }
.m-poi.editable:hover { opacity: 1; }
.map-admin .btn:disabled { opacity: .4; cursor: not-allowed; }
.m-img.dim { opacity: .25; }
.m-poi.picked { opacity: 1; filter: drop-shadow(0 0 6px #fff); }
.poi-ed { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 10px; border: 1px dashed var(--line-2); }
.poi-ed[hidden] { display: none; }
.poi-ed label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.poi-ed .muted { font-size: 11px; }
.admin-tag.sm { margin-left: 6px; font-size: 9px; padding: 1px 5px; vertical-align: middle; }
.ma-sub .admin-tag { margin-left: 8px; }
.admin-box[hidden] { display: none; }
.admin-box .ma-sub { display: flex; align-items: center; }
.admin-box .btn { align-self: flex-start; }
.admin-tag { margin-left: auto; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(255,178,62,.45); padding: 2px 7px; }
.ma-sub { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--tek-2); margin: 14px 0 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.map-admin .hint b { color: var(--tek-2); font-weight: 500; }
.map-admin #mapAdminInfo { color: var(--amber); }
.map-pieces { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mp-row { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); background: rgba(0,0,0,.2); font-size: 13px; }
.mp-row img { width: 54px; height: 36px; object-fit: cover; border: 1px solid var(--line); }
.mp-row .muted { font-size: 11px; }
.map-calib { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 10px; border: 1px dashed var(--line-2); }
.map-calib[hidden] { display: none; }
.calib-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 6px; align-items: center; font-size: 13px; }
.calib-row input { padding: 5px 7px; }
/* obelisks: a dark outline and a dark halo instead of the bright white glow */
.m-poi .glow { filter: drop-shadow(0 0 3px rgba(0,0,0,.85)); stroke: rgba(10,12,16,.85); stroke-width: 1.4; }
.m-plabel, .m-mlabel { font-family: var(--font); font-size: 12px; fill: var(--text); stroke: rgba(0,0,0,.75); stroke-width: 3px; paint-order: stroke; }
/* islands are labelled the same way as obelisks: upright, the same colour */
.m-mark { cursor: pointer; }
/* marker editor next to the marker */
.map-pop { position: absolute; z-index: 5; width: 280px; padding: 12px 14px; background: rgba(13,16,22,.97);
  border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.map-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.map-pop-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.map-pop-x:hover { color: #fff; }
/* the coordinates card of a standard game point */
.poi-pop { width: auto; min-width: 230px; max-width: 320px; }
.poi-pop .map-pop-head b { text-transform: none; letter-spacing: .02em; font-size: 13px; }
.poi-coords { display: flex; align-items: center; gap: 10px; }
.poi-coords b { font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.poi-coords .btn { margin-left: auto; }
.poi-note { font-size: 12px; margin-top: 6px; }
.poi-note:empty { display: none; }
/* names of standard points can be clicked for their coordinates */
.m-poi.clickable { cursor: pointer; }
.m-poi.clickable:hover .m-plabel { fill: #fff; }
.ask-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.ask-box { width: min(420px, calc(100vw - 32px)); padding: 18px 20px; background: var(--panel, #12161d); }
.ask-box p { margin: 0 0 16px; line-height: 1.5; }
/* a structured question (the first sleep-mode warning): heading, short points, a small note */
.ask-box .ask-title { margin: 0 0 12px; font-size: 15px; }
.ask-box .ask-list { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.ask-box .ask-note { margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.map-ask { font-size: 12px; color: var(--amber); margin-right: 6px; }
.m-mark .pin { stroke: rgba(0,0,0,.65); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(0,0,0,.6)); }
.m-mark.sel .pin { stroke: #fff; stroke-width: 3; }
.m-emoji { font-size: 12px; text-anchor: middle; }
.m-mlabel { font-size: 13px; }
/* the outline is always ~70 %, whatever the fill («Заливка») and whether the territory is selected */
.m-area { fill-opacity: .1; stroke-opacity: .7; cursor: pointer; }
#mapView[data-tool="pan"] .m-area { cursor: move; }   /* hold and drag to move the territory */
.m-area.sel { fill-opacity: .18; stroke-opacity: .7; stroke-dasharray: 4 3; }
/* the dark rim's width is set in map units by map.js (a fixed px width here became a black blob) */
/* a territory's name: a small dark tag, a dot of its colour, white text */
.m-atag { pointer-events: none; }
.m-atag rect { fill: rgba(20,24,30,.6); stroke: rgba(255,255,255,.12); }
.m-alabel { font-family: var(--font); font-weight: 500; text-anchor: start; dominant-baseline: central; fill: #f1f1f4; stroke: none; letter-spacing: .02em; }
.m-draft { fill: none; stroke: var(--tek); stroke-dasharray: 4 3; }
.m-draft-pt, .m-ruler-pt { fill: var(--tek); }
.m-ruler { stroke: var(--amber); stroke-dasharray: 5 4; }
.m-rlabel { fill: var(--amber); font-family: var(--font); stroke: rgba(0,0,0,.75); stroke-width: 3px; paint-order: stroke; }
.m-me .dot { fill: var(--green); stroke: #fff; stroke-width: 2; }
.m-me .ring { fill: none; stroke: var(--green); stroke-width: 2; animation: mePulse 1.6s ease-out infinite; transform-origin: center; }
@keyframes mePulse { from { opacity: 1; r: 8; } to { opacity: 0; r: 22; } }
/* control panel: a bar above the map (nothing lies on top of the map itself) */
.map-view { display: flex; flex-direction: column; }
.map-view svg { flex: 1; min-height: 0; height: auto; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(13,16,22,.7); flex: none; }
.map-tools .mt-group { display: flex; flex: none; border: 1px solid var(--line); }
.map-tools .mt { height: 32px; padding: 0 12px; display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .04em; white-space: nowrap;
  cursor: pointer; color: var(--text); background: transparent; border: 0; border-right: 1px solid var(--line); }
.map-tools .mt:last-child { border-right: 0; }
.map-tools .mt i { font-style: normal; font-size: 14px; }
.map-tools .mt:hover { background: rgba(255,255,255,.05); }
.map-tools .mt.on { background: rgba(var(--pur-rgb),.12); color: #fff; box-shadow: inset 0 -2px 0 var(--tek); }
.map-tools .grow { flex: 1; }
/* what the chosen tool does: a thin line under the panel */
.map-hint { flex: none; padding: 5px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: rgba(13,16,22,.45); }
@media (max-width: 1100px) { .map-tools .mt span { display: none; } }
.map-coords { position: absolute; bottom: 10px; left: 12px; font-size: 13px; padding: 4px 10px; background: var(--panel-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.map-side { display: flex; flex-direction: column; gap: 14px; }
.map-side .panel { padding: 14px 16px; }
.map-side .hint { margin: 0 0 10px; }
.map-title { display: inline-flex; align-items: center; gap: 14px; }
.map-title h1 { margin: 0; }
/* the map picker right next to the title: our own dropdown, so unfinished maps can carry the menu's «SOON» badge */
.map-pick { position: relative; flex: none; }
/* the copies of the map («Шаблон 1»…) */
.prof-pick .mp-btn { width: 190px; }
.prof-pick .mp-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-pick .mp-list { min-width: 280px; }
.pp-name { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pp-name input { height: 32px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.pp-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.mp-list button .pp-n { color: var(--muted); font-size: 12px; font-weight: 400; }
.mp-list button .pp-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the favourite star: the copy that opens by default */
.pp-fav { flex: none; width: 18px; text-align: center; color: var(--muted); opacity: .55; font-size: 14px; cursor: pointer; }
.pp-fav:hover { opacity: 1; color: #ffd56b; }
.pp-fav.on { opacity: 1; color: #ffd56b; }
.mp-list button.pp-act { color: var(--muted); font-size: 13px; }
.mp-list button.pp-act:hover { color: var(--text); }
.mp-list button.pp-del:hover { color: #ff6b5e; }
.pp-ask { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; font-size: 12px; color: var(--amber); }
.mp-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 170px; height: 38px; padding: 6px 12px;
  font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: .03em; color: var(--text);
  background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.mp-btn:hover, .map-pick.open .mp-btn { border-color: var(--line-2); }
.mp-btn i { font-style: normal; font-size: 12px; color: var(--muted); transition: transform .15s; }
.map-pick.open .mp-btn i { transform: rotate(180deg); }
.mp-list { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; min-width: 240px; padding: 6px;
  background: var(--toast-bg, #12161d); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.55); }
.map-pick.open .mp-list { display: flex; flex-direction: column; gap: 2px; }
.mp-list button, .mp-soon { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px; font-size: 14px; text-align: left; }
.mp-list button { font-family: var(--font); background: none; border: none; color: var(--text); cursor: pointer; }
.mp-list button:hover { background: rgba(var(--pur-rgb),.12); }
.mp-list button.on { color: var(--tek-2); font-weight: 600; }
.mp-soon { color: var(--muted); opacity: .7; cursor: default; }
.map-layers { display: flex; flex-direction: column; gap: 8px; }
.res-dot { stroke: rgba(0,0,0,.7); stroke-width: 1.5; }
.res-zone { pointer-events: none; }
.res-ico path { fill: rgba(12,14,18,.82); fill-rule: evenodd; }
/* the legend in the layer list: the same circle + icon as on the map */
.res-key { display: inline-block; width: 18px; height: 18px; margin-right: 7px; vertical-align: middle; flex: none; }
.res-key path { fill: rgba(12,14,18,.82); fill-rule: evenodd; }
.poi-add { margin-top: 8px; }
#mapPoiDel { margin-top: 8px; }
/* Tower: the reach of its turrets */
.m-reach { fill-opacity: .16; stroke-opacity: .75; pointer-events: none; }
.rates-panel { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px; }
.rates-panel .switch { margin: 0; }
.rates-panel .muted { font-size: 12px; }
.rate-type button { padding: 6px 10px; font-size: 11px; }
.rate-type.off { opacity: .4; pointer-events: none; }
.tm-rates { padding: 10px 0 0; }
.food-ic { display: inline-block; width: 1.6em; }
#page-taming .ko { margin: 4px 0 12px; line-height: 1.9; }
#page-taming .ko > b { color: var(--tek); font-weight: 600; margin-right: 6px; }
#page-taming .ko-w { white-space: nowrap; margin-right: 14px; }
.craft-sub { margin: -4px 0 10px; }
/* «Главная» (the logo opens it) */
#brandHome { cursor: pointer; transition: .15s; }
#brandHome:hover { background: rgba(var(--pur-rgb),.06); }
.home-status { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.home-st { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); background: rgba(var(--side-rgb),.5); }
.home-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; }
.home-st.on { color: var(--text); } .home-st.on i { background: #3ddc84; opacity: 1; box-shadow: 0 0 6px rgba(61,220,132,.7); }
.home-st.warn { color: var(--text); } .home-st.warn i { background: #ffb23e; opacity: 1; }
/* section captions on «Главная»: «СЕЙЧАС ————» — the caption, then a thin line to the right edge */
.home-sec { display: flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text); opacity: .75; margin: 28px 0 12px; }
/* the page puts 18px between its blocks: a caption sits closer to what it names (12px, like inside the tiles) */
.page > .home-sec { margin: 10px 0 -6px; }
/* every caption sits 28px below the block before it: the first caption inside the tiles would otherwise get
   the page gap (18) plus its own 28; the status row's bottom margin would add 8 more before «Сейчас» */
#homeTiles > .home-sec:first-child { margin-top: 10px; }
#page-home .home-status { margin-bottom: 0; }
#page-home .home-two { margin-top: 10px; }   /* 28px after «Сейчас», like everywhere else */
.home-sec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,0) 85%); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.home-tile { display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 4px; align-items: center; text-align: left;
  padding: 16px; border: 1px solid var(--line); background: rgba(var(--side-rgb),.55); color: var(--text); font-family: var(--font); cursor: pointer; transition: .15s; }
.home-tile:hover { border-color: var(--tek); background: rgba(var(--pur-rgb),.08); }
/* (as on the showcase cards: the icon centred on the name + the first description line) */
.home-tile { align-items: start; }
.home-tile svg { grid-row: span 2; align-self: start; margin-top: 6px; width: 26px; height: 26px; fill: none; stroke: var(--tek-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.home-tile .ht-name { font-size: 14px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.home-tile .ht-desc { grid-column: 2 / 4; font-size: 12px; line-height: 16px; color: var(--muted); }
.home-tile .nav-dot { margin: 0; }
.home-tile.wip { opacity: .65; }
/* ── Soft corners for the whole app (chosen 12.11.2026; the square look with cut corners is in
   _backup\home-before-rounded-2026-11-12). Remove this block to go back. ── */
.panel, .panel.cut { clip-path: none; border-radius: 10px; }
.panel.cut::before { left: 14px; border-radius: 0 0 2px 2px; }
.btn, .srv-tab { clip-path: none; border-radius: 6px; }
input, select, textarea { border-radius: 6px; }
kbd { border-radius: 4px; }
.seg { border-radius: 6px; overflow: hidden; }
.ask-box, .qs-box, .profile-menu, #toast div { border-radius: 10px; }
.ask-box, .qs-box { overflow: hidden; }
.gen { border-left-width: 1px; box-shadow: inset 3px 0 0 var(--green); }
.gen.low { box-shadow: inset 3px 0 0 var(--amber); } .gen.crit { box-shadow: inset 3px 0 0 var(--red); } .gen.empty { box-shadow: inset 3px 0 0 #555; }
.gen, .gen.low, .gen.crit, .gen.empty { border-left-color: var(--line); }
nav a { border-radius: 0 6px 6px 0; }
.craft-grp, .cr-chip, .ov-av, .home-st, .now-card, .show-card, .home-tile, .home-event { border-radius: 8px; }
/* status badges: rounded like the cards, not «pills» — their height would make them too round */
.home-st { padding: 7px 14px; }
.now-card { border-left-width: 1px; box-shadow: inset 3px 0 0 var(--line-2); }
.now-card.ok { box-shadow: inset 3px 0 0 #3ddc84; } .now-card.warn { box-shadow: inset 3px 0 0 #ffb23e; } .now-card.bad { box-shadow: inset 3px 0 0 #ff5a5a; }
.now-card.ok, .now-card.warn, .now-card.bad { border-left-color: var(--line); }
.sc-prev { border-radius: 8px 8px 0 0; }
.sc-prev.inset img { border-radius: 5px; }
.sc-ex, .sc-zoom, .hs-step { border-radius: 5px; }
.hs-bar, .hs-bar i { border-radius: 2px; }
.zoom-box img { border-radius: 10px; }
/* «Основное» showcase: big cards, a 16:9 picture on top */
.home-show { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .home-show { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.show-card { display: flex; flex-direction: column; padding: 0; text-align: left; border: 1px solid var(--line); background: rgba(var(--side-rgb),.6); color: var(--text); font-family: var(--font); transition: .2s; overflow: hidden; }
.show-card:hover { border-color: var(--line-2); }
.sc-prev { cursor: pointer; }
.sc-prev.zoomable { cursor: zoom-in; }
.sc-zoom { position: absolute; right: 8px; top: 8px; z-index: 2; width: 26px; height: 26px; display: grid; place-items: center; font-size: 14px; background: rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.25); opacity: 0; transition: .2s; }
.sc-prev:hover .sc-zoom { opacity: 1; }
.sc-body { width: 100%; border: none; background: none; color: var(--text); font-family: var(--font); text-align: left; cursor: pointer; transition: .15s; }
.sc-body:hover { background: rgba(var(--pur-rgb),.1); }
.sc-go { font-style: normal; margin-left: 4px; opacity: 0; transform: translateX(-4px); transition: .2s; color: var(--tek-2); }
.sc-body:hover .sc-go { opacity: 1; transform: none; }
/* the enlarged example */
.zoom-box { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: zoom-out; animation: fade .2s ease; }
.zoom-box[hidden] { display: none; }
.zoom-box img { width: min(90vw, 1200px); height: auto; max-height: 82vh; object-fit: contain; border: 1px solid var(--line-2); box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.zb-hint { font-size: 12px; color: var(--muted); }
/* «ПРИМЕР» on example pictures; the user's own data replaces them */
.sc-ex { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; padding: 3px 7px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.25); color: #e9e9ee; }
/* the user's own live data: a thin line over the bottom edge of the example picture */
.sc-live { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 12px;
  background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.7)); border-top: 1px solid rgba(255,255,255,.12); }
.sc-live span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-live i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tek-2); box-shadow: 0 0 6px var(--tek-glow); }
.sc-live.ok i { background: #3ddc84; box-shadow: 0 0 6px rgba(61,220,132,.7); }
.sc-live.warn i { background: #ffb23e; } .sc-live.warn span { color: #ffd08a; }
.sc-live.bad i { background: #ff5a5a; } .sc-live.bad span { color: #ff9a8f; }
.sc-own { width: 100%; height: 100%; box-sizing: border-box; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 3px; font-size: 12px; overflow: hidden; }
.so-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.so-big { font-size: 20px; font-weight: 700; }
.so-sm { color: var(--muted); margin-bottom: 4px; }
.so-row { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; border-top: 1px solid rgba(255,255,255,.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-row span { color: var(--muted); flex: none; } .so-row em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 11px; }
.so-log .so-row.danger { color: #ff7a6b; } .so-log .so-row.warn { color: #ffb23e; }
.so-gen { padding: 4px 0; } .so-gen div { display: flex; justify-content: space-between; gap: 8px; } .so-gen span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-gen i { display: block; height: 3px; margin-top: 3px; background: #3ddc84; } .so-gen.warn i { background: #ffb23e; } .so-gen.bad i { background: #ff5a5a; }
.so-gen.bad b { color: #ff7a6b; } .so-gen.warn b { color: #ffb23e; }
.sc-prev { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(0,0,0,.35); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.sc-prev img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; transition: filter .25s; }
/* on hover the picture only brightens a little: growing it re-scaled the small picture and blurred it */
.show-card:hover .sc-prev img { filter: brightness(1.12); }
/* «inner frame» like the sleep-mode picture has by itself: the screenshot sits inside with a margin and a thin border */
.sc-prev.inset { background: #0a0c10; }
/* one card, two halves: each half of the picture opens its own example, each name below its own page */
.sc-duo .sc-half { position: absolute; top: 4.25%; bottom: 4.25%; width: 45.75%; z-index: 3; cursor: zoom-in; padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: 5px; transition: background .2s, border-color .2s;
  display: flex; align-items: flex-end; justify-content: center; }
.sc-duo .sc-half.l { left: 4.25%; }
.sc-duo .sc-half.r { right: 4.25%; }
.sc-duo .sc-half span { margin-bottom: 8px; font-family: var(--font); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: rgba(0,0,0,.72); padding: 3px 8px; border-radius: 4px; opacity: 0; transition: opacity .2s; }
.sc-duo .sc-half:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.35); }
.sc-duo .sc-half:hover span { opacity: 1; }
/* the picture keeps its own 16:9 inside the frame (the same share of width and height), so nothing of it
   is cut off; the margins are close to the boxes inside the sleep-mode picture */
.sc-prev.inset img { position: absolute; inset: 4.25%; width: 91.5%; height: 91.5%; object-fit: fill; box-sizing: border-box; border: 1px solid rgba(255,255,255,.14); }
.sc-icon svg { width: 54px; height: 54px; fill: none; stroke: var(--tek-2); stroke-width: 1.2; opacity: .5; }
.sc-body { display: grid; grid-template-columns: 26px 1fr auto; column-gap: 12px; row-gap: 4px; align-items: start; padding: 14px 16px; }
/* the icon is centred on the name + the FIRST line of the description (fixed line heights): a two-line
   description doesn't push it lower than in the cards next to it (the user, 14.11.2026) */
.sc-body svg { grid-row: span 2; align-self: start; margin-top: 7px; width: 24px; height: 24px; fill: none; stroke: var(--tek-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sc-body .ht-name { font-size: 14px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.sc-body .ht-desc { grid-column: 2 / 4; font-size: 12px; line-height: 16px; color: var(--muted); }
.sc-body .nav-dot { margin: 0; }
/* SOON: the picture stays bright and can be enlarged; the name part is faded and not clickable */
.show-card.wip .sc-body { opacity: .55; cursor: default; }
.show-card.wip .sc-body:hover { background: none; }
/* sleep mode: the story in three steps */
.sc-story { display: flex; align-items: center; gap: 6px; padding: 10px; width: 100%; height: 100%; box-sizing: border-box; }
.sc-story em { font-style: normal; color: var(--muted); }
.st-step { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 76%; padding: 6px; border: 1px solid var(--line); background: rgba(0,0,0,.35); text-align: center; }
.st-step b { font-size: 20px; } .st-step span { font-size: 11px; line-height: 1.25; } .st-step i { font-style: normal; font-size: 9px; color: var(--muted); letter-spacing: .04em; }
.st-step.bad { border-color: rgba(255,90,90,.5); } .st-step.bad b { color: #ff5a5a; }
.st-step.ok { border-color: rgba(61,220,132,.5); } .st-step.ok b { color: #3ddc84; }
.home-hero { padding: 6px 0 14px; }
.home-hero h1 { font-size: 30px; letter-spacing: .3em; margin: 0; color: var(--tek-2); text-shadow: 0 0 14px var(--tek-glow); }
.home-tag { margin: 6px 0 0; font-size: 15px; color: var(--text); opacity: .85; }
.home-event { margin: 10px 0 0; padding: 10px 14px; border: 1px solid #ffb23e; background: rgba(255,178,62,.08); font-size: 13px; }
/* «Сейчас»: live cards */
.home-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
/* a section's own counters, under its title: one row, the cards the same width and ending on one line */
.page-now { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); margin: 0 0 18px; }
@media (max-width: 760px) { .page-now { grid-template-columns: 1fr; } }
.page-now .now-card { cursor: default; }
.page-now .now-card:hover { border-color: var(--line); }
/* «Сейчас» + «Настроить» on one line */
.home-sec-row { justify-content: space-between; align-items: baseline; }   /* «Сейчас» on one text line with «⚙ Настроить» (the button's padding is 5/3) */
.home-sec-row .btn { letter-spacing: .08em; opacity: .9; }
/* the picker: every counter grouped by section, the chosen ones numbered in order */
.cnt-pick { margin: 0 0 14px; padding: 14px 16px; }
.cnt-pick[hidden] { display: none; }
.cp-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 13px; }
.cp-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
.cp-gname { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cp-group { display: flex; flex-direction: column; gap: 5px; }
.cp-item { display: flex; align-items: center; gap: 8px; text-align: left; font-family: var(--font); font-size: 13px; color: var(--text); padding: 7px 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: rgba(255,255,255,.03); cursor: pointer; }
.cp-item:hover:not([disabled]) { background: rgba(255,255,255,.07); }
.cp-item.on { border-color: rgba(var(--pur-rgb), .8); background: rgba(var(--pur-rgb), .14); }
.cp-item[disabled] { opacity: .4; cursor: default; }
.cp-num { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line-2); color: var(--text); }
.cp-item.on .cp-num { background: var(--text); color: #0b0d11; border-color: var(--text); }
.cp-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.cp-foot.cp-ask { padding: 10px 12px; border: 1px solid rgba(255,178,62,.45); border-radius: 8px; background: rgba(255,178,62,.07); font-size: 13px; flex-wrap: wrap; }
.now-card { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto auto; align-content: start; column-gap: 10px; row-gap: 3px; text-align: left; padding: 14px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--line-2); background: rgba(var(--side-rgb),.6); color: var(--text); font-family: var(--font); cursor: pointer; transition: .15s; }
.now-card:hover { border-color: var(--tek); }
.now-card .nc-ic { grid-row: span 3; font-size: 20px; line-height: 1.2; }
.now-card .nc-t { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.now-card .nc-big { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }   /* digits and words the same height: rows of cards side by side stay level */
.now-card .nc-sm { font-size: 12px; color: var(--muted); line-height: 1.35; }   /* the whole hint, never cut (the user, 14.11.2026) */
.now-card .nc-sm { color: var(--text); opacity: .85; } .now-card .nc-lbl { color: var(--muted); }
.now-card.ok { border-left-color: #3ddc84; } .now-card.warn { border-left-color: #ffb23e; } .now-card.bad { border-left-color: #ff5a5a; }
.now-card.idle { opacity: .7; } .now-card.idle .nc-big { color: var(--muted); }
/* a thin scale at the bottom of a counter card (rooms ready, Pegomastax fill, fuel left) */
.now-card .nc-bar { grid-column: 2; display: block; height: 5px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.now-card .nc-bar.thin { height: 3px; margin-top: 4px; }
.now-card .nc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tek, #56d6ff); }
.now-card .nc-bar.ok i { background: #3ddc84; } .now-card .nc-bar.warn i { background: #ffb23e; } .now-card .nc-bar.bad i { background: #ff5a5a; }
/* «С чего начать» + «Что нового» */
/* «С чего начать» and «Что нового» always the same size: two equal columns stretched to the same height,
   news items cut to two lines each so a long release note can't stretch the pair */
.home-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 16px; margin-top: 22px; }
.home-two > .panel { margin: 0; }
.home-two > .panel[hidden] { display: none; }
.home-two:has(> .panel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.home-news ul { list-style: none; padding-left: 0; }
/* «Что нового» folded into a strip (once «С чего начать» is done): title · version and name · Показать */
/* the title and the small «V.4 · …» strip sit on one text line (by the baseline, not the centre: different sizes, 21.11.2026) */
.home-news .panel-head { display: flex; align-items: baseline; gap: 14px; }
.home-news .hn-tog { margin-left: auto; }
.home-news.folded { padding-top: 12px; padding-bottom: 12px; }
.home-news.folded .panel-head { margin-bottom: 0; }
.home-news.folded #homeNewsBody { display: none; }
.hn-strip { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hn-strip:empty { display: none; }
.home-news li { position: relative; padding-left: 14px; max-height: 3em; overflow: hidden; }   /* two lines at line-height 1.5 */
.home-news li::before { content: "•"; position: absolute; left: 2px; top: 0; }
@media (max-width: 900px) { .home-two { grid-template-columns: minmax(0, 1fr); } }
.hs-bar { height: 4px; background: rgba(255,255,255,.07); margin-bottom: 4px; } .hs-bar i { display: block; height: 100%; background: var(--tek); }
.hs-cnt { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.hs-step { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 4px; border: none; border-bottom: 1px solid rgba(255,255,255,.05); background: none; color: var(--text); font-family: var(--font); font-size: 13px; cursor: pointer; }
.hs-step span { width: 16px; color: var(--muted); } .hs-step.ok { color: var(--muted); text-decoration: line-through; } .hs-step.ok span { color: #3ddc84; text-decoration: none; }
.hs-step:hover:not(.ok) { color: var(--tek-2); }
.hn-ver { font-size: 11px; letter-spacing: .1em; color: var(--muted); } .hn-title { font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
.home-news ul { margin: 0 0 10px; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
/* hotkeys strip */
.home-keys { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
/* «Оверлей» page */
.ov-ctl { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 16px; }
.ov-ctl .switch { margin: 0; }
.ov-state { font-size: 13px; color: var(--muted); }
.ov-state.on { color: #3ddc84; }
.ov-state.on::before { content: "● "; }
.ov-av { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-color: #ffb23e; }
.ov-av select { min-width: 200px; }
.ov-av[hidden] { display: none; }   /* shown (orange) only while an unknown avatar waits for a name */
/* right column: «Последние сканы» over «Как пользоваться», together as tall as the overlay view on the left */
.ov-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ov-side .ov-how { flex: 1; }
.ov-hist-list { display: flex; flex-direction: column; gap: 6px; }
.ov-hrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(var(--side-rgb),.5); color: var(--text); font-family: var(--font); text-align: left; cursor: pointer; transition: .15s; }
.ov-hrow:hover { border-color: var(--tek); }
.ov-hrow .ov-hic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 7px; border: 1px solid rgba(86,214,255,.22); background: rgba(86,214,255,.06); display: grid; place-items: center; }
.ov-hrow .ov-hic i { width: 30px; height: 30px; background: #56d6ff; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.ov-hrow .ov-hname { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-hrow .ov-hago { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ov-hist-empty { color: var(--muted); font-size: 13px; padding: 4px 2px; }
.ov-hist-list.example .ov-hrow { opacity: .62; }
.ov-hist-list.example .ov-hrow:hover { opacity: 1; }
.ov-hist-ex { position: static; margin-left: auto; }
.ov-hist-ex[hidden] { display: none; }
@media (max-width: 760px) {
  .ov-hrow { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; }
  .ov-hrow .ov-hic { grid-row: span 2; }
  .ov-hrow .ov-hname { white-space: normal; }
}
.ov-view { padding: 0; overflow: hidden; }
.ov-view iframe { width: 100%; height: 560px; border: 0; display: block; background: #0b0d11; }
/* the tag and its text: one even gap (8px), the tag level with the first line of the text */
.ov-soon { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ov-soon .wip-tag { margin: 4px 0 0; }
.tm-extra .x-method { color: var(--tek); font-weight: 600; font-size: 15px; margin: 4px 0 6px; }
.tm-extra .x-note { margin-bottom: 10px; line-height: 1.5; }
.tm-extra .x-food { color: var(--muted); margin-top: 8px; line-height: 2; }
.tm-extra .x-f { color: var(--text, inherit); white-space: nowrap; margin-right: 12px; }
.tm-extra .x-src { color: var(--muted); font-size: 12px; margin-top: 8px; }
#page-taming .ko-no { color: var(--danger, #ff7a6b); font-size: 13px; }
#page-taming .ko-also { color: #3ddc84; font-size: 13px; margin-top: 4px; }
/* timers: the care and egg forms in one row each, the button never squeezed */
.imprint-form .timer-form { grid-template-columns: minmax(160px, 2fr) 90px minmax(110px, 1.2fr) 100px 70px 110px 120px auto; align-items: end; }
.egg-form .timer-form { grid-template-columns: minmax(180px, 2fr) minmax(160px, 1.5fr) 90px 80px auto; align-items: end; }
.imprint-form .timer-form .btn, .egg-form .timer-form .btn { white-space: nowrap; }
@media (max-width: 1250px) { .imprint-form .timer-form { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* ── Taming ── */
.tm-form { grid-template-columns: minmax(200px, 2fr) 110px 150px auto; align-items: end; }
.tm-tbl td:not(:first-child), .tm-tbl th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
/* ── Quick search ── */
/* «Сообщить о проблеме»: the same solid window as the quick search, a simple form inside */
.rp-ov { align-items: center; padding: 16px; }
/* .qs-box.rp-box: stronger than the quick search's «padding: 0» further down */
.qs-box.rp-box { width: min(580px, calc(100vw - 32px)); padding: 22px 26px 22px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
@media (max-width: 760px) { .qs-box.rp-box { padding: 18px 16px; } }
.rp-head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; margin-bottom: 2px; }
.rp-l { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.rp-l select, .rp-l textarea, .rp-l input { width: 100%; box-sizing: border-box; font-size: 14px; color: var(--text); }
.rp-l textarea { resize: vertical; min-height: 110px; font-family: var(--font); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(255,255,255,.04); outline: none; }
.rp-l textarea:focus { border-color: rgba(var(--pur-rgb), .8); }
.rp-l input[type=file] { font-size: 12px; color: var(--muted); }
.rp-l input[type=file]::file-selector-button { font-family: var(--font); font-size: 12px; margin-right: 10px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; }
.rp-box .switch { font-size: 13px; }
.switch i.sw-t { font-style: normal; }   /* text set by script inside a switch (a span would be drawn as the toggle) */
.rp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.rp-err { flex: 1; min-width: 0; font-size: 12px; color: #ffb23e; }
/* Настройки → Помощь: two actions side by side, one column on a phone */
.help-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.help-acts > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.help-acts .hint { margin: 0 0 4px; }
/* side by side: the buttons end on one line however long the text above is (21.11.2026) */
.help-acts > div > .btn:last-child { margin-top: auto; }
/* Quick search: a solid window over a dark, blurred page — the field, the results and the page behind never blend */
.qs-ov { position: fixed; inset: 0; z-index: 900; background: rgba(4,6,9,.72); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.qs-ov[hidden] { display: none; }
.qs-box { width: min(660px, calc(100vw - 32px)); padding: 0; background: #12151b; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 70px rgba(0,0,0,.75); }
.qs-field { display: flex; align-items: center; gap: 10px; margin: 12px; padding: 0 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(255,255,255,.05); cursor: text; }
.qs-field:focus-within { border-color: rgba(var(--pur-rgb), .8); background: rgba(255,255,255,.07); }
.qs-field svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.qs-box .qs-field input { flex: 1; min-width: 0; font-size: 17px; padding: 13px 0; border: 0; background: transparent; color: var(--text); outline: none; box-shadow: none; }
.qs-res { max-height: 52vh; overflow: auto; padding: 0 8px 8px; }
.qs-it { display: flex; gap: 12px; align-items: center; padding: 9px 10px; cursor: pointer; border-radius: 8px; border-left: 3px solid transparent; }
.qs-it:hover { background: rgba(255,255,255,.04); }
.qs-it.on { background: rgba(var(--pur-rgb),.16); border-left-color: rgba(var(--pur-rgb), .9); }
.qs-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.06); font-size: 16px; }
.qs-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qs-t b { font-weight: 600; font-size: 14px; color: var(--text); }
.qs-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-where { flex: none; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.qs-empty { padding: 6px 10px 12px; font-size: 13px; }
.qs-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qs-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 16px; font-size: 11px; color: var(--muted); border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.25); }
.qs-foot kbd { display: inline-block; min-width: 18px; text-align: center; font-family: var(--font); font-size: 10px; padding: 2px 6px; margin: 0 2px; border-radius: 4px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--text); }
.qs-foot kbd + kbd { margin-left: 0; }
/* ── Дроп: where an item comes from ── */
/* two blocks side by side, the same height (the list scrolls inside) */
.dr-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.dr-wrap > .panel { margin: 0; min-height: 520px; }
@media (max-width: 900px) { .dr-wrap { grid-template-columns: 1fr; } }
.dr-left { display: flex; flex-direction: column; gap: 10px; }
.dr-left input { width: 100%; }
.dr-list { flex: 1; overflow-y: auto; max-height: 68vh; display: flex; flex-direction: column; gap: 2px; }
.dr-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font-family: var(--font); font-size: 13px; color: var(--text);
  background: none; border: 1px solid transparent; border-radius: 6px; padding: 7px 9px; cursor: pointer; }
.dr-row:hover { background: rgba(255,255,255,.04); }
.dr-row.on { background: rgba(255,255,255,.07); border-color: var(--line-2); }
.dr-name { min-width: 0; display: flex; flex-direction: column; }
.dr-name i { font-style: normal; font-size: 11px; color: var(--muted); }
.dr-cnt { flex: none; font-size: 11px; color: var(--muted); }
.dr-hint, .dr-empty { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 4px 2px; }
.dr-empty { padding: 30px 10px; text-align: center; }
.dr-pop { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dr-head h2 { margin: 0 0 2px; font-size: 20px; letter-spacing: .02em; }
.dr-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 10px; font-size: 13px; }
.dr-filters { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.dr-frow { display: flex; align-items: flex-start; gap: 12px; }
.dr-flabel { flex: none; width: 52px; padding-top: 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-chip { font-family: var(--font); font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.dr-chip:hover { color: var(--text); background: rgba(255,255,255,.07); }
.dr-chip.on { background: var(--text); color: #0b0d11; border-color: var(--text); }
.dr-map { margin-top: 14px; }
.dr-map-name { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tek-2, var(--muted)); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.dr-kind { margin: 0 0 10px; }
.dr-kind-name { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.dr-srcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 6px; }
/* the same look as «Где искать в первую очередь»: a stripe in the crate's colour on the left (an invisible one when
   the place has no colour, so every name starts at the same line), quiet tags */
.dr-src { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 10px 8px 11px; border-left: 3px solid var(--crate, transparent); background: rgba(255,255,255,.025); }
.dr-src > span:first-child { flex: 1; min-width: 0; }
.dr-src .dr-tag { border-color: transparent; padding: 0; font-size: 9px; opacity: .75; }
/* Industrial Grinder: a row opens that item; the amount on the right */
.dr-grind { border: 0; border-left: 3px solid rgba(255,255,255,.12); color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.dr-grind:hover { background: rgba(var(--pur-rgb),.10); }
.dr-grind i { font-style: normal; font-size: 11px; }
.dr-grind-q { color: var(--tek-2); font-variant-numeric: tabular-nums; }
.dr-grind-list { margin-top: 10px; }
.dr-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.dr-dot[style*="transparent"] { box-shadow: none; }   /* no crate colour: an empty slot, so the names stay in one column */
.dr-tag { flex: none; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.dr-tag.item { color: #5cf29a; border-color: rgba(92,242,154,.4); }
.dr-tag.bp { color: #7fd0ff; border-color: rgba(127,208,255,.4); }
.dr-tag.both { color: #ffb23e; border-color: rgba(255,178,62,.4); }
/* the answer: the three best places, big, with an accent frame */
.dr-best { margin: 14px 0 14px; padding: 14px 16px 6px; border: 1px solid rgba(var(--pur-rgb), .55); border-radius: 10px; background: rgba(var(--pur-rgb), .07); }
.dr-best.none { padding-bottom: 14px; }
.dr-best-t { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.dr-best-big { font-size: 16px; }
.dr-best-row { display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 12px; border-top: 1px solid var(--line); border-left: 3px solid var(--crate, transparent); }
.dr-best-row:first-of-type { border-top: 0; }
.dr-best-n { flex: none; width: 22px; font-size: 22px; font-weight: 700; line-height: 1; color: var(--text); opacity: .9; }
.dr-best-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-best-name b { font-size: 15px; font-weight: 600; }
.dr-best-name .muted { font-size: 12px; }
/* folded parts: «Все места…», «Крафт» */
.dr-more { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; }
.dr-more > summary { cursor: pointer; padding: 11px 0; font-size: 13px; letter-spacing: .04em; display: flex; gap: 12px; align-items: baseline; list-style: none; }
.dr-more > summary::-webkit-details-marker { display: none; }
.dr-more > summary::before { content: "▸"; color: var(--muted); }
.dr-more[open] > summary::before { content: "▾"; }
.dr-more > summary .muted { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-more[open] { padding-bottom: 12px; }
.dr-craft { margin-top: 18px; }
.dr-line { font-size: 13px; margin-bottom: 8px; }
.dr-ings { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-ings .ga-chip { cursor: default; }
.dr-src-note { margin-top: 18px; }
/* ── Crafting calculator ── */
/* two columns that end at the same line: the left one's last panel grows to the right one's length */
.craft-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.craft-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.craft-col > .panel { margin: 0; }
.craft-col > .panel:last-child { flex: 1; }
.craft-wrap > .panel { margin: 0; }
@media (max-width: 1000px) { .craft-wrap { grid-template-columns: 1fr; } }
.craft-row { display: grid; grid-template-columns: 1fr 80px 30px; gap: 6px; align-items: center; padding: 4px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.craft-row input { padding: 4px 6px; }
.craft-head, .craft-line { display: grid; grid-template-columns: 1.4fr 70px 70px 1fr; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.craft-head { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.craft-line { border-bottom: 1px solid rgba(255,255,255,.04); }
.craft-line b { text-align: right; font-variant-numeric: tabular-nums; }
.craft-line .have { padding: 3px 5px; font-size: 12px; min-width: 0; }
.craft-line.done { opacity: .45; }
.craft-line em { font-style: normal; font-size: 11px; }
/* «Крафт нужных ресурсов»: one small group per component, then «только добыть», then the total */
.craft-grp { margin-bottom: 12px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.cg-head { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tek-2); margin-bottom: 4px; }
.cg-head .muted { text-transform: none; letter-spacing: 0; }
.cg-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 2px 0; }
.cg-line b { font-variant-numeric: tabular-nums; }
.cg-line em { font-style: normal; font-size: 11px; }
/* «Последние расчёты»: chips that bring a whole list back */
.cr-title { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.cr-list { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.cr-chip { display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--text); font-family: var(--font); font-size: 12px; cursor: pointer; transition: .15s; }
.cr-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-chip i { font-style: normal; color: var(--muted); padding: 0 2px; opacity: 0; transition: .15s; }
.cr-chip:hover { border-color: var(--line-2); } .cr-chip:hover i { opacity: 1; } .cr-chip i:hover { color: var(--text); }
.cr-chip.on { border-color: var(--line-2); background: rgba(var(--pur-rgb),.08); }
.cg-acc { border-color: var(--line-2); background: rgba(var(--pur-rgb),.05); margin-top: 4px; }
.cg-th, .cg-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 72px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.cg-th { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cg-th span:nth-child(2), .cg-row b { text-align: right; font-variant-numeric: tabular-nums; }
.cg-row + .cg-row { border-top: 1px solid rgba(255,255,255,.05); }
.cg-row em { font-style: normal; font-size: 11px; }
.cg-row .have { padding: 3px 5px; font-size: 12px; min-width: 0; width: 100%; }
.cg-row.done { opacity: .45; }
/* ── Raid simulator ── */
.raid-plans { display: flex; gap: 8px; align-items: center; }
.raid-plans select { min-width: 220px; }
.raid-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .raid-wrap { grid-template-columns: 1fr; } }
.raid-board-panel { padding: 0; overflow: hidden; }
/* raid tools: connected groups (cursor · turret palette · zoom · remove), the same look as the map bar */
.raid-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(13,16,22,.7); }
.raid-tools .mt-group { display: flex; flex: none; border: 1px solid var(--line); }
.raid-tools .mt { height: 32px; padding: 0 11px; display: flex; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; cursor: pointer;
  color: var(--text); background: transparent; border: 0; border-right: 1px solid var(--line); }
.raid-tools .mt:last-child { border-right: 0; }
.raid-tools .mt:hover { background: rgba(255,255,255,.05); }
.raid-tools .mt.on { background: rgba(var(--pur-rgb),.12); color: #fff; box-shadow: inset 0 -2px 0 var(--tek); }
.raid-tools .rt-palette .mt { padding: 0 10px; }
@media (max-width: 1300px) { .raid-tools .rt-palette .mt span { display: none; } .raid-tools .rt-palette .mt { padding: 0 9px; } }
.raid-tools .mt i { font-style: normal; font-size: 14px; }
.raid-tools .grow { flex: 1; }
.raid-hint { padding: 5px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
/* angles of the base: tabs with a small preview */
.raid-shots { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rs-tab { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 3px 26px 3px 3px; cursor: pointer; font-size: 12px;
  color: var(--text); background: transparent; border: 1px solid var(--line); }
.rs-tab img, .rs-tab .rs-empty { width: 56px; height: 32px; object-fit: cover; display: grid; place-items: center; background: rgba(0,0,0,.4); color: var(--muted); }
.rs-tab b { font-size: 11px; color: var(--amber); }
.rs-tab.on { border-color: var(--tek); box-shadow: inset 0 -2px 0 var(--tek); }
.rs-x { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 11px; color: var(--muted); }
.rs-x:hover { color: #ff6b5e; }
.rs-add { height: 40px; padding: 0 14px; cursor: pointer; font-size: 12px; color: var(--muted); background: transparent; border: 1px dashed var(--line-2); }
.rs-add:hover { color: var(--text); border-color: var(--tek); }
.raid-board { min-height: 420px; display: grid; place-items: center; background: rgba(0,0,0,.35); }
.raid-drop { text-align: center; padding: 40px 24px; max-width: 460px; }
.raid-drop-ico { font-size: 40px; margin-bottom: 8px; }
.raid-shot { position: relative; width: 100%; line-height: 0; cursor: crosshair; user-select: none; overflow: hidden; }
.raid-shot[data-tool="pan"] { cursor: grab; }
.raid-shot[data-tool="pan"]:active { cursor: grabbing; }
.raid-stage { position: relative; transform-origin: 0 0; --z: 1; }
.raid-stage img { width: 100%; display: block; }
.raid-marks { position: absolute; inset: 0; }
/* turret icons: one style for all, the shape tells the type; same size on screen at any zoom */
.ti { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.raid-mark { position: absolute; transform: translate(-50%, -50%) scale(calc(1 / var(--z))); width: 30px; height: 30px; display: grid; place-items: center;
  line-height: 1; border-radius: 50%; border: 2px solid var(--c, #fff); background: rgba(10,12,16,.85);
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 9px var(--c, transparent); cursor: pointer; }
.raid-mark .ti { width: 19px; height: 19px; }
.raid-tools .mt .ti { width: 17px; height: 17px; }
.raid-tools .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.raid-result .rr-t { display: flex; align-items: center; gap: 6px; }
.raid-result .rr-t .ti { width: 16px; height: 16px; }
.raid-result .rr-t em { font-style: normal; font-size: 11px; color: var(--amber); }
.raid-side { display: flex; flex-direction: column; gap: 14px; }
.raid-side .panel { padding: 14px 16px; }
.raid-sec { padding: 8px 0; border-top: 1px solid var(--line); }
.raid-sec:first-of-type { border-top: 0; }
.raid-sec h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--tek-2); }
.raid-result .rr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; padding: 3px 0; }
.raid-result .rr small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.raid-result .rr.off { opacity: .55; }
.raid-result .rr.total { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 6px; }
.raid-result .rr i { font-style: normal; }
.raid-big { font-size: 15px; font-weight: 600; margin: 2px 0 4px; }
.raid-result .small { font-size: 12px; line-height: 1.45; }
.raid-howto { margin-top: 16px; }
.raid-howto summary { cursor: pointer; list-style: none; }
.raid-howto summary h3 { display: inline; margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.raid-steps { margin: 8px 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
/* soak: how long each soaker lives vs the time the walls take */
.soak-row { padding: 6px 0; }
.soak-row .sr-head { display: flex; justify-content: space-between; font-size: 13px; }
.soak-row.ok .sr-head span { color: var(--green, #5cf29a); }
.soak-row.bad .sr-head span { color: #ff6b5e; }
.sr-bar { height: 5px; background: rgba(255,255,255,.07); margin: 4px 0; }
.sr-bar i { display: block; height: 100%; background: #ff6b5e; }
.soak-row.ok .sr-bar i { background: var(--green, #5cf29a); }
.soak-note { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--amber); }
.soakers { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.sk-head, .sk-row { display: grid; grid-template-columns: 1.2fr 1fr .7fr .7fr .8fr 28px; gap: 4px; align-items: center; }
.sk-head { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sk-row input { min-width: 0; padding: 4px 6px; font-size: 12px; }
.sk-row .btn { padding: 2px 6px; }
.raid-tips { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.raid-tips b { color: var(--text); }
/* fire zone: where the turrets reach; outside its line is the safe distance */
.m-fire { fill-opacity: .06; stroke-opacity: .95; pointer-events: none; }
.m-firelabel { paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-linejoin: round; pointer-events: none; }
.map-tower { display: flex; flex-direction: column; gap: 10px; }
.map-tower[hidden], #mapEdAreaR[hidden], #mapEdAreaOpL[hidden] { display: none; }   /* (display:flex above beat the hidden attribute) */
#mapEdAreaR input[type=range], #mapEdAreaOpL input[type=range] { flex: 1; min-width: 120px; }
#mapEdAreaRadM, #mapEdAreaOpM { min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.map-tower #mapEdRadius { width: 80px; }
.side-pick { display: flex; gap: 6px; margin-top: 4px; }
.side-btn { flex: 1; padding: 5px 4px; font-size: 12px; cursor: pointer; color: var(--text); background: transparent; border: 1px solid var(--line-2); }
.side-btn.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); color: #fff; }
.map-colors { display: flex; gap: 6px; }
.map-colors .mc { width: 26px; height: 26px; border: 2px solid transparent; cursor: pointer; }
.map-colors .mc.on { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,.5); }
.map-list { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.ml-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(var(--pur-rgb), .08); cursor: pointer; font-size: 13px; }
.ml-row:hover { background: rgba(var(--pur-rgb), .06); }
.ml-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex: none; }
.ml-ico.area { border-radius: 2px; border: 2px solid; background: transparent; }
.ml-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── help ── */
.help-tabs { align-self: flex-start; }
.help-part { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.help-part[hidden] { display: none; }
.help-item { padding: 0; }
.help-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  font-size: 15px; letter-spacing: .04em; color: var(--text); }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.help-item[open] summary::after { transform: rotate(180deg); }
.help-item summary:hover { color: var(--tek-2); }
.help-item .hi { width: 28px; text-align: center; font-size: 18px; }
.help-item .hi .ico { width: 26px; height: 26px; }
.help-body { padding: 0 18px 16px 58px; line-height: 1.65; font-size: 14px; color: var(--text); }
.help-body p { margin: 0 0 10px; }
.help-body ol, .help-body ul { margin: 0 0 10px; padding-left: 20px; }
.help-body li { margin-bottom: 6px; }
.help-body b { color: var(--tek-2); font-weight: 500; }
.help-body .tip { color: var(--muted); border-left: 2px solid var(--line-2); padding-left: 10px; }
.help-body .tbl.keys { width: auto; margin-bottom: 10px; }
.help-body .tbl.keys td:first-child { white-space: nowrap; padding-right: 18px; }
.help-rules { padding: 20px 24px; line-height: 1.7; }
.help-rules ol { margin: 0 0 14px; padding-left: 22px; }
.help-rules li { margin-bottom: 10px; }
.help-rules b { color: var(--tek-2); font-weight: 500; }
@media (max-width: 760px) { .help-body { padding-left: 18px; } }

/* profile (top right) */
.profile { position: fixed; top: 14px; right: 26px; z-index: 30; display: flex; align-items: flex-start; gap: 8px; }
.profile > .profile-btn + .profile-menu { right: 0; }
/* «Телефон» next to the profile: the same look as the profile button; a dot = a phone is connected / watching */
.phone-btn { font-family: var(--font); display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; cursor: pointer; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; backdrop-filter: blur(6px); position: relative; }
.phone-btn:hover { border-color: var(--tek); }
.phone-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--tek-2); stroke-width: 1.6; }
.phone-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; display: none; }
.phone-dot.on { display: block; background: #6f7b88; }
.phone-dot.watch { display: block; background: var(--green); box-shadow: 0 0 8px var(--green); }
@media (max-width: 760px) { .phone-btn span { display: none; } .phone-btn { padding: 0 10px; } }
body.lite .phone-btn { backdrop-filter: none; }

/* the showcase window: a phone mock-up on the left, the text and linking on the right */
.qs-box.ph-box { width: min(880px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 30px 32px; display: grid; grid-template-columns: 300px 1fr; gap: 34px; align-items: center; position: relative; box-sizing: border-box; }
.ph-ov { padding-top: 6vh; }
.ph-close { position: absolute; top: 10px; right: 10px; }
.ph-mock { display: flex; justify-content: center; }
.ph-device { width: 270px; height: 540px; border-radius: 38px; padding: 12px; background: linear-gradient(160deg, #2a2f3a, #0e1015); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 60px rgba(0,0,0,.6), 0 0 60px rgba(var(--pur-rgb),.18); position: relative; }
.ph-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; border-radius: 12px; background: #000; z-index: 2; }
.ph-screen { width: 100%; height: 100%; border-radius: 28px; background: #0b0d11; overflow: hidden; padding: 46px 12px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 10.5px; color: #e8e8ea; }
.pm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.pm-top b { letter-spacing: .3em; font-size: 11px; }
.pm-pill { display: flex; align-items: center; gap: 5px; color: #9a9aa6; font-size: 9.5px; }
.pm-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.pm-card { background: #12151b; border: 1px solid #232836; border-radius: 9px; padding: 8px 9px; }
.pm-h { font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: #9a9aa6; margin-bottom: 5px; }
.pm-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.pm-row span { color: #9a9aa6; width: 62px; }
.pm-row b { flex: 1; font-weight: 600; }
.pm-row b.ok { color: var(--green); }
.pm-row em { font-style: normal; font-size: 9px; padding: 3px 7px; border: 1px solid #232836; border-radius: 6px; background: #1a1e27; }
.pm-shot { height: 92px; border-radius: 6px; background: linear-gradient(180deg, #5a7fa8 0%, #9cb6cf 38%, #6d7f57 39%, #3e4f33 70%, #2b3a25 100%); position: relative; overflow: hidden; }
.pm-shot::before { content: ""; position: absolute; left: 18%; bottom: 24%; width: 26%; height: 34%; background: #5d5145; clip-path: polygon(0 30%, 50% 0, 100% 30%, 100% 100%, 0 100%); }
.pm-shot::after { content: ""; position: absolute; right: 12%; bottom: 20%; width: 18%; height: 46%; background: #39462c; border-radius: 50% 50% 8% 8%; }
.pm-li { padding: 5px 7px; margin-top: 4px; background: rgba(255,255,255,.03); border-left: 2px solid transparent; border-radius: 3px; font-size: 9.5px; }
.pm-li.danger { border-left-color: #ff5a5a; color: #ffb4ac; }
.pm-li b { color: var(--tek-2); font-weight: 600; margin-right: 4px; }
.ph-eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--tek-2); }
.ph-info h2 { font-size: 26px; margin: 6px 0 8px; line-height: 1.2; }
.ph-lead { color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.ph-feats { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-feats li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); font-size: 13px; line-height: 1.35; }
.ph-feats b { font-size: 16px; line-height: 1; }
.ph-steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 8px; }
.ph-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ph-steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: rgba(var(--pur-rgb),.18); color: var(--tek-2); }
.ph-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-actions .btn { padding: 12px 22px 10px; font-size: 14px; }
.ph-status { margin: 12px 0 0; font-size: 13px; min-height: 18px; }
.ph-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ph-info .hint { margin: 10px 0 0; }
@media (max-width: 760px) {
  .qs-box.ph-box { grid-template-columns: 1fr; padding: 22px 16px; gap: 20px; }
  .ph-device { width: 220px; height: 440px; border-radius: 32px; }
  .ph-screen { padding-top: 40px; font-size: 9.5px; }
  .ph-feats { grid-template-columns: 1fr; }
  .ph-info h2 { font-size: 22px; }
}
/* «Племя» window */
.qs-box.tw-box { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 30px; position: relative; box-sizing: border-box; }
.tw-box h2 { font-size: 24px; margin: 6px 0 10px; }
.tw-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 16px; }
.tw-row { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); }
.tw-ava { position: relative; width: 34px; height: 34px; flex: none; }
.tw-ava img, .tw-ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: rgba(var(--pur-rgb),.2); color: var(--tek-2); font-weight: 600; }
.tw-ava i { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #3a4a55; border: 2px solid var(--toast-bg, #12151b); }
.tw-ava i.on { background: var(--green); }
.tw-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.tw-name small { font-size: 11px; color: var(--muted); }
/* roles: leader amber, officer blue, member grey — the same in every theme (--tek-2 is white in the black one) */
.tw-role.leader { color: var(--amber); } .tw-role.officer { color: #6fb8ff; }
.tw-tabs { display: flex; gap: 4px; margin: 4px 0 14px; border-bottom: 1px solid var(--line); }
.tw-tabs button { font-family: var(--font); background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 8px 12px; cursor: pointer; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.tw-tabs button.on { color: var(--text); border-bottom-color: var(--tek); }
.tw-badge { background: var(--green); color: #031; border-radius: 9px; padding: 0 6px; font-size: 11px; letter-spacing: 0; }
.tw-chat { display: flex; flex-direction: column; gap: 6px; height: min(48vh, 420px); overflow: auto; padding: 4px 2px 8px; }
.tw-msgrow { align-self: flex-start; max-width: 84%; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.05); display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; word-break: break-word; }
.tw-msgrow small { color: var(--muted); font-size: 11px; }
.tw-msgrow.me { align-self: flex-end; background: rgba(var(--pur-rgb),.18); }
.tw-msgrow.game { border-left: 3px solid #6fb8ff; }
.tw-msgrow i { font-style: normal; opacity: .7; }
.tw-ch { font-size: 10px; letter-spacing: .08em; color: #6fb8ff; }
.tw-ev { align-self: center; font-size: 12px; color: var(--muted); padding: 2px 8px; }
.tw-send { display: flex; gap: 8px; margin-top: 8px; }
.tw-send input { flex: 1; min-width: 0; font-family: var(--font); }
.tw-duty { color: var(--muted); } .tw-duty.on { color: var(--green); } .tw-duty.off { opacity: .6; }
.tw-log { margin: 4px 0 8px; }
.tw-log summary { cursor: pointer; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--tek-2); }
.tw-log-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 240px; overflow: auto; }
.tw-log-row { padding: 6px 9px; border-left: 3px solid transparent; background: rgba(255,255,255,.025); border-radius: 4px; font-size: 12.5px; display: flex; flex-direction: column; gap: 1px; }
.tw-log-row small { color: var(--muted); font-size: 11px; }
.tw-log-row.danger { border-left-color: #ff5a5a; } .tw-log-row.warn { border-left-color: var(--amber); }
.tw-sub.warn { color: var(--amber); } .tw-sub.bad { color: #ff7a6b; }
.tw-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tw-acts .tw-rm { color: #ffb0a8; }
.tw-inv { display: flex; gap: 8px; margin-top: 12px; }
.tw-inv input { flex: 1; min-width: 0; font-family: var(--font); }
.tw-bundle { font-size: 13px; color: var(--muted); margin: 6px 0; }
.tw-msg { color: #ffb0a8; font-size: 13px; margin: 10px 0 0; }
.tw-sent { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.tw-st.accepted { color: var(--green); } .tw-st.declined { color: #ffb0a8; } .tw-st.pending { color: var(--amber); }
.tw-find .tw-msg { color: var(--green); }
.tw-find { margin: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.tw-find input { font-family: var(--font); }
.tw-res { display: flex; flex-direction: column; gap: 6px; }
.tw-res:empty { display: none; }
.tw-link { margin: 4px 0 6px; font-size: 13px; }
.tw-link summary { cursor: pointer; color: var(--muted); }
.tw-invites { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 16px; padding: 12px; border: 1px solid rgba(var(--pur-rgb),.5); border-radius: 10px; background: rgba(var(--pur-rgb),.08); }
@media (max-width: 760px) { .qs-box.tw-box { padding: 22px 16px; } .tw-row { flex-wrap: wrap; } .tw-acts { width: 100%; justify-content: flex-start; } }
/* «Генераторы» / «Гача-лист» in a tribe */
.tribe-note { margin: 0 0 14px; padding: 10px 14px; border: 1px solid rgba(var(--pur-rgb),.4); background: rgba(var(--pur-rgb),.08); border-radius: 8px; font-size: 13px; }
.tribe-note[hidden] { display: none; }
/* a tribe MEMBER: the shared lists are kept by the leader and officers — the «add / delete» controls are hidden,
   the action buttons («заправил», «собрал», «уход сделан») stay */
body.tribe-viewer [data-tribe-edit],
body.tribe-viewer #page-gens [data-a="del"], body.tribe-viewer #page-gens [data-a="up"], body.tribe-viewer #page-gens [data-a="down"],
body.tribe-viewer #page-timers [data-a="del"], body.tribe-viewer .ga-del,
body.tribe-viewer #page-gens .srv-tab.add, body.tribe-viewer #page-gacha .srv-tab.add, body.tribe-viewer #srvTabs .x, body.tribe-viewer #gaSrvTabs .x,
body.tribe-viewer #watchList [data-del] { display: none !important; }
/* «Режим сна»: a small link to the phone window, on the right of the page title */
.ph-hint { font-family: var(--font); display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text);
  background: rgba(var(--pur-rgb),.08); border: 1px solid rgba(var(--pur-rgb),.35); white-space: nowrap; }
.ph-hint:hover { background: rgba(var(--pur-rgb),.16); border-color: var(--tek); }
.ph-hint svg { width: 17px; height: 17px; fill: none; stroke: var(--tek-2); stroke-width: 1.6; }
.ph-hint b { color: var(--tek-2); }
.profile[hidden] { display: none; }
.profile-btn { font-family: var(--font); display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2); padding: 5px 12px 5px 5px; font-size: 13px; backdrop-filter: blur(6px);
  border-radius: 8px; }   /* soft corners, like the rest of the app (the avatar sits 5 px in: a round frame around it) */
.profile-btn:hover { border-color: var(--tek); }
.profile-btn img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.profile-btn .caret { color: var(--muted); font-size: 10px; }
.profile-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 260px; background: var(--toast-bg); border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); padding: 10px; display: flex; flex-direction: column; gap: 4px; border-radius: 8px; }
.profile-menu[hidden] { display: none; }
.pm-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pm-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pm-name { font-size: 15px; }
.pm-role { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--tek-2); }
.pm-note { font-size: 12px; padding: 2px 4px 6px; line-height: 1.45; }
.pm-note:empty { display: none; }
.pm-item { font-family: var(--font); text-align: left; background: none; border: none; color: var(--text); padding: 8px; cursor: pointer; font-size: 13px; border-radius: 6px; }
.pm-item:hover { background: rgba(var(--pur-rgb), .12); }
.pm-item[hidden] { display: none; }
.pm-item.danger { color: #ffb0a8; }
/* the admin's own items: a small heading above, the «админ» tag on the right */
.pm-sec { margin: 6px 0 2px; padding: 8px 8px 2px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pm-sec[hidden] { display: none; }
.pm-item.pm-admin { display: flex; align-items: center; gap: 10px; }
.pm-item.pm-admin[hidden] { display: none; }
.pm-item.pm-admin .admin-tag { margin-left: auto; }
.pm-item.pm-admin > span:first-child { white-space: nowrap; }
.profile-menu { min-width: 280px; }
.pm-sep { margin: 6px 0 4px; border-top: 1px solid var(--line); }

.user-badge { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 4px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.user-badge[hidden] { display: none; }
.user-badge img { width: 32px; height: 32px; border-radius: 50%; }
.user-badge > div { flex: 1; min-width: 0; }
.u-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-role { font-size: 11px; color: var(--tek-2); letter-spacing: .1em; text-transform: uppercase; }

/* ── log & toast ── */
.log { display: flex; flex-direction: column; font-size: 13px; max-height: 70vh; overflow-y: auto; }
.log div { padding: 6px 4px; border-bottom: 1px solid rgba(var(--pur-rgb),.06); display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.log div > span:last-child { white-space: pre-line; }
.log .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.warn-text { color: var(--amber) !important; }

/* Snapshots and clicks are the admin's standard set: users see them, can't change them */
body:not(.not-master) .locked-note { display: none; }
body.not-master .admin-edit,
body.not-master #refs [data-act],
body.not-master #steps button { display: none !important; }
body.not-master #refs .meta input, body.not-master #refs .meta select, body.not-master #refs .shot,
body.not-master #steps input, body.not-master #steps select { pointer-events: none; }
body.not-master #refs .meta select, body.not-master #steps select { appearance: none; -webkit-appearance: none; }
#presetBox { margin-top: 18px; }
.as-client-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 8px 16px; background: rgba(13,16,22,.96); border: 1px solid var(--amber); box-shadow: 0 8px 30px rgba(0,0,0,.6); font-size: 13px; color: var(--amber); }
.as-client-bar[hidden] { display: none; }

/* Pages not worked on yet: at the bottom of the menu, with a faint "в разработке" tag */
#nav a svg { flex: none; }
#nav a.wip { opacity: .72; }
#nav a.wip:hover, #nav a.wip.active { opacity: 1; }
.wip-tag { margin-left: auto; flex: none; font-size: 9px; letter-spacing: .12em; line-height: 1; color: var(--muted);
  background: rgba(255,255,255,.07); padding: 3px 6px; border-radius: 2px; opacity: .8; }

/* Role change card */
.role-card { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: min(380px, calc(100vw - 44px)); padding: 18px 20px 16px;
  background: var(--panel, #0d1014); border: 1px solid var(--line-2); box-shadow: 0 12px 40px rgba(0,0,0,.6); animation: rcIn .35s ease-out; }
.role-card[hidden] { display: none; }
.role-card.ok { border-color: var(--tek); box-shadow: 0 12px 40px rgba(0,0,0,.6), 0 0 24px var(--tek-glow); }
.role-card.off { border-color: rgba(255,178,62,.6); }
.role-card .rc-title { font-size: 16px; font-weight: 700; letter-spacing: .06em; margin-bottom: 6px; }
.role-card p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; font-size: 13px; }
.role-card .rc-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
@keyframes rcIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Log checker panel */
.lc-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lc-head .switch.big { margin-bottom: 0; font-weight: 600; letter-spacing: .06em; }
.lc-tg { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 10px; }
.lc-tg .switch { margin-bottom: 0; }
.lc-tg .hint { margin: 0; }
.lc-state { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--line-2); color: var(--muted); }
.lc-state.ok { color: var(--tek); border-color: var(--tek); }
.lc-state.wait { color: var(--amber); border-color: rgba(255,178,62,.5); }
.lc-panel .params-group { border-top: 1px solid var(--line); margin-top: 6px; }

/* Game log page */
.gl-tools { margin-bottom: 10px; }
.gl-tools input { flex: 1 1 320px; max-width: 460px; }
.gl-row { display: grid; grid-template-columns: 150px 100px 105px 1fr; gap: 12px; padding: 7px 4px; border-bottom: 1px solid rgba(var(--pur-rgb),.06); font-size: 13px; }
.gl-real, .gl-day, .gl-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* day / time the recognition missed: a quiet placeholder keeps the columns in line */
.gl-miss { font-style: normal; font-size: 11px; opacity: .55; letter-spacing: .02em; }
.gl-row.danger .gl-text { color: #ff6b5e; }
.gl-row.warn .gl-text { color: var(--amber); }
.gl-list { max-height: calc(100vh - 290px); overflow: auto; }
.gl-date { position: sticky; top: 0; background: var(--panel, #0d1014); padding: 10px 4px 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--tek-2); border-bottom: 1px solid var(--line); z-index: 1; }
#glActions { display: flex; align-items: center; gap: 8px; }
.gl-ask { color: var(--amber); font-size: 12px; }
@media (max-width: 760px) { .gl-row { grid-template-columns: 1fr; gap: 2px; } }

/* Лог-чекер tabs: «Журнал племени» / «Чат игры» */
.gl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.gl-tabs button { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 16px; color: var(--muted);
  font: inherit; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.gl-tabs button:hover { color: var(--text); }
.gl-tabs button.on { color: var(--text); border-bottom-color: var(--tek-2); }
.gl-tab-n { font-weight: 600; font-size: 11px; letter-spacing: 0; padding: 1px 7px; border-radius: 4px; background: rgba(255,255,255,.06); color: var(--muted); }
.gl-tab-n:empty { display: none; }
.gl-tabs button.on .gl-tab-n { color: var(--tek-2); background: rgba(var(--pur-rgb),.12); }
.gl-subhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.gl-subhead p { margin: 0; flex: 1 1 360px; font-size: 13px; line-height: 1.5; }

/* Game chat */
.ch-opts { display: grid; gap: 10px; margin: 6px 0 12px; }
.ch-opts .switch { margin-bottom: 0; }
.ch-opts .hint { margin: -4px 0 0; }
.ch-opts .switch.is-soon { opacity: .55; cursor: default; }
/* SOON sits next to the switch's label, outside it (inside, the switch styles draw it as a knob) */
.ch-soon { display: flex; align-items: center; gap: 8px; }
.ch-soon .switch { flex: 0 1 auto; width: auto; }
.ch-soon .wip-tag { margin-left: 0; }
.ch-peek { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-area-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-ex { position: static; }
/* time | «name (steam) [tribe]: text» on one line, like the game chat */
.ch-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 7px 8px; border-bottom: 1px solid rgba(var(--pur-rgb),.06); font-size: 13px; line-height: 1.45; }
.ch-msg { min-width: 0; overflow-wrap: anywhere; }
.ch-who b { color: #c9e86a; font-weight: 600; }
/* the chat channel: TRIBE / ALLIANCE / LOCAL (global chat has no tag) */
.ch-chan { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .12em; padding: 2px 6px; margin-right: 7px; border-radius: 4px; vertical-align: 1px;
  border: 1px solid var(--line-2); color: var(--muted); }
.ch-chan.ch-tribe { color: #7fd0ff; border-color: rgba(127,208,255,.4); }
.ch-chan.ch-alliance, .ch-chan.ch-ally { color: #ffb23e; border-color: rgba(255,178,62,.4); }
.ch-chan.ch-local { color: #c9b6ff; border-color: rgba(201,182,255,.4); }
.ch-who i { font-style: normal; color: var(--muted); }
.ch-who::after { content: ":"; color: var(--muted); margin-right: 6px; }
.ch-row.me { background: rgba(255,178,62,.07); box-shadow: inset 2px 0 0 var(--amber); }
/* the latest message (top row): a soft translucent grey band, exactly the row */
/* even on all four sides: its own thin frame instead of the row's bottom line, a little air above and below */
.ch-row.latest { background: rgba(255,255,255,.05); border-bottom-color: transparent; border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); margin: 3px 0; }
.ch-row.latest.me { background: rgba(255,178,62,.12); }
/* «LAST» on the right of the latest message, in the style of the menu's SOON badge */
/* text centred in the frame: no bottom line, and 2 px more above (the letters' descender room sits below) */
.ch-row.latest { grid-template-columns: 64px 1fr auto; border-bottom-width: 0; padding: 8px 8px 6px; }
.ch-last { align-self: center; transform: translateY(-1px); text-transform: uppercase; white-space: nowrap; font-size: 9px; font-weight: 600; letter-spacing: .14em; line-height: 1; padding: 4px 7px;
  border: 1px solid var(--line-2); border-radius: 3px; color: var(--muted); background: rgba(255,255,255,.04); }
.ch-mark { display: flex; align-items: center; gap: 12px; padding: 12px 4px 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--tek-2); }
.ch-mark::before, .ch-mark::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.ch-mark.earlier { color: var(--muted); }
/* a mark right after a mark: no double gap between the lines */
.ch-mark + .ch-mark, .ch-mark + .ch-day, .ch-quiet + .ch-day { padding-top: 4px; }
.ch-mark + .ch-day.first, .ch-quiet + .ch-day.first { padding-top: 10px; }   /* «Раньше» is a new part, not the sleep line's second row */
/* a quiet night: one calm line instead of two empty sleep marks */
.ch-quiet { margin: 6px 0 4px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 6px; font-size: 13px; color: var(--muted); text-align: center; }
/* «Раньше»: a small day heading where the day changes, the rows keep only the time */
/* the day heading: in the middle between two thin lines, apart from the time column (the user, 14.11.2026) */
.ch-day { display: flex; align-items: center; gap: 12px; padding: 14px 4px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ch-day::before, .ch-day::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
@media (max-width: 760px) { .ch-row, .ch-row.latest { grid-template-columns: 1fr; gap: 2px; } .ch-last { display: none; } }
.gl-list.ch-list { padding-top: 2px; }
.log .event { color: var(--tek-2); } .log .warn { color: var(--amber); } .log .step { color: var(--muted); }
.howto { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; color: var(--muted); }
.howto b { color: var(--text); }
#toast { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 9; }
#toast div { background: var(--toast-bg); border: 1px solid var(--tek); padding: 10px 16px; box-shadow: 0 0 20px var(--tek-glow); animation: fade .2s; }

/* ═════════ PHONE / NARROW WINDOW (≤ 760 px) — every page in one column, nothing wider than the screen ═════════
   (the user, 14.11.2026: «делай сразу дизайн адаптивный под разные разрешения, в том числе и телефон») */
@media (max-width: 760px) {
  main { padding: 64px 14px 48px; }                         /* the profile button sits above the title, not on it */
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head > * { min-width: 0; max-width: 100%; }
  .panel-head { flex-wrap: wrap; gap: 8px; }
  /* forms: one field per line */
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid > * { min-width: 0; }
  input, select, textarea { max-width: 100%; min-width: 0; }
  /* segmented switches wrap instead of running off the screen */
  .seg { flex-wrap: wrap; }
  .seg button { flex: 1 1 auto; }
  /* two-column layouts → one column that can shrink */
  .grid2, .map-wrap, .refs, .craft-wrap, .dr-wrap, .home-two { grid-template-columns: minmax(0, 1fr) !important; }
  .grid2 > *, .map-wrap > *, .refs > *, .home-two > * { min-width: 0; }
  /* wide tables scroll inside their own box */
  table.tbl { display: block; max-width: 100%; overflow-x: auto; }
  /* «Серверы»: name and players on top, the chart and switches on their own line */
  .srv { grid-template-columns: 26px 14px minmax(0, 1fr) auto !important; row-gap: 6px; }
  .srv > :nth-child(n+5) { grid-column: 3 / -1; }
  .srv > svg { width: 100%; }
  /* showcase cards with SOON */
  .sc-body { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .sc-body > * { min-width: 0; }
  .ht-name { flex-wrap: wrap; }
  /* «Карта»: the title, the map picker and the copies go under each other */
  .map-title { flex-wrap: wrap; max-width: 100%; }
  /* lists that are grids of fixed-width cards */
  .timer-list, .raid-wrap { grid-template-columns: minmax(0, 1fr) !important; }
  .raid-wrap > * { min-width: 0; }
  .raid-plans { flex-wrap: wrap; }
  /* «Режим сна» → the admin's steps: number + what on the first line, the rest under it */
  .step { grid-template-columns: 26px minmax(0, 1fr) !important; row-gap: 6px; }
  .step > :nth-child(n+3) { grid-column: 2 / -1; }
  .row { flex-wrap: wrap; }
}

/* «Приручение» → «Что ест»: the diet group, the foods as chips, the favourite food and kibble */
.diet { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.diet-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; }
.diet-head b { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.diet-type { font-size: 13px; color: var(--text); }
.diet-foods { display: flex; flex-wrap: wrap; gap: 6px; }
.diet-food { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 9px 4px 6px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,.03); }
.diet-food .food-ic { display: inline-flex; width: 18px; height: 18px; }
.diet-food .food-ic img, .diet-food .food-ic svg { width: 18px; height: 18px; }
.diet-line { margin-top: 10px; font-size: 13px; color: var(--muted); }
.diet-line b { color: var(--text); font-weight: 600; }
.diet-note { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* the game's icons (web/img): in the quick search, the food chips and the taming table */
.qs-ic img { width: 26px; height: 26px; object-fit: contain; }
.food-ic img { width: 20px; height: 20px; object-fit: contain; vertical-align: -5px; }
.diet-food .food-ic img { width: 20px; height: 20px; }
/* «Приручение»: the creature's icon above the result */
.tm-head:empty { display: none; }
.tm-head { margin: 16px 0 0; line-height: 0; }   /* the same 16 px: rate tabs → icon → «Приручение через…» */
.tm-head + #tmInfo { margin-top: 16px; }
.tm-head img { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); padding: 4px; }
/* the dino picker: a button with the icon, a pop-up list with search */
.dp-native { display: none !important; }
.dp { position: relative; }
.dp-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font-family: var(--font); font-size: 14px; color: var(--text);
  padding: 6px 12px; min-height: 42px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(0,0,0,.35); cursor: pointer; }
.dp-btn:hover { border-color: rgba(var(--pur-rgb), .6); }
.dp-btn i { margin-left: auto; font-style: normal; color: var(--muted); }
.dp-ic img, .dp-it img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.dp-ic { display: inline-flex; }
.dp-dot { display: inline-block; width: 28px; height: 28px; flex: none; border-radius: 6px; background: rgba(255,255,255,.06); }
.dp-pop { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: #12151b; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6); padding: 8px; }
.dp-pop[hidden] { display: none; }
.dp-q { width: 100%; box-sizing: border-box; margin-bottom: 6px; }
.dp-list { max-height: min(52vh, 420px); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.dp-it { display: flex; align-items: center; gap: 10px; text-align: left; font-family: var(--font); font-size: 13px; color: var(--text); padding: 5px 8px;
  border: 0; border-left: 3px solid transparent; border-radius: 6px; background: none; cursor: pointer; }
.dp-it:hover { background: rgba(255,255,255,.05); }
.dp-it.on { background: rgba(var(--pur-rgb), .16); border-left-color: rgba(var(--pur-rgb), .9); }
.dp-it.cur { background: rgba(var(--pur-rgb), .16); border-left-color: rgba(var(--pur-rgb), .9); }   /* variant A: the chosen dino — fill + stripe */
.dp-it.cur span { color: #fff; font-weight: 600; }
.dp-it.on:not(.cur) { background: rgba(255,255,255,.06); border-left-color: rgba(255,255,255,.25); }   /* the keyboard cursor: quieter */
.dp-it em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.dp-none { padding: 10px; color: var(--muted); font-size: 13px; }
/* the game's creature icons are black silhouettes: drawn light on the dark theme */
.dp-ic img, .dp-it img, .tm-head img, .qs-it.k-dino .qs-ic img, .qs-ic.k-dino img { filter: invert(.92) sepia(.15) hue-rotate(220deg) brightness(1.05); }
/* «Версии» → admin: publish to Discord */
.home-event .he-mine { margin-top: 4px; font-size: 12px; opacity: .9; }
.home-event .he-mine b { color: #ffd06a; }
/* Settings → Discord alerts */
.dc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.dc-row input { flex: 1 1 280px; min-width: 0; }
.dc-kinds { margin-bottom: 0; transition: opacity .15s; }
.dc-kinds.off { opacity: .45; }
.dc-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dc-main .switch { flex: 1 1 260px; }
/* Settings: Telegram and Discord stacked in the left column, which ends on the same line as «Игра» on the right */
.set-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-col > .panel { margin: 0; }
.set-col > .panel:last-child { flex: 1; }
/* «Активность» → «Главное»: a summary line, day headings, an icon per kind, repeats as ×N */
.log-sum { margin-bottom: 12px; padding: 12px 16px; font-size: 13px; }
.log-sum .bad b { color: #ffb23e; }
.log .log-day { display: flex; align-items: center; gap: 12px; padding: 14px 4px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 0; margin-bottom: 2px; white-space: nowrap; }
.log .log-day::before, .log .log-day::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.log-day:first-child { padding-top: 2px; }
.log .log-row { display: grid; grid-template-columns: 52px 24px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 5px 4px; font-size: 13px; }
.log .log-row.dim { opacity: .55; }
.log .log-row.bad span:last-child { color: #ffcf9a; }
.log .log-row.ok span:last-child { color: #a8f0c4; }
.log-ic { text-align: center; }
.log-n { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 4px; }
/* Bahnschrift capitals have no descenders, so uppercase labels sat high in their buttons (the user, 14.11.2026):
   one pixel more on top, one less below — the letters are centred by eye */
.btn { padding: 10px 16px 8px; }
.btn.small { padding: 7px 12px 5px; }
.btn.ghost { padding: 5px 8px 3px; }
.seg button { padding-top: 9px; padding-bottom: 7px; }
.dr-chip, .ga-chip, .srv-tab { padding-top: 6px; padding-bottom: 4px; }
.tw-send { position: relative; }
.tw-emo-btn { background: rgba(255,255,255,.05); border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 8px; width: 38px; flex: none; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.tw-emo-btn.on, .tw-emo-btn:hover { background: rgba(255,255,255,.12); }
.tw-emo { position: absolute; left: 0; bottom: calc(100% + 6px); display: grid; grid-template-columns: repeat(10, 34px); gap: 2px; padding: 6px; background: var(--panel, #11161d); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); z-index: 5; }
.tw-emo button { background: none; border: 0; border-radius: 6px; font-size: 20px; height: 34px; cursor: pointer; padding: 0; }
.tw-emo button:hover { background: rgba(255,255,255,.1); }
@media (max-width: 520px) { .tw-emo { grid-template-columns: repeat(5, 40px); } .tw-emo button { height: 40px; } }
.tw-msgrow { position: relative; }
.tw-del { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.35); border: 0; border-radius: 6px; color: var(--muted); font-size: 11px; width: 22px; height: 22px; cursor: pointer; opacity: 0; padding: 0; }
.tw-msgrow:hover .tw-del, .tw-del:focus { opacity: 1; }
.tw-del:hover { color: #ff8080; }
@media (hover: none) { .tw-del { opacity: .6; } }

/* ── building templates (templates.js) ── */
.tp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tp-bar input[type=search] { flex: 1 1 260px; min-width: 0; }
.tp-btns { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.tp-btns .btn { width: auto; flex: 0 0 auto; }
.tp-body > .tp-btns:last-child { margin-top: auto; padding-top: 4px; }
.tp-add { cursor: pointer; }
.tp-how { margin: 4px 2px 14px; max-width: 900px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.tp-card { margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tp-photo { aspect-ratio: 16 / 9; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tp-photo { position: relative; overflow: hidden; }
.tp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-photo.none span { color: var(--muted); font-size: 12px; border: 1px dashed var(--line-2); padding: 6px 12px; }
.tp-photo.none:hover span { color: var(--text); }
.tp-body { flex: 1; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tp-body h3 { margin: 0; font-size: 15px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-meta, .tp-types { font-size: 12px; color: var(--muted); }
.tp-types { line-height: 1.45; }
.tp-desc, .tp-note { margin: 0; font-size: 13px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.tp-desc { color: var(--muted); }
.tp-warn { font-size: 12px; color: var(--amber); }
.tp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-tag { font-size: 11px; padding: 2px 8px; border: 1px solid var(--line-2); color: var(--text); }
.tp-form { display: flex; flex-direction: column; gap: 10px; }
.tp-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.tp-form input, .tp-form textarea { width: 100%; }
.tp-form .hint { margin: 0; }
.tp-drop { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(var(--shade-rgb), .8); border: 2px dashed var(--line-2); pointer-events: none; }
.tp-drop.on { display: flex; }
.tp-drop span { font-size: 18px; color: var(--text); }
@media (max-width: 620px) { .tp-grid { grid-template-columns: 1fr; } }
.tp-filters { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; }
.tp-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); letter-spacing: .05em; flex: 1 1 160px; min-width: 0; }
.tp-filters label[hidden] { display: none; }
.tp-filters select { width: 100%; }
.tp-tagbar { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tp-tagbar:empty { display: none; }
.tp-tagbar-l { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
button.tp-tag { background: none; font-family: var(--font); cursor: pointer; }
button.tp-tag:hover { border-color: var(--tek); }
button.tp-tag.on { background: rgba(var(--acc-rgb), .18); border-color: var(--tek); }

/* one height for every card (the user, 16.11.2026): a short text of 2 lines, the rest under «Подробнее» */
.tp-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-short { margin: 0; font-size: 12px; line-height: 1.5; height: 3em; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; white-space: pre-line; }
.tp-tags.one { flex-wrap: nowrap; overflow: hidden; height: 20px; }
.tp-full { display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.5; }
.tp-full .tp-desc, .tp-full .tp-note { font-size: 12px; }.tp-body > .tp-btns { flex-wrap: nowrap; gap: 4px; }
.tp-body > .tp-btns .btn { padding: 6px 9px; white-space: nowrap; }

/* «Подробнее» and «Добавить по коду» windows */
.tp-ov { position: fixed; inset: 0; z-index: 60; background: rgba(var(--shade-rgb), .78); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.tp-dlg { position: relative; width: min(980px, 100%); margin: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--panel-2); }
.tp-dlg.small { width: min(640px, 100%); }
.tp-dlg h2 { margin: 0; font-size: 20px; letter-spacing: .03em; overflow-wrap: anywhere; padding-right: 30px; }
.tp-dlg h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tp-dlg section { min-width: 0; }
.tp-dlg textarea { width: 100%; font-family: Consolas, monospace; font-size: 12px; }
.tp-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.tp-x:hover { color: var(--text); }
.tp-dhead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tp-photo.big { border: 1px solid var(--line); }
.tp-dinfo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-stats { display: flex; gap: 10px; }
.tp-stats div { flex: 1; border: 1px solid var(--line); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.tp-stats b { font-size: 20px; color: var(--tek); }
.tp-stats span { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.tp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tp-rows { display: flex; flex-direction: column; border: 1px solid var(--line); }
.tp-rows div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; }
.tp-rows div + div { border-top: 1px solid var(--line); }
.tp-rows b { color: var(--tek); font-weight: 600; white-space: nowrap; }
.tp-dlg .hint { margin: 8px 0 0; }
@media (max-width: 700px) { .tp-dhead, .tp-cols { grid-template-columns: 1fr; } .tp-ov { padding: 12px 8px; } .tp-dlg { padding: 14px; } }

/* gallery and category (16.11.2026) */
.tp-dhead.solo { grid-template-columns: 1fr; }
.tp-gal { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tp-arr { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 1px solid var(--line-2); background: rgba(var(--shade-rgb), .65); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.tp-arr.l { left: 8px; } .tp-arr.r { right: 8px; }
.tp-arr:hover { border-color: var(--tek); }
.tp-cnt { position: absolute; left: 8px; bottom: 8px; font-size: 12px; padding: 2px 8px; background: rgba(var(--shade-rgb), .7); }
.tp-thumbs { display: flex; gap: 6px; overflow-x: auto; }
.tp-thumbs img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); opacity: .65; cursor: pointer; flex: none; }
.tp-thumbs img.on, .tp-thumbs img:hover { opacity: 1; border-color: var(--tek); }
.tp-cat { align-self: flex-start; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border: 1px solid var(--tek); color: var(--tek); }
.tp-flab { font-size: 12px; color: var(--muted); }
.tp-pedit { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-pedit > div { position: relative; width: 120px; }
.tp-pedit img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border: 1px solid var(--line); }
.tp-pedit .main img { border-color: var(--tek); }
.tp-pedit button { position: absolute; top: 4px; width: 24px; height: 24px; border: 0; background: rgba(var(--shade-rgb), .75); color: var(--text); cursor: pointer; font-size: 14px; line-height: 1; }
.tp-pedit button[data-a="delph"] { right: 4px; }
.tp-pedit button[data-a="mainph"] { left: 4px; }
.tp-pedit button:hover { color: var(--tek); }
.tp-pedit i { position: absolute; left: 4px; top: 4px; font-style: normal; font-size: 10px; padding: 2px 6px; background: rgba(var(--shade-rgb), .75); color: var(--tek); }
.tp-form select { width: 100%; }
.tp-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tp-title h3 { min-width: 0; flex: 1; }
.tp-title .tp-cat { flex: none; padding: 2px 8px; font-size: 10px; }
.tp-title { cursor: pointer; }
.tp-title:hover h3 { color: var(--tek); }

/* the raid siren's loudness (17.11.2026): a slider, the number and «Проверить звук» in one row */
.raid-vol { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.raid-vol[hidden] { display: none; }
.raid-vol label { font-size: 13px; color: var(--muted, #9aa3ad); }
.raid-vol input[type=range] { flex: 1 1 160px; max-width: 260px; accent-color: var(--tek, #4fd1ff); }
.raid-vol-n { min-width: 44px; font-variant-numeric: tabular-nums; }

/* generator name (17.11.2026): plain text that wraps (the whole name in sight) + a pencil; the field only while renaming */
.gen-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.gen-name .name-t { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.gen .gen-name .name-t { font-size: 16px; font-weight: 600; }
.gen-name.on .name-t { display: none; }
.gen-name input.name { flex: 1; min-width: 0; }
.gen-name input.name[hidden] { display: none; }
.gen-name .pen { flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--muted); }
.gen-name .pen:hover { color: var(--text); border-color: var(--line); }
.gen-name .pen svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gen-name.on .pen { display: none; }
.gen-tbl .gen-name .name-t { padding: 5px 0; }

/* ═════════ BREEDING: «Как это работает», species tabs, the example herd (27.11.2026) ═════════ */
html.web .br-pc { display: none !important; }
html:not(.web) .br-web { display: none !important; }
.br-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.br-step { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.br-art { display: block; width: 100%; height: 124px; padding: 10px 0; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.22); }
.br-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.br-txt b { font-size: 14px; color: var(--text); }
.br-txt span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.br-path { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.br-path code { min-width: 0; overflow-wrap: anywhere; font-size: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,.3); border: 1px solid var(--line); color: var(--tek-2); }
/* with dinos of your own only the folder line stays */
.br-how.mini > .panel-head, .br-how.mini .br-steps { display: none; }
.br-how.mini .br-path { margin-top: 0; }
/* the pictures */
.br-art text { font-family: var(--font); text-anchor: middle; }
.br-ring { fill: none; stroke: var(--line-2); stroke-width: 2; }
.br-ring.in { fill: rgba(var(--pur-rgb), .1); }
.br-seg-on { fill: rgba(86, 214, 255, .28); stroke: var(--tek); stroke-width: 1.5; }
.br-ln { stroke: var(--line-2); stroke-width: 1.5; fill: none; }
.br-pill { fill: var(--tek); } .br-pill-t { fill: #021018; font-size: 11px; font-weight: 700; }
.br-key { fill: rgba(0,0,0,.3); stroke: var(--tek-2); stroke-width: 1.5; } .br-key-t { fill: var(--tek-2); font-size: 13px; font-weight: 700; }
.br-file { fill: rgba(255,255,255,.06); stroke: var(--tek-2); stroke-width: 2; stroke-linejoin: round; }
.br-file-c { fill: none; stroke: var(--tek-2); stroke-width: 2; stroke-linejoin: round; }
.br-file-t { fill: var(--tek-2); font-size: 13px; font-weight: 700; }
.br-arrow { fill: none; stroke: var(--tek); stroke-width: 2.5; stroke-dasharray: 5 4; stroke-linecap: round; }
.br-arrow-h { fill: none; stroke: var(--tek); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.br-ob { fill: #b478ff; } .br-ob-c { fill: #e1c8ff; }
.br-dino { filter: invert(.92) sepia(.15) hue-rotate(220deg) brightness(1.05); }
.br-m { fill: rgba(127,196,255,.16); stroke: #7fc4ff; stroke-width: 2; }
.br-f { fill: rgba(255,143,199,.16); stroke: #ff8fc7; stroke-width: 2; }
.br-sx { fill: var(--text); font-size: 17px; font-weight: 700; }
.br-x { fill: var(--muted); font-size: 22px; }
.br-baby { fill: rgba(255,255,255,.05); stroke: var(--line-2); stroke-width: 1.5; }
.br-bar.m { fill: #7fc4ff; } .br-bar.f { fill: #ff8fc7; }
/* species tabs: the game's icon + the real name + how many */
.br-species { display: flex; gap: 8px; flex-wrap: wrap; flex-basis: 100%; }
.br-sp { font-family: var(--font); display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--muted); font-size: 14px; line-height: 20px; }
.br-sp:hover { color: var(--text); border-color: var(--line-2); }
.br-sp.on { color: #021018; background: var(--tek); border-color: var(--tek); font-weight: 600; }
.br-sp img { flex: none; width: 24px; height: 24px; filter: invert(.92) sepia(.15) hue-rotate(220deg) brightness(1.05); }
.br-sp.on img { filter: none; }
.br-sp .cnt { font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 6px; background: rgba(var(--pur-rgb), .14); color: var(--tek-2); }
.br-sp.on .cnt { background: rgba(0,0,0,.2); color: #021018; }
/* «ПРИМЕР» over the made-up herd */
.br-demo { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; font-size: 13px; line-height: 20px; color: var(--text); }
.br-demo > span:last-child { flex: 1; min-width: 0; }
.br-demo .br-tag { line-height: 12px; }
.br-demo[hidden] { display: none; }
.br-tag { flex: none; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: rgba(255,208,106,.14); border: 1px solid rgba(255,208,106,.5); color: #ffd06a; font-weight: 700; }
/* files dragged over the page (the website) */
#page-breed.br-drop { outline: 2px dashed var(--tek); outline-offset: -6px; }
@media (max-width: 900px) {
  .br-steps { grid-template-columns: minmax(0, 1fr); }
  .br-step { flex-direction: row; align-items: center; gap: 12px; }
  .br-art { flex: none; width: 150px; height: 96px; }
}
@media (max-width: 480px) {
  .br-step { flex-direction: column; align-items: stretch; }
  .br-art { width: 100%; height: 110px; }
}
/* ═════════ «Как это работает» on Дроп-лист and Крафт (28.11.2026, the same steps as Разведение) ═════════ */
.br-art .cr-t { fill: var(--text); font-size: 11px; font-weight: 600; text-anchor: start; }
.br-art .cr-t.s { font-size: 10px; }
.br-art .cr-t.c, .br-art .cr-t.add { text-anchor: middle; }
.br-art .cr-t.add { fill: #021018; font-size: 14px; font-weight: 700; }
.br-art .cr-t.dim { fill: var(--muted); }
.br-art .cr-t.ok { fill: #5cf29a; font-weight: 700; }
.br-art .cr-t.strike { text-decoration: line-through; }
.cr-box { fill: rgba(0,0,0,.3); stroke: var(--tek-2); stroke-width: 1.5; }
.cr-lens { fill: none; stroke: var(--tek-2); stroke-width: 2; stroke-linecap: round; }
.cr-row { fill: rgba(255,255,255,.04); stroke: var(--line-2); stroke-width: 1; }
.cr-row.on { fill: rgba(86,214,255,.12); stroke: var(--tek); }
.cr-bar { fill: var(--text); opacity: .55; } .cr-bar.dim { opacity: .25; }
.cr-beam { fill: rgba(255,90,95,.22); } .cr-crate { fill: rgba(255,90,95,.18); stroke: #ff5a5f; stroke-width: 2; } .cr-crate-l { fill: none; stroke: #ff5a5f; stroke-width: 1.5; }
.cr-stripe.r { fill: #ff5a5f; } .cr-stripe.y { fill: #ffd54a; } .cr-stripe.b { fill: #56a8ff; }
.cr-item { fill: rgba(var(--pur-rgb), .16); stroke: #b478ff; stroke-width: 2; }
.cr-saddle { fill: none; stroke: #e1c8ff; stroke-width: 2.5; stroke-linecap: round; }
.cr-ing { fill: rgba(255,255,255,.05); stroke: var(--tek-2); stroke-width: 1.2; }
.cr-raw { fill: rgba(92,242,154,.12); stroke: #5cf29a; stroke-width: 1.2; }
.cr-num { fill: rgba(0,0,0,.35); stroke: var(--line-2); stroke-width: 1; }
.cr-add { fill: var(--tek); }
/* Дроп-лист: the steps over the example answer */
.dr-how { margin-bottom: 16px; }
.dr-demo { padding-top: 14px; border-top: 1px solid var(--line); }
/* Крафт: the right block while the list is empty — steps one under another (picture left, text right) */
.cr-h-how { display: none; }
#page-craft.cr-empty .cr-h-full { display: none; }
#page-craft.cr-empty .cr-h-how { display: flex; }
.cr-how { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 481px) {
  .cr-how .br-step { flex-direction: row; align-items: center; gap: 14px; }
  .cr-how .br-art { flex: none; width: 170px; height: 100px; }
}
.cr-demo { margin: 16px 0 10px; }
/* the herd row's buttons: «Убрать» / «Вернуть» (+ «Удалить» on the website) */
.br-act { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: nowrap; }
.br-act .btn { white-space: nowrap; }
.br-del:hover { color: var(--red); border-color: var(--red); }/* «Лучшие пары» in two columns (the user, 27.11.2026: the left block was twice as tall as «Идеальный потомок», empty space
   on the right): 8 pairs = 4 rows, both blocks end on one line */
#pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#pairs .pair { margin-bottom: 0; }
#pairs .empty { grid-column: 1 / -1; }
/* a narrower page: the two blocks one under the other, the pairs still in two columns */
@media (max-width: 1300px) { .br-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { #pairs { grid-template-columns: minmax(0, 1fr); } }/* the pairs fill their block down to the same line as «Идеальный потомок» */
.br-grid > .panel { display: flex; flex-direction: column; }
#pairs { flex: 1; grid-auto-rows: 1fr; }
#pairs .pair { align-content: center; }/* «Лог-чекер»: the panels inside its tabs keep the page's 18 px between them (27.11.2026: they touched, 0 px) */
#glPaneTribe:not([hidden]), #glPaneChat:not([hidden]) { display: flex; flex-direction: column; gap: 18px; }