/* OTG Media — единая система стилей: чёрный и золото OTG, современная типографика, мобильная версия в первую очередь. */
:root {
  color-scheme: dark;
  --bg: #07060a;
  --bg-raise: #0f0d14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(240, 200, 120, 0.14);
  --line-strong: rgba(240, 200, 120, 0.38);
  --text: #f7f3ea;
  --muted: #a8a196;
  --gold: #e7b44a;
  --gold-light: #ffd98c;
  --gold-deep: #b27a1c;
  --violet: #7b5cff;
  --red: #ff3b4e;
  --green: #45d39a;
  --radius: 22px;
  --radius-small: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "SF Pro Display", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* Цвета, которые раньше были вписаны прямо в правила: те же значения, теперь их меняет светлая тема. */
  --text-strong: #fff;
  --text-soft: #d8d1c4;
  --text-2: #d4cdc0;
  --text-3: #ddd6c9;
  --text-card: #cfc8bb;
  --text-soul: #e9e1d2;
  --tag-text: #d9c393;
  --rights: #7f7a72;
  --rights-link: #9c948a;
  --accent-text: var(--gold-light);
  --accent-text-2: var(--gold);
  --grad-text-1: var(--gold-light);
  --grad-text-2: var(--gold);
  --grad-text-3: var(--gold-deep);
  --focus: var(--gold-light);
  --on-gold: #1a1204;
  --live-kicker: #ff8e9a;
  --error-text: #ff8f80;
  --cancel-text: #ff9f93;
  --success-text: var(--green);
  --glow-gold: rgba(231, 180, 74, 0.16);
  --glow-violet: rgba(123, 92, 255, 0.12);
  --sidebar-bg: rgba(7, 6, 10, 0.86);
  --panel-a: rgba(255, 255, 255, .055);
  --panel-b: rgba(255, 255, 255, .02);
  --card-a: rgba(255, 255, 255, .06);
  --card-b: rgba(255, 255, 255, .015);
  --track-a: rgba(255, 255, 255, .05);
  --track-b: rgba(255, 255, 255, .015);
  --ghost-bg: rgba(255, 255, 255, .04);
  --progress-bg: rgba(255, 255, 255, .08);
  --input-bg: rgba(0, 0, 0, .35);
  --input-text: #fff;
  --stats-bg: rgba(0, 0, 0, .3);
  --shadow-hover: rgba(0, 0, 0, .55);
  --shadow-playing: rgba(0, 0, 0, .5);
  --offer-white: rgba(255, 255, 255, .02);
}

/* ---------- Светлая тема (включается кнопкой, по умолчанию — тёмная) ----------
   Тёплый кремовый фон вместо белого; яркое золото остаётся на кнопках и заливках, для текста — тёмное золото
   (светлое золото на светлом фоне не читается). Блоки с фотографиями (.hero) остаются тёмными — фирменный акцент. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf7f1;
  --bg-raise: #ffffff;
  --surface: rgba(60, 40, 10, 0.04);
  --surface-strong: rgba(60, 40, 10, 0.07);
  --line: rgba(150, 105, 20, 0.22);
  --line-strong: rgba(150, 105, 20, 0.45);
  --text: #1c1712;
  --muted: #6b6358;
  --shadow: 0 18px 40px rgba(60, 40, 10, 0.12);
  --text-strong: #0f0c08;
  --text-soft: #3d352b;
  --text-2: #3d352b;
  --text-3: #2e271f;
  --text-card: #4a4238;
  --text-soul: #2e271f;
  --tag-text: #7a5412;
  --rights: #6f675c;
  --rights-link: #6b6358;
  --accent-text: #8a5a00;
  --accent-text-2: #855a0b;
  --grad-text-1: #c9901f;
  --grad-text-2: #a8740f;
  --grad-text-3: #7a520a;
  --focus: #8a5a00;
  --live-kicker: #c8102e;
  --error-text: #c0392b;
  --cancel-text: #b03a2e;
  --success-text: #0f7a55;
  --glow-gold: rgba(231, 180, 74, 0.22);
  --glow-violet: rgba(123, 92, 255, 0.08);
  --sidebar-bg: rgba(250, 247, 241, 0.9);
  --panel-a: #ffffff;
  --panel-b: rgba(255, 255, 255, 0.7);
  --card-a: #ffffff;
  --card-b: rgba(255, 255, 255, 0.75);
  --track-a: #ffffff;
  --track-b: rgba(255, 255, 255, 0.8);
  --ghost-bg: rgba(60, 40, 10, 0.04);
  --progress-bg: rgba(60, 40, 10, 0.1);
  --input-bg: #ffffff;
  --input-text: #1c1712;
  --stats-bg: rgba(60, 40, 10, 0.04);
  --shadow-hover: rgba(60, 40, 10, 0.18);
  --shadow-playing: rgba(60, 40, 10, 0.14);
  --offer-white: rgba(255, 255, 255, 0.6);
}
/* Блоки с фотографиями и в светлой теме тёмные: возвращаем им тёмные значения. */
:root[data-theme="light"] .hero {
  --text: #f7f3ea; --text-strong: #fff; --text-soft: #d8d1c4; --muted: #a8a196;
  --line: rgba(240, 200, 120, 0.14); --line-strong: rgba(240, 200, 120, 0.38);
  --surface-strong: rgba(255, 255, 255, 0.07); --ghost-bg: rgba(255, 255, 255, .04);
  --accent-text: var(--gold-light); --accent-text-2: var(--gold);
  --grad-text-1: var(--gold-light); --grad-text-2: var(--gold); --grad-text-3: var(--gold-deep);
  --focus: var(--gold-light);
  color: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, var(--glow-gold), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, var(--glow-violet), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---------- Каркас ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px 16px 10px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 24px rgba(231, 180, 74, 0.25); }
