/* ==========================================================================
   Velora — оформление сайта
   Заголовки: Press Start 2P. Текст: Inter (гротеск).
   Шкала от базовых 17px: H1 — 34px (×2), H2 — 25px (×1.5),
   подзаголовок — 21px, второстепенный текст — 13–14px.
   Межстрочный интервал 120% базово; в широких колонках текста — до 150%.
   ========================================================================== */

:root {
  --accent: #8B5CFF;
  --accent-soft: rgba(139, 92, 255, .16);
  --accent-line: rgba(139, 92, 255, .38);
  --accent-glow: rgba(139, 92, 255, .10);

  /* Акцент для текста: если админ выбрал тёмный цвет, подмешиваем белый,
     иначе заголовки сливаются с фоном. Старые браузеры получат чистый акцент. */
  --accent-text: var(--accent);
  --accent-text: color-mix(in srgb, var(--accent) 62%, #FFFFFF);

  --bg: #0A0A11;
  --bg-alt: #0E0E17;
  --panel: #14141F;
  --panel-2: #191926;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, .62);
  --dim: rgba(255, 255, 255, .40);

  --ok: #5FE39B;
  --err: #FF5C74;

  --fs-base: 17px;
  --fs-small: 13px;
  --fs-h1: 34px;
  --fs-h2: 25px;
  --fs-h3: 21px;

  --lh: 1.2;
  --lh-wide: 1.5;

  --radius: 16px;
  --radius-sm: 10px;

  --font-head: 'Press Start 2P', 'Courier New', monospace;
  --font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container: 1180px;
}

* { box-sizing: border-box; }

/* Скрытые элементы прячем жёстко: пустая картинка товара не должна
   мелькать рамкой «битого» изображения до подстановки данных */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-base);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }

.page { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1 0 auto; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Ограничение длины строки: 45–75 символов */
.measure { max-width: 68ch; line-height: var(--lh-wide); }

/* text-wrap: pretty не даёт последней строке абзаца остаться из одного слова */
p, .measure, .card__text, .step__text, .doc p, .section__sub { text-wrap: pretty; }

.accent { color: var(--accent-text); }

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 17, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }

.logo__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 0 22px var(--accent-line);
}

.logo__image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-logo {
  width: 64px;
  height: auto;
  display: block;
}

.logo__text {
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: .5px;
}

.nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }

.nav__link {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color .18s, background-color .18s;
}

.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.nav__link.is-active { color: var(--text); background: var(--accent-soft); }

.header__side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.server-badge {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
  transition: border-color .18s;
}

.server-badge:hover { border-color: var(--accent-line); }

.server-badge__ip { font-size: 14px; font-weight: 600; letter-spacing: .2px; }

.server-badge__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.server-badge__status b { color: var(--accent-text); font-weight: 700; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2.4s infinite;
}

.dot.is-offline, .server-badge__status.is-offline .dot {
  background: var(--err);
  box-shadow: 0 0 8px var(--err);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

.cart-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  transition: color .18s, border-color .18s;
}

.cart-link:hover { color: var(--text); border-color: var(--accent-line); }

.cart-link.has-items { color: var(--text); border-color: var(--accent-line); }

.cart-link__count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.cart-link:not(.has-items) .cart-link__count { display: none; }

.burger { display: none; }

/* --------------------------------------------------------------------------
   Кнопки и мелкие элементы
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background-color .2s, border-color .2s;
}

.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 26px -10px var(--accent);
}

.btn--accent:hover { box-shadow: 0 12px 34px -10px var(--accent); }

.btn--accent[disabled] {
  background: var(--panel-2);
  color: var(--dim);
  box-shadow: none;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }

.btn--lg { padding: 17px 40px; font-size: 16px; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--full { width: 100%; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-size: var(--fs-small);
  text-decoration: underline;
  cursor: pointer;
}

.link-btn:hover { color: var(--err); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--panel);
  font-size: var(--fs-small);
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 100px;
  font-family: var(--font-head);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .4px;
}

.tag--hot {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-line);
}

.alert {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.35;
}

.alert--ok  { background: rgba(95, 227, 155, .12); border: 1px solid rgba(95, 227, 155, .35); color: var(--ok); }
.alert--err { background: rgba(255, 92, 116, .12); border: 1px solid rgba(255, 92, 116, .35); color: var(--err); }

/* --------------------------------------------------------------------------
   Секторы и заголовки
   -------------------------------------------------------------------------- */

