/* Бангкок — где движ. Палитра взята из города: розовое такси (ночь), зелёная линия BTS (город),
   золото храмов (культура), бирюза (драйв), тыквенный оранжевый (Хэллоуин). */

:root {
  --night: #FF3D8B;
  --city: #8FD14F;
  --culture: #F5C542;
  --drive: #3FD0E0;
  --food: #B06CFF;
  --hall: #FF7A1A;

  --bg: #F4F5F8;
  --panel: #FFFFFF;
  --panel-2: #F3F3F8;
  --ink: #17142B;
  --muted: #5D5878;
  --line: #E3E1EE;
  --glass: rgba(255, 255, 255, 0.88);
  --night-ink: #D0145F;
  --city-ink: #3B7F12;
  --culture-ink: #946B00;
  --drive-ink: #087F8C;
  --food-ink: #6D28D9;
  --hall-ink: #C44D00;
  --ok: #2E8B57;
  --warn: #B7791F;
  --wc: #35688F; /* слой «Туалеты» (22.11.2026): тот же цвет, что у значков «WC» на карте (WC_COLOR в app.js) */
  --shadow: 0 12px 32px rgba(23, 20, 43, 0.14), 0 2px 6px rgba(23, 20, 43, 0.08);

  --r: 16px;
  --panel-w: 420px;
  --peek: 168px;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* движение (проход по дизайну, 21.11.2026): одна кривая «мягко затормозить», одна «с лёгким перелётом», три длительности */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.14s;
  --t-mid: 0.24s;
  --t-slow: 0.38s;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110E1F;
    --panel: #17132A;
    --panel-2: #1E1936;
    --ink: #F2EFFF;
    --muted: #A49FC6;
    --line: #2C2650;
    --glass: rgba(23, 19, 42, 0.86);
    --night-ink: #FF6BA6;
    --city-ink: #A9E36F;
    --culture-ink: #F7D06A;
    --drive-ink: #6BE0EC;
    --food-ink: #CDA8FF;
    --hall-ink: #FF9A4D;
    --ok: #5BD08F;
    --warn: #F2B84B;
    --wc: #8DB6D8;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #110E1F;
  --panel: #17132A;
  --panel-2: #1E1936;
  --ink: #F2EFFF;
  --muted: #A49FC6;
  --line: #2C2650;
  --glass: rgba(23, 19, 42, 0.86);
  --night-ink: #FF6BA6;
  --city-ink: #A9E36F;
  --culture-ink: #F7D06A;
  --drive-ink: #6BE0EC;
  --food-ink: #CDA8FF;
  --hall-ink: #FF9A4D;
  --ok: #5BD08F;
  --warn: #F2B84B;
  --wc: #8DB6D8;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Двойной тап не увеличивает экран (Стас, 21.11.2026, чат карты: «могу случайно нажать, он приблизит, и потом
   проблематично вернуть всё обратно»): manipulation оставляет прокрутку и щипок, убирает только увеличение двойным
   касанием. Правило — на каждом элементе: WebKit смотрит элемент, с которого началось касание. Свои значения (none у
   ручек перетаскивания, pan-x у рядов, холст карты MapLibre) сильнее этого правила; карта приближается сама, своим кодом. */
* { touch-action: manipulation; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { overflow: hidden; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--drive);
  outline-offset: 2px;
  border-radius: 8px;
}
/* заголовок карточки получает фокус программно (для экранного диктора) — рамка ему не нужна */
[tabindex="-1"]:focus { outline: none; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Карта ---------- */

#map { position: fixed; inset: 0; background: var(--bg); }

.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: calc(var(--peek) + 6px); }
.maplibregl-ctrl-group { border-radius: 12px !important; }

/* ---------- Верхняя строка ---------- */

.bar {
  position: fixed;
  z-index: 7;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  pointer-events: none;
}
.bar > * { pointer-events: auto; }

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 14px 8px;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  text-decoration: none;
  min-width: 0;
}
.brand-th {
  font-family: "Kanit", var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
  line-height: 1.1;
}
.brand-ru {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
}
/* одним цветом, без радуги (Стас, 11.10.2026) */
.brand-ru em { font-style: normal; color: var(--night); }

.bar-actions { display: flex; gap: 6px; flex: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 0;
}
.icon-btn.small { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; background: transparent; border: 0; }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { color: var(--night-ink); }
/* кнопка входа после входа: аватар Telegram или инициал внутри той же кнопки, точка — связь с хабом */
#btn-login { position: relative; }
#btn-login img, #btn-login .ava-letter { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
#btn-login .ava-letter { display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--night-ink); }
#btn-login.signed-in { overflow: visible; padding: 0; }