.brand strong { display: block; font-size: 15px; letter-spacing: 0.18em; }
.brand small { display: block; font-size: 9px; letter-spacing: 0.24em; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  color: var(--text-card); text-decoration: none; font-weight: 650; font-size: 14px;
  border: 1px solid var(--line); background: var(--surface);
  transition: background .2s, color .2s, border-color .2s;
}
.nav a i { font-style: normal; font-size: 17px; line-height: 0; color: var(--accent-text-2); width: 18px; display: inline-grid; place-items: center; }
.nav a:hover { color: var(--text-strong); border-color: var(--line-strong); }
.nav a.active { color: var(--on-gold); background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); border-color: transparent; box-shadow: 0 8px 24px rgba(231, 180, 74, 0.3); }
.nav a.active i { color: var(--on-gold); }
.sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; font-size: 12px; }
/* Телефон: кнопка установки — своей строкой по центру, место под неё заранее (шапка не прыгает, когда она появляется). */
.sidebar-footer .install-slot { flex: 0 0 100%; display: flex; justify-content: center; min-height: 34px; } /* высота кнопки «Установить приложение» заранее: шапка не прыгает, когда кнопка появляется */
.sidebar-contact { text-decoration: none; }
.sidebar-contact small { display: none; }
.sidebar-contact strong { font-weight: 600; color: var(--accent-text); }
/* Вход в кабинет владельца: отдельная строка сразу под меню, всегда на виду. */
.owner-link {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  align-self: flex-start; padding: 6px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 650; font-size: 12px;
  border: 1px dashed var(--line-strong); background: var(--surface);
  transition: background .2s, color .2s, border-color .2s;
}
.owner-link i { font-style: normal; line-height: 0; font-size: 16px; width: 18px; display: inline-grid; place-items: center; }
.owner-link:hover, .sidebar-contact:hover strong { color: var(--text-strong); }
.owner-link:hover { border-color: var(--gold); background: var(--surface-strong); }
/* Переключатель языка: на телефоне — справа от логотипа, на компьютере — внизу боковой панели. */
.lang-slot { position: absolute; top: 16px; right: 16px; }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.lang-switch button {
  min-width: 36px; min-height: 30px; padding: 4px 9px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 12px var(--mono); letter-spacing: .08em; color: var(--muted); background: transparent;
}
.lang-switch button:hover { color: var(--text-strong); }
.lang-switch button[aria-pressed="true"] { color: var(--on-gold); background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); }
.legal-lang { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.lang-slot, .legal-lang { display: flex; align-items: center; gap: 6px; }
.theme-toggle {
  width: 38px; min-height: 38px; height: 38px; padding: 0; border-radius: 50%;
  font-size: 17px; line-height: 1; color: var(--accent-text); background: var(--surface); border: 1px solid var(--line);
}
#music-slot { display: contents; }
/* Узкий телефон: RU/LV/EN + тема + музыка не помещаются рядом с подписью — остаётся логотип (на нём тоже OTG). */
@media (max-width: 439px) { .brand > span { display: none; } }
.music-toggle { color: var(--muted); }
.music-toggle.is-playing { color: var(--on-gold); background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); border-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .music-toggle.is-playing { animation: music-pulse 2.4s ease-in-out infinite; } }
@keyframes music-pulse { 50% { box-shadow: 0 0 0 5px rgba(231, 180, 74, .18); } }

