/* Собрано из styles/main.css командой node tools/build-css.mjs — не править:
   изменения пропадут при следующей сборке. */

/* Локадо — список стилей и их порядок. Порядок каскада важен:
   base -> layout -> components -> pages. Страницы подключают не этот
   файл, а собранный из него styles/site.css: после правки любого файла
   стилей — node tools/build-css.mjs (npm run check напомнит). */

/* ===== base/fonts.css ===== */
/* Шрифты лежат в проекте (assets/fonts), а не на Google Fonts: сайт не
   зависит от чужого сервиса, грузится быстрее, и вёрстку можно проверить
   на настоящих шрифтах. Только нужные начертания: кириллица + латиница
   (+ latin-ext у Raleway — в нём знак ₽). Лицензия — SIL Open Font
   License (assets/fonts/LICENSE-*.txt). */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/unbounded-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/unbounded-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/unbounded-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/unbounded-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/raleway-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/raleway-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/raleway-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/raleway-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/raleway-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ===== base/tokens.css ===== */
:root {
  /* Фирменный оранжевый — для заливок без текста, значков, логотипа и
     крупных заголовков. На нём и рядом с ним мелкий текст не проходит
     WCAG AA (контраст ~3:1), поэтому: */
  --primary: #FF570A;
  --primary-light: #FF661F;
  /* фон кнопок с белым текстом (контраст с белым 4.6:1) */
  --primary-strong: #D24406;
  --primary-strong-hover: #B93C05;
  /* оранжевый мелкий текст и ссылки на светлом фоне (5.3:1 на креме) */
  --primary-text: #B93C05;
  --text: #2E2E2E;
  /* тёплые серые вместо холодных #666/#999 (контраст на креме 5.6 и 4.5) */
  --text-light: #6B6259;
  --text-lighter: #7A7068;
  --bg: #FBF7F2;
  --card-bg: #ffffff;

  /* Тёплая палитра */
  --cream: #FBF7F2;
  --cream-deep: #F3EBDF;
  --ink: #2A2521;
  --accent-soft: #FFE8D6;
  --accent-line: #FFD9BE;
  /* статусы «открыто / закрыто» */
  --success: #2E7D32;
  --danger: #C62828;

  /* Шрифты */
  --font-heading: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Raleway', system-ui, sans-serif;

  /* Шкала размеров текста — вместо 38 разных значений. Заголовки первого
     экрана и секций задаются отдельно (typography.css, container.css). */
  --fs-caption: 0.75rem;  /* 12 — плашки, подписи заглавными */
  --fs-xs: 0.8125rem;     /* 13 — вторичные подписи */
  --fs-sm: 0.875rem;      /* 14 — кнопки, фильтры, мелкий текст */
  --fs-md: 1rem;          /* 16 — основной текст */
  --fs-lg: 1.125rem;      /* 18 — заголовки карточек и окон */
  --fs-xl: 1.375rem;      /* 22 */
  --fs-2xl: 1.75rem;      /* 28 */

  /* Скругления — 4 значения + «таблетка» */
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Тени — 4 уровня (+ --shadow-soft/--shadow-soft-hover ниже) */
  --shadow-bar: 0 2px 12px rgba(40, 20, 10, 0.06);
  --shadow-sm: 0 4px 14px rgba(40, 20, 10, 0.12);
  --shadow-modal: 0 24px 60px rgba(40, 20, 10, 0.28);
  --focus-ring: 0 0 0 3px rgba(255, 87, 10, 0.2);

  --transition: all 0.3s ease;
}

:root {
  --header-h: 68px; /* уточняет ui.js по реальной высоте шапки */

  /* Общий язык страницы (как у карточек настроений в hero) */
  --radius-card: 18px;
  --line: rgba(42, 37, 33, 0.10);
  --line-strong: rgba(42, 37, 33, 0.22);
  --shadow-soft: 0 10px 30px rgba(40, 20, 10, 0.10);
  --shadow-soft-hover: 0 16px 40px rgba(40, 20, 10, 0.16);
  /* Подложка вместо фото, пока его нет или оно не загрузилось */
  --photo-placeholder: linear-gradient(160deg, #F3EBDF 0%, #E2D2BE 100%);
  --photo-fade: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.78) 100%);
  /* Волнистый нижний край первого экрана (главная, страница места) —
     маска: видимая часть закрашена. Изгиб зеркальный к волне футера,
     чтобы страница была «обрамлена», а не повторяла одну и ту же форму */
  --hero-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0,0 H1200 V14 C1000,38 820,4 600,20 C380,36 200,6 0,26 Z'/%3E%3C/svg%3E");
  --hero-wave-h: 40px;
  /* Плёночное зерно: hero, фон страницы, футер */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(base/%23n)'/%3E%3C/svg%3E");
}

/* Первый экран главной: фон и цвета по времени суток. data-daypart на <html>
   ставит inline-скрипт в <head> index.html (пороги — scripts/core/daypart.js).
   Без атрибута — вечерняя палитра. Фото на фоне нет: только градиент и зерно. */
:root,
:root[data-daypart="evening"] {
  --hero-fg: #fff;
  --hero-muted: rgba(255, 255, 255, 0.74);
  --hero-accent: #FF8A4C;
  --hero-logo: #fff;
  --hero-logo-text: #fff;
  --hero-glass: rgba(255, 255, 255, 0.10);
  --hero-glass-hover: rgba(255, 255, 255, 0.16);
  --hero-line: rgba(255, 255, 255, 0.38);
  --hero-card-line: rgba(255, 255, 255, 0.18);
  --hero-bg:
    radial-gradient(ellipse 60% 45% at 72% 100%, rgba(255, 122, 48, 0.75), transparent 70%),
    radial-gradient(ellipse 45% 35% at 10% 20%, rgba(160, 70, 120, 0.45), transparent 70%),
    linear-gradient(180deg, #2E1A33 0%, #5A2539 50%, #9A3B2E 100%);
}

:root[data-daypart="morning"] {
  --hero-fg: #2A2521;
  --hero-muted: rgba(42, 37, 33, 0.66);
  --hero-accent: #E2560F;
  --hero-logo: var(--primary);
  --hero-logo-text: var(--text);
  --hero-glass: rgba(255, 255, 255, 0.42);
  --hero-glass-hover: rgba(255, 255, 255, 0.62);
  --hero-line: rgba(42, 37, 33, 0.28);
  --hero-card-line: rgba(255, 255, 255, 0.8);
  /* Насыщеннее прежнего: утро выглядело выцветшим рядом с вечером */
  --hero-bg:
    radial-gradient(ellipse 55% 50% at 82% 10%, rgba(255, 176, 102, 0.95), transparent 70%),
    radial-gradient(ellipse 55% 45% at 6% 96%, rgba(244, 150, 132, 0.6), transparent 70%),
    radial-gradient(ellipse 40% 35% at 35% 20%, rgba(255, 228, 190, 0.8), transparent 70%),
    linear-gradient(180deg, #FCDDC6 0%, #F7C9AA 55%, #F1D3BC 100%);
}

:root[data-daypart="day"] {
  --hero-fg: #2A2521;
  --hero-muted: rgba(42, 37, 33, 0.66);
  --hero-accent: #D9480F;
  --hero-logo: var(--primary);
  --hero-logo-text: var(--text);
  --hero-glass: rgba(255, 255, 255, 0.38);
  --hero-glass-hover: rgba(255, 255, 255, 0.58);
  --hero-line: rgba(42, 37, 33, 0.28);
  --hero-card-line: rgba(255, 255, 255, 0.8);
  --hero-bg:
    radial-gradient(ellipse 60% 50% at 18% 0%, rgba(255, 232, 170, 0.95), transparent 70%),
    radial-gradient(ellipse 55% 45% at 95% 100%, rgba(236, 150, 100, 0.45), transparent 70%),
    linear-gradient(180deg, #FCEBC8 0%, #F7D6A8 55%, #F0C497 100%);
}

:root[data-daypart="night"] {
  --hero-fg: #fff;
  --hero-muted: rgba(255, 255, 255, 0.7);
  --hero-accent: #FF9A5C;
  --hero-logo: #fff;
  --hero-logo-text: #fff;
  --hero-glass: rgba(255, 255, 255, 0.08);
  --hero-glass-hover: rgba(255, 255, 255, 0.14);
  --hero-line: rgba(255, 255, 255, 0.32);
  --hero-card-line: rgba(255, 255, 255, 0.16);
  --hero-bg:
    radial-gradient(ellipse 55% 35% at 50% 105%, rgba(255, 140, 70, 0.40), transparent 70%),
    radial-gradient(ellipse 35% 30% at 85% 15%, rgba(120, 140, 220, 0.22), transparent 70%),
    linear-gradient(180deg, #0E1428 0%, #19203F 55%, #2A2442 100%);
}

/* ===== base/reset.css ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  /* Любой выступающий за вьюпорт элемент больше не даёт горизонтальную
     прокрутку. clip, а не hidden: hidden делал body отдельным контейнером
     прокрутки, и position: sticky (категории ленты на телефоне) не работал */
  overflow-x: hidden;
  max-width: 100%;
}

@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}

/* Атрибут hidden должен скрывать элемент, даже если у класса задан display */
[hidden] { display: none !important; }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Случайное приближение на телефоне. Двойное касание (быстро нажал кнопку
   дважды, листаешь колоду «Выбрать вместе») больше не зумит страницу; щипком
   приблизить можно, как и раньше, — это нужно людям со слабым зрением, и
   iOS всё равно не даёт его запретить */
html { touch-action: manipulation; }

/* Поле мельче 16px — iOS Safari приближает страницу, когда в него ставят
   курсор, и не возвращает обратно */
@media (max-width: 768px) {
  input, textarea, select { font-size: max(16px, 1em); }
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* У Raleway по умолчанию «старые» цифры разной высоты — «11:00–21:00»
     и цены прыгали. Ровные цифры одной ширины — для времени и чисел. */
  font-variant-numeric: lining-nums tabular-nums;
}

/* Лёгкое зерно на всей странице — тот же «плёночный» фон, что в hero */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--grain);
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

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

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 768px) {
  input,
  select,
  textarea { font-size: 16px; }
}

/* SVG-иконки из спрайта (scripts/core/icons.js): размер — от font-size,
   цвет — от color, как у текста */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--filled { fill: currentColor; }

/* ===== base/typography.css ===== */
/* Unbounded — широкий акцидентный шрифт: только для крупных заголовков и
   логотипа. В мелком интерфейсе (кнопки, меню, подписи, карточки) он
   тяжёлый и плохо читается — там Raleway. */
.logo,
.hero__title,
.hero-title,
.section-title,
.collection-title,
.state-screen__code,
.state-screen__title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn,
.nav-item {
  font-family: var(--font-body);
  font-weight: 600;
}

.section-title {
  /* мобильный; Unbounded широкий — крупнее переносится (на 375px
     «Сейчас в центре внимания» при 22px уходил на две строки) */
  font-size: 1.25rem;
  line-height: 1.2;
  text-align: left;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Заголовок секции — как в hero: маленькая подпись сверху, крупная фраза */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 28px;
}

/* Заголовок со ссылкой справа (section-head--row): подпись, заголовок и
   лид — одной колонкой */
.section-head > div { display: grid; gap: 8px; }

/* Подпись над заголовком секции: «Сейчас, осенью», «Не хочешь думать» */
.section-eyebrow {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-text);
}

/* Лид под заголовком: одна-две фразы, зачем этот блок */
.section-lead {
  max-width: 560px;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-light);
}

.hero__title {
  font-size: 2rem; /* мобильный */
  line-height: 1.15;
  color: var(--hero-fg);
  max-width: 980px;
  padding: 0 10px;
}


/* ===== layout/container.css ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}

@media (min-width: 768px) {
  .container { padding-inline: 24px; }
}

@media (min-width: 576px) {
  .section-title {
    font-size: var(--fs-2xl);
  }
}

@media (min-width: 992px) {
  .section-title {
    font-size: 2rem;
  }
}

/* ===== layout/header.css ===== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-bar);
  transition: all 0.3s;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* flex-wrap здесь переносил навигацию на вторую строку и ломал вёрстку хедера */
  flex-wrap: nowrap;
  gap: 1rem;
  min-height: var(--header-h);
  /* только по вертикали: сокращение padding обнуляло боковые отступы
     .container, и на телефоне логотип прилипал к краю */
  padding-block: 0.6rem;
}

.logo {
  text-decoration: none;
  white-space: nowrap;
}

.logo {
  font-size: 1.5rem; /* телефон: шапка ниже, больше места контенту */
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* Логотип (assets/logo.svg — тот же рисунок отдельным файлом): «Л» —
   начало оранжевого маршрута, линия идёт волной за словом (спереди — только
   по краям «к» и «д») и приводит к точке. Буквы — цвета текста (белые на
   фото и в подвале), маршрут и точка всегда оранжевые */
.logo { display: inline-flex; line-height: 1; }
.logo__svg {
  display: block;
  height: 1.2em;
  width: auto;
  overflow: visible;
}
.logo__word { fill: currentColor; }
.logo__route {
  fill: none;
  stroke: var(--primary);
  stroke-width: 120;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo__route--l { stroke-width: 205; } /* «Л» толщиной с буквы — часть слова и знак в иконках */
.logo__dot { fill: var(--primary); }
@media (min-width: 576px) {
  .logo {
    font-size: var(--fs-2xl);
  }
}

@media (max-width: 575px) {
  .header-content { padding-block: 0.35rem; }
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
  font-size: var(--fs-lg); /* чуть крупнее */
}

.nav-item:hover {
  color: var(--primary-text);
}

/* Текущий раздел — оранжевым с подчёркиванием */
.nav-item[aria-current="page"] {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
}

.header-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  font-size: var(--fs-xl);
  transition: background 0.2s, color 0.2s;
  margin-right: 0.5rem;
  text-decoration: none;
}

.header-calendar:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary-text);
}

.user-menu {
  position: relative;
}

.user-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-pill);
  transition: background 0.2s;
  font-size: var(--fs-md);
  color: var(--text);
}

.user-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.user-btn i:first-child {
  font-size: var(--fs-xl);
  color: var(--text-light);
}

.user-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: white;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  min-width: 180px;
  padding: 0.5rem 0;
  display: none;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.98);
}

.user-dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
  font-size: var(--fs-md);
}

.user-dropdown a:hover {
  background: var(--cream);
}

.user-menu.active .user-dropdown {
  display: block;
}

.mobile-menu-toggle {
  display: grid; /* показываем на мобильных; значки — в одной клетке */
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 0;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
}

@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Поиск в шапке: на телефоне — значок рядом с меню, на компьютере —
   «Поиск» с лупой после пунктов меню. Подсказывает, что место можно
   найти не только по настроению */
.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  color: var(--text);
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.2s;
}

.header-search span { display: none; }
@media (hover: hover) {
  .header-search:hover { color: var(--primary-text); }
}

/* между поиском и меню — без лишнего зазора */
.header-search + .mobile-menu-toggle { margin-left: -4px; }

@media (min-width: 769px) {
  .header-search {
    order: 3;
    margin-left: 4px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    font-size: var(--fs-md);
    font-weight: 500;
  }
  .header-search .icon { font-size: 1.1em; }
  .header-search span { display: inline; }
  .header-search:hover { border-color: var(--primary); }
}

/* Бургер ↔ крестик: оба значка в одной клетке, меняются поворотом */
.mobile-menu-toggle { place-items: center; }
.mobile-menu-toggle .icon { grid-area: 1 / 1; transition: opacity 0.2s ease, transform 0.25s ease; }
.mobile-menu-toggle__close { opacity: 0; transform: rotate(-90deg); }
.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__open { opacity: 0; transform: rotate(90deg); }
.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__close { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-toggle .icon { transition: none; }
}

