:root{
  --ink:#0B1315; --ink2:#1A272B; --paper:#F3F2EE; --teal:#12ABA8; --teal-d:#0B7A78; --lime:#C5EE57; --sky:#78BDE9; --slate:#4E5C5D;
  --line:rgba(243,242,238,.12); --muted:rgba(243,242,238,.62);
  --bar:64px; --mp-clip:46px; --sans:"Space Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif; --mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:var(--ink);color:var(--paper);font-family:var(--sans);-webkit-font-smoothing:antialiased;overflow:hidden}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
a{color:inherit}
:focus-visible{outline:2px solid var(--lime);outline-offset:2px;border-radius:6px}
[hidden]{display:none!important}

/* top bar */
.bar{position:fixed;inset:0 0 auto 0;height:calc(var(--bar) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 14px 0 16px;display:flex;align-items:center;gap:14px;background:var(--ink);border-bottom:1px solid var(--line);z-index:20}
.brand{display:flex;align-items:center;flex:none}
.brand-icon{display:none;width:34px;height:34px}
.brand-full{height:30px;width:auto}
.sep{width:1px;height:26px;background:var(--line);flex:none}
.titles{min-width:0;flex:1}
.t-title{font-size:15px;font-weight:700;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
.t-sub{font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;color:var(--teal);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;text-transform:uppercase}
.actions{display:flex;gap:6px;flex:none}
.ibtn{height:38px;min-width:38px;padding:0 10px;border-radius:10px;border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:13px;font-weight:500;transition:background .2s,border-color .2s,color .2s}
.ibtn svg{width:18px;height:18px;fill:currentColor;flex:none}
.ibtn:hover{border-color:var(--teal);color:var(--lime)}
.ibtn.on{background:var(--teal);border-color:var(--teal);color:var(--ink)}

/* stage */
.stage{position:fixed;left:0;right:0;bottom:0;top:calc(var(--bar) + env(safe-area-inset-top));background:#000;overflow:hidden}
/* The top strip of the Matterport embed (its logo sits at y 10-39 px, x 8-141 px) is tucked under the top bar: the iframe starts --mp-clip px above the stage, so the logo is neither visible nor clickable. */
.stage iframe{position:absolute;left:0;top:calc(-1 * var(--mp-clip));width:100%;height:calc(100% + var(--mp-clip));border:0;display:block}
.frame-corners{position:absolute;inset:10px;pointer-events:none}
.frame-corners i{position:absolute;width:18px;height:18px;border-color:var(--teal);border-style:solid;border-width:0;opacity:.9}
.frame-corners i:nth-child(1){top:0;left:0;border-top-width:2px;border-left-width:2px}
.frame-corners i:nth-child(2){top:0;right:0;border-top-width:2px;border-right-width:2px}
.frame-corners i:nth-child(3){bottom:0;right:0;border-bottom-width:2px;border-right-width:2px}
.frame-corners i:nth-child(4){bottom:0;left:0;border-bottom-width:2px;border-left-width:2px}
.stage>.frame-corners{opacity:0;transition:opacity .6s}
.stage.live>.frame-corners{opacity:.55}


/* splash */
.splash{position:fixed;inset:0;z-index:40;overflow:hidden;background:var(--ink);transition:opacity .7s ease,visibility .7s}
.splash.gone{opacity:0;visibility:hidden}
.splash-bg{position:absolute;inset:-4%;background:var(--ink2) center/cover no-repeat;filter:saturate(.9) brightness(.72);transform:scale(1.04);animation:drift 26s ease-in-out infinite alternate;opacity:0;transition:opacity 1.2s}
.splash-bg.ok{opacity:1}
@keyframes drift{to{transform:scale(1.13) translate(-1.5%,-1%)}}
.splash-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(11,19,21,.92) 0%,rgba(11,19,21,.7) 42%,rgba(11,19,21,.15) 100%),linear-gradient(0deg,rgba(11,19,21,.85) 0%,rgba(11,19,21,0) 40%)}
.scanline{position:absolute;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,var(--lime) 30%,var(--lime) 70%,transparent);opacity:.55;top:12%;animation:scan 7s cubic-bezier(.6,0,.4,1) infinite;box-shadow:0 0 18px 2px rgba(197,238,87,.35)}
@keyframes scan{0%{top:10%;opacity:0}10%{opacity:.6}90%{opacity:.6}100%{top:90%;opacity:0}}
.splash-inner{position:relative;height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:calc(44px + env(safe-area-inset-top)) clamp(24px,6vw,96px) calc(36px + env(safe-area-inset-bottom))}
.splash-logo{height:40px;width:auto;align-self:flex-start}
.splash-copy{max-width:720px}
.eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.22em;color:var(--lime);display:flex;align-items:center;gap:10px;margin-bottom:18px}
.eyebrow.small{font-size:10.5px;margin-bottom:8px}
.dot{width:7px;height:7px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 4px rgba(197,238,87,.18)}
.splash-title{font-size:clamp(38px,6.4vw,84px);line-height:.98;font-weight:700;letter-spacing:-.025em;text-wrap:balance}
.splash-sub{margin-top:16px;font-size:clamp(15px,1.5vw,19px);color:var(--muted)}
.splash-sub:empty{display:none}
.splash-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:36px}
.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:54px;padding:0 26px;border-radius:14px;background:var(--teal);color:var(--ink);font-weight:700;font-size:16px;text-decoration:none;box-shadow:0 10px 30px rgba(18,171,168,.35);transition:transform .15s,background .2s}
.btn-primary svg{width:18px;height:18px;fill:currentColor}
.btn-primary:hover{background:var(--lime);transform:translateY(-1px)}
.btn-primary.block{display:flex;width:100%;height:50px;margin-top:18px;box-shadow:none}
.btn-ghost{height:54px;padding:0 22px;border-radius:14px;border:1px solid rgba(243,242,238,.28);font-weight:500;font-size:15px;backdrop-filter:blur(6px);background:rgba(11,19,21,.3)}
.btn-ghost:hover{border-color:var(--lime);color:var(--lime)}
.status{margin-top:22px;font-family:var(--mono);font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);display:flex;align-items:center;gap:10px}
.pulse{width:8px;height:8px;border-radius:50%;background:var(--sky);animation:pulse 1.2s ease-in-out infinite}
.status.ready .pulse{background:var(--lime);animation:none}
@keyframes pulse{50%{opacity:.25}}
.splash-foot{font-size:13px;color:var(--muted)}
.splash-foot b{color:var(--paper);font-weight:500}
.splash-corners{position:absolute;inset:18px;pointer-events:none}
.splash-corners i{position:absolute;width:34px;height:34px;border:0 solid var(--teal)}
.splash-corners i:nth-child(1){top:0;left:0;border-top-width:2px;border-left-width:2px}
.splash-corners i:nth-child(2){top:0;right:0;border-top-width:2px;border-right-width:2px}
.splash-corners i:nth-child(3){bottom:0;right:0;border-bottom-width:2px;border-right-width:2px}
.splash-corners i:nth-child(4){bottom:0;left:0;border-bottom-width:2px;border-left-width:2px}