.layers-pop {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 60px);
  right: 12px;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-weight: 500;
  z-index: 8;
}
.layers-pop label { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.layers-pop input { width: 18px; height: 18px; accent-color: var(--night); }

/* ---------- Фильтры ---------- */

/* Полоса фильтров целиком ловит касания: раньше зазор между рядами и поля над чипами пропускали палец к карте,
   и горизонтальная прокрутка чипов заодно двигала карту (Стас, 17.10.2026). pan-x — только листать ряды. */
.filters {
  position: fixed;
  z-index: 4;
  top: calc(env(safe-area-inset-top) + 66px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  pointer-events: auto;
  touch-action: pan-x;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
  scrollbar-width: none;
  pointer-events: auto;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex: none;
}
.chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c, var(--muted));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--muted)) 25%, transparent);
}
.chip svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] {
  background: var(--c, var(--ink));
  border-color: transparent;
  color: #140F22;
}
.chip[aria-pressed="true"] .dot { background: #140F22; box-shadow: none; }
.chip.all[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] .gem-i { color: inherit; }
.chips.sub .chip { height: 32px; font-size: 13px; padding: 0 12px 0 10px; }
/* панель «Фильтры» (18.10.2026): группы чипов с переносом строк, числа — сколько останется */
.chip.more { padding: 0 10px; }
#view-filters .chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; gap: 6px; touch-action: auto; }
#view-filters .chips.wrap .chip { box-shadow: none; }
#view-filters .chips.wrap.sub { margin-top: 6px; }
#view-filters .fp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
#view-filters .fp-top h3 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 800; }
#view-filters .fp-acts { display: flex; gap: 6px; }
#view-filters .fp-group { margin: 12px 0; }
#view-filters .fp-group h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
#view-filters .chip .n { opacity: 0.7; font-weight: 600; }
.chip .n { font-family: var(--font-mono); font-size: 11px; font-weight: 500; opacity: 0.7; }

/* ---------- Нижняя шторка (телефон) / левая панель (компьютер) ---------- */

.sheet {
  position: fixed;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100dvh - env(safe-area-inset-top) - 64px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 22px 22px 0 0;
  transform: translateY(calc(100% - var(--peek)));
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
/* тень над шторкой — плавным градиентом вместо box-shadow: на iPhone в режиме приложения тень слоя с
   transform обрезалась по краю и заканчивалась резко (Стас, 11.10.2026) */
.sheet::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 48px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.sheet.dragging { transition: none; }

.sheet-grip {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 24px;
  flex: none;
  touch-action: none;
  cursor: grab;
}
.sheet-grip span { width: 42px; height: 5px; border-radius: 3px; background: var(--line); }

.sheet-head { flex: none; padding: 0 12px; touch-action: none; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative;
  flex: 1;
  padding: 8px 2px 12px;
  border: 0;
  background: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.tab b { font-family: var(--font-mono); font-weight: 500; font-size: 11px; opacity: 0.8; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--ink);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 2px;
  padding: 0 4px 0 12px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.search > svg { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px calc(env(safe-area-inset-bottom) + 28px);
  scrollbar-width: thin;
}

/* ---------- Общие куски ---------- */

.lead { color: var(--muted); font-size: 14px; margin: 2px 0 14px; }
.lead b { color: var(--ink); font-weight: 600; }
.linkish { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--hall-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
/* значок жемчужины везде золотой — как кольцо жемчужин на карте */
.gem-i { color: var(--culture-ink); }
/* текст только для экранного диктора */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.empty {
  padding: 22px 6px;
  color: var(--muted);
  text-align: center;
}
.empty button { margin-top: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--c, var(--night)); border-color: transparent; color: #140F22; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: color-mix(in srgb, var(--c, var(--muted)) 16%, transparent);
  color: var(--ci, var(--ink));
  white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }

.station {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 13px;
}
.station code {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--lc, #666);
  color: #fff;
}

.ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c, var(--muted));
  color: #140F22;
  flex: none;
}
.ic svg { width: 17px; height: 17px; stroke-width: 2.2; }
/* фото места вместо значка в строке списка (28.11.2026; Стас: «чтобы в списке мест были видны фотографии, хотя бы
   чуть-чуть»): на месте значка, в колонке значка строки, скруглённый квадрат; пока фото грузится — спокойный фон; значок
   категории — кружком в углу в цвете семейства (кольцо цвета панели отделяет его от фото). 29.11.2026 — 56×56 вместо 34×34:
   Стас открывал у мест Google Maps, чтобы увидеть, как место выглядит, а фото 34×34 в высокой строке было с ноготь */
.ic.pic { position: relative; width: 56px; height: 56px; border-radius: 12px; background: var(--panel-2); }
.ic.pic .ic-img { display: block; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.ic.pic .ic-dot { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--muted)); box-shadow: 0 0 0 2px var(--panel); }
.ic.pic .ic-dot svg { width: 10px; height: 10px; stroke-width: 2.6; }

