/* ============================================================
   ЕССЕНТУКИ — городской справочник
   Дизайн: минимализм + «жидкое стекло» (glassmorphism, Apple-like)
   ============================================================ */

:root {
  --bg: #eef1f5;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --hairline: rgba(0, 0, 0, .08);

  --accent: #0d8f8a;          /* минеральный бирюзовый */
  --accent-soft: rgba(13, 143, 138, .12);
  --link: #0071e3;

  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .74);
  --glass-border: rgba(255, 255, 255, .65);
  --shadow: 0 8px 32px rgba(31, 38, 135, .12);
  --shadow-lg: 0 16px 48px rgba(31, 38, 135, .16);

  --radius: 22px;
  --radius-sm: 14px;
  --pill: 999px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* тема: светлая по умолчанию; тёмная включается переключателем в шапке (html.dark) */
:root { color-scheme: light; }

:root.dark {
  color-scheme: dark;
  --bg: #0d1016;
  --text: #f5f5f7;
  --muted: #98989d;
  --hairline: rgba(255, 255, 255, .09);

  --accent: #4fd8ce;
  --accent-soft: rgba(79, 216, 206, .14);
  --link: #6cb8ff;

  --glass: rgba(24, 28, 35, .55);
  --glass-strong: rgba(28, 32, 40, .78);
  --glass-border: rgba(255, 255, 255, .14);
  --shadow: 0 8px 32px rgba(0, 0, 0, .38);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .45);
}

/* ---------- база ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* градиентный фон-«аврора» под стеклом */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.aurora::after { /* лёгкая зернистость, чтобы стекло «жило» */
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.35) .5px, transparent .6px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: drift 26s ease-in-out infinite alternate;
}
.blob-1 { width: 46vw; height: 46vw; left: -10vw; top: -12vw;  background: #9fe8e0; }
.blob-2 { width: 40vw; height: 40vw; right: -8vw; top: -6vw;   background: #b8d7ff; animation-delay: -8s; }
.blob-3 { width: 44vw; height: 44vw; right: -6vw; bottom: -16vw; background: #ded1ff; animation-delay: -16s; }
.blob-4 { width: 34vw; height: 34vw; left: -6vw;  bottom: -10vw; background: #ffe9b8; animation-delay: -12s; }

/* ночью «аврора» приглушается */
html.dark .blob { opacity: .5; }
html.dark .blob-1 { background: #0e4f49; }
html.dark .blob-2 { background: #16406e; }
html.dark .blob-3 { background: #3b3170; }
html.dark .blob-4 { background: #4d3f1c; }
html.dark .aurora::after { opacity: .25; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vw, 3vw) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  html { scroll-behavior: auto; }
}

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(34px, 6vw, 56px); margin: 0 0 12px; }
h2 { font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 8px; }
h3 { font-size: 18px; margin: 0 0 6px; }

p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.lead { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 62ch; }

/* ---------- стеклянные панели ---------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.panel { padding: 24px 26px; }

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 14px;
  z-index: 100;
  max-width: 1100px;
  margin: 14px auto 0;
  border-radius: var(--pill);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 12px 9px 20px;
}
.brand {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--text);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #7ef0e5, var(--accent) 70%);
  box-shadow: 0 0 10px rgba(13, 143, 138, .55);
}

.nav-scroller {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.nav-arrow {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.nav-arrow:hover { background: var(--accent-soft); }
.nav-arrow:active { transform: scale(.92); }
.nav-arrow[hidden] { display: none; }

.main-nav {
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 7px 13px;
  border-radius: var(--pill);
  transition: background .18s ease, color .18s ease;
}
.main-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.main-nav a.active {
  background: var(--text);
  color: var(--bg);
}

/* переключатель день/ночь: тема меняется мгновенно, как тумблер */
.theme-btn {
  flex: none;
  width: 42px; height: 42px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, background .18s ease;
}
.theme-btn:hover { transform: rotate(15deg) scale(1.06); }

/* бургер */
.burger {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-strong);
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .22s ease, top .22s ease;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 24px; }
.nav-open .burger span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-open .burger span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; margin-left: 0; }
  .theme-btn { margin-left: auto; }
  .site-header { border-radius: var(--radius); }
  .header-inner { flex-wrap: wrap; }
  .nav-scroller {
    order: 3;
    width: 100%;
    margin: 4px 0 8px;
  }
  .nav-arrow { display: none; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    overflow: visible;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 11px 14px; }
}

/* ---------- герой ---------- */

.hero {
  margin: 40px auto 0;
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
}
.hero h1 {
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 72%, var(--accent)));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lead { margin: 0 auto 20px; }
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.chip b { font-weight: 700; }

/* ---------- секции ---------- */

section { margin: 30px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; }
.section-more { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ---------- плитки-разделы ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 8 плиток = ровные 4×2, без вытянутого хвоста */
  gap: 14px;
}
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  display: block;
  padding: 18px 16px;
  color: var(--text);
  transition: transform .22s ease, box-shadow .22s ease;
}
.tile:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.tile .tile-ico:empty { display: none; }
.tile b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.tile span.tile-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: block; }

