/* ═══════════════════════════════════════════════════════════════
   Echo-Land — дизайн-система
   Тёмная база, один синий акцент, пиксель-арт без сглаживания.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:        #07080b;
  --bg-soft:   #0b0d12;
  --surface:   #12151c;
  --surface-2: #171b24;
  --line:      #222733;
  --line-soft: #1a1e27;

  --text:      #e9edf5;
  --muted:     #8a93a5;
  --dim:       #5e6675;

  --accent:    #3b9dff;
  --accent-2:  #6f5cff;
  --accent-dim: rgba(59, 157, 255, .12);
  --success:   #3ddc5f;
  --danger:    #ff5468;

  --radius:    14px;
  --radius-sm: 10px;
  --shell:     1180px;

  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .9);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; }

/* Атрибут hidden прячет элемент правилом display:none из браузерного стиля,
   а любое наше display: grid/flex его перебивает — и «скрытый» блок
   продолжает висеть на экране. Закрываем это раз и навсегда. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.locked { overflow: hidden; }

img { max-width: 100%; display: block; }

/* Игровые текстуры 12×12 — растим строго по пикселям, без мыла. */
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; font-weight: 800; }

.shell { width: min(var(--shell), 100% - 40px); margin-inline: auto; }

.muted { color: var(--muted); }

/* ── Кнопки ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 650; font-size: 15px;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 26px -10px var(--accent);
}
.btn-primary:hover { box-shadow: 0 12px 34px -10px var(--accent); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); border-color: #2e3543; }

.btn-block { width: 100%; justify-content: center; }

/* ── Шапка ───────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7, 8, 11, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line-soft); background: rgba(7, 8, 11, .92); }

.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 9px;
  color: var(--muted); font-weight: 550; font-size: 15px;
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }

.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 99px; font-size: 11px; font-weight: 800;
  transform: scale(0); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.cart-count.show { transform: scale(1); }

.burger { display: none; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }

/* ── Hero ────────────────────────────────────────────────────── */

/* Экран намеренно невысокий: сразу под ним блок покупки осколков,
   и он должен попадать в первый экран без прокрутки. */
