/* ==========================================================================
   VELORIA — фиолетовая мистика
   Тёмный фон, стекло, мягкое неоновое свечение, светлячки, красные пиксельные сердца.
   ========================================================================== */

/* ---------- Шрифты (локально, OFL) ---------- */
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../assets/fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../assets/fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/onest-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/press-start-2p-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/great-vibes-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  /* фон и поверхности */
  --bg: #07050c;
  --bg-2: #0d0916;
  --surface: #15101f;
  --surface-2: #1d1630;
  --glass: rgba(255, 255, 255, .04);
  --glass-strong: rgba(255, 255, 255, .07);
  --glass-border: rgba(167, 139, 250, .14);
  --glass-border-strong: rgba(167, 139, 250, .34);

  /* фиолетовая гамма */
  --violet: #8b5cf6;
  --violet-light: #a78bfa;
  --lilac: #c4b5fd;
  --violet-dark: #4c1d95;
  --magenta: #d946ef;
  --btn-1: #7c3aed;   /* градиент основной кнопки: белый текст на нём ≥ 5:1 */
  --btn-2: #a21caf;

  /* сердца — красные */
  --heart: #ef4444;
  --heart-hi: #f87171;
  --heart-sh: #991b1b;
  --heart-deep: #b91c1c; /* фон под белым мелким текстом (контраст 6,5:1) */

  /* статус и текст */
  --teal: #2dd4bf;
  --text: #f3f0ff;
  --muted: #a59cc0;
  --focus: #e9d5ff;

  /* пиксельные сердца */
  --heart-outline: #2a0710;
  --heart-spark: #fee2e2;
  --heart-empty-outline: #5f4f86;
  --heart-empty-fill: #140f20;
  --heart-dead-outline: #1a1424;
  --heart-dead-fill: #6b6380;
  --heart-dead-hi: #8f88a3;
  --heart-dead-sh: #463f57;
  --heart-fade: .45s;

  /* шрифты */
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-pixel: "Press Start 2P", "Courier New", monospace;
  --font-script: "Great Vibes", "Segoe Script", cursive;

  /* отступы */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* скругления */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* тени и свечения */
  --shadow-card: 0 30px 80px -40px rgba(0, 0, 0, .9);
  --glow-violet: 0 10px 40px -10px rgba(139, 92, 246, .55);
  --glow-magenta: 0 0 40px rgba(217, 70, 239, .35);

  /* раскладка */
  --container: 1280px;
  --gutter: 16px;
  --header-h: 64px;
  --section-pad: 72px;

  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
}
@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 76px; --section-pad: 96px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 40px; --section-pad: 104px; }
}

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  background-color: var(--bg);
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 800px at 85% 120%, rgba(76, 29, 149, .18), transparent 70%),
    radial-gradient(900px 700px at -10% 60%, rgba(139, 92, 246, .08), transparent 70%);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) {
  body { font-size: 17px; }
}

img,
svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--lilac); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}
ul, ol, dl, dd { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--violet); color: #fff; }

[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  left: var(--space-4);
  top: -100px;
  z-index: 200;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); color: var(--bg); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* иконки */
.i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i--heart { color: var(--heart-hi); }

/* стекло */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--glass);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease), box-shadow .25s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 3px; border-radius: var(--radius); }

.btn--primary {
  background: linear-gradient(135deg, var(--btn-1) 0%, var(--btn-2) 100%);
  color: #fff;
  box-shadow: var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover { color: #fff; box-shadow: 0 14px 50px -10px rgba(217, 70, 239, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }

.btn--glass {
  background: rgba(255, 255, 255, .05);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--glass:hover { background: rgba(167, 139, 250, .12); border-color: var(--glass-border-strong); }

.btn--danger {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  color: #fff;
  box-shadow: 0 10px 36px -12px rgba(239, 68, 68, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn--danger:hover { color: #fff; box-shadow: 0 14px 44px -10px rgba(239, 68, 68, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }

.btn--sm { min-height: 42px; padding: var(--space-2) var(--space-4); font-size: 14px; }
.btn--lg { min-height: 56px; padding: var(--space-4) var(--space-6); font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"] {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(167, 139, 250, .12);
  color: #8d84a8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Шапка ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled,
.is-menu-open .site-header {
  background: rgba(9, 6, 16, .72);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 10px 40px -20px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 100%;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.brand__logo { width: auto; height: 36px; display: none; }
.brand__emblem { width: 40px; height: 40px; }
.brand__name {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  font-family: var(--font-script);
  font-size: 34px;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 0 18px rgba(217, 70, 239, .55);
}
@media (min-width: 640px) {
  .brand__logo { display: block; }
  .brand__emblem { display: none; }
  .brand.is-missing-logo .brand__logo { display: none; }
  .brand.is-missing-logo .brand__name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
@media (max-width: 639.98px) {
  .brand.is-missing-emblem .brand__emblem { display: none; }
  .brand.is-missing-emblem .brand__name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}

/* навигация-пилюля */
.pill-nav { display: none; }
.pill-nav__list {
  display: flex;
  gap: 2px;
  padding: 5px;
  list-style: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 40px -20px rgba(139, 92, 246, .5);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.pill-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background-color .25s ease, box-shadow .25s ease;
}
.pill-nav__link .i { width: 16px; height: 16px; }
.pill-nav__link:hover { color: var(--text); background: rgba(167, 139, 250, .08); }
.pill-nav__link:focus-visible { border-radius: var(--radius-pill); }
.pill-nav__link.is-active,
.pill-nav__link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 58, 237, .55), rgba(162, 28, 175, .4));
  box-shadow: 0 0 24px -4px rgba(139, 92, 246, .7), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.pill-nav__link.is-active .i,
.pill-nav__link[aria-current="page"] .i { color: var(--lilac); }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header__actions .ip-plate { display: none; }
.header__cta { display: none; }
@media (min-width: 640px) {
  .header__cta { display: inline-flex; }
}
@media (min-width: 1200px) {
  .pill-nav { display: block; }
  .header__actions .ip-plate { display: inline-flex; }
}
@media (min-width: 1200px) and (max-width: 1339.98px) {
  .pill-nav__link { padding-inline: var(--space-3); }
  .pill-nav__link .i { display: none; }
}

/* плашка «Наш IP» */
.ip-plate {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 46px;
  padding: 6px var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .25s ease;
}
.ip-plate:hover { border-color: var(--glass-border-strong); background: rgba(167, 139, 250, .1); box-shadow: 0 0 24px -6px rgba(139, 92, 246, .6); }
.ip-plate:focus-visible { border-radius: var(--radius); }
.ip-plate__label {
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ip-plate__ip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ip-plate__ip .i { width: 15px; height: 15px; color: var(--violet-light); }
.ip-plate--wide { width: 100%; padding: var(--space-3) var(--space-4); }
.ip-plate--wide .ip-plate__ip { font-size: 17px; }

/* бургер */
.burger {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.burger:focus-visible { border-radius: var(--radius); }
.burger__bars,
.burger__bars::before,
.burger__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s var(--ease), background-color .2s ease;
}
.burger__bars { position: relative; }
.burger__bars::before,
.burger__bars::after { content: ""; position: absolute; left: 0; }
.burger__bars::before { top: -6px; }
.burger__bars::after { top: 6px; }
.burger[aria-expanded="true"] .burger__bars { background: transparent; }
.burger[aria-expanded="true"] .burger__bars::before { transform: translateY(6px) rotate(45deg); background: var(--lilac); }
.burger[aria-expanded="true"] .burger__bars::after { transform: translateY(-6px) rotate(-45deg); background: var(--lilac); }

@media (min-width: 1200px) {
  .burger { display: none; }
}

/* мобильное меню на весь экран */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  overflow-y: auto;
  padding-top: calc(var(--header-h) + var(--space-5));
  padding-bottom: var(--space-7);
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(139, 92, 246, .22), transparent 70%),
    radial-gradient(500px 400px at 0% 100%, rgba(217, 70, 239, .14), transparent 70%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility 0s linear 0s;
}
.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 560px;
}
.mobile-menu__list { list-style: none; }
.mobile-menu__list a {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 60px;
  padding: var(--space-2) var(--space-1);
  border-bottom: 1px solid rgba(167, 139, 250, .1);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(8px);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .35s ease, color .2s ease;
}
.mobile-menu.is-open .mobile-menu__list a { transform: none; opacity: 1; }
.mobile-menu__list li:nth-child(2) a { transition-delay: .03s; }
.mobile-menu__list li:nth-child(3) a { transition-delay: .06s; }
.mobile-menu__list li:nth-child(4) a { transition-delay: .09s; }
.mobile-menu__list li:nth-child(5) a { transition-delay: .12s; }
.mobile-menu__list li:nth-child(6) a { transition-delay: .15s; }
.mobile-menu__list a .i {
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(167, 139, 250, .08);
  color: var(--violet-light);
}
.mobile-menu__list a.is-active,
.mobile-menu__list a[aria-current="page"],
.mobile-menu__list a:hover { color: var(--lilac); }
@media (min-width: 1200px) {
  .mobile-menu { display: none; }
}

.social-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.social-row .btn { flex: 1 1 140px; }

/* ---------- Типографика секций ---------- */
.section {
  position: relative;
  /* декоративные свечения выходят за края — обрезаем, не создавая прокрутки */
  overflow-x: clip;
  padding-block: var(--section-pad);
}
.section--tight { padding-block: calc(var(--section-pad) * .5); }
.section__glow {
  position: absolute;
  z-index: -1;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .16), transparent 65%);
  pointer-events: none;
}
.section__glow--left { left: -320px; top: 0; }
.section__glow--right { right: -320px; top: 10%; background: radial-gradient(circle, rgba(217, 70, 239, .12), transparent 65%); }

.section__head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}
@media (min-width: 960px) {
  .section__head--split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-8);
    align-items: end;
    max-width: none;
  }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--lilac);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta), 0 0 2px #fff;
}
.kicker--sm { margin-bottom: var(--space-2); font-size: 10px; }
.kicker--sm::before { width: 6px; height: 6px; }

