/* Sweet Йорт — новая главная. Мобильная вёрстка по умолчанию, шире — через min-width. */
@font-face { font-family: "Lato SY"; src: url(../fonts/lato-400.woff2?v=f51ded10) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato SY"; src: url(../fonts/lato-700.woff2?v=d8bdb62a) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato SY"; src: url(../fonts/lato-900.woff2?v=4b0030e4) format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --red: #E6332A; --yellow: #FFE054; --green: #32A76E; --blue: #3092D0; --brown: #6B2315; --orange: #F8B45B;
  --red-ink: #C9261D; --green-ink: #1F7A4A; --blue-ink: #1F6FA3;
  --ink: #2E1A14; --muted: #7A625A; --cream: #FFF7E3; --sand: #F6F1EA;
  --tint-blue: #E7F4FB; --tint-yellow: #FFF4C2; --tint-green: #E4F4EB; --tint-red: #FDE3E1;
  --radius: 26px; --gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: #fff; color: var(--ink); font-family: "Lato SY", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.5; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* тестовая версия */
.staging-note { padding: 8px 16px; background: var(--brown); color: #fff; font-size: 14px; text-align: center; }
mark.tbd { background: none; color: inherit; border-bottom: 2px dotted var(--red); cursor: help; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 999px; background: var(--red-ink); color: #fff; font-family: inherit; font-size: 16px; font-weight: 900; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform 120ms var(--ease-out), background-color 120ms; }
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--brown); box-shadow: inset 0 0 0 2px rgba(107, 35, 21, .3); }
.btn--wide { width: 100%; }

/* строка контактов «Позвонить / Telegram / WhatsApp» (макрос contact_row): кнопки не ниже 44 px */
.crow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.crow__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--brown); font-size: 16px; font-weight: 900; line-height: 1.2; text-decoration: none; box-shadow: inset 0 0 0 2px rgba(107, 35, 21, .3); touch-action: manipulation; }
.crow__btn--call { background: var(--red-ink); color: #fff; box-shadow: none; }
.crow__ic { flex: none; width: 20px; height: 20px; }
.contacts .crow { margin-top: 4px; }
@media (max-width: 479px) {
  .crow { display: grid; grid-template-columns: 1fr 1fr; }
  .crow__btn--call { grid-column: 1 / -1; }
}
/* тихий вид (contact_row(quiet=True), только /booking): три равные контурные кнопки в один ряд, до 48 px высотой */
.crow--quiet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 480px; }
.crow--quiet .crow__btn { min-width: 0; max-height: 48px; gap: 6px; padding: 8px 6px; font-size: 14px; }
.crow--quiet .crow__btn--call { background: #fff; color: var(--brown); box-shadow: inset 0 0 0 2px rgba(107, 35, 21, .3); }
.crow--quiet .crow__ic { width: 18px; height: 18px; }
@media (max-width: 479px) {
  .crow--quiet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crow--quiet .crow__btn--call { grid-column: auto; }
}

/* типографика и разделы */
.h1 { color: var(--brown); font-size: clamp(40px, 9vw, 72px); font-weight: 900; line-height: .98; letter-spacing: -.02em; }
.h2 { color: var(--brown); font-size: clamp(28px, 5vw, 42px); font-weight: 900; line-height: 1.08; letter-spacing: -.01em; }
.lead { max-width: 640px; margin-top: 10px; color: var(--muted); font-size: 18px; }
.sec { padding-block: 48px; }
.sec--cream { background: var(--cream); }
.sec--tight { padding-top: 0; }
.sechead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--sand); font-size: 14px; font-weight: 700; }
/* ночная заметка «Приехали ночью?»: скрыта, main.js открывает её с 00:00 до 05:59 по Москве */
.night { margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--tint-blue); color: var(--ink); font-size: 15px; }
.night[hidden] { display: none; }
.night__text { max-width: 560px; line-height: 1.4; }
.night .crow { margin-top: 8px; }

/* полоса над формой на /booking: три условия и «Вопросы?» с кнопками связи */
.bstrip { display: grid; gap: 8px; margin-bottom: 14px; }
.bstrip__chips { gap: 6px; }
.bstrip .chip { padding: 5px 10px; font-size: 13px; }
.chip--ok { background: var(--tint-green); color: var(--green-ink); }
.chip--ok::before { content: "✓"; margin-right: 6px; font-weight: 900; }
.bstrip__ask { color: var(--muted); font-size: 15px; font-weight: 700; }
.bstrip .crow { margin-top: 0; }
.sec--slim { padding-block: 20px; }
.sec--slim .lead { margin-top: 0; font-size: 16px; }
.sec--slim .lead a { color: var(--brown); font-weight: 700; }
.night + .bstrip { margin-top: 12px; }