main { outline: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
body { overflow-x: hidden; }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); }
  .sidebar { height: 100vh; padding: 28px 18px 22px; border-bottom: 0; border-right: 1px solid var(--line); gap: 18px; }
  .brand img { width: 52px; height: 52px; }
  .brand strong { font-size: 17px; }
  .nav { flex-direction: column; margin: 0; padding: 0; overflow: visible; gap: 2px; }
  /* Плашки ниже (буквы те же 15px) — больше места под Снапа и разговор с ним. */
  .nav a { padding: 7px 16px; border-radius: 12px; font-size: 15px; background: transparent; border-color: transparent; }
  .nav a:hover { background: var(--surface-strong); border-color: var(--line); }
  /* Низкое окно: панель прокручивается сама — раньше нижние ссылки уходили за край экрана. */
  .sidebar { overflow-y: auto; scrollbar-width: thin; }
  .owner-link { align-self: stretch; padding: 7px 16px; border-radius: 12px; font-size: 14px; background: transparent; }
  .sidebar-footer { min-height: 0; margin-top: auto; flex-wrap: nowrap; justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
  .lang-slot { position: static; }
  .sidebar-contact small { display: block; color: var(--muted); font: 700 9px var(--mono); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }
  .sidebar-contact strong { font-size: 14px; }
  .page { padding: 44px clamp(28px, 4vw, 64px) 56px; gap: 22px; }
}

/* ---------- Типографика и заголовки ---------- */
.eyebrow, .kicker { font: 700 11px var(--mono); letter-spacing: 0.2em; color: var(--accent-text-2); text-transform: uppercase; }
.kicker { display: block; margin-bottom: 8px; }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 30px 22px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(7, 6, 10, .95), rgba(7, 6, 10, .75) 60%, rgba(7, 6, 10, .45)), url('/assets/brand/otg-section-hero-1600.webp') center / cover;
  box-shadow: var(--shadow);
}
@media (max-width: 819px) { .hero { background-image: linear-gradient(120deg, rgba(7, 6, 10, .95), rgba(7, 6, 10, .75) 60%, rgba(7, 6, 10, .45)), url('/assets/brand/otg-section-hero-900.webp'); } }
.hero h1 { margin: 12px 0 12px; font-size: clamp(32px, 7vw, 60px); font-weight: 800; max-width: 820px; }
.hero h1 em, .gold { font-style: normal; background: linear-gradient(120deg, var(--grad-text-1), var(--grad-text-2) 60%, var(--grad-text-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-soft); max-width: 700px; }
.hero-home { padding: 40px 22px; background: linear-gradient(100deg, rgba(7, 6, 10, .98) 0%, rgba(7, 6, 10, .94) 45%, rgba(7, 6, 10, .55) 75%, rgba(7, 6, 10, .25)), url('/assets/brand/otg-media-hero-1600.webp') 80% center / cover; }
@media (max-width: 819px) { .hero-home { background: linear-gradient(180deg, rgba(7, 6, 10, .9), rgba(7, 6, 10, .97)), url('/assets/brand/otg-media-hero-900.webp') 75% center / cover; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
@media (min-width: 1024px) { .hero { padding: 44px 48px; } .hero-home { padding: 72px 56px; } }
.muted { color: var(--muted); }
.section-title { font-size: 20px; margin-bottom: 12px; }

/* ---------- Кнопки и мелкие элементы ---------- */
.button, button {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  font: 700 15px var(--font); text-decoration: none; cursor: pointer;
  color: var(--text); background: var(--surface-strong); border: 1px solid var(--line);
  transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.button:hover, button:hover { border-color: var(--line-strong); }
.button:active, button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: not-allowed; }
.button.primary { color: var(--on-gold); border: 0; background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); box-shadow: 0 10px 30px rgba(231, 180, 74, .28); }
.button.primary:hover { box-shadow: 0 14px 38px rgba(231, 180, 74, .42); }
.button.ghost { background: var(--ghost-bg); }
.button.youtube { border: 0; color: #fff; background: linear-gradient(135deg, #ff5a4f, #d1162b); }
.button.small { min-height: 38px; padding: 0 14px; font-size: 13px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button-stack { display: grid; gap: 10px; align-content: start; }
.text-link { color: var(--accent-text); font-size: 14px; text-align: center; }
.badge { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--accent-text); border: 1px solid var(--line-strong); background: rgba(231, 180, 74, .08); white-space: nowrap; }
.badge.live { color: var(--success-text); border-color: rgba(69, 211, 154, .4); background: rgba(69, 211, 154, .08); }
.checks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; color: var(--text-3); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--on-gold); background: var(--gold); }

/* ---------- Панели и карточки ---------- */
.panel {
  position: relative; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-a), var(--panel-b));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.panel h2 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 8px; }
