/* =====================================================================
   RIONIROS · base.css — дизайн-система «Книга дома»
   Спецификация: .claude/skills/rioniros-site/references/design-system.md

   Здесь всё общее для страниц сайта. Стили одной страницы —
   в assets/css/pages/<page>.css (подключается после этого файла).

    0. Шрифты            9. Подвал-колофон        18. Отзывы
    1. Токены           10. Глава: открытие       19. Галерея и просмотр
    2. Основа           11. Фото и подписи        20. Контакты
    3. Типографика      12. Секции главной        21. Формы
    4. Сетка            13. Карточка номера       22. Поиск дат
    5. Иконки           14. Номер или место       23. Состояния и тосты
    6. Ссылки, кнопки   15. Вечер (тёмная)        24. 404
    7. Шапка            16. Видео                 25. Движение
    8. Меню-оглавление  17. Оснащение             26. Адаптив
   ===================================================================== */

/* ---------- 0. Шрифты: Alegreya и Alegreya SC (OFL), свои файлы ----------
   Наборы cyrillic + latin; latin-ext у прямого текстового — ради знака ₽
   (браузер скачивает файл, только когда на странице есть такой символ). */
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/alegreya-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/alegreya-latin-wght-normal.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/alegreya-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/alegreya-cyrillic-wght-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("../fonts/alegreya-latin-wght-italic.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-sc-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alegreya-sc-latin-400-normal.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/alegreya-sc-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/alegreya-sc-latin-500-normal.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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Токены (design-system.md §3, без изменений) ---------- */
:root {
  /* Цвет (контраст указан к --paper) */
  --paper: #F1E9DC;           /* единственный фон страниц, меню и шапки после прокрутки */
  --paper-hi: #F7F1E7;        /* текст на фото и на терракоте; никогда не чистый белый */
  --ink: #2A1A11;             /* основной текст, контурные кнопки — 13.9:1 */
  --ink-2: #5C4535;           /* лиды, описания, иконки — 7.4:1 */
  --ink-3: #7A6150;           /* подписи, мета, подписи полей, нижняя линия полей — 4.8:1 */
  --rule: rgb(42 26 17 / .16);        /* волосяные разделители */
  --rule-strong: rgb(42 26 17 / .34); /* верхняя линия отзывов, трек прогресса */
  --gold: #9A7537;            /* ТОЛЬКО звёзды ★ и точка-разделитель; никогда не текст (3.5:1: звёзды — графика, нужно ≥ 3:1) */
  --terracotta: #A34B2A;      /* единственный акцент: главная кнопка, номера глав, буквица, фокус — 4.85:1 */
  --terracotta-deep: #873B1F; /* наведение на главную кнопку, текст ошибок — 6.9:1 */
  --night: #1F140D;           /* единственная тёмная секция («вечер») */
  --night-ink: #EFE5D3;       /* текст на --night — 14.5:1 */
  --night-ink-2: #BCA98F;     /* вторичный текст на --night — 7.9:1 */
  --night-rule: rgb(239 229 211 / .16);
  --night-gold: #C29A55;      /* номера глав и сноска на --night — 6.9:1 */
  --photo-bg: #D8CAB4;        /* фон под фото, пока оно грузится (#2C1E14 в тёмной секции) */

  /* Типографика */
  --font-text: "Alegreya", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sc: "Alegreya SC", "Alegreya", Georgia, serif;
  --fs-display: clamp(2.625rem, 1.35rem + 4.6vw, 5.75rem);   /* h1: 42 → 92 */
  --fs-h2: clamp(2.25rem, 1.6rem + 2.6vw, 4.25rem);          /* 36 → 68 */
  --fs-h3: clamp(1.5rem, 1.28rem + .9vw, 2.125rem);          /* 24 → 34 */
  --fs-quote: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);        /* главный отзыв */
  --fs-lead: clamp(1.25rem, 1.12rem + .5vw, 1.5625rem);      /* 20 → 25 */
  --fs-body: clamp(1.0625rem, 1rem + .25vw, 1.25rem);        /* 17 → 20 */
  --fs-small: clamp(.9375rem, .9rem + .12vw, 1rem);          /* 15 → 16 */
  --fs-label: 1rem;
  --fs-toc: clamp(1.875rem, 1.1rem + 2.4vw, 3.125rem);       /* пункты меню 30 → 50 */
  --fs-phone: clamp(2.25rem, 1.2rem + 4vw, 5rem);            /* крупный телефон в контактах */

  /* Сетка и отступы */
  --container: min(100vw - 2 * var(--margin), 1320px);
  --margin: clamp(20px, 4.4vw, 72px);
  --gutter: clamp(16px, 1.7vw, 28px);
  --col: calc((var(--container) - 11 * var(--gutter)) / 12);
  --hang: calc(var(--col) + var(--gutter));                   /* поле для номеров глав */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section: clamp(80px, 4rem + 5vw, 152px);                  /* только padding-top секций */
  --header-h: 76px;                                           /* 64px при ширине ≤ 900 */
  --search-h: 92px;                                           /* строка поиска дат под первым экраном */

  /* Движение */
  --ease-out: cubic-bezier(.2, .65, .2, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);

  /* Слои */
  --z-header: 100; --z-menu: 200; --z-lightbox: 300; --z-toast: 400;
}

