/* BLACK SEA -- стиль сайта-магазина. Сделан с нуля по логотипу (2026-09-25):
   круг с «Большой волной» в тёмно-синих тонах и чёрные мазки «BS» с белой
   обводкой. Отсюда:
     * фон -- ночное море, поверхности -- «глубина» разных слоёв;
     * акцент -- голубой гребня и светлая пена, а не случайный яркий цвет;
     * заголовки -- тяжёлые, прописные, с «мазком кисти» под ними; главный
       заголовок чёрный с белой обводкой, как буквы на логотипе;
     * волн нет (были внизу героя, шапки магазина и профиля -- убраны по
       просьбе пользователя 2026-09-30); подвал простой.
   Внешних шрифтов и библиотек нет: сайт не зависит от чужих серверов, а
   строгий CSP на бою ничего не отрежет. */

:root {
  --bg: #050e17;
  --bg-2: #081725;
  --surface: #0c1f30;
  --surface-2: #11293f;
  --surface-3: #16334d;
  --line: #1c3a54;
  --line-hot: #2e5d82;
  --text: #e6eff6;
  --muted: #8aa4b9;
  --foam: #dcedf9;
  --accent: #4aa3e8;
  --accent-deep: #2a78b8;
  --accent-soft: #4aa3e81f;
  --ink: #02070c;
  --gold: #f2c55c;
  --ok: #41c49b;
  --bad: #ec5a52;
  --radius: 10px;
  --shadow: 0 10px 30px #0008;
  --display: "Segoe UI Black", "Arial Black", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, #12406566, transparent 60%),
    radial-gradient(900px 500px at -10% 30%, #0d2e4a55, transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
  background-attachment: fixed;
}

a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: var(--mono); }
.error { color: var(--bad); }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 0; }

/* «Мазок кисти» под заголовком -- тот же жест, что у букв BS. */
h2, h3, h4 { font-family: var(--display); letter-spacing: .02em; margin: 0 0 12px; }
h2 {
  font-size: 26px;
  text-transform: uppercase;
  display: inline-block;
  padding-bottom: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M3 9C40 3 90 12 140 6S220 5 237 8L236 11C200 12 150 9 100 13S30 12 4 12Z' fill='%234aa3e8'/%3E%3C/svg%3E") left bottom / 100% 9px no-repeat;
}
h3 { font-size: 18px; }
h4 { font-size: 13px; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; margin-top: 18px; }

/* ------------------------------------------------------------------ шапка -- */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 10px clamp(16px, 3vw, 32px);
  background: #050e17d9;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-logo { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 2px #fff2, 0 0 18px #4aa3e855; }
.brand b { font-family: var(--display); font-size: 19px; letter-spacing: .06em; }
.brand small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; border-left: 1px solid var(--line-hot); padding-left: 10px; }
#brandLive:empty { display: none; }
/* Подпись магазина за чертой («Главная» под ней убрана 2026-09-30). */
.brand-tag { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; border-left: 1px solid var(--line-hot); padding-left: 10px; }
.brand-tag small { border-left: 0; padding-left: 0; }

