/* Шаблон 1 "Neon Arcade", из templates/originals/1-neon-arcade.html.
   Шапка, первый экран (баннер + суконная панель с раздачей карт), текстовые разделы, виджеты, которые
   может заполнить документ (факты, портал игр, провайдеры, акции, шаги, отзывы), FAQ и футер.
   Цвета, шрифты и формы не изменены по сравнению с макетом. */
:root {
  --bg: #181828;
  --bg-2: #1f1f35;
  --card: #26264a;
  --line: #34345a;
  --text: #e4e4f2;
  --muted: #9a9ab8;
  --blue: #57cdec;
  --blue-dk: #1e75a7;
  --orange: #fca127;
  --hot: #fc5821;
  --yellow: #fdef46;
  --win: #4ade80;
  --f-display: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  --f-body: Verdana, Tahoma, Geneva, sans-serif;
  --r: 16px;
  /* производные оттенки: вынесены в переменные, чтобы цветовая схема (schemes/*.css) меняла их вместе с основными */
  --deep: #141424;
  --header-bg: rgba(24, 24, 40, .85);
  --footer-bg: #13131f;
  --panel: #1b1b30;
  --tile: #1b1b2e;
  --tile-dark: #11111c;
  --logo-box: #17172c;
  --chip: #3a3a55;
  --star-off: #4a4a6a;
  --felt-1: #2a6292;
  --felt-2: #1a3d62;
  --felt-3: #132c48;
  --promo-2: #2a2a6a;
  --promo-text: #d6e9f6;
  --lead: #d3dcef;
  --on-accent: #2a1400;
  --text-dim: rgba(228, 228, 242, .7);
  --text-ring: rgba(228, 228, 242, .85);
  --blue-ring: rgba(87, 205, 236, .25);
  --blue-tint: rgba(87, 205, 236, .15);
  --orange-ring: rgba(252, 161, 39, .35);
  --orange-glow: rgba(252, 161, 39, .6);
  --yellow-tint: rgba(253, 239, 70, .1);
  --yellow-ring: rgba(253, 239, 70, .3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { color: var(--text); font: 14px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1200px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(24px, 3vw, 32px); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; white-space: nowrap;
  font: 800 15px var(--f-body); padding: 12px 22px; border-radius: 999px; text-decoration: none !important; transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--hot)); color: #ffffff; box-shadow: 0 8px 24px -8px var(--hot); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-lg { font-size: 17px; padding: 15px 30px; }

/* шапка */
header { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
/* логотип | меню | кнопка: боковые колонки делят свободное место поровну, поэтому меню стоит по центру шапки;
   когда места не хватает, первой сжимается колонка меню, и site.js прячет меню за бургер */
.bar { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) minmax(max-content, 1fr); align-items: center; column-gap: 24px; height: 68px; }
.bar > .logo { grid-column: 1; justify-self: start; }
.logo { display: inline-flex; align-items: center; flex: none; }
/* Текстовый логотип, как в исходном дизайне: бренд в двух цветах. */
.logo-text { display: inline-block; font: 800 28px var(--f-display); letter-spacing: -.5px; white-space: nowrap; }
.logo-text:hover { text-decoration: none; }
.logo-text .l { color: var(--blue); }
.logo-text .j { color: var(--orange); }
nav.main { grid-column: 2; display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
nav.main a { color: var(--muted); font-weight: 700; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--text); background: var(--bg-2); text-decoration: none; }
.acts { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; }
.acts .btn { padding: 9px 18px; font-size: 14px; }
/* переключатель языков (только на сайте из нескольких языков): флажок и код языка, список открывается под шапкой */
.lang { position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  list-style: none; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); font: 800 13px var(--f-body); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { color: var(--muted); transition: transform .15s; }
.lang[open] summary svg { transform: rotate(180deg); }
.lang img { display: block; flex: none; width: 20px; height: 15px; border-radius: 3px; }
.lang ul { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 100%; margin: 0; padding: 6px; list-style: none;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .6); }
.lang a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font: 800 13px var(--f-body); }
.lang a:hover, .lang a[aria-current] { color: var(--text); background: var(--card); text-decoration: none; }
/* меню, которое не помещается в одну строку, прячется за бургер, как на телефонах (.compact ставит site.js) */
.bar.compact .burger { display: inline-grid; }
.bar.compact nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; overflow: visible;
  padding: 8px max(20px, env(safe-area-inset-left, 0px)) 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.bar.compact nav.main.open { display: flex; }