/* ---------- 2. Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--paper);
  color-scheme: light;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  caret-color: var(--terracotta);
}
main { display: block; padding-bottom: var(--section); }
main[tabindex="-1"]:focus { outline: none; }                 /* цель ссылки «Перейти к содержанию» */
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
p, li, dd, figcaption, blockquote { text-wrap: pretty; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
::selection { background: rgb(163 75 42 / .2); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.nowrap { white-space: nowrap; }
.skip {
  position: absolute; left: var(--margin); top: -80px; z-index: calc(var(--z-menu) + 1);
  padding: 12px 18px;
  background: var(--ink); color: var(--paper-hi);
  font-family: var(--font-sc); letter-spacing: .05em; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- 3. Типографика ---------- */
.sc { font-family: var(--font-sc); text-transform: lowercase; letter-spacing: .045em; }
.label {
  font-family: var(--font-sc);
  font-size: var(--fs-label);
  font-style: normal;
  line-height: 1.4;
  letter-spacing: .07em;
  text-transform: lowercase;
  color: var(--ink-3);
}
.h1 { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -.008em; }
.h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -.006em; }
.h3 { font-size: var(--fs-h3); line-height: 1.15; }
.h1 em, .h2 em, .h3 em { font-style: italic; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.small { font-size: var(--fs-small); }
.muted { color: var(--ink-2); }
.meta { font-size: var(--fs-small); line-height: 1.5; color: var(--ink-3); }
.sep { display: inline-block; padding-inline: .45em; color: var(--gold); }  /* золотая точка «·»; inline-block — строка может переноситься у точки */

.prose p, .prose li { max-width: 34em; }
.prose p + p { text-indent: 1.6em; }                          /* книжный абзацный отступ вместо пустой строки */
.prose h2, .prose h3 { margin-top: 1.6em; margin-bottom: .5em; }
.prose h2 { font-size: var(--fs-h3); line-height: 1.15; }
.prose h3 { font-size: var(--fs-lead); line-height: 1.3; }
.prose h2 + p, .prose h3 + p { text-indent: 0; }
.prose ul, .prose ol { margin: .6em 0 .6em 1.2em; }
.prose ul { margin-left: 0; list-style: none; }               /* книжное тире вместо кружка */
.prose ul > li { position: relative; padding-left: 1.2em; }
.prose ul > li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
.prose ol { list-style: decimal outside; }
.prose li + li { margin-top: .3em; }
.prose a { text-decoration: underline; }
.prose a:hover { color: var(--terracotta); }

/* Буквица — один раз на странице: <p class="dropcap"><span class="sc">RIONIROS</span>…
   Первая буква — терракотовая буквица, остаток первого слова набран капителями. */
.dropcap::first-letter {
  -webkit-initial-letter: 3;
  initial-letter: 3;
  font-family: var(--font-text);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--terracotta);
  margin-right: .1em;
}
@supports not ((initial-letter: 3) or (-webkit-initial-letter: 3)) {
  .dropcap::first-letter { float: left; font-size: 4.25em; line-height: .78; margin: .07em .08em 0 0; }
}

/* Номер главы: висит на поле, на базовой линии первой строки заголовка
   (<h2 class="h2"><span class="num" aria-hidden="true">iii</span>Номера</h2>).
   Заголовок должен начинаться со 2-й колонки сетки — поле занимает 1-я. */
.num {
  display: inline-block;
  width: var(--hang);
  margin-left: calc(-1 * var(--hang));
  font-family: var(--font-sc);
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: lowercase;
  color: var(--terracotta);
  vertical-align: baseline;
}

/* Висячие кавычки: <blockquote class="hang"><p>«Текст…»</p></blockquote> */
.hang p:first-child { text-indent: -.42em; }

/* ---------- 4. Сетка ---------- */
.wrap { width: var(--container); margin-inline: auto; }
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding-top: var(--section); }
.section--rule { border-top: 1px solid var(--rule); margin-top: var(--section); }
/* Колонки (на ≤ 900 px все становятся во всю ширину) */
.col-full  { grid-column: 1 / -1; }
.col-wide  { grid-column: 2 / span 10; }
.col-main  { grid-column: 2 / span 7; }
.col-text  { grid-column: 2 / span 6; }
.col-media { grid-column: 1 / span 7; }
.col-aside { grid-column: 9 / span 4; }

/* ---------- 5. Иконки (только assets/icons/sprite.svg) ----------
   <svg class="i" aria-hidden="true"><use href="assets/icons/sprite.svg#i-bed"></use></svg> */
.i { width: 20px; height: 20px; flex: none; fill: currentColor; vertical-align: -.2em; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 24px; height: 24px; }

/* ---------- 6. Ссылки и кнопки ---------- */
/* Текстовая ссылка со стрелкой:
   <a class="link" href="about.html">О гостинице <svg class="i" aria-hidden="true"><use href="…#i-arrow-right"></use></svg></a> */
.link {
  display: inline-flex; align-items: center; gap: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  font-family: var(--font-text); font-size: 1.125rem; line-height: 1.3; letter-spacing: 0;
  text-decoration: none;
  background: none; border-top: 0; border-left: 0; border-right: 0; padding-inline: 0; padding-top: 0;
  cursor: pointer;
  transition: color .25s var(--ease-out);
}
.link { position: relative; }
.link::after { content: ""; position: absolute; inset: -8px -4px; }   /* зона нажатия выше строки, линия ссылки на месте */
.link .i { width: 20px; height: 20px; transition: transform .35s var(--ease-out); }
.link:hover { color: var(--terracotta); }
.link:hover .i { transform: translateX(4px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 30px;
  border: 1px solid transparent; border-radius: 0;
  background: none; color: inherit;
  font-family: var(--font-sc); font-size: 1.0625rem; font-weight: 400; line-height: 1.1; letter-spacing: .05em;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.btn .i { width: 18px; height: 18px; }
.btn--primary { background: var(--terracotta); border-color: var(--terracotta); color: var(--paper-hi); }
.btn--primary:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper-hi); }
.btn--ghost { border-color: rgb(247 241 231 / .62); color: var(--paper-hi); }       /* на фото */
.btn--ghost:hover { background: var(--paper-hi); border-color: var(--paper-hi); color: var(--ink); }
.btn--night { border-color: rgb(239 229 211 / .5); color: var(--night-ink); }      /* в тёмной секции */
.btn--night:hover { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
.btn--sm { min-height: 42px; padding: 0 20px; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn--ghost:focus-visible { outline-color: var(--paper-hi); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }

/* ---------- 7. Шапка ----------
   .hdr--solid — бумажная (внутренние страницы); .hdr--over — прозрачная поверх первого экрана
   главной, становится бумажной (.is-solid) после него. Разметку пишет tools/site/sync-layout.mjs. */
.notice { background: var(--paper); border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.notice__in { display: flex; align-items: baseline; gap: 10px; padding-block: 10px; font-size: var(--fs-small); font-style: italic; line-height: 1.45; }
.notice__in .i { width: 18px; height: 18px; color: var(--ink-3); transform: translateY(3px); }

.hdr {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--paper); color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: background-color .45s var(--ease-out), color .45s var(--ease-out), border-color .45s var(--ease-out);
}
.hdr--over:not(.is-solid) { background: transparent; color: var(--paper-hi); border-bottom-color: transparent; }
.hdr--over:not(.is-solid) :focus-visible { outline-color: var(--paper-hi); }
html:not(.js) .hdr--over { position: relative; }       /* без JS шапка не «залипает» прозрачной над текстом */
.hdr__in {
  width: var(--container); height: var(--header-h); margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-5);
}
.hdr__menu {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 14px;
  min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit;
  text-decoration: none; cursor: pointer;
}
.burger { position: relative; width: 26px; height: 11px; flex: none; }
.burger i { position: absolute; left: 0; right: 0; height: 1.25px; background: currentColor; }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5px; }
.burger i:nth-child(3) { bottom: 0; }
.cross { position: relative; width: 26px; height: 26px; flex: none; }
.cross::before, .cross::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 1.25px;
  background: currentColor; transform: rotate(45deg);
}
.cross::after { transform: rotate(-45deg); }
.hdr__label { font-family: var(--font-sc); font-size: 1.0625rem; letter-spacing: .07em; text-transform: lowercase; }

