/* ==========================================================================
   ОМ-Игры — основная тема
   ========================================================================== */
:root {
  --bg: #070d13;
  --bg2: #0b131c;
  --panel: #0e1822;
  --panel2: #12202c;
  --line: rgba(120, 150, 175, .18);
  --line2: rgba(120, 150, 175, .30);
  --tx: #e6eef6;
  --tx2: #a9bccd;
  --tx3: #6f8598;
  --accent: #f0b429;
  --accent2: #4ea8de;
  --ok: #7fd1c1;
  --bad: #e07a5f;
  --r: 12px;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(78, 168, 222, .13), transparent 60%),
    radial-gradient(900px 460px at 8% 0%, rgba(240, 180, 41, .09), transparent 62%),
    var(--bg);
  color: var(--tx);
  font: 15px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
b, strong { font-weight: 700; }
.muted { color: var(--tx3); font-size: 13px; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
  background: rgba(7, 13, 19, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #c8890f);
  color: #10160a; font-weight: 800; font-size: 14px; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--tx3); text-transform: uppercase; letter-spacing: .09em; }

.nav { display: flex; gap: 4px; margin-left: 14px; }
.nav a {
  padding: 8px 12px; border-radius: 9px; font-size: 14px; color: var(--tx2);
  transition: .15s;
}
.nav a:hover { color: var(--tx); background: rgba(255, 255, 255, .05); }
.nav a.on { color: #10160a; background: var(--accent); font-weight: 600; }
/* возврат на сайт ek0.ru: в меню на широком экране, кнопкой в шапке — на узком */
.nav a.nav-back { color: var(--tx3); padding-right: 14px; margin-right: 6px; border-right: 1px solid var(--line); border-radius: 9px 0 0 9px; }
.nav a.nav-back:hover { color: var(--tx); }
.back-top { display: none; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: transparent; color: var(--tx2);
  font-size: 17px; cursor: pointer;
}
.icon-btn:hover { color: var(--tx); border-color: var(--line2); }

/* --------------------------------------------------------------- search */
.searchbar {
  display: none; padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: rgba(11, 19, 28, .95);
}
.searchbar.on { display: block; }
.searchbar input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line2); color: var(--tx);
  font: inherit; outline: none;
}
.searchbar input:focus { border-color: var(--accent); }
.search-hint { margin-top: 8px; font-size: 12px; color: var(--tx3); }

/* ---------------------------------------------------------------- layout */
main { max-width: 1240px; margin: 0 auto; padding: 26px 22px 70px; }
.wide { max-width: 1440px; }

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px;
  align-items: center; padding: 26px 0 34px;
}
.hero h1 { font-size: 42px; line-height: 1.08; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 17px; color: var(--tx2); max-width: 640px; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line2); color: var(--tx2); background: rgba(255, 255, 255, .03);
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  padding: 16px 18px; border-radius: var(--r);
  background: linear-gradient(160deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 30px; color: var(--accent); line-height: 1; }
.stat span { font-size: 12px; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; }

/* --------------------------------------------------------------- section */
.sec { margin: 34px 0; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 22px; margin: 0; }
.sec-head span { color: var(--tx3); font-size: 13px; }
.sec-head .sp { margin-left: auto; }

/* ------------------------------------------------------------ категории */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.cat-card {
  padding: 15px 16px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel); transition: .16s; cursor: pointer;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-card .cc-ic { font-size: 18px; color: var(--accent); }
.cat-card .cc-n { font-weight: 600; margin: 6px 0 3px; }
.cat-card .cc-d { font-size: 12.5px; color: var(--tx3); min-height: 34px; }
.cat-card .cc-c { font-size: 11px; color: var(--accent2); letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }

/* -------------------------------------------------------------- карточки */
.grid-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.gcard {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: var(--r);
  background: linear-gradient(170deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); transition: .16s; cursor: pointer; position: relative;
}
.gcard:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: var(--shadow); }
.gcard-top { display: flex; align-items: center; gap: 8px; }
.gcard-cat { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent2); }
.gcard h3 { font-size: 16px; margin: 0; }
.gcard p { font-size: 13px; color: var(--tx2); margin: 0; flex: 1; }
.gcard-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--tx3); margin-top: 4px; }
.gcard-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--tx3); }
.badge-best { color: var(--ok); font-weight: 600; }

.lvl { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line2); color: var(--tx2); }
.lvl1 { color: var(--ok); border-color: rgba(127, 209, 193, .4); }
.lvl2 { color: var(--accent); border-color: rgba(240, 180, 41, .4); }
.lvl3 { color: var(--bad); border-color: rgba(224, 122, 95, .4); }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 6px;
  background: rgba(78, 168, 222, .10); color: #9dc7e3; border: 1px solid rgba(78, 168, 222, .18);
}

/* --------------------------------------------------------------- фильтры */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.chip {
  padding: 7px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--tx2);
}
.chip:hover { border-color: var(--line2); color: var(--tx); }
.chip.on { background: var(--accent); color: #10160a; border-color: var(--accent); font-weight: 600; }
.chip small { opacity: .65; margin-left: 5px; }

/* ------------------------------------------------------------- страница */
.gpage-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.crumbs { font-size: 12.5px; color: var(--tx3); display: flex; gap: 7px; align-items: center; }
.crumbs a:hover { color: var(--accent); }
.gpage-head h1 { font-size: 30px; margin: 2px 0 0; }
.gpage-head .sub { color: var(--tx2); font-size: 16px; }
.gmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }

.brief {
  border-left: 3px solid var(--accent); padding: 10px 14px; margin: 14px 0 18px;
  background: rgba(240, 180, 41, .06); border-radius: 0 8px 8px 0; color: var(--tx2);
}

/* ------------------------------------------------------- сетка движка */
.engine { margin-top: 8px; }
.game-grid { display: grid; grid-template-columns: 1fr 330px; gap: 16px; align-items: start; }
.game-grid.stacked { grid-template-columns: 1fr; }
.game-stage {
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--panel); overflow: hidden; min-height: 420px;
}
.game-stage.tall { min-height: 560px; }
.game-side { display: flex; flex-direction: column; gap: 12px; }