.h2 {
  margin-bottom: var(--space-4);
  font-size: 30px;
  font-weight: 600;
}
@media (min-width: 768px) {
  .h2 { font-size: 40px; }
}
@media (min-width: 1200px) {
  .h2 { font-size: 48px; }
}
.h2 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--lilac) 10%, var(--magenta) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: 17px;
}
@media (min-width: 768px) {
  .lead { font-size: 18px; }
}

/* ---------- Появление при прокрутке ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + var(--space-7));
  padding-bottom: var(--space-6);
  background-color: var(--bg);
  background-image:
    radial-gradient(70% 60% at 75% 35%, rgba(76, 29, 149, .55), transparent 70%),
    radial-gradient(50% 50% at 15% 90%, rgba(162, 28, 175, .18), transparent 70%),
    linear-gradient(180deg, #0d0916 0%, var(--bg) 100%);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(90deg, rgba(7, 5, 12, .9) 0%, rgba(7, 5, 12, .62) 38%, rgba(7, 5, 12, .12) 72%, rgba(7, 5, 12, .25) 100%),
    linear-gradient(180deg, rgba(7, 5, 12, .55) 0%, transparent 22%, transparent 55%, var(--bg) 100%),
    url("../assets/hero-bg.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(45% 40% at 72% 38%, rgba(139, 92, 246, .28), transparent 70%),
    radial-gradient(30% 30% at 30% 30%, rgba(217, 70, 239, .1), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}
@media (max-width: 767.98px) {
  .hero__bg {
    background-image:
      linear-gradient(180deg, rgba(7, 5, 12, .7) 0%, rgba(7, 5, 12, .55) 45%, var(--bg) 100%),
      url("../assets/hero-bg.jpg");
    background-position: 65% center;
  }
}

/* светлячки */
.particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.particles span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #f5d0fe;
  box-shadow: 0 0 6px 1px rgba(217, 70, 239, .8), 0 0 16px 3px rgba(139, 92, 246, .45);
  opacity: 0;
  animation: firefly var(--t) ease-in-out var(--d) infinite;
}
.particles span.is-pixel { border-radius: 0; background: var(--lilac); box-shadow: 0 0 10px 2px rgba(167, 139, 250, .6); }
@keyframes firefly {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: var(--o, .9); }
  50% { opacity: calc(var(--o, .9) * .4); transform: translate(var(--dx), calc(var(--dy) * .5)); }
  80% { opacity: var(--o, .9); }
  100% { opacity: 0; transform: translate(calc(var(--dx) * -.4), var(--dy)); }
}

.hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-7);
}
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  max-width: 900px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding: 9px var(--space-4) 9px var(--space-3);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(124, 58, 237, .3), rgba(162, 28, 175, .16));
  color: #ede9fe;
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: 0 0 30px -8px rgba(139, 92, 246, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero__title {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
}
.script {
  display: block;
  margin-bottom: var(--space-2);
  padding-right: .15em;
  font-family: var(--font-script);
  font-size: 84px;
  font-weight: 400;
  line-height: .95;
  letter-spacing: 0;
  color: #f5f3ff;
  text-shadow: 0 0 12px rgba(217, 70, 239, .75), 0 0 34px rgba(139, 92, 246, .75), 0 0 80px rgba(139, 92, 246, .45);
}
.hero__tagline { display: block; }
@media (min-width: 768px) {
  .hero__title { font-size: 46px; }
  .script { font-size: 120px; }
}
@media (min-width: 1200px) {
  .hero__title { font-size: 58px; }
  .script {
    display: inline-block;
    margin: 0 .12em -.08em 0;
    font-size: 150px;
    vertical-align: -.1em;
  }
  .hero__tagline { display: inline; }
}

.hero__lead {
  max-width: 560px;
  margin-bottom: var(--space-5);
  color: #d8d1ee;
  font-size: 17px;
}
@media (min-width: 768px) {
  .hero__lead { font-size: 19px; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 34px;
  padding: 6px var(--space-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: rgba(13, 9, 22, .55);
  color: #e4defa;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .02em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.chip .i { width: 14px; height: 14px; color: var(--violet-light); }
.chip--heart { border-color: rgba(239, 68, 68, .35); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  width: 100%;
}
@media (max-width: 559.98px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__actions .btn[data-link] { flex: 1 1 40%; }
}

/* счётчики внизу первого экрана */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--glass-border);
}
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); padding-top: var(--space-6); }
}
.stat { min-width: 0; }
.stat__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.stat__value {
  font-family: var(--font-display);
  /* на узких телефонах шрифт меньше, чтобы «Офлайн» и числа помещались целиком (24px на 320, 30px с 400) */
  font-size: clamp(22px, 7.5vw, 30px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  /* переносим только по пробелам; разрыв внутри слова — лишь на крайний случай (очень длинная строка в config.js) */
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  .stat__value { font-size: 44px; }
}
/* 4 колонки с 900px: на 900–1100 колонка уже, чем «Офлайн» в 44px, — шрифт плавно меньше */
@media (min-width: 900px) {
  .stat__value { font-size: clamp(36px, 3.9vw, 44px); }
}
.stat__caption {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.stat__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.stat__bar {
  position: relative;
  height: 4px;
  margin-top: var(--space-3);
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(167, 139, 250, .14);
}
.stat__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #5eead4);
  box-shadow: 0 0 12px rgba(45, 212, 191, .7);
  transition: width 1.2s var(--ease);
}
.stat--online[data-state="loading"] .stat__fill {
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .6), transparent);
  box-shadow: none;
  animation: bar-scan 1.4s ease-in-out infinite;
}
@keyframes bar-scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(340%); }
}
.stat--online[data-state="online"] .stat__dot { background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: dot-pulse 2s ease-in-out infinite; }
.stat--online[data-state="online"] .stat__label { color: #99f6e4; }
.stat--online[data-state="offline"] .stat__dot { background: var(--heart); }
.stat--online[data-state="unknown"] .stat__dot { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
@keyframes dot-pulse {
  50% { box-shadow: 0 0 2px var(--teal); opacity: .6; }
}

/* ---------- Пиксельные сердца ---------- */
.heart-row {
  --hp: 3px;
  --hgap: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hgap);
}
.heart-slot { position: relative; display: block; flex-shrink: 0; }
.hh {
  --h-o: var(--heart-outline);
  --h-f: var(--heart);
  --h-h: var(--heart-hi);
  --h-w: var(--heart-spark);
  --h-s: var(--heart-sh);
  display: block;
  width: calc(var(--hp, 3px) * 9);
  height: calc(var(--hp, 3px) * 8);
  overflow: visible;
  shape-rendering: crispEdges;
}
.hh--xs { --hp: 2px; }
.hh--sm { --hp: 3px; }
.hh--md { --hp: 4px; }
.hh.is-empty {
  --h-o: var(--heart-empty-outline);
  --h-f: var(--heart-empty-fill);
  --h-h: var(--heart-empty-fill);
  --h-w: var(--heart-empty-fill);
  --h-s: var(--heart-empty-fill);
}
.hh.is-withered {
  --h-o: var(--heart-dead-outline);
  --h-f: var(--heart-dead-fill);
  --h-h: var(--heart-dead-hi);
  --h-w: var(--heart-dead-hi);
  --h-s: var(--heart-dead-sh);
}
.heart-row .hh:not(.is-empty):not(.is-withered) { filter: drop-shadow(0 0 6px rgba(239, 68, 68, .45)); }
.hh.is-pop { animation: heart-pop .4s var(--ease); }
@keyframes heart-pop {
  0% { transform: scale(.55); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.heart-drop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: heart-drop .95s cubic-bezier(.45, 0, .9, .6) forwards;
}
@keyframes heart-drop {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  18% { transform: translate(-2px, -12px) rotate(-10deg); opacity: 1; }
  100% { transform: translate(10px, 72px) rotate(30deg); opacity: 0; }
}
.heart-row.is-hit { animation: row-hit .32s ease; }
@keyframes row-hit {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-2px); }
}