.wordmark {
  font-family: var(--font-sc); font-weight: 500;
  font-size: 1.625rem; line-height: 1; letter-spacing: .24em; padding-left: .24em;
  text-transform: lowercase; text-decoration: none; white-space: nowrap;
}
.wordmark img { height: 40px; width: auto; }
.hdr__aside { justify-self: end; display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); }
.hdr__link {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; font-size: 1.0625rem; line-height: 1.2; white-space: nowrap; text-decoration: none;
}
.hdr__link:hover .hdr__text { text-decoration: underline; }
.hdr__initials { font-family: var(--font-sc); font-weight: 500; letter-spacing: .08em; text-transform: lowercase; }
.hdr__book { border-color: var(--terracotta); background: var(--terracotta); color: var(--paper-hi); }
.hdr__book:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }
.hdr--over:not(.is-solid) .hdr__book { background: transparent; border-color: rgb(247 241 231 / .62); color: var(--paper-hi); }
.hdr--over:not(.is-solid) .hdr__book:hover { background: var(--paper-hi); border-color: var(--paper-hi); color: var(--ink); }
.hdr__book[aria-current="page"] { visibility: hidden; }   /* на booking.html: место в шапке сохраняется, кнопка не спорит с формой */

/* ---------- 8. Меню = оглавление (#menu) ----------
   Без JS открывается по :target, с JS — классом html.menu-open (layout.js ставит html.menu-js). */
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink);
  visibility: hidden; opacity: 0;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s;
}
html.menu-open .menu,
html:not(.menu-js) .menu:target { visibility: visible; opacity: 1; transition: opacity .45s var(--ease-out), visibility 0s; }
html.menu-open { overflow: hidden; }
.menu:focus { outline: none; }
.menu__top { border-bottom: 1px solid var(--rule); }
.menu__body { padding-block: clamp(28px, 5vh, 64px); align-items: start; }
.menu__nav { grid-column: 1 / span 7; }
.menu__nav > .label { display: block; margin-bottom: var(--s-4); padding-left: 3.4rem; }
.toc { border-top: 1px solid var(--rule); }
.toc > li { border-bottom: 1px solid var(--rule); }
.toc a {
  display: grid; grid-template-columns: 3.4rem 1fr; align-items: baseline;
  padding: .24em 0 .3em;
  font-size: var(--fs-toc); line-height: 1.12; text-decoration: none;
  transition: color .25s var(--ease-out);
}
.toc a:hover, .toc a:focus-visible { color: var(--terracotta); }
.toc a:hover .toc__t, .toc a:focus-visible .toc__t { font-style: italic; }
.toc a:focus-visible { outline-offset: -2px; }
.toc__n { font-family: var(--font-sc); font-size: 1.0625rem; letter-spacing: .08em; text-transform: lowercase; color: var(--ink-3); }
.toc a[aria-current] .toc__n { color: var(--terracotta); }
.toc a[aria-current] .toc__t::after {
  content: ""; display: inline-block; width: .9em; height: 1px; margin-left: .35em;
  background: var(--terracotta); vertical-align: middle;
}
.toc ol { margin-top: -.3em; padding-bottom: .55em; }
.toc ol a { padding: .2em 0; min-height: 28px; font-size: clamp(1.125rem, .95rem + .6vw, 1.4375rem); font-style: italic; color: var(--ink-2); }
.toc ol a:hover .toc__t, .toc ol a:focus-visible .toc__t { font-style: normal; }
.menu__aside { grid-column: 9 / span 4; }
.menu__preview {
  position: relative; aspect-ratio: 4 / 5; max-height: 52vh; width: 100%;
  overflow: hidden; background: var(--photo-bg);
}
.menu__preview img, .menu__preview .media-missing {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s var(--ease-out);
}
.menu__preview .is-active { opacity: 1; }
.menu__contacts { display: grid; gap: 4px; margin-top: var(--s-5); }
.menu__contacts a { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; text-decoration: none; justify-self: start; }
.menu__contacts a:hover span { text-decoration: underline; }
.menu__contacts .i { color: var(--ink-2); }
.menu__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); margin-top: var(--s-5); }

/* ---------- 9. Подвал-колофон ---------- */
.colophon {
  border-top: 1px solid var(--rule);
  padding-block: clamp(56px, 6vw, 96px) clamp(32px, 4vw, 48px);
  font-size: var(--fs-small); color: var(--ink-2);
}
.colophon .g { row-gap: var(--s-6); }
.colophon__brand { grid-column: 1 / span 4; }
.colophon__brand .wordmark { font-size: 1.5rem; padding-left: 0; color: var(--ink); }
.colophon__brand p { margin-top: var(--s-4); font-style: italic; max-width: 16em; }
.colophon__toc { grid-column: 6 / span 4; }
.colophon__toc ol { columns: 2; column-gap: var(--gutter); }
.colophon__guest { grid-column: 10 / span 3; }
.colophon li { break-inside: avoid; padding: 3px 0; }
.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--terracotta); text-decoration: underline; }
.colophon .label { margin-bottom: var(--s-3); }
.colophon__imprint {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3) var(--s-6);
  margin-top: clamp(16px, 3vw, 48px); padding-top: var(--s-5);
  border-top: 1px solid var(--rule); color: var(--ink-3);
}
.colophon__imprint a { color: inherit; }
.colophon__demo { font-style: italic; }

