:root {
  /* СВЕТЛАЯ тема — по умолчанию (усилена для читаемости, в т.ч. на солнце) */
  --bg: #e2e8f0;
  --bg-soft: #d8dfe9;
  --card: #ffffff;
  --card-2: #d9e1ec;
  --border: #7c8ba0;
  /* СВЕТЛАЯ ТЕМА: весь текст — средне-серым (04.10.2026, просьба владельца).
     Раньше заголовки были почти чёрные (--text #0f172a), а подписи — серо-синие.
     Теперь один цвет на всё: ни светло-серый, ни тёмно-серый, а средний.
     Тот же оттенок оставлен в тёмной теме — вернули к одному виду. */
  --text: #5a6474;
  --text-2: #5a6474;
  --muted: #5a6474;
  --accent: #6366f1;
  --accent-2: #4f46e5;
  --accent-grad: linear-gradient(135deg, #6366f1, #a855f7);
  --success: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 4px rgba(15, 23, 42, 0.1), 0 0 24px rgba(15, 23, 42, 0.2);
  --shadow-lg: 0 3px 8px rgba(15, 23, 42, 0.16), 0 0 14px rgba(15, 23, 42, 0.17);
  --header-bg: #ffffff;
  --nav-bg: #ffffff;
  --thumb-bg: #d5dde9;
  --overlay: rgba(15, 23, 42, 0.6);
  --nav-h: 70px;
  --header-h: 56px;
}

html[data-theme="dark"] {
  /* ТЁМНАЯ тема */
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #1e293b;
  --card-2: #273449;
  --border: #334155;
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --muted: #8a97ab;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 3px 8px rgba(0, 0, 0, 0.5), 0 0 14px rgba(0, 0, 0, 0.3);
  --header-bg: rgba(15, 23, 42, 0.92);
  --nav-bg: rgba(15, 23, 42, 0.96);
  --thumb-bg: #0b1220;
  --overlay: rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
  /* Фон-обои «мозаика» на всех страницах. Окно не скроллится (скроллит .app-main),
     поэтому fixed-attachment ведёт себя как статичная подложка. */
  background-color: var(--bg);
  background-image: url("../img/bg-mosaic-v5.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Тёмная тема: фон ОДНОТОННЫЙ (10.10.2026, просьба владельца).
   Раньше здесь была мозаика bg-mosaic-dark-v6.png с тонкими линиями —
   товары на ней читались как «обведённые по контуру». */
html[data-theme="dark"] body {
  background-image: none;
  background-color: var(--bg);
  background-attachment: scroll;
}

#app { height: 100%; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 20;
  position: relative;
}
.app-header .back-btn {
  background: var(--card-2);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  width: 46px; height: 46px;
  padding: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.app-header .back-btn svg {
  display: block;
  margin: 0; padding: 0;
  flex-shrink: 0;
}
.app-header .back-btn.muted { opacity: 0.35; }
/* Кнопка «Обновить» справа — зеркально стрелке «←», всегда видна, строго в правом углу шапки. */
.app-header .refresh-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: auto;
}
.app-header .refresh-ico { opacity: 0.92; }
/* Лупа поиска — рядом с «Обновить», на 8px левее него (тот же квадрат 46×46). */
.app-header .search-btn {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
}
.app-header .search-btn.cur { border-color: var(--accent); color: var(--accent); }

/* Выпадающее поле поиска: на всю ширину страницы, под шапкой. */
.search-panel {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 30;
  padding: 10px 12px 12px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 14px 22px rgba(15, 23, 42, 0.16);
}
.search-panel.open { display: block; }
.sp-row { display: flex; gap: 8px; }
.sp-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  outline: none;
}
.sp-input:focus { border-color: var(--accent); }
.sp-input::placeholder { color: var(--text-2); }
.sp-go {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-2);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.sp-go:active { transform: translateY(1px); }
.sp-hint { margin-top: 8px; font-size: 12px; line-height: 1.35; color: var(--text-2); }

.app-header .logo-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  max-width: calc(100% - 220px); /* не наезжать на кнопки слева (62px) и справа (110px на две) */
}
.app-header .logo {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.app-header .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-header h1 {
  font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
.app-header .header-sub { font-size: 12px; color: var(--text-2); font-weight: 400; text-align: center; }

/* ---------- Main ---------- */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: var(--nav-h);
}
/* ---------- Подвал (реквизиты получателя платежа) ---------- */
.app-footer {
  flex: 0 0 auto;
  padding: 3px 10px calc(var(--nav-h) + 6px);
  text-align: center;
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.page { padding: 16px; animation: fadeIn 0.18s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  background: var(--accent-grad);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.hero h2 { font-size: 22px; line-height: 1.2; margin-bottom: 6px; font-weight: 800; }
.hero p { font-size: 14px; opacity: 0.92; margin-bottom: 14px; }
.btn-light {
  background: #fff; color: #312e81;
  border: none; border-radius: 12px;
  padding: 11px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.hero::after {
  content: "💠";
  position: absolute; right: -10px; bottom: -24px;
  font-size: 120px; opacity: 0.18; transform: rotate(-12deg);
}
.hero-img { padding: 0; background: var(--card-2); }
.hero-img::after { display: none; }
.hero-img .hero-bg { width: 100%; display: block; }

/* ---------- Кнопка «Создать личный кабинет» приклеена к картинке (04.10.2026) ----------
   Картинка и кнопка — один блок: зазора нет, внутренние скругления убраны,
   рамка и тень живут на .hero-join. !important обязателен: margin-top у кнопки
   задан инлайном в joinBtnHtml(). */
.hero-join {
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--card-2);
}
.hero-join .hero { margin-bottom: 0; border: none; border-radius: 0; box-shadow: none; }
.hero-join .join-glued {
  margin-top: 0 !important;
  border-radius: 0;
  border-top: 1px solid var(--border);
}
.hero-cta {
  position: absolute;
  left: 8%; bottom: calc(21% - 18px);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; margin: 18px 0 12px;
}
.section-title a { font-size: 13px; color: var(--accent-2); text-decoration: none; font-weight: 600; }

/* Крупные заголовки секций по центру (для слабовидящих): сам заголовок и его
   перенесённые слова центрируются. Если в заголовке есть ссылка («Все →» у
   «Хиты продаж») — сетка 1fr auto 1fr держит заголовок строго по центру строки,
   а ссылку прижимает в самый правый край (для остальных big-center заголовков
   без ссылки span так же остаётся в средней колонке = по центру). */
.section-title.big-center {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 30px;
  text-align: center;
}
.section-title.big-center > span { grid-column: 2; justify-self: center; }
.section-title.big-center a { grid-column: 3; justify-self: end; font-size: 17px; margin-left: 0; }

/* Заголовок «Новости» на главной: над ним копятся отступы последнего баннера
   каталога (16px у .cat-banner + 4px у .banner-list) — компенсируем отрицательным
   маржином, чтобы зазор сверху и снизу заголовка стал одинаковым (~12px). */
.section-title.big-center.news-title { margin-top: -8px; }

/* Заголовки категорий в общем списке отзывов */
.rev-cat-title {
  font-size: 34px; font-weight: 800;
  color: #8b5cf6;
  letter-spacing: 0.4px;
  margin: 26px 0 8px;
  padding-bottom: 6px;
  border-bottom: 3px solid rgba(139, 92, 246, 0.35);
  text-transform: uppercase;
  text-align: center;
}
.rev-sub-title {
  font-size: 24px; font-weight: 700;
  color: var(--text-2);
  margin: 10px 0 6px;
  text-align: center;
}
.rev-cat-title:first-of-type { margin-top: 14px; }

/* Снятые с производства */
.disc-badge {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  text-align: center;
  margin-top: 12px;
}
.disc-btn .m-icon { filter: grayscale(0); }

/* ---------- Category banner (горизонтальный, на всю ширину) ---------- */
.banner-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.banner-list .cat-banner img { aspect-ratio: auto; object-fit: contain; background: var(--thumb-bg); }
.cat-banner {
  margin: 0 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.cat-banner img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}
.cat-banner:hover img { opacity: 0.94; }

/* ---------- Home: каталог (горизонтальные картинки-кнопки) ---------- */
.cat-img-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 0 16px 6px; margin: 0 -16px;
  scrollbar-width: none;
}
.cat-img-scroll::-webkit-scrollbar { display: none; }
.cat-img-card {
  flex-shrink: 0;
  width: 150px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  background: var(--card);
  position: relative;
}
.cat-img-card img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  display: block;
}
.cat-img-card span {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 6px;
  color: var(--text);
}

/* ---------- Categories ---------- */
.cat-scroll {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 4px; margin: 0 -16px; padding: 0 16px 4px;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all 0.15s ease;
  color: var(--text);
}
.cat-chip.active { background: var(--accent-grad); border-color: transparent; color: #fff; }
.cat-chip .emoji { font-size: 18px; }

/* ---------- Perks (преимущества под hero-картинкой) ---------- */
.perks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.perk {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
}
.perk .p-ico { font-size: 18px; flex-shrink: 0; }

/* ---------- Category cards (картинка + кнопка, как в боте) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.cat-card:active { transform: scale(0.97); }
.cat-card .thumb {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
  background: var(--card-2);
}
.cat-card img { width: 100%; aspect-ratio: 1; object-fit: cover; flex-shrink: 0; }
.cat-card .cc-body { flex: 1; padding: 10px 12px 4px; }
.cat-card .cc-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.cat-card .cc-count { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.cat-card .cc-price { font-size: 14px; font-weight: 800; color: var(--accent-2); margin-top: 2px; }
.cat-card .pc-add {
  margin: 8px 12px 12px; width: calc(100% - 24px);
  background: var(--accent-grad);
  border: none; color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ---------- Product cards / grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.product-card:active { transform: scale(0.97); }
.product-card .thumb {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  background: var(--card-2);
}
.product-card .pc-body { padding: 10px 12px 12px; }
.product-card .pc-cat { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; }
.product-card .pc-name {
  font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 36px; margin-top: 2px;
}
.product-card .pc-price { font-size: 16px; font-weight: 800; margin-top: 6px; color: var(--text); }
.product-card .pc-price s { font-size: 12px; color: var(--text-2); font-weight: 400; margin-left: 6px; }
.pc-add {
  margin-top: 8px; width: 100%;
  background: var(--accent-grad);
  border: none; color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.pc-add.added { background: var(--success); }

/* ---------- Product page ---------- */
.product-view .big-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 150px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.product-view .big-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  cursor: pointer;
}
.product-view .video-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.product-view .video-wrap video {
  width: 100%;
  display: block;
  background: #000;
}
.product-view .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.product-view .gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}
.product-view .pv-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 16px;
  white-space: normal;
  /* Долгое нажатие копирует текст в буфер — системное выделение отключаем,
     иначе оно конфликтует с нашим обработчиком. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.product-view .promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.product-view .promo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}
.product-view .video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.product-view .video-grid .video-wrap {
  margin-bottom: 0;
  aspect-ratio: 9/16;
  max-height: 320px;
}
.product-view .video-grid .video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 9/16;
}
/* Видео с подписью внизу (страница «Как сделать заказ») */
.video-item {
  display: flex;
  flex-direction: column;
}
.video-item .video-wrap {
  margin-bottom: 0;
}
.video-item .video-caption {
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
}
/* В сетке по 2 в ряд подпись короче: 3 строки, дальше многоточие (полный текст — в title). */
.product-view .video-grid .video-caption {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  padding: 6px 4px 8px;
}
.product-view .pv-cat { font-size: 12px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.product-view h2 { font-size: 22px; font-weight: 800; margin: 6px 0 10px; }
.product-view .pv-price { font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.product-view .pv-price s { font-size: 16px; color: var(--text-2); font-weight: 400; margin-left: 8px; }
.price-sub { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 3px; }
.price-sub.pv { font-size: 12px; font-weight: 700; color: var(--accent-2); }
.product-view .pv-price .price-sub { font-size: 15px; margin-top: 4px; }
.product-view .pv-price .price-sub.pv { font-size: 13px; }
.product-view .pv-desc { color: var(--text); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.badge-block { margin-top: 18px; }
.badge-nav {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none;
}
.badge-nav::-webkit-scrollbar { display: none; }
.badge-chip {
  flex-shrink: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 12px; font-size: 12px; color: var(--text-2);
}
.pv-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn-primary {
  flex: 1;
  background: var(--accent-grad);
  border: none; color: #fff;
  border-radius: 14px; padding: 14px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-primary.outline { background: var(--card); border: 1.5px solid var(--accent); color: var(--accent-2); }

/* ---------- News / channel ---------- */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
}
.news-card .nc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.news-card .nc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.news-card .nc-title { font-size: 15px; font-weight: 700; }
.news-card .nc-date { font-size: 12px; color: var(--text-2); }
.news-card .nc-text { font-size: 14px; line-height: 1.55; color: var(--text); }
.news-card .nc-tag {
  display: inline-block; margin-top: 10px;
  background: rgba(245, 158, 11, 0.15); color: var(--warn);
  border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 700;
  text-transform: uppercase;
}
.news-card .nc-tag.sale { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.news-card .subscribe-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.news-card .subscribe-bar p { font-size: 13px; color: var(--text-2); }

/* ---------- Live news from atomy.ru (картинки 2 в ряд) ---------- */
.news-live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.news-live-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease;
}
.news-live-card:active { transform: scale(0.98); }
.news-live-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg);
}

/* Скелетон вместо старой демо-заглушки новостей: пока живые картинки грузятся */
.news-skeleton { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.news-skeleton i {
  display: block;
  height: 132px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--bg) 40%, var(--border) 50%, var(--bg) 60%);
  background-size: 200% 100%;
  animation: newsShimmer 1.2s linear infinite;
}
@keyframes newsShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -80% 0; }
}

