/* Панель «Гонка». Стиль — по макету «Панель администратора»: светлая рамка с фиолетовым свечением
   на чёрном, тёмные обводки, серые плашки, цветные статусы. Mobile-first. */

@font-face { font-family: 'Unbounded'; src: url('../fonts/unbounded-latin-wght-normal.woff2') format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; src: url('../fonts/unbounded-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20BD; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-cyrillic-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20BD; }

:root {
  --font-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Manrope', 'Segoe UI', system-ui, sans-serif;

  --page: #050505;
  --frame: #d9d9d9;
  --frame-edge: #ececec;
  --glow: #a61cff;
  --ink: #262626;          /* тёмные обводки и текст */
  --ink-2: #3a3a3a;
  --plate: #9d9d9d;        /* серые плашки */
  --plate-2: #b4b4b4;
  --plate-text: #f4f4f4;
  --muted: #5c5c5c;

  --free: #22c55e;
  --busy: #1fb6e8;
  --booked: #a855f7;
  --interrupted: #f59e0b;
  --offline: #6b6b6b;
  --danger: #e0242d;
  --danger-ink: #fff;

  --r-frame: 28px;
  --r-card: 18px;
  --r-pill: 999px;
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 15px/1.4 var(--font-text);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- рамка приложения ---------- */

.frame {
  margin: 8px;
  min-height: calc(100dvh - 16px);
  background: var(--frame);
  border: 3px solid var(--frame-edge);
  border-radius: var(--r-frame);
  box-shadow: 0 0 0 1px #5d1a8a, 0 0 28px 2px color-mix(in srgb, var(--glow) 70%, transparent);
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: 'top' 'main' 'nav';
  overflow: clip;
}
.top { grid-area: top; }
.main { grid-area: main; }
.nav { grid-area: nav; position: sticky; bottom: 0; z-index: 20; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions .lbl { display: none; }
.top-actions .btn-sm { width: 40px; height: 40px; padding: 0; }

.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 8px;
  flex-wrap: wrap;
}
.logo {
  font: 900 26px/1 var(--font-display);
  letter-spacing: .02em;
  color: var(--ink);
  margin-right: auto;
  user-select: none;
}
.search {
  order: 3;
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--tap);
  padding: 0 14px;
  background: var(--plate);
  border: 2px solid var(--ink);
  border-radius: var(--r-pill);
  position: relative;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--plate-text);
  font-family: var(--font-display);
  font-size: 12px;
}
.search input::placeholder { color: #ececec; opacity: .8; text-transform: lowercase; }
.search svg { flex: none; }
.search-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  background: var(--frame);
  border: 2px solid var(--ink);
  border-radius: var(--r-card);
  z-index: 30;
  max-height: 60dvh;
  overflow: auto;
  box-shadow: 0 10px 30px #0005;
}
.search-results button {
  display: flex; justify-content: space-between; gap: 8px;
  width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left;
  border-bottom: 1px solid #0001;
}
.search-results button:hover, .search-results button:focus-visible { background: #0000000d; }

.role-pill {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--ink);
  color: #f2f2f2;
  font: 500 12px/40px var(--font-display);
  text-transform: lowercase;
  white-space: nowrap;
}

/* ---------- навигация ---------- */

.nav {
  display: flex;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav a {
  flex: 1 0 auto;
  min-width: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 8px;
  border-radius: 14px;
  color: #cfcfcf;
  text-decoration: none;
  font: 500 9.5px/1.1 var(--font-display);
  text-transform: lowercase;
}
.nav a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.nav a[aria-current='page'] { background: var(--plate); color: #fff; }

.main { padding: 4px 8px 12px; min-width: 0; }

/* ---------- плашки, кнопки, карточки ---------- */

.box {
  border: 6px solid var(--ink);
  border-radius: 26px;
  background: var(--frame);
  padding: 14px;
}
.card {
  border: 4px solid var(--ink);
  border-radius: var(--r-card);
  background: var(--plate-2);
  padding: 14px;
}
.card + .card, .box + .box, .card + .box, .box + .card { margin-top: 10px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 10px; letter-spacing: .01em; }
h1 { font-size: 19px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
.lc { text-transform: lowercase; }
/* Коды Steam Guard и ключ восстановления: регистр важен, цифры одной ширины. */
.code-text, .btn.code-text { text-transform: none; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink);
  background: var(--plate);
  color: #fff;
  font: 500 12px/1.1 var(--font-display);
  text-transform: lowercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-danger { background: var(--danger); border-color: #8c0d13; color: var(--danger-ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-col { display: grid; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--plate);
  display: inline-grid; place-items: center; color: #fff;
}
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--plate);
  border: 2px solid var(--ink);
  color: #fff;
  font: 500 10.5px/1 var(--font-display);
  text-transform: lowercase;
}
.pill b { font-weight: 600; }

/* Выбор ПК вверху разделов настроек */
.pc-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.pc-pick-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border-radius: 14px;
  background: var(--plate); border: 3px solid var(--ink); color: #fff;
  font: 600 13px/1 var(--font-display); text-transform: lowercase; cursor: pointer;
}
.pc-pick-btn:hover { filter: brightness(1.08); }
.pc-pick-btn[aria-selected='true'] { background: var(--ink); box-shadow: 0 0 0 3px var(--glow); }

/* Компактные настройки отчёта на экране «выручка» */
.report-settings { margin-bottom: 14px; }
.report-settings > summary { cursor: pointer; font: 500 11px/1 var(--font-display); text-transform: lowercase; color: var(--muted); padding: 4px 0; }
.report-settings .row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin-top: 8px; }
.report-settings .row .field { margin: 0; }
.report-settings .row .input { width: 96px; }
.report-settings .row label.check { margin: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.report-settings .row .btn { height: 44px; }
.pill .n-free { color: #9ff5bd; } .pill .n-busy { color: #a5e8ff; }
.pill .n-interrupted { color: #ffd38a; } .pill .n-offline { color: #d6d6d6; } .pill .n-maintenance { color: #ffb36b; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--offline); flex: none; }
.dot.free { background: var(--free); } .dot.busy { background: var(--busy); }
.dot.interrupted { background: var(--interrupted); } .dot.maintenance { background: #f97316; }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--interrupted) 30%, transparent); } }

/* ---------- плитки ПК ---------- */

.pcs-layout { display: grid; gap: 10px; }
.pc-map { position: relative; display: grid; gap: 10px; }
.pc-map svg.track { display: none; }

.pc-tile {
  position: relative;
  border: 6px solid var(--ink);
  border-radius: 22px;
  background: var(--frame);
  padding: 5px;
  text-align: left;
  width: 100%;
}
.pc-tile .inner {
  border: 2px solid color-mix(in srgb, var(--state, var(--offline)) 55%, #fff);
  border-radius: 14px;
  background: var(--plate);
  min-height: 84px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  color: #fff;
}
.pc-tile.free { --state: var(--free); } .pc-tile.busy { --state: var(--busy); }
.pc-tile.interrupted { --state: var(--interrupted); } .pc-tile.maintenance { --state: #f97316; }
.pc-tile[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--glow); }
.pc-tile .name { font: 500 13px/1 var(--font-display); color: #eee; }
.pc-tile .dot { justify-self: end; }
.pc-tile .status {
  grid-column: 1 / -1; align-self: end; justify-self: end; text-align: right;
  font: 600 12.5px/1.25 var(--font-display); color: color-mix(in srgb, var(--state, #ddd) 70%, #fff);
  text-transform: lowercase;
  text-shadow: 0 1px 2px #0009, 0 0 1px #000a;
}
.pc-tile .status small { display: block; font: 500 10px/1.3 var(--font-text); color: #f1f1f1; text-transform: none; }
.pc-tile .who { grid-column: 1 / -1; font-size: 12px; color: #f5f5f5; opacity: .9; align-self: center; }
/* Бронь в ближайшие 3 часа: метка над плиткой. */
.pc-tile.booked { border-color: #b45309; }
.pc-tile .booking-badge {
  position: absolute; top: -13px; right: 12px; max-width: calc(100% - 24px);
  padding: 3px 9px; border-radius: 99px; background: #f59e0b; color: #1b1b1b;
  font: 600 10.5px/1.2 var(--font-display); text-transform: lowercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 0 0 2px var(--ink);
}

/* ---------- бронирования ---------- */

.booking-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.booking-bar .seg { width: auto; }
.booking-day { margin-bottom: 18px; }
.booking-day h2 { font-size: 13px; margin: 0 0 8px; text-transform: lowercase; }
.booking-row {
  display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 14px; margin-bottom: 8px; border: 2px solid var(--ink); border-radius: 16px; background: var(--plate-2);
}
.booking-row.soon { border-color: #b45309; box-shadow: inset 4px 0 0 #f59e0b; }
.booking-row.now { border-color: #15803d; box-shadow: inset 4px 0 0 var(--free); }
.booking-row.cancelled, .booking-row.past { opacity: .6; }
.booking-row.cancelled .booking-time b { text-decoration: line-through; }
.booking-time { display: grid; gap: 2px; }
.booking-time b { font: 600 15px/1.2 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.booking-bar .seg button { padding: 0 16px; }
.booking-info { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.booking-places { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 2px 9px; border: 2px solid var(--ink); border-radius: 99px; font: 600 11px/1.3 var(--font-display); background: var(--frame); }
.chip.on { background: var(--free); }
.booking-when { display: flex; flex-wrap: wrap; gap: 12px; }
.booking-places-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 8px; }
.booking-places-pick .place { margin: 0; min-height: 36px; }
.booking-minutes { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.booking-minutes .input { width: 120px; flex: none; }
@media (max-width: 640px) {
  .booking-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* ---------- деталь ПК / формы ---------- */

.detail { min-width: 0; }
.detail .head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.detail .head h1 { margin: 0; }
.detail .state-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-bottom: 12px; }
.big-time { font: 600 34px/1.1 var(--font-display); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; margin: 8px 0 12px; }
.kv dt { color: var(--muted); text-transform: lowercase; font-family: var(--font-display); font-size: 10.5px; padding-top: 2px; }
.kv dd { margin: 0; text-align: right; }

.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > span { font: 500 10.5px/1.2 var(--font-display); text-transform: lowercase; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap);
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #f3f3f3;
  outline: none;
}
.input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--glow) 35%, transparent); }

/* Выпадающий список в стиле панели (js/select.js): кнопка как поле ввода + тёмный список */
.cs-native { display: none !important; }
.cs-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-align: left; cursor: pointer; color: var(--ink); font: 15px/1.2 var(--font-text);
  transition: box-shadow .15s ease;
}
.cs-btn:disabled { opacity: .5; cursor: not-allowed; }
.cs-btn:focus-visible, .cs-btn.open { box-shadow: 0 0 0 3px color-mix(in srgb, var(--glow) 35%, transparent); }
.cs-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-caret { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-2px) rotate(45deg); transition: transform .18s ease; }
.cs-btn.open .cs-caret { transform: translateY(2px) rotate(-135deg); }
.cs-pop {
  position: fixed; z-index: 90; overflow: auto; overscroll-behavior: contain;
  background: var(--ink); border: 2px solid #1b1b1b; border-radius: 18px; padding: 6px;
  box-shadow: 0 18px 44px #0007, 0 0 0 1px #ffffff0d, 0 0 26px color-mix(in srgb, var(--glow) 28%, transparent);
  animation: cs-in .14s ease-out;
  scrollbar-width: thin; scrollbar-color: #555 transparent;
}
.cs-pop.up { animation-name: cs-in-up; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes cs-in-up { from { opacity: 0; transform: translateY(4px); } }
.cs-list { list-style: none; margin: 0; padding: 0; outline: none; }
.cs-opt {
  position: relative; padding: 11px 16px 11px 30px; border-radius: 12px; cursor: pointer;
  color: #e9e9e9; font: 14.5px/1.25 var(--font-text); white-space: nowrap;
}
.cs-opt.active { background: #3b3b3b; color: #fff; }
.cs-opt[aria-selected='true'] { font-weight: 700; color: #fff; }
.cs-opt[aria-selected='true']::before {
  content: ''; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow);
}
.cs-opt[aria-disabled='true'] { opacity: .4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .cs-pop { animation: none; } .cs-caret { transition: none; } }
textarea.input { min-height: 74px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin: 1px 0 0; flex: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 2px solid var(--ink); border-radius: var(--r-pill); overflow: hidden; }
.seg button { min-height: 40px; border: 0; background: var(--plate-2); font: 500 11px/1 var(--font-display); text-transform: lowercase; color: var(--ink); }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed='true'] { background: var(--ink); color: #fff; }

.pkg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pkg-row .btn { flex: 1 1 0; min-width: 76px; }
.pkg-row .btn .small { font-family: var(--font-text); text-transform: none; opacity: .85; }

.total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 12px 14px; margin: 6px 0 12px;
  background: var(--ink); color: #fff; border-radius: 16px;
}
.total .sum { font: 600 22px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.total .sub { font-size: 12px; opacity: .8; }
.hint { padding: 10px 12px; border-radius: 12px; background: #fff7d6; border: 2px solid #c9a227; font-size: 13px; margin-bottom: 12px; }
.alert { padding: 12px 14px; border-radius: 14px; border: 2px solid var(--ink); background: #fff; margin-bottom: 12px; }
.alert.warn { background: #fff1d6; border-color: #b7791f; }
.alert.err { background: #ffe1e2; border-color: #a1161d; }
.alert.ok { background: #dcfce7; border-color: #15803d; }

.charges { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 4px 0 12px; }
.charges td { padding: 6px 0; border-bottom: 1px solid #00000014; vertical-align: top; }
.charges td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin: 0 -2px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font: 500 10px/1.2 var(--font-display); text-transform: lowercase; color: var(--muted); padding: 8px 8px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data td { padding: 9px 8px; border-bottom: 1px solid #0000001a; vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: #0000000a; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--ink); color: #fff; border-radius: 16px; padding: 12px; min-width: 0; }
.stat .k { font: 500 9.5px/1.2 var(--font-display); text-transform: lowercase; opacity: .75; }
.stat .v { font: 600 18px/1.2 var(--font-display); font-variant-numeric: tabular-nums; margin-top: 6px; overflow-wrap: anywhere; }

.list-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid #0000001a; }
.list-item:last-child { border-bottom: 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 11px; }
.tag.warn { background: #b45309; } .tag.ok { background: #15803d; } .tag.off { background: #7a7a7a; }

/* ---------- модальное окно / нижний лист ---------- */

.sheet-back { position: fixed; inset: 0; background: #000a; z-index: 50; display: grid; align-items: end; }
.sheet {
  background: var(--frame);
  border-radius: 24px 24px 0 0;
  border: 3px solid var(--frame-edge);
  border-bottom: 0;
  max-height: 92dvh; overflow: auto;
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 0 30px color-mix(in srgb, var(--glow) 55%, transparent);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #0003; margin: -6px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: 84px; display: grid; justify-items: center; gap: 6px; z-index: 80; pointer-events: none; }
.toast { pointer-events: auto; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 8px 24px #0006; font-size: 14px; }
.toast.err { background: #8f1218; }

.secret { font: 600 15px/1.4 ui-monospace, Consolas, monospace; background: #fff; border: 2px dashed var(--ink); border-radius: 12px; padding: 12px; word-break: break-all; user-select: all; }

/* ---------- вход ---------- */

.login { min-height: calc(100dvh - 16px); display: grid; place-items: center; padding: 20px; }
.login .box { width: min(400px, 100%); }
.login .logo { display: block; text-align: center; margin: 4px 0 18px; font-size: 34px; }

.empty { text-align: center; padding: 26px 10px; color: var(--muted); }

/* ---------- редактор фото для экранов ПК ---------- */
.editor-canvas { display: block; width: 100%; border-radius: 14px; background: #050505; touch-action: none; cursor: grab; outline: none; }
.editor-canvas:active { cursor: grabbing; }
.editor-cover .editor-canvas { max-width: 680px; margin: 0 auto; }
.editor-canvas:focus-visible { box-shadow: 0 0 0 3px var(--glow); }
.editor-controls { margin: 10px 0 14px; }
.editor-range { display: grid; grid-template-columns: 90px 1fr 56px; align-items: center; gap: 10px; margin: 8px 0; }
.editor-range input { width: 100%; accent-color: var(--ink); }
.warn-text { color: #a1161d; font-weight: 600; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gallery-item { border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: #111; display: grid; }
.gallery-item.on { border-color: var(--glow); }
.gallery-item img, .gallery-item .vid { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; display: block; }
.gallery-item .vid { display: grid; place-items: center; color: #ddd; font: 600 12px var(--font-display); }
.gallery-item .row { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 6px 8px; background: var(--plate-2); }
.gallery-item label { display: flex; gap: 6px; align-items: center; font-size: 12px; }
/* Карточка настроек «по центру» (.cc): всё центрировано, один ритм отступов (--gap) по вертикали и горизонтали,
   короткие поля — по содержимому (w-s / w-m / w-l), а не на всю ширину. */
.cc { --gap: 22px; padding: var(--gap); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); justify-items: center; text-align: center; }
.card.cc + .card.cc, .pc-pick + div + .card.cc { margin-top: 14px; }
.cc-head h2 { margin-bottom: 6px; }
.cc-head p { margin: 0; max-width: 620px; }
.cc .w-s { width: 92px; text-align: center; }
.cc input[type=time].w-s { width: 124px; }
.cc .w-m, .sheet .w-m, .alert .w-m { width: 240px; }
.cc .w-l { width: 420px; }
.cc .input { max-width: 100%; }
.cc textarea.w-m { width: 300px; min-height: 110px; text-align: left; }
.cc label.check { margin: 0; text-align: left; max-width: 520px; }
.cc-opts { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: var(--gap) calc(var(--gap) * 1.5); }
.cc-opts .opt { display: grid; gap: 6px; justify-items: center; max-width: 100%; }
.opt-label { font: 500 10.5px/1.2 var(--font-display); text-transform: lowercase; color: var(--ink-2); }
.cc-opts .opt-num { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.cc-opts .opt-num .input { width: 92px; text-align: center; }
.cc-opts .opt-inline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.cc-opts .opt-inline select.input, .cc-opts .opt-inline .cs-btn { width: 240px; }
.cc-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: var(--gap); border-top: 2px solid #00000014; width: 100%; }
.cc-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cc-stat { display: grid; gap: 6px; justify-items: center; min-width: 150px; padding: 12px 18px; border: 2px solid var(--ink); border-radius: 14px; background: var(--plate); color: #fff; }
.cc-stat .opt-label { color: #e4e4e4; }
.cc-stat b { font: 600 13px/1.2 var(--font-display); text-transform: lowercase; }
.cc-stat.ok b { color: #9ff5bd; } .cc-stat.warn b { color: #ffd38a; }
.cc-chips { display: grid; gap: 8px; justify-items: center; }
.cc-chips .btn-row { justify-content: center; }
.cc-chips p:empty, .cc-chips .btn-row:empty { display: none; }
.cc-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; font: 500 10.5px/1 var(--font-display); text-transform: lowercase; color: var(--muted); }
.cc-divider::before, .cc-divider::after { content: ''; flex: 1; height: 2px; background: #00000014; }
.cc-divider + .card.cc { margin-top: 10px; }
.cc-table { width: 100%; max-width: 760px; text-align: left; }

/* Плитки (галерея экрана ожидания, игры): одна ширина, по центру, последняя — «добавить». */
.cc .gallery-grid, .cc-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 0; width: 100%; }
.cc .gallery-item, .gallery-add { width: 196px; }
.cc .gallery-item { grid-template-rows: auto 1fr; }
.cc .gallery-item .row { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px 10px; }
.cc .gallery-item label { justify-content: center; }
.cc .gallery-item .btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cc .gallery-item .btn-row .btn { padding: 0 6px; }
.gallery-add, .tile-add {
  display: grid; place-content: center; justify-items: center; gap: 6px;
  min-height: 160px; border: 3px dashed var(--ink-2); border-radius: 14px; background: none;
  color: var(--ink); font: 500 11px/1.2 var(--font-display); text-transform: lowercase; cursor: pointer;
  transition: background .15s ease;
}
.gallery-add:hover, .tile-add:hover { background: #0000000d; }
.gallery-add .plus, .tile-add .plus { font: 400 30px/1 var(--font-display); }
.gallery-add input[type=file] { display: none; }
/* Турниры */
.tour-list { width: 100%; max-width: 860px; display: grid; gap: 10px; justify-items: center; }
.tour-row { width: 100%; display: grid; grid-template-columns: 188px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px; border: 2px solid var(--ink); border-radius: 16px; text-align: left; }
a.tour-row { color: inherit; text-decoration: none; }
a.tour-row:hover { background: #0000000a; }
.tour-row.past { opacity: .8; }
.tour-banner { width: 100%; max-width: 860px; aspect-ratio: 1250 / 400; object-fit: cover; border-radius: 16px; display: block; }
.tour-pre { white-space: pre-wrap; max-width: 760px; margin: 0; text-align: left; }
.tour-rules { max-width: 760px; width: 100%; text-align: left; }
.tour-rules > summary { cursor: pointer; font: 500 11px/1.4 var(--font-display); text-transform: lowercase; text-align: center; }
.tour-result { width: 220px; }
.cc .tour-place, .cs-btn.tour-place { width: 150px; }
tr.tour-win td { font-weight: 700; }
.tour-row > img, .tour-noimg { width: 188px; aspect-ratio: 1250 / 400; object-fit: cover; border-radius: 10px; display: grid; place-items: center; background: #0000001a; font-size: 11.5px; color: var(--muted); }
.tour-info { display: grid; gap: 2px; min-width: 0; }
.tour-info b { font: 600 13.5px/1.25 var(--font-display); overflow-wrap: anywhere; }
.tour-form { width: 100%; display: grid; gap: 14px; justify-items: center; }
.tour-form h3 { margin: 0; }
.tour-field { display: grid; gap: 6px; justify-items: center; width: 100%; max-width: 690px; }
.tour-text { width: 100%; text-align: left; }
.tour-image { display: grid; gap: 8px; justify-items: center; width: 100%; max-width: 420px; }
.tour-image img { width: 100%; aspect-ratio: 1250 / 400; object-fit: cover; border-radius: 12px; display: block; }
.tour-image > span { font-size: 12.5px; color: var(--muted); }
.tour-image .btn-row { justify-content: center; }
.tour-image input[type=file] { display: none; }
@media (max-width: 600px) {
  .tour-row { grid-template-columns: minmax(0, 1fr); }
  .tour-row > img, .tour-noimg { width: 100%; }
}

.game-tile { width: 280px; display: grid; grid-template-rows: auto auto 1fr auto; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--plate-2); text-align: left; }
.game-cover { aspect-ratio: 390 / 240; position: relative; background: #111; display: grid; place-items: center; color: #aaa; font: 500 11px var(--font-display); text-transform: lowercase; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.game-cover > span { position: relative; }
.cover-actions { padding: 10px 12px 0; }
.cover-actions .btn-row { justify-content: center; gap: 6px; }
.cover-actions .btn { min-height: 30px; padding: 0 11px; font-size: 10.5px; }
.cover-actions input[type=file] { display: none; }
.cover-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.cover-pick-item { padding: 0; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #111; cursor: pointer; aspect-ratio: 390 / 240; }
.cover-pick-item:hover { border-color: var(--glow); }
.cover-pick-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-fields { padding: 12px 12px 0; }
.game-fields .field { margin-bottom: 10px; }
.game-actions { display: grid; grid-template-columns: auto auto 1fr; gap: 6px; padding: 0 12px 12px; }
.tile-add { width: 280px; min-height: 200px; align-self: center; }

@media (max-width: 600px) {
  .cc { --gap: 16px; }
  .cc .gallery-grid, .cc-tiles { gap: 10px; }
  .cc .gallery-item, .gallery-add { width: calc(50% - 5px); }
  .gallery-add { min-height: 120px; }
  .cc .gallery-item .btn-row { grid-template-columns: 1fr; }
  .game-tile, .tile-add { width: 100%; }
  .cc-opts .opt:has(.w-l) { width: 100%; }
  .cc .w-l { width: 100%; }
  .tile-add { min-height: 90px; }
}
.spacer-top { margin-top: 16px; }
.ml { margin-left: 8px; }
.search { color: #f4f4f4; }
.pill.on, a.pill[aria-current='page'] { background: var(--ink); }
a.pill { text-decoration: none; }
td.warn { color: #a1161d; font-weight: 600; }
button.pick { width: 100%; border: 0; border-bottom: 1px solid #0000001a; background: none; text-align: left; cursor: pointer; padding: 12px 6px; }
button.pick:hover { background: #0000000a; }
a.list-item { color: inherit; text-decoration: none; }
.pkg-edit { padding: 8px 0; border-bottom: 1px solid #0000001a; margin-bottom: 8px; }
.hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.card a:not(.btn) { color: var(--ink); }
.spacer { height: 10px; }
.grid2 { display: grid; gap: 10px; }

/* ---------- планшет и ПК у стойки ---------- */

@media (min-width: 720px) {
  .frame { margin: 14px; min-height: calc(100dvh - 28px); }
  .search { order: 0; flex: 0 1 340px; margin-left: 12px; }
  .logo { margin-right: 0; font-size: 30px; }
  .top-actions { margin-left: auto; }
  .top-actions .lbl { display: inline; }
  .top-actions .btn-sm { width: auto; height: auto; padding: 0 12px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .sheet-back { align-items: center; justify-items: center; }
  .sheet { border-radius: 24px; border-bottom: 3px solid var(--frame-edge); width: min(560px, calc(100vw - 40px)); }
  .sheet.sheet-wide { width: min(1240px, calc(100vw - 40px)); }
  .sheet .grab { display: none; }
}

@media (min-width: 1024px) {
  .frame {
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: 'top top' 'nav main';
  }
  .top { grid-area: top; padding: 18px 20px 12px; }
  .nav {
    grid-area: nav;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 18px 18px;
    padding: 12px 10px;
    border-radius: 22px;
    align-self: start;
  }
  .nav a {
    flex: none;
    flex-direction: row;
    gap: 8px;
    padding: 0 12px;
    height: 38px;
    border-radius: var(--r-pill);
    background: var(--plate);
    border: 2px solid #1b1b1b;
    color: #f0f0f0;
    font-size: 10.5px;
  }
  .nav a svg { width: 16px; height: 16px; }
  .nav a[aria-current='page'] { background: #d0d0d0; color: var(--ink); }
  .main { grid-area: main; padding: 0 18px 18px 14px; overflow: auto; }
  .nav { position: static; }
  .main > .box { min-height: 100%; }

  .pcs-layout { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
  .detail-desktop { position: sticky; top: 0; }

  /* Карта ПК как на макете: ПК соединены «трассой». */
  .pc-map { display: block; height: 560px; } /* с PS5 под ПК 1 — на ряд выше */
  .pc-map svg.track { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .pc-map svg.track path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; opacity: .85; }
  /* Позиции считает drawTrack() — сеть центрируется по ширине и высоте карты. */
  .pc-map .pc-tile { position: absolute; width: 210px; }
  .pc-map .pc-tile .inner { height: 92px; min-height: 0; overflow: hidden; }
}

@media (min-width: 1440px) {
  .pcs-layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .pc-map { height: 640px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

label.btn input[type=file] { display: none; }

.pc-tile.disabled { --state: #8a8a8a; }
.pc-tile.sleep { --state: #8fb3ff; }
.dot.sleep { background: #8fb3ff; }
.pill .n-sleep { color: #b9cdff; }

/* Нагрузка ПК в карточке */
.metrics { display: grid; gap: 10px; }
.metrics h3 { margin-bottom: 0; }
.meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 5px; }
.meter-head span { font: 500 10.5px/1.4 var(--font-display); color: var(--ink-2); }
.meter-head b { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-bar { height: 8px; border-radius: 99px; background: #00000018; overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .4s ease; }
.meter.warm .meter-bar i { background: #c98a12; }
.meter.hot .meter-bar i { background: var(--danger); }
.spark { margin: 2px 0 0; }
.spark svg { display: block; width: 100%; height: 56px; border-radius: 10px; background: #00000010; }
.spark path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark path.cpu { stroke: var(--ink); }
.spark path.ram { stroke: #8a2be2; opacity: .75; }
.spark figcaption { margin-top: 4px; }
.spark .key::before { content: ''; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin: 0 5px 2px 0; vertical-align: middle; }
.spark .key.cpu::before { background: var(--ink); }
.spark .key.ram { margin-left: 10px; }
.spark .key.ram::before { background: #8a2be2; }
.launch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

/* Смена пароля */
.pass-wrap { position: relative; display: block; width: 260px; max-width: 100%; }
.pass-wrap .input { width: 100%; padding-right: 92px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 30px; padding: 0 10px; font-size: 10.5px; }
.pass-eye:active { transform: translateY(-50%) scale(.98); }

/* Автозагрузка */
.cc-plain { padding: 0; border: 0; background: none; }
.startup-out { width: 100%; display: grid; gap: 14px; justify-items: center; }
.startup-out:empty { display: none; }
.startup-table td { vertical-align: middle; }
.startup-table tr.off td:not(:last-child) { opacity: .5; }
.startup-table .cmd { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verdict { display: inline-block; padding: 3px 9px; border-radius: 99px; font: 500 10.5px/1.3 var(--font-display); text-transform: lowercase; background: #00000014; }
.verdict.ok { background: #1f9d5526; color: #12693a; }
.verdict.bad { background: #b5121b22; color: #a1161d; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #00000030; transition: background .15s ease; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--glow); }

/* Журнал действий */
.audit-filters { display: grid; gap: 10px; margin: 6px 0 16px; }
.audit-cats { margin: 0; }
.audit-cats .pill { cursor: pointer; }
.audit-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.audit-selects .w-s-audit { width: 130px; }
.audit-selects .w-m-audit { width: 200px; }
.audit-day { font-size: 12px; text-transform: lowercase; color: var(--ink-2); margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.audit-day:first-child { margin-top: 0; }
.audit-day-list { list-style: none; margin: 0; padding: 0; }
.audit-row { display: grid; grid-template-columns: 92px 10px minmax(0, 1fr) auto; gap: 0 12px; align-items: start; padding: 10px 8px; border-bottom: 1px solid #00000012; border-radius: 10px; }
.audit-row time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-2); padding-top: 1px; }
.audit-mark { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; background: #9a9a9a; }
.cat-sessions .audit-mark { background: var(--ink); }
.cat-money .audit-mark { background: #1f9d55; }
.cat-clients .audit-mark { background: #2f6fd6; }
.cat-pcs .audit-mark { background: #8a2be2; }
.cat-settings .audit-mark { background: #8a8a8a; }
.cat-security .audit-mark { background: #c98a12; }
.audit-title { font-weight: 600; font-size: 13.5px; }
.audit-count { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--ink); color: #fff; font: 600 10.5px/1.5 var(--font-display); vertical-align: 1px; }
.audit-row time { white-space: nowrap; }
.audit-details { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.audit-actor { font-size: 12px; color: var(--ink-2); white-space: nowrap; padding-top: 1px; }
.tone-bad .audit-title { color: #a1161d; }
.tone-warn .audit-title { color: #8a5a00; }
.audit-row.clickable { cursor: pointer; }
.audit-row.clickable:hover { background: #0000000a; }
.audit-row.clickable:focus-visible { outline: 3px solid var(--glow); outline-offset: -3px; }
.audit-more { display: flex; justify-content: center; margin-top: 14px; }
@media (max-width: 600px) {
  .audit-row { grid-template-columns: 84px 10px minmax(0, 1fr); }
  .audit-actor { grid-column: 3; padding-top: 4px; }
  .audit-selects .w-s-audit, .audit-selects .w-m-audit { width: calc(50% - 4px); }
}

/* Кликабельные строки таблиц (история сессий клиента) */
table.data.clickable tbody tr { cursor: pointer; }
table.data.clickable tbody tr:hover { background: #0000000a; }
table.data.clickable tbody tr:focus-visible { outline: 3px solid var(--glow); outline-offset: -3px; }
.link-like { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Журнал сессии */
.timeline h3 { margin: 14px 0 8px; }
.tl-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.tl-games { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip { display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: #fff; min-width: 140px; }
.tl-chip b { font: 600 13px/1.2 var(--font-display); }
.tl-chip span { font-size: 12.5px; color: #e6e6e6; }
.tl-list { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl-list::before { content: ''; position: absolute; left: 61px; top: 6px; bottom: 6px; width: 2px; background: #00000018; }
.tl-list li { display: grid; grid-template-columns: 48px 14px minmax(0, 1fr) auto; align-items: baseline; gap: 0 8px; padding: 6px 0; }
.tl-list li::before { content: ''; grid-column: 2; grid-row: 1; width: 10px; height: 10px; border-radius: 50%; background: #9a9a9a; box-shadow: 0 0 0 3px var(--plate-2); align-self: center; }
.tl-list time { grid-column: 1; grid-row: 1; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-2); }
.tl-text { grid-column: 3; font-size: 13.5px; }
.tl-dur { grid-column: 4; font: 600 12px/1 var(--font-display); background: var(--ink); color: #fff; padding: 5px 9px; border-radius: 99px; white-space: nowrap; }
.tl-list li.tl-game::before { background: #8a2be2; }
.tl-list li.tl-money::before { background: #1f9d55; }
.tl-list li.tl-warn::before { background: #c98a12; }
.tl-list li.tl-session::before { background: var(--ink); }
.dot.disabled { background: #8a8a8a; }
.pill .n-disabled { color: #e0e0e0; }

.gallery-item .row { flex-wrap: wrap; }
.gallery-item .btn-row { gap: 4px; }

/* ---------- телефон и планшет: оболочка неподвижна, прокручивается только содержимое ---------- */

html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; }
.nav-more {
  display: none; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 8px; border: 0; border-radius: 14px; background: none;
  color: #cfcfcf; font: 500 9.5px/1.1 var(--font-display); text-transform: lowercase;
}
.nav-more svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; }
.nav-more.on { background: var(--plate); color: #fff; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }

@media (max-width: 1023px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { position: fixed; inset: 0; width: 100%; min-height: 0; }
  #app { height: 100%; }
  .frame { height: calc(100% - 28px); min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
  .main { overflow: hidden auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .login { grid-row: 1 / -1; min-height: 0; overflow: auto; }
  /* Шрифт полей меньше 16px заставляет iPhone приближать страницу при нажатии на поле. */
  input, select, textarea, .cs-btn, .search input { font-size: 16px; }
}

@media (max-width: 640px) {
  .nav { overflow: hidden; }
  .nav a, .nav-more { flex: 1 1 auto; min-width: 0; padding: 6px 5px; font-size: 8.5px; }
  .nav .nav-extra { display: none; }
  .nav-more { display: flex; }
}

@media (max-width: 600px) {
  .frame { margin: 6px; height: calc(100% - 12px); border-radius: 22px; }
  .main { padding: 2px 6px 8px; }
  .box { border-width: 4px; border-radius: 20px; padding: 10px; }
  .card { border-width: 3px; padding: 12px; }
  .pills { gap: 4px; }
  .pill { height: 26px; padding: 0 9px; font-size: 9.5px; }
  .pc-map { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pc-tile { border-width: 4px; border-radius: 18px; padding: 3px; }
  .pc-tile .inner { min-height: 104px; padding: 9px 10px; }

  /* Таблицы — карточками: подпись слева, значение справа, ничего не уезжает за край. */
  table.data, table.data tbody { display: block; width: 100%; }
  table.data thead { display: none; }
  table.data tr { display: block; padding: 8px 0; border-bottom: 2px solid #0000001f; }
  table.data td, table.data td.num { display: block; padding: 3px 4px; border: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  table.data td[data-label]::before {
    content: attr(data-label); float: left; margin-right: 12px;
    font: 500 10px/1.8 var(--font-display); text-transform: lowercase; color: var(--muted);
  }
  table.data td:not([data-label]) { text-align: left; }
  table.data .btn-row { justify-content: flex-start; }
  .startup-table .cmd { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .tour-result, .cc .tour-place, .cs-btn.tour-place { width: 170px; max-width: 100%; }
}

/* Обновления: ПК с версиями и галочками */
.upd-list { width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.upd-pc { display: grid; justify-items: center; gap: 6px; padding: 14px 10px; border: 3px solid var(--ink); border-radius: 16px; background: var(--plate); color: #fff; cursor: pointer; }
.upd-pc.off { cursor: default; opacity: .75; }
.upd-pc input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.upd-name { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--font-display); text-transform: lowercase; }
.upd-pc b { font: 600 17px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.upd-state { font-size: 12px; color: #ececec; }
.upd-state.ok { color: #9ff5bd; } .upd-state.warn { color: #ffd38a; }
.cc > p.small.muted:empty { display: none; }

/* Скрытая игра: в лаунчере плитки нет, в настройках — бледная */
.cc .game-tile label.check.game-hide { margin: 0 12px 10px; font-size: 13px; }
.game-tile.hidden-game .game-cover, .game-tile.hidden-game .game-fields { opacity: .45; }
.prices-kind { margin: 4px 0 12px; }
.prices-kind .seg { width: auto; display: inline-flex; }
.prices-kind .seg button { padding: 0 18px; }

/* ---------- несколько мест сразу: флажки на плитках и панель действий ---------- */

.pc-tile { cursor: pointer; }
.pc-tile:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.pc-tile .pc-check {
  position: absolute; top: -9px; left: -9px; z-index: 2; width: 24px; height: 24px; margin: 0;
  accent-color: #a61cff; cursor: pointer; box-shadow: 0 0 0 2px var(--ink); border-radius: 6px;
}
.pc-tile.picked { box-shadow: 0 0 0 3px #a61cff; }
.bulk-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px;
  padding: 10px 14px; border: 2px solid var(--ink); border-radius: 16px; background: var(--plate-2);
}
.bulk-bar > b { font: 600 12.5px/1.3 var(--font-display); text-transform: lowercase; }
.bulk-bar .btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.multi-total { margin: 8px 0 12px; display: grid; gap: 2px; }
