/*
 * мероприятия.рус — стили сайта на Go. Обычный CSS, без сборщиков: один файл.
 * Палитра — из site/resources/css/app.css (PHP, @theme). Шрифт — Inter (self-hosted subset:
 * латиница, кириллица и знак ₽ отдельным файлом), углы прямые (радиус 0).
 *
 * Часть между маркерами @critical и @end-critical сервер вставляет инлайном в <head>
 * (шапка, hero, фильтры, карточки, формы, страница мероприятия — всё, что в первом экране),
 * а весь файл грузится без блокировки отрисовки. Маркеры не удалять.
 * Адреса url(/static/…) сервер при старте меняет на имена с отпечатком.
 *
 * Мобильные — первым делом: базовые правила для телефона, @media (min-width: 640px) — sm,
 * (min-width: 1024px) — lg, как у Tailwind в PHP.
 */

/* @critical */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(/static/fonts/inter-cyrillic.5d92f8514a.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(/static/fonts/inter-latin.09b06ad3cc.woff2) format('woff2');
    unicode-range: U+0000-007E, U+00A0-00BF, U+00D7, U+00F7, U+2002-2026, U+2030, U+2039-203A, U+2122, U+2212;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(/static/fonts/inter-rub.0361cfdc01.woff2) format('woff2');
    unicode-range: U+20BD;
}

:root {
    /* Фон и поверхности */
    --page: #f7f7f7;        /* фон страницы */
    --surface: #ffffff;     /* карточки, фильтр-бар, шапка */
    --line: #e4e3e3;        /* границы */
    --line-soft: #ebebeb;   /* разделители, фон пилюль */
    --page-muted: #eef0f2;  /* фон раздела «Прошедшие» */

    /* Текст */
    --ink: #1e1e1e;         /* основной текст */
    --dim: #34404c;         /* второй уровень (он же футер) */
    --muted: #5b6672;       /* приглушённый (≥ 4.5:1 на белом) */
    --faint: #8a9199;       /* подписи: только крупные и декоративные элементы */

    /* Бренд */
    --brand: #50a76a;       /* зелёный: hero, лента подписки, логотип, иконки */
    --brand-hover: #3f8f57;
    --brand-dark: #2f7a46;  /* зелёные текст-ссылки (≥ 4.5:1 на белом) */
    --brand-deep: #2c683e;  /* наведение на тёмно-зелёную кнопку (6.7:1 с белым) */
    --brand-soft: #cbe79c;  /* светло-зелёный: кнопка в шапке, лейблы */
    --brand-tint: #eaf4ec;  /* очень светлый зелёный фон */
    --footer: #34404c;
    --danger: #e03131;
    --danger-ink: #b92d2d;  /* текст ошибки на светло-зелёном (5.4:1) */
    --selection: rgba(80, 167, 106, 0.25);
    --focus-ring: 0 0 0 3px rgba(80, 167, 106, 0.22);

    /* Шрифт */
    --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Геометрия: углы прямые, контейнер как на нынешнем сайте */
    --radius: 8px;          /* одно скругление на весь сайт; круглые — только точки и иконки */
    --wrap: 1232px;
    --gutter: 16px;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page);
    color: var(--ink);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--selection); }

h1, h2, h3, h4 { margin: 0; overflow-wrap: anywhere; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--brand-dark);
    outline-offset: 2px;
}

