:root {
  --bg-page: #eef1f6;
  --bg-page-2: #e4e9f1;
  --bg-page-3: #dce2ec;
  --surface: #ffffff;
  --surface-soft: #f6f7fb;
  --surface-inset: #eef1f6;

  --text: #0f1523;
  --text-soft: #39425a;
  --muted: #7a8296;
  --muted-2: #99a0b2;

  --hairline: rgba(15, 21, 35, 0.07);
  --hairline-strong: rgba(15, 21, 35, 0.12);

  --brand: #1a4fb5;
  --brand-2: #0a8ea0;
  --brand-ink: #13305f;
  --accent: #e76a1c;
  --accent-ink: #a84a10;

  --ok: #0d7a4f;
  --ok-bg: rgba(13, 122, 79, 0.1);
  --warn: #b8751a;
  --warn-bg: rgba(184, 117, 26, 0.12);
  --closed: #a61f32;
  --closed-bg: rgba(166, 31, 50, 0.08);
  --info: #1a4fb5;
  --info-bg: rgba(26, 79, 181, 0.1);
  --pps: #5c6570;
  --pps-bg: rgba(92, 101, 112, 0.1);

  --radius-sheet: 26px;
  --radius-map: 16px;
  --radius-pill: 999px;
  --radius-chip: 10px;

  --font: "Manrope", "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-sheet: 0 30px 70px -30px rgba(15, 30, 60, 0.22),
                  0 10px 24px -12px rgba(15, 30, 60, 0.08);
  --shadow-chip: 0 1px 2px rgba(15, 30, 60, 0.06),
                 0 6px 14px -6px rgba(15, 30, 60, 0.14);
  --shadow-cta: 0 8px 20px -8px rgba(231, 106, 28, 0.55);

  --max-sheet: 52rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.03rem;
  color: var(--text-soft);
  line-height: 1.65;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(26, 79, 181, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 100%, rgba(10, 142, 160, 0.08), transparent 55%),
    linear-gradient(165deg, var(--bg-page) 0%, var(--bg-page-2) 45%, var(--bg-page-3) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-ink);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(15, 21, 35, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

::selection {
  background: rgba(26, 79, 181, 0.18);
  color: var(--text);
}

/* ---------- Шапка ---------- */
.site-header {
  max-width: var(--max-sheet);
  margin: 0 auto;
  padding: 2.5rem 1.75rem 1.25rem;
  position: relative;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem 0.35rem 0.5rem;
  background: rgba(26, 79, 181, 0.08);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

.site-brand::before {
  content: "38";
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
}

.site-header h1 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw + 0.2rem, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  line-height: 1.1;
}

.site-header h1 em {
  font-style: normal;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.back:hover {
  color: var(--brand);
}

/* ---------- Лист контента ---------- */
.sheet {
  max-width: var(--max-sheet);
  margin: 0 auto 3.5rem;
  padding: 2.25rem 2.25rem 2.5rem;
  background: var(--surface);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-sheet);
  border: 1px solid var(--hairline);
  position: relative;
}

.sheet::before {
  content: "";
  position: absolute;
  left: 2.25rem;
  right: 2.25rem;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 50%, var(--accent) 100%);
  border-radius: 3px;
  opacity: 0.9;
}

@media (max-width: 720px) {
  .sheet {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    padding: 1.5rem 1.25rem 2rem;
    border-radius: 20px;
  }

  .sheet::before {
    left: 1.25rem;
    right: 1.25rem;
  }

  .site-header {
    padding: 1.75rem 1rem 1rem;
  }
}

/* ---------- Ритм внутри листа ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stack h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.stack h2::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: translateY(-0.15em);
}

.stack > h2:not(:first-of-type) {
  margin-top: 1.75rem;
  padding-top: 1.85rem;
  border-top: 1px solid var(--hairline);
}

.stack > p {
  margin: 0;
}

.stack .note {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

.sub {
  margin: -0.35rem 0 0;
  font-size: 0.94rem;
  color: var(--muted);
}

/* ---------- Быстрые метрики ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  background: var(--surface-soft);
  border-radius: var(--radius-chip);
  overflow: hidden;
}

.metrics li {
  padding: 0.85rem 1rem;
  position: relative;
}

.metrics li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: var(--hairline-strong);
}

.metrics .num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metrics .lbl {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 560px) {
  .metrics .num { font-size: 1.15rem; }
}

/* ---------- Рейтинг БК ---------- */
.rating-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: bk;
  display: grid;
  gap: 0.25rem;
}

