/* =====================================================================
   Выдача: авиабилеты, отели, ЖД (pages/search.js)
   Префикс sr- (общая выдача и ЖД), av- (авиа), hl- (отели)
   ===================================================================== */

/* шапка выдачи — та же «стеклянная» плашка, что на главной */
/* компактная строка — по UiSearchCompactBar (b2b-fbt): стекло 10% + blur 20, радиус 24, круглые иконка и «изменить» 44 px,
   сегменты-пилюли 15/600 с подсветкой при наведении, разделитель только между датами и сотрудниками */
/* фото-шапка (отели): как TripSearchHeroCompact — фото + затемнение 25% */
.sr-edit { position: relative; margin: 0 32px 24px }
.sr-edit .fld.emp .v { color: var(--text) }

.sr-pg { padding-top: 16px; gap: 16px }
.sr-pg h1 { margin: 0 }

/* сетка: список + колонка */
.sr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start }
.sr-list { display: flex; flex-direction: column; gap: 16px; min-width: 0 }
.sr-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px }

/* метки */
.sr-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral); color: var(--text-2) }
.sr-tag.ok { background: var(--brand-light); color: var(--brand-ink) }
.sr-tag.info { background: var(--info-light); color: var(--info) }
.sr-tag.neg { background: var(--neg-light); color: var(--neg-ink) }
.sr-tag.corp { background: var(--text); color: var(--surface) }
.sr-tag.mute { background: var(--neutral); color: var(--text-2) }

/* карточка предложения */
.sr-card { background: var(--surface); border-radius: var(--r-card); padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; border: 1.5px solid transparent; transition: border-color .15s; cursor: pointer }
.sr-card:hover { border-color: var(--line-3) }
.sr-card.open { border-color: var(--brand) }
.sr-c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap }
.sr-price { font-size: 24px; line-height: 28px; font-weight: 600; white-space: nowrap }
.sr-al { width: 36px; height: 36px; border-radius: 50%; font-size: 12px }

.sr-leg { display: flex; align-items: center; gap: 16px; min-width: 0 }
.sr-t { min-width: 92px; display: flex; flex-direction: column }
.sr-t b { font-size: 24px; line-height: 26px; font-weight: 600 }
.sr-t span { font-size: 14px; color: var(--text-2) }
.sr-t small { font-size: 12px; color: var(--text-3) }
.sr-t.r { text-align: right }
.sr-line { flex: 1; min-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 4px }
.sr-line em { font-style: normal; font-size: 12px; color: var(--text-2); font-weight: 500 }
.sr-line i { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--line-3); position: relative }
.sr-line i::before, .sr-line i::after { content: ""; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-3) }
.sr-line i::before { left: -2px } .sr-line i::after { right: -2px }
.sr-line span { display: flex; justify-content: space-between; width: 100%; gap: 8px; align-items: baseline }
.sr-line code { font: 600 12px/1 var(--font); color: var(--text-2) }
.sr-line small { font-size: 12px; color: var(--text-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }

.sr-hint { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2) }

/* панели фильтров */
.sr-pop { padding: 4px }
.sr-fs { display: flex; flex-direction: column; gap: 2px }
.sr-fs > b { font-size: 14px; font-weight: 600; padding: 6px 6px 4px }
.sr-fs > small { padding: 2px 6px 6px; font-size: 12px }
.sr-fs > p { margin: 0; padding: 0 6px 6px }
.pf-l-b .sr-fs + .sr-fs { border-top: 1px solid var(--line-2); padding-top: 12px }
.sr-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; cursor: pointer; font-size: 14px }
.sr-opt:hover { background: var(--surface-2) }
.sr-opt > span { display: flex; flex-direction: column; flex: 1; min-width: 0 }
.sr-opt > span .al { display: inline-grid; width: 22px; height: 22px; font-size: 10px; vertical-align: -6px; margin-right: 6px; border-radius: 50% }
.sr-opt small { font-size: 12px; color: var(--text-2) }
.sr-opt input[type=radio] { position: absolute; opacity: 0; pointer-events: none }
.sr-opt .r { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-3); flex: none; display: grid; place-items: center; background: var(--surface) }
.sr-opt input:checked + .r { border-color: var(--brand) }
.sr-opt input:checked + .r::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand) }
.sr-opt input:focus-visible + .r { outline: 2px solid var(--brand); outline-offset: 2px }
.sr-tb { display: grid; grid-template-columns: 1fr 1fr }
.sr-range { display: flex; flex-direction: column; gap: 8px; padding: 6px; font-size: 14px }
.sr-range span { color: var(--text-2) }
.sr-range input { width: 100%; accent-color: var(--brand) }


