/* Оформление IM. Цвета, шрифты и логотипы приходят из контент-пака переменными --im-*.
   Здесь только система: стеклянные поверхности, свечение, движение, состояния, доступность. */

/* ——— токены ——— */
:root {
  color-scheme: dark;

  --ink: #f4f2ee;
  --ink-2: rgba(244, 242, 238, .72);
  --ink-3: rgba(244, 242, 238, .56);
  --void: #0e0d0c;

  /* Стекло: три высоты. Каждая — заливка, кайма, внутренний блик, тень. */
  --glass-1: linear-gradient(155deg, rgba(255,255,255,.10), rgba(255,255,255,.028) 62%);
  --glass-2: linear-gradient(155deg, rgba(255,255,255,.14), rgba(255,255,255,.045) 62%);
  --glass-3: linear-gradient(155deg, rgba(28,26,24,.92), rgba(16,15,14,.96));
  --edge: rgba(255, 255, 255, .16);
  --edge-strong: rgba(255, 255, 255, .28);
  --sheen: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .28);
  --lift-1: 0 8px 24px -14px rgba(0, 0, 0, .8);
  --lift-2: 0 18px 50px -18px rgba(0, 0, 0, .85);
  --lift-3: 0 40px 90px -28px rgba(0, 0, 0, .9);
  --blur: blur(20px) saturate(1.55);

  --glow: 0 0 0 1px color-mix(in oklab, var(--im-accent) 46%, transparent),
          0 10px 34px -12px color-mix(in oklab, var(--im-accent) 62%, transparent);
  --glow-soft: 0 0 26px -8px color-mix(in oklab, var(--im-accent) 55%, transparent);

  --eyebrow: rgba(244, 242, 238, .58);
  --available: #47cf46;
  --under-offer: #e8ac17;
  --sold: #e2564e;
  --reserved: #5aa2f0;

  --r-pill: 999px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --bar: 64px;
  --tap: 44px;

  --fast: 140ms;
  --mid: 260ms;
  --slow: 520ms;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --fast: 1ms; --mid: 1ms; --slow: 1ms; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: rgba(244,242,238,.9); --ink-3: rgba(244,242,238,.75);
          --edge: rgba(255,255,255,.4); --glass-1: rgba(12,11,10,.94); --glass-2: rgba(12,11,10,.96); }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--void);
  color: var(--ink);
  font-family: var(--im-font-base), ui-sans-serif, system-ui, sans-serif;
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: var(--im-font-accent), ui-serif, Georgia, serif;
  font-weight: 400; margin: 0; letter-spacing: -.015em; line-height: 1.12;
}
p { margin: 0; }
img { max-width: 100%; }

/* ——— фокус ——— */
:focus-visible {
  outline: 2px solid var(--im-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--im-accent); color: var(--void); text-decoration: none;
  transition: top var(--mid) var(--ease);
}
.skip:focus { top: 12px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ——— стеклянная кнопка ——— */
.pill {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--tap); padding: 10px 20px;
  font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--edge); border-radius: var(--r-pill);
  background: var(--glass-1);
  box-shadow: var(--sheen), var(--lift-1);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  cursor: pointer; overflow: hidden; white-space: nowrap;
  transition: color var(--fast) var(--ease-soft), border-color var(--fast) var(--ease-soft),
              box-shadow var(--mid) var(--ease), transform var(--fast) var(--ease-soft),
              background var(--fast) var(--ease-soft);
}
/* Блик: узкая световая полоса проходит по кнопке при наведении. */
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(105deg, transparent 32%,
    color-mix(in oklab, var(--im-accent) 34%, transparent) 48%, transparent 64%);
  transform: translateX(-120%);
  transition: opacity var(--fast) linear;
}
.pill:hover::before { opacity: 1; animation: sweep var(--slow) var(--ease); }
@keyframes sweep { to { transform: translateX(120%); } }
.pill:hover {
  border-color: var(--edge-strong);
  background: var(--glass-2);
  box-shadow: var(--sheen), var(--lift-2), var(--glow-soft);
  transform: translateY(-1px);
}
.pill:active { transform: translateY(0) scale(.98); }
.pill[aria-pressed="true"], .pill[aria-current="true"], .pill[aria-selected="true"] {
  color: var(--void);
  background: var(--im-accent);
  border-color: transparent;
  box-shadow: var(--glow);
}
.pill[disabled] { opacity: .34; pointer-events: none; }
.pill--ghost { background: transparent; box-shadow: none; }
.pill--icon { width: var(--tap); padding: 0; border-radius: 50%; }

.glass {
  background: var(--glass-1); border: 1px solid var(--edge); border-radius: var(--r-lg);
  box-shadow: var(--sheen), var(--lift-2);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}

