/* Чайный театр Пурпурного Дракона — общий стиль.
   Принципы — docs/design-principles.md: дорого, благородная старина, в основе — фото чайной доски.
   Каждая страница — один экран: фото на весь экран, текст в тёмной зоне кадра,
   предметы на фото — навигация. Подробности и формы — во всплывающих окнах. */

:root {
  color-scheme: dark;

  /* Палитра снята с референса, без синего */
  --ink: #0e0b07;          /* сажа */
  --lacquer: #1d1813;      /* морёный дуб */
  --lacquer-hi: #27231d;   /* старое дерево */
  --line: #3f3931;         /* сырой камень */
  --paper: #d2d2c5;        /* шамот — основной текст */
  --rice: #b3ae9c;         /* рисовая глазурь — второстепенный текст */
  --mist: #928f81;         /* пепел — подписи */
  --gold: #ab8865;         /* старое золото — линии, ссылки */
  --gold-dim: #6b5a45;     /* потёртая бронза — рамки */
  --copper: #734d31;       /* обожжённая охра — основная кнопка */
  --copper-hover: #7f5536;
  --rust: #9d5d3c;         /* ржавая глина — крупные акценты */
  --danger: #e8a598;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;

  --t-small: 0.9375rem;
  --t-meta: 1rem;
  --t-body: 1.125rem;
  --t-lead: 1.25rem;
  --t-h1: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  --wrap: 1320px;
  --gutter: 20px;
  --radius: 1px;
  --ease: cubic-bezier(0.25, 0.6, 0.2, 1);
}

@media (min-width: 600px) {
  :root { --gutter: 40px; }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Плёночное зерно поверх всего — поверхность «шершавая», как шамот */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--paper); }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--paper);
  color: var(--ink);
}
.skip:focus { left: var(--gutter); }

/* ---------- Фото — основа экрана ---------- */

/* Кадр 3:2 вписывается «под обрез» и прижат к правому нижнему углу:
   предметы всегда видны, тёмная зона слева сверху уходит под текст.
   Точки-указатели живут в той же рамке, поэтому не съезжают с предметов. */
.photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  container-type: size;
}

.photo__frame {
  --fw: max(100cqw, 150cqh);
  --fh: max(100cqh, 66.667cqw);
  position: absolute;
  bottom: 0;
  left: calc((100cqw - var(--fw)) * var(--anchor, 1));
  width: var(--fw);
  height: var(--fh);
}

.photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Тень от текста: затемнение слева и сверху, виньетка по краям */
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 11, 7, 0.88) 0%, rgba(14, 11, 7, 0.55) 32%, rgba(14, 11, 7, 0) 58%),
    linear-gradient(180deg, rgba(14, 11, 7, 0.7) 0%, rgba(14, 11, 7, 0) 22%, rgba(14, 11, 7, 0) 82%, rgba(14, 11, 7, 0.85) 100%),
    radial-gradient(ellipse 120% 90% at 65% 60%, transparent 55%, rgba(14, 11, 7, 0.55) 100%);
}

/* Посадочные: под прейскурантом левая половина кадра темнее, чтобы строки читались */
.photo--dim .photo__img { filter: brightness(0.8) saturate(0.95); }
/* Кадр главной на посадочных: крупнее и правее, чтобы предметы ушли из-под прейскуранта */
.photo--dim .photo__frame { --fw: max(122cqw, 150cqh); --fh: max(100cqh, 81.334cqw); }
.photo--dim::after,
.photo--menu::after {
  background:
    linear-gradient(90deg, rgba(14, 11, 7, 0.94) 0%, rgba(14, 11, 7, 0.86) 38%, rgba(14, 11, 7, 0.2) 62%, rgba(14, 11, 7, 0) 72%),
    linear-gradient(180deg, rgba(14, 11, 7, 0.7) 0%, rgba(14, 11, 7, 0) 22%, rgba(14, 11, 7, 0) 82%, rgba(14, 11, 7, 0.85) 100%);
}


/* Точки-указатели на предметах */
.spots { position: absolute; inset: 0; z-index: 2; }

.spot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  color: var(--paper);
  text-decoration: none;
  animation: fade-in 0.3s var(--ease) both;
  animation-delay: var(--delay, 0.2s);
}