.panel p + p { margin-top: 6px; }
.panel > .button-row, .panel > p + .button-row { margin-top: 16px; }
.panel a:not(.button) { color: var(--accent-text); }
.panel.error { border-color: rgba(255, 90, 90, .4); }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.split > div:first-child { flex: 1 1 320px; }
.stack { display: grid; gap: 14px; }
.empty-state { padding: 26px; border-radius: var(--radius); border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.panel.empty-state { border-style: dashed; box-shadow: none; }
.panel.empty-state .button { margin-top: 16px; }

.product-grid { display: grid; gap: 14px; }
@media (min-width: 820px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.product-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 230px;
  padding: 24px; border-radius: var(--radius); text-decoration: none;
  background: linear-gradient(165deg, var(--card-a), var(--card-b));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.product-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; background: url('/assets/brand/otg-watermark-360.webp') center / contain no-repeat; opacity: .07; pointer-events: none; }
.product-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 30px 70px var(--shadow-hover), 0 0 0 1px rgba(231, 180, 74, .12), 0 0 40px rgba(231, 180, 74, .12); }
.product-card h2 { font-size: 24px; }
.product-card p { color: var(--text-card); }
.product-card b { margin-top: auto; color: var(--accent-text); }
.tag { align-self: flex-start; padding: 5px 10px; border-radius: 999px; font: 700 10px var(--mono); letter-spacing: .14em; color: var(--accent-text); background: rgba(231, 180, 74, .1); border: 1px solid var(--line); }

.live-banner { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; padding: 20px 22px; border-radius: var(--radius); border: 1px solid rgba(255, 59, 78, .3); background: linear-gradient(120deg, rgba(255, 59, 78, .12), rgba(123, 92, 255, .1)); }
.live-banner small { font: 700 10px var(--mono); letter-spacing: .18em; color: var(--live-kicker); }
.live-banner h2 { font-size: 22px; margin: 4px 0; }
.live-banner p { color: var(--text-soft); }
.live-banner .button { grid-column: 1 / -1; }
.live-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 59, 78, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(255, 59, 78, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0); } }
@media (min-width: 820px) { .live-banner { grid-template-columns: auto 1fr auto; } .live-banner .button { grid-column: auto; } }