/* ——— каркас ——— */
#app { position: fixed; inset: 0; overflow: hidden; }
#stage, #backdrop { position: absolute; inset: 0; }
#stage canvas { display: block; transition: opacity var(--mid) var(--ease-soft); }
#backdrop, #backdrop-next {
  background-size: cover; background-position: center;
  pointer-events: none; /* панораму крутят мышью, слой над холстом не должен её ловить */
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
/* Слайд с планом не показывает фотографию: под план идёт спокойный фирменный градиент. */
#backdrop[data-mode="gradient"] {
  background-image:
    radial-gradient(85% 65% at 18% 12%,
      color-mix(in oklab, var(--im-secondary) 62%, transparent), transparent 66%),
    radial-gradient(70% 60% at 86% 88%,
      color-mix(in oklab, var(--im-accent) 40%, transparent), transparent 62%),
    radial-gradient(120% 90% at 50% 50%, transparent 40%, rgba(4, 4, 4, .72) 100%),
    linear-gradient(150deg, #201c19, #0b0a0a 80%);
  background-color: var(--im-primary);
  animation: none;
}
#backdrop-next { position: absolute; inset: 0; opacity: 0; }
#backdrop-next[data-on="1"] { opacity: 1; }
#backdrop[data-enter="1"] { animation: kenburns 24s var(--ease-soft) forwards; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
#scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 8% 50%, rgba(6,6,6,.92) 0%, rgba(6,6,6,.55) 40%, transparent 70%),
    linear-gradient(to bottom, rgba(6,6,6,.66) 0%, transparent 22%, transparent 74%, rgba(6,6,6,.72) 100%);
}

/* ——— шапка ——— */
#head {
  position: absolute; inset: 0 0 auto 0; height: var(--bar); z-index: 12;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
}
#burger span { display: block; width: 17px; height: 1.5px; background: currentColor;
  position: relative; transition: transform var(--mid) var(--ease); }
#burger span::before, #burger span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 1.5px; background: currentColor;
  transition: transform var(--mid) var(--ease), opacity var(--fast) linear;
}
#burger span::before { top: -5.5px; }
#burger span::after { top: 5.5px; }
#burger[aria-expanded="true"] span { transform: rotate(45deg); }
#burger[aria-expanded="true"] span::before { transform: translateY(5.5px) rotate(-90deg); }
#burger[aria-expanded="true"] span::after { opacity: 0; }

#dots { display: flex; align-items: center; }
#dots .dot {
  position: relative; width: 26px; height: var(--tap); padding: 0;
  border: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
#dots .dot::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--edge-strong); background: transparent;
  transition: background var(--mid) var(--ease), transform var(--mid) var(--ease),
              box-shadow var(--mid) var(--ease), border-color var(--mid) var(--ease);
}
#dots .dot::before {
  content: ""; position: absolute; left: 0; width: 15px; height: 1px; background: var(--edge);
  transform: translateX(-50%);
}
#dots .dot:first-child::before { display: none; }
#dots .dot[data-seen="1"]::after { background: var(--ink-3); border-color: transparent; }
#dots .dot[aria-current="true"]::after {
  background: var(--im-accent); border-color: transparent;
  transform: scale(1.5); box-shadow: var(--glow-soft);
}
#dots .dot:hover::after { transform: scale(1.35); border-color: var(--im-accent); }
#slide-name {
  font-family: var(--im-font-base), sans-serif;
  font-size: 12px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: min(30ch, calc(50vw - 250px));
}
#enquire-top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 13; }

/* Полоса прогресса по всей ширине: сколько колоды пройдено. */
#progress {
  position: absolute; inset: 0 0 auto 0; height: 2px; z-index: 14;
  background: rgba(255, 255, 255, .07);
}
#progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(to right,
    color-mix(in oklab, var(--im-accent) 55%, transparent), var(--im-accent));
  box-shadow: var(--glow-soft);
  transition: width var(--slow) var(--ease);
}

/* Зерно: тонкий шум поверх кадра, чтобы градиенты не полосили. */
#grain {
  position: absolute; inset: 0; z-index: 9; pointer-events: none; opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='120' height='120' filter='url(%23n)' opacity='.42'/></svg>");
}

/* ——— подвал ——— */
#foot {
  position: absolute; inset: auto 0 0 0; height: var(--bar); z-index: 12;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; pointer-events: none;
}
#foot > * { pointer-events: auto; }
#foot .nav { display: flex; gap: 10px; }
#next-name { font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }

/* ——— меню ——— */
#menu-veil {
  position: absolute; inset: 0; z-index: 19; background: rgba(4, 4, 4, .55);
  opacity: 0; pointer-events: none; transition: opacity var(--mid) var(--ease-soft);
  backdrop-filter: blur(2px);
}
#menu-veil[data-open="1"] { opacity: 1; pointer-events: auto; }
#menu {
  position: absolute; inset: 0 auto 0 0; width: min(420px, 90vw); z-index: 20;
  display: flex; flex-direction: column; gap: 20px; padding: 22px;
  background: var(--glass-3); border-right: 1px solid var(--edge);
  box-shadow: var(--lift-3); backdrop-filter: var(--blur);
  transform: translateX(-102%);
  transition: transform var(--slow) var(--ease);
  overflow: auto; overscroll-behavior: contain;
}
/* Закрытая панель выключается атрибутом inert: он же убирает её из порядка обхода.
   visibility здесь не годится — фокус нельзя поставить в тот же кадр, что и открытие. */
#menu[inert] { pointer-events: none; }
#menu[data-open="1"] { transform: none; }
#menu > img { max-width: 200px; }
#menu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: s; }
#menu ol button {
  width: 100%; min-height: var(--tap); display: flex; align-items: baseline; gap: 14px;
  padding: 11px 14px; border: 0; border-radius: var(--r-md); cursor: pointer;
  background: transparent; color: var(--ink-2); font: inherit; text-align: left;
  transition: background var(--fast) var(--ease-soft), color var(--fast) var(--ease-soft),
              padding-left var(--mid) var(--ease);
}
#menu ol button .num { font-size: 11px; letter-spacing: .1em; color: var(--ink-3); min-width: 20px; }
#menu ol button:hover { background: rgba(255, 255, 255, .07); color: var(--ink); padding-left: 20px; }
#menu ol button[aria-current="true"] { color: var(--im-accent); }
#menu ol button[aria-current="true"] .num { color: var(--im-accent); }
#menu .contacts { margin-top: auto; display: grid; gap: 8px; padding-top: 16px;
  border-top: 1px solid var(--edge); }
#menu .contacts a { color: var(--ink-2); text-decoration: none; min-height: var(--tap);
  display: flex; align-items: center; transition: color var(--fast) var(--ease-soft); }
#menu .contacts a:hover { color: var(--im-accent); }

/* ——— слайд ——— */
#slide { position: absolute; inset: var(--bar) 0; z-index: 10; pointer-events: none; }
#slide > * { pointer-events: auto; }
/* Появление содержимого: слои въезжают со сдвигом, каждый чуть позже предыдущего. */
#slide > * { animation: rise var(--slow) var(--ease) backwards; }
#slide > *:nth-child(2) { animation-delay: 70ms; }
#slide > *:nth-child(3) { animation-delay: 140ms; }
#slide > *:nth-child(4) { animation-delay: 210ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.left-col {
  position: absolute; left: 56px; top: 50%; transform: translateY(-50%);
  width: min(430px, 44vw); display: grid; gap: 18px; justify-items: start;
}
/* Когда под колонкой стоит список объектов, она поднимается, чтобы не перекрываться. */
.left-col--high { top: 30%; }
.left-col .eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--eyebrow);
}
.left-col .eyebrow::after {
  content: ""; flex: 1; height: 1px; max-width: 56px;
  background: linear-gradient(to right, var(--edge-strong), transparent);
}
.left-col h2 { font-size: clamp(30px, 3.4vw, 46px); }
.left-col .rule {
  width: 100%; height: 1px; border: 0;
  background: linear-gradient(to right, var(--edge-strong), transparent);
}
.left-col p { color: var(--ink-2); max-width: 42ch; }
.left-col .lede { color: var(--ink); font-size: 17px; }

.tiles {
  position: absolute; left: 56%; top: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 12px; align-items: stretch;
}
.tile {
  width: 210px; padding: 26px 18px; display: grid; justify-items: center; gap: 14px;
  text-align: center; border-radius: var(--r-lg); border: 1px solid transparent;
  background: transparent; transition: background var(--mid) var(--ease),
    border-color var(--mid) var(--ease), transform var(--mid) var(--ease),
    box-shadow var(--mid) var(--ease);
}
.tile:hover {
  background: var(--glass-1); border-color: var(--edge);
  box-shadow: var(--sheen), var(--lift-2); transform: translateY(-4px);
  backdrop-filter: var(--blur);
}
.tile img { width: 46px; height: 46px; object-fit: contain;
  transition: transform var(--mid) var(--ease); }
.tile:hover img { transform: scale(1.08) translateY(-2px); }
.tile h3 { font-size: 23px; }

.strip {
  position: absolute; inset: auto 0 18px 0; display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap; padding: 0 16px;
}
.strip[role="group"] { gap: 6px; }
.strip--raised { bottom: 96px; }

.detail-tiles {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  display: grid; gap: 10px; width: 290px;
}
.detail-tiles .row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border-radius: var(--r-md); border: 1px solid var(--edge);
  background: var(--glass-1); box-shadow: var(--sheen), var(--lift-1);
  backdrop-filter: var(--blur);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease),
              border-color var(--fast) var(--ease-soft);
}
.detail-tiles .row:hover {
  transform: translateX(-5px); border-color: var(--edge-strong);
  box-shadow: var(--sheen), var(--lift-2), var(--glow-soft);
}
.detail-tiles img { width: 27px; height: 27px; flex: none; }