.spot__mark {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0 2.5px, rgba(14, 11, 7, 0.45) 3.5px);
  box-shadow: 0 0 0 6px rgba(171, 136, 101, 0.12);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.spot__label {
  position: absolute;
  display: grid;
  gap: 1px;
  min-width: max-content;
  padding: 8px 16px 8px;
  background: rgba(14, 11, 7, 0.74);
  border: 1px solid rgba(171, 136, 101, 0.32);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

/* Тонкая линия от точки к подписи */
.spot__label::before {
  content: "";
  position: absolute;
  background: rgba(171, 136, 101, 0.6);
}

.spot--right .spot__label { left: calc(100% + 24px); top: 50%; transform: translateY(-50%); }
.spot--right .spot__label::before { right: 100%; top: 50%; width: 24px; height: 1px; }
.spot--left .spot__label { right: calc(100% + 24px); top: 50%; transform: translateY(-50%); text-align: right; }
.spot--left .spot__label::before { left: 100%; top: 50%; width: 24px; height: 1px; }
.spot--top .spot__label { bottom: calc(100% + 24px); left: 50%; transform: translateX(-50%); text-align: center; }
.spot--top .spot__label::before { top: 100%; left: 50%; width: 1px; height: 24px; }
.spot--bottom .spot__label { top: calc(100% + 24px); left: 50%; transform: translateX(-50%); text-align: center; }
.spot--bottom .spot__label::before { bottom: 100%; left: 50%; width: 1px; height: 24px; }

.spot__title { font-size: 1.1875rem; font-weight: 500; line-height: 1.2; }
.spot__price { color: var(--rice); font-size: var(--t-small); line-height: 1.3; }

.spot:hover .spot__mark,
.spot:focus-visible .spot__mark { box-shadow: 0 0 0 9px rgba(171, 136, 101, 0.22); transform: scale(1.08); }
.spot:hover .spot__label,
.spot:focus-visible .spot__label { border-color: var(--gold); background: rgba(14, 11, 7, 0.88); }
.spot:focus-visible { outline: none; }
.spot:focus-visible .spot__label { outline: 1px solid var(--gold); outline-offset: 3px; }

/* ---------- Шапка ---------- */

.site-header {
  position: relative;
  z-index: 30;
  flex: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-right: auto;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--paper); }

.brand__mark { flex: none; width: 40px; height: 28px; color: var(--gold); }

.brand__name { font-size: 1.0625rem; font-weight: 500; line-height: 1.15; }

.nav__list {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 12px 0;
  color: var(--rice);
  font-size: 1.0625rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav__link:hover { color: var(--paper); }
.nav__link[aria-current="page"] { color: var(--paper); border-bottom-color: var(--gold); }

.nav__item--cta { display: none; }

.nav__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: rgba(14, 11, 7, 0.4);
  color: var(--paper);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  font: 500 var(--t-meta) / 1 var(--serif);
  cursor: pointer;
}

.nav__bars {
  position: relative;
  width: 16px;
  height: 10px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.nav__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 4px;
  border-top: 1px solid currentColor;
}

@media (max-width: 899px) {
  .site-header__inner { gap: 16px; min-height: 64px; }
  .nav__toggle { display: inline-flex; }
  .site-header__inner .header-cta { display: none; }

  .nav__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav__list.is-open { display: flex; }

  .nav__link { padding: 16px 0; font-size: 1.25rem; border-bottom: 1px solid var(--line); }
  .nav__link[aria-current="page"] { border-bottom-color: var(--line); color: var(--gold); }

  .nav__item--cta { display: block; padding-top: 20px; }
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  background: var(--copper);
  color: var(--paper);
  border: 1px solid var(--copper);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(171, 136, 101, 0.45);
  font: 600 1.0625rem / 1.2 var(--serif);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: var(--copper-hover); border-color: var(--copper-hover); color: var(--paper); }

.btn--ghost {
  background: rgba(14, 11, 7, 0.35);
  border-color: var(--gold-dim);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(14, 11, 7, 0.6); border-color: var(--gold); }

.btn--small { min-height: 44px; padding: 0 16px; font-size: var(--t-meta); }

.btn[disabled] { opacity: 0.4; cursor: default; }

/* ---------- Экран ---------- */

/* main не позиционирован: фото растягивается на весь body — под шапку и строку контактов. */
.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.intro {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 38rem;
  padding-block: clamp(20px, 5vh, 64px) 24px;
  animation: rise-in 0.3s var(--ease) both;
}

.wrap.intro { margin-left: max(var(--gutter), (100% - var(--wrap)) / 2); }

.title { font-size: var(--t-h1); font-weight: 400; }