.section { padding: 84px 0; }

.section--donators { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--advantages { padding-bottom: 96px; }
.section--promo { padding-top: 0; }
.section--shop-top { padding-bottom: 46px; }
.section--catalog { padding-top: 20px; }

.section__head { margin-bottom: 40px; }

/* text-wrap: balance выравнивает строки заголовка по длине —
   так последнее слово не остаётся в строке в одиночестве */
.section__title,
.hero__title,
.card__title,
.step__title,
.modal__title,
.featured__title,
.product__title,
.donator__nick {
  text-wrap: balance;
  /* Длинные слова вроде «Пользовательское» пиксельным шрифтом не влезают
     на узкий экран — переносим вместо горизонтальной прокрутки */
  overflow-wrap: break-word;
}

.section__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.35;
}

.section__title--h1 { font-size: var(--fs-h1); line-height: 1.4; }

.section__sub {
  margin: 14px 0 0;
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: var(--lh-wide);
}

/* --------------------------------------------------------------------------
   Обложка
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: clip;
}

.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  left: -140px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .5;
  pointer-events: none;
}

.hero__inner, .hero__cta { position: relative; z-index: 1; }

.hero__text { max-width: 760px; }

.hero__title {
  margin: 22px 0 0;
  font-family: var(--font-head);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.45;
  color: var(--accent-text);
  text-shadow: 0 0 42px var(--accent-line);
}

.hero__lead { margin: 22px 0 0; font-size: 18px; color: var(--muted); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero__stat {
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.hero__stat b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.hero__stat span {
  display: block;
  margin-top: 5px;
  font-size: var(--fs-small);
  color: var(--dim);
}

.hero__stat--ip { cursor: pointer; transition: border-color .18s; }
.hero__stat--ip:hover { border-color: var(--accent-text); }
.hero__stat--ip b { color: var(--accent-text); }

.hero__cta {
  margin-top: 62px;
  text-align: center;
}

.hero__cta-note {
  margin: 16px 0 0;
  font-size: var(--fs-small);
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Топ донатеров
   -------------------------------------------------------------------------- */

.donators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.donator {
  position: relative;
  padding: 30px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
  transition: transform .2s, border-color .2s;
}

.donator:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.donator--1 {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--panel) 55%);
  box-shadow: 0 0 46px -18px var(--accent);
}

.donator__place {
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 1.2;
  color: var(--dim);
}

.donator--1 .donator__place { color: var(--accent-text); }

.donator__skin {
  width: 72px;
  height: 72px;
  margin: 18px auto 14px;
  border-radius: 12px;
  image-rendering: pixelated;
  background: var(--panel-2);
}

.donator__nick {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.donator__sum {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-text);
}

.donator__meta {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Карточки преимуществ
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform .2s, border-color .2s;
}

.card:hover { transform: translateY(-4px); border-color: var(--accent-line); }

.card__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-head);
  font-size: 13px;
  line-height: 1;
}

.card__title {
  margin: 0 0 10px;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
}

.card__value { margin: 0 0 8px; font-size: 16px; font-weight: 600; }

.card__text {
  margin: 0;
  font-size: 15px;
  line-height: var(--lh-wide);
  color: var(--muted);
}

.cards--contacts { margin-bottom: 46px; }

.card--link { display: block; }

/* --------------------------------------------------------------------------
   Блок призыва
   -------------------------------------------------------------------------- */

.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 42px 44px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent-soft), transparent 62%), var(--panel);
}

.promo__text { max-width: 620px; }

/* --------------------------------------------------------------------------
   Магазин: популярный товар
   -------------------------------------------------------------------------- */