/* Пункты только для мобильного меню (ui.js) — на компьютере не нужны */
.nav-narrow,
.nav-contact { display: none; }

@media (max-width: 768px) {
  /* Меню во весь экран: разделы крупно, внизу — установка и почта.
     Категории, поиск и карта — в ленте на главной, в меню их нет */
  .nav {
    position: fixed;
    /* top/height, а не bottom: шапка с backdrop-filter — контейнер
       для fixed-потомков, и bottom: 0 считался бы от её низа */
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 24px;
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 999;
  }
  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  /* Фиксируем body (top ставит ui.js): overflow: hidden Safari на iPhone
     не всегда соблюдает, и страница под меню прокручивалась */
  body.nav-open {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
  }
  .nav-list {
    flex-direction: column;
    gap: 0;
  }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-item {
    display: block;
    padding: 14px 0;
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
  }
  .nav-list li:last-child { border-bottom: 0; }

  .nav-narrow { display: list-item; }
  .nav-wide { display: none; }

  .nav-contact {
    display: block;
    margin-top: auto;
    font-size: var(--fs-sm);
    color: var(--text-light);
  }

  .nav-contact a { color: var(--text); font-weight: 600; text-decoration: none; }
  .nav-right {
    margin-top: 1rem;
  }
  .user-dropdown {
    position: static;
    box-shadow: none;
    padding-left: 1rem;
  }
}

@media (max-width: 400px) {
  .user-btn span {
    display: none;
  }
}

/* Главная: шапка прозрачная поверх hero и берёт цвета его палитры
   (tokens.css, --hero-*). После прокрутки или с открытым меню — обычная
   белая. Класс is-scrolled ставит scripts/ui.js. */
.main-header--overlay {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.main-header--overlay.is-scrolled,
body.nav-open .main-header--overlay {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-bar);
}

body:not(.nav-open) .main-header--overlay:not(.is-scrolled) .logo { color: var(--hero-logo-text, var(--hero-logo)); }
body:not(.nav-open) .main-header--overlay:not(.is-scrolled) .mobile-menu-toggle,
body:not(.nav-open) .main-header--overlay:not(.is-scrolled) .header-search {
  color: var(--hero-logo);
}

@media (min-width: 769px) {
  .main-header--overlay:not(.is-scrolled) .nav-item { color: var(--hero-fg); }
  .main-header--overlay:not(.is-scrolled) .nav-item:hover { color: var(--hero-accent); }
  .main-header--overlay:not(.is-scrolled) .header-search { color: var(--hero-fg); border-color: var(--hero-line); }
  .main-header--overlay:not(.is-scrolled) .header-search:hover { color: var(--hero-accent); }
}

/* ===== layout/footer.css ===== */
.site-footer {
  position: relative;
  margin-top: 110px;
  /* тёплый отсвет снизу, как у вечерней и ночной палитры hero */
  background:
    radial-gradient(ellipse 50% 70% at 85% 100%, rgba(255, 122, 48, 0.16), transparent 70%),
    var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding-top: 56px;
}

.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.12;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.footer-wave {
  position: absolute;
  left: 0; right: 0;
  bottom: 100%;
  line-height: 0;
  transform: translateY(1px);
}

.footer-wave svg { width: 100%; height: 56px; display: block; }

.footer-wave path { fill: var(--ink); }

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo {
  font-size: var(--fs-xl);
  color: #fff;
  display: inline-flex;
  margin-bottom: 14px;
}

.site-footer__tagline {
  font-size: var(--fs-sm);
  line-height: 1.6;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

.site-footer__social {
  display: flex;
  gap: 10px;
}

.site-footer__social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: var(--transition);
}

.site-footer__social a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.site-footer__col h4 {
  color: #fff;
  font-size: var(--fs-md);
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
}

.site-footer__col a {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  /* высота строки-ссылки 40px — удобно попасть пальцем */
  padding: 9px 0;
  margin: -9px 0 3px;
  transition: color 0.2s ease;
  width: fit-content;
}

.site-footer__col a:hover { color: #fff; }

.site-footer__note {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  margin-top: 4px;
}

.footer-email {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.site-footer__col .footer-email__link {
  margin: 0;
  color: #fff;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.site-footer__col .footer-email__link:hover { color: #FFB38A; }

.footer-email__copy {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.footer-email__copy:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Telegram-канал под почтой: иконка и две строки — что это и зачем подписываться */
.site-footer__col .footer-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  color: #fff;
  font-weight: 600;
}

.footer-channel .icon {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.footer-channel small {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
}

.site-footer__col .footer-channel:hover { color: #FFB38A; }

/* Телефон: «Навигация» и «Где работаем» — в две колонки, футер вдвое короче */
@media (max-width: 767px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .site-footer__brand,
  .site-footer__top > .site-footer__col:last-child { grid-column: 1 / -1; }
}

.site-footer__bottom {
  padding: 22px 0;
  text-align: center;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  /* Белое «стекло»: не спорит с оранжевыми кнопками и карточками */
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 900;
}

.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

.back-to-top:hover { background: #fff; color: var(--primary-text); }

.site-footer__bottom p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}

.site-footer__bottom a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.site-footer__bottom a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }


/* ===== components/button.css ===== */
/* Три типа кнопок на весь сайт:
   .btn            — основная: оранжевая заливка, белый текст (одна на экран);
   .btn-secondary  — второстепенная: контур цвета текста;
   .btn-glass      — на фото и тёмном фоне: полупрозрачная белая. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  background-color: var(--primary-strong);
  color: #fff;
  border: 2px solid transparent;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-strong-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary,
.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover,
.btn-outline:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: none;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

/* ===== components/card.css ===== */
.places-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .places-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}

@media (min-width: 1200px) {
  .places-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Колонки ленты — их создаёт components/feed.js */
.places-grid__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

@media (min-width: 900px) {
  .places-grid__col { gap: 18px; }
}

.places-grid .place-card {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  aspect-ratio: 4 / 5;
}

/* Пропорции карточек ленты — синхронно с CARD_RATIOS в feed.js */
.place-card--r0 { aspect-ratio: 4 / 5; }
.places-grid .place-card--r1 { aspect-ratio: 3 / 4; }
.places-grid .place-card--r2 { aspect-ratio: 2 / 3; }
.places-grid .place-card--r3 { aspect-ratio: 5 / 7; }
.places-grid .place-card--r4 { aspect-ratio: 10 / 13; }

/* Телефон: как в Пинтересте — узкие поля, карточки вытянуты вверх.
   Пропорции — синхронно с PHONE_RATIOS в feed.js */
@media (max-width: 767px) {
  .places-grid { gap: 8px; margin-inline: -8px; }
  .places-grid__col { gap: 8px; }
  .places-grid .place-card,
  .places-grid .feed-suggest { border-radius: 16px; }
  .places-grid .place-card--r0 { aspect-ratio: 2 / 3; }
  .places-grid .place-card--r1 { aspect-ratio: 3 / 4; }
  .places-grid .place-card--r2 { aspect-ratio: 20 / 29; }
  .places-grid .place-card--r3 { aspect-ratio: 3 / 5; }
  .places-grid .place-card--r4 { aspect-ratio: 5 / 7; }
}

/* «Знаешь место, которого здесь нет?» среди карточек ленты — пунктир,
   как у «Не могу выбрать — удиви меня» в hero: не место, а приглашение */
.feed-suggest {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  aspect-ratio: 4 / 5;
  padding: 18px;
  border: 1.5px dashed rgba(185, 60, 5, 0.35);
  border-radius: var(--radius-card);
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, rgba(255, 170, 110, 0.35), transparent 70%),
    linear-gradient(160deg, #FFF6EE 0%, #FBE6D6 100%);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feed-suggest:hover { transform: translateY(-4px); border-color: var(--primary); }

.feed-suggest__icon { width: 30px; height: 30px; margin-bottom: auto; color: var(--primary); }

.feed-suggest__title {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.25;
}

.feed-suggest__link { font-size: var(--fs-sm); font-weight: 600; color: var(--primary-text); }

@media (max-width: 480px) {
  .feed-suggest { padding: 14px; }
  .feed-suggest__icon { width: 24px; height: 24px; }
  .feed-suggest__title { font-size: var(--fs-sm); }
  .feed-suggest__link { font-size: var(--fs-xs); }
}

.place-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  background: var(--cream-deep);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 100%;
  min-height: 280px;
  cursor: pointer;
}

.place-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft-hover); }

.place-card:hover img { transform: scale(1.04); }

/* То же затемнение снизу, что у карточек настроений в hero */
.place-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--photo-fade);
  z-index: 1;
  pointer-events: none;
}

.place-card__top {
  position: absolute;
  top: 15px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  z-index: 2;
}

/* Одна спокойная плашка вместо разноцветных по категориям — как
   «Сейчас в тему» у карточек настроений */
.place-card__category {
  padding: 4px 10px;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-card);
}

.fav-btn {
  position: absolute;
  top: 0px;
  right: 12px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xl);
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
  color: #ff3366;
}

.fav-btn.active {
  background: rgba(255, 51, 102, 0.9);
  color: white;
}

.fav-btn.animate {
  animation: favPop 0.3s ease-out;
}

@keyframes favPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); background: #ff3366; color: white; }
  100% { transform: scale(1); }
}

.place-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.place-card__info {
  position: absolute;
  bottom: 0;
  z-index: 2;
  width: 100%;
  padding: 14px 16px;
  color: white;
  line-height: 1.2;
}

.place-card__info h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Метро под названием: по нему решают, далеко ли идти (задача 97) */
.place-card__metro {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .place-card__metro { font-size: var(--fs-xs); }
}

.badge-temporary,
.badge-now {
  padding: 4px 10px;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: #fff;
  background: var(--primary-strong);
  border-radius: var(--radius-card);
}

.similar-card {
  flex: 0 0 240px;
  text-decoration: none;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.similar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-hover);
}

.similar-card img {
  flex: none;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--cream-deep);
}

/* Карточки в ряду одной высоты; тип места прижат к низу — у коротких
   названий пустота не висит под текстом, строки типа на одной линии */
.similar-card { display: flex; flex-direction: column; }

.similar-card .info { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; }

.similar-card .info h4 {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.similar-card .info p { margin-top: auto; font-size: var(--fs-sm); color: var(--text-light); }

/* При отсутствии фото показываем иконку категории на фирменной подложке. */
.place-card__img.is-broken,
.similar-card img.is-broken {
  visibility: hidden;
}

.place-card .place-card__fallback {
  display: none;
  position: absolute;
  top: 44%;
  left: 50%;
  width: clamp(42px, 32%, 62px);
  height: auto;
  transform: translate(-50%, -50%);
  color: var(--primary-strong);
  stroke-width: 1.5;
}

.place-card:has(.place-card__fallback):not(:has(.place-card__img:not(.is-broken))) {
  background: #fff0e2;
  box-shadow: inset 0 0 0 1px #ffcbaa, var(--shadow-soft);
}

.place-card:has(.place-card__fallback):not(:has(.place-card__img:not(.is-broken)))::before {
  display: none;
}

.place-card:has(.place-card__fallback):not(:has(.place-card__img:not(.is-broken))) .place-card__info {
  color: var(--ink);
}

.place-card:has(.place-card__fallback):not(:has(.place-card__img:not(.is-broken))) .place-card__fallback {
  display: block;
}

/* Небольшие превью: вместо битого файла — прозрачная картинка на подложке */
.similar-card img.is-broken,
.randomizer-preview img.is-broken,
.state-card img.is-broken,
.now-card__photo.is-broken {
  visibility: visible;
  content: url("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");
  background: var(--photo-placeholder);
}

.fav-btn-hero[aria-pressed="true"],
.mobile-actions-bar .active { color: var(--primary); }

/* Скелетоны на время загрузки данных */
.place-card.skeleton,
.suggested-card.skeleton {
  cursor: default;
  background: var(--cream-deep);
  overflow: hidden;
  position: relative;
}

.place-card.skeleton::before,
.suggested-card.skeleton::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  100% { transform: translateX(100%); }
}

.suggested-card.skeleton { min-height: 220px; }

@media (prefers-reduced-motion: reduce) {
  .place-card img { transition: none; }
  .place-card:hover,
  .place-card:hover img { transform: none; }
  .place-card.skeleton::before,
  .suggested-card.skeleton::before { animation: none; display: none; }
}

.feed-load-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  padding: 24px 16px;
}

/* «Почему сейчас» — место подходит моменту (погода, время, сезон):
   «Под крышей», «Закат в 17:34». Иконка — в цвет текста плашки */
.badge-now { display: inline-flex; align-items: center; gap: 5px; }
.badge-now .icon { flex: none; }

/* ===== components/filters.css ===== */
.map__categories-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map__categories-button {
  padding: 10px 12px;
  font-size: var(--fs-sm);
}

/* Панель фильтров карты: все элементы — «таблетки» одной высоты 44px */
.sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filters-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-light);
}

.dropdown-filter { position: relative; }

.checkbox-group { display: flex; }

/* «Сейчас открыто» — переключатель-чип вместо голого чекбокса */
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.checkbox-group label:hover { border-color: var(--line-strong); }

.checkbox-group input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 32px;
  height: 18px;
  margin: 0;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-group input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.checkbox-group input:checked { background: var(--success); }
.checkbox-group input:checked::after { transform: translateX(14px); }
.checkbox-group input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.checkbox-group label:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.metro-filter-input-wrapper { position: relative; padding: 10px; }

#metro-autocomplete { width: 100%; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); }

.metro-suggestions {
  position: absolute;
  background: white;
  border: 1px solid var(--line-strong);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  width: calc(100% - 20px);
}

.metro-suggestion-item {
  padding: 8px;
  cursor: pointer;
}

.metro-suggestion-item:hover {
  background-color: var(--cream);
}

.metro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
}

.metro-chip {
  background: var(--cream);
  border-radius: var(--radius-card);
  padding: 4px 10px;
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.metro-chip-remove {
  cursor: pointer;
  font-weight: bold;
  color: var(--text-light);
}

.metro-chip-remove:hover {
  color: var(--danger);
}

.popular-metros {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

.popular-metros-label {
  font-size: var(--fs-caption);
  color: var(--text-lighter);
  margin-bottom: 8px;
}

.popular-metros-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.popular-metro-btn {
  background: var(--cream);
  border: none;
  border-radius: var(--radius-card);
  padding: 5px 12px;
  font-size: var(--fs-caption);
  cursor: pointer;
  transition: background 0.2s;
}

.popular-metro-btn:hover {
  background: var(--cream);
  transform: translateY(-1px);
}

.filter-btn:hover,
.filter-btn[aria-expanded="true"] { border-color: var(--line-strong); }

.filter-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-sm);
  min-height: 44px;
  padding: 0 16px;
  width: 100%;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-content {
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
  margin-top: 8px;
  position: absolute;
  width: 100%;
  z-index: 10;
}
.dropdown-content.is-open { display: flex; }

.filter-buttons { margin-top: 4px; }

.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  font-family: inherit;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.categories_menu { margin-top: 20px; }

.categories_scroll {
  display: flex;
  gap: 10px;
  padding: 15px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories_scroll::-webkit-scrollbar { display: none; }

/* Кнопки категорий (лента, карта) и чипы рандомайзера — один вид:
   белая «таблетка» с тонкой рамкой, выбранная — тёмная */
.category-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px; /* удобно попасть пальцем */
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
  font-weight: 600;
  white-space: nowrap;
  font-size: var(--fs-sm);
}

.category-btn:hover { border-color: var(--line-strong); }

.category-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.category-search-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  margin-top: 4px;
}