/* ---------- Механика ---------- */
.rule-steps {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
  list-style: none;
  counter-reset: none;
}
@media (min-width: 640px) {
  .rule-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .rule-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
}
.rule-step {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  transition: border-color .3s ease, transform .3s var(--ease), box-shadow .3s ease;
}
.rule-step:hover { border-color: var(--glass-border-strong); transform: translateY(-4px); box-shadow: 0 24px 60px -30px rgba(139, 92, 246, .6); }
@media (min-width: 1100px) {
  .rule-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(var(--space-5) / -2 - 6px);
    z-index: 1;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--violet-light);
    border-right: 2px solid var(--violet-light);
    transform: translateY(-50%) rotate(45deg);
    opacity: .6;
  }
}
@media (max-width: 639.98px) {
  .rule-step { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: var(--space-3); align-items: start; padding: var(--space-4); }
  .rule-step__num { grid-column: 1; grid-row: 1; margin-bottom: var(--space-2); }
  .rule-step__value { grid-column: 1; grid-row: 2 / span 2; flex-direction: column; align-items: flex-start; gap: var(--space-2); font-size: 40px; }
  .rule-step__title { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .rule-step p { grid-column: 2; grid-row: 3; }
}
@media (max-width: 359.98px) {
  .rule-step__title { font-size: 15px; }
}
.rule-step__num {
  display: block;
  margin-bottom: var(--space-4);
  color: var(--violet-light);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .1em;
}
.rule-step__value {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.04em;
}
.rule-step__value--red { color: var(--heart-hi); }
.rule-step__title {
  margin-bottom: var(--space-2);
  font-size: 17px;
  font-weight: 600;
}
.rule-step p { color: var(--muted); font-size: 15px; }
.rule-step--final { border-color: rgba(239, 68, 68, .25); background: linear-gradient(180deg, rgba(239, 68, 68, .08), rgba(255, 255, 255, .01)); }
.rule-step--final .rule-step__title { color: var(--heart-hi); }
.rule-step--life { border-color: rgba(217, 70, 239, .3); background: linear-gradient(180deg, rgba(139, 92, 246, .16), rgba(162, 28, 175, .05)); box-shadow: 0 0 40px -20px rgba(217, 70, 239, .6); }
.rule-step--life .rule-step__title { color: var(--lilac); }

/* демо */
.demo {
  max-width: 920px;
  margin-inline: auto;
  padding: var(--space-5) var(--space-4);
  text-align: center;
  transition: border-color .4s ease, box-shadow .4s ease;
}
@media (min-width: 768px) {
  .demo { padding: var(--space-6) var(--space-7); }
}
.demo__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  text-align: left;
}
.demo__title { font-size: 22px; font-weight: 600; }
.demo__stats { display: flex; gap: var(--space-3); }
.demo__stat {
  min-width: 108px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .5);
}
.demo__stat dt {
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 10px;
  line-height: 2;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.demo__stat dd {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}
.demo__stat dd small { color: var(--muted); font-size: 15px; font-weight: 400; }
.demo__stat--deaths dd { color: var(--heart-hi); }

.demo__row {
  --hp: 3px;
  --hgap: 3px;
  justify-content: center;
  margin-bottom: var(--space-5);
  padding-block: var(--space-3);
}
@media (max-width: 374.98px) {
  .demo__row { --hp: 2.5px; --hgap: 2px; }
}
@media (min-width: 480px) {
  .demo__row { --hp: 4px; --hgap: 5px; }
}
@media (min-width: 900px) {
  .demo__row { --hp: 5px; --hgap: 8px; }
}
.demo__log {
  min-height: 3.2em;
  margin-bottom: var(--space-4);
  color: #d8d1ee;
  font-size: 15px;
}
.demo.is-final .demo__log:empty { display: none; }
.demo__controls { display: flex; justify-content: center; }
.demo__controls .btn { min-width: 220px; }
.demo__final { animation: final-in .6s var(--ease); }
.demo__final-title {
  margin-bottom: var(--space-3);
  color: var(--heart-hi);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(239, 68, 68, .6);
}
@media (min-width: 768px) {
  .demo__final-title { font-size: 36px; }
}
.demo__final-title:focus { outline: none; }
.demo__final-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.demo__final-text {
  max-width: 460px;
  margin: 0 auto var(--space-5);
  color: var(--muted);
}
.demo__final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.demo.is-final {
  border-color: rgba(239, 68, 68, .4);
  box-shadow: var(--shadow-card), 0 0 80px -30px rgba(239, 68, 68, .7), inset 0 0 80px -40px rgba(239, 68, 68, .5);
}
@keyframes final-in {
  0% { opacity: 0; transform: scale(1.06); filter: blur(4px); }
  100% { opacity: 1; transform: none; filter: none; }
}

/* ---------- Галереи ---------- */
.gallery { display: grid; gap: var(--space-4); }
.shot {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 80% at 70% 20%, rgba(139, 92, 246, .28), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--bg-2));
  color: var(--text);
  text-align: left;
  cursor: zoom-in;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s var(--ease);
}
.shot:hover { border-color: var(--glass-border-strong); box-shadow: 0 30px 70px -30px rgba(139, 92, 246, .65); transform: translateY(-3px); }
.shot:focus-visible { border-radius: var(--radius-lg); outline-offset: 4px; }
.shot__media {
  position: relative;
  display: block;
  aspect-ratio: var(--ratio, 16 / 9);
  overflow: hidden;
}
.shot__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.shot:hover .shot__media img { transform: scale(1.05); }
.shot__media.is-missing-img img { visibility: hidden; }
.shot__media.is-missing-img::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(196, 181, 253, .35);
  border-radius: 12px;
  background: radial-gradient(circle at 70% 30%, rgba(196, 181, 253, .35) 0 3px, transparent 4px);
}
.shot__zoom {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(7, 5, 12, .55);
  opacity: 0;
  transition: opacity .25s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.shot__zoom .i { width: 16px; height: 16px; }
.shot:hover .shot__zoom,
.shot:focus-visible .shot__zoom { opacity: 1; }
.shot__num {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--lilac);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .1em;
}
.shot__title {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}
.shot__text { display: block; margin-top: var(--space-1); color: var(--muted); font-size: 14px; line-height: 1.5; }

/* мир: крупная «бенто»-сетка, подпись поверх картинки */
.gallery--bento .shot__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-8) var(--space-5) var(--space-5);
  background: linear-gradient(180deg, transparent, rgba(7, 5, 12, .9));
}
.gallery--bento .shot__text { color: #d8d1ee; }

/* данжи: карточки с подписью под картинкой */
.gallery--cards .shot__media { border-bottom: 1px solid var(--glass-border); }
.gallery--cards .shot__caption { display: block; padding: var(--space-5); }

/* Раскладка по числу картинок (data-d / data-t ставит main.js): пустых ячеек нет при любом количестве.
   Телефон — одна колонка; планшет — 2 колонки, нечётный кадр на всю ширину; ПК — сетка из 6 колонок. */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery .shot[data-t="full"] { grid-column: 1 / -1; }
  .gallery--cards .shot[data-t="full"] .shot__media { aspect-ratio: 21 / 9; }
}
@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-5); }
  .gallery .shot[data-d="third"] { grid-column: span 2; }
  .gallery .shot[data-d="half"] { grid-column: span 3; }
  .gallery .shot[data-d="full"] { grid-column: 1 / -1; }
  .gallery .shot[data-d="full"] .shot__media { aspect-ratio: 21 / 9; }
  .gallery--bento .shot[data-d="big"] { grid-column: span 4; grid-row: span 2; }
  .gallery--bento .shot[data-d="big"] .shot__media { position: absolute; inset: 0; aspect-ratio: auto; }
  .gallery--bento .shot[data-d="big"] .shot__title,
  .gallery--bento .shot[data-d="full"] .shot__title { font-size: 24px; }
}