.featured {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  padding: 34px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  animation: glow 3.6s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--accent-line), 0 20px 60px -30px var(--accent); }
  50%      { box-shadow: 0 0 0 1px var(--accent), 0 26px 76px -26px var(--accent); }
}

.featured__glow {
  position: absolute;
  top: -160px;
  right: -120px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.featured__media {
  display: grid;
  place-items: center;
  align-self: start;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  overflow: hidden;
}

.featured__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.featured__placeholder,
.product__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  font-family: var(--font-head);
  font-size: 28px;
  color: var(--accent-text);
  background: var(--accent-soft);
}

.featured__title {
  margin: 16px 0 0;
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.35;
}

.pmodal__text {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.featured__sub { margin: 14px 0 0; font-size: 16px; color: var(--accent-text); }

.featured__text {
  margin: 14px 0 0;
  font-size: 16px;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.featured__foot {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.price { display: flex; align-items: baseline; gap: 10px; }

.price__old { font-size: 15px; color: var(--dim); }

.price__now { font-size: 22px; font-weight: 700; color: var(--accent-text); }

/* --------------------------------------------------------------------------
   Каталог
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 38px;
}

.tabs__btn {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s;
}

.tabs__btn:hover { color: var(--text); border-color: var(--line-strong); }

.tabs__btn.is-active {
  background: var(--accent);
  border-color: var(--accent-text);
  color: #fff;
}

.catalog { margin-bottom: 56px; }

.catalog__head { margin-bottom: 24px; }

.catalog__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.35;
}

.catalog__sub { margin: 12px 0 0; font-size: var(--fs-small); color: var(--dim); }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.product {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}

.product:hover { transform: translateY(-4px); border-color: var(--accent-line); }

.product.is-featured { border-color: var(--accent-line); }

.product__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
}

.product__media img { width: 100%; height: 100%; object-fit: cover; }

.product__tag { position: absolute; top: 12px; left: 12px; }

.product__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.product__title {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
}

.product__sub {
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.product__foot .price__now { font-size: 19px; }

/* --------------------------------------------------------------------------
   Корзина
   -------------------------------------------------------------------------- */

.cart {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.cart-item__media {
  width: 84px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  overflow: hidden;
}

.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; }

.cart-item__sub { margin: 6px 0 0; font-size: var(--fs-small); color: var(--muted); }

.cart-item__unit { margin-top: 6px; font-size: var(--fs-small); color: var(--dim); }

.cart-item__sum { font-size: 19px; font-weight: 700; color: var(--accent-text); white-space: nowrap; }

.cart-item__x {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: all .18s;
}

.cart-item__x:hover { color: var(--err); border-color: var(--err); }

.cart__clear { margin-top: 18px; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
}

.qty {
  align-self: flex-start;
}

.qty__btn {
  width: 38px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  transition: color .18s, background-color .18s;
}

.qty__btn:hover { color: var(--accent-text); background: rgba(255, 255, 255, .04); }

.qty__input {
  width: 52px;
  height: 40px;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  -moz-appearance: textfield;
}

.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.checkout {
  position: sticky;
  top: 96px;
  padding: 26px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
}

.checkout__title {
  margin: 0 0 22px;
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  line-height: 1.35;
}

.field { display: block; margin-bottom: 18px; }

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: var(--fs-small);
  color: var(--muted);
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font-size: 15px;
  transition: border-color .18s;
}

.field__input:focus { outline: none; border-color: var(--accent-text); }

.field__hint { display: block; margin-top: 7px; font-size: 12px; color: var(--dim); line-height: 1.35; }

.checkout__rows {
  margin: 22px 0;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}

.checkout__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}

.checkout__row + .checkout__row { margin-top: 12px; }

.checkout__row--total { font-size: 16px; color: var(--text); }
.checkout__row--total b { font-size: 22px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}

.checkbox input { margin-top: 2px; accent-color: var(--accent-text); }

.checkbox a { color: var(--accent-text); text-decoration: underline; }

.checkout__note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--dim);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Модальные окна
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] { display: none; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, .78);
  backdrop-filter: blur(6px);
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 30px 90px -30px #000;
  animation: modal-in .22s ease-out;
}

