/* C4 — the panel, the bots' cabinet and their logins (v56: cyberpunk).
   Deliberately dark-only: it is the app's own world — navy ground, cyan
   signal, magenta alarm — painted explicitly so it holds on any browser
   theme. One system for every page; the cabinet swaps its accent. */
:root {
  --base: #05070d;
  --top: #0a0f1e;
  --panel: rgba(12, 18, 34, 0.66);
  --panel-solid: #0c1222;
  --panel-hi: rgba(20, 30, 54, 0.78);
  --grid: rgba(20, 30, 54, 0.72);
  --line: rgba(60, 90, 140, 0.38);
  --line-solid: #223252;
  --text: #dde9f5;
  --muted: #7586a0;
  --cyan: #1fe0ff;
  --cyan-hi: #9bf3ff;
  --cyan-deep: #0a8fb5;
  --on-cyan: #04141c;
  --magenta: #ff3d8b;
  --ok: #3ddc97;
  --warn: #ffb547;
  --bad: #ff3d8b;
  --accent: var(--cyan);
  --accent-hi: var(--cyan-hi);
  --second: var(--magenta);
  --accent-rgb: 31,224,255;
  --second-rgb: 255,61,139;
  --radius: 12px;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
/* The bots' cabinet: the same world, magenta first. */
body.theme-cabinet, body.portal {
  --accent: #ff3d8b;
  --accent-hi: #ffb3d1;
  --second: #1fe0ff;
  --accent-rgb: 255,61,139;
  --second-rgb: 31,224,255;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* v73: the hidden attribute always wins. A class that sets display (.btn's
   inline-block, blockified in a flex row) outweighs the browser's own
   [hidden] rule: the key dialog showed «Удалить ключ» with no key to delete. */
[hidden] { display: none !important; }
body {
  background: var(--base);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  min-height: 100vh;
}
/* Scanlines and a vignette over everything — faint, and never in the way. */
body::before, body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
}
body::before {
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.022) 0 1px, transparent 1px 3px);
}
body::after {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
/* :where() keeps this at the weight of a bare element selector — an id
   inside :not() would otherwise outweigh every class below (the boot overlay,
   the menu) and pull them out of their fixed layers. */
body > :where(:not(#bg, .boot, .drawer, .scrim, dialog)) { position: relative; z-index: 2; }
body > .drawer, body > .scrim { position: fixed; }
body > dialog { position: fixed; }

a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ── the logins ─────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: min(420px, 100%);
  position: relative;
  display: grid; gap: 16px;
  padding: 34px 30px 26px;
  background: linear-gradient(160deg, rgba(14, 22, 42, 0.78), rgba(6, 8, 16, 0.82));
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(var(--second-rgb), 0.06), 0 30px 80px rgba(0,0,0,0.6), 0 0 70px rgba(var(--accent-rgb), 0.10);
  animation: card-in .7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--accent); opacity: .85; }
.corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }

.auth-mark { display: grid; place-items: center; }
.mark-svg { width: 92px; height: auto; overflow: visible; filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), .45)); }
.g-base path:first-child { fill: var(--accent); }
.g-base path:last-child { fill: var(--second); }
.glitch path { fill: currentColor; }
.g-accent { color: rgba(var(--accent-rgb), .7); animation: glitch-a 4.2s infinite steps(1); }
.g-second { color: rgba(var(--second-rgb), .7); animation: glitch-b 4.2s infinite steps(1); }
@keyframes glitch-a {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0; }
  89% { transform: translate(-4px, 1px); opacity: 1; }
  91% { transform: translate(3px, -2px); opacity: 1; }
  93% { transform: translate(-2px, 0); opacity: 1; }
  95% { transform: translate(0, 0); opacity: 0; }
}
@keyframes glitch-b {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0; }
  89% { transform: translate(4px, -1px); opacity: 1; }
  91% { transform: translate(-3px, 2px); opacity: 1; }
  93% { transform: translate(2px, 1px); opacity: 1; }
  95% { transform: translate(0, 0); opacity: 0; }
}
.auth-title {
  margin: 0; text-align: center; font: 700 30px/1.1 var(--mono); letter-spacing: .14em;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), .45);
}
.auth-title span { color: var(--accent); text-transform: uppercase; letter-spacing: .3em; font-size: 15px; display: block; margin-top: 8px; text-shadow: 0 0 12px rgba(var(--accent-rgb), .7); }
.auth-sub { margin: -6px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

.term {
  font: 12px/1.7 var(--mono); color: rgba(var(--accent-rgb), .78);
  background: rgba(3, 5, 10, .55); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.term-line {
  white-space: nowrap; overflow: hidden; width: 0;
  animation: type .9s steps(var(--chars, 30)) var(--delay, 0s) forwards;
}
.term-line { max-width: 100%; }
@keyframes type { to { width: calc(var(--chars, 30) * 1ch); } }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.btn-neon {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(var(--accent-rgb), .8);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .22), rgba(var(--second-rgb), .18));
  color: var(--text); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 14px;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), .25), inset 0 0 18px rgba(var(--accent-rgb), .12);
  overflow: hidden; transition: box-shadow .2s, transform .1s;
}
.btn-neon::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg); animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-neon:hover { box-shadow: 0 0 34px rgba(var(--accent-rgb), .45), inset 0 0 22px rgba(var(--accent-rgb), .2); }
.btn-neon:active { transform: translateY(1px); }
.btn-neon[disabled] { opacity: .6; cursor: progress; }
.btn-neon .arrow { transition: transform .2s; }
.btn-neon:hover .arrow { transform: translateX(4px); }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font: 11px/1 var(--mono); letter-spacing: .08em; }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.auth-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-card.granted { border-color: var(--ok); box-shadow: 0 0 60px rgba(61, 220, 151, .35); transition: all .3s; }