/* ---------- 10. Глава: открытие внутренней страницы ----------
   Бумажная шапка, номер главы висит на поле на линии h1, крупный h1,
   по желанию курсивная подстрока, лид, затем первое крупное фото или видео. */
.opener { padding-top: clamp(48px, 2rem + 5vw, 136px); }
.opener__head { grid-column: 2 / span 10; }
.opener__title { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.008em; max-width: 13em; }
.opener__sub { margin-top: var(--s-4); font-size: var(--fs-lead); font-style: italic; line-height: 1.4; color: var(--ink-2); max-width: 30em; }
.opener__lead { margin-top: clamp(24px, 1rem + 1.6vw, 44px); }
.opener__media { margin-top: clamp(48px, 2rem + 4vw, 112px); }
/* Глава без фото в открытии: первый блок (номера, галерея, форма, текст) стоит там же, где стояло бы фото */
.section--first { padding-top: clamp(48px, 2rem + 4vw, 112px); }
.opener__media .caption { max-width: 40em; }
/* Крошки над h1 страницы внутри главы — «iii · Номера → Название» (room.html):
   <nav class="crumbs"><ol><li><a href="rooms.html"><span class="crumbs__n">iii</span><span class="sep">·</span><span class="crumbs__t">Номера</span></a></li>
   <li>{иконка arrow-right .crumbs__to}<span aria-current="page">…</span></li></ol></nav>
   Строки идут текстом: длинное название переносится по словам, стрелка не повисает в начале строки. */
.crumbs { grid-column: 2 / span 10; margin-bottom: clamp(32px, 1.5rem + 2vw, 64px); font-size: var(--fs-small); color: var(--ink-3); }
.crumbs li { display: inline; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--terracotta); }
.crumbs__n { font-family: var(--font-sc); letter-spacing: .08em; text-transform: lowercase; }
.crumbs .sep { padding-inline: .4em; }
.crumbs__t { border-bottom: 1px solid var(--rule-strong); transition: border-color .25s var(--ease-out); }
.crumbs a:hover .crumbs__t { border-bottom-color: currentColor; }
.crumbs__to { display: inline-block; width: 16px; height: 16px; margin: 0 .7em; color: var(--ink-3); vertical-align: -.2em; }