.burger { display: none; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 10px; cursor: pointer;
  color: var(--text); background: var(--bg-2); border: 1px solid var(--line); }

/* первый экран: суконная панель из макета */
.hero { padding-block: 28px 40px; }
.felt { position: relative; overflow: hidden; border-radius: 28px;
  background: radial-gradient(ellipse at 50% -10%, var(--felt-1), var(--felt-2) 55%, var(--felt-3));
  box-shadow: inset 0 0 0 1px var(--orange-ring), inset 0 0 0 12px var(--deep), inset 0 0 0 13px var(--blue-ring);
  padding: 56px clamp(24px, 5vw, 64px); }
.felt::before { content: ""; position: absolute; inset: 0; opacity: .25; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 4px 4px; }
.felt-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; }
.felt-in.solo { grid-template-columns: minmax(0, 1fr); }
.felt-copy { position: relative; max-width: 880px; }
.felt-copy .ctas { margin-top: 28px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 13px; color: var(--yellow); background: var(--yellow-tint);
  border: 1px solid var(--yellow-ring); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
/* ключевые факты в виде раздачи блэкджека: туз, валет и фишка, вместе дающие 21 */
.hand { position: relative; height: 320px; }
.pc { position: absolute; width: 46%; max-width: 190px; aspect-ratio: .7; border-radius: 14px; background: #f7f7fb; color: #22223a; padding: 0 12px;
  box-shadow: 0 20px 34px -14px rgba(0, 0, 0, .6); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  transition: transform .2s; }
.hand .pc:first-child { left: 0; top: 26px; transform: rotate(-8deg); }
.hand .pc.red { left: 44%; top: 6px; transform: rotate(6deg); }
.pc:hover { transform: translateY(-8px) rotate(0deg) !important; }
.pc.red { color: #d9411a; }
.pc b { font: 800 clamp(22px, 3vw, 34px) var(--f-display); line-height: 1; }
.pc small { font-size: 12px; line-height: 1.3; color: #6a6a88; margin-top: 6px; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.pc .ix { position: absolute; top: 10px; left: 12px; font: 800 18px/1 var(--f-display); text-align: center; }
.pc .ix i { display: block; font-style: normal; font-size: 14px; }
.pc .ix.br { top: auto; left: auto; bottom: 10px; right: 12px; transform: rotate(180deg); }
.chip48 { position: absolute; right: 2%; bottom: 0; width: 124px; aspect-ratio: 1; border-radius: 50%; background: var(--orange); color: var(--on-accent); padding: 0 14px;
  box-shadow: inset 0 0 0 7px var(--orange), inset 0 0 0 10px rgba(255, 255, 255, .7), 0 14px 26px -12px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.chip48 b { font: 800 20px/1.05 var(--f-display); }
.chip48 small { font-size: 11px; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.total { position: absolute; right: 6%; top: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--deep); color: var(--yellow); font: 800 20px var(--f-display); border: 2px solid var(--yellow); }
.updated { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.hero h1 { font-size: clamp(34px, 5.5vw, 64px); letter-spacing: -1px; }
.hero h1 .hl { color: var(--orange); }
.hero .lead { font-size: 17px; color: var(--lead); margin-top: 18px; }
.hero .lead p { margin: 0 0 10px; }
.hero .lead p:last-child { margin-bottom: 0; }

/* текстовые разделы из документов */
main > section { padding-block: 0 56px; }
.seo { color: var(--muted); }
.seo.txt h2 { color: var(--text); margin-bottom: 12px; }
.seo.txt h2:not(:first-child) { margin-top: 44px; }
.seo.txt h3 { color: var(--text); font-size: 19px; margin: 26px 0 8px; }
.seo.txt h4, .seo.txt h5, .seo.txt h6 { color: var(--text); font-size: 16px; margin: 20px 0 6px; }
.seo.txt p { margin: 0 0 10px; }
.seo.txt ol, .seo.txt ul { margin: 0 0 12px; padding-left: 20px; }
.seo.txt li { margin-bottom: 6px; }
.seo.txt li > ul, .seo.txt li > ol { margin: 6px 0 0; }
.seo.txt strong { color: var(--text); }
.seo.txt img { display: block; border-radius: 12px; }
.tbl { overflow-x: auto; margin: 12px 0 18px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14px; }
/* Таблицы из двух колонок помещаются на телефоне; более широкие сохраняют минимальную ширину и прокручиваются внутри .tbl. */
.tbl table:has(tr > :nth-child(3)) { min-width: 520px; }
.tbl th { text-align: left; color: var(--text); background: var(--bg-2); padding: 8px 12px; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* части раздела страницы: текст и виджеты */
.wrap > .part + .seo, .wrap > .seo + .part, .wrap > .part + .part { margin-top: 28px; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.sec-head .more { font-weight: 700; padding-block: 4px; }
.cta-line { margin: 18px 0; }

/* ключевые цифры */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.facts b { display: block; font: 800 28px var(--f-display); color: var(--blue); }
.facts span { color: var(--muted); font-size: 13px; }

/* портал игр: колонки блоков */
.retro { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: stretch; }
.retro.cols-3 { grid-template-columns: 240px minmax(0, 1fr) 250px; }
.retro .stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.box h3 { margin: 0; padding: 14px 18px 0; font: 800 12px var(--f-display); color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px;
  display: flex; align-items: center; gap: 8px; }
.box h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.box .in { padding: 12px 18px 18px; }
.box .in > * + * { margin-top: 10px; }
.note { margin: 0; font-size: 12px; color: var(--muted); }
.rjack { font: 800 clamp(22px, 2.4vw, 28px) var(--f-display); color: var(--yellow); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rwin { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
/* длинный список победителей прокручивается внутри своего блока, поэтому три колонки остаются одной высоты */
.rwin-wrap { max-height: 430px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
/* список победителей занимает всю оставшуюся высоту своего блока и прокручивается: под ним нет пустоты,
   а высоту колонки по-прежнему задают плитки игр */
.retro .stack > .box:last-child:has(> .in > .rwin-wrap) { display: flex; flex-direction: column; }
.retro .stack > .box:last-child:has(> .in > .rwin-wrap) > .in { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.retro .stack > .box:last-child > .in > .rwin-wrap { flex: 1 1 0; min-height: 276px; max-height: none; }
.rwin td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rwin tr:last-child td { border-bottom: 0; }
.rwin td:last-child { text-align: right; color: var(--win); font-weight: 800; padding-left: 8px; white-space: nowrap; }
.rwin .g { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.playbtns { display: flex; flex-direction: column; gap: 8px; }
.playbtns .btn { width: 100%; padding: 11px 16px; }
.seals { display: flex; flex-wrap: wrap; gap: 8px; }
.seal { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); }
.seal::before { content: "✓"; color: var(--win); font-weight: 800; }
.pays { display: flex; flex-wrap: wrap; gap: 6px; }
.pay { font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.tiers { display: flex; gap: 6px; flex-wrap: wrap; }
.tiers span { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); }
/* нумерованные вкладки над плитками игр */
.sfilter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.sfilter button { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 8px; cursor: pointer;
  font: 700 13px var(--f-body); color: var(--text); background: var(--deep); border: 2px solid var(--text-ring);
  transition: background .15s, border-color .15s, box-shadow .15s; }
.sfilter button:hover { border-color: var(--orange); }
.sfilter .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--chip); color: var(--text);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sfilter button[aria-selected="true"] { background: var(--hot); border-color: rgba(255, 255, 255, .9); color: #ffffff; box-shadow: 0 6px 18px -6px var(--hot); }
.sfilter button[aria-selected="true"] .n { background: var(--deep); }
/* плитки игр: цветной постер с названием поверх нижней части */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.retro.cols-3 .stack:nth-child(2) .rgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rgame { position: relative; display: block; padding: 4px; border-radius: 12px; background: var(--tile);
  border: 1px solid rgba(255, 255, 255, .1); color: #ffffff; text-decoration: none !important; transition: transform .2s, border-color .2s; }
.rgame:hover { transform: translateY(-3px); border-color: var(--orange-glow); }
.rgame .thumb { position: relative; display: grid; place-items: center; aspect-ratio: 8 / 7; border-radius: 9px; overflow: hidden;
  font-size: clamp(36px, 4vw, 52px); padding-bottom: 22%; color: rgba(255, 255, 255, .85);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .25), transparent 60%), var(--t); }
.rgame .thumb::before { content: "♠"; }
.rgame:nth-child(4n+2) .thumb::before { content: "♥"; }
.rgame:nth-child(4n+3) .thumb::before { content: "♦"; }
.rgame:nth-child(4n) .thumb::before { content: "♣"; }
.rgame .thumb::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(10, 10, 20, .85)); }
.rgame:nth-child(12n+1) .thumb { --t: linear-gradient(135deg, #7b2ff7, #f107a3); }
.rgame:nth-child(12n+2) .thumb { --t: linear-gradient(135deg, #fc5821, #fca127); }
.rgame:nth-child(12n+3) .thumb { --t: linear-gradient(135deg, #f6b40e, #b8400c); }
.rgame:nth-child(12n+4) .thumb { --t: linear-gradient(135deg, #16a34a, #84cc16); }
.rgame:nth-child(12n+5) .thumb { --t: linear-gradient(135deg, #854d0e, #eab308); }
.rgame:nth-child(12n+6) .thumb { --t: linear-gradient(135deg, #1f2937, #4b5563); }
.rgame:nth-child(12n+7) .thumb { --t: linear-gradient(135deg, #0e7490, #57cdec); }
.rgame:nth-child(12n+8) .thumb { --t: linear-gradient(135deg, #4c1d95, #8b5cf6); }
.rgame:nth-child(12n+9) .thumb { --t: linear-gradient(135deg, #9f1239, #fb7185); }
.rgame:nth-child(12n+10) .thumb { --t: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.rgame:nth-child(12n+11) .thumb { --t: linear-gradient(135deg, #991b1b, #ef4444); }
.rgame:nth-child(12n) .thumb { --t: linear-gradient(135deg, #065f46, #10b981); }
.rgame .hot { position: absolute; top: 8px; left: 8px; z-index: 1; font: 800 11px var(--f-body); padding: 2px 7px; border-radius: 6px; background: var(--hot); color: #ffffff; }
.rgame .cap { position: absolute; left: 4px; right: 4px; bottom: 12px; z-index: 1; text-align: center; padding: 0 6px; }
.rgame .cap b { display: block; font: 800 14px/1.2 var(--f-display); color: #ffffff; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
/* плитка с картинкой игры: на квадратной картинке название уже есть, поэтому подпись стоит под ней */
.rgame.pic { display: flex; flex-direction: column; }
.rgame.pic .thumb { aspect-ratio: 1; padding: 0; background: var(--tile-dark); }
.rgame.pic .thumb::before, .rgame.pic .thumb::after { content: none; }
.rgame.pic .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* незагрузившаяся картинка не должна выводить alt-текст поверх плитки: название есть в подписи ниже */
.rgame.pic .thumb img { font-size: 0; color: transparent; }
.rgame.pic .cap { position: static; flex: 1; display: grid; place-items: center; padding: 7px 4px 3px; }
.rgame.pic .cap b { font-size: 13px; text-shadow: none; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
/* колонки заканчиваются на одной линии: последний блок каждой колонки занимает оставшуюся высоту */
.retro .stack > .box:last-child { flex: 1; }
@media (min-width: 1001px) {
  .retro.cols-3 .stack:nth-child(2) .box { display: flex; flex-direction: column; }
  .retro.cols-3 .stack:nth-child(2) .in,
  .retro.cols-3 .stack:nth-child(2) .tabbed,
  .retro.cols-3 .stack:nth-child(2) .panel:not([hidden]) { flex: 1; display: flex; flex-direction: column; }
  /* плитки растягиваются на всю высоту колонки, только когда рядов хватает её заполнить (от 9 игр, как в макете);
     один-два ряда остаются своей высоты, иначе плитка вытягивается в столб */
  .retro.cols-3 .stack:nth-child(2) .rgrid { align-content: start; }
  .retro.cols-3 .stack:nth-child(2) .rgrid:has(.rgame:nth-child(9)) { flex: 1; grid-auto-rows: 1fr; }
  .retro.cols-3 .stack:nth-child(2) .rgame { display: flex; }
  .retro.cols-3 .stack:nth-child(2) .rgame .thumb { flex: 1; aspect-ratio: auto; min-height: 120px; }
  .retro.cols-3 .stack:nth-child(2) .rgame.pic { flex-direction: column; }
  .retro.cols-3 .stack:nth-child(2) .rgame.pic .thumb { flex: 0 0 auto; aspect-ratio: 1; min-height: 0; }
}

/* карусель провайдеров */
.prov { position: relative; }
.prov-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.prov-viewport::-webkit-scrollbar { display: none; }
.prov-row { display: flex; gap: 12px; }
/* карточки ряда равны по высоте самой высокой: подпись тянется до нижнего края, поэтому её фон цельный */
.prov-card { flex: 0 0 170px; display: flex; flex-direction: column; scroll-snap-align: start; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  text-decoration: none !important; color: var(--text); transition: transform .2s; }
.prov-card:hover { transform: translateY(-3px); }
.prov-card .logo-box { height: 86px; display: grid; place-items: center; padding: 8px; text-align: center; text-transform: uppercase;
  font: 800 17px/1.1 var(--f-display); letter-spacing: .5px; background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, .1), transparent 70%), var(--logo-box); }
.prov-card:nth-child(12n+1) .logo-box { color: #f97316; }
.prov-card:nth-child(12n+2) .logo-box { color: #e5e7eb; }
.prov-card:nth-child(12n+3) .logo-box { color: #22c55e; }
.prov-card:nth-child(12n+4) .logo-box { color: #3b82f6; }
.prov-card:nth-child(12n+5) .logo-box { color: #ef4444; }
.prov-card:nth-child(12n+6) .logo-box { color: #f59e0b; }
.prov-card:nth-child(12n+7) .logo-box { color: #a855f7; }
.prov-card:nth-child(12n+8) .logo-box { color: #f43f5e; }
.prov-card:nth-child(12n+9) .logo-box { color: #e5e7eb; }
.prov-card:nth-child(12n+10) .logo-box { color: #57cdec; }
.prov-card:nth-child(12n+11) .logo-box { color: #fbbf24; }
.prov-card:nth-child(12n) .logo-box { color: #34d399; }
.prov-card .nm { flex: 1; display: grid; place-items: center; text-align: center; font-size: 11px; font-weight: 700; padding: 7px; background: var(--bg-2); color: var(--muted); border-top: 1px solid var(--line); }
.prov-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); cursor: pointer; font-size: 18px; z-index: 1; }
.prov-nav.prev { left: -14px; }
.prov-nav.next { right: -14px; }
.prov-nav:disabled { opacity: .35; cursor: default; }

/* акции */
.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.promos:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.promo { border-radius: var(--r); padding: 26px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.promo.main { background: linear-gradient(135deg, var(--blue-dk), var(--promo-2)); border: 0; }
.promo .eyebrow { align-self: start; margin: 0; }
.promo h3 { font-size: 22px; }
.promo .big { font: 800 clamp(30px, 4vw, 44px)/1 var(--f-display); color: var(--yellow); }
.promo p { margin: 0; color: var(--muted); }
.promo.main p { color: var(--promo-text); }
.promo .btn { margin-top: auto; align-self: start; }

/* шаги и простые карточки */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.step, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-tint); color: var(--blue); font: 800 16px var(--f-display); margin-bottom: 12px; }
.step h3, .card h3 { font-size: 19px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card > * + * { margin-top: 10px; }
.card .note { font-size: 14px; }

/* оценки и отзывы */
.rate { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.rate-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.rate-top h2 { font-size: clamp(20px, 2.4vw, 26px); }
.rate-top h2::before { content: "★ "; color: var(--orange); }
.rate-top .cnt { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rate-sum { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: center; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 16px; }
.avg { text-align: center; }
.avg b { display: block; font: 800 44px/1 var(--f-display); color: var(--orange); }
.avg .stars { display: block; margin: 6px 0 4px; }
.avg small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.stars { color: var(--orange); letter-spacing: 2px; }
.stars .off { color: var(--star-off); }
.bars { display: flex; flex-direction: column; gap: 7px; }
.rbar { display: grid; grid-template-columns: 26px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.rbar .tr { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.rbar .tr svg { display: block; width: 100%; height: 100%; }
.rbar .tr rect { fill: var(--orange); }
.rbar span:last-child { text-align: right; }
.revs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rev { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; }
.rev-h { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.who { display: flex; gap: 10px; align-items: center; }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--on-accent); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; }
.who b { display: block; font-size: 14px; }
.who small { font-size: 11px; color: var(--muted); }
.rev-r { text-align: right; font-size: 13px; }
.rev-r b { display: block; color: var(--orange); font-size: 12px; }
.rev h3 { font-size: 15px; margin: 0 0 6px; font-family: var(--f-body); }
.rev-text p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.rev:not(.open) .rev-text p:first-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rev:not(.open) .rev-text p:not(:first-child) { display: none; }
.rev .more { margin-top: auto; align-self: start; padding: 8px 14px; font-size: 13px; border-radius: 8px; }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 800; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 22px; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding-bottom: 16px; color: var(--muted); }
.faq .answer p { margin: 0 0 8px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* футер */
/* нижний отступ оставляет место кнопке «наверх», чтобы она не закрывала строку с копирайтом */
footer { border-top: 1px solid var(--line); background: var(--footer-bg); padding-block: 40px 88px; font-size: 14px; }
.fgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; }
.fgrid.cols-0 { grid-template-columns: minmax(0, 1fr); }
.fgrid.cols-2 { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
.fgrid.cols-3 { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
.fgrid.cols-4 { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
.fgrid.cols-5 { grid-template-columns: minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)); }
.license { margin-top: 14px; color: var(--muted); font-size: 13px; }
.license p { margin: 0 0 8px; }
.links h2 { margin: 0 0 10px; font-size: 14px; color: var(--text); }
.links a, .links span { display: block; color: var(--muted); padding: 3px 0; }
.links a[aria-current="page"] { color: var(--text); }
.legal { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line);
  margin-top: 32px; padding-top: 20px; color: var(--muted); font-size: 12px; }
/* хлебные крошки на внутренних страницах, над первым экраном */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs li + li::before { content: "›"; opacity: .6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
/* организации: логотипы в один ряд над юридической строкой */
.orgs { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.orgs a { display: block; opacity: .8; transition: opacity .2s; }
.orgs a:hover { opacity: 1; }
.orgs img { display: block; height: 40px; width: auto; }
.age { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--hot); color: var(--hot); font-weight: 800; font-size: 12px; }

.to-top { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 9;
  width: 56px; height: 56px; border-radius: 50%; padding: 0; font-size: 26px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 1000px) {
  .retro.cols-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .retro.cols-3 .stack:nth-child(2) { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 960px) {
  .promos, .promos:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }
  .fgrid[class*="cols-"]:not(.cols-0):not(.cols-1) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fgrid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .fgrid, .fgrid.cols-1 { grid-template-columns: minmax(0, 1fr); }
  .felt { border-radius: 24px; padding: 36px 24px; }
  .felt-in { grid-template-columns: minmax(0, 1fr); }
  .hand { max-width: 420px; width: 100%; margin: 0 auto; height: 300px; }
  .rate-sum, .revs { grid-template-columns: minmax(0, 1fr); }
  /* видна часть следующего провайдера, чтобы было понятно, что ряд продолжается; стрелки остаются */
  .prov-card { flex-basis: calc((100% - 36px) / 3.4); }
  .prov-nav.prev { left: -10px; }
  .prov-nav.next { right: -10px; }
}
@media (max-width: 640px) {
  .retro.cols-3, .retro { grid-template-columns: minmax(0, 1fr); }
  /* на телефонах список победителей показывает первые пять строк, без собственной прокрутки */
  .rwin-wrap, .retro .stack > .box:last-child > .in > .rwin-wrap { flex: none; min-height: 0; max-height: none; overflow: visible; }
  .rwin tr:nth-child(n+6) { display: none; }
  .rwin tr:nth-child(5) td { border-bottom: 0; }
  .retro.cols-3 .stack:nth-child(2) .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .retro.cols-3 .stack:nth-child(2) .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* на самых узких экранах кнопка в шапке меньше, чтобы название бренда помещалось целиком */
  .acts .btn { padding: 8px 12px; font-size: 13px; }
  .sfilter { gap: 8px; }
  .sfilter button { padding: 6px 12px 6px 6px; font-size: 12px; }
  .sfilter .n { width: 24px; height: 24px; }
  .hand { height: 280px; }
  .chip48 { width: 104px; }
  .pc small { font-size: 11px; }
  .prov-card { flex-basis: calc((100% - 24px) / 2.4); }
}
@media (max-width: 720px) {
  /* меню уходит за бургер, поэтому колонок две; длинный текстовый логотип сжимается, а не выталкивает кнопки за экран */
  .bar { column-gap: 12px; grid-template-columns: minmax(0, 1fr) max-content; }
  .bar > .logo { min-width: 0; max-width: 100%; }
  .acts { grid-column: 2; }
  .burger { display: inline-grid; }
  /* на телефоне переключатель языков без стрелки: место нужно логотипу */
  .acts { gap: 6px; }
  .lang summary { padding: 0 8px; }
  .lang summary svg { display: none; }
  nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; overflow: visible;
    padding: 8px max(20px, env(safe-area-inset-left, 0px)) 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  nav.main.open { display: flex; }
  .logo-text { font-size: clamp(17px, 5.4vw, 22px); overflow: hidden; text-overflow: ellipsis; }
  /* на телефоне кнопка «наверх» меньше, чтобы не закрывать текст */
  .to-top { width: 44px; height: 44px; font-size: 20px; }
  footer { padding-bottom: 72px; }
  .hero { padding-top: 16px; }
  .hero .lead { font-size: 15px; }
  main > section { padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .to-top, .pc, .rgame, .prov-card { transition: none; }
  .prov-viewport { scroll-behavior: auto; }
}
