:root {
  color-scheme: dark;
  /* Фиксированная ТЁМНАЯ тема — НЕ зависим от темы Telegram (иначе при светлой
     теме TG текст становился тёмным и сливался с тёмными карточками). */
  --bg: #0a0b0f;
  --surface: #14161d;
  --surface-2: #1d2029;
  --text: #f4f5f8;
  --muted: #8b91a1;
  --accent: #e23744;
  --accent-2: #ff5161;
  --accent-text: #fff;
  --accent-soft: rgba(226,55,68,.15);
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --ok: #3ad07a;
  --danger: #ff5d6c;
  --r: 18px;
  --r-sm: 13px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(226,55,68,.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text); padding-bottom: 104px; letter-spacing: -.01em;
}
.hidden { display: none !important; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 0; }

/* ── Шапка ───────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 19px; flex: 1; letter-spacing: -.02em; }
.brand span { background: linear-gradient(92deg, #fff, #ff8a93);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-back {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  width: 38px; height: 38px; border-radius: 12px; font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform .12s, background .15s;
}
.nav-back:active { transform: scale(.92); }
.white-toggle { border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  width: 38px; height: 38px; border-radius: 12px; font-size: 17px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: .15s; }
.white-toggle.on { background: #fff; color: #111; border-color: #fff; }

/* ── Баннер-шапка (main_menu) ─────────────────────────── */
.hero { position: relative; width: 100%; aspect-ratio: 1376 / 620; max-height: 220px;
  overflow: hidden; background: var(--surface); }
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-grad { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,11,15,.05) 0%, rgba(10,11,15,.35) 60%, var(--bg) 100%); }
.hero-content { position: absolute; left: 16px; right: 16px; bottom: 11px; z-index: 1; }
.hero-tag { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.92);
  letter-spacing: -.01em; text-shadow: 0 1px 10px rgba(0,0,0,.6); }

/* ── Кабинет ─────────────────────────────────────────── */
.cabinet { margin: 14px 16px 0; padding: 16px 18px; border-radius: var(--r);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--surface);
  border: 1px solid var(--line); }
.cab-top { display: flex; justify-content: space-between; align-items: center; }
.cab-name { font-size: 15px; font-weight: 600; }
.cab-tier { font-size: 12px; font-weight: 600; color: #ffb3ba;
  background: var(--accent-soft); padding: 4px 10px; border-radius: 20px; }
.balances { display: flex; gap: 10px; margin-top: 14px; }
.bal { flex: 1; background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px; display: flex; flex-direction: column; gap: 3px; }
.bal-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.bal b { font-size: 19px; font-weight: 800; }

/* ── Заголовки / крошки ──────────────────────────────── */
.app { padding: 18px 16px 8px; }
.loader { color: var(--muted); text-align: center; padding: 60px 0; }
.view-title { font-size: 24px; font-weight: 800; margin: 6px 2px 18px; letter-spacing: -.025em; }
.crumb { color: var(--muted); font-size: 13px; font-weight: 600; margin: 2px 2px 14px; }
.crumb b { color: var(--text); }