.hero { position: relative; padding: 64px 0 72px; overflow: hidden; }

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Три размытых пятна, медленно дрейфующих — «живой» фон без видео. */
.aurora {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: drift 22s ease-in-out infinite;
}
.aurora.a { width: 520px; height: 520px; top: -180px; left: -80px;  background: #1b5fd0; }
.aurora.b { width: 460px; height: 460px; top: -60px;  right: -60px; background: #5b3fd6; animation-delay: -7s; }
.aurora.c { width: 380px; height: 380px; bottom: -200px; left: 42%; background: #0f7fa8; animation-delay: -14s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, 30px) scale(1.08); }
  66%      { transform: translate(-30px, 20px) scale(.95); }
}

/* Сетка поверх пятен — держит композицию и намекает на блоки. */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
}
.hero-fade { position: absolute; inset-inline: 0; bottom: 0; height: 220px; background: linear-gradient(transparent, var(--bg)); }

.hero-inner { position: relative; z-index: 1; text-align: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px 7px 12px; margin-bottom: 28px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13.5px; font-weight: 550; color: var(--muted);
}
.hero-badge b { color: var(--text); font-weight: 700; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.live { background: var(--success); box-shadow: 0 0 0 0 rgba(61, 220, 95, .6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px rgba(61, 220, 95, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 95, 0); }
}

.hero h1 {
  font-size: clamp(40px, 7vw, 74px);
  letter-spacing: -.045em;
  background: linear-gradient(170deg, #fff 25%, #93b8e8 75%, #6f5cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero p.lead {
  max-width: 620px; margin: 18px auto 30px;
  font-size: clamp(16px, 2vw, 18.5px); color: var(--muted);
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Кнопка-адрес: копирует IP в один клик.
   Это главное действие на странице — она должна быть заметнее кнопки магазина. */
.ip {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 12px 10px 22px;
  background: rgba(59, 157, 255, .1);
  border: 1px solid rgba(59, 157, 255, .45);
  border-radius: var(--radius-sm);
  color: #fff; text-align: left;
  cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
  animation: ipHint 3.4s ease-out infinite;
}
.ip:hover { border-color: var(--accent); background: rgba(59, 157, 255, .17); animation: none; box-shadow: 0 0 26px -6px var(--accent); }

.ip .label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ip .addr { display: block; font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }

.ip .copy { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 9px; background: rgba(59, 157, 255, .18); color: var(--accent); }
.ip.copied { border-color: var(--success); background: rgba(61, 220, 95, .1); animation: none; }
.ip.copied .copy { background: rgba(61, 220, 95, .16); color: var(--success); }

/* Еле заметная волна вокруг адреса — глаз цепляется, а не раздражается. */
@keyframes ipHint {
  0%, 65%, 100% { box-shadow: 0 0 0 0 rgba(59, 157, 255, 0); }
  80%           { box-shadow: 0 0 0 7px rgba(59, 157, 255, .13); }
}

/* ── Секции ──────────────────────────────────────────────────── */

.section { padding: 92px 0; }
/* Магазин идёт первым и почти вплотную к экрану, иначе уезжает вниз. */
#shop { padding-top: 28px; }
.section-head { margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { margin: 12px 0 0; color: var(--muted); max-width: 560px; }
.section-head.wide p { max-width: 760px; }
.section-head code {
  padding: 2px 6px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: .88em; color: #8fc6ff;
}

/* Осколки и привилегии — один блок, между ними только воздух. */
#shards-section { margin-bottom: 40px; }

.eyebrow {
  display: block; margin-bottom: 12px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

/* ── Магазин ─────────────────────────────────────────────────── */

/* Подсказка про доплату за апгрейд — иначе механику никто не найдёт. */
.upgrade-hint {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px; margin-bottom: 26px;
  background: var(--accent-dim); border: 1px solid rgba(59, 157, 255, .25);
  border-radius: var(--radius);
}
.upgrade-hint .ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(59, 157, 255, .18); color: var(--accent); }
.upgrade-hint p { margin: 0; font-size: 14px; color: #c3cad6; line-height: 1.5; }
.upgrade-hint b { color: var(--text); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tab {
  padding: 9px 18px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 99px;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent-dim); border-color: rgba(59, 157, 255, .35); color: var(--accent); }

/* Четыре ранга сеткой 2×2 под блоком осколков.
   align-items: start — чтобы раскрытая карточка росла одна,
   а не тянула за собой соседнюю по строке. */
.products {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start; gap: 16px;
}

.product {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.product:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }

/* Мягкое свечение цветом ранга — включается на ховере. */
.product::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 62%);
  opacity: 0; transition: opacity .3s;
}
.product:hover::before { opacity: 1; }

.product-top {
  position: relative; padding: 26px 18px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.product-icon {
  width: 72px; height: 72px; object-fit: contain;
  filter: drop-shadow(0 6px 20px color-mix(in srgb, var(--c) 55%, transparent));
}
.product-plate { height: 20px; width: auto; }

.product-body { padding: 20px 20px 0; flex: 1; }
.product-body h3 { font-size: 19px; }
.product-tagline { margin: 6px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Кнопка раскрытия списка возможностей. */
.perks-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px; padding: 9px 0;
  background: none; border: 0;
  color: var(--c); font: inherit; font-size: 13.5px; font-weight: 650;
  cursor: pointer; transition: opacity .2s;
}
.perks-toggle:hover { opacity: .75; }
.perks-toggle svg { transition: transform .25s; }
.perks-toggle.open svg { transform: rotate(180deg); }

.perks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.perks li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.45; color: #b9c1d0; }
.perks li::before {
  content: ''; position: absolute; left: 5px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--c);
}
.product-foot {
  padding: 20px 20px 22px; margin-top: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.product-foot .btn { padding: 11px 16px; font-size: 14px; }
.price { font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.price span { font-size: 14px; font-weight: 500; color: var(--muted); }

/* Количество — только у валюты. */
.qty { padding: 0 24px 4px; margin-top: 20px; }
.qty + .product-foot { margin-top: 6px; }
.qty-presets { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.qty-presets button {
  padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 8px; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.qty-presets button:hover, .qty-presets button.on { border-color: var(--c); color: var(--text); }

.qty-input {
  display: flex; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-input button {
  width: 42px; height: 42px; flex: none;
  background: none; border: 0; color: var(--muted);
  font-size: 19px; cursor: pointer; transition: color .2s, background .2s;
}
.qty-input button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.qty-input input {
  flex: 1; min-width: 0; height: 42px;
  background: none; border: 0; outline: none;
  color: var(--text); font: inherit; font-weight: 700; text-align: center;
  font-family: var(--mono);
}
.qty-input input::-webkit-outer-spin-button,
.qty-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Как начать играть ───────────────────────────────────────── */

.versions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.version-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 99px; font-size: 14.5px; font-weight: 600;
}
.version-pill b { font-family: var(--mono); font-weight: 700; }
.version-pill .dot { background: var(--dim); }
.version-pill i {
  font-style: normal; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
}

/* Основную версию выделяем, запасная остаётся приглушённой. */
.version-pill.main { border-color: rgba(59, 157, 255, .4); background: var(--accent-dim); }
.version-pill.main .dot { background: var(--accent); }
.version-pill.main i { color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1040px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .steps { grid-template-columns: 1fr; } }

.step {
  position: relative; overflow: hidden;
  padding: 26px 24px 28px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.step:hover { border-color: var(--line); transform: translateY(-3px); }
.step h3 { font-size: 17.5px; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.step code { color: #8fc6ff; font-family: var(--mono); font-size: .92em; }
.step b { color: var(--text); }
.step a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Крупный номер-«призрак» в углу — как ориентир по порядку шагов. */
.step .num {
  position: absolute; top: 8px; right: 14px;
  font-size: 62px; font-weight: 800; letter-spacing: -.05em;
  color: rgba(59, 157, 255, .09);
  pointer-events: none; user-select: none;
}

/* ── Покупка осколков ────────────────────────────────────────── */

.shard-buy {
  --c: var(--shard-color, #ff4d5e);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 44px; align-items: center;
  padding: 44px;
  background: radial-gradient(90% 120% at 12% 50%, color-mix(in srgb, var(--c) 11%, transparent), transparent 62%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent);
  border-radius: 20px;
}
@media (max-width: 900px) { .shard-buy { grid-template-columns: 1fr; gap: 30px; padding: 30px 22px; } }

/* Арт с частицами. Снизу оставлен запас под плашку бонуса. */
.shard-art { position: relative; display: grid; place-items: center; min-height: 205px; padding-bottom: 54px; }
.shard-art .glow {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: var(--c); filter: blur(60px); opacity: .36;
  transition: opacity .5s, transform .5s;
}
/* Исходник — игровая текстура 16×22. Крупнее ~100px она превращается
   в кашу из квадратов, поэтому размер держим сдержанным. */
.shard-art img {
  position: relative; z-index: 1;
  width: 100px; height: auto;
  filter: drop-shadow(0 10px 34px color-mix(in srgb, var(--c) 55%, transparent));
  transition: transform .5s cubic-bezier(.34, 1.4, .64, 1);
}

/* Частицы: лежат по кругу, включаются по мере роста бонуса. */
/* Низ подрезан так же, как у арта, — иначе кольцо частиц уедет вниз мимо осколка. */
.particles { position: absolute; inset: 0 0 54px; pointer-events: none; z-index: 2; }
.particles i {
  position: absolute; display: block;
  width: var(--size, 7px); height: var(--size, 7px);
  background: var(--c); border-radius: 2px;
  opacity: 0; transform: scale(.4);
  transition: opacity .45s ease, transform .45s ease;
}
.particles i.on { opacity: .85; transform: scale(1); animation: floaty var(--dur, 4s) ease-in-out var(--delay, 0s) infinite; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -13px; }
}

/* Плашка с текущим бонусом под артом */
.shard-bonus { position: absolute; bottom: 0; left: 0; right: 0; z-index: 3; text-align: center; transition: opacity .3s; }
.shard-bonus.hidden { opacity: 0; }
.shard-bonus b { display: block; font-size: 26px; font-weight: 800; color: var(--c); letter-spacing: -.02em; }
.shard-bonus small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Панель */
.shard-panel h2 { font-size: clamp(28px, 4.4vw, 44px); text-transform: uppercase; margin-bottom: 22px; }
.shard-panel h2 span { color: var(--c); }

.shard-readout {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 18px 24px; margin-bottom: 26px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 3px solid var(--c);
  border-radius: var(--radius);
}
@media (max-width: 560px) { .shard-readout { grid-template-columns: 1fr; gap: 12px; } }

.shard-readout .cap { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.shard-readout .big { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shard-readout .unit { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.shard-readout .cost { text-align: right; padding-left: 18px; border-left: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 560px) { .shard-readout .cost { text-align: left; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } }

/* Ползунок */
/* Полоска должна быть тонкой, но пальцем надо во что-то попасть.
   Поэтому саму полоску рисует обёртка через ::before, а прозрачный
   input растянут поверх на всю высоту — он и ловит касание.
   Красить фон самого input нельзя: с padding и background-clip
   трек просто перестаёт отрисовываться. */
.shard-slider {
  position: relative;
  height: 40px;
  display: flex; align-items: center;
  margin-bottom: 8px;
}
.shard-slider::before {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, var(--c) var(--fill, 0%), var(--line-soft) var(--fill, 0%));
  pointer-events: none;
}
.shard-slider input {
  -webkit-appearance: none; appearance: none;
  position: relative;
  width: 100%; height: 40px; margin: 0;
  background: transparent;
  outline: none; cursor: pointer;
  touch-action: pan-y;
}
.shard-slider input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--c);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .5); cursor: grab;
}
.shard-slider input::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--c);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .5); cursor: grab; border-width: 3px;
}
.shard-slider input:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 32%, transparent); }

.shard-ticks { position: relative; height: 30px; margin-bottom: 6px; }
.shard-ticks span {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 11.5px; font-weight: 700; color: var(--dim);
  white-space: nowrap; transition: color .25s;
}
.shard-ticks span::before {
  content: ''; display: block; width: 1px; height: 5px; margin: 0 auto 5px;
  background: var(--line); transition: background .25s;
}
.shard-ticks span.reached { color: var(--c); }
.shard-ticks span.reached::before { background: var(--c); }

.shard-next { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; min-height: 20px; }
.shard-next b { color: var(--c); }

/* Ручной ввод: два связанных поля, пересчитывают друг друга и ползунок. */
.shard-manual { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.shard-manual label { flex: 1; min-width: 0; }
.shard-manual span {
  display: block; margin-bottom: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.shard-manual input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-weight: 700; font-family: var(--mono); font-size: 16px;
  outline: none; transition: border-color .2s;
}
.shard-manual input:focus { border-color: var(--c); }
.shard-manual input::-webkit-outer-spin-button,
.shard-manual input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shard-manual input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.shard-manual .eq { padding-bottom: 13px; color: var(--dim); font-weight: 700; }

.shard-cta {
  width: 100%; justify-content: center;
  padding: 17px 22px; font-size: 16px; text-transform: uppercase; letter-spacing: .04em;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #ffa14d));
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--c) 85%, transparent);
}
.shard-cta:hover { box-shadow: 0 14px 38px -12px var(--c); }

@media (prefers-reduced-motion: reduce) {
  .particles i.on { animation: none; }
}

/* ── Последние покупки ───────────────────────────────────────── */

/* Лента едет непрерывно и одновременно листается колёсиком и пальцем.
   Прокрутку ведёт JS через scrollLeft: в дорожке лежат две одинаковые
   половины, и при уходе за половину позиция отматывается назад —
   стыка не видно, а ручная прокрутка не спорит с анимацией. */
.marquee {
  position: relative;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;                 /* Firefox */
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;        /* не «пролистывать» страницу назад */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  cursor: grab;
}
.marquee::-webkit-scrollbar { display: none; }
.marquee:active { cursor: grabbing; }

.marquee-track { display: flex; gap: 12px; width: max-content; }

.purchase {
  width: 168px; flex: none;
  padding: 20px 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.purchase img { width: 46px; height: 46px; margin: 0 auto 12px; object-fit: contain; }
.purchase b { display: block; font-size: 14px; }
.purchase small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 3px; }
.purchase .who { color: var(--accent); font-size: 13px; margin-top: 6px; font-family: var(--mono); }

/* ── Сообщество ──────────────────────────────────────────────── */

.community { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.social {
  display: flex; align-items: center; gap: 16px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.social:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c, var(--accent)) 50%, var(--line)); }
.social.primary { border-color: rgba(42, 171, 238, .35); background: linear-gradient(140deg, rgba(42, 171, 238, .08), var(--surface) 60%); }
.social .ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.social b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.social .tag {
  padding: 2px 7px; border-radius: 5px;
  background: rgba(42, 171, 238, .16); color: #6fc7f5;
  font-size: 10px; font-weight: 700; font-style: normal; letter-spacing: .08em; text-transform: uppercase;
}
.social small { color: var(--muted); font-size: 13px; }

/* ── Подвал ──────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line-soft); padding: 56px 0 40px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 16px; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--text); }
.footer-note { color: var(--dim); font-size: 13.5px; max-width: 380px; margin: 14px 0 0; }

/* Служба поддержки: контакты вынесены отдельным блоком, чтобы человек
   с проблемой находил их сразу, а не искал по колонкам ссылок. */
.footer-support {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 24px; margin-bottom: 32px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.footer-support h4 { margin-bottom: 6px; color: var(--muted); }
.footer-support p { margin: 0; font-size: 13.5px; color: var(--dim); max-width: 420px; }
.support-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.support-actions .btn { font-size: 14px; padding: 11px 18px; }

.footer-bottom {
  padding-top: 26px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--dim); font-size: 13px; line-height: 1.6;
}
.footer-bottom span:last-child { text-align: right; }

@media (max-width: 720px) {
  .footer-support { flex-direction: column; align-items: flex-start; }
  .support-actions { width: 100%; }
  .support-actions .btn { flex: 1; justify-content: center; }
  .footer-bottom span:last-child { text-align: left; }
}

/* ── Корзина ─────────────────────────────────────────────────── */

.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 5, 8, .68); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s;
}
.overlay.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; z-index: 100;
  width: min(430px, 100%); height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg-soft); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.drawer.open { transform: none; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h3 { font-size: 19px; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 6px; cursor: pointer; border-radius: 8px; transition: color .2s, background .2s; }
.icon-btn:hover { color: var(--text); background: var(--surface); }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; min-height: 96px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line-soft); background: var(--surface); }