/* ---------- 11. Фото, подписи, проявление ---------- */
.frame { position: relative; overflow: hidden; background: var(--photo-bg); }
.frame > img, .frame > video, .frame > picture, .frame > .media-missing {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.frame--4x5 { aspect-ratio: 4 / 5; }
.frame--3x4 { aspect-ratio: 3 / 4; }
.frame--2x3 { aspect-ratio: 2 / 3; }
.frame--3x2 { aspect-ratio: 3 / 2; }
.frame--4x3 { aspect-ratio: 4 / 3; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--wide { aspect-ratio: 21 / 9; }
.media-missing { display: block; width: 100%; height: 100%; background: var(--photo-bg); }
.caption { margin-top: var(--s-3); font-size: var(--fs-small); font-style: italic; line-height: 1.45; color: var(--ink-3); }

/* ---------- 12. Секции главной и внутренних страниц: заголовок раздела ---------- */
.section-head { align-items: end; margin-bottom: clamp(40px, 2rem + 3vw, 88px); row-gap: var(--s-4); }
.section-head > .h2 { grid-column: 2 / span 6; }
.section-head > .lead, .section-head > .link, .section-head > .section-head__aside { grid-column: 9 / span 4; justify-self: start; }
.section-head > .link { justify-self: end; }                  /* «Все отзывы →» — к правому краю, на линии заголовка */

/* ---------- 13. Карточка номера ----------
   ui.roomCard(room) → <article class="room-card">. Кадры меняет ui.mount (data-slides). */
.room-card { position: relative; min-width: 0; }
.room-card__media {
  display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--photo-bg);
}
.room-card__media img, .room-card__media .media-missing {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.03);
  transition: opacity 1.6s var(--ease-inout);
}
.room-card__media .is-active { opacity: 1; transform: scale(1); transition: opacity 1.6s var(--ease-inout), transform 7.5s linear; }
.room-card__media .is-leaving { opacity: 0; transform: scale(1); transition: opacity 1.6s var(--ease-inout); }
.room-card__progress { display: flex; gap: 6px; margin-top: 10px; }
.room-card__progress i { position: relative; flex: 1; height: 1px; overflow: hidden; background: var(--rule-strong); }
.room-card__progress i::after {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: scaleX(0); transform-origin: left center;
}
.room-card__progress i.is-done::after { transform: scaleX(1); }
.room-card__progress i.is-run::after { animation: rio-fill var(--slide, 5.2s) linear forwards; }
.room-card.is-static .room-card__progress { visibility: hidden; }
@keyframes rio-fill { to { transform: scaleX(1); } }
.room-card__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-5); align-items: end; padding-top: var(--s-5); }
.room-card__title { grid-column: 1 / -1; font-size: var(--fs-h3); line-height: 1.12; }
.room-card__title a { text-decoration: none; }
.room-card__text { grid-column: 1; margin-top: var(--s-2); color: var(--ink-2); max-width: 26em; }
.room-card__meta { grid-column: 1; margin-top: var(--s-3); font-size: var(--fs-small); line-height: 1.45; color: var(--ink-3); }
.room-card__price { color: var(--ink); white-space: nowrap; }
.room-card__more { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
.room-card__title a:hover { color: var(--terracotta); }
.room-card:has(.room-card__media:hover, .room-card__title a:hover) .room-card__more { background: var(--ink); color: var(--paper-hi); }  /* фото и заголовок — та же ссылка */
/* «Остановить смену фото» над сеткой карточек (WCAG 2.2.2) — ставит ui.mount */
.slides-toggle { display: flex; justify-content: flex-end; margin-bottom: var(--s-5); }
.slides-toggle .link { font-size: var(--fs-small); font-style: italic; color: var(--ink-2); }
.slides-toggle .link:hover { color: var(--terracotta); }
.room-grid { row-gap: clamp(56px, 2.5rem + 3vw, 104px); align-items: start; }
.room-grid > .room-card { grid-column: span 4; }

/* ---------- 14. «Номер целиком или спальное место» — типографская таблица ---------- */
.tbl { width: 100%; font-size: 1.1875rem; line-height: 1.35; }
.tbl caption { text-align: left; }
.tbl th, .tbl td { padding: 15px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; vertical-align: baseline; }
.tbl thead th {
  padding-top: 0; border-bottom-color: var(--rule-strong);
  font-family: var(--font-sc); font-size: .9375rem; letter-spacing: .07em; text-transform: lowercase; color: var(--ink-3);
}
.tbl td { color: var(--ink-2); }
.tbl td .i { width: 18px; height: 18px; color: var(--ink-2); vertical-align: -3px; }
.tbl .no { color: var(--ink-3); }
.tbl--modes td { width: 30%; }
.tbl a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.tbl a:hover { color: var(--terracotta); border-bottom-color: currentColor; }
.tbl th a { position: relative; }
.tbl th a::after { content: ""; position: absolute; inset: -12px 0; }   /* палец попадает в строку таблицы */

/* ---------- 15. Вечер — единственная тёмная секция страницы ---------- */
.evening { background: var(--night); color: var(--night-ink); padding-block: var(--section); margin-top: var(--section); }
.evening + .section { margin-top: 0; }
.evening .num { color: var(--night-gold); }
.evening .label { color: var(--night-gold); }
.evening .caption { color: var(--night-ink-2); }
.evening .frame, .evening .media-missing { background: #2C1E14; }
.evening .lead, .evening .muted { color: var(--night-ink-2); }
.evening .link { color: var(--night-ink); }
.evening .link:hover { color: var(--night-gold); }
.evening :focus-visible { outline-color: var(--night-gold); }
.evening ::selection { background: rgb(194 154 85 / .35); color: var(--night-ink); }
.venue { align-items: start; }
.venue + .venue { margin-top: clamp(96px, 4rem + 6vw, 176px); }
.venue__media { grid-column: 1 / span 7; }
.venue__text { grid-column: 9 / span 4; padding-top: clamp(0px, 4vw, 64px); }
.venue__text .h2 { margin-bottom: var(--s-3); }
.venue__kind { margin-bottom: var(--s-5); font-size: var(--fs-lead); font-style: italic; line-height: 1.4; color: var(--night-ink); }
.venue__text p:not(.venue__kind):not(.footnote) { color: var(--night-ink-2); max-width: 26em; }
.venue__hours { margin-top: var(--s-4); font-size: var(--fs-small); }
.venue__text .actions { margin-top: var(--s-6); }
.venue__aside { margin-top: var(--s-7); width: 74%; }
.venue--mirror .venue__text { grid-column: 2 / span 4; grid-row: 1; padding-top: clamp(0px, 9vw, 160px); }
.venue--mirror .venue__media { grid-column: 7 / span 6; grid-row: 1; }
/* Сноска «* Сакля — …»: на бумаге (ресторан) и в тёмной секции (главная) */
.footnote {
  margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--rule);
  font-size: var(--fs-small); font-style: italic; color: var(--ink-3); max-width: 22em;
}
.fn-ref { margin-left: 2px; font-size: .45em; font-style: normal; line-height: 0; vertical-align: super; color: var(--ink-3); }
.footnote sup { font-size: .8em; font-style: normal; line-height: 0; color: var(--ink-3); }
.evening .footnote { border-top-color: var(--night-rule); color: var(--night-ink-2); }
.evening .fn-ref, .evening .footnote sup { color: var(--night-gold); }
/* Строка заведения: «Часы работы уточняйте по телефону» (или часы из настроек) и под ней телефон */
.venue-line { margin-top: var(--s-5); font-size: var(--fs-small); font-style: italic; line-height: 1.55; color: var(--ink-3); }
.venue-line a { font-style: normal; color: var(--ink); text-decoration-color: var(--rule-strong); transition: color .25s var(--ease-out); }
.venue-line a:hover { color: var(--terracotta); text-decoration-color: currentColor; }
.evening .venue-line { color: var(--night-ink-2); }
.evening .venue-line a { color: var(--night-ink); text-decoration-color: rgb(239 229 211 / .38); }
.evening .venue-line a:hover { color: var(--night-gold); }

/* ---------- 16. Видео-петля с кнопкой «Пауза» (WCAG 2.2.2) ----------
   ui.video(slot) или <div class="vframe" data-video-slot="video-coffee"> — кнопку добавляет ui.mount. */
.vframe { position: relative; overflow: hidden; background: #2C1E14; }
.vframe > video, .vframe > img, .vframe > .media-missing, .vframe noscript img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vframe__toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--night-rule); background: var(--night); color: var(--night-ink);
  font-family: var(--font-sc); font-size: .9375rem; letter-spacing: .06em; line-height: 1;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.vframe__toggle .i { width: 14px; height: 14px; }
.vframe__toggle:hover { background: var(--night-ink); color: var(--night); }
.vframe__toggle:focus-visible { outline: 2px solid var(--night-gold); outline-offset: -5px; }   /* кольцо внутри тёмной кнопки: 6.9:1 при любом кадре */

/* ---------- 17. Оснащение: волосяные списки ---------- */
.list li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 11px 0; border-top: 1px solid var(--rule); line-height: 1.4;
}
.list li:last-child { border-bottom: 1px solid var(--rule); }
.list .i { width: 21px; height: 21px; color: var(--ink-2); transform: translateY(4px); }
.list-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); }
.list-cols .label { margin-bottom: var(--s-3); }

