body[data-route="zhk"] .map-veil {
  background:
    linear-gradient(90deg, rgba(242, 240, 234, 0.82) 0%, rgba(242, 240, 234, 0.35) 34%, rgba(242, 240, 234, 0) 52%),
    linear-gradient(0deg, rgba(242, 240, 234, 0.6), rgba(242, 240, 234, 0) 28%);
}

.zhk-hero { position: relative; height: 100svh; }
.zhk-title {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 56px;
  width: min(580px, calc(100% - 32px));
  padding: 26px 30px 30px;
  transform-origin: bottom left;
  will-change: transform, opacity;
  border-radius: 32px;
}
.back { display: inline-block; margin-bottom: 14px; font-size: 0.9rem; font-weight: 650; color: var(--teal); text-decoration: none; }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }
.zhk-name { font-size: clamp(2.3rem, 5vw, 4.3rem); }
.zhk-title .lead { margin: 14px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 16px 18px; margin: 24px 0; }
.facts div { display: flex; flex-direction: column-reverse; gap: 2px; }
.facts dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; font-size: 1.12rem; font-weight: 680; letter-spacing: -0.02em; }
.zhk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; width: 26px; height: 40px; margin-left: -13px; border: 2px solid rgba(15, 36, 39, 0.35); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: cue 1.6s var(--ease-out) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* Лист страницы ЖК — две «бумаги» с окном на карту между ними. Сам лист
   прозрачный и пропускает клики к карте, бумага и карточки — нет. */
.zhk-sheet { padding-top: 0; background: none; box-shadow: none; }
body[data-route="zhk"] .view, .zhk, .zhk-hero, .zhk-sheet, .zwin { pointer-events: none; }
.zhk-hero > *, .zpaper, .zhk-tabs, .zwin-card { pointer-events: auto; }
.zpaper { position: relative; background: var(--paper); }
.zpaper-top { padding-top: 40px; padding-bottom: 72px; border-radius: 36px 36px 36px 36px; box-shadow: 0 -40px 80px -40px rgba(15, 36, 39, 0.35), 0 40px 80px -40px rgba(15, 36, 39, 0.35); }
.zpaper-bottom { border-radius: 36px 36px 0 0; box-shadow: 0 -40px 80px -40px rgba(15, 36, 39, 0.35); }
.zhk-sheet > .zhk-tabs { margin-bottom: -27px; }

/* Окно на карту со схемой дома. */
.zwin { position: relative; height: 100svh; min-height: 620px; }
.zwin-card { position: sticky; top: 150px; z-index: 2; width: 380px; margin-left: max(16px, calc((100% - 1180px) / 2)); padding: 22px 22px 20px; border-radius: 30px; }
.zwin-card .kicker { margin-bottom: 6px; }
.zwin-card .h3 { margin-bottom: 8px; font-size: 1.5rem; letter-spacing: -0.02em; }
.zwin-hint { margin: 0 0 14px; }
.zwin-sec { display: block; margin-bottom: 10px; }
.zwin-sec select { width: 100%; min-height: 40px; padding: 0 36px 0 14px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230f2427' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; box-shadow: inset 0 0 0 1px rgba(15, 36, 39, 0.1); font-weight: 600; appearance: none; }
.zwin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.zwin-cut[hidden], .zwin-sec[hidden], .zwin-actions [hidden] { display: none; }
.zwin-big { margin-top: 2px; }
.zhk-tabs {
  position: sticky;
  z-index: 6;
  top: 84px;
  display: flex;
  gap: 2px;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: -27px auto 0;
  padding: 5px;
  overflow-x: auto;
  border-radius: 999px;
  scrollbar-width: none;
}
.zhk-tabs a { flex: none; padding: 9px 16px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.zhk-tabs a:hover { background: rgba(255, 255, 255, 0.85); color: var(--ink); }
/* Разделы не влезают на телефон — край растворяется: видно, что ленту можно листать. */
@media (max-width: 820px) {
  .zhk-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
/* Край прокрутки: текст под шапкой и разделами растворяется в бумаге,
   а не торчит между стеклянными капсулами. */
.zhk-edge { position: sticky; z-index: 5; top: 0; height: 0; pointer-events: none; }
.zhk-edge::before { content: ""; position: absolute; inset: 0 0 auto; height: 168px; background: linear-gradient(var(--paper) 112px, rgba(242, 240, 234, 0)); opacity: var(--edge, 0); }

.zsec { padding-top: 64px; scroll-margin-top: 150px; }
.status-bar { display: flex; height: 12px; margin: 0 0 12px; overflow: hidden; border-radius: 999px; background: var(--paper-2); }
.status-bar i { display: block; height: 100%; }
.st-free { background: var(--teal-2); }
.st-res { background: var(--coral); }
.st-sold { background: #cbc6ba; }
.status-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 26px; font-size: 0.9rem; color: var(--ink-2); }
.status-legend > span { white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }

.rooms { display: grid; gap: 6px; }
.room-row {
  display: grid;
  grid-template-columns: 200px 1fr 64px 150px 150px;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}
.room-name { font-weight: 620; }
.room-bar { height: 8px; overflow: hidden; border-radius: 4px; background: var(--paper-2); }
.room-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-2), #8fd48a); }
.room-count { text-align: right; font-weight: 680; }
.room-area { text-align: right; color: var(--ink-2); }
.room-price { text-align: right; font-weight: 620; }

.strip-nav { display: flex; gap: 6px; }
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 14px;
  margin: 0;
  padding: 6px 4px 26px;
  margin: 0 -4px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.strip li { scroll-snap-align: start; }
.lcard {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 10px 10px 16px;
  border: 0;
  border-radius: 26px;
  text-align: left;
  background: rgba(255, 255, 255, 0.75);
  transition: transform 0.3s var(--ease-out);
}
.lcard.glass { box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.34), var(--shadow-s); }
.lcard:hover { transform: translateY(-3px); }
.lcard:active { transform: scale(0.98); }
.lcard-img { display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 10px; overflow: hidden; border-radius: 18px; background: #fff; }
.lcard-img img { width: 100%; height: 100%; padding: 10px; object-fit: contain; }
.lcard-img.is-broken::after { content: "Планировка"; font-size: 0.85rem; color: var(--ink-3); }
.lcard-title, .lcard-price, .lcard-meta { padding: 0 6px; }
.lcard-title { font-weight: 650; }
.lcard-price { font-weight: 620; }
.lcard-meta { font-size: 0.8rem; color: var(--ink-3); }

.spinner { display: inline-block; width: 22px; height: 22px; margin-right: 10px; vertical-align: middle; border: 2px solid var(--line); border-top-color: var(--teal-2); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.small { margin-top: 12px; font-size: 0.85rem; }

.about { display: grid; grid-template-columns: 1.15fr 1fr; align-items: start; gap: 24px 56px; }
.about-main > .btn { margin-top: 8px; }
.about-media { position: sticky; top: 150px; display: grid; gap: 10px; }
.about-lead { margin: 0; padding: 8px; border-radius: 28px; }
.about-lead img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }
.about-lead figcaption { padding: 8px 8px 4px; font-size: 0.85rem; color: var(--ink-2); }
.about-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.about-thumbs button { flex: none; width: 84px; height: 64px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; opacity: 0.6; box-shadow: inset 0 0 0 2px transparent; transition: opacity 0.2s, box-shadow 0.2s; }
.about-thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--teal-2); }
.about-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.about .h2 { margin-bottom: 14px; }
.about-addr { margin: 0 0 6px; font-weight: 600; }
.about-text p { margin: 0 0 12px; color: var(--ink-2); }
.about-text details summary { cursor: pointer; margin-bottom: 12px; font-weight: 650; color: var(--teal); }
#others { padding-bottom: 72px; }
#others .h2 { margin-bottom: 26px; }
.notfound { min-height: 100svh; padding-top: 160px; }
.notfound .h2 { margin-bottom: 24px; }