.category-search-group:focus-within {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.category-search-icon {
  color: var(--text-lighter);
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.category-search-input {
  flex: 1;
  min-width: 0; /* без этого input не сжимается и распирает контейнер */
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 0;
  /* 16px — ниже этого значения iOS Safari зумит страницу при фокусе */
  font-size: 16px;
  font-family: inherit;
}

.category-search-clear[hidden] { display: none; }

.categories_scroll {
  scroll-padding-inline: 16px;
}

.feed-empty {
  text-align: center;
  padding: 48px 16px 8px;
}

.feed-empty[hidden] { display: none; }

.feed-empty p {
  font-size: var(--fs-md);
  color: var(--text);
  margin-bottom: 16px;
}

/* Подсказка поиска над лентой: «кафе у нас пока нет…» */
.feed-note {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--cream-deep);
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text);
}

.feed-note[hidden] { display: none; }

/* Примеры запросов в пустом результате */
.feed-empty__examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto 18px;
  max-width: 520px;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.feed-empty__examples[hidden] { display: none; }

.feed-empty__example {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  cursor: pointer;
}

.feed-empty__example:hover { border-color: var(--primary); color: var(--primary-text); }

.feed-empty .btn[hidden] { display: none; }

/* Ничего не нашлось — предложить место, которого нет */
.feed-empty__suggest {
  display: block;
  width: fit-content;
  margin: 14px auto 0;
  font-size: var(--fs-sm);
  color: var(--primary-text);
  text-underline-offset: 3px;
}

/* Плашка «Настроение: … · N мест ✕» над лентой */
.feed-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 16px 0 4px;
  padding: 10px 10px 10px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-card);
  font-size: var(--fs-sm);
  color: var(--text);
}

.feed-active__label {
  font-weight: 600;
  min-width: 0;
}

.feed-active__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.feed-active__together {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--primary-strong);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.feed-active__together[hidden] { display: none; }
/* Телефон: подпись — строкой целиком, под ней обе кнопки в ряд */
@media (max-width: 600px) {
  .feed-active:has(.feed-active__together:not([hidden])) .feed-active__label { flex: 1 1 100%; }
  .feed-active__together { margin-left: 0; padding: 0 12px; }
  .feed-active__reset { padding: 0 12px; }
}
@media (max-width: 420px) {
  .feed-active__wide { display: none; }
}
.feed-active__together .icon { width: 16px; height: 16px; }

.feed-active__reset:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-clear-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ===== components/search.css ===== */
/*
  Hero-поиск отключён для MVP и перенесён в архив:
  styles/_archive/hero-search.css (не импортирован в main.css).
  Кнопка рандомайзера теперь — карточка .mood-card--random в ряду
  настроений (styles/pages/home.css).
*/

.map-search-group {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  min-height: 44px;
  padding: 0 6px 0 4px;
}

.map-search-group:focus-within {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.map-filter-search {
  width: 100%;
  padding: 10px 12px;
  border: none;
  font-family: inherit;
  font-size: var(--fs-md);
  background: transparent;
  outline: none;
}

.search-clear {
  background: none;
  border: none;
  font-size: var(--fs-lg);
  cursor: pointer;
  color: var(--text-lighter);
  padding: 0 6px;
}

/* ===== components/state-screen.css ===== */
.state-screen {
  display: flex;
  align-items: center;
  min-height: calc(100dvh - var(--header-h) - 160px);
  padding: 72px 0;
}

.state-screen[hidden] { display: none; }

.state-screen__inner {
  max-width: 640px;
  text-align: left;
}

.state-screen__code {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  color: var(--accent-line);
  margin-bottom: 8px;
}

.state-screen__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 14px;
}

.state-screen__text {
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--text-light);
  max-width: 48ch;
  margin-bottom: 28px;
}

.state-screen__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.state-screen__btn {
  text-decoration: none;
  display: inline-block;
}

.state-screen__link {
  display: inline-block;
  padding: 8px 0;
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: var(--fs-md);
}

.state-screen__link:hover { color: var(--primary-text); }

.state-screen__suggested { margin-top: 56px; }

.state-screen__subtitle {
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 18px;
}

.state-screen__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.state-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--text);
}

.state-card img,
.state-card__ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--photo-placeholder);
  margin-bottom: 6px;
}

/* На узком экране три карточки встают 2 + 1 — оставляем две */
@media (max-width: 480px) {
  .state-screen__cards { grid-template-columns: 1fr 1fr; }
  .state-card:nth-child(n+3) { display: none; }
}

.state-card__name { font-weight: 600; font-size: var(--fs-md); }

.state-card__type { font-size: var(--fs-xs); color: var(--text-light); }

.state-card:hover .state-card__name { color: var(--primary-text); }

/* ===== components/modal.css ===== */
/* Окна (случайное место, поделиться) — в языке карточек сайта: белый
   лист с большим скруглением, тёплые линии, кнопки из общей системы. */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 37, 33, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.is-open { display: flex; }

body.modal-open { overflow: hidden; }

.modal-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  animation: modalFadeIn 0.2s ease;
}

.modal-content--sm { max-width: 360px; }

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-content { animation: none; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 0 24px;
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--fs-lg);
}

.modal-header__icon { color: var(--primary); font-size: 1.3em; }

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover { background: var(--ink); color: #fff; }

.modal-body { padding: 18px 24px 24px; }

.modal-hint {
  font-size: var(--fs-sm);
  color: var(--text-light);
  margin-bottom: 10px;
}

.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover { border-color: var(--line-strong); }

.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Случайное место ---------- */
/* Переключатель «Открыто сейчас / Любое место» — сегменты одной плашки */
.randomizer__mode {
  display: flex;
  padding: 4px;
  margin-bottom: 8px;
  border-radius: var(--radius-pill);
  background: var(--cream-deep);
}

.randomizer__mode-btn {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-light);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.randomizer__mode-btn[aria-pressed="true"] {
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: var(--shadow-bar);
}

/* Что покажем в выбранном режиме — одна строка под переключателем */
.randomizer__hint {
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--text-light);
  text-align: center;
}

/* Категории — одна строка с прокруткой, край гаснет */
.randomizer__chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 -24px 16px;
  padding: 0 24px 2px;
  scroll-padding-inline: 24px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent);
}

.randomizer__chips::-webkit-scrollbar { display: none; }
.randomizer__chips .chip { flex: none; }

.randomizer__stage { margin-bottom: 16px; }

/* Превью места — как мини-карточка на карте */
.randomizer-preview {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: box-shadow 0.2s, opacity 0.18s ease, transform 0.18s ease;
}

.randomizer-preview[hidden] { display: none; }

.randomizer-preview:hover { box-shadow: var(--shadow-soft-hover); }

/* Смена места: карточка на мгновение гаснет и приподнимается */
.randomizer-preview.is-changing { opacity: 0; transform: translateY(6px) scale(0.98); }

.randomizer-preview img {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--photo-placeholder);
}

.preview-info { flex: 1; min-width: 0; }

.preview-info h4 { margin: 0 0 2px; font-size: var(--fs-lg); line-height: 1.25; }

/* Тип места — тихой подписью под названием, не перебивает его */
#preview-category {
  margin-bottom: 6px;
  font-size: var(--fs-xs);
  color: var(--text-lighter);
}

.preview-desc {
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-facts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  list-style: none;
  padding: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-light);
}

.preview-facts li { display: flex; align-items: center; gap: 6px; }
.preview-facts .icon { color: var(--primary); flex: none; }
.preview-facts .is-open,
.preview-facts .is-open .icon { color: var(--success); }

/* Ничего не открыто — честно говорим и предлагаем подобрать на потом */
.randomizer__empty {
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  text-align: center;
}

.randomizer__empty p {
  margin-bottom: 14px;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
}

/* Кнопки — одной строкой, короткие подписи; на узком экране — друг под другом */
.randomizer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.randomizer-actions[hidden] { display: none; }
.randomizer-actions .btn { flex: 1 1 140px; min-width: 0; padding-inline: 16px; }

/* Кубик в заголовке крутится при броске */
.randomizer__dice.is-rolling { animation: randomizerRoll 0.5s ease; }

@keyframes randomizerRoll {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(200deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .randomizer__dice.is-rolling { animation: none; }
  .randomizer-preview { transition: box-shadow 0.2s; }
}

@media (max-width: 480px) {
  .modal-body { padding: 14px 18px 18px; }
  .randomizer__chips { margin-inline: -18px; padding-inline: 18px; }
  /* Компактнее: окно помещается на экран 320×568 без прокрутки */
  .randomizer .modal-header { padding: 16px 16px 0 18px; }
  .randomizer__mode { margin-bottom: 6px; }
  .randomizer__hint { margin-bottom: 12px; }
  .randomizer__chips { margin-bottom: 12px; }
  .randomizer-preview { padding: 10px; gap: 12px; }
  .randomizer-preview img { width: 64px; height: 64px; }
  .preview-desc { -webkit-line-clamp: 2; }
  /* Кнопки в одну строку, подписи не переносятся */
  .randomizer-actions { flex-wrap: nowrap; gap: 8px; }
  .randomizer-actions .btn {
    flex: 1 1 0;
    min-height: 48px;
    padding-inline: 10px;
    font-size: var(--fs-sm);
    white-space: nowrap;
  }
}

/* Поделиться */
.share-buttons { display: flex; flex-direction: column; gap: 8px; }

.share-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.share-option:hover { border-color: var(--line-strong); background: var(--cream); }

.share-option .icon { font-size: var(--fs-lg); color: var(--primary); }

.share-option__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  font-size: var(--fs-caption);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
}

/* ===== components/toast.css ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: min(92vw, 420px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow-soft-hover);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--error { background: var(--danger); }

@media (max-width: 768px) {
  .place-page .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ===== components/map.css ===== */
/* Карты (главная и страница места): метки, кластеры и мини-карточка в
   стиле сайта вместо стандартных пресетов и балунов Яндекса.
   Разметку создаёт scripts/components/map.js. */

/* Подложка чуть приглушённее и теплее — не спорит с фото-метками.
   [class*=…] вместо ymaps-2-1-NN-…: номер версии API меняется. */
.map-container [class*="ground-pane"] {
  filter: saturate(0.75) sepia(0.06);
}

/* ---------- Метка: круглое фото места ---------- */
/* Точка (0,0) слоя — координата места; хвостик метки указывает на неё */
.map-pin {
  position: absolute;
  left: -24px;
  top: -56px;
  width: 48px;
  height: 48px;
  z-index: 0; /* свой контекст наложения: хвостик (z-index: -1) — под фото, но не под картой */
}

.map-pin__photo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #fff;
  background-color: var(--cream-deep);
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 16px rgba(40, 20, 10, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Хвостик */
.map-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 44px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 3px 0;
  box-shadow: 3px 3px 6px rgba(40, 20, 10, 0.12);
  z-index: -1;
}

.map-pin--active .map-pin__photo {
  border-color: var(--primary);
  transform: scale(1.12);
}

.map-pin--active::after { background: var(--primary); }

/* Номер места в подборке — в углу фото */
.map-pin__num {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--primary-strong);
  border: 2px solid #fff;
  color: #fff;
  font-size: var(--fs-caption);
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* Подпись: на главной — при наведении, на странице места — всегда */
.map-pin__label {
  position: absolute;
  left: 56px;
  top: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-card);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(40, 20, 10, 0.18);
  pointer-events: none;
}

/* ---------- Кластер: тёмный кружок с числом ---------- */
.map-cluster {
  position: absolute;
  left: -24px;
  top: -24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(40, 20, 10, 0.3);
}

/* ---------- Мини-карточка места поверх карты ---------- */
.map-container { position: relative; }

.map-card {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5000; /* выше слоёв Яндекса */
  width: min(380px, calc(100% - 24px));
  border-radius: var(--radius-card);
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft-hover);
  animation: mapCardIn 0.2s ease-out;
}

.map-card__link {
  display: flex;
  gap: 14px;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
}

.map-card__photo {
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: var(--radius-sm);
  background-color: var(--cream-deep);
  background-size: cover;
  background-position: center;
}

.map-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 2px 26px 2px 0; /* справа — место под крестик */
}

.map-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: var(--fs-caption);
  font-weight: 700;
}

.map-card__type {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-text);
}

.map-card__status { color: var(--danger); }

.map-card__status--open { color: var(--success); }

.map-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.map-card__desc {
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.map-card__more {
  margin-top: auto;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--primary-text);
}

.map-card__link:hover .map-card__title { color: var(--primary-text); }

.map-card__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--text);
  font-size: var(--fs-lg);
  line-height: 1;
  cursor: pointer;
}

.map-card__close:hover { background: var(--ink); color: #fff; }

/* На телефоне карта всего 320px — карточка компактнее */
@media (max-width: 575px) {
  .map-card { left: 8px; bottom: 8px; width: calc(100% - 16px); }
  .map-card__link { gap: 12px; padding: 8px; }
  .map-card__photo { width: 84px; height: 84px; border-radius: var(--radius-sm); }
  .map-card__desc { -webkit-line-clamp: 1; }
  .map-card__title { font-size: var(--fs-md); }
}

@keyframes mapCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .map-card { animation: none; }
  .map-pin__photo { transition: none; }
}

/* ===== components/install.css ===== */
/* «Локадо на экране телефона» — scripts/components/install.js */

/* Тихая ссылка: в футере — на тёмном, в мобильном меню — на кремовом */
.install-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.install-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.install-link .icon { color: #FFB38A; }

.install-link--nav {
  /* в мобильном меню — внизу, над почтой */
  margin: auto 0 0;
  color: var(--text);
}

/* с установкой почта встаёт сразу под ней, а не прижимается вниз */
.install-link--nav:not([hidden]) + .nav-contact { margin-top: -12px; }

.install-link--nav:hover { color: var(--primary-text); }
.install-link--nav .icon { color: var(--primary); }

.install-link[hidden] { display: none; }

/* Окно с инструкцией */
.install-modal__app {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.install-modal__native { width: 100%; margin-top: 4px; }
.install-modal__native[hidden] { display: none; }

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.install-steps[hidden] { display: none; }

.install-steps li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-md);
  line-height: 1.4;
}

.install-step__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--primary-text);
  font-size: var(--fs-lg);
}

.install-modal__note {
  margin-top: 16px;
  font-size: var(--fs-xs);
  color: var(--text-light);
}

/* Плашка внизу экрана: один раз, со второго визита */
.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft-hover);
  animation: installBannerIn 0.35s ease;
}

.install-banner[hidden] { display: none; }

/* На странице места снизу уже есть панель действий — встаём над ней */
.place-page .install-banner { bottom: calc(84px + env(safe-area-inset-bottom)); }

.install-banner__icon { flex: none; width: 40px; height: 40px; border-radius: 10px; }

.install-banner__text {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.install-banner__how {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--primary-strong);
  color: #fff;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.install-banner__close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-light);
  cursor: pointer;
}

/* Кнопка «наверх» не прячется под плашкой */
body.has-install-banner .back-to-top { bottom: 96px; }

@keyframes installBannerIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .install-banner { animation: none; }
}

/* ===== components/consent.css ===== */
/* components/consent.css — плашка про cookie внизу экрана */

.consent-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 810;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  /* Не «таблетка»: текст бывает в две строки, и круглые края его поджимают */
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