/* ---------- 18. Отзывы ---------- */
.review { border-top: 1px solid var(--rule-strong); padding-top: var(--s-5); min-width: 0; }
.stars { display: inline-flex; gap: 3px; color: var(--gold); vertical-align: middle; }
.stars .i { width: 14px; height: 14px; }
.review__quote { margin-top: var(--s-4); font-style: italic; line-height: 1.5; }
.review__quote p:first-child { text-indent: -.42em; }      /* висячая «ёлочка» */
.review--lead .review__quote { font-size: var(--fs-quote); line-height: 1.32; max-width: 19em; }
.review__sign { margin-top: var(--s-5); font-size: var(--fs-small); color: var(--ink-3); }
.review__name { font-family: var(--font-sc); font-weight: 500; font-size: 1.0625rem; letter-spacing: .06em; text-transform: lowercase; color: var(--ink); }
.review__reply { margin-top: var(--s-4); padding-left: 1.6em; font-size: var(--fs-small); font-style: italic; line-height: 1.5; color: var(--ink-2); max-width: 32em; }
.review__reply-by { font-style: normal; color: var(--ink-3); }
.review__demo { font-style: italic; }
.reviews-grid { align-items: start; row-gap: var(--s-7); }
.reviews-grid > .review { grid-column: 9 / span 4; }
.reviews-grid > .review--lead { grid-column: 2 / span 6; grid-row: 1 / span 2; }

/* ---------- 19. Галерея: коллаж и просмотр ---------- */
.collage {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 6rem + 9vw, 280px); grid-auto-flow: dense;
  gap: clamp(28px, 1rem + 2vw, 56px) var(--gutter);
}
.collage__item { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.collage__item--wide { grid-column: span 2; }
.collage__item--tall { grid-row: span 2; }
.collage__item .collage__open { flex: 1; min-height: 0; }
.collage__open {
  display: block; position: relative; width: 100%; padding: 0; border: 0;
  background: var(--photo-bg); overflow: hidden; cursor: zoom-in;
}
.collage__open img, .collage__open .media-missing { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s var(--ease-out); }
.collage__open:hover img { opacity: .92; }
.collage__open:focus-visible { outline-offset: 2px; }
.collage__item .caption { flex: none; }

.lightbox {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--night); color: var(--night-ink);
}
.lightbox::backdrop { background: rgb(18 11 6 / .7); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lightbox :focus-visible { outline-color: var(--night-gold); }
.lightbox__bar { width: var(--container); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: var(--header-h); }
.lightbox__count { font-family: var(--font-sc); letter-spacing: .08em; color: var(--night-ink-2); font-variant-numeric: lining-nums; }
.lightbox__close {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0;
  border: 0; background: none; color: inherit;
  font-family: var(--font-sc); font-size: 1.0625rem; letter-spacing: .07em; text-transform: lowercase;
}
.lightbox__stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); width: var(--container); margin-inline: auto; padding-bottom: var(--s-5); min-height: 0; }
.lightbox__figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; min-height: 0; touch-action: pan-y; }
.lightbox__img { position: relative; min-height: 0; }
.lightbox__img img, .lightbox__img .media-missing { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: none; }
.lightbox__caption { margin-top: var(--s-3); min-height: 1.45em; font-size: var(--fs-small); font-style: italic; color: var(--night-ink-2); text-align: left; }
.lightbox__nav {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid var(--night-rule); background: none; color: var(--night-ink);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.lightbox__nav:hover { background: var(--night-ink); color: var(--night); }
.lightbox__nav[disabled] { opacity: .35; pointer-events: none; }
html.lightbox-open { overflow: hidden; }

/* ---------- 20. Контакты: крупный телефон и список определений ---------- */
.contact-phone {
  display: inline-block; font-size: var(--fs-phone); line-height: 1.05; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap; transition: color .25s var(--ease-out);
}
.contact-phone:hover { color: var(--terracotta); }
.contact-list dt { margin-top: var(--s-5); }
.contact-list dt:first-child { margin-top: 0; }
.contact-list dd { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; }
.contact-list dd .i { color: var(--ink-2); transform: translateY(4px); }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }

/* ---------- 21. Формы ----------
   Подпись над полем капителями, поле без коробки — нижняя линия; ошибки — под полем.
   <div class="field"><label class="field__label" for="f-name">Имя</label>
     <input class="field__input" id="f-name" name="name" required></div> */
.form { display: grid; gap: var(--s-6); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
.form__grid > .field--full { grid-column: 1 / -1; }
.field { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label, .field > legend {
  padding: 0; font-family: var(--font-sc); font-size: .9375rem; line-height: 1.4;
  letter-spacing: .07em; text-transform: lowercase; color: var(--ink-3);
}
.field > legend { float: left; width: 100%; margin-bottom: 6px; }
.field__input {
  width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 8px 0 7px;
  border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0;
  background: transparent; color: var(--ink);
  font-size: 1.1875rem; line-height: 1.4; font-variant-numeric: lining-nums;
  appearance: none; -webkit-appearance: none;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
textarea.field__input { min-height: 7.5em; resize: vertical; line-height: 1.5; }
.field__input::placeholder { color: var(--ink-3); opacity: 1; font-style: italic; }
.field__input:focus-visible, .field__input:focus { outline: none; border-bottom-color: var(--terracotta); box-shadow: 0 2px 0 var(--terracotta); }
.field__input:disabled { opacity: .6; }
.select { position: relative; display: block; }
.select > select { padding-right: 28px; cursor: pointer; }
.select > .i { position: absolute; right: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--ink-2); pointer-events: none; }
.field__hint { font-size: var(--fs-small); font-style: italic; line-height: 1.45; color: var(--ink-3); }
.field__error { font-size: var(--fs-small); line-height: 1.45; color: var(--terracotta-deep); }
.field.is-invalid .field__input { border-bottom-color: var(--terracotta-deep); box-shadow: 0 1px 0 var(--terracotta-deep); }
.field.is-invalid > legend, .field.is-invalid .field__label { color: var(--terracotta-deep); }

/* Переключатели: кольца 15 px с терракотовой точкой; флажок — квадрат с терракотовым квадратом */
.choice { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.choice--col { flex-direction: column; }
.choice label, .check {
  display: inline-flex; align-items: center; gap: 10px; min-height: 32px;
  font-size: 1.125rem; line-height: 1.35; cursor: pointer;
}
.choice input, .check input {
  appearance: none; -webkit-appearance: none; flex: none;
  display: grid; place-content: center;
  width: 15px; height: 15px; margin: 0;
  border: 1px solid var(--ink-2); border-radius: 50%; background: transparent; cursor: pointer;
}
.choice input::before, .check input::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--terracotta);
  transform: scale(0); transition: transform .2s var(--ease-out);
}
.choice input:checked, .check input:checked { border-color: var(--terracotta); }
.choice input:checked::before, .check input:checked::before { transform: scale(1); }
.check { align-items: flex-start; font-size: var(--fs-small); color: var(--ink-2); }
.check input { border-radius: 0; margin-top: .3em; }
.check input::before { border-radius: 0; }
.check a { color: var(--ink); }
.choice input:focus-visible, .check input:focus-visible { outline-offset: 3px; }
.check.is-invalid input, .field.is-invalid .choice input { border-color: var(--terracotta-deep); }
.form .check + .field__error { margin-top: calc(-1 * var(--s-5)); }
.form__error { padding: var(--s-4) 0; border-top: 1px solid var(--terracotta-deep); color: var(--terracotta-deep); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); }
.form__note { font-size: var(--fs-small); font-style: italic; color: var(--ink-3); }
.form__note a { color: var(--ink); }
.form.is-sending { cursor: progress; }
.form.is-sending .field__input { opacity: .7; }
/* Необязательное поле: <label class="field__label" for="…">E-mail <span class="field__opt">необязательно</span></label> */
.field__opt { margin-left: .35em; font-family: var(--font-text); font-style: italic; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
/* Форма отправлена: спокойное подтверждение на месте формы (сообщение, отзыв); фокус ставит скрипт
   <div class="done" tabindex="-1"><p class="done__title">…</p><p class="done__text">…</p><a class="link">…</a></div> */
.done { max-width: 34em; padding-top: var(--s-5); border-top: 1px solid var(--rule-strong); }
.done:focus { outline: none; }
.done:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 6px; }
.done__title { font-size: var(--fs-lead); line-height: 1.35; }
.done__text { margin-top: var(--s-3); color: var(--ink-2); }
.done .link { margin-top: var(--s-5); }
/* Ловушка для ботов: поле website вне экрана (не display:none — его видят боты) */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 22. Поиск дат — полоса без коробки ----------
   <form class="search" data-date-search action="booking.html"> … (разметка — в index.html) */