.panel { border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.panel-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.panel-title { font-weight: 600; font-size: 14px; }
.panel-sub { font-size: 11.5px; color: var(--tx3); margin-left: auto; text-align: right; }
.card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

.kpi-row { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi {
  flex: 1 1 92px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--line);
}
.kpi.hi { border-color: rgba(240, 180, 41, .45); background: rgba(240, 180, 41, .07); }
.kpi-v { font-size: 19px; font-weight: 700; line-height: 1.15; }
.kpi.hi .kpi-v { color: var(--accent); }
.kpi-l { font-size: 11px; color: var(--tx3); margin-top: 3px; }

.btn {
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line2);
  background: var(--panel2); color: var(--tx); font: inherit; font-size: 14px;
  cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--accent2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #10160a; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.field { display: block; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.field-label { font-size: 12.5px; color: var(--tx2); }
.field-hint { font-size: 11px; color: var(--tx3); }
.sl-val { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
input.sl { width: 100%; accent-color: var(--accent); }

.note {
  font-size: 12.5px; color: var(--tx2); line-height: 1.5;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(78, 168, 222, .07); border: 1px solid rgba(78, 168, 222, .16);
}
.note.err { background: rgba(224, 122, 95, .1); border-color: rgba(224, 122, 95, .3); }
.note.warn { background: rgba(240, 180, 41, .1); border-color: rgba(240, 180, 41, .3); }

/* --------------------------------------------------------------- итог */
.result {
  margin-top: 18px; padding: 18px 20px; border-radius: var(--r);
  border: 1px solid var(--line2); background: linear-gradient(150deg, var(--panel2), var(--bg2));
}
.result.great { border-color: rgba(127, 209, 193, .5); }
.result.good { border-color: rgba(78, 168, 222, .5); }
.result.bad { border-color: rgba(224, 122, 95, .45); }
.result-score { display: flex; align-items: baseline; gap: 4px; }
.result-num { font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1; }
.result-max { font-size: 15px; color: var(--tx3); }
.result-verdict { font-size: 14px; color: var(--tx2); margin: 4px 0 10px; }
.result-note { font-size: 13.5px; color: var(--tx2); margin-bottom: 12px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--tx3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(120, 150, 175, .09); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.td-name { color: var(--tx2); }
.td-val { font-variant-numeric: tabular-nums; }
.td-best { color: var(--tx3); font-size: 12px; text-align: right; }
.kpi-tbl { margin-top: 4px; }

.score-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--accent); }
.score-bar.great i { background: var(--ok); }
.score-bar.bad i { background: var(--bad); }

/* --------------------------------------------------------- движок: pack */
.pack-box { padding: 14px; display: flex; justify-content: center; }
.pack-canvas { border-radius: 8px; cursor: crosshair; display: block; }
.part-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.part-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: 9px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--panel2); color: var(--tx); font: inherit; font-size: 13px;
}
.part-btn:hover { border-color: var(--accent2); }
.part-btn.on { border-color: var(--accent); background: rgba(240, 180, 41, .12); }
.part-name { font-weight: 500; }
.part-size { color: var(--tx3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ok-line { color: var(--ok); font-size: 13px; }

/* --------------------------------------------------------- движок: flow */
.flow-box { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.flow-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow-node {
  min-width: 92px; padding: 10px 12px; border-radius: 10px; text-align: center;
  background: var(--panel2); border: 1px solid var(--line2);
}
.flow-node.src { border-style: dashed; color: var(--tx3); }
.flow-node b { display: block; font-size: 12.5px; }
.flow-node span { font-size: 11px; color: var(--tx3); }
.flow-buf {
  display: flex; flex-direction: column; align-items: center; min-width: 46px;
  padding: 6px 4px; border-radius: 8px; background: rgba(240, 180, 41, .10);
  border: 1px dashed rgba(240, 180, 41, .4);
}
.flow-buf-n { font-weight: 700; color: var(--accent); font-size: 15px; }
.flow-buf-l { font-size: 9.5px; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; }

/* ------------------------------------------------------- движок: графики */
.chart-box { padding: 16px; }
.chart-title { font-size: 13px; color: var(--tx2); margin-bottom: 12px; }
.chart-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--tx3); margin-top: 10px; flex-wrap: wrap; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 190px; }
.hist-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hist-col i { display: block; background: linear-gradient(180deg, var(--accent2), rgba(78, 168, 222, .25)); border-radius: 3px 3px 0 0; min-height: 2px; }
.hist-col span { font-size: 9px; color: var(--tx3); text-align: center; margin-top: 4px; height: 12px; }

.q-row { display: grid; grid-template-columns: 74px 1fr 74px 96px; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid rgba(120, 150, 175, .09); }
.q-time { font-size: 12.5px; color: var(--tx2); font-variant-numeric: tabular-nums; }
.q-bar { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.q-bar i { display: block; height: 100%; background: var(--ok); }
.q-bar i.hot { background: var(--bad); }
.q-num { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.q-asa { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.q-asa.ok { color: var(--ok); }
.q-asa.bad { color: var(--bad); }

.quota-bars { display: flex; align-items: flex-end; gap: 22px; height: 220px; justify-content: center; }
.quota-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; width: 90px; }
.quota-bar {
  width: 100%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--accent), rgba(240, 180, 41, .25));
  display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; min-height: 20px;
}
.quota-bar span { font-size: 13px; font-weight: 700; color: #10160a; }
.quota-lbl { font-size: 11.5px; color: var(--tx3); margin-top: 7px; text-align: center; }

.an-bars { display: flex; align-items: flex-end; gap: 14px; height: 200px; }
.an-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.an-bar {
  width: 100%; max-width: 74px; border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--accent2), rgba(78, 168, 222, .2));
  display: flex; align-items: flex-start; justify-content: center; padding-top: 5px; min-height: 18px;
}
.an-bar span { font-size: 11.5px; font-weight: 600; color: var(--tx); }
.an-lbl { font-size: 10.5px; color: var(--tx3); margin-top: 6px; text-align: center; }