.cart-line { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
/* object-fit обязателен: текстуры не квадратные (осколок 16×22),
   и в квадратной рамке без него они плющатся. */
.cart-line img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line b { display: block; font-size: 15px; }
.cart-line small { color: var(--muted); font-size: 13px; }
.cart-line .sum { font-weight: 700; font-size: 15px; white-space: nowrap; }

.empty { text-align: center; padding: 56px 20px; color: var(--dim); }
.empty svg { margin: 0 auto 16px; opacity: .4; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 15px; outline: none;
  transition: border-color .2s;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--dim); }
.field .hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; }

/* Промокод */
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.promo-row input::placeholder { text-transform: none; }
.promo-row .btn { padding: 12px 16px; font-size: 14px; flex: none; }

.promo-note { margin-top: 7px; font-size: 12.5px; line-height: 1.45; min-height: 0; }
.promo-note.ok { color: var(--success); }
.promo-note.err { color: #ff8f9c; }

.promo-field.applied input { border-color: var(--success); }

/* Подпись под полем ника: что нашлось в LuckPerms. */
.rank-note { margin-top: 8px; font-size: 12.5px; line-height: 1.45; }
.rank-note.ok   { color: var(--success); }
.rank-note.warn { color: #e5b567; }
.rank-note.err  { color: #ff8f9c; }

/* Разбор итоговой суммы: из чего сложилась цена. */
.breakdown {
  display: grid; gap: 7px; margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.breakdown span { color: var(--muted); }
.breakdown b { color: var(--success); font-weight: 700; white-space: nowrap; }
.breakdown .plain span { color: var(--dim); }
.breakdown .plain span:last-child { text-decoration: line-through; }

.methods { display: grid; gap: 8px; margin-bottom: 16px; }
.method {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.method:hover { border-color: #303747; }
.method.on { border-color: var(--accent); background: var(--accent-dim); }
.method .ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.method b { display: block; font-size: 14.5px; }
.method small { color: var(--muted); font-size: 12.5px; }

.total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.total span { color: var(--muted); font-size: 14px; }
.total b { font-size: 27px; letter-spacing: -.03em; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 2px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.consent a { color: var(--accent); }

.form-error { display: none; margin-bottom: 14px; padding: 11px 14px; border-radius: var(--radius-sm); background: rgba(255, 84, 104, .1); border: 1px solid rgba(255, 84, 104, .28); color: #ff8f9c; font-size: 13.5px; }
.form-error.show { display: block; }

/* ── Тост ────────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 99px; box-shadow: var(--shadow);
  font-size: 14.5px; font-weight: 600;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .3s cubic-bezier(.34, 1.4, .64, 1), opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .dot { background: var(--success); }

/* ── Появление секций при скролле ────────────────────────────── */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── Текстовые страницы (правила, вики) ──────────────────────── */

.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft); }
.page-hero h1 { font-size: clamp(32px, 5vw, 46px); }
.page-hero p { color: var(--muted); margin: 12px 0 0; }

.page-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 48px 0 96px; align-items: start; }

.toc { position: sticky; top: 88px; display: grid; gap: 2px; max-height: calc(100dvh - 120px); overflow-y: auto; }
.toc a {
  padding: 7px 12px; border-left: 2px solid var(--line-soft);
  color: var(--muted); font-size: 14px; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }

.prose { max-width: 760px; font-size: 16px; }
.prose h2 {
  font-size: 27px; margin: 52px 0 18px; padding-top: 8px;
  scroll-margin-top: 90px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 32px 0 12px; }
.prose p { margin: 0 0 16px; color: #c3cad6; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; color: #c3cad6; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--line-soft); margin: 44px 0; }

.prose code {
  padding: 2.5px 7px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: .87em; color: #8fc6ff;
}
.prose pre {
  padding: 18px 20px; margin: 0 0 20px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.prose pre code { padding: 0; background: none; border: 0; color: #c3cad6; }

.prose blockquote {
  margin: 0 0 20px; padding: 16px 20px;
  background: var(--accent-dim); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 14.5px; }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--line-soft); text-align: left; }
.prose th { background: var(--surface); font-weight: 700; }
.prose td { color: #c3cad6; }
.table-wrap { overflow-x: auto; margin-bottom: 22px; }

/* ── Страница заказа ─────────────────────────────────────────── */

.order-card {
  max-width: 480px; margin: 80px auto; padding: 40px 34px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.order-icon { width: 62px; height: 62px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; }
.order-icon.ok { background: rgba(61, 220, 95, .12); color: var(--success); }
.order-icon.wait { background: var(--accent-dim); color: var(--accent); }
.order-icon.err { background: rgba(255, 84, 104, .12); color: var(--danger); }
.order-card h1 { font-size: 25px; margin-bottom: 10px; }
.order-card p { color: var(--muted); margin: 0 0 22px; }
.order-items { text-align: left; padding: 16px 0; margin-bottom: 22px; border-block: 1px solid var(--line-soft); display: grid; gap: 10px; }
.order-items div { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.order-items span { color: var(--muted); }

/* ── Адаптив ─────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
  .toc a { border-left: 0; border-bottom: 2px solid var(--line-soft); white-space: nowrap; }
  .toc a.active { border-left: 0; border-bottom-color: var(--accent); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  /* На телефоне форма оплаты занимает почти весь экран и сплющивает
     список товаров: покупатель видел одну позицию и другую сумму внизу.
     Поэтому шторка прокручивается целиком, а список показывается весь. */
  .drawer { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .drawer-head { position: sticky; top: 0; z-index: 2; background: var(--bg-soft); }
  .drawer-body { flex: none; overflow: visible; min-height: 0; }
  .drawer-foot { border-top: 1px solid var(--line-soft); }

  .shell { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .hero { padding: 68px 0 64px; }
  .nav-links {
    position: fixed; inset: 68px 0 auto; z-index: 55;
    flex-direction: column; gap: 2px; padding: 12px 16px 20px;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .burger { display: block; margin-left: auto; order: 2; }
  .nav .cart-btn { order: 1; padding: 11px 14px; }
  /* На узком экране от кнопки корзины остаётся только иконка со счётчиком. */
  .cart-btn > span:not(.cart-count) { display: none; }
  .nav-inner { gap: 10px; }
  .brand { white-space: nowrap; margin-right: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .products { grid-template-columns: 1fr; }
  .product-body { padding: 20px 20px 4px; }
}