.menu { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; align-items: center; }
.menu a {
  color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 8px;
  font-weight: 600; font-size: 14px; transition: color .15s, background .15s;
}
.menu a:hover { color: var(--text); background: var(--surface); }
.menu a.active { color: var(--foam); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.menu-sep { color: var(--line-hot); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 0 4px 0 12px; }

.me { display: flex; gap: 10px; align-items: center; }
.wallet { display: flex; gap: 6px; text-decoration: none; }
.wallet-cur {
  color: var(--foam); font-weight: 700; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}
.wallet-cur:first-child { color: var(--gold); }
.wallet-cur.game { color: var(--foam); }
.who { color: var(--text); font-weight: 600; }

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 40px; flex: 1; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* Ссылка на админку (отдельное окно) и шапка самого окна админки -- золотом. */
.menu a.menu-admin { color: var(--gold); }
.menu a.menu-admin:hover { color: var(--ink); background: var(--gold); }
.top-admin { border-bottom: 2px solid var(--gold); }
.top-admin .brand small { color: var(--gold); border-left-color: var(--gold); }
.menu a.menu-back { margin-left: auto; color: var(--muted); }

/* ----------------------------------------------------------------- кнопки -- */

.btn {
  font: 600 14px/1 "Segoe UI", system-ui, sans-serif;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; text-decoration: none;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line-hot);
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
/* Главная кнопка -- гребень волны: голубая, с косым срезом краёв, как мазок. */
.btn.primary {
  color: #fff; border: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
  padding: 10px 20px;
  text-transform: uppercase; letter-spacing: .04em; font-size: 13px;
}
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #62b4f2, var(--accent)); box-shadow: 0 0 22px #4aa3e866; }
.btn.danger { color: var(--bad); border-color: #ec5a5266; background: transparent; }
.btn.danger:hover:not(:disabled) { background: #ec5a5218; border-color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .4; cursor: default; }

.chip {
  font: 600 14px/1 "Segoe UI", system-ui, sans-serif; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; margin: 0 6px 8px 0;
  transition: color .15s, border-color .15s, background .15s;
}
.chip:hover { color: var(--text); border-color: var(--line-hot); }
.chip.active { color: var(--ink); background: var(--foam); border-color: var(--foam); }
.chip.small { font-size: 13px; padding: 6px 13px; }
.game-tabs { margin-bottom: 6px; }
.cat-tabs { margin-bottom: 14px; }

/* ------------------------------------------------------------------- герой -- */

.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 26px; padding: 34px clamp(20px, 4vw, 44px);
  border-radius: 18px; border: 1px solid var(--line);
  background:
    radial-gradient(500px 300px at 85% 40%, #2a78b855, transparent 70%),
    linear-gradient(135deg, #0f2d47, #0a1d2f 55%, #071522);
  box-shadow: var(--shadow);
}
.hero-text { position: relative; z-index: 2; flex: 1; min-width: 0; }
/* Как «BS» на логотипе: чёрные буквы с белой обводкой и голубым свечением. */
.hero-title {
  margin: 0; font-family: var(--display); font-style: italic;
  font-size: clamp(40px, 7vw, 76px); line-height: 1; letter-spacing: .02em;
  color: var(--ink);
  -webkit-text-stroke: 2px #fff;
  paint-order: stroke fill;
  text-shadow: 0 0 22px #4aa3e8aa, 4px 4px 0 #0008;
  transform: skewX(-6deg);
}
.hero-sub { margin: 12px 0 18px; color: var(--foam); font-size: 17px; font-weight: 600; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 640px; }
/* Номер -- отдельно, текст шага -- одним потоком (иначе flex рвал строку на
   куски между <b> и остальным текстом). */
.steps li { counter-increment: step; position: relative; padding: 3px 0 3px 40px; color: var(--muted); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; display: grid; place-items: center;
  font: 800 14px/1 var(--display); color: var(--ink); background: var(--foam); border-radius: 50%;
}
.steps b { color: var(--text); }
.cmd {
  font-family: var(--mono); font-size: 13px; color: var(--foam);
  background: #02070c99; border: 1px solid var(--line-hot); border-radius: 6px; padding: 1px 7px; white-space: nowrap;
}
.hero-logo {
  position: relative; z-index: 2; flex: none;
  width: clamp(120px, 20vw, 220px); height: auto; border-radius: 50%;
  filter: drop-shadow(0 0 30px #4aa3e866) drop-shadow(0 10px 20px #000a);
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }

/* Главная: кнопки героя, карточки магазинов (по одной на игру). */
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 30px; }
.shop-card { color: var(--text); text-decoration: none; }
.shop-card .media { aspect-ratio: 16 / 8; }
.shop-card .media-mark { font-size: 64px; opacity: .7; }
.shop-card .card-title { font: 900 20px/1.2 var(--display); letter-spacing: .02em; }
.shop-card:hover { transform: translateY(-3px); border-color: var(--line-hot); box-shadow: var(--shadow), 0 0 0 1px #4aa3e833; }

/* Шапка магазина игры -- своя страница, герой поменьше главного. */
.shop-banner {
  position: relative; overflow: hidden;
  margin-bottom: 20px; padding: 20px clamp(20px, 4vw, 40px);
  /* Высокая, название -- посередине (просьба пользователя 2026-10-01). */
  display: flex; align-items: center; min-height: clamp(130px, 18vw, 200px);
  border-radius: 16px; border: 1px solid var(--line);
  background:
    radial-gradient(420px 220px at 90% 30%, #2a78b855, transparent 70%),
    linear-gradient(135deg, #0f2d47, #0a1d2f 60%, #071522);
}
.shop-banner-text { position: relative; z-index: 2; }
.shop-banner .shop-title { margin: 0; }
/* Картинка шапки магазина: слева темнее -- название читается на любой картинке. */
.shop-banner.has-banner {
  background:
    linear-gradient(90deg, #050e17e6 0%, #050e1799 40%, #050e1726 100%),
    var(--banner) center / cover no-repeat,
    #0a1d2f;
}
/* Поле картинки в админке: адрес, кнопки и превью под ними. */
.img-pick { display: grid; gap: 6px; }
.img-pick-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.img-pick-preview { max-width: 100%; max-height: 110px; object-fit: contain; justify-self: start;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.shop-kicker { margin: 0 0 6px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.shop-kicker a { color: var(--muted); text-decoration: none; }
.shop-kicker a:hover { color: var(--foam); }
.shop-title {
  margin: 0 0 8px; font-family: var(--display); font-style: italic;
  font-size: clamp(28px, 4.5vw, 46px); line-height: 1.05;
  color: var(--ink); -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
  text-shadow: 0 0 18px #4aa3e888, 3px 3px 0 #0008;
}
.shop-banner .muted { font-size: 14px; max-width: 820px; }

/* -------------------------------------------------------------- карточки -- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card.item:hover { transform: translateY(-3px); border-color: var(--line-hot); box-shadow: var(--shadow), 0 0 0 1px #4aa3e833; }
.media {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, #2a78b844, transparent 60%),
    linear-gradient(160deg, #123553, #0a1c2c);
}
.media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, #0c1f30cc); }
/* Картинка прибита к рамке: в сетке (display: grid) height: 100% бралась от
   самой картинки, и квадратная иконка 256 px вылезала из рамки -- низ обрезался. */
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Картинка товара -- обычно квадратная иконка предмета игры: целиком, без
   обрезки (cover отрезал края). Баннеры магазинов на главной -- как были. */
.card.item .media img, .card.inv .media img, .pass-cell .media img, #modal .media img {
  object-fit: contain; padding: 10px;
}
.media-mark { font: italic 900 56px/1 var(--display); color: var(--ink); -webkit-text-stroke: 2px #ffffffcc; opacity: .55; }
.card-body { padding: 14px 16px 6px; flex: 1; }
.card-title { margin: 0 0 6px; font: 700 16px/1.3 "Segoe UI", system-ui, sans-serif; }
.card-desc { margin: 0; color: var(--muted); font-size: 14px; }
.card-foot { padding: 12px 16px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.prices { display: flex; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 15px; color: var(--foam); background: #02070c80; border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; }
.price:first-child { color: var(--gold); }
.contents { margin: 8px 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.contents li::marker { color: var(--accent); }
.tag { display: inline-block; margin: 2px 0 6px; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tag.warn { color: var(--bad); margin-left: 8px; }

/* Инвентарь: состояние строки видно по цвету полосы слева. */
.card.inv { border-left: 3px solid var(--accent); }
.card.inv.status-queued { border-left-color: var(--gold); }
.card.inv.status-stuck { border-left-color: var(--bad); }
.card.inv.status-delivered, .card.inv.status-refunded { border-left-color: var(--line-hot); opacity: .6; }
.card.inv .media { aspect-ratio: 16 / 7; }
.check { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); cursor: pointer; }

/* ---------------------------------------------------------------- кошелёк -- */

.donate { padding: 16px 20px; margin: 0 0 22px; background: var(--surface); border: 1px dashed var(--line-hot); border-radius: 14px; }
.donate .row { margin-top: 10px; }

/* ---------------------------------------------------------------- таблицы -- */

.table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); padding: 10px 12px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table td.acts { white-space: nowrap; text-align: right; }
.table td.acts .btn { margin: 0 0 4px 4px; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.job-stuck, .job-failed { color: var(--bad); }
.job-done { color: var(--ok); }
.job-partial, .job-sent, .job-pending { color: var(--gold); }
.cat-game { margin-bottom: 20px; }

/* ---------------------------------------------------------------- серверы -- */

.servers { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.server { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.server-head { display: flex; gap: 12px; align-items: center; }
/* Кнопка «Подключиться» и адрес (копируется по клику), с 2026-10-02. */
.server-connect { display: flex; gap: 8px; align-items: center; }
.server-join { flex: 1; text-align: center; text-decoration: none; }
.server-addr { flex: none; width: 34px; padding: 5px 0; font-size: 14px; line-height: 1; cursor: copy; }
.server .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); flex: none; }
.server.alive .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.server-title { font-weight: 700; flex: 1; }

/* ------------------------------------------------------------------- вход -- */

.login {
  max-width: 440px; margin: 40px auto; padding: 32px 30px; text-align: center;
  background: linear-gradient(160deg, var(--surface-3), var(--surface)); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.login h1 { font: italic 900 38px/1 var(--display); color: var(--ink); -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill; text-shadow: 0 0 16px #4aa3e888; margin: 0 0 14px; }
.login form { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 18px 0 10px; flex-wrap: wrap; }
.code-input { font: 700 28px/1 var(--mono); letter-spacing: 8px; width: 210px; text-align: center; padding: 10px; }

.login-pair { display: flex; gap: 22px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.login-pair .login { margin: 30px 0; flex: 1 1 360px; max-width: 640px; }
.mail-form { text-align: left; margin-top: 14px; width: 100%; }
.mail-form .field { width: 100%; }
.mail-form .field input { width: 100%; }
.mail-form .btn.primary { width: 100%; margin-top: 10px; }
.mail-form .code-input { width: 100%; }
.account-card {
  max-width: 560px; padding: 18px 22px; margin: 0 0 16px;
  break-inside: avoid;
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 14px;
}
.account-card h3 { margin-bottom: 8px; }
.account-card .btn.primary { width: auto; }

/* -------------------------------------------------------------- поля, окна -- */

input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-hot); border-radius: 8px; padding: 8px 10px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
textarea { min-height: 80px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; min-width: 150px; }
.field-check { flex-direction: row; align-items: center; gap: 8px; }
.field-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; }
.action { border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; padding: 10px 14px; background: var(--bg-2); }
.action legend { display: flex; gap: 8px; align-items: center; padding: 0 6px; }
/* Группа полей действия (характеристики, уровни по статам, окрас) -- в колонки. */
.action-group { margin: 10px 0 4px; padding: 8px 10px 2px; border: 1px dashed var(--line-hot); border-radius: 8px; }
.action-group-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.action-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0 10px; }
.action-group-grid .field input { width: 100%; }
.action-tools { margin-left: 8px; display: inline-flex; gap: 4px; }
.cat-rows .row { margin-bottom: 8px; }

dialog {
  width: min(720px, 94vw); max-height: 88vh; padding: 0; color: var(--text);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-hot); border-radius: 16px; box-shadow: 0 30px 80px #000c;
}
dialog::backdrop { background: #01060bcc; backdrop-filter: blur(3px); }
#ask { width: min(480px, 94vw); }
.modal-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 18px; }
.x { font-size: 24px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); }
.x:hover { color: var(--text); }
.modal-body { padding: 16px 18px; }
.modal-body .media { border-radius: var(--radius); margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.modal-error { padding: 8px 12px; border: 1px solid #ec5a5266; background: #ec5a5214; border-radius: 8px; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast {
  max-width: 380px; padding: 11px 16px; border-radius: 10px; color: var(--text);
  background: var(--surface-3); border: 1px solid var(--line-hot); border-left: 3px solid var(--accent);
  box-shadow: var(--shadow); animation: rise .2s ease-out;
}
.toast.err { border-left-color: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ подвал -- */

/* Простой подвал: полоса без волн и анимации (просьба пользователя 2026-09-25). */
.foot {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 14px clamp(16px, 3vw, 32px); color: var(--muted); font-size: 13px;
  background: var(--bg); border-top: 1px solid var(--line);
}
#footBrand { font: 900 15px/1 var(--display); letter-spacing: .08em; color: var(--text); }
/* На главной подвал закреплён внизу экрана (просьба пользователя 2026-09-25):
   виден всегда, карточки прокручиваются под ним. Главной добавлен отступ снизу
   на высоту подвала, чтобы последняя карточка не пряталась. */
body[data-tab="home"] .foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; }
body[data-tab="home"] main { padding-bottom: 80px; }

/* ------------------------------------------------------------ узкий экран -- */

@media (max-width: 760px) {
  /* На телефоне шапка в три строки заняла бы треть экрана -- пусть уезжает. */
  .top { gap: 10px; position: static; }
  .menu { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; }
  .brand small { display: none; }
  .brand-tag { display: none; }
  .hero { flex-direction: column-reverse; text-align: left; align-items: flex-start; }
  .hero-logo { width: 110px; }
  /* Имя прячется, буква-аватар остаётся: это единственный вход в профиль. */
  .who-name { display: none; }
  .table { display: block; overflow-x: auto; }
}

/* Кабинет: два пути привязки Steam рядом -- вход Steam и код из игры. */
.link-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.link-way { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.link-way h4 { margin: 0 0 6px; }
/* VK ID (с 2026-10-02): фирменный синий VK. */
.vk-btn { display: inline-block; margin-top: 4px; background: #0077ff; border-color: #0077ff; color: #fff; }
.vk-btn:hover { background: #1a85ff; border-color: #1a85ff; color: #fff; }
.login-ways { text-align: left; margin-top: 8px; }
.login-steps { margin: 6px 0 4px; padding-left: 20px; color: var(--muted); line-height: 1.5; }

/* Шапка магазина: описание от админа. Админка магазинов -- карточки. */
.shop-desc { margin: 0 0 6px; color: var(--foam); max-width: 820px; }
.shop-desc:empty { display: none; }
.admin-shop.is-hidden { opacity: .6; }
.admin-shop .card-body a.mono { font-size: 13px; }
.admin-shop-foot { justify-content: flex-start; gap: 6px; }

/* ---------------------------------------------------------------- батлпас -- */
.btn.gold { color: var(--ink); border: 0; background: linear-gradient(180deg, #ffd978, var(--gold)); font-weight: 700; }
.btn.gold:hover:not(:disabled) { background: linear-gradient(180deg, #ffe39a, #f5cf6e); box-shadow: 0 0 20px #f2c55c55; }
.tag-pass { margin-left: 8px; padding: 1px 8px; border-radius: 999px; color: var(--ink); background: var(--gold); }
.pass-banner { background: radial-gradient(420px 220px at 90% 30%, #f2c55c33, transparent 70%), linear-gradient(135deg, #1a2d47, #0a1d2f 60%, #071522); }
.pass-me {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 18px 22px; margin-bottom: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius);
}
.pass-level { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.pass-level b { font: 900 44px/1 var(--display); color: var(--gold); text-shadow: 0 0 18px #f2c55c55; }
.pass-xp-box { flex: 1; min-width: 200px; display: grid; gap: 6px; }
.pass-xp { height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.pass-xp.small { height: 8px; }
.pass-xp-fill { height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--foam)); transition: width .4s; }
.pass-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pass-premium-on { padding: 6px 14px; border-radius: 999px; color: var(--ink); background: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.pass-how { margin: 0 0 20px; }
.pass-tasks { display: grid; gap: 8px; margin-bottom: 24px; }
.pass-task {
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, 2fr) auto; gap: 14px; align-items: center;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.pass-task-text { display: grid; }
.pass-task.done { border-color: #41c49b66; }
.pass-task.done .pass-xp-fill { background: var(--ok); }
.pass-task-count { font-weight: 700; color: var(--foam); min-width: 64px; text-align: right; }
.pass-task.done .pass-task-count { color: var(--ok); }
.pass-track { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scroll-behavior: smooth; }
.pass-col { flex: 0 0 150px; display: grid; grid-template-rows: 34px 170px 170px; gap: 8px; }
/* Подписи дорожек залипают слева, награды уходят ПОД них. Без бокового отступа
   у дорожки (иначе в щель 2px слева торчат края карточек), с краем и тенью --
   чтобы карточка явно уезжала под панель, а не выглядела обрезанной; линии
   номера уровня у подписей нет (2026-10-02). */
.pass-labels {
  flex-basis: 96px; position: sticky; left: 0; z-index: 2; background: var(--bg);
  border-right: 1px solid var(--line); box-shadow: 12px 0 14px -10px #000;
}
.pass-labels .pass-num { border-bottom-color: transparent; }
.pass-lane-name { display: grid; place-items: center; font: 800 12px/1.2 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; }
.pass-lane-name.premium { color: var(--gold); }
.pass-num { display: grid; place-items: center; font: 800 16px/1 var(--display); color: var(--muted); border-bottom: 3px solid var(--line); }
.pass-col.reached .pass-num { color: var(--foam); border-bottom-color: var(--accent); }
.pass-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden;
}
.pass-cell.premium { border-color: #f2c55c55; background: linear-gradient(180deg, #2a2616, var(--surface)); }
.pass-cell.empty { background: transparent; border-style: dashed; opacity: .35; }
.pass-cell .media { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; }
.pass-cell .media-mark { font-size: 30px; }
.pass-reward { font-size: 13px; font-weight: 600; line-height: 1.25; }
.pass-money { font: 900 20px/1.1 var(--display); color: var(--gold); }
.pass-cell.locked { opacity: .55; }
.pass-cell.claimed { opacity: .6; }
.pass-mark { font-size: 12px; color: var(--muted); }
.pass-cell.claimed .pass-mark { color: var(--ok); }

/* Админка: редактор сезона. */
.pass-levels-edit { display: grid; gap: 6px; margin: 8px 0; }
.lv-row { display: grid; grid-template-columns: 40px 1fr 1fr 40px; gap: 8px; align-items: center; }
.lv-head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.reward-edit { display: flex; gap: 6px; flex-wrap: wrap; }
.reward-edit select, .reward-edit input { min-width: 0; flex: 1 1 90px; }
.pass-tasks-edit { display: grid; gap: 10px; margin-top: 8px; }
.task-edit { padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (max-width: 760px) {
  .pass-task { grid-template-columns: 1fr auto; }
  .pass-task .pass-xp { grid-column: 1 / -1; grid-row: 2; }
  .lv-row { grid-template-columns: 30px 1fr 30px; }
  .lv-row > :nth-child(3) { grid-column: 2; }
  .pass-col { flex-basis: 128px; grid-template-rows: 30px 150px 150px; }
}


/* Вкладки магазина под его шапкой. */
.shop-frame .shop-banner { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.shop-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; padding: 6px 10px;
  background: var(--surface); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 16px 16px;
}
.shop-tab {
  position: relative; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 8px 16px; border-radius: 8px; transition: color .15s, background .15s;
}
.shop-tab:hover { color: var(--text); background: var(--surface-2); }
.shop-tab.active { color: var(--foam); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
/* С неё начинается правая группа вкладок (инвентарь, поддержка). */
.shop-tab-right { margin-left: auto; }
.shop-tab-dot { display: inline-block; width: 7px; height: 7px; margin-left: 7px; vertical-align: 2px; border-radius: 50%; background: var(--gold); }
.pass-title { margin-bottom: 12px; }
.pass-title h2 { margin-bottom: 4px; }
.pass-title p { margin: 0; }

/* Админка: редактор магазина. */
.back-link { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back-link:hover { color: var(--foam); }
.admin-shop-tabs { border-top: 1px solid var(--line); border-radius: 12px; margin: 6px 0 18px; }
.cat-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.cat-rows .row input { flex: 1 1 180px; }
.settings-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 18px; }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; }

/* Большие витрины: поиск и «Показать ещё». */
.shop-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.shop-tools input { flex: 0 1 360px; }
.more-row { display: flex; justify-content: center; margin: 18px 0 6px; }
.editor-filter { margin-bottom: 12px; align-items: center; }
.editor-filter input[type=search] { flex: 1 1 260px; }

/* ---------------------------------------------- разделы магазина: колонка -- */
.shop-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.shop-layout.no-cats { grid-template-columns: minmax(0, 1fr); }
.shop-layout.no-cats .cat-side, .shop-layout.no-cats .cat-heading { display: none; }
.cat-side {
  position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px;
  /* Ровно 10 разделов, остальные -- прокруткой (просьба пользователя 2026-09-27;
     сперва было 5): строка 34px (значок 26 + 4+4), между строками 2px, поля 5+5,
     рамка 1+1. */
  max-height: calc(10 * 34px + 9 * 2px + 12px); overflow-y: auto; padding: 5px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 14px;
  /* Докрутили до края -- страница под курсором не едет следом. */
  overscroll-behavior: contain;
}
.cat-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 8px 4px 5px;
  font: 600 13px/1.2 "Segoe UI", system-ui, sans-serif; text-align: left; cursor: pointer;
  color: var(--muted); background: transparent; border: 0; border-radius: 10px;
  transition: color .15s, background .15s;
}
.cat-item:hover { color: var(--text); background: var(--surface-3); }
.cat-item.active { color: var(--foam); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.cat-icon {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; overflow: hidden;
  border-radius: 7px; background: radial-gradient(circle at 60% 35%, #2a78b844, transparent 70%), var(--bg-2);
  border: 1px solid var(--line);
}
.cat-icon img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.cat-icon.all { font: 900 12px/1 var(--display); color: var(--gold); }
.cat-item.active .cat-icon { border-color: var(--accent); }
.cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-main-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-heading { margin: 0; }
.shop-main-head .shop-tools { margin: 0; }
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cat-side {
    position: static; flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden;
    padding: 6px; gap: 6px;
  }
  .cat-item { width: auto; flex: none; padding: 6px 10px 6px 6px; }
  .cat-icon { width: 28px; height: 28px; }
  .cat-item.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .shop-main-head .shop-tools, .shop-main-head .shop-tools input { flex: 1 1 100%; width: 100%; }
}

/* Полосы прокрутки: тонкая «капля» цвета гребня на прозрачной дорожке --
   по всему сайту, вместо серых системных. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border: 3px solid transparent; border-radius: 999px; background-clip: padding-box;
  background-color: #2e5d82aa;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
::-webkit-scrollbar-corner { background: transparent; }
/* Firefox умеет только цвет и толщину. */
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: #2e5d82 transparent; }
}
/* В колонке разделов и в строке разделов на телефоне -- ещё тоньше. */
.cat-side::-webkit-scrollbar { width: 8px; height: 6px; }
.cat-side::-webkit-scrollbar-thumb { border-width: 2px; }

/* Витрина магазина: 5 карточек в ряд, карточки маленькие (просьба
   пользователя 2026-09-26; до этого было 4). Картинка -- квадратная иконка. */
#shopGrid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#shopGrid .card.item .media { aspect-ratio: 5 / 4; }
#shopGrid .card.item .media img { padding: 10px; }
#shopGrid .card.item .media::after { height: 26%; }
#shopGrid .card-body { padding: 8px 10px 2px; }
#shopGrid .card-title { font-size: 13px; line-height: 1.25; margin-bottom: 2px; }
#shopGrid .card-desc { font-size: 11px; }
#shopGrid .card-foot { padding: 6px 10px 10px; gap: 5px; }
#shopGrid .prices { gap: 4px; }
#shopGrid .price { font-size: 12px; padding: 2px 6px; border-radius: 6px; }
#shopGrid .card-foot .btn.primary { padding: 5px 10px; font-size: 11px; }
@media (max-width: 1150px) { #shopGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px) { #shopGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { #shopGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ------------------------------------------------------- профиль игрока -- */
.profile-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 26px clamp(20px, 4vw, 36px);
  margin-bottom: 20px; border: 1px solid var(--line); border-radius: 16px;
  background:
    radial-gradient(420px 220px at 12% 20%, #4aa3e833, transparent 70%),
    radial-gradient(360px 200px at 92% 30%, #f2c55c1f, transparent 70%),
    linear-gradient(135deg, #0f2d47, #0a1d2f 60%, #071522);
}
.profile-avatar {
  position: relative; z-index: 2; flex: none;
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  font: italic 900 44px/1 var(--display); color: var(--ink);
  -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
  background: radial-gradient(circle at 35% 30%, #62b4f2, var(--accent-deep) 70%);
  box-shadow: 0 0 0 3px #ffffff22, 0 0 26px #4aa3e866;
}
.profile-main { position: relative; z-index: 2; flex: 1 1 260px; min-width: 0; }
.profile-main .shop-kicker { margin-bottom: 4px; }
.profile-name {
  margin: 0 0 10px; font-family: var(--display); font-style: italic; font-size: clamp(26px, 4vw, 40px);
  line-height: 1.05; color: var(--ink); -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
  text-shadow: 0 0 18px #4aa3e888, 3px 3px 0 #0008; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-tag {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  color: var(--foam); background: #02070c80; border: 1px solid var(--line-hot);
}
.pf-tag.ok { color: var(--ok); border-color: #41c49b66; }
.pf-tag.warn { color: var(--gold); border-color: #f2c55c66; }
.pf-tag.gold { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.pf-tag.live { color: var(--ink); background: var(--ok); border-color: var(--ok); }
.profile-stats { position: relative; z-index: 2; display: flex; gap: 12px; flex-wrap: wrap; }
.pf-stat {
  display: grid; gap: 2px; min-width: 128px; padding: 12px 16px;
  background: #02070c99; border: 1px solid var(--line); border-radius: 12px;
}
.pf-stat-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.pf-stat-value { font: 900 22px/1.15 var(--display); color: var(--foam); }
.pf-stat:first-child .pf-stat-value { color: var(--gold); }
.pf-stat-link { font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; }
.pf-stat-link:hover { text-decoration: underline; }
.inv-hint { margin: 0; flex: 1; }
.account-grid { columns: 2 460px; column-gap: 16px; }
.account-grid .account-card { max-width: none; }

/* Имя в шапке -- ссылка в профиль, с буквой-аватаром. */
.who { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.who:hover .who-name { color: var(--foam); }
.who-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 900 14px/1 var(--display); color: #fff;
  background: radial-gradient(circle at 35% 30%, #62b4f2, var(--accent-deep) 70%);
}
.who-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .profile-avatar { width: 68px; height: 68px; font-size: 32px; }
  .profile-stats { width: 100%; }
  .pf-stat { flex: 1 1 100px; min-width: 0; }
}

/* Окно покупки: фиксированное, без прокрутки. */
#modal.buy { width: min(640px, 94vw); overflow: hidden; }
#modal.buy .modal-body { padding: 16px 18px 14px; }
.buy-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.buy-pic .media { aspect-ratio: 1 / 1; margin: 0; border-radius: 12px; }
.buy-pic .media img { padding: 14px; }
.buy-info { display: grid; gap: 8px; min-width: 0; }
.buy-desc { margin: 0; color: var(--foam); font-weight: 600; }
.buy-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.buy-info .contents { margin: 0; }
.qty-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qty-row .field-label { margin: 0 6px 0 0; }
.qty-row input { width: 64px; text-align: center; -moz-appearance: textfield; }
.qty-row input::-webkit-outer-spin-button, .qty-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-step { width: 32px; height: 32px; padding: 0; font-size: 18px; }
.buy-lack { margin: 0; color: var(--gold); }
.buy-lack:empty { display: none; }
#modal.buy .modal-actions { margin-top: 14px; }
@media (max-width: 560px) {
  .buy-layout { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  .qty-row { flex-wrap: wrap; }
  .qty-row .field-label { flex-basis: 100%; }
}

/* Форма товара: поиск предмета по справочнику игры и превью картинки. */
.item-picker { position: relative; }
.item-picker input { width: 100%; }
.item-picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  max-height: 320px; overflow-y: auto; overscroll-behavior: contain; padding: 4px;
  background: var(--surface); border: 1px solid var(--line-hot); border-radius: 10px; box-shadow: var(--shadow);
}
.item-pick {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-radius: 8px; color: var(--text);
}
.item-pick:hover, .item-pick:focus { background: var(--accent-soft); outline: none; }
.item-pick img { width: 36px; height: 36px; object-fit: contain; flex: none; border-radius: 6px; background: var(--bg-2); }
.ip-names { display: grid; min-width: 0; }
.ip-name { font-weight: 600; font-size: 14px; }
.ip-en { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-empty { padding: 8px; }
.image-row { display: flex; gap: 10px; align-items: center; }
.image-row input { flex: 1; min-width: 0; }
.image-preview { width: 48px; height: 48px; object-fit: contain; flex: none; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--line); }

/* Окно покупки: пол дино выбирает игрок. */
.gender-row { gap: 8px; }
.gender-pick { min-width: 104px; height: 32px; font-size: 13px; }
.gender-pick.male.active { background: #2f7fd1; border-color: #62b4f2; color: #fff; }
.gender-pick.female.active { background: #c2477e; border-color: #ef7fb0; color: #fff; }

/* Админка, «Доходы» (2026-09-30): фильтры в одну строку над графиком, плашки
   как в профиле, столбики -- цвет гребня (одна серия, легенды нет). */
.rev-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rev-periods { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.rev-period { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.rev-period:hover { color: var(--text); }
.rev-period.active { color: var(--ink); background: var(--accent); font-weight: 700; }
.rev-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.rev-tile { display: grid; gap: 2px; align-content: start; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.rev-tile-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.rev-tile-value { font: 900 22px/1.2 var(--display); color: var(--foam); overflow-wrap: anywhere; }
.rev-tile.main .rev-tile-value { color: var(--gold); }
.rev-tile.warn .rev-tile-value { color: var(--bad); }
.rev-tile-sub { font-size: 12px; color: var(--muted); }
.rev-chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 6px; margin-bottom: 22px; }
.rev-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rev-chart-head h3 { margin: 0; font-size: 15px; }
.rev-chart { position: relative; }
.rev-chart svg { display: block; width: 100%; height: auto; }
.rev-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.rev-axis { stroke: var(--line-hot); stroke-width: 1; }
.rev-tick { fill: var(--muted); font-size: 11px; }
.rev-bar { fill: var(--accent); pointer-events: none; }
.rev-hit { fill: transparent; cursor: default; }
.rev-hit.on { fill: var(--accent-soft); }
.rev-tip { position: absolute; top: 4px; width: 150px; padding: 6px 10px; font-size: 13px; background: var(--surface-3); border: 1px solid var(--line-hot); border-radius: 8px; box-shadow: var(--shadow); pointer-events: none; }
.rev-empty { padding: 30px 0; text-align: center; }
td.rev-income { font-weight: 700; color: var(--foam); }
.rev-amount { white-space: nowrap; }
@media (max-width: 760px) {
  .rev-periods { overflow-x: auto; max-width: 100%; }
  .rev-period { white-space: nowrap; }
}

/* Поддержка (2026-10-01): список обращений, переписка, число на пункте меню админки. */
.sup-list { display: grid; gap: 10px; }
.sup-row {
  display: grid; gap: 4px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.sup-row:hover { border-color: var(--line-hot); background: var(--surface-2); }
.sup-row.unread { border-left: 3px solid var(--gold); }
.sup-row-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sup-row-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-row-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sup-del { font-size: 12px; font-weight: 700; color: var(--bad); padding: 3px 10px; border-radius: 6px; border: 1px solid #ec5a5244; }
.sup-del:hover, .sup-del:focus-visible { background: #ec5a5218; border-color: var(--bad); outline: none; }
.sup-status { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-hot); color: var(--muted); }
.sup-status.sup-open { color: var(--gold); border-color: #f2c55c66; }
.sup-status.sup-answered { color: var(--ok); border-color: #41c49b66; }
.sup-dot { font-size: 11px; font-weight: 700; color: var(--ink); background: var(--gold); border-radius: 999px; padding: 1px 8px; }
.sup-ticket-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sup-ticket-head h2 { margin: 0; }
.sup-thread { display: grid; gap: 10px; margin: 14px 0; }
.sup-msg { max-width: min(680px, 88%); padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.sup-msg.mine { justify-self: end; background: var(--accent-soft); border-color: #4aa3e855; }
.sup-msg.admin:not(.mine) { border-left: 3px solid var(--accent); }
.sup-msg-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sup-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-form { display: grid; gap: 10px; max-width: 760px; }
.sup-form textarea { width: 100%; resize: vertical; }
/* Переписка -- чатом: окно своей высоты, лента прокручивается внутри,
   поле ввода прижато к низу окна (2026-10-01). */
.sup-chat {
  display: flex; flex-direction: column; margin-top: 10px;
  height: clamp(420px, calc(100vh - 230px), 860px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.sup-chat-head { flex: none; display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sup-chat-head .sup-ticket-head h2 { font-size: 20px; }
.sup-chat-head p { margin: 0; flex: 1 1 240px; }
.sup-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px; overscroll-behavior: contain; }
.sup-feed .sup-thread { margin: 12px 0; }
.sup-compose { flex: none; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.sup-compose textarea { width: 100%; resize: none; min-height: 44px; max-height: 140px; }
@media (max-width: 760px) {
  .sup-chat { height: calc(100vh - 150px); }
  .sup-compose { grid-template-columns: 1fr; }
}
.menu-badge { margin-left: 6px; font-size: 11px; font-weight: 800; color: var(--ink); background: var(--gold); border-radius: 999px; padding: 1px 7px; }
.table tr.sup-unread-row td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
#modal .sup-thread { max-height: 50vh; overflow-y: auto; padding-right: 4px; }
.sup-keep { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.sup-keep input { width: 90px; }

/* Публичная оферта (/offer) и вкладка «Документы» админки (2026-10-02). */
.doc { max-width: 860px; margin: 0 auto; line-height: 1.6; }
.doc h1 { margin: 0 0 4px; font-family: var(--display); }
.doc h2 { margin: 26px 0 8px; font-size: 18px; color: var(--foam); }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc-date { margin: 0 0 18px; }
.doc-draft { padding: 10px 14px; border: 1px solid #f2c55c66; border-radius: var(--radius); color: var(--gold); background: #f2c55c14; }
.doc-req { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.doc-req dt { color: var(--muted); }
.doc-req dd { margin: 0; overflow-wrap: anywhere; }
.foot-link { color: var(--muted); text-decoration: none; }
.foot-link:hover { color: var(--text); text-decoration: underline; }
.offer-note { margin: 10px 0 0; font-size: 13px; }
.doc-status { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); }
.doc-status.ok { color: var(--ok); border-color: #41c49b66; }
.doc-status.warn { color: var(--gold); border-color: #f2c55c66; }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 16px; }
.docs-text { width: 100%; min-height: 420px; font-size: 13px; line-height: 1.5; }
@media (max-width: 560px) {
  .doc-req { grid-template-columns: 1fr; gap: 2px; }
  .doc-req dd { margin-bottom: 8px; }
}
.docs-doc { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.docs-doc .row { margin-top: 8px; }
.docs-save-bottom { margin-top: 18px; }
