/* ============================================================
   НОВАЯ ЩЕРБИНКА — структурные стили общих виджетов.
   Темизация через переменные, задаваемые каждым лендингом:
   --bg --surface --ink --muted --line --ac --ac-ink
   --radius --shadow --font-d --font-b
   ============================================================ */

/* ---------- кнопки ---------- */
.ns-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 28px; border: 0; cursor: pointer;
  border-radius: var(--btn-radius, 999px);
  background: var(--ac); color: var(--ac-ink);
  font: 600 15px/1 var(--font-b); letter-spacing: 0.02em;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.ns-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ns-btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.ns-btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ac); color: var(--ac-strong, var(--ac)); }

.ns-tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font: 600 12px/1.2 var(--font-b); letter-spacing: 0.04em;
  background: color-mix(in oklab, var(--ink) 8%, transparent); color: var(--ink);
}
.ns-tag.is-done { background: color-mix(in oklab, var(--ac) 18%, transparent); color: var(--ac-strong, var(--ac)); }

/* ---------- акции ---------- */
.ns-promos {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.ns-promo {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
}
.ns-promo-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.ns-promo-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ns-promo-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--ac); color: var(--ac-ink);
  font: 700 16px/1 var(--font-b);
  padding: 8px 14px; border-radius: var(--btn-radius, 999px);
}
.ns-promo-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ns-promo-body h3 { font: 600 19px/1.3 var(--font-d); margin: 0; color: var(--ink); }
.ns-promo-body p { margin: 0; font: 400 14px/1.55 var(--font-b); color: var(--muted); flex: 1; }
.ns-promo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 6px; }
.ns-countdown { font: 400 13px/1.3 var(--font-b); color: var(--muted); white-space: nowrap; flex: 0 0 auto; }
.ns-countdown b { color: var(--ac-strong, var(--ac)); font-weight: 700; white-space: nowrap; }
.ns-promo-foot .ns-btn { flex: 0 0 auto; }