/* ── top bar ─────────────────────────────────────────────────────────── */
.bar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: rgba(5, 7, 13, 0.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 5;
}
.bar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .7), rgba(var(--second-rgb), .6), transparent);
}
.mark { display: flex; align-items: center; gap: 10px; font: 700 16px/1 var(--mono); letter-spacing: .1em; }
.mark .logo { width: 30px; height: auto; filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .55)); }
.mark .logo path:first-child { fill: var(--accent); }
.mark .logo path:last-child { fill: var(--second); }
.mark .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.mark small { font: 600 11px/1 var(--mono); letter-spacing: .2em; color: var(--accent-hi); text-transform: uppercase; }
.bar .spacer { flex: 1; }
.bar .who { color: var(--muted); font: 12px/1 var(--mono); }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; text-decoration: none; color: var(--text); line-height: 1.4;
  border: 1px solid var(--line); background: var(--panel-hi);
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.btn:hover { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 14px rgba(var(--accent-rgb), .18); }
.btn.primary {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .9), rgba(var(--accent-rgb), .75));
  color: var(--on-cyan); border-color: var(--accent); font-weight: 700;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .3);
}
body.portal .btn.primary { color: #1a0410; }
.btn.primary:hover { box-shadow: 0 0 26px rgba(var(--accent-rgb), .5); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: rgba(255, 61, 139, .7); box-shadow: 0 0 14px rgba(255, 61, 139, .2); }
.btn[disabled] { opacity: .5; cursor: default; box-shadow: none; }
/* v73: a finger's worth — on a phone or any touch screen a small control is
   36 px tall at least (28 px under a mouse). Padding, not min-height alone:
   the word stays in the middle. The settings' «подробнее» and the bots' list
   of nicks: beside their own rules further down, which would undo them here. */
@media (max-width: 640px), (pointer: coarse) {
  .btn.small { padding-top: 8px; padding-bottom: 8px; min-height: 36px; }
  select.mini, .inline-field select { min-height: 36px; }
  .linkbtn { min-height: 36px; }
}

/* ── menu ────────────────────────────────────────────────────────────── */
.burger {
  width: 40px; height: 40px; display: grid; place-content: center; gap: 5px;
  background: rgba(var(--accent-rgb), .06); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--accent-hi); transition: transform .2s, opacity .2s; }