.gallery { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px;
  max-width: min(52vw, 720px); overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin; }
.gallery button {
  flex: none; padding: 0; border: 1px solid var(--edge); border-radius: var(--r-sm);
  background: none; cursor: pointer; overflow: hidden; line-height: 0;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease),
              border-color var(--fast) var(--ease-soft);
}
.gallery img { width: 88px; height: 60px; object-fit: cover;
  transition: transform var(--slow) var(--ease); }
.gallery button:hover { border-color: var(--im-accent); box-shadow: var(--glow-soft);
  transform: translateY(-3px); }
.gallery button:hover img { transform: scale(1.1); }

/* ——— точки на панораме ——— */
.im-pano-markers { position: absolute; inset: 0; pointer-events: none; }
.im-pano-marker {
  position: absolute; transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  min-width: 30px; min-height: 30px; padding: 3px 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 12px; font-variant-numeric: tabular-nums;
  color: var(--ink); border: 1.5px solid var(--edge-strong); border-radius: var(--r-pill);
  background: rgba(14, 13, 12, .68); backdrop-filter: blur(8px) saturate(1.4);
  box-shadow: var(--lift-1);
  animation: pop var(--mid) var(--ease) backwards;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease-soft),
              color var(--fast) var(--ease-soft), box-shadow var(--mid) var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
.im-pano-marker:hover, .im-pano-marker:focus-visible {
  transform: translate(-50%, -50%) scale(1.18); z-index: 2;
  background: var(--im-accent); color: var(--void); border-color: transparent;
  box-shadow: var(--glow);
}
.im-pano-marker[data-status="Available"] { border-color: var(--available);
  box-shadow: 0 0 16px -6px var(--available); }
.im-pano-marker[data-status="Under-Offer"] { border-color: var(--under-offer);
  box-shadow: 0 0 16px -6px var(--under-offer); }
.im-pano-marker[data-status="Sold"] { border-color: var(--sold); opacity: .5; }
.im-pano-marker[data-status="Reserved"] { border-color: var(--reserved);
  box-shadow: 0 0 16px -6px var(--reserved); }
/* Точка интереса несёт иконку категории и подпись. */
.im-pano-marker--poi { gap: 7px; padding: 3px 11px 3px 8px; }
.im-pano-marker--poi svg { width: 15px; height: 15px; flex: none; opacity: .9; }

/* Свёрнутая точка: подпись прячется, иконка остаётся. Наведение и фокус возвращают подпись.
   Кружок уходит под подписи, чтобы не резать их собой. */
.im-pano-marker[data-collapsed="1"] {
  width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0;
  overflow: hidden; z-index: -1; opacity: .86;
}
.im-pano-marker[data-collapsed="1"] .lbl { display: none; }
.im-pano-marker[data-collapsed="1"]:not(.im-pano-marker--poi) { font-size: 0; }
.im-pano-marker[data-collapsed="1"]:hover,
.im-pano-marker[data-collapsed="1"]:focus-visible {
  width: auto; min-width: 30px; height: auto; min-height: 30px;
  padding: 3px 11px 3px 8px; font-size: 12px; overflow: visible; z-index: 3;
}
.im-pano-marker[data-collapsed="1"]:hover .lbl,
.im-pano-marker[data-collapsed="1"]:focus-visible .lbl { display: inline; }
.im-pano-marker--link {
  width: 44px; min-width: 44px; height: 44px; border-style: dashed;
  animation: pulse 2.6s var(--ease-soft) infinite;
}
.im-pano-marker--link::before {
  content: ""; width: 10px; height: 10px; border: 1.5px solid currentColor;
  border-left: 0; border-bottom: 0; transform: rotate(45deg) translate(-2px, 2px);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--im-accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 10px transparent; }
}

/* ——— карточка точки при наведении ——— */
.hover-card {
  position: absolute; z-index: 13; pointer-events: none;
  width: 240px; padding: 12px 14px; display: grid; gap: 8px;
  border-radius: var(--r-md); border: 1px solid var(--edge);
  background: var(--glass-3); box-shadow: var(--sheen), var(--lift-2);
  backdrop-filter: var(--blur);
  opacity: 0; transform: translate(-50%, -118%) scale(.96);
  transition: opacity var(--fast) linear, transform var(--fast) var(--ease);
}
.hover-card[data-show="1"] { opacity: 1; transform: translate(-50%, -118%) scale(1); }
/* У верхней кромки карточка разворачивается вниз. */
.hover-card[data-flip="1"] { transform: translate(-50%, 18%) scale(.96); }
.hover-card[data-flip="1"][data-show="1"] { transform: translate(-50%, 18%) scale(1); }
.hover-card img { width: 100%; height: 96px; object-fit: contain;
  background: rgba(255, 255, 255, .04); border-radius: var(--r-sm); }