/* ---------- карточки / сетки ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.card {
  padding: 22px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .45); }
.card-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) - 10px);
  border: 1px solid var(--glass-border);
  margin: 0 0 14px;
  display: block;
  background: var(--glass);
}
.card:hover .card-photo { opacity: .95; }
.hero-photo {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  margin-top: 20px;
  display: block;
}
@media (max-width: 640px) { .hero-photo { aspect-ratio: 16 / 10; } }
.card h3 { display: flex; align-items: center; gap: 8px; }
.card .card-tag { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
.card ul { margin: 8px 0 0; padding-left: 18px; }
.card li { margin-bottom: 5px; font-size: 14.5px; }

/* большие цифры */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.stat { padding: 18px 20px; text-align: center; }
.stat b {
  display: block;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, var(--text), var(--accent));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- таблицы ---------- */

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
  padding: 14px 14px 8px;
  white-space: nowrap;
}
tbody td { padding: 12px 14px; vertical-align: top; }
tbody tr + tr td { border-top: 1px solid var(--hairline); }
tbody td:first-child { font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; }

/* ---------- бейджи, заметки ---------- */

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 20px;
  margin-top: 30px; /* вертикальный ритм как у section, чтобы карточки не склеивались */
  font-size: 14px;
  color: var(--muted);
}
.notice .notice-ico { font-size: 18px; line-height: 1.4; }

/* ---------- рекламные слоты ---------- */