/* На странице места снизу панель действий — встаём над ней */
.place-page .consent-banner { bottom: calc(84px + env(safe-area-inset-bottom)); }

.consent-banner__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-xs);
  line-height: 1.35;
  color: var(--ink);
}

.consent-banner__text a { color: var(--primary-text); text-underline-offset: 3px; }

.consent-banner__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.consent-banner__btn {
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--primary-strong);
  color: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.consent-banner__btn--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong, rgba(42, 37, 33, 0.2));
}

.consent-banner__btn:hover { filter: brightness(1.05); }
.consent-banner__btn--ghost:hover { background: var(--cream-deep); filter: none; }

@media (min-width: 769px) {
  .consent-banner {
    left: auto;
    right: 24px;
    bottom: 24px;
    max-width: 460px;
  }
}

/* Кнопка «наверх» не прячется под плашкой */
.has-consent-banner .back-to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }


/* ===== pages/home.css ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Не на весь экран: снизу выглядывает начало следующего блока — подсказка,
     что страница продолжается */
  min-height: 86svh;
  background: var(--hero-bg);
  background-color: var(--ink);
  color: var(--hero-fg);
  position: relative;
  /* шапка на главной лежит поверх hero (.main-header--overlay);
     снизу + высота волны, чтобы она не подрезала карточки настроений */
  padding: calc(var(--header-h) + 28px) 0 calc(60px + var(--hero-wave-h));
}

/* Волнистый нижний край: прямоугольник без нижней полосы + волна */
.hero {
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--hero-wave-h) + 1px) no-repeat,
    var(--hero-wave) bottom / 100% var(--hero-wave-h) no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--hero-wave-h) + 1px) no-repeat,
    var(--hero-wave) bottom / 100% var(--hero-wave-h) no-repeat;
}

@media (max-width: 768px) {
  .hero { --hero-wave-h: 24px; }
}


/* Плёночное зерно поверх градиента — убирает «компьютерную» гладкость */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.16;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

.hero__content {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

/* Воздух между вопросом и карточками: заголовок и выбор читаются
   как два отдельных шага, а не одна плотная стопка */
.hero__choices {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 12px;
}

@media (min-width: 768px) {
  .hero__choices {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    margin-top: 28px;
  }
}

.hero__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero__when {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--hero-muted);
}

.hero__tagline {
  font-size: var(--fs-md);
  color: var(--hero-muted);
}


/* Подсказка над карточками: ближе к ним, чем к вопросу (у hero gap 32px) */
.hero__pick {
  margin-bottom: -18px;
  font-size: var(--fs-md);
  color: var(--hero-muted);
}

.hero__pick + .hero__choices { margin-top: 0; }
@media (min-width: 768px) {
  .hero__pick { margin-bottom: -10px; }
}

.hero__tagline span {
  color: var(--hero-accent);
  font-weight: 700;
}

/* Фотокарточки настроений: на телефоне листаются вбок (край следующей
   карточки подсказывает, что их больше), с 768px стоят в один ряд. */
.hero__moods {
  display: flex;
  gap: 12px;
  width: calc(100% + 32px);
  margin-inline: -16px;
  padding: 4px 16px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
}

.hero__moods::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .hero__moods {
    width: auto;
    margin-inline: 0;
    padding: 4px 0 8px;
    justify-content: center;
    overflow: visible;
  }
}

.mood-card {
  position: relative;
  flex: 0 0 148px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 2px solid var(--hero-card-line);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--ink);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 768px) {
  .mood-card { flex-basis: 148px; }
}

/* На широком экране ряд из шести карточек по 148px выглядел полоской */
@media (min-width: 1200px) {
  .mood-card__label { font-size: var(--fs-md); }
  .mood-card__text { left: 14px; right: 14px; bottom: 14px; }
}

.mood-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.mood-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.78) 100%);
}

/* Название настроения — внизу карточки */
.mood-card__text {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}


.mood-card__label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.mood-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.5);
}

.mood-card:hover .mood-card__img { transform: scale(1.05); }

.mood-card.active { border-color: var(--primary); }

/* Название настроения — жирным основным шрифтом и крупнее подписи
   рандомайзера. Шрифт заголовков на первом экране — только у вопроса и
   заголовка ленты: иначе экран выглядит тяжёлым */
.mood-card[data-mood] .mood-card__label {
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.2;
}
@media (min-width: 1200px) {
  .mood-card[data-mood] .mood-card__label { font-size: 1.0625rem; }
}

/* Рандомайзер: тот же язык, что у карточек, но без фото — «стекло»,
   пунктир и кубик. На телефоне — полоса во всю ширину под лентой
   карточек (в конце прокрутки её бы не нашли), с 768px — карточка ряда. */
.mood-card--random {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: none;
  width: 100%;
  max-width: 420px;
  aspect-ratio: auto;
  padding: 12px 16px;
  background: var(--hero-glass);
  border-style: dashed;
  border-color: var(--hero-line);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mood-card--random::after { display: none; }

.mood-card--random .mood-card__label {
  color: var(--hero-fg);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}

.mood-card--random .mood-card__label { position: static; }



.mood-card__dice {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--hero-accent);
  transition: transform 0.4s ease;
}

@media (min-width: 768px) {
  .mood-card--random {
    flex: 0 0 148px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: auto;
    aspect-ratio: 3 / 4;
    margin-top: 4px; /* как верхний отступ ленты .hero__moods */
    padding: 14px 12px 12px;
  }
  .mood-card__dice { width: 36px; height: 36px; }
}

@media (min-width: 1200px) {
  .mood-card--random { flex-basis: 180px; padding: 16px 14px 14px; }
}

.mood-card--random:hover {
  background: var(--hero-glass-hover);
  border-style: solid;
}

.mood-card--random:hover .mood-card__dice { transform: rotate(-20deg); }

@media (prefers-reduced-motion: reduce) {
  .mood-card__dice { transition: none; }
  .mood-card--random:hover .mood-card__dice { transform: none; }
  .mood-card,
  .mood-card__img { transition: none; }
  .mood-card:hover,
  .mood-card:hover .mood-card__img { transform: none; }
}


@media (min-width: 576px) {
  .hero__title {
    font-size: 2.5rem;
  }
}

@media (min-width: 992px) {
  .hero__title {
    font-size: 3.1rem;
  }
}



.manifesto {
  margin-top: -1px;
  padding: 56px 0 48px;
  background: var(--cream-deep);
  border-bottom: 1px solid var(--accent-line);
}

.manifesto__inner {
  text-align: center;
  max-width: 780px;
}

.manifesto__eyebrow {
  text-transform: uppercase;
  font-size: var(--fs-caption);
  letter-spacing: 1.5px;
  color: var(--primary-text);
  font-weight: 700;
  margin-bottom: 14px;
}

.manifesto__quote {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
}

@media (min-width: 768px) {
  .manifesto__quote { font-size: var(--fs-2xl); }
}

.manifesto__quote span {
  color: var(--primary-text);
  font-weight: 700;
}

.manifesto__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  color: var(--text-light);
}

@media (min-width: 640px) {
  .manifesto__row { flex-direction: row; justify-content: center; gap: 24px; }
}

.manifesto__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-md);
}

.manifesto__item i { color: var(--primary); font-size: var(--fs-lg); }

.manifesto__divider {
  color: var(--primary);
  font-weight: 700;
  opacity: 0.6;
}

/* «Сейчас»: сезонная подборка мест (data/now.json). Карточка — высокое фото,
   под ним название и «когда лучше» из story места: голос Локадо прямо
   на главной */
.now {
  margin-top: 56px;
}

.now[hidden] { display: none; }

.now__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.now__live {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--text-light);
}
.now__live[hidden] { display: none; }
.now__live span { display: inline-flex; align-items: center; gap: 6px; }
.now__live .icon { font-size: 1.15em; color: var(--primary-text); }

.now-card__media {
  position: relative;
  display: block;
}

/* Почему место показано именно сейчас: плашка на фото снизу */
.now-card__reason {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: var(--fs-caption, 0.8rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(40, 20, 10, 0.15);
}
.now-card__reason .icon { flex: none; color: var(--primary-text); }

.now-card__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  background: var(--cream-deep);
  transition: transform 0.3s ease;
}


.now-card__name {
  display: block;
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}


.now-card__text {
  margin-top: 4px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text);
}

.now-card__text b { font-weight: 700; color: var(--primary-text); }

/* Название всегда тёмное: оранжевым при наведении оно выглядело как
   выделенное, а на телефоне :hover ещё и «залипал» после касания.
   Отклик на курсор — только фото чуть приподнимается */
@media (hover: hover) {
  .now-card:hover .now-card__media { transform: translateY(-4px); }
  .now-card__media { transition: transform 0.3s ease; }
}

.suggested-places {
  margin-top: 96px;
}

.suggested-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* Тот же язык, что у карточек мест, но с описанием под фото */
.suggested-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.suggested-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-hover);
}

.suggested-img {
  padding-top: 56%;
  background-color: var(--cream-deep);
  background-size: cover;
  background-position: center;
}

.suggested-content {
  padding: 16px 18px 18px;
}

.suggested-content h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.suggested-content p {
  font-size: var(--fs-md);
  color: var(--text-light);
  line-height: 1.45;
}

/* Тёплая полоса во всю ширину: разбивает однообразный ритм страницы
   (все секции шли на одном фоне и сливались) */
.categories-collections {
  margin-top: 96px;
  padding: 72px 0 80px;
  background:
    radial-gradient(ellipse 50% 60% at 100% 0%, rgba(255, 206, 150, 0.35), transparent 70%),
    var(--cream-deep);
}

.categories-collections .category-masonry { background: rgba(255, 255, 255, 0.72); }

/* Карта после полосы — отступ уже дала полоса */
.categories-collections + .map { margin-top: 80px; }

/* Категории — ряд плиток, под ним подборки своей сеткой: раньше стояли
   двумя колонками рядом и почти никогда не заканчивались на одной высоте */
.category-masonry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.collections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

@media (min-width: 769px) {
  .category-masonry-grid { grid-template-columns: repeat(6, 1fr); }
  .collections-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Плитки категорий: тёплый «утренний» градиент hero вместо холодного
   серо-голубого и разноцветных пятен; иконка — в акцентном цвете */
.category-masonry {
  position: relative;
  border-radius: var(--radius-card);
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 60% at 90% 0%, rgba(255, 206, 150, 0.55), transparent 70%),
    linear-gradient(160deg, #FFF6EE 0%, #FBE6D6 100%);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  min-height: 140px;
  text-align: left;
  color: var(--text);
  font-family: inherit;
}

.masonry-bg-shape { display: none; }

.masonry-icon {
  display: inline-block;
  font-size: var(--fs-2xl);
  line-height: 1;
  margin-bottom: 12px;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.category-masonry:hover .masonry-icon { transform: translateY(-2px) rotate(-6deg); }

.masonry-label {
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
}

/* «13 мест» — сколько выбора в категории; заполняется после загрузки базы */
.masonry-count {
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-light);
}

/* На телефоне — две компактные колонки: в одну колонку шесть плиток
   по 160px занимали почти два экрана */
@media (max-width: 420px) {
  .category-masonry-grid {
    gap: 10px;
  }
  .category-masonry {
    min-height: 96px;
    padding: 16px 14px 14px;
    border-radius: var(--radius-card);
  }
  .masonry-icon {
    font-size: var(--fs-xl);
    margin-bottom: 8px;
  }
  .masonry-label {
    font-size: var(--fs-sm);
  }
}

.category-masonry:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.collection-card {
  /* ширина карточки решает раскладку: фото слева или сверху */
  container-type: inline-size;
  display: block;
  color: var(--text);
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-hover);
}

.collection-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.collection-card__photo {
  display: block;
  aspect-ratio: 21 / 9;
  background-color: var(--cream-deep);
  background-image: var(--photo-placeholder);
  background-size: cover;
  background-position: center;
}

/* Содержимое — сверху вниз от начала: названия в ряду стоят на одной линии */
.collection-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 16px 18px 18px;
}

.collection-card__type {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary-text);
}

.collection-title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
}

.collection-title__end { white-space: nowrap; }

.collection-title__arrow {
  display: inline-block;
  color: var(--primary-text);
  transition: transform 0.2s ease;
}

.collection-card:hover .collection-title__arrow { transform: translateX(4px); }

.collection-desc {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-light);
}

/* Для выбора: сколько времени, сколько мест, бюджет */
.collection-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
}

.collection-card__meta:empty { display: none; }

.collection-card__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.collection-card__meta .icon { color: var(--primary); }

/* Широкая карточка (колонка на главной) — фото слева */
@container (min-width: 480px) {
  .collection-card__inner { flex-direction: row; }
  .collection-card__photo { flex: 0 0 38%; aspect-ratio: auto; min-height: 150px; }
  .collection-card__body { padding: 18px 20px; }
}

.map {
  margin-top: 96px;
}

.map-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  margin-bottom: 60px;
}

@media (min-width: 769px) {
  .map-section {
    flex-direction: row;
    min-height: 400px;
  }
}

.map-container {
  height: 300px;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--cream-deep);
  border: 1px solid var(--line);
}

/* Растягивается по высоте панели фильтров только на главной, где карта
   стоит с ней в одном ряду. Без .map-section правило ловило и карту на
   странице места: там ряда нет, и высота схлопывалась в полоску ~2px. */
@media (min-width: 769px) {
  .map-section .map-container {
    height: auto;
    flex: 3;
  }
}

/* Размер контейнера карты не зависит от того, что внутри нарисовала
   Яндекс.Карта. Без этого на компьютере (height: auto) слой карты чуть
   выше контейнера раздувал его, карта подстраивалась под новый размер
   (keepFitted в map.js) — и так бесконечно: карта росла, страница ехала. */
.map-container { contain: size; }

/* «Карта временно недоступна» — аккуратно по центру, а не текстом в углу */
.map-container .error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  padding: 24px;
  text-align: center;
  color: var(--text-light);
}

.map-panel__bar { display: contents; }

.map-filters-toggle {
  display: none;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.map-filters-toggle[aria-expanded="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.map-filters-toggle__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--primary-strong);
  color: #fff;
  font-size: var(--fs-caption);
}

.map-filters-toggle__count[hidden] { display: none; }

.map-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.place-section {
  margin-top: 96px;
}

@media (min-width: 576px) {
  .place-card {
    max-width: 270px;
    min-height: 370px;
  }
}

#show-more-btn {
  display: flex;
  margin: 36px auto 8px;
}

#show-more-btn.invisible { opacity: 0; pointer-events: none; height: 0; min-height: 0; padding: 0; border: 0; margin: 0; overflow: hidden; transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease; }

.feed-end {
  max-width: 420px;
  margin: 8px auto 0;
  text-align: center;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease 0.15s, height 0.5s ease;
}

#show-more-btn.invisible + .feed-end {
  opacity: 1;
  height: auto;
  padding: 8px 0 4px;
}

.feed-end p {
  font-size: var(--fs-md);
  color: var(--text);
  margin-bottom: 6px;
}