.hover-card .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hover-card .code { font-size: 15px; }
.hover-card .st { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.hover-card .st[data-status="Available"] { color: var(--available); }
.hover-card .st[data-status="Under-Offer"] { color: var(--under-offer); }
.hover-card .st[data-status="Sold"] { color: var(--sold); }
.hover-card .st[data-status="Reserved"] { color: var(--reserved); }
.hover-card dl { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px;
  margin: 0; font-size: 12.5px; }
.hover-card dt { color: var(--ink-3); }
.hover-card dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ——— список объектов рядом ——— */
.poi-list {
  position: absolute; left: 56px; bottom: 24px; width: min(430px, 44vw);
  max-height: 38vh; overflow: auto; overscroll-behavior: contain;
  padding: 6px; border-radius: var(--r-lg); border: 1px solid var(--edge);
  background: var(--glass-1); box-shadow: var(--sheen), var(--lift-2);
  backdrop-filter: var(--blur); scrollbar-width: thin;
}
.poi-list h4 {
  margin: 12px 12px 6px; font: inherit; font-size: 10.5px; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase; color: var(--eyebrow);
  display: flex; align-items: center; gap: 9px;
}
.poi-list h4 svg { width: 15px; height: 15px; color: var(--im-accent); opacity: .85; }
.poi-list .ico { display: grid; place-items: center; width: 34px; height: 24px;
  border-radius: 5px; background: rgba(255, 255, 255, .06); }
.poi-list .ico svg { width: 15px; height: 15px; }
.poi-list button {
  width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px;
  align-items: center; min-height: var(--tap); padding: 7px 12px;
  border: 0; border-radius: var(--r-md); background: none; color: var(--ink-2);
  font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background var(--fast) var(--ease-soft), color var(--fast) var(--ease-soft);
}
.poi-list button:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.poi-list img { width: 34px; height: 24px; object-fit: cover; border-radius: 5px; }
.poi-list .far { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ——— панель управления панорамой ——— */
.pano-tools { position: absolute; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 11; }

/* Пока грузится первый уровень тайлов, по кадру идёт мягкая волна. */
#loading {
  position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0;
  transition: opacity var(--mid) var(--ease-soft);
  background: linear-gradient(100deg, transparent 38%,
    rgba(255, 255, 255, .05) 50%, transparent 62%);
  background-size: 260% 100%;
}
#loading[data-on="1"] { opacity: 1; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* ——— таблица ——— */
.table-wrap {
  position: absolute; inset: 74px 32px 84px; overflow: auto; border-radius: var(--r-lg);
  background-attachment: local, local, scroll, scroll;
  border: 1px solid var(--edge); background: var(--glass-3);
  box-shadow: var(--sheen), var(--lift-3); backdrop-filter: var(--blur);
  scrollbar-width: thin;
}
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
th, td { padding: 12px 16px; text-align: left; white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(rgba(20, 19, 18, .99), rgba(20, 19, 18, .96));
  border-bottom: 1px solid var(--edge);
  font-weight: 400; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
}
/* Кнопка сортировки занимает всю ячейку: на телефоне по заголовку надо попадать пальцем. */
thead th { padding: 0; }
thead th button {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  width: 100%; min-height: var(--tap); padding: 12px 16px; color: inherit;
}
thead th button:hover { color: var(--ink); }
thead th[aria-sort] button { color: var(--im-accent); }
thead th .arrow { font-size: 9px; opacity: .8; }
tbody tr {
  cursor: pointer;
  transition: background var(--fast) var(--ease-soft), box-shadow var(--fast) var(--ease-soft);
}
tbody td { border-bottom: 1px solid rgba(255, 255, 255, .055); }
tbody tr:hover td, tbody tr:focus-visible td { background: rgba(255, 255, 255, .06); }
tbody tr:focus-visible { outline: 2px solid var(--im-accent); outline-offset: -2px; }
/* Номер юнита и статус видны всегда: колонки закреплены по краям, середина прокручивается. */
:root { --cell: #161514; --cell-hover: #1f1d1b; }
thead th:first-child, tbody td:first-child { position: sticky; left: 0; }
thead th:last-child, tbody td:last-child { position: sticky; right: 0; }
tbody td:first-child, tbody td:last-child { background: var(--cell); z-index: 1; }
thead th:first-child, thead th:last-child { z-index: 3; background: #141312; }
tbody tr:hover td:first-child, tbody tr:hover td:last-child { background: var(--cell-hover); }
tbody td:first-child { box-shadow: 1px 0 0 rgba(255, 255, 255, .06); }
tbody td:last-child { box-shadow: -1px 0 0 rgba(255, 255, 255, .06); }
thead th:first-child { box-shadow: 1px 0 0 rgba(255, 255, 255, .1); }
thead th:last-child { box-shadow: -1px 0 0 rgba(255, 255, 255, .1); }

tbody tr td:first-child { position: sticky; }
tbody tr td:first-child::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--status, transparent);
  transform: scaleY(0); transition: transform var(--mid) var(--ease);
}
tbody tr:hover td:first-child::before { transform: scaleY(1); }
td.is-status { font-weight: 500; }
td.is-status[data-status="Available"] { color: var(--available); }
td.is-status[data-status="Under-Offer"] { color: var(--under-offer); }
td.is-status[data-status="Sold"] { color: var(--sold); }
td.is-status[data-status="Reserved"] { color: var(--reserved); }
.empty { padding: 40px; text-align: center; color: var(--ink-3); }

.filters {
  position: absolute; inset: 12px auto auto 32px; z-index: 11;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.swatch { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 10px -2px currentColor; }

/* ——— план ——— */
#plan-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
#plan-stage[data-drag="1"] { cursor: grabbing; }
#plan-stage .zoom {
  position: absolute; inset: 0; transform-origin: 0 0;
  transition: transform var(--mid) var(--ease-soft);
}
#plan-stage[data-drag="1"] .zoom { transition: none; }
#plan-stage img.bg { width: 100%; height: 100%; object-fit: contain; user-select: none; }
#plan-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#plan-stage svg [id^="unit"] {
  cursor: pointer; fill-opacity: .42;
  transition: fill-opacity var(--fast) var(--ease-soft), filter var(--fast) var(--ease-soft);
}
#plan-stage svg [id^="unit"]:hover { fill-opacity: .82; filter: brightness(1.25); }
#plan-stage svg [id^="unit"]:focus-visible { outline: 2px solid var(--im-accent); }
.plan-tip {
  position: absolute; z-index: 12; pointer-events: none; padding: 7px 12px;
  border-radius: var(--r-sm); border: 1px solid var(--edge); background: var(--glass-3);
  box-shadow: var(--lift-2); font-size: 12.5px; white-space: nowrap;
  opacity: 0; transform: translate(-50%, -140%) scale(.96);
  transition: opacity var(--fast) linear, transform var(--fast) var(--ease);
}
.plan-tip[data-show="1"] { opacity: 1; transform: translate(-50%, -140%) scale(1); }

