:root {
  --accent: #1b2a4a;      /* подсветка: ссылки, активные пункты, наведение */
  --ink: #1a1d21;
  --muted: #5c6470;
  --line: #e6e8ec;
  --bg: #ffffff;
  --soft: #f6f7f9;
  --maxw: 1140px;
  /* Независимые цвета зон (задаются в «Настройки сайта») */
  --nav-bg: #ffffff;            /* цвет шапки (сплошной), прозрачность — отдельно */
  --nav-opacity: 85%;           /* непрозрачность фона шапки (немного прозрачная) */
  --nav-shadow: 0 2px 8px -4px rgba(15,23,42,.14);  /* «объёмность» шапки */
  --nav-text: #1a1d21;
  --footer-bg: #1b2a4a;
  --footer-text: #cfd6e4;
  --footer-muted: #9aa6bd;
  --bg-page: #ffffff;
  --tint-color: #000000;
  --tint-opacity: 0;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; background: var(--bg-page); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: transparent;  /* фон рисует фиксированный слой .site-bg (цвет/картинка/видео) */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
  /* Полноэкранное приложение: контент занимает всю высоту, подвал прижат вниз */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); }
/* Боковые поля учитывают вырезы экрана (notch) в горизонтальной ориентации */
.wrap {
  max-width: var(--maxw); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  box-shadow: var(--nav-shadow);
  /* Фон шапки заходит под статус-бар iOS (без белой полосы), контент — ниже выреза */
  padding-top: env(safe-area-inset-top);
}
/* Цвет и матовость шапки — на псевдоэлементе, а не на самой шапке. Так шапка НЕ
   становится backdrop-root для выпадашки языков (её потомка), и выпадашка размывает
   страницу ТОЧНО ТАК ЖЕ, как шапка — матовость и прозрачность совпадают 1:1. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--nav-bg) var(--nav-opacity), transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--nav-text); font-weight: 700; }
.brand-logo { height: 34px; width: auto; }
.brand-name { font-size: 18px; letter-spacing: .2px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--nav-text); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .15s;
}
/* Наведение — только подсветка текста акцентом, без контейнера. */
.site-nav a:not(.active):hover { color: var(--accent); }
/* Выбранная страница — акцент; при наведении никакой реакции. */
.site-nav a.active { color: var(--accent); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--nav-text); margin: 5px 6px; border-radius: 2px; }

/* Колокольчик уведомлений в шапке — без контейнера, просто иконка */
.push-bell {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 36px; padding: 0; border: 0; background: none;
  color: var(--nav-text); cursor: pointer; font-size: 22px; line-height: 0;
  transform-origin: 50% 3px; transition: color .18s;
}
.push-bell:hover, .push-bell:focus-visible { color: var(--accent); outline: none; }
/* качание из стороны в сторону при клике */
.push-bell.swing { animation: bellSwing .7s cubic-bezier(.36,.07,.19,.97); }
@keyframes bellSwing {
  0% { transform: rotate(0); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-13deg); }
  45% { transform: rotate(9deg); }
  60% { transform: rotate(-6deg); }
  78% { transform: rotate(3deg); }
  100% { transform: rotate(0); }
}