.feed-end span {
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.feed-end a { color: var(--primary-text); text-underline-offset: 3px; }

@media (min-width: 768px) {
  .site-footer__top {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 24px;
  }
}


@media (max-width: 768px) {
  /* Секции шли с одинаковым большим отступом и на телефоне давали пустые экраны */
  .now { margin-top: 40px; }

  .suggested-places,
  .categories-collections,
  .map,
  .place-section { margin-top: 64px; }

  .categories-collections { padding: 48px 0 56px; }
  .categories-collections + .map { margin-top: 56px; }

  .site-footer { margin-top: 64px; }

  /* Фильтры карты: над картой одна строка — кнопка «Фильтры» и категории
     с прокруткой вбок; поиск, метро, цена и «Сейчас открыто» раскрываются
     по кнопке и не отнимают у карты экран */
  .map-panel {
    order: -1;
    gap: 10px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
  }
  .map-container { height: 360px; }
  .map-panel__bar { display: flex; align-items: center; gap: 8px; }
  .map__categories-buttons {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    /* край строки гаснет — видно, что категорий больше */
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
    padding-right: 24px;
  }
  .map__categories-buttons::-webkit-scrollbar { display: none; }
  .map-filters-toggle { display: inline-flex; }
  .map-panel .sidebar-filters {
    display: none;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
  }
  .map-panel.filters-open .sidebar-filters { display: flex; }
  .map-panel .filters-title { display: none; }

  /* Подпись #… всегда под заголовком: раньше у коротких заголовков
     («Карта») она уезжала вправо, у длинных — переносилась вниз */
  .section-head { margin-bottom: 22px; }

  /* Длинные слова и адреса больше не распирают карточки */
  .info-card p,
  .place-card__info h3,
  .collection-desc,
  .suggested-content p { overflow-wrap: anywhere; }
}

/* Узкие карточки в две колонки на телефоне: мельче подписи и плашки */
/* «Сейчас» на телефоне — один ряд с прокруткой вбок, как карточки
   настроений в hero: край следующей карточки подсказывает, что их больше */
@media (max-width: 767px) {
  .now__cards {
    display: flex;
    gap: 12px;
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding: 4px 16px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .now__cards::-webkit-scrollbar { display: none; }
  .now-card {
    flex: 0 0 min(76%, 300px);
    scroll-snap-align: start;
  }
}

/* ===== Телефон: главная короче, лента удобнее (ревью мобильной версии) ===== */
@media (max-width: 767px) {
  /* Первый экран по содержимому: без пустой полосы под кнопкой рандомайзера,
     следующий блок выглядывает сильнее — подсказка «листай дальше» */
  .hero { min-height: 0; padding-bottom: calc(32px + var(--hero-wave-h)); }

  /* «Советуем заглянуть» — горизонтальный ряд, как «Сейчас в центре
     внимания»: две большие карточки одна под другой занимали почти два экрана */
  .suggested-grid {
    display: flex;
    gap: 12px;
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding: 4px 16px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .suggested-grid::-webkit-scrollbar { display: none; }
  .suggested-card { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
  .suggested-content h3 { font-size: var(--fs-md); }
  .suggested-content p {
    font-size: var(--fs-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

}

@media (max-width: 575px) {
  .places-grid .place-card__top { top: 10px; left: 10px; right: 10px; gap: 4px; }
  .places-grid .place-card__category,
  .places-grid .badge-temporary { font-size: var(--fs-caption); padding: 3px 8px; }
  /* Длинный тип («Музей современного искусства») — в одну строку */
  .places-grid .place-card__category {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .places-grid .place-card__info { padding: 12px 14px; }
  .places-grid .place-card__info h3 { font-size: var(--fs-lg); line-height: 1.2; }
}

@media (max-width: 480px) {
  .category-btn { padding: 0 16px; font-size: var(--fs-sm); }

  .state-screen { padding: 48px 0; }
  .site-footer__top { gap: 28px; }
}

.collection-card { cursor: pointer; }

/* С 768px пять настроений и рандомайзер — шесть карточек в ряд: ширина
   делится поровну, но не больше 200px, иначе ряд вылезал за край экрана */
@media (min-width: 768px) {
  .hero__choices .mood-card,
  .hero__choices .mood-card--random {
    flex-basis: min(200px, calc((min(100vw, 1240px) - 64px - 5 * 12px) / 6));
  }
}

/* ===== Главная-лента: лента сразу под героем, «Сейчас» и «Готовые
   планы» — карточки внутри неё (feed.js, inserts), карта — второй вид ===== */
.place-section { margin-top: 40px; }
/* Лента сразу под героем: герой по содержимому, а не на 86% экрана —
   на компьютере из-под него должен выглядывать заголовок ленты */
.hero { min-height: 0; padding-bottom: calc(44px + var(--hero-wave-h)); }
/* Компьютер: первый экран почти во всю высоту окна — простор вокруг
   вопроса и настроений, из-под волны выглядывает только заголовок ленты */
@media (min-width: 768px) {
  .hero { min-height: calc(100svh - 100px); }
}
.feed-head .section-lead { max-width: 560px; }

/* Закреплённая строка над лентой: категории отдельным рядом (во всю ширину,
   край растворяется), под ними поиск и «Список / Карта» */
.place-section .feed-toolbar {
  position: sticky;
  /* на 1px под шапку: иначе при дробной высоте шапки между ними
     просвечивала пиксельная полоса */
  top: calc(var(--header-h) - 1px);
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr auto;
  grid-template-areas: 'cats cats cats' 'search . view';
  align-items: center;
  gap: 4px 12px;
  margin: 12px -16px 0;
  padding: 6px 16px 10px;
  isolation: isolate;
}
/* Подложка строки — во всю ширину экрана и только когда строка прилипла:
   тогда она сливается с шапкой в одну белую панель (тот же цвет и размытие),
   а в покое строки как отдельного прямоугольника не видно */
.place-section .feed-toolbar::before {
  content: '';
  position: absolute;
  inset: -1px calc(50% - 50vw) 0;
  z-index: -1;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.place-section .feed-toolbar.is-stuck::before {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-bar);
}
/* Шапка над прилипшей строкой — без своей тени: шов не виден */
body.feed-toolbar-stuck .main-header { box-shadow: none; }
.feed-toolbar .categories_scroll {
  grid-area: cats;
  position: static;
  margin: 0;
  padding: 6px 0;
  box-shadow: none;
  /* последняя кнопка не обрезается ножом, а уходит в прозрачность */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.feed-toolbar .category-search-group { grid-area: search; max-width: none; margin: 0; }
.feed-toolbar .feed-view { grid-area: view; }
/* Вид «Карта»: строка ленты не нужна — остаётся только переключатель,
   не закреплённый и без подложки; у карты свои категории и фильтры */
.place-section .feed-toolbar--map {
  position: static;
  display: flex;
  justify-content: flex-end;
  background: none;
  box-shadow: none;
}
.feed-toolbar--map .categories_scroll,
.feed-toolbar--map .category-search-group { display: none; }

/* Карта — почти весь экран под шапкой, но внутри страницы: листаешь
   дальше — уходишь к подвалу, «Список» возвращает ленту */
.feed-map .map-section {
  height: calc(100svh - var(--header-h) - 96px);
  min-height: 440px;
  max-height: 820px;
  margin-bottom: 0;
}
.feed-map .map-container { height: auto; flex: 3; min-height: 0; }

.feed-view {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-bg);
}
.feed-view__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.feed-view__btn[aria-pressed='true'] { background: var(--ink); color: #fff; }

.is-off { display: none !important; }
.feed-map { margin-top: 20px; }
.feed-map[hidden] { display: none; }

/* Колонки перед витриной — вровень: последняя карточка в колонке
   растягивается до общей нижней линии (фото обрезается по месту) */
.places-grid--flush { align-items: stretch; }
.places-grid--flush .places-grid__col { container-type: inline-size; }
/* Растягивается не больше, чем до пропорции 4:7 — дальше фото
   выглядело бы мутным, а карточка — во весь экран */
.places-grid--flush .places-grid__col > :last-child { flex-grow: 1; max-height: 175cqi; }
.feed-stream > .places-grid:first-child { margin-top: 20px; }

/* Полосы-прерывания ленты: «Сейчас» и «Готовые планы» — наши персональные
   предложения. Крупнее карточки и со своим фоном, но целиком помещаются в
   экран: фото ниже, тексты короче */
.feed-stream > section {
  margin: 22px 0 4px;
  padding: 24px 24px 20px;
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}
.feed-stream > section > .container { padding: 0; max-width: none; }

/* Карточка-напоминание (подборка, «Сейчас») — как карточка места, но с
   плашкой раздела и призывом внизу */
.feed-promo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--cream-deep);
  box-shadow: var(--shadow-soft);
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feed-promo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--photo-fade);
  pointer-events: none;
}
.feed-promo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed-promo__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-strong);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: #fff;
}
.feed-promo__text { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; display: grid; gap: 4px; }
.feed-promo__text b { font-family: var(--font-heading); font-size: var(--fs-md); line-height: 1.2; }
.feed-promo__text small { font-size: var(--fs-sm); font-weight: 600; color: rgba(255, 255, 255, 0.9); }
@media (hover: hover) {
  .feed-promo:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft-hover); }
}
.feed-stream > .categories-collections {
  background:
    radial-gradient(ellipse 50% 60% at 100% 0%, rgba(255, 206, 150, 0.35), transparent 70%),
    var(--cream-deep);
  box-shadow: none;
}
.feed-stream .section-head { margin-bottom: 16px; }
.feed-stream .section-title { font-size: var(--fs-xl); }
/* В полосе ленты карточка подборки — без тизера: название, тип и пара
   фактов, остальное — на странице подборки */
.feed-stream .collection-desc { display: none; }
/* Шапка «Готовых планов»: заголовок с акцентом на «придумали» цветом
   бренда, под ним — тихая подпись, что за карточки ниже */
#collections .plans-title { font-size: 1.875rem; line-height: 1.1; }
#collections .plans-title em { font-style: normal; color: var(--primary); }
.plans-title__sub {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-light);
}
.feed-stream .section-lead { max-width: 640px; }
.feed-stream .collections-grid { margin-top: 0; }

/* Конец ленты: следующие шаги вместо тупика */
.feed-end { max-width: none; text-align: center; }
.feed-next {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 920px;
  margin: 16px auto 0;
  text-align: left;
}
.feed-end .feed-next__item {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-bg);
  font: inherit;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feed-end .feed-next__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.feed-next__item .icon { font-size: 1.4rem; color: var(--primary-text); }
.feed-end .feed-next__item b { display: block; font-size: var(--fs-md); color: var(--ink); }
.feed-end .feed-next__item span { display: block; margin: 0; font-size: var(--fs-sm); color: var(--text-light); }

@media (max-width: 767px) {
  .place-section { margin-top: 12px; }
  .place-section .feed-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'cats cats' 'search view';
    gap: 2px 8px;
    margin-top: 6px;
    padding: 4px 16px 8px;
  }
  .feed-view__btn { min-height: 36px; padding: 0 12px; }
  /* В ленте на телефоне — одна кнопка «Карта»; на карте — оба вида */
  .feed-view__btn[data-view='list'] { display: none; }
  .feed-toolbar--map .feed-view__btn[data-view='list'] { display: inline-flex; }
  .place-section .feed-toolbar--map { justify-content: flex-start; padding-block: 0; }
  /* Высота — у самой карты, а не у блока: раскрытые «Фильтры» сдвигают
     карту вниз, но не сжимают её */
  .feed-map .map-section { gap: 10px; height: auto; min-height: 0; max-height: none; }
  .feed-map .map-container { flex: none; height: calc(100svh - var(--header-h) - 130px); min-height: 380px; }
  .feed-map .map-panel { flex: none; }
  /* Воздух вокруг «Удиви меня»; из-под героя выглядывает заголовок
     ленты, а категории — уже за первым экраном. Вопрос чуть меньше,
     карточки чуть уже */
  /* «Удиви меня» — посередине между карточками и волной: одинаковый
     отступ сверху и снизу, а не прижата к карточкам */
  .hero { padding-bottom: calc(44px + var(--hero-wave-h)); }
  .hero__choices { gap: 36px; } /* + 8px нижнего отступа ленты = 44px */
  .hero__content { gap: 22px; }
  .hero__title { font-size: 1.75rem; }
  .hero__pick { margin-bottom: -10px; }
  .mood-card[data-mood] { flex-basis: 136px; }
  .feed-head .section-title { font-size: min(1.1875rem, 5vw); } /* крупнее «Удиви меня», но в одну строку */
  .feed-head .section-lead { display: none; }
  /* Полосы на телефоне: целиком в экран. Заголовок крупный, лид в две
     строки, карточки — рядом с прокруткой вбок и с невысоким фото */
  .feed-stream > section {
    margin: 16px -8px 4px;
    padding: 18px 16px 14px;
    border-radius: 20px;
  }
  .feed-stream .section-head { margin-bottom: 12px; }
  .feed-stream .section-head--row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .feed-stream .section-title { font-size: var(--fs-lg); }
  #collections .plans-title { font-size: 1.625rem; }
  .feed-stream .section-lead {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: var(--fs-sm);
  }
  .feed-stream .collections-grid {
    display: flex;
    gap: 12px;
    margin: 0 -16px;
    padding: 0 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .feed-stream .collections-grid::-webkit-scrollbar { display: none; }
  .feed-stream .collections-grid > * { flex: 0 0 78%; scroll-snap-align: start; }
  .feed-stream .collection-desc { display: none; }
  .feed-next { grid-template-columns: 1fr 1fr; }
}

/* ===== Настроения на телефоне — колодой (components/hero-carousel.js).
   Положение каждой карточки задаёт скрипт; с 768px — обычный ряд ===== */
@media (max-width: 767px) {
  /* Высота — по верхней карточке (14 + 293px) плюс запас под нижнюю в стопке */
  .hero__moods.is-carousel {
    position: relative;
    display: block;
    height: 316px;
    padding: 0;
    /* Обрезаем только бока (улетевшие карточки); тень снизу не режем */
    overflow: hidden;
    overflow: clip visible;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }
  .hero__moods.is-carousel .mood-card {
    position: absolute;
    top: 14px;
    left: 50%;
    width: 220px;
    margin-left: -110px;
    aspect-ratio: 3 / 4;
    border-width: 2px;
    border-radius: 26px;
    box-shadow: 0 26px 44px -22px rgba(70, 30, 8, 0.6), 0 2px 6px rgba(70, 30, 8, 0.12);
    transition: border-color 0.25s ease;
    will-change: transform;
    backface-visibility: hidden;
  }
  .hero__moods.is-carousel .mood-card:hover { border-color: var(--hero-card-line); }
  .hero__moods.is-carousel .mood-card.is-front { border-color: #fff; }
  /* Затемнение карточек в глубине стопки — слой поверх фото (--shade) */
  .hero__moods.is-carousel .mood-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #2A1608;
    opacity: var(--shade, 0);
    pointer-events: none;
  }
  /* Фото чуть шире карточки и сдвигается медленнее неё — объём без 3D */
  .hero__moods.is-carousel .mood-card__img,
  .hero__moods.is-carousel .mood-card:hover .mood-card__img {
    inset: 0 -12%;
    width: 124%;
    max-width: none; /* сброс стилей ограничивает картинки шириной родителя */
    transform: translateX(var(--par, 0%));
    transition: none;
  }
  /* Подпись — только у верхней карточки (--label гасит её у остальных) */
  .hero__moods.is-carousel .mood-card__text { z-index: 2; opacity: var(--label, 1); }
  .hero__moods.is-carousel .mood-card[data-mood] .mood-card__label { font-size: var(--fs-lg); }
}

/* «Готовые планы» перед лентой (задача 97, пункт 3): компактная полоса
   сразу под героем. Фон во всю ширину подложен под волну героя — волна
   переходит прямо в него, а снизу он становится прозрачным: зерно фона
   страницы проступает постепенно, резкой границы нет. Сама полоса — без
   своей карточки, слайдер как внутри ленты */
