/* Гостиница в Поспелихе. Вариант 2: классический сайт гостиницы.
   Шрифт Manrope (SIL OFL), локальные файлы. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("./media/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("./media/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #1d2430;
  --ink-2: #4a5363;
  --line: #dfe2e7;
  --bg: #ffffff;
  --soft: #f3f4f6;
  --red: #a3232a;
  --red-2: #8b1b21;
  --red-soft: #f7e9ea;

  --fs-small: 0.9375rem;
  --fs-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  --fs-h3: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  --fs-h1: clamp(2.375rem, 1.6rem + 3.4vw, 4.75rem);

  --wrap: 1320px;
  --gut: clamp(16px, 4vw, 56px);
  --sec: clamp(72px, 9vw, 136px);
  --r: 6px;
  --head-h: 72px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow: 0 18px 40px -18px rgba(29, 36, 48, 0.35), 0 2px 6px rgba(29, 36, 48, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Manrope", "Segoe UI", system-ui, sans-serif; font-size: var(--fs-body); line-height: 1.6; font-variant-numeric: lining-nums; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
button, a, label, select { touch-action: manipulation; }
button, .btn { -webkit-user-select: none; user-select: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: #b9bec8 transparent; }

.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 50; }
.skip:focus { top: 12px; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--r); cursor: pointer;
  font-weight: 700; font-size: var(--fs-small); text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease, transform 120ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: var(--fs-body); }
.btn[hidden] { display: none; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid transparent; /* taste-skill-ignore: граница липкой шапки */ transition: border-color 200ms ease, box-shadow 200ms ease; }
.top.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(29, 36, 48, 0.35); } /* taste-skill-ignore: липкая шапка над страницей */
.top-in { width: min(100% - 2 * var(--gut), 1680px); margin-inline: auto; height: var(--head-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.01em; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark rect { fill: var(--red); }
.brand-mark path { fill: #fff; }
.nav { display: flex; gap: 28px; }
/* меню — popover: на десктопе обычная строка ссылок, на планшете и телефоне выпадает по кнопке */
.nav[popover] { display: flex; position: static; inset: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; width: auto; height: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: var(--fs-small); color: var(--ink-2); padding: 8px 0; transition: color 160ms ease; }
.top-phone { font-weight: 700; text-decoration: none; font-size: var(--fs-small); white-space: nowrap; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 6px 0; transition: transform 200ms var(--ease); }
.top:has(.nav:popover-open) .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.top:has(.nav:popover-open) .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* первый экран: фото почти целиком, текст на нейтральной подложке слева внизу */
.hero { position: relative; max-width: 1920px; margin-inline: auto; }
.hero-media { position: relative; overflow: hidden; background: var(--soft); }
.hero-media img { width: 100%; aspect-ratio: 1584 / 993; max-height: calc(100svh - var(--head-h) - 40px); object-fit: cover; object-position: 50% 40%; }
.hero-copy {
  position: absolute; left: var(--gut); bottom: calc(76px + 2 * clamp(16px, 2.4vw, 32px));
  /* плашка стоит левее вывески «Гостевой дом» (вывеска начинается на ~38% ширины фото) */
  max-width: min(600px, calc(36% - var(--gut)));
  padding: 24px;
  background: rgba(20, 24, 32, 0.66); color: #fff;
  border-radius: var(--r);
  animation: rise 900ms var(--ease) both;
}
.hero-copy h1 { font-size: clamp(2.25rem, 1rem + 2.8vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.hero-copy p { margin-top: 14px; font-size: var(--fs-body); line-height: 1.5; color: #eef0f3; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.quick {
  position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(16px, 2.4vw, 32px);
  max-width: 1320px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: stretch;
  background: #fff; border-radius: var(--r);
  animation: rise 900ms 120ms var(--ease) both;
}
.q-field { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 14px 22px; border-right: 1px solid var(--line); /* taste-skill-ignore: поля формы */ min-width: 0; cursor: pointer; }
.q-field span { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.q-field input, .q-field select { border: 0; padding: 4px 0; background: none; font: inherit; font-size: max(16px, var(--fs-body)); font-weight: 700; color: var(--ink); min-width: 0; width: 100%; cursor: pointer; }
.q-field input:focus, .q-field select:focus { outline: none; }
.q-field:focus-within { background: var(--soft); }
.q-go { border-radius: 0 var(--r) var(--r) 0; min-height: 76px; padding: 0 40px; font-size: var(--fs-body); }

/* общие заголовки разделов */
.head { display: grid; gap: 18px; max-width: 760px; }
.head p { color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.5; }
.head-row { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.head-row p { font-size: var(--fs-small); }

/* номера */
.rooms { padding-block: var(--sec) 0; }
.room { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: center; margin-top: clamp(48px, 6vw, 88px); }
.room-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.room-flip .room-gallery { order: 2; }
.room-main { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); background: var(--soft); transition: opacity 260ms ease; cursor: pointer; }
.room-main.is-swapping { opacity: 0.35; }
/* фото номера листается пальцем (pan-y: вертикальную прокрутку оставляем браузеру), внизу точки-индикаторы */
.room-stage { position: relative; }
.room-main { touch-action: pan-y; -webkit-user-drag: none; }
.room-dots { display: none; position: absolute; left: 0; right: 0; bottom: 12px; justify-content: center; align-items: center; gap: 6px; pointer-events: none; }
.room-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.6); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); transition: width 280ms var(--ease), background-color 200ms ease; } /* taste-skill-ignore: точки поверх фото */
.room-dots i.is-on { width: 20px; background: #fff; }
@media (pointer: coarse) { .room-dots { display: flex; } }
.room-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 10px; }
.thumb { position: relative; padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: pointer; background: var(--soft); aspect-ratio: 3 / 2; transition: transform 120ms var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; transition: opacity 200ms ease; }
/* вертикальные фото (санузел) не обрезаем: целиком на нейтральном фоне */
.room-main.is-tall, .thumb img.is-tall { object-fit: contain; background: var(--soft); }
.thumb.is-on img { opacity: 1; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: 4px; box-shadow: inset 0 0 0 3px var(--red); /* taste-skill-ignore: рамка выбранного фото */ opacity: 0; transition: opacity 200ms ease; }
.thumb.is-on::after { opacity: 1; }
.thumb:active { transform: scale(0.97); }
.room-info h3 { margin-bottom: 12px; }
.room-info > p { color: var(--ink-2); }
.specs { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 24px; padding: 16px 20px; background: var(--soft); border-radius: var(--r); }
.specs div { display: flex; flex-direction: column; }
.specs dt { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.specs dd { font-weight: 700; font-size: var(--fs-lead); }
.amen { margin-top: 20px; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.6; }
.amen b { color: var(--ink); }
.room-buy { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.price { color: var(--ink-2); }
.price b { font-size: var(--fs-h3); color: var(--ink); font-weight: 800; margin-right: 4px; font-variant-numeric: tabular-nums; }
/* двухместный: две односпальные или одна двуспальная — схемой кроватей сверху */
.beds { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 14px; }
.bed { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; border: 1px solid var(--line); border-radius: var(--r); font-weight: 700; font-size: var(--fs-small); text-align: center; line-height: 1.3; } /* taste-skill-ignore: вариант кроватей */
.bed svg, .bp svg { width: 48px; height: 32px; flex: none; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linejoin: round; }
.bed svg rect:nth-of-type(n+2), .bp svg rect:nth-of-type(n+2) { fill: var(--red-soft); }
.beds-or { font-size: var(--fs-small); color: var(--ink-2); font-weight: 600; }
.beds-note { margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); }

/* бронирование */
.booking { margin-top: var(--sec); background: var(--soft); padding-block: var(--sec); }
.booking-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.booking-text { position: sticky; top: calc(var(--head-h) + 32px); display: grid; gap: 18px; }
.booking-text p { color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.5; }
.booking-text .call { font-size: var(--fs-body); color: var(--ink); }
.booking-text .call a { font-weight: 800; }
.book { background: #fff; border-radius: var(--r); padding: clamp(20px, 3vw, 40px); }
.book-row { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 16px; }
.book-row-2 { grid-template-columns: 1fr 1fr; margin-top: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field span { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select {
  width: 100%; min-width: 0; min-height: 52px; padding: 10px 14px;
  border: 1px solid #c9ced6; border-radius: var(--r); background: #fff; color: var(--ink); /* taste-skill-ignore: поле ввода */
  font: inherit; font-size: max(16px, var(--fs-body)); font-weight: 600;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input::placeholder { color: #6b7280; font-weight: 500; }
.field input:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); } /* taste-skill-ignore: кольцо фокуса */
.field.is-error input { border-color: var(--red); }
.pick { border: 0; padding: 0; margin: 28px 0 0; min-width: 0; display: grid; gap: 10px; }
.pick legend { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; background: var(--soft); border-radius: var(--r); cursor: pointer; transition: background-color 160ms ease; }
.opt:has(input:checked) { background: #f5dfe1; }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--red); }
.opt-name { font-weight: 700; display: flex; flex-direction: column; }
.opt-name small, .opt-price small { font-weight: 500; font-size: 0.875rem; color: var(--ink-2); }
.opt-price { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; white-space: nowrap; }
.beds-pick { border: 0; margin: -10px 0 0; padding: 14px 18px 16px; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #fbf3f4; border-radius: 0 0 var(--r) var(--r); }
.beds-pick[hidden] { display: none; }
.beds-pick legend { float: left; grid-column: 1 / -1; width: 100%; padding: 0; margin-bottom: 2px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.bp { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-radius: var(--r); cursor: pointer; font-weight: 700; font-size: var(--fs-small); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 160ms ease, transform 120ms var(--ease); } /* taste-skill-ignore: вариант кроватей */
.bp input { position: absolute; opacity: 0; pointer-events: none; }
.bp:has(input:checked) { box-shadow: inset 0 0 0 2px var(--red); }
.bp:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.bp:active { transform: scale(0.98); }
.opt:has(input[value="double"]:checked) { border-radius: var(--r) var(--r) 0 0; }
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.sum { flex: 1 1 260px; font-weight: 600; }
.sum.is-error { color: var(--red); }

/* о гостинице */
.about { padding-block: var(--sec) 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.about-text { display: grid; gap: 18px; }
.about-text p { color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.55; }
.about-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r); }

/* услуги */
.services { padding-block: var(--sec) 0; }
.svc { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; }
.svc li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.svc svg, .route svg { width: 44px; height: 44px; padding: 9px; border-radius: 50%; background: var(--red-soft); fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-size: var(--fs-lead); margin-bottom: 4px; }
.svc p { color: var(--ink-2); font-size: var(--fs-small); }

/* фото: колонки сохраняют пропорции снимков, ничего не обрезается */
.photos { padding-block: var(--sec) 0; }
/* галерея ровными рядами: в ряду фото одной высоты и ряд заполнен до краёв.
   Ширина фото пропорциональна его сторонам (--ar), поэтому рамка совпадает с фото и ничего не обрезается.
   Ряды задают разрывы .g-br: на компьютере 3 + 3, на телефоне 1 + 2 + 2 + 1. */
.gal { --g: 16px; display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: var(--g); row-gap: 0; margin: 36px 0 calc(-1 * var(--g)); }
.shot { display: block; flex: var(--ar, 1.5) 1 0%; min-width: 0; aspect-ratio: var(--ar, 1.5); margin: 0 0 var(--g); padding: 0; border: 0; background: var(--soft); border-radius: var(--r); overflow: hidden; cursor: zoom-in; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.g-br { display: none; flex-basis: 100%; height: 0; }
.g-br-d { display: block; }

/* контакты */
.contacts { margin-top: var(--sec); background: var(--ink); color: #fff; padding-block: var(--sec); }
.contacts-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.cinfo { margin-top: 32px; display: grid; gap: 18px; }
.cinfo div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.cinfo dt { color: #aeb5c1; font-size: var(--fs-small); padding-top: 2px; }
.cinfo dd { font-weight: 700; font-size: var(--fs-lead); line-height: 1.4; }
.route { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 14px; }
.route li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; color: #dfe3ea; }
.route svg { width: 40px; height: 40px; padding: 8px; background: rgba(255, 255, 255, 0.08); stroke: #fff; }
/* своя карта по данным OpenStreetMap: базовый слой картинкой, живой слой — SVG со шрифтом сайта */
.map { border-radius: var(--r); overflow: hidden; background: #fff; align-self: start; }
.map-fig { position: relative; margin: 0; aspect-ratio: 16 / 10; background: #eceef2; }
.map-base, .map-live { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-live text { font-family: inherit; }
.map-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; color: var(--ink); }
.btn-ghost { background: var(--soft); color: var(--ink); }
.map-credit { margin-left: auto; font-size: 0.8125rem; color: var(--ink-2); }
.map-credit a { color: inherit; }
.mp-rail { fill: none; stroke: #3b4250; stroke-width: 7; stroke-linecap: round; }
.mp-rail-ties { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 10 10; }
.mp-rail-side { fill: none; stroke: #9aa1ad; stroke-width: 3; }
.mp-platform { fill: #cfd4db; }
.mp-street { font-size: 28px; font-weight: 700; fill: #6b7280; paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.mp-train rect, .mp-train path { fill: var(--ink); }
.mp-walk-under { fill: none; stroke: #fff; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.mp-walk { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: 0; }
.mp-walker { fill: #fff; stroke: var(--red); stroke-width: 4; }
.mp-chip rect { fill: var(--ink); }
.mp-chip text { fill: #fff; font-size: 28px; font-weight: 700; }
.mp-poi circle { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.mp-poi g path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mp-poi text { font-size: 32px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #eceef2; stroke-width: 7px; stroke-linejoin: round; }
.mp-pin { fill: var(--red); }
.mp-house { fill: #fff; }
.mp-hotel text { font-size: 40px; font-weight: 800; fill: var(--ink); paint-order: stroke; stroke: #eceef2; stroke-width: 8px; stroke-linejoin: round; }
.mp-hotel .mp-sub { font-size: 28px; font-weight: 600; fill: var(--ink-2); }
.mp-pulse { fill: var(--red); opacity: 0; transform-box: fill-box; transform-origin: center; animation: mp-pulse 2.4s var(--ease) infinite; }
.mp-pulse-2 { animation-delay: 1.2s; }
@keyframes mp-pulse { 0% { opacity: 0.35; transform: scale(0.4); } 100% { opacity: 0; transform: scale(2.4); } }
/* маршрут прорисовывается, когда карта появляется на экране */
@keyframes mp-draw { from { stroke-dashoffset: var(--len); } }
@supports (animation-timeline: view()) {
  .mp-walk { animation: mp-draw linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; }
}

/* подвал */
.foot { padding-block: 32px; font-size: var(--fs-small); color: var(--ink-2); }
.foot-in { display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-start; }
.foot b { color: var(--ink); }
.foot-copy { margin-left: auto; text-align: right; }
.foot-dev { color: var(--red); font-weight: 700; text-decoration: none; }

/* панель брони внизу экрана: только телефон; видна между первым экраном и формой брони (app.js) */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar {
    position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 18px;
    background: rgba(255, 255, 255, 0.94); border: 1px solid rgba(29, 36, 48, 0.08);
    box-shadow: 0 18px 40px -16px rgba(29, 36, 48, 0.45); /* taste-skill-ignore: панель поверх страницы */
    translate: 0 calc(100% + 24px); visibility: hidden;
    transition: translate 420ms var(--ease), visibility 0s linear 420ms;
  }
  .mbar.is-on { translate: 0 0; visibility: visible; transition: translate 420ms var(--ease), visibility 0s; }
  .mbar-call { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); }
  .mbar-call svg { width: 22px; height: 22px; fill: none; stroke: var(--red); stroke-width: 1.9; stroke-linejoin: round; }
  .mbar-price { display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; }
  .mbar-price b { font-size: 1.0625rem; font-weight: 800; }
  .mbar-price span { font-size: 0.8125rem; color: var(--ink-2); }
  .mbar-book { min-height: 46px; padding: 0 18px; border-radius: 12px; }
}
/* «жидкое стекло»: шапка и панель брони просвечивают и размывают то, что под ними */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top { background: rgba(255, 255, 255, 0.74); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }
  @media (max-width: 760px) {
    .mbar { background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  }
}
/* нажатие на вариант номера — короткое «проседание», как у кнопок */
.opt { transition: background-color 160ms ease, transform 120ms var(--ease); }
.opt:active { transform: scale(0.98); }

/* просмотр фото */
.viewer { width: min(1280px, 94vw); max-width: none; max-height: 94svh; padding: 0; border: 0; border-radius: var(--r); background: #11151c; color: #fff; overflow: hidden; }
/* вход и выход окна: @starting-style + allow-discrete, без JS-таймеров */
.viewer { opacity: 0; transform: scale(0.97); transition: opacity 220ms var(--ease), transform 220ms var(--ease), overlay 220ms allow-discrete, display 220ms allow-discrete; }
.viewer[open] { opacity: 1; transform: none; }
@starting-style { .viewer[open] { opacity: 0; transform: scale(0.97); } }
.viewer::backdrop { background: rgba(10, 12, 16, 0); transition: background-color 220ms ease, overlay 220ms allow-discrete, display 220ms allow-discrete; }
.viewer[open]::backdrop { background: rgba(10, 12, 16, calc(0.86 - var(--drag, 0) * 0.6)); } /* --drag: окно смахивают вниз */
.viewer-frame { touch-action: pinch-zoom; } /* одним пальцем листаем и смахиваем сами, двумя — увеличение браузера */
@starting-style { .viewer[open]::backdrop { background: rgba(10, 12, 16, 0); } }
.viewer-frame img { width: 100%; max-height: 80svh; object-fit: contain; background: #0b0e13; }
.viewer-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.viewer-bar p { margin-right: auto; font-weight: 600; }
.vbtn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); cursor: pointer; display: grid; place-items: center; transition: background-color 160ms ease, transform 120ms var(--ease); }
.vbtn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vbtn:active { transform: scale(0.94); }

/* появление: секция за секцией, мягко и один раз */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .btn-red:hover { background: var(--red-2); }
  .nav a:hover { color: var(--ink); }
  .top-phone:hover, .cinfo a:hover, .foot-dev:hover { text-decoration: underline; }
  .thumb:hover img { opacity: 1; }
  .opt:hover:not(:has(input:checked)) { background: #e9ebef; }
  .shot:hover img { transform: scale(1.03); }
  .vbtn:hover { background: rgba(255, 255, 255, 0.2); }
}

/* планшет */
@media (max-width: 1100px) {
  .top-book { display: none; }
  .nav[popover]:not(:popover-open) { display: none; }
  .burger { display: block; }
  .nav:popover-open { display: flex; position: fixed; inset: var(--head-h) 0 auto 0; width: 100%; margin: 0; flex-direction: column; gap: 0; background: #fff; border: 0; padding: 8px var(--gut) 16px; box-shadow: 0 16px 30px -20px rgba(29, 36, 48, 0.4); opacity: 1; transform: none; transition: opacity 200ms ease, transform 260ms var(--ease), overlay 260ms allow-discrete, display 260ms allow-discrete; } /* taste-skill-ignore: выпадающее меню */
  @starting-style { .nav:popover-open { opacity: 0; transform: translateY(-10px); } }
  .nav::backdrop { background: transparent; }
  .nav:popover-open a { padding: 14px 0; font-size: var(--fs-body); color: var(--ink); }
  .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-in, .contacts-in, .about { grid-template-columns: 1fr; }
  .booking-text { position: static; }
}

/* низкий экран (телефон горизонтально): фото целиком, текст и бронь под ним */
@media (max-height: 560px) and (max-width: 1100px) {
  .hero-media img { max-height: none; }
  .hero-media { background: none; } /* текст первого экрана на белом, форма брони — отдельная карточка под ним */
  .hero-copy { position: static; max-width: none; background: none; color: var(--ink); padding: 24px var(--gut) 20px; animation: none; }
  .hero-copy p { color: var(--ink-2); }
  .quick { position: static; margin: 0 var(--gut); background: var(--soft); animation: none; }
}

/* телефон */
@media (max-width: 760px) {
  :root { --head-h: 64px; }
  .top-phone { display: none; }
  .brand { font-size: 1rem; }
  .hero { padding-bottom: 0; }
  .hero-media img { aspect-ratio: 3 / 2; max-height: none; }
  .hero-media { background: none; } /* текст первого экрана на белом, форма брони — отдельная карточка под ним */
  .hero-copy { position: static; max-width: none; background: none; color: var(--ink); padding: 24px var(--gut) 20px; animation: none; }
  .hero-copy h1 { font-size: clamp(2.25rem, 1.4rem + 4vw, 3rem); }
  .hero-copy p { color: var(--ink-2); font-size: var(--fs-lead); }
  .quick { position: static; margin: 0 var(--gut); grid-template-columns: 1fr 1fr; box-shadow: none; background: var(--soft); animation: none; } /* taste-skill-ignore: тень отключена */
  .q-field { border-bottom: 1px solid var(--line); } /* taste-skill-ignore: поля формы */
  .q-field:nth-child(2) { border-right: 0; }
  .q-field:nth-child(3) { grid-column: 1 / -1; border-right: 0; }
  .q-go { grid-column: 1 / -1; border-radius: 0 0 var(--r) var(--r); min-height: 56px; }
  .room, .room-flip { grid-template-columns: 1fr; }
  .room-flip .room-gallery { order: 0; }
  .room-thumbs { gap: 6px; }
  .book-row { grid-template-columns: 1fr 1fr; }
  .book-row .field:nth-child(3) { grid-column: 1 / -1; }
  .book-row-2 { grid-template-columns: 1fr; }
  .beds-pick { grid-template-columns: 1fr; }
  .book-foot .btn { width: 100%; }
  .svc { grid-template-columns: 1fr; gap: 28px; }
  .head-row { grid-template-columns: 1fr; }
  .gal { --g: 8px; }
  .g-br-d { display: none; }
  .g-br-m { display: block; }
  /* карта на телефоне: приближение к вокзалу и гостинице, подписи читаемые */
  .map-fig { aspect-ratio: 4 / 5; overflow: hidden; }
  .map-base, .map-live { inset: auto; left: -42.5%; top: 12.6%; width: 185%; height: auto; aspect-ratio: 16 / 10; }
  .map-credit { margin-left: 0; }
  .cinfo div { grid-template-columns: 1fr; gap: 2px; }
  .foot-copy { margin-left: 0; text-align: left; }
}

/* ================= новинки веба 2026 — всё с запасным поведением =================
   Где новинки нет, страница работает как раньше (JS-запасной вариант в app.js). */

/* аккуратные переносы в абзацах (Chrome, Safari; в Firefox обычный перенос) */
p { text-wrap: pretty; }

/* разделы ниже первого экрана браузер не рисует, пока до них не дошли */
.about, .services, .photos, .contacts { content-visibility: auto; contain-intrinsic-size: auto 900px; }

@supports (animation-timeline: scroll()) {
  /* шапка: тень и линия появляются по ходу прокрутки, без слушателя scroll */
  .top { animation: top-lift linear both; animation-timeline: scroll(root); animation-range: 0 96px; }
  @keyframes top-lift { to { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(29, 36, 48, 0.35); } } /* taste-skill-ignore: липкая шапка */
}

@supports (animation-timeline: view()) {
  /* появление блоков привязано к прокрутке (scroll-driven animations, Baseline с октября 2026) */
  .js .rv { opacity: 1; transform: none; transition: none; animation: rv-in linear both; animation-timeline: view(); animation-range: entry 0% entry 85%; }
  @keyframes rv-in { from { opacity: 0; transform: translateY(28px); } }
  /* фото дома при уходе вверх мягко темнеет — без масштабирования и обрезки */
  .hero-media img { animation: hero-dim linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes hero-dim { to { filter: brightness(0.72) saturate(0.9); } }
}
@media (min-width: 761px) and (min-height: 561px) {
  @supports (animation-timeline: view()) {
    .hero-copy { animation: rise 900ms var(--ease) both, copy-out linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 70%; }
    @keyframes copy-out { to { opacity: 0; transform: translateY(-48px); } }
  }
}
/* каскад: каждый следующий элемент появляется чуть позже (sibling-index(), Baseline с августа 2026) */
@supports (animation-timeline: view()) and (width: calc(sibling-index() * 1px)) {
  .svc .rv, .gal .rv { animation-range: entry calc(mod(sibling-index(), 3) * 12%) entry calc(70% + mod(sibling-index(), 3) * 12%); }
}

/* смена фото номера и листание в просмотрщике — View Transitions */
@keyframes vt-out { to { opacity: 0; filter: blur(8px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(8px); } }
::view-transition-old(room-photo) { animation: vt-out 380ms var(--ease) both; }
::view-transition-new(room-photo) { animation: vt-in 380ms var(--ease) both; }
::view-transition-old(viewer-photo) { animation: vt-out 320ms var(--ease) both; }
::view-transition-new(viewer-photo) { animation: vt-in 320ms var(--ease) both; }
/* переход внутри одного блока (element-scoped, Chrome 147+) */
.room-gallery::view-transition-old(room-photo) { animation: vt-out 380ms var(--ease) both; }
.room-gallery::view-transition-new(room-photo) { animation: vt-in 380ms var(--ease) both; }
.viewer-frame::view-transition-old(viewer-photo) { animation: vt-out 320ms var(--ease) both; }
.viewer-frame::view-transition-new(viewer-photo) { animation: vt-in 320ms var(--ease) both; }

/* «Гости»: выпадающий список в стиле сайта (customizable select: Chrome, Safari 27; иначе обычный) */
@supports (appearance: base-select) {
  .q-field select, .field select, .q-field select::picker(select), .field select::picker(select) { appearance: base-select; }
  .q-field select::picker(select), .field select::picker(select) {
    border: 0; border-radius: var(--r); padding: 6px; margin-top: 6px; background: #fff; box-shadow: var(--shadow); /* taste-skill-ignore: выпадающий список */
    opacity: 0; translate: 0 -6px; transition: opacity 180ms ease, translate 200ms var(--ease), overlay 200ms allow-discrete, display 200ms allow-discrete;
  }
  .q-field select:open::picker(select), .field select:open::picker(select) { opacity: 1; translate: 0 0; }
  @starting-style { .q-field select:open::picker(select), .field select:open::picker(select) { opacity: 0; translate: 0 -6px; } }
  .q-field select option, .field select option { padding: 10px 12px; border-radius: 4px; font-weight: 600; cursor: pointer; }
  .q-field select option:checked, .field select option:checked { background: var(--red-soft); color: var(--red); }
  .q-field select option:hover, .field select option:hover, .q-field select option:focus-visible, .field select option:focus-visible { background: var(--soft); }
  .q-field select option::checkmark, .field select option::checkmark { color: var(--red); }
  .q-field select::picker-icon, .field select::picker-icon { color: var(--red); transition: rotate 200ms var(--ease); }
  .q-field select:open::picker-icon, .field select:open::picker-icon { rotate: 180deg; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .quick { animation: none; }
  .shot img, .room-main, .thumb img { transition: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .rv, .top, .hero-media img, .hero-copy { animation: none; }
  .viewer, .viewer::backdrop, .nav:popover-open { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .mp-pulse, .mp-walk { animation: none; }
  .mp-train, .mp-walker { display: none; }
}