/* лайтбокс */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(7, 5, 12, .9);
  color: var(--text);
}
.lightbox::backdrop {
  background: rgba(7, 5, 12, .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox[open] { display: block; animation: lb-in .3s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 72px var(--space-4) 104px;
}
@media (min-width: 768px) {
  .lightbox__stage { padding: 72px 96px 56px; }
}
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}
.lightbox__frame {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  box-shadow: 0 40px 120px -30px rgba(139, 92, 246, .6);
}
.lightbox__img {
  display: block;
  width: auto;
  max-width: min(1280px, 100%);
  height: auto;
  max-height: calc(100dvh - 240px);
  object-fit: contain;
}
.lightbox__frame.is-missing-img { width: min(720px, 100%); aspect-ratio: 16 / 9; }
.lightbox__frame.is-missing-img .lightbox__img { visibility: hidden; }
.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  max-width: 720px;
  color: var(--muted);
  text-align: center;
}
.lightbox__caption b { color: var(--text); font-family: var(--font-display); font-weight: 600; }
.lightbox__count { color: var(--lilac); font-family: var(--font-pixel); font-size: 10px; }
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--glass-border-strong);
  border-radius: 16px;
  background: rgba(21, 16, 31, .75);
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.lightbox__btn:hover { background: rgba(124, 58, 237, .5); box-shadow: 0 0 30px -6px rgba(139, 92, 246, .8); }
.lightbox__btn:focus-visible { border-radius: 16px; }
.lightbox__btn .i { width: 22px; height: 22px; }
.lightbox__btn--close { top: var(--space-4); right: var(--space-4); }
.lightbox__btn--prev { left: var(--space-4); bottom: var(--space-5); }
.lightbox__btn--next { right: var(--space-4); bottom: var(--space-5); }
@media (min-width: 768px) {
  .lightbox__btn--prev,
  .lightbox__btn--next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__btn--prev { left: var(--space-5); }
  .lightbox__btn--next { right: var(--space-5); }
}

/* низкий экран (телефон в альбомной ориентации): меньше отступов — картинка занимает почти всю высоту */
@media (max-height: 520px) {
  .lightbox__stage { padding: var(--space-3) 76px; }
  .lightbox__figure { gap: var(--space-2); }
  .lightbox__img { max-height: calc(100dvh - 64px); }
  .lightbox__frame.is-missing-img { width: auto; height: calc(100dvh - 64px); }
  .lightbox__caption { display: block; max-width: 100%; overflow: hidden; font-size: 13px; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }
  .lightbox__caption > * { margin-right: var(--space-2); }
  .lightbox__btn { width: 44px; height: 44px; border-radius: 14px; }
  .lightbox__btn--close { top: var(--space-3); right: var(--space-3); }
  .lightbox__btn--prev,
  .lightbox__btn--next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__btn--prev { left: var(--space-3); }
  .lightbox__btn--next { right: var(--space-3); }
}

/* ---------- Баннер «Жизнь» ---------- */
.life-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--space-6);
  overflow: hidden;
  padding: var(--space-6) var(--space-5);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 80% at 20% 40%, rgba(217, 70, 239, .28), transparent 70%),
    radial-gradient(70% 90% at 100% 0%, rgba(124, 58, 237, .35), transparent 70%),
    linear-gradient(135deg, #24133f 0%, var(--surface) 60%, var(--surface-2) 100%);
  box-shadow: 0 40px 120px -50px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.life-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(196, 181, 253, .18) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
  opacity: .5;
}
@media (min-width: 960px) {
  .life-banner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-8);
    align-items: center;
    padding: var(--space-7) var(--space-8);
  }
}
.life-banner__art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}
.art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(300px, 78%);
  aspect-ratio: 1;
}
.art::before {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, .45) 0%, rgba(217, 70, 239, .35) 40%, transparent 70%);
  filter: blur(18px);
  animation: art-glow 4s ease-in-out infinite;
}
.art__img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(217, 70, 239, .45));
  animation: art-float 6s ease-in-out infinite;
}
.art__fallback { display: none; --hp: 16px; }
.art.is-missing-art .art__img { display: none; }
.art.is-missing-art .art__fallback { display: block; filter: drop-shadow(0 0 30px rgba(239, 68, 68, .6)); animation: art-float 6s ease-in-out infinite; }
@media (max-width: 479.98px) {
  .art__fallback { --hp: 12px; }
}
@keyframes art-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes art-glow {
  0%, 100% { opacity: .8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.life-banner__buy { width: 100%; max-width: 340px; }
.life-banner__title {
  font-size: 44px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, #fff 20%, var(--lilac) 60%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(217, 70, 239, .35));
}
@media (min-width: 768px) {
  .life-banner__title { font-size: 64px; }
}
.life-banner .lead { color: #d8d1ee; margin-bottom: var(--space-5); }
.perk-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  list-style: none;
}
@media (min-width: 640px) {
  .perk-tiles { gap: var(--space-4); }
}
.perk-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 128px;
  padding: var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(7, 5, 12, .35);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  transition: border-color .3s ease, transform .3s var(--ease), background-color .3s ease;
}
@media (max-width: 479.98px) {
  .perk-tiles { grid-template-columns: 1fr; }
  .perk-tile { flex-direction: row; align-items: center; min-height: 0; padding: var(--space-3); }
  .perk-tile__icon { flex-shrink: 0; }
}
@media (min-width: 768px) {
  .perk-tile { padding: var(--space-5); font-size: 16px; }
}
.perk-tile:hover { border-color: var(--glass-border-strong); background: rgba(124, 58, 237, .12); transform: translateY(-3px); }
.perk-tile__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .5), rgba(162, 28, 175, .35));
  color: #f5f3ff;
  box-shadow: 0 0 20px -4px rgba(139, 92, 246, .8);
}
.perk-tile__icon .i { width: 20px; height: 20px; }
.perk-tile__icon--heart { background: linear-gradient(135deg, rgba(239, 68, 68, .35), rgba(153, 27, 27, .4)); box-shadow: 0 0 20px -4px rgba(239, 68, 68, .7); }

/* ---------- Как начать ---------- */
.steps {
  display: grid;
  gap: var(--space-4);
  list-style: none;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
}
.step {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  overflow: hidden;
}
@media (min-width: 1024px) {
  .step { padding: var(--space-6); }
}
.step__num {
  display: block;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(196, 181, 253, .7);
  text-shadow: 0 0 30px rgba(139, 92, 246, .35);
}
.step__title { margin-bottom: var(--space-3); font-size: 19px; font-weight: 600; }
.step p { color: var(--muted); }
.step p b { color: var(--text); font-weight: 600; }

.ip-copy {
  display: flex;
  flex-wrap: wrap; /* в узкой карточке (900–1300px) кнопка уходит под адрес, а не рвёт его посередине */
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 56px;
  margin-top: auto;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .55);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .25s ease;
}
.ip-copy:hover { box-shadow: 0 0 30px -8px rgba(139, 92, 246, .8); }
.ip-copy:focus-visible { border-radius: var(--radius); }
.ip-copy__ip { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.ip-copy__action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--btn-1), var(--btn-2));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.ip-copy__action .i { width: 16px; height: 16px; }
@media (max-width: 479.98px) {
  .ip-copy__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ip-copy__action { width: 44px; justify-content: center; padding: 0; }
}

/* ---------- FAQ ---------- */
@media (min-width: 960px) {
  .faq-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: var(--space-8);
    align-items: start;
  }
  .faq-layout__head { position: sticky; top: calc(var(--header-h) + var(--space-6)); }
}
.faq-layout__head { margin-bottom: var(--space-6); }
.faq { display: grid; gap: var(--space-3); }
.faq__item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  transition: border-color .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.faq__item:hover { border-color: var(--glass-border-strong); }
.faq__item[open] {
  border-color: rgba(167, 139, 250, .4);
  background: linear-gradient(180deg, rgba(124, 58, 237, .14), rgba(255, 255, 255, .02));
  box-shadow: 0 20px 60px -30px rgba(139, 92, 246, .6);
}
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
@media (min-width: 768px) {
  .faq__q { font-size: 17px; }
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ""; }
.faq__q:focus-visible { border-radius: var(--radius-lg); outline-offset: -2px; }
.faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--glass-border-strong);
  border-radius: 50%;
  transition: transform .3s var(--ease), background-color .3s ease;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--lilac);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { transform: rotate(135deg); background: rgba(139, 92, 246, .35); }