/* drawer */
.drawer{position:fixed;z-index:30;top:calc(var(--bar) + env(safe-area-inset-top) + 10px);right:10px;bottom:10px;width:380px;background:rgba(11,19,21,.94);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:18px;transform:translateX(calc(100% + 20px));transition:transform .35s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.45)}
.drawer.open{transform:none}
.drawer-scroll{overflow:auto;padding:18px 20px 22px;flex:1;overscroll-behavior:contain}
.grab{display:none}
.close{position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:50%;background:rgba(11,19,21,.7);border:1px solid var(--line);display:grid;place-items:center;z-index:2}
.close svg{width:16px;height:16px}
.hero{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--ink2);margin-bottom:18px}
.hero img{width:100%;height:100%;object-fit:cover;display:block}
.hero .frame-corners{inset:8px}
.frame-corners.sm i{width:14px;height:14px}
.d-title{font-size:24px;line-height:1.1;font-weight:700;letter-spacing:-.01em}
.d-sub{margin-top:6px;color:var(--muted);font-size:14px}
.d-sub:empty{display:none}
.d-h{margin:22px 0 10px;font-family:var(--mono);font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--teal)}
.tips{list-style:none;display:grid;gap:10px}
.tips li{display:flex;gap:12px;font-size:14px;line-height:1.4;color:rgba(243,242,238,.86)}
.tips .k{font-family:var(--mono);font-size:11px;color:var(--lime);padding-top:2px;flex:none}
.tips b{color:var(--paper);font-weight:500}
.card{margin-top:22px;padding:18px;border-radius:14px;background:var(--ink2);border:1px solid var(--line)}
.card-logo{height:28px;width:auto;margin:4px 0 8px}
.card-line{font-size:13.5px;color:var(--muted);margin-bottom:10px;line-height:1.4}
.row{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line);text-decoration:none;font-size:14.5px}
.row svg{width:18px;height:18px;color:var(--teal);fill:var(--teal);flex:none}
.row svg *{fill-opacity:1}
.row:hover{color:var(--lime)}
.fine{margin-top:16px;font-size:11.5px;color:rgba(243,242,238,.42)}
.scrim{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:25}
.toast{position:fixed;left:50%;bottom:calc(28px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:var(--paper);color:var(--ink);font-weight:500;font-size:14px;padding:12px 18px;border-radius:12px;opacity:0;pointer-events:none;transition:.3s;z-index:60}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* landing (no model id) */
.landing .bar .actions{display:none}

/* tablet / phone */
@media (max-width:820px){
  .ibtn .lbl{display:none}
  .ibtn{width:38px;padding:0}
}
@media (max-width:600px){
  :root{--bar:60px}
  .bar{gap:10px;padding-left:12px;padding-right:10px}
  .brand-full{display:none}.brand-icon{display:block}
  .sep{display:none}
  .actions{gap:4px}
  .ibtn{width:36px;min-width:36px;height:36px;border-color:transparent}
  .splash-inner{padding:calc(34px + env(safe-area-inset-top)) 26px calc(30px + env(safe-area-inset-bottom))}
  .splash-logo{height:32px}
  .splash-shade{background:linear-gradient(0deg,rgba(11,19,21,.96) 0%,rgba(11,19,21,.78) 45%,rgba(11,19,21,.25) 100%)}
  .splash-cta{flex-direction:column}
  .btn-primary,.btn-ghost{width:100%}
  .splash-corners{inset:12px}.splash-corners i{width:24px;height:24px}
  .drawer{left:0;right:0;bottom:0;top:auto;width:auto;max-height:82dvh;border-radius:20px 20px 0 0;transform:translateY(105%);border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
  .grab{display:block;width:40px;height:4px;border-radius:4px;background:rgba(243,242,238,.3);margin:10px auto 0;flex:none}
  .stage.live>.frame-corners{opacity:0}
  
}
@media (prefers-reduced-motion:reduce){.splash-bg,.scanline,.pulse{animation:none}}


/* full screen + maximized fallback */
#btnFull .ic-close{display:none}
#btnFull.on .ic-open{display:none}
#btnFull.on .ic-close{display:block}
html.is-full .bar{display:none}
html.is-full .stage{top:0}
html.is-max,html.is-max body{height:100%;height:100dvh}
html.is-max .stage{position:fixed;inset:0;height:100vh;height:100dvh;z-index:30}
.max-exit{position:absolute;z-index:7;top:calc(10px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));display:flex;align-items:center;gap:6px;
  height:38px;padding:0 12px;border-radius:11px;background:rgba(11,19,21,.9);border:1px solid var(--line);font-size:13px;font-weight:500}
.max-exit[hidden]{display:none}
.max-exit svg{width:18px;height:18px}
.max-exit:hover{border-color:var(--teal);color:var(--lime)}

/* share fallback sheet */
.sheet{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:20px}
.sheet[hidden]{display:none}
.sheet-card{width:100%;max-width:420px;background:var(--ink2);border:1px solid var(--line);border-radius:18px;padding:22px}
.sheet-h{font-size:20px;margin:8px 0 14px}
.sheet-input{width:100%;font:500 14px var(--mono);color:var(--paper);background:var(--ink);border:1px solid var(--line);border-radius:10px;padding:12px;-webkit-user-select:all;user-select:all}
.sheet-row{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.toast{max-width:calc(100vw - 32px);text-align:center;z-index:70}


/* floor-plan minimap */
.mm{position:absolute;z-index:6;top:12px;right:12px;width:min(360px,34vw);background:rgba(11,19,21,.9);border:1px solid var(--line);border-radius:14px;padding:8px 8px 6px;
  box-shadow:0 6px 24px rgba(0,0,0,.35);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.mm[hidden],.mm-toggle[hidden]{display:none}
.mm-head{display:flex;align-items:center;gap:8px;padding:0 2px 6px}
.mm-t{font:700 11px var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);flex:1}
.mm-floors{display:flex;gap:4px}
.mm-floors button{min-width:26px;height:24px;padding:0 7px;border-radius:7px;border:1px solid var(--line);font-size:12px;font-weight:700}
.mm-floors button.on{background:var(--teal);border-color:var(--teal);color:var(--ink)}
.mm-x{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:7px}
.mm-x svg{width:14px;height:14px}
.mm-map{position:relative;width:100%;aspect-ratio:2;border-radius:9px;overflow:hidden;background:#0d1719}
.mm-map img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;display:block}
.mm-dots{position:absolute;inset:0}
.mm-dot{position:absolute;width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;display:flex;align-items:center;justify-content:center;-webkit-tap-highlight-color:transparent}
.mm-dot::after{content:"";width:9px;height:9px;border-radius:50%;background:var(--teal);border:1.5px solid #fff;box-shadow:0 0 0 2px rgba(0,0,0,.35);transition:transform .15s}
.mm-dot:hover::after,.mm-dot:focus-visible::after{transform:scale(1.5);background:var(--lime)}
.mm-dot.on::after{width:13px;height:13px;background:var(--lime);box-shadow:0 0 0 4px rgba(197,238,87,.35)}
.mm-note{font-size:11px;color:var(--muted);padding:6px 2px 0}
.mm-toggle{position:absolute;z-index:6;top:12px;right:12px;display:flex;align-items:center;gap:7px;height:38px;padding:0 12px;border-radius:11px;
  background:rgba(11,19,21,.9);border:1px solid var(--line);font-size:13px;font-weight:500}
.mm-toggle svg{width:18px;height:18px}
.mm-toggle:hover{border-color:var(--teal);color:var(--lime)}
html.is-full .mm,html.is-full .mm-toggle{top:calc(58px + env(safe-area-inset-top))}
@media (max-width:600px){
  .mm{top:10px;left:10px;right:10px;width:auto;max-width:420px;margin-left:auto}
  .mm-toggle{top:8px;right:8px;height:36px;padding:0 10px}
  .mm-toggle span{display:none}
  html.is-full .mm{top:calc(100px + env(safe-area-inset-top))}
  html.is-full .mm-toggle{top:calc(56px + env(safe-area-inset-top))}
}

/* share: "Link copied ✓" shows on the Share button itself for 2 s (Ari, Oct 22) */
#btnShare.copied{background:var(--teal);border-color:var(--teal);color:var(--ink);width:auto;padding:0 12px}
#btnShare.copied .ic-share{display:none}
#btnShare.copied .lbl{display:inline;white-space:nowrap;font-weight:600}

/* floor plan button lives in the ribbon; the floating toggle is only for full screen (ribbon hidden there) */
#btnMap[hidden]{display:none}
.mm-toggle{display:none}
html.is-full .mm-toggle:not([hidden]){display:flex}
html.is-full .mm{top:calc(58px + env(safe-area-inset-top))}

/* screenshot button, sitting in Matterport's bottom control row right after its measure / tags buttons
   (measured at 1440 and 390 wide: Matterport's round buttons are ~38 px, 42 px apart, measure centred at x 189, row centred 42 px above the bottom;
   the floors button only exists on multi-floor tours, so one-floor tours move one slot left) */
.mp-shot{position:absolute;z-index:6;left:254px;bottom:23px;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:rgba(34,34,34,.62);color:#fff;-webkit-tap-highlight-color:transparent;transition:background .2s,color .2s}
.mp-shot svg{width:21px;height:21px}
.mp-shot:hover{background:rgba(18,171,168,.9);color:var(--ink)}
.mp-shot[hidden]{display:none}
html.one-floor .mp-shot{left:212px}
html.capturing .mm,html.capturing .mm-toggle,html.capturing .mp-shot,html.capturing .max-exit,html.capturing .toast,html.capturing .frame-corners{visibility:hidden}
.shot-card{max-width:min(720px,94vw)}
.shot-img{display:block;width:100%;height:auto;max-height:60vh;object-fit:contain;border-radius:10px;border:1px solid var(--line);margin-top:12px;background:#000}

/* Veil over the Matterport embed while it loads: hides Matterport's loading/start screen and its "Powered by Matterport"
   (Ari, Oct 22). It lets taps through (pointer-events:none), so if a browser ever shows Matterport's play button the tap still reaches it. */
.veil{position:absolute;inset:0;z-index:3;pointer-events:none;background:var(--ink);display:grid;place-items:center;transition:opacity .8s ease,visibility .8s}
.veil.off{opacity:0;visibility:hidden}
.veil-bg{position:absolute;inset:0;background:var(--ink2) center/cover no-repeat;filter:saturate(.9) brightness(.55)}
.veil-inner{position:relative;display:grid;justify-items:center;gap:14px;text-align:center}
.veil-logo{width:150px;height:auto;opacity:.95}
html.veiling .stage>:not(iframe):not(.veil){visibility:hidden}
html.capturing .veil{display:none}