.lead {
  max-width: 34em;
  margin-top: 16px;
  color: var(--rice);
  font-size: var(--t-lead);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.crumb { display: none; }

/* ---------- Прейскурант (тарифы на посадочных) ---------- */

.menu {
  width: 100%;
  margin: 24px 0 0;
  padding: 0 16px;
  list-style: none;
  background: rgba(14, 11, 7, 0.62);
  border: 1px solid rgba(171, 136, 101, 0.22);
  box-shadow: inset 0 1px 0 rgba(210, 210, 197, 0.05);
}
.menu__item:last-child { border-bottom: 0; }

.menu__item {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(24px, 1fr) auto auto;
  gap: 2px 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid rgba(171, 136, 101, 0.18);
}

.menu__title { font-size: 1.375rem; font-weight: 500; line-height: 1.2; }

/* Пунктир-«отточие» между названием и ценой, как в старом меню */
.menu__leader { align-self: end; margin-bottom: 0.45em; border-bottom: 1px dotted rgba(171, 136, 101, 0.45); }

.menu__price { color: var(--paper); font-size: 1.25rem; white-space: nowrap; }
.menu__price small { color: var(--mist); font-size: var(--t-small); }

.menu__meta { grid-column: 1 / 4; color: var(--mist); font-size: var(--t-small); }

.menu__btn {
  grid-row: 1 / 3;
  grid-column: 4;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  padding: 0 16px;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  font: 600 var(--t-small) / 1 var(--serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.menu__btn:hover { border-color: var(--gold); color: var(--paper); }

.menu-note { margin-top: 12px; color: var(--mist); font-size: var(--t-small); }

/* Афиша — тот же прейскурант, с датой */
.menu__date { grid-column: 1 / 4; color: var(--gold); font-size: var(--t-small); letter-spacing: 0.02em; }
.menu--events .menu__item { grid-template-columns: minmax(0, auto) minmax(24px, 1fr) auto auto; }

.menu__item--skeleton .skel { display: block; height: 14px; background: var(--lacquer-hi); }
.menu__item--skeleton .skel--title { grid-column: 1 / 4; width: 60%; height: 20px; }
.menu__item--skeleton .skel--meta { grid-column: 1 / 4; width: 35%; }

.pager { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.pager__status { margin-right: auto; color: var(--mist); font-size: var(--t-small); }

/* ---------- Строка контактов ---------- */

.bar {
  position: relative;
  z-index: 3;
  flex: none;
  color: var(--rice);
  font-size: var(--t-small);
}

.bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  min-height: 52px;
  padding-block: 0;
  border-top: 1px solid rgba(171, 136, 101, 0.22);
}

.bar a { display: inline-block; padding-block: 12px; color: var(--paper); text-decoration: none; }
.bar a:hover { color: var(--gold); text-decoration: underline; }
.bar__legal { margin-left: auto; }
.bar .bar__legal { color: var(--mist); }

/* ---------- Содержимое окон «Подробнее» ---------- */

.steps {
  display: grid;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step { counter-increment: step; padding: 16px 0 20px; border-top: 1px solid var(--gold-dim); }

.step::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.step__title { margin-bottom: 8px; font-size: 1.3125rem; font-weight: 500; line-height: 1.25; }
.step p { color: var(--rice); font-size: var(--t-meta); }

@media (min-width: 600px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.terms { display: grid; gap: 28px; }

@media (min-width: 600px) {
  .terms--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.terms__title { margin-bottom: 12px; font-size: 1.3125rem; font-weight: 500; }

.ticks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.ticks li { position: relative; padding-left: 24px; color: var(--rice); font-size: var(--t-meta); }

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.ticks strong { color: var(--paper); font-weight: 600; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  position: relative;
  padding: 16px 40px 16px 0;
  font-size: 1.25rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { padding-bottom: 16px; color: var(--rice); font-size: var(--t-meta); }

.dialog__section + .dialog__section { margin-top: 32px; }
.dialog__h3 { margin-bottom: 16px; font-size: 1.5rem; font-weight: 500; }
.dialog__note { color: var(--mist); font-size: var(--t-meta); }

/* ---------- Формы ---------- */

.form { display: grid; gap: 16px; }

.field { display: grid; gap: 8px; align-content: start; }
.field label { color: var(--rice); font-size: var(--t-meta); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: 500 var(--t-body) / 1.4 var(--serif);
}

.field textarea { resize: vertical; min-height: 80px; }

.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ab8865' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.field__hint { color: var(--mist); font-size: var(--t-small); }
.field__error { color: var(--danger); font-size: var(--t-small); }
.field.is-invalid input { border-color: var(--danger); }

.field-row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.check { display: flex; gap: 12px; align-items: flex-start; color: var(--rice); font-size: var(--t-meta); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--copper); }

.form__submit { justify-self: start; }
.form__legal { color: var(--mist); font-size: var(--t-small); }
.form__error { color: var(--danger); font-size: var(--t-meta); }

.form-done { display: grid; gap: 16px; justify-items: start; }
.form-done:focus { outline: none; }
.form-done__title { font-size: 2rem; }
.form-done p { color: var(--rice); }

.demo-note {
  padding: 8px 16px;
  border-left: 2px solid var(--gold-dim);
  background: var(--lacquer-hi);
  color: var(--mist);
  font-size: var(--t-small);
}

/* ---------- Всплывающие окна — матовый камень ---------- */

.dialog {
  width: min(560px, 100% - 2 * var(--gutter));
  max-height: calc(100dvh - 32px);
  padding: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(171, 136, 101, 0.06), transparent 60%),
    var(--lacquer);
  color: var(--paper);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.dialog--wide { width: min(1040px, 100% - 2 * var(--gutter)); }

.dialog[open] { animation: dialog-in 0.2s var(--ease); }
.dialog::backdrop { background: rgba(8, 6, 4, 0.78); }

.dialog__inner { display: grid; gap: 20px; padding: clamp(24px, 4vw, 40px); }

.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog__title { font-size: 2rem; }
.dialog__sub { margin-top: 8px; color: var(--gold); }
.dialog__note { margin: 0 0 12px; color: var(--mist); font-size: var(--t-meta); line-height: 1.4; }
.dialog__note a { color: inherit; }

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn[data-tip] { position: relative; }
.icon-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 4px 8px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--gold-dim);
  font-size: var(--t-small);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease);
}
.icon-btn[data-tip]:hover::after,
.icon-btn[data-tip]:focus-visible::after { opacity: 1; }

@media (min-width: 600px) {
  .dialog:has(form[data-booking]) { width: min(720px, 100% - 2 * var(--gutter)); }
  .dialog .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 16px; }
  .dialog .field-row { display: contents; }
  .dialog .form > :not(.field):not(.field-row):not(input[type="hidden"]) { grid-column: 1 / -1; }
  .dialog .check { align-self: center; grid-column: auto !important; }
}

@media (min-width: 900px) {
  .dialog--wide .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dialog--wide .faq { columns: 2; column-gap: 32px; border-top: 0; }
  .dialog--wide .faq details { break-inside: avoid; border-top: 1px solid var(--line); border-bottom: 0; }
}

@media (max-height: 800px) {
  .dialog__inner { gap: 16px; padding: 20px 28px; }
  .dialog__title { font-size: 1.75rem; }
  .dialog .field__hint { display: none; }
  .dialog .form { row-gap: 12px; }
  .dialog .field input, .dialog .field select { min-height: 42px; padding-block: 8px; }
  .step { padding: 12px 0 8px; }
  .step::before { margin-bottom: 8px; font-size: 1.5rem; }
  .faq summary { padding: 8px 36px 8px 0; font-size: 1.125rem; }
  .dialog__section + .dialog__section { margin-top: 16px; }
  .dialog__h3 { margin-bottom: 8px; font-size: 1.3125rem; }
  .ticks { gap: 8px; }
}

@keyframes dialog-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Один экран без прокрутки (ноутбуки и десктопы) ---------- */

@media (min-width: 900px) and (min-height: 600px) {
  :root {
    --t-h1: clamp(2.5rem, min(4.6vw, 7.6vh), 5rem);
    --t-lead: clamp(1.125rem, min(1.5vw, 2.6vh), 1.375rem);
  }

  html, body { height: 100%; overflow: hidden; }
  body { min-height: 0; }

  .lead { margin-top: clamp(8px, 2vh, 20px); }
  .actions { margin-top: clamp(16px, 3vh, 32px); }
  .menu { margin-top: clamp(16px, 2.6vh, 24px); }
  .menu__item { padding-block: clamp(8px, 1.3vh, 12px); }
}

@media (min-width: 900px) and (min-height: 600px) and (max-height: 760px) {
  .menu__meta, .menu-note { display: none; }
}

/* ---------- Телефоны и планшеты ---------- */

@media (max-width: 899px) {
  :root { --t-h1: clamp(2.125rem, 9vw, 3rem); }

  .intro { max-width: none; padding-block: 12px 12px; }
  .lead { margin-top: 8px; font-size: 1.0625rem; line-height: 1.45; }
  .actions { flex-wrap: nowrap; margin-top: 16px; gap: 8px; }
  .actions .btn { flex: 1 1 0; min-height: 46px; padding: 0 8px; font-size: var(--t-meta); }

  .photo::after {
    background:
      linear-gradient(180deg, rgba(14, 11, 7, 0.92) 0%, rgba(14, 11, 7, 0.7) 40%, rgba(14, 11, 7, 0.1) 62%, rgba(14, 11, 7, 0.75) 100%);
  }

  /* Главная: кадр в нижней части экрана, предметы-указатели крупнее подписей не становятся */
  .photo--home { top: auto; height: 60dvh; }
  .photo--home::after {
    background: linear-gradient(180deg, var(--ink) 0%, rgba(14, 11, 7, 0) 22%, rgba(14, 11, 7, 0) 80%, rgba(14, 11, 7, 0.85) 100%);
  }
  .photo--home .photo__frame { --anchor: 0.7; }
  .photo--menu .photo__frame { --anchor: 0.42; }

  .spot__label { padding: 4px 8px 4px; }
  .spot__title { font-size: 1rem; }
  .spot__price { display: none; }
  /* На узком экране часть подписей переносим на другую сторону, чтобы не уходили за край. */
  .spot--m-right .spot__label { left: calc(100% + 16px); right: auto; top: 50%; bottom: auto; transform: translateY(-50%); text-align: left; }
  .spot--m-right .spot__label::before { left: auto; right: 100%; top: 50%; width: 16px; height: 1px; }
  .spot--m-left .spot__label { right: calc(100% + 16px); left: auto; top: 50%; bottom: auto; transform: translateY(-50%); text-align: right; }
  .spot--m-left .spot__label::before { right: auto; left: 100%; top: 50%; width: 16px; height: 1px; }
  .spot--m-top .spot__label { bottom: calc(100% + 16px); top: auto; left: 50%; right: auto; transform: translateX(-50%); text-align: center; }
  .spot--m-top .spot__label::before { top: 100%; left: 50%; right: auto; width: 1px; height: 16px; }

  .menu__title { font-size: 1.1875rem; }
  .menu__price { font-size: 1.0625rem; }
  .menu__meta { display: none; }
  .menu-note { display: none; }

  .bar__inner { gap: 4px 16px; min-height: 0; padding-block: 8px; }
  .bar [data-bind="hours"], .bar__legal { display: none; }
}

@media (max-width: 899px) and (max-height: 760px) {
  .lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

@media (max-width: 899px) and (max-height: 660px) {
  .lead { -webkit-line-clamp: 2; }
}

/* ---------- Меньше движения ---------- */

@media (prefers-reduced-motion: reduce) {
  .intro, .spot, .dialog[open] { animation: none; }
  .spot__mark, .spot__label, .btn, .menu__btn { transition: none; }
}

/* ---------- Страница записи ---------- */

.booking { width: 100%; max-width: 40rem; margin-top: 24px; }
.booking .form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 12px;
  padding: 20px;
  background: rgba(14, 11, 7, 0.62);
  border: 1px solid rgba(171, 136, 101, 0.22);
}
.booking .field-row { display: contents; }
.booking .form > :not(.field):not(.field-row):not(input[type="hidden"]) { grid-column: 1 / -1; }
.booking .check { align-self: center; grid-column: auto !important; }
.booking .field input,
.booking .field select { min-height: 44px; padding-block: 8px; }
.booking .field textarea { min-height: 44px; }
.booking .form-done { padding: 20px; background: rgba(14, 11, 7, 0.62); border: 1px solid rgba(171, 136, 101, 0.22); }
.booking__back { margin-top: 12px; }

@media (max-width: 599px) {
  .booking .form { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .booking .check { grid-column: 1 / -1 !important; }
}

@media (max-height: 800px) {
  .booking .field__hint { display: none; }
}

/* Запись на телефоне: компактная сетка, чтобы форма помещалась в экран */
@media (max-width: 599px) {
  .booking { margin-top: 12px; }
  .booking .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 8px; padding: 12px; }
  .booking .form > .field:nth-child(-n+3),
  .booking .field:has(textarea),
  .booking .field:has(input[name="place"]),
  .booking .field:has(select[name="format"]) { grid-column: 1 / -1; }
  .booking .field label { font-size: var(--t-small); }
  .booking .field__hint, .booking .form__legal { display: none; }
  .booking .field:has(textarea) { display: none; }
  .intro:has(.booking) .lead { display: none; }
  .booking__back { margin-top: 4px; }
}

@media (max-width: 599px) {
  .bar__inner > span { display: none; }
  .bar__inner { gap: 0 24px; }
}
@media (max-width: 599px) and (max-height: 720px) {
  .intro .lead { display: none; }
}

@media (max-width: 599px) {
  body:has(.booking) .bar { display: none; }
  .booking .form__legal { display: block; font-size: 0.8125rem; line-height: 1.3; margin: 0; }
}
@media (max-width: 599px) and (max-height: 720px) {
  .booking__back { display: none; }
  .booking .form { row-gap: 4px; padding: 8px 12px; }
}

@media (max-height: 660px) {
  .site-header__inner { min-height: 52px; }
}

@media (max-width: 599px) and (max-height: 660px) {
  .booking { margin-top: 0; }
  .booking .field label { line-height: 1.2; }
  .booking .field { gap: 2px; }
  .booking .check { min-height: 0; }
}

/* Главная: меню разделов */
.menu--nav { max-width: 32rem; margin-top: 20px; }
.menu--nav .menu__item { display: block; padding: 0; }
.menu__link {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr) auto;
  gap: 0 16px;
  align-items: baseline;
  min-height: 52px;
  padding-block: 12px;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.menu__link:hover .menu__title,
.menu__link:focus-visible .menu__title { color: var(--gold); }
.menu__link:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.menu--nav + .actions { margin-top: 20px; }
@media (max-width: 599px) { .menu--nav { margin-top: 12px; } .menu__link { min-height: 48px; padding-block: 10px; } .menu--nav + .actions { margin-top: 12px; } }

/* Главная: чистый список без рамки, ровные отточия */
.intro > nav { align-self: stretch; max-width: 30rem; }
.menu--nav {
  max-width: none;
  padding: 0;
  background: linear-gradient(90deg, rgba(14, 11, 7, 0.55), rgba(14, 11, 7, 0));
  border: 0;
  border-top: 1px solid rgba(171, 136, 101, 0.4);
  border-bottom: 1px solid rgba(171, 136, 101, 0.4);
  box-shadow: none;
}
.menu--nav .menu__item { border-bottom: 1px solid rgba(171, 136, 101, 0.16); }
.menu--nav .menu__item:last-child { border-bottom: 0; }
.menu--nav .menu__link { padding-inline: 4px; }
.menu--nav .menu__title { font-size: 1.5rem; }
.menu--nav .menu__price { color: var(--gold); font-size: 1.125rem; }
.menu--nav .menu__link::after { content: none; }
.menu--nav .menu__link:hover { background: rgba(171, 136, 101, 0.08); }
.menu--nav .menu__item:hover .menu__leader { border-bottom-color: var(--gold); }
.menu__leader { border-bottom-color: rgba(171, 136, 101, 0.7); }
.menu--nav { margin-top: 28px; }

@media (min-width: 900px) {
  .intro > nav { max-width: 24rem; }
  .photo--home::after {
    background:
      linear-gradient(90deg, rgba(14, 11, 7, 0.94) 0%, rgba(14, 11, 7, 0.8) 26%, rgba(14, 11, 7, 0.3) 44%, rgba(14, 11, 7, 0) 58%),
      linear-gradient(180deg, rgba(14, 11, 7, 0.7) 0%, rgba(14, 11, 7, 0) 22%, rgba(14, 11, 7, 0) 82%, rgba(14, 11, 7, 0.85) 100%),
      radial-gradient(ellipse 120% 90% at 65% 60%, transparent 55%, rgba(14, 11, 7, 0.55) 100%);
  }
}

@media (max-width: 599px) {
  .photo--home ~ .intro .lead { display: none; }
  .photo--home { height: 52dvh; }
}


/* Читаемость шапки поверх фото и контраст кнопок в прейскуранте */
.site-header { background: linear-gradient(180deg, rgba(14, 11, 7, 0.75), rgba(14, 11, 7, 0)); }
.nav__link, .brand { text-shadow: 0 1px 8px rgba(14, 11, 7, 0.9); }
.menu__btn { color: var(--paper); border-color: var(--gold-dim); }
.menu__btn:hover { border-color: var(--gold); background: rgba(171, 136, 101, 0.12); }

@media (min-width: 1600px) {
  :root { --wrap: 1560px; }
  .intro { max-width: 44rem; }
  .photo--home::after {
    background:
      linear-gradient(90deg, rgba(14, 11, 7, 0.94) 0%, rgba(14, 11, 7, 0.86) 30%, rgba(14, 11, 7, 0.4) 44%, rgba(14, 11, 7, 0) 56%),
      linear-gradient(180deg, rgba(14, 11, 7, 0.7) 0%, rgba(14, 11, 7, 0) 22%, rgba(14, 11, 7, 0) 82%, rgba(14, 11, 7, 0.85) 100%),
      radial-gradient(ellipse 120% 90% at 65% 60%, transparent 55%, rgba(14, 11, 7, 0.55) 100%);
  }
}
@media (min-width: 1600px) {
  .intro > nav { max-width: 28rem; }
  .menu--nav .menu__title { font-size: 1.75rem; }
  .menu--nav .menu__price { font-size: 1.25rem; }
  .menu--nav .menu__link { min-height: 60px; }
}

@media (max-width: 599px) {
  .menu:not(.menu--nav) .menu__item { gap: 2px 12px; }
  .menu:not(.menu--nav) .menu__leader { display: none; }
  .menu:not(.menu--nav):not(.menu--events) .menu__item { grid-template-columns: minmax(0, 1fr) auto auto; }
  .menu--events .menu__item { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .menu--events .menu__date, .menu--events .menu__title { grid-column: 1 / -1; }
  .menu--events .menu__price { grid-column: 1; grid-row: 3; align-self: center; }
  .menu--events .menu__btn { grid-column: 2; grid-row: 3; }
}
@media (max-width: 599px) and (max-height: 700px) { body:has(.menu--events) .intro .actions { display: none; } }

/* ---------- Внутренние страницы: текст слева, чистый кадр справа ---------- */

.photo--dim .photo__frame,
.photo--menu .photo__frame {
  inset: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.photo--dim .photo__img,
.photo--menu .photo__img {
  filter: none;
  object-position: var(--ox, 50%) 60%;
}

@media (min-width: 900px) {
  .photo--dim,
  .photo--menu {
    left: auto;
    width: clamp(420px, 50%, 960px);
    border-left: 1px solid rgba(171, 136, 101, 0.28);
  }
  .photo--dim::after,
  .photo--menu::after {
    background:
      linear-gradient(90deg, rgba(14, 11, 7, 0.55) 0%, rgba(14, 11, 7, 0) 18%),
      linear-gradient(180deg, rgba(14, 11, 7, 0.7) 0%, rgba(14, 11, 7, 0) 18%, rgba(14, 11, 7, 0) 86%, rgba(14, 11, 7, 0.8) 100%);
  }
  body:has(.photo--dim) .main,
  body:has(.photo--menu) .main {
    background: radial-gradient(ellipse 60% 70% at 18% 38%, rgba(115, 77, 49, 0.16), transparent 70%);
  }
  body:has(.photo--dim) .intro,
  body:has(.photo--menu) .intro { max-width: min(38rem, calc(50vw - var(--gutter) - 32px)); }
}

@media (max-width: 899px) {
  .photo--dim,
  .photo--menu { top: auto; height: 48dvh; }
  .photo--dim::after,
  .photo--menu::after {
    background:
      linear-gradient(180deg, var(--ink) 0%, rgba(14, 11, 7, 0.55) 28%, rgba(14, 11, 7, 0) 62%, rgba(14, 11, 7, 0.85) 100%);
  }
}

@media (min-width: 900px) {
  .photo--dim, .photo--menu { width: clamp(380px, 42%, 960px); }
  body:has(.photo--dim) .intro,
  body:has(.photo--menu) .intro { max-width: min(38rem, calc(58vw - var(--gutter) - 32px)); }
}
@media (min-width: 1200px) {
  .photo--dim, .photo--menu { width: clamp(420px, 50%, 960px); }
  body:has(.photo--dim) .intro,
  body:has(.photo--menu) .intro { max-width: min(38rem, calc(50vw - var(--gutter) - 32px)); }
}
@media (max-width: 899px) {
  .photo--dim { opacity: 0.6; }
  body:has(.menu--events) .photo { opacity: 0.4; }
}

/* Запись на десктопе: форма в три колонки и сжатая шапка, чтобы вся форма была в экране */
@media (min-width: 900px) {
  body:has(.booking) .intro { padding-block: clamp(12px, 3vh, 40px) 16px; }
  body:has(.booking) .intro .title { font-size: clamp(2.25rem, 1.2rem + 2.6vw, 3.5rem); }
  body:has(.booking) .intro .lead { margin-top: 8px; }
  .booking { max-width: none; margin-top: clamp(12px, 2.4vh, 24px); }
}
@media (min-width: 1200px) {
  body:has(.booking) .intro { max-width: min(44rem, calc(50vw - var(--gutter) - 32px)); }
  .booking .form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking .form > .field:has(textarea) { grid-column: span 1; }
}
@media (min-width: 900px) and (max-height: 780px) {
  body:has(.booking) .intro .lead,
  .booking__back,
  .booking .field__hint { display: none; }
}
@media (min-width: 900px) and (max-height: 660px) {
  .intro .lead { display: none; }
}
@media (min-width: 900px) and (max-height: 700px) {
  .booking .form { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 16px; row-gap: 4px; }
  .booking .field { gap: 2px; }
  body:has(.booking) .intro .title { font-size: 2rem; }
}
@media (max-width: 899px) { body:has(.menu--events) .photo { display: none; } }

/* Текст не заходит на кадр: правая граница считается от левого поля обёртки */
@media (min-width: 900px) {
  :root { --lm: max(var(--gutter), (100vw - var(--wrap)) / 2); }
  body:has(.photo--dim) .intro,
  body:has(.photo--menu) .intro { max-width: min(38rem, calc(58vw - var(--lm) - 32px)); }
}
@media (min-width: 1200px) {
  body:has(.photo--dim) .intro,
  body:has(.photo--menu) .intro { max-width: min(38rem, calc(50vw - var(--lm) - 32px)); }
  body:has(.booking) .intro { max-width: min(44rem, calc(50vw - var(--lm) - 32px)); }
}

/* Шапка: две кнопки; выбор канала связи */
.header-cta { display: flex; align-items: center; gap: 12px; margin-left: auto; }
@media (max-width: 1199px) { .site-header__inner { gap: 20px; } .header-cta { gap: 8px; } }
.dialog--narrow { width: min(480px, 100% - 2 * var(--gutter)); }
.channels { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(171, 136, 101, 0.3); }
.channels li { border-bottom: 1px solid rgba(171, 136, 101, 0.18); }
.channel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 4px;
  color: var(--paper);
  text-decoration: none;
  transition: background-color 0.15s var(--ease);
}
.channel:hover, .channel:focus-visible { background: rgba(171, 136, 101, 0.1); }
.channel__name { font-size: 1.5rem; font-weight: 500; }
.channel__id { color: var(--gold); font-size: var(--t-meta); }
@media (max-width: 599px) {
  .photo--home ~ .intro .actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .photo--home ~ .intro .actions .btn { width: 100%; padding: 0 8px; white-space: nowrap; }
}
@media (max-width: 599px) and (max-height: 700px) { body:has(.booking) .intro .title { font-size: 1.75rem; } .booking .form { padding-block: 6px; } }

/* Телефон: закреплённая панель связи */
.tabbar { display: none; }
@media (max-width: 599px) {
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .bar__inner > :not(.bar__legal) { display: none; }
  .bar__legal { margin-left: 0; }
  .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(14, 11, 7, 0.96);
    border-top: 1px solid rgba(171, 136, 101, 0.35);
  }
  .tabbar__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    color: var(--gold);
    transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
  }
  .tabbar__link:hover, .tabbar__link:focus-visible, .tabbar__link:active { color: var(--paper); background: rgba(171, 136, 101, 0.1); }
  .tabbar__link:focus-visible { outline-offset: -4px; }
}
@media (max-width: 599px) { .bar .bar__legal { color: var(--rice); text-shadow: 0 1px 6px var(--ink); } }
@media (max-width: 599px) and (max-height: 700px) {
  body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .tabbar__link { min-height: 48px; }
  .site-header__inner { min-height: 52px; }
  body:has(.booking) .intro .title { font-size: 1.5rem; }
  .intro { padding-block: 8px; }
}
@media (max-width: 599px) and (max-height: 700px) {
  .booking .form:has(.check) .check { grid-column: 1 !important; }
  .booking .form:has(.check) .form__submit { grid-column: 2 !important; padding-inline: 8px; }
}

/* ---------- Живое фото: огонь и пар (слои поверх снимка, только transform и opacity) ---------- */

.fx { position: absolute; z-index: 1; pointer-events: none; overflow: visible; }
.fx i { position: absolute; display: block; will-change: transform, opacity; }

.fx__glow {
  left: 40%; top: 50%; width: 30%; height: 30%;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 140, 50, 0.2), rgba(255, 100, 20, 0.09) 45%, transparent 72%);
  mix-blend-mode: screen;
  animation: fx-flicker 7.3s ease-in-out infinite;
}
.fx__flame {
  width: 8%; height: 9%;
  background: radial-gradient(ellipse at 50% 80%, rgba(255, 190, 90, 0.55), rgba(255, 120, 30, 0.28) 50%, transparent 75%);
  mix-blend-mode: screen;
  filter: blur(6px);
  transform-origin: 50% 100%;
}
.fx__flame--a { left: 51%; top: 52.5%; animation: fx-sway 6.1s ease-in-out infinite; }
.fx__flame--b { left: 56.5%; top: 52%; width: 6%; animation: fx-sway 8.3s ease-in-out -2.7s infinite; }
.fx__embers {
  left: 51.5%; top: 59.5%; width: 7%; height: 8%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 150, 60, 0.5), rgba(255, 90, 20, 0.2) 55%, transparent 78%);
  mix-blend-mode: screen;
  animation: fx-ember 5.2s ease-in-out infinite;
}