.band { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: url(../img/band-92.webp?v=17951bd4) center / auto 100% repeat-x; }
.shape { flex: none; display: grid; place-items: center; width: 56px; height: 56px; color: #fff; font-size: 15px; font-weight: 900; }
span.shape { border-radius: 50%; }
.shape__ic { width: 34px; height: 34px; }  /* свой векторный значок внутри кружка (ОВЗ) — не эмодзи */
.shape--green { background: var(--green-ink); }
span.shape--blue { background: var(--blue-ink); }
svg.shape--yellow { color: var(--yellow); }
svg.shape--orange { color: var(--orange); }
svg.shape--red { color: var(--red); }
@media (min-width: 960px) {
  .sec { padding-block: 72px; }
  .sec--tight { padding-top: 0; }
}

/* шапка */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); background: var(--cream); }
.top__in { position: relative; display: flex; align-items: center; gap: 16px; min-height: 64px; }
.top__logo { flex: none; }
.top__logo img { width: auto; height: 36px; }
.top__nav, .top__tel, .top__book, .top__msgs { display: none; }
.top__quick { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top__ic { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 50%; color: var(--red-ink); touch-action: manipulation; }
.top__msg { display: grid; place-items: center; touch-action: manipulation; }
.top__ic svg, .top__msg svg { width: 24px; height: 24px; }
.top__burger { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.top__burger span, .top__burger span::before, .top__burger span::after { content: ""; display: block; width: 24px; height: 3px; border-radius: 2px; background: var(--brown); }
.top__burger span { position: relative; }
.top__burger span::before { position: absolute; top: -8px; }
.top__burger span::after { position: absolute; top: 8px; }
.top--open .top__nav { display: grid; position: absolute; top: 100%; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; background: var(--cream); box-shadow: 0 16px 24px rgba(46, 26, 20, .12); }
.top--open .top__nav a { padding: 14px 0; border-bottom: 1px solid rgba(107, 35, 21, .12); font-size: 18px; font-weight: 700; text-decoration: none; }
.top__nav .top__nav-tel { color: var(--red-ink); font-weight: 900; }
.top__nav .top__nav-msg { color: var(--brown); }
.top__nav a[aria-current="page"] { color: var(--red-ink); }
@media (max-width: 959px) {
  .top--open .top__nav { max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; } /* в альбомной ориентации меню прокручивается, телефон в нём достижим */
}
@media (min-width: 960px) {
  .top__in { gap: 24px; min-height: 80px; }
  .top__logo img { height: 46px; }
  .top__burger, .top__nav .top__nav-tel, .top__nav .top__nav-msg { display: none; }
  .top__quick { display: none; }
  .top__nav, .top--open .top__nav { display: flex; position: static; gap: 20px; margin-left: auto; padding: 0; background: none; box-shadow: none; font-weight: 700; }
  .top__nav a, .top--open .top__nav a { padding: 0; border: 0; font-size: inherit; text-decoration: none; white-space: nowrap; }
  .top__tel { display: inline; font-weight: 900; text-decoration: none; white-space: nowrap; }
  .top__book { display: inline-flex; }
  .top__msgs { display: inline-flex; align-items: center; gap: 2px; margin-left: -8px; }
  .top__msg { width: 36px; height: 36px; min-width: 36px; min-height: 36px; color: var(--brown); }
  .top__msg svg { width: 22px; height: 22px; }
}
@media (min-width: 960px) and (max-width: 1079px) {
  /* полная шапка просит ~1000px: здесь плотнее, чтобы «Как добраться» не переносилось, а логотип не сжимался */
  .top__in { gap: 16px; }
  .top__nav, .top--open .top__nav { gap: 14px; font-size: 16px; }
  .top__logo img { height: 40px; }
}
@media (min-width: 960px) and (max-width: 1199px) {
  .top__tel, .top__msgs { display: none; } /* 6 разделов + «Забронировать» не помещаются с телефоном; он остаётся в подвале */
}

/* подвал */
.foot { position: relative; padding: 76px 0 calc(110px + env(safe-area-inset-bottom, 0px)); background: var(--brown); color: #fff; }
.foot .band { top: 0; bottom: auto; }
.foot__in { display: grid; gap: 28px; }
.foot__logo { width: 120px; height: auto; }
.foot h2 { margin-bottom: 8px; font-size: 14px; font-weight: 700; opacity: .75; }
.foot p { line-height: 1.7; }
.foot a { text-decoration: none; }
.foot :focus-visible { outline-color: #fff; } /* синее кольцо на коричневом — 2:1, белое — 11:1 (WCAG 1.4.11 требует 3:1) */
.foot__copy { margin-top: 32px; font-size: 14px; opacity: .75; }
@media (min-width: 960px) {
  .foot { padding-bottom: 34px; }
  .foot__in { grid-template-columns: auto 1fr 1fr 1fr; gap: 40px; }
  .foot__logo { width: 106px; }
}

/* плашка «Забронировать» на телефоне */
.sticky { position: fixed; z-index: 30; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-radius: 18px; background: var(--red-ink); color: #fff; font-weight: 900; text-decoration: none; box-shadow: 0 8px 24px rgba(201, 38, 29, .4); touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform 200ms var(--ease-out), opacity 200ms, visibility 200ms; }
.sticky small { display: block; font-size: 12px; font-weight: 700; opacity: .9; }
.sticky > span:last-child { text-align: right; } /* «сегодня от … ₽» на узком телефоне — в две строки, обе к правому краю */
.sticky mark.tbd { border-bottom-color: #fff; }
.sticky--hidden { transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden; pointer-events: none; }
.sticky:focus-visible { outline-color: #fff; outline-offset: -6px; }
@media (min-width: 960px) { .sticky { display: none; } }
@media (max-width: 959px) {
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } /* элемент в фокусе с клавиатуры не прячется под плашкой (WCAG 2.4.11) */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* первый экран */
.hero { position: relative; padding-bottom: 46px; background: var(--cream); }
.hero__grid { display: grid; grid-template-areas: "head" "pic" "book"; gap: 20px; padding-block: 8px 32px; }
.hero__head { grid-area: head; }
.hero__sub { max-width: 480px; margin-top: 14px; color: var(--muted); font-size: 18px; }
.hero__rating { margin-top: 4px; font-size: 15px; font-weight: 700; }
.hero__rating a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brown); text-decoration: underline; text-decoration-color: rgba(107, 35, 21, .35); text-underline-offset: 3px; }
.hero__pic { grid-area: pic; position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1; margin-inline: auto; }
.hero__photo { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: cover; border-radius: 50% 50% 28px 28px / 34% 34% 28px 28px; }
.hero__frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.hero__cat { position: absolute; left: -2%; bottom: -2%; width: auto; height: 42%; }
.badge { position: absolute; text-align: center; font-weight: 900; line-height: 1.1; }
/* «номера / от … ₽» по центру кружка, и в две строки, и в три — когда today.js пишет «сегодня от … ₽».
   Вся надпись — в одном <span>: в grid он одна ячейка, и цена не отрывается от «от». */
.badge--price { top: 10%; right: 2%; display: grid; place-items: center; width: 26%; aspect-ratio: 1; border-radius: 50%; background: var(--green-ink); color: #fff; font-size: clamp(13px, 2.6vw, 17px); }
.badge--price mark.tbd { border-bottom-color: #fff; }
.bcard { grid-area: book; width: 100%; max-width: 480px; padding: 18px; border-radius: 24px; background: #fff; box-shadow: 0 14px 40px rgba(107, 35, 21, .14); }
.bcard__title { margin-bottom: 12px; color: var(--brown); font-size: 18px; font-weight: 900; }
.bcard__note { margin-top: 12px; color: var(--green-ink); font-size: 14px; font-weight: 700; }
.bcard input, .bcard select, .bcard textarea { font-size: 16px; }
/* свободен сегодня (владелец 09.11): фото и цена самого дешёвого номера на сегодня, вся карточка — ссылка на бронь */
.today { width: 100%; max-width: 480px; }
.today__link { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 14px 40px rgba(107, 35, 21, .14); -webkit-tap-highlight-color: transparent; }
.today__img { position: relative; display: block; }
.today__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--sand); }
.today .area { top: 12px; bottom: auto; width: 64px; height: 64px; }
.today .area b { font-size: 22px; }
/* «Акция на сегодня» (владелец 09.11) — красная плашка справа вверху; без живой цены TravelLine скрыта */
.today__promo { position: absolute; top: 12px; right: 12px; max-width: calc(100% - 92px); padding: 8px 14px; border-radius: 999px; background: var(--red-ink); color: #fff; font-size: 15px; font-weight: 900; line-height: 1.2; box-shadow: 0 6px 16px rgba(201, 38, 29, .35); }
.today__promo[hidden] { display: none; }
@media (max-width: 374px) { .today__promo { padding: 7px 11px; font-size: 13px; } } /* «Предложение на 12 ноября» — в одну строку и на 320 px */
.today__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 18px 18px; }
.today__when { padding: 4px 10px; border-radius: 999px; background: var(--tint-green); color: var(--green-ink); font-size: 14px; font-weight: 700; }
.today__when[hidden], .today [data-today-meal][hidden] { display: none; }
.today__name { color: var(--brown); font-size: 20px; font-weight: 900; line-height: 1.2; }
.today__meta { color: var(--muted); font-size: 15px; }
.today__price { color: var(--muted); }
.today .price__today { display: none; } /* «сегодня» уже в плашке над названием — в цене не повторяем */
.today__price b { color: var(--ink); font-size: 22px; font-weight: 900; }
.today__btn { margin-top: 10px; }
.today__link:active .today__btn { transform: scale(.97); }
.today__link:focus-visible { border-radius: 24px; }
@media (max-width: 959px) {
  /* телефон и планшет (владелец 09.11): шапка → самый дешёвый номер на сегодня → форма брони → фото гостиницы → «Матурым».
     .hero__head раскрыт (display: contents): ночная заметка встаёт над карточкой, заголовок с текстом — под фасадом.
     В разметке заголовок по-прежнему первый — так страницу читают скринридер и компьютер. */
  .hero__grid { grid-template-areas: none; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .hero__head { display: contents; }
  .night { order: 0; margin-top: 0; }
  .today { order: 1; }
  .hero__grid > .bcard { order: 2; grid-area: auto; }
  .hero__pic { order: 3; grid-area: auto; }
  .hero__head > .h1 { order: 4; margin-top: 8px; }
  .hero__sub { order: 5; margin-top: -4px; }
  .hero__rating { order: 6; margin-top: -12px; }
}
@media (min-width: 960px) {
  .today { display: none; }
  .hero__grid { grid-template-columns: 1fr 1fr; grid-template-areas: "head pic" "book pic"; column-gap: 40px; row-gap: 24px; align-items: start; padding-block: 24px 64px; }
  .hero__head { align-self: end; }
  .hero__sub { font-size: 20px; }
}

/* почему у нас уютно */
/* настоящее фото холла на всю ширину .wrap (sizes в разметке — та же ширина); на широком экране — полоса не выше 520 px */
.why__photo { margin-top: 24px; }
.why__photo img { width: 100%; max-height: 520px; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 40%; border-radius: var(--radius); background: var(--sand); }
.why__photo figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
.cats3 { display: grid; gap: 14px; margin-top: 24px; }
.cats3__item { display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); }
.cats3__item img { justify-self: center; width: auto; height: 72px; }
.cats3__item--sleep { background: var(--tint-blue); }
.cats3__item--food { background: var(--tint-yellow); }
.cats3__item--walk { background: var(--tint-green); }
.cats3 h3 { margin-bottom: 4px; color: var(--brown); font-size: 22px; font-weight: 900; line-height: 1.1; }
.cats3 p { font-size: 16px; line-height: 1.4; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.facts li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; line-height: 1.25; text-wrap: balance; }
.facts a { text-decoration: none; }
@media (max-width: 374px) {
  .facts { grid-template-columns: 1fr; } /* два столбца не помещаются: «круглосуточно» не переносится — на 320 страница ехала вбок, на 360 столбец вылезал за отступ */
}
@media (min-width: 640px) {
  .cats3 { grid-template-columns: repeat(3, 1fr); }
  .cats3__item { grid-template-columns: 1fr; text-align: center; }
  .cats3__item img { height: 100px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .cats3__item { grid-template-columns: 110px 1fr; text-align: left; }
}
@media (min-width: 1080px) {
  .facts { grid-template-columns: repeat(6, 1fr); } /* шесть в ряд — с 1080px: на меньшей ширине ряд не помещается (длинные слова + значок) и страница едет вбок */
}

/* номера */
.rooms { display: grid; gap: 22px; }
.room { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: 0 6px 24px rgba(46, 26, 20, .08); }
.room__img { position: relative; }
.room__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.area { position: absolute; left: 14px; bottom: -26px; display: grid; place-content: center; width: 80px; height: 80px; border-radius: 50%; background: var(--green-ink); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; text-align: center; box-shadow: 0 6px 16px rgba(31, 122, 74, .35); }
.area b { display: block; font-size: 28px; font-weight: 900; }
.area--blue { background: var(--blue-ink); box-shadow: 0 6px 16px rgba(31, 111, 163, .35); }
.area--red { width: 92px; height: 92px; bottom: -32px; background: var(--red-ink); box-shadow: 0 6px 16px rgba(201, 38, 29, .35); }
.area--red b { font-size: 34px; }
.tag { position: absolute; top: 12px; right: 12px; padding: 6px 10px; border-radius: 999px; background: var(--yellow); color: var(--brown); font-size: 12px; font-weight: 900; }
.room__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 40px 20px 20px; }
.room h3 { color: var(--brown); font-size: 22px; font-weight: 900; }
.room__price { color: var(--muted); }
.room__price b { color: var(--ink); font-size: 24px; font-weight: 900; }
.room__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.room__acts .btn { flex: 1 1 auto; }
.more-rooms { display: grid; gap: 10px; margin-top: 22px; }
.more-rooms a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 18px; border-radius: 16px; background: #fff; text-decoration: none; }
.more-rooms span { color: var(--muted); }
@media (max-width: 639px) {
  .rooms { grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
  .rooms::-webkit-scrollbar { display: none; }
  .room { scroll-snap-align: start; }
}
@media (max-width: 959px) {
  .more-rooms a { flex-direction: column; } /* название и площадь — всегда в две строки, а не по-разному в соседних строках */
}
@media (min-width: 640px) {
  .rooms, .more-rooms { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 640px) and (max-width: 959px) {
  .room:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 11px); } /* одна карточка в последнем ряду — по центру, а не с пустой ячейкой справа */
}
@media (min-width: 960px) {
  .rooms { grid-template-columns: repeat(3, 1fr); }
}

/* бронируйте напрямую */
.direct { display: grid; gap: 24px; padding: 28px 22px; border-radius: 32px; background: var(--yellow); }
.ticks { display: grid; gap: 12px; margin: 18px 0 24px; }
.ticks li { display: flex; gap: 10px; font-size: 18px; font-weight: 700; }
.ticks li::before { content: "✓"; color: var(--green-ink); font-weight: 900; }
.direct__call { align-self: center; padding: 22px; border-radius: 24px; background: #fff; }
.direct__label { color: var(--brown); font-weight: 900; }
.direct__tel { display: inline-block; margin: 6px 0 8px; color: var(--red-ink); font-size: 26px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.biz-line { margin-top: 16px; font-size: 17px; font-weight: 700; } /* «В командировку?» под блоком прямой брони */
.biz-line a { color: var(--brown); text-underline-offset: 3px; }
@media (min-width: 960px) {
  .direct { grid-template-columns: 1.2fr 1fr; gap: 30px; padding: 40px; }
}

/* завтрак */
.bf { display: grid; gap: 28px; align-items: center; }
.bf__pic { position: relative; }
.bf__img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 30px; background: var(--cream); }
.bf__cat { position: absolute; right: -6px; bottom: -14px; width: auto; height: 46%; }
/* подпись «Иллюстрация» видна всем, не только в alt (спецификация: иллюстрация, подписанная как иллюстрация) — в пустом углу картинки, как в макете */
.bf__note { position: absolute; left: 14px; top: 14px; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.3; }
.bf__chips { margin: 18px 0 22px; }
.bf .chip { background: #fff; }
/* настольные игры: тот же блок на белом фоне, на широком экране картинка справа */
.bf--flip .chip { background: var(--sand); }
@media (min-width: 960px) {
  .bf { grid-template-columns: 1fr 1fr; gap: 48px; }
  .bf--flip .bf__pic { order: 2; }
}

/* казань рядом */
.sechead__cat { width: auto; height: 110px; }
.loc { display: grid; gap: 20px; margin-bottom: 22px; }
.loc__map { display: grid; gap: 8px; align-content: start; }
/* Карта Яндекса из Конструктора (600×450): по условиям Яндекса логотип и копирайт в правом нижнем углу
   не обрезаем и не перекрываем, поэтому картинка целиком, почти без скругления, а кнопка — под ней */
.map { display: grid; gap: 10px; justify-items: start; max-width: 616px; padding: 8px; border-radius: 28px; background: var(--tint-green); color: var(--brown); }
.map__img { display: block; width: 100%; max-width: 600px; height: auto; border-radius: 4px; background: var(--sand); }
.map__link { margin: 0 0 2px 4px; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--brown); font-size: 15px; font-weight: 700; box-shadow: 0 4px 12px rgba(46, 26, 20, .15); }
.dist { display: grid; gap: 10px; align-content: start; }
.dist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 18px; border-radius: 16px; background: var(--sand); font-weight: 700; }
.dist span { color: var(--muted); }
@media (max-width: 639px) {
  .dist li { flex-direction: column; } /* как .more-rooms: место и время — всегда в две строки */
}
@media (min-width: 960px) {
  .loc { grid-template-columns: 1.1fr 1fr; gap: 30px; }
}

/* экскурсии: пометка «Реклама» над виджетом, как на /services/ekskursii; место под виджет (.tripster) занято заранее */
.tours .svc__note { margin-top: 14px; }
.tours .tripster { margin: 12px 0 22px; }

/* отзывы */
.rates { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.rates li { padding: 14px 20px; border-radius: 20px; background: #fff; font-weight: 700; }
.rates b { margin-right: 8px; color: var(--brown); font-size: 28px; font-weight: 900; }
.rates a { color: inherit; }
.rates li span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }

/* гостиница и парковка: вбок листается только лента (на 320 px страница не едет), фото встают к краю;
   sizes у фото — те же ширины: 80% .wrap на телефоне, 360 и 400 px шире */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip li { scroll-snap-align: start; }
.strip a { display: block; border-radius: var(--radius); }
.strip a:focus-visible { outline-offset: -4px; } /* лента прокручивается и обрезает всё, что снаружи фото, — кольцо фокуса внутри */
.strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--sand); }
.strip-nav { display: none; gap: 10px; }
.strip__btn { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; color: var(--brown); font-size: 30px; line-height: 1; box-shadow: 0 4px 12px rgba(46, 26, 20, .15); cursor: pointer; touch-action: manipulation; }
@media (min-width: 640px) {
  .strip { grid-auto-columns: 360px; }
}
@media (min-width: 960px) {
  .strip { grid-auto-columns: 400px; gap: 16px; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 640px) {
  .strip-nav { display: flex; } /* стрелки — только с мышью и на широком экране */
}

/* частые вопросы */
.faq { display: grid; gap: 12px; margin-top: 22px; }
.faq details { border-radius: 16px; background: var(--sand); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 700; list-style: none; cursor: pointer; touch-action: manipulation; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red-ink); font-size: 22px; font-weight: 900; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; }
@media (min-width: 960px) {
  .faq { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* внутренние страницы: шапка страницы, крошки, текст, сетки */
.phead { padding: 20px 0 36px; background: var(--cream); }
.phead__in { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.phead__text { min-width: 0; }
.phead__h1 { margin-top: 10px; font-size: clamp(32px, 7vw, 56px); overflow-wrap: break-word; hyphens: auto; }
.phead__cat { display: none; flex: none; width: auto; height: 200px; }
.phead + .sec--tight:not(.sec--cream) { padding-top: 32px; } /* белый раздел сразу под кремовой шапкой — не вплотную к краю */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 14px; }
.crumbs [aria-current] { color: var(--brown); font-weight: 700; }
.prose { max-width: 720px; }
.prose > * + * { margin-top: 14px; }
.prose h2 { margin-top: 36px; color: var(--brown); font-size: 26px; font-weight: 900; line-height: 1.15; }
.prose ol, .prose ul { display: grid; gap: 10px; margin: 14px 0 0; padding-left: 24px; }
.prose ul { list-style: disc; }
.prose a { color: var(--blue-ink); }
.list-plain { display: flex; flex-wrap: wrap; gap: 12px; }
.grid-cards { display: grid; gap: 22px; }
.two { display: grid; gap: 32px; }
@media (min-width: 640px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .phead { padding: 36px 0 52px; }
  .phead__cat { display: block; }
  .phead + .sec--tight:not(.sec--cream) { padding-top: 48px; }
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 1.2fr 1fr; gap: 56px; }
}
/* /booking на телефоне: короткая шапка (без вводной фразы), форма видна на первом экране */
@media (max-width: 639px) {
  .phead--compact { padding: 10px 0 12px; }
  .phead--compact .phead__h1 { margin-top: 4px; font-size: 30px; }
  .phead--compact .lead { display: none; }
  .phead--compact + .sec--tight:not(.sec--cream) { padding-top: 14px; }
}

/* страница «Номера» — список столбиком на телефоне (на главной лента листается вбок) */
@media (max-width: 639px) {
  .rooms--list { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; padding-bottom: 0; }
}
/* страница номера: галерея и карточка брони */
.roomp { display: grid; gap: 24px; }
.roomp__main { min-width: 0; }
.gallery { position: relative; min-width: 0; }
.gallery__track { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: start; }
.gallery__slide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.gallery__btn { position: absolute; top: calc(50% - 40px); display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--brown); font-size: 30px; line-height: 1; box-shadow: 0 4px 12px rgba(46, 26, 20, .15); cursor: pointer; touch-action: manipulation; }
.gallery__btn--prev { left: 10px; }
.gallery__btn--next { right: 10px; }
.gallery__count { margin-top: 8px; color: var(--muted); font-size: 14px; text-align: center; }
.roomp__area { color: var(--brown); font-size: 18px; font-weight: 700; }
.roomp__area b { font-size: 44px; font-weight: 900; }
.roomp__facts { display: grid; gap: 6px; margin: 10px 0 14px; }
.roomp__card .btn { margin-top: 14px; }
.roomp__card { grid-area: auto; max-width: none; }
@media (min-width: 960px) {
  .roomp { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .roomp__card { position: sticky; top: 100px; }
}
/* просмотр фото крупно */
.lightbox { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: rgba(20, 10, 6, .94); color: #fff; }
.lightbox::backdrop { background: rgba(20, 10, 6, .94); }
.lightbox__fig { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; height: 100%; padding: 64px 12px; }
.lightbox__fig img { width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox__btn, .lightbox__close { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.lightbox__btn { top: calc(50% - 24px); }
.lightbox__btn--prev { left: max(8px, env(safe-area-inset-left, 0px)); }
.lightbox__btn--next { right: max(8px, env(safe-area-inset-right, 0px)); }
.lightbox__close { top: calc(8px + env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
.lightbox__count { position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); font-size: 14px; text-align: center; }

/* контакты и формы */
.contacts { display: grid; gap: 18px; }
.contacts li { display: grid; gap: 2px; }
.contacts span { color: var(--muted); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.contacts b { color: var(--brown); font-size: 20px; font-weight: 900; }
.contacts a { text-decoration: none; }
.form { display: grid; gap: 16px; max-width: 560px; }
.form__row { display: grid; gap: 6px; }
.form__label { font-weight: 700; }
.form__input { width: 100%; min-height: 48px; padding: 12px 14px; border: 2px solid rgba(107, 35, 21, .25); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-size: 17px; }
textarea.form__input { min-height: 132px; resize: vertical; }
.form__row--check { grid-template-columns: auto 1fr; align-items: start; gap: 4px 10px; }
.form__check { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red-ink); touch-action: manipulation; }
.form__row--check .form__error { grid-column: 2; }
.form__row--check a { color: var(--blue-ink); }
.form__error { color: var(--red-ink); font-size: 14px; font-weight: 700; }
.form__error:empty, .form__status:empty { display: none; }
.form__status { font-weight: 700; }
.form .btn { justify-self: start; }
.tl-booking { min-height: 420px; }

/* услуги */
.scard__link { display: grid; align-content: start; gap: 8px; height: 100%; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: 0 6px 24px rgba(46, 26, 20, .08); text-decoration: none; }
.scard__link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.scard__title { padding: 10px 20px 0; color: var(--brown); font-size: 21px; font-weight: 900; line-height: 1.15; }
.scard__text { padding: 0 20px 20px; color: var(--muted); }
.svc { display: grid; gap: 44px; max-width: 960px; }
.svc__hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.svc__block > * + * { margin-top: 14px; }
.svc__h { font-size: clamp(24px, 4vw, 32px); }
.svc__images img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }
.svc__note { font-size: 14px; color: var(--muted); }
.bfcard { overflow: hidden; border-radius: var(--radius); background: var(--cream); }
.bfcard img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.bfcard h3 { padding: 14px 18px 0; color: var(--brown); font-size: 21px; font-weight: 900; }
.bfcard ul { display: grid; gap: 4px; padding: 8px 18px 18px; }
.tripster { min-height: 320px; }
/* отзывы: виджет Яндекс Карт (iframe ставит main.js); высота занята заранее, чтобы страница не прыгала */
.ymrev { width: 100%; max-width: 760px; height: 680px; margin: 22px 0; overflow: hidden; border-radius: var(--radius); background: #fff; }
.ymrev iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .ymrev { height: 600px; } }

/* «Акции и события» */
.sec--sun { background: var(--tint-yellow); }
.ev { display: grid; align-content: start; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: 0 6px 24px rgba(46, 26, 20, .08); }
.ev[hidden], .ev-empty[hidden], .sec[hidden] { display: none; }
.ev img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ev__body { display: grid; gap: 8px; min-width: 0; padding: 18px 20px 22px; overflow-wrap: break-word; } /* длинное слово из списка событий переносится, а не раздвигает карточку */
.ev__date { color: var(--red-ink); font-size: 15px; font-weight: 900; }
.ev__approx { color: var(--muted); font-weight: 700; }
.ev__title { color: var(--brown); font-size: 22px; font-weight: 900; line-height: 1.15; }
.ev__venue { color: var(--muted); font-size: 15px; }
.ev__price { font-weight: 700; }
.ev__price--live { color: var(--green-ink); font-size: 20px; font-weight: 900; }
.ev__price--none { color: var(--red-ink); }
.ev .btn { justify-self: start; margin-top: 6px; }
.note { margin-top: 20px; color: var(--muted); font-size: 14px; }
.ev-h { margin-bottom: 20px; }
.ev__tickets { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-ink); font-weight: 700; text-underline-offset: 3px; }
/* фильтры «Акций» и «Показать ещё» включает events.js; без JS они скрыты, видны первые 8 событий из сборки */
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.ev-chips[hidden], .ev-chip[hidden], .ev-more[hidden] { display: none; }
.ev-chip { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--sand); color: var(--brown); font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; touch-action: manipulation; transition: transform 120ms var(--ease-out), background-color 120ms, color 120ms; }
.ev-chip:active { transform: scale(.97); }
.ev-chip[aria-pressed="true"] { background: var(--brown); color: #fff; }
.ev-chip:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 3px; }
.ev-more { display: flex; width: fit-content; margin: 28px auto 0; }
/* даты «с … по …» на /spec (спецификация 2026-11-13): поля 44 px и 16 px — iOS не увеличивает страницу при вводе */
.ev-dates { margin-bottom: 18px; }
.ev-dates[hidden], .ev-dates__reset[hidden] { display: none; }
.ev-dates__q { margin: 0 0 10px; color: var(--brown); font-weight: 700; }
.ev-dates__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ev-dates__field { display: flex; flex: 1 1 170px; align-items: center; gap: 8px; max-width: 260px; color: var(--brown); font-weight: 700; }
.ev-dates__field span { flex: none; min-width: 1.4em; }
.ev-dates__field input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 2px solid #E8DCCB; border-radius: 14px; background: #fff; color: var(--ink); font-family: inherit; font-size: 16px; line-height: 1.2; -webkit-appearance: none; appearance: none; }
.ev-dates__field input::-webkit-date-and-time-value { text-align: left; }
.ev-dates__field input:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 2px; }
.ev-dates__reset { min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--blue-ink); font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; touch-action: manipulation; }
.ev-dates__found { margin: 10px 0 0; color: var(--ink); }
.ev-dates__found:empty { display: none; }

/* фотогалерея */
.album + .album { margin-top: 32px; }
.album__h { margin-bottom: 12px; color: var(--brown); font-size: 22px; font-weight: 900; }
.album__h a { text-decoration: none; }
.album__h span { color: var(--muted); font-size: 16px; font-weight: 700; }
.album__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.album__grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
@media (min-width: 640px) { .album__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .album__grid { grid-template-columns: repeat(4, 1fr); } }

/* коты — без надписи «Sweet Йорт» под ними (как .cat в макете): по спецификации логотип есть только в шапке и подвале (блоки 1 и 11) */
.hero__cat, .cats3__item img, .bf__cat, .sechead__cat, .phead__cat { aspect-ratio: 1.1; object-fit: cover; object-position: top; }
.cats3__item--sleep img,
.phead__cat[src*="cat-sleep"] { clip-path: inset(0 0 3% 0); }

/* Плавающая кнопка TravelLine (включена в аккаунте TL) дублирует нашу плашку «Забронировать» — на главной скрыта (решение владельца 06.11) */
.x-tl-booking-widget-container { display: none !important; }

/* Уведомление о cookie: внизу по центру; без JS остаётся скрытым. На телефоне стоит над плашкой «Забронировать» (она ≈ 68 px + отступ 12 px), не закрывая её. Диалог фото открывается поверх (top layer) */
.cookie { position: fixed; z-index: 40; left: var(--gutter); right: var(--gutter); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 2 * var(--gutter)); max-width: 720px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 18px; border-radius: 18px; background: var(--cream); color: var(--ink); box-shadow: 0 8px 28px rgba(46, 26, 20, .22), inset 0 0 0 1px rgba(107, 35, 21, .14); }
.cookie[hidden] { display: none; }
.cookie__text { flex: 1 1 280px; margin: 0; font-size: 15px; line-height: 1.4; }
.cookie__text a { color: var(--brown); font-weight: 700; }
.cookie__ok { flex: 0 0 auto; min-height: 44px; padding: 10px 22px; }
.cookie__short { display: none; }
@media (max-width: 959px) {
  .sticky ~ .cookie { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .sticky.sticky--hidden ~ .cookie { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); } /* плашка спрятана (на экране карточка брони) — полоса опускается вниз */
}
/* телефон: тонкая полоса «текст + Понятно» в одну строку-абзац, не выше 64 px */
@media (max-width: 591px) {
  .cookie { flex-wrap: nowrap; gap: 10px; max-height: 64px; padding: 8px 8px 8px 14px; border-radius: 14px; }
  .cookie__long { display: none; }
  .cookie__short { display: inline; }
  .cookie__text { flex: 1 1 auto; font-size: 13px; line-height: 1.3; }
  .cookie__ok { min-height: 44px; padding: 8px 16px; font-size: 15px; }
}

/* Чат — кот Дус (templates/_chat.html, src/assets/js/chat.js). Кнопка — мордочка Дуса 64 px справа внизу (моргает: .chat--blink); на телефоне стоит над плашкой «Забронировать» (.sticky ≈ 68 px + 12 px)
   и полосой cookie (на телефоне ≤ 64 px, поднята на 92 px, пока плашка видна). Обе приходят и уходят, поэтому высоту подъёма даёт соседство
   в DOM: блок .chat идёт после них. Окно: на телефоне во весь экран (кнопку тогда заменяет «×» в шапке), на компьютере 380×560 над кнопкой */
.chat { --chat-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); --chat-right: max(16px, env(safe-area-inset-right, 0px)); }
.chat[hidden] { display: none; }
.chat__fab { position: fixed; z-index: 35; right: var(--chat-right); bottom: var(--chat-bottom); display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--cream); color: #fff; box-shadow: 0 8px 22px rgba(46, 26, 20, .28), 0 2px 6px rgba(46, 26, 20, .2), inset 0 0 0 2px rgba(107, 35, 21, .18); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform 120ms var(--ease-out), bottom 200ms var(--ease-out); }
.chat__fab:active { transform: scale(.94); }
.chat__face { position: relative; display: block; width: 64px; height: 64px; }
.chat__face img { position: absolute; inset: 0; width: 100%; height: 100%; }
.chat__face-morg { opacity: 0; } /* в макете всегда: lazy-картинка с opacity 0 грузится заранее, первое моргание без пустого кадра */
.chat--blink .chat__face-morg { opacity: 1; }
.chat__ic--close { display: none; width: 26px; height: 26px; }
.chat--open .chat__fab { background: var(--red-ink); }
.chat--open .chat__face { display: none; }
.chat--open .chat__ic--close { display: block; }
.chat__panel { position: fixed; z-index: 45; right: var(--chat-right); bottom: calc(var(--chat-bottom) + 72px); display: flex; flex-direction: column; width: 380px; height: 560px; max-width: calc(100vw - 2 * var(--chat-right)); max-height: calc(100% - var(--chat-bottom) - 88px); overflow: hidden; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 18px 50px rgba(46, 26, 20, .28), inset 0 0 0 1px rgba(107, 35, 21, .12); }
.chat__panel[hidden] { display: none; }
.chat__head { position: relative; display: flex; align-items: flex-end; gap: 10px; padding: 8px 52px 0 10px; background: var(--cream); }
.chat__head .chat__close { position: absolute; top: 6px; right: 6px; }
.chat__pose { flex: none; width: 132px; height: 132px; transition: opacity 200ms var(--ease-out); }
.chat__pose--swap { opacity: 0; }
.chat__who-am-i { padding-bottom: 14px; }
.chat__title { margin: 0; color: var(--brown); font-size: 22px; font-weight: 900; line-height: 1.1; }
.chat__internal { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
.chat__internal[hidden] { display: none; }
.chat__caption { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.chat__close, .chat__hint-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--brown); cursor: pointer; touch-action: manipulation; }
.chat__close svg, .chat__hint-close svg { width: 20px; height: 20px; }
.chat__list { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-height: 0; padding: 14px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat__msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; background: var(--sand); font-size: 16px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__msg--bot, .chat__msg--owner, .chat__msg--note, .chat__msg--wait { align-self: flex-start; border-bottom-left-radius: 6px; }
.chat__msg--bot { position: relative; max-width: calc(88% - 36px); margin-left: 36px; }
.chat__ava { position: absolute; bottom: 0; left: -36px; width: 28px; height: 28px; border-radius: 50%; }
.chat__cards { display: flex; flex-direction: column; gap: 8px; margin-left: 36px; }
.chat__card { display: flex; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(107, 35, 21, .16), 0 2px 8px rgba(46, 26, 20, .06); }
.chat__card-photo { flex: none; width: 92px; object-fit: cover; }
.chat__card-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px 12px; }
.chat__card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.chat__card-body .chat__card-label { color: var(--green-ink); font-size: 12.5px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.chat__card-body .chat__card-room { color: var(--brown); font-size: 16px; font-weight: 900; }
.chat__card-body .chat__card-price { color: var(--ink); }
.chat__card-price b { font-size: 17px; }
.chat__card-old { color: var(--muted); }
.chat__card-body .chat__card-left { color: var(--red-ink); font-weight: 700; }
.chat__card-book { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; padding: 0 18px; border-radius: 999px; background: var(--red-ink); color: #fff; font-size: 15px; font-weight: 900; text-decoration: none; }
.chat__msg--guest { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--red-ink); color: #fff; }
.chat__msg--owner { background: var(--tint-blue); }
.chat__msg--note { background: var(--tint-yellow); }
.chat__msg--wait { color: var(--muted); font-style: italic; }
.chat__who { display: block; color: var(--blue-ink); font-size: 12px; font-weight: 900; }
.chat__msg a { color: var(--blue-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.chat__msg--guest a { color: #fff; }
.chat__quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.chat__quick[hidden] { display: none; }
.chat__quick button { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 2px rgba(107, 35, 21, .3); color: var(--brown); font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer; touch-action: manipulation; }
.chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--sand); }
.chat__input { flex: 1 1 auto; min-width: 0; min-height: 44px; max-height: 96px; padding: 10px 14px; border: 0; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 2px rgba(107, 35, 21, .25); color: var(--ink); font-family: inherit; font-size: 16px; line-height: 1.35; resize: none; }
.chat__send { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--red-ink); color: #fff; cursor: pointer; touch-action: manipulation; }
.chat__send svg { width: 22px; height: 22px; }
.chat__send:disabled { opacity: .45; cursor: default; }
.chat__note { margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.chat__note a { color: var(--brown); font-weight: 700; }
.chat__fab:focus-visible, .chat__send:focus-visible, .chat__close:focus-visible, .chat__hint-close:focus-visible { border-radius: 50%; }
.chat__card-book:focus-visible { border-radius: 999px; } /* общее кольцо фокуса скругляет до 6 px — кругам и полям возвращаем форму */
.chat__quick button:focus-visible { border-radius: 999px; }
.chat__input:focus-visible { border-radius: 22px; outline-offset: 0; box-shadow: none; }
/* Выглядывание: Дус выезжает из-за правого края над кнопкой, рядом облачко с фразой; на всех ширинах */
.chat__hint:not([hidden]) { position: fixed; z-index: 35; right: 0; bottom: calc(var(--chat-bottom) + 70px); display: flex; align-items: flex-end; max-width: calc(100vw - 16px); pointer-events: none; }
.chat__cloud { position: relative; display: flex; align-items: center; max-width: 250px; margin-bottom: 64px; border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(46, 26, 20, .22), inset 0 0 0 1px rgba(107, 35, 21, .12); pointer-events: auto; animation: chat-pop 320ms 260ms var(--ease-out) both; }
.chat__cloud::after { content: ""; position: absolute; right: -6px; bottom: 16px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: 3px -3px 4px rgba(46, 26, 20, .06); }
.chat__hint-open { padding: 12px 4px 12px 16px; border: 0; background: transparent; color: var(--brown); font-family: inherit; font-size: 15px; font-weight: 900; line-height: 1.3; text-align: left; cursor: pointer; }
.chat__hint-close { width: 36px; height: 36px; margin-right: 4px; }
.chat__peek { flex: none; width: 120px; height: 120px; animation: chat-peek 520ms var(--ease-out) both; }
.chat--open .chat__hint { display: none; }
@keyframes chat-peek { from { transform: translateX(100%); } to { transform: none; } }
@keyframes chat-pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width: 959px) {
  .sticky:not(.sticky--hidden) ~ .chat { --chat-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .cookie:not([hidden]) ~ .chat { --chat-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .sticky:not(.sticky--hidden) ~ .cookie:not([hidden]) ~ .chat { --chat-bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 592px) and (max-width: 959px) { /* полоса cookie на планшете выше (текст в две строки) */
  .cookie:not([hidden]) ~ .chat { --chat-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
  .sticky:not(.sticky--hidden) ~ .cookie:not([hidden]) ~ .chat { --chat-bottom: calc(188px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 591px) {
  .chat__panel { inset: 0; z-index: 60; width: auto; height: auto; max-width: none; max-height: none; padding-top: env(safe-area-inset-top, 0px); border-radius: 0; }
  .chat--open .chat__fab { display: none; }
  .chat__note { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .chat__pose { width: 96px; height: 96px; }
  .chat__who-am-i { padding-bottom: 10px; }
  .chat__peek { width: 96px; height: 96px; }
  .chat__cloud { max-width: 210px; margin-bottom: 50px; }
}
@media (min-width: 960px) {
  .chat { --chat-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); --chat-right: max(24px, env(safe-area-inset-right, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .chat__fab, .chat__pose { transition: none; } .chat__peek, .chat__cloud { animation: none; } }
@media (hover: hover) and (pointer: fine) {
  .chat__fab:hover { transform: scale(1.05); }
  .chat--open .chat__fab:hover { background: #A81F17; transform: none; }
  .chat__card-book:hover { background: #A81F17; }
  .chat__quick button:hover { background: var(--sand); }
  .chat__close:hover, .chat__hint-close:hover { background: var(--sand); }
  .chat__send:not(:disabled):hover { background: #A81F17; }
}

/* hover — только для мыши */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #A81F17; }
  .btn--ghost:hover { background: var(--sand); }
  .top__nav a:hover, .foot a:hover, .facts a:hover, .map:hover .map__link { text-decoration: underline; }
  .more-rooms a:hover { box-shadow: inset 0 0 0 2px rgba(107, 35, 21, .2); }
  .crumbs a:hover { color: var(--brown); }
  .gallery__btn:hover { background: #fff; }
  .strip__btn:hover { background: var(--sand); }
  .lightbox__btn:hover, .lightbox__close:hover { background: rgba(255, 255, 255, .3); }
  .scard__link:hover { box-shadow: 0 10px 30px rgba(46, 26, 20, .16); }
  .ev-chip:hover { background: #EDE3D6; }
  .ev-chip[aria-pressed="true"]:hover { background: #561C11; }
  .ev__tickets:hover { color: var(--brown); }
}