.burger:hover { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 14px rgba(var(--accent-rgb), .25); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.scrim { inset: 0; background: rgba(2, 3, 8, .62); z-index: 9; backdrop-filter: blur(2px); }
.drawer {
  top: 0; bottom: 0; left: 0; width: min(300px, 84vw); z-index: 10;
  background: linear-gradient(180deg, rgba(10, 15, 30, .94), rgba(5, 7, 13, .96));
  border-right: 1px solid rgba(var(--accent-rgb), .25);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: 18px 0 60px rgba(0, 0, 0, .55);
  animation: drawer-in .2s ease-out;
}
@keyframes drawer-in { from { transform: translateX(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer[hidden], .scrim[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; font: 700 15px/1 var(--mono); letter-spacing: .1em; padding: 6px 12px 18px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.drawer-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.drawer-head small { font-weight: 500; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; font-size: 11px; }
.drawer a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 15px; border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.drawer a .ico { width: 20px; text-align: center; color: var(--muted); }
.drawer a:hover { background: rgba(var(--accent-rgb), .07); }
.drawer a[aria-current="page"] { background: rgba(var(--accent-rgb), .1); border-color: rgba(var(--accent-rgb), .35); color: var(--accent-hi); }
.drawer a[aria-current="page"]::before {
  content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.drawer a[aria-current="page"] .ico { color: var(--accent); }
body.menu-open { overflow: hidden; }

/* ── layout ──────────────────────────────────────────────────────────── */
main { max-width: 1320px; margin: 0 auto; padding: 26px 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
main > section { min-width: 0; }
section > header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
h2 {
  margin: 0; font: 700 12px/1.2 var(--mono); letter-spacing: .24em;
  text-transform: uppercase; color: var(--accent-hi); display: flex; align-items: center; gap: 10px;
}
section > header h2::before {
  content: ''; width: 18px; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
section > header .count { color: var(--muted); font: 12px/1 var(--mono); }
section > header .btn { margin-left: auto; }
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; min-width: 0; animation: page-in .35s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page[hidden] { display: none; }
.page:focus { outline: none; }
.page > section { min-width: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 30px; align-items: start; }
.dash-grid > section { min-width: 0; }

/* Glass, shared by every panel-like surface. */
.stat, .card, .table-wrap, .prob, .group, .soon, .events .ev, .allclear {
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ── summary strip ───────────────────────────────────────────────────── */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
#strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(16, 24, 44, .72), rgba(8, 11, 22, .72));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.stat::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .6), transparent);
}
.stat::after {
  content: ''; position: absolute; right: 10px; top: 10px; width: 8px; height: 8px;
  border-top: 1px solid rgba(var(--accent-rgb), .5); border-right: 1px solid rgba(var(--accent-rgb), .5);
}
.stat:hover { border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 0 24px rgba(var(--accent-rgb), .12); transform: translateY(-1px); }
.stat .k { font: 600 10.5px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.stat .v { font: 700 28px/1.15 var(--mono); margin-top: 6px; text-shadow: 0 0 16px rgba(var(--accent-rgb), .25); font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.bad { border-color: rgba(255, 61, 139, .6); box-shadow: 0 0 26px rgba(255, 61, 139, .16); }
.stat.bad .v { color: var(--bad); text-shadow: 0 0 16px rgba(255, 61, 139, .5); }
.stat.warn .v { color: var(--warn); text-shadow: 0 0 16px rgba(255, 181, 71, .35); }
.stat.ok .v { color: var(--ok); text-shadow: 0 0 16px rgba(61, 220, 151, .35); }

/* ── device cards ────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.card {
  position: relative;
  background: linear-gradient(165deg, rgba(14, 21, 40, .74), rgba(7, 10, 20, .74));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: grid; gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 0 30px rgba(var(--accent-rgb), .1); }
.card.off { opacity: .58; }
.card .head { display: flex; align-items: center; gap: 10px; }
.card .nick { font: 700 16px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .login { color: var(--muted); font-size: 13px; }
.pill {
  margin-left: auto; font: 600 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
}
.pill.ok { color: var(--ok); box-shadow: 0 0 12px rgba(61, 220, 151, .25); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); box-shadow: 0 0 12px rgba(255, 61, 139, .25); }
.pill.idle { color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv div { background: rgba(5, 8, 16, .55); border: 1px solid rgba(60, 90, 140, .18); border-radius: 9px; padding: 8px 10px; min-width: 0; }
.kv .k { font: 600 9.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kv .v { font: 700 15px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv .wide { grid-column: 1 / -1; }
.card .foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.card .foot .btn { margin-left: auto; }
.card .foot .btn + .btn { margin-left: 0; }
.verdict { font-family: var(--mono); font-size: 13px; color: var(--accent-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .note { font-size: 12px; color: var(--warn); }
.card .cmds { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card .cmds .muted { font-size: 12px; }
.cmdlog { display: grid; gap: 2px; font-size: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.cmdlog .cmd { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.cmdlog .what { font-weight: 600; white-space: nowrap; }
.cmdlog .how { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cmdlog .cmd a { margin-left: auto; }
.cmdlog .cmd.pending .what, .cmdlog .cmd.delivered .what { color: var(--warn); }
.cmdlog .cmd.done .what { color: var(--ok); }
.cmdlog .cmd.expired .what, .cmdlog .cmd.lost .what { color: var(--bad); }
.cmdlog .cmd.closed .what { color: var(--muted); }
.card .keyline { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .keyline .btn { margin-left: auto; }
.card .keyline.missing { color: var(--warn); }
.card .cfgline { font-size: 12px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; }
/* v71: where the account's key stands, in its tone. */
.keyline .kt { min-width: 0; overflow-wrap: anywhere; }
.keyline.ok .kt { color: var(--ok); }
.keyline.wait .kt { color: var(--warn); }
.keyline.bad .kt { color: var(--bad); }

/* ── «Игроки» (v73): a live view of the phones, by state ─────────────── */
/* A section per state; a phone is one row — its bot, a state pill, today's
   numbers — and the rest behind «подробнее». On a phone a row is a card:
   the name on top, the numbers two by two, every button 36px tall. The
   sessions table stacks into cards there too, each value under its label. */
.players-note { margin: -4px 0 16px; font-size: 13px; }
.ph-list { display: grid; gap: 22px; min-width: 0; }
.ph-sec { display: grid; gap: 10px; min-width: 0; }
.ph-sec-head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; min-width: 0; }
.ph-sec-head h3 { margin: 0; font: 700 11.5px/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.ph-playing .ph-sec-head h3 { color: var(--ok); }
.ph-sec-head .count { color: var(--muted); font: 12px/1 var(--mono); }
.ph-sec-head .btn { margin-left: auto; }
.ph-rows { display: grid; gap: 8px; min-width: 0; }
.ph-row {
  /* The last column fixed: «подробнее» and «свернуть» differ, and the numbers stay in line from row to row. */
  display: grid; grid-template-columns: minmax(0, 2.6fr) repeat(4, minmax(0, 1fr)) 108px;
  gap: 8px 16px; align-items: center; min-width: 0; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(165deg, rgba(14, 21, 40, .74), rgba(7, 10, 20, .74));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ph-quiet .ph-row { opacity: .8; }
.ph-who { min-width: 0; }
.ph-name { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.ph-title { font: 700 15px/1.3 var(--mono); overflow-wrap: anywhere; min-width: 0; }
.ph-name .pill { margin-left: 0; }
.ph-sub { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.ph-stat { display: grid; gap: 1px; min-width: 0; }
.ph-stat .k { font: 600 9.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ph-stat .v { font: 700 14px/1.3 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ph-stat .n { font-size: 11px; line-height: 1.3; color: var(--warn); }
/* On a wide screen «подробнее» ends the first line whatever comes before it in the row. */
.ph-toggle { grid-row: 1; grid-column: -2 / -1; justify-self: end; white-space: nowrap; }
.ph-alerts, .ph-more { grid-column: 1 / -1; min-width: 0; }
.ph-alerts { display: grid; gap: 4px; justify-items: start; }
.ph-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; }
.ph-alert > span { min-width: 0; overflow-wrap: anywhere; }
.ph-alert.wait { color: var(--warn); }
.ph-alert.bad { color: var(--bad); }
.ph-go { font-size: 12.5px; }
.ph-more { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ph-more[hidden] { display: none; }
.ph-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; font-size: 13px; }
.ph-facts dt { color: var(--muted); }
.ph-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); }
.ph-more .cmds { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ph-more .cmds .muted { font-size: 12px; }
.ph-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ph-foot .danger { margin-left: auto; }
.ph-fold > summary { cursor: pointer; width: max-content; max-width: 100%; font-size: 13px; color: var(--muted); padding: 4px 0; }
.ph-fold > .ph-rows { margin-top: 8px; }
.ph-waits { display: grid; gap: 6px; }
.ph-wait {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-width: 0;
  padding: 8px 14px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px;
}
.ph-wait .ph-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.ph-wait .ph-sub { display: inline; }
.ph-why { flex: 1 1 260px; min-width: 0; color: var(--muted); overflow-wrap: anywhere; }
.ses-check { align-items: center; min-height: 36px; color: var(--text); }
.ses-check input { margin-top: 0; width: 18px; height: 18px; }
/* A bot's long name and login never push the page sideways: the list shrinks to the screen (as on «Нажатия»). */
.ses-tools .inline-field { max-width: 100%; min-width: 0; }
.ses-tools .inline-field select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.ses-table td.mono, .ses-table td.num, .ses-table td.ses-files { white-space: nowrap; }
@media (max-width: 640px) {
  /* The count goes under the title whole, not in a narrow column beside it. */
  #page-players section > header { flex-wrap: wrap; }
  .ph-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-items: start; padding: 12px; }
  .ph-who, .ph-toggle { grid-column: 1 / -1; }
  .ph-toggle { grid-row: auto; justify-self: stretch; }
  .ph-facts { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px 12px; }
  .ph-foot .danger { margin-left: 0; }
  #page-players .btn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
  #page-players .ph-go, #page-players .cmdlog a { display: inline-flex; align-items: center; min-height: 36px; }
  /* An order's answer wraps instead of ending in «…» on a narrow phone. */
  .ph-more .cmdlog .cmd { flex-wrap: wrap; }
  .ph-more .cmdlog .how { white-space: normal; overflow-wrap: anywhere; }
  /* A link inside the note's sentence: a taller hit area, the lines as they were. */
  .players-note a { padding: 10px 0; }
  .ph-fold > summary { min-height: 36px; display: flex; align-items: center; }
  .ses-tools .inline-field select { min-height: 36px; }
  .ses-table thead { display: none; }
  .ses-table, .ses-table tbody, .ses-table td { display: block; }
  /* A session in three short lines: when and how long, whose and how many, its files. */
  .ses-table tr {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr);
    grid-template-areas: "start len ver" "bot nick hands" "files files files";
    gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid rgba(60, 90, 140, .16);
  }
  .ses-table tr.has-tbl { grid-template-areas: "start len ver" "bot nick hands" "tbl tbl tbl" "files files files"; }
  .ses-table tr:not(.has-tbl) td.ses-tbl { display: none; }
  .ses-table tr:last-child { border-bottom: 0; }
  .ses-table td, .ses-table td.mono, .ses-table td.num { padding: 0; border: 0; text-align: left; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .ses-table td[data-label]::before {
    content: attr(data-label); display: block;
    font: 600 9.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  }
  .ses-table .ses-start { grid-area: start; }
  .ses-table .ses-len { grid-area: len; }
  .ses-table .ses-ver { grid-area: ver; }
  .ses-table .ses-bot { grid-area: bot; }
  .ses-table .ses-nick { grid-area: nick; }
  .ses-table .ses-hands { grid-area: hands; }
  .ses-table .ses-tbl { grid-area: tbl; }
  .ses-table td.ses-files { grid-area: files; display: flex; flex-wrap: wrap; gap: 8px; }
  .ses-table td.ses-files .btn { margin-right: 0; }
  .ses-table td.empty { grid-column: 1 / -1; }
}
/* The bots' table: a bot's key, in its tone (v71). */
td.keycell { font-size: 12.5px; min-width: 200px; overflow-wrap: anywhere; }
td.keycell.ok { color: var(--ok); }
td.keycell.wait { color: var(--warn); }
td.keycell.bad { color: var(--bad); }
td.keycell.idle { color: var(--muted); }
/* ── «Пользователи / боты» (v73): the nick each bot plays under, its settings ── */
td.nickcell { min-width: 150px; overflow-wrap: anywhere; }
td.nickcell .pill { margin: 0 6px 0 4px; padding: 3px 7px; font-size: 9.5px; vertical-align: middle; }
td.nickcell .btn { margin: 2px 0; }
.nick-note { font-size: 12px; color: var(--warn); }
.nick-many > summary { display: inline-block; cursor: pointer; list-style: none; margin: 0; }
.nick-many > summary::-webkit-details-marker { display: none; }
.nick-opt { display: flex; gap: 4px 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
td.cfgcell { font-size: 12.5px; min-width: 230px; overflow-wrap: anywhere; }
.cfg-warn { color: var(--warn); }
p.cfg-warn { margin: -6px 0 0; font-size: 13px; }
p.cfg-warn:empty { display: none; }
.cfg-pin { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; margin-top: -6px; font-size: 12.5px; }
/* .btn sets display, which the hidden attribute alone would not override. */
.cfg-pin[hidden], .cfg-pin .btn[hidden] { display: none; }
.field-hint { margin: -8px 0 0; font-size: 12.5px; }
/* A switch's «подробнее» in the settings, under its text and in line with it. */
.cfg-more { margin: -10px 0 0 30px; font-size: 12.5px; color: var(--muted); }
.cfg-more.flush { margin-left: 0; }
.cfg-more > summary { cursor: pointer; width: max-content; max-width: 100%; padding: 2px 0; }
.cfg-more > p { margin: 4px 0 0; }
/* v73: «Ключ API» for several bots (it stood on «Игроки») beside «Добавить
   бота»; on a phone the pair wraps under the title, right-aligned together. */
#page-bots section > header { flex-wrap: wrap; }
.head-btns { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
section > header .head-btns .btn { margin-left: 0; }
/* v73: on a phone a bot is a card (the table was 1278 px in a 341 px window):
   its name, login and state on top — a cell of its own, shown only there; a
   wide screen has the login and the label in their columns — then each cell
   under its column's name (data-label), the buttons two to a row. A pult
   login's card: its name, its phones and «последний раз». */
td.acc-head { display: none; }
.acc-name { min-width: 0; }
.acc-title { display: block; font: 700 15px/1.3 var(--mono); overflow-wrap: anywhere; }
.acc-sub { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 640px), (pointer: coarse) {
  .nick-many > summary { padding: 8px 0; }
  .cfg-more > summary { padding-top: 9px; padding-bottom: 9px; }
}
@media (max-width: 640px) {
  .acc-table thead { display: none; }
  .acc-table, .acc-table tbody { display: block; }
  .acc-table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px;
    padding: 14px; border-bottom: 1px solid var(--line);
  }
  .acc-table tr:last-child { border-bottom: 0; }
  .acc-table td, .acc-table td.num, .acc-table td.nickcell, .acc-table td.cfgcell, .acc-table td.keycell {
    display: block; grid-column: 1 / -1; padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere;
  }
  .acc-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    font: 600 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .acc-table td.acc-head { display: flex; align-items: flex-start; gap: 4px 10px; }
  .acc-table td.acc-head .pill { margin-left: auto; flex: none; }
  .acc-table td.acc-login, .acc-table td.acc-label { display: none; }
  .acc-table td.acc-phones, .acc-table td.acc-seen { grid-column: auto; }
  .acc-table td.acc-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
  .acc-table td.acc-acts .btn { margin: 0; }
  .acc-table td.acc-acts:empty,
  .acc-table tr.acc-admin td.acc-group, .acc-table tr.acc-admin td.nickcell,
  .acc-table tr.acc-admin td.cfgcell, .acc-table tr.acc-admin td.keycell { display: none; }
  .acc-table select.mini { width: 100%; max-width: 100%; }
}

/* ── tables ──────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(14, 21, 40, .7), rgba(7, 10, 20, .7));
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font: 600 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
th.num { text-align: right; }
td { padding: 11px 12px; border-bottom: 1px solid rgba(60, 90, 140, .16); vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(var(--accent-rgb), .045); }
tr:last-child td { border-bottom: none; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
td .btn { margin-right: 6px; }
td .pill { margin-left: 0; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* ── «Дашборд» (v73): the strip, «Сейчас за столами», the feed ───────── */
/* The problems tile spans two columns: 4 + 2 + it on a computer, a row of its own on a phone. */
#strip .stat.wide { grid-column: span 2; }
/* It is a link to the list: a tile still, not underlined text. The list lands below the sticky bar. */
#strip a.stat { display: block; color: inherit; text-decoration: none; }
#strip a.stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#probSec { scroll-margin-top: 76px; }
/* A long group name never pushes the page sideways. */
#page-dashboard .inline-field { max-width: 100%; min-width: 0; }
#page-dashboard .inline-field select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.now-table td { white-space: nowrap; vertical-align: top; }
.now-table td.now-bot, .now-table td.now-ses { white-space: normal; min-width: 110px; }
.now-bot b { display: block; font: 700 14px/1.3 var(--mono); overflow-wrap: anywhere; }
.now-sub { display: block; font-size: 11.5px; line-height: 1.35; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.now-table .pill { margin-left: 0; display: inline-block; }
.pill.on { color: var(--accent); }
.now-off { margin-top: 10px; }
.now-off > summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 8px 0; min-height: 36px; }
.now-off[hidden] { display: none; }
.now-off .table-wrap { margin-top: 6px; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ev-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-hi); color: var(--muted); cursor: pointer;
  font: 600 12px/1.2 var(--mono); letter-spacing: .04em;
}
.ev-chip:hover { border-color: rgba(var(--accent-rgb), .7); }
.ev-chip[aria-pressed="true"] {
  color: var(--accent-hi); border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .12);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), .18);
}
.ev-chip .n { font-weight: 500; opacity: .75; }
.ev-chip .n:empty { display: none; }
.ev-chip.svc { border-style: dashed; }
.ev-note { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.ev-note[hidden] { display: none; }
.events { display: grid; gap: 4px; }
.ev-day { margin: 12px 0 4px; font: 600 11px/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hi); }
.ev-day:first-child { margin-top: 0; }
/* By id: the older «.events .ev» phone rule further down must not stack the time over the line. */
#events .ev {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 8px 12px; border-radius: 9px; font-size: 13.5px;
  background: rgba(10, 15, 30, .6); border: 1px solid rgba(60, 90, 140, .16); border-left: 3px solid rgba(60, 90, 140, .4);
}
#events .ev.bad { border-left-color: var(--bad); background: rgba(255, 61, 139, .06); }
#events .ev.warn { border-left-color: var(--warn); }
#events .ev.ok { border-left-color: var(--ok); }
.ev-time { font: 12px/1.45 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-body { min-width: 0; }
.ev-title { overflow-wrap: anywhere; line-height: 1.45; }
.ev-new {
  display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 999px; vertical-align: 1px;
  border: 1px solid rgba(var(--accent-rgb), .6); color: var(--accent); font: 600 10px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.ev-more > summary { display: inline-flex; align-items: center; min-height: 36px; cursor: pointer; color: var(--accent); font-size: 12.5px; }
.ev-more > pre {
  margin: 2px 0 4px; padding: 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 11.5px/1.5 var(--mono); color: var(--text); background: rgba(3, 5, 10, .6); border: 1px solid var(--line); border-radius: 8px;
}
.ev-foot { margin-top: 12px; display: flex; justify-content: center; }
.ev-foot .btn { min-height: 40px; }
.ev-foot .btn[hidden] { display: none; }
@media (max-width: 640px) {
  /* On a phone «Проблемы» right under the strip: the cards of «Сейчас за столами» run
     to screens, and the list that says whether anything needs a look was three screens down. */
  #page-dashboard .dash-grid { display: contents; }
  #page-dashboard .dash-probs { order: 1; }
  #page-dashboard .dash-now { order: 2; }
  #page-dashboard .dash-spend { order: 3; }
  #page-dashboard .dash-events { order: 4; }
  /* «Сейчас за столами»: a card per phone, two columns, every cell named. */
  .now-table thead { display: none; }
  .now-table, .now-table tbody { display: block; width: 100%; }
  .now-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .now-table tr:last-child { border-bottom: 0; }
  .now-table td, .now-table td.num { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .now-table td::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font: 600 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .now-table td.now-bot::before, .now-table td.now-state::before, .now-table td.empty::before { display: none; }
  .now-table td.now-state { text-align: right; }
  .now-table td.empty { grid-column: 1 / -1; text-align: center; }
  #events .ev { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 8px 10px; }
  /* Fingers, not a mouse: 36 px at least. */
  #dashGroup { min-height: 36px; }
  #toCash { min-height: 36px; display: inline-flex; align-items: center; }
  .bar .btn.small { min-height: 36px; }
}

/* ── dialogs ─────────────────────────────────────────────────────────── */
dialog {
  border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 16px;
  background: linear-gradient(165deg, rgba(14, 21, 40, .97), rgba(6, 8, 16, .98)); color: var(--text);
  padding: 24px; width: min(440px, calc(100vw - 32px));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7), 0 0 50px rgba(var(--accent-rgb), .12);
}
dialog::backdrop { background: rgba(2, 3, 8, .72); backdrop-filter: blur(3px); }
/* v73: a long login in the title wraps. */
dialog h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
/* v73: one column the dialog's width: a list's longest option (a group's long
   name) widened the new bot's form past a phone's screen, sideways. */
form.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
label.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; font: 600 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
label.field input, label.field select {
  text-transform: none; letter-spacing: 0; font: 15px/1.4 var(--sans);
  background: rgba(3, 5, 10, .7); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
label.field input:focus, label.field select:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15), 0 0 18px rgba(var(--accent-rgb), .18);
}
label.field[hidden] { display: none; }
label.field select { min-width: 0; text-overflow: ellipsis; }
/* v73: three buttons wrap on a phone, each its own width («Удалить ключ» broke in two). */
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
/* A key field the browser does not treat as a password to save. */
input.secret { -webkit-text-security: disc; font-family: var(--mono); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
label.check input { margin-top: 3px; accent-color: var(--accent); }
label.check b { color: var(--text); font-weight: 600; }
.keyresult { display: grid; gap: 4px; font-size: 13px; font-family: var(--mono); overflow-wrap: anywhere; }
.keyresult .ok { color: var(--ok); }
.keyresult .bad { color: var(--bad); }
/* The key dialog's phones (v57): a box to tick, when heard, how the last key went. */
.keydevs { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; }
.keydev { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.keydev input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.keydev .who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.keydev .seen { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.keydev .kstat { font-family: var(--mono); font-size: 12px; }
.keydev .kstat.ok { color: var(--ok); font-weight: 600; }
.keydev .kstat.wait { color: var(--warn); }
.keydev .kstat.bad { color: var(--bad); }
.keydev .kstat.idle { color: var(--muted); }
.keydev.stale { opacity: .75; }
.keyold summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.keyold .keydev { margin-top: 6px; }
.error { color: var(--bad); min-height: 1.5em; font-size: 14px; text-shadow: 0 0 10px rgba(255, 61, 139, .3); }

/* ── problems ────────────────────────────────────────────────────────── */
.problems { display: grid; gap: 8px; }
.prob {
  display: grid; grid-template-columns: auto minmax(0, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: linear-gradient(90deg, rgba(14, 21, 40, .78), rgba(8, 11, 22, .7));
  border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; padding: 10px 12px; font-size: 14px;
}
.prob.bad { border-left-color: var(--bad); box-shadow: -6px 0 18px -10px var(--bad); }
.prob.warn { border-left-color: var(--warn); }
.prob.info { border-left-color: var(--muted); }
.prob .pill { margin-left: 0; }
/* v73: a long nick wraps, never cut to «…» (the owner reads the dashboard on a phone). */
.prob .who { font-family: var(--mono); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.prob .what { min-width: 0; }
.prob .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.allclear {
  padding: 20px; border: 1px dashed rgba(61, 220, 151, .45); border-radius: var(--radius); color: var(--ok);
  text-align: center; background: rgba(61, 220, 151, .04); font-family: var(--mono); letter-spacing: .04em;
}
.soon { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 6px; }
.soon p { margin: 0; }

/* ── groups ──────────────────────────────────────────────────────────── */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.inline-field { display: flex; gap: 8px; align-items: center; font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.inline-field select, select.mini {
  font: 14px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text);
  background: rgba(3, 5, 10, .7); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px;
}
select.mini { padding: 5px 8px; max-width: 180px; }
.inline-field select:focus, select.mini:focus { border-color: var(--accent); outline: none; }
/* v69: «Опубликована версия N» beside the dashboard's group filter */
.app-release { font: 12px/1.4 var(--mono); color: var(--muted); }
.app-release.warn { color: var(--warn); }
.groups { display: flex; gap: 10px; flex-wrap: wrap; }
.group {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(165deg, rgba(14, 21, 40, .74), rgba(7, 10, 20, .74));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
.group .name { font-weight: 700; font-family: var(--mono); }
.portal-note { margin: 14px 0 0; font-size: 13px; overflow-wrap: anywhere; }
/* v73: a long group name wraps inside its chip, never past the screen. On a
   phone a group is a line of its own: the name, then how many bots and its
   two buttons; the cabinet's address a finger's height, the lines as they were. */
.group .name { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .group { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 8px; }
  .group .name { grid-column: 1 / -1; }
  .portal-note a { padding: 10px 0; }
}

/* ── presses against the hint (v67) ──────────────────────────────────── */
/* v73: six tiles in plain words — three a row on a narrower screen, two on a phone
   (#page-presses: above the shared ≤900px rule below, without touching it). */
#prStrip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { #page-presses #prStrip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { #page-presses #prStrip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A phone's long name never pushes the page sideways: the list shrinks to the screen. */
#page-presses .inline-field { max-width: 100%; min-width: 0; }
#page-presses .inline-field select { min-width: 0; max-width: 100%; text-overflow: ellipsis; min-height: 36px; }
.pr-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
td.plus { color: var(--ok); }
td.minus { color: var(--bad); }
.pr-kind { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
tr.yard td { color: var(--muted); border-top: 1px dashed var(--line); }
tr.yard td.plus, tr.yard td.minus { opacity: .8; }
/* v70: every bot side by side; the picked one lit. Its name is a button that reads as a link. */
.pr-acc tr.sel td { background: rgba(var(--accent-rgb), .10); }
.pr-acc td { vertical-align: top; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 140px; }
.pr-chips .pill { margin-left: 0; white-space: nowrap; }
.pr-sub { font-size: 11px; color: var(--muted); white-space: normal; }
.pr-acc td:first-child { min-width: 132px; }
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--accent);
  cursor: pointer; text-align: left; overflow-wrap: break-word;
}
.linkbtn:hover { text-decoration: underline; }
tr.sel .linkbtn { font-weight: 700; }
/* v73: a name or a kind to tap — a finger's worth on a phone. */
#page-presses .linkbtn { min-height: 36px; }
#page-presses .pr-stack th { white-space: normal; }

/* v73: «Ходы по раздачам» — a hand to a card, a turn to a line; tap a line for the rest. */
#prListSec, #prAccSec, #prKindSec { scroll-margin-top: 76px; }
#prAccSec:focus, #prKindSec:focus { outline: none; }
/* v73 (review): the summaries a tap away — on a phone they lie far below the list. */
.pr-jump { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 10px; }
.pr-up { margin-left: auto; }
.pr-filters { gap: 10px 14px; }
.pr-marks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.pr-marks-k { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.pr-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted);
  font: 13px/1.2 var(--sans); cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.pr-chip:hover { border-color: rgba(var(--accent-rgb), .6); }
.pr-chip[aria-pressed="true"], .pr-chip.on { color: var(--text); border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .12); }
.pr-chip b { font-family: var(--mono); }
.pr-chip[hidden] { display: none; }
/* v73 (review): how many turns a mark holds; while a new pick is on its way the counts and the list are dimmed. */
.pr-chip-n { font: 12px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-chip-n:empty { display: none; }
.pr-busy .pr-chip-n, .pr-busy #prListCount { opacity: .45; }
.pr-list { transition: opacity .15s; }
.pr-list[aria-busy="true"] { opacity: .45; }
#prKindText { min-width: 0; overflow-wrap: anywhere; }
.pr-legend { margin: 0 0 14px; padding: 0 14px; border: 1px dashed var(--line); border-radius: var(--radius); font-size: 13.5px; line-height: 1.5; }
.pr-legend > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 8px; list-style: none; color: var(--accent-hi); font-weight: 600; }
.pr-legend > summary::-webkit-details-marker { display: none; }
.pr-legend > summary::before { content: '›'; font-family: var(--mono); transition: transform .15s; }
.pr-legend[open] > summary::before { transform: rotate(90deg); }
.pr-legend[open] { padding-bottom: 12px; }
.pr-legend dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 4px 0 0; }
.pr-legend dt { font-family: var(--mono); font-weight: 700; color: var(--accent-hi); }
.pr-legend dd { margin: 0; }
.pr-legend p { margin: 10px 0 0; color: var(--muted); }
/* One grid for the column names and every turn's line. */
.pr-cols, .pr-line {
  display: grid; gap: 4px 12px; align-items: baseline;
  grid-template-columns: 66px 62px minmax(92px, .8fr) minmax(110px, 1fr) minmax(110px, 1fr) minmax(150px, 1.6fr) 12px;
}
.pr-cols { padding: 0 15px 6px; font: 600 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pr-list { display: grid; gap: 12px; min-width: 0; }
.pr-hcard {
  min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(14, 21, 40, .7), rgba(7, 10, 20, .7));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.pr-hhead {
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 10px 14px;
  background: rgba(var(--accent-rgb), .05); border-bottom: 1px solid rgba(60, 90, 140, .22);
}
.pr-htitle { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-width: 0; }
.pr-htitle b { font: 700 14px/1.35 var(--mono); color: var(--accent-hi); overflow-wrap: anywhere; }
.pr-hwhen { font: 12px/1.3 var(--mono); color: var(--muted); }
.pr-hmeta { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; min-width: 0; font-size: 14px; }
.pr-hbot { font-weight: 600; overflow-wrap: anywhere; }
.pr-hcards { font-size: 14.5px; }
.pr-hres { font: 13px/1.35 var(--mono); }
.pr-hres.plus { color: var(--ok); }
.pr-hres.minus { color: var(--bad); }
.pr-hmode { font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--warn); border: 1px solid currentColor; border-radius: 999px; padding: 4px 8px; }
.pr-turn + .pr-turn { border-top: 1px solid rgba(60, 90, 140, .16); }
/* v73 (review): the hand's turns the filters left off the card, said under its turns. */
.pr-hnote { margin: 0; padding: 8px 14px; border-top: 1px dashed rgba(60, 90, 140, .3); font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.pr-line { min-height: 40px; padding: 9px 14px; cursor: pointer; list-style: none; font-size: 14px; }
.pr-line::-webkit-details-marker { display: none; }
.pr-line:hover, .pr-turn[open] > .pr-line { background: rgba(var(--accent-rgb), .05); }
.pr-top { display: contents; }
.pr-time { grid-column: 1; grid-row: 1; color: var(--muted); font-size: 12.5px; }
.pr-street { grid-column: 2; grid-row: 1; }
.pr-board { grid-column: 3; grid-row: 1; font-size: 13.5px; }
.pr-hint { grid-column: 4; grid-row: 1; }
.pr-did { grid-column: 5; grid-row: 1; }
.pr-mark { grid-column: 6; grid-row: 1; }
.pr-chev { grid-column: 7; grid-row: 1; justify-self: end; color: var(--muted); transition: transform .15s; }
.pr-turn[open] > .pr-line .pr-chev { transform: rotate(90deg); }
.pr-hint, .pr-did { min-width: 0; font: 13px/1.4 var(--mono); overflow-wrap: anywhere; }
.pr-mark { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.pr-sign { display: inline-block; width: 1.4em; font-family: var(--mono); font-weight: 700; }
.pr-mark.ok .pr-sign { color: var(--ok); }
.pr-mark.bad .pr-sign { color: var(--bad); }
.pr-mark.warn .pr-sign { color: var(--warn); }
.pr-mark.idle { color: var(--muted); }
.pr-note2 { display: block; font-size: 11.5px; color: var(--muted); }
/* The columns' names said to a screen reader on the wide page, and shown on a phone (no column names there). */
.pr-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pr-info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; padding: 4px 14px 12px 88px; font-size: 13px; }
.pr-info dt { color: var(--muted); }
.pr-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pr-more { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; }
.pr-more .btn[hidden] { display: none; }
@media (max-width: 760px) {
  .pr-cols { display: none; }
  .pr-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "top top" "hint did" "mark mark"; gap: 6px 12px; padding: 10px 12px; }
  .pr-top { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; grid-area: top; min-width: 0; padding-right: 18px; }
  .pr-time, .pr-street, .pr-board { grid-column: auto; grid-row: auto; }
  .pr-hint { grid-area: hint; }
  .pr-did { grid-area: did; }
  .pr-mark { grid-area: mark; }
  .pr-chev { grid-area: top; align-self: start; }
  .pr-lab { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: block; margin-bottom: 1px; font: 600 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .pr-info { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); padding: 4px 12px 12px; }
  .pr-hhead, .pr-hnote { padding-left: 12px; padding-right: 12px; }
  /* The legend as running text: the sign or word, then what it means, wrapping under it. */
  .pr-legend dl { display: block; }
  .pr-legend dt { display: inline; margin-right: 6px; }
  .pr-legend dd { display: inline; }
  .pr-legend dd::after { content: ''; display: block; height: 8px; }
}
@media (max-width: 640px) {
  /* Two filters a row, the name over the list. */
  #page-presses .toolbar .inline-field { flex: 1 1 calc(50% - 6px); flex-direction: column; align-items: stretch; gap: 4px; }
  #page-presses .toolbar .inline-field select { width: 100%; }
  /* «По ботам» and «Расхождения по видам» as cards: each value with its column's name. */
  #page-presses .pr-stack thead { display: none; }
  #page-presses .pr-stack, #page-presses .pr-stack tbody, #page-presses .pr-stack tr { display: block; }
  #page-presses .pr-stack tr { padding: 8px 12px; border-bottom: 1px solid rgba(60, 90, 140, .22); }
  #page-presses .pr-stack tr:last-child { border-bottom: 0; }
  #page-presses .pr-stack td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 3px 0; border: 0; min-width: 0; text-align: right;
  }
  #page-presses .pr-stack td::before {
    content: attr(data-label); flex: 0 1 auto; max-width: 55%; text-align: left;
    font: 600 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  }
  #page-presses .pr-stack td.pr-first, #page-presses .pr-stack td.empty { display: block; text-align: left; }
  #page-presses .pr-stack td.empty { text-align: center; }
  #page-presses .pr-stack td.pr-first::before, #page-presses .pr-stack td.empty::before { content: none; }
  #page-presses .pr-stack .pr-v { min-width: 0; }
  #page-presses .pr-stack .pr-chips { min-width: 0; justify-content: flex-end; }
  #page-presses .pr-acc td:first-child { min-width: 0; }
  #page-presses .pr-kind { white-space: normal; }
}

/* ── «Касса» and the cabinet: the spend history (v72, spend.js) ──────── */
.sp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; min-width: 0; }
.sp > section { min-width: 0; }
.sp [hidden] { display: none !important; }
.sp .inline-field { max-width: 100%; min-width: 0; }
.sp .inline-field select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.sp-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sp-chart-box {
  margin-top: 14px; padding: 14px 14px 10px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(14, 21, 40, .7), rgba(7, 10, 20, .7));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
section > .sp-chart-box:nth-child(2) { margin-top: 0; margin-bottom: 14px; }
.sp-chart-head {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 10px;
  font: 600 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sp-hint { letter-spacing: .04em; text-transform: none; font-weight: 500; }
.sp-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid var(--line); }
.sp-bar {
  flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end;
  margin: 0; padding: 0; border: 0; border-radius: 3px 3px 0 0; background: none; color: inherit;
}
button.sp-bar { cursor: pointer; }
button.sp-bar:hover { background: rgba(var(--accent-rgb), .07); }
.sp-fill {
  display: block; width: 100%; height: var(--h, 0%); min-height: 2px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .95), rgba(var(--accent-rgb), .35));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .22);
}
.sp-bar.zero .sp-fill { min-height: 1px; background: rgba(60, 90, 140, .5); box-shadow: none; }
.sp-bar.today .sp-fill { outline: 1px solid rgba(var(--accent-rgb), .7); outline-offset: 1px; }
.sp-bar.sel .sp-fill {
  background: linear-gradient(180deg, rgba(var(--second-rgb), .95), rgba(var(--second-rgb), .4));
  box-shadow: 0 0 14px rgba(var(--second-rgb), .45);
}
.sp-axis { display: flex; gap: 3px; height: 16px; margin-top: 5px; }
.sp-tick { flex: 1 1 0; min-width: 0; position: relative; }
.sp-tick b { position: absolute; left: 50%; transform: translateX(-50%); font: 500 10px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.sp-tick:first-child b { left: 0; transform: none; }
.sp-tick:last-child b { left: auto; right: 0; transform: none; }
.sp-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
.sp-error { min-height: 0; margin: 8px 0 0; }
.sp-error:empty { display: none; }
.sp-table td.mono, .sp-table td.num { white-space: nowrap; }
.sp-table tr.sel td { background: rgba(var(--accent-rgb), .10); }
.sp-table tr.sel .linkbtn { font-weight: 700; }
.sp-who { font-size: 12.5px; color: var(--muted); min-width: 170px; }
.sp-sub { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.sp-table td:first-child { min-width: 120px; }
th .sp-sort {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
}
th .sp-sort:hover, th[aria-sort] .sp-sort { color: var(--accent-hi); }
/* v73: on a phone each table is cards (they were 540–754 px in a 341 px
   window): a row's name across the top, its numbers three a row, each under
   its column's name (data-label), «кто тратил» across; a day's or an hour's
   card starts with it. The column names stay on top as the sort buttons. */
@media (max-width: 640px) {
  .sp-table, .sp-table thead, .sp-table tbody { display: block; }
  .sp-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .sp-table thead tr::before {
    content: 'сортировка'; margin-right: 2px;
    font: 600 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .sp-table th { padding: 0; border: 0; letter-spacing: .06em; }
  .sp-table th.sp-nosort { display: none; }
  .sp-table th .sp-sort { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; }
  .sp-table th[aria-sort] .sp-sort { border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .12); }
  .sp-table tbody tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px;
    padding: 12px 14px; border-bottom: 1px solid rgba(60, 90, 140, .16);
  }
  .sp-table tbody tr:last-child { border-bottom: 0; }
  .sp-table td, .sp-table td.mono, .sp-table td.num, .sp-table td:first-child {
    display: block; padding: 0; border: 0; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere;
  }
  .sp-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font: 600 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .sp-table td.sp-name, .sp-table td.sp-who, .sp-table td.empty { grid-column: 1 / -1; }
  .sp-table td.sp-name::before { content: none; }
  .sp-table td.empty { padding: 12px 0; text-align: center; }
  .sp-table tr.sel { background: rgba(var(--accent-rgb), .10); }
  .sp-table tr.sel td { background: none; }
}

/* ── the bots' cabinet ───────────────────────────────────────────────── */
.groupname { color: var(--accent-hi); font: 12px/1.2 var(--mono); letter-spacing: .06em; min-width: 0; overflow-wrap: anywhere; }
body.portal .bar { flex-wrap: wrap; }
/* v73: on a phone «Боты группы» is a card per bot — its name and state on
   top, «стол» across, the numbers two a row under their names — and the bar
   is «Выйти» beside the mark, the group and the bot under them, scrolling
   away with the page (four lines of it held 140 px of the screen). */
@media (max-width: 640px) {
  body.portal .bar { position: relative; row-gap: 4px; }
  body.portal .bar .groupname { order: 4; width: 100%; }
  .pt-bots thead { display: none; }
  .pt-bots, .pt-bots tbody { display: block; }
  .pt-bots tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px;
    padding: 12px 14px; border-bottom: 1px solid rgba(60, 90, 140, .16);
  }
  .pt-bots tr:last-child { border-bottom: 0; }
  .pt-bots td, .pt-bots td.num, .pt-bots td.mono { display: block; padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .pt-bots td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font: 600 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .pt-bots td.pt-bot { font: 700 15px/1.3 var(--mono); }
  .pt-bots td.pt-bot::before, .pt-bots td.pt-state::before { content: none; }
  .pt-bots td.pt-state { text-align: right; }
  .pt-bots td.pt-table, .pt-bots td.empty { grid-column: 1 / -1; }
  .pt-bots td.empty { padding: 12px 0; text-align: center; }
}

/* ── the boot sequence after a login (v56) ───────────────────────────── */
body.booting { overflow: hidden; }
.boot {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(8, 12, 26, .9), rgba(2, 3, 8, .97));
  transition: opacity .5s ease;
}
.boot.out { opacity: 0; pointer-events: none; }
.boot-hex {
  position: absolute; inset: 0; display: flex; justify-content: space-between; padding: 0 10px;
  overflow: hidden; pointer-events: none; opacity: .16;
  font: 11px/1.45 var(--mono); color: rgba(var(--accent-rgb), .9);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.boot-hex-col { width: 120px; white-space: nowrap; }
.boot-hex-col:nth-child(n+3):nth-child(-n+4) { visibility: hidden; }
.boot-panel {
  position: relative; width: min(620px, 100%);
  background: linear-gradient(160deg, rgba(10, 16, 32, .92), rgba(4, 6, 12, .95));
  border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 16px; padding: 22px 22px 18px;
  box-shadow: 0 0 60px rgba(var(--accent-rgb), .14), 0 30px 90px rgba(0, 0, 0, .7);
  animation: card-in .45s cubic-bezier(.2,.8,.2,1) both;
}
.boot-panel::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 40%; pointer-events: none; border-radius: 16px;
  background: linear-gradient(to bottom, rgba(var(--accent-rgb), .07), transparent);
  animation: sweep 2.4s linear infinite;
}
@keyframes sweep { from { transform: translateY(-40%); } to { transform: translateY(260%); } }
.boot-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font: 700 13px/1 var(--mono); letter-spacing: .28em; color: var(--accent-hi); text-transform: uppercase;
}
.boot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 1s ease-in-out infinite; }
.boot-term { display: grid; gap: 6px; font: 13px/1.5 var(--mono); min-height: 220px; }
.boot-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
.boot-txt {
  color: rgba(var(--accent-rgb), .9); white-space: nowrap; overflow: hidden; width: 0; max-width: 100%;
  animation: type .35s steps(var(--chars, 30)) forwards;
}
.boot-tag { font-weight: 700; white-space: nowrap; }
.boot-tag.wait { color: var(--muted); animation: blink .6s steps(1) infinite; }
.boot-tag.ok { color: var(--ok); text-shadow: 0 0 10px rgba(61, 220, 151, .5); }
.boot-tag.bad { color: var(--warn); }
.boot-res { grid-column: 1 / -1; padding-left: 18px; color: var(--muted); font-size: 12px; min-height: 0; }
.boot-res:empty { display: none; }
.boot-bar { margin-top: 16px; height: 6px; border-radius: 6px; background: rgba(60, 90, 140, .25); overflow: hidden; }
.boot-bar-fill {
  height: 100%; width: var(--p, 0%); border-radius: 6px; transition: width .3s ease;
  background: linear-gradient(90deg, var(--accent), var(--second));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), .6);
}
.boot-pct { margin-top: 6px; text-align: right; font: 12px/1 var(--mono); color: var(--muted); }
.boot-granted {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px;
  background: rgba(3, 5, 10, .86); border-radius: 16px; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.boot-granted.show { opacity: 1; }
.boot-granted-big {
  font: 800 clamp(26px, 6vw, 40px)/1.1 var(--mono); letter-spacing: .14em; color: var(--ok);
  text-shadow: 0 0 22px rgba(61, 220, 151, .65), 2px 0 rgba(var(--second-rgb), .55), -2px 0 rgba(var(--accent-rgb), .55);
}
.boot-granted.show .boot-granted-big { animation: grant .6s steps(6) both; }
@keyframes grant {
  0% { opacity: 0; transform: scale(1.08); filter: blur(4px); }
  40% { opacity: 1; transform: translateX(-3px); }
  60% { transform: translateX(3px); }
  100% { opacity: 1; transform: none; filter: none; }
}
.boot-granted-sub { font: 13px/1.4 var(--mono); color: var(--accent-hi); letter-spacing: .08em; }
@media (max-width: 640px) {
  .boot-hex { display: none; }
  .boot-term { font-size: 12px; min-height: 0; }
}

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  #strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #prStrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sp-chart { height: 120px; gap: 2px; }
  .sp-axis { gap: 2px; }
  .sp-chart-box { padding: 12px 10px 8px; }
}
@media (max-width: 640px) {
  .bar { padding: 10px 16px; gap: 10px; }
  /* v73: «Пользователи / боты» takes two lines beside the mark — not touching. */
  .mark small { line-height: 1.25; }
  .bar .who { display: none; }
  body.portal .bar .who { display: inline; order: 5; width: 100%; }
  main { padding: 18px 16px 32px; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  .events .ev { grid-template-columns: 1fr; gap: 2px; }
  .prob { grid-template-columns: auto minmax(0, 1fr) auto; }
  .prob .what { grid-column: 1 / -1; }
  .stat .v { font-size: 24px; }
  .auth-card { padding: 28px 20px 22px; }
  .auth-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .term-line, .boot-txt { width: auto; }
}