/* ---------- авиа: выдача (b2b-fbt AviaSearchResultsPriceCalendar, AviaSerpFiltersTopPanel, AviaSearchResultCard/Leg/TariffsSection) ---------- */
.av-tool { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; padding-bottom: 4px }
.av-cal { display: flex; align-items: center; gap: 20px; min-height: 74px; padding: 10px 0 } /* как в проде: от края контейнера, вровень с поиском и фильтрами */
.av-cal h2 { margin: 0; flex: none; font-size: 16px; line-height: 22px; font-weight: 600; white-space: nowrap }
.av-cal-bar, .av-pills { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px }
.av-cal-s, .av-pills-s { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none }
.av-cal-s::-webkit-scrollbar, .av-pills-s::-webkit-scrollbar { display: none }
.av-nav { flex: none; width: 36px; height: 50px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); transition: background .15s }
.av-nav svg { width: 20px; height: 20px }
.av-nav:hover:not(:disabled) { background: var(--surface-2) }
.av-nav:disabled { opacity: .5; cursor: default }
.av-tile { flex: none; min-width: 96px; max-width: 140px; height: 50px; padding: 8px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text); transition: border-color .15s }
.av-tile:hover:not(:disabled) { border-color: var(--line-3) }
.av-tile span { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); white-space: nowrap }
.av-tile b { font-size: 14px; line-height: 18px; font-weight: 500; white-space: nowrap }
.av-tile b.low { color: var(--brand) }
.av-tile.on { border-color: var(--brand); background: var(--brand-light) }
.av-tile.off { cursor: not-allowed } .av-tile.off b { color: var(--text-3) }
.av-pills { min-height: 64px; padding: 0 0 8px }
.av-pnav { width: 40px; height: 40px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05) }
.av-pill { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 10px 8px 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s }
.av-pill:hover { background: var(--surface-2) }
.av-pill svg { width: 16px; height: 16px; flex: none }
.av-pill[data-chip="all"] { padding-right: 12px; gap: 6px } .av-pill[data-chip="all"] svg { width: 20px; height: 20px }
.av-pill.on { border-color: var(--brand) }
.av-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); margin-right: 2px }
.av-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center }

.av-res { padding-bottom: 48px }
.av-trip { max-width: 845px; margin: 8px auto 4px }
.av-list { max-width: 845px; margin: 0 auto; padding-top: 12px; display: flex; flex-direction: column; gap: 28px }
.av-empty { background: var(--surface); border-radius: 24px; border: 1px solid var(--line-2) }

.av-card { position: relative; width: 100%; min-width: 0; border-radius: 24px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 4px 8px rgba(0, 0, 0, .02), 0 6px 12px rgba(0, 0, 0, .04); container: av-card / inline-size; transition: border-color .15s }
.av-card:hover { border-color: var(--line-3) }
.av-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 16px 0 }
.av-tag { display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 360px; color: #fff; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap }
.av-tag svg { width: 16px; height: 16px; flex: none }
.av-tag > span { padding: 0 2px }
.av-tag.info { background: var(--info) } .av-tag.neg { background: var(--neg) } .av-tag.brand { background: var(--brand) } .av-tag.warn { background: #ff9500 }
.av-body { display: flex; flex-direction: column; gap: 16px; padding: 16px; cursor: pointer }
.av-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'price share' 'tariffs tariffs'; align-items: start; gap: 8px }
.av-price { grid-area: price; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0 }
.av-price p { margin: 0; font-size: 24px; line-height: 28px; font-weight: 600; white-space: nowrap }
.av-left { padding: 2px 4px; border-radius: 8px; background: var(--neg-light); color: var(--neg); font-size: 12px; line-height: 16px; font-weight: 500 }
.av-tbtn { grid-area: tariffs; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 32px; padding: 0 8px; border-radius: 12px; background: var(--neutral); color: var(--text); font-size: 14px; line-height: 18px; font-weight: 500; transition: background .15s }
.av-tbtn:hover, .av-sbtn:hover { background: var(--neutral-hover) }
.av-tbtn svg { width: 16px; height: 16px; transition: transform .2s }
.av-card.open .av-tbtn svg { transform: rotate(180deg) }
.av-share { grid-area: share; justify-self: end; position: relative }
.av-sbtn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--neutral); color: var(--text) }
.av-sbtn svg { width: 16px; height: 16px }
.av-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); padding: 8px 12px; border-radius: 8px; background: #1c1c1e; color: #fff; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5 }
.av-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #1c1c1e; border-bottom: 0 }
.av-share:hover .av-tip { opacity: 1; transform: translateX(-50%) translateY(0) }