/* ——— попапы ——— */
dialog {
  border: 1px solid var(--edge); border-radius: var(--r-lg); padding: 0;
  background: var(--glass-3); color: var(--ink);
  box-shadow: var(--sheen), var(--lift-3);
  max-width: min(1120px, 94vw); max-height: 90vh; overflow: hidden;
  backdrop-filter: var(--blur);
}
dialog[open] { animation: dialog-in var(--mid) var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
dialog::backdrop { background: rgba(4, 4, 4, .68); backdrop-filter: blur(6px);
  animation: fade var(--mid) var(--ease-soft); }
@keyframes fade { from { opacity: 0; } }
dialog .head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 20px; border-bottom: 1px solid var(--edge);
}
dialog .head h3 { font-size: 22px; }
dialog .body { padding: 20px; display: grid; gap: 16px; overflow: auto; max-height: calc(90vh - 78px); }
dialog img.slide { width: 100%; height: auto; border-radius: var(--r-md); display: block;
  background: rgba(255, 255, 255, .04); }
dialog dl {
  display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0;
  border: 1px solid var(--edge); border-radius: var(--r-md); overflow: hidden;
}
dialog dt, dialog dd { padding: 9px 14px; margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06); }
dialog dt { color: var(--ink-3); background: rgba(255, 255, 255, .03); }
dialog dd { font-variant-numeric: tabular-nums; }
dialog .actions { display: flex; gap: 10px; flex-wrap: wrap; }
dialog .head .badge {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-pill); margin-left: auto;
  border: 1px solid currentColor;
}
dialog .head .badge[data-status="Available"] { color: var(--available); }
dialog .head .badge[data-status="Under-Offer"] { color: var(--under-offer); }
dialog .head .badge[data-status="Sold"] { color: var(--sold); }
dialog .head .badge[data-status="Reserved"] { color: var(--reserved); }

/* Карточка юнита: план слева, характеристики справа. */
.unit-view {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
  gap: 22px; align-items: start;
}
.unit-view img.slide { max-height: 60vh; object-fit: contain; }
.unit-view .side { display: grid; gap: 16px; }
@media (max-width: 899px) { .unit-view { grid-template-columns: 1fr; } }