.rating-list > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rating-list .bk-row {
  counter-increment: bk;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  outline-offset: 2px;
  transition: background 0.14s ease;
}

.rating-list .bk-row:hover {
  background: rgba(26, 79, 181, 0.045);
}

.rating-list > li:last-child .bk-row {
  border-bottom: none;
}

.rating-list .bk-row::before {
  content: counter(bk);
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-inset);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.rating-list > li:nth-child(1) .bk-row::before {
  color: #fff;
  background: linear-gradient(135deg, #d39a2c, #b3751a);
  box-shadow: 0 3px 10px -4px rgba(179, 117, 26, 0.6);
}

.rating-list > li:nth-child(2) .bk-row::before,
.rating-list > li:nth-child(3) .bk-row::before {
  color: var(--brand-ink);
  background: linear-gradient(135deg, rgba(26, 79, 181, 0.15), rgba(10, 142, 160, 0.15));
}

.bk-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bk-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.bk-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  color: #fff;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(15, 30, 60, 0.18);
  text-transform: none;
}

/* Фирменные цвета: Фонбет — алый, Winline — оранжевый,
   BetBoom — чёрный с фиолетовым подтоном, PARI — мятный,
   Betcity — насыщенный синий, Лига Ставок — фирменный зелёный */
.bk-logo--fonbet   { background: linear-gradient(135deg, #FE0000, #C00000); color: #ffffff; }
.bk-logo--winline  { background: linear-gradient(135deg, #FF6A13, #D55400); color: #ffffff; }
.bk-logo--betboom  { background: linear-gradient(135deg, #2A1A3A, #000000); color: #ffffff; }
.bk-logo--pari     { background: linear-gradient(135deg, #00DBA9, #00A685); color: #07251D; }
.bk-logo--betcity  { background: linear-gradient(135deg, #1A4099, #0F2A66); color: #ffffff; }
.bk-logo--liga     { background: linear-gradient(135deg, #04A04A, #027A38); color: #ffffff; }

.bk-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.01em;
}

.bk-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-ink);
  background: var(--info-bg);
  border-radius: var(--radius-pill);
}

.bk-tag--best {
  color: #7c4a0a;
  background: rgba(231, 106, 28, 0.14);
}

.bk-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

.bk-desc strong {
  color: var(--text);
  font-weight: 700;
}

.bk-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(140deg, var(--accent) 0%, #c95412 100%);
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-cta);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  pointer-events: none;
}

.bk-cta::after {
  content: "→";
  font-weight: 700;
  transition: transform 0.15s ease;
}

.bk-row:hover .bk-cta {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(231, 106, 28, 0.6);
}

.bk-row:hover .bk-cta::after {
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .rating-list .bk-row {
    grid-template-columns: auto 1fr;
    gap: 0.6rem 0.85rem;
  }
  .bk-cta {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0.15rem;
  }
}

.bonus-disclaimer {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: var(--radius-chip);
  line-height: 1.5;
}

.bonus-disclaimer::before {
  content: "18+ ";
  font-weight: 800;
  color: var(--accent-ink);
  letter-spacing: 0.05em;
}

/* ---------- Подводка про город ---------- */
.city-intro {
  margin: 0 0 0.25rem;
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--text);
}

.city-intro strong {
  color: var(--brand-ink);
  font-weight: 700;
}

/* ---------- Регион: закон, ППС, ЦУПИС ---------- */
.legal-region {
  margin: 0 0 1.35rem;
  padding: 1.2rem 1.2rem 1.25rem;
  background: linear-gradient(145deg, rgba(166, 31, 50, 0.1), rgba(26, 79, 181, 0.09));
  border: 1px solid rgba(166, 31, 50, 0.28);
  border-radius: var(--radius-map);
  box-shadow: 0 8px 28px -16px rgba(90, 20, 30, 0.35);
}

.legal-region__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.legal-region__text p {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--text-soft);
}

.legal-region__text p:last-child {
  margin-bottom: 0;
}

.legal-region__lead {
  font-size: 1.02rem !important;
  color: var(--text) !important;
}

.legal-region__fine {
  margin-top: 0.5rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline-strong);
  font-size: 0.88rem !important;
  color: var(--muted) !important;
}

/* ---------- Профклубы области ---------- */
.pro-clubs-region {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.2rem 1.15rem;
  background: var(--surface-soft);
  border-radius: var(--radius-map);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.pro-clubs-region__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.pro-clubs-region > p {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.pro-clubs-region__list {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.15rem;
  color: var(--text-soft);
  line-height: 1.58;
  font-size: 0.93rem;
}

.pro-clubs-region__list li {
  margin-bottom: 0.45rem;
}

.pro-clubs-region__list li:last-child {
  margin-bottom: 0;
}

.pro-clubs-region__note {
  margin: 0 !important;
  font-size: 0.86rem !important;
  color: var(--muted) !important;
  line-height: 1.55 !important;
}

/* ---------- Уникальные блоки города: факты и онлайн-ставки ---------- */
.city-facts,
.city-online {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--brand);
  border-radius: 0 14px 14px 0;
}
.city-online {
  border-left-color: var(--accent);
  background: linear-gradient(180deg, rgba(231, 106, 28, 0.05), rgba(231, 106, 28, 0.02));
}
.city-facts > h2,
.city-online > h2 {
  margin: 0 0 0.55rem;
  font-size: 1.18rem;
  color: var(--brand-ink);
  font-weight: 700;
}
.city-online > h2 {
  color: var(--accent-ink);
}
.city-facts p,
.city-online p {
  margin: 0.45rem 0;
  font-size: 0.99rem;
  line-height: 1.6;
  color: var(--text-soft);
}
.city-facts strong,
.city-online strong {
  color: var(--text);
}
.city-online ul {
  margin: 0.4rem 0 0.4rem 1.1rem;
  padding: 0;
}
.city-online li {
  margin: 0.25rem 0;
  font-size: 0.97rem;
}

/* ---------- Сетка городов ---------- */
.city-grid {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.city-grid a,
.city-grid .is-current {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface-soft);
  border-radius: var(--radius-chip);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.city-grid a:hover {
  background: rgba(26, 79, 181, 0.08);
  color: var(--brand);
  transform: translateY(-1px);
}

.city-grid .pop {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.city-grid .is-current {
  background: linear-gradient(135deg, rgba(26, 79, 181, 0.12), rgba(10, 142, 160, 0.1));
  color: var(--brand-ink);
}

.city-grid .is-current .pop {
  color: var(--brand);
}

/* ---------- Списки ППС ---------- */
.locations {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.2rem;
}

.locations li {
  padding: 0.6rem 0;
  line-height: 1.55;
}

.locations li strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Бейджи ---------- */
.badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  margin: 0 0.35rem 0.15rem 0;
  vertical-align: 0.08em;
}

.badge--active { background: var(--ok-bg); color: var(--ok); }
.badge--closed { background: var(--closed-bg); color: var(--closed); }
.badge--verify { background: var(--info-bg); color: var(--info); }
.badge--pps    { background: var(--pps-bg); color: var(--pps); }

/* ---------- Карты ---------- */
.map-wrap {
  margin: 0.85rem 0 0;
  position: relative;
}

.map-frame {
  width: 100%;
  min-height: 360px;
  border: none;
  border-radius: var(--radius-map);
  display: block;
  background: var(--surface-inset);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

#ymap3-root {
  min-height: 360px;
  border-radius: var(--radius-map);
  background: var(--surface-inset);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

/* ---------- Таблица (оставлена для совместимости) ---------- */
.city-table-wrap { overflow-x: auto; margin: 0.25rem 0 0; }
.city-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.city-table th,
.city-table td {
  text-align: left;
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.city-table th {
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.city-table tr:last-child td { border-bottom: none; }
.city-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

/* ---------- Навигация на главной ---------- */
.nav-inline ul {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.nav-inline a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface-soft);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-inline a:hover {
  background: rgba(26, 79, 181, 0.08);
  color: var(--brand);
}

/* ---------- Футер страницы ---------- */
.footer-note {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.86rem;
  color: var(--muted);
}

.cross-footer {
  margin-top: 2.25rem;
  padding-top: 1.65rem;
  border-top: 1px solid var(--hairline-strong);
}

.cross-footer__title {
  margin: 0 0 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.cross-footer__links {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--text-soft);
}

.cross-footer__links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cross-footer__links a:hover {
  color: var(--brand);
  border-bottom-color: currentColor;
}

.cross-footer__sep {
  color: var(--muted-2);
  margin: 0 0.15rem;
  user-select: none;
}

/* ---------- Лаборатория карт: те же правила листа ---------- */
.lab .stack h2 + .sub + .map-wrap,
.lab .stack h2 + .map-wrap {
  margin-top: 0.5rem;
}