.search {
  display: grid; grid-template-columns: 1fr 1fr .8fr 1.5fr auto; align-items: stretch;
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule);
}
.search__field { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; margin: 0; padding: 14px 24px 14px 0; border: 0; }
.search__field + .search__field { padding-left: 24px; border-left: 1px solid var(--rule); }
.search__field > legend { float: left; width: 100%; }
.search__label { padding: 0; font-family: var(--font-sc); font-size: .9375rem; letter-spacing: .07em; text-transform: lowercase; color: var(--ink-3); }
.search__control {
  width: 100%; min-width: 0; min-height: 32px; padding: 2px 0;
  border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font-size: 1.25rem; line-height: 1.4; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.search__control:focus-visible { outline: none; box-shadow: 0 2px 0 var(--terracotta); }
.search .select > select { padding-right: 26px; }
.search .choice { gap: 6px 22px; padding-top: 2px; }
.search .choice label { font-size: 1.125rem; white-space: nowrap; min-height: 32px; }
.search__submit { align-self: center; margin-left: 24px; }
/* Дата: нативное поле под русской подписью «28 октября, ср» (видна только с JS) */
.date { position: relative; display: block; }
.date__out { display: none; }
html.js .date.is-ready > input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
html.js .date.is-ready > .date__out { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; padding: 2px 0; font-size: 1.25rem; line-height: 1.4; white-space: nowrap; }
.date__wd { color: var(--ink-3); }
.date__out .i { color: var(--ink-2); }
html.js .date.is-ready:focus-within { box-shadow: 0 2px 0 var(--terracotta); }
/* С клавиатуры видно само поле дд.мм.гггг и активный сегмент; мышь и палец открывают календарь, как раньше */
html.js .date.is-ready.is-keyboard > input { opacity: 1; background: var(--paper); color: var(--ink); }
.date.is-ready.field__input { display: flex; align-items: center; }
.date.is-ready.field__input > .date__out { width: 100%; font-size: 1.1875rem; }

/* ---------- 23. Состояния загрузки и тосты ---------- */
.state { padding-block: var(--s-6); font-style: italic; color: var(--ink-3); max-width: 34em; }
.state--error { color: var(--terracotta-deep); }
.state .link { margin-left: .6em; font-style: normal; color: var(--ink); }
.evening .state { color: var(--night-ink-2); }
.toasts {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: var(--z-toast);
  display: grid; gap: 10px; justify-items: center;
  width: min(100vw - 32px, 460px); transform: translateX(-50%); pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 14px 18px; border: 1px solid var(--rule-strong);
  background: var(--paper-hi); color: var(--ink);
  font-size: var(--fs-small); line-height: 1.45; pointer-events: auto;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.toast .i { width: 18px; height: 18px; margin-top: 2px; color: var(--ink-2); }
.toast > p { flex: 1; min-width: 0; }
.toast__close {
  flex: none; align-self: center; min-height: 28px; margin: -4px -8px -4px 0; padding: 0 8px;
  border: 0; background: none; color: var(--ink-2);
  font-family: var(--font-sc); font-size: 1rem; letter-spacing: .06em; text-transform: lowercase;
}
.toast__close:hover { color: var(--ink); text-decoration: underline; }
.toast--error .i { color: var(--terracotta-deep); }
.toast.is-entering, .toast.is-leaving { opacity: 0; transform: translateY(8px); }

/* Пока страница дорисовывает содержимое, колофон не мелькает на первом экране (сдвиг макета) */
html.js #main { min-height: calc(100svh - var(--header-h)); }

/* ---------- 24. 404 ---------- */
.lost__list { grid-column: 2 / span 7; }
.lost__more { margin-top: var(--s-7); }
.lost-list { border-top: 1px solid var(--rule); }
.lost-list li { border-bottom: 1px solid var(--rule); }
.lost-list a { display: grid; grid-template-columns: 3.4rem 1fr; align-items: baseline; padding: .4em 0; font-size: var(--fs-lead); text-decoration: none; }
.lost-list a:hover { color: var(--terracotta); }
.lost-list a:hover span:last-child { font-style: italic; }

/* ---------- 25. Движение ---------- */
/* Проявление крупных фото: скрытие включает только JS (html.reveal-on), страховка — 4 с */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-on .reveal { opacity: 0; }                     /* скрытие — сразу, проявление — 1.4 с */
  html.reveal-on .reveal.is-in { opacity: 1; transition: opacity 1.4s var(--ease-out); }
  .menu .toc > li { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
  html.menu-open .menu .toc > li,
  html:not(.menu-js) .menu:target .toc > li { opacity: 1; transform: none; }
  html.menu-open .toc > li:nth-child(2) { transition-delay: .04s; }
  html.menu-open .toc > li:nth-child(3) { transition-delay: .08s; }
  html.menu-open .toc > li:nth-child(4) { transition-delay: .12s; }
  html.menu-open .toc > li:nth-child(5) { transition-delay: .16s; }
  html.menu-open .toc > li:nth-child(6) { transition-delay: .2s; }
  html.menu-open .toc > li:nth-child(7) { transition-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .room-card__media img, .room-card__media .media-missing { transition: none; transform: none; }
  .room-card__progress { visibility: hidden; }
  .menu, .toast, .link .i { transition: none; }
}

/* ---------- 26. Адаптив ---------- */
@media (max-width: 1100px) {
  .hdr__link--phone .hdr__text { display: none; }
  .search { grid-template-columns: 1fr 1fr 1fr; }
  .search > .search__field:nth-child(4) { grid-column: 1 / 3; padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .search__submit { grid-column: 3; justify-self: stretch; margin: 0 0 0 24px; }
  .room-grid .room-card__body { grid-template-columns: minmax(0, 1fr); }
  .room-grid .room-card__more { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--s-5); }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .hdr__link--acc .hdr__text:not(.hdr__initials) { display: none; }
  /* «Меню» и «Закрыть» скрыты только визуально: это имя кнопки для скринридера (WCAG 4.1.2) */
  .hdr__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hdr__book { display: none; }
  .wordmark { font-size: 1.375rem; }
  .num { width: auto; margin: 0 .6em 0 0; font-size: 1.125rem; }
  .col-full, .col-wide, .col-main, .col-text, .col-media, .col-aside,
  .opener__head, .crumbs, .lost__list,
  .section-head > .h2, .section-head > .lead, .section-head > .link, .section-head > .section-head__aside,
  .venue__media, .venue__text, .venue--mirror .venue__text, .venue--mirror .venue__media,
  .reviews-grid > .review, .reviews-grid > .review--lead,
  .colophon__brand, .colophon__toc, .colophon__guest,
  .menu__nav, .menu__aside { grid-column: 1 / -1; }
  .section-head > .link { justify-self: start; }
  .venue--mirror .venue__text { grid-row: 2; padding-top: var(--s-7); }
  .venue__text { padding-top: var(--s-7); }
  .venue__aside { display: none; }
  .reviews-grid > .review--lead { grid-row: auto; }
  .room-grid { row-gap: var(--s-8); }
  .room-grid > .room-card { grid-column: span 6; }
  .menu__aside { margin-top: var(--s-6); }
  .menu__preview { display: none; }
  .menu__nav > .label { padding-left: 2.6rem; }
  .toc a { grid-template-columns: 2.6rem 1fr; }
  .lost-list a { grid-template-columns: 2.6rem 1fr; }
  .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 30vw, 260px); }
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .lightbox__stage { grid-template-columns: minmax(0, 1fr); }
  .lightbox__nav { position: absolute; bottom: calc(var(--s-5) + 2.2em); z-index: 1; background: var(--night); }
  .lightbox__nav--prev { left: 0; }
  .lightbox__nav--next { right: 0; }
  /* подпись — сразу под фото, а не внизу экрана под стрелками: рамка повторяет пропорции снимка (--lb-ar ставит ui.lightbox) */
  .lightbox__figure { height: auto; grid-template-rows: auto auto; align-self: center; }
  .lightbox__img { aspect-ratio: var(--lb-ar, 3 / 2); max-height: calc(100svh - var(--header-h) - 9rem); }
}
@media (max-width: 640px) {
  /* Заголовки по слогам не переносим (ломало слоган «стано-/вится»); слово длиннее строки
     переносится без дефиса — страховка от горизонтальной прокрутки */
  .h1, .h2, .opener__title { overflow-wrap: break-word; }
  .hdr__in { grid-template-columns: auto 1fr auto; gap: var(--s-3); }
  .wordmark { justify-self: center; letter-spacing: .2em; padding-left: .2em; }
  .hdr__aside { gap: 6px; }
  .hdr__link { justify-content: center; min-width: 44px; }
  .search { grid-template-columns: 1fr 1fr; }
  .search__field + .search__field { padding-left: 16px; }
  .search > .search__field:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .search > .search__field:nth-child(4) { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .search__submit { grid-column: 1 / -1; justify-self: stretch; margin: 4px 0 16px; }
  .room-grid > .room-card { grid-column: 1 / -1; }
  .room-card__body { grid-template-columns: minmax(0, 1fr); }
  .room-card__more { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--s-5); }
  .list-cols { grid-template-columns: minmax(0, 1fr); }
  .actions > .btn { flex: 1 1 100%; }
  .collage { gap: var(--s-5) var(--gutter); }
  .collage__item--wide { grid-column: 1 / -1; }
  .tbl { font-size: 1.0625rem; }
  /* зоны нажатия на телефоне — не меньше 44 px */
  .vframe__toggle { min-height: 44px; }
  .search__control, .search .date.is-ready > .date__out, .search .choice label { min-height: 44px; }
  .colophon li { padding: 0; }
  .colophon li a { display: inline-block; padding-block: 12px; }
}
@media (max-width: 420px) {
  .btn { white-space: normal; padding-block: 12px; }   /* длинная кнопка переносится, а не вылезает за экран (320 px, увеличенные интервалы) */
}
@media (max-width: 360px) {
  /* «29 октября, чт» не помещается в половину строки — поиск дат в одну колонку */
  .search { grid-template-columns: minmax(0, 1fr); }
  .search > .search__field { grid-column: 1; padding-left: 0; border-left: 0; }
  .search > .search__field + .search__field { border-top: 1px solid var(--rule); }
}