/* ---------- Subscribe button ---------- */
.btn-sub {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-2);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-sub.active { background: var(--accent-grad); border-color: transparent; color: #fff; }

/* ---------- Cart ---------- */
.cart-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--overlay);
  display: none;
  align-items: flex-end;
}
.cart-overlay.open { display: flex; }
.cart-panel {
  width: 100%;
  background: var(--bg-soft);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(var(--nav-h) + 16px);
  max-height: 82vh;
  overflow-y: auto;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.cart-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.cart-item .ci-thumb {
  width: 54px; height: 54px; border-radius: 10px;
  background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info .ci-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .ci-info .ci-price { font-size: 14px; font-weight: 800; margin-top: 2px; }
.qty { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.qty button {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer;
}
.qty span { min-width: 20px; text-align: center; font-weight: 700; }
.cart-total {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 17px; font-weight: 700;
}
.cart-total span { font-size: 22px; font-weight: 800; color: var(--accent-2); }
.cart-panel h3 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.cart-empty { text-align: center; color: var(--text-2); padding: 30px 0; font-size: 15px; }
.cart-empty .ce-icon { font-size: 48px; margin-bottom: 10px; }

/* ---------- Checkout ---------- */
.checkout-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 70px; }
.payment-opt {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
  font-size: 14px;
}
.payment-opt.selected { border-color: var(--accent); background: rgba(99, 102, 241, 0.1); }
.payment-opt input { accent-color: var(--accent); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.summary-row.total { font-size: 18px; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.summary-row.total span { color: var(--accent-2); }

/* ---------- Join (регистрация) ---------- */
.join-page .join-sub { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }
/* Экран выбора типа: рамка тянется на всю высоту (до нижней навигации), «Ещё» прижата книзу.
   ВАЖНО: высота НЕ фиксированная (раньше height:100%) — когда контент выше окна
   (развёрнутые варианты «Ещё», узкие окна), страница РАСТЁТ и низ достигается
   прокруткой .app-main. При влезании вид тот же: min-height заполняет всю высоту. */
.join-type-page {
  height: auto;
  min-height: max(100%, 420px);
  display: flex;
  flex-direction: column;
}
.join-type-page .join-type-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 16px 12px;
  box-shadow: var(--shadow-lg);
}
.join-big-wrap {
  display: flex;
  justify-content: center;
}
.join-big {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%; background: var(--accent-grad); color: #fff; border: none;
  border-radius: 16px; padding: 22px 16px; cursor: pointer;
}
.join-big .jb-ico { font-size: 38px; line-height: 1.2; }
.join-big .jb-name { font-size: 20px; font-weight: 800; }
.join-big .jb-desc { font-size: 12px; opacity: 0.92; }
/* Приветствие над большой кнопкой */
.join-hero { text-align: center; }
.join-hero .jh-title { font-size: 16px; font-weight: 800; color: var(--text); }
.join-hero .jh-welcome { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 8px; }
.join-hero .jh-text { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.join-hero .jh-note { font-size: 12px; color: var(--text-2); margin-top: 8px; }
/* Общая рамка: кнопка «Покупатель» и «Поддержка Атоми Россия» — одна карточка */
.join-united {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 12px 10px;
}
/* Поддержка под большой кнопкой — внутри общей рамки, без своей рамки/фона */
.join-support {
  text-align: center; padding: 2px 4px 4px;
}
.join-support .js-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-2); }
.join-support .js-inmax { font-size: 14px; font-weight: 800; color: var(--text); margin-top: 2px; }
.join-support .js-bot { font-size: 14px; font-weight: 800; color: var(--accent-2); margin-top: 4px; }
.join-support .js-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.join-support .js-sched-note { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.join-support .js-hours { font-size: 12px; color: var(--text-2); margin-top: 4px; }
/* Кнопка под большой кнопкой «Покупатель»:
   .jm-big — слово «Ещё ▾». Шрифт 13px → 26px (03.10.2026, просьба клиентов: «Ещё»
   было слишком мелким). Отступы подняты пропорционально, чтобы при крупном
   шрифте текст не лип к краям.
   Базовый .join-more (13px) остаётся для «Свернуть ▴» — туда просьба не касалась. */
.join-more {
  display: block; margin: auto auto 2px;
  background: none; border: none; color: var(--accent-2);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 14px;
}
.join-more.jm-big { font-size: 26px; padding: 8px 16px; }
.join-more.small { margin-top: auto; }
.join-variants { display: flex; flex-direction: column; gap: 10px; }
.join-variant {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; text-align: left;
  width: 100%; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 10px 14px 10px 11px; cursor: pointer;
}
.join-variant.on { border-color: var(--accent); background: rgba(99, 102, 241, 0.12); }
.join-variant .jv-ico { font-size: 24px; flex-shrink: 0; margin-left: 1px; }
.join-variant .jv-name { font-size: 15px; font-weight: 700; color: var(--text); }
/* Мелкий текст — на отдельной строке во всю ширину кнопки (выравнивание под названием,
   с отступом эмодзи): так ему не тесно рядом с названием и он не переносится */
.join-variant .jv-desc { display: block; font-size: 12px; color: var(--text-2); flex: 1 1 100%; margin-left: 38px; min-width: 0; }
.join-form { display: flex; flex-direction: column; gap: 12px; }
/* Экран согласий (шаг перед формой, как на atomy.ru) */
.join-agree-screen { display: flex; flex-direction: column; gap: 12px; }
.join-agree-screen .join-agree-note { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.join-row { display: flex; gap: 12px; }
.join-row .grow { flex: 1; }
.join-sex { display: flex; gap: 10px; }
.jsx {
  flex: 1; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600;
  color: var(--text); cursor: pointer; font-family: inherit;
}
.jsx.on { border-color: var(--accent); background: rgba(99, 102, 241, 0.12); color: var(--accent-2); }
.join-date { display: flex; gap: 8px; }
.join-date select { flex: 1; min-width: 0; }
.j-phone-hint { color: var(--muted); font-weight: 400; font-size: 12px; }
/* Подсказка под полем пароля: «пароль уже вбит, его лучше не менять» */
.join-note { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
/* Значок «i» с правилами пароля (попап при наведении/тапе, как на atomy.ru) */
.pw-field { position: relative; }
.pw-label { display: flex; align-items: center; gap: 6px; }
.pw-i {
  width: 19px; height: 19px; border-radius: 50%;
  border: 1.5px solid var(--accent); background: transparent;
  color: var(--accent); font-size: 12px; font-weight: 700; font-style: italic;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; font-family: inherit;
}
.pw-i:hover { background: rgba(99, 102, 241, 0.12); }
.pw-help {
  position: absolute; left: 0; right: 0; top: calc(100% - 2px); z-index: 60;
  display: none; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 10px 12px; font-size: 12px; color: var(--text-2); line-height: 1.45;
}
.pw-help .pw-t { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.pw-help .pw-lead { color: var(--text); font-weight: 600; margin-bottom: 6px; }
.pw-help ul { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.pw-help.open { display: block; }
.join-pw-note {
  background: rgba(99, 102, 241, 0.08); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.45;
}
.join-agree {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.ja-title { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 6px; }
.ja-title.opt { margin-top: 12px; }
.ja-master {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  background: rgba(99, 102, 241, 0.07); border-radius: 8px; padding: 8px 10px;
}
.ja-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2); line-height: 1.4;
  padding: 6px 8px; border-radius: 8px;
}
.ja-item:hover { background: var(--bg-soft); }
.ja-item .ji-label { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.ja-master input, .ja-item input { accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.ja-arrow {
  flex-shrink: 0; width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; color: var(--accent); font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0;
}
.ja-arrow:hover { background: var(--bg-soft); }
.ja-note { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.join-submit { width: 100%; margin-top: 6px; }
/* Полноэкранный просмотр текста соглашения (по стрелке ›) */
.join-agree-full {
  position: fixed; inset: 0; z-index: 10000; display: none;
  flex-direction: column; background: var(--bg);
}
.join-agree-full .jaf-top { display: flex; justify-content: flex-end; padding: 6px 10px; }
.join-agree-full .jaf-close {
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: var(--bg-soft); color: var(--text); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.join-agree-full .jaf-title {
  padding: 0 16px 12px; font-size: 17px; font-weight: 800; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.join-agree-full .jaf-body {
  flex: 1; overflow-y: auto; padding: 14px 16px 28px;
  font-size: 13.5px; line-height: 1.65; color: var(--text-2);
  white-space: normal; word-break: break-word;
}
.join-global { text-align: center; padding: 18px 6px; }
.join-global .jg-ico { font-size: 56px; margin-bottom: 10px; }
.join-global h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.join-global p { font-size: 14px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; }
.jg-url {
  background: var(--card); border: 1px dashed var(--border); border-radius: 10px;
  padding: 10px; font-size: 13px; color: var(--accent-2); margin-bottom: 14px;
  word-break: break-all;
}
.join-global .btn-primary { margin-bottom: 10px; }
.jg-copy { width: 100%; }

/* ---------- Success ---------- */
.success-block { text-align: center; padding: 40px 10px; }
.success-block .s-icon { font-size: 72px; margin-bottom: 16px; }
.success-block h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.success-block p { color: var(--text-2); font-size: 15px; line-height: 1.5; max-width: 300px; margin: 0 auto 20px; }

/* ---------- Join: финальная страница «Добро пожаловать!» (повтор atomy.ru) ---------- */
.join-done { text-align: center; padding: 34px 14px 20px; }
.join-done .jd-title { font-size: 24px; font-weight: 800; color: var(--accent-2); margin-bottom: 10px; }
.join-done .jd-name { font-size: 17px; font-weight: 800; letter-spacing: 0.3px; margin-bottom: 14px; }
.join-done p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 0 auto 12px; max-width: 320px; }
.join-done .jd-login {
  font-size: 40px; font-weight: 800; color: var(--accent);
  letter-spacing: 2px; margin: 18px auto 6px;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.join-done .jd-pass { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.join-done .jd-pass b { color: var(--accent-2); }
.join-done .jd-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.join-done .btn-primary { margin-top: 18px; }
.join-done .j-error {
  background: rgba(220, 60, 60, 0.1); border: 1px solid rgba(220, 60, 60, 0.35);
  color: #c24141; border-radius: 10px; padding: 10px 12px; font-size: 13px;
  margin: 12px auto; max-width: 320px; line-height: 1.4;
}

/* ---------- Join: экран «Регистрируем…» (опрос статуса воркера) ---------- */
.join-proc { text-align: center; padding: 60px 20px; }
.join-proc .jp-spin {
  width: 46px; height: 46px; margin: 0 auto 22px;
  border: 4px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: jp-spin 0.9s linear infinite;
}
@keyframes jp-spin { to { transform: rotate(360deg); } }
.join-proc .jp-main { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.join-proc .jp-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---------- Profile / account ---------- */
.profile-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 16px;
}
.setreg-card {
  background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 16px;
}
.profile-card .ava {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff;
  overflow: hidden;
}
.profile-card .ava img { width: 100%; height: 100%; object-fit: cover; }
.profile-card .pc-name { font-size: 17px; font-weight: 800; }
.profile-card .pc-line { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
.stat-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 8px; text-align: center;
}
.stat-box .st-num { font-size: 22px; font-weight: 800; color: var(--accent-2); }
.stat-box .st-label { font-size: 11px; color: var(--text-2); margin-top: 2px; }
/* Статистика подписок после удаления «В МП»: 2 колонки */
.stat-grid.stats-2 { grid-template-columns: repeat(2, 1fr); }

.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-btn {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  color: var(--text); font-size: 15px; font-weight: 600;
  cursor: pointer; text-align: left; text-decoration: none;
  width: 100%;
}
.menu-btn .m-icon { font-size: 20px; }
.menu-btn .arrow { margin-left: auto; color: var(--text-2); }

/* ---------- Поиск: результаты ---------- */
.sr-count {
  font-size: 13px; color: var(--text-2);
  margin: -4px 0 4px;
}
.sr-count b { color: var(--text); }
.sr-list { display: flex; flex-direction: column; gap: 8px; }
.sr-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.sr-item:active { background: var(--card-2); }
.sr-thumb {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--thumb-bg);
}
.sr-thumb-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.sr-kind {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: var(--card-2);
}
.sr-body { flex: 1 1 auto; min-width: 0; }
.sr-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.sr-name b, .sr-snip b { color: var(--accent-2); }
.sr-sub {
  font-size: 12px; color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sr-snip {
  font-size: 13px; line-height: 1.35;
  color: var(--muted);
  margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.sr-item .arrow { flex: 0 0 auto; color: var(--text-2); }
.sr-more { font-size: 12px; color: var(--text-2); text-align: center; padding: 10px 0 2px; }

/* Отзыв, к которому перешли из поиска, — на секунду подсвечивается. */
@keyframes sr-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
  25%, 70% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.55); }
}
.flash {
  animation: sr-flash 1.8s ease-out 1;
  border-radius: 12px;
}

/* Пустые разделы («Карта пунктов выдачи», «Как зарегистрироваться») */
.soon-block {
  padding: 28px 22px;
  text-align: center;
  color: var(--text-2);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  line-height: 1.6;
  font-size: 15px;
}
.soon-block .soon-ico { font-size: 44px; margin-bottom: 12px; }
.soon-block p { margin: 0; }

/* ---------- Theme switch (Профиль) ---------- */
.theme-row { display: flex; gap: 10px; margin-bottom: 16px; }
.theme-opt {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-opt .t-ico { font-size: 20px; flex-shrink: 0; }
.theme-opt.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}
/* Три режима (Авто / Светлая / Тёмная) — на узком экране 3 кнопки в ряд не влезают
   с обычным padding, поэтому для этого ряда свой, более компактный размер. */
.theme-row.three { gap: 8px; }
.theme-row.three .theme-opt { padding: 12px 4px; font-size: 13px; gap: 5px; }
.theme-row.three .theme-opt .t-ico { font-size: 17px; }
.theme-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  margin: -6px 0 16px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}

/* ---------- Ветки регистрации (Профиль, блок «Ссылки регистрации») ---------- */
.setreg-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; }
.branch-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.branch-btn {
  flex: 1 1 90px;
  padding: 9px 4px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.branch-btn.on {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}

/* ---------- Search ---------- */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 16px;
}
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; font-family: inherit;
}
.search-box .s-icon { font-size: 18px; }
.no-results { text-align: center; color: var(--text-2); padding: 30px 0; font-size: 15px; }

/* ---------- Bottom nav ---------- */
.app-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
}
/* Шапка и нижнее меню в светлой теме — ЧИСТО БЕЛЫЕ (задача 10.10.2026).
   Раньше было rgba(255,255,255,.97) с blur. Ночью WebView телефона (MAX) включал
   форс-дарк и перекрашивал их в тёмное, а картинки-обои не трогал — выглядело как
   «шапка и меню чёрные при светлом контенте». Теперь: непрозрачный белый фон +
   БЕЛЫЙ ГРАДИЕНТ КАК КАРТИНКА: элементы с фоном-изображением форс-дарк не меняет. */
html[data-theme="light"] .app-header,
html[data-theme="light"] .search-panel,
html[data-theme="light"] .app-nav {
  background-color: #ffffff;
  background-image: linear-gradient(0deg, #ffffff, #ffffff);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--text-2);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  position: relative;
  background: none; border: none;
  padding: 5px 0;
}
/* Высота блока иконки одинаковая у всех пунктов (04.10.2026): иначе пункт с
   кружком 44x44 (Главная) центрируется как более высокий блок, и его подпись
   садится ниже подписей соседей. */
.nav-item .n-icon { font-size: 21px; line-height: 1; height: 44px; display: flex; align-items: center; justify-content: center; }
/* Кружок вокруг иконки кнопки «Чат»: крупнее и в кружке (не сплющивается) */
.nav-item .n-icon.nav-cat {
  font-size: 26px;
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--card-2);
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  line-height: 1;
}
/* «Чат» — пункт-кнопка (action), маршрута у него нет, поэтому прежняя подсветка
   .nav-item.active здесь никогда не срабатывала. Оставлена как отклик на нажатие. */
.nav-item:active .n-icon.nav-cat {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.nav-item.active { color: var(--accent-2); }
.nav-item .nav-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* Статистика подписок (вкладка «Профиль») */
.stats-list { margin: 0 0 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stats-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.stats-row:last-child { border-bottom: none; }
.stats-row span:last-child { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.stats-row .sub-name { flex: 1 1 auto; min-width: 0; }
.stats-row .sub-phone { color: var(--accent); font-size: 11px; white-space: nowrap; }
.stats-row .sub-group { color: #30A46C; font-size: 11px; white-space: nowrap; font-weight: 600; }
.write-btn { flex: 0 0 auto; font: inherit; font-size: 12px; line-height: 1; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); cursor: pointer; white-space: nowrap; }
.write-btn:active { background: var(--accent); color: #fff; }
@media (min-width: 600px) { .write-btn { font-size: 13px; padding: 7px 12px; } }
.rev-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent-2); background: var(--card-2); border-radius: 10px; padding: 2px 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: all 0.25s ease;
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Skeleton ---------- */
.ske {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 37%, var(--card) 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
}
@keyframes sk {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- Hidden ---------- */

.hidden { display: none !important; }

/* Десктоп: МП — «телефонная» колонка 480px по центру, но на ВСЮ высоту окна.
   Высота = 100% от body (тот равен 100% от html = высота вьюпорта), а не 100vh:
   внутри окна мессенджера MAX 100vh иногда считается неверно. Кап в 840px больше
   не нужен — из-за него низ МП не доходил до низа окна и в MAX, и в браузере
   на компе, и окно приходилось растягивать мышью. Теперь МП занимает окно
   целиком по высоте при любой высоте окна, а transform на #app привязывает
   фиксированную навигацию к низу колонки (containing block). */
@media (min-width: 600px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Мозаика остаётся только внутри «телефона». Раньше она висела на body с
       background-size: cover, и когда окно MAX растягивали на весь экран, обои
       растягивались на 1920px, а МП оставался прежним — выглядело странно.
       Снаружи теперь спокойный нейтральный фон, рамка телефона видна. */
    background-image: none;
    background-color: #e7ebf2;
  }
  /* ТЁМНАЯ тема: фон ОДНОТОННЫЙ (10.10.2026, просьба владельца). Раньше здесь
     была мозаика bg-mosaic-dark-v6.png с тонкими линиями — товары на ней
     читались как «обведённые по контуру». */
  html[data-theme="dark"] body { background-image: none; background-color: #0a0e16; }
  html[data-theme="dark"] #app { background-image: none; background-color: var(--bg); }
  #app {
    width: 480px;
    max-width: 480px;
    /* Во всю высоту окна: body — это 100% от html, то есть ровно вьюпорт.
       max-height: 100vh оставлен как страховка на случай, если окружение
       (окно MAX) посчитает проценты иначе. */
    height: 100%;
    min-height: 100%;
    max-height: 100vh;
    margin: 0;
    transform: translateZ(0);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.28);
    background-color: var(--bg);
    background-image: url("../img/bg-mosaic-v5.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Не fixed: внутри карточки fixed считал бы от окна, а не от #app. */
    background-attachment: scroll;
  }
  html[data-theme="dark"] #app { background-image: none; background-color: var(--bg); }
  .app-nav { left: 0; right: 0; transform: none; max-width: none; border-radius: 0 0 28px 28px; }
  .cart-overlay { max-width: 480px; left: 50%; transform: translateX(-50%); width: 100%; }
}
  html[data-theme="dark"] #app { background-image: none; background-color: var(--bg); }

  .app-nav { left: 0; right: 0; transform: none; max-width: none; border-radius: 0; }
  .cart-overlay { max-width: 480px; left: 50%; transform: translateX(-50%); width: 100%; }
}

.product-view .empty-reviews {
  padding: 24px;
  text-align: center;
  color: var(--muted, #7a868f);
  font-size: 14px;
  background: var(--card, #fff);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  line-height: 1.6;
}

.product-view .review-card {
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.product-view .review-card img {
  width: 100%;
  display: block;
  cursor: pointer;
}
.product-view .review-card .review-cap,
.product-view .review-card .review-text {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
/* Текст отзыва копируется долгим нажатием — системное выделение отключаем. */
.product-view .review-card .review-text {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.product-view .seq-item {
  position: relative;
  margin-bottom: 14px;
}
.product-view .seq-item img {
  width: 100%;
  display: block;
  cursor: pointer;
  border-radius: var(--radius);
}
.product-view .seq-num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- Lightbox (полноэкранный просмотр фото) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.93);
  display: none; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw; max-height: 94vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
  cursor: default;
  animation: lbIn 0.2s ease;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
@keyframes lbIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.lightbox-close {
  position: absolute; top: 14px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; z-index: 2;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
/* Кнопка «Скачать фото» в просмотре картинки: тот же вид, что у видео (.fv-dl),
   но СЛЕВА сверху — крестик закрытия остаётся справа (фото не поворачивается). */
.lb-dl { position: absolute; top: 14px; left: 18px; right: auto; }
/* При открытом лайтбоксе нижняя навигация скрыта, чтобы случайно не телепортировать */
body.lb-open .app-nav { display: none; }
/* ---------- Fullscreen video player ---------- */
.fv {
  position: fixed; inset: 0; z-index: 1200;
  background: #000;
  display: none; align-items: center; justify-content: center;
}
.fv.open { display: flex; }
.fv #fv-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.fv video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
  cursor: default;
  animation: lbIn 0.2s ease;
}
.fv.land video {
  width: 100vh; height: 100vw;
  transform: rotate(90deg);
}
.fv .lightbox-close { background: rgba(255, 255, 255, 0.18); }
/* Горизонтальный ролик (экран повёрнут на 90°): кнопки переезжают к «верху» ролика —
   Скачать в правый верхний угол экрана, Закрыть в правый нижний угол экрана.
   (верх ролика после rotate(90deg) лежит на правом краю экрана) */
.fv.land .fv-dl {
  top: 14px;
  left: auto;
  right: 18px;
  transform: rotate(90deg);
}
.fv.land .fv-dl:active {
  transform: rotate(90deg) scale(0.94);
}
.fv.land .lightbox-close {
  top: auto;
  bottom: 14px;
  right: 18px;
}
/* «Три точки» (меню скорости) — своя кнопка для повёрнутых горизонтальных роликов:
   у них нативное меню браузера открывается за кадром, поэтому своё. */
.fv-dots {
  position: absolute; left: 18px; bottom: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.18);
  color: #fff; cursor: pointer; z-index: 2;
  display: none; align-items: center; justify-content: center; padding: 0;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.fv.land .fv-dots { display: flex; transform: rotate(90deg); }
.fv-dots:hover { background: rgba(255, 255, 255, 0.32); }
.fv-dots:active { transform: scale(0.94); }
.fv.land .fv-dots:active { transform: rotate(90deg) scale(0.94); }
/* Кнопка звука — рядом с «Три точки» (только на горизонтальных роликах) */
.fv-mute {
  position: absolute; left: 18px; bottom: 70px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.18);
  color: #fff; cursor: pointer; z-index: 2;
  display: none; align-items: center; justify-content: center; padding: 0;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.fv.land .fv-mute { display: flex; transform: rotate(90deg); }
.fv.land .fv-mute:active { transform: rotate(90deg) scale(0.94); }
.fv-mute:hover { background: rgba(255, 255, 255, 0.32); }
.fv-mute .fv-mute-off { display: none; }
.fv-mute.muted .fv-mute-on { display: none; }
.fv-mute.muted .fv-mute-off { display: block; }
/* Меню скорости */
.fv-speed {
  position: absolute; left: 18px; bottom: 70px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 6px;
  z-index: 5;
  display: none; flex-direction: column;
  min-width: 96px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.fv-speed.open { display: flex; }
/* В режиме горизонтального ролика меню тоже повёрнуто на 90° (как сам ролик):
   в кадре ролика открывается вертикально над кнопкой «⋮» (на экране — правее кнопки). */
.fv.land .fv-speed {
  left: 110px;
  bottom: 70px;
  transform: rotate(90deg);
}
.fv-speed-opt {
  background: none; border: none; color: #e2e8f0;
  font-size: 14px; font-weight: 600;
  text-align: left; padding: 8px 12px; border-radius: 9px; cursor: pointer;
}
.fv-speed-opt:hover { background: rgba(255, 255, 255, 0.12); }
.fv-speed-opt.cur { color: #25d366; }
/* Кнопка «Скачать» в полноэкранном плеере (слева сверху) */
.fv-dl {
  position: absolute; top: 14px; left: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.18);
  color: #fff; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.fv-dl:hover { background: rgba(255, 255, 255, 0.32); }
.fv-dl:active { transform: scale(0.94); }
.fv-dl.dl-active { background: rgba(37, 211, 102, 0.45); }
.fv-dl.dl-running { pointer-events: none; opacity: 0.9; }
/* Полоса прогресса скачивания (вверху плеера) */
.fv-progress {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255, 255, 255, 0.15); z-index: 3;
  display: none;
}
.fv-progress.on { display: block; }
.fv-progress-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #25d366, #00c853);
  transition: width 0.25s ease;
  position: relative;
}
.fv-progress-fill.indet {
  width: 34%;
  animation: dlIndet 1.1s ease-in-out infinite;
}
@keyframes dlIndet {
  0% { margin-left: -35%; } 100% { margin-left: 100%; }
}
.fv-progress-txt {
  position: absolute; top: 8px; right: 12px;
  color: #fff; font-size: 12px; font-weight: 700;
  background: rgba(0, 0, 0, 0.55); padding: 4px 10px; border-radius: 20px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
/* Попап «Загрузка завершена» */
.fv-dl-done {
  position: absolute; inset: 0; z-index: 4;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}
.fv-dl-done.on { display: flex; }
.fv-dl-done-box {
  background: #fff; border-radius: 18px; padding: 26px 30px;
  max-width: 82vw; text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  animation: dlPop 0.25s ease;
}
html[data-theme="dark"] .fv-dl-done-box { background: #1e293b; color: var(--text); }
@keyframes dlPop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.fv-dl-done-ico { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.fv-dl-done-title { font-size: 17px; font-weight: 800; color: #10b981; margin-bottom: 6px; }
.fv-dl-done-name { font-size: 13px; font-weight: 600; color: var(--text-2); word-break: break-all; line-height: 1.4; }
html[data-theme="dark"] .fv-dl-done-name { color: #cbd5e1; }
.fv-dl-done-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
html[data-theme="dark"] .fv-dl-done-hint { color: #64748b; }
.fv-dl-done-ok {
  margin-top: 16px; padding: 10px 34px; border: none; border-radius: 999px;
  background: #25d366; color: #fff; font-size: 15px; font-weight: 800;
  cursor: pointer;
}
.fv-dl-done-ok:hover { background: #1eb958; }
/* ---------- Меню материала (долгое нажатие / ПКМ: сохранить, копировать, переслать) ---------- */
/* z-index 1300 — выше плеера (1200) и лайтбокса (1000): меню открывается и поверх них */
.share-sheet { position: fixed; inset: 0; z-index: 1300; display: none; }
.share-sheet.open { display: block; }
.share-backdrop { position: absolute; inset: 0; background: var(--overlay); }
.share-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.3);
  padding: 6px 10px calc(14px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  animation: shareUp 0.18s ease-out;
}
@keyframes shareUp { from { transform: translateY(20px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.share-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border); opacity: 0.55; margin: 4px auto 6px; }
.share-title { font-size: 14px; font-weight: 800; color: var(--muted); text-align: center; padding: 2px 6px 8px; }
.share-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border: none; background: none;
  /* font-family обязателен: без него <button> рисуется шрифтом браузера (Arial),
     а не шрифтом приложения — ровно тот баг, из-за которого прыгали кнопки. */
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--text);
  text-align: left; cursor: pointer; border-radius: 12px;
}
.share-row:active { background: var(--card-2); }
.share-row:hover { background: var(--card-2); }
.share-ico { width: 28px; flex: 0 0 28px; text-align: center; font-size: 20px; line-height: 1; }

/* ---------- Chat (демо-переписка) ---------- */
.chat-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.chat-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 4px 12px;
}
.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 82%;
}
.msg.mine {
  align-items: flex-end;
  align-self: flex-end;
}
.msg-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 3px;
  padding: 0 4px;
}
.msg-bubble {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  padding: 10px 13px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
  box-shadow: var(--shadow);
}
.msg.mine .msg-bubble {
  background: var(--accent-grad);
  border-color: transparent;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  color: #fff;
}
.msg-time {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
  padding: 0 4px;
}
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
  border-top: 1px solid var(--border);
}
.chat-input input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 11px 16px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.btn-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--accent-grad);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-input input:disabled,
.btn-send:disabled { opacity: 0.5; cursor: default; }

/* ── 10.10.2026, просьба владельца: в ТЁМНОЙ теме товары однотонные ──
   Раньше карточки рисовались рамкой `--border` и свечением `--shadow-lg`
   (0 0 14px) — на тёмном фоне это читалось как «контур» вокруг каждого
   товара. Убираем обводку и свечение, оставляем ровную однотонную заливку.
   Светлая тема не тронута. */
html[data-theme="dark"] .cat-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .review-card,
html[data-theme="dark"] .card {
  border-color: transparent;
  box-shadow: none;
  background-color: var(--card);
  background-image: linear-gradient(var(--card), var(--card));
}
html[data-theme="dark"] .cat-card .thumb,
html[data-theme="dark"] .product-card .thumb {
  background-color: var(--card);
  background-image: linear-gradient(var(--card), var(--card));
}
html[data-theme="dark"] .cat-card:active,
html[data-theme="dark"] .product-card:active {
  box-shadow: none;
}

/* ── 10.10.2026: НОЧНОЙ РЕЖИМ ТЕЛЕФОНА НЕ ДОЛЖЕН ЛОМАТЬ СВЕТЛУЮ ТЕМУ ──
   Android WebView (внутри MAX) после 22:00 включает принудительное
   перекрашивание (Auto/Force Dark): светлая шапка и нижнее меню
   становились чёрными, а текст — нет (жалоба владельца 10.10.2026,
   замер по скрину: шапка 94 % чёрного, меню 93 % чёрного).
   Работают два приёма:
   1) страница объявляет себя СТРОГО светлой — color-scheme: only light.
      Обычного «light» в WebView MAX не хватает: он всё равно красит.
   2) фон шапки, меню и карточек задан однотонным градиентом — браузер
      не инвертирует элементы, у которых есть фоновое изображение. */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] .app-header,
html[data-theme="light"] .app-nav,
html[data-theme="light"] .search-panel,
html[data-theme="light"] .card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .review-card {
  color-scheme: only light;
}
html[data-theme="light"] body {
  /* Мозаику НЕ трогаем (правило владельца): это тоже фон-картинка,
     ночной форс-дарк её не перекрашивает. */
  background-image: url("../img/bg-mosaic-v5.png");
}
html[data-theme="light"] .card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .review-card {
  background-image: linear-gradient(#ffffff, #ffffff);
}

/* ── 10.10.2026: «ШИФР» ОТ НОЧНОГО РЕЖИМА (второй уровень защиты) ──
   Первый уровень — color-scheme: only light выше. Но старые WebView могут
   проигнорировать его и всё равно перекрасить страницу ночью. Тогда работает
   «шифр»: тот же ПРОЗРАЧНЫЙ градиент объявляет фон каждого элемента
   КАРТИНКОЙ, а форс-дарк инвертирует только сплошные цвета — картинки
   не трогает. Визуально правило ничего не меняет (градиент прозрачный),
   а элементы со СВОИМИ фонами-картинками (обои, градиентные кнопки,
   белые шапки/меню) перекрывают его собственными правилами — у тех
   специфичность выше, и они стоят после. */
* {
  background-image: linear-gradient(0deg, transparent, transparent);
}
/* Нативные галочки/радио/селекты шифром НЕ трогаем: если задать им фон-картинку,
   браузер теряет нативную галочку и стрелку. Их от ночного режима защищает
   первый уровень — color-scheme: only light. */
input[type="checkbox"],
input[type="radio"],
select,
option {
  background-image: none;
}