.faq__a {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--muted);
}
.faq__item[open] .faq__a { animation: faq-in .35s ease; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.cur-list {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  list-style: none;
}
@media (min-width: 640px) {
  .cur-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cur-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(7, 5, 12, .4);
}
.cur-list__sym {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(139, 92, 246, .2);
  color: var(--lilac);
  font-weight: 700;
}
.cur-list__name { color: var(--text); font-size: 15px; }

/* ---------- Подвал ---------- */
.site-footer {
  position: relative;
  padding-block: var(--space-8) var(--space-6);
  border-top: 1px solid var(--glass-border);
  background:
    radial-gradient(800px 300px at 50% 0%, rgba(139, 92, 246, .12), transparent 70%),
    var(--bg);
}
.footer__grid { display: grid; gap: var(--space-6); }
@media (min-width: 768px) {
  /* колонки «Разделы», «Покупателям» и «Сообщество» (если есть ссылки) делят место поровну */
  .footer__grid { grid-template-columns: minmax(0, 1.5fr); grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; }
}
.brand--footer .brand__logo { display: block; }
.brand--footer.is-missing-logo .brand__logo { display: none; }
.brand--footer.is-missing-logo .brand__name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
.footer__tagline { margin: var(--space-3) 0 var(--space-4); color: var(--muted); }
.footer__title {
  margin-bottom: var(--space-3);
  color: var(--lilac);
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.footer__links { list-style: none; }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--text);
  text-decoration: none;
}
.footer__links a:hover { color: var(--lilac); }
.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(167, 139, 250, .1);
  color: var(--muted);
  font-size: 14px;
}
@media (min-width: 768px) {
  .footer__bottom { flex-direction: row; justify-content: space-between; gap: var(--space-6); }
}

/* ---------- Всплывашка ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-5);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: calc(100% - var(--gutter) * 2);
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-pill);
  background: rgba(21, 16, 31, .9);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9), 0 0 30px -10px rgba(139, 92, 246, .8);
  opacity: 0;
  transform: translate(-50%, 24px);
  pointer-events: none;
  transition: opacity .25s ease, transform .3s var(--ease);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast::before {
  content: "";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307050c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 0 14px rgba(45, 212, 191, .7);
}
.toast.is-error::before { background-color: var(--heart); background-image: none; box-shadow: 0 0 14px rgba(239, 68, 68, .7); }

/* ==========================================================================
   Магазин
   ========================================================================== */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--header-h) + var(--space-7));
  padding-bottom: var(--space-7);
  background-color: var(--bg);
}
.page-hero .hero__bg {
  background-image:
    linear-gradient(90deg, rgba(7, 5, 12, .92) 0%, rgba(7, 5, 12, .7) 50%, rgba(7, 5, 12, .4) 100%),
    linear-gradient(180deg, transparent 40%, var(--bg) 100%),
    url("../assets/hero-bg.jpg");
  background-position: center 35%;
}
.breadcrumbs { margin-bottom: var(--space-5); color: var(--muted); font-size: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: rgba(167, 139, 250, .4); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--text); }
.page-title {
  margin-bottom: var(--space-4);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.03em;
}
@media (min-width: 768px) {
  .page-title { font-size: 56px; }
}
.page-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--lilac) 10%, var(--magenta) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-lead { max-width: 640px; color: #d8d1ee; font-size: 17px; }
@media (min-width: 768px) {
  .page-lead { font-size: 19px; }
}

.shop {
  display: grid;
  /* minmax(0, 1fr): колонка не растягивается шире экрана из-за содержимого */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}
@media (min-width: 1024px) {
  .shop { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-6); }
}

/* витрина */
.showcase {
  overflow: hidden;
  padding: var(--space-5) var(--space-4);
  border-color: var(--glass-border-strong);
  background:
    radial-gradient(70% 50% at 50% 22%, rgba(217, 70, 239, .26), transparent 70%),
    linear-gradient(180deg, rgba(124, 58, 237, .16), rgba(255, 255, 255, .02));
  text-align: center;
}
@media (min-width: 480px) {
  .showcase { padding: var(--space-6); }
}
@media (min-width: 1024px) {
  .showcase { position: sticky; top: calc(var(--header-h) + var(--space-5)); }
}
.showcase .art { width: min(240px, 70%); margin: 0 auto var(--space-4); }
.showcase__title {
  font-size: 40px;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(100deg, #fff 20%, var(--lilac) 60%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.showcase__kind { margin: var(--space-2) 0 var(--space-5); color: var(--muted); }
.restore {
  margin-bottom: var(--space-5);
  padding: var(--space-4) 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .45);
}
.restore__row { --hp: 3px; --hgap: 3px; justify-content: center; }
@media (max-width: 374.98px) {
  .restore__row { --hp: 2.5px; --hgap: 2px; }
}
@media (min-width: 480px) {
  .restore__row { --hp: 4px; --hgap: 4px; }
}
@media (min-width: 1024px) {
  .restore__row { --hp: 3px; --hgap: 4px; }
}
@media (min-width: 1280px) {
  .restore__row { --hp: 4px; --hgap: 4px; }
}
.restore__caption { margin: var(--space-3) 0 0; color: var(--muted); font-size: 13px; }
.perks {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  text-align: left;
}
.perks li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .3);
  font-weight: 500;
}
.perks .perk-tile__icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.perks .perk-tile__icon .i { width: 18px; height: 18px; }

/* оформление */
.checkout { padding: var(--space-5) var(--space-4); }
@media (min-width: 480px) {
  .checkout { padding: var(--space-6); }
}
@media (min-width: 1200px) {
  .checkout { padding: var(--space-7); }
}
.checkout__title { margin-bottom: var(--space-6); font-size: 22px; font-weight: 600; }
.field {
  min-width: 0;
  margin: 0 0 var(--space-6);
  padding: 0;
  border: 0;
}
.field__label {
  display: block;
  margin-bottom: var(--space-3);
  padding: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.field__input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .55);
  color: var(--text);
  font-size: 17px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field__input::placeholder { color: #8b82a6; }
.field__input:hover { border-color: rgba(167, 139, 250, .5); }
.field__input:focus { border-color: var(--violet-light); box-shadow: 0 0 0 4px rgba(139, 92, 246, .22); outline: none; }
.field__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.field__input[aria-invalid="true"] { border-color: var(--heart); box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }
.field__hint { margin: var(--space-2) 0 0; color: var(--muted); font-size: 14px; }
.field__error {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  color: #fca5a5;
  font-size: 14px;
  font-weight: 500;
}
.field__error::before {
  content: "!";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--heart);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

/* выпадающий список валюты */
.select {
  position: relative;
  display: block;
}
.select select {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: var(--space-3) 44px var(--space-3) 48px;
  text-overflow: ellipsis;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .55);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.select select:hover { border-color: rgba(167, 139, 250, .5); }
.select select:focus { border-color: var(--violet-light); box-shadow: 0 0 0 4px rgba(139, 92, 246, .22); outline: none; }
.select select:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.select option { background: var(--surface); color: var(--text); }
.select__icon,
.select__chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.select__icon { left: 16px; width: 22px; height: 22px; color: var(--violet-light); }
.select__chevron { right: 16px; width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 399.98px) {
  .select select { padding-left: 42px; padding-right: 36px; font-size: 15px; }
  .select__icon { left: 13px; width: 20px; height: 20px; }
  .select__chevron { right: 12px; }
}

/* способы оплаты */
.pay-list { display: grid; gap: var(--space-3); }
@media (min-width: 560px) {
  .pay-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.choice { position: relative; display: block; cursor: pointer; }
.choice__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.pay__box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  height: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .4);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .25s ease;
}
.pay__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(139, 92, 246, .16);
  color: var(--violet-light);
}
.pay__icon .i { width: 18px; height: 18px; }
.pay__title { flex: 1 1 auto; min-width: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.pay__badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(167, 139, 250, .12);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pay__check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(167, 139, 250, .45);
  border-radius: 50%;
  color: transparent;
}
.pay__check .i { width: 14px; height: 14px; stroke-width: 2.6; }
.choice:hover .pay__box { border-color: var(--glass-border-strong); }
.choice__input:checked + .pay__box {
  border-color: var(--violet-light);
  background: linear-gradient(135deg, rgba(124, 58, 237, .26), rgba(162, 28, 175, .12));
  box-shadow: 0 0 30px -10px rgba(139, 92, 246, .9);
}
.choice__input:checked + .pay__box .pay__check { border-color: transparent; background: var(--violet); color: #fff; }
.choice__input:focus-visible + .pay__box { outline: 2px solid var(--focus); outline-offset: 3px; }
.choice--disabled { cursor: not-allowed; }
.choice--disabled .pay__box,
.choice--disabled:hover .pay__box {
  border-style: dashed;
  border-color: rgba(167, 139, 250, .14);
  background: transparent;
}
.choice--disabled .pay__title { color: var(--muted); }
.choice--disabled .pay__icon { background: rgba(167, 139, 250, .06); color: var(--muted); }
.choice--disabled .pay__check { display: none; }

.notice {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(167, 139, 250, .3);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, .1);
  font-size: 15px;
}
.notice .i { width: 20px; height: 20px; margin-top: 2px; color: var(--lilac); }
.notice b { color: var(--lilac); }