/* ---------- Районы ---------- */

.zone {
  padding: 14px 14px 12px;
  margin-bottom: 12px;
  border-radius: var(--r);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.zone h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--zi, var(--ink));
}
.zone .en { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mix { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 10px 0 8px; background: var(--line); }
.mix span { background: var(--c); }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.mix-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 5px; }
.zone p { margin: 10px 0 0; font-size: 14px; }
.zone .meta { margin-top: 10px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.zone .meta b { color: var(--ink); font-weight: 600; }
.zone .row-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
/* «Не пропустить»: названия — ссылки в цвет текста, чтобы карточки районов не пестрели */
.zone .must .linkish { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-align: left; }
/* запятая не отрывается от названия (кнопка — атомарный элемент, перед запятой после неё браузер переносит строку) */
.zone .must .nw { white-space: nowrap; }
.zone .must .nw .linkish { white-space: normal; }

/* ---------- Списки мест ---------- */

.item {
  display: grid;
  grid-template-columns: 56px 1fr auto; /* колонка значка — под фото 56×56 (29.11.2026); круглый значок 34×34 — по её центру */
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}
.item:last-child { border-bottom: 0; }
.item > .ic { justify-self: center; } /* у всех строк левый край текста ровный: и с фото, и со значком, и в смешанных списках */
.item .t { font-weight: 600; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.item .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item .r { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.item .fav { color: var(--culture-ink); }
/* описание места в списке (Стас, 18.10.2026: «небольшое описание на одну-две строки… кнопочка раскрытия и
   сворачивания, чтобы просматривать места, не открывая карточку»): две строки под названием, «ещё» раскрывает
   полный текст, часы, лучшее время и советы */
.iw { border-bottom: 1px solid var(--line); }
.iw:last-child { border-bottom: 0; }
.iw .item { border-bottom: 0; }
.item .d { margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink); opacity: 0.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.iw.open .item .d { display: block; -webkit-line-clamp: unset; }
.iw .im { display: flex; flex-direction: column; align-items: flex-start; padding: 0 2px 8px 70px; margin-top: -4px; } /* 2 + 56 + 12: «ещё» под текстом строки */
.iw .ix { display: none; gap: 3px; font-size: 13px; line-height: 1.35; color: var(--muted); margin-bottom: 4px; overflow-wrap: anywhere; }
.iw.open .ix { display: grid; }
.iw .more { padding: 2px 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--night-ink); cursor: pointer; }
/* Google Maps прямо из строки списка (Стас, 22.11.2026: «…аккуратную кнопку, которая будет сразу открывать их в Google
   Maps какое-то место»): маленькая круглая ссылка справа от строки (.ir — строка и ссылка рядом; ссылку внутрь кнопки
   строки не вложить); в афише — у правого края карточки события (.evw), текст карточки до неё не доходит */
.ir { display: flex; align-items: center; gap: 4px; }
.ir .item { flex: 1 1 auto; min-width: 0; }
.gm { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; transition: scale var(--t-fast) var(--ease-out), color var(--t-mid); -webkit-tap-highlight-color: transparent; }
.gm svg { width: 15px; height: 15px; }
.gm:active { scale: 0.93; color: var(--ink); }
.evw { position: relative; margin: 8px 0; }
.evw .ev { margin: 0; }
.evw .ev .body { padding-right: 46px; }
.evw .gm { position: absolute; top: 50%; right: 10px; translate: 0 -50%; }
/* значки жемчужины и награды после названия держатся вместе и не переносятся по одному */
.mks { white-space: nowrap; }
.mk { display: inline-flex; vertical-align: -2px; }
.mk svg { width: 14px; height: 14px; }
.mk.minor { color: var(--muted); }

.group-h {
  position: sticky;
  top: -12px;
  z-index: 1;
  margin: 14px -14px 2px;
  padding: 8px 14px 6px;
  background: var(--panel);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-h:first-child { margin-top: 0; }

/* ---------- Афиша ---------- */

.when { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 10px; padding: 0 14px 2px; }
.when::-webkit-scrollbar { display: none; }
.when .chip { height: 32px; font-size: 13px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--panel-2); }
.when .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.ev {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0;
  width: 100%;
  margin: 8px 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  text-align: left;
  overflow: hidden;
}
.ev .stub {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 10px 4px;
  background: color-mix(in srgb, var(--c) 18%, var(--panel-2));
  border-right: 2px dashed color-mix(in srgb, var(--c) 45%, transparent);
}
.ev .stub .d { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1; }
.ev .stub .m { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px; }
.ev .stub .w { font-size: 11px; color: var(--muted); }
.ev .body { padding: 10px 12px; min-width: 0; }
.ev .t { font-weight: 600; font-size: 15px; line-height: 1.25; }
.ev .s { font-size: 13px; color: var(--muted); margin-top: 3px; }
.ev .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--warn);
}
.badge.ok { color: var(--ok); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Советы ---------- */

.alert {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hall) 14%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--hall) 35%, transparent);
  font-size: 14px;
}
.alert svg { color: var(--hall-ink); margin-top: 1px; }
.alert b { font-weight: 700; }