/* ---------- Библиотека ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip { flex: 0 0 auto; min-height: 38px; padding: 0 14px; font-size: 14px; font-weight: 650; color: var(--text-2); }
.chip span { color: var(--muted); font-weight: 600; }
.chip[aria-pressed="true"] { color: var(--on-gold); border-color: transparent; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.chip[aria-pressed="true"] span { color: #4a3409; }
.track-list { display: grid; gap: 10px; }
.track {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px 14px;
  padding: 12px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--track-a), var(--track-b));
  -webkit-user-select: none; user-select: none; transition: border-color .2s, box-shadow .2s;
}
.track.playing { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(231, 180, 74, .18), 0 16px 40px var(--shadow-playing); }
.play { width: 52px; height: 52px; min-height: 0; padding: 0; font-size: 20px; line-height: 0; color: var(--accent-text); display: inline-grid; place-items: center; }
.track.playing .play { color: var(--on-gold); border: 0; background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.track-meta { min-width: 0; }
.track-meta h3 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-meta > span { font-size: 13px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tags i { font-style: normal; font-size: 11px; color: var(--tag-text); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.progress { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--progress-bg); overflow: hidden; cursor: pointer; }
.progress b { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); transition: width .25s linear; }
.track > .button, .track > small, .track > .track-actions { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 820px) {
  .track { grid-template-columns: 52px minmax(0, 1.3fr) minmax(140px, 1fr) auto; padding: 12px 18px 12px 12px; }
  .progress, .track > .button, .track > small, .track > .track-actions { grid-column: auto; }
  .track > .track-actions { justify-self: end; }
}
.subscribe { display: grid; gap: 20px; }
@media (min-width: 820px) { .subscribe { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Песня и формы ---------- */
.offer { display: grid; gap: 18px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: linear-gradient(135deg, rgba(231, 180, 74, .14), rgba(123, 92, 255, .08) 70%, var(--offer-white)); }
.price strong { display: block; font-size: clamp(52px, 10vw, 76px); font-weight: 800; line-height: 1; background: linear-gradient(120deg, var(--grad-text-1), var(--grad-text-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price span { color: var(--muted); font-weight: 600; }
.price.gift strong { font-size: clamp(40px, 5.5vw, 56px); }
.soul { margin-bottom: 14px; color: var(--text-soul); font-size: 17px; line-height: 1.55; }
.exchange { display: grid; gap: 18px; }
.exchange-steps { list-style: none; display: grid; gap: 10px; margin: 14px 0; padding: 0; }
.exchange-steps li { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.exchange-steps span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; font-size: 17px; border-radius: 50%; color: var(--on-gold); background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); }
.exchange .button { justify-self: start; }
.track-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.certificate-box { display: grid; gap: 8px; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.certificate-box h3 { font-size: 16px; }
.certificate-box label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.verify-result dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 16px; margin: 12px 0 0; }
.verify-result dt { color: var(--muted); }
.verify-result dd { margin: 0; overflow-wrap: anywhere; }
.verify-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.verify-form label { display: grid; gap: 6px; flex: 1 1 220px; }
@media (min-width: 1024px) { .exchange-steps { grid-template-columns: repeat(3, auto); justify-content: start; gap: 22px; } }
.offer h2 { font-size: 22px; }
@media (min-width: 820px) { .offer { grid-template-columns: auto 1fr; align-items: center; gap: 48px; padding: 30px 40px; } }
.order-form { display: grid; gap: 14px; }
@media (min-width: 820px) { .order-form { grid-template-columns: 1fr 1fr; } .wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 7px; }
.field label, .login label { font-size: 13px; font-weight: 700; color: var(--text-3); }
.field input, .field textarea, .login input, .certificate-box input, .ref-link input, .verify-form input, select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-small);
  color: var(--input-text); font: 16px var(--font); background: var(--input-bg); border: 1px solid var(--line); outline: none;
}
.field input:focus, .field textarea:focus, .login input:focus, .certificate-box input:focus, .verify-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231, 180, 74, .15); }
.field textarea { min-height: 150px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.consent input { width: 20px; height: 20px; accent-color: var(--gold); margin-top: 1px; }
.form-errors { color: var(--error-text); font-size: 14px; min-height: 0; }
.login { display: grid; gap: 12px; margin-top: 16px; }
.login label { display: grid; gap: 6px; }

/* ---------- Кабинет ---------- */
.account-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1024px) { .account-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
#account-history, #account-referral { grid-column: 1 / -1; }
.ref-banner { margin: 10px 0 4px; padding: 10px 14px; border-radius: var(--radius-small); border: 1px solid var(--gold); color: var(--accent-text); background: rgba(231, 180, 74, .08); font-weight: 600; }
.checks li.gift { color: var(--accent-text); font-weight: 600; }
.ref-ladder { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 10px; padding: 0; }
.ref-ladder li { display: grid; gap: 2px; justify-items: center; align-content: start; text-align: center; padding: 12px 4px; border-radius: var(--radius-small); border: 1px solid var(--line); background: var(--stats-bg); }
.ref-ladder strong { font-size: clamp(17px, 4.6vw, 24px); white-space: nowrap; color: var(--muted); }
.ref-ladder span { font-size: 12px; color: var(--muted); }
.ref-ladder li.done strong { color: var(--text); }
.ref-ladder li.current { border-color: transparent; background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); }
.ref-ladder li.current strong, .ref-ladder li.current span { color: var(--on-gold); }
.ref-link { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.ref-link input { font: 600 15px var(--mono); }
.history-table { display: grid; margin-top: 12px; border-top: 1px solid var(--line); container-type: inline-size; }
.history-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; overflow-wrap: anywhere; }
.history-row b { font-weight: 600; margin-right: 6px; }
.history-row .text-link { font-size: 12px; white-space: nowrap; }
.history-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@container (max-width: 560px) {
  .history-head { display: none; }
  .history-row { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .history-row > span:first-child { grid-column: 1 / -1; }
  .history-row > span:nth-child(3), .history-row > span:nth-child(4) { font-size: 12px; color: var(--muted); }
  .history-row > span:nth-child(4)::before { content: "→ "; }
  .history-row > span:nth-child(5)::before { content: "× "; }
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.stats div { padding: 14px; border-radius: var(--radius-small); background: var(--stats-bg); border: 1px solid var(--line); }
.stats strong { display: block; font-size: 28px; color: var(--accent-text); }
.stats span { font-size: 13px; color: var(--muted); }
.timeline { list-style: none; display: grid; gap: 8px; padding: 0; margin: 20px 0 0; }
.timeline li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.timeline span { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1px solid var(--line); }
.timeline li.done { color: var(--text-3); }
.timeline li.done span { color: var(--on-gold); background: var(--gold); border-color: transparent; }
.timeline li.current { color: var(--text-strong); font-weight: 700; }
.timeline li.current span { border-color: var(--gold); color: var(--accent-text); box-shadow: 0 0 0 4px rgba(231, 180, 74, .15); }
@media (min-width: 820px) { .timeline { grid-template-columns: repeat(6, 1fr); } .timeline li { flex-direction: column; text-align: center; font-size: 12px; } }
.order-cancelled { margin-top: 14px; color: var(--cancel-text); }

/* ---------- OTG Network и платформы ---------- */
.release-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 820px) { .release-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1280px) { .release-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.release-card { overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-raise); box-shadow: var(--shadow); transition: transform .25s, border-color .25s; }
.release-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.release-card img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #000; }
.release-card div { padding: 12px 14px 14px; }
.release-card span { font: 700 9px var(--mono); letter-spacing: .18em; color: var(--accent-text-2); }
.release-card h3 { font-size: 15px; margin-top: 4px; }
.release-card p { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.release-card a { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent-text); text-decoration: none; }
.release-card a:hover { text-decoration: underline; }
.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1024px) { .platform-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.platform-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); text-decoration: none; border: 1px solid var(--line); background: linear-gradient(165deg, var(--card-a), var(--card-b)); transition: transform .25s, border-color .25s; }
.platform-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.platform-card img { width: 52px; height: 52px; margin-bottom: 10px; }
.platform-name { font-size: 18px; font-weight: 800; }
.platform-card > span:not(.platform-name) { font-size: 13px; color: var(--muted); }
.platform-card b { margin-top: auto; padding-top: 10px; color: var(--accent-text); }