main { flex: 1; outline: none; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Только для экранных дикторов */
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip-link: виден только при фокусе с клавиатуры */
.skip {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    padding: 10px 16px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(30, 30, 30, 0.16);
    transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Иконка из спрайта: <svg class="i"><use href="…#cal"/></svg> */
.i { width: 20px; height: 20px; flex-shrink: 0; }

/* Иконка-маска на псевдоэлементе (без лишних узлов DOM). Цвет — --icc, по умолчанию цвет текста */
.ic::before {
    content: '';
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: var(--icc, currentColor);
    -webkit-mask: var(--ic) center / contain no-repeat;
    mask: var(--ic) center / contain no-repeat;
}
.ic-cal { --ic: url(/static/icons.82a73bf2a5.svg#v-cal); }
.ic-pin { --ic: url(/static/icons.82a73bf2a5.svg#v-pin); }
.ic-waves { --ic: url(/static/icons.82a73bf2a5.svg#v-waves); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn .i { width: 16px; height: 16px; }
.btn-p { background: var(--brand-soft); color: var(--ink); }
.btn-p:hover { background: var(--brand); color: #fff; }
.btn-d { background: var(--ink); color: #fff; }
.btn-d:hover { background: var(--dim); }
.btn-o { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-o:hover { border-color: var(--ink); }
.btn-oi { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn-oi:hover { background: var(--ink); color: #fff; }
/* Белая кнопка на зелёной полосе — со смещённой чёрной тенью, как на сайте */
.btn-w {
    border-color: var(--ink);
    background: var(--surface);
    color: var(--ink);
    box-shadow: 3px 4px 0 0 #000, -3px 4px 0 0 #000;
}
.btn-w:hover { background: var(--ink); color: #fff; }
.btn:disabled, .btn.is-busy { opacity: .6; cursor: not-allowed; }

.link {
    color: var(--brand-dark);
    text-decoration: underline;
    text-decoration-color: rgba(47, 122, 70, .3);
    text-underline-offset: 3px;
    transition: color .15s;
}
.link:hover { color: var(--brand-hover); text-decoration-color: currentColor; }

/* ---------- Шапка ---------- */
.hd {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}
/* Сетка шапки. Телефон: логотип и кнопки — первая строка, «Каталог» и быстрые подборки — вторая.
   От sm: «Каталог событий» рядом с логотипом, полоса подборок — второй строкой на всю ширину. */
.hd-g {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo logo nav" "cat quick quick";
    align-items: center;
    column-gap: 8px;
}
.hd-g > .logo { grid-area: logo; }
.hd-nav { grid-area: nav; display: flex; height: 56px; align-items: center; justify-content: flex-end; gap: 4px; }
.hd-cat {
    grid-area: cat;
    min-height: 40px;
    margin-bottom: 8px;
    padding: 0 12px;
    gap: 8px;
    background: var(--brand-dark);
    color: #fff;
    font-size: 14px;
}
.hd-cat:hover { background: var(--brand-deep); }
.hd-cat { --ic: url(/static/icons.82a73bf2a5.svg#v-menu); --icc: #fff; }
.hd-cat::before { width: 20px; height: 20px; }
.hd.is-open .hd-cat { --ic: url(/static/icons.82a73bf2a5.svg#v-close); }
.hd-quick {
    grid-area: quick;
    display: flex;
    min-width: 0;
    gap: 20px;
    margin-bottom: 8px;
    overflow-x: auto;
    padding: 0 4px;
    white-space: nowrap;
    scrollbar-width: none;
    font-size: 14px;
    font-weight: 500;
}
.hd-quick::-webkit-scrollbar { display: none; }
/* Телефон: полоса шире экрана — край, куда можно листать, мягко гаснет. Без JS гаснет правый край;
   app.js ставит is-end (долистали до конца) и is-scrolled (ушли от начала). */
@media (max-width: 639px) {
    .hd-quick { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
    .hd-quick.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 48px), transparent); }
    .hd-quick.is-end { -webkit-mask-image: none; mask-image: none; }
    .hd-quick.is-end.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px); mask-image: linear-gradient(90deg, transparent, #000 32px); }
}
.hd-quick a { display: inline-flex; flex: none; min-height: 40px; align-items: center; color: var(--dim); transition: color .15s; }
.hd-quick a:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 4px; }
/* «›» — прокрутка полосы мышью; кнопку добавляет скрипт, если полоса не влезла (только от sm) */
.hd-more { display: none; grid-area: quick; justify-self: end; width: 56px; height: 44px; padding-left: 12px; border: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--surface) 40%); }
.hd-more { --ic: url(/static/icons.82a73bf2a5.svg#v-chev); --icc: var(--brand-dark); }
.hd-more::before { width: 20px; height: 20px; transform: rotate(-90deg); }
.logo { display: flex; flex-shrink: 0; min-height: 44px; align-items: center; transition: opacity .15s; } /* тап-цель 44 px при картинке 22 px */
.logo:hover { opacity: .8; }
.logo img { height: 22px; width: auto; }
.hd-promo { display: none; }
.tg {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    transition: color .15s;
}
.tg:hover { color: var(--brand-hover); }
.tg .i { width: 32px; height: 32px; }
/* «+ Добавить» на телефоне (полное «Добавить мероприятие» — в aria-label), «Добавить мероприятие» от sm */
.add { min-height: 44px; gap: 0; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
.add span { display: none; white-space: pre; }
.add::before { content: '+'; margin-right: 6px; font-size: 18px; line-height: 1; font-weight: 600; }

.alert { border-bottom: 1px solid rgba(224, 49, 49, .3); background: rgba(224, 49, 49, .05); }
.alert p { padding-top: 12px; padding-bottom: 12px; color: var(--danger); font-size: 14px; font-weight: 500; }

/* ---------- Зелёная полоса с котами (hero, подписка, 404) ---------- */
.band {
    background: var(--brand) url(/static/img/hero-cats.f53b890f85.svg) center / cover no-repeat;
}
.hero { padding: 32px var(--gutter); text-align: center; }
.hero h1 {
    max-width: 280px;
    margin: 0 auto;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
}
/* Подборки: крошки над H1 и вводный абзац под ним */
.hero .crumbs { margin: -16px 0 8px; }
.hero .crumbs ol { justify-content: center; color: rgba(255, 255, 255, .85); }
.hero .crumbs li + li::before { color: rgba(255, 255, 255, .6); }
.hero .crumbs a { min-height: 40px; }
.hero .crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-lead { max-width: 640px; margin: 12px auto 0; color: rgba(255, 255, 255, .92); font-size: 14px; line-height: 1.5; }

/* ---------- Фильтр-бар ---------- */
.fbar { background: var(--surface); padding: 32px 0 24px; }
.flt { min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dd { position: relative; }
.pill {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    background: var(--line-soft);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color .15s, color .15s;
}
.pill::-webkit-details-marker { display: none; }
.pill:hover { background: var(--brand-soft); }
.pill::after {
    content: '';
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url(/static/icons.82a73bf2a5.svg#v-chev) center / contain no-repeat;
    mask: url(/static/icons.82a73bf2a5.svg#v-chev) center / contain no-repeat;
    transition: transform .15s;
}
.pill-cal::after { -webkit-mask-image: url(/static/icons.82a73bf2a5.svg#v-cal); mask-image: url(/static/icons.82a73bf2a5.svg#v-cal); }
.dd[open] > .pill { background: var(--ink); color: #fff; }
.dd[open] > .pill:not(.pill-cal)::after { transform: rotate(180deg); }
/* Бейдж «выбрано N» в пилюле */
.pill b {
    padding: 0 6px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
}
/* Выпадашка под пилюлей */
.menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    width: min(18rem, calc(100vw - 2rem));
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(30, 30, 30, .12);
}
.opts { max-height: 18rem; overflow-y: auto; overscroll-behavior: contain; }
.opt {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    font-size: 15px;
    cursor: pointer;
}
.opt:hover { background: var(--page); }
.opt.is-empty { color: var(--muted); }
/* Счётчик событий у города: число в data-n, без лишнего узла */
.opt[data-n]::after {
    content: attr(data-n);
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.menu-note { padding: 8px; color: var(--muted); font-size: 14px; }
.menu .btn { width: 100%; margin-top: 8px; }
.menu .in + .lbl { margin-top: 12px; }
#city-search { margin-bottom: 8px; }

/* Пилюля «Выбор даты» с выбранным периодом; календарь — после @end-critical */
.pill.is-set { background: var(--brand-soft); }

/* Формат — кнопками-ссылками */
.fmt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.fmt-l { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--muted); font-size: 14px; font-weight: 500; --icc: var(--brand); }
.qf {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--dim);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}
.qf:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); }
.qf.is-empty { color: var(--muted); }
.qf[data-n]::after { content: attr(data-n); color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.qf.is-active, .qf.is-active:hover { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; font-weight: 600; }
.qf.is-active::after { color: rgba(255, 255, 255, .8); }

/* Чипы выбранных фильтров */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.chip {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s, color .15s;
}
.chip::after {
    content: '';
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: url(/static/icons.82a73bf2a5.svg#v-close) center / contain no-repeat;
    mask: url(/static/icons.82a73bf2a5.svg#v-close) center / contain no-repeat;
}
.chip:hover { background: var(--surface); color: var(--ink); }
.chips .link { display: inline-flex; min-height: 36px; align-items: center; margin-left: 4px; font-size: 14px; font-weight: 500; }

/* Результаты (#results) во время запроса фильтров и пагинации (htmx-request через hx-indicator):
   полоска сверху и приглушённый список. Задержка .15 с — быстрый ответ не моргает. */
.res { position: relative; }
.res::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 3px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    pointer-events: none;
}
.res.htmx-request::before { opacity: 1; animation: res-load 2s cubic-bezier(.1, .7, .3, 1) .15s both; }
.res .list { transition: opacity .2s; }
.res.htmx-request .list { opacity: .5; transition-delay: .15s; }
@keyframes res-load { from { transform: scaleX(0); } to { transform: scaleX(.9); } }

/* Подписка-карточка справа от фильтров — только от lg (стили ниже, вне критичной части) */
.sub-a { display: none; }

/* ---------- Заголовок с линиями по бокам («Найдено N событий») ---------- */
.dv {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}
.dv::before, .dv::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.cal { padding-top: 32px; scroll-margin-top: 80px; }
.list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }

/* ---------- Карточка мероприятия ---------- */
/* <a class="ev ev-a"> — карточка-ссылка; с рекламной пометкой — <article class="ev"><a class="ev-a">…</a><p class="ad"> */
.ev {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.ev:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(30, 30, 30, .06); }
.ev:focus-within, a.ev:focus-visible { border-color: var(--brand); }
.ev-a:focus-visible { outline-offset: -2px; }
.ev-a {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-content: start;
    column-gap: 16px;
    padding: 16px;
}
.ev-a > * { grid-column: 2; }
.ev-a > .cv { grid-column: 1; grid-row: 1 / span 4; width: 96px; }
.ev-a > .lb { justify-self: start; } /* единственный лейбл — без обёртки .tags */
.ev h2 { margin-top: 8px; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.25; }
.ev-d {
    margin-top: 8px;
    color: var(--dim);
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; color: var(--dim); font-size: 14px; --icc: var(--brand); }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.ad { padding: 8px 16px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }

/* Лейблы карточки */
.tags { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.lb {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--brand-tint);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}
.lb-free { background: var(--brand-soft); color: var(--ink); }
.lb-top { background: var(--ink); color: #fff; }

/* Обложка: картинка вписана целиком; поля закрывает размытая копия (--cv на ::before или img.cv-bg) */
.cv {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--brand-tint);
    container-type: inline-size;
}
.cv[style]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cv) center / cover no-repeat;
    opacity: .7;
    filter: blur(24px);
    transform: scale(1.25);
}
.cv img { position: relative; width: 100%; height: 100%; object-fit: contain; }
/* Та же подложка у карточек ниже первого экрана — ленивым <img>, а не фоном */
.cv .cv-bg { position: absolute; inset: 0; object-fit: cover; opacity: .7; filter: blur(24px); transform: scale(1.25); }
/* Без обложки — первая буква названия */
.cv-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 45cqw;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

/* Архивная карточка: обложка ч/б, лейбл и иконки серые; цвет возвращается при наведении */
.is-muted .cv { filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.is-muted:hover .cv, .is-muted:focus-within .cv { filter: none; opacity: 1; }
.is-muted .lb { background: var(--line-soft); color: var(--muted); }
.is-muted .meta { color: var(--muted); --icc: var(--faint); }

/* ---------- Формы ---------- */
.lbl { display: block; margin-bottom: 6px; color: var(--dim); font-size: 14px; font-weight: 500; }
.hint { margin-top: 4px; color: var(--muted); font-size: 12px; }
.in {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-size: 16px; /* меньше — iOS зумит страницу на фокусе */
    line-height: 1.4;
    transition: box-shadow .15s, border-color .15s;
}
.in::placeholder { color: var(--muted); }
.in:focus { border-color: var(--brand); outline: none; box-shadow: var(--focus-ring); }
.in[aria-invalid='true'] { border-color: var(--danger); }
.in:disabled { background: var(--page); color: var(--faint); }
textarea.in { resize: vertical; }
input[type='date']::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
.cb { width: 20px; height: 20px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.cb[aria-invalid='true'] { outline: 2px solid var(--danger); outline-offset: 1px; }
.err { margin-top: 4px; color: var(--danger); font-size: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--dim); font-size: 14px; line-height: 1.45; }
.trap { display: none; }
.ok { padding: 12px 16px; background: var(--brand-tint); color: var(--brand-dark); }
/* Подпись для ИИ-агентов: людям и экранным дикторам не видна */
.fg-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Страница мероприятия ---------- */
.evp { padding-top: 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; list-style: none; color: var(--dim); font-size: 14px; font-weight: 500; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--faint); }
.crumbs li.sr + li::before, .crumbs li.sr::before { content: none; }
.crumbs a { display: inline-flex; min-height: 44px; align-items: center; transition: color .15s; }
.crumbs a:hover { color: var(--brand-dark); }
.card { border: 1px solid var(--line); background: var(--surface); }
.box { margin-top: 12px; padding: 20px; }
.evp-g { display: grid; gap: 24px; }
.evp-l { width: 100%; max-width: 300px; margin: 0 auto; }
.evp-l .lb { position: absolute; top: 12px; left: 12px; background: var(--surface); box-shadow: 0 1px 2px rgba(30, 30, 30, .08); }
.dl-note { margin-top: 12px; color: var(--muted); font-size: 14px; font-weight: 500; text-align: center; }
.dl-note.is-open { color: var(--danger); }
.evp h1 { color: var(--ink); font-size: 24px; font-weight: 700; line-height: 1.25; }
.lead { margin-top: 12px; color: var(--dim); font-size: 16px; line-height: 1.625; }
.info {
    display: grid;
    gap: 20px 32px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line-soft);
    font-size: 15px;
}
.info > div { position: relative; padding-left: 32px; }
.info > div::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--brand);
    -webkit-mask: var(--ic) center / contain no-repeat;
    mask: var(--ic) center / contain no-repeat;
}
.info > .it-rub::before { content: '₽'; background: none; color: var(--brand); font-size: 16px; font-weight: 700; line-height: 20px; text-align: center; -webkit-mask: none; mask: none; }
.info > .it-none::before { display: none; }
.info dt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; }
.info dd { margin-top: 2px; font-weight: 500; }
.info dd span { color: var(--dim); }
.acts { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.acts-b { display: flex; flex-direction: column; gap: 12px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share > b { margin-right: 4px; font-size: 14px; font-weight: 600; }
.copy {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 14px;
    transition: border-color .15s;
}
.copy:hover { border-color: var(--ink); }
.copy .i { width: 16px; height: 16px; color: var(--brand); }
.share a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--brand); transition: color .15s; }
.share a:hover { color: var(--brand-hover); }
.share a .i { width: 32px; height: 32px; }
.share noscript { font-size: 14px; color: var(--muted); word-break: break-all; }

/* ---------- Простые страницы: заголовок и вводный текст ---------- */
.page-h { padding-top: 32px; }
.page-h h1 { font-size: 24px; font-weight: 700; line-height: 1.25; }
.intro { max-width: 48rem; margin-top: 16px; color: var(--dim); }

@media (max-width: 359px) {
    .logo img { height: 18px; }
}

@media (min-width: 640px) {
    .hd-g { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "logo cat . nav" "quick quick quick quick"; column-gap: 16px; }
    .hd-nav { height: 72px; }
    .hd-cat { min-height: 44px; margin-bottom: 0; padding: 0 18px; font-size: 15px; }
    .hd-cat::after { content: 'событий'; margin-left: -4px; } /* «Каталог событий»; на телефоне — «Каталог» */
    .hd-quick { gap: 28px; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
    .hd-quick a { min-height: 44px; }
    .hd-more { display: inline-flex; align-items: center; justify-content: flex-end; margin-top: 1px; }
    .logo img { height: 33px; }
    .hd-nav { gap: 12px; }
    .tg .i { width: 40px; height: 40px; }
    .add { min-height: 44px; padding: 10px 20px; font-size: 15px; }
    .add span { display: inline; }
    .add::before { display: none; }
    .hero { padding: 56px var(--gutter); }
    .hero h1 { max-width: 714px; font-size: 32px; }
    .hero .crumbs { margin-top: -32px; }
    .hero-lead { font-size: 16px; }
    .fbar { padding-top: 48px; }
    .pills { gap: 12px; }
    .dv { gap: 32px; font-size: 22px; }
    .cal { padding-top: 40px; }
    .list { gap: 24px; }
    .ev-a {
        grid-template-columns: 192px minmax(0, 1fr) 56px;
        grid-template-rows: 1fr auto auto auto auto 1fr;
        column-gap: 24px;
        padding: 24px 0 24px 24px;
    }
    .ev-a > .cv { grid-row: 1 / -1; width: 192px; align-self: center; }
    .ev-a > .tags, .ev-a > .lb { grid-row: 2; }
    .ev-a > h2 { grid-row: 3; }
    .ev-a > .ev-d { grid-row: 4; }
    .ev-a > .meta { grid-row: 5; }
    /* Полоса со стрелкой ↗ справа: ::before — фон, ::after — стрелка */
    .ev-a::before, .ev-a::after { content: ''; grid-column: 3; grid-row: 1 / -1; }
    .ev-a::before { margin: -24px 0; background: var(--line-soft); transition: background-color .15s; }
    .ev-a::after {
        width: 24px;
        height: 24px;
        align-self: center;
        justify-self: center;
        background: var(--ink);
        -webkit-mask: url(/static/icons.82a73bf2a5.svg#v-arrow) center / contain no-repeat;
        mask: url(/static/icons.82a73bf2a5.svg#v-arrow) center / contain no-repeat;
    }
    .is-muted .ev-a::before { background: var(--page); }
    .is-muted .ev-a::after { background: var(--muted); }
    .ev:hover .ev-a::before, .ev:focus-within .ev-a::before { background: var(--brand); }
    .ev:hover .ev-a::after, .ev:focus-within .ev-a::after { background: #fff; }
    .ev h2 { font-size: 24px; }
    .ev-d { font-size: 15px; display: block; overflow: visible; }
    .ad { padding: 8px 24px; }
    .evp { padding-top: 32px; }
    .box { padding: 32px; }
    .evp-g { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
    .evp-l { margin: 0; }
    .evp h1 { font-size: 32px; }
    .lead { font-size: 18px; }
    .info { grid-template-columns: 1fr 1fr; }
    .info > .w { grid-column: span 2; }
    .acts { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .acts-b { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .acts-b .btn { padding-left: 32px; padding-right: 32px; }
    .page-h { padding-top: 48px; }
    .page-h h1 { font-size: 32px; }
}

@media (min-width: 1024px) {
    .hd-promo {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
        padding: 0 8px;
        color: var(--dim);
        font-size: 15px;
        font-weight: 500;
        transition: color .15s;
    }
    .hd-promo:hover { color: var(--brand-dark); }
    .fbar .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: start; gap: 40px; }
    .sub-a { display: block; }
    .box { padding: 40px; }
    .evp-g { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; }
}
/* ---------- Первый экран главной: слоган, подписка, Telegram, карусель ---------- */
.hm { overflow: hidden; background: var(--brand-dark) url(/static/img/hero-cats.f53b890f85.svg) center / cover no-repeat; color: #fff; }
.hm-g { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.hm-g > * { min-width: 0; }
.hm-k { color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 500; line-height: 18px; }
.hm-t { margin-top: 8px; font-size: 28px; font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.hm .sub-a { display: block; margin-top: 20px; padding: 0; border: 0; background: none; overflow: visible; }
.hm .sub-a::before, .hm .sub-a-h { display: none; }
.hm .sub-a form, .hm .sub-a .ok { margin-top: 0; }
.hm .sub-row { padding: 0; border: 0; gap: 0; max-width: 456px; }
.hm .sub-row input { min-height: 44px; padding: 0 14px; }
.hm .sub-row button { min-height: 44px; background: var(--brand-soft); color: var(--ink); }
.hm .sub-row button:hover { background: #bcdc86; }
.hm .sub-a .check { color: rgba(255, 255, 255, .85); }
.hm .sub-a .check a { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
.hm .sub-a .ok { color: #fff; }
.hm .sub-a .err { color: #fff; }
.hm-s { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; font-weight: 600; }
.hm-tg { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .45); color: #fff; }
.hm-tg:hover { background: rgba(255, 255, 255, .1); }
.hm-tg .i { width: 18px; height: 18px; color: var(--ink); }
.hm-c { position: relative; background: var(--surface); color: var(--ink); }
.hm-tr { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hm-tr::-webkit-scrollbar { display: none; }
.hm-sl { flex: 0 0 100%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px 24px 44px; scroll-snap-align: start; color: var(--ink); }
.hm-d { margin-top: 10px; font-size: 36px; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.hm-n { font-size: 18px; font-weight: 700; line-height: 1.25; }
.hm-p { font-size: 13px; font-weight: 500; color: var(--muted); }
.hm-dots { position: absolute; left: 24px; bottom: 18px; display: flex; gap: 4px; }
.hm-dots span { width: 10px; height: 3px; background: var(--line); }
.hm-dots span.is-on { width: 22px; background: var(--ink); }
@media (min-width: 1024px) {
    .hm-g { grid-template-columns: minmax(0, 1fr) 400px; align-items: center; gap: 48px; padding-top: 36px; padding-bottom: 36px; }
    .hm-t { font-size: 42px; }
    .hm-sl { min-height: 330px; padding: 32px 28px 52px; }
    .hm-d { font-size: 44px; }
    .hm-n { font-size: 22px; }
    .hm-dots { left: 28px; bottom: 24px; }
}
/* ---------- Скругления: одно значение --radius на всё ---------- */
.btn, .in, .pill, .qf, .chip, .lb, .card, .box, .menu, .modal, .cookie, .copy, .cb,
.sub-a, .sub-row, .sub-in, .hm-c, .hm-tg, .cv, .cv-ph, .empty, .lead-box, .cover-prev, .cover-pick,
.opt, .price-in, .info, .ok, .form-alert, .hint, .announce, .ad, .tg, select, textarea, .cat-i, .cat-i b, .cat-all b,
.dp-qb, .dp-nav, .dp-d::after { border-radius: var(--radius); }
.ev { border-radius: var(--radius); overflow: hidden; }
.ev .ad { border-radius: 0; }
.card, .box, .hm-c, .sub-row, .sub-a, .modal, .empty, .lead-box, .cover-prev { overflow: hidden; }
.sub-row button { border-radius: calc(var(--radius) - 4px); }
.hm .sub-row button { border-radius: 0; }
.tg { border-radius: 50%; }
/* @end-critical */

/* ---------- Календарь периода (data-datepicker, static/app.js) ---------- */
.dd-date .menu { width: min(23rem, calc(100vw - 2rem)); }
.dp-menu { scroll-margin-bottom: 16px; }
.dp.is-armed .dp-native { display: none; }
.dp-q { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.dp-qb {
    min-height: 40px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--dim);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}
@media (hover: hover) { .dp-qb:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--ink); } }
.dp-qb.is-active, .dp-qb.is-active:hover { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; font-weight: 600; }
.dp-cal { position: relative; }
.dp-ms { display: grid; gap: 24px; }
.dp-t { display: flex; height: 40px; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
.dp-nav {
    position: absolute;
    top: 0;
    z-index: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    background: none;
    color: var(--ink);
    transition: background-color .15s;
}
.dp-nav::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    margin: auto;
    background: currentColor;
    -webkit-mask: url(/static/icons.82a73bf2a5.svg#v-chev) center / contain no-repeat;
    mask: url(/static/icons.82a73bf2a5.svg#v-chev) center / contain no-repeat;
}
.dp-prev { left: 0; }
.dp-prev::before { transform: rotate(90deg); }
.dp-next { right: 0; }
.dp-next::before { transform: rotate(-90deg); }
@media (hover: hover) { .dp-nav:hover { background: var(--brand-tint); } }
.dp-wd, .dp-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dp-wd span { padding: 4px 0; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.dp-g { row-gap: 2px; }
.dp-d {
    position: relative;
    isolation: isolate;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    transition: color .1s;
}
/* ::before — полоса диапазона, ::after — плашка дня; обе под цифрой */
.dp-d::before, .dp-d::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dp-d::after { z-index: -1; }
.dp-d::before { z-index: -2; }
@media (hover: hover) { .dp-d:hover::after { background: var(--page); box-shadow: inset 0 0 0 1px var(--line); } }
.dp-d.is-past { color: var(--muted); font-weight: 400; }
.dp-d.is-today { font-weight: 700; text-decoration: underline 2px var(--brand); text-underline-offset: 5px; }
.dp-d.is-in::before { background: var(--brand-tint); }
.dp-d.is-br::before { left: 50%; background: var(--brand-tint); }
.dp-d.is-bl::before { right: 50%; background: var(--brand-tint); }
.dp-d.is-br.is-bl::before { display: none; }
@media (hover: hover) { .dp-d.is-in:hover::after { background: var(--brand-soft); box-shadow: none; } }
.dp-d.is-edge { color: #fff; font-weight: 600; }
.dp-d.is-edge::after, .dp-d.is-edge:hover::after { background: var(--brand-dark); box-shadow: none; }
.dp-d.is-edge:hover::after { background: var(--brand-deep); }
.dp-d.is-edge.is-today { text-decoration-color: #fff; }
.dp-d.is-hover::after, .dp-d.is-hover:hover::after { background: var(--brand-tint); box-shadow: inset 0 0 0 2px var(--brand-dark); }
.dp-d:focus-visible { outline: none; }
.dp-d:focus-visible::after { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--surface); }
.dp-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.dp-sum { flex: 1; min-width: 10rem; color: var(--muted); font-size: 14px; line-height: 1.35; }
.dp-sum b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.dp-f .btn { flex: 1 0 100%; margin: 0; }
.dp-reset {
    min-height: 40px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 600;
}
@media (hover: hover) { .dp-reset:hover { color: var(--brand-deep); text-decoration: underline; } }
@media (min-width: 720px) {
    .dd-date .menu.dp-menu { width: min(44rem, calc(100vw - 2rem)); padding: 16px; }
    .dp-q { display: flex; flex-wrap: wrap; }
    .dp-f { flex-wrap: nowrap; }
    .dp-f .btn { flex: none; width: auto; min-width: 12rem; }
    .dp-ms { grid-template-columns: 1fr 1fr; gap: 32px; }
    .dp-d { height: 40px; }
}

/* ---------- Подписка ---------- */
/* Карточка-«письмо» справа от фильтров: край авиаконверта сверху, конверт в квадрате */
.sub-a {
    position: relative;
    overflow: hidden;
    padding: 22px 16px 14px;
    border: 1px solid rgba(80, 167, 106, .25);
    background: var(--brand-tint);
    scroll-margin-top: 96px;
}
.sub-a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(-45deg, var(--brand) 0 8px, var(--surface) 8px 12px, var(--brand-soft) 12px 20px, var(--surface) 20px 24px);
}
.sub-a-h { display: flex; align-items: center; gap: 12px; }
.sub-a-h .i { width: 36px; height: 36px; padding: 8px; background: var(--brand-soft); color: var(--brand-dark); }
.sub-a-t { color: var(--ink); font-size: 16px; font-weight: 700; line-height: 20px; }
.sub-a-s { color: var(--muted); font-size: 13px; line-height: 18px; }
.sub-a form, .sub-a .ok { margin-top: 10px; }
/* Поле и кнопка склеены в одну полосу */
.sub-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(80, 167, 106, .55);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
.sub-row:focus-within { border-color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(80, 167, 106, .3); }
.sub-row.is-invalid { border-color: var(--danger); }
.sub-row input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 8px 0 14px;
    border: 0;
    background: transparent;
    font-size: 16px;
}
.sub-row input:focus { outline: none; }
.sub-row input::placeholder { color: var(--muted); }
.sub-row button {
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid transparent;
    background: var(--brand-dark);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .15s;
}
.sub-row button:hover { background: var(--brand-deep); }
.sub-row button:focus-visible { outline-color: #fff; outline-offset: -4px; }
.sub-a .check { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 16px; }
.sub-a .check a { color: var(--brand-dark); text-decoration: underline; text-decoration-color: rgba(47, 122, 70, .4); text-underline-offset: 2px; }
.sub-a .err {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    color: var(--danger-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}
.sub-a .err::before {
    content: '!';
    display: flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
}
.sub-a .ok {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(80, 167, 106, .55);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}
.sub-a .ok::before { content: '✓'; display: flex; width: 24px; height: 24px; flex-shrink: 0; align-items: center; justify-content: center; background: var(--brand-dark); color: #fff; font-size: 13px; font-weight: 700; }

/* Лента подписки — зелёная полоса (на главной после 3-й карточки, внизу страницы мероприятия) */
.sub { padding: 32px 0; scroll-margin-top: 96px; }
.sub-g { display: grid; align-items: center; gap: 24px; }
.sub-t { text-align: center; }
.sub-t h2 { color: #fff; font-size: 24px; font-weight: 700; line-height: 1.25; }
.sub-t p { margin-top: 12px; color: var(--ink); font-size: 17px; line-height: 1.375; }
.sub form, .ok-band { width: 100%; max-width: 36rem; margin: 0 auto; }
.sub form { display: flex; flex-direction: column; gap: 12px; }
.sub-in { display: flex; flex-direction: column; gap: 8px; }
.sub-in .in { flex: 1; min-width: 0; border-color: var(--ink); background: #fff; }
.sub .check { color: var(--ink); font-size: 12px; }
.sub .check a, .sub-f .check a { text-decoration: underline; text-underline-offset: 2px; }
.sub .check a:hover, .sub-f .check a:hover { text-decoration: none; }
.sub .err { margin: 0; color: var(--ink); font-weight: 500; }
.ok-band { padding: 16px 20px; border: 1px solid rgba(30, 30, 30, .2); background: rgba(255, 255, 255, .85); text-align: center; }
.sub.is-sep { margin-top: 56px; }

/* Компактная подписка в футере */
.sub-f { scroll-margin-top: 96px; }
.sub-f-t { color: #fff; font-size: 16px; font-weight: 700; }
.sub-f form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.sub-f .sub-in .in { border-color: rgba(255, 255, 255, .4); background: transparent; color: #fff; }
.sub-f .in::placeholder { color: rgba(255, 255, 255, .7); }
.sub-f .check { color: rgba(255, 255, 255, .8); font-size: 12px; }
.sub-f .err { margin: 0; color: #fff; }
.sub-f .ok-f { margin-top: 12px; padding: 16px 20px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; text-align: center; }

/* ---------- Пустая выдача ---------- */
.empty { margin-top: 32px; padding: 48px 20px; text-align: center; }
.empty b { display: block; font-size: 18px; font-weight: 600; }
.empty p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.empty .btn { margin-top: 24px; }
.cal > .sub { margin-top: 32px; }
.list + .sub { margin-top: 16px; }

/* ---------- Пагинация ---------- */
.pg { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; }
.pl {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 15px;
    transition: background-color .15s, color .15s, border-color .15s;
}
a.pl:hover { border-color: var(--brand); background: var(--brand); color: #fff; }
.pl.is-active { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.pl.is-disabled { border-color: transparent; background: transparent; color: var(--muted); }

/* Ссылка-якорь к архиву и «Все … →» */
.past-anchor {
    display: flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    margin: 24px auto 0;
    padding: 0 8px;
    color: var(--brand-dark);
    font-size: 15px;
    font-weight: 600;
    transition: color .15s;
}
.past-anchor:hover { color: var(--brand-hover); }
.past-anchor span { transition: transform .15s; }
.past-anchor:hover span { transform: translateX(3px); }

/* ---------- Архив прошедших ---------- */
.past { margin-top: 48px; padding: 40px 0; border-top: 1px solid var(--line); background: var(--page-muted); scroll-margin-top: 80px; }
.past-h { display: flex; flex-direction: column; gap: 16px; }
.past-lb {
    display: inline-flex;
    padding: 2px 8px;
    background: var(--line);
    color: var(--dim);
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.past-h h2 { margin-top: 12px; font-size: 28px; font-weight: 700; line-height: 1.15; }
.past-h p { max-width: 560px; margin-top: 8px; color: var(--muted); font-size: 15px; }
.past-h .past-n {
    display: inline-flex;
    min-height: 44px;
    flex-shrink: 0;
    align-items: center;
    align-self: flex-start;
    max-width: none;
    margin: 0;
    padding: 8px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--dim);
    font-size: 14px;
    font-weight: 600;
}

/* ---------- «О подборке» и «Подборки мероприятий» ---------- */
.sec { padding-top: 48px; }
.about { padding: 20px; }
.about h2, .ll h2 { font-size: 18px; font-weight: 700; }
.about p { max-width: 48rem; margin-top: 12px; color: var(--dim); font-size: 15px; line-height: 1.625; }
.ll dl { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.ll dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.ll dd { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ll dd > * {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 4px 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
    transition: border-color .15s, color .15s;
}
.ll dd > a:hover { border-color: var(--brand); color: var(--brand-dark); }
.ll dd > span { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- Анонс и CTA ---------- */
.announce { margin-top: 24px; }
.announce h2 { font-size: 20px; font-weight: 700; }
.announce .prose { max-width: 760px; margin-top: 20px; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; padding: 24px; text-align: center; }
.cta .btn { width: 100%; }
.cta p { color: var(--muted); font-size: 14px; }
.related { padding-top: 56px; }

/* ---------- Футер ---------- */
.ft { margin-top: 64px; background: var(--footer); color: #fff; }
.ft-g { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.ft-logo { display: inline-block; transition: opacity .15s; }
.ft-logo:hover { opacity: .8; }
.ft-logo img { height: 33px; width: auto; }
.ft-c { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.ft-c .tg:hover { color: var(--brand-soft); }
.ft-c .tg .i { width: 40px; height: 40px; }
.ft-c > a:last-child { display: inline-flex; min-height: 44px; align-items: center; color: rgba(255, 255, 255, .9); font-size: 14px; }
.ft-c > a:last-child:hover { color: #fff; text-decoration: underline; }
.ft-n ul { list-style: none; }
.ft-n a { display: inline-flex; min-height: 44px; align-items: center; }
.ft-n a:hover { color: var(--brand-soft); text-decoration: underline; }
.ft-b { border-top: 1px solid rgba(255, 255, 255, .2); }
.ft-b .wrap { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; padding-bottom: 16px; color: rgba(255, 255, 255, .75); font-size: 12px; }
.ft-b p { padding: 8px 0; }
.ft-b a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: underline; text-underline-offset: 4px; }
.ft-b a:hover { color: #fff; }

/* ---------- Модалка «Написать нам» (<dialog>) ---------- */
.modal {
    width: 100%;
    max-width: 32rem;
    max-height: calc(100dvh - 1rem);
    margin: auto auto 0;
    padding: 20px;
    border: 0;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 24px 64px rgba(30, 30, 30, .25);
    overflow-y: auto;
}
.modal::backdrop { background: rgba(30, 30, 30, .55); }
/* Без JS модалка открывается якорем #contact */
.modal:target { display: block; position: fixed; inset: auto 0 0; z-index: 50; }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-h h2 { font-size: 20px; font-weight: 700; }
.x {
    display: flex;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin: -4px -8px 0 0;
    color: var(--muted);
    transition: background-color .15s, color .15s;
}
.x:hover { background: var(--page); color: var(--ink); }
.x::before {
    content: '';
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url(/static/icons.82a73bf2a5.svg#v-close) center / contain no-repeat;
    mask: url(/static/icons.82a73bf2a5.svg#v-close) center / contain no-repeat;
}
.modal form, .modal .ok { margin-top: 16px; }
.modal .btn-o { width: 100%; margin-top: 16px; }

/* Стопка полей формы */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-l { display: flex; flex-direction: column; gap: 20px; }
.row3 { display: grid; gap: 20px; }
.btn.wide { width: 100%; }

/* ---------- Cookie-баннер ---------- */
.cookie {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 48rem;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--dim);
    box-shadow: 0 12px 40px rgba(30, 30, 30, .16);
}
.cookie p { flex-basis: 100%; font-size: 14px; line-height: 1.625; }

/* ---------- Продвижение ---------- */
.promo-h { padding: 32px var(--gutter); color: #fff; text-align: center; }
.promo-h h1 { font-size: 24px; font-weight: 400; }
.promo-h p { max-width: 42rem; margin: 12px auto 0; font-size: 20px; font-weight: 700; }
.pt { padding-top: 40px; }
.svc { display: grid; gap: 16px; margin-top: 24px; }
.svc article { display: flex; flex-direction: column; padding: 24px; }
.svc h3 { font-size: 18px; font-weight: 700; }
.svc p { margin-top: 8px; color: var(--dim); font-size: 14px; }
.svc .link { display: inline-flex; align-self: flex-start; min-height: 44px; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; font-size: 14px; }
.svc .link .i { width: 16px; height: 16px; }
.pad { padding: 24px; }
.pad h2 { font-size: 20px; font-weight: 700; }
.pad > p { margin-top: 12px; color: var(--dim); }
.pad > .btn { margin-top: 16px; }
.pad > .btn .i { width: 20px; height: 20px; }
.lead-box { max-width: 42rem; margin: 0 auto; }
.lead-box > .sub-l { margin-top: 8px; color: var(--dim); }
.lead-box form, .lead-box .ok { margin-top: 24px; }
#lead-form { scroll-margin-top: 96px; }

/* ---------- Добавить мероприятие ---------- */
.form-alert { max-width: 48rem; margin-top: 24px; padding: 16px 20px; border: 1px solid rgba(224, 49, 49, .4); background: rgba(224, 49, 49, .05); color: var(--danger); font-size: 14px; }
.cf { display: flex; flex-direction: column; gap: 24px; max-width: 48rem; margin-top: 32px; padding: 20px; }
.cf fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.cf legend { padding: 0; }
.g2, .g3 { display: grid; gap: 24px; }
.tight { gap: 16px; }
.price { display: flex; flex-direction: column; gap: 12px; }
.price .check { min-height: 44px; align-items: center; }
.price-in { display: flex; flex: 1; align-items: center; gap: 8px; }
.price-in > span { color: var(--dim); }
/* Загрузка афиши: без JS — обычное поле; с JS (.is-armed) — зона перетаскивания и превью */
.drop-z, .drop-p { display: none; }
.drop.is-armed .drop-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop.is-armed .drop-z {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 28px 16px; border: 1.5px dashed rgba(80, 167, 106, .55); border-radius: var(--radius);
    background: var(--brand-tint); text-align: center; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.drop.is-armed .drop-z:hover, .drop.is-over .drop-z { border-color: var(--brand-dark); background: #dfefe3; }
.drop-in:focus-visible + .drop-z { box-shadow: var(--focus-ring); border-color: var(--brand-dark); }
.drop.is-invalid .drop-z { border-color: var(--danger); background: rgba(224, 49, 49, .04); }
.drop-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--brand-dark); }
.drop-ic .i { width: 22px; height: 22px; }
.drop-t { color: var(--ink); font-size: 15px; }
.drop-l { color: var(--brand-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.drop-h { color: var(--muted); font-size: 12px; }
.drop.has-file .drop-z { display: none; }
.drop.has-file .drop-p:not([hidden]) {
    display: flex; align-items: center; gap: 14px;
    padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.drop-p img { flex: none; width: 72px; height: 72px; border-radius: calc(var(--radius) - 2px); object-fit: cover; background: var(--line-soft); }
.drop-f { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.drop-f b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.drop-f span { color: var(--muted); font-size: 12px; }
.drop-acts { display: flex; flex: none; gap: 12px; }
.drop-a { padding: 0; border: 0; background: none; color: var(--brand-dark); font-size: 14px; font-weight: 600; cursor: pointer; }
.drop-a:hover { text-decoration: underline; }
.drop-e { margin-top: 6px; }
.hint-row { display: flex; justify-content: space-between; gap: 16px; }
.cf .note { margin: 0 0 12px; }
.checks { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Заявка отправлена, 404 ---------- */
.thanks { display: flex; flex-direction: column; align-items: center; padding-top: 80px; padding-bottom: 32px; text-align: center; }
.thanks-i { display: flex; width: 64px; height: 64px; align-items: center; justify-content: center; background: var(--brand-tint); color: var(--brand-dark); font-size: 30px; }
.thanks h1 { margin-top: 24px; font-size: 30px; font-weight: 700; }
.thanks p { max-width: 36rem; margin-top: 16px; color: var(--dim); font-size: 18px; }
.btns { display: flex; flex-direction: column; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.e404 { padding: 40px var(--gutter); color: #fff; text-align: center; }
.e404 b { display: block; font-size: 60px; line-height: 1; }
.e404 h1 { margin-top: 16px; font-size: 24px; font-weight: 400; line-height: 1.25; }
.e404-t { display: flex; flex-direction: column; align-items: center; padding-top: 40px; text-align: center; }
.e404-t p { max-width: 28rem; color: var(--dim); }
.e404-t .btns { flex-direction: row; }

/* ---------- Юридические страницы ---------- */
.doc { padding-top: 32px; padding-bottom: 16px; }
.doc h1 { font-size: 24px; font-weight: 700; }
.doc-ed { margin-top: 12px; color: var(--muted); font-size: 14px; }
.doc-g { display: grid; gap: 24px; margin-top: 24px; }
.toc { padding: 20px; }
.toc p { color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; }
.toc ol { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; list-style: none; font-size: 14px; line-height: 1.375; }
/* Телефон: пункты оглавления — тап-цели от 40 px вместо строк по 17 px через 8 px */
@media (max-width: 1023px) {
    .toc ol { gap: 0; margin-top: 4px; }
    .toc a { display: flex; min-height: 40px; align-items: center; padding: 4px 0; }
}
.doc-b { padding: 20px; }
.legal-text { max-width: 760px; }
.legal-text h2 { scroll-margin-top: 96px; }
.legal-text > h2:first-child { margin-top: 0; }
.legal-text table { width: 100%; }
.legal-text th, .legal-text td { text-align: left; vertical-align: top; }

/* ---------- Текст анонса (Editor.js) и юридических страниц ---------- */
.prose { color: var(--dim); font-size: 16px; line-height: 1.7; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 32px; color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.375; }
.prose h3 { margin-top: 24px; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.375; }
.prose h4 { margin-top: 20px; color: var(--ink); font-size: 18px; font-weight: 600; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose strong, .prose b { color: var(--ink); font-weight: 700; }
.prose a { color: var(--brand-dark); text-decoration: underline; text-decoration-color: rgba(47, 122, 70, .3); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover { color: var(--brand-hover); }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: 6px; padding-left: 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose ul > li::marker { color: var(--brand); }
.prose ol > li::marker { color: var(--brand-dark); font-weight: 600; }
.prose li > ul, .prose li > ol { margin-top: 6px; }
.prose code { padding: 2px 6px; background: var(--page); color: var(--ink); font-family: var(--mono); font-size: .9em; }
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.prose blockquote { padding: 16px 20px; border-left: 3px solid var(--brand); background: var(--brand-tint); font-style: italic; }
.prose blockquote cite { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; font-style: normal; }
.prose hr { width: 96px; margin: 32px auto; border: 0; border-top: 1px solid var(--line); }
.prose .ejs-code { overflow: hidden; background: var(--dim); }
.prose .ejs-code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.prose pre { overflow-x: auto; margin: 0; padding: 16px; background: var(--dim); color: rgba(255, 255, 255, .9); font-family: var(--mono); font-size: 14px; line-height: 1.625; }
.prose .ejs-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--page); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; text-transform: uppercase; }
.prose td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose img { max-width: 100%; height: auto; }
.prose .ejs-image img { margin: 0 auto; border: 1px solid var(--line); }
.prose figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; text-align: center; }
.prose .ejs-embed { margin: 24px 0; }
.prose .ejs-embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.prose .ejs-embed-link { margin: 16px 0; font-size: 14px; word-break: break-all; }
.prose .ejs-link-card { display: flex; align-items: flex-start; gap: 16px; margin: 24px 0; padding: 16px; border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
.prose .ejs-link-card:hover { border-color: var(--brand); }
.prose .ejs-link-card img { width: 64px; height: 64px; flex-shrink: 0; object-fit: cover; }
.prose .ejs-link-card__body { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.prose .ejs-link-card__title { color: var(--brand-dark); font-size: 15px; font-weight: 700; }
.prose .ejs-link-card__text { display: -webkit-box; overflow: hidden; color: var(--dim); font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.prose .ejs-link-card__host { color: var(--muted); font-size: 12px; }

@media (min-width: 640px) {
    .sub { padding: 40px 0; }
    .sub-t h2 { font-size: 30px; }
    .sub-t p { font-size: 20px; }
    .sub-in { flex-direction: row; }
    .sub-in .btn-w { padding-left: 32px; padding-right: 32px; }
    .sub.is-sep { margin-top: 64px; }
    .list + .sub { margin-top: 24px; }
    .pg { gap: 8px; margin-top: 40px; }
    .past-anchor { margin-top: 32px; }
    .past { margin-top: 64px; padding: 56px 0; }
    .past-h { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; }
    .past-h h2 { font-size: 32px; }
    .past-h .past-n { align-self: auto; }
    .sec { padding-top: 64px; }
    .about { padding: 32px; }
    .ll h2, .about h2 { font-size: 20px; }
    .ll dl > div { display: flex; align-items: flex-start; gap: 24px; }
    .ll dt { width: 192px; flex-shrink: 0; padding-top: 8px; }
    .ll dd { margin-top: 0; }
    .announce h2 { font-size: 24px; }
    .cta { padding: 32px; }
    .cta .btn { width: auto; padding-left: 40px; padding-right: 40px; font-size: 16px; }
    .related { padding-top: 64px; }
    .ft-g { grid-template-columns: 1fr 1fr; padding-top: 48px; padding-bottom: 48px; }
    .ft-g > .sub-f { grid-column: span 2; }
    .ft-b .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 24px; }
    .modal { margin: auto; padding: 28px; }
    .modal:target { inset: 0; margin: auto; height: fit-content; }
    .modal-h h2 { font-size: 24px; }
    .cookie { right: 16px; bottom: 16px; left: 16px; display: grid; grid-template-columns: 1fr auto; column-gap: 24px; padding: 20px; }
    .cookie p { grid-row: 1 / span 2; align-self: center; }
    .promo-h { padding: 56px var(--gutter); }
    .promo-h h1 { font-size: 32px; }
    .svc { grid-template-columns: repeat(3, 1fr); }
    .pad { padding: 32px; }
    .row3 { grid-template-columns: repeat(3, 1fr); }
    .cf { padding: 32px; }
    .g2 { grid-template-columns: 1fr 1fr; }
    .g3 { grid-template-columns: repeat(3, 1fr); }
    .price { flex-direction: row; align-items: center; }
    .btns { flex-direction: row; }
    .lead-box .btn-p, .cf > .btn-p { width: auto; align-self: flex-start; padding-left: 40px; padding-right: 40px; }
    .e404 { padding: 64px var(--gutter); }
    .e404 b { font-size: 96px; }
    .e404 h1 { font-size: 32px; }
    .e404-t { padding-top: 56px; }
    .doc { padding-top: 48px; }
    .doc h1 { font-size: 32px; }
    .doc-b { padding: 32px; }
}

@media (min-width: 1024px) {
    .sub-g { grid-template-columns: 1fr 1fr; gap: 64px; }
    .sub-t { text-align: left; }
    .sub form, .ok-band { margin: 0; }
    .ft-g { grid-template-columns: 1.1fr 1fr 1.4fr; gap: 48px; }
    .ft-g > .sub-f { grid-column: auto; }
    .doc-g { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
    .toc { position: sticky; top: 80px; }
}

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

/* ---------- Каталог событий (выпадает из шапки) ---------- */
.cat {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 20px;
    max-width: var(--wrap);
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px); /* динамическая высота: панель Safari не закрывает низ каталога */
    margin: 0 auto;
    overflow-y: auto;
    overscroll-behavior: contain; /* долистали до конца — страница под каталогом не едет */
    -webkit-overflow-scrolling: touch;
    padding: 20px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
    /* затемнение страницы под каталогом (шапку не трогает — clip-path); клик по нему закрывает каталог (app.js) */
    box-shadow: 0 0 0 100vmax rgba(30, 30, 30, .4);
    clip-path: inset(0 -100vmax -100vmax -100vmax);
}
.cat-h { margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.cat-cities .cat-list { columns: 2; column-gap: 8px; }
.cat-i {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    break-inside: avoid;
}
.cat-cities .cat-i { padding: 0 6px; font-size: 14px; }
a.cat-i { transition: background-color .15s, color .15s; }
a.cat-i:hover { background: var(--brand-tint); color: var(--brand-dark); }
.cat-i b, .cat-all b { flex: none; min-width: 28px; padding: 1px 6px; background: var(--brand-tint); color: var(--brand-dark); font-size: 13px; font-weight: 600; text-align: center; }
.cat-i.is-thin { color: var(--muted); }
.cat-i.is-thin b { background: var(--line-soft); color: var(--muted); }
span.cat-i { cursor: default; }
/* Телефон: города без ближайших свёрнуты под «Ещё N городов без событий»; от sm — все в колонках */
.cat-more { display: flex; width: 100%; min-height: 44px; align-items: center; margin-top: 4px; padding: 0 6px; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.cat-more::after { content: ''; width: 8px; height: 8px; margin: -4px 0 0 10px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cat-cities.is-all .cat-more::after { margin-top: 4px; transform: rotate(-135deg); }
.cat-cities:not(.is-all) .is-zero { display: none; }
/* Каталог открыт на телефоне — страница под ним не прокручивается (класс ставит app.js).
   Только html: overflow на body сделал бы его отдельной прокруткой, и липкая шапка с каталогом
   уехала бы вверх на высоту прокрутки страницы. */
@media (max-width: 639px) {
    html.cat-lock { overflow: hidden; }
}
.cat-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; padding: 0 8px; color: var(--brand-dark); font-weight: 600; }
.cat-all:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 4px; }
.cat-note { margin-top: 4px; padding: 0 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
@media (min-width: 640px) {
    .cat { left: var(--gutter); right: var(--gutter); max-width: calc(var(--wrap) - 2 * var(--gutter)); grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 32px; padding: 28px 24px 32px; border-top: 0; }
    .cat-cities .cat-list { column-gap: 16px; }
    .cat-cities .cat-i { padding: 0 8px; font-size: 15px; }
    .cat { border-radius: 0 0 var(--radius) var(--radius); }
    .cat-more { display: none; }
    .cat-cities:not(.is-all) .is-zero { display: flex; }
}
