/* ============ Сброс ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* ============ Токены ============ */
:root {
  color-scheme: dark;
  --bg: #000a2f;
  --surface: #0a1747;
  --surface-hi: #12235f;
  --fg: #eef1fb;
  --muted: #8e9cce;
  --accent: #5b7cfa;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;

  /* Плавная типографика: масштабируется между 360 и 1440px */
  --step--1: clamp(0.84rem, 0.81rem + 0.13vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.19rem, 1.13rem + 0.34vw, 1.42rem);
  --step-2: clamp(1.42rem, 1.3rem + 0.6vw, 1.8rem);
  --step-3: clamp(1.7rem, 1.45rem + 1.2vw, 2.55rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.7rem);

  --gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  --section: clamp(3rem, 2rem + 4vw, 6rem);
  --container: 72rem;
  --radius: 16px;
  --sidebar: 240px;
}

/* ============ База ============ */
body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(100% - clamp(2rem, 5vw, 4.5rem), var(--container)); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; font-weight: 700; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }

/* ============ Каркас: сайдбар + контент ============ */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100svh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.4rem 1rem;
  background: var(--bg);
  overflow-y: auto;
}
.brand { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; padding: 0.4rem 0.8rem; margin-bottom: 1rem; }
.side-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.side-nav a svg { width: 15px; height: 15px; flex: none; }
.side-nav a:hover { color: var(--fg); background: var(--surface); }
.side-nav a[aria-current='page'] { color: var(--fg); background: var(--surface); }

/* Группа «Инструменты» в меню: раскрывается на <details>, без JS */
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s, color 0.15s;
}
.nav-group summary::-webkit-details-marker { display: none; }
/* пункты меню — всегда в одну строку, длинное название ужимается многоточием */
.side-nav a, .nav-group summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group summary:hover { color: var(--fg); background: var(--surface); }
.nav-group summary svg:first-child { width: 15px; height: 15px; flex: none; }
.nav-group summary svg:last-child { width: 11px; height: 11px; margin-left: auto; transition: transform 0.2s; }
.nav-group[open] summary { color: var(--fg); }
.nav-group[open] summary svg:last-child { transform: rotate(180deg); }
.nav-sub { display: flex; flex-direction: column; gap: 0.15rem; margin: 0.15rem 0 0.35rem 0.75rem; padding-left: 0.55rem; border-left: 1px solid var(--line); }
.nav-sub a { font-size: 0.9rem; padding: 0.45rem 0.7rem; }
/* Студии в подменю: маленький логотип + название рядом.
   Логотипы заранее перекрашены под тёмный фон (scripts/build-provider-logos.mjs),
   поэтому подложка не нужна. */
.nav-prov { gap: 0.5rem; font-size: 0.86rem; }
.nav-prov img {
  width: 34px; height: auto; flex: none;
  opacity: 0.85; transition: opacity 0.15s;
}
.nav-prov:hover img, .nav-prov[aria-current] img { opacity: 1; }
/* У казино логотип может быть и широким вордмарком, и одной буквой, поэтому
   размер задаём по высоте строки — иначе буква при ширине 34px станет втрое
   выше текста рядом с ней */
.nav-casino img { width: auto; height: 15px; max-width: 34px; }

.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.side-foot { padding: 0.4rem 0.8rem; color: var(--muted); font-size: 0.78rem; display: flex; flex-direction: column; gap: 0.4rem; }
.side-foot a { color: inherit; text-decoration: none; }
.side-foot a:hover { color: var(--fg); }

/* ---- Переключатель языков (без JS, на <details>) ---- */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover,
.lang-switch[open] summary { background: var(--surface); color: var(--fg); }
.lang-switch .chev { width: 12px; height: 12px; margin-left: auto; transition: transform 0.15s; }
.lang-switch[open] .chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  z-index: 30;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.lang-menu a:hover { background: var(--surface-hi); color: var(--fg); }
.lang-menu a[aria-current='true'] { color: var(--fg); }

.lang-flag { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }

.content { min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; }

/* Бургер и затемнение существуют только на мобилке */
.burger, .nav-backdrop { display: none; }