/* ---------- Подвал, уведомления, лицензия ---------- */
.brand-motto { display: grid; gap: 8px; justify-items: center; padding: 22px 0 6px; text-align: center; }
.brand-motto .motto { font: 700 12px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.brand-motto .motto span { color: var(--accent-text-2); }
.brand-motto .rights { font-size: 12px; color: var(--rights); }
.brand-motto .rights a { color: var(--rights-link); text-decoration: none; }
.brand-motto .rights a:hover { color: var(--accent-text); }
#toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 13px 18px; border-radius: 999px; font-weight: 700; color: var(--on-gold); background: var(--gold-light); box-shadow: var(--shadow); transition: .25s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.license-page { max-width: 860px; }
.license-page h2 { font-size: 20px; margin: 18px 0 4px; }
.license-page p, .license-page li { color: var(--text-2); }
.license-page a:not(.button) { color: var(--accent-text); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.license-page table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.license-page th, .license-page td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--text-2); }
.license-page th { color: var(--accent-text); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.license-page code { font: 13px var(--mono); color: var(--accent-text); }
/* На телефоне таблица превращается в карточки: у каждой ячейки своя подпись колонки. */
@media (max-width: 639px) {
  .license-page table, .license-page tbody, .license-page tr, .license-page td { display: block; width: 100%; }
  .license-page thead { display: none; }
  .license-page tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .license-page td { padding: 3px 0; border: 0; }
  .license-page td:first-child { font-weight: 700; color: var(--text); }
  .license-page td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); }
}
.license-page h3 { margin: 14px 0 4px; font-size: 16px; color: var(--text-strong); }
.license-page ol { padding-left: 22px; color: var(--text-2); }
.license-page ol li { margin: 6px 0; }

/* Статические страницы каталога /music/… (scripts/seo-pages.mjs) */
.seo-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.seo-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; color: var(--text-strong); }
.seo-brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong); }
.seo-lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 700 12px var(--mono); }
.seo-lang a, .seo-lang span { padding: 6px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.seo-lang span { color: var(--on-gold); background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); }
.seo-crumbs { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.seo-crumbs a { color: var(--accent-text); }
.seo-page h1 { font-size: clamp(28px, 5vw, 44px); margin: 6px 0 10px; overflow-wrap: anywhere; }
.seo-page .button-row { margin-top: 18px; }
.seo-tracks, .seo-categories { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.seo-tracks li, .seo-categories li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.seo-tracks a, .seo-categories a { font-weight: 700; }
.seo-tracks span, .seo-categories span { color: var(--muted); font-size: 13px; }
.seo-player { margin: 16px 0 0; display: grid; gap: 8px; }
.seo-player figcaption { font-size: 13px; color: var(--muted); }
.seo-player audio { width: 100%; max-width: 560px; }
.seo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 18px 0 0; }
.seo-facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.seo-facts dt { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text-2); }
.seo-facts dd { margin: 4px 0 0; color: var(--text-2); }
.catalog-link { justify-self: start; text-align: left; }