.hero:has(+ .plans-band) { z-index: 1; }
.plans-band {
  position: relative;
  margin-top: calc(-1 * var(--hero-wave-h));
  padding: calc(var(--hero-wave-h) + 8px) 0 24px;
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(255, 206, 150, 0.35), transparent 70%),
    var(--cream-deep);
}
/* Продолжение фона под заголовком ленты: тает долго и неравномерно
   (быстрее в начале, медленнее к концу) — так глаз не видит границы */
.plans-band::after {
  content: '';
  position: absolute;
  inset: 100% 0 auto;
  height: 220px;
  background: linear-gradient(180deg,
    rgba(243, 235, 223, 1) 0%,
    rgba(243, 235, 223, 0.7) 25%,
    rgba(243, 235, 223, 0.4) 50%,
    rgba(243, 235, 223, 0.15) 75%,
    rgba(243, 235, 223, 0) 100%);
  pointer-events: none;
  z-index: -1;
}
.plans-band .feed-stream > .categories-collections {
  margin: 0;
  padding-inline: 0;
  background: none;
  box-shadow: none;
}
/* Слайдер обрезает всё, что за его краем, — и тень карточек снизу резалась
   тёмной линией. Даём тени место внутри слайдера */
@media (max-width: 767px) {
  .plans-band .feed-stream .collections-grid { padding-bottom: 28px; margin-bottom: -22px; }
}
.plans-band + .place-section { margin-top: 8px; }

/* ===== pages/place.css ===== */
.place-hero {
  position: relative;
  /* Минимальная, а не фиксированная высота: длинный текст раздвигает
     первый экран вниз, а не уезжает под шапку */
  min-height: max(520px, 72vh);
  display: flex;
  align-items: flex-end;
  /* шапка лежит поверх фото (.main-header--overlay) */
  padding: calc(var(--header-h) + 24px) 0 calc(56px + var(--hero-wave-h));
  color: #fff;
  overflow: hidden;
}

/* Волнистый нижний край: прямоугольник без нижней полосы + волна */
.place-hero {
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--hero-wave-h) + 1px) no-repeat,
    var(--hero-wave) bottom / 100% var(--hero-wave-h) no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--hero-wave-h) + 1px) no-repeat,
    var(--hero-wave) bottom / 100% var(--hero-wave-h) no-repeat;
}

@media (max-width: 768px) {
  .place-hero { --hero-wave-h: 24px; }
  /* Название и подзаголовок — у нижнего края фото, над волной */
  .place-hero:not(.place-hero--no-photo) { padding-bottom: calc(28px + var(--hero-wave-h)); }
  .place-hero .hero-subtitle { margin-bottom: 0; }
  /* У подборки под подзаголовком плашки — им нужен отступ */
  .place-hero .hero-subtitle + .hero-facts { margin-top: 16px; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--ink);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Сверху — чтобы читалась шапка, снизу — как у карточек настроений */
.hero-overlay {
  position: absolute;
  inset: 0;
  /* Снизу плотнее: описание и плашки лежат на светлых частях фото (небо,
     фасады) и без подложки не читались */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0.3) 48%, rgba(0, 0, 0, 0.86) 100%);
  z-index: 1;
}

/* То же плёночное зерно, что в hero главной */
.place-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.14;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Тип места — подписью над заголовком (как «Настроение места»), а не
   третьим видом плашки рядом со стеклянными фактами и кнопками */
.hero-category {
  margin-bottom: 10px;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #FFB38A;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Кнопки — белые и выше плашек: так они не путаются с информацией */
.hero-actions button {
  background: #fff;
  border: none;
  color: var(--ink);
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-actions button .icon { color: var(--primary-text); }

.hero-actions button:hover {
  background: var(--cream-deep);
  transform: translateY(-1px);
}

.hero-actions button.active {
  background: var(--primary-strong);
  color: #fff;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
  /* Unbounded широкий: «Котельнической» на узком экране не влезало в строку */
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero-subtitle {
  font-size: var(--fs-md);
  line-height: 1.5;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  margin-bottom: 20px;
  max-width: 640px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  /* Факты — плоские тёмные плашки без рамки, кнопки рядом — белые */
  background: rgba(20, 14, 10, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.hero-fact .icon { color: #FF8A4C; }

@media (min-width: 992px) {
  .hero-title { font-size: 2.75rem; }
}

/* Фото нет или оно не загрузилось: вместо пустого тёмного экрана — тёплый
   градиент по категории места, и hero ниже (setHeroPhoto в place.js) */
.place-hero--no-photo {
  height: auto;
  min-height: 0;
  padding-top: calc(var(--header-h) + 88px);
}

.place-hero--no-photo .hero-bg {
  background:
    radial-gradient(ellipse 55% 60% at 85% 100%, rgba(255, 122, 48, 0.55), transparent 70%),
    radial-gradient(ellipse 45% 50% at 10% 10%, rgba(160, 70, 120, 0.4), transparent 70%),
    linear-gradient(160deg, #2E1A33 0%, #5A2539 55%, #9A3B2E 100%);
}

.place-hero--no-photo[data-category="nature"] .hero-bg {
  background:
    radial-gradient(ellipse 55% 60% at 85% 100%, rgba(236, 160, 70, 0.5), transparent 70%),
    radial-gradient(ellipse 45% 50% at 10% 10%, rgba(120, 170, 90, 0.4), transparent 70%),
    linear-gradient(160deg, #1C2A1E 0%, #34452A 55%, #6E5A2C 100%);
}

.place-hero--no-photo[data-category="food"] .hero-bg {
  background:
    radial-gradient(ellipse 55% 60% at 85% 100%, rgba(255, 150, 60, 0.6), transparent 70%),
    radial-gradient(ellipse 45% 50% at 10% 10%, rgba(200, 90, 60, 0.35), transparent 70%),
    linear-gradient(160deg, #2E1A14 0%, #5A2A1A 55%, #A2461F 100%);
}

.place-hero--no-photo[data-category="theater"] .hero-bg {
  background:
    radial-gradient(ellipse 55% 60% at 85% 100%, rgba(255, 110, 70, 0.45), transparent 70%),
    radial-gradient(ellipse 45% 50% at 10% 10%, rgba(220, 60, 90, 0.35), transparent 70%),
    linear-gradient(160deg, #230F1A 0%, #4A1628 55%, #7E2A2A 100%);
}

.place-hero--no-photo[data-category="photo"] .hero-bg,
.place-hero--no-photo[data-category="entertainment"] .hero-bg {
  background:
    radial-gradient(ellipse 55% 60% at 85% 100%, rgba(255, 140, 70, 0.45), transparent 70%),
    radial-gradient(ellipse 45% 50% at 10% 10%, rgba(120, 140, 220, 0.3), transparent 70%),
    linear-gradient(160deg, #161A36 0%, #2A2A52 55%, #6A3A48 100%);
}

.place-hero--no-photo .hero-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
}

@media (max-width: 768px) {
  .place-hero--no-photo { padding: calc(var(--header-h) + 48px) 0 calc(40px + var(--hero-wave-h)); }
}

/* На телефоне те же действия есть в нижней панели — круглые значки поверх
   фото только дублировали их (и «Позвонить» оставалась без подписи) */
@media (max-width: 768px) {
  .hero-actions { display: none; }
}

/* Телефон: первый экран с фото ниже — под ним сразу видны адрес и часы */
@media (max-width: 767px) {
  /* min-height, а не height: при фиксированной высоте длинный заголовок и
     описание упирались в шапку и уходили под неё (контент прижат к низу) */
  .place-hero:not(.place-hero--no-photo) { height: auto; min-height: max(420px, 60svh); }
  /* Тип места — сразу под названием, без пустоты между ними */
  .similar-card .info p { margin-top: 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: var(--fs-2xl); }
  .hero-subtitle { font-size: var(--fs-md); }
}

/* Секции страницы */
.place-collections,
.place-gallery-section,
.place-reviews,
.place-similar {
  margin-bottom: 72px;
}

/* Описание — главный текст страницы: крупно и тёмным, чтобы не терялось
   среди справки и карточек */
.description-text {
  font-size: var(--fs-lg);
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 18px;
}
.description-text p + p { margin-top: 0.75em; }

/* «Это место нам подсказали» — место от читателей */
.place-readers {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -6px 0 18px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-light);
}

.place-readers[hidden] { display: none; }
.place-readers .icon { flex: none; margin-top: 3px; color: var(--primary); }
.place-readers a { color: var(--primary-text); text-underline-offset: 3px; }

/* Окно с Яндекс Формой: шире обычного, форма прокручивается внутри */
.report-modal__content { max-width: 640px; display: flex; flex-direction: column; }

.report-modal__body { display: flex; flex-direction: column; min-height: 0; flex: 1; }

.report-modal__frame-wrap {
  padding: 20px 20px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.report-modal__frame {
  display: block;
  width: 100%;
  height: min(540px, 58dvh);
  border: 0;
  background: #fff;
}

@media (max-width: 480px) {
  .report-modal__frame-wrap { padding: 16px 14px 4px; }
}

.report-modal__fallback {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-modal__fallback:hover { color: var(--primary-text); }

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 20px;
}

.reviews-header .section-head { margin-bottom: 0; }

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 15px;
}

.average-rating {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
}

.stars-container {
  display: flex;
  gap: 4px;
  color: #FFB800;
  font-size: var(--fs-lg);
}

.reviews-count {
  color: var(--text-light);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.review-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.review-author {
  font-weight: 600;
}

.review-date {
  color: var(--text-lighter);
  font-size: var(--fs-sm);
}

.review-rating {
  color: #FFB800;
  margin-bottom: 10px;
}

.review-text {
  line-height: 1.6;
}

.add-review {
  background:
    radial-gradient(ellipse 60% 60% at 95% 0%, rgba(255, 206, 150, 0.45), transparent 70%),
    linear-gradient(160deg, #FFF6EE 0%, #FBE6D6 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px;
}

.add-review h3 {
  margin-bottom: 24px;
}

#review-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#review-form input,
#review-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: var(--fs-md);
  font-family: inherit;
}

#review-form input:focus,
#review-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.star-rating {
  display: flex;
  gap: 8px;
}

.star-rating .icon {
  font-size: var(--fs-2xl);
  color: var(--line-strong);
  cursor: pointer;
  transition: color 0.1s;
}

.star-rating .icon.active,
.star-rating .icon:hover { color: #FFB800; }

/* Ряд похожих мест — до краёв экрана: начинается по линии контента,
   а справа уходит за край, а не обрывается по колонке. Снизу запас под
   тень карточек, чтобы она не срезалась */
.similar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.similar-nav { display: flex; gap: 8px; margin-bottom: 24px; }

.similar-nav[hidden] { display: none; }

.similar-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--card-bg);
  color: var(--ink);
  font-size: var(--fs-lg);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.similar-nav__btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: #fff; }

.similar-nav__btn:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 768px), (hover: none) {
  .similar-nav { display: none; }
}

/* «Куда пойдём дальше?» — тот же ряд карточек, что «Похожие места»:
   вкладки по намерению (как фильтры ленты), первая карточка — готовый план */
.place-nearby .section-title em { font-style: normal; color: var(--primary); }

.nearby-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.nearby-tabs__count { font-weight: 500; opacity: 0.6; }

/* Карточка плана — одно фото на всю карточку, текст поверх на затемнении.
   Без фото остаётся тёплая подложка, текст читается на том же затемнении.
   Нажатие открывает окно «Маршрут отсюда» */
.plan-card { position: relative; min-height: 236px; padding: 0; font: inherit; text-align: left; cursor: pointer; background: var(--photo-placeholder); }
.plan-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(20, 16, 13, 0.88)); }
.similar-card.plan-card .plan-card__cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan-card__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-strong);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: #fff;
}
.plan-card__text { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; display: grid; gap: 4px; }
.plan-card__title { font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.plan-card__sub { font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.82); overflow-wrap: anywhere; }
.plan-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Окно «Маршрут отсюда»: остановки с фото и одной фразой, внизу — путь */
.plan-stops { list-style: none; margin: 0; padding: 0; display: grid; }
.plan-stop {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.plan-stop:first-child { border-top: 0; padding-top: 4px; }
.plan-stop__photo { display: block; border-radius: 14px; transition: opacity 0.2s; }
.plan-stop__photo:hover { opacity: 0.85; }
.plan-stop__img { display: block; width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--photo-placeholder); }
.plan-stop__img.is-broken { visibility: visible; content: url("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="); }
.plan-stop__text { display: grid; gap: 2px; min-width: 0; }
.plan-stop__kicker { font-size: var(--fs-xs); color: var(--text-light); }
.plan-stop__name { font-weight: 700; color: var(--text); text-decoration: none; }
a.plan-stop__name:hover { color: var(--primary-text); }
.plan-stop__desc { font-size: var(--fs-sm); color: var(--text-light); line-height: 1.45; }
.plan-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.plan-modal__actions .btn { flex: 1 1 auto; justify-content: center; }

.similar-scroll {
  --edge: 16px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px var(--edge) 40px;
  margin-bottom: -16px;
  scroll-padding-inline: var(--edge);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .similar-scroll { --edge: max(24px, calc((100% - 1200px) / 2 + 24px)); }
}

.similar-scroll::-webkit-scrollbar { display: none; }

.similar-scroll > * { scroll-snap-align: start; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.2s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.amenities-section {
  margin: 30px 0;
}

.amenities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amenity-item .icon {
  width: 24px;
  color: var(--primary);
}

.mobile-actions-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(40, 20, 10, 0.08);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 500;
  justify-content: space-around;
  border-top-left-radius: var(--radius-card);
  border-top-right-radius: var(--radius-card);
}

@media (max-width: 768px) {
  .mobile-actions-bar {
    display: flex;
  }
  /* добавляем отступ для контента, чтобы не перекрывался панелью — только на странице места */
  .place-page {
    padding-bottom: 80px;
  }
}

.mobile-actions-bar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text);
  gap: 4px;
  cursor: pointer;
}

.mobile-actions-bar button .icon {
  font-size: var(--fs-xl);
  color: var(--primary);
}

.mobile-actions-bar .active {
  color: var(--primary-text);
}

.place-page main > section { scroll-margin-top: calc(var(--header-h) + 16px); }

.place-page #place-content[hidden] { display: none; }

.today-schedule {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.schedule-season {
  margin: 4px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.show-full-schedule-btn {
  background: none;
  border: none;
  color: var(--primary-text);
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.full-schedule-modal {
  margin-top: 10px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.full-schedule-modal[hidden] { display: none; }

.full-schedule-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--fs-sm);
  padding: 3px 0;
}

.full-schedule-list strong { font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
  .gallery-item:hover img { transform: none; }
}

/* Последняя карточка «Похожих мест» — вся категория */
.similar-card--more {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 236px;
  padding: 18px;
  background:
    radial-gradient(ellipse 70% 60% at 90% 0%, rgba(255, 206, 150, 0.55), transparent 70%),
    linear-gradient(160deg, #FFF6EE 0%, #FBE6D6 100%);
}

.similar-card__more-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary-text);
}

.similar-card__more-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.place-more {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* Заглушка hero до загрузки данных: вместо тёмного экрана с «Загружаем…» —
   мерцающий фон и плашки на месте заголовка и описания */
.place-hero.is-loading .hero-bg {
  background: linear-gradient(110deg, #2A2521 30%, #3A322C 50%, #2A2521 70%);
  background-size: 200% 100%;
  animation: placeHeroShimmer 1.6s linear infinite;
}

.place-hero.is-loading .hero-category,
.place-hero.is-loading .hero-actions,
.place-hero.is-loading .hero-facts { visibility: hidden; }

.place-hero.is-loading .hero-title,
.place-hero.is-loading .hero-subtitle {
  color: transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
}

.place-hero.is-loading .hero-title { width: min(420px, 80%); }

.place-hero.is-loading .hero-subtitle { width: min(560px, 90%); min-height: 1.5em; }

/* Текст уже пришёл с сервера (api/og.php): название и описание видны
   сразу, мерцает только фон, пока не загрузилось фото */
.place-hero.is-loading.is-prefilled .hero-category { visibility: visible; }

.place-hero.is-loading.is-prefilled .hero-title,
.place-hero.is-loading.is-prefilled .hero-subtitle {
  width: auto;
  color: inherit;
  background: none;
}

.place-hero.is-loading.is-prefilled .hero-subtitle { color: rgba(255, 255, 255, 0.92); }

.place-hero.is-loading.is-prefilled .hero-facts { visibility: visible; }

@keyframes placeHeroShimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .place-hero.is-loading .hero-bg { animation: none; }
}

/* Автор фото (place, collection): мелкий значок «i» справа, по нажатию
   слева от него раскрывается «Фото: …» (core/credits.js) */
.photo-credit {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: var(--fs-caption);
  line-height: 1.4;
  color: var(--text-light);
}

.photo-credit[hidden],
.credit-text[hidden] { display: none; }
.photo-credit a { color: inherit; text-underline-offset: 2px; }
.photo-credit a:hover { color: var(--primary-text); }

.credit-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  color: inherit;
  font: italic 600 12px/1 Georgia, 'Times New Roman', serif;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s ease;
  /* палец попадает и в маленький значок */
  position: relative;
}
.credit-toggle::after { content: ''; position: absolute; inset: -11px; }
.credit-toggle:hover,
.credit-toggle[aria-expanded="true"] { opacity: 1; }
.credit-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; opacity: 1; }

/* Значок прямо на фото (первый экран, фото мест в подборке): светлым по
   полупрозрачной тёмной плашке, чтобы читался на любом снимке */
.photo-credit--on-photo {
  margin: 0;
  color: #fff;
  pointer-events: none;
}
.photo-credit--on-photo > * { pointer-events: auto; }
.photo-credit--on-photo .credit-toggle {
  border-color: transparent;
  background: rgba(20, 16, 12, 0.45);
  opacity: 0.85;
  backdrop-filter: blur(4px);
}
.photo-credit--on-photo .credit-text {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(20, 16, 12, 0.6);
  backdrop-filter: blur(4px);
}
.photo-credit--on-photo a:hover { color: #fff; }

/* На первом экране — справа внизу, над волной */
.place-hero .photo-credit--on-photo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--hero-wave-h) + 14px);
  margin: 0 auto;
  z-index: 3;
}