.cost {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(7, 5, 12, .45);
}
.cost__label { color: var(--muted); font-weight: 500; }
.cost__value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: #fff;
  text-shadow: 0 0 30px rgba(217, 70, 239, .5);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .cost__value { font-size: 42px; }
}
.buy__hint { min-height: 1.5em; margin: var(--space-3) 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.buy__error {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(239, 68, 68, .5);
  border-radius: var(--radius);
  background: rgba(239, 68, 68, .1);
  font-size: 15px;
}
.buy__note {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(167, 139, 250, .1);
  color: var(--muted);
  font-size: 14px;
}
/* ответ платёжного сервиса под понятным текстом ошибки — для администрации */
.buy__error-detail { display: block; margin-top: var(--space-1); color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.checkout.is-busy [data-submit] { cursor: progress; }

/* цена в звёздах у способа «Звёзды Telegram» */
.pay__price { flex-shrink: 0; color: #fde68a; font-weight: 700; white-space: nowrap; }

/* код заказа VLR1: «Бессмертный», звёзды Telegram, возврат с оплаты */
.order-code,
.tg-pay {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(7, 5, 12, .45);
}
.order-code__title { margin: 0 0 var(--space-2); font-weight: 700; }
.order-code__value { margin-bottom: var(--space-3); -webkit-user-select: all; user-select: all; }
.order-code__empty { margin: 0 0 var(--space-3); color: var(--muted); font-size: 14px; }
.order-code__hint { margin: var(--space-3) 0 0; color: var(--muted); font-size: 14px; }
.order-code__cmd {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .4);
  color: #e9d5ff;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: nowrap;
}
.tg-pay { border-color: var(--glass-border-strong); background: rgba(124, 58, 237, .1); }
.tg-pay:focus { outline: none; }
.tg-pay:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.tg-pay__title { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); font-weight: 700; }
.tg-pay__title .i { width: 20px; height: 20px; flex-shrink: 0; color: var(--lilac); }
.tg-pay__lead { margin: 0 0 var(--space-3); color: var(--muted); font-size: 14px; }
.tg-pay__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tg-pay__actions .btn { flex: 1 1 160px; }
.tg-pay__steps { display: grid; gap: var(--space-2); margin: var(--space-4) 0 0; padding-left: 1.4em; font-size: 15px; }
.tg-pay__steps b { color: #fde68a; }

/* «Спасибо за покупку» / «Оплата не завершена» после возврата с Tebex */
.pay-result-wrap { margin-bottom: var(--space-5); scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
.pay-result {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  border-color: rgba(45, 212, 191, .45);
  background: linear-gradient(135deg, rgba(45, 212, 191, .12), rgba(124, 58, 237, .1));
}
@media (min-width: 480px) {
  .pay-result { flex-direction: row; gap: var(--space-4); padding: var(--space-6); }
}
.pay-result:focus { outline: none; }
.pay-result__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(45, 212, 191, .18);
  color: var(--teal);
}
.pay-result__icon .i { width: 24px; height: 24px; stroke-width: 2.4; }
.pay-result__body { flex: 1 1 auto; min-width: 0; }
.pay-result__title { margin: 0 0 var(--space-2); font-size: 22px; font-weight: 700; }
.pay-result__text { margin: 0; }
.pay-result__help { margin: var(--space-3) 0 0; color: var(--muted); font-size: 14px; }
.pay-result__help:empty { display: none; }
.pay-result .order-code { background: rgba(7, 5, 12, .5); }
.pay-result.is-cancel { border-color: var(--glass-border-strong); background: linear-gradient(135deg, rgba(124, 58, 237, .14), rgba(255, 255, 255, .02)); }
.pay-result.is-cancel .pay-result__icon { background: rgba(253, 230, 138, .12); color: #fde68a; }

/* ==========================================================================
   Магазин: несколько товаров (список слева, детали и оформление справа)
   ========================================================================== */
@media (min-width: 1024px) {
  .shop { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}
.restore { text-align: center; }
@media (min-width: 1024px) {
  .product-detail .restore__row { --hp: 4px; --hgap: 5px; }
}

/* список товаров */
.product-list {
  min-width: 0;
  margin: 0;
  padding: var(--space-4);
}
@media (min-width: 1024px) {
  .product-list { position: sticky; top: calc(var(--header-h) + var(--space-5)); padding: var(--space-5); }
}
.product-list__title {
  float: left;
  width: 100%;
  margin-bottom: var(--space-4);
  padding: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.product-list__items {
  clear: both;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}
@media (min-width: 480px) and (max-width: 1023.98px) {
  .product-list__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
}
.product-card { position: relative; display: block; cursor: pointer; }
.product-card__box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  min-height: 60px;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .45);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .25s ease;
}
.product-card:hover .product-card__box { border-color: var(--glass-border-strong); }
.choice__input:checked + .product-card__box {
  border-color: var(--violet-light);
  background: linear-gradient(135deg, rgba(124, 58, 237, .3), rgba(162, 28, 175, .14));
  box-shadow: 0 0 30px -10px rgba(139, 92, 246, .9);
}
.choice__input:focus-visible + .product-card__box,
.choice__input:focus-visible + .duration-tab__box,
.choice__input:focus-visible + .mode-tab__box,
.choice__input:focus-visible + .swatch__box { outline: 2px solid var(--focus); outline-offset: 3px; }
.product-card__art,
.product-tile__art,
.product-art {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(217, 70, 239, .35), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--bg-2));
}
.product-card__art { width: 48px; height: 48px; }
@media (min-width: 1024px) {
  .product-card__art { width: 64px; height: 64px; }
}
.product-card__img,
.product-tile__img,
.product-art__img { width: 100%; height: 100%; object-fit: contain; }
.product-card__icon,
.product-tile__art > .i,
.product-art__icon { display: none; color: var(--lilac); }
.is-missing-art > img { display: none; }
.is-missing-art > .i { display: block; width: 50%; height: 50%; filter: drop-shadow(0 0 10px rgba(217, 70, 239, .7)); }
.product-card__text { display: flex; flex-direction: column; min-width: 0; }
.product-card__title { font-weight: 700; line-height: 1.25; }
.product-card__price { color: var(--lilac); font-size: 14px; font-weight: 600; white-space: nowrap; }

/* детали товара */
.product-detail { margin-bottom: var(--space-6); }
.product-detail__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.product-art { width: 88px; height: 88px; border-radius: var(--radius-lg); box-shadow: 0 0 40px -10px rgba(217, 70, 239, .6); }
@media (min-width: 768px) {
  .product-art { width: 128px; height: 128px; }
}
.product-detail__heading { min-width: 0; }
/* на телефоне название товара («БЕССМЕРТНЫЙ») не помещается рядом с артом — арт сверху, название во всю ширину */
@media (max-width: 559.98px) {
  .product-detail__head { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .product-detail__heading { width: 100%; }
}
.product-detail__title {
  font-size: clamp(22px, 7vw, 28px);
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(100deg, #fff 20%, var(--lilac) 60%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (min-width: 768px) {
  .product-detail__title { font-size: 36px; }
}
.product-detail__desc { margin: var(--space-2) 0 0; color: #d8d1ee; }
.product-sub { margin-bottom: var(--space-3); font-size: 15px; font-weight: 600; }
.product-perks { margin-bottom: var(--space-5); }
@media (min-width: 768px) {
  .product-perks .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.product-note {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--magenta);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(217, 70, 239, .08);
  color: #d8d1ee;
  font-size: 15px;
}
.durations { margin-bottom: 0; }
.duration-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.duration-tab { position: relative; display: block; cursor: pointer; }
.duration-tab__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: var(--space-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .45);
  text-align: center;
  transition: border-color .2s ease, background-color .2s ease;
}
.duration-tab:hover .duration-tab__box { border-color: var(--glass-border-strong); }
.choice__input:checked + .duration-tab__box {
  border-color: var(--violet-light);
  background: linear-gradient(135deg, rgba(124, 58, 237, .32), rgba(162, 28, 175, .16));
  box-shadow: inset 0 -3px 0 var(--magenta);
}
.duration-tab__title { font-weight: 700; }
/* узкий телефон: три срока в ряд — «Навсегда» и «30 дней» помещаются в одну строку */
@media (max-width: 399.98px) {
  .duration-tab__box { padding: 6px 4px; }
  .duration-tab__title { font-size: 14px; }
}
.duration-tab__price { color: var(--lilac); font-size: 14px; font-weight: 600; white-space: nowrap; }

.checkout__part { padding-top: var(--space-6); border-top: 1px solid rgba(167, 139, 250, .14); }
.cost__item { color: var(--muted); font-weight: 400; }

/* ==========================================================================
   Конструктор «Бессмертного»
   ========================================================================== */
.builder {
  margin-bottom: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(167, 139, 250, .14);
}
.builder__title { margin-bottom: var(--space-2); font-size: 22px; font-weight: 700; }
.builder__lead { max-width: 640px; color: var(--muted); }
.builder__head { margin-bottom: var(--space-5); }
.builder__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
@media (min-width: 1200px) {
  .builder__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .builder__aside { position: sticky; top: calc(var(--header-h) + var(--space-5)); }
}
/* Телефон и планшет (одна колонка): предпросмотр сразу под полем префикса — его видно, пока игрок вводит текст;
   выбор цветов и сообщение — ниже, «Твой выбор» с кодами — в конце. На ПК (от 1200) — как раньше: справа липкая колонка.
   Порядок фокуса совпадает с видимым: в предпросмотре нет кнопок. */
@media (max-width: 1199.98px) {
  .builder__grid { display: flex; flex-direction: column; gap: 0; }
  .builder__controls,
  .builder__aside { display: contents; }
  .builder__controls > .field:first-child { order: 1; margin-bottom: var(--space-5); }
  .builder__preview { order: 2; margin-bottom: var(--space-6); }
  .builder__controls > .color-picker { order: 3; }
  .builder__controls > .field:last-child { order: 4; }
  .builder__aside > .codes { order: 5; margin-top: 0; }
}
.field__optional { color: var(--muted); font-weight: 400; }

/* выбор цвета */
.color-field { margin-bottom: var(--space-6); }
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: var(--space-3);
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .45);
}
.mode-tab { position: relative; display: block; cursor: pointer; }
.mode-tab__box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px var(--space-2);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background-color .2s ease, color .2s ease;
}
.mode-tab:hover .mode-tab__box { color: var(--text); }
.choice__input:checked + .mode-tab__box {
  background: linear-gradient(135deg, rgba(124, 58, 237, .6), rgba(162, 28, 175, .45));
  color: #fff;
}
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--space-2); }
@media (max-width: 399.98px) {
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.swatch__box {
  display: block;
  width: 100%;
  max-width: 44px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 2px 0 rgba(0, 0, 0, .5);
  transition: transform .15s ease, box-shadow .2s ease;
}
.swatch:hover .swatch__box { transform: translateY(-2px); }
.choice__input:checked + .swatch__box { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--lilac), 0 0 16px rgba(196, 181, 253, .7); }
.swatch__code { color: var(--muted); font-family: var(--font-pixel); font-size: 9px; line-height: 1.6; }
.hex-panel,
.grad-panel { display: grid; gap: var(--space-3); }
.hex-pair { display: flex; align-items: center; gap: var(--space-3); }
.hex-pair__label { flex: 0 0 64px; color: var(--muted); font-size: 14px; font-weight: 600; }
.hex-pair__color {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  padding: 3px;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .55);
  cursor: pointer;
}
.hex-pair__color::-webkit-color-swatch-wrapper { padding: 0; }
.hex-pair__color::-webkit-color-swatch { border: 0; border-radius: 10px; }
.hex-pair__color::-moz-color-swatch { border: 0; border-radius: 10px; }
.hex-pair__text { max-width: 160px; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.grad-bar { display: block; height: 12px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.color-warn {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(251, 191, 36, .45);
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, .1);
  color: #fde68a;
  font-size: 14px;
  font-weight: 500;
}
.color-warn .i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* предпросмотр «как на сервере» */
@font-face {
  font-family: "Tiny5";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tiny5-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Tiny5";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tiny5-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.preview-label {
  margin-bottom: var(--space-3);
  color: var(--lilac);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.mc-scene {
  /* шаг пикселя шрифта Tiny5 = 1/8 размера: 16px → 2px (как интерфейс Minecraft в масштабе 2) — буквы чёткие */
  --mcfs: 16px;
  --mcpx: 2px;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(7, 5, 12, .35), rgba(7, 5, 12, .6)),
    url("../assets/screens/world-2.jpg") center / cover,
    linear-gradient(160deg, #2a2340, #120e1c);
  image-rendering: pixelated;
}
@media (min-width: 768px) {
  .mc-scene { padding: var(--space-4); }
}
.mc {
  font-family: "Tiny5", var(--font-pixel);
  font-size: var(--mcfs);
  line-height: 1.25;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}
.mc-line { overflow-wrap: normal; word-break: normal; }
.mc-word { white-space: nowrap; }
.mc--chat {
  display: grid;
  gap: 2px;
  padding: calc(var(--mcpx) * 2) calc(var(--mcpx) * 3);
  background: rgba(0, 0, 0, .5);
}
.mc--tab {
  justify-self: center;
  display: grid;
  gap: 2px;
  min-width: min(100%, 260px);
  padding: calc(var(--mcpx) * 2);
  background: rgba(0, 0, 0, .35);
}
.mc-tab__row {
  display: flex;
  align-items: center;
  gap: calc(var(--mcpx) * 3);
  padding: 0 calc(var(--mcpx) * 3) 0 0;
  background: rgba(255, 255, 255, .13);
}
.mc-head {
  flex-shrink: 0;
  width: calc(var(--mcpx) * 8);
  height: calc(var(--mcpx) * 8);
  background:
    linear-gradient(90deg, transparent 12.5%, #3a2414 12.5% 25%, transparent 25% 75%, #3a2414 75% 87.5%, transparent 87.5%) 0 50% / 100% 12.5% no-repeat,
    linear-gradient(180deg, #5b3a1f 0 37.5%, #c99a6b 37.5%);
}
.mc-head--1 { background-color: #7b5a3c; filter: hue-rotate(20deg); }
.mc-head--2 { filter: hue-rotate(250deg) saturate(.6); }
.mc-head--3 { filter: hue-rotate(120deg) saturate(.5); }
.mc--join { padding: calc(var(--mcpx) * 2) calc(var(--mcpx) * 3); background: rgba(0, 0, 0, .5); }

/* сводка и коды */
.codes {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(7, 5, 12, .45);
}
.codes__title { margin-bottom: var(--space-3); font-weight: 700; }
.codes__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin-bottom: var(--space-4); }
.codes__row { display: grid; gap: 2px; }
@media (min-width: 560px) {
  .codes__row { grid-template-columns: 170px minmax(0, 1fr); gap: var(--space-3); }
}
/* строки с кодами — всегда подпись сверху, код во всю ширину: длинный тег <gradient:#…:#…> не обрезается */
.codes__row.codes__row--code { grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: var(--space-1); }
.codes__row dt { color: var(--muted); font-size: 14px; }
.codes__row dd { min-width: 0; font-size: 15px; }
.codes__code {
  display: block;
  padding: 6px var(--space-2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .4);
  color: #e9d5ff;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere; /* код можно переносить в любом месте — лишь бы не вылезал за рамку */
}

/* обязательная галочка */
.confirm {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, .1);
  cursor: pointer;
}
.confirm__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.confirm__box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 2px solid var(--lilac);
  border-radius: 7px;
  color: transparent;
  transition: background-color .2s ease, color .2s ease;
}
.confirm__box .i { width: 16px; height: 16px; stroke-width: 3; }
.confirm__input:checked + .confirm__box { background: var(--violet); border-color: var(--violet); color: #fff; }
.confirm__input:focus-visible + .confirm__box { outline: 2px solid var(--focus); outline-offset: 3px; }
.confirm__text { font-weight: 600; }
.builder__note {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: 14px;
}
.builder__note .i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #fde68a; }
/* согласие с условиями покупки — над кнопкой оплаты */
.confirm--terms { margin-top: 0; }
.confirm--terms .confirm__text { font-weight: 500; font-size: 15px; }
.confirm__sub { margin: var(--space-2) 0 var(--space-5); color: var(--muted); font-size: 13px; }

/* ==========================================================================
   Главная: карточки других товаров под баннером «Жизнь»
   ========================================================================== */
.product-tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
  list-style: none;
}
@media (min-width: 900px) {
  .product-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.product-tile {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-4);
  color: var(--text);
  text-decoration: none;
  transition: border-color .25s ease, transform .25s var(--ease), box-shadow .25s ease;
}
.product-tile:hover { color: var(--text); border-color: var(--glass-border-strong); transform: translateY(-3px); box-shadow: 0 24px 60px -30px rgba(139, 92, 246, .7); }
.product-tile:focus-visible { border-radius: var(--radius-lg); }
.product-tile__art { width: 72px; height: 72px; border-radius: var(--radius); }
.product-tile__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.product-tile__title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.product-tile__desc { color: var(--muted); font-size: 14px; line-height: 1.4; }
.product-tile__price { margin-top: var(--space-1); color: var(--lilac); font-weight: 700; white-space: nowrap; }
@media (max-width: 399.98px) {
  .product-tile { gap: var(--space-3); padding: var(--space-3); }
  .product-tile__art { width: 56px; height: 56px; }
  .product-tile__go { display: none !important; }
}
.product-tile__go {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--lilac);
}

/* ==========================================================================
   Правила
   ========================================================================== */
.rules-toc { margin-top: var(--space-5); }
.rules-toc__list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; }
.rules-toc__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 6px var(--space-4) 6px 6px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: rgba(13, 9, 22, .6);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.rules-toc__chip:hover { color: var(--text); border-color: var(--glass-border-strong); background: rgba(124, 58, 237, .2); }
.rules-toc__chip:focus-visible { border-radius: var(--radius-pill); }
.rules-toc__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--btn-1), var(--btn-2));
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 10px;
}
.rules-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }

/* поиск */
.rules-search { padding: var(--space-5) var(--space-4); }
@media (min-width: 480px) {
  .rules-search { padding: var(--space-5); }
}
.search-field { position: relative; }
.search-field__icon { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; color: var(--violet-light); transform: translateY(-50%); pointer-events: none; }
.search-field__input { padding-left: 48px; }
.search-field__input::-webkit-search-cancel-button { filter: invert(.7); }
.search-results:empty { display: none; }
.search-results { margin-top: var(--space-4); }
.search-count { margin-bottom: var(--space-2); color: var(--muted); font-size: 14px; }
.search-hits { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); list-style: none; }
.search-hit {
  display: block;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .45);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.search-hit:hover { color: var(--text); border-color: var(--glass-border-strong); background: rgba(124, 58, 237, .14); }
.search-hit:focus-visible { border-radius: var(--radius); }
.search-hit__where { color: var(--lilac); font-weight: 600; }
.search-hit__name { font-weight: 700; }
.search-hit__punish { color: #fca5a5; font-weight: 700; white-space: nowrap; }
.search-hit__via { display: block; color: var(--muted); font-size: 13px; }
.search-empty {
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(167, 139, 250, .3);
  border-radius: var(--radius);
  background: rgba(124, 58, 237, .1);
}
.search-empty .i { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--teal); }