/* перелёт: телефон — сетка, широкая карточка — строка (как AviaSearchResultLeg) */
.av-leg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'air air' 'dep arr' 'route route'; gap: 8px 12px; align-items: start; min-width: 0 }
.av-air { grid-area: air; display: flex; align-items: center; gap: 8px; min-width: 0 }
.av-logo { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--al); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18) }
.av-alname { margin: 0; font-size: 14px; line-height: 18px; color: var(--text-2) }
.av-end { display: flex; flex-direction: column; min-width: 0 }
.av-end b { font-size: 24px; line-height: 28px; font-weight: 600; white-space: nowrap }
.av-end span { font-size: 14px; line-height: 18px; color: var(--text-3) }
.av-dep { grid-area: dep } .av-arr { grid-area: arr; text-align: right }
.av-route { grid-area: route; min-width: 0 }
.av-track { width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center }
.av-dur { font-size: 14px; line-height: 18px; color: var(--text) }
.av-bar { display: block; width: 100%; height: 3px; border-radius: 999px; background: #c7c7cc; margin-top: 8px }
.av-codes { width: 100%; display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 14px; line-height: 18px; color: var(--text) }
.av-direct { color: var(--text-3); font-size: 12px }

/* тарифы (AviaSearchResultTariffsSection) */
.av-fares { border-top: 1px solid var(--line-2); padding: 16px; border-radius: 0 0 24px 24px }
.av-frow { display: flex; flex-direction: column; gap: 16px }
.av-fare { position: relative; display: flex; flex-direction: column; min-width: 0 }
.av-fbadge { position: absolute; top: 0; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px; border-radius: 8px; color: #fff; font-size: 12px; line-height: 16px; font-weight: 500 }
.av-fbadge svg { width: 16px; height: 16px }
.av-fbadge.info { background: var(--info) } .av-fbadge.neg { background: var(--neg) }
.av-fbox { height: 100%; margin-top: 8px; display: flex; flex-direction: column; gap: 16px; padding: 20px 16px 16px; border-radius: 16px; border: 1.5px solid var(--line-2) }
.av-ftop { display: flex; flex-direction: column; gap: 12px }
.av-ftitle { margin: 0; font-size: 14px; line-height: 18px; font-weight: 600 }
.av-fbox ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px }
.av-fbox li { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 18px }
.av-fi { width: 20px; height: 20px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 12px; line-height: 16px; font-weight: 600 }
.av-fi svg { width: 12px; height: 12px }
.av-fi.ok { background: var(--brand) } .av-fi.pay { background: #ff9500 } .av-fi.no { background: #8e8e93 }
.av-fsel { margin-top: auto; width: 100%; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 14px; line-height: 18px; font-weight: 600; transition: background .15s }
.av-fsel:hover { background: var(--brand-hover) }
.av-fbox small { margin-top: -8px; font-size: 12px; color: var(--text-2); text-align: center }

@container av-card (min-width: 480px) {
  .av-head { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'price tariffs share'; justify-items: end }
  .av-price { justify-self: start }
  .av-tbtn { width: auto }
}
@container av-card (min-width: 640px) {
  .av-tags { position: absolute; top: 0; left: 16px; max-width: calc(100% - 48px); padding: 0; transform: translateY(-50%) }
  .av-body { padding: 24px; gap: 24px }
  .av-leg { display: flex; align-items: center; gap: 16px }
  .av-air { display: block; flex: none }
  .av-alname { display: none }
  .av-end { flex: none }
  .av-route { flex: 1; display: flex; justify-content: center; min-width: 0; margin-inline: 24px }
  .av-track { max-width: 425px }
  .av-fares { padding: 16px 24px 24px }
  .av-frow { flex-direction: row; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin }
  .av-fare { width: 249px; flex: none }
  .av-ftitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
}
@media (max-width: 1100px) { .av-cal { padding: 10px 0 } }
@media (max-width: 760px) {
  .av-cal { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 0 }
  .av-cal h2 { font-size: 16px; line-height: 20px; text-align: left }
  .av-cal-bar { gap: 8px } .av-nav { width: 32px; height: 44px; border-radius: 10px } .av-tile { min-width: 88px; height: 44px; border-radius: 10px; padding: 6px 8px }
  .av-pnav { display: none }
  .av-pills { margin: 0 -16px; padding: 0 0 8px; min-height: 0 } .av-pills-s { padding: 0 16px; gap: 8px }
  .av-pill { height: 38px; border-radius: 10px; font-size: 12px; line-height: 18px; padding: 8px 8px 8px 12px }
  .av-list { gap: 16px }
}
/* тёмная тема: фон подсказки и неактивных значков — под тёмную поверхность */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-bar { background: #48484a } :root:not([data-theme="light"]) .av-card { box-shadow: none } }
:root[data-theme="dark"] .av-bar { background: #48484a }
:root[data-theme="dark"] .av-card { box-shadow: none }

/* ---------- отели: выдача (Figma «Отели / Выдача v2», b2b-fbt HotelCard) ---------- */
.sh-stars { color: #f5a623; font-size: 12px; letter-spacing: 1px }
body[data-page="page"] .pf-root:has(.hl-body) { padding-bottom: 0 }

.hl-body { max-width: 1312px; margin: 0 auto; padding: 24px 16px; display: grid; grid-template-columns: minmax(0, 720px) 536px; justify-content: center; gap: 24px; align-items: start } /* как в проде: 720 + 24 + 536 = 1280 */
.hl-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-bottom: 40px }
.hl-filters { background: var(--surface); border-radius: 16px; padding: 16px }
.hl-chips { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center }
.hl-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 16px; background: var(--neutral); color: var(--text); font-weight: 500; font-size: 14px; line-height: 18px; white-space: nowrap }
.hl-chip:hover { background: var(--neutral-hover) }
.hl-chip.on { background: var(--brand-light); color: var(--brand-ink) }
.hl-chip .ico { width: 20px; height: 20px }
.hl-chip .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; display: inline-grid; place-items: center }
.hl-div { width: 1px; height: 36px; background: var(--line-2) }
.hl-reset { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--brand-ink) }
.hl-list { display: flex; flex-direction: column; gap: 16px }
.hl-sec { display: flex; flex-direction: column; gap: 12px }
.hl-sec h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 24px; font-weight: 600 }
.hl-fire { filter: brightness(0) saturate(100%) invert(56%) sepia(52%) saturate(486%) hue-rotate(91deg) brightness(93%) contrast(88%) }
.hl-empty { background: var(--surface); border-radius: 16px }

