/* =====================================================================================
   Trigonum – interactive unit selector (prototype)
   One stylesheet, mobile-first. Palette: lime-plaster whites, warm charcoal and the
   building's oxide brick (#a8473a). Display type: Fraunces; UI type: Manrope.
   ===================================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------------------- */
:root {
  --paper: #f6f2ec;          /* page: warm lime-plaster white */
  --paper-2: #ece6dd;        /* recessed areas, skeletons */
  --card: #fffdf9;           /* raised surfaces: plan sheet, list, dialogs */
  --ink: #2a2624;            /* warm charcoal text */
  --ink-2: #5a524c;          /* secondary text (7:1 on paper) */
  --ink-3: #6f665f;          /* tertiary text (5:1 on paper) */
  --line: #ddd4c9;           /* hairlines */
  --line-2: #c9bdb0;         /* stronger rules, inputs */
  --night: #24201e;          /* building stage backdrop */
  --night-2: #332d2a;

  --brick: #a8473a;          /* accent: the facade brick */
  --brick-deep: #8b3629;     /* pressed / text on tint */
  --brick-tint: #f4e4df;     /* selected rows */

  --avail: #2c6a48;          /* "E lire" text + icon (5.9:1 on paper) */
  --avail-bg: #e1eee5;
  --avail-fill: rgba(64, 141, 98, .24);
  --avail-stroke: #3b7f59;
  --sold: #5f5751;           /* "Shitur" text */
  --sold-bg: #e8e3dd;
  --sold-fill: rgba(222, 215, 207, .72);
  --sold-hatch: rgba(130, 119, 109, .55);
  --resv: #8a5a12;
  --resv-bg: #f6ead3;

  --ff-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --hdr: 64px;
  --gutter: 16px;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --focus: 0 0 0 3px rgba(168, 71, 58, .45);
}
@media (min-width: 900px) {
  :root { --hdr: 84px; --gutter: 28px; }
}

/* ---------- 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--ff-ui);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-s);
  text-decoration: none; transition: top .15s;
}
.skip:focus { top: 12px; }

.ic { width: 20px; height: 20px; flex: none; }
.ic-s { width: 16px; height: 16px; }

/* ---------- 3. Header / footer ------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  height: var(--hdr);
  display: flex; align-items: center; gap: 14px;
  padding: 0 var(--gutter);
  background: rgba(246, 242, 236, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; color: var(--brick); }
.brand-mark { width: 30px; height: 30px; flex: none; }
/* the company logo in the header (13.11.2026): the band stays under the building (founder, 12.11) */
.brand-logo { height: calc(var(--hdr) - 10px); width: auto; flex: none; display: block; }
.brand-logo + .brand-text { padding-left: 12px; border-left: 1px solid var(--line); }
.brand-dev { display: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 560 15px/1.15 var(--ff-display); letter-spacing: .12em; color: var(--ink); font-variation-settings: "opsz" 96; max-width: 9.5em; }
@media (min-width: 720px) { .brand-name { font-size: 19px; letter-spacing: .16em; max-width: none; } }
.brand-dev { font-size: 11.5px; letter-spacing: .02em; color: var(--ink-3); margin-top: 4px; }
.ph-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; line-height: 1; color: var(--ink-3);
  border: 1px dashed var(--line-2); border-radius: 999px; padding: 4px 8px; white-space: nowrap;
}
.hdr-ph { display: none; }
.hdr-project { margin-left: auto; }
.hdr-project select {
  min-height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); padding: 0 10px;
}
.hdr-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hdr-project:not(:empty) + .hdr-nav { margin-left: 8px; }
.hdr-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-s); text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink);
  background: none; border: 0;
}
.hdr-link:hover { background: var(--paper-2); }
.hdr-link[aria-current="page"] { color: var(--brick-deep); }
.hdr-contact { border: 1px solid var(--line-2); padding: 0 16px; }
.hdr-nav-b { display: none; }
@media (min-width: 480px) { .hdr-nav-b { display: inline-flex; } }
@media (min-width: 720px) { .hdr-ph { display: inline-flex; } }

.main { flex: 1 0 auto; outline: none; }
.ftr {
  border-top: 1px solid var(--line);
  padding: 20px var(--gutter) 28px;
  color: var(--ink-3); font-size: 13px;
  display: grid; gap: 6px;
}
.ftr-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
body[data-view="unit"] .ftr-disclaimer { display: none; }   /* the unit page shows it beside the areas */
.ftr a { color: var(--ink-2); }

.mockbar {
  background: #fbf0d8; color: #5d4512; border-bottom: 1px solid #ecd9ad;
  font-size: 12.5px; padding: 7px var(--gutter); line-height: 1.45;
}
.mockbar code { font-size: 12px; background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; }

.boot, .loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50vh; color: var(--ink-3); font-size: 14px;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--brick);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* view entry: one short fade/slide that answers the navigation */
/* fill-mode backwards (not both): a transform kept after the animation, even an identity
   one, would make .view the containing block of position:fixed children (full-screen plan,
   bottom cards) and pin them to the page instead of the screen */
.view { animation: viewIn .32s var(--ease) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 4. Shared controls -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-m); border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink);
  font-weight: 650; font-size: 15px; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brick); border-color: var(--brick); color: #fff; }
.btn--primary:hover { background: var(--brick-deep); border-color: var(--brick-deep); }
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--dark:hover { background: #3b3532; }
.btn--ghost { background: transparent; border-color: transparent; padding: 0 10px; }
.btn--ghost:hover { background: var(--paper-2); border-color: transparent; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-ph { font-size: 10.5px; font-weight: 600; opacity: .8; border: 1px dashed currentColor; border-radius: 999px; padding: 2px 6px; }

.iconbtn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
}
.iconbtn:hover { border-color: var(--ink-3); }
.iconbtn:disabled { opacity: .4; cursor: default; }

.backlink {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 8px;
  color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none;
}
.backlink:hover { color: var(--ink); }

/* status pill: icon + word, never colour alone */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 650; line-height: 1;
  padding: 5px 9px 5px 7px; border-radius: 999px; white-space: nowrap;
}
.pill .ic { width: 14px; height: 14px; }
.pill--available { background: var(--avail-bg); color: var(--avail); }
.pill--sold { background: var(--sold-bg); color: var(--sold); }
.pill--reserved { background: var(--resv-bg); color: var(--resv); }
.pill--unknown { background: var(--paper-2); color: var(--ink-2); }
.pill--lg { font-size: 15px; padding: 7px 12px 7px 9px; }
.pill--lg .ic { width: 16px; height: 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; background: var(--card); white-space: nowrap;
}

/* segmented filter + switch */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--paper-2); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent;
  font-weight: 650; font-size: 14px; color: var(--ink-2); white-space: nowrap;
}
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(42,38,36,.12); }
.seg button:hover { color: var(--ink); }

.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s var(--ease);
}
.switch input:checked + .switch-track { background: var(--avail); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-m);
  font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* dialogs */
.dlg {
  border: 0; padding: 0; border-radius: var(--r-l); background: var(--card); color: var(--ink);
  width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(30, 24, 20, .28);
}
.dlg::backdrop { background: rgba(36, 32, 30, .5); }
.dlg-in { padding: 22px 22px 20px; display: grid; gap: 14px; }
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dlg-title { font: 500 24px/1.15 var(--ff-display); }
.contact-list { display: grid; gap: 8px; }
.contact-list .btn { justify-content: flex-start; }
.dlg-note { font-size: 13px; color: var(--ink-3); }