/* Частые вопросы (faq.html) */
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 8px 0; }
.faq-item summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--text-strong); list-style-position: inside; }
.faq-item summary:hover { color: var(--accent-text); }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item p { margin: 0; padding: 12px 16px 16px; }

/* Кнопка установки приложения (pwa.js) */
@media (min-width: 1024px) { .sidebar-footer .install-slot { flex: 0 0 auto; min-height: 0; justify-content: flex-start; } .install-slot:empty { display: none; } }
.install-app { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.install-app .icon { font-size: 15px; color: var(--accent-text); }

/* Сохранённые в приложении треки (saved-tracks.js) */
.saved-list { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); }
.saved-title { font-size: 18px; margin: 0; }
.saved-status { margin: 0; color: var(--accent-text); font-size: 14px; }

/* Строка под категориями: каталог и уведомления (push.js) */
.library-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.library-tools #push-slot, .library-tools [data-pre-id="push-slot"] { display: block; min-height: 40px; } /* место под кнопку уведомлений заранее — без сдвига */

/* Поиск и избранное в библиотеке */
.library-search input { width: 100%; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.library-search input:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.track-meta h3 .favorite { min-height: 0; padding: 0 4px; border: 0; background: none; box-shadow: none; font-size: 18px; line-height: 1; color: var(--accent-text); vertical-align: middle; }
.track-meta h3 .favorite[aria-pressed="false"] { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Готовая разметка главной и «Музыки для роликов» в index.html (scripts/prerender.mjs): видна только копия
   текущего раздела и языка, пока app.js не нарисует живую страницу той же разметкой. */
.prerender { display: none; }
html[data-route="overview"][data-lang="ru"] .prerender[data-prerender="overview"][data-lang="ru"],
html[data-route="overview"][data-lang="lv"] .prerender[data-prerender="overview"][data-lang="lv"],
html[data-route="overview"][data-lang="en"] .prerender[data-prerender="overview"][data-lang="en"],
html[data-route="library"][data-lang="ru"] .prerender[data-prerender="library"][data-lang="ru"],
html[data-route="library"][data-lang="lv"] .prerender[data-prerender="library"][data-lang="lv"],
html[data-route="library"][data-lang="en"] .prerender[data-prerender="library"][data-lang="en"] { display: block; }

/* Векторные значки (icons.js): размер от шрифта, цвет — золото через currentColor. */
.icon { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.14em; overflow: visible; }
.theme-toggle { display: inline-grid; place-items: center; line-height: 0; }
.theme-toggle .icon { font-size: 18px; }
.chip .icon-star-filled { color: var(--accent-text); margin-right: 6px; font-size: 14px; vertical-align: -0.12em; }
.push-button { display: inline-flex; align-items: center; gap: 8px; }
.push-button .icon { font-size: 16px; color: var(--accent-text); }
.checks li.gift .icon, .ref-banner .icon { color: var(--accent-text); font-size: 1.15em; vertical-align: -0.2em; margin-right: 4px; }
.button.youtube .icon { font-size: 14px; margin-right: 2px; vertical-align: -0.1em; }
.track-meta h3 .favorite { line-height: 0; }
.gold .icon { vertical-align: -0.12em; }

/* Играющий трек: кнопка мягко пульсирует золотом (effects.js добавляет короткий «прыжок» при запуске). */
@media (prefers-reduced-motion: no-preference) {
  .track.playing .play { animation: play-glow 2s ease-in-out infinite; }
}
@keyframes play-glow { 50% { box-shadow: 0 0 0 6px rgba(231, 180, 74, .16), 0 0 24px rgba(231, 180, 74, .22); } }

/* Снап — талисман OTG. Компьютер: сидит в боковой панели между меню и контактами, по центру.
   Телефон и планшет (боковая панель становится шапкой): по центру внизу страницы, над девизом. */
.mascot { margin: 0; }
.mascot img, img.mascot { display: block; height: auto; pointer-events: none; user-select: none; }
.mascot-sidebar { display: none; }
img.mascot-inline { width: min(180px, 48vw); margin: 4px auto 2px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .28)); }
@media (min-width: 1024px) {
  .mascot-sidebar { display: flex; flex: 1 1 auto; min-height: 0; align-items: center; justify-content: center; padding: 6px 0; }
  .mascot-sidebar img { width: 100%; max-width: 220px; max-height: 100%; object-fit: contain; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .3)); }
  .sidebar-footer { margin-top: 0; }
  img.mascot-inline { display: none; }
}