/* -------------------------------------------------------- движок: layout */
.layout-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px;
}
.layout-cell {
  min-height: 96px; border-radius: 10px; padding: 10px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--panel2);
  display: flex; flex-direction: column; justify-content: space-between; transition: .14s;
}
.layout-cell:hover { border-color: var(--accent2); }
.layout-cell.sel { border-color: var(--accent); background: rgba(240, 180, 41, .12); }
.layout-cell.empty { background: transparent; border-style: dashed; opacity: .4; cursor: default; }
.lc-name { font-size: 13px; font-weight: 600; }
.lc-flow { font-size: 10.5px; color: var(--tx3); }

/* --------------------------------------------------------- движок: sched */
.sched-box { padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.gantt-row { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; }
.gantt-lbl { font-size: 12px; color: var(--tx2); }
.gantt-track { position: relative; height: 34px; background: rgba(255, 255, 255, .04); border-radius: 8px; }
.gantt-blk {
  position: absolute; top: 4px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: #0a1016;
  overflow: hidden;
}
.gantt-blk.m1 { background: var(--accent2); }
.gantt-blk.m2 { background: var(--ok); }
.seq { display: flex; gap: 6px; flex-wrap: wrap; }
.seq-btn {
  width: 38px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--tx); font: inherit; font-weight: 600;
}
.seq-btn:hover { border-color: var(--accent); }
.seq-lbl { font-size: 12px; color: var(--tx3); }

.oc-canvas { display: block; width: 100%; border-radius: 8px; }

/* ----------------------------------------------------------- карта/списки */
.map-attr {
  position: absolute; right: 8px; bottom: 6px; font-size: 10px;
  color: rgba(200, 215, 230, .5); pointer-events: none;
}
.map-hint {
  position: absolute; left: 10px; top: 10px; max-width: 62%;
  font-size: 11.5px; color: var(--tx2); background: rgba(7, 13, 19, .78);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); pointer-events: none;
}
.route-list, .site-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow: auto; font-size: 12.5px; }
.route-pick-list { max-height: none; }