.rule { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.rule p { margin: 0; font-size: 14px; }
.src { font-size: 12px; color: var(--muted); margin-top: 6px; }
.src a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }

/* ---------- Карточка места ---------- */

/* строка «Назад» закреплена сверху и не уезжает при прокрутке карточки (Стас, 11.10.2026) */
.d-top {
  position: sticky;
  top: -12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px -14px 10px;
  padding: 6px 14px 4px;
  background: var(--panel);
}
.d-top .acts { display: flex; gap: 4px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px 0 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.back svg { transform: rotate(90deg); width: 18px; height: 18px; }
.star[aria-pressed="true"] svg { fill: var(--culture); stroke: var(--culture-ink); }

/* Какие места в списке — одна строка из трёх взаимоисключающих кнопок «Закреплён · За картой · Все N» (Стас, 22.11.2026:
   «жутко неудобные и непонятные кнопки, которые должны управлять закреплением мест… даже может быть там две кнопки с одним
   и тем же текстом на экране, но разного цвета»): общий контур-пилюля, нажатая залита акцентом; справа — «Обновить» у
   закреплённого, под строкой — подсказка по режиму. На телефоне всё в одну строку: кнопки сжимаются, у «Обновить» на
   узком экране остаётся значок (подпись — в aria-label). Отклик нажатия — общий у .btn (scale) */
.lmode-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; }
.lmode { display: flex; flex: 1 1 auto; min-width: 0; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lmode .btn { flex: 1 1 0; min-width: 0; justify-content: center; height: 30px; padding: 0 6px; border-color: transparent; border-radius: 999px; background: transparent; color: var(--ink); overflow: hidden; }
.lmode .btn[aria-pressed="true"] { background: var(--night); color: #140F22; }
.btn.lm-refresh { flex: none; border-radius: 999px; }
.btn.lm-refresh svg { width: 16px; height: 16px; }
.lead.lm-hint { font-size: 12.5px; margin: 0 0 10px; }
@media (max-width: 479px) {
  .btn.lm-refresh { width: 34px; padding: 0; justify-content: center; }
  .btn.lm-refresh span { display: none; }
}

/* фото места сверху карточки (tools/photos.py): пропорции заданы width/height, чтобы текст не прыгал */
.d-photo { margin: 0 0 12px; }
.d-photo img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: 14px; background: var(--panel-2); }
.d-photo figcaption { margin-top: 4px; font-size: 11.5px; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
/* подпись фото с Викисклада: автор · лицензия · ссылка на страницу файла (28.11.2026) */
.d-photo figcaption a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
/* обложка рилса (22.11.2026): размеров кадра заранее нет — высота занята сразу, чтобы текст карточки не прыгал при загрузке */
.d-photo.d-cover img { height: 220px; }
.d-pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* награды и «Жемчужина» — под названием места (так их читает и экранный диктор: фокус ставится на название) */
.d-awards { list-style: none; display: grid; gap: 4px; margin: 10px 0 0; padding: 0; font-size: 13px; font-weight: 600; line-height: 1.35; }
.d-awards li { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 7px; overflow-wrap: anywhere; }
.d-awards svg { width: 15px; height: 15px; margin-top: 1px; }
.d-awards .minor { color: var(--muted); font-weight: 500; }
.d-gem {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--culture) 14%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--culture) 40%, transparent);
  font-size: 14px;
}
.d-gem svg { width: 18px; height: 18px; margin-top: 1px; }
.d-gem b { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.d-name {
  overflow-wrap: anywhere;
  margin: 10px 0 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.d-local { font-size: 13px; color: var(--muted); }
.d-desc { margin: 12px 0 0; font-size: 15px; }
.d-when {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 13%, var(--panel-2));
  font-size: 14px;
}
.d-when b { font-family: var(--font-display); font-size: 15px; font-weight: 700; }

/* коворкинг (21.11.2026): цены строкой-таблицей «час · день · неделя · месяц», под ней оговорка, плашки, переговорная */
.d-cowork {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 12%, var(--panel-2));
  font-size: 14px;
}
.d-cowork b { font-weight: 600; }
.cw-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px; }
.cw-prices div { display: grid; gap: 1px; padding: 6px 8px; border-radius: 10px; background: var(--panel); }
.cw-prices span { font-size: 12px; color: var(--muted); }
.cw-prices b { font-family: var(--font-mono); font-size: 14px; font-weight: 600; white-space: nowrap; }
.cw-note { font-size: 12.5px; color: var(--muted); }
.cw-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.item .cw-day { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, #5B8DEF 18%, transparent); }

.facts { display: grid; gap: 10px; margin: 14px 0 0; }
.facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.facts dd { overflow-wrap: anywhere; }
.facts dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.facts dd { margin: 0; }
.facts dd .station { margin-bottom: 4px; }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
/* из рилса (22.11.2026): кнопки роликов в строке фактов «Из рилса» и «Убрать с карты» внизу карточки */
/* .facts .d-reels, а не просто .d-reels: правило «.facts div» выше (сетка строки фактов, первая колонка 96px) сильнее одного
   класса и превращало блок кнопок в такую же сетку — кнопка «Рилс · @автор» сжималась до 96px, текст вылезал за рамку
   (22.11.2026, первая живая запись). Длинный ник не раздвигает карточку и не переносится в три строки: кнопка — одна
   строка с многоточием (для этого она блок с текстом, а не flex: у flex-кнопки многоточие у текста не ставится). */
.facts .d-reels { display: flex; flex-wrap: wrap; gap: 6px; }
.facts .d-reels .btn { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 32px; }
.facts .d-reels .btn svg { vertical-align: middle; margin: -2px 8px 0 0; }
.d-unmap-w { margin-top: 16px; }
.status { margin-top: 16px; font-size: 13px; color: var(--muted); }
details.sources { margin-top: 10px; font-size: 13px; color: var(--muted); }
details.sources summary { cursor: pointer; font-weight: 600; }
details.sources p { margin: 8px 0 0; }
details.sources ul { margin: 8px 0 0; padding-left: 18px; }
details.sources li { margin: 3px 0; word-break: break-all; }

/* ---------- Подписи районов на карте (неоновые вывески) ---------- */

.zlabel {
  --zc: var(--night);
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 4px 6px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.25s ease;
}
.zlabel .zn {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--zfs, 12px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  white-space: nowrap;
  color: var(--zi);
  text-shadow: 0 0 1px var(--bg), 0 1px 0 var(--bg), 0 0 10px var(--bg), 0 0 18px var(--bg);
}
.zlabel .zs {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  text-shadow: 0 0 2px var(--bg), 0 0 8px var(--bg), 0 0 14px var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .zlabel .zn {
    color: #fff;
    text-shadow: 0 0 2px var(--zc), 0 0 8px var(--zc), 0 0 18px var(--zc), 0 0 34px color-mix(in srgb, var(--zc) 60%, transparent);
  }
}
:root[data-theme="dark"] .zlabel .zn {
  color: #fff;
  text-shadow: 0 0 2px var(--zc), 0 0 8px var(--zc), 0 0 18px var(--zc), 0 0 34px color-mix(in srgb, var(--zc) 60%, transparent);
}
/* скрываем через visibility: анимация «включения» держит opacity и перебила бы его */
.map-zones-off .zlabel, .zlabel.zl-hidden { visibility: hidden; pointer-events: none; }
.map-zones-small .zlabel .zs { display: none; }

/* вывески «включаются» при первом показе, как неон на закате */
@keyframes neon-on {
  0% { opacity: 0; }
  12% { opacity: 0.9; }
  18% { opacity: 0.15; }
  30% { opacity: 1; }
  38% { opacity: 0.55; }
  100% { opacity: 1; }
}
.zlabel.ignite { animation: neon-on 0.9s steps(1, end) both; animation-delay: var(--delay, 0s); }

/* ---------- Кнопки поверх карты ---------- */

.fab {
  position: fixed;
  z-index: 5;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--peek) + 46px);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
}
.fab.active { color: var(--drive-ink); }
.sheet-high .fab { opacity: 0; pointer-events: none; }
/* шторка опущена до язычка: всё, что стояло над ней (кнопки карты, кнопка и мини-режим чата), опускается следом */
body.sheet-min { --peek: 32px; }