.modal__box--product { max-width: 760px; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.modal__x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: all .18s;
}

.modal__x:hover { color: var(--text); border-color: var(--line-strong); }

.modal__title {
  margin: 0 0 24px;
  padding-right: 44px;
  font-family: var(--font-head);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.4;
  color: var(--accent-text);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.modal__actions .btn { flex: 1; min-width: 186px; white-space: nowrap; }

/* Шаги «Как начать игру» */

.steps { margin: 0; padding: 0; list-style: none; }

.step { display: flex; gap: 16px; }

.step + .step { margin-top: 22px; }

.step__num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-head);
  font-size: 12px;
  line-height: 1;
}

.step__title { margin: 4px 0 8px; font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; }

.step__text { margin: 0; font-size: 15px; line-height: var(--lh-wide); color: var(--muted); }

.ip-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 11px 16px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color .18s;
}

.ip-copy:hover { border-color: var(--accent-text); }

.ip-copy span { font-size: 16px; font-weight: 700; color: var(--accent-text); }

.ip-copy i { font-size: 12px; font-style: normal; color: var(--dim); }

/* Модальное окно товара */

.pmodal { display: grid; grid-template-columns: 300px 1fr; gap: 28px; }

.pmodal__media {
  align-self: start;      /* было: блок растягивался на всю высоту грид-строки */
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  overflow: hidden;
  /* min-height: 200px убрал — он и держал лишнюю высоту снизу */
}

.pmodal__media img {
  display: block;
  width: 100%;
  height: auto;            /* было: height: 100%; object-fit: contain */
}

.pmodal__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 200px;
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--accent-text);
  background: var(--accent-soft);
}

.pmodal__sub { margin: -14px 0 14px; font-size: 15px; color: var(--accent-text); }

.pmodal__text {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.pmodal__text:empty, .pmodal__sub:empty { display: none; }

.pmodal__form { display: flex; flex-direction: column; gap: 16px; }

.pmodal__price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pmodal__price-label { font-size: var(--fs-small); color: var(--muted); }

/* --------------------------------------------------------------------------
   Текстовые страницы
   -------------------------------------------------------------------------- */

.doc { max-width: 72ch; }

.doc p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: var(--lh-wide);
  color: var(--muted);
}

.doc__h2 {
  margin: 36px 0 14px;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.doc__h2:first-child { margin-top: 0; }

.doc a { color: var(--accent-text); text-decoration: underline; }

.doc--compact { margin-top: 8px; }

/* --------------------------------------------------------------------------
   Пустые состояния и результаты оплаты
   -------------------------------------------------------------------------- */

.empty {
  padding: 56px 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}

.empty__text {
  max-width: 52ch;
  margin: 0 auto 22px;
  font-size: 16px;
  line-height: var(--lh-wide);
  color: var(--muted);
}

.empty__code {
  font-family: var(--font-head);
  font-size: 46px;
  line-height: 1.2;
  color: var(--accent-text);
  margin-bottom: 22px;
}

.empty__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.result {
  max-width: 640px;
  margin: 0 auto;
  padding: 52px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}

.result--ok { border-color: rgba(95, 227, 155, .4); }
.result--fail { border-color: rgba(255, 92, 116, .4); }

.result__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 24px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 700;
}

.result--ok .result__icon { background: rgba(95, 227, 155, .14); color: var(--ok); }
.result--fail .result__icon { background: rgba(255, 92, 116, .14); color: var(--err); }

.result__text { margin: 20px auto 0; font-size: 16px; color: var(--muted); }

.result__note { margin: 16px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }

.result__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.result__help { margin: 26px 0 0; font-size: var(--fs-small); color: var(--dim); }

.result__help a { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */

.footer {
  flex-shrink: 0;
  padding: 56px 0 28px;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px;
  padding-bottom: 36px;
}

.footer__col { display: flex; flex-direction: column; align-items: flex-start; }

.footer__about {
  margin: 16px 0 0;
  max-width: 40ch;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--muted);
}

.footer__ip {
  margin-top: 16px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--fs-small);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s;
}

