/* ==========================================================================
   ЙОШКАР-ОЛА: ИНТЕРАКТИВНЫЙ ПУТЕВОДИТЕЛЬ
   Дизайн-система: Премиальный кинематографичный стиль (Dark Luxury Editorial)
   ========================================================================== */

:root {
  /* Цветовая палитра */
  --bg-dark: #0b0b0d;
  --bg-card: rgba(22, 20, 22, 0.78);
  --bg-card-hover: rgba(36, 28, 31, 0.88);
  --bg-glass: rgba(16, 14, 16, 0.68);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(200, 16, 46, 0.4);

  /* Палитра Йошкар-Олы / флага Марий Эл: красный, белый, чёрный, бордовый */
  --accent-primary: #c8102e;        /* заливки, кнопки (белый текст на нём — 6:1) */
  --accent-primary-hover: #8f0c22;  /* ховеры, конец градиентов */
  --accent-bordeaux: #5a0a18;       /* вторичный тёмно-бордовый */
  --accent-red: #e0102f;
  --accent-crimson: #8f0c22;
  --accent-text: #ff6b7d;           /* красный для акцентного текста на тёмном (AA, 7:1) */

  /* Старые имена переменных сохранены для совместимости и переназначены на красную палитру */
  --accent-gold: #ff5468;           /* бывшее золото: акцентный цвет линий/иконок/текста */
  --accent-gold-light: #ffd9dd;     /* бывшее светлое золото: почти белый с красным оттенком */
  --accent-cyan: #f1f3f5;
  --accent-emerald: #6fcf8f;        /* только статусы «успешно/открыто» */

  /* Текст */
  --text-main: #ffffff;
  --text-secondary: #d6d3d4;
  --text-muted: #9a9496;
  --text-gold: #ffd9dd;
  --text-strong: #ffffff;           /* заголовки и «яркий» текст на фоне страницы */

  /* Поверхности темы. На фото и красных заливках цвета остаются литералами (#fff), не из темы */
  --fg-rgb: 255, 255, 255;          /* «стекло»: rgba(var(--fg-rgb), a) — оверлеи, рамки, ховеры */
  --bg-rgb: 11, 11, 13;             /* полупрозрачные панели: шапка, меню, таббар */
  --surface: #141214;               /* непрозрачные панели: модалки, палитра поиска, попапы */
  --surface-2: #1e1a1c;             /* заглушки картинок, вложенные блоки */
  --bg-hero: #0e0c0e;               /* подложка карт/видео */
  --bg-deep: #060506;               /* футер */
  color-scheme: dark;

  /* Шрифты */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-logo: 'Cinzel', serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Геометрия и отступы */
  --header-height: 72px;
  --nav-height: 0px; /* меню теперь в одной строке с шапкой; переменная оставлена для совместимости со стилями фич */
  --tabbar-h: 0px;   /* высота нижней панели вкладок; на мобильных (<768px) задаётся в layout.css */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Тени и свечения */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
  --glow-gold: 0 0 25px rgba(200, 16, 46, 0.35);
  --glow-red: 0 0 25px rgba(200, 16, 46, 0.35);

  /* Анимации */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Светлая тема. html[data-theme="light"] ставит js/features/theme.js (и инлайн-скрипт в <head> до отрисовки).
   Сначала — зоны, где текст лежит прямо на фото/3D-сцене: там текст остаётся белым */
html[data-theme="light"] .hero,
html[data-theme="light"] .entry-hero,
html[data-theme="light"] .fly,
html[data-theme="light"] .lb {
  --text-main: #ffffff;
  --text-secondary: #d6d3d4;
  --text-muted: #b5aeb0;
  --text-strong: #ffffff;
  --text-gold: #ffd9dd;
  --accent-text: #ff6b7d;
  --accent-gold: #ff5468;
  --accent-gold-light: #ffd9dd;
  --border-glass: rgba(255, 255, 255, 0.12);
  --fg-rgb: 255, 255, 255;
  --bg-rgb: 11, 11, 13;
  --bg-card: rgba(22, 20, 22, 0.78);
  --bg-glass: rgba(16, 14, 16, 0.68);
  --surface: #141214;
  --surface-2: #1e1a1c;
  color-scheme: dark;
}

/* …затем светлые токены: для всей страницы и для элементов управления внутри тёмных зон
   (поиск и кнопки на главном экране, плашки и карточки поверх фото, полёта и карты) */
html[data-theme="light"],
html[data-theme="light"] :is(.hero-search, .intent, .hero-caption, .hero-arrow, .apostles-mini--hero,
  .fly-text, .fly-info, .fly-quick, .fly-rail button span, .fly-pin-label,
  .fav-btn, .place-card-grid-badge, .map-info-badge, .map-action-pill, .toast) {
  --bg-dark: #f7f4f3;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --border-glass: rgba(22, 18, 20, 0.13);
  --border-glow: rgba(200, 16, 46, 0.35);

  --accent-text: #b00d28;
  --accent-gold: #c8102e;
  --accent-gold-light: #8f0c22;
  --accent-cyan: #161214;
  --accent-emerald: #1f8a4c;

  --text-main: #161214;
  --text-secondary: #3e3739;
  --text-muted: #6b6365;
  --text-gold: #8f0c22;
  --text-strong: #161214;

  --fg-rgb: 22, 18, 20;
  --bg-rgb: 252, 250, 249;
  --surface: #ffffff;
  --surface-2: #ece7e6;
  --bg-hero: #e9e4e2;
  --bg-deep: #efebe9;

  --shadow-sm: 0 4px 12px rgba(40, 20, 25, 0.1);
  --shadow-lg: 0 16px 40px rgba(40, 20, 25, 0.16);
  color-scheme: light;
}

html[data-theme="light"] .brand-name { background: linear-gradient(90deg, #161214 0%, #8f0c22 100%); -webkit-background-clip: text; background-clip: text; }

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

html {
  -webkit-text-size-adjust: 100%;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Высота «хрома» (шапка с меню в одну строку) — отступ для страниц и оверлеев */
body {
  --chrome-height: var(--header-height);
  overflow-x: hidden;
}

/* Полноэкранные режимы и открытые оверлеи: прокрутка страницы отключена */
body.mode-map,
body.menu-open,
body.modal-open {
  overflow: hidden;
}

body.mode-map {
  --chrome-height: var(--header-height);
}

a { color: inherit; }
img { max-width: 100%; }
button { font-family: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 1200;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ==========================================================================
   ФИКСИРОВАННЫЙ ХЕДЕР (HEADER) С ЭФФЕКТОМ СТЕКЛА
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(var(--bg-rgb), 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(var(--fg-rgb), 0.06);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  view-transition-name: site-header;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* В полноэкранном режиме карты шапка прозрачная поверх неё */
body.mode-map .site-header {
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.85) 0%, rgba(var(--bg-rgb), 0.4) 75%, transparent 100%);
}

.header-top {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
}

/* Логотип */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-primary-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-logo);
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
  position: relative;
  overflow: hidden;
}

.brand-emblem::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 60%);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-logo);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-main);
  background: linear-gradient(90deg, #fff 0%, #ffd9dd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--accent-gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Центральная панель: таймер часов 12 Апостолов */
.header-center {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.clock-widget-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(200, 16, 46, 0.1);
  border: 1px solid var(--border-glow);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.clock-widget-chip:hover {
  background: rgba(200, 16, 46, 0.2);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: var(--glow-gold);
}

.clock-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(200, 16, 46, 0); }
  100% { transform: scale(0.95); opacity: 0.7; box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

.clock-countdown-text {
  font-weight: 600;
  color: var(--accent-gold-light);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Правая панель: язык, избранное, маршрут */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Видимое поле поиска в шапке (иконка-кнопка #btn-search показывается только на узких экранах) */
.header-search {
  position: relative;
  flex: 0 1 190px;
  min-width: 140px;
}

.header-search-ico {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--text-muted);
  pointer-events: none;
}

.header-search-input {
  width: 100%;
  height: 40px;
  padding: 0 0.9rem 0 2.4rem;
  background: rgba(var(--fg-rgb), 0.07);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-strong);
  font: inherit;
  font-size: 0.88rem;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.header-search-input::placeholder { color: var(--text-muted); }
.header-search-input::-webkit-search-cancel-button { display: none; }
.header-search-input:hover { background: rgba(var(--fg-rgb), 0.1); }
.header-search-input:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2); background: rgba(var(--fg-rgb), 0.1); }
.icon-btn.header-search-btn { display: none; }

/* Кнопки переключения режимов (Слайды / Карта / Сетка) */
.view-switchers {
  display: flex;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.view-btn:hover {
  color: var(--text-main);
}

.view-btn.active {
  background: rgba(var(--fg-rgb), 0.15);
  color: var(--text-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Кнопка "Мой маршрут" */
.route-btn {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-primary-hover));
  color: #fff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(200, 16, 46, 0.35);
  transition: all var(--transition-fast);
}

.route-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.55);
}