.toast {
  position: fixed;
  z-index: 9;
  left: 50%;
  bottom: calc(var(--peek) + 18px);
  transform: translate(-50%, 20px);
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* точка «я здесь»: крупная, с пульсирующим кольцом; размер в пикселях — при отдалении карты не тает */
.me {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2F8CFF;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(47, 140, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.35);
}
.me::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 3px solid rgba(47, 140, 255, 0.75);
  animation: me-pulse 2s ease-out infinite;
}
@keyframes me-pulse {
  0% { transform: scale(0.45); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
/* точка за краем видимой карты: стрелка у края с расстоянием, нажатие возвращает к точке */
/* лодки: карточки причала и линии (Стас, 17.10.2026) */
.pill.boat-pill, .pill.boat-pier { border: 1px solid var(--line); background: var(--panel-2); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.pill.boat-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; margin-right: 6px; }
.pill.boat-pill svg { width: 14px; height: 14px; margin-right: 5px; color: var(--c); }
.pill.boat-pier { margin: 2px 4px 2px 0; padding: 3px 9px; border-radius: 999px; }
.pill.boat-pier.here { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pier-code { font-family: var(--font-mono); font-size: 0.6em; font-weight: 600; color: var(--muted); vertical-align: middle; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; }
.boat-h { font-family: var(--font-display); font-size: 16px; margin: 16px 0 8px; }
.boat-route { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.boat-route-h { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.boat-route-h .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.boat-dir { font-size: 14px; line-height: 1.7; margin: 4px 0; }
.boat-dir b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.boat-fare { display: flex; gap: 6px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.boat-fare svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.boat-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 4px 0 8px; }
.boat-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.boat-table td:first-child { white-space: nowrap; width: 1%; padding-right: 12px; }
.boat-table small { color: var(--muted); }
/* туалеты (22.11.2026): плашки и значок строки списка — цвет значков на карте; пунктир — «скорее всего есть», как на карте */
.pill.wc-pill { --c: var(--wc); color: var(--ink); }
.pill.wc-pill svg { color: var(--wc); }
.pill.wc-pill.maybe { background: transparent; border: 1px dashed var(--wc); }
.ic.wc { --c: var(--wc); border-radius: 9px; color: var(--panel); }
.ic.wc.maybe { background: var(--panel); border: 2px dashed var(--wc); color: var(--wc); }
.wc-list { margin-top: 4px; }
.facts dd small { color: var(--muted); font-size: 12.5px; }
/* «Ближайшие туалеты» в меню «Слои» — под галочкой слоя, по ширине текста */
.layers-pop .ly-near { justify-self: start; margin: -2px 0 0 28px; }
/* заметка к месту и подборки избранного (Стас, 17.10.2026) */
.d-note { margin: 10px 0 12px; }
.d-note label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.d-note label svg { width: 14px; height: 14px; }
.d-note textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; /* 16 — иначе iPhone приближает страницу при фокусе */ line-height: 1.35; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: inherit; resize: vertical; min-height: 44px; }
.d-note small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.item .s.note { display: flex; gap: 5px; align-items: center; color: var(--ink); font-style: italic; }
.item .s.note svg { width: 12px; height: 12px; flex: none; opacity: 0.7; }
.d-cols { display: grid; gap: 4px; margin: 8px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.d-cols .lead { margin: 0 0 6px; }
.d-col { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 36px; cursor: pointer; }
.d-col input { width: 20px; height: 20px; accent-color: var(--culture); }
.d-col span { flex: 1; }
.d-col small { color: var(--muted); font-family: var(--font-mono); }
.d-cols .btn { justify-self: start; margin-top: 4px; }
.chip.col.add { border-style: dashed; }
.icon-btn.small.cols[aria-pressed="true"] { color: var(--culture-ink); }
/* последнее известное место (с прошлого входа), пока не нажали «где я» */
.me.stale { opacity: 0.55; }
.me.stale::after { display: none; }
.me-arrow {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #2F8CFF;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.me-arrow svg { width: 18px; height: 18px; stroke-width: 2.6; }

/* ---------- Компьютер: панель слева, карта справа ---------- */

@media (min-width: 960px) {
  body {
    display: grid;
    grid-template-columns: var(--panel-w) 1fr;
    grid-template-rows: auto auto 1fr;
    height: 100dvh;
  }
  #map { position: relative; inset: auto; grid-column: 2; grid-row: 1 / span 3; }
  .bar {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    padding: 20px 18px 10px;
    background: var(--panel);
    border-right: 1px solid var(--line);
  }
  .brand { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* 18 px: три видимые кнопки шапки (слои, тема, вход) помещаются в панель 420 px */
  .brand-ru { font-size: 18px; }
  .brand-th { font-size: 12px; }
  .bar .icon-btn { box-shadow: none; background: var(--panel-2); }
  #btn-search { display: none; }
  .layers-pop { top: 66px; right: 18px; }
  .filters {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    top: auto;
    padding: 4px 0 10px;
    background: var(--panel);
    border-right: 1px solid var(--line);
    pointer-events: auto;
  }
  .chips { flex-wrap: wrap; overflow: visible; padding: 2px 18px; }
  .chip { box-shadow: none; background: var(--panel-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sheet {
    position: relative;
    grid-column: 1;
    grid-row: 3;
    height: auto;
    min-height: 0;
    border-radius: 0;
    transform: none !important;
    box-shadow: none;
    border-right: 1px solid var(--line);
  }
  .sheet-grip { display: none; }
  .sheet-head { padding: 0 18px; }
  .sheet-body { padding: 14px 18px 28px; }
  .group-h { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .d-top { top: -14px; margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .sheet::before { display: none; }
  .when { margin: 0 -18px 10px; padding: 0 18px 2px; }
  .maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: 0; }
  .fab { bottom: 44px; right: 16px; }
  .sheet-high .fab { opacity: 1; pointer-events: auto; }
  .toast { left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2); bottom: 30px; }
}

/* жемчужины и награды — значок и число, полное название в aria-label и title (с подписями чипы на
   телефоне вытесняли типы движа с экрана, а на компьютере занимали четыре ряда вместо двух) */
.chip.special .lbl { display: none; }
.chip.special { padding: 0 13px 0 12px; }
/* в ряду категорий переключатель жемчужин с подписью — виден сразу после выбора типа движа */
.chips.sub .chip.sub-gem .lbl { display: inline; }
.chips.sub .chip.hour { height: 30px; padding: 0 9px; font-family: var(--font-mono); font-size: 12.5px; }
.chips.sub .chip.sub-gem { padding: 0 12px 0 10px; }

@media (max-width: 959px) {
  .brand { padding: 6px 12px 7px; }
  .brand-ru { font-size: 14px; letter-spacing: -0.02em; }
  .brand-th { font-size: 10px; }
  .icon-btn { width: 40px; height: 40px; border-radius: 12px; }
}
/* четыре кнопки шапки (поиск, слои, тема, вход) на телефонах уже 414 px не помещаются рядом
   с названием в одну строку: «где движ» уходит на вторую строку, тайская строка прячется
   (иначе шапка выросла бы и наехала на чипы фильтров, у них top: 66 px) */
@media (max-width: 413px) {
  .brand-dash, .brand-th { display: none; }
  .brand-ru em { display: block; }
}

/* ---------- Движение (проход по дизайну, 21.11.2026) ----------
   Стас: «может где-то добавить анимацию, может где-то что-то поменять, при этом сохранить все функции, но сделать удобнее
   и красивее»; «анимации, там всякие выбора точек или там чего-то раскрытия, тоже бы продумать и улучшить»; раньше:
   «должно работать же все плавно и аккуратно, без дерганий». Язык один — «неон зажигается», как у вывесок районов:
   появляется мягко снизу, загорается, не мигает и не прыгает. Раскладка и места кнопок не меняются. Выбранная точка на
   карте — в app.js (igniteSelection). При «Уменьшении движения» всё это выключает правило в конце файла. */

/* отклик на нажатие: кнопка чуть вжимается. Свойство scale — отдельно от transform, которым двигают шторку и кнопки */
.icon-btn, .chip, .btn {
  transition: scale var(--t-fast) var(--ease-out), background-color var(--t-mid), color var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
  -webkit-tap-highlight-color: transparent;
}
.fab {
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s, scale var(--t-fast) var(--ease-out), color var(--t-mid);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active, .chip:active, .btn:active, .fab:active { scale: 0.93; }
.tab, .item, .back, .linkish, .zone { -webkit-tap-highlight-color: transparent; }
.tab { transition: color var(--t-mid); }
/* строка списка откликается на касание */
.item { transition: background-color var(--t-fast); }
.item:active { background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* выбранный фильтр светится цветом своего движа, как вывеска */
.filters .chip[aria-pressed="true"] { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 8px 22px -8px var(--c, transparent); }

/* полоска под вкладкой скользит к новой вкладке (место считает paintTabLine в app.js); без скрипта остаётся прежняя */
.tabs { position: relative; }
.tabs.slide .tab[aria-selected="true"]::after { content: none; }
.tabs.slide::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: var(--tab-w, 0px);
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--ink);
  opacity: var(--tab-on, 0);
  transform: translateX(var(--tab-x, 0px));
  transition: transform var(--t-slow) var(--ease-out), width var(--t-slow) var(--ease-out), opacity var(--t-mid);
  pointer-events: none;
}

/* раздел шторки появляется мягко снизу: смена вкладки, поиск, фильтры, настройки */
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.sheet-body > .view { animation: view-in var(--t-mid) var(--ease-out) backwards; }
/* карточка раскрывается по частям: фото, плашки, название, текст — одна за другой. Класс .opening ставит openDetail
   только на время открытия: перерисовка открытой карточки ничего не проигрывает заново. Строка «Назад» стоит сразу */
.sheet-body > #view-detail { animation: none; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes photo-in { from { opacity: 0; transform: scale(1.04); } }
#view-detail.opening > * { animation: rise-in var(--t-slow) var(--ease-out) backwards; animation-delay: 0.19s; }
#view-detail.opening > :nth-child(2) { animation-delay: 0.03s; }
#view-detail.opening > :nth-child(3) { animation-delay: 0.07s; }
#view-detail.opening > :nth-child(4) { animation-delay: 0.11s; }
#view-detail.opening > :nth-child(5) { animation-delay: 0.15s; }
#view-detail.opening > .d-photo { animation-name: photo-in; transform-origin: center top; }
#view-detail.opening > .d-top { animation: none; }

/* звезда «вспыхивает» от нажатия (класс .pop ставит setFav), цвет заливается плавно */
.star svg { transition: fill var(--t-mid), stroke var(--t-mid); }
@keyframes star-pop { 0% { scale: 0.6; } 55% { scale: 1.3; } 100% { scale: 1; } }
.star.pop svg { animation: star-pop 0.42s var(--ease-out); }

/* ряд категорий под фильтрами и строка поиска появляются мягко сверху */
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }
.filters .chips.sub, .sheet-head .search { animation: drop-in var(--t-mid) var(--ease-out) backwards; }
/* «ещё» у места в списке: подробности раскрываются мягко (класс .open ставит нажатие, список его не перерисовывает) */
.iw.open .ix { animation: drop-in var(--t-mid) var(--ease-out) backwards; }

/* окно «Слои» раскрывается от своей кнопки */
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.layers-pop { transform-origin: top right; animation: pop-in var(--t-mid) var(--ease-out) backwards; }

/* всплывающая строка поднимается с лёгким перелётом */
.toast { transition: opacity 0.2s, transform var(--t-slow) var(--ease-spring); }

/* подпись карты (© OpenStreetMap): стекло в цвет темы вместо белого кружка */
.maplibregl-ctrl-attrib.maplibregl-compact { background: var(--glass); color: var(--muted); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.maplibregl-ctrl-attrib a { color: inherit; }
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button { background-color: transparent; opacity: 0.7; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .maplibregl-ctrl-attrib-button { filter: invert(1); }
}
:root[data-theme="dark"] .maplibregl-ctrl-attrib-button { filter: invert(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* «Крыши и виды» (29.11.2026): этаж рядом с названием в списке при выбранной теме — тем же видом, что цена дня у
   коворкингов; в карточке — строка «61 этаж · под открытым небом · вид: …» и важное отдельной строкой, там же, где блок
   коворкинга. Длинный вид переносится, а не раздвигает карточку */
.item .sky-fl { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, #E56BE5 20%, transparent); }
.d-sky {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 12%, var(--panel-2));
  font-size: 14px;
  overflow-wrap: anywhere;
}
.sky-facts { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; font-weight: 600; }
.sky-facts svg { width: 16px; height: 16px; margin-top: 2px; color: var(--c); }
.sky-note { font-size: 13px; color: var(--muted); }

/* «Здесь же» (29.11.2026): другие места в той же точке (одно здание) — кнопки-названия со значком категории маленьким
   кружком; длинное название — в одну строку с многоточием, кнопка не шире карточки */
.d-same { margin-top: 12px; }
.same-h { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.same-list { display: flex; flex-wrap: wrap; gap: 6px; }
.same-b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 11px 0 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.same-ic { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--c, var(--muted)); color: #140F22; }
.same-ic svg { width: 13px; height: 13px; }
.same-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