.footer__ip:hover { border-color: var(--accent-text); }
.footer__ip b { color: var(--accent-text); }

.footer__title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: 11px;
  line-height: 1.4;
  color: var(--text);
}

.footer__link {
  margin-bottom: 11px;
  font-size: 14px;
  color: var(--muted);
  transition: color .18s;
}

.footer__link:hover { color: var(--accent-text); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}

.footer__love i { font-style: normal; }

/* --------------------------------------------------------------------------
   Всплывающее уведомление
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  transform: translateX(-50%);
  padding: 13px 22px;
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  background: var(--panel);
  font-size: 14px;
  box-shadow: 0 18px 50px -18px #000;
  animation: toast-in .2s ease-out;
}

.toast[hidden] { display: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .section { padding: 66px 0; }
  .donators, .cards { grid-template-columns: repeat(2, 1fr); }
  .cart { grid-template-columns: 1fr; }
  .checkout { position: static; }
  .featured { grid-template-columns: 260px 1fr; gap: 26px; }
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --fs-base: 16px;
    --fs-h1: 32px;
    --fs-h2: 24px;
    --fs-h3: 20px;
    --fs-small: 13px;
  }

  .container { padding: 0 18px; }

  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    cursor: pointer;
  }

  .burger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }

  .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; }
  .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .header__inner { flex-wrap: wrap; gap: 12px; padding-block: 12px; }

  .nav {
    order: 10;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .nav.is-open { display: flex; }

  .nav__link { padding: 12px 14px; font-size: 16px; }

  .header__side { order: 5; width: 100%; justify-content: space-between; }

  .hero { padding: 62px 0 52px; }
  .hero__title { line-height: 1.5; }
  .hero__stats { gap: 10px; }
  .hero__stat { flex: 1 1 100%; }

  .featured { grid-template-columns: 1fr; padding: 24px; }
  .featured__foot { flex-direction: column; align-items: stretch; gap: 16px; }
  .featured__foot .btn { width: 100%; }

  .promo { flex-direction: column; align-items: flex-start; padding: 30px 26px; }
  .promo .btn { width: 100%; }

  .pmodal { grid-template-columns: 1fr; gap: 20px; }
  .pmodal__media { min-height: 170px; }
  .modal__box { padding: 26px 20px; }

  .cart-item {
    grid-template-columns: 64px 1fr auto;
    grid-template-areas:
      'media info del'
      'qty   qty  sum';
    gap: 14px;
  }

  .cart-item__media { grid-area: media; width: 64px; height: 52px; }
  .cart-item__info  { grid-area: info; }
  .cart-item__del   { grid-area: del; }
  .cart-item__qty   { grid-area: qty; }
  .cart-item__sum   { grid-area: sum; text-align: right; align-self: center; }

  .footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .donators, .cards, .products { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section__title { font-size: 21px; }
  .section__title--h1 { font-size: 22px; }
  .hero__title { font-size: 24px; line-height: 1.55; }
  .modal__title { font-size: 19px; }
  .btn--lg { width: 100%; }
  .empty { padding: 40px 20px; }
  .result { padding: 38px 22px; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Плашка демо-режима (оплата отключена)
   -------------------------------------------------------------------------- */

.demo-bar {
  padding: 11px 24px;
  background: #FFC46B;
  color: #17130A;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.demo-bar b { font-weight: 800; }

.checkout__note--demo { color: #FFC46B; }

/* --------------------------------------------------------------------------
   Награды донатерам
   -------------------------------------------------------------------------- */

.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.modal__box--perks { max-width: 640px; }

.modal__lead {
  margin: -14px 0 26px;
  font-size: 15px;
  color: var(--muted);
}

.perks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.perk {
  display: flex;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--bg-alt);
}

.perk__num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 11px;
  line-height: 1;
}