.hl-card { display: flex; gap: 16px; align-items: stretch; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; min-height: 232px }
.hl-card.hot { border-color: var(--line-2) }
.hl-card:hover, .hl-card.lit { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light) }
.hl-ph { position: relative; flex: 0 0 284px; height: 224px; border-radius: 14px; overflow: hidden; background: var(--neutral); cursor: pointer }
.hl-ph > img { width: 100%; height: 100%; object-fit: cover; display: block }
.hl-ph::after { content: ""; position: absolute; inset: auto -4px -4px; height: 300px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 41.57%, rgba(0, 0, 0, .2)); pointer-events: none }
.hl-badges { position: absolute; left: 8px; top: 8px; right: 8px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none }
.hl-b { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 4px 8px 4px 6px; border-radius: 360px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap }
.hl-b.hot { background: #ff9500 }
.hl-nav { position: absolute; top: 100px; z-index: 3; width: 24px; height: 24px; display: grid; place-items: center; opacity: 0; transition: opacity .15s }
.hl-nav.prev { left: 8px } .hl-nav.next { right: 8px }
.hl-card:hover .hl-nav, .hl-nav:focus-visible { opacity: 1 }
.hl-dots { position: absolute; z-index: 2; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; pointer-events: none }
.hl-dots i { width: 5px; height: 5px; border-radius: 100px; background: #fff; opacity: .5; transition: width .15s }
.hl-dots i.sm { width: 4px; height: 4px }
.hl-dots i.on { width: 16px; opacity: 1 }
.hl-c { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 12px 0 }
.hl-info { flex: 1; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line-2); min-height: 0 }
.hl-top { display: flex; align-items: center; gap: 8px }
.hl-stars { display: inline-flex; gap: 2px; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--page) }
.hl-pol { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--neg-light); color: var(--neg-ink); font-size: 12px; font-weight: 600 }
.hl-rate { margin-left: auto; display: inline-flex; align-items: center; gap: 4px }
.hl-rate b { padding: 4px 6px; border-radius: 8px; background: var(--brand-light); color: var(--brand-ink); font-size: 12px; line-height: 16px; font-weight: 700 }
.hl-rate i { font-style: normal; font-size: 12px; color: var(--text-2) }
.hl-rate span { padding: 4px 8px; border-radius: 8px; background: var(--page); color: var(--text-2); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap }
.hl-det { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding-bottom: 12px; min-width: 0 }
.hl-n { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.hl-n:hover { color: var(--brand-ink) }
.hl-nd { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.hl-dist { font-size: 14px; line-height: 18px; color: var(--text-2) }
.hl-cond { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; line-height: 16px; color: var(--text-2) }
.hl-cond li { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap }
.hl-cond li.on { color: var(--brand) }
.hl-cond li.sep { font-size: 14px }
.hl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.hl-pr { display: flex; flex-direction: column }
.hl-pr b { font-size: 18px; line-height: 24px; font-weight: 600; white-space: nowrap }
.hl-pr span { font-size: 14px; line-height: 20px; color: var(--text-2) }
.hl-sel { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap }
.hl-sel:hover { background: var(--brand-hover) }

/* карта */
.hl-map { position: sticky; top: 80px; height: calc(100vh - 104px); min-height: 420px; max-height: 760px; border-radius: 24px; border: 1px solid #dbc2a8; overflow: hidden; background: #fafaf3 }
.hl-map-in { position: absolute; inset: 0; transition: transform .25s ease-out; transform-origin: 50% 50% }
.hl-map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.hl-pins { position: absolute; inset: 0 }
.hl-pin { position: absolute; transform: translate(-50%, -100%); padding: 8px 12px; border-radius: 16px; background: #fff; color: #171717; font-size: 14px; line-height: 18px; font-weight: 500; white-space: nowrap; text-decoration: none; filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .12)); transition: background .15s, color .15s }
.hl-pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 1px }
.hl-pin:hover, .hl-pin.on { background: var(--brand); color: #fff; z-index: 2 }
.hl-mfind { position: absolute; left: 15px; top: 15px; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 12px; background: #fff; color: #2b2b33; font-size: 16px; line-height: 24px; font-weight: 500; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .04)) }
.hl-mctl { position: absolute; right: 15px; top: 15px; display: flex; flex-direction: column; gap: 16px }
.hl-mzoom { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .93); box-shadow: 0 0 0 1px rgba(0, 0, 0, .02), 0 2px 6px rgba(0, 0, 0, .04), 0 4px 8px rgba(0, 0, 0, .1) }
.hl-mzoom i { height: 1px; background: rgba(43, 43, 51, .1) }
.hl-mbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 20px; background: rgba(255, 255, 255, .93) }
.hl-mctl > .hl-mbtn { box-shadow: 0 0 0 1px rgba(0, 0, 0, .02), 0 2px 6px rgba(0, 0, 0, .04), 0 4px 8px rgba(0, 0, 0, .1) }
.hl-mzoom .hl-mbtn { border-radius: 0; background: none }
.hl-mbtn:hover { background: #fff }
.hl-mclose, .hl-mfab { display: none }
/* карта на весь экран */
.hl-full .hl-map { position: fixed; inset: 64px 0 0 0; z-index: 40; border-radius: 0; height: auto; border: 0 }
.hl-full .hl-mclose { display: inline-flex; align-items: center; gap: 6px; position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); height: 44px; padding: 0 18px; border-radius: 999px; background: #171717; color: #fff; font-weight: 600; z-index: 3 }

@media (max-width: 1260px) { .hl-body { grid-template-columns: minmax(0, 1fr) 400px } }
@media (max-width: 1000px) {
  .hl-body { grid-template-columns: 1fr; padding: 16px }
  .hl-map { display: none }
  .hl-full .hl-map { display: block }
  .hl-mfab { display: inline-flex; align-items: center; gap: 8px; position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; height: 44px; padding: 0 18px; border-radius: 999px; background: #171717; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .25) }
  .hl-mfab img { filter: invert(1) }
  .hl-full .hl-mfab { display: none }
}
@media (max-width: 760px) {
  .hl-card { flex-direction: column; min-height: 0 }
  .hl-ph { flex: none; height: 200px }
  .hl-nav { opacity: 1 }
  .hl-c { padding: 4px 12px 12px }
  .hl-div { display: none }
}

/* ---------- ЖД ---------- */
.sr-train .sr-c-top .pf-row { gap: 8px }
.sr-tno { font-size: 16px; font-weight: 700 }
.sr-leg.rail .sr-t { min-width: 120px }
.sr-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px }
.sr-car { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-3); background: var(--surface); text-align: left }
.sr-car span { display: flex; flex-direction: column }
.sr-car span b { font-size: 14px; font-weight: 600 }
.sr-car small { font-size: 12px; color: var(--text-2) }
.sr-car > b { font-size: 16px; font-weight: 600; white-space: nowrap }
.sr-car:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-light) }
.sr-car:disabled { opacity: .45; cursor: default }

/* схема вагона */

/* адаптив */
@media (max-width: 1100px) {
  .sr-grid { grid-template-columns: 1fr }
  .sr-side { position: static; display: grid; grid-template-columns: 1fr 1fr }
  .sh-card { grid-template-columns: 240px minmax(0, 1fr) 210px }
}
@media (max-width: 760px) {
  .sr-edit { margin: 0 12px 16px }
  .sr-fbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px }
  .sr-fbar::-webkit-scrollbar { display: none }
  .sr-card { padding: 16px; border-radius: 20px; gap: 12px }
  .sr-price { font-size: 20px }
  .sr-leg { gap: 10px; flex-wrap: wrap }
  .sr-t { min-width: 64px }
  .sr-t b { font-size: 18px }
  .sr-line { min-width: 0 }
  .sr-line small { display: none }
  .sr-leg > .al { display: none }
  .sr-side { grid-template-columns: 1fr }
  .sh-hot { grid-template-columns: 1fr }
  .sh-card { grid-template-columns: 1fr; border-radius: 20px }
  .sh-ph { min-height: 180px }
  .sh-pr { border-left: 0; border-top: 1px solid var(--line-2); flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px }
  .sh-sum { text-align: left; margin-right: auto }
  .sh-rt { width: 100%; justify-content: flex-start; text-align: left }
  .sh-rt b { order: 0 }
  .sh-b { padding: 16px 16px 8px }
  .sh-map { height: 300px }
  .sr-cars { grid-template-columns: 1fr }
}
/* тёмная тема: тёмные иконки из макета (звёзды, фильтр) — светлыми */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl-stars img, :root:not([data-theme="light"]) .hl-chip img { filter: invert(1) } }
:root[data-theme="dark"] .hl-stars img, :root[data-theme="dark"] .hl-chip img { filter: invert(1) }