/* ---------- Справка и «О месте» ----------
   Справка — сразу под фото, без заголовка и без рамки: строки с иконками
   и тонкими линиями лежат прямо на фоне страницы. Ниже «О месте», на
   компьютере справа от него — «Идёшь не один?» и «Есть в подборках» */
.place-facts { margin-top: 24px; }

@media (min-width: 900px) {
  .place-facts { margin-top: 48px; }
}

.place-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--place-gap);
  margin: var(--place-gap) auto;
}

@media (min-width: 900px) {
  .place-main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  /* Правая колонка начинается вровень с текстом, а не с заголовком */
  .place-aside { margin-top: calc(var(--place-title-size) * 1.2 + 14px); }
}

/* Отступ между блоками страницы — один на всех: на телефоне 56px, шире — 72px.
   Заголовок «О месте» — 24px на телефоне, 28px шире */
.place-page { --place-gap: 72px; --place-title-size: var(--fs-2xl); }
@media (max-width: 768px) {
  .place-page { --place-gap: 56px; --place-title-size: 1.5rem; }
  .place-facts { margin-top: 28px; }
  .place-collections,
  .place-gallery-section,
  .place-similar { margin-bottom: var(--place-gap); }
  .similar-nav { margin-bottom: 16px; }
  /* У ленты карточек снизу запас под тень — гасим его, чтобы после ленты
     отступ был тем же, что между остальными блоками */
  .similar-scroll { margin-bottom: -40px; }
}

.place-aside { display: grid; gap: 28px; min-width: 0; }

.place-block__title {
  margin-bottom: 14px;
  /* Высота строки задана явно: от неё считается отступ правой колонки */
  line-height: 1.2;
  font-family: var(--font-heading);
  font-size: var(--place-title-size);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.description-text[hidden] { display: none; }

/* Строки справки: иконка в кружке, значение, подпись */
.fact-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.fact-row:first-child { padding-top: 0; border-top: 0; }

.fact-row[hidden] { display: none; }

.fact-row__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--primary);
}

.fact-row__icon .icon { width: 17px; height: 17px; }

.fact-row__body { min-width: 0; align-self: center; }

.fact-row__value,
.fact-row__status,
.fact-row__price { font-size: var(--fs-md); font-weight: 700; line-height: 1.4; color: var(--ink); }

.fact-row__price { font-weight: 600; }

.fact-row__price a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.fact-row__status { color: var(--success); }

.fact-row__status--closed { color: var(--danger); }

.fact-row__sub,
.fact-row__hours { margin-top: 2px; font-size: var(--fs-sm); line-height: 1.45; color: var(--text-light); }

.fact-row__value[hidden],
.fact-row__sub[hidden],
.fact-row__status[hidden] { display: none; }

.fact-row__hours .today-schedule { gap: 4px 10px; }

.closing-timer { display: block; margin-top: 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--danger); }

.closing-timer[hidden] { display: none; }

.closing-timer--open { color: var(--success); }

/* «Позвонить», «Сайт», «Маршрут» — плитками с иконкой над подписью */
.fact-acts { display: flex; gap: 8px; padding: 4px 0 14px; }

.fact-acts[hidden] { display: none; }

.fact-act {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 10px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card-bg);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.fact-act[hidden] { display: none; }

.fact-act .icon { width: 20px; height: 20px; color: var(--primary); }

.fact-act:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.fact-act:hover .icon { color: #fff; }

/* «Показать на карте» и «Что-то не так? Поправить» — строками-кнопками */
.fact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  font-family: inherit;
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
}

.fact-line[hidden] { display: none; }

/* Строка карты: слева «Показать на карте», справа (только когда нет
   плиток) — «Маршрут» */
.fact-maprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }

.fact-maprow[hidden] { display: none; }

.fact-maprow .fact-line { flex: 1; width: auto; border-top: 0; }

.fact-maprow__route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--primary-text);
  text-decoration: none;
}

.fact-maprow__route[hidden] { display: none; }

.fact-maprow__route .icon { color: var(--primary); }

.fact-maprow__route:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Есть «Маршрут» справа — стрелка раскрытия карты рядом с текстом */
.fact-maprow:has(.fact-maprow__route:not([hidden])) .fact-line__chevron { margin-left: 4px; }

.fact-map-toggle { font-weight: 700; color: var(--ink); }

.fact-map-toggle .icon { color: var(--primary); }

.fact-line__chevron { margin-left: auto; color: var(--text-light) !important; transition: transform 0.2s; }

.fact-map-toggle[aria-expanded="true"] .fact-line__chevron { transform: rotate(180deg); }

.fact-map-toggle:hover span { text-decoration: underline; text-underline-offset: 3px; }

.fact-map[hidden] { display: none; }

.fact-map .map-container {
  height: 260px;
  max-width: 100%;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.fact-fix { color: var(--text-light); }

.fact-fix span { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

.fact-fix:hover { color: var(--primary-text); }

.fact-fix:hover span { text-decoration-color: currentColor; }

/* Компьютер: справка плашкой в две колонки — слева часы и адрес, справа
   цена и кнопки; карта и «Поправить» — на всю ширину */
@media (min-width: 900px) {
  /* На компьютере справка — отдельной плашкой, как карточки сайта */
  .place-facts {
    /* Края плашки — вровень с текстом соседних блоков (у .container шире
       768px по 24px отступа по бокам) */
    width: calc(100% - 48px);
    max-width: calc(1200px - 48px);
    padding: 24px 28px 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "hours price"
      "addr acts"
      "map-t map-t"
      "map map"
      "fix fix";
    column-gap: 56px;
  }
  #hours-row { grid-area: hours; }
  #address-row { grid-area: addr; }
  #price-row { grid-area: price; padding-top: 0; border-top: 0; }
  .fact-acts { grid-area: acts; align-self: start; padding: 12px 0 14px; border-top: 1px solid var(--line); }
  .fact-maprow { grid-area: map-t; }
  .fact-map { grid-area: map; }
  .fact-fix { grid-area: fix; }
  /* Часов нет — адрес поднимается наверх, иначе слева над ним пустая ячейка */
  .place-facts--no-hours {
    grid-template-areas:
      "addr price"
      "addr acts"
      "map-t map-t"
      "map map"
      "fix fix";
  }
  .place-facts--no-hours #address-row { align-self: start; padding-top: 0; border-top: 0; }
  .fact-map .map-container { height: 320px; }
  /* Плитки на широком экране — в строку: иконка слева от подписи */
  .fact-act { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 12px; }
}

/* «Идёшь не один?» — яркая карточка: при прокрутке её видно сразу */
.invite-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  overflow: hidden;
  padding: 18px 16px 16px;
  border: 0;
  border-radius: var(--radius-card);
  /* Не светлее #D24406: на более ярком оранжевом белый мелкий текст
     читался плохо (контраст ниже 4,5) */
  background: linear-gradient(135deg, var(--primary-strong) 0%, #B33A04 100%);
  box-shadow: 0 12px 28px -12px rgba(210, 68, 6, 0.6);
  font-family: inherit;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.invite-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.invite-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.invite-card__who { position: relative; display: flex; align-items: center; gap: 12px; }

.invite-card__ava { display: flex; flex: none; }

.invite-card__ava i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--cream) center / cover no-repeat;
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-strong);
}

.invite-card__ava i + i { margin-left: -14px; background: var(--accent-soft); }

.invite-card__title { display: block; font-size: var(--fs-lg); font-weight: 700; line-height: 1.2; }

.invite-card__text { display: block; margin-top: 3px; font-size: var(--fs-sm); line-height: 1.4; }

.invite-card__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--primary-strong);
  transition: background 0.2s;
}

.invite-card__btn .icon { width: 20px; height: 20px; }

.invite-card:hover .invite-card__btn { background: var(--cream); }

/* Окно «Позвать друга»: на телефоне выезжает снизу */
.invite-options { display: grid; gap: 10px; }

.invite-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-family: inherit;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.invite-option:hover { border-color: var(--line-strong); }

.invite-option--main { border-color: var(--primary); background: #FFF6EF; }

.invite-option--main:hover { border-color: var(--primary-strong); }

.invite-option__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--primary);
}

.invite-option b { display: block; font-size: var(--fs-md); }

.invite-option small { display: block; margin-top: 2px; font-size: var(--fs-sm); line-height: 1.4; color: var(--text-light); }

@media (max-width: 768px) {
  .modal--sheet { align-items: flex-end; padding: 0; }
  .modal--sheet .modal-content {
    max-width: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Нижняя панель: «Позвать друга» — акцентом */
.mobile-actions-bar .mobile-actions-bar__accent { color: var(--primary-text); }

/* Панель выезжает, когда справка ушла с экрана (place.js, .is-shown): на
   первом экране «Позвонить» и «Маршрут» уже есть в справке */
@media (max-width: 768px) {
  .mobile-actions-bar { transform: translateY(110%); transition: transform 0.25s ease; }
  .mobile-actions-bar.is-shown { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-actions-bar { transition: none; }
}

/* «Похожие по настроению» — слово «настроению» цветом, как «дальше» */
.place-similar--mood .section-title em { font-style: normal; color: var(--primary); }

/* «Есть в подборках» — компактными строками */
.place-collections__list { display: grid; gap: 10px; }

@media (min-width: 768px) {
  .place-collections__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.collection-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.collection-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }

.collection-row__photo {
  height: 68px;
  border-radius: calc(var(--radius-card) - 6px);
  background: var(--photo-placeholder) center / cover no-repeat;
}

.collection-row__body { display: grid; gap: 2px; min-width: 0; }

.collection-row__type {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-text);
}

.collection-row__title { font-weight: 700; line-height: 1.3; }

/* «Есть в подборках» в правой колонке на компьютере (переносит place.js) */
@media (min-width: 900px) {
  .place-aside .place-collections { margin: 0; padding: 0; max-width: none; }
  .place-aside .place-collections .section-head { margin-bottom: 12px; }
  .place-aside .place-collections .section-title { font-size: var(--fs-lg); }
  .place-aside .place-collections__list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* ===== pages/collection.css ===== */
/* Страница подборки (collection.html): обложка — .place-hero из place.css,
   ниже — колонка статьи для чтения и карта всех мест. */

.collection-article {
  max-width: 760px;
  margin: 40px auto 72px;
}

.collection-byline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.collection-byline {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-light);
}

.collection-share {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.collection-share .icon { color: var(--primary-text); }
.collection-share:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.collection-share:hover .icon { color: #fff; }

/* ---------- План остановок ---------- */
/* Столбиком: номер, название и тип места; у маршрута номера соединены
   линией, между ними — время перехода */
.collection-plan {
  margin-bottom: 36px;
  padding: 18px 20px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  box-shadow: var(--shadow-soft);
}

.collection-plan__title {
  margin-bottom: 10px;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary-text);
}

.collection-plan__list {
  --num: 28px;
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}

.collection-plan__stop a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 4px 0;
  color: var(--ink);
  text-decoration: none;
}

.collection-plan__stop a:hover .collection-plan__name { color: var(--primary-text); }

.collection-plan__num {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--num);
  height: var(--num);
  border-radius: 50%;
  background: var(--primary-strong);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
}

.collection-plan__text { display: flex; flex-direction: column; min-width: 0; }

.collection-plan__name {
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
}

.collection-plan__sub {
  font-size: var(--fs-xs);
  color: var(--text-light);
  line-height: 1.35;
}

/* Маршрут: одна непрерывная линия через все номера — от центра первого
   до центра последнего (номер с заливкой лежит поверх неё) */
.collection-plan__list.is-route li { position: relative; }

.collection-plan__list.is-route li::before {
  content: '';
  position: absolute;
  left: calc(var(--num) / 2 - 1px);
  top: 0;
  bottom: 0;
  border-left: 2px solid var(--accent-line);
}

.collection-plan__list.is-route li:first-child::before { top: 50%; }
.collection-plan__list.is-route li:last-child::before { bottom: 50%; }

/* Время перехода — подписью на линии между остановками */
.collection-plan__walk {
  display: flex;
  align-items: center;
  min-height: 24px;
  padding-left: calc(var(--num) + 14px);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text-lighter);
}

.collection-plan__map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Текст ---------- */
.c-text { margin-bottom: 36px; }

.c-text p,
.c-place__text p {
  font-size: var(--fs-lg);
  line-height: 1.7;
  color: var(--text);
}

.c-text p + p,
.c-place__text p + p { margin-top: 14px; }

.c-text__title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ---------- Место ---------- */
.c-place { margin: 44px 0; scroll-margin-top: calc(var(--header-h) + 16px); }

.c-place__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.c-place__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-strong);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
}

.c-place__kicker {
  margin-bottom: 4px;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary-text);
}