@media (max-width: 900px) {
  /* Оверскролл на iOS: фон документа = фон сайта, чтобы «резинка» не светилась чужим цветом */
  html { background: var(--bg); }
  /* Пока меню открыто — страница под ним не прокручивается */
  html:has(.nav-toggle:checked) { overflow: hidden; }

  .shell { display: block; }
  .sidebar {
    /* Высота шапки нужна оглавлению ниже, чтобы прилипать под неё, а не под неё
       заезжать. Держим числом в одном месте: 0.7rem×2 отступов + 41px бренда. */
    --header-h: 66px;
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    overflow: visible;
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  }
  /* Козырёк над липкой шапкой: при оверскролле сверху не просвечивает контент */
  .sidebar::before { content: ''; position: absolute; left: 0; right: 0; top: -120px; height: 120px; background: var(--bg); }
  .brand { margin-bottom: 0; padding: 0.3rem 0.4rem; font-size: 1.2rem; }
  .side-foot { display: none; }
  .side-bottom { margin-top: 0; margin-left: auto; }
  .lang-switch summary span { display: none; }
  .lang-menu { bottom: auto; top: calc(100% + 0.4rem); left: auto; right: 0; min-width: 11rem; }

  /* ---- Бургер: три полоски складываются в крестик ---- */
  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    flex: none;
  }
  .burger:active { background: var(--surface); }
  .burger span { display: block; height: 2px; border-radius: 2px; background: var(--fg); transition: transform 0.3s ease, opacity 0.2s ease; }
  .nav-toggle:checked ~ .sidebar .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .sidebar .burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .sidebar .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ---- Затемнение позади меню: тап по нему закрывает (это label) ---- */
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgb(0 4 22 / 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  .nav-toggle:checked ~ .nav-backdrop { opacity: 1; visibility: visible; }

  /* ---- Выпадающая панель меню под шапкой ---- */
  .side-nav {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: 4.4rem;
    z-index: 45;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem;
    border-radius: 16px;
    background: rgb(8 18 62 / 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 70px rgb(0 0 0 / 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), visibility 0.28s;
  }
  .nav-toggle:checked ~ .sidebar .side-nav { opacity: 1; visibility: visible; transform: none; }
  .side-nav a { padding: 0.85rem 1rem; font-size: 1.02rem; opacity: 0; transform: translateY(8px); transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s, color 0.15s; }
  .side-nav a svg { width: 18px; height: 18px; }
  .nav-toggle:checked ~ .sidebar .side-nav a { opacity: 1; transform: none; }
  .nav-toggle:checked ~ .sidebar .side-nav a:nth-child(1) { transition-delay: 0.05s; }
  .nav-toggle:checked ~ .sidebar .side-nav a:nth-child(2) { transition-delay: 0.09s; }
  .nav-toggle:checked ~ .sidebar .side-nav a:nth-child(3) { transition-delay: 0.13s; }
  .nav-toggle:checked ~ .sidebar .side-nav a:nth-child(4) { transition-delay: 0.17s; }
  .nav-toggle:checked ~ .sidebar .side-nav a:nth-child(5) { transition-delay: 0.21s; }
  .nav-toggle:checked ~ .sidebar .side-nav a:nth-child(6) { transition-delay: 0.25s; }
}

/* ============ Герой с артом ============ */
/* Десктоп: полный арт как у duel — заголовок в верхней части картинки,
   секция ниже наезжает на низ арта, градиент вниз уже в самой картинке. */
.hero-banner {
  position: relative;
  display: grid;
  justify-items: center;
  /* заголовок по центру арта: в середине картинки как раз пустая долина между замками */
  align-content: center;
  text-align: center;
  aspect-ratio: 1704 / 923;
  padding: clamp(1.5rem, 5vw, 4.5rem) 0;
  background: url('/assets/img/hero.jpg') top center / cover no-repeat;
}
.hero-copy { position: relative; z-index: 2; max-width: 60rem; margin-inline: auto; padding-inline: 1.5rem; }
.hero-banner h1,
.hero-banner .lead { filter: drop-shadow(0 0 10px rgb(0 0 0 / 0.9)); }

/* Сшивка арта с точным цветом фона #000a2f: низ и край у сайдбара.
   Пиксели картинки чуть отличаются от фона (JPEG + собственный градиент арта) */
.hero-banner::before,
.hero-banner::after { content: ''; position: absolute; pointer-events: none; }
.hero-banner::after {
  inset-inline: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.hero-banner::before {
  inset-block: 0;
  left: 0;
  width: clamp(2rem, 6vw, 6rem);
  background: linear-gradient(90deg, var(--bg), transparent);
}

/* Замки-слои и свечения — только для мобилки */
.hero-art,
.hero-glow { display: none; }

/* Нижнюю часть арта занимает полоса цифр внутри героя, поэтому следующая
   секция больше не наезжает — иначе она легла бы прямо на плитки.
   Небольшой подъём оставлен, чтобы не копился пустой затемнённый низ картинки. */
.hero-banner + .block {
  position: relative;
  z-index: 2;
  margin-top: clamp(-5rem, 8rem - 9vw, 0rem);
}

@media (max-width: 700px) {
  /* Мобилка: замки за текстом (текст поверх), левый чуть наезжает на правый.
     Фон у слоёв «прозрачный»: lighten растворяет всё темнее фона страницы,
     маска оставляет размытие краёв. */
  .hero-banner {
    aspect-ratio: auto;
    background: none;
    overflow: hidden;
    padding: 2.5rem 0 3.5rem;
  }
  .hero-banner::before,
  .hero-banner::after { display: none; }
  .hero-banner + .block { margin-top: 0; }

  /* Круглые свечения позади замков; тёмные части замков пропускают их
     через lighten — свет реально сидит ЗА картинкой */
  .hero-glow {
    display: block;
    position: absolute;
    top: 50%;
    width: 96vw;
    aspect-ratio: 1;
    transform: translateY(-50%);
    border-radius: 50%;
    pointer-events: none;
  }
  .hero-glow-left {
    left: -22vw;
    background: radial-gradient(circle, rgb(192 72 213 / 0.9) 0%, rgb(192 72 213 / 0.5) 42%, transparent 72%);
  }
  .hero-glow-right {
    right: -22vw;
    background: radial-gradient(circle, rgb(38 50 178) 0%, rgb(38 50 178 / 0.55) 42%, transparent 72%);
  }

  /* Замки — настоящие прозрачные вырезки (WebP с альфой);
     маска дополнительно размывает жёсткие края среза */
  .hero-art {
    display: block;
    position: absolute;
    inset-block: 0;
    width: 68vw;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(62% 62% at 50% 50%, #000 42%, transparent 76%);
    mask-image: radial-gradient(62% 62% at 50% 50%, #000 42%, transparent 76%);
  }
  .hero-art-left {
    left: -8vw;
    z-index: 1;
    background-image: url('/assets/img/hero-left.webp');
    background-position: center left;
    /* дополнительный плавный переход сверху: маски пересекаются */
    -webkit-mask-image: radial-gradient(62% 62% at 50% 50%, #000 42%, transparent 76%),
      linear-gradient(180deg, transparent 0%, #000 34%);
    -webkit-mask-composite: source-in;
    mask-image: radial-gradient(62% 62% at 50% 50%, #000 42%, transparent 76%),
      linear-gradient(180deg, transparent 0%, #000 34%);
    mask-composite: intersect;
  }
  .hero-art-right { right: -8vw; background-image: url('/assets/img/hero-right.webp'); background-position: center right; }
}
.hero-banner .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: var(--step--1); color: #b9c5ff; font-weight: 600; margin-bottom: 1rem; }
.hero-banner h1 { font-size: var(--step-4); max-width: 22ch; margin-inline: auto; margin-bottom: 1.1rem; text-shadow: 0 2px 28px rgb(0 0 0 / 0.55); }
.hero-banner .lead { font-size: var(--step-1); color: #ccd5f6; max-width: 52ch; margin-inline: auto; text-wrap: pretty; text-shadow: 0 1px 16px rgb(0 0 0 / 0.55); }

/* ============ Секции и карточки ============ */
.block { padding-block: calc(var(--gap) * 1.25) var(--section); }
.page-head { padding-block: calc(var(--section) * 0.6) calc(var(--gap) * 1.5); }
.page-head h1 { font-size: var(--step-3); margin-bottom: 0.75rem; }
.page-head .lead { font-size: var(--step-1); color: var(--muted); max-width: 52ch; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: calc(var(--gap) * 1.1); }
.section-head h2 { font-size: var(--step-2); }
/* Центрованный вариант заголовка секции — как «Duel Originals» */
.section-head-hero { justify-content: center; }
.more { color: var(--muted); font-size: var(--step--1); text-decoration: none; }
.more:hover { color: var(--fg); }

.grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: var(--gap); }
@media (max-width: 700px) { .grid-posts { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }

/* Карточка поста как слот-карточка: 4:5, обложка, градиент снизу, заголовок поверх */
.card-slot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: flex-end;
  transition: transform 0.16s ease;
}
/* Пропорция 4:5 через padding-хак: aspect-ratio в grid-строках со stretch схлопывает ряды */
.card-slot::before { content: ''; width: 0; padding-top: 125%; }
.card-slot:hover { transform: translateY(-4px) scale(1.02); }
.card-slot > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-slot-grad { position: absolute; inset: 0; }
.card-slot-title {
  z-index: 1; /* поверх градиента; позиционирование не задаём, чтобы ссылка растянулась на всю карточку */
  width: 100%;
  padding: 0.9rem 0.9rem 1.05rem;
  font-weight: 700;
  font-size: clamp(1rem, 0.85rem + 0.7vw, 1.35rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.35);
  text-wrap: balance;
}
.card-slot-title a { color: inherit; text-decoration: none; }
.card-slot-title a::after { content: ''; position: absolute; inset: 0; }

/* Бейдж категории на карточке — как «100% RTP» у duel: тёмная пилюля, цвет текста = цвет категории */
.card-cat {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 1;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  background: rgb(2 8 34 / 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  pointer-events: none;
}

/* Чипсы категорий над списком блога */
.cat-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 1.7rem; }
.cat-chip {
  --c: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cat-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.cat-chip.all::before { display: none; }
.cat-chip:hover { color: var(--fg); background: var(--surface-hi); }
.cat-chip.active { color: var(--fg); background: color-mix(in srgb, var(--c) 22%, var(--surface)); }

/* Категория в мете статьи */
.post-cat { font-weight: 700; text-decoration: none; }
.post-cat:hover { text-decoration: underline; }

/* «Читайте также» под статьёй */
.related-posts { margin-top: 3.5rem; }
.related-posts .grid-posts { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .related-posts .grid-posts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .related-posts .grid-posts { grid-template-columns: repeat(2, 1fr); } }

/* ============ Симулятор слотов ============ */
.sim { display: flex; flex-direction: column; gap: 1.4rem; margin-top: 1.5rem; }
.sim-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.sim-search-wrap { grid-column: 1 / -1; }
.sim-panel label { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.sim-panel .hint { font-weight: 400; opacity: 0.8; }
.sim-panel input, .sim-panel select {
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  width: 100%;
}
.sim-panel input:focus-visible, .sim-panel select:focus-visible { outline: 2px solid var(--accent); }
.sim-search { position: relative; display: block; }
/* ВАЖНО: display:flex ниже перебивает браузерное [hidden]{display:none} — возвращаем его силой */
.sim-sug[hidden] { display: none !important; }
.sim-sug {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--surface-hi, #101d55);
  border-radius: 12px;
  padding: 0.4rem;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  max-height: 21rem;
  overflow-y: auto;
}
.sim-sug-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: none;
  border: 0;
  color: var(--fg);
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}
.sim-sug-item:hover, .sim-sug-item.active { background: rgb(255 255 255 / 0.08); }
.sim-sug-item span { color: var(--muted); font-size: 0.78rem; }
.sim-meta { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.sim-meta b { color: var(--fg); }
.sim-run-wrap { display: flex; align-items: flex-end; }
.sim-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
}
.sim-btn:hover { filter: brightness(1.1); }
.sim-btn:disabled { opacity: 0.6; cursor: default; }
.sim-out { display: flex; flex-direction: column; gap: 1rem; }
.sim-balance-label { color: var(--muted); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.sim-balance-row { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.sim-balance { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
.sim-balance.up { color: #4ade80; }
.sim-balance.down { color: #f87171; }
.sim-chart { width: 100%; height: 320px; background: var(--surface); border-radius: var(--radius); }
.sim-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; }
.sim-stat { background: var(--surface); border-radius: 12px; padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sim-stat span { color: var(--muted); font-size: 0.78rem; }
.sim-stat strong { font-size: 0.98rem; line-height: 1.35; }
.sim-note { font-size: 0.8rem; line-height: 1.65; max-width: 75ch; }
/* Инструменты на главной: те же карточки, что у статей, три в ряд */
/* ---- Полоса цифр под героем ----
   Четыре реальных счётчика из базы: сразу видно, что за сайтом что-то стоит.
   Каждая плитка подсвечена своим цветом из палитры категорий. */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: clamp(1.5rem, 3vw, 3rem);
  position: relative;
  z-index: 2;
}
.stats-band > div {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  padding: 1.35rem 1.3rem 1.2rem;
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: 16px;
  /* Блюр здесь был бы холостым: за полосой уже не картинка, а ровный фон */
  background: linear-gradient(180deg, #0b1a4c 0%, #060f36 100%);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
/* мягкое цветное свечение сверху — по центру, под стать содержимому */
.stats-band > div::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 80% at 50% 0%, color-mix(in srgb, var(--c) 24%, transparent), transparent 65%);
  pointer-events: none;
}
/* тонкая цветная полоска сверху — она и различает плитки между собой */
.stats-band > div::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c) 50%, transparent);
}
.stats-band > div:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  background: linear-gradient(180deg, #102260 0%, #0a1745 100%);
}
.stats-band b {
  position: relative;
  font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.25rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stats-band span { position: relative; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.hero-banner .stats-band { margin-top: clamp(1.5rem, 2.5vw, 2.5rem); }
@media (max-width: 700px) { .hero-copy { padding-inline: 1.25rem; } }
/* Внутри героя весь стек (заголовок + описание + цифры) центрируется по арту,
   поэтому текст поднимается — компенсируем, чтобы H1 остался в «долине» между замками */
@media (min-width: 701px) {
  .hero-banner .stats-band { margin-bottom: calc(-1 * clamp(1.5rem, 2.5vw, 2.5rem)); }
}

@media (max-width: 700px) {
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-top: 1.25rem; }
  .stats-band > div { padding: 1rem 1rem 0.9rem; }
}

/* ---- Студии на главной ----
   Логотипы лежат в тёмном варианте (scripts/build-provider-logos.mjs): чёрное
   поднято до белого, фирменные цвета сохранены. Подложка под них не нужна. */
.prov-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.prov-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 1.1rem 0.9rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(6, 15, 54, 0.9) 100%);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}
.prov-chip img {
  width: 84px;
  height: 42px;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.16s ease;
}
.prov-chip b { font-size: 0.86rem; font-weight: 700; margin-top: 0.55rem; }
.prov-chip span { font-size: 0.72rem; color: var(--muted); }
.prov-chip:hover {
  border-color: rgba(91, 124, 250, 0.55);
  background: linear-gradient(180deg, var(--surface-hi) 0%, var(--surface) 100%);
  transform: translateY(-2px);
}
.prov-chip:hover img { opacity: 1; }
.prov-strip-all .btn-all-static { margin-top: 1.4rem; }
@media (max-width: 520px) { .prov-strip { grid-template-columns: repeat(2, 1fr); } }

.tools-grid { grid-template-columns: repeat(3, 1fr); }
.tools-grid > .card-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============ Каталог слотов ============ */
/* Карточка провайдера над каталогом */
.prov-card { background: var(--surface); border-radius: var(--radius); padding: 1.5rem 1.7rem; margin: 1.6rem 0 2.2rem; }
.prov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.prov-title { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
/* Логотипы уже перекрашены под тёмный фон — плашка не нужна */
.prov-logo-plate {
  display: inline-flex; align-items: center; justify-content: center;
  width: 118px; height: 62px; flex: none;
}
.prov-logo-plate img { max-width: 100%; height: auto; }

/* Плитки студий на /providers */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: var(--gap); margin-top: 1.6rem; }
.prov-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 0.45rem;
  background: var(--surface); border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1.35rem;
  transition: transform 0.16s ease, background 0.16s ease;
}
.prov-tile:hover { transform: translateY(-3px); background: var(--surface-hi); }
.prov-tile-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 108px; height: 56px; margin-bottom: 0.5rem;
}
.prov-tile-logo img { max-width: 100%; height: auto; }
.prov-tile h2 { font-size: var(--step-1); line-height: 1.2; }
.prov-tile .muted { font-size: 0.83rem; line-height: 1.5; }
.prov-tile-nums { font-size: 0.85rem; color: var(--muted); margin-top: auto; padding-top: 0.5rem; }
.prov-tile-nums b { color: var(--fg); }
.prov-tile-cta { color: var(--accent); font-weight: 700; font-size: 0.87rem; }
.prov-tile-link { position: absolute; inset: 0; z-index: 2; }
.prov-head h2 { font-size: var(--step-2); line-height: 1.2; }
.prov-head .muted { font-size: 0.87rem; margin-top: 0.2rem; }
.prov-site { color: var(--accent); font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.prov-site:hover { text-decoration: underline; }
.prov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.7rem; margin: 1.3rem 0; }
.prov-stats > div { background: var(--bg); border-radius: 12px; padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.prov-stats b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.prov-stats span { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.prov-about { max-width: 78ch; }
.prov-about h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.prov-about p { font-size: 0.95rem; }
.slots-cat-title { font-size: var(--step-2); margin-bottom: 0.3rem; }

.slots-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.slots-filters input, .slots-filters select {
  padding: 0.7rem 0.9rem;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 0.9rem;
}
.slots-filters input { flex: 1; min-width: 12rem; }
.slots-filters input:focus-visible, .slots-filters select:focus-visible { outline: 2px solid var(--accent); }
.slots-filters .sim-btn { width: auto; padding: 0.7rem 1.4rem; font-size: 0.9rem; }
.slots-count { margin-bottom: 1.1rem; }
.slots-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); }
.slots-more { display: flex; justify-content: center; margin-top: 1.8rem; }
.slots-more .sim-btn { width: auto; padding: 0.8rem 2rem; text-decoration: none; display: inline-block; }

/* Карточка слота поверх готовой обложки */
.slot-card { background: var(--surface); }
.slot-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-card-link { position: absolute; inset: 0; z-index: 2; }
.slot-card-link span { position: absolute; left: -9999px; }
.slot-demo-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgb(74 222 128 / 0.9);
  color: #062b12;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.slot-card-meta {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 0.25rem 0.5rem;
  border-radius: 7px;
  background: rgb(0 6 30 / 0.62);
  backdrop-filter: blur(5px);
  font-size: 0.66rem;
  line-height: 1.25;
}
.slot-card-meta b { font-size: 0.72rem; }
.slot-card-meta span { color: rgb(255 255 255 / 0.7); }

/* Страница игры */
.slot-meta { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.slot-meta a { color: var(--accent); text-decoration: none; font-weight: 600; }
.slot-demo { margin: 1.6rem 0 1.2rem; }
.slot-demo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.slot-demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .slot-demo-frame { aspect-ratio: 3 / 4; } }

/* Кнопка «на весь экран»: поверх плеера, справа сверху */
.slot-fs {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 10px;
  background: rgba(4, 10, 34, 0.72);
  color: #fff;
  font: 600 0.78rem/1 inherit;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.16s ease, transform 0.16s ease;
}
.slot-fs:hover { background: rgba(4, 10, 34, 0.9); transform: translateY(-1px); }
.slot-fs svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.slot-fs > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.slot-fs .slot-fs-off { display: none; }
/* На узких экранах подпись убираем — остаётся только иконка */
@media (max-width: 560px) { .slot-fs b { display: none; } .slot-fs { padding: 0.5rem; } }

/* Штатный полноэкранный режим */
.slot-demo-frame:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; }
.slot-demo-frame:fullscreen .slot-fs-on { display: none; }
.slot-demo-frame:fullscreen .slot-fs-off { display: inline-flex; }

/* Запасной режим для iOS Safari: там Fullscreen API на блоках не работает,
   поэтому разворачиваем плеер на всё окно средствами CSS */
.slot-demo-frame.is-fs {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  aspect-ratio: auto;
  border-radius: 0;
  z-index: 200;
}
.slot-demo-frame.is-fs .slot-fs-on { display: none; }
.slot-demo-frame.is-fs .slot-fs-off { display: inline-flex; }
body.fs-lock { overflow: hidden; }
.slot-demo-note { font-size: 0.82rem; line-height: 1.6; margin-top: 0.7rem; }
.slot-demo-note a { color: var(--accent); }
.slot-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.6rem 0 0.5rem; }
.slot-actions .sim-btn { width: auto; padding: 0.8rem 1.6rem; text-decoration: none; display: inline-block; }
.slot-actions .muted { font-size: 0.85rem; max-width: 34ch; line-height: 1.5; }

/* ============ Страница расширения ============ */
.ext-cta { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin: 1.8rem 0 2.4rem; }
.ext-cta .muted { font-size: 0.85rem; }
.ext-dl {
  display: inline-block;
  padding: 0.95rem 2rem;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #7c5cfa);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: 0 14px 38px rgb(91 124 250 / 0.32);
  transition: transform 0.15s, filter 0.15s;
}
.ext-dl:hover { transform: translateY(-2px); filter: brightness(1.08); }

.ext-block { margin-top: 3rem; }
.ext-block > h2, .ext-demo > h2 { font-size: var(--step-1); margin-bottom: 0.7rem; }

/* Интерактивная демка барабанов */
.ext-demo { margin-top: 2.5rem; background: var(--surface); border-radius: var(--radius); padding: 1.4rem; }
.ext-reels { display: flex; gap: 0.6rem; justify-content: center; margin: 1.2rem 0 1rem; transition: filter 0.2s; }
.ext-reels.blur { filter: blur(1.5px); }
.ext-reel { width: 74px; height: 192px; overflow: hidden; background: var(--bg); border-radius: 12px; }
.ext-strip { display: flex; flex-direction: column; will-change: transform; }
.ext-strip span { height: 64px; display: flex; align-items: center; justify-content: center; font-size: 34px; line-height: 1; }
.ext-demo-ctl { display: flex; align-items: center; gap: 1rem; }
.ext-demo-ctl input[type='range'] {
  flex: 1;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #7c5cfa);
  outline: none;
  cursor: pointer;
}
.ext-demo-ctl input[type='range']::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 10px rgb(91 124 250 / 0.5);
}
.ext-demo-ctl output { min-width: 4.6rem; text-align: right; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* Шаги установки */
.ext-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 0.7rem; padding: 0; }
.ext-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.3rem 0.9rem;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}
.ext-steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  width: 2.1rem; height: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.9rem;
}
.ext-steps strong { align-self: center; font-size: 1rem; }
.ext-steps span { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.ext-steps code { font-family: var(--mono); font-size: 0.85em; background: var(--bg); padding: 0.1em 0.45em; border-radius: 6px; color: var(--fg); }

.ext-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.ext-feature { background: var(--surface); border-radius: 12px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.ext-feature strong { font-size: 0.97rem; }
.ext-feature span { color: var(--muted); font-size: 0.87rem; line-height: 1.55; }

.ext-provs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0; }
.ext-prov { background: var(--surface); border-radius: 8px; padding: 0.4rem 0.8rem; font-size: 0.85rem; font-weight: 600; }
.ext-provnote { font-size: 0.85rem; line-height: 1.6; }

.ext-safety { background: var(--surface); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.ext-safety h2 { margin-bottom: 0.6rem; }
.ext-safety p { line-height: 1.7; max-width: 70ch; }

/* ============ Проверка лицензий ============ */
.lic-form { display: flex; gap: 0.75rem; margin: 1.6rem 0; flex-wrap: wrap; }
.lic-form input {
  flex: 1;
  min-width: 15rem;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
}
.lic-form input:focus-visible { outline: 2px solid var(--accent); }
.lic-form .sim-btn { width: auto; }
.lic-results { display: flex; flex-direction: column; gap: 0.9rem; }
.lic-count { margin-bottom: 0.2rem; }
.lic-nothing { background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.3rem; line-height: 1.6; }
.lic-brandnote {
  background: rgb(251 191 36 / 0.09);
  border-left: 3px solid #fbbf24;
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  line-height: 1.6;
  font-size: 0.92rem;
}
.lic-brandnote b { color: #fbbf24; font-family: var(--mono); font-size: 0.9em; }
.lic-card { background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.lic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.lic-head h3 { font-size: var(--step-1); line-height: 1.25; }
.lic-badge { font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 99px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
.lic-badge.ok { color: #4ade80; background: rgb(74 222 128 / 0.12); }
.lic-badge.bad { color: #f87171; background: rgb(248 113 113 / 0.12); }
.lic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.8rem 1.2rem; }
.lic-grid dt, .lic-domains dt { color: var(--muted); font-size: 0.75rem; margin-bottom: 0.15rem; }
.lic-grid dd { margin: 0; font-weight: 600; font-size: 0.95rem; }
.lic-grid .mono { font-family: var(--mono); font-size: 0.85rem; font-weight: 400; }
.lic-warn { color: #fbbf24; font-weight: 700; font-size: 0.82rem; white-space: nowrap; }
.lic-domains { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgb(255 255 255 / 0.07); }
.lic-domains > div { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.lic-dom { background: var(--bg); border-radius: 7px; padding: 0.25rem 0.6rem; font-size: 0.82rem; font-family: var(--mono); }
.lic-verify { display: inline-block; margin-top: 1rem; color: var(--accent); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.lic-verify:hover { text-decoration: underline; }
.lic-others { margin-top: 3rem; }
.lic-others h2 { font-size: var(--step-1); margin-bottom: 1rem; }
.lic-others-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.lic-other { display: flex; flex-direction: column; gap: 0.35rem; background: var(--surface); border-radius: 12px; padding: 1rem 1.15rem; text-decoration: none; color: var(--fg); transition: background 0.15s; }
.lic-other:hover { background: var(--surface-hi); }
.lic-other span { color: var(--muted); font-size: 0.83rem; line-height: 1.5; }

.sim-seo { margin-top: 3rem; }
.faq-item { background: var(--surface); border-radius: 10px; padding: 0.95rem 1.15rem; }
.faq-item + .faq-item { margin-top: 0.6rem; }
.faq-item summary { cursor: pointer; font-weight: 700; list-style-position: outside; }
.faq-item summary:hover { color: var(--accent); }
.faq-item p { margin-top: 0.7rem; }
@media (max-width: 800px) {
  .sim-panel { grid-template-columns: 1fr 1fr; }
  .sim-run-wrap { grid-column: 1 / -1; }
}

/* Секция статей на главной — как лобби слотов у duel:
   вторая строка подрезана и уходит в фон, поверх — кнопка «все статьи» */
.home-posts { position: relative; container-type: inline-size; }
.home-posts .grid-posts { grid-template-columns: repeat(4, 1fr); }
.home-posts-more .grid-posts {
  overflow: hidden;
  /* запас по краям, чтобы ховер-увеличение карточек не обрезалось рамкой overflow */
  padding: 12px 12px 0;
  margin: -12px -12px 0;
  max-height: calc((100cqw - 3 * var(--gap)) / 4 * 1.25 * 1.55 + var(--gap) + 12px);
}
/* Подрезанный нижний ряд — декорация: не ловит ни клики, ни ховер */
.home-posts-more .card-slot:nth-child(n + 5) { pointer-events: none; }
.home-posts-more::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 46%;
  z-index: 1; /* поверх заголовков карточек (у них тоже z-index: 1, но оверлей позже в DOM) */
  background: linear-gradient(180deg, rgb(0 10 47 / 0), var(--bg) 84%);
  pointer-events: none;
}
.btn-all {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.45);
}
.btn-all:hover { filter: brightness(1.12); }
/* Статей мало — сетка не подрезана, кнопка просто стоит под ней */
.btn-all-static { position: static; transform: none; display: block; width: fit-content; margin: 1.6rem auto 0; box-shadow: none; }

@media (max-width: 1000px) {
  .home-posts .grid-posts { grid-template-columns: repeat(3, 1fr); }
  .home-posts-more .grid-posts { max-height: calc((100cqw - 2 * var(--gap)) / 3 * 1.25 * 1.55 + var(--gap) + 12px); }
  .home-posts-more .card-slot:nth-child(n + 4) { pointer-events: none; }
}
@media (max-width: 640px) {
  .home-posts .grid-posts { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .home-posts-more .grid-posts { max-height: calc((100cqw - 0.75rem) / 2 * 1.25 * 1.5 + 0.75rem + 12px); }
  .home-posts-more .card-slot:nth-child(n + 3) { pointer-events: none; }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--surface);
  transition: background 0.18s, transform 0.18s;
}
.card:hover { background: var(--surface-hi); transform: translateY(-2px); }
.card time { color: var(--muted); font-size: var(--step--1); }
.card-title { font-size: var(--step-1); }
.card-title a { text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0; }
.card p {
  color: var(--muted);
  font-size: var(--step--1);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Статья ============ */
.article { padding-block: calc(var(--section) * 0.55) var(--section); }
.crumbs { font-size: var(--step--1); color: var(--muted); display: flex; gap: 0.5rem; margin-bottom: 2.25rem; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.article-head h1 { font-size: var(--step-3); margin-bottom: 1rem; max-width: 26ch; }
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; color: var(--muted); font-size: var(--step--1); margin-bottom: 2.5rem; }

/* ---- Оглавление длинной статьи ----
   На десктопе — липкая колонка слева, на телефоне уезжает наверх и сворачивается
   в горизонтальную ленту, чтобы не отжимать текст на пол-экрана. */
.article-cols {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  min-width: 0;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.toc { position: sticky; top: 1.5rem; }
.toc nav { display: flex; flex-direction: column; gap: 0.15rem; }
.toc a {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: color 0.15s, background 0.15s;
}
.toc a:hover { color: var(--fg); }
/* активный раздел подсвечивается заливкой — как пункт меню у соседних страниц */
.toc a[aria-current='true'] { color: var(--fg); background: var(--surface-hi); font-weight: 600; }
/* заголовок не должен прятаться под липкую шапку при переходе по якорю */
.prose h2, .prose h3 { scroll-margin-top: 5rem; }
/* На мобильных над текстом две липкие полосы — шапка и лента оглавления,
   поэтому запас под якорь больше */
@media (max-width: 900px) {
  .prose h2, .prose h3 { scroll-margin-top: calc(var(--header-h, 66px) + 4rem); }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  /* именно minmax(0, 1fr): дорожка 1fr не умеет быть уже своего содержимого,
     и широкая таблица распирала всю страницу вместе с макетом */
  .article-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  /* На телефоне список превращается в ленту вкладок и прилипает к верху:
     на длинной статье оглавление должно оставаться под рукой, а не уезжать.
     Фон обязателен — иначе текст просвечивает под лентой при прокрутке. */
  .toc {
    position: sticky;
    top: var(--header-h, 66px);
    z-index: 30;
    margin-inline: calc(-1 * clamp(0.5rem, 2vw, 1rem));
    padding: 0.5rem clamp(0.5rem, 2vw, 1rem);
    background: linear-gradient(180deg, var(--bg) 72%, transparent);
  }
  /* Подпись «Содержание» на телефоне лишняя — лента говорит сама за себя */
  .toc-title { display: none; }
  /* Вложенность в ленте не показываем: полоска слева ломает горизонтальный ряд */
  .toc a.toc-sub { margin-left: 0; padding-left: 0.9rem; border-left: 0; }
  .toc nav {
    flex-direction: row;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 12px;
    background: var(--surface);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .toc nav::-webkit-scrollbar { display: none; }
  .toc a {
    white-space: nowrap;
    min-height: 2.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
  }
}

/* ============ Проза ============ */
/* Ширина строки ограничена для читабельности, левый край общий со всем сайтом.
   Меряем в em, а не в ch: единица ch считается по ширине нуля, а у TT Interphases
   он очень широкий — 70ch давали 93 символа в строке вместо 70. */
.prose {
  max-width: 36em;
  line-height: 1.72;
  color: rgb(238 241 251 / 0.9); /* чистый белый на тёмно-синем «звенит», чуть приглушаем */
}
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; color: var(--fg); line-height: 1.25; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; color: var(--fg); line-height: 1.3; }
.prose strong { color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.45em; }
/* Ссылки без подчёркивания: цвет плюс насыщенность и так их выделяют,
   а сплошные подчёркивания рвут строку. Подчёркивание — на наведении. */
.prose a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}
.prose a:hover { color: #8aa2ff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:focus-visible { text-decoration: underline; }
/* Картинки не трогаем: их ширину автор задаёт сам ручкой в редакторе.
   Таблица выпускается шире колонки текста — правило ниже, рядом с остальными
   табличными стилями, иначе width:100% оттуда перебивает его по порядку. */
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1.2em; color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--surface); padding: 0.15em 0.45em; border-radius: 6px; }
.prose pre { background: var(--surface); border-radius: var(--radius); padding: 1.1em 1.3em; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); cursor: zoom-in; }

/* Лайтбокс: клик по картинке в статье — увеличение на весь экран */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 3vh 3vw;
  background: rgb(0 4 22 / 0.93);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
  animation: lightbox-in 0.18s ease;
}
.lightbox img { max-width: 100%; max-height: 94vh; width: auto; height: auto; border-radius: var(--radius); box-shadow: 0 30px 90px rgb(0 0 0 / 0.55); }
@keyframes lightbox-in { from { opacity: 0; } }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: var(--step--1); }
/* Раньше таблица «выпускалась» шире колонки через 100vw. В макете с боковым меню
   100vw — это вся ширина окна, а не колонки контента, поэтому таблица вылезала
   на десктопе и давала горизонтальный скролл на мобильных. Держим по тексту. */
.prose > table { width: 100%; }
.prose th { background: var(--surface); text-align: left; }
.prose th, .prose td { padding: 0.6em 0.9em; border-bottom: 1px solid rgb(255 255 255 / 0.07); }
.prose hr { border: 0; height: 1px; background: rgb(255 255 255 / 0.08); }

/* ============ Карточка автора ============ */
.author-profile { display: flex; gap: 1.5rem; align-items: center; margin: 1.75rem 0 2.25rem; }
.author-photo {
  position: relative;
  width: 132px;
  height: 132px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--surface-hi), 0 8px 30px rgb(0 0 0 / 0.4);
}
.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* Прозрачный слой поверх: правый клик и перетаскивание не попадают в <img> */
.author-photo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; }
.author-profile h2 { margin: 0 0 0.4rem; }
.author-role { color: var(--muted); font-size: var(--step--1); margin: 0; }
@media (max-width: 700px) {
  .author-profile { flex-direction: column; text-align: center; gap: 1rem; }
}

/* Ссылка на автора в мете статьи */
.meta .author-link { color: var(--fg); text-decoration: none; font-weight: 600; }
.meta .author-link:hover { color: var(--accent); }

/* ============ Футер ============ */
.site-footer { margin-top: var(--section); padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: calc(var(--gap) * 1.5) 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.footer-head { font-weight: 700; font-size: var(--step--1); margin-bottom: 0.3rem; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: var(--step--1); }
.footer-col a:hover { color: var(--fg); }
.footer-legal { color: var(--muted); font-size: 0.8rem; line-height: 1.6; display: flex; flex-direction: column; gap: 0.8rem; }

@media (max-width: 700px) {
  /* Блоки в два столбца вместо одной колонки вниз */
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: calc(var(--gap) * 1.4) 1.25rem; }
}

/* ============ 404 ============ */
.error-page { padding-block: var(--section); text-align: center; }
.error-page h1 { font-size: var(--step-4); }
.error-page p { color: var(--muted); margin-top: 1rem; }
.error-page a { color: var(--accent); }


/* График в статье: инлайновый SVG, без библиотек и скриптов */
.prose > .chart {
  margin: 1.6em 0;
  padding: 1.1rem 1.1rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #0b1a4c 0%, #060f36 100%);
  width: 100%;
}
.prose > .chart svg { width: 100%; height: auto; }
.prose > .chart figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ============ Калькулятор в тексте статьи ============ */
/* Блок выходит из потока .prose: у него своя сетка и свой фон, но ширину
   держит по колонке текста — иначе на мобильных снова поедет весь макет. */
.prose > .calc {
  width: 100%;
  margin: 2rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: 14px;
  background: linear-gradient(180deg, #0b1a4c 0%, #060f36 100%);
  font-size: var(--step--1);
}
.calc-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0.85rem; }
.calc-in label { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.calc-in label > span { color: var(--muted); font-weight: 600; font-size: 0.82rem; }
.calc-in input, .calc-in select {
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 9px;
  background: rgb(0 6 30 / 0.55);
  color: var(--fg);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.calc-in input:focus-visible, .calc-in select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.calc-out { margin-top: 1.35rem; }
.calc-cap { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.calc-lvl { margin: 0.15rem 0 0.7rem; font-size: var(--step-2); font-weight: 700; line-height: 1.15; }
.calc-bar { height: 8px; border-radius: 99px; background: rgb(255 255 255 / 0.08); overflow: hidden; }
.calc-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5b7cfa, #a78bfa); transition: width 0.18s ease-out; }
.calc-note { margin: 0.6rem 0 0; color: var(--muted); line-height: 1.5; }
.calc-note b { color: var(--fg); font-variant-numeric: tabular-nums; }

.calc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.85rem; margin-top: 1.2rem; }
.calc-kpis > div {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.07);
  border-radius: 11px;
  background: rgb(255 255 255 / 0.03);
}
.calc-kpis span { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.calc-kpis strong { display: block; margin: 0.2rem 0 0.15rem; font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.calc-kpis em { display: block; color: var(--muted); font-size: 0.72rem; font-style: normal; line-height: 1.4; }

.calc-tiers { width: 100%; margin-top: 1.35rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-tiers th, .calc-tiers td { padding: 0.42em 0.6em; text-align: left; border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.calc-tiers th { color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.calc-tiers td:not(:first-child) { color: var(--muted); }
.calc-tiers tr.is-you td { background: rgb(91 124 250 / 0.14); color: var(--fg); font-weight: 600; }
.calc-tiers tr.is-you td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.calc-you {
  margin-left: 0.5em;
  padding: 0.1em 0.45em;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}
@media (max-width: 520px) {
  .calc-tiers th:last-child, .calc-tiers td:last-child { display: none; }
}

/* ============ Полная таблица выплат (Mines) ============ */
/* 25 колонок в колонку текста не влезают, поэтому таблица едет вбок внутри
   своего контейнера — страница при этом горизонтально не скроллится. */
.prose > .paytable { width: 100%; margin: 2rem 0; }
.paytable-hint { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.78rem; }
.paytable-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: 12px;
  background: linear-gradient(180deg, #0b1a4c 0%, #060f36 100%);
}
.paytable-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.paytable table { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; font-size: 0.74rem; }
.paytable th, .paytable td { padding: 0.34em 0.55em; text-align: right; white-space: nowrap; border-bottom: 1px solid rgb(255 255 255 / 0.05); }
.paytable thead th { color: var(--muted); font-weight: 700; background: rgb(255 255 255 / 0.04); }
/* Первая колонка залипает при прокрутке: без неё непонятно, какая это строка */
.paytable tbody th, .paytable thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  color: var(--fg);
  font-weight: 700;
  background: #0a1747;
  box-shadow: 1px 0 0 rgb(255 255 255 / 0.09);
}
.paytable thead th:first-child { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.2; }
.paytable thead th:first-child span { color: var(--fg); }
.paytable thead th:first-child b { color: var(--muted); font-weight: 600; font-size: 0.68rem; }
.paytable td.off { background: rgb(255 255 255 / 0.02); }
.paytable tbody tr:hover td:not(.off) { background: rgb(91 124 250 / 0.1); }
.paytable figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Калькулятор рейкбека: таблица с полями ввода прямо в строках ---- */
.calc-duel .paytable-scroll { border: 0; background: none; }
.calc-rb { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.calc-rb th, .calc-rb td { padding: 0.5em 0.45em; text-align: right; border-bottom: 1px solid rgb(255 255 255 / 0.07); white-space: nowrap; }
.calc-rb thead th { color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.calc-rb thead th:first-child, .calc-rb tbody th { text-align: left; }
.calc-rb tbody th { font-weight: 600; white-space: normal; min-width: 7rem; padding-left: 0; }
.calc-rb tbody th em { display: block; color: var(--muted); font-style: normal; font-weight: 400; font-size: 0.72rem; line-height: 1.35; }
.calc-rb input, .calc-rb select {
  width: 5.4rem;
  padding: 0.4rem 0.4rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 8px;
  background: rgb(0 6 30 / 0.55);
  color: var(--fg);
  font: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.calc-rb select { width: auto; text-align: left; }
.calc-rb input:focus-visible, .calc-rb select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-rb [data-back] { color: #7fd8a4; font-weight: 700; }
.calc-duel .calc-kpis { margin-top: 1.2rem; }

/* ============ Просмотры и лайки под статьёй ============ */
/* Числа приходят запросом, поэтому место под них резервируем заранее —
   иначе блок дёргается при загрузке и портит CLS. */
.pulse {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.pulse.is-ready { opacity: 1; }
.article-cols .pulse { grid-column: 2; }

.pulse svg { width: 17px; height: 17px; flex: none; fill: currentColor; }
.pulse b { font-variant-numeric: tabular-nums; min-width: 1.4ch; }

.pulse-views {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  font-size: var(--step--1);
}
.pulse-views b { color: var(--fg); font-weight: 700; }

.pulse-like {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.5rem 1rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 99px;
  background: rgb(255 255 255 / 0.03);
  color: var(--muted);
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.18s;
}
.pulse-like b { color: var(--fg); font-weight: 700; }
.pulse-like:hover { border-color: rgb(255 255 255 / 0.28); background: rgb(255 255 255 / 0.06); color: var(--fg); }
.pulse-like svg { transition: transform 0.2s ease; }

/* Отмеченный материал: сердце заливается, кнопка подсвечивается */
.pulse-like.is-on {
  border-color: color-mix(in srgb, #ff5d7a 55%, transparent);
  background: color-mix(in srgb, #ff5d7a 14%, transparent);
  color: #ff8ea3;
}
.pulse-like.is-on b { color: #ffd9e0; }
.pulse-like.is-on svg { color: #ff5d7a; }

/* Короткий отклик на нажатие — сердце подпрыгивает */
.pulse-like.is-pop svg { animation: pulse-pop 0.32s ease; }
@keyframes pulse-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  70% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-like.is-pop svg { animation: none; }
}
@media (max-width: 520px) {
  .pulse-views span { display: none; }
}

/* ---- Оглавление статьи ---- */
.toc-title {
  margin: 0 0 0.5rem;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Заголовки третьего уровня — со сдвигом и полоской, чтобы вложенность читалась */
.toc a.toc-sub {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgb(255 255 255 / 0.1);
  min-height: 2.1rem;
  font-size: 0.84rem;
}
.toc a.toc-sub[aria-current='true'] { border-left-color: var(--accent); }

/* ---- Кнопка «наверх» ---- */
/* Появляется, когда начало страницы ушло из виду. Позиция fixed, поэтому
   на разметку не влияет и CLS не портит. */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  color: var(--fg);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.15s, background 0.15s;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--surface-hi); }
.to-top svg { width: 20px; height: 20px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity 0.2s ease; transform: none; }
}

/* ---- Видео в статьях ---- */
/* Место под плеер держит aspect-ratio из реальных размеров ролика: постер
   подгружается позже текста и без этого сдвинул бы всю статью вниз (CLS). */
.vid { margin: 1.8rem 0; }
.vid-frame {
  position: relative;
  aspect-ratio: var(--ratio, 16 / 9);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}
.vid-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Оверлей поверх постера. Показывает его скрипт — если он не отработал,
   останется обычное <video controls> с постером, и это тоже рабочий плеер.
   Правило [hidden] обязательно: display: grid перебивает скрытие браузером. */
.vid-play[hidden] { display: none; }
.vid-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  /* Затемнение к краям: в центре постер виден, кнопка не тонет в картинке */
  background: radial-gradient(65% 65% at 50% 50%, rgb(0 8 38 / 0.22), rgb(0 8 38 / 0.58));
  transition: background 0.25s ease;
}
.vid-play-btn {
  display: grid;
  place-items: center;
  width: clamp(58px, 12vw, 82px);
  aspect-ratio: 1;
  border-radius: 50%;
  /* Блик сверху слева плюс диагональный градиент — круг читается объёмным,
     а не плоской заливкой */
  background:
    radial-gradient(118% 118% at 32% 20%, rgb(255 255 255 / 0.45), rgb(255 255 255 / 0) 58%),
    linear-gradient(150deg, #8ea6ff 0%, #4f6ff0 52%, #2f45c9 100%);
  /* Ореолы сделаны spread-тенями, а не псевдоэлементом: тот пришлось бы
     уводить за кнопку через z-index, и он провалился бы под затемнение */
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.34),
    inset 0 -7px 16px rgb(0 0 0 / 0.2),
    0 0 0 9px rgb(255 255 255 / 0.07),
    0 0 0 10px rgb(255 255 255 / 0.13),
    0 14px 34px rgb(4 10 40 / 0.5);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.22s ease;
}
.vid-play-btn svg {
  width: 38%;
  height: 38%;
  fill: #fff;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgb(4 10 40 / 0.35));
}
/* Длительность — как на превью в видеосервисах: угол кадра, а не подпись
   под кнопкой. Цифры понятны на всех пяти языках без перевода. */
.vid-time {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  padding: 0.16rem 0.46rem;
  border-radius: 7px;
  background: rgb(0 0 0 / 0.68);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
/* Видео уже играет — оверлей уходит, даже если его не успели удалить
   (например, воспроизведение запустили с клавиатуры мимо кнопки) */
.vid.is-on .vid-play { display: none; }
.vid-play:hover, .vid-play:focus-visible {
  background: radial-gradient(65% 65% at 50% 50%, rgb(0 8 38 / 0.1), rgb(0 8 38 / 0.5));
}
.vid-play:hover .vid-play-btn,
.vid-play:focus-visible .vid-play-btn {
  transform: scale(1.06);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.5),
    inset 0 -7px 16px rgb(0 0 0 / 0.18),
    0 0 0 14px rgb(255 255 255 / 0.09),
    0 0 0 15px rgb(255 255 255 / 0.16),
    0 18px 42px rgb(4 10 40 / 0.6);
}
.vid-play:active .vid-play-btn { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .vid-play, .vid-play-btn { transition: none; }
  .vid-play:hover .vid-play-btn, .vid-play:focus-visible .vid-play-btn { transform: none; }
}
/* Сгенерировано scripts/build-provider-sprite.mjs — руками не править */
.prov-ico {
  flex: none;
  width: 34px;
  height: 17px;
  background-image: url('/assets/img/providers/sprite.2coF-w8tao.png');
  background-size: 34px auto;
  background-repeat: no-repeat;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.nav-prov:hover .prov-ico, .nav-prov[aria-current] .prov-ico { opacity: 1; }
.prov-ico-pragmatic-play { background-position: 0 -0px; }
.prov-ico-pg-soft { background-position: 0 -17px; }
.prov-ico-playtech { background-position: 0 -34px; }
.prov-ico-spribe { background-position: 0 -51px; }
.prov-ico-jili { background-position: 0 -68px; }
.prov-ico-hacksaw-gaming { background-position: 0 -85px; }
.prov-ico-bgaming { background-position: 0 -102px; }
.prov-ico-playn-go { background-position: 0 -119px; }
.prov-ico-netent { background-position: 0 -136px; }
.prov-ico-novomatic { background-position: 0 -153px; }
@font-face{font-family:'TT Interphases Pro';src:url('/assets/fonts/TT-Interphases-Pro-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;}@font-face{font-family:'TT Interphases Pro';src:url('/assets/fonts/TT-Interphases-Pro-Medium.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap;}@font-face{font-family:'TT Interphases Pro';src:url('/assets/fonts/TT-Interphases-Pro-DemiBold.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap;}@font-face{font-family:'TT Interphases Pro';src:url('/assets/fonts/TT-Interphases-Pro-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;}:root{--font:'TT Interphases Pro',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;}