.lightbox { display: grid; gap: 12px; justify-items: center; }
.lightbox .frame { position: relative; width: 100%; }
.lightbox .arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .arrow.prev { left: 12px; }
.lightbox .arrow.next { right: 12px; }
.lightbox .count { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ——— контакты ——— */
/* Колонка по центру кадра: агенты — главный призыв слайда. */
.centre-col {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: center;
  gap: 18px; padding: 24px 32px 76px; text-align: center;
}
.centre-col h2 { font-size: clamp(30px, 3.4vw, 46px); }
.centre-col .rule {
  width: min(320px, 60vw); height: 1px; border: 0;
  background: linear-gradient(to right, transparent, var(--edge-strong), transparent);
}
.centre-col .eyebrow::after { display: none; }
.agent-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.agent-row .agent { width: min(410px, 86vw); text-align: left; }
.agent {
  display: grid; grid-template-columns: 82px 1fr; gap: 16px; align-items: center;
  padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--edge);
  background: var(--glass-1); box-shadow: var(--sheen), var(--lift-1);
  backdrop-filter: var(--blur);
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease),
              border-color var(--fast) var(--ease-soft);
}
.agent:hover { transform: translateY(-3px); border-color: var(--edge-strong);
  box-shadow: var(--sheen), var(--lift-2), var(--glow-soft); }
.agent .portrait { width: 82px; height: 82px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--edge); }
.agent .lines { display: grid; gap: 3px; min-width: 0; }
.agent .name { font-size: 17px; }
.agent .role { color: var(--ink-3); font-size: 13px; margin-bottom: 5px; }
.agent .line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agent .line a { flex: 1 1 auto; min-width: 0; }
.agent a { display: inline-flex; align-items: center; min-height: 30px; font-size: 13px;
  color: var(--ink-2); text-decoration: none; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--fast) var(--ease-soft); }
.agent a:hover { color: var(--im-accent); }
.agent .copy { flex: none; width: 30px; min-height: 30px; }
.agent .logo { max-height: 22px; margin-top: 9px; opacity: .78; }

.disclaimer {
  position: absolute; inset: auto auto 16px 56px; max-width: min(440px, 44vw);
  font-size: 11.5px; line-height: 1.55; color: var(--ink-3);
}
.disclaimer summary {
  cursor: pointer; list-style: none; min-height: 30px; display: inline-flex;
  align-items: center; gap: 8px; letter-spacing: .14em; text-transform: uppercase;
  font-size: 10.5px; color: var(--eyebrow);
  transition: color var(--fast) var(--ease-soft);
}
.disclaimer summary::-webkit-details-marker { display: none; }
.disclaimer summary::after { content: "+"; font-size: 13px; }
.disclaimer[open] summary::after { content: "–"; }
.disclaimer summary:hover { color: var(--ink-2); }
.disclaimer p { margin-top: 10px; color: rgba(244, 242, 238, .62); }

/* ——— подсказки по слайду ——— */
/* Вуаль ловит клик мимо подсказки. Затемняет не она, а тень кольца: два слоя дают перебор. */
.tour-veil { position: absolute; inset: 0; z-index: 24; }
/* Кольцо вокруг цели вырезает её из затемнения одной большой тенью. */
.tour-ring {
  position: absolute; z-index: 25; pointer-events: none; border-radius: var(--r-md);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--im-accent) 70%, transparent),
              0 0 30px -4px color-mix(in oklab, var(--im-accent) 60%, transparent),
              0 0 0 9999px rgba(4, 4, 4, .55);
  transition: left var(--mid) var(--ease), top var(--mid) var(--ease),
              width var(--mid) var(--ease), height var(--mid) var(--ease);
}
.tour-card {
  position: absolute; z-index: 26; width: min(340px, calc(100vw - 24px));
  display: grid; gap: 10px; padding: 16px 18px;
  border-radius: var(--r-lg); border: 1px solid var(--edge);
  background: var(--glass-3); box-shadow: var(--sheen), var(--lift-3);
  backdrop-filter: var(--blur);
  transition: left var(--mid) var(--ease), top var(--mid) var(--ease);
  animation: rise var(--mid) var(--ease) backwards;
}
.tour-card .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-card .count {
  font-size: 11px; letter-spacing: .18em; color: var(--eyebrow);
  font-variant-numeric: tabular-nums;
}
.tour-card .head .pill { min-height: 30px; padding: 4px 12px; font-size: 12px; }
.tour-card h3 { font-size: 19px; }
.tour-card p { font-size: 13.5px; color: var(--ink-2); }
.tour-card .timer { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.tour-card .timer i {
  display: block; height: 100%; width: 0; border-radius: 2px; background: var(--im-accent);
}
.tour-card[data-paused="1"] .timer i { background: var(--ink-3); }
.tour-card .nav { display: flex; gap: 8px; justify-content: flex-end; }
.tour-card .nav .pill { min-height: 36px; padding: 6px 16px; font-size: 13px; }
/* Стрелка островка смотрит на цель. */
.tour-arrow {
  position: absolute; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg);
  background: var(--glass-3); border: 1px solid var(--edge); border-radius: 0 0 0 3px;
}
.tour-card[data-side="bottom"] .tour-arrow { top: -7.5px; border-right: 0; border-bottom: 0; }
.tour-card[data-side="top"] .tour-arrow { bottom: -7.5px; border-left: 0; border-top: 0;
  border-radius: 0 3px 0 0; }