/* разделы */
.rules-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.rules-section { padding: var(--space-5) var(--space-4); scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
@media (min-width: 768px) {
  .rules-section { padding: var(--space-6); }
}
.rules-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}
.rules-section__num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(196, 181, 253, .7);
}
.rules-section__heading { flex: 1 1 200px; min-width: 0; }
.rules-section__title { font-size: clamp(20px, 6vw, 24px); font-weight: 700; }
@media (min-width: 768px) {
  .rules-section__title { font-size: 30px; }
}
.rules-section__lead { margin: var(--space-1) 0 0; color: var(--muted); }
.punish-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px var(--space-3);
  border: 1px solid rgba(239, 68, 68, .5);
  border-radius: var(--radius-pill);
  background: rgba(239, 68, 68, .14);
  color: #fecaca;
  font-weight: 700;
}
.punish-badge .i { width: 18px; height: 18px; color: var(--heart-hi); }
.perm-badge {
  display: inline-block;
  grid-column: 2 / -1;
  justify-self: start;
  max-width: 100%;
  padding: 3px var(--space-2);
  border-radius: var(--radius-pill);
  /* тёмно-красный: белый текст 9px читается (контраст 6,5:1; на #ef4444 было 3,8:1) */
  background: var(--heart-deep);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .7);
  color: #fff;
  white-space: nowrap;
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rule-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); list-style: none; }
.rule-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .4);
  scroll-margin-top: calc(var(--header-h) + var(--space-5));
  transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease;
}
@media (min-width: 768px) {
  .rule-item { padding: var(--space-3) var(--space-4); gap: var(--space-4); }
}
/* самые узкие телефоны: чуть меньше отступов, чтобы «Дискриминация» и другие длинные слова не рвались */
@media (max-width: 359.98px) {
  .rules-section { padding-inline: var(--space-3); }
  .rule-item { gap: var(--space-2); padding-inline: var(--space-2); }
}
.rule-item__num {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 30px;
  padding: 0 var(--space-2);
  border-radius: 9px;
  background: rgba(139, 92, 246, .2);
  color: var(--lilac);
  font-family: var(--font-pixel);
  font-size: 10px;
  white-space: nowrap;
}
.rule-item__title { margin-bottom: 2px; font-family: var(--font-body); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.rule-item__text { color: var(--muted); }
.rule-item__text::first-letter,
.ban-item__desc::first-letter { text-transform: uppercase; }
.link-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.link-btn:hover { color: var(--lilac); border-color: var(--glass-border); background: rgba(139, 92, 246, .12); }
.link-btn:focus-visible { border-radius: 10px; }
.link-btn .i { width: 18px; height: 18px; }
.is-target { border-color: var(--violet-light) !important; box-shadow: 0 0 0 3px rgba(139, 92, 246, .35), 0 0 40px -10px rgba(217, 70, 239, .8); }

.rule-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.rule-group {
  padding: var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(7, 5, 12, .4);
  scroll-margin-top: calc(var(--header-h) + var(--space-5));
  transition: border-color .3s ease, box-shadow .3s ease;
}
.rule-group__head { display: flex; align-items: center; gap: var(--space-3); }
.rule-group__title { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 17px; font-weight: 700; letter-spacing: 0; }
/* телефон: номер, счётчик и кнопка ссылки — в первой строке, название — во второй, во всю ширину (длинные слова не рвутся) */
@media (max-width: 479.98px) {
  .rule-group__head { flex-wrap: wrap; row-gap: var(--space-2); }
  .rule-group__title { order: 1; flex: 1 0 100%; }
  .rule-group__count { margin-left: auto; }
}
.rule-group__count {
  flex-shrink: 0;
  min-width: 32px;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: rgba(167, 139, 250, .14);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.rule-group__summary { margin: var(--space-3) 0 var(--space-2); color: #d8d1ee; }
.rule-group__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  color: var(--lilac);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.rule-group__toggle::-webkit-details-marker { display: none; }
.rule-group__toggle::marker { content: ""; }
.rule-group__toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.rule-group__details[open] .rule-group__toggle::after { margin-top: 3px; transform: rotate(-135deg); }
.rule-group__toggle:focus-visible { border-radius: 8px; }
.ban-list {
  display: grid;
  gap: 2px;
  margin-top: var(--space-2);
  list-style: none;
}
@media (min-width: 900px) {
  .ban-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); }
}
.ban-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .03);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.ban-item__name { font-weight: 700; }
.ban-item__aliases { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.alias-chip {
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(139, 92, 246, .18);
  color: var(--lilac);
  font-size: 13px;
  font-weight: 600;
}
.ban-item__desc { flex-basis: 100%; color: var(--muted); font-size: 14px; }

/* ---------- Условия покупки и конфиденциальность (legal.html) ---------- */
.legal-text { max-width: 780px; color: #d8d1ee; }
.legal-text h3 { margin: var(--space-6) 0 var(--space-2); color: var(--text); font-size: 17px; font-weight: 700; }
.legal-text h3:first-child { margin-top: 0; }
.legal-text p { margin: 0 0 var(--space-3); }
.legal-text ul { margin: 0 0 var(--space-3); padding-left: 1.25em; }
.legal-text li + li { margin-top: var(--space-2); }
.legal-text b { color: var(--text); }
.legal-text code { padding: 1px 6px; border-radius: 6px; background: rgba(139, 92, 246, .18); color: var(--lilac); font-size: .92em; }
.legal-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1) var(--space-5);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(7, 5, 12, .4);
}
.legal-facts dt { color: var(--muted); font-size: 14px; }
.legal-facts dd { margin: 0 0 var(--space-3); color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.legal-facts dd:last-child { margin-bottom: 0; }
@media (min-width: 640px) {
  .legal-facts { grid-template-columns: minmax(180px, max-content) minmax(0, 1fr); align-items: baseline; }
  .legal-facts dd { margin-bottom: 0; }
}
.legal-note { display: flex; gap: var(--space-2); margin: var(--space-4) 0 0; color: var(--muted); font-size: 14px; }
.legal-note .i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #fde68a; }

/* ---------- Меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .particles { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover,
  .rule-step:hover,
  .shot:hover,
  .perk-tile:hover { transform: none; }
  .shot:hover .shot__media img { transform: none; }
}
