/* Гостиницы (hotel-booking-api). Классы с префиксом hb- */
.hb {
    --hb-accent: var(--brand-primary);
    --hb-accent-dark: var(--brand-primary-hover);
    --hb-text: #202124;
    --hb-muted: #5f6368;
    --hb-line: #e3e6ea;
    --hb-bg: #f5f7fa;
    --hb-ok: #137333;
    --hb-ok-bg: #e6f4ea;
    --hb-warn: #b06000;
    --hb-radius: 12px;
    color: var(--hb-text);
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 0 48px;
}
.hb--wide { max-width: 1440px; }
.hb a { color: var(--hb-accent); }
.hb-title { font-size: 30px; line-height: 1.2; font-weight: 600; margin: 8px 0 4px; }
.hb-h2 { font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.hb-lead { color: var(--hb-muted); margin-bottom: 16px; }
.hb-meta { color: var(--hb-muted); margin: 12px 0; }
.hb-muted { color: var(--hb-muted); }
.hb-crumbs { font-size: 14px; color: var(--hb-muted); margin-bottom: 8px; }
.hb-crumbs span { margin: 0 4px; }
.hb-empty { padding: 20px 24px; background: var(--hb-bg); border-radius: var(--hb-radius); color: var(--hb-muted); margin: 16px 0; }
.hb-stars { color: #f9ab00; letter-spacing: 1px; font-size: 15px; white-space: nowrap; }
.hb-ok { color: var(--hb-ok); }
.hb-warn { color: var(--hb-warn); }
.hb-error { color: #d93025; }
.hb .material-icons { font-size: 18px; vertical-align: middle; }

/* Кнопки (кнопка «Найти» в форме поиска; остальные кнопки раздела — brand-button) */
.hb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s; }
.hb-btn--primary { background: var(--hb-accent); color: #fff !important; }
.hb-btn--primary:hover { background: var(--hb-accent-dark); }

/* Поиск */
.hb-search { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; padding: 8px; background: #fff; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); box-shadow: 0 2px 8px rgba(32, 33, 36, .06); margin: 16px 0; }
.hb-search__dates { display: flex; flex: 2 1 320px; gap: 8px; }
.hb-search .hb-where { position: relative; flex: 2 1 240px; cursor: text; }
.hb-where input[type=text] { border: 0; background: transparent; font-size: 16px; font-weight: 500; padding: 0; height: 26px; width: 100%; color: var(--hb-text); }
.hb-where input[type=text]:focus { outline: none; }
.hb-where__list { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; min-width: 100%; width: 360px; max-width: calc(100vw - 32px); max-height: 360px; overflow-y: auto; background: #fff; border-radius: var(--hb-radius); box-shadow: 0 8px 28px rgba(32, 33, 36, .2); padding: 6px; }
.hb-where__option { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.hb-where__option .material-icons { grid-row: span 2; align-self: center; color: var(--hb-muted); }
.hb-where__option.is-active, .hb-where__option:hover { background: var(--hb-bg); }
.hb-where__name { font-weight: 500; }
.hb-where__hint { font-size: 13px; color: var(--hb-muted); }
.hb-where__empty { padding: 10px; font-size: 14px; color: var(--hb-muted); }
.hb-search__field { display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; padding: 6px 12px; border-radius: 8px; background: var(--hb-bg); cursor: pointer; margin: 0; font-weight: normal; }
.hb-search__label { font-size: 12px; color: var(--hb-muted); line-height: 1.2; }
.hb-search__field input { border: 0; background: transparent; font-size: 16px; font-weight: 500; padding: 0; height: 26px; width: 100%; color: var(--hb-text); }
.hb-search__field input:focus { outline: none; }
/* Только в форме поиска: в форме «Найти бронь» (my-bookings) рамку при фокусе рисует само поле. */
.hb-search .hb-search__field:focus-within { box-shadow: inset 0 0 0 2px var(--hb-accent); }
.hb-search__submit { flex: 0 0 auto; min-width: 120px; height: auto; min-height: 52px; }
.hb-search__errors { width: 100%; color: #d93025; font-size: 14px; padding: 0 8px 4px; }

.hb-guests { position: relative; flex: 1 1 200px; }
.hb-guests__summary { list-style: none; height: 100%; }
.hb-guests__summary::-webkit-details-marker { display: none; }
.hb-guests__text { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-guests[open] .hb-guests__summary { box-shadow: inset 0 0 0 2px var(--hb-accent); }
.hb-guests__panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 300px; background: #fff; border-radius: var(--hb-radius); box-shadow: 0 8px 28px rgba(32, 33, 36, .2); padding: 16px; }
.hb-guests__row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.hb-guests__name { font-weight: 500; }
.hb-guests__hint { font-size: 13px; color: var(--hb-muted); }
.hb-guests__ages { display: grid; gap: 8px; margin: 4px 0 8px; }
.hb-guests__age { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: normal; font-size: 14px; margin: 0; }
.hb-guests__age select { height: 36px; border: 1px solid var(--hb-line); border-radius: 6px; padding: 0 8px; background: #fff; }
.hb-guests__done { width: 100%; height: 40px; margin-top: 8px; border: 0; border-radius: 8px; background: var(--hb-bg); color: var(--hb-accent); font-weight: 500; cursor: pointer; }
.hb-guests__panel { max-height: min(70vh, 640px); overflow-y: auto; }
.hb-room + .hb-room { border-top: 1px solid var(--hb-line); margin-top: 8px; padding-top: 8px; }
.hb-room__head { display: none; justify-content: space-between; align-items: center; }
.hb-guests--multi .hb-room__head { display: flex; }
.hb-room__title { font-weight: 600; font-size: 15px; }
.hb-room__remove { border: 0; background: none; color: var(--hb-accent); font-size: 14px; padding: 4px 0; cursor: pointer; }
.hb-room__remove:hover { text-decoration: underline; }
.hb-guests__add { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 10px 0 2px; border: 0; border-top: 1px solid var(--hb-line); background: none; color: var(--hb-accent); font-weight: 500; cursor: pointer; }
.hb-guests__add[hidden] { display: none; }
.hb-guests__add .material-icons { font-size: 20px; }

/* Несколько номеров: выбор варианта для каждого номера и итог внизу. */
.hb-roomstep { scroll-margin-top: 16px; }
.hb-roomstep + .hb-roomstep { margin-top: 28px; }
.hb-roomstep__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 12px; }
.hb-roomstep__title { font-size: 20px; font-weight: 600; margin: 0; }
.hb-roomstep__guests { color: var(--hb-muted); }
.hb-roomstep__chosen { margin-left: auto; color: var(--hb-ok, #1e8e3e); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.hb-roomstep__chosen[hidden] { display: none; }
.hb-pick { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; cursor: pointer; }
.hb-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hb-pick .material-icons { font-size: 18px; display: none; }
.hb-pick input:focus-visible + .material-icons + span { outline: 2px solid var(--hb-accent); outline-offset: 2px; }
.hb-pick.is-selected { background: var(--hb-accent); border-color: var(--hb-accent); color: #fff !important; }
.hb-pick.is-selected .material-icons { display: inline-block; }
.hb-rate.is-selected { background: #f3f7ff; }
.hb-pickbar { position: sticky; bottom: 0; z-index: 20; margin-top: 24px; display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); box-shadow: 0 -4px 20px rgba(32, 33, 36, .12); }
.hb-pickbar__list { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.hb-pickbar__list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-pickbar__list .hb-muted { font-style: italic; }
.hb-pickbar__total { text-align: right; white-space: nowrap; }
.hb-pickbar__sum { font-size: 22px; font-weight: 700; }
.hb-pickbar .brand-button { flex: 0 0 auto; }
@media (max-width: 680px) {
    .hb-pickbar { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }
    .hb-pickbar__list { flex-basis: 100%; font-size: 13px; }
    .hb-pickbar__list li { white-space: normal; }
    .hb-pickbar .brand-button { flex: 1 1 100%; }
    .hb-pickbar__total { text-align: left; flex: 1 1 auto; }
    .hb-roomstep__chosen { margin-left: 0; flex-basis: 100%; }
}

/* Оформление нескольких номеров */
.hb-form__room { border: 1px solid var(--hb-line); border-radius: var(--hb-radius); padding: 12px 16px 4px; margin-bottom: 12px; }
.hb-form__room-title { font-weight: 600; margin-bottom: 2px; }
.hb-form__room-meta { color: var(--hb-muted); font-size: 14px; margin-bottom: 8px; }
.hb-summary__rooms { margin: 0; padding: 0; list-style: none; }
.hb-summary__rooms li + li { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hb-line); }
.hb-summary__room-price { font-weight: 600; white-space: nowrap; }
.hb-summary__room-head { display: flex; justify-content: space-between; gap: 8px; }
.hb-stepper { display: flex; align-items: center; gap: 6px; }
.hb-stepper__btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #c6d4f0; background: #fff; color: var(--hb-accent); font-size: 20px; line-height: 1; cursor: pointer; }
.hb-stepper__btn:disabled { opacity: .35; cursor: default; }
.hb-stepper__value { width: 36px; text-align: center; border: 0; font-size: 16px; font-weight: 500; -moz-appearance: textfield; background: transparent; }
.hb-stepper__value::-webkit-outer-spin-button, .hb-stepper__value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hb-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: #eef4fe; border-radius: var(--hb-radius); margin: 0 0 16px; font-size: 14px; }
.hb-notice .material-icons { color: var(--hb-accent); }

/* Город: список и карта */
.hb-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.hb-results--map { grid-template-columns: minmax(0, 1fr) minmax(320px, 38%); }
.hb-results__map { position: sticky; top: 16px; height: calc(100vh - 32px); min-height: 420px; }
.hb-map-panel { position: relative; height: 100%; border-radius: var(--hb-radius); overflow: hidden; background: #e8eef5; }
.hb-map { width: 100%; height: 100%; }
.hb-map--inline { height: 320px; border-radius: var(--hb-radius); overflow: hidden; background: #e8eef5; }
.hb-map-panel__close { display: none; }
.hb-map-toggle { display: none; }
.hb-results--nomap { grid-template-columns: minmax(0, 1fr); }
.hb-results--nomap .hb-results__map, .hb-results--nomap .hb-map-toggle { display: none !important; }

.hb-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hb-toolbar__summary strong { display: block; font-size: 17px; }
.hb-toolbar__summary span { color: var(--hb-muted); font-size: 14px; }
.hb-toolbar__actions { display: flex; gap: 8px; align-items: center; }
.hb-sort { min-width: 0; }


/* Карточка гостиницы в списке */
.hb-hcard { display: grid; grid-template-columns: 300px minmax(0, 1fr); background: #fff; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); overflow: hidden; margin-bottom: 16px; transition: box-shadow .15s, border-color .15s; }
.hb-hcard:hover, .hb-hcard.is-active { box-shadow: 0 6px 20px rgba(32, 33, 36, .12); border-color: #c6d4f0; }
.hb-hcard__media { position: relative; min-height: 240px; background: #e8eef5; }
.hb-hcard__nophoto { display: flex; align-items: center; justify-content: center; height: 100%; color: #9aa4b2; }
.hb-hcard__nophoto .material-icons { font-size: 48px; }
.hb-hcard__content { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-width: 0; }
.hb-hcard__name { display: inline; font-size: 19px; font-weight: 600; line-height: 1.3; margin: 0 6px 0 0; }
.hb-hcard__name a { color: var(--hb-text) !important; }
.hb-hcard__name a:hover { color: var(--hb-accent) !important; }
.hb-hcard__address { color: var(--hb-muted); font-size: 14px; margin-top: 4px; }
.hb-hcard__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; color: var(--hb-muted); }
.hb-hcard__distance { display: inline-flex; align-items: center; gap: 2px; }
.hb-hcard__amenities { display: inline-flex; gap: 8px; color: #3c4043; }
.hb-hcard__deal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-top: auto; padding: 12px 14px; background: var(--hb-bg); border-radius: 10px; }
.hb-hcard__room { font-weight: 600; }
.hb-hcard__bed { font-size: 13px; color: var(--hb-muted); margin-bottom: 6px; }
.hb-hcard__price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.hb-hcard__amount { font-size: 24px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.hb-hcard__from { font-size: 15px; font-weight: 400; color: var(--hb-muted); }
.hb-hcard__per, .hb-hcard__tax { font-size: 13px; color: var(--hb-muted); }
.hb-hcard__tax { max-width: 220px; }
.hb-hcard__cta { margin-top: 10px; min-width: 170px; }
.hb-hcard__soldout { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--hb-muted); }
.hb-hcard__soldout strong { color: var(--hb-text); }
.hb-hcard--soldout .hb-hcard__media { filter: grayscale(.6); opacity: .85; }
.hb-hcard--soldout .hb-hcard__deal { align-items: center; }

.hb-facts { list-style: none; padding: 0; margin: 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.hb-facts li { display: flex; align-items: center; gap: 6px; }
.hb-facts .material-icons { opacity: .85; }

/* Листалка фото */
.hb-carousel { position: absolute; inset: 0; overflow: hidden; }
.hb-carousel__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hb-carousel__track::-webkit-scrollbar { display: none; }
.hb-carousel__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.hb-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s; color: var(--hb-text); }
.hb-carousel__nav--prev { left: 8px; }
.hb-carousel__nav--next { right: 8px; }
.hb-carousel:hover .hb-carousel__nav, .hb-carousel__nav:focus { opacity: 1; }
.hb-carousel__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.hb-carousel__dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.hb-carousel__dots span.is-active { background: #fff; }

/* Метка на карте и балун */
.hb-balloon { width: 220px; font-family: inherit; }
.hb-balloon img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 6px; }
.hb-balloon__name { font-weight: 600; color: var(--hb-text); }
.hb-balloon__price { margin: 2px 0 6px; }

/* Страница гостиницы */
.hb-hotel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.hb-hotel-head .hb-stars { font-size: 18px; vertical-align: middle; margin-left: 4px; }
.hb-hotel-head__address { color: var(--hb-muted); margin-top: 4px; }
.hb-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 6px; border-radius: var(--hb-radius); overflow: hidden; margin-bottom: 24px; }
.hb-gallery--few { grid-template-columns: 2fr 1fr; }
.hb-gallery__item { position: relative; display: block; padding: 0; border: 0; background: #e8eef5; cursor: zoom-in; overflow: hidden; }
.hb-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hb-gallery__item:hover img { transform: scale(1.03); }
.hb-gallery__item--main { grid-row: span 2; }
.hb-gallery__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(32, 33, 36, .45); color: #fff; font-size: 18px; font-weight: 600; }

.hb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.hb-layout--checkout { grid-template-columns: minmax(0, 1fr) 380px; }
.hb-layout__side { position: sticky; top: 16px; }
.hb-section { margin-bottom: 36px; }
.hb-description { line-height: 1.6; }
.hb-side { padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); box-shadow: 0 2px 8px rgba(32, 33, 36, .06); }
.hb-side__price strong { font-size: 24px; }
.hb-side__row { display: flex; justify-content: space-between; font-size: 14px; }
.hb-side__note { display: flex; gap: 8px; font-size: 14px; color: var(--hb-ok); background: var(--hb-ok-bg); border-radius: 8px; padding: 10px 12px; }
.hb-side__link { text-align: center; font-size: 14px; }

/* Номера и тарифы */
.hb-rooms { display: flex; flex-direction: column; gap: 16px; }
.hb-roomcard { display: grid; grid-template-columns: 240px minmax(0, 1fr); border: 1px solid var(--hb-line); border-radius: var(--hb-radius); background: #fff; overflow: hidden; }
.hb-roomcard__info { padding: 16px; border-right: 1px solid var(--hb-line); }
.hb-roomcard__photo { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.hb-roomcard__name { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.hb-roomcard__facts { list-style: none; padding: 0; margin: 0; font-size: 14px; color: #3c4043; display: flex; flex-direction: column; gap: 4px; }
.hb-roomcard__facts li { display: flex; align-items: center; gap: 6px; }
.hb-roomcard__more { margin-top: 8px; font-size: 14px; }
.hb-roomcard__more summary { color: var(--hb-accent); cursor: pointer; }
.hb-roomcard__rates { display: flex; flex-direction: column; }
.hb-rate { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; padding: 16px; }
.hb-rate + .hb-rate { border-top: 1px solid var(--hb-line); }
.hb-rate__name { font-weight: 600; margin-bottom: 6px; }
.hb-rate__policy { font-size: 13px; color: var(--hb-muted); margin-top: 6px; }
.hb-rate__buy { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.hb-rate__price { font-size: 22px; font-weight: 700; line-height: 1.1; }
.hb-rate__per, .hb-rate__tax { font-size: 13px; color: var(--hb-muted); }
.hb-rate__left { color: #d93025; font-size: 13px; margin-top: 4px; }
.hb-rate__buy form { width: 100%; margin-top: 10px; }

.hb-amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; }
.hb-amenities li { display: flex; gap: 8px; align-items: center; }
.hb-rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hb-rules li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: var(--hb-bg); border-radius: 10px; font-size: 14px; }
.hb-rules strong { display: block; }

/* Просмотр фото */
.hb-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.hb-lightbox[hidden] { display: none; }
.hb-lightbox__img { max-width: calc(100vw - 140px); max-height: calc(100vh - 100px); object-fit: contain; }
.hb-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hb-lightbox button .material-icons { font-size: 28px; }
.hb-lightbox__close { top: 16px; right: 16px; }
.hb-lightbox__nav--prev { left: 16px; }
.hb-lightbox__nav--next { right: 16px; }
.hb-lightbox__counter { position: absolute; bottom: 20px; color: #fff; font-size: 14px; }
body.hb-noscroll { overflow: hidden; }

/* Предложение (окно «условия изменились») */
.hb-offer { display: flex; gap: 16px; padding: 16px; margin-bottom: 12px; justify-content: space-between; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); background: #fff; }
.hb-offer__room { font-size: 17px; font-weight: 600; }
.hb-offer__rate { color: var(--hb-muted); margin-bottom: 8px; }
.hb-offer__facts { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.hb-offer__facts li { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
.hb-offer__left { color: #d93025; font-size: 13px; margin-top: 6px; }
.hb-offer__side { text-align: right; min-width: 190px; display: flex; flex-direction: column; align-items: flex-end; }
.hb-offer__price { font-size: 24px; font-weight: 700; }
.hb-offer__per { color: var(--hb-muted); font-size: 13px; }
.hb-offer__taxes { color: var(--hb-muted); font-size: 12px; max-width: 200px; margin: 4px 0; }
.hb-offer__book { margin-top: 10px; }

/* Оформление */
.hb-form { padding: 20px; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); background: #fff; box-shadow: none !important; }
.hb-form h2 { margin: 8px 0 12px; font-size: 20px; font-weight: 600; }
.hb-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hb-email-suggest { margin-top: 6px; font-size: 13px; color: #d93025; }
.hb-email-suggest[hidden] { display: none; }
.hb-email-suggest__fix { padding: 0; border: 0; background: none; color: var(--hb-accent); font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }
.hb-form__small { font-size: 13px; margin-top: 8px; }
.hb-summary { border: 1px solid var(--hb-line); border-radius: var(--hb-radius); overflow: hidden; box-shadow: none !important; }
.hb-summary__photo { padding-top: 45%; background: #e8eef5 center / cover no-repeat; }
.hb-summary__body { padding: 16px; }
.hb-summary__hotel { font-size: 17px; font-weight: 600; }
.hb-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 12px 0; font-size: 14px; }
.hb-dl dt { color: var(--hb-muted); font-weight: normal; }
.hb-dl dd { margin: 0; }
.hb-summary__total, .hb-summary__taxes { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--hb-line); padding-top: 10px; }
.hb-summary__total strong { font-size: 22px; }
.hb-summary__taxes { border-top: none; padding-top: 4px; font-size: 13px; color: var(--hb-muted); }
.hb-summary__pay { margin-top: 10px; font-size: 14px; color: var(--hb-ok); background: var(--hb-ok-bg); border-radius: 8px; padding: 10px 12px; }

/* Бронь */
.hb-booking { max-width: 760px; }
.hb-booking__card { padding: 24px; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); box-shadow: none !important; }
.hb-booking__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hb-status { display: inline-block; font-size: 13px; font-weight: 500; border-radius: 12px; padding: 3px 12px; background: #f1f3f4; color: #3c4043; margin-bottom: 8px; }
.hb-status--ok { background: var(--hb-ok-bg); color: var(--hb-ok); }
.hb-status--wait { background: #fef7e0; color: var(--hb-warn); }
.hb-status--off { background: #fce8e6; color: #c5221f; }
.hb-status--inline { margin: 4px 0 0; }
.hb-list { display: flex; flex-direction: column; gap: 10px; }
.hb-list__item { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; color: inherit !important; text-decoration: none !important; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); box-shadow: none !important; }
.hb-list__hotel { font-weight: 600; }
.hb-list__right { text-align: right; }

/* Планшет: карта по кнопке */
@media (max-width: 1100px) {
    .hb-results--map { grid-template-columns: minmax(0, 1fr); }
    .hb-map-toggle { display: inline-flex; height: 40px; padding: 0 14px; }
    .hb-results__map { display: none; position: fixed; inset: 0; top: 0; z-index: 1500; height: 100%; min-height: 0; padding: 0; background: #fff; }
    .hb-results__map.is-open { display: block; }
    .hb-results__map .hb-map-panel { border-radius: 0; }
    .hb-map-panel__close { display: flex; position: absolute; z-index: 10; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); align-items: center; justify-content: center; cursor: pointer; }
}
@media (max-width: 900px) {
    .hb-layout, .hb-layout--checkout { grid-template-columns: 1fr; }
    .hb-layout__side { position: static; }
    .hb-layout .hb-layout__side { display: none; }
    .hb-layout--checkout .hb-layout__side { display: block; order: -1; }
    .hb-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 110px; }
    .hb-gallery__item--main { grid-column: span 2; grid-row: auto; }
    .hb-gallery__item:nth-child(n+4) { display: none; }
    .hb-roomcard { grid-template-columns: 1fr; }
    .hb-roomcard__info { border-right: 0; border-bottom: 1px solid var(--hb-line); }
    .hb-roomcard__photo { height: 180px; }
}
/* Телефон */
@media (max-width: 680px) {
    .hb-booking__actions { flex-direction: column; align-items: stretch; }
    .hb-booking__actions .brand-button,
    .hb-form__submit { width: 100%; }
    .hb { padding-top: 8px; }
    .hb-title { font-size: 24px; }
    .hb-search__dates { flex-basis: 100%; }
    .hb-search .hb-where { flex-basis: 100%; }
    .hb-guests { flex-basis: 100%; }
    .hb-guests__panel { width: 100%; }
    .hb-search__submit { flex-basis: 100%; }
    .hb-hcard { grid-template-columns: 1fr; }
    .hb-hcard__media { min-height: 0; height: 210px; }
    .hb-hcard__deal { grid-template-columns: 1fr; }
    .hb-hcard__price { text-align: left; align-items: stretch; }
    .hb-hcard__cta { width: 100%; }
    .hb-carousel__nav { opacity: 1; width: 30px; height: 30px; }
    .hb-hotel-head { flex-direction: column; align-items: flex-start; }
        .hb-rate { grid-template-columns: 1fr; }
    .hb-rules { grid-template-columns: 1fr; }
    .hb-rate__buy { text-align: left; align-items: stretch; }
    .hb-offer { flex-direction: column; }
    .hb-offer__side { text-align: left; align-items: flex-start; }
    .hb-form__row { grid-template-columns: 1fr; }
    .hb-lightbox__img { max-width: 100vw; }
    .hb-lightbox__nav { top: auto; bottom: 12px; }
}

/* Мои брони */
.hb-mybookings { max-width: 1040px; }
.hb-mybookings__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.hb-mybookings__empty { text-align: center; padding: 48px 24px; background: var(--hb-bg); border-radius: var(--hb-radius); margin: 16px 0 32px; }
.hb-mybookings__empty > .material-icons { font-size: 56px; color: var(--hb-accent); }
.hb-mybookings__empty h2 { font-size: 22px; font-weight: 600; margin: 8px 0; }
.hb-mybookings__empty p { color: var(--hb-muted); margin-bottom: 16px; }
.hb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hb-line); margin: 8px 0 16px; overflow-x: auto; }
.hb-tabs__tab { border: 0; background: none; padding: 12px 14px; font-size: 15px; font-weight: 500; color: var(--hb-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.hb-tabs__tab.is-active { color: var(--hb-accent); border-bottom-color: var(--hb-accent); }
.hb-tabs__count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--hb-bg); font-size: 13px; text-align: center; margin-left: 4px; }
.hb-tabs__tab.is-active .hb-tabs__count { background: #e3ecfd; }
.js-hb-tabs-ready .hb-tabs__panel[hidden] { display: none; }

.hb-bcard { display: grid; grid-template-columns: 200px minmax(0, 1fr) 240px; background: #fff; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); overflow: hidden; margin-bottom: 16px; }
.hb-bcard__photo { display: flex; align-items: center; justify-content: center; background: #e8eef5 center / cover no-repeat; min-height: 200px; color: #9aa4b2 !important; text-decoration: none !important; }
.hb-bcard__photo .material-icons { font-size: 48px; }
.hb-bcard--past .hb-bcard__photo { filter: grayscale(.7); opacity: .8; }
.hb-bcard__main { padding: 16px 18px; min-width: 0; }
.hb-bcard__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hb-bcard__top .hb-status { margin: 0; }
.hb-bcard__when { font-size: 13px; font-weight: 500; color: var(--hb-accent); }
.hb-bcard__hotel { font-size: 19px; font-weight: 600; margin: 8px 0 2px; }
.hb-bcard__hotel a { color: var(--hb-text) !important; }
.hb-bcard__address { color: var(--hb-muted); font-size: 14px; }
.hb-bcard__dates { display: flex; align-items: center; gap: 14px; margin: 14px 0 12px; padding: 10px 14px; background: var(--hb-bg); border-radius: 10px; width: fit-content; max-width: 100%; }
.hb-bcard__dates > div { display: flex; flex-direction: column; font-size: 14px; }
.hb-bcard__label { font-size: 12px; color: var(--hb-muted); }
.hb-bcard__arrow { color: var(--hb-muted); }
.hb-bcard__code { letter-spacing: .5px; }
.hb-bcard__copy .material-icons { font-size: 16px; }
.hb-bcard__side { padding: 16px 18px; border-left: 1px solid var(--hb-line); display: flex; flex-direction: column; align-items: stretch; }
.hb-bcard__price { font-size: 24px; font-weight: 700; }
.hb-bcard__pay { font-size: 13px; }
.hb-bcard__free { display: flex; gap: 6px; font-size: 13px; margin-top: 8px; }
.hb-bcard__actions { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.hb-find { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: center; padding: 20px 24px; margin-top: 32px; border: 1px dashed #c6d4f0; border-radius: var(--hb-radius); background: #fbfcff; }
.hb-find__text p { margin: 0; font-size: 14px; }
.hb-find__form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.hb-copied { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #202124; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 3000; }

@media (max-width: 900px) {
    .hb-bcard { grid-template-columns: 160px minmax(0, 1fr); }
    .hb-bcard__side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--hb-line); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
    .hb-bcard__actions { margin: 0 0 0 auto; padding: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .hb-bcard__actions .brand-button--block { width: auto; }
    .hb-find { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .hb-bcard { grid-template-columns: 1fr; }
    .hb-bcard__photo { min-height: 150px; }
    .hb-bcard__dates { width: 100%; justify-content: space-between; }
    .hb-bcard__side { display: grid; grid-template-columns: 1fr; }
    .hb-bcard__actions { margin: 8px 0 0; flex-direction: column; align-items: stretch; }
    .hb-bcard__actions .brand-button--block { width: 100%; }
    .hb-find__form { grid-template-columns: 1fr; }
    .hb-mybookings__head .brand-button { display: none; }
    .hb-tabs__tab { padding: 10px 8px; font-size: 14px; }
}

/* Часовой пояс гостиницы */
.hb-meta--checkin { display: flex; align-items: center; gap: 6px; color: var(--hb-text); }
.hb-side__tz { font-size: 13px; color: var(--hb-muted); }
.hb-bcard__tz { font-size: 13px; color: var(--hb-muted); margin: -6px 0 8px; }
/* В узкой колонке страницы гостиницы направление — отдельной строкой */
.hb-layout__main .hb-search .hb-where { flex-basis: 100%; }

/* Даты в поиске: поле целиком открывает календарь на диапазон (поповер на 2 месяца, на телефоне — экран) */
.hb-search__dates { position: relative; }
.hb-date__btn { display: block; width: 100%; height: 26px; padding: 0; border: 0; background: none; text-align: left; font-size: 16px; font-weight: 500; line-height: 26px; color: var(--hb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.hb-date__btn[hidden] { display: none; }
.hb-date__btn:focus { outline: none; }
.hb-date__btn.is-empty { color: var(--hb-muted); font-weight: 400; }
.hb-search__field.hb-date.is-active { background: #fff; box-shadow: inset 0 0 0 2px var(--hb-accent); }

.hb-cal { --hb-cal-band: #e8f0fe; --hb-cal-day: 40px; position: absolute; z-index: 50; top: calc(100% + 8px); left: 0; padding: 20px 24px 16px; background: #fff; border-radius: 16px; box-shadow: 0 8px 28px rgba(32, 33, 36, .2); color: var(--hb-text); }
.hb-cal[hidden] { display: none; }
.hb-cal__head, .hb-cal__weekdays { display: none; }
.hb-cal__body { position: relative; }
.hb-cal__months { display: flex; gap: 32px; }
.hb-cal__month { width: calc(var(--hb-cal-day) * 7); }
.hb-cal__title { margin-bottom: 8px; font-size: 16px; font-weight: 600; line-height: 36px; text-align: center; }
.hb-cal__nav { position: absolute; top: 0; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hb-text); cursor: pointer; }
.hb-cal__nav:hover:not(:disabled) { background: var(--hb-bg); }
.hb-cal__nav:disabled { opacity: .3; cursor: default; }
.hb-cal__nav--prev { left: -8px; }
.hb-cal__nav--next { right: -8px; }
.hb-cal__grid { display: grid; grid-template-columns: repeat(7, var(--hb-cal-day)); row-gap: 2px; }
.hb-cal__wd { height: 28px; font-size: 12px; line-height: 28px; text-align: center; color: var(--hb-muted); }
.hb-cal__cell { position: relative; display: flex; justify-content: center; height: var(--hb-cal-day); }
/* Полоса диапазона: от середины кружка заезда до середины кружка выезда */
.hb-cal__cell.is-range { background: var(--hb-cal-band); }
.hb-cal__cell.is-start.has-range { background: linear-gradient(to right, transparent 50%, var(--hb-cal-band) 50%); }
.hb-cal__cell.is-end { background: linear-gradient(to left, transparent 50%, var(--hb-cal-band) 50%); }
.hb-cal__day { position: relative; width: var(--hb-cal-day); height: var(--hb-cal-day); padding: 0; border: 0; border-radius: 50%; background: none; font-size: 14px; font-weight: 500; color: var(--hb-text); cursor: pointer; }
.hb-cal__day:hover { box-shadow: inset 0 0 0 1.5px var(--hb-text); }
.hb-cal__day:focus { outline: none; }
.hb-cal__day:focus-visible { box-shadow: inset 0 0 0 2px var(--hb-accent); }
.hb-cal__cell.is-today .hb-cal__day::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--hb-accent); }
.hb-cal__cell.is-start .hb-cal__day, .hb-cal__cell.is-end .hb-cal__day { background: var(--hb-accent); color: #fff; box-shadow: none; }
.hb-cal__cell.is-end.is-preview .hb-cal__day { background: #fff; color: var(--hb-accent); box-shadow: inset 0 0 0 2px var(--hb-accent); }
.hb-cal__cell.is-start .hb-cal__day::after, .hb-cal__cell.is-end .hb-cal__day::after { background: #fff; }
.hb-cal__cell.is-disabled .hb-cal__day { color: #bdc1c6; cursor: default; box-shadow: none; }
.hb-cal__day[data-tip]::before { content: attr(data-tip); position: absolute; z-index: 2; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--hb-text); color: #fff; font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap; pointer-events: none; }
.hb-cal__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hb-line); }
.hb-cal__summary { font-size: 14px; color: var(--hb-muted); }
.hb-cal__summary strong { color: var(--hb-text); font-weight: 600; }
.hb-cal__done { flex: 0 0 auto; height: 40px; padding: 0 20px; border: 0; border-radius: 8px; background: var(--hb-accent); color: #fff; font-weight: 500; cursor: pointer; }
.hb-cal__done:hover:not(:disabled) { background: var(--hb-accent-dark); }
.hb-cal__done:disabled { opacity: .5; cursor: default; }

@media (max-width: 680px) {
    html.hb-cal-lock, html.hb-cal-lock body { overflow: hidden; }
    .hb-cal { --hb-cal-day: 44px; position: fixed; inset: 0; z-index: 1600; display: flex; flex-direction: column; padding: 0; border-radius: 0; box-shadow: none; }
    .hb-cal[hidden] { display: none; }
    .hb-cal__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 16px; }
    .hb-cal__heading { font-size: 18px; font-weight: 600; }
    .hb-cal__close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hb-text); cursor: pointer; }
    .hb-cal__weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 12px; border-bottom: 1px solid var(--hb-line); font-size: 12px; text-align: center; color: var(--hb-muted); }
    .hb-cal__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 12px 16px; }
    .hb-cal__nav, .hb-cal__wd { display: none; }
    .hb-cal__months { flex-direction: column; gap: 16px; }
    .hb-cal__month { width: auto; }
    .hb-cal__title { padding-left: 8px; text-align: left; }
    .hb-cal__grid { grid-template-columns: repeat(7, 1fr); }
    .hb-cal__day { font-size: 16px; }
    .hb-cal__day:hover { box-shadow: none; }
    .hb-cal__day[data-tip]::before { display: none; }
    .hb-cal__foot { margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 0; box-shadow: 0 -4px 16px rgba(32, 33, 36, .08); }
    .hb-cal__done { height: 48px; padding: 0 28px; }
}

/* Форма поиска: свой вид, а не общий brand-controls.
   brand-controls.css подключается после этого файла и оформляет все поля внутри .brand-controls
   (рамка, высота 44px, стрелка у «Гости», колонкой возраст детей), а глобально гасит box-shadow
   у кнопок в фокусе и рисует им outline !important. Поэтому селекторы здесь на класс сильнее. */
.hb .hb-search .hb-where input[type=text] { min-height: 0; border-radius: 0; box-shadow: none; }
.hb .hb-search .hb-guests__summary .hb-guests__text { min-height: 0; padding: 0 !important; border: 0; border-radius: 0; background: none; }
.hb .hb-search .hb-guests__summary:focus-visible { outline: none !important; }
.hb .hb-search .hb-guests .hb-guests__age { flex-direction: row; align-items: center; gap: 8px; }
.hb .hb-search .hb-guests__age select { appearance: auto; min-height: 0; width: auto; height: 36px; padding: 0 8px !important; border: 1px solid var(--hb-line); border-radius: 6px; background: #fff; font-size: 14px; }
.hb .hb-search .hb-date__btn:focus-visible { outline: none !important; }
.hb-cal .hb-cal__day:focus-visible { outline: none !important; box-shadow: inset 0 0 0 2px var(--hb-accent) !important; }
@media (max-width: 680px) {
    .hb .hb-search .hb-search__dates { flex-wrap: nowrap; min-width: 0; }
    .hb .hb-search .hb-search__dates > .hb-date { flex: 1; }
}
