/* GrimX.fun — стили публичной части (лендинг + документы + бан-лист).
   Токены и базовые классы берутся из theme.css. */

/* ---------- база ---------- */
body {
  background:
    radial-gradient(1100px 520px at 50% -140px, rgba(255,106,26,.28), transparent 70%),
    radial-gradient(700px 400px at 100% 10%, rgba(194,32,15,.18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--fire);
  outline-offset: 2px;
}

button { background: none; border: none; color: inherit; font: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { margin: 0; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- фоновый слой ---------- */
.embers { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.ember {
  position: absolute; bottom: -10px; width: 4px; height: 4px;
  background: #ff8a3a; box-shadow: 0 0 8px var(--fire);
  animation: rise 11s linear infinite;
}
.ember.e1  { left: 6%;  }
.ember.e2  { left: 14%; width: 3px; height: 3px; background: var(--fire-3); animation-duration: 14s;   animation-delay: 1.5s; }
.ember.e3  { left: 23%; width: 5px; height: 5px; background: var(--fire);   animation-duration: 9s;    animation-delay: .7s; box-shadow: 0 0 10px var(--blood); }
.ember.e4  { left: 34%; width: 3px; height: 3px; animation-duration: 13s;   animation-delay: 3s; }
.ember.e5  { left: 45%; background: var(--fire-3); animation-duration: 10s;  animation-delay: 2.2s; }
.ember.e6  { left: 56%; width: 3px; height: 3px; background: var(--fire);   animation-duration: 15s;   animation-delay: .3s; }
.ember.e7  { left: 67%; width: 5px; height: 5px; animation-duration: 12s;   animation-delay: 4s; }
.ember.e8  { left: 76%; width: 3px; height: 3px; background: var(--fire-3); animation-duration: 10.5s; animation-delay: 1.1s; }
.ember.e9  { left: 85%; background: var(--fire); animation-duration: 13.5s;  animation-delay: 2.6s; box-shadow: 0 0 9px var(--blood); }
.ember.e10 { left: 93%; width: 3px; height: 3px; animation-duration: 9.5s;  animation-delay: 5s; }
.scanlines {
  position: absolute; inset: 0; mix-blend-mode: overlay;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
}

/* ---------- баннер техработ ---------- */
.maint {
  position: relative; z-index: 45;
  padding: 12px 24px; text-align: center;
  background: repeating-linear-gradient(135deg, #2a1410 0 14px, #1c0d0a 14px 28px);
  border-bottom: 2px solid var(--blood);
  color: #ffd2b8; font-size: 14px; font-weight: 700; line-height: 1.5;
}
.maint b { color: var(--blood); text-transform: uppercase; letter-spacing: 1px; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12,8,7,.88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.topbar-in {
  max-width: 1240px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; flex: none;
  background: linear-gradient(160deg, var(--fire), var(--blood-2));
  box-shadow: 0 0 18px rgba(255,106,26,.5), inset 0 0 0 2px var(--ink);
  display: grid; place-items: center;
  font-family: var(--pixel); font-weight: 700; font-size: 22px; color: var(--ink);
  animation: flicker 4.2s ease-in-out infinite;
}
.brand-name {
  font-family: var(--pixel); font-size: 26px; font-weight: 700;
  letter-spacing: .5px; line-height: 1; white-space: nowrap;
}
.brand-x { color: var(--fire); }
.brand-dot { color: var(--muted-2); }

.nav { display: flex; gap: 2px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.nav-link {
  padding: 8px 10px; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  border: 1px solid transparent; transition: all .16s ease;
}
.nav-link:hover { color: #fff; border-color: var(--line-2); background: var(--panel-2); }
.nav-link.active { color: var(--fire-2); border-color: var(--line-2); background: var(--panel-2); }

.topbar-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.online-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; background: #140d0b; border: 1px solid var(--line-2);
  white-space: nowrap; font-family: var(--pixel); font-size: 17px;
}
.dot-live { width: 8px; height: 8px; flex: none; background: var(--ok); animation: blink 2.4s ease-in-out infinite; }
.online-num { color: var(--ok); }
.online-cap {
  font-family: var(--font); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
}

/* переключатель валюты */
.cur { position: relative; white-space: nowrap; }
.cur-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; background: #140d0b; border: 1px solid var(--line-2);
  cursor: pointer; transition: border-color .16s ease;
}
.cur-btn:hover { border-color: var(--fire); }
.cur.open .cur-btn { border-color: var(--fire); }
.cur-sym { font-family: var(--pixel); font-size: 18px; color: var(--fire-2); }
.cur-code { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--text-2); }
.cur-arrow { font-size: 10px; color: var(--muted); transition: transform .2s ease; }
.cur.open .cur-arrow { transform: rotate(180deg); }
.cur-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px; z-index: 50;
  background: #140d0b; border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgba(0,0,0,.6); overflow: hidden;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.cur.open .cur-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cur-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; cursor: pointer; text-align: left;
  color: #9a8681; border-bottom: 1px solid var(--line-3);
  transition: background .14s ease, color .14s ease;
}
.cur-item:last-child { border-bottom: none; }
.cur-item:hover { background: #221512; color: var(--text); }
.cur-item.active { background: var(--fire); color: var(--ink); }
.cur-item-sym { font-family: var(--pixel); font-size: 18px; min-width: 30px; }
.cur-item-label { font-size: 13px; font-weight: 700; letter-spacing: .5px; }

/* кнопка корзины */
.cart-btn {
  position: relative; padding: 10px 18px;
  background: linear-gradient(180deg, var(--fire), var(--blood));
  color: var(--ink); font-weight: 900; font-size: 14px;
  text-transform: uppercase; letter-spacing: .6px; cursor: pointer;
  box-shadow: 0 4px 0 var(--shadow-btn), 0 0 24px rgba(255,106,26,.3);
  transition: transform .14s ease, filter .14s ease;
}
.cart-btn:hover { filter: brightness(1.12); transform: translateY(-2px); }
.cart-btn:active { transform: translateY(2px); }
.cart-count {
  position: absolute; top: -8px; right: -8px;
  min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--bg); border: 2px solid var(--fire); color: var(--fire-2);
  font-size: 12px; display: grid; place-items: center;
}

/* ---------- бегущая строка ---------- */
.ticker {
  position: relative; z-index: 5; overflow: hidden;
  border-bottom: 2px solid var(--line); background: var(--bg-2);
}
.ticker-track { display: flex; width: max-content; padding: 9px 0; animation: marquee 38s linear infinite; }
.ticker-group {
  display: flex; gap: 36px; padding-right: 36px;
  font-family: var(--pixel); font-size: 15px; color: var(--muted); white-space: nowrap;
}
.ticker-group b { color: var(--fire-2); }
.ticker-sep { color: var(--line-2); }

/* ---------- общая раскладка страниц ---------- */
.page { position: relative; z-index: 5; }
.section { max-width: 1240px; margin: 0 auto; padding: 0 24px 70px; }
.h2 { font-family: var(--pixel); font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}

/* ---------- герой ---------- */
.hero {
  max-width: 1240px; margin: 0 auto; padding: 52px 24px 58px;
  display: grid; grid-template-columns: minmax(0, 640px); gap: 40px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; background: var(--ink); border: 1px solid var(--line-2);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--fire-2); font-weight: 700;
}
.hero-h1 {
  margin: 20px 0 0; font-family: var(--pixel);
  font-size: clamp(46px, 9vw, 96px); line-height: .92; font-weight: 700;
  letter-spacing: -1px; text-shadow: 0 0 40px rgba(255,106,26,.35);
}
.hero-h1 .grad {
  background: linear-gradient(180deg, var(--fire-3), var(--fire) 45%, #a81a0a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: flicker 5s ease-in-out infinite;
}
.hero-lead {
  margin: 22px 0 0; max-width: 520px;
  font-size: 17px; line-height: 1.65; color: #b8a29c; text-wrap: pretty;
}
.hero-lead b { color: var(--text); }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.btn-hero { padding: 16px 28px; font-size: 15px; }
.btn-ghost.btn-hero { padding: 15px 27px; }
.btn-ghost.is-copied { border-color: var(--ok); color: var(--ok); }
.hero-metrics { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.metric-v { font-family: var(--pixel); font-size: 34px; color: var(--fire); line-height: 1; }
.metric-k {
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}

/* ---------- пополнение баланса ---------- */
.donate-wrap { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 24px 70px; }
.hero-art {
  position: absolute; right: 0; top: -16px; transform: translateY(-100%);
  width: 720px; max-width: 58vw; z-index: 1; pointer-events: none;
}
.hero-art img { display: block; width: 100%; height: auto; animation: floaty 7.5s ease-in-out infinite; }

.donate {
  position: relative; z-index: 2;
  border: 2px solid var(--line-2);
  background: linear-gradient(180deg, var(--panel-2), #100b09);
  box-shadow: 0 0 0 1px rgba(255,106,26,.08), 0 30px 70px rgba(0,0,0,.5);
}
.donate-head {
  padding: 26px 32px; border-bottom: 2px solid var(--line);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.donate-title { font-family: var(--pixel); font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; }
.rate-chip {
  padding: 5px 10px; background: #2a1410; border: 1px solid #5a2a1f; color: var(--fire-2);
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700;
}
.donate-grid { display: grid; grid-template-columns: 1.4fr .6fr; }
.donate-main { padding: 32px; min-width: 0; }
.donate-side { padding: 32px; border-left: 2px solid var(--line); background: #0e0908; }

.amount-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.amount-val { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.amount-num { font-family: var(--pixel); font-size: clamp(38px, 6vw, 56px); line-height: 1; color: var(--fire); }
.amount-sym { font-family: var(--pixel); font-size: 30px; color: var(--muted); }
.amount-right { text-align: right; }
.coins-val { font-family: var(--pixel); font-size: clamp(28px, 4.5vw, 38px); line-height: 1.2; color: var(--text); }
.coins-val span { color: var(--fire); }
.bonus-lbl { font-size: 13px; color: var(--ok); font-weight: 700; }

.range { width: 100%; margin: 26px 0 10px; height: 22px; cursor: pointer; }
.scale {
  display: flex; justify-content: space-between; gap: 6px;
  font-size: 12px; color: var(--muted-2); font-family: var(--pixel);
}
.presets { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.preset {
  padding: 11px 18px; background: #140d0b; border: 1px solid var(--line-2);
  font-family: var(--pixel); font-size: 18px; color: var(--text);
  cursor: pointer; transition: all .16s ease;
}
.preset:hover { border-color: var(--fire); color: var(--fire-2); transform: translateY(-2px); }
.donate-add { width: 100%; margin-top: 26px; padding: 17px; font-size: 16px; letter-spacing: 1.2px; }

.tiers { display: flex; flex-direction: column; gap: 10px; }
.tier {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: #140d0b; border: 1px solid var(--line);
  transition: background .18s ease, border-color .18s ease;
}
.tier.on { background: #2a1410; border-color: var(--fire); }
.tier-from { font-size: 14px; color: var(--text-2); }
.tier-pct { font-family: var(--pixel); font-size: 20px; color: var(--fire-2); }
.side-note { margin-top: 24px; font-size: 13px; line-height: 1.6; color: #7e6a65; }

/* ---------- разделитель ---------- */
.divider-sec { max-width: 1240px; margin: 0 auto 34px; padding: 0 24px; }

/* ---------- каталог ---------- */
.cats { display: flex; gap: 8px; flex-wrap: wrap; }
.cat {
  padding: 11px 18px; background: #140d0b; border: 1px solid var(--line);
  color: var(--text-2); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; cursor: pointer;
  transition: all .16s ease;
}
.cat:hover { border-color: var(--fire); }
.cat.active { background: var(--fire); border-color: var(--fire); color: var(--ink); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.card {
  display: flex; flex-direction: column; min-width: 0;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  border-color: var(--fire); transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 26px rgba(255,106,26,.18);
}
.card-media {
  position: relative; height: 170px; overflow: hidden;
  background: var(--bg-2); border-bottom: 2px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-sweep {
  position: absolute; top: 0; bottom: 0; left: 0; width: 60%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,170,90,.16), transparent);
  animation: sweep 6s ease-in-out infinite;
}
.ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 14px; text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,106,26,.05) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #170f0d, #0d0807);
}
.ph-name { font-family: var(--pixel); font-size: 20px; color: #6b524b; line-height: 1.15; }
.ph-hint { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #4a3833; }
.card-tag {
  position: absolute; top: 10px; left: 10px; z-index: 3; padding: 4px 9px;
  background: var(--line-2); color: var(--ink);
  font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  pointer-events: none;
}
.card-tag.tag-legend { background: var(--fire-3); }
.card-tag.tag-top    { background: var(--blood); color: #ffe6da; }
.card-tag.tag-hit    { background: var(--fire); }
.card-tag.tag-plain  { color: #d9c3bb; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-name { font-family: var(--pixel); font-size: 24px; line-height: 1.1; color: var(--text); }
.card-name.is-rank { color: var(--fire-2); }
.card-desc { font-size: 13px; line-height: 1.55; color: var(--muted); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.card-price { font-family: var(--pixel); font-size: 26px; color: var(--text); }
.card-add {
  padding: 10px 14px; background: #2a1410; border: 1px solid #5a2a1f; color: var(--fire-2);
  font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px;
  cursor: pointer; transition: all .16s ease; white-space: nowrap;
}
.card-add:hover { background: var(--fire); color: var(--ink); border-color: var(--fire); transform: translateY(-2px); }

.empty-cat { padding: 44px; text-align: center; color: var(--muted-2); font-size: 15px; border: 2px dashed var(--line); }

/* ---------- галерея ---------- */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gal {
  position: relative; height: 300px; overflow: hidden;
  border: 2px solid var(--line); background: var(--panel);
  transition: border-color .18s ease;
}
.gal:hover { border-color: var(--fire); }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-cap {
  position: absolute; left: 0; bottom: 0; z-index: 3; padding: 10px 14px;
  background: rgba(10,7,6,.82);
  border-top: 2px solid var(--line); border-right: 2px solid var(--line);
  font-family: var(--pixel); font-size: 20px; pointer-events: none;
}

/* ---------- режимы ---------- */
.modes-band {
  position: relative; z-index: 5;
  border-top: 2px solid var(--line); border-bottom: 2px solid var(--line);
  background: var(--bg-2);
}
.modes-in { max-width: 1240px; margin: 0 auto; padding: 56px 24px; }
.modes-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.modes-head span { font-size: 14px; color: var(--muted); }
.modes-head b { color: var(--ok); }
.mode {
  border: 2px solid var(--line); background: #120c0a; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mode:hover { border-color: var(--fire); transform: translateY(-5px); box-shadow: 0 16px 34px rgba(0,0,0,.5); }
.mode-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-name { font-family: var(--pixel); font-size: 26px; color: var(--fire); word-break: break-word; }
.mode-desc { font-size: 13px; color: var(--muted); line-height: 1.5; min-height: 38px; }
.bar { height: 10px; background: #1c1210; border: 1px solid var(--line); }
.bar-fill {
  height: 100%; position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--fire), var(--blood));
  transition: width .6s ease;
}
.bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,235,200,.55), transparent);
  animation: sweep 3.4s ease-in-out infinite;
}
.mode-foot { display: flex; justify-content: space-between; font-family: var(--pixel); font-size: 17px; }
.mode-foot .ver { color: var(--muted-2); }

/* ---------- внутренние страницы ---------- */
.doc-page { position: relative; z-index: 5; max-width: 900px; margin: 0 auto; padding: 56px 24px 70px; }
.doc-page.narrow { max-width: 860px; }
.doc-page.wide { max-width: 1240px; }
.page-title { font-family: var(--pixel); font-size: clamp(38px, 7vw, 60px); font-weight: 700; }
.page-title.sm { font-size: clamp(34px, 6vw, 54px); margin-bottom: 8px; }
.page-lead { margin: 14px 0 0; max-width: 640px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.doc-date { font-size: 13px; color: var(--muted-2); margin-bottom: 30px; }

.rules-list { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.rule { border: 2px solid var(--line); background: var(--panel); padding: 22px 24px; display: flex; gap: 20px; }
.rule-num { font-family: var(--pixel); font-size: 30px; color: var(--fire); line-height: 1; min-width: 44px; }
.rule-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.rule-text { font-size: 15px; line-height: 1.65; color: #9a8681; text-wrap: pretty; }
.rule-pen {
  margin-top: 10px; font-size: 12px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--blood); font-weight: 900;
}

.doc-sec { margin-bottom: 26px; }
.doc-h { font-family: var(--pixel); font-size: 24px; color: var(--fire-2); margin-bottom: 8px; }
.doc-t { font-size: 15px; line-height: 1.75; color: #9a8681; text-wrap: pretty; }

/* ---------- бан-лист ---------- */
.bans-tools { display: flex; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: #140d0b; border: 1px solid var(--line-2);
  flex: 1; min-width: 240px; max-width: 420px; transition: border-color .18s ease;
}
.search:focus-within { border-color: var(--fire); }
.search-ico { color: var(--muted-2); font-size: 16px; }
.search input {
  flex: 1; min-width: 0; padding: 12px 0; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--pixel); font-size: 18px;
}
.bans-count { font-size: 13px; color: var(--muted); }
.bans-count b { color: var(--text); }

.bans-table { margin-top: 18px; border: 2px solid var(--line); background: var(--panel); }
.ban-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr .8fr;
  gap: 0; padding: 12px 18px; border-bottom: 1px solid var(--line-3);
  align-items: center; transition: background .16s ease;
}
.ban-row:hover { background: #150e0c; }
.ban-row.head {
  padding: 14px 18px; background: var(--panel-2); border-bottom: 2px solid var(--line);
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.ban-player { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ban-head-img {
  width: 40px; height: 40px; flex: none; object-fit: cover;
  background: #2a1410; border: 1px solid var(--line-2); image-rendering: pixelated;
}
.ban-nick { font-family: var(--pixel); font-size: 19px; overflow: hidden; text-overflow: ellipsis; }
.ban-cell { font-size: 14px; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.ban-cell.mod { color: var(--muted); }
.ban-status { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); }
.ban-status.st-active { color: var(--blood); }
.ban-status.st-unban { color: var(--ok); }
.bans-empty { padding: 44px; text-align: center; color: var(--muted-2); font-size: 15px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.pager-nums { display: flex; gap: 8px; flex-wrap: wrap; }
.pager-btn {
  padding: 10px 14px; background: #140d0b; border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .16s ease;
}
.pager-btn:hover:not(:disabled) { border-color: var(--fire); color: var(--fire-2); }
.pager-btn:disabled { opacity: .4; cursor: default; }
.page-num {
  min-width: 40px; text-align: center; padding: 10px 12px;
  background: #140d0b; border: 1px solid var(--line-2); color: var(--text-2);
  font-family: var(--pixel); font-size: 17px; cursor: pointer; transition: all .16s ease;
}
.page-num:hover { border-color: var(--fire); }
.page-num.active { background: var(--fire); border-color: var(--fire); color: var(--ink); }
.pager-info { font-size: 13px; color: var(--muted-2); }

/* ---------- футер ---------- */
.footer { position: relative; z-index: 5; border-top: 2px solid var(--line); background: var(--bg); }
.footer-grid {
  max-width: 1240px; margin: 0 auto; padding: 48px 24px 30px;
  display: grid; grid-template-columns: 1.3fr .7fr .7fr .9fr; gap: 32px;
}
.footer-brand { font-family: var(--pixel); font-size: 26px; margin-bottom: 12px; }
.footer-about { font-size: 14px; line-height: 1.7; color: #7e6a65; max-width: 320px; }
.ip-btn {
  margin-top: 16px; display: inline-flex; gap: 10px; align-items: center;
  padding: 9px 14px; background: #140d0b; border: 1px solid var(--line-2);
  font-family: var(--pixel); font-size: 16px; color: var(--text);
  cursor: pointer; transition: all .16s ease;
}
.ip-btn:hover { border-color: var(--fire); color: var(--fire-2); }
.ip-btn.is-copied { border-color: var(--ok); color: var(--ok); }
.footer-contacts { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 14px; color: #9a8681; }
.footer-title {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700; margin-bottom: 14px;
}
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; font-size: 14px; }
.footer-links a, .footer-links button { color: #9a8681; cursor: pointer; text-align: left; }
.footer-links a:hover, .footer-links button:hover { color: var(--fire-2); }
.pay-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-tag { padding: 8px 12px; background: #140d0b; border: 1px solid var(--line); font-size: 12px; color: #9a8681; }
.footer-note { margin-top: 14px; font-size: 13px; color: var(--muted-2); line-height: 1.6; }
.footer-bottom {
  max-width: 1240px; margin: 0 auto; padding: 18px 24px 40px;
  border-top: 1px solid var(--line-3);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted-3);
}

/* ---------- корзина ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.drawer-back { position: absolute; inset: 0; background: rgba(4,2,2,.72); backdrop-filter: blur(3px); }
.drawer-panel {
  position: relative; width: 440px; max-width: 92vw; height: 100%;
  background: var(--panel); border-left: 2px solid var(--line-2);
  display: flex; flex-direction: column; box-shadow: -30px 0 80px rgba(0,0,0,.7);
  animation: fadein .18s ease;
}
.drawer-head {
  padding: 22px 24px; border-bottom: 2px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.drawer-title { font-size: 28px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 22px 24px; border-top: 2px solid var(--line); background: var(--bg-2); }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.drawer-sum { font-size: 36px; color: var(--fire); }
.drawer-pay { width: 100%; padding: 16px; font-size: 15px; }
.drawer-note { margin-top: 12px; font-size: 12px; color: var(--muted-2); line-height: 1.6; text-align: center; }
.cart-empty { padding: 60px 0; text-align: center; color: var(--muted-2); font-size: 15px; line-height: 1.7; }

.line { border: 1px solid var(--line); background: #150e0c; padding: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.line-main { flex: 1; min-width: 120px; }
.line-name { font-family: var(--pixel); font-size: 19px; }
.line-unit { font-size: 12px; color: var(--muted); margin-top: 2px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--text-2); cursor: pointer; transition: all .16s ease;
}
.qty-btn:hover { border-color: var(--fire); color: var(--fire-2); }
.qty-n { font-family: var(--pixel); font-size: 18px; min-width: 22px; text-align: center; }
.line-sum { font-family: var(--pixel); font-size: 20px; min-width: 72px; text-align: right; }

/* ---------- модалка оформления ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-back { position: absolute; inset: 0; background: rgba(4,2,2,.78); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; width: 560px; max-width: 100%; max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 2px solid var(--line-2);
  box-shadow: 0 40px 90px rgba(0,0,0,.7), 0 0 60px rgba(255,106,26,.12);
  animation: fadein .2s ease;
}
.modal-head {
  padding: 22px 26px; border-bottom: 2px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.modal-title { font-size: clamp(22px, 5vw, 30px); }
.modal-body { padding: 26px; }
.field-label { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.field-label + .field { margin-bottom: 0; }
.modal-body .field { padding: 12px 13px; font-size: 15px; }
.err-msg { font-size: 12px; color: var(--blood); font-weight: 700; min-height: 17px; margin: 5px 0 8px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px; background: var(--field); border: 1px solid var(--line);
  cursor: pointer; text-align: left; transition: all .16s ease;
}
.pay-method:hover { border-color: var(--fire); }
.pay-method.active { background: #2a1410; border-color: var(--fire); }
.pm-name { font-size: 14px; font-weight: 700; color: var(--text-2); }
.pay-method.active .pm-name { color: var(--fire-2); }
.pm-fee { font-size: 11px; color: var(--muted); }
.promo-row { display: flex; gap: 10px; margin-top: 18px; }
.promo-row .field { font-family: var(--pixel); font-size: 17px; }
.promo-msg { font-size: 12px; font-weight: 700; min-height: 17px; margin-top: 6px; color: var(--blood); }
.promo-msg.ok { color: var(--ok); }
.summary {
  margin-top: 14px; padding: 16px; background: var(--field); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #9a8681; }
.summary-row span:last-child { color: var(--text); }
.summary-row.disc span:last-child { color: var(--ok); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line-3); }
.summary-total .sum { font-family: var(--pixel); font-size: 34px; color: var(--fire); }
.agree { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; text-align: left; }
.agree-btn { flex: none; padding: 0; cursor: pointer; }
.agree-box {
  width: 20px; height: 20px; margin-top: 1px;
  background: var(--field); border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--ink);
  font-size: 13px; font-weight: 900; transition: all .16s ease;
}
.agree-btn:hover .agree-box { border-color: var(--fire); }
.agree-btn.on .agree-box { background: var(--fire); border-color: var(--fire); }
.agree-text { font-size: 13px; line-height: 1.6; color: var(--muted); }
.pay-submit { width: 100%; margin-top: 12px; padding: 17px; font-size: 15px; letter-spacing: 1.2px; }
.pay-foot { margin-top: 10px; font-size: 12px; color: var(--muted-3); text-align: center; }
.done { padding: 52px 30px; text-align: center; }
.done-title { font-family: var(--pixel); font-size: clamp(30px, 7vw, 40px); color: var(--ok); margin-bottom: 12px; }
.done-text { font-size: 15px; line-height: 1.7; color: #9a8681; max-width: 400px; margin: 0 auto; }
.done-text b { color: var(--text); }
.done-order { font-family: var(--pixel); font-size: 22px; color: var(--fire-2); margin-top: 14px; }

/* ---------- загрузка / ошибка ---------- */
.loading { padding: 90px 24px; text-align: center; color: var(--muted-2); font-family: var(--pixel); font-size: 22px; }
.load-fail { max-width: 620px; margin: 60px auto; padding: 0 24px; text-align: center; }
.load-fail .h2 { margin-bottom: 12px; }
.load-fail p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 20px; }

/* =====================================================================
   АДАПТИВ
   ===================================================================== */
@media (max-width: 1024px) {
  .hero-art { display: none; }
  .donate-grid { grid-template-columns: 1fr; }
  .donate-side { border-left: none; border-top: 2px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 24px 44px; }
}

@media (max-width: 760px) {
  .wrap, .section, .modes-in, .footer-grid, .footer-bottom, .topbar-in, .hero, .donate-wrap, .divider-sec, .doc-page {
    padding-left: 16px; padding-right: 16px;
  }
  /* шапка на мобильных: 1) логотип + корзина, 2) онлайн + валюта, 3) навигация */
  .topbar-in { gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; }
  .topbar-tools { display: contents; }
  .brand { order: 1; }
  .brand-name { font-size: 21px; }
  .cart-btn { order: 2; margin-left: auto; padding: 9px 12px; font-size: 12px; }
  .online-chip { order: 3; padding: 7px 10px; font-size: 15px; }
  .online-cap { display: none; }
  .cur { order: 4; }
  .cur-btn { padding: 7px 10px; }
  /* навигация — компактный ряд с горизонтальным скроллом */
  .nav {
    order: 5; width: 100%; flex: 1 0 100%;
    flex-wrap: nowrap; overflow-x: auto; gap: 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 13px; padding: 7px 9px; border-color: var(--line-3); }

  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .card-media { height: 140px; }
  .card-name { font-size: 20px; }
  .card-price { font-size: 22px; }

  .gallery { grid-template-columns: 1fr; }
  .gal { height: 220px; }

  .donate-main, .donate-side { padding: 22px 16px; }
  .donate-head { padding: 20px 16px; }
  .amount-right { text-align: left; }
  .scale span:nth-child(even) { display: none; }

  .section, .modes-in { padding-bottom: 48px; }
  .modes-in { padding-top: 40px; }

  /* бан-лист превращается в карточки */
  .ban-row.head { display: none; }
  .ban-row {
    grid-template-columns: 1fr; gap: 8px; padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  .ban-cell::before, .ban-status::before {
    content: attr(data-label) ': ';
    color: var(--muted-2); font-size: 11px; letter-spacing: 1px;
    text-transform: uppercase; font-weight: 700;
  }
  .ban-status::before { color: var(--muted-2); }

  .rule { flex-direction: column; gap: 10px; padding: 18px 16px; }
  .pay-methods { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .drawer-panel { width: 100%; max-width: 100%; border-left: none; }
  .modal { padding: 0; }
  .modal-box { max-height: 100vh; height: 100%; border: none; }
  .grid-cards { grid-template-columns: 1fr; }
  .card-media { height: 170px; }
  .hero-metrics { gap: 20px; }
  .metric-v { font-size: 28px; }
  .presets { gap: 8px; }
  .preset { padding: 9px 13px; font-size: 16px; }
  .promo-row { flex-direction: column; }
  .line-sum { min-width: 0; }
  .h2, .donate-title { word-break: break-word; }
}
