:root {
    --paper:   #F4EEE4;
    --ink:     #241F1A;
    --navy:    #2D1411;
    --black:   #000000;   /* pure black — loader curtain + footer, per client */
    --gold:    #B08D4C;
    --gold-lt: #D6B266;
    --w:       #FFFFFF;
    --w-88:    rgba(255,255,255,.88);
    --w-70:    rgba(255,255,255,.70);
    --w-52:    rgba(255,255,255,.52);
    --w-32:    rgba(255,255,255,.32);
    --w-16:    rgba(255,255,255,.16);
    --serif: 'Google Sans', 'Figtree', 'Noto Sans Georgian', 'Inter', Helvetica, Arial, sans-serif;
    --sans:  'Google Sans', 'Figtree', 'Noto Sans Georgian', 'Inter', Helvetica, Arial, sans-serif;
    --ease-reveal: cubic-bezier(.22, 1, .36, 1);
    --ease-genie:  cubic-bezier(.16, 1, .3, 1);
    --gutter: clamp(20px, 3vw, 56px);
    --inset:  clamp(20px, 4vw, 56px);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { font-family: var(--sans); background: #0c0a09; color: var(--paper); -webkit-font-smoothing: antialiased;
    overflow-x: hidden; }
  img { max-width: 100%; display: block; }
  a { color: inherit; }
  ::selection { background: rgba(255,255,255,.24); }

  /* ---------------- Header — light, overlapping ---------------- */
  header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center;
    padding: clamp(16px, 2.6vh, 26px) var(--inset); color: var(--w); pointer-events: none;
    background: linear-gradient(180deg, rgba(12,10,9,.44) 0%, rgba(12,10,9,.16) 46%, transparent 100%); }
  /* only the real controls capture events, so the render beneath the transparent bar stays hoverable/clickable */
  header .hdr-left, header .logo, header .hdr-right { pointer-events: auto; }
  .hdr-left  { display: flex; align-items: center; gap: clamp(16px, 2vw, 34px); }
  .logo      { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; text-decoration: none; }
  .hdr-right { display: flex; align-items: center; gap: clamp(12px, 1.3vw, 20px); margin-left: auto; }
  .logo-img  { height: 52px; width: auto; display: block; filter: brightness(0) invert(1) drop-shadow(0 1px 10px rgba(0,0,0,.35)); }
  .hdr-left a { position: relative; color: var(--w-88); text-decoration: none; font-size: 16px; font-weight: 400; text-shadow: 0 1px 10px rgba(0,0,0,.28); transition: color .3s ease; }
  .hdr-left a::after { content: ''; display: block; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-reveal); margin-top: 2px; }
  .hdr-left a:hover::after, .hdr-left a:focus-visible::after { transform: scaleX(1); }
  .hdr-left a:hover, .hdr-left a:focus-visible { color: var(--w); }
  .lang { font-size: 13.5px; white-space: nowrap; color: var(--w-88); text-shadow: 0 1px 10px rgba(0,0,0,.28); }
  .lang a { color: currentColor; text-decoration: none; opacity: .55; }
  .lang a.on { opacity: 1; }
  .lang i { opacity: .4; margin: 0 5px; font-style: normal; }
  .btn-find, .request { display: inline-flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 400; border-radius: 999px; padding: 8px 20px; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .35s var(--ease-reveal), color .35s var(--ease-reveal), border-color .35s ease; }
  .btn-find svg, .request svg { width: 13px; height: 13px; transition: transform .35s var(--ease-reveal); }
  .btn-find { color: var(--navy); background: var(--paper); border: 1px solid var(--paper); }
  .btn-find:hover, .btn-find:focus-visible { background: var(--gold); color: var(--navy); border-color: var(--gold); }
  .btn-find:hover svg, .btn-find:focus-visible svg { transform: translate(2px,-2px); }
  .request { color: var(--w); background: rgba(255,255,255,.06); border: 1px solid var(--w-32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .request:hover, .request:focus-visible { background: var(--paper); color: var(--navy); border-color: var(--paper); }
  .request:hover svg, .request:focus-visible svg { transform: translate(2px,-2px); }
  /* where backdrop-filter is unavailable, give the glass pill a solid-enough fill */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .request { background: rgba(20,13,11,.5); }
  }
  @media (max-width: 940px) { .hdr-left { display: none; } .logo { position: static; transform: none; } }

  /* ---------------- Stage — full, uncropped render (scrolls) ---------------- */
  /* top-aligned: on tall/narrow viewports the render sits under the header (no top letterbox),
     any spare height falls to the bottom where the pinned panel + foot-scrim live */
  .cb-stage { position: relative; z-index: 1; width: 100%; min-height: 100svh; display: grid; place-items: start center;
    background: #0c0a09; }
  /* the figure holds the render + overlays at the image's true aspect (no crop) */
  .cb-figure { position: relative; width: 100%; }
  .cb-bg { display: block; width: 100%; height: auto; animation: cbBgIn 1.4s var(--ease-reveal) both; }
  @keyframes cbBgIn { from { opacity: 0; } to { opacity: 1; } }
  /* legibility scrims — sit over the figure (image top for the header, image foot for the panel) */
  .cb-scrim { position: absolute; left: 0; right: 0; pointer-events: none; z-index: 2; }
  .cb-scrim.top { top: 0; height: 30%; background: linear-gradient(180deg, rgba(10,8,7,.40) 0%, transparent 100%); }
  .cb-scrim.bottom { bottom: 0; height: 42%; background: linear-gradient(0deg, rgba(10,8,7,.60) 0%, rgba(10,8,7,.12) 55%, transparent 100%); }

  /* the interactive blocks overlay — registered 1:1 with the render (same box, same aspect) */
  .cb-blocks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; }
  /* spotlight overlay — dark everywhere except the active block (its shape is the mask hole) */
  .cb-dim { opacity: 0; pointer-events: none; transition: opacity .55s var(--ease-reveal); }
  .cb-blocks.has-active .cb-dim { opacity: .66; }
  .cb-block { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
  .cb-fill { fill: rgba(255,255,255,0); pointer-events: all; transition: fill .5s var(--ease-reveal); }
  .cb-edge { fill: none; stroke: rgba(255,255,255,.42); stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none;
    transition: stroke .45s ease, stroke-width .45s ease; }
  .cb-march { fill: none; stroke: rgba(255,255,255,.92); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none;
    stroke-linecap: round; stroke-dasharray: 3 15; animation: cbMarch 30s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255,255,255,.4)); transition: stroke .45s ease, stroke-width .45s ease, opacity .45s ease; opacity: .9; }
  @keyframes cbMarch { to { stroke-dashoffset: -900; } }
  /* the tracing sweep drawn on hover (one clean line-around) */
  .cb-trace { fill: none; stroke: var(--gold-lt); stroke-width: 2.4; vector-effect: non-scaling-stroke; pointer-events: none; stroke-linecap: round;
    stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); opacity: 0;
    filter: drop-shadow(0 0 6px rgba(214,178,102,.5)); }

  .cb-block:hover .cb-fill,
  .cb-block:focus-visible .cb-fill,
  .cb-block.is-active .cb-fill { fill: rgba(255,255,255,.10); }
  .cb-block:hover .cb-edge,
  .cb-block:focus-visible .cb-edge,
  .cb-block.is-active .cb-edge { stroke: rgba(255,255,255,.9); }
  .cb-block:hover .cb-march,
  .cb-block:focus-visible .cb-march,
  .cb-block.is-active .cb-march { opacity: 0; }
  .cb-block.is-active .cb-trace { opacity: 1; stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.15s var(--ease-genie), opacity .3s ease; }
  /* hide the non-active blocks' outlines while one is active (the spotlight carries the focus) */
  .cb-blocks.has-active .cb-block:not(.is-active) .cb-march { opacity: 0; }
  .cb-blocks.has-active .cb-block:not(.is-active) .cb-edge { stroke: rgba(255,255,255,0); }

  /* ---- letter badges ---- */
  .cb-badge { pointer-events: none; }
  .cb-badge .b-ring { fill: none; stroke: rgba(255,255,255,.62); stroke-width: 1.3; stroke-dasharray: 3.5 6; transform-box: fill-box; transform-origin: center;
    animation: cbSpin 18s linear infinite; transition: stroke .4s ease; }
  .cb-badge .b-disc { fill: #fff; stroke: none;
    transition: transform .5s var(--ease-genie); transform-box: fill-box; transform-origin: center;
    filter: drop-shadow(0 5px 16px rgba(0,0,0,.4)); }
  .cb-badge .b-let { fill: var(--navy); font-family: var(--serif); font-weight: 600; font-size: 21px; text-anchor: middle; dominant-baseline: central; }
  @keyframes cbSpin { to { transform: rotate(360deg); } }
  /* circles stay solid white; the active block reads via its gold ring + traced outline + dimmed neighbours */
  .cb-block:hover .b-disc,
  .cb-block:focus-visible .b-disc,
  .cb-block.is-active .b-disc { transform: scale(1.06); }
  .cb-block.is-active .b-ring { stroke: rgba(214,178,102,.95); }
  .cb-blocks.has-active .cb-block:not(.is-active) .cb-badge { opacity: .28; transition: opacity .5s ease; }

  /* ---- leader line (screen-space; pixel coords set in JS) ---- */
  .cb-leader { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; overflow: visible; opacity: 0;
    transition: opacity .35s ease; }
  .cb-leader.show { opacity: 1; }
  .cb-leader-halo { fill: none; stroke: rgba(10,8,7,.34); stroke-width: 2.6; stroke-linecap: round; }
  .cb-leader-path { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 1; stroke-linecap: round; }

  /* fixed foot scrim — always backs the pinned panel for legibility over any scroll position */
  .cb-foot-scrim { position: fixed; left: 0; right: 0; bottom: 0; height: min(48vh, 460px); z-index: 2; pointer-events: none;
    background: linear-gradient(0deg, rgba(8,6,5,.74) 0%, rgba(8,6,5,.32) 42%, transparent 100%); }

  /* ---------------- Bottom-left panel: title + genie card ---------------- */
  /* panel is pointer-transparent so the towers beneath stay hoverable; only the open card re-enables events */
  .cb-panel { position: fixed; z-index: 8; left: var(--inset); bottom: clamp(22px, 4.4vh, 46px); width: min(420px, calc(100vw - 2 * var(--inset)));
    color: var(--paper); pointer-events: none; }
  .cb-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.82);
    text-shadow: 0 1px 12px rgba(0,0,0,.6); }
  .cb-h1 { margin-top: 10px; font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 48px); line-height: 1.02; letter-spacing: -.015em;
    text-shadow: 0 2px 24px rgba(0,0,0,.5); }

  /* spec list — fixed at the viewport middle, sitting just under the leader line, aligned to the same left inset */
  .cb-card { position: fixed; z-index: 8; left: var(--inset); top: calc(50svh + 16px); width: min(340px, calc(100vw - 2 * var(--inset)));
    opacity: 0; pointer-events: none; visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path .55s var(--ease-genie), opacity .4s var(--ease-genie), visibility 0s linear .55s; }
  body.card-open .cb-card { opacity: 1; pointer-events: auto; visibility: visible; clip-path: inset(0 0 0% 0);
    transition: clip-path .55s var(--ease-genie), opacity .4s var(--ease-genie), visibility 0s; }
  /* plain text — no wrapper box (strong shadow for legibility over the render) */
  .cb-d-block { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; line-height: 1.05; text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 2px 20px rgba(0,0,0,.85); }
  .cb-d-list { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
  .cb-d-row { display: flex; align-items: baseline; gap: 8px; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 1px 16px rgba(0,0,0,.85); }
  .cb-d-row dt { color: rgba(255,255,255,.68); font-weight: 400; }
  .cb-d-row dt::after { content: ':'; }
  .cb-d-row dd { color: var(--paper); font-weight: 500; font-variant-numeric: tabular-nums; }
  .cb-d-row.avail dd { color: var(--gold-lt); }
  .cb-d-row.sold dd { color: rgba(255,255,255,.68); }
  .cb-d-cta { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--paper);
    text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 1px 16px rgba(0,0,0,.85); position: relative; width: fit-content; }
  .cb-d-cta::after { content: ''; position: absolute; left: 0; right: 20px; bottom: -3px; height: 1px; background: var(--gold-lt); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-reveal); }
  .cb-d-cta:hover::after, .cb-d-cta:focus-visible::after { transform: scaleX(1); }
  .cb-d-cta svg { width: 13px; height: 13px; transition: transform .35s var(--ease-reveal); }
  .cb-d-cta:hover svg, .cb-d-cta:focus-visible svg { transform: translate(3px,-3px); }

  /* ---------------- Back link (top-left row already in header on mobile) ---------------- */
  .cb-back { position: fixed; z-index: 8; left: var(--inset); top: calc(clamp(16px, 2.6vh, 26px) + 66px); display: none; }

  /* ---------------- Responsive ---------------- */
  @media (max-width: 940px) {
    .cb-panel { width: calc(100vw - 2 * var(--inset)); }
  }
  @media (max-width: 620px) {
    .hdr-right .lang, .btn-find { display: none; }
    .logo-img { height: 44px; }
    .cb-h1 { font-size: clamp(26px, 8vw, 34px); }
    .cb-panel { left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); width: auto; }
    .cb-hint .keys { flex-wrap: wrap; gap: 10px 16px; }
  }
  @media (max-height: 560px) and (min-width: 941px) {
    .cb-h1 { font-size: 30px; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .cb-bg { animation: none; opacity: 1; }
    .cb-march { animation: none; opacity: .8; }
    .cb-badge .b-ring { animation: none; }
    .cb-card { transition: opacity .2s ease; }
  }