.fx__wisp {
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  background: radial-gradient(ellipse at 50% 60%, rgba(240, 232, 218, 0.65), rgba(240, 232, 218, 0.22) 45%, transparent 72%);
  filter: blur(7px);
  opacity: 0;
  transform-origin: 50% 100%;
  animation: fx-steam var(--dur) ease-in-out var(--delay) infinite;
}

@keyframes fx-flicker {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  20% { opacity: 0.9; transform: scale(1.01, 1.02); }
  45% { opacity: 0.76; transform: scale(1); }
  70% { opacity: 0.88; transform: scale(1.01, 1.015); }
}
@keyframes fx-sway {
  0%, 100% { opacity: 0.72; transform: scale(1, 1) rotate(0deg); }
  35% { opacity: 0.84; transform: scale(1.025, 1.06) rotate(-0.8deg); }
  65% { opacity: 0.66; transform: scale(0.985, 0.97) rotate(0.6deg); }
}
@keyframes fx-ember {
  0%, 100% { opacity: 0.62; }
  40% { opacity: 0.82; }
  70% { opacity: 0.7; }
}
@keyframes fx-steam {
  0% { opacity: 0; transform: translate(0, 0) scale(0.8, 0.7); }
  22% { opacity: var(--o); }
  50% { opacity: calc(var(--o) * 0.8); transform: translate(calc(var(--dx) * 0.35), -42%) scale(1.15, 1.05); }
  78% { opacity: calc(var(--o) * 0.35); }
  100% { opacity: 0; transform: translate(var(--dx), -90%) scale(1.5, 1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .fx { display: none; }
}

/* Согласие на cookies: компактная карточка в углу, не закрывает контент */
.consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 45;
  display: grid;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 16px;
  background: rgba(14, 11, 7, 0.96);
  border: 1px solid rgba(171, 136, 101, 0.4);
  font-size: var(--t-small);
  line-height: 1.4;
}
.consent p { color: var(--rice); }
.consent__actions { display: flex; gap: 8px; }
@media (max-width: 599px) { .consent { left: 8px; right: 8px; width: auto; bottom: calc(64px + env(safe-area-inset-bottom)); } }