.tour-card[data-side="dock"] .tour-arrow { display: none; }

@media (max-width: 719px) {
  .tour-card { width: calc(100vw - 24px); }
  .tour-card .nav .pill { flex: 1; }
}

/* ——— заметка о пробеле в контенте ——— */
.missing {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: 640px; display: grid; gap: 10px; text-align: center;
  padding: 24px 28px; border-radius: var(--r-lg);
  border: 1px dashed color-mix(in oklab, var(--under-offer) 62%, transparent);
  background: var(--glass-3); box-shadow: var(--lift-2); backdrop-filter: var(--blur);
}
.missing h3 { color: var(--under-offer); font-size: 17px; }
.missing p { color: var(--ink-2); font-size: 13.5px; }
.missing--compact {
  left: 16px; top: auto; bottom: 16px; transform: none;
  max-width: 400px; text-align: left; padding: 13px 17px;
}
.missing--compact h3 { font-size: 13px; }
.missing--compact p { font-size: 12px; }

/* ——— форма ——— */
form.enquire { display: grid; gap: 12px; min-width: min(480px, 86vw); }
form.enquire label { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
form.enquire input, form.enquire textarea {
  font: inherit; color: var(--ink); min-height: var(--tap); padding: 12px 14px;
  border: 1px solid var(--edge); border-radius: var(--r-md);
  background: rgba(255, 255, 255, .05);
  transition: border-color var(--fast) var(--ease-soft), box-shadow var(--mid) var(--ease),
              background var(--fast) var(--ease-soft);
}
form.enquire input:hover, form.enquire textarea:hover { background: rgba(255, 255, 255, .08); }
form.enquire input:focus, form.enquire textarea:focus {
  outline: none; border-color: var(--im-accent); box-shadow: var(--glow-soft);
  background: rgba(255, 255, 255, .09);
}
form.enquire input:user-invalid { border-color: var(--sold); }
form.enquire .note { color: var(--under-offer); font-size: 12px; }

/* ——— тост ——— */
#toast {
  position: absolute; left: 50%; bottom: 82px; z-index: 30; transform: translate(-50%, 12px);
  padding: 11px 18px; border-radius: var(--r-pill); border: 1px solid var(--edge);
  background: var(--glass-3); box-shadow: var(--lift-2); backdrop-filter: var(--blur);
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
}
#toast[data-show="1"] { opacity: 1; transform: translate(-50%, 0); }

/* ——— планшет и телефон ——— */
@media (max-width: 1023px) {
  body { font-size: 14px; }
  #slide { overflow: auto; overscroll-behavior: contain; }
  .left-col { position: static; width: auto; transform: none;
    padding: 20px 16px 0; justify-items: stretch; }
  .tiles { position: static; transform: none; flex-direction: column;
    padding: 16px; gap: 10px; }
  .tile { width: auto; grid-template-columns: 46px 1fr auto; justify-items: start;
    text-align: left; align-items: center; background: var(--glass-1);
    border-color: var(--edge); padding: 14px 16px; gap: 14px; }
  .tile .pill { padding: 8px 14px; }
  .tile h3 { font-size: 19px; }
  .detail-tiles { position: static; transform: none; width: auto; padding: 16px; }
  .centre-col { position: static; padding: 20px 16px 24px; }
  .agent-row .agent { width: 100%; }
  .table-wrap { inset: 66px 8px 76px; }
  th, td { padding: 10px 12px; }
  thead th { padding: 0; }
  thead th button { padding: 10px 12px; }
  .filters { position: static; padding: 12px 16px 0; }
  .gallery { position: static; padding: 12px 16px; max-width: none; }
  .strip, .strip--raised { position: static; padding: 12px 16px 20px; }
  .disclaimer { position: static; padding: 12px 16px 20px; max-width: none; }
  #slide-name { max-width: 14ch; }
  #grain { display: none; }
  .missing { position: static; transform: none; margin: 16px; max-width: none; }
  .poi-list { position: static; width: auto; max-height: none; margin: 16px; }
  /* На телефоне призыв уезжает вниз справа: сверху его перекрывает бургер. */
  #enquire-top {
    top: auto; left: auto; right: 12px; bottom: 76px; transform: none;
    box-shadow: var(--sheen), var(--lift-2), var(--glow-soft);
  }
  #head { gap: 10px; }
  #dots { display: none; }
}