/* ── Блок «Как это работает» (белый режим) ───────────── */
.how-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; margin-bottom: 16px; }
.how-title { font-weight: 800; font-size: 16px; margin-bottom: 12px; letter-spacing: -.02em; }
.how-steps { display: flex; flex-direction: column; gap: 10px; }
.how-step { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); line-height: 1.4; }
.how-step b { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.how-link { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 700; font-size: 13px; text-decoration: none; }

/* ── Бренд-баннеры разделов (главная) — широкие, как у aoki ───────────── */
.brand-cards { display: flex; flex-direction: column; gap: 12px; }
.brand-card { display: flex; align-items: center; gap: 16px; cursor: pointer; text-align: left;
  border: none; border-radius: var(--r); padding: 20px 18px; min-height: 90px; position: relative;
  overflow: hidden; transition: transform .14s ease; }
.brand-card:active { transform: scale(.985); }
/* Затемняющий скрим — под задним логотипом (делает карточку темнее, но НЕ гасит лого) */
.brand-card::after { content: ''; position: absolute; inset: 0; z-index: 0; background: rgba(0,0,0,.34); }
.brand-card > * { position: relative; z-index: 2; }
/* Крупный размытый логотип-фон справа (за текстом, тот же файл, что слева) —
   z-index 1: ВЫШЕ скрима, поэтому виден и не затемняется */
.brand-card > .brand-bg { position: absolute; z-index: 1; right: 22px; top: 50%;
  transform: translateY(-50%); height: 172%; width: auto; max-width: 58%;
  object-fit: contain; opacity: .38; filter: blur(2.5px) brightness(1.15); pointer-events: none; }
/* Передний логотип — на «чипе»: скруглённый квадрат со светлой подложкой */
.brand-ico { width: 56px; height: 56px; flex-shrink: 0; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px; padding: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.brand-logo { width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)) brightness(1.08); }
.brand-text { flex: 1; min-width: 0; }
.brand-name { font-weight: 800; font-size: 18px; color: #fff; letter-spacing: -.02em; }
.brand-sub { color: rgba(255,255,255,.8); font-size: 12.5px; margin-top: 4px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-go { font-size: 26px; color: rgba(255,255,255,.85); flex-shrink: 0; }
.brand-card[data-brand="playstation"] { background: linear-gradient(110deg, #0a2a86, #1f7ae8); }
.brand-card[data-brand="xbox"] { background: linear-gradient(110deg, #0b6b1f, #36b24a); }
.brand-card[data-brand="emails"] { background: linear-gradient(110deg, #2c313d, #6b7484); }
.brand-card[data-brand="steam"] { background: linear-gradient(110deg, #0e1a27, #2a4d6e); }
.brand-card[data-brand="ns"] { background: linear-gradient(110deg, #7a1020, #e23744); }
.brand-card[data-brand="default"] { background: linear-gradient(110deg, #20232c, #3a3f4e); }

/* ── Подразделы ──────────────────────────────────────── */
.subcards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.subcard { display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 16px;
  transition: transform .14s, border-color .15s; }
.subcard:active { transform: scale(.985); border-color: var(--line-2); }
.subcard-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; background: var(--accent-soft); flex-shrink: 0; }
.subcard-main { flex: 1; min-width: 0; }
.subcard-name { font-weight: 700; font-size: 15px; }
.subcard-count { color: var(--muted); font-size: 12px; margin-top: 2px; }
.subcard-arrow { color: var(--muted); font-size: 20px; }

/* ── Товары (сетка карточек) ─────────────────────────── */
.group { margin-bottom: 22px; }
.group-head { color: var(--muted); font-size: 13px; font-weight: 700; margin: 6px 2px 12px;
  text-transform: uppercase; letter-spacing: .5px; }
.section-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }

/* Таблица подписок: типы × периоды */
.sub-table { display: grid; gap: 8px; margin-bottom: 22px; align-items: stretch; }
.st-corner { }
.st-head { font-size: 12.5px; font-weight: 800; text-align: center; padding: 2px 0 4px;
  letter-spacing: -.01em; }
.st-period { font-size: 12px; font-weight: 700; color: var(--muted); display: flex;
  align-items: center; white-space: nowrap; }
.st-cell { display: flex; }
.st-box { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 6px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.st-box.in-cart { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.st-price { font-weight: 800; font-size: 12.5px; white-space: nowrap; text-align: center; }
.st-add { width: 100% !important; height: 28px !important; border-radius: 8px !important; font-size: 18px !important; }
.st-box .stepper { width: 100%; justify-content: space-between; }
.st-empty { }

/* Строки товаров (подписки/аккаунты) — во всю ширину, столбиком */
.item-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; }
.item-row.in-cart { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.item-row-name { font-size: 14px; font-weight: 600; }
.item-row-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.item-row-price { font-weight: 800; font-size: 15px; white-space: nowrap; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 12px; }
.product { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 104px; transition: border-color .15s; }
.product.in-cart { border-color: var(--accent); background:
  linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.product-name { font-weight: 600; font-size: 13.5px; line-height: 1.35; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { font-weight: 800; font-size: 15px; white-space: nowrap; }
.product-price.req { color: var(--muted); font-size: 13px; font-weight: 600; }

.add-btn { border: none; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  width: 34px; height: 34px; border-radius: 11px; font-size: 22px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.add-btn:active { transform: scale(.9); }
.stepper { display: flex; align-items: center; background: var(--accent-soft); border-radius: 11px; }
.stepper button { border: none; background: transparent; color: #ffb3ba; width: 30px; height: 34px;
  font-size: 19px; cursor: pointer; font-weight: 800; }
.stepper .qty { min-width: 20px; text-align: center; font-weight: 800; font-size: 14px; }

/* ── Калькулятор ─────────────────────────────────────── */
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; margin-bottom: 16px; }
.calc-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; letter-spacing: -.02em; }
.new-badge { display: inline-flex; align-items: center; margin-left: 8px; vertical-align: middle;
  font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, #7b2ff7, #f107a3); padding: 3px 9px; border-radius: 20px;
  animation: newGlow 1.7s ease-in-out infinite; white-space: nowrap; }
@keyframes newGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241,7,163,.5), 0 0 7px rgba(123,47,247,.55); }
  50% { box-shadow: 0 0 0 4px rgba(241,7,163,0), 0 0 17px rgba(241,7,163,.95); }
}
.calc-hint { color: var(--muted); font-size: 12px; margin-bottom: 14px; line-height: 1.5; }
.calc-input-row { display: flex; gap: 10px; }
.calc-input { flex: 1; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font-size: 16px; font-family: inherit; font-weight: 600; }
.calc-input:focus { outline: none; border-color: var(--accent); }
.calc-result { margin-top: 14px; font-size: 16px; min-height: 22px; font-weight: 600; }
.calc-result b { font-weight: 800; font-size: 20px;
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.calc-sub { color: var(--muted); font-size: 13px; }
.calc-add { width: 100%; margin-top: 14px; padding: 14px; font-size: 15px; }

/* ── Поиск игр PS (обложки, карточки, страница) ──────── */
.gsearch-seg { margin: 12px 0; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-top: 14px; }
.game-card { cursor: pointer; border-radius: 12px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .12s, border-color .15s; }
.game-card:active { transform: scale(.97); border-color: var(--accent); }
.game-cover-wrap { position: relative; }
.game-cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: var(--surface-2); }
.game-plat { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; }
.plat-badge { font-size: 9px; font-weight: 800; letter-spacing: .3px; color: #fff;
  background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.25); padding: 1px 5px; border-radius: 4px; }
.game-body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.game-kind { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.game-name { font-size: 12px; font-weight: 600; line-height: 1.28; max-height: 46px; overflow: hidden; }
.game-price { font-weight: 800; font-size: 13.5px; margin-top: auto; }
.game-disc { display: inline-block; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
  padding: 1px 5px; border-radius: 5px; margin-left: 4px; vertical-align: middle; }
.games-empty { color: var(--muted); text-align: center; padding: 28px 0; grid-column: 1/-1; }
.games-count { color: var(--muted); font-size: 12px; font-weight: 700; margin: 12px 2px 6px; }
.games-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.pg-btn { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font-weight: 800; font-size: 14px; cursor: pointer; }
.pg-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: default; }

/* Страница игры (модалка) */
.game-page .modal-card { padding-top: 0; }
.game-hero { margin: 0 -18px 14px; }
.game-hero img { width: 100%; max-height: 240px; object-fit: cover; display: block; }
.game-page h3 { margin: 4px 0 6px; }
.game-meta { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.game-bigprice { font-size: 26px; font-weight: 800; margin: 10px 0 4px;
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.game-info { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.game-chips { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.game-summary { font-size: 13.5px; line-height: 1.6; color: var(--text); margin-bottom: 14px; }
.game-subhead { font-size: 13px; font-weight: 800; margin: 14px 0 8px; }
.game-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chip { font-size: 11.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); padding: 4px 9px; border-radius: 20px; }
.game-shots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.game-shots img { height: 116px; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--line); cursor: zoom-in; }

/* Лайтбокс скриншотов */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 88vh; border-radius: 8px; }
.lb-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.16); color: #fff; border: none; font-size: 19px; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 64px;
  background: rgba(255,255,255,.14); color: #fff; border: none; font-size: 30px; cursor: pointer; border-radius: 12px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }

/* ── Плавающая корзина ───────────────────────────────── */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 14px 16px;
  background: linear-gradient(transparent, var(--bg) 42%); }
.cart-bar button { width: 100%; border: none; color: #fff; padding: 16px 20px; border-radius: 16px;
  font-size: 16px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 32px rgba(109,94,252,.4); }
.cart-sum { font-weight: 800; }

/* ── Модалка корзины ─────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.66);
  display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.modal-card { width: 100%; max-width: 560px; background: var(--bg); border-radius: 24px 24px 0 0;
  padding: 18px 18px 28px; max-height: 90vh; overflow: auto; border-top: 1px solid var(--line-2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.x { border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 34px; height: 34px;
  border-radius: 11px; font-size: 16px; cursor: pointer; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-name { font-size: 14px; font-weight: 600; }
.cart-line-price { color: var(--muted); font-size: 12px; margin-top: 3px; }
.cart-line .rm { border: none; background: none; color: var(--danger); font-size: 18px; cursor: pointer; }
/* Тумблер-слайдер «Аккаунт: На мой | Нужен новый» (один на весь заказ) */
.acc-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 2px; padding-top: 14px;
  border-top: 1px solid var(--line); }
.acc-label { font-size: 13px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.acc-toggle { position: relative; flex: 1; display: flex; background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; cursor: pointer; user-select: none; }
.acc-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: transform .2s ease; }
.acc-toggle.on .acc-thumb { transform: translateX(100%); }
.acc-opt { flex: 1; z-index: 1; text-align: center; padding: 8px 4px; font-size: 12.5px;
  font-weight: 700; color: var(--muted); transition: color .18s; white-space: nowrap; }
.acc-opt.active { color: #fff; }
.cart-fee { color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 12px 2px 0; text-align: right; }
.cart-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; padding: 16px 2px 4px; }
.cart-total .muted { color: var(--muted); font-weight: 600; font-size: 13px; }
.field { display: block; margin: 14px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field textarea { width: 100%; margin-top: 7px; padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; }
.btn-primary { border: none; color: #fff; border-radius: 14px; font-weight: 800; cursor: pointer; padding: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-primary.big { width: 100%; margin-top: 18px; font-size: 16px; padding: 16px; }
.btn-primary:disabled { opacity: .6; }
.hint { color: var(--muted); font-size: 12px; margin-top: 12px; text-align: center; }
.empty-cart { color: var(--muted); text-align: center; padding: 24px 0; }

/* ── Footer ──────────────────────────────────────────── */
.footer { padding: 30px 16px 48px; text-align: center; color: var(--muted); font-size: 13px; }
.footer a { display: inline-block; margin: 0 8px; color: #ff8a93; text-decoration: none; font-weight: 600; }
.footer .support { margin-top: 14px; }

/* ── Toast ───────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(8px);
  background: var(--surface-2); color: var(--text); padding: 11px 18px; border-radius: 13px; font-size: 14px;
  font-weight: 600; z-index: 50; border: 1px solid var(--line-2); opacity: 0; transition: .22s;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Нижняя таб-навигация ────────────────────────────── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(18px) saturate(140%); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0); }
.tab { flex: 1; border: none; background: transparent; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px;
  position: relative; transition: color .15s; }
.tab.active { color: var(--accent); }
.tab-ico { font-size: 21px; line-height: 1; filter: grayscale(.2); }
.tab.active .tab-ico { filter: none; }
.tab-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; }
.tab-badge { position: absolute; top: 4px; left: 50%; margin-left: 6px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ── Админ-панель (валюта + белый режим) ─────────────── */
.admin-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-label { font-size: 13px; font-weight: 600; color: var(--text); }
.admin-hint { font-size: 11.5px; color: var(--muted); }
.seg { display: flex; gap: 3px; background: var(--bg); padding: 3px; border-radius: 10px; border: 1px solid var(--line); }
.seg button { border: none; background: transparent; color: var(--muted); width: 38px; height: 28px;
  border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 14px; }
.seg button.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.sw { width: 46px; height: 27px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg);
  position: relative; cursor: pointer; transition: background .18s; flex-shrink: 0; }
.sw i { position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; transition: transform .18s; }
.sw.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.sw.on i { transform: translateX(19px); }

/* ── Поиск ───────────────────────────────────────────── */
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 0 14px; margin-bottom: 18px; }
.search-box input { flex: 1; border: none; background: transparent; color: var(--text);
  font-size: 16px; font-family: inherit; padding: 14px 0; outline: none; }
.search-empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ── Юр. страницы ────────────────────────────────────── */
.doc { max-width: 720px; margin: 0 auto; padding: 28px 20px 64px; line-height: 1.65; }
.doc h1 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.doc h2 { font-size: 18px; font-weight: 700; margin-top: 28px; }
.doc a { color: #ff8a93; }
.doc .back { display: inline-block; margin-bottom: 18px; color: #ff8a93; text-decoration: none; font-weight: 600; }
.doc .placeholder { background: rgba(255,200,0,.13); padding: 2px 6px; border-radius: 6px; }

/* ── Steam Gift (игра подарком) ────────────────────────────────────────── */
.sgift-results { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sgift-row {
  text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: inherit; font: inherit; font-weight: 600;
}
.sgift-row:hover { background: rgba(255,255,255,.09); }
.sgift-body { display: flex; flex-direction: column; gap: 10px; }
.sgift-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sgift-opt {
  padding: 9px 13px; border-radius: 10px; cursor: pointer; font: inherit;
  font-weight: 600; font-size: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: inherit;
}
.sgift-opt.active { background: #ff5964; border-color: #ff5964; color: #fff; }
.sgift-reghead.hidden { display: none; }