.c-place__name {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.c-place__name a { color: var(--ink); text-decoration: none; }
.c-place__name a:hover { color: var(--primary-text); }

.c-place__type {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.c-place__photo {
  display: block;
  margin-bottom: 18px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--photo-placeholder);
}

.c-place__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.c-place__photo:hover img { transform: scale(1.03); }

/* Фото нет или не загрузилось — блок убираем целиком: в статье большая
   пустая плашка выглядит как ошибка вёрстки */
.c-place__photo:has(img.is-broken) { display: none; }

/* Значок «i» с автором фото — в углу самого фото (вид — .photo-credit--on-photo).
   Отступ под фото — у обёртки, иначе он «проваливается» сквозь неё и значок
   отсчитывается не от края фото */
.c-place__media { position: relative; margin-bottom: 18px; }
.c-place__media .c-place__photo { margin-bottom: 0; }
.c-place__media:has(img.is-broken) { display: none; }
.c-place__credit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
}
.c-place__photo:has(img.is-broken) + .c-place__credit { display: none; }

/* Совет — тёплая плашка, как «Настроение места» */
.c-place__tip {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-line);
  background: linear-gradient(160deg, #FFF6EE 0%, #FBE6D6 100%);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
}

.c-place__tip strong {
  display: block;
  margin-bottom: 4px;
  font-size: var(--fs-caption);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary-text);
}

/* Канал в конце статьи: та же тёплая плашка, что у совета, с кнопкой */
.collection-channel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 40px;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--accent-line);
  background: linear-gradient(160deg, #FFF6EE 0%, #FBE6D6 100%);
}

.collection-channel__text { flex: 1 1 280px; min-width: 0; color: var(--text-light); line-height: 1.5; }

.collection-channel__title {
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
}

.collection-channel__btn { flex: none; gap: 8px; }

/* Практическое: из базы мест, не из текста — не устаревает */
.c-place__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.c-place__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.c-place__facts li { display: inline-flex; align-items: center; gap: 6px; }
.c-place__facts .icon { color: var(--primary); }

.c-place__more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
}

.c-place__more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Переход между местами маршрута ---------- */
.c-walk {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -12px 0 -12px 21px;
  padding: 14px 0 14px 24px;
  border-left: 2px dashed var(--line-strong);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-light);
}

.c-walk .icon { color: var(--primary); }

/* ---------- Карта и ещё подборки ---------- */
/* Заголовки под статьёй — на ступень тише, чем названия мест в ней */
.collection-map .section-title,
.collection-more .section-title { font-size: var(--fs-xl); }

.collection-map { margin-bottom: 72px; scroll-margin-top: calc(var(--header-h) + 16px); }
.collection-map .map-container { height: 300px; }
/* На странице места кнопку маршрута на телефоне скрывает нижняя панель
   (place.css); здесь панели нет — кнопка нужна всегда */
.collection-map .map-actions { display: block; margin-top: 16px; }

.section-head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

/* На телефоне ссылка под заголовком: рядом она ломала заголовок на две строки */
@media (max-width: 480px) {
  .section-head--row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

.section-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
}

.section-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.collection-more { margin-bottom: 24px; }

.collection-more__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 769px) {
  .collection-map .map-container { height: 420px; }
  /* 2 карточки — на всю ширину, без пустой третьей колонки */
  .collection-more__grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 767px) {
  .collection-article { margin-top: 28px; }
  .c-text p,
  .c-place__text p { font-size: var(--fs-md); }
  .c-place { margin: 36px 0; }
  .c-place__num { width: 38px; height: 38px; font-size: var(--fs-md); }
  .c-walk { margin-left: 18px; }
  .collection-share span { display: none; }
  .collection-share { width: 40px; padding: 0; justify-content: center; }
  .collection-plan { padding: 16px 16px 10px; }
  .collection-map .section-title,
  .collection-more .section-title { font-size: var(--fs-lg); }
}

/* ---------- Все подборки (collections.html) ---------- */
.collections-index { padding-top: 40px; padding-bottom: 24px; }

.collections-index__title { font-size: var(--fs-2xl); margin-bottom: 8px; }

.collections-index__lead {
  margin-bottom: 24px;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text-light);
}

.collections-index__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.collections-index__filters:empty { display: none; }

.collections-index__more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 40px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
}

.collections-index__more-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
}

.collections-index__more-links { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 480px) {
  .collections-index__more { padding: 20px; }
  .collections-index__more-links { width: 100%; }
  .collections-index__more-links .btn { flex: 1; padding-inline: 12px; }
}

@media (min-width: 992px) {
  .collections-index__title { font-size: 2rem; }
}

/* ===== pages/legal.css ===== */
/* pages/legal.css — privacy/ и consent/: длинный текст, узкая колонка для чтения */

.legal {
  padding-top: 48px;
  padding-bottom: 72px;
}

.legal__article {
  max-width: 720px;
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--text);
}

.legal__title {
  font-family: var(--font-heading);
  /* Unbounded широкий: «конфиденциальности» на 375px в 28px не влезает */
  font-size: clamp(1.25rem, 6vw, var(--fs-2xl));
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.legal__updated {
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.legal__article h2 {
  margin: 36px 0 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  line-height: 1.3;
}

.legal__article p + p { margin-top: 10px; }

.legal__lead {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card-bg);
}

/* Таблица целей: на телефоне прокручивается сама, страница — нет */
.legal__table-wrap {
  margin: 12px 0;
  overflow-x: auto;
}
.legal__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.legal__table th,
.legal__table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal__table th { font-weight: 600; }

.legal__article ul {
  margin: 10px 0;
  padding-left: 1.25em;
  list-style: disc;
}

.legal__article li + li { margin-top: 6px; }

.legal__article a {
  color: var(--primary-text);
  text-underline-offset: 3px;
}

@media (min-width: 992px) {
  .legal { padding-top: 64px; }
  .legal__title { font-size: 2rem; }
}

.legal__reset {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* photos/: список «место — автор · лицензия» */
.credits-list { list-style: none; padding: 0; }
.credits-list li {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--text-light);
}
.credits-list li + li { margin-top: 0; }
.credits-list__name { color: var(--text); font-weight: 600; text-decoration: none; }
.credits-list a { color: var(--text); }

.legal__note {
  font-size: var(--fs-sm);
  color: var(--text-light);
}

/* ===== pages/suggest.css ===== */
/* pages/suggest.css — suggest.html: первый экран с кнопкой, как это
   работает, пример истории. Сама форма — в окне (стили .report-modal) */

.suggest { padding-bottom: 72px; }

/* --- Первый экран --- */
.suggest-hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 40px;
}

.suggest-hero__title {
  margin-top: 8px;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 8vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.suggest-hero__lead {
  margin-top: 14px;
  max-width: 460px;
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text-light);
}

.suggest-hero__kinds {
  margin-top: 10px;
  max-width: 460px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-light);
}

.suggest-hero__btn { margin-top: 24px; }

.suggest-hero__hint {
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--text-light);
}

/* Два фото настроений внахлёст и «записка» с фразой из истории */
.suggest-hero__art {
  position: relative;
  height: 300px;
  max-width: 440px;
  width: 100%;
  justify-self: center;
}

.suggest-hero__photo {
  position: absolute;
  border: 6px solid #fff;
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  background-color: var(--cream-deep);
  box-shadow: 0 18px 40px rgba(80, 40, 10, 0.18);
}

.suggest-hero__photo--1 { top: 0; right: 4%; width: 58%; height: 78%; transform: rotate(4deg); }
.suggest-hero__photo--2 { bottom: 0; left: 4%; width: 50%; height: 66%; transform: rotate(-5deg); }

.suggest-hero__note {
  position: absolute;
  right: 0;
  bottom: 18px;
  max-width: 200px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: var(--fs-sm);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
  transform: rotate(2deg);
}

/* --- Как это работает --- */
.suggest-steps { margin-top: 64px; }

.suggest-steps__list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.suggest-step {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-light);
}

.suggest-step strong {
  margin-top: 8px;
  font-size: var(--fs-md);
  color: var(--text);
}

.suggest-step__num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-strong);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* --- Пример истории: «записка» — цитата крупно, место, две строки.
   Кнопка — в этом же блоке: на телефоне под запиской, на компьютере
   слева под заголовком --- */
.suggest-example {
  display: grid;
  grid-template-areas: "head" "story" "cta";
  gap: 20px;
  margin-top: 56px;
}

.suggest-example__head { grid-area: head; }
.suggest-example .story { grid-area: story; margin: 0; }
.suggest-example__cta { grid-area: cta; }

.suggest-example__honest {
  margin-top: 10px;
  max-width: 360px;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-light);
}

.suggest-example__hint {
  margin-top: 10px;
  max-width: 420px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-light);
}

.story {
  position: relative;
  max-width: 760px;
  margin: 20px 0 0;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.story__mark {
  display: block;
  height: 36px;
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1;
  color: var(--primary);
}

.story__why {
  margin: 0;
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--ink);
}

.story__place {
  margin-top: 14px;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.story__place strong { color: var(--text); font-weight: 600; }

.story__more {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.story__more dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-light);
}

.story__more dd {
  margin: 2px 0 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text);
}

@media (min-width: 768px) {
  .suggest-steps__list { grid-template-columns: repeat(3, 1fr); }
  .story { padding: 32px 36px 28px; }
  .story__more { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (min-width: 768px) {
  .suggest-hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    padding-top: 56px;
  }
  .suggest-hero__art { height: 300px; }
}

@media (min-width: 1024px) {
  .suggest-example {
    grid-template-columns: 0.8fr 1.2fr;
    grid-template-areas: "head story" "cta story";
    grid-template-rows: auto 1fr;
    gap: 24px 48px;
  }
  /* Кнопка с подписью — вровень с низом записки */
  .suggest-example__cta { align-self: end; }
  .suggest-hero { gap: 48px; padding-top: 72px; }
  .suggest-hero__art { height: 360px; }
}

@media (max-width: 480px) {
  .suggest-hero__btn,
  .suggest-example__cta .btn { width: 100%; justify-content: center; }
  .suggest-hero__art { height: 200px; }
  .suggest-hero__note { max-width: 170px; font-size: var(--fs-xs); }
}

/* --- Окно с формой --- */
.suggest-modal__consent { margin-bottom: 12px; font-size: var(--fs-xs); line-height: 1.5; }
.suggest-modal__consent a { color: var(--primary-text); text-underline-offset: 3px; }

/* Запасная ссылка — тихая: нужна, только если форма не загрузилась */
.suggest-modal__fallback { font-size: var(--fs-xs); text-decoration: none; }
.suggest-modal__fallback:hover { text-decoration: underline; }

/* На телефоне — на весь экран: длинная форма в окне поверх страницы
   давала две прокрутки */
@media (max-width: 600px) {
  #suggest-modal { padding: 0; align-items: stretch; }
  #suggest-modal .modal-content {
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  #suggest-modal .report-modal__frame-wrap { padding: 12px 8px 4px; border: 0; }
  #suggest-modal .report-modal__frame { height: auto; min-height: 70dvh; }
}

/* ===== pages/together.css ===== */
/* pages/together.css — vmeste/: «Выбрать вместе». Колода карточек со
   свайпом, отправка другу, совпадения (pages/together.js) */

.together {
  max-width: 520px;
  padding-top: 20px;
  padding-bottom: 64px;
}

.together__screen[hidden] { display: none; }

.together__loading {
  padding: 48px 0;
  text-align: center;
  color: var(--text-light);
}
.together__loading[hidden] { display: none; }

.together__eyebrow {
  margin: 0 0 6px;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-text);
}

.together__title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.together__lead {
  margin: 0 0 18px;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-light);
}

.together__note {
  margin: 14px 0 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-light);
}
.together__note:empty { display: none; }

/* Кнопки */
.together__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border: none;
  border-radius: var(--radius-pill);
  /* Тёмный оранжевый: белый текст на ярком читался плохо (контраст 3,2) */
  background: var(--primary-strong);
  color: #fff;
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.together__btn[hidden] { display: none; }
.together__btn--ghost {
  min-height: 48px;
  margin-top: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--cream-deep);
}

/* Старт: из чего выбираем */
.together__sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.together-source {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 4px 14px rgba(60, 25, 5, 0.06);
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.together-source .icon {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: #FFF1E6;
  color: var(--primary-text);
}
.together-source small {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-light);
}
.together-source.is-active { border-color: var(--primary); }

/* Колода */
.together__intro {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #FFF1E6;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--ink);
}
.together__intro[hidden] { display: none; }

.together__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.together__count {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}
.together__count b { color: var(--primary-text); }

.together__done {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}
.together__done[hidden] { display: none; }

.together__deck {
  position: relative;
  /* высота колоды — от ширины, но так, чтобы кнопки ✕ и ♥ помещались
     на экран вместе с колодой; с пояснением сверху (друг) — ниже */
  height: clamp(300px, calc(100svh - var(--header-h) - 200px), min(calc((100vw - 32px) * 1.3), 600px));
}
.together__intro:not([hidden]) ~ .together__deck {
  height: clamp(280px, calc(100svh - var(--header-h) - 290px), min(calc((100vw - 32px) * 1.3), 600px));
}

.together-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 26px;
  background: var(--photo-placeholder, #E8DFD5);
  box-shadow: 0 18px 40px rgba(60, 25, 5, 0.16);
  /* вертикальную прокрутку отдаём странице, горизонтальный жест — свайпу */
  touch-action: pan-y;
  user-select: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.together-card:not(.is-top) { transform: scale(0.95) translateY(10px); }
.together-card.is-top { cursor: grab; }
.together-card.is-dragging { transition: none; cursor: grabbing; }

.together-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.together-card__info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 72px 18px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
}
.together-card__meta {
  margin: 0 0 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  opacity: 0.85;
}
.together-card__name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.together-card__text {
  margin: 8px 0 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  opacity: 0.92;
}
.together-card__more {
  display: inline-block;
  margin-top: 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #fff;
  text-underline-offset: 3px;
}

/* «Хочу» / «Не сейчас» проявляются по мере сдвига карточки */
.together-card__stamp {
  position: absolute;
  top: 22px;
  padding: 6px 12px;
  border: 3px solid currentColor;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
}
.together-card__stamp--yes { left: 18px; color: #7EE2A0; transform: rotate(-12deg); opacity: var(--yes, 0); }
.together-card__stamp--no { right: 18px; color: #fff; transform: rotate(12deg); opacity: var(--no, 0); }

.together__empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 24px 8px;
  text-align: center;
  color: var(--text-light);
}
.together__empty p { margin: 0 0 4px; font-size: var(--fs-md); }
.together__votes[hidden],
.together__hint[hidden] { display: none; }

.together__votes {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}
.together__vote {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.together__vote .icon { width: 26px; height: 26px; }
.together__vote--no { background: #fff; color: var(--text-light); }
.together__vote--yes { background: var(--primary); color: #fff; }

.together__hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-light);
}

/* Отправка: выбранные места, крестик убирает место */
.together__picked {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.together-picked {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(60, 25, 5, 0.06);
}
.together-picked img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.together-picked span {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--ink);
}
.together-picked__remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-light);
  cursor: pointer;
}
.together-picked__remove:hover { background: var(--cream-deep); color: var(--ink); }

.together__restart {
  display: block;
  margin: 18px auto 0;
  padding: 8px 12px;
  border: none;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Совпадения */
.together__matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.together-match {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 4px 14px rgba(60, 25, 5, 0.06);
  color: var(--ink);
  text-decoration: none;
}
.together-match img {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}
.together-match b {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
}
.together-match small {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-xs);
  color: var(--text-light);
}

@media (prefers-reduced-motion: reduce) {
  .together-card { transition: none; }
}