.ad-slot {
  position: relative;
  padding: 30px 24px 24px;
  margin-top: 30px; /* отступ от блока сверху, чтобы карточки не ложились друг на друга */
  text-align: center;
}
.ad-slot::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
  transition: border-color .2s ease;
}
.ad-slot:hover::before { border-color: var(--accent); }
.ad-badge {
  position: relative;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.ad-slot-body strong { display: block; font-size: 17px; margin-bottom: 4px; }
.ad-slot-body p { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
.ad-link { font-size: 14px; font-weight: 600; }
.ad-slot-banner { padding: 24px 20px 20px; }

/* карточка-заглушка заведения (тоже рекламный инвентарь) */
.ad-card { text-align: center; border-style: dashed; border-width: 1.5px; border-color: color-mix(in srgb, var(--muted) 40%, transparent); box-shadow: none; background: color-mix(in srgb, var(--glass) 60%, transparent); }
.ad-card .ad-badge { margin-top: 2px; }
/* витрина «Популярные места» на главной — карточки-идеи слотов */
.place-grid .ad-card { text-align: left; }
.place-grid .ad-card .ad-link { display: inline-block; margin-top: auto; }

/* ---------- кнопки / табы ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn.ghost { background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-border); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  padding: 9px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.tab.on { background: var(--text); color: var(--bg); }
.tab-panel { display: none; }
.tab-panel.on { display: block; }

/* ---------- маршруты ---------- */

.route { padding: 24px 26px; }
.route-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.route ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.route ol li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 44px;
  font-size: 15px;
}
.route ol li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.route ol li::after {
  content: "";
  position: absolute;
  left: 13.5px; top: 30px; bottom: 2px;
  width: 1.5px;
  background: var(--hairline);
}
.route ol li:last-child { padding-bottom: 0; }
.route ol li:last-child::after { display: none; }
.route ol li b { display: block; }
.route ol li span { color: var(--muted); font-size: 14px; }
.route .route-tip {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 14px;
}

/* ---------- таймлайн ---------- */

.timeline { list-style: none; margin: 0; padding: 6px 0 0; }
.timeline li {
  position: relative;
  padding: 0 0 20px 84px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 55px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 59px; top: 22px; bottom: 4px;
  width: 1.5px;
  background: var(--hairline);
}
.timeline li:last-child::after { display: none; }
.timeline b.year {
  position: absolute;
  left: 0; top: 2px;
  width: 44px;
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.timeline p { margin: 0; font-size: 15px; }

/* ---------- погода ---------- */

.weather-now {
  padding: clamp(26px, 5vw, 44px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 44px);
  text-align: center;
}
.weather-emoji { font-size: clamp(56px, 9vw, 84px); line-height: 1; filter: drop-shadow(0 6px 18px rgba(31, 38, 135, .18)); }
.weather-temp { font-size: clamp(44px, 8vw, 72px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.weather-desc { font-size: 17px; font-weight: 600; }
.weather-extra { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}
.fc { padding: 14px 8px; text-align: center; }
.fc .fc-day { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.fc .fc-emoji { font-size: 26px; margin: 6px 0 4px; }
.fc .fc-desc { font-size: 12px; color: var(--muted); margin: 6px 0 4px; line-height: 1.25; }
.fc .fc-temps { font-size: 14px; font-weight: 700; }
.fc .fc-temps span { color: var(--muted); font-weight: 500; }

/* ---------- карта ---------- */

.map-frame { padding: 10px; }
#city-map { height: min(72vh, 640px); border-radius: calc(var(--radius) - 8px); z-index: 1; }
.map-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filter-chip {
  padding: 8px 15px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.filter-chip.on { background: var(--text); color: var(--bg); }

.leaflet-container { font-family: var(--font); background: var(--glass-strong); }
.leaflet-popup-content-wrapper {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.leaflet-popup-tip { background: var(--glass-strong); border: 1px solid var(--glass-border); }
.leaflet-popup-content { margin: 14px 16px; font-size: 14px; }
.leaflet-popup-content b { font-size: 15px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-bar a {
  background: var(--glass-strong);
  color: var(--text);
  border-bottom: 1px solid var(--glass-border);
}
.leaflet-bar a:hover { background: var(--glass); color: var(--accent); }
.leaflet-control-layers {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text);
}
.leaflet-control-layers-expanded {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}
.leaflet-control-layers-list label { margin: 4px 0; cursor: pointer; }
.leaflet-control-layers-list label:hover { color: var(--accent); }
.leaflet-control-attribution { background: rgba(255,255,255,.6) !important; color: #555 !important; font-size: 10px !important; }
/* карта ночью */
html.dark .leaflet-tile { filter: brightness(.82) contrast(1.06) saturate(.9); }
html.dark .leaflet-control-attribution { background: rgba(20, 24, 30, .7) !important; color: #9aa0a6 !important; }
html.dark .leaflet-control-attribution a { color: #c9cdd3 !important; }

.pin {
  width: 34px; height: 34px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pin, var(--accent));
  border: 1.5px solid rgba(255, 255, 255, .85);
  box-shadow: 0 6px 16px rgba(31, 38, 135, .35);
}
.pin span { transform: rotate(45deg); font-size: 15px; line-height: 1; }

/* без эмодзи: прячем опустевшие контейнеры иконок */
.place-emoji:empty, .profile-emoji:empty, .notice-ico:empty,
.weather-emoji:empty, .fc-emoji:empty { display: none; }

/* ---------- каталог заведений ---------- */

.place-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.place-count { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}

.place-card {
  --place: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  color: var(--text);
  transition: transform .22s ease, box-shadow .22s ease;
}
.place-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--place) 20%, rgba(31, 38, 135, .10)), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.place-top { display: flex; align-items: center; gap: 12px; }
.place-emoji {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: color-mix(in srgb, var(--place) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--place) 28%, transparent);
}
.place-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--place);
}
.place-card h3 { font-size: 16.5px; margin: 2px 0 0; }
.place-desc { font-size: 13.5px; color: var(--muted); margin: 0; flex: 1; }
.place-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.place-card.featured {
  border-color: color-mix(in srgb, var(--place) 45%, var(--glass-border));
  box-shadow: 0 10px 34px color-mix(in srgb, var(--place) 18%, rgba(31, 38, 135, .10)), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.badge-ad {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--pill);
  /* темнее фирменного цвета: шапка профиля тонирована им же, чистый --place сливается */
  background: color-mix(in srgb, var(--place) 72%, #000);
  color: #fff;
}

/* карточка ТЦ (крупная) */
.mall-card { padding: 24px; }
.mall-card .place-emoji { width: 56px; height: 56px; font-size: 27px; border-radius: 17px; }
.mall-card h3 { font-size: 19px; }
.mall-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* профиль заведения — «тематическая вариация» */
.profile-hero {
  --place: var(--accent);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  padding: clamp(26px, 5vw, 42px);
  background:
    radial-gradient(120% 150% at 12% 0%, color-mix(in srgb, var(--place) 24%, transparent), transparent 62%),
    var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--place) 30%, var(--glass-border));
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.profile-emoji {
  flex: none;
  width: 82px; height: 82px;
  border-radius: 24px;
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--place) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--place) 35%, transparent);
}
.profile-hero h1 { font-size: clamp(26px, 4.6vw, 40px); margin: 4px 0 8px; }
.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--pill);
  /* темнее фирменного цвета: фон шапки тонирован тем же --place, светлый тон сливался */
  background: color-mix(in srgb, var(--place) 72%, #000);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--place) 38%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}
.profile-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px color-mix(in srgb, var(--place) 55%, transparent); }
html.dark .profile-btn { background: color-mix(in srgb, var(--place) 60%, #000); }
html.dark .badge-ad { background: color-mix(in srgb, var(--place) 60%, #000); }
.profile-btn.ghost { background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-border); }
.crumbs { font-size: 13.5px; color: var(--muted); margin: 18px 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---------- полный профиль (демо «Подиум») ---------- */

.profile-gallery {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 10px;
  margin: 18px 0 4px;
}
.profile-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.profile-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.profile-gallery figure:hover img { transform: scale(1.045); }
.pg-main { grid-row: span 2; min-height: 300px; }
.pg-side { min-height: 145px; }
.profile-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.contact-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.contact-table td { padding: 7px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.contact-table tr:last-child td { border-bottom: none; }
.contact-table td:first-child { color: var(--muted); padding-right: 14px; white-space: nowrap; }
.contact-table a { color: var(--place, var(--accent)); font-weight: 600; }
.contact-table a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .profile-gallery { grid-template-columns: 1fr; }
  .pg-main, .pg-side { min-height: 200px; }
  .profile-info { grid-template-columns: 1fr; }
}

/* ---------- подвал ---------- */

.site-footer { margin: 56px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.6fr;
  gap: 28px;
  padding: 28px;
}
.footer-grid p { margin: 6px 0; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.footer-nav a { color: var(--text); }
.footer-nav a:hover { color: var(--accent); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- мелочи ---------- */

.kbd {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.divider { border: none; border-top: 1px solid var(--hairline); margin: 22px 0; }
.center { text-align: center; }

@media (max-width: 640px) {
  .panel, .route { padding: 18px; }
  .hero { padding: 26px 18px; }
  .section-head { flex-direction: column; gap: 4px; }
}

/* ---------- мобильная доводка: крупные зоны нажатия ---------- */
html { -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px), (pointer: coarse) {
  .filter-chip { padding: 11px 16px; min-height: 44px; display: inline-flex; align-items: center; } /* зона касания 44px */
  .tab { padding: 11px 16px; }
  /* !important: leaflet.css подключается позже и перебивает обычную специфичность */
  .leaflet-bar a,
  .leaflet-bar a:hover,
  .leaflet-touch .leaflet-bar a,
  .leaflet-touch .leaflet-bar a:hover {
    width: 36px !important; height: 36px !important;
    line-height: 36px !important;
    font-size: 19px;
  }
  .profile-btn { padding: 13px 22px; }
}