.perk__title {
  margin: 3px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.perk__text {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Градиентный фон страницы
   Мягкие пятна акцентного цвета по углам плюс виньетка — глубина без картинок.
   -------------------------------------------------------------------------- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 88% 2%, var(--accent-glow) 0%, transparent 64%),
    radial-gradient(520px 380px at 4% 88%, var(--accent-glow) 0%, transparent 66%),
    radial-gradient(700px 460px at 50% 118%, rgba(255, 255, 255, .028) 0%, transparent 62%),
    linear-gradient(180deg, #0A0912 0%, var(--bg) 38%, #08070E 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 70%);
  opacity: .28;
}

/* Секции просвечивают, чтобы фон читался на всю страницу */
.section--donators { background: rgba(13, 13, 22, .66); }
.footer { background: rgba(10, 10, 17, .72); }

.hero::after { display: none; }

/* --------------------------------------------------------------------------
   Картинка персонажа на обложке
   -------------------------------------------------------------------------- */

.hero--with-image .hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 40px;
  align-items: center;
}

.hero--with-image .hero__text { max-width: 100%; }

.hero__art {
  position: relative;
  display: grid;
  place-items: center;
  /* Масштаб задаётся в админке; увеличенная картинка заезжает на поля,
     а сетка колонок при этом не съезжает */
  transform: scale(var(--hero-scale, 1));
  transform-origin: center;
}

/* Мягкое свечение под персонажем, чтобы он не «висел» в пустоте */
.hero__art::before {
  content: '';
  position: absolute;
  inset: 6% 2% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
  filter: blur(6px);
}

.hero__art img {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 26px 46px rgba(0, 0, 0, .55));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@media (max-width: 1024px) {
  .hero--with-image .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 28px; }
  .hero__art img { max-height: 420px; }
}

@media (max-width: 768px) {
  .hero--with-image .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .hero__art img { max-height: 300px; }
}

/* --------------------------------------------------------------------------
   Акция, промокоды и лента покупок
   -------------------------------------------------------------------------- */

.featured__tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag--save {
  background: #FFC46B;
  color: #17130A;
  box-shadow: 0 0 20px rgba(255, 196, 107, .35);
}

/* Обратный отсчёт */

.countdown {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.countdown__label { font-size: var(--fs-small); color: var(--muted); }

.countdown__clock { display: flex; align-items: baseline; gap: 4px; margin-left: auto; }

.countdown__clock b {
  min-width: 34px;
  padding: 6px 7px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.countdown__clock i {
  margin-right: 5px;
  font-style: normal;
  font-size: 12px;
  color: var(--dim);
}

/* Промокод в корзине */

.promocode {
  display: block;
  margin-bottom: 20px;
}

.promocode__label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* Сетка, а не flex: поле всегда занимает всё свободное место,
   кнопка — ровно свою ширину и не сжимает ввод */
.promocode__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.promocode__input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font-size: 15px;
  letter-spacing: .4px;
  text-transform: uppercase;
  transition: border-color .18s;
}

.promocode__input::placeholder { text-transform: none; letter-spacing: 0; color: var(--dim); }

.promocode__input:focus { outline: none; border-color: var(--accent); }

.promocode__btn {
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}

.promocode__btn:hover { border-color: var(--accent); color: var(--accent-text); }

.promocode--on {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.promocode__applied { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 0; }

.promocode__code { font-size: 15px; font-weight: 700; letter-spacing: .5px; }

.promocode__value { font-size: var(--fs-small); font-weight: 600; color: var(--accent-text); }

.promocode__x {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.promocode__x:hover { color: var(--err); }

.checkout__row--discount b { color: #FFC46B; }

/* Лента покупок — карточки без прокрутки, внизу магазина */

.section--feed { padding-top: 0; }

.feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.feed__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.feed__skin {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  image-rendering: pixelated;
  background: var(--bg-alt);
}

.feed__body { min-width: 0; flex: 1; }

.feed__player {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed__text {
  margin: 5px 0 0;
  font-size: var(--fs-small);
  line-height: 1.3;
  color: var(--accent-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed__more {
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 100px;
  background: var(--accent-soft);
  font-size: 12px;
}

.feed__when {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .countdown { flex-direction: column; align-items: flex-start; gap: 10px; }
  .countdown__clock { margin-left: 0; }
}