/* ---------- ЖД: карточка поезда по RailSearchResultCard (b2b-fbt) ---------- */
.rw-list { display: flex; flex-direction: column; gap: 16px }
.rw-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; overflow: hidden; box-shadow: 0 8px 24px rgba(17, 24, 39, .06) }
.rw-in { display: flex; flex-direction: column }
.rw-left { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column }
.rw-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 16px 0 }
.rw-tag { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 4px 12px; border-radius: 6px; background: var(--page); font-size: 12px; line-height: 16px; font-weight: 500 }
.rw-tag.in-policy { color: #5c85ff } .rw-tag.female { color: #ff42b6 } .rw-tag.cheapest { color: var(--brand-ink) } .rw-tag.out { color: var(--neg-ink); background: var(--neg-light) }
.rw-seg { padding: 24px; display: flex; flex-direction: column; gap: 16px }
.rw-head { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; line-height: 24px }
.rw-head b { font-weight: 600 } .rw-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.rw-times { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px }
.rw-ep { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.rw-time { font-size: 28px; line-height: 32px; font-weight: 500 }
.rw-st { font-size: 14px; line-height: 20px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.rw-date { font-size: 14px; line-height: 20px; white-space: nowrap } .rw-date.next { color: #ff4769 }
.rw-dur { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding-top: 6px }
.rw-dur span { font-size: 14px; line-height: 20px; white-space: nowrap }
.rw-dur i { width: 100%; height: 1px; background: var(--line-3) }
.rw-right { display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; padding: 24px; border-top: 1px dashed var(--line-2) }
.rw-rtop { display: flex; align-items: center; justify-content: space-between; min-height: 24px }
.rw-seats { margin: 0; font-size: 14px; line-height: 20px; color: #ff4769 }
.rw-share { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text) }
.rw-fares { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 24px; row-gap: 4px; font-size: 14px; line-height: 20px }
.rw-fares .l { overflow: hidden; text-overflow: ellipsis } .rw-fares .s { color: var(--text-2); white-space: nowrap } .rw-fares .p { white-space: nowrap; text-align: right }
.rw-bottom { display: flex; align-items: center; gap: 12px; margin-top: auto }
.rw-route { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--neutral); color: var(--text) }
.rw-route:hover { background: var(--neutral-hover) }
.rw-price { flex: 1; min-height: 48px; padding: 12px 16px; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 600; font-size: 16px; line-height: 22px }
.rw-price:hover { background: var(--brand-hover) }
.rw-price.dis { background: var(--neutral); color: var(--text-3); font-size: 14px; cursor: not-allowed }
@media (min-width: 768px) {
  .rw-times { grid-template-columns: auto minmax(180px, 1fr) auto; align-items: start; gap: 16px }
  .rw-ep.arr { align-items: flex-end; text-align: right }
}
@media (min-width: 1200px) {
  .rw-in { flex-direction: row }
  .rw-right { flex: 0 1 322px; max-width: 322px; border-top: 0; border-left: 1px dashed var(--line-2) }
}
/* ЖД: фильтры и секции как в RailSearchResultsFilters / RailSearchResultsView (b2b-fbt) */
.rw-pg { gap: 0 }
.rw-filters { display: flex; flex-wrap: nowrap; gap: 12px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 4px 0 }
.rw-filters::-webkit-scrollbar { display: none }
.rw-sel, .rw-chip { flex-shrink: 0; height: 40px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-size: 14px; line-height: 20px; color: var(--text); display: inline-flex; align-items: center; gap: 8px }
.rw-sel { justify-content: space-between; max-width: 220px }
.rw-sel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.rw-sel svg { flex: none; color: var(--text-2) }
.rw-sel.on, .rw-chip.on { border-color: var(--brand); background: var(--brand-light) }
.rw-sel:hover, .rw-chip:hover { border-color: var(--line-3) }
.rw-sec { display: flex; flex-direction: column; gap: 16px; margin-top: 24px }
.rw-sec h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600 }
.rw-empty { background: var(--surface); border-radius: 24px }
.rw-segb { display: flex; flex-direction: column; justify-content: center; gap: 16px; min-width: 0; flex: 1 }
.rw-seg { flex: 1; align-items: center; display: flex }
.rw-head { gap: 8px }
.rw-rate { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; line-height: 24px; font-weight: 500 }
.rw-train { font-size: 16px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.rw-time { font-size: 40px; line-height: 40px; font-weight: 500; letter-spacing: -.01em }
.rw-fares .s { text-align: right } .rw-fares { column-gap: 32px }
.rw-seg { flex-direction: row; align-items: center; flex: 1 }
.rw-segb { width: 100% }

/* ЖД туда-обратно: «Ваш поезд туда» и «Изменить поезд» — как в проде */
.rw-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px }
.rw-change { color: var(--brand); font-size: 14px; font-weight: 600 }
.rw-change:hover { color: var(--brand-ink) }
.rw-price.alt { background: var(--neutral); color: var(--text) }
.rw-price.alt:hover { background: var(--neutral-hover) }
.rw-sec { scroll-margin-top: 88px } /* под липкой шапкой */
/* ЖД на телефоне: время отправления, в пути и прибытия — одной строкой, отступы поменьше */
@media (max-width: 767px) {
  .rw-times { grid-template-columns: auto minmax(48px, 1fr) auto; align-items: start; gap: 10px }
  .rw-ep.arr { align-items: flex-end; text-align: right }
  .rw-time { font-size: 26px; line-height: 30px }
  .rw-dur span { font-size: 12px; line-height: 16px }
  .rw-seg { padding: 16px }
  .rw-right { padding: 16px; gap: 16px }
}
