/* Модуль 2 — «Лента событий» (archive-event). Значения дословно из макета EventsFeed.dc.html.
   Грузится только на архиве event (см. assets.php). Карточка события — из module2-base + helper. */

/* ── keyframes ── */
@keyframes ibdShimmer { 0% { background-position: -460px 0; } 100% { background-position: 460px 0; } }
@keyframes ibdPin { 0% { transform: translateY(-6px) scale(.9); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes ibdToastIn { 0% { transform: translateX(-50%) translateY(12px); opacity: 0; } 100% { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* ── корень страницы ── */
.ibd-feed-wrapper {
    width: 100%;
    background: #f4f5fb;
    color: #1f2937;
    font-family: var(--tusovka-font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    line-height: 1.6;
    container-type: inline-size;
}
.ibd-feed-wrapper * { box-sizing: border-box; }

/* ── HERO ── */
.ibd-feed-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #dc7000, #e8785b);
    color: #fff;
    padding: 40px 0 44px;
    /* HERO под фикс-хедер: тянем фон вверх под шапку (без белой полосы),
       контент компенсируем паддингом = базовый отступ + высота хедера. */
    margin-top: calc(-1 * var(--shp-header-h, 79px));
    padding-top: calc(40px + var(--shp-header-h, 79px));
}
.ibd-feed-hero-glow {
    position: absolute;
    inset: 0;
    opacity: .5;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .18), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(255, 255, 255, .12), transparent 45%);
}
.ibd-feed-hero-inner { position: relative; }
.ibd-feed-geopill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}
.ibd-feed-geodot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .35);
}
.ibd-feed-h1 {
    font-size: clamp(1.7rem, 6cqi, 3.2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    margin: 0 0 8px;
    line-height: 1.1;
}
.ibd-feed-sub {
    font-size: clamp(.95rem, 2.2cqi, 1.2rem);
    margin: 0;
    opacity: .94;
    max-width: 44ch;
}

/* ── MAIN ── */
.ibd-feed-main { padding-top: 24px; padding-bottom: 60px; }

/* ── FILTER PANEL ── */
.ibd-feed-fpanel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 30px -22px rgba(17, 24, 39, .4);
    padding: 16px;
    margin-top: -42px;
    position: relative;
    z-index: 5;
}
.ibd-feed-frow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* поиск */
.ibd-feed-search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff;
    border: 1.5px solid #E3ECF2;
    /* 14px, а не 12: sunday-unify.css всё равно форсит 14px через !important,
       и расхождение значений делало вид, будто радиус тут решает плагин. */
    border-radius: 14px;
    padding: 0 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
/*
 * ФОКУС: кольцо ровно ОДНО, вокруг всего поля.
 *
 * Было два: подсветка обёртки (радиус 14px) плюс собственный outline инпута
 * (2px, offset 2px, радиус 8px) - плюс иконка поиска, стоящая снаружи этого
 * outline. Три несовпадающих прямоугольника читались как «поле сломалось».
 *
 * Корень: правило ниже гасило outline с той же специфичностью (0,2,1), что и
 * общее `.ibd-feed-wrapper input:focus-visible` в конце файла, и проигрывало
 * ему по порядку. Поэтому гасим родителем - (0,3,1) выигрывает независимо от
 * того, что и в каком порядке допишут ниже, и без !important.
 *
 * Цвет #dc7000, а не #F5820A: последний даёт на белом контраст 2.61:1 при
 * требуемых 3:1 (WCAG 2.2, SC 1.4.11) - то есть прежнее кольцо не проходило.
 * #dc7000 даёт 3.31:1 и уже используется в проекте как тёмно-оранжевый токен.
 */
.ibd-feed-search:focus-within {
    border-color: #dc7000 !important;   /* перебивает unify-бордер поля (!important) */
    box-shadow: 0 0 0 3px rgba(220, 112, 0, .22) !important;
}
.ibd-feed-wrapper .ibd-feed-search input:focus,
.ibd-feed-wrapper .ibd-feed-search input:focus-visible { outline: none; }
/* Режим высокой контрастности Windows вырезает box-shadow: без этого кольцо
   пропало бы там полностью. */
