/* ───────────────────────────
   0) Переменные и базовые
   ─────────────────────────── */
:root{
  --ink:#0b0b0b;
  --muted:#5b5f66;
  --rule:#e6e7ea;
  --bg:#ffffff;
  --bg-soft:#f5f7fa;
  --accent:#111;

  --header-h:54px;
  --header-h-mobile: 54px;
  --container-w:1200px;
  --title-h:0px;

  /* Конструктор */
  --z-gap:12px;
  --z-card-pad:10px;
  --z-radius:12px;
  --z-swatch:28px;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font:16px/1.65 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial;
  color:var(--ink);
  display:flex; flex-direction:column;
}
main{ flex:1 0 auto; margin-top:var(--header-h); background:var(--bg-soft); }
footer.foot{ flex-shrink:0; border-top:1px solid var(--rule); color:var(--muted); font-size:.9rem; }
footer.foot .container{
  max-width:var(--container-w); margin:0 auto; padding:0 22px;
  display:flex; align-items:center; justify-content:space-between; height:64px;
}

/* Типографика */
h1{ margin:0; font-size:clamp(38px,6.5vw,64px); font-weight:800; letter-spacing:-.01em; line-height:1.08; text-align:center; }
h2{ margin:0 0 14px; font-size:clamp(22px,3vw,32px); }
h3{ margin:0 0 10px; font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:#666; }
.subtitle{ margin-top:12px; text-align:center; color:#2f3338; font-size:clamp(15px,2.2vw,20px); }

/* ───────────────────────────
   1) Хедер
   ─────────────────────────── */
header.top{
  position:fixed; inset:0 0 auto 0;
  background:var(--bg); border-bottom:1px solid var(--rule); z-index:1000; height:var(--header-h);
}
header.top .container{
  max-width:var(--container-w); margin:0 auto; padding:0 22px;
  display:flex; justify-content:space-between; align-items:center; height:100%;
}
.brand{ font-weight:800; text-transform:uppercase; font-size:.9rem; letter-spacing:.04em; }
.phone{ font-weight:600; font-size:.95rem; }

/* ───────────────────────────
   2) Первый экран (портрет)
   ─────────────────────────── */
.first-screen{
  display:flex; align-items:center; justify-content:center;
  background:var(--bg-soft); border-bottom:1px solid var(--rule);
  min-height:62vh; height:min(72vh, calc(100vh - var(--header-h)));
}
.portrait{
  aspect-ratio:1005/1504; height:min(68vh, 860px); max-width:min(80vw, 960px);
  border:1px solid var(--rule); background:#fff; display:flex; align-items:center; justify-content:center;
}
.portrait img{ width:100%; height:100%; object-fit:contain; }

/* ───────────────────────────
   3) Липкий заголовок
   ─────────────────────────── */
.title-block{
  background:#fff; border-bottom:1px solid var(--rule);
  display:flex; align-items:center; justify-content:center;
  position:sticky; top:var(--header-h); z-index:25;
}
.title-inner{ padding:22px 0 20px; width:100%; max-width:var(--container-w); margin:0 auto; text-align:center; }

/* ───────────────────────────
   4) Экран «Характеристики / Описание» (story)
   ─────────────────────────── */
.story{
  background:#fff;
  min-height:calc(100vh - var(--header-h) - var(--title-h));
  display:flex; align-items:center;
}
.story .container{
  flex:1; max-width:var(--container-w); margin:0 auto; padding:48px 22px 64px;
  display:flex; align-items:stretch; gap:60px;
}

/* Левая колонка */
.story .left{
  flex:0 0 38%;
  display:flex; flex-direction:column; justify-content:flex-start;
  border-right:1px solid #e4e4e4; padding-right:40px;
}
.section-title{ font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:#666; margin-bottom:2px; }
.specs{
  border:1px solid var(--rule); padding:14px 16px; display:grid; gap:10px;
  font-size:.96rem; color:#1f2328;
}
.spec{ display:flex; justify-content:space-between; gap:16px; }
.spec .k{ color:#6a7078; }
.spec .v{ font-weight:600; }

.story .cta{ display:grid; gap:12px; width:100%; margin-top:10px; }
.btn{
  background:var(--accent); color:#fff; border:1px solid var(--accent);
  padding:12px 18px; font-weight:800; letter-spacing:.04em; text-decoration:none; font-size:.98rem; text-align:center;
}
.btn.secondary{ background:#fff; color:#111; border-color:#111; }

/* Правая колонка */
.story .right.copy{ flex:1; display:flex; flex-direction:column; }
.story .right.copy p{ margin:0 0 12px; color:#1d2026; font-size:1.02rem; }

/* ── «Сочетается» */
.combos-wrap{ margin-top:36px; }
.combos-title{ font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:#666; margin:8px 0 10px; }
.combos{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; align-items:start; justify-items:start;
}
.combo{ text-align:center; }
.combo a.combo-link{ display:block; text-decoration:none; color:inherit; }

/* превью: ширина = 2×высота */
.combo .tile{
  width:100%; aspect-ratio:2/1;
  border:1px solid var(--rule); border-radius:14px; overflow:hidden; background:#f5f6f7;
  box-shadow:0 2px 10px rgba(0,0,0,.06); transition:transform .18s ease, box-shadow .18s ease;
}
.combo .tile img{ width:100%; height:100%; object-fit:cover; display:block; }
.combo label{
  display:block; margin-top:10px; font-size:14px; line-height:1.25; font-weight:500; color:#222;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.combo a.combo-link:hover .tile{ transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.08); }

/* Адаптив для «Сочетается» */
@media (max-width:980px){ .combos{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:560px){ .combos{ grid-template-columns:1fr; } }

/* ───────────────────────────
   5) Экран 4: Карусель (один слайд в кадре)
   ─────────────────────────── */
.carousel-screen{
  position:relative; overflow:hidden; color:#fff;
  min-height:calc(100vh - var(--header-h) - var(--title-h) - 64px);
  height:calc(100vh - var(--header-h) - var(--title-h) - 64px);
  border-top:1px solid var(--rule);
}
.slides{
  position:absolute; inset:0; display:flex; transition:transform .6s ease; will-change:transform;
}
.slide{
  position:relative; flex:0 0 100%;
  display:flex; align-items:center; justify-content:center;
}
.slide img{
  max-width:100%; max-height:100%;
  width:auto; height:auto;
  object-fit:contain; object-position:center; display:block;
}
.veil{
  position:absolute; inset:0;
  background:radial-gradient(100% 100% at 50% 60%, rgba(0,0,0,0) 0%, rgba(0,0,0,.45) 75%);
  z-index:1; pointer-events:none;
}

/* Точки/навигация карусели */
.dots{
  position:absolute; left:50%; transform:translateX(-50%);
  bottom:20px; display:flex; gap:8px; z-index:3;
}
.dot{ width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.45); border:1px solid rgba(255,255,255,.6); cursor:pointer; }
.dot.active{ background:#fff; }

/* --- исправление смещения figure в карусели --- */
.carousel-screen .slide {
  margin: 0;
  padding: 0;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.carousel-screen .slide img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* ───────────────────────────
   6) Навигация между экранами (пули справа)
   ─────────────────────────── */
.screen-dots{
  position:fixed; right:18px; top:50%; transform:translateY(-50%); display:grid; gap:12px; z-index:1100;
}
.screen-dots button{
  appearance:none; cursor:pointer; border:none; background:transparent; padding:6px; border-radius:999px; outline-offset:3px;
}
.screen-dots .bullet{
  width:10px; height:10px; border-radius:50%;
  background:rgba(0,0,0,.25); border:1px solid #fff; display:block;
}
.screen-dots button[aria-current="true"] .bullet{ background:#111; border-color:#444; }
@media (prefers-color-scheme:dark){
  .screen-dots .bullet{ background:rgba(255,255,255,.35); border-color:rgba(255,255,255,.5); }
  .screen-dots button[aria-current="true"] .bullet{ background:#fff; border-color:#fff; }
}
@media (max-width:900px){ .screen-dots{ right:12px; gap:10px; } }

/* ───────────────────────────
   7) Конструктор (экран 2)
   ─────────────────────────── */
.z-config{ background:var(--bg-soft); padding:14px 0; }
.z-config .z-wrap{
  max-width:var(--container-w); margin:0 auto; padding:0 20px;
  display:flex; flex-direction:column;
  height:calc(100vh - var(--header-h) - var(--title-h));
  max-height:calc(100vh - var(--header-h) - var(--title-h));
  min-height:520px;
}
.z-config .z-head{ flex:0 0 auto; margin:0 0 8px; }
.z-config .z-head h2{
  margin:20px 0 4px;
  font:700 clamp(22px,2.6vw,32px)/1.15 system-ui,-apple-system,Segoe UI,Inter,Roboto,Arial;
}
.z-config .z-head .z-sub{ margin:0; color:var(--muted); font-size:14px; }

.z-grid{
  flex:1 1 auto; min-height:0; display:grid; gap:var(--z-gap);
  grid-template-columns:1.05fr 1fr; align-items:start;
}

/* Левая колонка конструктора */
.z-preview{ display:grid; grid-template-rows:1fr auto; min-height:0; }
.z-preview-frame{
  min-height:0; background:#fff; border:1px solid var(--rule); border-radius:var(--z-radius);
  box-shadow:0 6px 16px rgba(17,17,17,.06);
  display:grid; place-items:center; padding:var(--z-card-pad); overflow:hidden;
}
.z-preview-mock{ position:relative; width:100%; height:100%; border-radius:10px; overflow:hidden; }
.z-preview-mock img{
  position:relative; z-index:0; width:100%; height:100%; object-fit:cover;
  object-position:var(--mask-position, 50% 50%); display:block; transition:opacity .25s ease;
}
.z-preview-mock .z-tiles{
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background-size:var(--tile-size,120px) var(--tile-size,120px);
  background-repeat:repeat; transition:opacity .25s ease; opacity:1;

  /* Маска зоны укладки */
  mask-image:var(--mask-url); -webkit-mask-image:var(--mask-url);
  mask-mode:luminance; mask-size:cover; -webkit-mask-size:cover;
  mask-position:var(--mask-position, 50% 50%); -webkit-mask-position:var(--mask-position, 50% 50%);
  mask-repeat:no-repeat; -webkit-mask-repeat:no-repeat;

  /* Выравнивание плитки */
  background-position:var(--tile-offset-x,0px) var(--tile-offset-y,0px);
}
.z-badge{ position:absolute; top:12px; left:12px; background:#111; color:#fff; font-size:11px; letter-spacing:.08em; padding:6px 8px; border-radius:999px; opacity:.9; }
.z-caption{ color:var(--muted); padding-top:4px; }

/* Правая колонка конструктора */
.z-panel{ display:flex; flex-direction:column; gap:10px; min-height:0; }
.z-card{
  background:#fff; border:1px solid var(--rule); border-radius:var(--z-radius);
  padding:var(--z-card-pad); box-shadow:0 4px 12px rgba(17,17,17,.05);
}
.z-card-title{
  margin:0 0 6px;
  font:600 12px/1.1 system-ui,-apple-system,Segoe UI,Inter;
  letter-spacing:.08em; text-transform:uppercase; color:#2b2f36;
}

/* Свотчи + палитра */
.z-swatches{ display:flex; gap:10px; flex-wrap:wrap; }
.z-swatch{
  --size:var(--z-swatch);
  width:var(--size); height:var(--size); border-radius:8px; border:1px solid var(--rule);
  background:var(--sw,#ddd); cursor:pointer; box-shadow:inset 0 0 0 1px rgba(17,17,17,.04);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.z-swatch:is(:hover,:focus-visible){ transform:translateY(-1px); box-shadow:0 2px 8px rgba(17,17,17,.12); }
.z-swatch.is-active{ outline:2px solid #111; outline-offset:2px; }
.z-palette{
  margin-top:8px; display:grid; grid-template-columns:auto auto 1fr; align-items:center; gap:8px;
  padding:8px; border:1px dashed var(--rule); border-radius:10px; background:#fafbfc;
}
.z-pal-label{
  font:600 12px/1 system-ui,-apple-system,Segoe UI,Inter; letter-spacing:.06em; text-transform:uppercase; color:#565c64;
}
.z-pal-picker{ position:relative; display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.z-pal-input{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.z-pal-chip{ width:20px; height:20px; border-radius:6px; border:1px solid #d7dbe1; background:var(--c,#000); box-shadow:inset 0 0 0 1px rgba(17,17,17,.04); }
.z-pal-hex{
  width:100%; min-width:120px;
  font:500 12px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  padding:6px 8px; border:1px solid var(--rule); border-radius:8px; background:#fff;
}
.z-pal-hex:focus{ outline:2px solid #1112; border-color:#111; }

/* Раскладки и комнаты */
.z-layouts-text{ display:flex; gap:8px; flex-wrap:wrap; }
.z-layouts-text .z-layout, .z-rooms .z-room{
  flex:1; min-width:78px; justify-content:center; text-align:center;
  font:600 12.5px/1.1 system-ui,-apple-system,Segoe UI,Inter; color:#2f343b;
  background:#fff; border:1px solid var(--rule); border-radius:9px; padding:8px 12px; cursor:pointer;
  transition:box-shadow .12s ease, transform .12s ease, border-color .12s ease;
}
.z-layouts-text .z-layout:hover, .z-rooms .z-room:hover{ transform:translateY(-1px); box-shadow:0 3px 10px rgba(17,17,17,.08); }
.z-layouts-text .z-layout.is-active, .z-rooms .z-room.is-active{ border-color:#111; box-shadow:0 0 0 2px #1111 inset; background:#f9f9fa; }
.z-rooms{ display:flex; gap:8px; flex-wrap:wrap; }
.z-layout[disabled], .z-layout.is-locked{ opacity:.45; pointer-events:none; filter:grayscale(.2); }
[hidden]{ display:none !important; }

/* Конструктор: компакт при невысоком экране */
@media (max-height:760px){
  .z-config{ padding:10px 0; }
  .z-config .z-head .z-sub{ display:none; }
  :root{ --z-swatch:26px; }
}

/* ───────────────────────────
   8) Скролл-отступы
   ─────────────────────────── */
#first{ scroll-margin-top:var(--header-h); }
#catalog,#story,#interiors{ scroll-margin-top:calc(var(--header-h) + var(--title-h)); }

/* === Контейнер по-умолчанию: вписываемся в экран === */
header.top .container,
footer.foot .container,
.story .container,
.title-inner,
.z-config .z-wrap {
  width: min(100%, var(--container-w));
  margin-inline: auto;
  padding-inline: clamp(12px, 4vw, 22px);
}
:root { --sbw: calc(100vw - 100%); } /* ширина вертикального скроллбара */

/* На всякий случай: вписываем шапку ровно в контентную ширину */
header.top { width: calc(100vw - var(--sbw)); }
/* Медиа-контент — резиновый */
img, video, canvas, svg { display:block; max-width:100%; height:auto; }

/* В флекс/грид-родителях дети имеют право сжиматься */
.story .container > *,
.z-config .z-wrap > *,
header.top .container > * {
  min-width: 0;
}

/* Временно, пока отлавливаешь виновника (можно потом убрать) */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 400px){
  header.top .container { gap: .5rem; }
  .phone { max-width: 60vw; }
}

/* Экстремально узко — показываем «Позвонить» вместо длинного номера */
@media (max-width: 340px){
  .phone::after { content: "Позвонить"; font-size: 14px; line-height: 1; }
  .phone { white-space: normal; }
}

/* === FIX 1: вернём .z-wrap к её исходной роли (flex-колонка) === */
.z-config .z-wrap{
  display: flex !important;
  flex-direction: column !important;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* Снимаем "grid-areas" с .z-wrap — они не нужны на этом уровне */
.z-config .z-wrap > :is(.z-stage,.z-canvas,.viewer,.left,.preview,
                       .z-panel,.right,.sidebar,.menu){
  grid-area: auto !important;
}

/* === FIX 2: управляем раскладкой только на уровне .z-grid === */
/* Десктоп — без изменений (две колонки) */
.z-grid{
  display: grid;
  gap: var(--z-gap);
  grid-template-columns: 1.05fr 1fr;
  align-items: start;
  min-height: 0;
}

/* Мобильный режим: сначала изображение (z-preview), потом панель (z-panel) */
@media (max-width: 900px){
  .z-grid{
    grid-template-columns: 1fr;
  }
  .z-grid > .z-preview{ order: 0; }
  .z-grid > .z-panel{ order: 1; width: 100%; max-width: none; }

  .z-panel > *{
    max-width: 100%;
    min-width: 0;
  }
}

/* === FIX 3: страховки от переполнений и хедера === */
header.top .container > *,
.story .container > *,
.z-config .z-wrap > *,
.z-grid > * { min-width: 0; }

.z-config :is(img, canvas, video, svg){
  display: block;
  max-width: 100%;
  height: auto;
}

/* 1) Вернуть десктопные паддинги контейнерам — как было до правок */
@media (min-width: 1281px){
  header.top .container,
  footer.foot .container,
  .story .container,
  .title-inner,
  .z-config .z-wrap{
    width: auto;
    max-width: var(--container-w);
    margin-inline: auto;
    padding-inline: 22px;
  }
}

/* 2) «Резиновое» вписывание для узких экранов */
@media (max-width: 1280px){
  header.top .container,
  footer.foot .container,
  .story .container,
  .title-inner,
  .z-config .z-wrap{
    width: min(100%, var(--container-w));
    margin-inline: auto;
    padding-inline: clamp(12px, 4vw, 22px);
  }
}

/* 3) Уточнить область рисования маски: как у тебя сейчас */
.z-preview-mock{
  padding: 0;
  border: 0;
}
.z-preview-mock img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--mask-position, 50% 50%);
}
.z-preview-mock .z-tiles{
  position: absolute; inset: 0;
  mask-image: var(--mask-url);
  -webkit-mask-image: var(--mask-url);
  mask-size: cover;
  -webkit-mask-size: cover;
  mask-position: var(--mask-position, 50% 50%);
  -webkit-mask-position: var(--mask-position, 50% 50%);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  /* совпадение области с «контентом» (оставлено как у тебя) */
  mask-origin: content-box;
  -webkit-mask-origin: content-box;
  mask-clip: content-box;
  -webkit-mask-clip: content-box;
  background-size: var(--tile-size,120px) var(--tile-size,120px);
  background-position: var(--tile-offset-x,0px) var(--tile-offset-y,0px);
  background-repeat: repeat;
}

/* 4) На всякий случай: фиксируем padding кадра на десктопе */
@media (min-width: 1281px){
  .z-preview-frame{ padding: var(--z-card-pad); }
}

/* === MOBILE FIX: экран 2 — стопка «превью → панель» без наложений === */
@media (max-width: 900px){
  .z-config .z-wrap{
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .z-grid{
    grid-template-columns: 1fr !important;
    grid-auto-rows: min-content;
    grid-auto-flow: row;
  }
  .z-grid > .z-preview{ order: 0; }
  .z-grid > .z-panel{ order: 1; width: 100%; max-width: none; position: relative; z-index: 1; }

  .z-preview{ min-height: 0 !important; }
  .z-preview-frame{
    height: auto !important;
    min-height: clamp(240px, 52vh, 520px);
    overflow: hidden;
    position: relative;
    z-index: 0;
  }
  .z-preview-mock{
    position: relative;
    z-index: 0;
  }

  .z-config :is(.sticky,.is-sticky){ position: static !important; top: auto !important; }

  .z-panel, .z-panel > *{
    max-width: 100%;
    min-width: 0;
    overflow: visible;
  }
}

/* === Экран 3 (story): мобильная стопка === */
@media (max-width: 900px){
  .story{
    min-height: auto;
    align-items: stretch;
  }
  .story .container{
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 32px 16px 48px;
  }
  .story .left{
    flex: none;
    width: 100%;
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 16px;
  }
  .story .right.copy{
    flex: none;
    width: 100%;
    padding-top: 4px;
  }
  .story .container > *{ min-width: 0; }
  .story .right.copy p{ font-size: 1rem; }
}

@media (max-width: 560px){
  .specs{ font-size: .95rem; }
  .z-pal-hex{ min-width: 0; }
}

/* === Мобильная перестановка экранов 2 и 3 === */
@media (max-width: 900px){
  main{
    display: flex;
    flex-direction: column;
  }
  #first     { order: 0; }
  #story     { order: 1; }
  #interiors { order: 2; }
  #catalog   { order: 3; }

  #catalog, #story{
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}

/* === Мобильное компакт-меню (≤900px) — вкладки + скроллы + действия === */
@media (max-width: 900px){
  .z-panel.z-mobile-sheet{
    position: relative;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding-bottom: 26px;
  }
  .z-tabs{
    position: sticky; top: 0;
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 6px; padding: 8px; background: #fff; z-index: 2;
    border-bottom: 1px solid var(--rule);
  }
  .z-tab{
    appearance: none; border:1px solid var(--rule); background:#fff;
    padding: 9px 10px; border-radius: 999px;
    font:600 12px/1 system-ui,Inter; color:#2f343b;
  }
  .z-tab.is-active{ border-color:#111; box-shadow:0 0 0 2px #1111 inset; }
  .z-tabpanel{ display: none; }
  .z-tabpanel.is-active{ display: block; }

  .z-swatches--scroll,
  .z-layouts--scroll,
  .z-rooms--scroll{
    display:flex; gap:10px; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px;
  }
  .z-swatches--scroll .z-swatch{ flex:0 0 auto; }
  .z-layouts--scroll .z-layout,
  .z-rooms--scroll .z-room{ flex:0 0 auto; min-width:92px; }

  .z-palette--compact{ grid-template-columns: auto 1fr; }
  .z-palette--compact .z-pal-hex{ min-width:0; }

  .z-actions{
    position: sticky; bottom: 0; left: 0; right: 0;
    display:flex; gap:8px; padding:10px; background:#fff;
    border-top:1px solid var(--rule); z-index: 3;
  }
  .z-actions .btn{ flex:1; }
  .z-actions .btn.secondary{ flex:0 0 auto; }
}

/* Вкладки/действия только на мобильных */
@media (min-width: 901px){
  .z-panel.z-mobile-sheet .z-tabs,
  .z-panel.z-mobile-sheet .z-actions{ display: none !important; }
  .z-panel.z-mobile-sheet .z-tabpanel{ display: block !important; }
  .z-swatches--scroll,
  .z-layouts--scroll,
  .z-rooms--scroll{
    overflow: visible;
    flex-wrap: wrap;
  }
  .z-layouts--scroll .z-layout,
  .z-rooms--scroll .z-room{ min-width: unset; }
}

/* Мобильная адаптация кнопок раскладок и комнат */
@media (max-width: 900px){
  .z-layouts--scroll{
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    overflow: visible !important;
    padding-bottom: 0;
  }
  .z-rooms--scroll{
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    overflow: visible !important;
    padding-bottom: 0;
  }
  .z-layouts--scroll .z-layout,
  .z-rooms--scroll .z-room{
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    text-align: center;
  }
  .z-layout,
  .z-room{
    font-size: 12.5px;
    padding: 10px 6px;
    border-radius: 10px;
  }
}

/* Мобильная версия: отступы у блоков цветов */
@media (max-width: 900px){
  .z-swatches--scroll{
    padding: 4px;
    margin: 0;
  }
  .z-swatches--scroll::before,
  .z-swatches--scroll::after{
    content: '';
    display: block;
    flex: 0 0 6px;
  }
}

/* Мобильная замена фразы "Выбери свой цвет" на иконку */
@media (max-width: 900px){
  .z-pal-label{
    position: relative;
    font-size: 0;
    color: transparent;
  }
  .z-pal-label::before{
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    background: no-repeat center/contain
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='M2 22l1.5-4.5L15 6l3 3L6.5 20.5 2 22zM17.85 8.15L15.85 6.15l1.83-1.83a1 1 0 011.41 0l.59.59a1 1 0 010 1.41L17.85 8.15z'/%3E%3C/svg%3E");
  }
}

/* Мобильная палитра: шестерёнка + образец + HEX в одну строку */
@media (max-width: 900px){
  .z-palette--compact{
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px;
  }
  .z-pal-label{
    font-size: 0;
    color: transparent;
    width: 22px; height: 22px;
    position: relative;
  }
  .z-pal-label::before{
    content: '';
    display: inline-block;
    width: 22px; height: 22px;
    background: no-repeat center/contain
      url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2350565f'>\
<path d='M19.14 12.94c.04-.31.06-.63.06-.94s-.02-.63-.06-.94l2.03-1.58a.5.5 0 00.12-.65l-1.92-3.32a.5.5 0 00-.6-.22l-2.39.96a7.07 7.07 0 00-1.63-.94l-.36-2.54A.5.5 0 0013.9 1h-3.8a.5.5 0 00-.49.41l-.36 2.54c-.58.24-1.13.55-1.63.94l-2.39-.96a.5.5 0 00-.6.22L2.7 7.41a.5.5 0 00.12.65l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94L2.82 13.1a.5.5 0 00-.12.65l1.92 3.32c.13.23.39.32.6.22l2.39-.96c.5.39 1.05.7 1.63.94l.36 2.54c.05.24.25.41.49.41h3.8c.24 0 .44-.17.49-.41l.36-2.54c.58-.24 1.13-.55 1.63-.94l2.39.96c.22.09.48.01.6-.22l1.92-3.32a.5.5 0 00-.12-.65l-2.03-1.58zM12 15.5A3.5 3.5 0 1112 8a3.5 3.5 0 010 7.5z'/>\
</svg>");
  }
  .z-pal-picker{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
  }
  .z-pal-chip{
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 1px solid #d7dbe1;
    box-shadow: inset 0 0 0 1px rgba(17,17,17,.04);
  }
  .z-pal-input{
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
  }
  .z-pal-hex{
    min-width: 0;
    width: 100%;
    font-size: 12px;
    padding: 8px 10px;
    line-height: 1.2;
  }
}

/* 2.1 Скрыть подпись под превью на мобильных */
@media (max-width: 900px){
  .z-caption{ display:none !important; }
}

/* 2.2 Спрятать строку "пользовательского цвета" на мобильных */
@media (max-width: 900px){
  .z-palette{ display:none !important; }
}

/* «Особый» свотч (пользовательский цвет) */
.z-swatch--custom{
  position: relative;
  background: var(--sw, #ddd);
  border-style: dashed !important;
  border-color: #b7bcc5 !important;
}
.z-swatch--custom .z-swatch-mark{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; line-height: 1;
  color: #50565f;
  pointer-events: none;
}
.z-swatch--custom .z-swatch-color{
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.z-swatch--custom.is-active{
  outline: 2px solid #111; outline-offset: 2px;
  border-style: solid !important;
}

/* MOBILE: панель вкладок поверх нижней части изображения */
@media (max-width: 900px){
  :root{ --sheet-overlap: clamp(64px, 16vw, 110px); }
  .z-preview-frame{ position: relative; overflow: hidden; }
  .z-panel.z-mobile-sheet{
    position: relative;
    z-index: 5;
    margin-top: calc(-1 * var(--sheet-overlap));
    border-top: 1px solid var(--rule);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 18px rgba(17,17,17,.08);
    background: #fff;
  }
  .z-tabs{
    position: relative;
    top: calc(-1 * (var(--sheet-overlap) - 12px));
    margin-bottom: calc(-1 * (var(--sheet-overlap) - 12px));
    border: 1px solid var(--rule);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
    background: #fff;
    width: max(260px, min(90%, 540px));
    margin-left: auto;
    margin-right: auto;
    z-index: 6;
  }
  .z-panel.z-mobile-sheet .z-tabpanel{ padding-top: 8px; }
  .z-preview-mock{ pointer-events: none; }
  .z-panel.z-mobile-sheet, .z-panel.z-mobile-sheet *{ pointer-events: auto; }
  @media (max-width: 360px){
    :root{ --sheet-overlap: clamp(52px, 18vw, 90px); }
  }
}

/* Показываем кнопку "+" только на десктопе скрыта */
@media (min-width: 901px){
  .z-swatch--custom{ display: none !important; }
}

/* MOBILE: контрастные точки карусели */
@media (max-width: 900px){
  .dots{
    bottom: 16px;
    z-index: 10;
    display: flex;
    gap: 10px;
  }
  .dot{
    position: relative;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0,0,0,.5);
    transition: background .2s ease, box-shadow .2s ease;
  }
  .dot::after{
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    pointer-events: none;
  }
  .dot.active{
    background: #111;
    border-color: rgba(255,255,255,.9);
    box-shadow:
      0 0 0 2px rgba(255,255,255,.9),
      0 2px 6px rgba(0,0,0,.5);
  }
  .dot.active::after{
    box-shadow: 0 0 0 2px rgba(255,255,255,.4);
  }
}

/* Сближаем заголовок с превью на десктопе */
@media (min-width: 901px){
  .z-config .z-head{ margin: 8px 0 0; }
  .z-config .z-head h2{
    margin: 0;
    line-height: 1.05;
  }
  .z-config .z-sub{ margin-top: 2px; }
  .z-config .z-grid{ margin-top: 6px; }
}

/* Лёгкое нахлёстывание заголовка на рамку превью */
@media (min-width: 901px){
  .z-config .z-head{
    position: relative;
    z-index: 2;
    margin-bottom: -6px;
  }
  .z-preview-frame{ margin-top: 6px; }
}

/* Мобильная типографика заголовка плитки и слогана */
@media (max-width: 900px){
  .title-inner{ padding: 14px 0 12px; }
  .title-block h1{
    font-size: clamp(36px, 7.2vw, 32px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
  }
  .subtitle{
    font-size: clamp(13px, 3.6vw, 16px);
    line-height: 1.3;
    margin-top: 0;
  }
}

/* Очень узкие экраны */
@media (max-width: 360px){
  .title-block h1{ font-size: clamp(30px, 6.8vw, 26px); }
  .subtitle{ font-size: clamp(12px, 3.8vw, 14px); }
}

/* Скрываем точки навигации на мобильных */
@media (max-width: 900px){
  .screen-dots{ display: none !important; }
}

/* Бургер и мобильное меню */
@media (max-width: 900px){
  .burger{
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 1200;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .burger span{
    display: block;
    height: 3px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
  }
  .burger.is-active span:nth-child(1){ transform: translateY(10px) rotate(45deg); }
  .burger.is-active span:nth-child(2){ opacity: 0; }
  .burger.is-active span:nth-child(3){ transform: translateY(-10px) rotate(-45deg); }

  .mobile-menu{
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    background: #fff;
    border-top: 1px solid var(--rule);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    z-index: 1100;
  }
  .mobile-menu a{
    display: block;
    padding: 12px 20px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
  }
  .mobile-menu a:hover{ background: var(--bg-soft); }
}

/* Скрываем телефон на мобильных */
@media (max-width: 900px){
  .phone{ display: none !important; }
}

/* MOBILE-ONLY FIX: фото и маску якорим в левый верхний угол,
   чтобы совпали с фоновым паттерном (.z-tiles), который считается от (0,0) */
@media (max-width: 900px){
  .z-preview-mock img{
    object-position: left top; /* было center → центр давал сдвиг */
  }
  .z-preview-mock .z-tiles{
    mask-position: left top;
    -webkit-mask-position: left top;
    /* фоновый паттерн не трогаем: background-position остаётся через var(--tile-offset-*) */
  }
}
/* MOBILE: сдвиг видимой области фото/маски относительно левого края.
   Паттерн плитки НЕ трогаем. */
@media (max-width: 900px){
  :root{
    /* подстрой: положительное значение двигает “точку интереса” правее */
    --mobile-shift-x: -120px;  /* ⇠ поменяй под свой кадр */
    --mobile-shift-y: 0px;   /* если нужно немного вверх/вниз */
  }

  /* фото */
  .z-preview-mock img{
    /* было: object-position: left top; */
    object-position: left var(--mobile-shift-x) top var(--mobile-shift-y);
  }

  /* маска — теми же координатами */
  .z-preview-mock .z-tiles{
    /* было: mask-position: left top; */
    mask-position: left var(--mobile-shift-x) top var(--mobile-shift-y);
    -webkit-mask-position: left var(--mobile-shift-x) top var(--mobile-shift-y);
    /* ВАЖНО: background-position не трогаем — остаётся через var(--tile-offset-*) */
  }
}

/* Блок заголовка и меты */
.portfolio-grid-tilu .portfolio__content .inner-content h3{
  margin: 0 0 6px;              /* больший отступ после названия */
  letter-spacing: .02em;
}

/* Общий контейнер с мета */
.portfolio-grid-tilu .portfolio__content .portfolio-meta{
  display: grid;
  gap: 2px;                      /* меньший интервал между строками меты */
  margin: 0 0 0;                 /* без лишних внешних отступов */
}

/* Строки меты */
.portfolio-grid-tilu .portfolio__content .meta-line{
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: .01em;
  color: rgba(255,255,255,.92);  /* достаточно контраста */
}

/* Размер — чуть контрастнее и плотнее */
.portfolio-grid-tilu .portfolio__content .meta-size{
  font-weight: 500;              /* полужирный */
  color: rgba(255,255,255,.96);
}

/* Материал — легче и тише */
.portfolio-grid-tilu .portfolio__content .meta-material{
  font-weight: 400;
  color: rgba(255,255,255,.82);
}

/* Кнопка-иконка — выравниваем по правому краю блока */
.portfolio-grid-tilu .portfolio__content .portfolio-cta{
  margin-left: auto;             /* уедет вправо */
}

.portfolio-grid-tilu .portfolio__content h3{
  font-weight: 700;
  letter-spacing: .06em;     /* чуть шире кернинг для капса */
  text-transform: uppercase;
}

/* .portfolio-grid-tilu .portfolio__content .portfolio-cta{
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
} */
/* .portfolio-grid-tilu .portfolio__content .portfolio-cta:hover .cta-arr,
.portfolio-grid-tilu .portfolio__content .portfolio-cta:hover .cta-min,
.portfolio-grid-tilu .portfolio__content .portfolio-cta:hover .cta-eye{
  transform: translateX(0.5px);
  transition: transform .2s ease;
} */
/* .portfolio-grid-tilu .portfolio__content .cta-arr,
.portfolio-grid-tilu .portfolio__content .cta-min,
.portfolio-grid-tilu .portfolio__content .cta-eye{
  transition: transform .2s ease;
} */
.portfolio-grid-tilu .portfolio__content{
  padding: 18px 18px 26px; /* низ чуть больше */
}

.portfolio-grid-tilu .portfolio__content .portfolio-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;                  /* немного крупнее */
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.05); /* лёгкий прозрачный фон, не полностью прозрачный */
  color: #ffffff;
  /* transition: all .3s ease; */
  /* margin-top: 18px; */             /* чуть выше — не прижимается к низу блока */
  /* margin-left: auto; */
  box-shadow: none;             /* убираем лишнюю тень */
}


.portfolio-grid-tilu .portfolio__content .portfolio-cta svg {
  width: 24px;                  /* стрелка крупнее */
  height: 24px;
  stroke-width: 1.3;
  /* transition: transform .2s ease; */
}

/* .portfolio-grid-tilu .portfolio__content .portfolio-cta:hover svg {
  transform: translateX(0.5px);
} */
/* .portfolio-grid-tilu .portfolio__content .portfolio-cta svg {
  transition: transform .35s cubic-bezier(.25,.1,.25,1);
} */

/* .portfolio-grid-tilu .portfolio__content .portfolio-cta:hover svg {
  transform: translateX(0.4px);
} */
.portfolio-grid-tilu .portfolio__content .portfolio-cta:hover {
  background: rgba(255,255,255,0.9);
  color: #000;
  border-color: transparent;
  transform: none;                /* <-- убираем движение */
  box-shadow: 0 0 8px rgba(255,255,255,0.25); /* мягкое свечение вместо "прыжка" */
}

/* Бренд в шапке: всегда чёрный, без подчёркивания */
header.top .brand,
header.top .brand a,
header.top .brand a:link,
header.top .brand a:visited,
header.top .brand a:hover,
header.top .brand a:active,
header.top .brand a:focus {
  color: #0b0b0b !important;      /* или var(--ink) */
  text-decoration: none !important;
}

/* Дадим аккуратный фокус вместо подчёркивания (по желанию) */
header.top .brand a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}



/* Общий контейнер — по размеру такой же, как у обычной плитки */
.tile--text {
  position: relative;
  background: #f4f4f4; /* светлый нейтральный фон */
  color: #000;
  display: flex;
  align-items: left;
  justify-content: left;
  text-align: left;
  padding: 3rem 2rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tile--text .tile-link-inner {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}

.tile--text .tile-text-content {
  max-width: 80%;
}

.tile--text h3 {
  font-size: 22pt;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
  color: #000;
} 

 .tile--text p {
  font-size: 1rem;
/*   opacity: 0.7; */
  margin-top: 0px;
} 

/* Hover-эффект — чтобы чувствовалась кликабельность */
.tile--text:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tile--text:hover h2 {
  text-decoration: underline;
} 

.header-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.header-lang__link {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: #666;
  opacity: 0.7;
  transition: opacity .2s ease, color .2s ease;
}

.header-lang__link:hover {
  opacity: 1;
}

.header-lang__link.is-active {
  opacity: 1;
  color: #111; /* можно заменить на фирменный тёмный */
}

.header-lang__divider {
  opacity: 0.4;
}

/* Прячем баннер Google Translate и не даём ему смещать страницу */
.goog-te-banner-frame.skiptranslate {
  display: none !important;
}
body {
  top: 0 !important;
}
.header-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.header-lang__link {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: #666;
  opacity: 0.7;
  transition: opacity .2s ease, color .2s ease;
}

.header-lang__link:hover {
  opacity: 1;
}

.header-lang__link.is-active {
  opacity: 1;
  color: #111;
}

.header-lang__divider {
  opacity: 0.4;
}

#google_translate_element {
  position: fixed;
  bottom: -9999px;
  right: -9999px;
}

.goog-te-banner-frame.skiptranslate {
  display: none !important;
}
body { top: 0 !important; }
.goog-logo-link,
.goog-te-gadget span {
  display: none !important;
}
/* Спрятать верхний баннер перевода */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
  display: none !important;
}

/* Google двигает body вниз, возвращаем на место */
body {
  top: 0 !important;
  position: static !important;
}

/* На всякий случай — убрать "подсказку" перевода */
#goog-gt-tt {
  display: none !important;
  visibility: hidden !important;
}
/* Спрятать верхний баннер (iframe) */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
  display: none !important;
}

/* Убрать сдвиг body вниз, который делает Google */
body {
  top: 0 !important;
  position: static !important;
}

/* Спрятать виджет, который вставляется в #google_translate_element */
#google_translate_element,
.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-menu-value,
.goog-te-combo {
  display: none !important;
}

/* Спрятать всплывающее окошко-подсказку перевода */
#goog-gt-tt,
#goog-gt-tt .inner,
#goog-gt-tt .outer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* На всякий случай: любые элементы интерфейса с этими классами Google */
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-ORHb-bN97Pc,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-ZVi9od-TvD9Pc-hSRGPd {
  display: none !important;
}

/* Убираем отступы, если Google пытается что-то зарезервировать */
html, body {
  margin-top: 0 !important;
}

/* contacts
   =============================== */

/* Экран */
.contacts-screen {
   padding: 5rem 0 1rem;
   max-hight: 100hv;
}

/* Центровка относительно about-контейнера */
.contacts-screen .about-container--center {
  display: flex;
  flex-direction: column;
  align-items: center; /* центр по горизонтали */
}

/* Заголовок */
.contacts-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contacts-head__title {
  margin: 0 0 .75rem;
  font-size: 2.1rem;
  text-transform: none;
}

.contacts-head__subtitle {
  margin: 0;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* Капсула */
.contacts-shell {
  background: #ffffff;
  border-radius: 2.5rem;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.06);
  padding: 2.25rem 2.25rem 1.75rem;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
}

.contacts-shell__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 2.25rem;
  row-gap: 2rem;
  font-size: .9rem;
}

/* Колонки */
.contacts-col {
  font-size: .9rem;
}

.contacts-tag {
  margin: 0 0 .25rem;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .6;
}

.contacts-title {
  margin: 0;
  font-size: 1.2rem;
}

.contacts-role {
  margin: .2rem 0 1rem;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .6;
}

/* Таблица контактов */
.contacts-table {
  border-radius: 1.5rem;
  border: 1px solid rgba(15,23,42,.06);
  padding: 1rem 1.2rem;
  background: #f9fafb;
}

.contacts-row {
  display: grid;
  grid-template-columns: minmax(70px, 100px) minmax(0, 1fr);
  column-gap: 0rem;
  row-gap: .15rem;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(15,23,42,.04);
}

.contacts-row:last-child {
  border-bottom: none;
}

.contacts-row__label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .7;
}

.contacts-row__value {
  font-size: .9rem;
  line-height: 1.4;
}

.contacts-muted {
  font-size: .8rem;
  opacity: .7;
}

/* Юридические и казахские подписи */
.contacts-legal {
  margin: .8rem 0 0;
  font-size: .8rem;
  line-height: 1.4;
  opacity: .85;
}

.contacts-legal--kk {
  margin-top: .7rem;
}

.contacts-legal--small {
  max-width: 26rem;
}

/* Кнопки мессенджеров */
.contacts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .8rem 0 .5rem;
}

.contacts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #3b46ff;
  font-size: .8rem;
  text-decoration: none;
  color: #3b46ff;
  background: #fff;
}

.contacts-btn--ghost {
  border-color: rgba(59, 70, 255, .35);
  color: rgba(59, 70, 255, .9);
}

.contacts-btn:hover {
  box-shadow: 0 6px 18px rgba(59, 70, 255, 0.18);
}

/* Футер капсулы */
.contacts-shell__footer {
  margin-top: 1.4rem;
  border-top: 1px solid rgba(15,23,42,.06);
  padding-top: 1rem;
  font-size: .8rem;
  opacity: .8;
}

/* Мобильный телефон ("Показать номер") */
.phone-reveal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.18);
  background: #fff;
  font-size: .85rem;
  cursor: pointer;
}

.phone-links {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

.phone-number {
  font-weight: 500;
}

/* Почта */
.email-block {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.email-block__image {
  display: block;
  height: 14px;
  transition: transform .2s ease, opacity .2s ease;
}

.email-block:hover .email-block__image {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Подсказка для почты */
.email-block__hint {
  display: inline-block;
  margin-left: .5rem;
  font-size: .8rem;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .25s ease, transform .25s ease;
}

.email-block__hint.is-visible {
  opacity: 0.85;
  transform: translateY(0);
}

/* Телефон (SVG) с копированием */
.copy-phone {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.copy-phone__image {
  display: block;
  height: 12px !important;
  transition: transform .2s ease, opacity .2s ease;
}

.copy-phone:hover .copy-phone__image {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Подсказка "Скопировано" для телефона */
.copy-hint {
  display: inline-block;
  margin-left: .5rem;
  font-size: .8rem;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .25s ease, transform .25s ease;
}

.copy-hint.is-visible {
  opacity: 0.85;
  transform: translateY(0);
}

/* Мобильная / десктопная логика для телефона */
@media (min-width: 768px) {
  .phone-live { display: none; }
  .phone-image {
      display: inline-flex;
      align-items: center;
      cursor: pointer;}
}

@media (max-width: 767px) {
  .phone-live { display: block; } 
  .phone-image {  display: block;}
}

/* Адаптив */
@media (max-width: 1024px) {
  .contacts-shell {
    max-width: 100%;
    padding: 2rem 1.75rem 1.5rem;
  }

  .contacts-shell__inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.5rem;
  }
}

@media (max-width: 640px) {
    .header-lang-switcher {
    margin-right: 35px;
}
  .contacts-head__title {
    font-size: 1.6rem;
  }

  .contacts-shell {
    padding: 1.6rem 1.25rem 1.3rem;
    border-radius: 1.75rem;
  }

  .contacts-table {
    padding: .9rem 1rem;
  }
}

/* === DOTS unified (desktop = mobile look) === */
.dots{
  bottom: 16px;
  z-index: 10;
  display: flex;
  gap: 10px;
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
}

.dot{
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.5);
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dot::after{
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
}

.dot.active{
  background: #111;
  border-color: rgba(255,255,255,.9);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.9),
    0 2px 6px rgba(0,0,0,.5);
}

.dot.active::after{
  box-shadow: 0 0 0 2px rgba(255,255,255,.4);
}

/* если хочешь на мобиле чуть ниже/выше — оставь только это */
@media (max-width: 900px){
  .dots{ bottom: 16px; }
}

/* Когда нет последнего экрана (интерьеров), последний видимый экран растягивается до низа */
body.no-interiors section.story.is-last-visible {
  min-height: calc(100vh - var(--header-h) - var(--title-h) - 64px);
}

/* футер */
/* ===== Base ===== */
.meraki-footer {
  background: #fff;
  padding: 32px 0 24px;
}

/* контейнер по ширине */
.meraki-footer__shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 16px;
}

/* верхняя строка */
.meraki-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.meraki-footer__brand {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 20px;
}

.meraki-footer__year {
  font-size: 0.8rem;
  color: #999;
}

/* карточка с подложкой для содержательной части */
.meraki-footer__card {
  padding: 18px 24px 16px;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.05);
  background: #fff;
}

/* три столбца */
.meraki-footer__inner {
  display: grid;
  grid-template-columns: 1.7fr 1.7fr 1.3fr; /* RU, KZ, контакты */
  column-gap: 40px;
  row-gap: 16px;
}

.meraki-footer__col { min-width: 0; }

.meraki-footer__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #333;
}

.meraki-footer__hint {
  display: inline-block;
  width: 26px;
  font-size: 0.8rem;
  color: #888;
}

.meraki-footer__meta {
  margin: 8px 0 0;
  font-size: 0.8rem;
}

.meraki-footer__meta a,
.meraki-footer__text a {
  color: -webkit-link;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.meraki-footer__meta a:hover,
.meraki-footer__text a:hover {
  color: #444;
  border-bottom-color: #ccc;
}

/* контакты */
.meraki-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.meraki-footer__contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* иконки */
.meraki-footer__icon-link,
.meraki-footer__icons a {
  display: inline-block;
}

.meraki-footer__icons {
  margin-top: 6px;
  text-align: right;
  margin-right: 45px;
}

.meraki-footer__icons a { margin-right: 10px; }

.meraki-footer__icon-link img,
.meraki-footer__icons img {
  opacity: 0.85;
  height: 14px;
  vertical-align: middle;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.meraki-footer__icon-link img:hover,
.meraki-footer__icons img:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* приглушение телефон/почта (десктоп) */
.meraki-footer__icon-link img {
  opacity: 0.6;
  filter: brightness(0) invert(0.5);
  transition: opacity 0.2s, filter 0.2s;
}

.meraki-footer__icon-link img:hover {
  opacity: 1;
  filter: brightness(0) invert(0);
}

/* линия */
.meraki-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 10%,
    #e3e3e3 50%,
    transparent 90%
  );
  opacity: 0.6;
  margin: 5px 0;
}

/* ===== Adaptive: <=980px (общий планшет/мобила слой) ===== */
@media (max-width: 980px) {
  .meraki-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}

/* ===== TABLET layout: 641–980px ===== */
.meraki-footer__meta--tablet { display: none; }

@media (max-width: 980px) and (min-width: 641px){

  /* 2 колонки: слева контакты, справа RU+KZ */
  .meraki-footer__inner{
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    column-gap: 28px;
    row-gap: 16px;

    grid-template-areas:
      "contacts ru"
      "contacts kz";
  }

  .meraki-footer__inner .meraki-footer__col:nth-child(3){ grid-area: contacts; }
  .meraki-footer__inner .meraki-footer__col:nth-child(1){ grid-area: ru; }
  .meraki-footer__inner .meraki-footer__col:nth-child(2){ grid-area: kz; }

  /* Внутри левой колонки: соцсети -> телефоны -> почта -> политика */
  .meraki-footer__inner .meraki-footer__col:nth-child(3){
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .meraki-footer__inner .meraki-footer__col:nth-child(3) .meraki-footer__icons{
    order: 0;
    text-align: left;
    margin: 0;
  }

  .meraki-footer__inner .meraki-footer__col:nth-child(3) .meraki-footer__contacts{
    order: 1;
    margin: 0;
  }

  .meraki-footer__inner .meraki-footer__col:nth-child(3) .meraki-footer__meta--tablet{
    order: 2;
    margin-top: 40px;
  }

  /* скрываем оригинальную ссылку политики в RU-колонке на планшете */
  .meraki-footer__inner .meraki-footer__col:nth-child(1) .meraki-footer__meta{
    display: none;
  }

  /* дубль ссылки политики показываем только на планшете */
  .meraki-footer__meta--tablet{ display: block; }

  /* подстройка свитчера языка (как было) */
  .header-lang-switcher { margin-right: 35px; }

  /* Увеличенные соцсети на планшетах */
  .meraki-footer__icons img{
    height: 38px;
    opacity: 0.7;
  }
}

/* ===== MOBILE: <=640px ===== */
@media (max-width: 640px) {
  .meraki-footer__shell { padding: 0 20px 14px; }
  .meraki-footer__top { margin-bottom: 10px; }

  .meraki-footer__card {
    padding: 14px 16px 14px;
    border-radius: 20px 20px 0 0;
  }

  /* grid -> column flex + порядок колонок */
  .meraki-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .meraki-footer__inner .meraki-footer__col:nth-child(3){ order: 0; }
  .meraki-footer__inner .meraki-footer__col:nth-child(1){ order: 1; }
  .meraki-footer__inner .meraki-footer__col:nth-child(2){ order: 2; }

  /* внутри контактов соцсети вверх */
  .meraki-footer__inner .meraki-footer__col:nth-child(3){
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .meraki-footer__icons{
    order: 0;
    margin-right: 0;
    margin-top: 0;
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .meraki-footer__inner
    .meraki-footer__col:nth-child(3) > .meraki-line{
    order: 1;
    margin: 2px 0;
  }

  .meraki-footer__contacts{
    order: 2;
    margin-bottom: 0;
  }
}

/* MOBILE: если нужно крупнее соцсети */
@media (max-width: 640px){
  .meraki-footer__icon-link img,
  .meraki-footer__icons img { height: 26px; }
}

/* MOBILE: уменьшить телефон/почту + типографика */
@media (max-width: 640px){
  .meraki-footer__icon-link img{
    height: 12px !important;
    opacity: 0.8;
  }

  .meraki-footer__contact-row{ gap: 6px; }

  .meraki-footer__hint{
    font-size: 0.7rem;
    width: auto;
    min-width: 26px;
    text-align: right;
  }

  .meraki-footer__contacts{
    align-items: center;
    gap: 8px;
  }
  .meraki-footer__contact-row{
    justify-content: center;
    gap: 8px;
  }

  .meraki-footer__text{
    font-size: 0.7rem;
    text-align: center;
  }

  .meraki-footer__meta { text-align: center; }

  .meraki-footer__meta a,
  .meraki-footer__text a{
    color: -webkit-link;
    font-size: 0.7rem;
    text-align: center;
  }
}