/* строки «городов обхода» и маршрута */
.route-row, .route-pick {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px;
  width: 100%; padding: 5px 8px; border-radius: 9px; text-align: left;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  color: var(--tx); font: inherit; font-size: 12.5px;
}
.route-row { grid-template-columns: 22px 1fr auto auto; cursor: default; }
.route-pick { cursor: pointer; }
.route-pick:hover { background: rgba(78, 168, 222, .14); border-color: var(--line2); }
.route-pick.is-in { background: rgba(240, 180, 41, .12); border-color: rgba(240, 180, 41, .42); }
.route-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  background: rgba(120, 150, 175, .16); color: var(--tx2); font-variant-numeric: tabular-nums;
}
.route-row .route-num, .route-pick.is-in .route-num { background: var(--accent); color: #16130a; }
.route-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-leg { font-size: 11px; color: var(--tx3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-x {
  border: 0; background: transparent; color: var(--tx3); cursor: pointer;
  font: inherit; font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 6px;
}
.mini-x:hover { color: var(--bad); background: rgba(224, 122, 95, .14); }
.site-coord { font-size: 10.5px; color: var(--tx3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- страница данных */
.ptable-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable th {
  text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--tx3); background: var(--bg2); border-bottom: 1px solid var(--line);
}
.ptable td { padding: 10px 12px; border-bottom: 1px solid rgba(120, 150, 175, .08); vertical-align: top; }
.ptable tr:hover td { background: rgba(255, 255, 255, .02); }
.ptable a { color: var(--accent2); }
.ptable a:hover { text-decoration: underline; }
.rt-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.rt-live { background: rgba(127, 209, 193, .14); color: var(--ok); border: 1px solid rgba(127, 209, 193, .35); }
.rt-near { background: rgba(240, 180, 41, .12); color: var(--accent); border: 1px solid rgba(240, 180, 41, .32); }
.rt-arch { background: rgba(120, 150, 175, .12); color: var(--tx2); border: 1px solid var(--line2); }
.acc { font-size: 10.5px; color: var(--tx3); }
.acc-free { color: var(--ok); }
.acc-key { color: var(--accent); }
.acc-paid { color: var(--bad); }

/* --------------------------------------------------------------- прочее */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.step { padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.step b { color: var(--accent); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.step h4 { margin: 6px 0; font-size: 15px; }
.step p { font-size: 13px; color: var(--tx2); margin: 0; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card-block { padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); }
.card-block h3 { font-size: 16px; }
.card-block ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--tx2); }
.card-block li { margin-bottom: 6px; }

.q-list { counter-reset: q; }
.q-list li { margin-bottom: 10px; font-size: 14px; color: var(--tx2); }

.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 22px 18px; background: rgba(7, 13, 19, .6); }
.foot-cols { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 26px; }
.foot-brand { font-weight: 700; margin-bottom: 8px; color: var(--accent); }
.foot p { font-size: 12.5px; color: var(--tx3); }
.foot-h { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--tx3); margin-bottom: 8px; }
.foot a { display: block; font-size: 12.5px; color: var(--tx2); padding: 2px 0; }
.foot a:hover { color: var(--accent); }
.foot-bottom {
  max-width: 1240px; margin: 22px auto 0; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: var(--tx3); flex-wrap: wrap;
}

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast {
  padding: 10px 14px; border-radius: 9px; font-size: 13px; max-width: 320px;
  background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow);
  transition: .3s; opacity: 1;
}
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-warn { border-color: rgba(240, 180, 41, .5); }
.toast-err { border-color: rgba(224, 122, 95, .5); }

.empty-state { padding: 40px; text-align: center; color: var(--tx3); }

/* ------------------------------------------------------------- адаптив */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .cols2 { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .back-top { display: inline-flex; }
}
@media (max-width: 640px) {
  main { padding: 16px 14px 50px; }
  .hero h1 { font-size: 30px; }
  .stat b { font-size: 24px; }
  .q-row { grid-template-columns: 62px 1fr 60px; }
  .q-asa { display: none; }
  .layout-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------------- карта (MapLite) */
.map-wrap { position: relative; width: 100%; height: 100%; min-height: 460px; overflow: hidden; }
.map-canvas { display: block; cursor: grab; background: #08111b; }
.map-canvas:active { cursor: grabbing; }
.map-ctrls { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 6; }
.map-btn {
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line2); background: rgba(11, 19, 28, .92);
  color: var(--tx); font: inherit; font-size: 15px; line-height: 1;
  display: grid; place-items: center;
}
.map-btn:hover { border-color: var(--accent); color: var(--accent); }
.map-legend {
  position: absolute; left: 10px; bottom: 10px; z-index: 6;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: var(--tx2); line-height: 1.3;
  background: rgba(7, 13, 19, .78); padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); max-width: 62%;
}
.map-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.game-stage .map-wrap { min-height: 520px; }

/* --- аудит доступа (страница «Живые данные») --- */
.ptable.audit td:nth-child(2) code {
  font: 12px/1.45 "Cascadia Mono", "Consolas", monospace;
  color: var(--accent2); opacity: .9; word-break: break-all;
}
.ptable.audit tr.grp td {
  padding: 9px 12px 7px; background: rgba(240,180,41,.07);
  color: var(--accent); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  border-top: 1px solid rgba(240,180,41,.22);
}
.ptable.audit td:nth-child(3), .ptable.audit td:nth-child(4) { white-space: nowrap; }