@media (forced-colors: active) {
    .ibd-feed-search:focus-within {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }
}
.ibd-feed-search svg { flex: none; }
.ibd-feed-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    padding: 12px 0;
    font-size: 14.5px;
    font-family: inherit;
    color: #1f2937;
    -webkit-appearance: none;
    appearance: none;
}
.ibd-feed-search input::placeholder { color: #6b7280; }
.ibd-feed-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* сегменты дат */
.ibd-feed-segbox { position: relative; flex: 1 1 100%; }
.ibd-feed-segwrap {
    display: flex;
    align-items: center;
    background: #e2edf8;
    border-radius: 11px;
    padding: 4px;
    gap: 2px;
    width: 100%;
}
.ibd-feed-seg {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 11px;
    border-radius: 8px;
    background: transparent;
    /* На подложке сегментов (#e2edf8), а не на белом: #6b7280 давал там 4.08:1.
       #4b5563 - 6.37:1. */
    color: #4b5563;
    box-shadow: none;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
    white-space: nowrap;
}
.ibd-feed-seg svg { flex: none; }
.ibd-feed-seg.is-active {
    background: #fff;
    /* #dc7000 на белом - 3.30:1 при норме 4.5:1 для текста. #b45309 даёт 5.02:1
       и остаётся тем же тёплым оранжевым семейством. */
    color: #b45309;
    box-shadow: 0 2px 6px rgba(17, 24, 39, .12);
}
/* сегмент «Дата» с выбранным диапазоном (активная подсветка бренда) */
.ibd-feed-seg[data-ibd-pickseg].has-pick {
    background: #fff;
    color:#b45309;
    box-shadow: 0 2px 6px rgba(17, 24, 39, .12);
}

/* ── КАЛЕНДАРЬ (Air Datepicker в оболочке макета) ── */
.ibd-feed-cal {
    position: absolute;
    top: calc(100% + 8px);
    /* Логическое свойство, а не right: на иврите кнопка «Дата» стоит слева,
       и попап уезжал к другому краю панели. */
    inset-inline-end: 0;
    z-index: 40;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 40px -14px rgba(17, 24, 39, .42);
    padding: 16px;
    width: 308px;
}
.ibd-feed-cal[hidden] { display: none; }
.ibd-feed-cal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f1f6;
}
.ibd-feed-cal-range { font-size: 12px; color: #6b7280; font-weight: 600; }
.ibd-feed-cal-apply {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    background: #F5820A;
    color: #fff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 8px 15px;
    border-radius: 9px;
    transition: transform .16s ease, filter .2s ease;
}
.ibd-feed-cal-apply:hover { transform: translateY(-1px); filter: brightness(1.03); }
.ibd-feed-cal-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    font-size: 11px;
    color: #6b7280;
}
.ibd-feed-cal-legdot { width: 5px; height: 5px; border-radius: 50%; background: #e8785b; }

/* — оболочка Air Datepicker под макет — */
.ibd-feed-cal-mount .air-datepicker {
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
    font-family: inherit;
    background: transparent;
    --adp-day-cell-width: 1fr;
    --adp-day-cell-height: 34px;
    --adp-cell-border-radius: 9px;
    --adp-accent-color: #f5820a;
    --adp-color: #374151;
    --adp-color-secondary: #9ca3af;
    --adp-day-name-color: #9ca3af;
    --adp-border-color-inner: transparent;
    --adp-cell-background-color-selected: #f5820a;
    --adp-cell-background-color-selected-hover: #dc7000;
    --adp-cell-background-color-in-range: #eaf1f6;
    --adp-cell-background-color-in-range-hover: #d9ebf9;
    --adp-background-color-in-range: #eaf1f6;
    --adp-nav-arrow-color: #374151;
    --adp-nav-color-secondary: #374151;
    --adp-font-family: inherit;
}
.ibd-feed-cal-mount .air-datepicker-nav { border-bottom: 0; padding: 0 0 6px; min-height: auto; }
.ibd-feed-cal-mount .air-datepicker-nav--title { font-weight: 800; font-size: 14px; color: #1f2937; }
.ibd-feed-cal-mount .air-datepicker-nav--action {
    width: 30px; height: 30px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff;
}
.ibd-feed-cal-mount .air-datepicker-nav--action:hover { background: #eaf1f6; }
.ibd-feed-cal-mount .air-datepicker-body--day-names { margin: 4px 0 5px; }
.ibd-feed-cal-mount .air-datepicker-body--day-name { font-size: 10.5px; font-weight: 700; color: #6b7280; text-transform: none; }
.ibd-feed-cal-mount .air-datepicker-cell { font-size: 13px; font-weight: 600; border-radius: 9px; }
.ibd-feed-cal-mount .air-datepicker-cell.-selected-,
.ibd-feed-cal-mount .air-datepicker-cell.-range-from-,
.ibd-feed-cal-mount .air-datepicker-cell.-range-to- { background: #f5820a; color: #fff; font-weight: 800; }
.ibd-feed-cal-mount .air-datepicker-cell.-in-range- { background: #eaf1f6; color: #374151; }
.ibd-feed-cal-mount .air-datepicker-cell.-current- { color:#b45309; }
/* точка на днях с событиями */
.ibd-feed-cal-mount .air-datepicker-cell.-has-event- { font-weight: 800; }
.ibd-feed-cal-mount .air-datepicker-cell.-has-event-::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #e8785b;
}
.ibd-feed-cal-mount .air-datepicker-cell.-has-event-.-selected-::after,
.ibd-feed-cal-mount .air-datepicker-cell.-has-event-.-range-from-::after,
.ibd-feed-cal-mount .air-datepicker-cell.-has-event-.-range-to-::after { background: #fff; }

/* ── ghost-кнопки (Фильтры / Рядом / Показать ещё) ── */
.ibd-feed-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 11px 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    color: #374151;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.ibd-feed-ghost:hover { background: #eaf1f6; border-color: #f8dcc1; }
.ibd-feed-count {
    background: #eaf1f6;
    color:#b45309;
    font-size: 11px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
}
.ibd-feed-near.is-active {
    background: #F5820A;
    color: #fff;
    border: 1.5px solid transparent;
}
.ibd-feed-near.is-active:hover { border-color: transparent; filter: brightness(1.03); }

/* ── категории (раскрытие) ── */
.ibd-feed-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f1f6;
}
.ibd-feed-cats[hidden] { display: none; }
.ibd-feed-cats-label {
    align-self: center;
    font-size: 12.5px;
    font-weight: 800;
    color: #6b7280;
    margin-inline-end: 2px;
}
/* Панель расширенных фильтров (Знакомства 18+ переехали сюда с топ-панели) */
.ibd-feed-adv {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f1f6;
}
.ibd-feed-adv[hidden] { display: none; }
.ibd-feed-adv-hint { font-size: 12px; color: #6b7280; }

/* ── группы внутри панели «Фильтры» ── */
.ibd-feed-fgroup {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 170px;
}
.ibd-feed-fgroup--cap { min-width: 260px; flex: 1 1 260px; }
.ibd-feed-fgroup-t {
    font-size: 11.5px;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ibd-feed-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}
.ibd-feed-check input {
    -webkit-appearance: none; appearance: none; margin: 0; cursor: pointer;
    width: 16px; height: 16px; border: 1.5px solid #e5e7eb; border-radius: 5px;
    background: #fff; position: relative; transition: background .15s ease, border-color .15s ease;
}
.ibd-feed-check input:hover { border-color: #d8b48c; }
.ibd-feed-check input:checked { background: #dc7000; border-color: #dc7000; }
.ibd-feed-check input:checked::after {
    content: ""; position: absolute; left: 30%; top: 10%; width: 25%; height: 50%;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ── двойной ползунок «сколько человек собирается» ──
   Два <input type=range> лежат друг на друге: у обоих прозрачная дорожка, видимая
   рисуется отдельным слоем. pointer-events отключены у самих range, включены только
   у ручек - иначе верхний ползунок перехватывал бы клики по всей ширине нижнего. */
.ibd-feed-caprange { position: relative; height: 26px; }
.ibd-feed-captrack {
    position: absolute;
    inset-inline: 0;
    top: 11px;
    height: 4px;
    border-radius: 999px;
    background: #e9edf2;
}
.ibd-feed-capfill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 999px;
    background: #dc7000;
}
.ibd-feed-caprange input[type="range"] {
    position: absolute;
    inset-inline: 0;
    top: 0;
    width: 100%;
    height: 26px;
    margin: 0;
    background: none;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
}
/* Нижняя ручка ВЫШЕ верхней по слою. Оба range лежат в одном боксе, и без этого
   порядок покраски отдавал бы клик всегда второму в DOM: когда обе ручки сходятся
   на максимуме, «минимум» становился недоступен мышью - диапазон залипал. */
.ibd-feed-caprange input[data-ibd-capmin] { z-index: 2; }
.ibd-feed-caprange input[data-ibd-capmax] { z-index: 1; }
.ibd-feed-caprange input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    pointer-events: auto;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #dc7000;
    box-shadow: 0 1px 4px rgba(17, 24, 39, .22);
    cursor: pointer;
}
.ibd-feed-caprange input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #dc7000;
    box-shadow: 0 1px 4px rgba(17, 24, 39, .22);
    cursor: pointer;
}
.ibd-feed-caprange input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid #dc7000; outline-offset: 2px; }
.ibd-feed-caprange input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid #dc7000; outline-offset: 2px; }
.ibd-feed-caprow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.ibd-feed-capval { font-size: 12.5px; font-weight: 800; color: #4b5563; }
.ibd-feed-caprange.is-active + .ibd-feed-caprow .ibd-feed-capval { color:#b45309; }
.ibd-feed-capscale {
    display: flex;
    gap: 12px;
    font-size: 11px;
    /* #6b7280 = 5.31:1 на белом. Прежний #b6bcc7 давал 1.91:1 при требуемых 4.5:1
       (WCAG 2.2, SC 1.4.3 - 11px это обычный текст, а не крупный). */
    color: #6b7280;
    font-weight: 600;
}

/* ── сортировка в панели результатов ── */
.ibd-feed-sortwrap { display: inline-flex; align-items: center; }
/* Раньше единственным признаком контрола был пунктир снизу с контрастом 1.24:1:
   appearance:none снимал нативную стрелку, border:0 и background:none - рамку и фон,
   а фон под строкой результатов не белый (unify форсит прозрачность). Селект просто
   не читался как кликабельный. Теперь честная рамка и своя стрелка. */
.ibd-feed-sort {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 7px 28px 7px 11px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
}
.ibd-feed-sort:hover { color:#b45309; border-color: #f8dcc1; }
html[dir="rtl"] .ibd-feed-sort { background-position: left 9px center; padding: 7px 11px 7px 28px; }
.ibd-feed-chip {
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 13px;
    border-radius: 999px;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.ibd-feed-chip:hover { transform: translateY(-1px); }
/* Категория, по которой сейчас ничего не найдётся: приглушаем, но НЕ прячем -
   исчезающие и появляющиеся чипы дезориентируют сильнее, чем серые.
   opacity НЕ используем: чип остаётся полноценной кнопкой (JS не ставит disabled
   и клик по нему применяет фильтр), поэтому исключение WCAG для неактивных
   контролов на него не распространяется, а opacity .42 давала тексту 2.20:1.
   Приглушаем явными цветами, сохраняя контраст. */
.ibd-feed-chip.is-empty {
    color: #6b7280;
    border-color: #eceff3;
    background: #fafbfc;
}
.ibd-feed-chip.is-empty:hover { transform: none; border-color: #dfe3e9; }

/* ── Город: явная ось вместо неявного «Рядом» по названию города ── */
.ibd-feed-citywrap { display: inline-flex; align-items: center; }
.ibd-feed-city {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 11px 34px 11px 14px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13.5px;
    color: #374151;
    cursor: pointer;
    max-width: 220px;
    transition: border-color .2s ease;
}
.ibd-feed-city:hover { border-color: #f8dcc1; }
html[dir="rtl"] .ibd-feed-city { background-position: left 11px center; padding: 11px 14px 11px 34px; }

/* ── Встречи, выпавшие из-за отсутствия координат при активном «Рядом» ── */
.ibd-feed-geoskip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 2px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #eaf1f6;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
}
.ibd-feed-geoskip[hidden] { display: none; }

/* ── применённые фильтры ── */
.ibd-feed-applied {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid #f0f1f6;
}
.ibd-feed-applied[hidden] { display: none; }
.ibd-feed-applied-label { font-size: 12.5px; color: #9ca3af; font-weight: 700; }
.ibd-feed-applied-chips { display: contents; }
.ibd-feed-achip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eaf1f6;
    color:#b45309;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 8px 6px 12px;
    border-radius: 999px;
}
.ibd-feed-achip-x {
    border: 0;
    cursor: pointer;
    background: rgba(220, 112, 0, .14);
    color:#b45309;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
}
.ibd-feed-reset-link {
    background: none;
    border: 0;
    cursor: pointer;
    /* Было #f5820a - 2.60:1 на белом и 2.28:1 на плашке «Рядом» при норме 4.5:1.
       #b45309 даёт 5.02:1 и 4.73:1. */
    color: #b45309;
    font-weight: 700;
    font-size: 12.5px;
    text-decoration: underline;
}

/* ── RESULTS BAR ── */
.ibd-feed-resbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 2px 4px;
}
.ibd-feed-rescount { font-size: 15px; }
.ibd-feed-rescount b { font-size: 17px; }
/* Полоса результатов голубая (#eaf4fb), а не белая: #6b7280 давал 4.34:1. */
.ibd-feed-resmuted { color: #4b5563; }
.ibd-feed-viewtoggle {
    display: flex;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 4px;
    gap: 3px;
    box-shadow: 0 6px 16px -12px rgba(17, 24, 39, .4);
}
.ibd-feed-viewtoggle .ibd-feed-seg {
    flex: 0 0 auto;
    padding: 8px 15px;
    font-size: 13.5px;
}
.ibd-feed-viewtoggle .ibd-feed-seg.is-active {
    background: #F5820A;
    color: #fff;
    box-shadow: none;
}

/* ── LIST VIEW ── */
.ibd-feed-list { margin-top: 20px; display: flex; flex-direction: column; gap: 30px; }
.ibd-feed-list[hidden] { display: none; }
.ibd-feed-group[hidden] { display: none; }
/* Дни лежат в обёртке [data-ibd-groups], и gap списка выше до них не доходил: группы
   стояли вплотную, а тень карточки (0 26px 48px -22px, ~28px вниз) и её подъём при
   наведении ложились на заголовок следующего дня. Зазор - не меньше хвоста тени.
   gap, а не margin соседей: скрытая группа ([hidden]) лишнего отступа не оставит. */
.ibd-feed-groups { display: flex; flex-direction: column; gap: 48px; }
.ibd-feed-groups[hidden] { display: none; }
@media (max-width: 640px) { .ibd-feed-groups { gap: 36px; } }
.ibd-feed-group-head {
    display: flex;
    align-items: baseline;
    gap: 11px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}
.ibd-feed-group-title { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.ibd-feed-group-sub { font-size: 14px; color: #9ca3af; font-weight: 600; }
.ibd-feed-group-badge {
    font-size: 12.5px;
    /* Плашка серая (#eef0f6), а не белая: #6b7280 давал там 4.24:1. */
    color: #4b5563;
    background: #eef0f6;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
}
.ibd-feed-grid {
    display: grid;
    /* min() обязателен: на вьюпорте 320px контейнер = 288px, а трек оставался
       320px - карточки обрезались, доскроллить было нельзя. */
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 18px;
}
.ibd-feed-cell { display: flex; }
.ibd-feed-cell[hidden] { display: none; }
.ibd-feed-cell > .ec-lift { width: 100%; }

.ibd-feed-more { text-align: center; padding: 6px 0 4px; }
.ibd-feed-more[hidden] { display: none; }
.ibd-feed-more-btn {
    border-radius: 13px;
    padding: 13px 26px;
    font-weight: 800;
    font-size: 14.5px;
    color:#b45309;
    box-shadow: 0 10px 24px -16px rgba(17, 24, 39, .4);
    gap: 9px;
}

/* ── LOADING SKELETON ── */
.ibd-feed-skel { margin-top: 20px; }
.ibd-feed-skel[hidden] { display: none; }
.tk-skel {
    background: linear-gradient(90deg, #eef0f6 25%, #f6f7fb 50%, #eef0f6 75%);
    background-size: 920px 100%;
    animation: ibdShimmer 1.3s linear infinite;
    border-radius: 8px;
}
.ibd-skel-bar { width: 180px; height: 22px; margin-bottom: 16px; }
.ibd-skel-card { background: #fff; border: 1px solid #eef0f6; border-radius: 16px; overflow: hidden; }
.ibd-skel-cover { height: 150px; border-radius: 0; }
.ibd-skel-body { padding: 16px; }

/* ── EMPTY STATE ── */
.ibd-feed-empty {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 56px 24px;
    text-align: center;
    box-shadow: 0 12px 30px -22px rgba(17, 24, 39, .4);
}
.ibd-feed-empty[hidden] { display: none; }
.ibd-feed-empty-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: rgba(245, 130, 10, .1);
    color:#b45309;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ibd-feed-empty-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.ibd-feed-empty-p { font-size: 14.5px; color: #6b7280; margin: 0 auto 20px; max-width: 38ch; }
.ibd-feed-empty-cta {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    background: #F5820A;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 12px;
    box-shadow: 0 12px 26px -8px rgba(245, 130, 10, .55);
    transition: transform .16s ease, filter .2s ease;
}
.ibd-feed-empty-cta:hover { transform: translateY(-2px); filter: brightness(1.03); }

/* ── MAP VIEW ── */
/* position: relative обязателен: счётчик «N встреч на карте» абсолютный, и без
   позиционированного предка он уезжал к верхнему краю документа - поверх шапки. */
.ibd-feed-map { margin-top: 20px; position: relative; }
.ibd-feed-map[hidden] { display: none; }
/* реальная Google-карта (Модуль 4) — та же геометрия, что у декоративной подложки */
.ibd-feed-gmap { height: 560px; border-radius: 18px; overflow: hidden; border: 1px solid #d9e1ea; box-shadow: 0 16px 40px -26px rgba(17, 24, 39, .45); background: #e8edf2; }
.ibd-feed-gmap[hidden] { display: none; }
.ibd-map-iw { font-size: 13px; line-height: 1.4; }
.ibd-map-iw a { color:#b45309; font-weight: 700; text-decoration: none; }
@media (max-width: 640px) { .ibd-feed-gmap { height: 60vh; } }
.ibd-feed-map-canvas {
    position: relative;
    height: 560px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 40px -26px rgba(17, 24, 39, .45);
    background: #e8edf2;
}
.ibd-feed-map-base { position: absolute; inset: 0; background: linear-gradient(180deg, #eaf0f4, #e3e9ef); }
.ibd-feed-map-sea { position: absolute; top: 0; bottom: 0; left: 0; width: 26%; background: linear-gradient(90deg, #bfe0ef, #d3e9f2); }
.ibd-feed-map-road { position: absolute; }
.ibd-feed-map-road1 { left: 22%; top: -8%; width: 16px; height: 120%; background: #cdd6df; transform: rotate(9deg); }
.ibd-feed-map-road2 { left: 46%; top: -10%; width: 9px; height: 130%; background: #dbe2ea; transform: rotate(-7deg); }
.ibd-feed-map-roadh { left: 0; right: 0; top: 52%; height: 9px; background: #dbe2ea; }
.ibd-feed-map-park { position: absolute; background: #cfe6cf; }
.ibd-feed-map-park1 { left: 58%; top: 18%; width: 120px; height: 90px; border-radius: 40% 60% 55% 45%; }
.ibd-feed-map-park2 { left: 34%; top: 64%; width: 90px; height: 70px; border-radius: 55% 45% 50% 50%; }

/* пины */
.ibd-feed-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    border: 0;
    cursor: pointer;
    background: none;
    padding: 0;
    z-index: 20;
    animation: ibdPin .4s cubic-bezier(.34, 1.56, .64, 1) both;
}
.ibd-feed-pin.is-selected { z-index: 50; }
.ibd-feed-pin-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 2px;
    transform: rotate(45deg);
    box-shadow: 0 6px 14px -4px rgba(17, 24, 39, .5);
    border: 2.5px solid #fff;
    transition: width .18s ease, height .18s ease, background .18s ease;
}
.ibd-feed-pin.is-selected .ibd-feed-pin-drop {
    width: 34px;
    height: 34px;
    background: #F5820A !important;
}
.ibd-feed-pin-label {
    transform: rotate(-45deg);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
}
.ibd-feed-pin.is-selected .ibd-feed-pin-label { font-size: 13px; }

/* мини-карточка выбранного */
.ibd-feed-minicard {
    position: absolute;
    left: 20px;
    bottom: 20px;
    width: 300px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 44px -18px rgba(17, 24, 39, .5);
    overflow: hidden;
    z-index: 60;
}
.ibd-feed-minicard[hidden] { display: none; }
.ibd-feed-minicard-cover { position: relative; height: 104px; }
.ibd-feed-minicard-cover img { width: 100%; height: 100%; object-fit: cover; }
.ibd-feed-minicard-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    background: rgba(17, 24, 39, .6);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ibd-feed-minicard-date {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255, 255, 255, .95);
    color: #1e2a32;
    font-weight: 800;
    font-size: 11.5px;
    padding: 4px 9px;
    border-radius: 8px;
}
.ibd-feed-minicard-body { padding: 12px 14px; }
.ibd-feed-minicard-comm { font-size: 12px; color: #6b7280; font-weight: 600; margin-bottom: 2px; }
.ibd-feed-minicard-title { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; line-height: 1.25; }
.ibd-feed-minicard-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ibd-feed-minicard-seats { font-size: 12.5px; font-weight: 700; }
.ibd-feed-minicard-open {
    text-decoration: none;
    background: #F5820A;
    color: #fff;
    font-weight: 800;
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: 9px;
    white-space: nowrap;
}
.ibd-feed-map-count {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 9px 13px;
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    box-shadow: 0 8px 20px -12px rgba(17, 24, 39, .4);
    z-index: 40;
}

/* ── TOAST ── */
.ibd-feed-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 9999;
    background: #1e2a32;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 13px 20px;
    border-radius: 13px;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90vw;
    animation: ibdToastIn .25s ease both;
}
.ibd-feed-toast[hidden] { display: none; }
.ibd-feed-toast-icon {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 50%;
    background: #F5820A;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* фокус-видимость */
/* #dc7000 вместо #f5820a: на белом первый даёт 3.31:1, второй - 2.61:1 при
   требуемых 3:1 (WCAG 2.2, SC 1.4.11). Поле поиска сюда не попадает: у него
   своё кольцо на обёртке, см. .ibd-feed-search:focus-within выше. */
.ibd-feed-wrapper button:focus-visible,
.ibd-feed-wrapper input:focus-visible,
.ibd-feed-wrapper a:focus-visible {
    outline: 2px solid #dc7000;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
    .ibd-feed-seg,
    .ibd-feed-ghost,
    .ibd-feed-chip,
    .ibd-feed-cal-apply,
    .ibd-feed-empty-cta,
    .ibd-feed-pin-drop { transition: none !important; }
    .tk-skel,
    .ibd-feed-pin,
    .ibd-feed-toast { animation: none !important; }
}

/* ── мобильный reflow (container-query + media fallback) ── */
@container (max-width: 480px) {
    .ibd-feed-main { padding-left: 14px; padding-right: 14px; }
    .ibd-feed-fpanel { padding: 12px; }
    .ibd-feed-hero-inner { padding-left: 14px; padding-right: 14px; }
    .ibd-feed-segwrap { width: 100%; }
    .ibd-feed-seg { flex: 1 1 0; min-width: 0; padding: 9px 6px; }
    .ibd-feed-cal { left: 0; right: 0; width: auto; }
    .ibd-feed-minicard { left: 12px; right: 12px; width: auto; }
}
@media (max-width: 480px) {
    .ibd-feed-fpanel { padding: 12px; }
    .ibd-feed-segwrap { width: 100%; }
    .ibd-feed-seg { flex: 1 1 0; min-width: 0; padding: 9px 6px; }
    .ibd-feed-cal { left: 0; right: 0; width: auto; }
    .ibd-feed-minicard { left: 12px; right: 12px; width: auto; }
}

/* ══════════ Finite Social, Фаза 1: планы + радиус + дно ленты ══════════ */

/* Кнопка «Создать план» */
.ibd-plan-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    font-size: 14.5px;
    padding: 12px 22px;
    border-radius: 12px;
    color:#b45309;
    background: #fff;
    box-shadow: 0 12px 26px -10px rgba(17, 24, 39, .45);
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.ibd-plan-btn:hover { background: #1e2a32; color: #fff; transform: translateY(-1px); }
.ibd-plan-btn--hero { margin-top: 16px; }
.ibd-plan-btn--end {
    background: #F5820A;
    color: #fff;
    box-shadow: 0 12px 26px -8px rgba(245, 130, 10, .5);
}
.ibd-plan-btn--end:hover { background: #dc7000; color: #fff; }

/* Текст на оранжевом. Белый на #F5820A - 2.6:1, цвет фирменный и не меняется,
   поэтому текст держит WCAG «крупный текст» (от 18.66px при 700+) и лёгкую тёмную тень.
   Крупные кнопки - 19px/800. Мелкие по дизайну (сегмент вида, «Рядом», кнопки поповера
   календаря и мини-карточки карты) размер сохраняют: только вес 800 и тень. */
.ibd-plan-btn--end,
.ibd-feed-empty-cta { font-size: 19px; font-weight: 800; text-shadow: 0 1px 1px rgba(120, 50, 0, .35); }
.ibd-feed-viewtoggle .ibd-feed-seg.is-active,
.ibd-feed-near.is-active,
.ibd-feed-cal-apply,
.ibd-feed-minicard-open { font-weight: 800; text-shadow: 0 1px 1px rgba(120, 50, 0, .35); }

/* Радиус «Рядом» */
.ibd-feed-radius {
    display: inline-flex;
    background: #e2edf8;
    border-radius: 11px;
    padding: 4px;
    gap: 3px;
}
.ibd-feed-radius[hidden] { display: none; }
.ibd-feed-radius .ibd-feed-seg { padding: 8px 12px; }

/* Дно ленты */
.ibd-feed-end {
    text-align: center;
    padding: 46px 20px 40px;
    border: 1.5px dashed #f3d7b5;
    border-radius: 18px;
    background: linear-gradient(180deg, #fffaf3, #fff);
    margin-top: 18px;
}
.ibd-feed-end[hidden] { display: none; }
.ibd-feed-end-sun { margin-bottom: 10px; }
.ibd-feed-end-sun svg { animation: ibdEndSpin 9s linear infinite; transform-origin: 50% 50%; }
@keyframes ibdEndSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ibd-feed-end-sun svg { animation: none; } }
.ibd-feed-end-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #1e2a32;
    margin-bottom: 8px;
}
.ibd-feed-end-p {
    font-size: 14px;
    color: #6b7280;
    max-width: 46ch;
    margin: 0 auto 18px;
    line-height: 1.55;
}
.ibd-feed-end-acts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Модалка «Новый план» */
.ibd-planmodal {
    position: fixed;
    inset: 0;
    z-index: 100040;
    display: flex;
    /* SCRUM-126: скролл на самом окне-оверлее, а не внутри карточки. Карточка своей
       высоты (margin:auto центрирует, когда влезает, и даёт прокрутку, когда выше экрана). */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}
.ibd-planmodal[hidden] { display: none; }
html.ibd-planmodal-open { overflow: hidden; }
.ibd-planmodal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 42, 50, .55);
    backdrop-filter: blur(2px);
}
.ibd-planmodal__card {
    position: relative;
    width: 100%;
    max-width: 670px;              /* SCRUM-126: шире на 150px (было 520) */
    margin: auto;                  /* центр по обеим осям + прокрутка оверлея при большой высоте */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(30, 42, 50, .3);
}
.ibd-planmodal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 0;
}
.ibd-planmodal__title { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: #1e2a32; }
.ibd-planmodal__sub { margin: 0; font-size: 13px; color: #6b7280; }
.ibd-planmodal__close {
    flex: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f4f5fb;
    color: #374151;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.ibd-planmodal__form { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.ibd-planmodal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ibd-planmodal__field { display: block; text-align: start; }
/* Выбор места переключается через .hidden (plan-create.js): без гарда display
   класса перебивал [hidden], и селект площадки висел даже в режиме точки на карте. */
.ibd-planmodal__field[hidden] { display: none; }
.ibd-planmodal__field > span {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}
.ibd-planmodal__field input,
.ibd-planmodal__field select {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e5e7eb;
    border-radius: 11px;
    padding: 11px 13px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background: #fff;
}
.ibd-planmodal__field input:focus,
.ibd-planmodal__field select:focus {
    border-color: #f5820a;
    box-shadow: 0 0 0 3px rgba(245, 130, 10, .14);
}
/* #4b5563 = 6.37:1 на белой карточке модалки; #9ca3af давал 2.54:1 при норме 4.5:1. */
.ibd-planmodal__hint { display: block; font-style: normal; font-size: 12px; color: #4b5563; margin-top: 5px; }

/* М7: select2 «Город» - под единый стиль с нативными полями (border/radius/высота как input),
   дропдаун строго ПОД полем и выше модалки (иначе наезжал + давал клик-сквозь). */
.ibd-planmodal__field .select2-container { width: 100% !important; }
.ibd-planmodal__field .select2-container--default .select2-selection--single {
    height: 46px;
    border: 1.5px solid #e5e7eb;
    border-radius: 11px;
    display: flex;
    align-items: center;
    padding: 0 13px;
    background: #fff;
}
.ibd-planmodal__field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal;
    padding: 0;
    color: #111827;
    font-size: 15px;
}
.ibd-planmodal__field .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; right: 10px; }
.ibd-planmodal__field .select2-container--default.select2-container--focus .select2-selection--single,
.ibd-planmodal__field .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #f5820a;
    box-shadow: 0 0 0 3px rgba(245, 130, 10, .14);
}
/* Модалка плана z-index ~100040 - поднимаем открытый select2 (body-appended) над ней. */
.select2-container--open { z-index: 100120 !important; }
.select2-dropdown { border-color: #e5e7eb; border-radius: 0 0 11px 11px; }
.ibd-planmodal__seg {
    display: flex;
    background: #e2edf8;
    border-radius: 11px;
    padding: 4px;
    gap: 3px;
}
.ibd-planmodal__seg button {
    flex: 1;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 6px;
    border-radius: 8px;
    background: transparent;
    color: #4b5563;
}
.ibd-planmodal__seg button.is-on { background: #fff; color:#b45309; box-shadow: 0 2px 6px rgba(17, 24, 39, .12); }
.ibd-planmodal__error {
    padding: 9px 13px;
    border-radius: 10px;
    background: #fdecec;
    color: #b3261e;
    font-size: 13px;
    line-height: 1.4;
}
.ibd-planmodal__actions { display: flex; gap: 10px; margin-top: 2px; }
.ibd-planmodal__save {
    flex: 1;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    font-size: 14.5px;
    padding: 13px 20px;
    border-radius: 12px;
    color: #fff;
    background: #F5820A;
    box-shadow: 0 12px 26px -8px rgba(245, 130, 10, .5);
}
.ibd-planmodal__save:hover { background: #dc7000; }
.ibd-planmodal__save:disabled { opacity: .6; cursor: default; }
.ibd-planmodal__cancel {
    border: 1.5px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 14.5px;
    padding: 13px 18px;
    border-radius: 12px;
    color: #6b7280;
}

@media (max-width: 560px) {
    .ibd-planmodal { padding: 12px; }
    .ibd-planmodal__grid { grid-template-columns: 1fr; }
}

.ibd-planmodal__note {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #6b7280;
    background: #fbfaf6;
    border: 1px solid #f0e6d8;
    border-radius: 11px;
    padding: 11px 13px;
}