/* ---------- генплан ---------- */
.ns-gp { display: flex; flex-direction: column; gap: 26px; }
.ns-gp-map {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.ns-gp-stage { position: relative; font-size: 0; }
.ns-gp-stage > img { width: 100%; display: block; }
.ns-gp-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.ns-gp-lines line { stroke: #fff; stroke-width: 1.6px; vector-effect: non-scaling-stroke; opacity: 0.92; }
/* точка-якорь у объекта — HTML-элемент (всегда ровный круг, не искажается) */
.ns-gp-dot {
  position: absolute; transform: translate(-50%, -50%); z-index: 3; pointer-events: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--ac);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}
.ns-gp-caption {
  margin: 0; padding: 10px 16px; font: 400 12.5px/1.4 var(--font-b);
  color: var(--muted); background: var(--surface); border-top: 1px solid var(--line);
}
/* кликабельные подписи инфраструктуры на генплане */
.ns-gp-label {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  background: rgba(10, 137, 147, 0.72); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; white-space: nowrap; text-align: center;
  font: 600 12.5px/1.15 var(--font-b); letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28); backdrop-filter: blur(2px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.ns-gp-label:hover, .ns-gp-label.is-on {
  background: var(--ac); transform: translate(-50%, -50%) scale(1.06);
}
.ns-gp-label-sub { display: block; font: 600 11px/1.25 var(--font-b); opacity: 0.85; margin-top: 1px; }
@media (max-width: 700px) { .ns-gp-label-sub { font-size: 9px; } }
.ns-gp-pop {
  position: absolute; z-index: 6;
  --tx: -50%; --ty: calc(-100% - 18px);
  --clx: 0px; --cly: 0px; /* пиксельная поправка-клэмп, задаётся из JS */
  transform: translate(var(--tx), var(--ty)) translate(var(--clx), var(--cly));
  width: 264px; max-width: 72vw; background: #fff; color: var(--ink);
  border-radius: 12px; padding: 14px 16px; text-align: left;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}
.ns-gp-pop.is-below { --ty: 18px; }
.ns-gp-pop.is-left { --tx: -16px; }
.ns-gp-pop.is-right { --tx: calc(-100% + 16px); }
.ns-gp-pop b { display: block; font: 700 15px/1.3 var(--font-d); color: var(--ac-strong); margin-bottom: 5px; }
.ns-gp-pop span { font: 400 13.5px/1.5 var(--font-b); color: var(--muted); }
@media (max-width: 900px) { .ns-gp-label { font-size: 10px; padding: 5px 9px; } }

/* Корпуса — стиль liquid glass (стекло), отличны от заливных пилюль инфраструктуры */
.ns-gp-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  color: #ffffff; font: 700 14px/1 var(--font-b);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.ns-gp-pin:hover { transform: translate(-50%, -50%) scale(1.12); background: rgba(255, 255, 255, 0.26); }
.ns-gp-pin.is-done { background: rgba(255, 255, 255, 0.16); }
.ns-gp-pin.is-active {
  background: rgba(0, 187, 195, 0.55);
  border-color: #ffffff; outline: 3px solid rgba(0, 187, 195, 0.45);
  transform: translate(-50%, -50%) scale(1.16);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.8);
}
/* ===================== Генплан v2 (выбор корпуса, стиль Самолёта) ===================== */
.ns-gp2-top { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; position: relative; }
.ns-gp2-tabs { display: inline-flex; gap: 6px; background: var(--surface); padding: 5px; border-radius: 999px; }
.ns-gp2-tabs button { border: 0; background: transparent; cursor: pointer; font: 600 14px/1 var(--font-b); color: var(--muted); padding: 10px 20px; border-radius: 999px; transition: .15s; }
.ns-gp2-tabs button.is-on { background: var(--ac); color: #fff; }
.ns-gp2-filter { position: absolute; right: 0; border: 0; background: var(--surface); color: var(--ac-strong); cursor: pointer; font: 600 14px/1 var(--font-b); padding: 11px 20px; border-radius: 999px; }

/* маркер корпуса: капля «%» + бейдж номера */
.ns-gp-corp { position: absolute; transform: translate(-50%, -50%); z-index: 4; display: inline-flex; align-items: center; cursor: pointer; border: 0; background: none; padding: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); transition: transform .15s; }
.ns-gp-corp:hover, .ns-gp-corp.is-active, .ns-gp-corp.is-on { transform: translate(-50%, -50%) scale(1.08); }
.ns-gp-corp-pct { width: 30px; height: 30px; border-radius: 50%; background: var(--ac); color: #fff; font: 700 14px/30px var(--font-b); text-align: center; position: relative; z-index: 2; }
.ns-gp-corp-n { background: #fff; color: var(--ink); font: 700 14px/1 var(--font-b); padding: 8px 12px 8px 17px; border-radius: 0 999px 999px 0; margin-left: -9px; }
.ns-gp-corp.is-active .ns-gp-corp-n, .ns-gp-corp.is-on .ns-gp-corp-n { background: var(--ac); color: #fff; }

/* иконка инфраструктуры (по умолчанию скрыта, показывается тумблером) */
.ns-gp-ic { position: absolute; transform: translate(-50%, -50%); z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #fff; background: rgba(22,36,43,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.3); transition: .15s; }
.ns-gp-ic svg { width: 20px; height: 20px; fill: #fff; }
.ns-gp-ic:hover, .ns-gp-ic.is-on { background: var(--ac); transform: translate(-50%, -50%) scale(1.12); }
.infra-on .ns-gp-ic { display: inline-flex; }

/* транспорт-пилюля */
.ns-gp-road { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: none; align-items: center; gap: 8px; cursor: pointer; border: 0; border-radius: 999px; background: rgba(255,255,255,.95); padding: 6px 14px 6px 7px; box-shadow: 0 3px 12px rgba(0,0,0,.28); text-align: left; }
.infra-on .ns-gp-road { display: inline-flex; }
.ns-gp-road-ar { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--ac); color: #fff; font: 700 14px/24px sans-serif; text-align: center; }
.ns-gp-road-t b { display: block; font: 700 12.5px/1.15 var(--font-b); color: var(--ink); white-space: nowrap; }
.ns-gp-road-t i { font: 600 11px/1.2 var(--font-b); color: var(--ac-strong); font-style: normal; }

/* попап-карточка корпуса */
.ns-gp-corp-pop { position: absolute; z-index: 7; width: 300px; max-width: 80vw; background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: 0 16px 40px rgba(0,0,0,.32); text-align: left; --tx: -50%; --ty: calc(-100% - 26px); --clx: 0px; --cly: 0px; transform: translate(var(--tx), var(--ty)) translate(var(--clx), var(--cly)); }
.ns-gp-corp-pop.is-below { --ty: 26px; }
.ns-gp-corp-pop.is-left { --tx: -22px; }
.ns-gp-corp-pop.is-right { --tx: calc(-100% + 22px); }
.ns-cp-x { position: absolute; top: 10px; right: 10px; border: 0; background: var(--surface); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
.ns-cp-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.ns-cp-head h4 { font: 800 22px/1 var(--font-d); margin: 0; }
.ns-cp-badge { font: 600 11px/1 var(--font-b); padding: 5px 10px; border-radius: 999px; background: var(--ink); color: #fff; }
.ns-cp-badge-ac { background: var(--ac2, #E94E3C); }
.ns-cp-ready { display: flex; justify-content: space-between; gap: 10px; font: 600 12.5px/1.3 var(--font-b); color: var(--muted); margin-bottom: 6px; }
.ns-cp-ready b { color: var(--ac-strong); white-space: nowrap; }
.ns-cp-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.ns-cp-bar i { display: block; height: 100%; background: var(--ac); }
.ns-cp-count { font: 700 14px/1 var(--font-b); margin: 0 0 12px; }
.ns-cp-rooms { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ns-cp-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; font: 400 13.5px/1 var(--font-b); }
.ns-cp-row i { color: var(--muted); font-style: normal; }
.ns-cp-row b { color: var(--ac-strong); font-weight: 700; }
.ns-cp-metro { font: 500 12.5px/1 var(--font-b); color: var(--muted); margin: 0 0 10px; }
.ns-cp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ns-cp-tag { font: 600 11px/1 var(--font-b); padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ac-strong); }
.ns-cp-cta { width: 100%; }

/* нижние контролы, компас, fullscreen */
.ns-gp2-ctrl { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 10px; z-index: 8; flex-wrap: wrap; }
.ns-gp2-aero { display: inline-flex; align-items: center; gap: 9px; border: 0; cursor: pointer; background: rgba(255,255,255,.95); color: var(--ink); font: 600 13.5px/1 var(--font-b); padding: 11px 16px; border-radius: 999px; box-shadow: 0 3px 12px rgba(0,0,0,.25); }
/* тумблер «Инфраструктура» — под картой, по левому краю (всегда виден) */
.ns-gp2-bottom { display: flex; justify-content: flex-start; margin-top: -14px; }
.ns-gp2-toggle { display: inline-flex; align-items: center; gap: 9px; border: 1.5px solid var(--line); cursor: pointer; background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font-b); padding: 10px 16px; border-radius: 999px; }
.ns-gp2-toggle i { width: 34px; height: 18px; border-radius: 999px; background: var(--line); position: relative; transition: .15s; flex: none; }
.ns-gp2-toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; }
.ns-gp2-toggle.is-on i { background: var(--ac); }
.ns-gp2-toggle.is-on i::after { left: 18px; }
.ns-gp2-aero.is-on { background: var(--ac); color: #fff; }
.ns-gp2-full { position: absolute; right: 16px; bottom: 16px; z-index: 8; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); cursor: pointer; font-size: 18px; box-shadow: 0 3px 12px rgba(0,0,0,.25); }
.ns-gp2-compass { position: absolute; right: 16px; top: 16px; z-index: 6; width: 48px; height: 48px; border-radius: 50%; background: rgba(20,30,35,.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 10px/1.1 var(--font-b); }
.ns-gp2-compass b { color: var(--ac); }
.ns-gp2-compass i { font-style: normal; opacity: .55; }

/* маркер паркинга (таб «Паркинг») */
.ns-gp-park { position: absolute; transform: translate(-50%, -50%); z-index: 4; display: inline-flex; align-items: center; cursor: pointer; border: 0; background: none; padding: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); transition: transform .15s; }
.ns-gp-park:hover, .ns-gp-park.is-on { transform: translate(-50%, -50%) scale(1.08); }
.ns-gp-park-ic { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 16px/30px var(--font-b); text-align: center; position: relative; z-index: 2; }
.ns-gp-park-n { background: #fff; color: var(--ink); font: 700 13px/1 var(--font-b); padding: 8px 11px 8px 16px; border-radius: 0 999px 999px 0; margin-left: -9px; }
.ns-gp-park-n::after { content: " мест"; font-weight: 400; color: var(--muted); }
.ns-gp-park.is-on .ns-gp-park-ic { background: var(--ac); }

/* fullscreen карты */
.ns-gp-map:fullscreen { background: #0a0a0a; display: flex; align-items: center; }
.ns-gp-map:fullscreen .ns-gp-stage { margin: auto; max-height: 100vh; width: auto; }
.ns-gp-map:fullscreen .ns-gp-stage > img { height: 100vh; width: auto; }

@media (max-width: 700px) {
  .ns-gp2-top { flex-wrap: wrap; gap: 8px; }
  .ns-gp2-filter { position: static; }
  .ns-gp2-tabs button { padding: 9px 16px; font-size: 13px; }
  .ns-gp2-ctrl { left: 10px; bottom: 10px; gap: 7px; }
  .ns-gp2-toggle, .ns-gp2-aero { padding: 9px 12px; font-size: 12px; }
  .ns-gp2-aero span, .ns-gp2-aero { } /* оставляем текст */
  .ns-gp2-full, .ns-gp2-compass { width: 38px; height: 38px; }
  .ns-gp-corp-pop { width: 250px; padding: 14px 16px; }
}


.ns-gp-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 32px; min-height: 280px;
  display: flex; flex-direction: column;
}
.ns-gp-panel h3 { font: 600 24px/1.25 var(--font-d); margin: 0 0 12px; color: var(--ink); }
.ns-gp-kicker {
  font: 600 12px/1 var(--font-b); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ac-strong, var(--ac)); margin: 0 0 12px;
}
.ns-gp-hint { display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; flex: 1; }
.ns-gp-hint p { color: var(--muted); font: 400 15px/1.6 var(--font-b); max-width: 52ch; }
.ns-gp-legend { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.ns-gp-legend li { display: flex; align-items: center; gap: 10px; font: 400 14px/1.4 var(--font-b); color: var(--muted); }
.ns-gp-legend i {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: color-mix(in oklab, var(--ink) 72%, #1a2b33);
}
.ns-gp-legend i.is-done { background: var(--ac); }
.ns-gp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; font: 400 13px/1.3 var(--font-b); color: var(--muted); }
.ns-gp-crumbs button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ac-strong, var(--ac)); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ns-gp-crumbs b { color: var(--ink); }
.ns-gp-meta { font: 400 14px/1.6 var(--font-b); color: var(--muted); margin: 0 0 16px; }
.ns-gp-meta b { color: var(--ink); }
.ns-gp-sub { font: 600 13px/1.3 var(--font-b); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 8px 0 12px; }
.ns-gp-floors { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
@media (max-width: 760px) { .ns-gp-floors { grid-template-columns: repeat(4, 1fr); } }
.ns-gp-floor {
  border: 1.5px solid var(--line); background: transparent; border-radius: calc(var(--radius) * 0.6);
  padding: 10px 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; align-items: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ns-gp-floor b { font: 700 18px/1 var(--font-b); color: var(--ink); }
.ns-gp-floor span { font: 400 11.5px/1.2 var(--font-b); color: var(--muted); }
.ns-gp-floor:hover:not(:disabled) { border-color: var(--ac); background: color-mix(in oklab, var(--ac) 8%, transparent); }
.ns-gp-floor:disabled { opacity: 0.4; cursor: default; }
.ns-gp-floorplan { display: flex; gap: 6px; }
.ns-gp-unit {
  flex-basis: 0; min-width: 0; border: 1.5px solid var(--line); border-radius: 8px;
  background: color-mix(in oklab, var(--ac) 10%, transparent);
  padding: 14px 4px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ns-gp-unit b { font: 700 15px/1 var(--font-b); color: var(--ink); }
.ns-gp-unit span { font: 400 11px/1.2 var(--font-b); color: var(--muted); }
.ns-gp-unit i { font: 600 11px/1.2 var(--font-b); font-style: normal; color: var(--ac-strong, var(--ac)); }
.ns-gp-unit:hover:not(:disabled) { background: color-mix(in oklab, var(--ac) 24%, transparent); border-color: var(--ac); }
.ns-gp-unit.is-sold { background: color-mix(in oklab, var(--ink) 5%, transparent); cursor: default; }
.ns-gp-unit.is-sold i { color: var(--muted); }
.ns-gp-note { font: 400 12.5px/1.5 var(--font-b); color: var(--muted); margin-top: 14px; }
.ns-gp-flat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 820px) { .ns-gp-flat { grid-template-columns: 1fr; } }
.ns-gp-flat-plan { border-radius: calc(var(--radius) * 0.6); border: 1px solid var(--line); background: #ffffff; padding: 10px; }
.ns-plansvg { width: 100%; height: auto; display: block; }
.ns-gp-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 14px; }
.ns-gp-specs div { border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.ns-gp-specs dt { font: 400 12px/1.3 var(--font-b); color: var(--muted); margin: 0; }
.ns-gp-specs dd { font: 600 15px/1.3 var(--font-b); color: var(--ink); margin: 2px 0 0; }
.ns-gp-price { font: 700 30px/1.1 var(--font-d); color: var(--ink); margin: 0; }
.ns-gp-monthly { font: 400 14px/1.4 var(--font-b); color: var(--ac-strong, var(--ac)); margin: 4px 0 16px; }

/* ---------- ход строительства ---------- */
.ns-prog { display: flex; flex-direction: column; gap: 30px; }
.ns-prog-rail { display: flex; gap: 0; overflow-x: auto; padding-top: 8px; padding-bottom: 6px; }
/* статичный таймлайн этапов (без кликов) */
.ns-prog-step {
  flex: 1 0 150px; background: none; border: 0;
  padding: 0 12px 0 0; text-align: left; position: relative;
  display: flex; flex-direction: column; gap: 8px;
}
.ns-prog-step i {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--line); position: relative; z-index: 1;
  outline: 4px solid var(--bg);
}
.ns-prog-step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 6.5px; height: 1.5px;
  background: var(--line);
}
.ns-prog-step.is-done i { background: var(--ac); }
.ns-prog-step.is-current i { background: var(--ac); box-shadow: 0 0 0 7px color-mix(in oklab, var(--ac) 25%, transparent); }
.ns-prog-step b { font: 600 13px/1.2 var(--font-b); color: var(--muted); }
.ns-prog-step.is-done b, .ns-prog-step.is-current b { color: var(--ink); }
.ns-prog-step span { font: 400 12.5px/1.35 var(--font-b); color: var(--muted); }

/* папки фотоотчётов по месяцам — карусель ←→, клик → слайдер фото месяца */
.ns-prog-folders-wrap { position: relative; margin-top: 44px; }
.ns-prog-folders { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.ns-prog-folders::-webkit-scrollbar { display: none; }
.ns-prog-folder { flex: 0 0 auto; width: clamp(220px, 30%, 300px); border: 0; background: none; padding: 0; cursor: pointer; text-align: left; scroll-snap-align: start; }
.ns-prog-folder-img { position: relative; border-radius: var(--radius); overflow: hidden; }
.ns-prog-folder-img img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.3s ease; }
.ns-prog-folder:hover .ns-prog-folder-img img { transform: scale(1.05); }
.ns-prog-folder-badge { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; background: rgba(15,26,31,0.7); color: #fff; font: 600 12px/1 var(--font-b); padding: 7px 10px; border-radius: 999px; }
.ns-prog-folder-cap { padding: 12px 2px 0; }
.ns-prog-folder-cap b { display: block; font: 400 18px/1.2 var(--font-d); color: var(--ink); }
.ns-prog-folder-cap span { font: 400 13px/1.4 var(--font-b); color: var(--muted); }
@media (max-width: 700px) { .ns-prog-folder { width: 78%; } }

/* ---------- планировки ---------- */
.ns-plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ns-plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.ns-plan-tag {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  font: 600 11.5px/1 var(--font-b); letter-spacing: 0.04em;
  background: var(--ac); color: var(--ac-ink); padding: 6px 10px; border-radius: 999px;
}
.ns-plan img { width: 100%; border-radius: calc(var(--radius) * 0.5); margin-bottom: 10px; }
.ns-plan-img { border: 1px solid var(--line); border-radius: calc(var(--radius) * 0.5); background: #ffffff; margin-bottom: 12px; cursor: zoom-in; padding: 6px; }
.ns-plan h3 { font: 600 20px/1.2 var(--font-d); color: var(--ink); margin: 0; }
.ns-plan-area { font: 400 14px/1.3 var(--font-b); color: var(--muted); margin: 0 0 8px; }
.ns-plan-price { font: 700 22px/1.1 var(--font-d); color: var(--ink); margin: 0; }
.ns-plan-monthly { font: 400 13px/1.3 var(--font-b); color: var(--ac-strong, var(--ac)); margin: 2px 0 14px; }

/* ---------- способы покупки ---------- */
.ns-buy { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ns-buy-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}
.ns-buy-big { font: 700 34px/1 var(--font-d); color: var(--ac-strong, var(--ac)); margin: 0 0 14px; }
.ns-buy-card h3 { font: 600 18px/1.3 var(--font-d); color: var(--ink); margin: 0 0 8px; }
.ns-buy-card p { font: 400 14px/1.55 var(--font-b); color: var(--muted); margin: 0; }

/* ---------- акцентный блок «Инфраструктура квартала» ---------- */
.ns-infra {
  display: grid; grid-template-columns: 0.82fr 1.18fr;
  background: color-mix(in oklab, var(--ac) 7%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--ac) 24%, var(--line));
  border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 880px) { .ns-infra { grid-template-columns: 1fr; } }
.ns-infra-photo { position: relative; min-height: 100%; }
.ns-infra-photo img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }
/* слайдер школа/сад/площадки внутри блока инфраструктуры — один кадр на ширину колонки */
.ns-infra-photo .gal-j img { flex: 0 0 100%; width: 100%; height: clamp(300px, 42vh, 460px); min-height: 0; scroll-snap-align: center; cursor: zoom-in; border-radius: var(--radius); }
.ns-infra-body { padding: clamp(28px, 4vw, 54px); }
.ns-infra-title { font: 600 clamp(23px, 2.6vw, 32px)/1.18 var(--font-d); color: var(--ink); margin: 0 0 12px; letter-spacing: -0.01em; }
.ns-infra-lead { font: 400 15.5px/1.6 var(--font-b); color: var(--muted); margin: 0 0 32px; max-width: 48ch; }
.ns-infra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
@media (max-width: 520px) { .ns-infra-grid { grid-template-columns: 1fr; gap: 22px; } }
.ns-infra-item { border-top: 2px solid color-mix(in oklab, var(--ac) 38%, var(--line)); padding-top: 15px; }
.ns-infra-item b { display: block; font: 700 clamp(34px, 3.4vw, 42px)/1 var(--font-d); letter-spacing: -0.02em; color: var(--ac-strong); margin-bottom: 9px; }
.ns-infra-item h4 { font: 600 16px/1.3 var(--font-b); color: var(--ink); margin: 0 0 5px; }
.ns-infra-item p { font: 400 13.5px/1.5 var(--font-b); color: var(--muted); margin: 0; }

/* ---------- маршруты и статистика ---------- */
.ns-routes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ns-route { border-left: 2px solid var(--ac); padding: 4px 0 4px 18px; }
.ns-route b { font: 700 26px/1.1 var(--font-d); color: var(--ink); display: block; margin-bottom: 6px; }
.ns-route h4 { font: 600 15px/1.3 var(--font-b); color: var(--ink); margin: 0 0 4px; }
.ns-route p { font: 400 13px/1.45 var(--font-b); color: var(--muted); margin: 0; }
.ns-stats { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ns-stat b { font: 700 44px/1 var(--font-d); color: var(--ac-strong, var(--ac)); display: block; margin-bottom: 8px; }
.ns-stat h4 { font: 600 16px/1.3 var(--font-b); color: var(--ink); margin: 0 0 6px; }
.ns-stat p { font: 400 13.5px/1.5 var(--font-b); color: var(--muted); margin: 0; }

/* ---------- форма ---------- */
form.ns-lead { display: flex; flex-direction: column; gap: 14px; }
form.ns-lead input {
  padding: 15px 18px; border-radius: var(--btn-radius, 999px);
  border: 1.5px solid var(--line); background: var(--surface);
  font: 400 15px/1.3 var(--font-b); color: var(--ink); outline: none;
}
form.ns-lead input:focus { border-color: var(--ac); }
form.ns-lead small { font: 400 12px/1.5 var(--font-b); color: var(--muted); }
form.ns-lead small a { color: inherit; }
.ns-lead-done h3 { font: 600 26px/1.2 var(--font-d); color: var(--ink); margin: 0 0 10px; }
.ns-lead-done p { font: 400 15px/1.6 var(--font-b); color: var(--muted); margin: 0; }

/* ---------- каталог квартир ---------- */
.ns-cat { display: flex; flex-direction: column; gap: 28px; }
/* переключатель режима каталога: Квартиры / Машино-места */
.ns-cat-mode { display: inline-flex; gap: 6px; background: var(--surface); padding: 5px; border-radius: 999px; margin-bottom: 22px; }
.ns-cat-modebtn { border: 0; background: transparent; cursor: pointer; font: 600 14px/1 var(--font-b); color: var(--muted); padding: 11px 22px; border-radius: 999px; transition: 0.15s; }
.ns-cat-modebtn.is-on { background: var(--ac); color: #fff; }
.ns-cat-bar { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
/* кнопка «Фильтр» над подборщиком — только мобилка (на десктопе фильтры всегда видны) */
.ns-cat-filterbtn { display: none; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: 600 14px/1 var(--font-b); padding: 11px 18px; border-radius: 999px; margin-bottom: 16px; }
.ns-cat-filterbtn.is-on { border-color: var(--ac); color: var(--ac-strong, var(--ac)); }
@media (max-width: 700px) {
  .ns-cat-filterbtn { display: inline-flex; }
  .ns-cat-bar { display: none; }
  .ns-cat-bar.is-open { display: flex; }
}
.ns-cat-group { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-cat-chip {
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  border-radius: 999px; padding: 9px 16px;
  font: 600 13.5px/1 var(--font-b); color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.ns-cat-chip:hover { border-color: var(--ac); color: var(--ink); }
.ns-cat-chip.is-on { background: var(--ac); border-color: var(--ac); color: var(--ac-ink); }
.ns-cat-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.ns-cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ns-cat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 32, 38, 0.13); }
.ns-cat-plan { position: relative; background: #ffffff; border-bottom: 1px solid var(--line); padding: 14px; }
/* зона плана квадратная — планировки Profitbase квадратные (2000×2000 / 640×640), заполняют без боковых полей */
.ns-cat-plan img, .ns-cat-plan .ns-plansvg { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: contain; display: block; }
/* планировки Profitbase цветные (бежево-зелёные) → нейтрально-серые под брендбук */
.ns-cat-plan img { filter: grayscale(1) brightness(1.06) contrast(1.04); }
.ns-cat-disc {
  position: absolute; top: 12px; left: 12px;
  background: var(--ac); color: var(--ac-ink);
  font: 700 12.5px/1 var(--font-b); padding: 7px 12px; border-radius: 999px;
}
.ns-cat-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.ns-cat-body h3 { font: 600 18px/1.25 var(--font-d); color: var(--ink); margin: 0; }
.ns-cat-meta { font: 400 13.5px/1.4 var(--font-b); color: var(--muted); margin: 0; }
.ns-cat-price { font: 700 21px/1.2 var(--font-d); color: var(--ink); margin: 4px 0 0; }
.ns-cat-price s { font: 400 14px/1 var(--font-b); color: var(--muted); margin-left: 8px; }
.ns-cat-loc { font: 400 13px/1.45 var(--font-b); color: var(--muted); margin: 0; }
.ns-cat-loc b { color: var(--ac-strong, var(--ac)); }
.ns-cat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ns-cat-tags span {
  font: 500 11.5px/1.2 var(--font-b); color: var(--muted);
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  border-radius: 999px; padding: 5px 10px;
}
.ns-cat-foot { display: flex; align-items: center; gap: 20px; justify-content: center; flex-direction: column; }
.ns-cat-count { font: 400 13.5px/1.3 var(--font-b); color: var(--muted); margin: 0; }
.ns-cat-empty { font: 400 15px/1.6 var(--font-b); color: var(--muted); grid-column: 1 / -1; text-align: center; padding: 40px 0; }

/* ---------- генплан + шахматка ---------- */
.ns-gpc { display: flex; flex-direction: column; gap: 30px; }
.ns-gpc .ns-gp-pin { width: 50px; height: 50px; font-size: 14px; }

/* ---------- шахматка (живые данные API) ---------- */
.ns-disp { display: flex; flex-direction: column; gap: 22px; }
.ns-disp-load { font: 400 15px/1.6 var(--font-b); color: var(--muted); text-align: center; padding: 48px 0; }
.ns-disp-bar { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.ns-disp-tab em { font-style: normal; opacity: 0.65; font-size: 11.5px; margin-left: 2px; }
.ns-disp-grid-wrap { overflow-x: auto; padding-bottom: 6px; }
.ns-disp-grid { display: flex; flex-direction: column; gap: 6px; min-width: 640px; }
.ns-disp-row { display: flex; gap: 6px; align-items: stretch; }
.ns-disp-fl {
  flex: 0 0 34px; display: flex; align-items: center; justify-content: center;
  font: 600 13px/1 var(--font-b); color: var(--muted);
}
.ns-disp-head .ns-disp-sec {
  flex: 1; text-align: center; font: 600 12px/1.2 var(--font-b);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px;
}
.ns-disp-cell {
  flex: 1; display: flex; flex-wrap: wrap; gap: 4px;
  background: color-mix(in oklab, var(--ink) 4%, transparent);
  border-radius: 8px; padding: 4px; min-height: 34px;
}
.ns-disp-flat {
  flex: 0 0 auto; min-width: 54px; border: 0; border-radius: 6px; cursor: pointer;
  padding: 6px 4px; font: 700 11.5px/1.2 var(--font-b); color: #ffffff;
  display: inline-flex; gap: 4px; align-items: center; justify-content: center;
  overflow: hidden; white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}
.ns-disp-flat i { font-style: normal; font-weight: 500; opacity: 0.85; font-size: 10.5px; }
.ns-disp-flat.is-free { background: var(--ac); color: var(--ac-ink); }
.ns-disp-flat.is-booked { background: #d9a431; }
.ns-disp-flat.is-sold { background: color-mix(in oklab, var(--ink) 26%, #9aa3a5); cursor: default; }
.ns-disp-flat:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.1); }
.ns-disp-flat.is-dim { opacity: 0.22; }
.ns-disp-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.ns-disp-legend span { display: inline-flex; gap: 8px; align-items: center; font: 400 13px/1.3 var(--font-b); color: var(--muted); }
.ns-disp-legend i { width: 13px; height: 13px; border-radius: 4px; }
.ns-disp-legend i.is-free { background: var(--ac); }
.ns-disp-legend i.is-booked { background: #d9a431; }
.ns-disp-legend i.is-sold { background: color-mix(in oklab, var(--ink) 26%, #9aa3a5); }
.ns-disp-src { margin-left: auto; font-size: 12px !important; }
.ns-disp-feats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.ns-disp-feats span {
  font: 500 11.5px/1.2 var(--font-b); color: var(--muted);
  background: color-mix(in oklab, var(--ink) 6%, transparent);
  border-radius: 999px; padding: 5px 10px;
}

/* ---------- модальные окна ---------- */
.ns-modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 24, 28, 0.62); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; padding: 24px;
}
.ns-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.ns-modal {
  background: var(--surface, #ffffff); border-radius: var(--radius, 12px);
  padding: 38px 40px; width: min(440px, 100%); position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(14px); transition: transform 0.22s ease;
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
@media (max-width: 720px) { .ns-modal { padding: 30px 22px; } }
.ns-modal-overlay.is-open .ns-modal { transform: translateY(0); }
.ns-modal-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: color-mix(in oklab, var(--ink, #222) 7%, transparent);
  color: var(--ink, #222); font: 400 22px/1 var(--font-b, sans-serif);
}
.ns-modal-close:hover { background: color-mix(in oklab, var(--ink, #222) 14%, transparent); }
.ns-modal-title { font: 600 24px/1.25 var(--font-d, serif); color: var(--ink); margin: 0 36px 10px 0; }
.ns-modal-sub { font: 400 14.5px/1.55 var(--font-b); color: var(--muted); margin: 0 0 22px; }
.ns-lb { flex-direction: column; gap: 14px; }
.ns-lb figure { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.ns-lb figure img { max-width: 100%; max-height: 76vh; border-radius: 10px; display: block; margin: 0 auto; }
/* обёртка кадра: якорь для SVG-подсветки квартиры (ns-fp-floorsvg) поверх плана этажа */
.ns-lb-imgwrap { position: relative; display: inline-block; max-width: 100%; }
.ns-lb figcaption { color: #cfd8db; font: 400 14px/1.5 var(--font-b, sans-serif); margin-top: 12px; }
.ns-lb .ns-modal-close { position: fixed; top: 22px; right: 26px; background: rgba(255,255,255,0.14); color: #ffffff; }
.ns-lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #ffffff; font-size: 20px;
}
.ns-lb-nav:hover { background: rgba(255, 255, 255, 0.3); }
.ns-lb-prev { left: 26px; }
.ns-lb-next { right: 26px; }

/* детальная планировка */
.ns-plan-modal { width: min(880px, 100%); }
.ns-plan-modal-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 720px) { .ns-plan-modal-grid { grid-template-columns: 1fr; } }
.ns-plan-modal-img { border: 1px solid var(--line); border-radius: calc(var(--radius, 12px) * 0.6); background: #ffffff; padding: 12px; }
/* планировка в попапе — нейтрально-серая (как в каталоге) */
.ns-plan-modal-img .ns-fp-img { filter: grayscale(1) brightness(1.06) contrast(1.04); }
.ns-plan-modal-info h3 { font: 600 28px/1.2 var(--font-d); color: var(--ink); margin: 0 0 6px; }
.ns-plan-note { font: 400 13px/1.55 var(--font-b); color: var(--muted); margin: 12px 0 20px; }
.ns-plan-modal-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- мобилка: телефон в шапке скрыт (звонок — через плавающую кнопку) ---------- */
@media (max-width: 640px) {
  .site-cta a.phone, .top-cta a.phone { display: none !important; }
  .site-cta a.phone--keep {
    font-size: 0 !important;
    width: 38px !important; height: 38px !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    border-radius: 50% !important;
    border: 1.5px solid currentColor;
    opacity: 0.85;
    flex-shrink: 0;
  }
  .site-cta a.phone::before, .top-cta a.phone::before {
    content: "";
    width: 18px; height: 18px; display: block;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}

/* ---------- мобилка: генплан с горизонтальным скроллом ----------
   Не вписываем целиком (стал бы мелким) — задаём высоту по экрану,
   а широкоформатную панораму листаем пальцем влево-вправо. */
@media (max-width: 700px) {
  .ns-gp-map { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  /* выше кадр → шире картинка → подписи мельче относительно и влезают целиком */
  .ns-gp-stage { width: max-content; height: 80vh; }
  .ns-gp-stage > img { height: 100%; width: auto; max-width: none; }
  .ns-gp-caption { display: none; }
  .ns-gp-label { font-size: 10px; padding: 4px 9px; border-radius: 999px; }
  .ns-gp-pin { width: 42px; height: 42px; font-size: 12px; }
  .ns-gp-pop { width: 210px; padding: 12px 13px; }
  .ns-gp-pop b { font-size: 14px; }
  .ns-gp-pop span { font-size: 12.5px; }
}

/* каталог: платёж/мес мельче под ценой */
.ns-cat-mo { display: inline-block; font: 400 12.5px/1.2 var(--font-b); color: var(--muted); margin-left: 4px; }

/* каталог: плейсхолдер машино-места (нет картинки) */
.ns-cat-plan-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 140px; background: var(--surface); color: var(--ac); font: 800 48px/1 var(--font-d); }

/* каталог: чип без данных — неактивный */
.ns-cat-chip.is-off { opacity: 0.38; cursor: not-allowed; pointer-events: none; }

/* каталог: сортировка выпадающим списком (видно, что это выбор) */
.ns-cat-group-sort { margin-left: auto; }
.ns-cat-sortwrap { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ns-cat-sortlbl { font: 400 13px/1 var(--font-b); color: var(--muted); white-space: nowrap; }
.ns-cat-selbox { position: relative; display: inline-block; }
.ns-cat-selbox::after { content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ac); border-bottom: 2px solid var(--ac); transform: translateY(-65%) rotate(45deg); pointer-events: none; }
.ns-cat-sort {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding: 11px 38px 11px 18px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font-b);
  transition: border-color 0.15s ease;
}
.ns-cat-sort:hover, .ns-cat-sort:focus { border-color: var(--ac); outline: none; }
@media (max-width: 640px) { .ns-cat-group-sort { margin-left: 0; width: 100%; } .ns-cat-sort { width: 100%; } }

/* каталог: скидка (включается автоматически, когда discount-price < price) */
.ns-cat-disc { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--ac2, #E94E3C); color: #fff; font: 700 12px/1 var(--font-b); padding: 6px 11px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.ns-cat-old { color: var(--muted); font-weight: 400; text-decoration: line-through; margin-left: 6px; }
.ns-cat-disc-inline { display: inline-block; background: var(--ac2, #E94E3C); color: #fff; font: 700 12px/1 var(--font-b); padding: 5px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }

/* попап квартиры: переключатель Планировка / Расположение на этаже */
.ns-fp-imgtabs { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.ns-fp-imgtabs button { border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font: 600 13px/1 var(--font-b); padding: 9px 16px; border-radius: 999px; transition: 0.15s; }
.ns-fp-imgtabs button:hover { border-color: var(--ac); color: var(--ink); }
.ns-fp-imgtabs button.is-on { background: var(--ac); color: #fff; border-color: var(--ac); }
/* картинка-планировка в попапе: клик/кнопка → полноэкранный лайтбокс */
.ns-fp-imgwrap { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.ns-fp-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ns-fp-zoom { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: rgba(22,36,43,0.62); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); transition: background 0.15s ease; }
.ns-fp-zoom:hover { background: rgba(22,36,43,0.85); }
/* #18: плашка на плане этажа (пилюля в углу изображения; координат квартиры в данных нет) */
.ns-fp-plaque { position: absolute; left: 10px; bottom: 10px; z-index: 3; display: none; max-width: calc(100% - 58px); padding: 8px 13px; border-radius: 999px; background: rgba(22,36,43,0.84); color: #fff; font: 600 12.5px/1.3 var(--font-b, sans-serif); letter-spacing: 0.01em; box-shadow: 0 3px 12px rgba(0,0,0,0.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ns-fp-plaque.is-on { display: inline-block; }
@media (max-width: 600px) { .ns-fp-plaque { font-size: 11.5px; padding: 7px 11px; left: 8px; bottom: 8px; } }

/* #20: элементы-счётчики с лайтбоксом (data-shots) */
[data-shots] { cursor: pointer; transition: filter 0.15s ease, transform 0.15s ease; }
[data-shots]:hover { filter: brightness(1.04); transform: translateY(-1px); }

/* #23: попап отделки — переиспользует ns-modal-overlay/ns-modal */
.ns-fin-modal { width: min(760px, 100%); }
.ns-fin-title { font: 600 24px/1.25 var(--font-d, serif); color: var(--ink); margin: 0 36px 10px 0; }
.ns-fin-desc { font: 400 14.5px/1.6 var(--font-b); color: var(--muted); margin: 0 0 20px; }
.ns-fin-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ns-fin-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: calc(var(--radius, 12px) * 0.5); border: 1px solid var(--line); display: block; }
.ns-fin-gallery img:hover { border-color: var(--ac); }
@media (max-width: 600px) { .ns-fin-gallery { grid-template-columns: 1fr 1fr; gap: 8px; } }

/* генплан: мобильная подсказка «листайте вбок» — лёгкое затемнение карты + светлый текст (как у Самолёта) */
.ns-gp-swipe { display: none; }
@media (max-width: 700px) {
  .ns-gp-swipe {
    display: flex; position: absolute; left: 0; right: 0; z-index: 8;
    justify-content: center; align-items: center; text-align: center; pointer-events: none;
    background: rgba(8, 18, 22, 0.44); border-radius: var(--radius);
  }
  .ns-gp-swipe.is-gone { display: none; }
  .ns-gp-swipe-box {
    display: inline-flex; align-items: center; gap: 10px; color: #fff;
    padding: 0 24px; font: 600 16px/1.35 var(--font-b);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    animation: nsHintSwipe 1.8s ease-in-out infinite;
  }
  @keyframes nsHintSwipe { 0%, 100% { transform: translateX(7px); } 50% { transform: translateX(-7px); } }
}

/* плавающая кнопка связи с меню (обратный звонок / позвонить) */
.ns-call { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; }
.ns-call.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ns-call-fab { width: 60px; height: 60px; border: 0; border-radius: 50%; background: var(--ac); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,0.28); animation: nsCallPulse 2.4s ease-in-out infinite; transition: transform 0.15s ease; }
.ns-call-fab:hover { transform: scale(1.08); }
.ns-call.is-open .ns-call-fab { animation: none; transform: rotate(0); background: var(--ac-strong, var(--ac)); }
@keyframes nsCallPulse { 0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.28), 0 0 0 0 rgba(0,187,195,0.45); } 50% { box-shadow: 0 8px 24px rgba(0,0,0,0.28), 0 0 0 12px rgba(0,187,195,0); } }
.ns-call-menu { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.ns-call.is-open .ns-call-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ns-call-item { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: #fff; color: var(--ink); font: 600 14px/1.2 var(--font-b); text-decoration: none; padding: 13px 18px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,0.22); white-space: nowrap; }
.ns-call-item:hover { background: var(--surface); }
@media (max-width: 600px) { .ns-call { right: 16px; bottom: 16px; } .ns-call-fab { width: 54px; height: 54px; } }

/* видео-модалка (поверх страницы) */
.ns-vid-overlay { padding: 24px; }
.ns-vid-box { position: relative; width: min(1000px, 100%); }
.ns-vid-box video { width: 100%; max-height: 84vh; display: block; border-radius: var(--radius); background: #000; box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.ns-vid-overlay .ns-modal-close { position: absolute; top: -46px; right: 0; background: rgba(255,255,255,0.16); color: #fff; }
@media (max-width: 600px) { .ns-vid-overlay .ns-modal-close { top: -42px; } }

/* #18 v2: подсветка квартиры на плане этажа (разметка Profitbase, floors-data.js).
   SVG лежит поверх картинки: viewBox повторяет пропорции растра, meet = contain. */
.ns-fp-floorsvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.ns-fp-floorsvg.is-on { display: block; }
.ns-fp-floorsvg polygon { fill: rgba(0, 187, 195, 0.32); stroke: #008A92; stroke-width: 2px; }

/* фото в попапе инфраструктуры на генплане */
.ns-gp-pop.has-img { width: 300px; }
.ns-gp-pop-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; margin-bottom: 10px; display: block; }
/* атрибут hidden перебивается display:block выше — явно гасим */
.ns-gp-pop-img[hidden] { display: none; }
@media (max-width: 700px) { .ns-gp-pop.has-img { width: 240px; } }

/* ============================================================
   НОВОСТИ (лента с офсайта) — виджет NS.news
   Крупная первая новость + компактный список остальных.
   Карточки — <button>, поэтому явно сбрасываем кнопочные дефолты.
   ============================================================ */
.ns-news {
  display: grid; gap: 34px 40px; align-items: stretch;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.ns-news-card {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: none;
  border: 0; padding: 0; margin: 0;
  transition: color 0.18s ease;
}
.ns-news-date {
  font: 600 var(--fs-eyebrow, 12px)/1 var(--font-b);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-strong, var(--ac));
}
.ns-news-title { margin: 0; font: 600 19px/1.32 var(--font-d); color: var(--ink); }
.ns-news-anons { margin: 0; font: 400 var(--fs-body-sm, 15px)/1.6 var(--font-b); color: var(--muted); }
.ns-news-more {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 2px;
  font: 600 13px/1 var(--font-b); color: var(--ac-strong, var(--ac));
}
.ns-news-more svg { transition: transform 0.18s ease; }
.ns-news-card:hover .ns-news-more svg { transform: translateX(4px); }
.ns-news-card:hover .ns-news-title { color: var(--ac-strong, var(--ac)); }
.ns-news-card:focus-visible { outline: 2px solid var(--ac); outline-offset: 4px; }

/* первая новость — крупнее, на подложке */
.ns-news-card.is-lead {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 32px; gap: 13px;
  /* тянется на высоту списка справа, «Читать» прижато к низу — колонки не разъезжаются */
  height: 100%; justify-content: flex-start;
}
.ns-news-card.is-lead .ns-news-more { margin-top: auto; padding-top: 12px; }
.ns-news-card.is-lead .ns-news-title { font-size: 26px; line-height: 1.24; }
.ns-news-card.is-lead:hover { border-color: color-mix(in oklab, var(--ac) 45%, var(--line)); }

/* остальные — список со строками-разделителями */
.ns-news-list { display: flex; flex-direction: column; }
.ns-news-list .ns-news-card { padding: 18px 0; gap: 7px; border-top: 1px solid var(--line); }
.ns-news-list .ns-news-card:first-child { border-top: 0; padding-top: 0; }
.ns-news-list .ns-news-title { font-size: 17px; }
.ns-news-list .ns-news-more { font-size: 12.5px; }
.ns-news-empty { margin: 0; font: 400 15px/1.6 var(--font-b); color: var(--muted); }

@media (max-width: 900px) { .ns-news { grid-template-columns: 1fr; gap: 26px; } }
@media (max-width: 600px) {
  .ns-news-card.is-lead { padding: 24px 20px; }
  .ns-news-card.is-lead .ns-news-title { font-size: 22px; }
}

/* модалка новости: заголовок + текст абзацами + CTA */
.ns-news-modal { width: min(720px, 100%); text-align: left; padding: 40px 44px 34px; }
@media (max-width: 720px) { .ns-news-modal { padding: 32px 22px 26px; } }
.ns-news-modal-date {
  display: block; font: 600 var(--fs-eyebrow, 12px)/1 var(--font-b);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ac-strong, var(--ac));
  margin-bottom: 12px; padding-right: 40px;
}
.ns-news-modal-title { margin: 0 0 18px; font: 600 27px/1.26 var(--font-d); color: var(--ink); padding-right: 30px; }
@media (max-width: 600px) { .ns-news-modal-title { font-size: 22px; } }
.ns-news-modal-body p { margin: 0 0 13px; font: 400 15.5px/1.68 var(--font-b); color: var(--ink); }
.ns-news-modal-body p:last-child { margin-bottom: 0; }
/* «Корпус 19.», «Детский сад на 140 мест.» — подзаголовки внутри новости */
.ns-news-modal-body p.ns-news-sub { font-weight: 600; margin-top: 20px; margin-bottom: 8px; }
.ns-news-modal-body p.ns-news-sub:first-child { margin-top: 0; }
.ns-news-modal-body .ns-news-loading,
.ns-news-modal-body .ns-news-fail { color: var(--muted); }
.ns-news-modal-body a { color: var(--ac-strong, var(--ac)); }
.ns-news-modal-foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ============================================================
   ПОПАП КАМПАНИИ («Скоро: старт продаж новой очереди»)
   Визуал наружки августа-2026: бирюза + вырезанная девочка с ключами.
   ============================================================ */
.ns-popup-overlay { z-index: 260; }
.ns-popup {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  width: min(880px, 100%); background: #fff; border-radius: var(--radius);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42); overflow: hidden;
  transform: translateY(16px) scale(0.985); transition: transform 0.26s ease;
  max-height: calc(100dvh - 48px);
}
.ns-popup-overlay.is-open .ns-popup { transform: translateY(0) scale(1); }
.ns-popup-media {
  position: relative; background: var(--ac);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
/* мягкое пятно позади фигуры — как красный круг на билборде */
.ns-popup-media::before {
  content: ''; position: absolute; left: 50%; top: 46%;
  width: 118%; aspect-ratio: 1/1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(233, 78, 60, 0.95) 0 55%, rgba(233, 78, 60, 0) 72%);
}
.ns-popup-media img { position: relative; width: 100%; height: auto; display: block; object-fit: contain; }
.ns-popup-body { padding: 40px 40px 34px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.ns-popup-badge {
  align-self: flex-start; background: var(--ac2, #E94E3C); color: #fff;
  font: 700 var(--fs-eyebrow, 12px)/1 var(--font-b); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 13px; border-radius: var(--btn-radius, 2px);
}
.ns-popup-title { margin: 0; font: 600 32px/1.16 var(--font-d); color: var(--ink); }
.ns-popup-text { margin: 0; font: 400 15px/1.6 var(--font-b); color: var(--muted); }
.ns-popup-note { margin: 0; font: 400 var(--fs-caption, 13px)/1.5 var(--font-b); color: var(--muted); }
.ns-popup-form { margin-top: 4px; }
.ns-popup .ns-modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; }

@media (max-width: 860px) {
  .ns-popup { grid-template-columns: 1fr; max-height: calc(100dvh - 32px); }
  /* на узком экране фото — компактная шапка, чтобы форма осталась видна без прокрутки */
  .ns-popup-media { max-height: 33dvh; align-items: center; }
  .ns-popup-media img { width: auto; max-width: 100%; height: 100%; max-height: 33dvh; object-fit: contain; }
  .ns-popup-body { padding: 26px 24px 24px; gap: 12px; }
  .ns-popup-title { font-size: 25px; }
  .ns-popup .ns-modal-close { background: rgba(255, 255, 255, 0.9); color: var(--ink); }
}
@media (max-width: 400px) {
  .ns-popup-media { max-height: 26dvh; }
  .ns-popup-media img { max-height: 26dvh; }
  .ns-popup-title { font-size: 22px; }
  .ns-popup-text { font-size: 14px; }
}
/* невысокий экран (компактные телефоны 320×640) — ужимаем всё, чтобы кнопка
   формы оставалась на экране без прокрутки внутри попапа */
@media (max-height: 700px) and (max-width: 860px) {
  .ns-popup-media, .ns-popup-media img { max-height: 20dvh; }
  .ns-popup-body { padding: 20px 20px 22px; gap: 9px; }
  .ns-popup-title { font-size: 21px; }
  .ns-popup-text { font-size: 13.5px; line-height: 1.5; }
  .ns-popup-note { display: none; }
  .ns-popup-badge { padding: 6px 11px; }
}
/* очень низкий экран (телефон в альбомной) — фото прячем, важна форма */
@media (max-height: 560px) and (max-width: 860px) {
  .ns-popup-media { display: none; }
}
