/* ---------- Themes ---------- */
:root,
[data-theme="warm"] {
  --bg: #231811;
  --surface: #2f2117;
  --surface-2: #3c2a1d;
  --text: #f1e4d0;
  --muted: #bfa88c;
  --accent: #e8a33d;
  --accent-ink: #231811;
  --line: rgba(241, 228, 208, 0.14);
  --hero-shade: linear-gradient(180deg, rgba(35, 24, 17, 0.15) 0%, rgba(35, 24, 17, 0.55) 55%, #231811 100%);
  --hero-text: #f6ead8;
  --font-display: "Yeseva One", Georgia, serif;
  --font-body: "Golos Text", system-ui, sans-serif;
  --display-weight: 400;
  --display-track: 0;
  --display-scale: 1;
  --radius: 8px;
  --radius-lg: 14px;
}

/* «Вода» — бассейн днём: белая плитка, синяя мозаика, чистая вода */
[data-theme="water"] {
  --bg: #f6f8f9;
  --surface: #ffffff;
  --surface-2: #e7f0f5;
  --text: #10293a;
  --muted: #5b7486;
  --accent: #1c7fc4;
  --accent-ink: #ffffff;
  --line: rgba(16, 41, 58, 0.12);
  --hero-shade: linear-gradient(180deg, rgba(8, 36, 58, 0.05) 0%, rgba(8, 36, 58, 0.45) 55%, rgba(8, 36, 58, 0.9) 100%);
  --hero-text: #ffffff;
  --font-display: "Jost", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;
  --display-weight: 500;
  --display-track: -0.015em;
  --display-scale: 1;
  --radius: 12px;
  --radius-lg: 20px;
}

/* «Ночь» — бассейн ночью: тёмная вода с подсветкой, латунь */
[data-theme="night"] {
  --bg: #0a1418;
  --surface: #10222a;
  --surface-2: #132b34;
  --text: #eaf1f0;
  --muted: #93a9ae;
  --accent: #d6ab68;
  --accent-ink: #0a1418;
  --line: rgba(214, 171, 104, 0.18);
  --hero-shade: linear-gradient(180deg, rgba(10, 20, 24, 0.15) 0%, rgba(10, 20, 24, 0.6) 55%, #0a1418 100%);
  --hero-text: #f4efe6;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --display-weight: 600;
  --display-track: 0;
  --display-scale: 1;
  --radius: 6px;
  --radius-lg: 10px;
}

/* Детали, которые делают темы узнаваемыми */
/* «Вода»: секция бронирования — как стенка бассейна из плитки */
[data-theme="water"] .booking {
  background-color: var(--surface-2);
  background-image:
    linear-gradient(rgba(28, 127, 196, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 127, 196, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
/* «Ночь»: мягкое свечение подсветки бассейна */
[data-theme="night"] .booking {
  background: radial-gradient(ellipse 70% 60% at 15% 0%, rgba(56, 170, 200, 0.14), transparent 70%), var(--surface-2);
}
[data-theme="night"] .gallery {
  background: radial-gradient(ellipse 60% 50% at 85% 100%, rgba(56, 170, 200, 0.1), transparent 70%), var(--surface);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s, color 0.35s;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.h2, .h3, .hero__title, .brand, .score__big {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-track);
  line-height: 1.08;
}
.h2 { font-size: calc(clamp(1.9rem, 3.6vw, 2.8rem) * var(--display-scale)); margin: 0 0 1.25rem; }
.h3 { font-size: calc(clamp(1.5rem, 2.4vw, 2rem) * var(--display-scale)); margin: 0 0 0.75rem; }
.muted { color: var(--muted); }

section { padding-block: clamp(56px, 9vw, 112px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.15s, background-color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn--main { background: var(--accent); color: var(--accent-ink); }
.btn--main:hover { filter: brightness(1.08); }
.btn--ghost { border-color: currentColor; color: var(--hero-text); background: rgba(0, 0, 0, 0.15); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(0, 0, 0, 0.3); }

.link { color: var(--accent); font-weight: 600; text-underline-offset: 4px; }

.ticks { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ticks li {
  padding: 0.35em 0.8em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.92rem;
}

/* ---------- Demo bar ---------- */
.demo-bar {
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.9rem; text-align: center; padding: 0.5rem 16px;
}
.demo-bar a { font-weight: 600; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { font-size: calc(1.35rem * var(--display-scale)); text-decoration: none; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand__short { display: none; }
@media (max-width: 640px) {
  .brand__full { display: none; }
  .brand__short { display: inline; }
}
.top__nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: 0.95rem; }
.top__nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }

/* ---------- Мобильное меню (бургер) ---------- */
.burger {
  display: none; position: relative; flex: none;
  width: 44px; height: 44px; margin-left: 0.5rem; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 1px; background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mnav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  max-height: calc(100vh - 64px); overflow-y: auto;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45); /* затемняем страницу под меню */
  animation: mnav-in 0.18s ease-out;
}
.mnav[hidden] { display: none; }
@keyframes mnav-in { from { opacity: 0; transform: translateY(-6px); } }
.mnav__list { list-style: none; margin: 0; padding: 0.5rem 0; }
.mnav__list a {
  display: block; padding: 0.85rem 0; text-decoration: none;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(1.35rem * var(--display-scale));
}
.mnav__list li + li { border-top: 1px solid var(--line); }
.mnav__list a:hover, .mnav__list a:focus-visible { color: var(--accent); }
.mnav__contacts { display: grid; gap: 0.6rem; padding: 0.75rem 0; }
.mnav__viber { background: var(--surface-2); color: var(--text); }
.mnav__meta { color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 1.25rem; }

@media (max-width: 1100px) {
  .top__nav { display: none; }
  .top__phone { margin-left: auto; }
  .burger { display: block; }
}
@media (min-width: 1101px) { .mnav { display: none !important; } }
body.menu-open .themes { display: none; }
.top__nav a:hover { color: var(--text); }
.top__phone { flex: none; display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; text-decoration: none; white-space: nowrap; }
.top__phone svg { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 0;
  min-height: min(88vh, 820px);
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: settle 1.6s ease-out both; }
.hero__shade { position: absolute; inset: 0; background: var(--hero-shade); z-index: -1; }
.hero__in { padding-block: 120px clamp(40px, 6vw, 72px); color: var(--hero-text); }
.hero__title { font-size: calc(clamp(2.5rem, 6.4vw, 5rem) * var(--display-scale)); max-width: 15ch; margin: 0 0 1.1rem; text-wrap: balance; }
.hero__lead { max-width: 52ch; font-size: 1.15rem; margin: 0 0 2rem; opacity: 0.92; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ---------- Facts ---------- */
.facts { border-bottom: 1px solid var(--line); }
.facts__in { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact:first-child { padding-left: 0; }
.fact strong { display: inline-flex; align-items: center; gap: 0.35em; font-size: 1.25rem; }
.fact strong svg { color: var(--accent); }
.fact span { color: var(--muted); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.5em; }
a.fact:hover strong { color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3fbf6f; box-shadow: 0 0 0 4px rgba(63, 191, 111, 0.18); }

/* ---------- Prices ---------- */
.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-block: 1px solid var(--line); }
.rate { display: grid; gap: 0.25rem; padding: 1.5rem 2rem 1.75rem 0; }
.rate + .rate { border-left: 1px solid var(--line); padding-left: 2rem; }
.rate__days { color: var(--muted); }
.rate__price {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(clamp(3rem, 6vw, 4.5rem) * var(--display-scale)); line-height: 1; color: var(--accent);
}
.rate__price small { font-family: var(--font-body); font-size: 1.05rem; color: var(--text); letter-spacing: 0; }
.prices__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); margin-top: 2rem; }
.prices__terms p { margin: 0 0 0.75rem; max-width: 46ch; }
.prices__terms b { color: var(--accent); font-weight: 600; }
.pricelist { margin: 0; }
.pricelist div { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.55rem 0; }
.pricelist div::after { content: none; }
.pricelist dt { order: 0; }
.pricelist dd { order: 2; margin: 0; font-weight: 600; white-space: nowrap; }
.pricelist div::before { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--muted); opacity: 0.6; transform: translateY(-0.3em); }

/* ---------- Features ---------- */
.feature {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px);
  align-items: center; margin-top: clamp(40px, 6vw, 80px);
}
.feature--flip { grid-template-columns: 5fr 7fr; }
.feature--flip .feature__media { order: 2; }
.feature__media { position: relative; padding-bottom: 48px; }
.feature__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.feature__inset {
  position: absolute; right: -16px; bottom: 0; width: 38%; aspect-ratio: 1;
  object-fit: cover; border-radius: var(--radius);
  border: 6px solid var(--bg);
}
.feature--flip .feature__inset { right: auto; left: -16px; }
.feature__text p { margin: 0; color: var(--muted); max-width: 46ch; }

/* ---------- Gallery ---------- */
.gallery { background: var(--surface); }
.gallery__grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
}
.gallery__item { padding: 0; border: 0; cursor: zoom-in; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.gallery__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery__item:nth-child(6) { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery__item:hover img { transform: scale(1.04); }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; padding: 56px 16px; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
.lightbox__close { right: 16px; top: 16px; }

/* ---------- Reviews ---------- */
.reviews__in { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.score__big { font-size: calc(5.5rem * var(--display-scale)); display: flex; align-items: center; gap: 1rem; line-height: 1; }
.stars { display: inline-flex; color: var(--accent); font-size: 1.4rem; }
.score__note { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.aspects { margin: 2rem 0 0; display: grid; gap: 0.6rem; }
.aspect { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: 0.75rem; font-size: 0.95rem; }
.aspect dt { color: var(--muted); }
.aspect dd { margin: 0; display: flex; align-items: center; gap: 0.6rem; }
.aspect dd span { flex: 1; height: 6px; background: var(--line); border-radius: 3px; position: relative; overflow: hidden; }
.aspect dd span::after { content: ""; position: absolute; inset: 0; width: var(--v); background: var(--accent); border-radius: inherit; }
.aspect dd b { font-weight: 600; width: 3ch; text-align: right; font-size: 0.9rem; }

.reviews__body { min-width: 0; }
.rtabs { display: flex; gap: 6px; margin-bottom: 1rem; flex-wrap: wrap; }
.rtab {
  padding: 0.55em 1em; border-radius: var(--radius); cursor: pointer; font-size: 0.95rem;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.rtab:hover { color: var(--text); }
.rtab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* виджет Яндекса всегда светлый — даём ему светлую подложку в любой теме */
.ywidget { position: relative; height: 640px; max-width: 640px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.ywidget iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.ywidget.is-loaded { background: #f3f1ed; }
/* У виджета Яндекса нет тёмной темы — перекрашиваем его фильтром под тему сайта
   (invert + hue-rotate возвращает звёздам и кнопке их родные цвета) */
[data-theme="warm"] .ywidget iframe { filter: invert(0.88) hue-rotate(180deg) sepia(0.25) saturate(1.2); }
[data-theme="night"] .ywidget iframe { filter: invert(0.9) hue-rotate(180deg); }
[data-theme="warm"] .ywidget.is-loaded,
[data-theme="night"] .ywidget.is-loaded { background: var(--surface); }
.ywidget__fallback {
  position: absolute; inset: 0; z-index: 0;
  display: grid; place-content: center; justify-items: center; gap: 0.75rem;
  padding: 2rem; text-align: center; color: var(--muted);
}
.ywidget__fallback p { margin: 0; max-width: 32ch; }
.score__lead { color: var(--muted); max-width: 34ch; margin: 0 0 1.5rem; }

.fact--badge { flex-direction: row; align-items: center; gap: 0.9rem; }
.ybadge { width: 150px; height: 50px; border: 0; flex: none; pointer-events: none; border-radius: 6px; background: transparent; }
.fact--badge span { max-width: 12ch; }
.quotes { display: grid; gap: 1rem; }
.quote { margin: 0; padding: 1.5rem 1.75rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.quote blockquote { margin: 0 0 0.75rem; font-size: 1.08rem; max-width: 62ch; }
.quote figcaption { color: var(--muted); font-size: 0.9rem; }
.quote figcaption b { color: var(--text); font-weight: 600; }
.quotes .link { justify-self: start; margin-top: 0.5rem; }

/* ---------- Booking ---------- */
.booking { background: var(--surface-2); }
.booking__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 3rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.booking__head .h2 { margin: 0; }
.booking__head p { color: var(--muted); max-width: 52ch; margin: 0; }
.booking__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 40px); align-items: start; }
.slots { min-width: 0; }
.booking__demo { color: var(--muted); font-size: 0.85rem; margin: 1.25rem 0 0; }

.days {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; width: 84px; scroll-snap-align: start;
  display: grid; justify-items: center; gap: 2px; padding: 10px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.day__wd { font-size: 0.8rem; color: var(--muted); }
.day__n { font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.day__free { font-size: 0.75rem; color: var(--accent); white-space: nowrap; }
.day[data-full] .day__free { color: var(--muted); }
.day[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day[aria-selected="true"] .day__wd, .day[aria-selected="true"] .day__free { color: inherit; opacity: 0.85; }

.legend { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1.25rem 0 0.75rem; font-size: 0.85rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.45em; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg--free { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent); }
.lg--busy { background: repeating-linear-gradient(135deg, var(--line) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--line); }
.lg--mine { background: var(--text); }

.hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.hour {
  padding: 0.7em 0; border-radius: var(--radius); font-size: 0.95rem; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; background: var(--surface); cursor: pointer;
}
.hour--free { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.hour--free:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.hour--busy { background: repeating-linear-gradient(135deg, var(--line) 0 4px, transparent 4px 9px); color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.hour--past { background: transparent; color: color-mix(in srgb, var(--muted) 55%, transparent); cursor: default; }
.hour--mine { background: var(--text); color: var(--bg); cursor: default; }
.hour.is-sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hour.is-first { font-weight: 700; }

.summary {
  background: var(--surface); border-radius: var(--radius-lg); padding: clamp(20px, 2.5vw, 28px);
  position: sticky; top: 84px; scroll-margin-top: 84px;
}
.summary__title { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.5rem; }
.summary__title::first-letter { text-transform: uppercase; }
.summary__time { font-family: var(--font-display); font-size: calc(1.8rem * var(--display-scale)); color: var(--accent); margin: 0 0 1.25rem; line-height: 1.1; }
.summary__time small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; letter-spacing: 0; }
.summary__msg { color: var(--accent); font-size: 0.9rem; margin: 0.75rem 0 0; }
.summary .muted { font-size: 0.95rem; margin: 0; }
.summary .form .summary__msg { margin: 0; }
.link-btn { background: none; border: 0; padding: 0.25rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 0.9rem; }
.done p { margin: 0 0 0.75rem; }
.done__demo {
  padding: 0.75rem 0.9rem; border-radius: var(--radius); font-size: 0.92rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.done__demo a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.done .btn { margin-top: 0.5rem; }
.mine { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.mine__item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.9rem; padding: 0.6rem 0; }
.mine__item + .mine__item { border-top: 1px solid var(--line); }
.mine__cancel { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.35em 0.7em; cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.mine__cancel:hover { color: var(--text); border-color: var(--text); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.field { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.field--wide { grid-column: 1 / -1; }
.field input, .field select {
  width: 100%; padding: 0.75em 0.9em;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  color-scheme: dark;
}
[data-theme="water"] .field input, [data-theme="water"] .field select { color-scheme: light; }
.form__total { grid-column: 1 / -1; font-size: 0.92rem; }
.calc { margin: 0.25rem 0 0; }
.calc div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; color: var(--muted); }
.calc dd { margin: 0; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.calc .calc__total { border-top: 1px solid var(--line); margin-top: 0.35rem; padding-top: 0.6rem; color: var(--text); font-weight: 600; font-size: 1.1rem; }
.calc .calc__total dd { color: var(--accent); }
.calc__note { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.82rem; }
.check { display: flex; gap: 0.6rem; align-items: center; font-size: 0.92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.field--inline { grid-template-columns: 1fr 80px; align-items: center; }
.form__hint { margin: 0; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }

/* ---------- Contacts ---------- */
.contacts__in { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.addr { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 1.2rem; font-weight: 600; margin: 0 0 0.25rem; }
.addr svg { color: var(--accent); margin-top: 0.25em; }
.kv { margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.kv div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kv a { text-decoration: none; }
.contacts .link { display: inline-block; margin-top: 1.5rem; }
.map { position: relative; min-height: 380px; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
/* Прозрачная крышка над картой: листание страницы проходит мимо карты, нажатие — включает карту */
.map__lock {
  position: absolute; inset: 0; z-index: 2; width: 100%;
  display: flex; align-items: flex-end; justify-content: center; padding: 0 0 16px;
  background: transparent; border: 0; cursor: pointer;
}
.map__lock span {
  padding: 0.55em 1em; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  background: rgba(20, 20, 20, 0.78); color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s;
}
@media (hover: hover) { .map__lock span { opacity: 0; } .map__lock:hover span, .map__lock:focus-visible span { opacity: 1; } }
.map.is-active .map__lock { display: none; }
@media (max-width: 640px) { .map, .map iframe { min-height: 300px; } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 1.5rem 0 6rem; color: var(--muted); font-size: 0.9rem; }
.foot__in { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot a { text-decoration: none; }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }

/* ---------- Theme switcher ---------- */
.themes {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  display: flex; align-items: center; gap: 4px;
  padding: 5px 5px 5px 14px;
  background: #fff; color: #1b1b1b;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  font-family: "Onest", system-ui, sans-serif; font-size: 0.85rem;
}
.themes__label { color: #6b6b6b; margin-right: 4px; }
.themes__btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; cursor: pointer; color: #1b1b1b;
}
.themes__btn:hover { background: #f0f0f0; }
.themes__btn[aria-checked="true"] { background: #1b1b1b; color: #fff; }
.themes__toggle { display: none; }
.sw { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.sw--warm { background: linear-gradient(135deg, #3c2a1d 50%, #e8a33d 50%); }
.sw--water { background: linear-gradient(135deg, #e7f0f5 50%, #1c7fc4 50%); }
.sw--night { background: linear-gradient(135deg, #0a1418 50%, #d6ab68 50%); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .top__nav { display: none; }
  .top__phone { margin-left: auto; }
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
  .reviews__in, .booking__grid, .contacts__in { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery__item:nth-child(6) { grid-column: span 1; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .top__phone span { display: none; }
  .brand { font-size: calc(1.12rem * var(--display-scale)); }
  .top__phone { width: 44px; height: 44px; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); }
  .hero { min-height: 82vh; }
  .hero__lead { font-size: 1.05rem; }
  .hero__cta .btn { flex: 1; }
  .facts__in { grid-template-columns: 1fr; }
  .fact { padding: 1rem 0; flex-direction: row; justify-content: space-between; align-items: center; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .feature__inset { right: 12px; width: 34%; border-width: 4px; }
  .feature--flip .feature__inset { left: 12px; }
  .score__big { font-size: calc(4.2rem * var(--display-scale)); }
  .form { grid-template-columns: 1fr 1fr; }
  .kv div { grid-template-columns: 7.5rem 1fr; }
  .foot { padding-bottom: 9rem; }

  .hours { grid-template-columns: repeat(4, 1fr); }
  .prices__cols { grid-template-columns: 1fr; }
  .rate, .rate + .rate { padding: 1.25rem 0; border-left: 0; }
  .rate + .rate { border-top: 1px solid var(--line); }
  .day { width: 72px; }
  .callbar {
    display: grid; grid-template-columns: 1fr auto auto;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px;
  }
  .callbar a {
    display: flex; align-items: center; justify-content: center; gap: 0.5em;
    padding: 0.8em; border-radius: var(--radius); font-weight: 600; text-decoration: none;
    background: var(--surface-2);
  }
  .callbar a:first-child { background: var(--accent); color: var(--accent-ink); }
  .callbar a:not(:first-child) { width: 52px; }
  .callbar a:not(:first-child) span { display: none; }
  /* на телефоне — маленькая кнопка «Стиль» справа над нижней панелью, раскрывается по нажатию */
  .themes { bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; padding: 4px; gap: 2px; }
  .themes__label { display: none; }
  .themes__btn { display: none; }
  .themes__toggle {
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; background: transparent; color: #1b1b1b; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  }
  .themes__toggle .sw { width: 16px; height: 16px; }
  .themes.is-open .themes__btn { display: inline-flex; }
  .themes.is-open .themes__toggle span { display: none; }
}

/* ---------- Анимации (только при html.anim — см. app.js) ---------- */

/* Пар над первым экраном: мягкие размытые клубы медленно поднимаются */
.steam { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.steam i {
  position: absolute; bottom: -30%; width: 55vmax; height: 55vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  filter: blur(20px); opacity: 0;
}
.anim .steam i { animation: steam 16s linear infinite; }
.steam i:nth-child(1) { left: -15%; animation-delay: 0s; }
.steam i:nth-child(2) { left: 25%; animation-delay: -4s; animation-duration: 19s; }
.steam i:nth-child(3) { left: 55%; animation-delay: -9s; }
.steam i:nth-child(4) { left: 80%; animation-delay: -13s; animation-duration: 21s; }
[data-theme="water"] .steam i { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)); }
@keyframes steam {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  20% { opacity: 1; }
  70% { opacity: 0.6; }
  100% { transform: translateY(-85%) scale(1.25); opacity: 0; }
}

/* Загрузка: заголовок, текст, кнопки и строка фактов появляются по очереди — один раз */
.anim .hero__title, .anim .hero__lead, .anim .hero__cta, .anim .facts__in > * {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.anim .hero__title { animation-delay: 0.15s; }
.anim .hero__lead { animation-delay: 0.35s; }
.anim .hero__cta { animation-delay: 0.5s; }
.anim .facts__in > :nth-child(1) { animation-delay: 0.65s; }
.anim .facts__in > :nth-child(2) { animation-delay: 0.75s; }
.anim .facts__in > :nth-child(3) { animation-delay: 0.85s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Прокрутка: блоки мягко поднимаются, когда попадают на экран */
.anim .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease-out, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.anim .reveal.is-in { opacity: 1; transform: none; }
/* фото в «Что внутри» дополнительно чуть «наезжают» */
.anim .feature__media.reveal .feature__img { transform: scale(1.06); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.anim .feature__media.reveal.is-in .feature__img { transform: none; }

/* Шапка: тень после начала прокрутки */
.top { transition: box-shadow 0.25s, background-color 0.25s; }
.top.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }

/* ---------- Уведомление (бронь создана / отменена) ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; top: 80px;
  display: flex; gap: 0.75rem; align-items: flex-start;
  width: min(420px, calc(100% - 32px)); padding: 0.9rem 1.1rem;
  background: var(--text); color: var(--bg); border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-size: 0.92rem; line-height: 1.4; cursor: pointer;
  opacity: 0; transform: translate(-50%, -16px); pointer-events: none;
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast b { display: block; font-weight: 600; }
.toast span:not(.toast__icon) { display: block; opacity: 0.8; margin-top: 0.15rem; }
.toast span::first-letter { text-transform: uppercase; }
.toast__icon {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.85rem;
}

/* ---------- Окно подтверждения (отмена брони) ---------- */
.cdialog {
  padding: 0; border: 0; background: transparent; color: var(--text);
  width: min(400px, calc(100% - 32px)); max-width: none;
}
.cdialog::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); }
.cdialog[open] { animation: cdialog-in 0.22s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes cdialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.cdialog__box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.cdialog__title {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(1.6rem * var(--display-scale)); line-height: 1.15; margin: 0 0 0.5rem;
}
.cdialog__text { color: var(--muted); margin: 0 0 1.25rem; }
.cdialog__text::first-letter { text-transform: uppercase; }
.cdialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cdialog__no { background: var(--surface-2); color: var(--text); }
.cdialog__yes { background: #c4473a; color: #fff; }
.cdialog__yes:hover { filter: brightness(1.08); }
@media (max-width: 380px) { .cdialog__actions { grid-template-columns: 1fr; } }