/* Плашка-приглашение подписаться (одноразовая, снизу) */
.push-invite {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%);
  z-index: 120; display: flex; align-items: center; gap: 12px;
  max-width: min(520px, calc(100vw - 32px)); width: max-content;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 16px 44px rgba(0,0,0,.18);
  transition: transform .28s ease, opacity .28s ease; opacity: 0;
}
.push-invite.show { transform: translate(-50%, 0); opacity: 1; }
.push-invite-ic { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); font-size: 18px; }
.push-invite-txt { font-size: 14px; font-weight: 600; line-height: 1.3; }
.push-invite-acts { display: flex; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.push-invite-acts button { border-radius: 9px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--line); }
.push-invite-no { background: #fff; color: var(--muted, #6b7280); }
.push-invite-no:hover { background: var(--soft); }
.push-invite-yes { background: var(--accent); color: #fff; border-color: var(--accent); }
.push-invite-yes:hover { filter: brightness(1.05); }
.push-invite-yes:disabled { opacity: .6; cursor: default; }
@media (max-width: 560px) {
  .push-invite { left: 12px; right: 12px; bottom: 12px; transform: translateY(140%); max-width: none; width: auto; flex-wrap: wrap; }
  .push-invite.show { transform: translateY(0); }
  .push-invite-acts { width: 100%; }
  .push-invite-acts button { flex: 1; }
}

/* Внутристраничный тост уведомления (когда сайт открыт) */
.push-toast {
  position: fixed; top: 18px; right: 18px; z-index: 130;
  display: flex; align-items: flex-start; gap: 12px;
  width: min(360px, calc(100vw - 32px));
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 16px 44px rgba(0,0,0,.2);
  transform: translateX(120%); opacity: 0; transition: transform .3s ease, opacity .3s ease;
}
.push-toast.show { transform: translateX(0); opacity: 1; }
.push-toast-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
  background: rgba(0,0,0,.06); }
.push-toast-ic img { width: 100%; height: 100%; object-fit: cover; }
.push-toast-tx { min-width: 0; flex: 1; }
.push-toast-title { font-size: 14px; font-weight: 700; line-height: 1.25; }
.push-toast-body { font-size: 13px; margin-top: 2px; line-height: 1.35; opacity: .9; overflow-wrap: anywhere; }
.push-toast-x { flex: 0 0 auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer;
  font-size: 16px; line-height: 0; padding: 2px; display: inline-flex; }
.push-toast-x:hover { opacity: 1; }
@media (max-width: 560px) { .push-toast { top: 12px; right: 12px; left: 12px; width: auto; } }

.site-main { flex: 1 0 auto; }

.block { padding: 64px 0; }
.block + .block { border-top: 1px solid transparent; }
/* .block.block-hero — повышенная специфичность, чтобы 0-паддинг не перебивался
   мобильными правилами .block { padding: 32px } (иначе сверху пустая полоса). */
.block.block-hero { padding: 0; }
.hero-inner { position: relative; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-body { padding: 96px 0; min-height: clamp(380px, 56vh, 640px); display: flex; flex-direction: column; justify-content: center; }
.hero-body.over { position: relative; min-height: clamp(460px, 66vh, 760px); display: flex; flex-direction: column; justify-content: center; color: #fff; padding: 72px 0; }
/* В флекс-колонке .wrap не должен схлопываться по контенту — держим полную ширину, как у обычных блоков */
.hero-body > .wrap { width: 100%; }
.hero-body.over::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); }
.hero-body .wrap { position: relative; z-index: 1; }
h1.h, h2.h, h3.h { line-height: 1.2; margin: 0 0 16px; }
h1.h { font-size: clamp(30px, 5vw, 48px); }
h2.h { font-size: clamp(24px, 3.4vw, 34px); }
.rt { font-size: 17px; color: inherit; }
.rt p { margin: 0 0 14px; }
.hero-body.over .rt { color: #eef1f6; }

.btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.btns.left { justify-content: flex-start; }
.btns.center { justify-content: center; }
.btns.right { justify-content: flex-end; }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 600; line-height: 1; transition: transform .05s ease, filter .15s ease;
}
/* Текст кнопки — оптически ровно по центру НА ЛЮБОМ шрифте: обрезаем
   «воздух» шрифта над заглавными и под базовой линией и центрируем именно
   видимую строку. Где text-box-trim не поддержан — спасает line-height:1 выше. */
@supports (text-box-trim: trim-both) {
  .btn { text-box-trim: trim-both; text-box-edge: cap alphabetic; }
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 7px 15px; font-size: 13px; }
.btn.md { padding: 12px 24px; font-size: 16px; }
.btn.lg { padding: 18px 38px; font-size: 20px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.media-right { direction: rtl; }
.split.media-right > * { direction: ltr; }
.split .media img, .split .media video { width: 100%; border-radius: 12px; }

.trio { text-align: center; }
.trio > .h { text-align: center; margin-bottom: 40px; }
.trio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.card .media img, .card .media video { width: 100%; height: 190px; object-fit: cover; }
/* Общий эффект: плавное увеличение карточки при наведении мышью. */
.card-hover-zoom { transition: transform .22s ease, box-shadow .22s ease; }
.card-hover-zoom:hover { transform: scale(1.04); z-index: 1; }
/* Увеличение картинки/медиа при наведении — работает на любом блоке. */
.media.media-hover-zoom { transition: transform .3s ease; }
.media.media-hover-zoom:hover { transform: scale(1.06); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body .h { margin: 0; font-size: 20px; }
.card-body .rt { text-align: left; color: var(--muted); flex: 1; }
.card-body .btns { margin-top: 8px; }

.text-block .rt { max-width: 760px; }
.align-center .rt, .align-center .h { text-align: center; }
.align-center .text-block .rt { margin-left: auto; margin-right: auto; }

.linked { cursor: pointer; }

.site-footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 40px; flex-shrink: 0; }
.site-footer .wrap {
  padding-top: 40px;
  /* Подвал заходит под домашний индикатор iOS (без чёрной полосы снизу) */
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; }
.footer-nav a { color: var(--footer-text); text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-note { font-size: 13px; color: var(--footer-muted); margin: 0; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.media-right { direction: ltr; }
  .trio-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column;
    /* Матовое стекло: цвет и прозрачность — ровно как у шапки и выпадашки языков
       (управляются в «Настройки сайта» → «Навигация», синхронно с навибаром). */
    background: color-mix(in srgb, var(--nav-bg) var(--nav-opacity), transparent);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    backdrop-filter: blur(10px) saturate(1.1);
    border: 0; border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 34px -18px rgba(15,23,42,.4);
    padding: 8px 16px 16px; display: none;
    max-height: 70vh; overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 16px; }
  .block { padding: 44px 0; }
}

@media (max-width: 560px) {
  .header-inner { height: 56px; gap: 12px; }
  .brand-name { font-size: 16px; }
  .brand-logo { height: 28px; }
  .site-nav { top: 100%; }
  .block { padding: 32px 0; }
  .hero-body { padding: 56px 0; min-height: clamp(320px, 62vh, 520px); }
  .hero-body.over { min-height: clamp(360px, 68vh, 560px); padding: 48px 0; }
  h1.h { font-size: clamp(26px, 8vw, 34px); }
  h2.h { font-size: clamp(21px, 6vw, 28px); }
  .rt { font-size: 16px; }
  .split { gap: 20px; }
  .card .media img, .card .media video { height: 200px; }
  /* Кнопки крупнее и удобнее для пальца */
  .btns { gap: 10px; }
  .btn.sm { padding: 7px 14px; font-size: 13px; }
  .btn.md { padding: 12px 22px; font-size: 15px; }
  .btn.lg { padding: 16px 30px; font-size: 18px; }
  .footer-nav { gap: 6px 16px; }
}

/* Встроенный чат по всей высоте на телефоне (учёт динамической панели браузера) */
@media (max-width: 560px) {
  .chat-frame { height: calc(100dvh - 56px - env(safe-area-inset-top)); }
}

/* Встроенный чат (скрытая страница __chat) */
.block.chat-embed { padding: 0; }
/* На странице чата подвал сайта скрыт — чат занимает весь экран, подвал не всплывает под полем ввода. */
body.embed-hide-footer .site-footer { display: none; }
.chat-frame {
  display: block; width: 100%; border: 0;
  /* Прозрачный iframe: пока встроенное приложение грузится, сквозь него виден
     фон сайта (слой .site-bg), а не белый кадр — без мелькания при переходе. */
  background: transparent;
  height: calc(100dvh - 68px - env(safe-area-inset-top)); min-height: 480px;
}
@media (max-width: 768px) {
  .chat-frame { height: calc(100dvh - 56px - env(safe-area-inset-top)); }
}

/* Модалка-инструкция «Установить приложение» */
.install-ov { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.install-box { background: #fff; color: var(--ink); border-radius: 16px; max-width: 440px; width: 100%; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.install-box h3 { margin: 0 0 12px; font-size: 20px; }
.install-box ol { margin: 0; padding-left: 20px; line-height: 1.6; }
.install-box li { margin-bottom: 8px; }
.install-box p { margin: 0; line-height: 1.6; }
.install-close { margin-top: 18px; width: 100%; border: 0; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 600; background: var(--accent); color: #fff; cursor: pointer; }

/* Иконка слева от текста кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ic { display: inline-flex; align-items: center; flex: 0 0 auto; }
.btn-ic svg { width: 1.15em; height: 1.15em; display: block; }

/* ── Баннеры (технический + рекламные) ── */
.banner-in { display: flex; align-items: center; gap: 10px; }

.tech-banner { position: relative; z-index: 30; border-bottom: 1px solid rgba(0,0,0,.06); }
.tech-banner .banner-in { padding: 10px 20px; justify-content: center; text-align: center; }
.tb-ic { display: inline-flex; align-items: center; line-height: 0; flex: 0 0 auto; }
.tb-ic svg { width: 1em; height: 1em; display: block; }
.tb-text { font-weight: 600; }

.promo-banner { position: relative; overflow: hidden; }
.promo-banner.clickable { cursor: pointer; }
.pb-tint { position: absolute; inset: 0; z-index: 1; }
.pb-content { position: relative; z-index: 2; padding: 16px 20px; justify-content: center; text-align: center; min-height: 44px; }
.pb-text { font-weight: 700; }

/* эффекты */
.fx-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }

/* Мерцание — медленнее в 2 раза */
.promo-banner.fx-shimmer::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); background-size: 200% 100%; animation: pbShimmer 9.6s linear infinite; }
@keyframes pbShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Свечение — золотистое, медленное, переливающееся, из-за баннера */
.promo-banner.fx-glow { animation: pbGoldGlow 4.5s ease-in-out infinite; }
@keyframes pbGoldGlow {
  0%   { box-shadow: 0 0 26px 4px rgba(255,190,60,.6); }
  33%  { box-shadow: 0 0 44px 10px rgba(255,215,90,.9); }
  66%  { box-shadow: 0 0 34px 6px rgba(240,160,30,.75); }
  100% { box-shadow: 0 0 26px 4px rgba(255,190,60,.6); }
}

/* Неон — непрерывное цветное свечение из-за баннера (цвет настраивается) */
.promo-banner.fx-neon { box-shadow: 0 0 16px 2px var(--neon,#22e3ff), 0 0 34px 8px var(--neon,#22e3ff); }

/* Радужная — мягкая подсветка из-за баннера, медленно переливается цветами */
.promo-banner.fx-rainbow { animation: pbRainbowGlow 9s linear infinite; }
@keyframes pbRainbowGlow {
  0%   { box-shadow: 0 0 36px 8px rgba(255,82,82,.7); }
  20%  { box-shadow: 0 0 36px 8px rgba(255,215,64,.7); }
  40%  { box-shadow: 0 0 36px 8px rgba(105,240,174,.7); }
  60%  { box-shadow: 0 0 36px 8px rgba(64,196,255,.7); }
  80%  { box-shadow: 0 0 36px 8px rgba(224,64,251,.7); }
  100% { box-shadow: 0 0 36px 8px rgba(255,82,82,.7); }
}

/* Гирлянда — хаотичные лампочки, торчащие из торцов баннера (без провода) */
.promo-banner.fx-garland, .promo-banner.fx-pumpkins { overflow: visible; }
.garland-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: visible; }
.g-light { position: absolute; width: 13px; height: 18px; transform-origin: center; }
.g-cap { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 5px; height: 4px; background: #2e7d32; border-radius: 2px 2px 0 0; }
.g-bulb2 { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 13px; height: 16px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 50% 32%, rgba(255,255,255,.85), var(--c) 72%);
  box-shadow: 0 0 4px var(--c); animation: gTwinkle 1.9s ease-in-out infinite; }
@keyframes gTwinkle {
  0%,100% { filter: brightness(.5) saturate(.85); box-shadow: 0 0 2px var(--c); }
  50%     { filter: brightness(1.55); box-shadow: 0 0 10px var(--c), 0 0 18px var(--c); }
}

/* Тыквы — за контуром, хаотичное расположение и размер */
.pumpkins-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: visible; }
.pk { position: absolute; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }

/* Конфети — над баннером и медленно падающее из-за баннера */
.c-bit { position: absolute; top: -12px; width: 7px; height: 10px; border-radius: 1px; animation: pbConfetti linear infinite; }
@keyframes pbConfetti { 0% { transform: translateY(-12px) rotate(0); opacity: 1; } 100% { transform: translateY(160px) rotate(360deg); opacity: .15; } }
.promo-banners.has-behind { position: relative; }
.fx-confetti-behind { position: absolute; left: 0; right: 0; top: -18px; bottom: -18px; z-index: 0; pointer-events: none; overflow: visible; }
.fx-confetti-behind .c-bit { animation-name: pbConfettiBehind; }
@keyframes pbConfettiBehind { 0% { transform: translateY(-16px) rotate(0); opacity: .9; } 100% { transform: translateY(200px) rotate(300deg); opacity: .1; } }

/* Рекламный баннер — отдельный «островок» (карточка в ширине контента) */
.promo-banners { max-width: var(--maxw); margin: 28px auto; padding: 0 20px; }
.promo-banner { border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.promo-banner + .promo-banner { margin-top: 16px; }
.pb-content { padding: 20px 24px; }
@media (max-width: 560px) {
  .promo-banners { margin: 20px auto; padding: 0 16px; }
  .pb-content { padding: 16px 18px; }
}

/* Соотношение сторон рекламного баннера */
.promo-banner { display: flex; align-items: center; }
.promo-banner .pb-content { width: 100%; }
.promo-banner.shape-wide { aspect-ratio: 4 / 1; }
.promo-banner.shape-rect { aspect-ratio: 5 / 2; }
.promo-banner.shape-square { max-width: 440px; margin-left: auto; margin-right: auto; aspect-ratio: 1 / 1; }
.promo-banner.shape-tall { max-width: 460px; margin-left: auto; margin-right: auto; aspect-ratio: 3 / 4; }
.pb-text { max-width: 100%; }

/* ── Переключатель языков ── */
/* Растягиваем обёртку на всю высоту шапки: тогда выпадашка (top:100%) приклеена
   ровно к нижней кромке навибара — без зазора, как продолжение шапки. */
.lang-switch { position: relative; flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; }
.lang-switch-btn {
  display: inline-flex; align-items: center; gap: 3px; height: 36px; padding: 0 2px;
  border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .3px;
  color: var(--nav-text); cursor: pointer; transition: color .15s; white-space: nowrap;
}
.lang-switch-btn:hover, .lang-switch-btn:focus-visible { color: var(--accent); outline: none; }
.lang-switch-chev { display: inline-flex; line-height: 0; opacity: .5; transition: transform .18s; }
.lang-switch-chev svg { width: 13px; height: 13px; }
.lang-switch.open .lang-switch-chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: 100%; right: 0; z-index: 60; box-sizing: border-box;
  min-width: 120px; max-width: min(90vw, 360px);
  /* Цвет и прозрачность — ровно как у шапки (задаётся в «Настройки сайта»). */
  background: color-mix(in srgb, var(--nav-bg) var(--nav-opacity), transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  /* Без рамки; верх — «встык» с навибаром (прямой), низ — скруглён. */
  border: 0; border-radius: 0 0 14px 14px;
  /* Вертикального паддинга в закрытом состоянии нет — иначе при max-height:0 он
     остаётся «полом» (border-box) и снизу торчит матовая полоска. */
  padding: 0 6px;
  scrollbar-width: none; -ms-overflow-style: none;
  /* «Выезжает» из-под навибара, разворачиваясь вниз (высота 0 → полная).
     Без сдвига и без проявления — не перекрывает шапку, шва не видно: единое целое. */
  max-height: 0; overflow: hidden;
  transition: max-height .24s ease;
}
.lang-menu::-webkit-scrollbar { width: 0; height: 0; display: none; }
.lang-switch.open .lang-menu { max-height: 340px; padding: 6px; overflow-x: hidden; overflow-y: auto; box-shadow: 0 16px 34px -18px rgba(15,23,42,.4); }
.lang-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 0; background: none; border-radius: 10px; padding: 9px 10px; cursor: pointer;
  color: var(--nav-text); transition: color .12s;
}
/* Наведение и выбранный — без серой подложки, подсветка акцентным цветом */
.lang-menu-item:hover, .lang-menu-item:focus-visible, .lang-menu-item.on { background: none; color: var(--accent); }
.lang-menu-item:hover .lm-name, .lang-menu-item:focus-visible .lm-name, .lang-menu-item.on .lm-name { color: var(--accent); }
.lang-menu-item:hover .lm-native, .lang-menu-item.on .lm-native,
.lang-menu-item:hover .lm-code, .lang-menu-item.on .lm-code { color: color-mix(in srgb, var(--accent) 60%, transparent); }
.lang-menu-item.on .lm-name { font-weight: 700; }
.lang-menu-item .lm-flag { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.lang-menu-item .lm-name { font-size: 14px; font-weight: 600; white-space: nowrap; }
.lang-menu-item .lm-native { font-size: 12px; color: color-mix(in srgb, var(--nav-text) 55%, transparent); margin-left: auto; padding-left: 12px; white-space: nowrap; }
@media (max-width: 640px) {
  .lang-switch-btn { height: 34px; padding: 0 8px 0 10px; font-size: 13px; }
  .lang-menu { right: 0; }
}
.lang-switch.lang-busy .lang-switch-btn { position: relative; color: var(--muted); }
.lang-switch.lang-busy .lang-switch-chev { animation: langSpin .7s linear infinite; }
@keyframes langSpin { to { transform: rotate(360deg); } }
.lang-menu-item .lm-code { font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--nav-text) 55%, transparent); min-width: 22px; flex: 0 0 auto; letter-spacing: .5px; }
.lang-menu.lang-menu-flag_only .lang-menu-item { justify-content: center; }

/* Настоящие SVG-флаги вместо эмодзи (эмодзи-флаги не рисуются на Windows) */
.lm-flag-img { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.10); vertical-align: middle; flex: 0 0 auto; }
.lm-flag-code { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 16px; font-size: 10px; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 3px; letter-spacing: .5px; flex: 0 0 auto; }
.lang-switch-lbl { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch-lbl .lm-flag-img { width: 20px; height: 15px; }
.lang-switch-lbl .ls-code, .lang-switch-lbl .ls-name { line-height: 1; }

/* ── Фон сайта: фиксированный слой (цвет / картинка / зацикленное видео) + тонировка ── */
.site-bg { position: fixed; inset: 0; z-index: -1; background: var(--bg-page); overflow: hidden; }
.site-bg-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.site-bg-tint { position: absolute; inset: 0; background: var(--tint-color); opacity: var(--tint-opacity); pointer-events: none; }