/* ---------- 5. Building view ---------------------------------------------------------- */
.bv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(96px, 27vw, 200px);
  grid-template-areas: "intro intro" "stage rail" "hint hint";
  gap: 12px 10px;
  padding: 16px var(--gutter) 24px;
}
.bv-intro { grid-area: intro; display: grid; gap: 10px; }
.bv-title { font: 450 clamp(30px, 8vw, 46px)/1.02 var(--ff-display); letter-spacing: -.01em; font-variation-settings: "opsz" 144; }
.bv-sum { color: var(--ink-2); font-size: 15px; }
.bv-sum strong { color: var(--ink); font-weight: 700; }
.bv-stamp { color: var(--ink-3); font-size: 13.5px; }
.bv-kinds { display: none; }
.bv-views { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bv-views-label { font-size: 13px; color: var(--ink-3); }

.bv-stage {
  grid-area: stage; position: relative; min-height: 420px;
  background: var(--night); border-radius: var(--r-l); overflow: hidden;
  touch-action: manipulation;
}
.bv-svg {
  position: absolute; inset: 0; margin: auto;
  width: 100%; height: 100%;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* wide screens: the render, blurred and darkened, fills the space beside the picture */
.bv-backdrop { display: none; }
/* photo layers: day (or the only render) below, night above; they cross-fade */
.bv-img { opacity: 0; transition: opacity .5s var(--ease); }
.bv-img--night { transition-duration: .9s; }
.bv-img.is-on { opacity: 1; }
.bv-skel {
  position: absolute; inset: 0; display: grid; place-items: center; color: rgba(246, 242, 236, .6); font-size: 13px;
  background: linear-gradient(110deg, var(--night) 30%, var(--night-2) 50%, var(--night) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

/* band colours: day = soft daylight white + brick outline; night (.is-night) = warm window
   light, as if the floor switched its lights on */
.bv {
  --band-hl: rgba(255, 248, 238, .42);
  --band-sweep: rgba(255, 248, 238, .34);
  --band-halo: rgba(255, 249, 241, .95);
  --band-line: var(--brick);
  --band-sold: rgba(28, 25, 23, .5);
  --band-sold-line: #8f867e;
}
.bv.is-night {
  --band-hl: rgba(255, 186, 102, .36);
  --band-sweep: rgba(255, 196, 120, .4);
  --band-halo: rgba(255, 206, 140, .78);
  --band-line: #ffd08f;
  --band-sold: rgba(6, 8, 18, .58);
  --band-sold-line: #b9b2ab;
}
.band { fill: rgba(255, 248, 238, 0); stroke: none; cursor: pointer; transition: fill .16s ease; }
.band.is-active { fill: var(--band-hl); }
.bv.is-night .band:not(.band--under):not(.is-soldout) { mix-blend-mode: screen; }
.band.is-soldout.is-active { fill: var(--band-sold); }
.band--under { fill: rgba(36, 32, 30, .16); stroke: rgba(255, 244, 232, .62); stroke-width: 1.25; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.band--under.is-active { fill: rgba(30, 27, 25, .66); stroke: none; }
/* no font shorthand here: it would override the font-size that building.js sets on each label */
.under-label { fill: #fffaf3; font-family: var(--ff-ui); font-weight: 700; paint-order: stroke; stroke: rgba(30, 26, 24, .55); pointer-events: none; }
.band-halo, .band-line { fill: none; pointer-events: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: 0; transition: opacity .16s, stroke .5s; }
.band-halo { stroke: var(--band-halo); stroke-width: 4.5; }
.band-line { stroke: var(--band-line); stroke-width: 2; }
.bv.is-night .band-halo { stroke-width: 6; filter: blur(1.5px); }
.band-halo.is-on, .band-line.is-on { opacity: 1; }
.band-line.is-soldout { stroke: var(--band-sold-line); }

/* one orchestrated load moment: a light sweeps up the facade, floor by floor */
.bv-intro-sweep .band { animation: bandSweep .9s var(--ease) calc(var(--i) * 60ms + 200ms) both; }
@keyframes bandSweep {
  0% { fill: rgba(255, 248, 238, 0); }
  40% { fill: var(--band-sweep); }
  100% { fill: rgba(255, 248, 238, 0); }
}

/* DITE | NATE: two-option toggle in the stage corner; the thumb slides, the photo cross-fades */
.dn {
  position: absolute; left: 10px; top: 10px; z-index: 4;
  display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px;
  background: rgba(22, 20, 19, .52);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 243, .18), 0 8px 22px rgba(0, 0, 0, .2);
}
.dn-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
  background: #fffdf9; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  transition: transform .5s var(--ease), background-color .5s var(--ease), box-shadow .5s var(--ease);
}
.dn.is-night .dn-thumb {
  transform: translateX(100%); background: #1b2340;
  box-shadow: inset 0 0 0 1px rgba(255, 208, 143, .5), 0 0 16px rgba(255, 186, 102, .35);
}
.dn.is-busy .dn-thumb { animation: dnBusy 1s ease-in-out infinite alternate; }
@keyframes dnBusy { to { opacity: .6; } }
.dn button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: none;
  font: 750 11.5px/1 var(--ff-ui); letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 250, 243, .8); transition: color .4s;
}
.dn button .ic { width: 16px; height: 16px; }
.dn button:hover { color: #fff; }
.dn button[data-mode="day"][aria-checked="true"] { color: var(--ink); }
.dn button[data-mode="night"][aria-checked="true"] { color: #ffd08f; }
.dn button:focus-visible { box-shadow: 0 0 0 3px rgba(255, 208, 143, .6); border-radius: 999px; }
.bv-back {
  position: absolute; left: 10px; top: 10px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px;
  border: 0; border-radius: 999px; font-weight: 650; font-size: 13.5px; color: #fffaf3;
  background: rgba(22, 20, 19, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 243, .18);
}
.bv-back:hover { background: rgba(22, 20, 19, .72); }
.bv-alt { font-size: 13.5px; color: var(--ink-3); }
.linkbtn {
  border: 0; background: none; padding: 4px 0; min-height: 32px; font: inherit; font-weight: 650;
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2);
}
.linkbtn:hover { color: var(--ink); text-decoration-color: currentColor; }

.bv-tip {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  background: var(--card); color: var(--ink); border-radius: var(--r-m);
  padding: 8px 12px; font-size: 14px; line-height: 1.25; white-space: nowrap;
  box-shadow: 0 10px 28px rgba(20, 16, 14, .32);
  opacity: 0; transform: translateY(4px); transition: opacity .14s, transform .14s var(--ease);
}
.bv-tip.is-on { opacity: 1; transform: none; }
.bv-tip b { font: 560 16px/1 var(--ff-display); }
.bv-tip .tip-kind { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.bv-tip .tip-av { color: var(--avail); font-weight: 650; }
.bv-tip .tip-sold { color: var(--sold); font-weight: 650; }
/* night: a dark glass tooltip with light text, so it belongs to the night photo and stays readable */
.bv.is-night .bv-tip {
  background: rgba(20, 22, 33, .9); color: #f7f0e6;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 208, 143, .28), 0 12px 32px rgba(0, 0, 0, .5);
}
.bv.is-night .bv-tip .tip-av { color: #9fdcb4; }
.bv.is-night .bv-tip .tip-sold { color: #d9d1c8; }
.bv.is-night .bv-tip .tip-kind { color: rgba(247, 240, 230, .72); }

.bv-hint { grid-area: hint; color: var(--ink-3); font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.bv-hint .ic { width: 18px; height: 18px; margin-top: 1px; }

/* floor rail */
.bv-rail { grid-area: rail; container: rail / inline-size; }
.rail { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; height: 100%; grid-auto-rows: minmax(44px, 1fr); }
.rail-sep { height: 0; border-top: 1px dashed var(--line-2); margin: 3px 4px; min-height: 0 !important; }
.rail-item {
  position: relative; height: 100%;
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px;
  padding: 4px 8px 4px 10px; border-radius: var(--r-m);
  text-decoration: none; color: var(--ink);
  transition: background .14s;
}
.rail-item::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px;
  background: var(--brick); transform: scaleY(0); transition: transform .16s var(--ease);
}
.rail-item:hover, .rail-item.is-active { background: var(--card); }
.rail-item.is-active::before, .rail-item.is-selected::before { transform: scaleY(1); }
.rail-item.is-selected { background: var(--brick-tint); }
.rail-num {
  font: 450 24px/1 var(--ff-display); font-variation-settings: "opsz" 72; min-width: 1.6ch; text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
}
.rail-txt { display: grid; gap: 1px; min-width: 0; }
.rail-kind { display: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item.is-res .rail-kind { display: none !important; }
.rail-av { font-size: 12.5px; font-weight: 650; color: var(--avail); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item.is-soldout .rail-num { color: var(--ink-3); }
.rail-item.is-soldout .rail-av { color: var(--sold); font-weight: 600; }
.rail-bar { display: none; grid-column: 2; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 3px; }
.rail-bar span { display: block; height: 100%; background: var(--avail-stroke); border-radius: 2px; }
.rail li { min-height: 0; }
.rail li.is-under-first { border-top: 1px dashed var(--line-2); padding-top: 3px; }
.av-long { display: none; }
/* narrow rail (phones, ~100 px): a little less padding so "29 te lira" is not cut off */
@container rail (max-width: 149px) {
  .rail-item { column-gap: 5px; padding-right: 3px; }
}
@container rail (min-width: 150px) {
  .rail-kind { display: block; }
  .rail-num { font-size: 28px; }
  .av-long { display: inline; }
  .av-short { display: none; }
}
@container rail (min-width: 240px) {
  .rail-item { grid-template-columns: 48px 1fr; padding: 4px 12px 4px 10px; }
  .rail-txt { display: flex; align-items: baseline; gap: 0 10px; }
  .rail-kind { font-size: 12.5px; }
  .rail-bar { display: block; }
  .rail-av { font-size: 14px; }
}

/* touch bottom card */
.sheet {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "txt x" "btn btn";
  align-items: center; gap: 10px 8px;
  background: var(--card); border-radius: var(--r-l); padding: 14px 10px 12px 16px;
  box-shadow: 0 16px 44px rgba(30, 24, 20, .3);
  animation: sheetIn .22s var(--ease) both;
  max-width: 560px; margin: 0 auto;
}
@keyframes sheetIn { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-txt { grid-area: txt; min-width: 0; line-height: 1.3; }
.sheet-title { font: 500 20px/1.15 var(--ff-display); }
.sheet-sub { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .btn { grid-area: btn; margin-right: 6px; }
.sheet-x { grid-area: x; align-self: start; width: 40px; height: 40px; border: 0; background: none; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.sheet-x:hover { background: var(--paper-2); }
@media (min-width: 600px) {
  .sheet { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "txt btn x"; padding: 12px 10px 12px 18px; }
  .sheet .btn { margin-right: 0; }
  .sheet-x { align-self: center; }
}

/* phone landscape: the photo fits the window and stays in view while the floor list scrolls */
@media (max-width: 899px) and (orientation: landscape) and (max-height: 520px) {
  .bv-stage {
    min-height: 0; height: calc(100dvh - var(--hdr) - 16px); align-self: start;
    position: sticky; top: calc(var(--hdr) + 8px);
  }
}

@media (min-width: 900px) {
  .bv {
    grid-template-columns: minmax(0, 1fr) clamp(330px, 29vw, 420px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "stage intro" "stage rail" "stage hint";
    gap: 0;
    padding: 0;
    height: calc(100dvh - var(--hdr));
    min-height: 600px;
  }
  .bv-stage { min-height: 0; border-radius: 0; }
  .bv-backdrop {
    display: block; position: absolute; inset: -40px;
    background: center / cover no-repeat;
    filter: blur(28px) brightness(.42) saturate(1.15);
    transform: translateZ(0);
    opacity: 0; transition: opacity .9s var(--ease);
  }
  .bv-backdrop.is-on { opacity: 1; }
  .bv-backdrop--night { filter: blur(28px) brightness(.62) saturate(1.2); }
  .dn { left: 20px; top: 18px; }
  .dn button { min-height: 40px; padding: 0 16px 0 13px; font-size: 12px; }
  .bv-back { left: 20px; top: 18px; }
  .bv-svg { box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
  .bv-stage .bv-views { position: absolute; left: 20px; top: 18px; z-index: 4; }
  .bv-stage .seg { background: rgba(36, 32, 30, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .bv-stage .seg button { color: rgba(255, 250, 243, .82); }
  .bv-stage .seg button:hover { color: #fff; }
  .bv-stage .seg button[aria-checked="true"] { background: var(--card); color: var(--ink); }
  .bv-intro { padding: 28px var(--gutter) 14px; gap: 12px; }
  .bv-title { font-size: 44px; }
  .bv-kinds {
    display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 18px;
    margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2);
  }
  .bv-kinds dt { color: var(--ink-3); }
  .bv-kinds dd { margin: 0; font-variant-numeric: tabular-nums; }
  .bv-rail { padding: 0 calc(var(--gutter) - 10px); overflow: auto; min-height: 0; }
  .rail { gap: 1px; grid-auto-rows: minmax(44px, 1fr); }
  .bv-hint { padding: 12px var(--gutter) 18px; border-top: 1px solid var(--line); }
}
/* short desktop screens: a tighter intro so the 13 rail rows (44 px each) stay in view */
@media (min-width: 900px) and (max-height: 940px) {
  .bv-intro { padding-top: 18px; padding-bottom: 10px; gap: 6px; }
  .bv-title { font-size: 36px; }
  .bv-kinds { display: none; }
}
/* laptops (1366 × 768 and lower): tighter rows and hint, so Kati −2 is in view without scrolling */
@media (min-width: 900px) and (max-height: 820px) {
  .rail { grid-auto-rows: minmax(38px, 1fr); }
  .rail li.is-under-first { padding-top: 2px; }
  .bv-hint { padding-top: 8px; padding-bottom: 10px; font-size: 13px; }
  .bv-title { font-size: 32px; }
}
@media (min-width: 900px) and (max-height: 740px) {
  .bv-hint { display: none; }
}

/* ---------- 6. Floor view ------------------------------------------------------------- */
.fv { display: grid; gap: 14px; padding: 8px var(--gutter) 28px; }
.fv-head { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "back back" "tile title" "nav nav"; gap: 6px 14px; align-items: center; }
.fv-head .backlink { grid-area: back; justify-self: start; }
.fv-head .tile { grid-area: tile; }
.tile {
  width: 58px; height: 68px; display: grid; place-items: end center; padding-bottom: 10px;
  background: var(--brick); color: #fff; border-radius: 999px 999px 8px 8px;  /* the arcade arch */
  font: 450 28px/1 var(--ff-display); font-variation-settings: "opsz" 72; font-variant-numeric: lining-nums;
}
.tile--lg { width: 72px; height: 86px; font-size: 34px; padding-bottom: 12px; }
.fv-title { grid-area: title; display: grid; gap: 2px; min-width: 0; }
.fv-title h1 { font: 450 clamp(28px, 7vw, 40px)/1.05 var(--ff-display); font-variation-settings: "opsz" 144; }
.fv-title p { color: var(--ink-2); font-size: 14.5px; }
.fv-h1-av { font: 650 .5em/1.2 var(--ff-ui); color: var(--avail); white-space: nowrap; letter-spacing: 0; }
.fv-h1-av.is-soldout { color: var(--sold); }
.fv-nav { grid-area: nav; display: flex; gap: 8px; flex-wrap: wrap; }
.fv-nav .btn { flex: 1 1 auto; padding: 0 12px; }
.fv-nav .btn .ic { width: 18px; height: 18px; }

.fv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.fv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); margin-left: auto; }
.fv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 16px; height: 12px; border-radius: 3px; display: inline-block; }
.sw--available { background: var(--avail-fill); border: 1.5px solid var(--avail-stroke); }
.sw--sold { border: 1.5px solid #a99f94; background: repeating-linear-gradient(45deg, #e2dcd5 0 3px, #b9afa4 3px 4.5px); }
.sw--sel { border: 2px solid var(--brick); background: rgba(168, 71, 58, .22); }

.fv-body { display: grid; gap: 14px; }
.fv > *, .fv-body > * { min-width: 0; }
.planwrap { position: relative; display: grid; gap: 8px; }
.planbox {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l);
  /* single column below 1024px: height follows the drawing's proportions */
  height: clamp(210px, calc((100vw - 2 * var(--gutter)) / var(--plan-ar, 1.8) + 16px), 72vh);
  overflow: hidden;
}
.plan-stage { position: absolute; inset: 8px; }
.plan-stage > svg { width: 100%; height: 100%; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.plan-stage.is-zoomed > svg { touch-action: none; cursor: grab; }
.plan-stage.is-dragging > svg { cursor: grabbing; }
.plan-ctrls { display: flex; justify-content: flex-end; gap: 6px; z-index: 2; }
.plan-ctrls .iconbtn { width: 44px; height: 44px; }
.planwrap.is-expanded { position: fixed; inset: 0; z-index: 70; background: var(--card); display: block; }
.planwrap.is-expanded .planbox { position: absolute; inset: 0; border: 0; border-radius: 0; height: auto; }
.planwrap.is-expanded .plan-ctrls .iconbtn, .plan-close { box-shadow: 0 2px 8px rgba(42,38,36,.16); }
@media (min-width: 1024px) {
  .planwrap { grid-area: plan; display: block; min-height: 0; }
  .planbox { position: absolute; inset: 0; height: auto; }
  /* a row in the top-right corner: sits in the empty band above long drawings and keeps
     clear of the drawing's own north arrow (bottom-right) */
  .plan-ctrls { position: absolute; right: 10px; top: 10px; display: flex; }
  .plan-ctrls .iconbtn { width: 42px; height: 42px; box-shadow: 0 1px 3px rgba(42,38,36,.12); }
}
/* Full screen: the zoom buttons get a band of their own, so they never cover the drawing or
   the close button. Portrait: a row along the bottom (a long plan is turned and limited by the
   width, so the band costs no size); a unit card at the bottom takes that band while it is open
   (.has-card, set by floor.js). Landscape: a column on the right, the card keeps clear of it. */
.planwrap.is-expanded .plan-ctrls {
  position: absolute; top: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 6px; align-items: flex-end;
}
@media (orientation: portrait) {
  .planwrap.is-expanded .plan-stage { inset: 12px 12px calc(68px + env(safe-area-inset-bottom)); }
  .planwrap.is-expanded .plan-ctrls { flex-direction: row; }
  /* a unit card at the bottom takes the buttons' band while it is open */
  .planwrap.is-expanded.has-card .plan-ctrls { visibility: hidden; }
}
@media (orientation: landscape) {
  .planwrap.is-expanded .plan-stage { inset: 12px 68px calc(12px + env(safe-area-inset-bottom)) 12px; }
  .planwrap.is-expanded .plan-ctrls { flex-direction: column; }
  .fv.is-full .usheet { right: 68px; }
}
/* the card moves to the top when the unit it describes would be under it (full screen) */
.usheet.at-top { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }
.fv.is-full .usheet.at-top { right: 68px; }
.plan-north {
  position: absolute; left: 12px; top: 10px; z-index: 2; width: 34px; color: var(--ink-2);
  pointer-events: none; display: grid; justify-items: center; gap: 1px;
}
.plan-north .ic { width: 30px; height: 30px; }
.north-v { font: 700 11px/1 var(--ff-ui); color: var(--ink-3); }
.plan-close { position: absolute; right: 12px; top: 12px; z-index: 3; display: none; }
.planwrap.is-expanded .plan-close { display: inline-grid; }
.plan-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 20px; color: var(--ink-2); }
.plan-tip {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none;
  background: var(--ink); color: var(--paper); border-radius: var(--r-m); padding: 9px 12px;
  font-size: 13.5px; line-height: 1.35; max-width: 260px;
  box-shadow: 0 10px 30px rgba(20,16,14,.25);
  opacity: 0; transition: opacity .12s;
}
.plan-tip.is-on { opacity: 1; }
.plan-tip b { font: 500 16px/1.2 var(--ff-display); display: block; }
.plan-tip .tip-row { color: rgba(246, 242, 236, .82); }
.plan-tip .tip-st-available { color: #9fd8b3; font-weight: 700; }
.plan-tip .tip-st-sold { color: #d6cec6; font-weight: 700; }

/* plan svg content (inline SVG from plans/level_*.svg) */
.plan svg #base, .plan svg #labels, .plan svg .plan-labels, .plan svg .plan-hi { pointer-events: none; }
.plan svg #labels text { fill: var(--ink-3); font-family: var(--ff-ui); font-weight: 600; }
.plan .unit { fill: rgba(0, 0, 0, 0); stroke: none; cursor: pointer; transition: fill .14s, opacity .2s; }
.plan .unit.is-available { fill: var(--avail-fill); stroke: var(--avail-stroke); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.plan .unit.is-sold { fill: var(--hatch, var(--sold-fill)); stroke: #a69c91; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan .unit.is-reserved { fill: rgba(214, 160, 60, .25); stroke: #b5832b; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.plan .unit.is-unknown { fill: rgba(150, 140, 130, .12); stroke: #b8aea3; stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan .unit.is-hover, .plan .unit.is-selected { fill: rgba(168, 71, 58, .3); }
.plan .unit.is-dim { opacity: .22; }
.plan .unit.is-dim.is-hover { opacity: .6; }
.plan-hi path { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: 0; }
.plan-hi .hi-halo { stroke: rgba(255, 253, 249, .95); stroke-width: 6; }
.plan-hi .hi-line { stroke: var(--brick); stroke-width: 2.6; }
.plan-hi .is-on { opacity: 1; }
.ulabel { text-anchor: middle; paint-order: stroke; stroke: rgba(255, 253, 249, .9); stroke-linejoin: round; pointer-events: none; }
/* numbers in the UI face: Fraunces' flat-topped 3 read as 5 and its 1 as I at small sizes */
.ulabel .ul-num { font-family: var(--ff-ui); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; fill: #1f3d2d; }
.ulabel .ul-sub { font-family: var(--ff-ui); font-weight: 700; fill: #2c5a40; }
.ulabel.is-sold .ul-num, .ulabel.is-sold .ul-sub { fill: #6a625b; }
.ulabel.is-dim { opacity: .3; }
.ulabel.is-hl .ul-num, .ulabel.is-hl .ul-sub { fill: var(--brick-deep); }
/* plan -> 3D: the unit lifts as a white sheet, the rest of the floor steps back, then the
   furnished top view (a fixed layer, .fly3d) fades in over it */
.planbox.is-flying .plan-stage { pointer-events: none; }
.planbox.is-flying .plan svg #base { opacity: .2; transition: opacity .55s var(--ease); }
.planbox.is-flying .plan .unit { transition: opacity .45s var(--ease), fill .45s var(--ease); }
.planbox.is-flying .plan .unit:not(.is-fly) { opacity: .1; }
.planbox.is-flying .plan .unit.is-sold:not(.is-fly) { fill: var(--sold-fill); }   /* no hatch tiles to redraw while zooming */
.planbox.is-flying .plan .unit.is-fly { fill: #fffdf9; stroke: var(--brick); opacity: 1; }   /* also when a filter dims it */
.planbox.is-flying .plan .plan-labels, .planbox.is-flying .plan svg #labels { opacity: 0; transition: opacity .2s; }
.planbox.is-flying .plan-hi .hi-halo { opacity: 0; }
.planbox.is-revealing .plan-hi path, .planbox.is-revealing .plan .unit.is-fly { opacity: 0; transition: opacity .5s var(--ease) .1s; }
.planbox.is-flying .plan-north, .planbox.is-flying + .plan-ctrls { opacity: 0; transition: opacity .2s; }
.planbox.is-flying + .plan-ctrls, .planbox.is-flying ~ .plan-close { pointer-events: none; }
.planbox.is-flying ~ .plan-close { opacity: 0; transition: opacity .2s; }
.planbox.is-waiting::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; z-index: 5;
  border-radius: 50%; border: 2.5px solid rgba(42, 38, 36, .15); border-top-color: var(--brick); animation: spin .8s linear infinite;
}
.fly3d { position: fixed; inset: 0; z-index: 85; pointer-events: none; overflow: hidden; }
.fly3d.is-under-hdr { z-index: 39; }   /* the sticky header (40) stays on top; full-screen plan: 85 */
.fly3d-img {
  position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  will-change: transform, opacity; -webkit-user-select: none; user-select: none;
}
/* units with a furnished 3D view: list chip, legend, tooltip line */
.chip--3d { background: var(--ink); border-color: var(--ink); color: #fffaf3; font-weight: 750; letter-spacing: .04em; padding: 2px 8px 2px 6px; gap: 3px; }
.chip--3d .ic { width: 14px; height: 14px; }
.urow-name .chip--3d { font-family: var(--ff-ui); }
.fv-legend .lg-3d .chip { font-style: normal; font-size: 11.5px; }
.plan-tip .tip-3d .ic { display: inline-block; vertical-align: -3px; margin: 0 4px 0 2px; width: 15px; height: 15px; }
.plan--mini .unit { cursor: default; }
.plan--mini .unit.is-available, .plan--mini .unit.is-sold, .plan--mini .unit.is-unknown, .plan--mini .unit.is-reserved {
  fill: rgba(140, 128, 116, .08); stroke: #c3b8ac; stroke-width: 1;
}
.plan--mini .unit.is-target { fill: rgba(168, 71, 58, .55); stroke: var(--brick); stroke-width: 2.4; }

/* unit list */
.fv-list { position: relative; display: grid; gap: 10px; align-content: start; min-height: 0; }
.fv-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fv-list-head h2 { font: 500 21px/1.2 var(--ff-display); }
.fv-count { font-size: 13px; color: var(--ink-3); }
.ulist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.urow {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding: 12px 14px; min-height: 64px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m);
  text-decoration: none; color: var(--ink);
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.urow:hover, .urow.is-hover { border-color: var(--brick); }
.urow.is-selected { background: var(--brick-tint); border-color: var(--brick); }
.urow-name { font: 500 18px/1.2 var(--ff-display); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.urow-name .chip { font-family: var(--ff-ui); }
.urow-meta { grid-column: 1; font-size: 13.5px; color: var(--ink-2); display: flex; gap: 4px 12px; flex-wrap: wrap; }
.urow .pill { grid-column: 2; grid-row: 1 / span 2; }
.urow.is-sold .urow-name { color: var(--ink-2); }
.ulist-empty { padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--r-m); color: var(--ink-2); display: grid; gap: 10px; justify-items: start; }

/* touch preview card on the plan; above the full-screen plan (z-index 70) as well */
.usheet { z-index: 80; }
.usheet .sheet-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

@media (min-width: 1024px) {
  .fv {
    height: calc(100dvh - var(--hdr)); min-height: 620px;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 27vw, 400px);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "head head" "tools tools" "plan list";
    gap: 14px 22px; padding: 14px var(--gutter) 22px;
  }
  .fv-head { grid-area: head; grid-template-columns: auto auto 1fr auto; grid-template-areas: "back tile title nav"; }
  .fv-head .backlink { margin-right: 6px; }
  .fv-nav { flex-wrap: nowrap; }
  .fv-nav .btn { flex: none; }
  .fv-tools { grid-area: tools; }
  .fv-body { display: contents; }
  .fv-list { grid-area: list; overflow: auto; padding-right: 4px; margin-right: -4px; }
  .fv-list-head { position: sticky; top: 0; background: var(--paper); padding-bottom: 6px; z-index: 1; }
}

/* ---------- 7. Unit view -------------------------------------------------------------- */
.uv {
  display: grid; gap: 22px;
  padding: 8px var(--gutter) 36px;
  grid-template-areas: "top" "info" "fig" "mini" "more";
  max-width: 1320px; margin: 0 auto; width: 100%;
}
.uv-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13.5px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { opacity: .6; }
.uv-pn { display: flex; gap: 6px; }
.uv-info { grid-area: info; display: grid; gap: 18px; align-content: start; }
.uv-titlebar { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.uv-titlebar h1 { font: 450 clamp(30px, 8vw, 46px)/1.02 var(--ff-display); font-variation-settings: "opsz" 144; }
.uv-sub { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.uv-album { font-size: 13.5px; color: var(--ink-3); }
.areas {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
.areas > div { padding: 12px 10px 11px; display: grid; gap: 4px; align-content: start; }
.areas > div + div { border-left: 1px solid var(--line); }
.areas dt { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; }
@media (min-width: 420px) {
  .areas > div { padding: 14px 14px 13px; }
  .areas dt { font-size: 11.5px; letter-spacing: .08em; }
}
.areas dd { margin: 0; font: 450 clamp(20px, 5.4vw, 27px)/1.1 var(--ff-display); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.areas dd small { font: 600 13px var(--ff-ui); color: var(--ink-3); margin-left: 2px; }
.areas .is-total { background: #f7efe9; }
.cta { display: grid; gap: 8px; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cta-note { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.uv-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.notes { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-m); background: #f3ede4; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.notes h2 { font: 700 13px/1.3 var(--ff-ui); color: var(--ink); }
.notes ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.feature { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.feature .ic { color: var(--brick); margin-top: 2px; }
.disclaimer { font-size: 13px; color: var(--ink-3); }

.uv-fig { grid-area: fig; display: grid; gap: 8px; align-content: start; }
.figbox {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
  display: grid; place-items: center; min-height: 240px; cursor: zoom-in; padding: 0;
  width: 100%;
}
.figbox img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.figbox .fig-zoom { position: absolute; right: 10px; bottom: 10px; pointer-events: none; }
.figbox.is-missing { cursor: default; aspect-ratio: 4 / 3; background: var(--paper-2); border-style: dashed; }
.fig-missing { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 24px; color: var(--ink-2); font-size: 14.5px; max-width: 360px; }
.fig-cap { font-size: 13px; color: var(--ink-3); }

.uv-mini { grid-area: mini; display: grid; gap: 8px; align-content: start; }
.uv-mini h2, .uv-more h2 { font: 500 21px/1.2 var(--ff-display); }
.minilink { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.minibox {
  display: block; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l);
  aspect-ratio: 2.1 / 1; overflow: hidden;
}
.minibox .plan { position: absolute; inset: 10px; }
.minilink:hover .minibox { border-color: var(--brick); }
.minibox svg { width: 100%; height: 100%; }
.minibox-cta { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-size: 14px; font-weight: 650; color: var(--brick-deep); }
.minilink:hover .minibox-cta { text-decoration: underline; }

.uv-more { grid-area: more; display: grid; gap: 12px; }
.uv-more p { color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ucard {
  display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-m); background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .14s;
}
.ucard:hover { border-color: var(--brick); }
.ucard-name { font: 500 19px/1.2 var(--ff-display); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ucard-name .chip { font-family: var(--ff-ui); }
.ucard-meta { font-size: 13.5px; color: var(--ink-2); }

/* ---- 2D / 3D tabs + the 3D gallery ---------------------------------------------------- */
.uv-fig2d { display: grid; gap: 8px; align-content: start; }
.uv-fig.has-tabs { gap: 12px; }
.uv-tabs { justify-self: start; }
.uv-tabs .uv-tab { display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(42,38,36,.12); }
.uv-pan { min-width: 0; }

.g3d { display: grid; gap: 10px; }
.g3d-stage {
  position: relative; overflow: hidden; width: 100%; aspect-ratio: 3 / 2;
  background: #f4f1ec;   /* the renders' own background: letterboxing is invisible */
  border: 1px solid var(--line); border-radius: var(--r-l);
  touch-action: pan-y; cursor: zoom-in; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.g3d-stage.is-dragging { cursor: grabbing; }
.g3d-stage:focus-visible { border-radius: var(--r-l); }
.g3d-fs-stage:focus-visible { box-shadow: none; }
.g3d-img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: contain; -webkit-user-drag: none; pointer-events: none;
}
.g3d-badge {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; pointer-events: none;
  font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; color: var(--ink-2);
  background: rgba(255, 253, 249, .86); border-radius: 999px; padding: 3px 8px;
  box-shadow: 0 1px 3px rgba(42, 38, 36, .10);
}
/* the furnished top view masked to the unit and its walls; the mask is fitted like the image (contain) */
.g3d-img.is-masked {
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* a render that did not load: a short message instead of a broken-image icon */
.g3d-img.is-missing { visibility: hidden; }
.g3d-stage.has-missing::after {
  content: "Kjo pamje nuk u ngarkua."; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-3); font-size: 14px; pointer-events: none;
}
.g3d-count {
  position: absolute; left: 10px; top: 10px; z-index: 2; pointer-events: none;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fffaf3;
  background: rgba(42, 38, 36, .66); border-radius: 999px; padding: 4px 9px;
}
.g3d-full { position: absolute; right: 10px; top: 10px; z-index: 2; box-shadow: 0 2px 8px rgba(42,38,36,.14); }
.g3d-arrow {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(255, 253, 249, .92); color: var(--ink); box-shadow: 0 2px 10px rgba(42, 38, 36, .18);
  transition: background .15s, transform .15s;
}
.g3d-arrow:hover { background: #fff; }
.g3d-arrow:active { transform: scale(.94); }
.g3d-arrow.is-prev { left: 10px; }
.g3d-arrow.is-next { right: 10px; }
/* one column per view (3 pictures, 4 with the 360° walkthrough) */
.g3d-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.g3d-thumb {
  display: grid; gap: 4px; padding: 3px 3px 6px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink-2); font-size: 12.5px; font-weight: 650; text-align: center;
  transition: border-color .15s, color .15s;
}
.g3d-thumb-img { position: relative; display: block; }
.g3d-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 9px; background: #f4f1ec; }
/* the 360° thumbnail: a round "turn around" mark over the picture */
.g3d-thumb-360 {
  position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  display: grid; place-items: center; border-radius: 50%; color: #fffaf3; background: rgba(42, 38, 36, .62);
  box-shadow: 0 1px 6px rgba(42, 38, 36, .25);
}
.g3d-thumb-360 .ic { width: 20px; height: 20px; }
.g3d-thumb:hover { border-color: var(--ink-3); color: var(--ink); }
.g3d-thumb[aria-current="true"] { border-color: var(--brick); color: var(--brick-deep); }
.g3d-cap { font-size: 13px; color: var(--ink-3); }
.g3d-cap b { color: var(--ink); font-weight: 650; }
.g3d-same { font-size: 13px; color: var(--ink-3); }
.g3d-same a { color: var(--ink-2); font-weight: 650; }

/* "Shiko ne 3D": a card with a preview, beside the areas */
.v3d {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; padding: 8px 14px 8px 8px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--card); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.v3d:hover { border-color: var(--brick); box-shadow: 0 8px 24px rgba(42, 38, 36, .08); }
.v3d:active { transform: translateY(1px); }
.v3d-thumb { position: relative; width: 96px; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: #f4f1ec; }
.v3d-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v3d-thumb b {
  position: absolute; left: 6px; top: 6px; font: 800 10.5px/1 var(--ff-ui); letter-spacing: .06em;
  color: #fffaf3; background: var(--ink); border-radius: 6px; padding: 4px 5px;
}
.v3d-txt { display: grid; gap: 2px; min-width: 0; }
.v3d-title { font: 500 20px/1.15 var(--ff-display); }
.v3d-sub { font-size: 13px; color: var(--ink-3); }
.v3d-go { color: var(--brick); }

/* opened on the 3D tab: on phones the gallery comes before the data */
@media (max-width: 959px) {
  .uv.uv--3d-first { grid-template-areas: "top" "fig" "info" "mini" "more"; }
  .g3d-stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 520px) {
  .g3d-badge { left: 8px; bottom: 8px; font-size: 10.5px; padding: 2px 7px; }
  .g3d-count { left: 8px; top: 8px; }
  .g3d-full { right: 8px; top: 8px; }
  .g3d-arrow { width: 40px; height: 40px; margin-top: -20px; }
  .g3d-arrow.is-prev { left: 6px; }
  .g3d-arrow.is-next { right: 6px; }
  .t360-pill { left: 8px; top: 8px; font-size: 12.5px; }
  .t360-gyro { right: 8px; top: 58px; }
  .t360-plan { right: 8px; bottom: 8px; }
  .t360-hint { font-size: 12.5px; padding: 8px 12px; }
  .t360-chip { font-size: 13px; padding-right: 12px; }
  .t360-chip img { width: 40px; height: 28px; }
}
/* arriving with the flying top view: the page only fades, so the target does not move */
.view.is-landing { animation: viewFade .4s var(--ease) backwards; }
@keyframes viewFade { from { opacity: 0; } }

/* the 3D gallery in full screen */
.g3d-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; background: #f4f1ec; }
.g3d-dlg::backdrop { background: #f4f1ec; }
.g3d-fs-top {
  position: absolute; left: 0; right: 0; top: 0; height: 60px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 12px 0 18px; padding-top: env(safe-area-inset-top);
}
.g3d-fs-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.g3d-fs-title b { font: 500 20px/1.2 var(--ff-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g3d-fs-count { font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.g3d-fs-stage.g3d-stage {
  position: absolute; inset: 60px 0 calc(56px + env(safe-area-inset-bottom)); width: auto; aspect-ratio: auto;
  border: 0; border-radius: 0; background: transparent; cursor: grab;
}
.g3d-fs-stage .g3d-arrow.is-prev { left: 14px; }
.g3d-fs-stage .g3d-arrow.is-next { right: 14px; }
.g3d-fs-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; min-height: 56px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); text-align: center;
}
.g3d-fs-label { font-weight: 700; font-size: 14.5px; }
.g3d-fs-note { font-size: 13px; color: var(--ink-3); }

/* ---- 360° walkthrough (tour360.js) inside the gallery ----------------------------------------
   The viewer sits in a slide of the stage; on the 360° item the stage gives up its swipe, arrows,
   counter and zoom cursor. Pannellum's stylesheet loads later than this one, so its classes are
   addressed through .t360 (higher specificity). */
.g3d-slide { position: absolute; inset: 0; }
.g3d-stage.is-pano { cursor: auto; overflow: clip; background: #e9e4dc; }
.g3d-stage.is-pano .g3d-arrow, .g3d-stage.is-pano .g3d-count { display: none; }
.g3d:not(.is-pano) .g3d-chips, .g3d:has(.t360[data-state="error"]) .g3d-chips { display: none; }

.t360 {
  position: absolute; inset: 0; overflow: hidden; overflow: clip; background: #e9e4dc; color: var(--ink);
  touch-action: pan-y;               /* inline: a vertical swipe scrolls the page */
  -webkit-tap-highlight-color: transparent;
  container-type: size;              /* the mini-plan is sized on the view (cqw / cqh) */
}
.t360.is-full { touch-action: none; }
.t360-view { position: absolute; inset: 0; }
.t360 .pnlm-container { background: #e9e4dc; font-family: var(--ff-ui); overflow: hidden; overflow: clip; }
.t360 .pnlm-container:focus-visible { box-shadow: inset 0 0 0 3px rgba(168, 71, 58, .7); border-radius: 0; }
/* Pannellum's own boxes and controls: replaced by ours */
.t360 .pnlm-load-box, .t360 .pnlm-error-msg, .t360 .pnlm-controls-container, .t360 .pnlm-panorama-info,
.t360 .pnlm-compass { display: none !important; }
.t360 .pnlm-about-msg { font-family: var(--ff-ui); }

/* hotspots: round arrow buttons, the room's name on hover / focus / when the arrow is near the centre */
.t360 .t360-hs-base { width: 44px; height: 44px; cursor: pointer; }
.t360 .t360-hs {
  box-sizing: border-box; position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; margin: 0; border: 2px solid #fff; border-radius: 50%;
  background: rgba(168, 71, 58, .94); color: #fff; cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 14, 12, .38); transition: transform .15s var(--ease), background .15s;
  transform: translateX(var(--dx, 0px));   /* arrows that would cover each other step aside (tour360.js) */
}
.t360 .t360-hs .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.t360 .t360-hs:hover { transform: translateX(var(--dx, 0px)) scale(1.1); background: var(--brick-deep); }
.t360 .t360-hs:active { transform: translateX(var(--dx, 0px)) scale(.95); }
.t360 .t360-hs:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brick-deep); border-radius: 50%; }
.t360 .t360-hs-label {
  box-sizing: border-box; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  white-space: nowrap; padding: 6px 11px; border-radius: 999px;
  font: 700 13px/1.15 var(--ff-ui); color: #fffaf3; background: rgba(42, 38, 36, .88);
  box-shadow: 0 2px 10px rgba(20, 14, 12, .25);
  opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s var(--ease);
}
.t360 .t360-hs:hover .t360-hs-label, .t360 .t360-hs:focus-visible .t360-hs-label, .t360 .t360-hs.is-near .t360-hs-label {
  opacity: 1; transform: translate(-50%, 0);
}

/* the room's name (top left; it replaces the counter) */
.t360-pill {
  position: absolute; left: 10px; top: 10px; z-index: 3; max-width: calc(100% - 140px);
  display: inline-flex; align-items: center; gap: 6px; pointer-events: none;
  font-size: 13px; font-weight: 700; line-height: 1.2; color: #fffaf3;
  background: rgba(42, 38, 36, .7); border-radius: 999px; padding: 5px 11px 5px 8px;
}
.t360-pill-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t360-pill-spin { display: none; width: 12px; height: 12px; border-width: 2px; border-color: rgba(255, 250, 243, .35); border-top-color: #fffaf3; }
.t360.is-switching .t360-pill-spin { display: block; }
.t360[data-state="loading"] .t360-pill, .t360[data-state="error"] .t360-pill { visibility: hidden; }

/* first moments: a short hint in the middle, gone at the first touch */
.t360-hint {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px; max-width: min(84%, 420px); pointer-events: none;
  padding: 9px 14px; border-radius: 14px; text-align: left;
  font-size: 13.5px; font-weight: 650; line-height: 1.35; color: #fffaf3; background: rgba(42, 38, 36, .66);
  animation: t360In .35s var(--ease) backwards .2s; transition: opacity .35s;
}
.t360-hint.is-gone { opacity: 0; }
@keyframes t360In { from { opacity: 0; transform: translate(-50%, -40%); } }

/* loading: the walkthrough's picture, softened, with a spinner */
.t360-load { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: #e9e4dc; overflow: hidden; }
.t360-poster { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); max-width: none; object-fit: cover; filter: blur(8px) saturate(.9); opacity: .8; }
.t360-box {
  position: relative; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 999px; background: rgba(255, 253, 249, .94); color: var(--ink-2);
  font-size: 14px; font-weight: 600; box-shadow: 0 4px 18px rgba(42, 38, 36, .16);
}
.t360-msg { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: rgba(233, 228, 220, .72); }
.t360-box--msg { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 10px; border-radius: var(--r-l); padding: 14px 16px; max-width: 420px; }
.t360-box--msg > .ic { color: var(--brick); margin-top: 1px; }
.t360-box--msg p { display: grid; gap: 2px; font-size: 13.5px; color: var(--ink-2); }
.t360-box--msg b { font-size: 15px; color: var(--ink); }
.t360-box--msg .btn { grid-column: 2; justify-self: start; margin-top: 8px; min-height: 40px; }

/* gyroscope (phones over https): under the full-screen button */
.t360-gyro { position: absolute; right: 10px; top: 62px; z-index: 3; box-shadow: 0 2px 8px rgba(42, 38, 36, .14); }
.t360-gyro.is-on { background: var(--brick); border-color: var(--brick); color: #fff; }

/* mini-plan: where you stand and where you look */
.t360-plan { position: absolute; right: 10px; bottom: 10px; z-index: 3; }
.t360-plan-card {
  width: clamp(112px, 24vw, 196px);
  width: clamp(104px, min(28cqw, 40cqh), 196px);
  padding: 6px; border-radius: 14px;
  background: rgba(255, 253, 249, .92); box-shadow: 0 6px 22px rgba(42, 38, 36, .2);
}
.t360-plan[data-open="false"] .t360-plan-card { display: none; }
.t360-plan-box { position: relative; width: 100%; container-type: inline-size; }
/* clipped: the view cone (and, without top.json, the unmasked top view) must stay on the card */
.t360-plan-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.t360-cone { pointer-events: none; }
/* a 26 px target; the dot itself grows with the card (8-13 px) */
.t360-dot { --d: 10px; --d: clamp(8px, 6.5cqw, 13px); position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; cursor: pointer; }
.t360-dot::before {
  content: ""; position: absolute; inset: calc(13px - var(--d) / 2); border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px var(--brick), 0 1px 3px rgba(20, 14, 12, .3); transition: transform .15s;
}
.t360-dot:hover::before { transform: scale(1.3); }
.t360-dot.is-on { z-index: 1; }
.t360-dot.is-on::before { inset: calc(12px - var(--d) / 2); background: var(--brick); box-shadow: 0 0 0 2.5px #fff, 0 1px 4px rgba(20, 14, 12, .45); }
.t360-plan-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--card); color: var(--ink);
  box-shadow: 0 2px 8px rgba(42, 38, 36, .16);
}
.t360-plan-btn .ic + .ic { display: none; }
.t360-plan[data-open="true"] .t360-plan-btn {
  position: absolute; top: -10px; left: -10px; width: 30px; height: 30px; border-color: var(--line);
}
.t360-plan[data-open="true"] .t360-plan-btn .ic { display: none; }
.t360-plan[data-open="true"] .t360-plan-btn .ic + .ic { display: block; width: 16px; height: 16px; }
.t360-plan-btn:hover { border-color: var(--ink-3); }

/* room chips (under the stage; in the full screen at the bottom) */
.t360-chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  padding: 2px; margin: -2px;
}
.t360-chips::-webkit-scrollbar { display: none; }
.t360-chips:empty { display: none; }
.t360-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2);
  font-size: 13.5px; font-weight: 650; white-space: nowrap; transition: border-color .15s, background .15s, color .15s;
}
.t360-chip img { width: 46px; height: 32px; border-radius: 999px; object-fit: cover; background: #e9e4dc; }
.t360-chip:hover { border-color: var(--ink-3); color: var(--ink); }
.t360-chip[aria-current="true"] { border-color: var(--brick); background: var(--brick-tint); color: var(--brick-deep); }

/* full screen on the 360° view: the panorama edge to edge, the bars float over it */
.g3d-dlg.is-pano { background: #1d1a18; }
.g3d-dlg.is-pano::backdrop { background: #1d1a18; }
.g3d-dlg.is-pano .g3d-fs-stage.g3d-stage { inset: 0; background: #1d1a18; }
.g3d-dlg.is-pano .g3d-fs-top, .g3d-dlg.is-pano .g3d-fs-bottom {
  background: rgba(246, 242, 236, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.g3d-dlg.is-pano .g3d-fs-top { border-bottom: 1px solid rgba(201, 189, 176, .6); }
.g3d-dlg.is-pano .g3d-fs-bottom { border-top: 1px solid rgba(201, 189, 176, .6); padding-top: 10px; }
.g3d-dlg.is-pano .g3d-fs-label { display: none; }
.g3d-dlg:not(.is-pano) .g3d-fs-chips { display: none; }
.g3d-fs-chips { flex: 1 0 100%; justify-content: safe center; }
.t360.is-full .t360-pill { top: calc(72px + env(safe-area-inset-top)); left: 14px; }
.t360.is-full .t360-gyro { right: auto; left: 14px; top: calc(112px + env(safe-area-inset-top)); }
.t360.is-full .t360-plan { top: calc(78px + env(safe-area-inset-top)); bottom: auto; right: 14px; }
.t360.is-full .t360-plan-card { width: clamp(124px, 22vw, 260px); width: clamp(116px, min(26cqw, 34cqh), 260px); }
.t360.is-full .t360-hint { top: 46%; }

/* "Shiko ne 3D" and "Hyni brenda · 360°": one under the other, side by side only on a wide column */
.v3d-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 8px; }
.v3d--360 .v3d-thumb b { background: var(--brick); }

@media (min-width: 960px) {
  .uv {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr);
    grid-template-areas: "top top" "fig info" "fig mini" "more more";
    column-gap: 40px; padding-top: 14px;
  }
  .uv-fig { position: sticky; top: calc(var(--hdr) + 16px); }
  .figbox img { max-height: calc(100dvh - var(--hdr) - 120px); }
  /* with the tabs above, the figure keeps fitting the window */
  .uv-fig.has-tabs .figbox img { max-height: calc(100dvh - var(--hdr) - 176px); }
  .uv-fig.has-tabs .g3d-stage:not(.g3d-fs-stage) { max-height: calc(100dvh - var(--hdr) - 300px); min-height: 260px; }
  .g3d-thumbs { grid-auto-columns: minmax(0, 148px); justify-content: start; }
  /* the 360° view: the room chips take a row of their own under the stage */
  .uv-fig.has-tabs .g3d.is-pano .g3d-stage:not(.g3d-fs-stage) { max-height: calc(100dvh - var(--hdr) - 356px); }
  /* wide screens: a larger figure / 3D gallery instead of empty margins */
  @media (min-width: 1600px) { .uv { max-width: 1560px; } }
  /* the eye-level view (16:9) fills the 3:2 stage instead of showing bars (full screen keeps all of it) */
  .g3d-stage:not(.g3d-fs-stage) .g3d-img[data-key="hero"] { object-fit: cover; }
}

/* image lightbox */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; background: #f9f7f3; }
.lightbox .lb-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.lightbox .lb-stage.is-dragging { cursor: grabbing; }
.lightbox img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.lightbox .lb-ctrls { position: absolute; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.lightbox .lb-close { position: absolute; right: 14px; top: 14px; }
.lightbox .lb-title { position: absolute; left: 16px; top: 18px; font: 500 20px var(--ff-display); background: rgba(249,247,243,.9); padding: 4px 10px; border-radius: 8px; }

/* ---------- 8. Notes page / misc -------------------------------------------------------- */
.page { max-width: 860px; margin: 0 auto; padding: 18px var(--gutter) 40px; display: grid; gap: 18px; width: 100%; }
.page h1 { font: 450 clamp(28px, 7vw, 42px)/1.05 var(--ff-display); }
.page .lead { color: var(--ink-2); max-width: 64ch; }
.issue { padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); display: grid; gap: 8px; }
.issue-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.issue h2 { font: 500 19px/1.25 var(--ff-display); }
.issue p { color: var(--ink-2); font-size: 14.5px; max-width: 70ch; }
.issue .units { display: flex; flex-wrap: wrap; gap: 8px; }
.issue-unit { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; min-height: 32px; }
.issue-unit:hover .chip { border-color: var(--brick); color: var(--ink); }
.issue-unit .pill { font-size: 12px; padding: 3px 7px 3px 5px; }
.sev-high { border-color: #e2b7ad; color: var(--brick-deep); background: var(--brick-tint); }
.issue-ev summary { cursor: pointer; font-size: 13px; color: var(--ink-3); min-height: 32px; display: flex; align-items: center; }
.issue-ev p { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; overflow-wrap: anywhere; }
.empty { display: grid; gap: 12px; justify-items: start; padding: 40px var(--gutter); max-width: 640px; margin: 0 auto; }
.empty h1 { font: 450 34px/1.1 var(--ff-display); }
.empty p { color: var(--ink-2); }
.noscript { padding: 24px; }

/* ---------- 9. Motion preferences ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .bv-intro-sweep .band { animation: none !important; }
}