/* Видеофоны: сетка карточек с превью; ширина колонки зависит от формата (вертикальные — уже). */
.bg-filters { display: grid; gap: 10px; }
.bg-switches { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.bg-note { font-size: 13px; margin: 0; }
.bg-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bg-grid[data-format="v"] { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.bg-grid > .empty-state { grid-column: 1 / -1; }
.bg-card { display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-a), var(--panel-b)); }
.bg-frame { position: relative; overflow: hidden; border-radius: calc(var(--radius) - 6px); background: #07060a; aspect-ratio: 16 / 9; }
.bg-v .bg-frame { aspect-ratio: 9 / 16; }
.bg-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.bg-meta h3 { margin: 0; font-size: 15px; }
.bg-meta span { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bg-action { display: flex; font-size: 13px; }
.bg-action .text-link { line-height: 1.35; }
.bg-action .button { width: 100%; justify-content: center; }
@media (max-width: 439px) { .bg-grid[data-format="v"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bg-grid { grid-template-columns: 1fr; } }

/* Снап-помощник: погладь талисмана — откроется текстовый чат (snap-chat.js). На компьютере — в боковой панели под Снапом,
   на телефоне — снизу. Переписка живёт только в памяти вкладки. */
.snap-pettable { cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; border-radius: 18px; }
img.mascot-inline.snap-pettable { pointer-events: auto; }
.snap-pettable:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.snap-pettable.is-petted { animation: snap-wiggle .5s ease-in-out 2; }
@keyframes snap-wiggle { 25% { transform: rotate(-4deg) scale(1.03); } 75% { transform: rotate(4deg) scale(1.03); } }
.snap-heart { position: fixed; z-index: 80; color: var(--red); font-size: 18px; pointer-events: none; animation: snap-heart 1.1s ease-out forwards; }
@keyframes snap-heart { from { opacity: 1; transform: translate(-50%, -50%) scale(.6); } to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -90px) scale(1.2); } }
.snap-chat { display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--bg-raise); border: 1px solid var(--line-strong); border-radius: var(--radius-small); box-shadow: var(--shadow); padding: 10px; font-size: 14px; }
.snap-chat[hidden] { display: none; }
.snap-chat-head { display: flex; align-items: center; gap: 8px; }
.snap-chat-head strong { flex: 1; color: var(--accent-text); font-size: 14px; }
.snap-lessons { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-soft); font: inherit; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.snap-lessons .icon { font-size: 14px; color: var(--accent-text-2); }
.snap-lessons:hover { background: var(--surface-strong); }
.snap-lessons[aria-pressed="true"] { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--on-gold); border-color: transparent; }
.snap-lessons[aria-pressed="true"] .icon { color: var(--on-gold); }
.snap-lessons:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.snap-chat-close { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 8px; cursor: pointer; }
.snap-chat-close:hover { color: var(--text-strong); background: var(--surface-strong); }
.snap-chat-log { flex: 1 1 auto; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }
.snap-msg { max-width: 92%; padding: 8px 11px; border-radius: 12px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.snap-msg.from-snap { align-self: flex-start; background: var(--surface-strong); color: var(--text-soft); border-top-left-radius: 4px; }
.snap-msg.from-you { align-self: flex-end; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--on-gold); border-top-right-radius: 4px; }
.snap-msg.is-waiting { color: var(--muted); font-style: italic; }
.snap-chat-note { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.3; }
.snap-chat-form { display: flex; gap: 6px; }
.snap-chat-form input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; }
.snap-chat-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.snap-chat-form button { border: 0; border-radius: 10px; padding: 0 12px; background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--on-gold); font: inherit; font-weight: 700; cursor: pointer; }
.snap-chat-form button:disabled { opacity: .5; cursor: default; }
/* Телефон и планшет: чат выезжает снизу поверх страницы. */
.snap-chat.is-sheet { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 70; height: min(70vh, 520px); }
/* Компьютер: чат в боковой панели, Снап над ним становится меньше. */
@media (min-width: 1024px) {
  .mascot-sidebar.is-chatting { flex: 0 0 auto; padding: 0; }
  .mascot-sidebar.is-chatting img { max-width: 76px; }
  /* Чат забирает всё свободное место панели; если окно совсем низкое — панель прокручивается, как и раньше. */
  .sidebar.has-snap-chat { gap: 12px; }
  .sidebar > .snap-chat { flex: 1 1 0; min-height: 252px; }
  .sidebar > .snap-chat .snap-chat-log { min-height: 70px; }
  /* Пока идёт разговор, в панели остаются языки и тема; почта есть в подвале каждой страницы. */
  .sidebar.has-snap-chat .install-slot, .sidebar.has-snap-chat .sidebar-contact { display: none; }
}