.route-badge-count {
  background: #fff;
  color: var(--accent-red);
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Кнопка фильтра / каталога */
.filter-toggle-btn {
  background: rgba(var(--fg-rgb), 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.filter-toggle-btn:hover {
  background: rgba(var(--fg-rgb), 0.15);
  border-color: rgba(var(--fg-rgb), 0.25);
}

/* ==========================================================================
   КНОПКИ ОБЩИЕ
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  color: #fff;
  box-shadow: 0 4px 18px rgba(200, 16, 46, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 16, 46, 0.5);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
}

.btn-secondary {
  background: rgba(var(--fg-rgb), 0.1);
  color: var(--text-strong);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(var(--fg-rgb), 0.2);
  border-color: rgba(var(--fg-rgb), 0.3);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-primary-hover));
  color: #fff;
  box-shadow: 0 4px 18px rgba(200, 16, 46, 0.4);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 16, 46, 0.6);
}

/* ==========================================================================
   ТОСТ УВЕДОМЛЕНИЙ
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(var(--bg-rgb), 0.95);
  border: 1px solid var(--border-glow);
  color: var(--text-strong);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  animation: slide-in-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(12px);
}

@keyframes slide-in-toast {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   ШАПКА: добавочные элементы (язык, иконки, бургер)
   ========================================================================== */
a.view-btn { text-decoration: none; }

.lang-switch {
  display: flex;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover { color: var(--text-main); }
.lang-btn.is-active { background: rgba(var(--fg-rgb), 0.16); color: var(--text-strong); }

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.icon-btn:hover { background: rgba(var(--fg-rgb), 0.14); border-color: rgba(var(--fg-rgb), 0.3); }

.fav-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-count[hidden] { display: none; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(var(--fg-rgb), 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* В полноэкранном режиме карты нет строки меню — бургер доступен и на десктопе */
body.mode-map .burger { display: flex; }

.toast-star { color: var(--accent-gold); font-size: 1.1rem; }

/* ==========================================================================
   РЕЖИМЫ ДОСТУПНОСТИ (классы на <html> ставит layout.js по YO.store.a11y)
   ========================================================================== */
html.a11y-bigfont { font-size: 20px; }

html.a11y-contrast {
  --text-secondary: #ffffff;
  --text-muted: #e1e5ea;
  --border-glass: rgba(255, 255, 255, 0.5);
  --bg-card: #0b0e14;
}

html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   АДАПТИВНОСТЬ ШАПКИ
   Десктоп ≥1280px: логотип · меню · поиск · язык · маршрут. Ниже — бургер, поле поиска тянется, на <640px — иконка поиска.
   ========================================================================== */
.brand-link { flex-shrink: 0; }
.brand-sub, .clock-widget-chip { white-space: nowrap; }

@media (max-width: 1535px) {
  #btn-favorites { display: none; } /* избранное доступно в футере и мобильном меню; в шапке места нет */
  .route-ico { display: none; }
}

@media (max-width: 1439px) {
  .header-top { padding: 0 1rem; gap: 0.6rem; }
  .brand-name { font-size: 1.05rem; letter-spacing: 0.06em; }
  .header-search { flex-basis: 160px; min-width: 130px; }
  .route-btn { padding: 0.5rem 0.9rem; }
}

@media (max-width: 1699px) {
  .brand-sub { display: none; }
}

@media (max-width: 1279px) {
  #btn-favorites { display: inline-flex; }
  .route-ico { display: inline; }
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-top { padding: 0 1.25rem; }
  .header-search { flex: 1 1 auto; max-width: 380px; margin-left: auto; }
}

@media (max-width: 900px) {
  :root { --header-height: 64px; }
  .brand-sub { display: none; }
}

@media (max-width: 639px) {
  .header-search { display: none; }
  .icon-btn.header-search-btn { display: inline-flex; margin-left: auto; }
}

@media (max-width: 600px) {
  .header-top { padding: 0 0.75rem; gap: 0.5rem; }
  .header-actions { gap: 0.4rem; }
  .lang-switch { display: none; }

  .brand-name { font-size: 0.95rem; letter-spacing: 0.08em; }
  .brand-link { gap: 0.55rem; }

  /* «Мой маршрут» дублирует вкладку «Маршрут» нижней панели — освобождаем место под ИИ-гид и тему */
  body.has-tabbar .route-btn { display: none; }
  .route-btn span.label { display: none; }
  .route-btn { padding: 0.45rem 0.7rem; }

  .toast-container { right: 1rem; left: 1rem; bottom: 1rem; }
}

@media (max-width: 480px) {
  #btn-favorites { display: none; }
}

/* Переключатель темы: в тёмной теме показываем солнце (перейти к светлой), в светлой — луну */
.theme-btn .theme-ico-moon { display: none; }
html[data-theme="light"] .theme-btn .theme-ico-sun { display: none; }
html[data-theme="light"] .theme-btn .theme-ico-moon { display: block; }

/* Высокая контрастность в светлой теме: тёмный текст вместо белого */
html[data-theme="light"].a11y-contrast {
  --text-secondary: #000000;
  --text-muted: #2a2426;
  --border-glass: rgba(0, 0, 0, 0.5);
  --bg-card: #ffffff;
}

/* Светлая тема: кнопки и поля поверх фото, полёта и карты — белые, а не полупрозрачно-серые */
html[data-theme="light"] :is(.hero-search, .intent, .hero-caption, .hero-arrow, .apostles-mini--hero,
  .fly-text, .fly-info, .fly-quick, .fav-btn, .place-card-grid-badge, .map-info-badge,
  .map-action-pill:not(.active):not([aria-expanded="true"]), .toast):not(:hover) {
  background-color: rgba(255, 255, 255, 0.95);
}
html[data-theme="light"] :is(.intent, .hero-arrow, .map-action-pill:not(.active):not([aria-expanded="true"])):hover {
  background-color: #ffffff;
}