@media (max-width: 820px) {
  body[data-route="zhk"] .map-veil { background: linear-gradient(0deg, rgba(242, 240, 234, 0.9) 0%, rgba(242, 240, 234, 0.5) 48%, rgba(242, 240, 234, 0) 66%); }
  .zhk-title { left: 10px; right: 10px; bottom: 18px; width: auto; padding: 20px 20px 22px; border-radius: 26px; }
  .facts { grid-template-columns: repeat(2, 1fr); margin: 18px 0; }
  .scroll-cue { display: none; }
  .zhk-tabs { top: 72px; }
  .zhk-edge::before { height: 150px; background: linear-gradient(var(--paper) 100px, rgba(242, 240, 234, 0)); }
  .room-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; }
  .room-bar { grid-column: 1 / -1; grid-row: 2; }
  .room-count { grid-row: 1; grid-column: 2; }
  .room-area { grid-row: 3; grid-column: 1; text-align: left; font-size: 0.88rem; }
  .room-price { grid-row: 3; grid-column: 2; }
  .strip { grid-auto-columns: 74%; }
  .strip-nav { display: none; }
  .about { grid-template-columns: 1fr; }
  .about-media { position: static; }
  .zpaper-top { padding-top: 34px; padding-bottom: 48px; border-radius: 28px; }
  .zpaper-bottom { border-radius: 28px 28px 0 0; }
  .zwin-card { position: absolute; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); left: 10px; right: 10px; width: auto; margin: 0; padding: 14px 16px 12px; border-radius: 24px; }
  .zwin-card .kicker, .zwin-hint, .zwin-big { display: none; }
  .zwin-card .h3 { margin-bottom: 10px; font-size: 1.1rem; }
  .zwin-sec select { min-height: 36px; font-size: 0.9rem; }
  .zwin-card .fl-step { margin-bottom: 6px; }
  .zwin-actions { margin: 0; }
}

/* Масштаб и подсказка жестов в окне карты. */
.zwin-tools { position: absolute; right: max(16px, calc((100% - 1180px) / 2)); bottom: 36px; z-index: 2; display: grid; overflow: hidden; border-radius: 18px; pointer-events: auto; }
.zwin-tools button { width: 46px; height: 46px; border: 0; background: none; font-size: 1.3rem; font-weight: 600; }
.zwin-tools button + button { border-top: 1px solid var(--line); }
.zwin-tools button:hover { background: rgba(255, 255, 255, 0.6); }
.zwin-gesture { position: absolute; left: 50%; bottom: 30px; z-index: 2; max-width: calc(100% - 140px); margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink-2); text-align: center; transform: translateX(-50%); }
@media (max-width: 820px) {
  .zwin-tools { top: 140px; right: 12px; bottom: auto; }
  .zwin-gesture { top: 148px; bottom: auto; left: 16px; max-width: calc(100% - 92px); transform: none; font-size: 0.78rem; }
}
