/* ROAM · property tour presentation — standalone, no external dependencies.
   Dollhouse = body.hs-polished · Panorama = #viewer · MLS = html.mls */

/* 1 · Tokens */
:root{
  --ink:#f7f9f8; --ink-2:rgba(247,249,248,.76); --ink-3:rgba(247,249,248,.56);
  --tint:140,229,207;
  --font:"SF Pro Display","SF Pro Text",-apple-system,BlinkMacSystemFont,"Inter","Helvetica Neue","Segoe UI",system-ui,sans-serif;
  --ease:cubic-bezier(.22,.8,.24,1);
  --hit:44px; --dock-h:56px;
  --st:env(safe-area-inset-top,0px); --sr:env(safe-area-inset-right,0px);
  --sb:env(safe-area-inset-bottom,0px); --sl:env(safe-area-inset-left,0px);
  --er:max(16px,var(--sr)); --el:max(20px,var(--sl));
  --glass-filter:blur(4px) saturate(1.65) brightness(1.1) contrast(1.04);
  --spec:radial-gradient(130% 85% at 22% 0%,rgba(255,255,255,.42),rgba(255,255,255,.1) 34%,transparent 58%),
         radial-gradient(90% 70% at 80% 120%,rgba(var(--tint),.26),transparent 62%),
         linear-gradient(180deg,rgba(255,255,255,.1),transparent 42%,rgba(255,255,255,.07));
  --rim:conic-gradient(from 205deg,rgba(255,255,255,.95),rgba(255,255,255,.1) 22%,rgba(255,255,255,.5) 48%,rgba(255,255,255,.1) 72%,rgba(255,255,255,.95));
  --thick:inset 0 1px 1px rgba(255,255,255,.7),inset 0 -1px 1px rgba(255,255,255,.22),
          inset 3px 0 4px -3px rgba(255,140,140,.3),inset -3px 0 4px -3px rgba(130,170,255,.34),
          inset 0 14px 18px -12px rgba(255,255,255,.3),inset 0 -16px 22px -14px rgba(0,0,0,.5),
          0 18px 36px -14px #000,0 2px 8px rgba(0,0,0,.55);
}
html.roam-refract{--glass-filter:url(#roam-refract) blur(3px) saturate(1.65) brightness(1.1)}
html:root{background:#000;color:var(--ink);color-scheme:dark}

/* 2 · Base */
html,body{margin:0;height:100%;overflow:hidden;background:#000}
body{font-family:var(--font);font-size:14px;line-height:1.35;color:var(--ink);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;font-variant-numeric:tabular-nums;overscroll-behavior:none}
.hs-sr-only,.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
body.hs-polished [hidden],#viewer [hidden]{display:none!important}
html :is(button,a,summary,input,select,[tabindex]):focus-visible{outline:2px solid #fff;outline-offset:3px}
@keyframes roam-rise{from{opacity:0;translate:0 12px;scale:.985}to{opacity:1;translate:0 0;scale:1}}
@keyframes roam-fade{from{opacity:0}to{opacity:1}}
@keyframes roam-spin{to{rotate:360deg}}
@keyframes roam-pulse{0%{box-shadow:0 0 0 0 rgba(var(--tint),.55)}70%,100%{box-shadow:0 0 0 10px rgba(var(--tint),0)}}

/* 3 · Droplet glass surface: thick fill, specular crescent, edge fringe, bright curved rim */
body.hs-polished .hs-dock,
body.hs-polished > header .tools,
body.hs-polished #controls,
body.hs-polished #roofControl,
body.hs-polished #selection,
body.hs-polished #gaps,
body.hs-polished .hs-yard-panel,
body.hs-polished .hs-realtor,
body.hs-polished #hs-room-enter,
body.hs-polished .hs-icon-button,
body.hs-polished #closePano,
#viewer .glass,
#viewer .hs-realtor{
  position:relative;isolation:isolate;border:0;
  background-color:rgba(255,255,255,.05);background-image:var(--spec);
  -webkit-backdrop-filter:var(--glass-filter);backdrop-filter:var(--glass-filter);
  box-shadow:var(--thick);
}
body.hs-polished .hs-dock::after,
body.hs-polished > header .tools::after,
body.hs-polished #controls::after,
body.hs-polished #roofControl::after,
body.hs-polished #selection::after,
body.hs-polished #gaps::after,
body.hs-polished .hs-yard-panel::after,
body.hs-polished .hs-realtor::after,
body.hs-polished #hs-room-enter::after,
body.hs-polished .hs-icon-button::after,
body.hs-polished #closePano::after,
#viewer .glass::after,
#viewer .hs-realtor::after{
  content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;background:var(--rim);pointer-events:none;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);mask-composite:exclude;
}

/* 4 · Dollhouse: stage and base controls */
body.hs-polished{background:#000}
body.hs-polished main{height:100dvh;background:#000}
body.hs-polished canvas{background:#000}
#hs-presentation{position:absolute;inset:0;z-index:4;pointer-events:none}
body.hs-polished :is(button,a,select){
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-width:var(--hit);min-height:var(--hit);padding:0 16px;border:0;border-radius:999px;
  font:560 14px/1 var(--font);letter-spacing:-.006em;color:var(--ink);background:transparent;text-decoration:none;
  cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
  transition:background-color .22s var(--ease),color .22s var(--ease),scale .22s var(--ease),box-shadow .25s var(--ease);
}
body.hs-polished :is(button,a):active{scale:.97}
body.hs-polished :is(button,a):disabled{opacity:.4;cursor:default}

/* 4a · Brand + address (top left) */
body.hs-polished .hs-brand{position:absolute;z-index:6;top:calc(var(--st) + 18px);left:var(--el);display:flex;align-items:center;gap:12px;pointer-events:none;animation:roam-fade .9s var(--ease) backwards}
body.hs-polished .hs-brand-mark{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font:600 17px/1 var(--font);color:#fff;background-color:rgba(255,255,255,.07);background-image:var(--spec);box-shadow:inset 0 1px 1px rgba(255,255,255,.7),inset 0 -8px 12px -6px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.18),0 6px 16px -6px #000}
body.hs-polished .hs-brand > span:last-child{display:flex;flex-direction:column;gap:4px;font:600 10.5px/1 var(--font);letter-spacing:.26em;text-transform:uppercase;color:var(--ink-3)}
body.hs-polished .hs-brand small{font:560 15px/1.15 var(--font);letter-spacing:-.012em;text-transform:none;color:var(--ink);text-shadow:0 1px 14px rgba(0,0,0,.9)}

/* 4b · Header → floating view switch (top right) */
body.hs-polished > header{position:fixed;inset:0 0 auto 0;z-index:5;height:auto;display:flex;justify-content:flex-end;align-items:flex-start;padding:calc(var(--st) + 12px) var(--er) 0 var(--el);border:0;background:none;pointer-events:none}
body.hs-polished > header > div:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.hs-polished > header .tools{pointer-events:auto;display:flex;flex-wrap:nowrap;gap:2px;padding:6px;border-radius:999px;animation:roam-fade .9s var(--ease) .1s backwards}
body.hs-polished #reset{display:none}
body.hs-polished > header .tools :is(button,a){color:var(--ink-2)}
body.hs-polished > header .tools :is(button,a):hover{background-color:rgba(255,255,255,.1);color:#fff}
body.hs-polished > header .tools button.active{color:#fff;background-color:rgba(var(--tint),.28);box-shadow:inset 0 1px 1px rgba(255,255,255,.7),inset 0 -10px 14px -8px rgba(var(--tint),.55),0 0 18px -6px rgba(var(--tint),.7)}

/* 4c · Zoom rail (right, centred) */
body.hs-polished #controls{position:absolute;left:auto;right:var(--er);top:50%;translate:0 -50%;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;gap:2px;padding:6px;max-width:none;border-radius:30px;pointer-events:auto;animation:roam-fade .9s var(--ease) .2s backwards}
body.hs-polished #controls button{width:44px;height:44px;padding:0;font-size:22px;font-weight:400;color:var(--ink-2)}
body.hs-polished #controls button:hover{background-color:rgba(255,255,255,.1);color:#fff}
body.hs-polished #rotate{font-size:0}
body.hs-polished #rotate::before{content:"↻";font-size:20px}
body.hs-polished #controls > label:not(#roofControl){display:grid;place-items:center;width:44px;height:44px;margin:0;font-size:0}
body.hs-polished #showPins{appearance:none;-webkit-appearance:none;display:grid;place-items:center;width:44px;height:44px;margin:0;border-radius:50%;cursor:pointer;transition:background-color .22s var(--ease),box-shadow .25s var(--ease)}
body.hs-polished #showPins::before{content:"#";font:600 18px/1 var(--font);color:var(--ink-3)}
body.hs-polished #showPins:checked{background-color:rgba(var(--tint),.22);box-shadow:inset 0 1px 1px rgba(255,255,255,.6),0 0 16px -4px rgba(var(--tint),.7)}
body.hs-polished #showPins:checked::before{color:#fff}
body.hs-polished #controls #roofControl{position:absolute;right:calc(100% + 10px);top:50%;translate:0 -50%;display:flex;align-items:center;gap:10px;min-height:44px;padding:0 18px;border-radius:999px;font:560 12px/1 var(--font);color:var(--ink-2);white-space:nowrap}
body.hs-polished #roofControl input{appearance:none;-webkit-appearance:none;width:100px;height:28px;margin:0;background:transparent;cursor:pointer}
body.hs-polished #roofControl input::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:rgba(255,255,255,.3)}
body.hs-polished #roofControl input::-moz-range-track{height:4px;border-radius:2px;background:rgba(255,255,255,.3)}
body.hs-polished #roofControl input::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;margin-top:-9px;border-radius:50%;border:0;background:radial-gradient(circle at 32% 25%,#fff,rgba(var(--tint),.9) 70%);box-shadow:0 2px 8px rgba(0,0,0,.7)}
body.hs-polished #roofControl input::-moz-range-thumb{width:22px;height:22px;border-radius:50%;border:0;background:radial-gradient(circle at 32% 25%,#fff,rgba(var(--tint),.9) 70%);box-shadow:0 2px 8px rgba(0,0,0,.7)}

/* 4d · Scan pins: small droplets (no backdrop blur on 40 elements; 44px hit area) */
body.hs-polished .pin{width:30px;height:30px;min-width:0;min-height:0;padding:0;display:grid;place-items:center;border:0;border-radius:50%;color:#fff;font:620 12px/1 var(--font);letter-spacing:0;text-shadow:0 1px 2px rgba(0,0,0,.7);
  background-color:rgba(255,255,255,.06);
  background-image:radial-gradient(circle at 30% 20%,rgba(255,255,255,.6) 0 7%,rgba(255,255,255,.14) 24%,transparent 46%),radial-gradient(circle at 72% 92%,rgba(var(--tint),.45),transparent 55%);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.8),inset 0 -6px 9px -4px rgba(0,0,0,.55),inset 2px 0 3px -2px rgba(255,140,140,.3),inset -2px 0 3px -2px rgba(130,170,255,.35),0 0 0 1px rgba(255,255,255,.2),0 6px 14px -4px #000;
  transition:background-color .2s var(--ease),box-shadow .25s var(--ease),scale .25s var(--ease)}
body.hs-polished .pin::before{content:"";position:absolute;inset:-7px}
body.hs-polished .pin::after{width:24px;height:3px;margin-top:-1.5px;border-radius:0 3px 3px 0;opacity:.72;background:linear-gradient(90deg,transparent 0 15px,rgba(255,255,255,.92) 15px)}
body.hs-polished .pin:hover{scale:1.14;color:#fff;background-color:rgba(var(--tint),.34);box-shadow:inset 0 1px 1px rgba(255,255,255,.85),inset 0 -6px 9px -4px rgba(0,0,0,.5),0 0 0 1px rgba(var(--tint),.8),0 0 20px rgba(var(--tint),.5),0 6px 14px -4px #000}
body.hs-polished .pin.selected{color:#fff;background-color:rgba(var(--tint),.46);box-shadow:inset 0 1px 1px rgba(255,255,255,.85),inset 0 -6px 9px -4px rgba(0,0,0,.45),0 0 0 2px rgba(var(--tint),.95),0 0 24px rgba(var(--tint),.6),0 6px 14px -4px #000}
body.hs-polished .pin:focus-visible{box-shadow:inset 0 1px 1px rgba(255,255,255,.8),0 0 0 3px rgba(0,0,0,.85)}

/* 4e · Bottom dock: Start tour · Play tour | Whole house · Outdoors */
body.hs-polished .hs-dock{position:absolute;inset-inline:0;margin-inline:auto;width:max-content;max-width:calc(100% - 24px);bottom:calc(var(--sb) + 18px);display:flex;align-items:center;gap:2px;padding:6px;border-radius:999px;pointer-events:auto;animation:roam-rise .8s var(--ease) .15s backwards}
body.hs-polished .hs-dock button{padding:0 18px;color:var(--ink-2);white-space:nowrap}
body.hs-polished .hs-dock button:hover{background-color:rgba(255,255,255,.1);color:#fff}
body.hs-polished .hs-dock button:focus-visible{outline-offset:-4px}
body.hs-polished .hs-dock button[aria-pressed="true"],
body.hs-polished .hs-dock button[aria-expanded="true"]{color:#fff;background-color:rgba(255,255,255,.16);box-shadow:inset 0 1px 1px rgba(255,255,255,.55)}
body.hs-polished .hs-dock .hs-dock-primary{color:#fff;background-color:rgba(var(--tint),.3);background-image:radial-gradient(120% 90% at 30% 0,rgba(255,255,255,.5),transparent 55%);box-shadow:inset 0 1px 1px rgba(255,255,255,.75),inset 0 -12px 16px -10px rgba(var(--tint),.7),0 0 22px -6px rgba(var(--tint),.7)}
body.hs-polished .hs-dock .hs-dock-primary:hover{background-color:rgba(var(--tint),.42)}
body.hs-polished .hs-dock-divider{width:1px;height:22px;margin:0 4px;background:linear-gradient(transparent,rgba(255,255,255,.38),transparent)}
body.hs-polished .hs-count{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:rgba(255,255,255,.14);font:600 11.5px/20px var(--font);text-align:center}
body.hs-polished #hs-play-icon{font-size:11px}

/* 4f · Room label (text only, floats above dock) */
body.hs-polished .hs-room{position:absolute;inset-inline:0;margin-inline:auto;width:max-content;max-width:calc(100% - 32px);bottom:calc(var(--sb) + 18px + var(--dock-h) + 16px);display:flex;align-items:center;gap:14px;pointer-events:none}
body.hs-polished .hs-room-copy{display:grid;gap:6px}
body.hs-polished #hs-room-kicker{font:600 10.5px/1 var(--font);letter-spacing:.22em;text-transform:uppercase;color:var(--ink-3)}
body.hs-polished #hs-room-title{font:600 clamp(20px,2.4vw,28px)/1.05 var(--font);letter-spacing:-.03em;text-shadow:0 2px 18px rgba(0,0,0,.9)}
body.hs-polished .hs-room-arrive{animation:roam-rise .6s var(--ease) backwards}
body.hs-polished #hs-room-enter{pointer-events:auto;padding:0 20px;border-radius:999px}
body.hs-polished #hs-room-enter:hover{background-color:rgba(var(--tint),.2)}

/* 4g · Tour progress hairline (provisional: assumes JS sizes the <i> inline) */
#hs-tour-progress{position:absolute;left:0;right:0;top:var(--st);height:2px;opacity:0;transition:opacity .4s var(--ease)}
#hs-presentation.hs-playing #hs-tour-progress{opacity:1}
#hs-tour-progress i{display:block;width:100%;height:100%;transform-origin:0 50%;background:linear-gradient(90deg,transparent,rgba(var(--tint),.95));box-shadow:0 0 12px rgba(var(--tint),.7)}

/* 4h · Status line (quiet text, under address) */
body.hs-polished #status{position:absolute;inset:auto;top:calc(var(--st) + 66px);left:var(--el);right:auto;max-width:min(60ch,calc(100% - 120px));padding:0;background:none;font:500 12px/1.3 var(--font);letter-spacing:.01em;color:var(--ink-3);text-shadow:0 1px 10px #000;pointer-events:none}
body.hs-polished #status:empty{display:none}

/* 4i · Selected-scan popover (compact, left of the rail) */
body.hs-polished #selection{position:absolute;right:calc(var(--er) + 68px);top:calc(var(--st) + 76px);width:min(264px,calc(100% - 32px));padding:12px;border-radius:26px;display:none;z-index:6}
body.hs-polished #selection.show{display:grid;gap:10px;animation:roam-rise .4s var(--ease) backwards}
body.hs-polished #selection img{width:100%;height:92px;margin:0;border-radius:18px;object-fit:cover;box-shadow:0 0 0 1px rgba(255,255,255,.18)}
body.hs-polished #selection h2{margin:0;font:600 17px/1.2 var(--font);letter-spacing:-.018em}
body.hs-polished #selection p{margin:0;font-size:12px;line-height:1.45;color:var(--ink-3);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
body.hs-polished #selection .tools{display:flex;gap:6px}
body.hs-polished #selection .tools > *{flex:1;font-size:13px;background-color:rgba(255,255,255,.08)}
body.hs-polished #selection .tools > *:hover{background-color:rgba(var(--tint),.22)}

/* 4j · Awaiting-placement disclosure (collapsed chip) */
body.hs-polished #gaps{position:absolute;left:var(--el);bottom:calc(var(--sb) + 18px);right:auto;max-width:min(380px,calc(100% - 32px));max-height:none;padding:0;border-radius:26px;overflow:visible;z-index:3}
body.hs-polished #gaps summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;list-style:none;font:560 13px/1 var(--font);color:var(--ink-2);cursor:pointer}
body.hs-polished #gaps summary::-webkit-details-marker{display:none}
body.hs-polished #gaps summary::after{content:"+";margin-left:auto;font-size:18px;transition:rotate .25s var(--ease)}
body.hs-polished #gaps[open] summary::after{rotate:45deg}
body.hs-polished #gaps > p{margin:0;padding:4px 18px 12px;font-size:12px;line-height:1.5;color:var(--ink-3)}
body.hs-polished #unplaced{max-height:116px;overflow:auto;margin:0;padding:0 14px 8px;display:flex;flex-wrap:wrap;gap:6px}
body.hs-polished #unplaced a{padding:0 14px;font-size:12px;background-color:rgba(255,255,255,.08)}

/* 4k · Outdoors panel (right sheet) */
body.hs-polished .hs-yard-panel{position:absolute;z-index:5;pointer-events:auto;right:calc(var(--er) + 68px);top:calc(var(--st) + 76px);width:min(372px,calc(100% - 32px));max-height:calc(100% - var(--st) - 76px - var(--sb) - 18px - var(--dock-h) - 16px);display:flex;flex-direction:column;gap:12px;padding:18px;border-radius:32px;overflow:hidden;animation:roam-rise .45s var(--ease) backwards}
body.hs-polished .hs-panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
body.hs-polished .hs-eyebrow{display:block;font:600 10.5px/1 var(--font);letter-spacing:.22em;text-transform:uppercase;color:var(--ink-3)}
body.hs-polished #hs-yard-title{margin:6px 0 0;font:600 21px/1.1 var(--font);letter-spacing:-.025em}
body.hs-polished .hs-icon-button{width:44px;height:44px;padding:0;font-size:22px;font-weight:400}
body.hs-polished .hs-icon-button:hover{background-color:rgba(255,255,255,.12)}
body.hs-polished .hs-yard-intro{margin:0;font-size:13px;line-height:1.45;color:var(--ink-2)}
body.hs-polished #hs-yard{position:relative;flex:0 1 auto;aspect-ratio:16/10;min-height:110px;border-radius:22px;overflow:hidden;background:radial-gradient(90% 80% at 50% 0,rgba(var(--tint),.1),transparent 70%),#000;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14),inset 0 10px 22px rgba(0,0,0,.8)}
body.hs-polished .hs-yard-house{position:absolute;left:50%;top:16%;translate:-50% 0;padding:10px 22px;border:1px solid rgba(255,255,255,.26);border-radius:10px;font:600 10px/1 var(--font);letter-spacing:.3em;color:var(--ink-3)}
body.hs-polished .hs-yard-note{position:absolute;left:12px;bottom:10px;font-size:11px;color:var(--ink-3)}
body.hs-polished #hs-yard-pins{position:absolute;inset:0}
body.hs-polished #hs-yard-pins > *{min-width:0;min-height:0;width:30px;height:30px;padding:0;border-radius:50%;font:620 12px/1 var(--font);background-color:rgba(255,255,255,.08);box-shadow:inset 0 1px 1px rgba(255,255,255,.75),inset 0 -6px 9px -4px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.22)}
body.hs-polished #hs-yard-pins > *::before{content:"";position:absolute;inset:-7px}
body.hs-polished #hs-yard-pins > *:hover{background-color:rgba(var(--tint),.34)}
body.hs-polished #hs-yard-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body.hs-polished #hs-yard-selection{flex:1 1 100%;font-size:12px;color:var(--ink-2)}
body.hs-polished #hs-yard-tools button{background-color:rgba(255,255,255,.09);font-size:13px}
body.hs-polished #hs-yard-place:not(:disabled){background-color:rgba(var(--tint),.3)}
body.hs-polished #hs-exterior-list{display:flex;flex-wrap:wrap;gap:6px;min-height:0;overflow:auto}
body.hs-polished #hs-exterior-list > *{padding:0 14px;font-size:13px;background-color:rgba(255,255,255,.08)}
body.hs-polished #hs-exterior-list > *:hover{background-color:rgba(var(--tint),.24)}
body.hs-polished .hs-yard-footnote{margin:0;font-size:11px;line-height:1.45;color:var(--ink-3)}
body.hs-polished .hs-export{align-self:flex-start;padding:0 14px;font-size:12px;color:var(--ink-2);background-color:rgba(255,255,255,.06)}

/* Optional hooks the root may set: guest builds hide authoring and developer UI */
html.hs-guest #hs-yard,html.hs-guest #hs-yard-tools,html.hs-guest .hs-yard-footnote,html.hs-guest .hs-export,html.hs-guest #gaps{display:none!important}

/* 4l · Realtor panel (optional; stays hidden until filled) */
body.hs-polished .hs-realtor{position:absolute;z-index:5;right:var(--er);bottom:calc(var(--sb) + 18px);display:flex;align-items:center;gap:12px;padding:8px 8px 8px 8px;border-radius:999px;pointer-events:auto}
.hs-realtor-photo{width:40px;height:40px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgba(255,255,255,.3)}
.hs-realtor-id{display:grid;gap:3px;padding-right:6px}
.hs-realtor-id strong{font:600 13.5px/1.1 var(--font);letter-spacing:-.01em}
.hs-realtor-id span{font-size:11.5px;color:var(--ink-3)}
.hs-realtor-cta{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;font:560 13px/1 var(--font);color:#fff;text-decoration:none;background:rgba(var(--tint),.24)}

/* 4m · Full-screen panorama modal: black strip, no heavy bar */
body.hs-polished #modal{background:#000}
body.hs-polished #modal header{position:static;display:flex;align-items:center;justify-content:space-between;height:calc(52px + var(--st));padding:var(--st) var(--er) 0 var(--el);border:0;background:#000}
body.hs-polished #modal header strong{font:600 12px/1 var(--font);letter-spacing:.16em;text-transform:uppercase;color:var(--ink-2)}
body.hs-polished #closePano{padding:0 18px}
body.hs-polished #pano{background:#000}

/* 5 · Panorama page */
#viewer{position:relative;width:100%;height:100dvh;overflow:hidden;background:#000;color:var(--ink);font-family:var(--font)}
#viewer #panorama,#viewer #fallback{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:#000;touch-action:none}
#viewer .vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(130% 95% at 50% 45%,transparent 58%,rgba(0,0,0,.55)),linear-gradient(rgba(0,0,0,.4),transparent 22%,transparent 72%,rgba(0,0,0,.5))}
#viewer :is(button,a){position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:var(--hit);min-height:var(--hit);padding:0 18px;border:0;border-radius:999px;font:560 14px/1 var(--font);letter-spacing:-.006em;color:var(--ink);text-decoration:none;background-color:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:background-color .22s var(--ease),scale .22s var(--ease),box-shadow .25s var(--ease)}
#viewer :is(button,a):active{scale:.97}
#viewer .glass:is(button,a):hover{background-color:rgba(255,255,255,.14)}

#viewer .topbar{position:absolute;inset:0 0 auto 0;z-index:5;display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:"back brand rooms" "back address rooms";align-items:center;column-gap:12px;padding:calc(var(--st) + 12px) var(--er) 0 var(--el);pointer-events:none}
#viewer .topbar > *{pointer-events:auto}
#viewer .back{grid-area:back;justify-self:start}
#viewer #roomsButton{grid-area:rooms;justify-self:end}
#viewer #brand{grid-area:brand;justify-self:center;pointer-events:none;font:600 11px/1 var(--font);letter-spacing:.3em;text-transform:uppercase;color:var(--ink-3)}
#viewer #propertyAddress{grid-area:address;justify-self:center;margin-top:4px;pointer-events:none;font:560 15px/1.2 var(--font);letter-spacing:-.012em;text-shadow:0 1px 14px rgba(0,0,0,.9)}

#viewer .room-caption{position:absolute;z-index:3;left:var(--el);bottom:calc(var(--sb) + 26px);max-width:min(460px,46vw);pointer-events:none;text-shadow:0 2px 20px rgba(0,0,0,.9);animation:roam-rise .6s var(--ease) backwards}
#viewer .eyebrow{display:block;font:600 10.5px/1 var(--font);letter-spacing:.24em;text-transform:uppercase;color:var(--ink-2)}
#viewer #roomName{margin:10px 0 6px;font:600 clamp(26px,3.6vw,40px)/1.04 var(--font);letter-spacing:-.03em}
#viewer #roomMeta{margin:0;font:450 14px/1.4 var(--font);color:var(--ink-2)}

#viewer .controls{position:absolute;z-index:4;right:var(--er);bottom:calc(var(--sb) + 18px);display:flex;align-items:center;gap:2px;padding:6px;border-radius:999px}
#viewer .controls button{width:44px;padding:0;font-size:22px;font-weight:400;color:var(--ink-2)}
#viewer .controls button:hover{background-color:rgba(255,255,255,.12);color:#fff}
#viewer #fullscreen{font-size:18px}
#viewer .dragHint{padding:0 10px;font:500 12px/1 var(--font);letter-spacing:.02em;color:var(--ink-3);white-space:nowrap}

#viewer .rooms{position:absolute;z-index:6;top:calc(var(--st) + 72px);right:var(--er);width:min(340px,calc(100% - 32px));max-height:calc(100% - var(--st) - 72px - var(--sb) - 96px);display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:30px;overflow:hidden;animation:roam-rise .4s var(--ease) backwards}
#viewer .rooms-heading{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 4px 12px}
#viewer .rooms h2{margin:0;font:600 17px/1.2 var(--font);letter-spacing:-.02em}
#viewer #closeRooms{width:44px;padding:0;font-size:22px;font-weight:400}
#viewer #roomsList{display:grid;gap:2px;min-height:0;overflow:auto}
#viewer #roomsList :is(button,a){justify-content:flex-start;width:100%;min-height:48px;padding:0 14px;border-radius:18px;text-align:left;font-weight:500;color:var(--ink-2)}
#viewer #roomsList :is(button,a):hover{background-color:rgba(255,255,255,.1);color:#fff}
#viewer #roomsList :is([aria-current],[aria-pressed="true"],.active,.current){color:#fff;background-color:rgba(var(--tint),.22);box-shadow:inset 0 1px 1px rgba(255,255,255,.5)}

/* Floor circles (provisional: assumes #targets holds absolutely placed <button>/<a>) */
#viewer #targets{position:absolute;inset:0;pointer-events:none;transition:opacity .5s var(--ease)}
#viewer[aria-busy="true"] #targets{opacity:0}
#viewer #targets :is(button,a){position:absolute;display:inline-flex;align-items:center;gap:9px;min-height:36px;min-width:0;padding:0 15px 0 10px;border-radius:999px;pointer-events:auto;white-space:nowrap;font:600 13px/1 var(--font);letter-spacing:-.004em;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.75);background-color:rgba(8,12,12,.38);background-image:var(--spec);-webkit-backdrop-filter:var(--glass-filter);backdrop-filter:var(--glass-filter);box-shadow:var(--thick),0 0 0 1px rgba(var(--tint),.45)}
#viewer #targets :is(button,a)::before{content:"";width:14px;height:14px;border-radius:50%;background:radial-gradient(circle at 32% 25%,#fff,rgb(var(--tint)) 65%);animation:roam-pulse 2.4s ease-out infinite}
#viewer #targets :is(button,a)::after{content:"";position:absolute;inset:-6px;border-radius:inherit}
#viewer #targets :is(button,a):hover{scale:1.05;background-color:rgba(8,28,26,.62)}
#viewer #targets :is(button,a):focus-visible{box-shadow:var(--thick),0 0 0 3px rgba(0,0,0,.85)}

#viewer .loading{position:absolute;inset:0;z-index:7;display:grid;place-content:center;justify-items:center;gap:16px;background:#000;font:500 13px/1 var(--font);letter-spacing:.06em;color:var(--ink-2);transition:opacity .6s var(--ease),visibility .6s}
#viewer[aria-busy="false"] .loading{opacity:0;visibility:hidden;pointer-events:none}
#viewer .spinner{width:30px;height:30px;border-radius:50%;border:2px solid rgba(255,255,255,.16);border-top-color:rgb(var(--tint));animation:roam-spin 1s linear infinite}
#viewer .error{position:absolute;z-index:8;inset:0;margin:auto;width:min(340px,calc(100% - 32px));height:max-content;padding:22px;border-radius:30px;display:grid;gap:14px;justify-items:center;text-align:center}
#viewer #errorText{margin:0;font-size:14px;line-height:1.45;color:var(--ink-2)}
#viewer #retry{background-color:rgba(var(--tint),.3)}

/* Hide the first-load caption entrance on repeat navigation by re-adding the class from JS if desired */

/* 6 · MLS: keep the property address, drop brand / realtor / outbound */
html.mls .hs-brand-mark,html.mls .hs-wordmark,html.mls #brand,html.mls .hs-realtor,html.mls #gaps,
html.mls [data-outbound],html.mls a[target="_blank"],html.mls a[rel~="external"]{display:none!important}
html.mls .hs-brand > span:last-child{font-size:0;letter-spacing:0}  /* fallback when .hs-wordmark wrapper is absent */
html.mls .hs-brand{gap:0}

/* 7 · Small screens */
@media (max-width:700px){
  :root{--dock-h:106px}
  body.hs-polished .hs-dock{display:grid;grid-template-columns:1fr 1fr;width:calc(100% - 24px);border-radius:30px}
  body.hs-polished .hs-dock-divider{display:none}
  body.hs-polished .hs-dock button{padding:0 12px;font-size:13px}
  body.hs-polished > header{justify-content:flex-start;padding-top:calc(var(--st) + 70px)}
  body.hs-polished > header .tools a{display:none}
  body.hs-polished #status{top:calc(var(--st) + 128px)}
  body.hs-polished #selection,body.hs-polished .hs-yard-panel{left:12px;right:12px;top:auto;width:auto;bottom:calc(var(--sb) + 18px + var(--dock-h) + 12px)}
  body.hs-polished .hs-yard-panel{max-height:min(62dvh,calc(100% - var(--st) - 200px))}
  body.hs-polished #selection.show{grid-template-columns:72px 1fr;align-items:center}
  body.hs-polished #selection img{grid-row:span 2;width:72px;height:72px}
  body.hs-polished #selection .tools,body.hs-polished #selection p{grid-column:1 / -1}
  body.hs-polished .hs-realtor{left:12px;right:auto;bottom:calc(var(--sb) + 18px + var(--dock-h) + 12px)}
  body.hs-polished .hs-realtor-cta{display:none}
  #viewer .controls{inset-inline:0;margin-inline:auto;width:max-content}
  #viewer .dragHint{display:none}
  #viewer .room-caption{bottom:calc(var(--sb) + 18px + 56px + 18px);max-width:calc(100% - 40px)}
  #viewer .hs-realtor{top:calc(var(--st) + 74px);left:12px;bottom:auto}
}

/* 8 · Accessibility and fallbacks */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media (prefers-reduced-transparency:reduce){
  :root{--glass-filter:none}
  body.hs-polished .hs-dock,body.hs-polished #controls,body.hs-polished #selection,body.hs-polished #gaps,
  body.hs-polished .hs-yard-panel,body.hs-polished .hs-realtor,body.hs-polished > header .tools,#viewer .glass{background-color:rgba(14,18,18,.94);background-image:none}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  body.hs-polished .hs-dock,body.hs-polished #controls,body.hs-polished #selection,body.hs-polished #gaps,
  body.hs-polished .hs-yard-panel,body.hs-polished > header .tools,#viewer .glass{background-color:rgba(16,20,20,.88)}
}
@media (prefers-contrast:more){
  :root{--ink-2:#fff;--ink-3:rgba(255,255,255,.86)}
  body.hs-polished .hs-dock,body.hs-polished #controls,body.hs-polished #selection,body.hs-polished .hs-yard-panel,#viewer .glass{background-color:rgba(0,0,0,.78)}
}
@media (forced-colors:active){
  body.hs-polished :is(button,a),#viewer :is(button,a){border:1px solid ButtonText}
}

/* DOM integration: keep world markers anchored, original orb silhouettes, and address visible in MLS. */
body.hs-polished .pin,body.hs-polished #hs-yard-pins>*{position:absolute}
body.hs-polished .pin:hover{scale:1;box-shadow:inset 0 1px 1px #fff,0 0 0 1px #b5ffef,0 0 24px #8ce5cf99}
body.hs-polished #controls{bottom:auto;transform:none}
body.hs-polished #selection{left:auto;bottom:auto}
body.hs-polished #modal #pano{height:calc(100% - 52px - var(--st))}
html.mls body.hs-polished>header>div:first-child{position:absolute;left:var(--el);top:calc(var(--st) + 18px);width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;max-width:46vw}
html.mls body.hs-polished>header h1{font:560 15px/1.2 var(--font);margin:0}
html.mls body.hs-polished>header small{display:none}
#viewer .topbar{grid-template-areas:"back brand actions";grid-template-columns:1fr auto 1fr}
#viewer .top-actions{grid-area:actions;justify-self:end;display:flex;gap:8px}
#viewer .controls{left:auto;transform:none}
#viewer .target{flex-direction:column;gap:5px}
#viewer #targets .target{min-height:0;padding:0;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border-radius:0;font-size:11px}
#viewer #targets .target::before,#viewer #targets .target::after{display:none}
#viewer #targets .target:hover{scale:1;background:none}
#viewer .target-label{background:#0008;border-color:#fff3}
#viewer .target:hover .target-orb{box-shadow:inset 0 1px 2px #fff,0 0 28px #b5ffefaa}
#viewer .loading{left:0;top:0;transform:none;border-radius:0;border:0}
#viewer .error{left:0;top:0;transform:none}
#viewer .rooms{bottom:auto}
#viewer #roomsList [aria-current="false"]{background:none;box-shadow:none;color:var(--ink-2)}
@media(max-width:700px){
 :root{--dock-h:150px}
 body.hs-polished .hs-dock #hs-start{grid-column:1/-1}
 body.hs-polished #gaps{bottom:calc(var(--sb) + 18px + var(--dock-h) + 14px)}
 #viewer .controls{left:0;right:0;transform:none}
 #viewer .topbar{grid-template-columns:1fr auto;grid-template-areas:"back actions"}
 #viewer #brand{display:none}
 #viewer .topbar :is(button,a){padding:0 12px;font-size:12px}
}

body.hs-polished #controls #rotate{font-size:0}body.hs-polished #controls #rotate::before{font-size:20px}

@media(max-width:700px){body.hs-polished #controls #roofControl{display:none!important}}

/* Phone landscape keeps the stage open and the tour dock to a single row. */
@media(orientation:landscape) and (max-height:500px){
 :root{--dock-h:56px}
 body.hs-polished .hs-dock{display:flex;width:max-content;max-width:calc(100% - 24px);bottom:calc(var(--sb) + 10px);padding:4px;border-radius:999px;overflow:auto}
 body.hs-polished .hs-dock button{padding:0 12px;font-size:12px}
 body.hs-polished .hs-dock #hs-start{grid-column:auto}
 body.hs-polished .hs-dock-divider{display:block}
 body.hs-polished .hs-brand{top:calc(var(--st) + 12px);gap:8px}
 body.hs-polished .hs-brand-mark{width:28px;height:28px}
 body.hs-polished .hs-brand small{font-size:12px}
 body.hs-polished>header{justify-content:flex-end;padding-top:calc(var(--st) + 8px)}
 body.hs-polished>header .tools :is(button,a){padding:0 12px;font-size:12px}
 body.hs-polished>header .tools a,body.hs-polished #status,body.hs-polished #controls #roofControl{display:none!important}
 body.hs-polished .hs-room{bottom:calc(var(--sb) + 76px)}
 body.hs-polished #hs-room-kicker{display:none}
 body.hs-polished #hs-room-title{font-size:18px}
 body.hs-polished #controls{padding:3px}
 body.hs-polished #controls button,body.hs-polished #showPins,body.hs-polished #controls>label:not(#roofControl){height:40px;min-height:40px;width:40px}
 body.hs-polished .hs-yard-panel{left:auto;right:72px;top:64px;bottom:78px;max-height:none;width:min(372px,calc(100% - 96px));overflow:auto}
 body.hs-polished #gaps{display:none}
 #viewer .room-caption{bottom:18px;max-width:44vw}
 #viewer #roomName{font-size:24px;margin:6px 0}
 #viewer .eyebrow{display:none}
 #viewer .controls{inset-inline:auto;left:auto;right:var(--er);margin:0;bottom:12px}
}

body.hs-polished #modal header{flex-direction:row;gap:12px;align-items:center}body.hs-polished #modal header strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.hs-polished #closePano{flex:0 0 auto;white-space:nowrap;font-size:12px}

/* Compact viewing controls: leave the property visible. */
body.hs-polished .hs-brand{top:calc(var(--st) + 12px);gap:8px}
body.hs-polished .hs-brand-mark{width:24px;height:24px;font-size:13px}
body.hs-polished .hs-brand>span:last-child{font-size:8px;gap:3px}
body.hs-polished .hs-brand small{font-size:12px}
body.hs-polished>header{padding-top:calc(var(--st) + 8px)}
body.hs-polished>header .tools{padding:3px;gap:1px}
body.hs-polished>header .tools :is(button,a){min-height:30px;min-width:38px;padding:0 10px;font-size:11px}
body.hs-polished>header .tools a,body.hs-polished #status,body.hs-polished #gaps{display:none!important}
body.hs-polished #controls{top:auto;bottom:calc(var(--sb) + 66px);right:12px;left:auto;translate:none;transform:none;gap:2px;padding:3px;border-radius:20px}
body.hs-polished #controls button{min-height:30px;height:30px;width:30px;min-width:30px;font-size:18px}
body.hs-polished #controls #rotate,body.hs-polished #controls>label,body.hs-polished #controls #roofControl{display:none!important}
body.hs-polished .hs-dock{display:flex;grid-template-columns:none;align-items:center;width:max-content;max-width:calc(100% - 20px);bottom:calc(var(--sb) + 10px);padding:4px;gap:1px;border-radius:24px;overflow:visible}
body.hs-polished .hs-dock button{min-height:34px;min-width:34px;padding:0 11px;font-size:11px;white-space:nowrap}
body.hs-polished .hs-dock button::before{content:'';position:absolute;inset:-5px 0}
body.hs-polished .hs-dock #hs-start{grid-column:auto}
body.hs-polished .hs-dock-divider{display:none}
body.hs-polished .hs-dock #hs-whole,body.hs-polished .hs-dock #hs-share{padding:0;width:34px;font-size:18px}
body.hs-polished .hs-count{display:none}
body.hs-polished .pin{width:19px;height:19px;font-size:9px}
body.hs-polished .pin::before{inset:-12px}
body.hs-polished .pin::after{display:none}
body.hs-polished .hs-room{bottom:calc(var(--sb) + 64px);gap:9px}
body.hs-polished #hs-room-title{font-size:16px}
body.hs-polished #hs-room-kicker{display:none}
body.hs-polished #hs-room-enter{min-height:32px;padding:0 12px;font-size:11px}
body.hs-polished #hs-presentation:not(.hs-playing) .hs-room:has(#hs-room-enter[hidden]){display:none}
body.hs-polished #selection.show{display:none}
body.hs-polished .hs-yard-panel{top:64px;bottom:64px;max-height:calc(100% - 128px);right:12px;width:min(330px,calc(100% - 24px));border-radius:22px;padding:14px;overflow:auto}
body.hs-polished #modal header{height:calc(40px + var(--st));padding-top:var(--st);flex-direction:row}
body.hs-polished #modal header strong{font-size:9px;letter-spacing:.08em}
body.hs-polished #closePano{min-height:30px;padding:0 12px;font-size:10px}
body.hs-polished #modal #pano{height:calc(100% - 40px - var(--st))}
#viewer .topbar :is(button,a){min-height:32px;font-size:11px;padding:0 12px}
#viewer .top-actions{gap:6px}
#viewer .controls{padding:3px;gap:1px;border-radius:22px}
#viewer .controls button{min-height:32px;min-width:32px;width:32px;font-size:18px}
#viewer .dragHint{display:none}
#viewer .room-caption{bottom:calc(var(--sb) + 64px)}
#viewer #roomName{font-size:24px;margin:6px 0}
#viewer #roomMeta{font-size:10px}
#viewer .eyebrow{display:none}
#viewer .target-orb{width:32px;height:32px}
#viewer .target-orb::before{left:7px;right:8px;top:4px;height:6px}
#viewer .target-label{font-size:10px;padding:3px 6px}
@media(max-width:700px){
 :root{--dock-h:42px}
 body.hs-polished>header{justify-content:flex-end;padding-top:calc(var(--st) + 9px)}
 body.hs-polished .hs-brand-mark{display:none}
 body.hs-polished .hs-brand small{font-size:11px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.hs-polished .hs-brand>span:last-child{font-size:7px;max-width:180px}
 html.mls body.hs-polished>header>div:first-child{top:calc(var(--st) + 17px);max-width:48vw}
 html.mls body.hs-polished>header h1{font-size:11px}
 #viewer .controls{left:auto;right:12px;bottom:calc(var(--sb) + 12px);margin:0}
 body.hs-polished .hs-yard-panel{left:12px;right:12px;width:auto}
}
@media(orientation:landscape) and (max-height:500px){
 body.hs-polished .hs-dock{bottom:calc(var(--sb) + 8px)}
 body.hs-polished #controls{top:50%;bottom:auto;translate:0 -50%}
 body.hs-polished .hs-yard-panel{left:auto;right:54px;top:54px;bottom:58px;width:min(330px,calc(100% - 80px));max-height:none}
 #viewer .room-caption{bottom:18px}
}

body.hs-polished .hs-dock #hs-share,body.hs-polished .hs-dock #hs-whole{min-width:34px}
@media(max-width:700px){body.hs-polished>header{flex-direction:row;align-items:flex-start}body.hs-polished .hs-brand small,body.hs-polished .hs-brand>span:last-child{max-width:calc(100vw - 204px)}}

/* Recovered scan positions remain distinct from archive poses. */
.pin.photo-recovered{border-color:rgba(255,202,117,.8);box-shadow:0 0 12px rgba(255,188,83,.28);}

/* The camera owns touch gestures; the document never rubber-bands or scrolls. */
html,body{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body.hs-polished main,#viewer{width:100%;height:100%!important;overflow:hidden;overscroll-behavior:none}
#canvas,#panorama{touch-action:none;user-select:none;-webkit-user-select:none;filter:none!important;will-change:auto!important}
body.hs-polished #modal{overflow:hidden;overscroll-behavior:none}
body.hs-polished #modal #pano{flex:1 1 0;min-height:0;height:0!important;display:block;overscroll-behavior:none}
.rooms,.hs-yard-panel,#gaps{overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}

/* The scene and its bubbles share one gesture surface. */
body.hs-polished main,#viewer,#pins,.pin,#targets,.target{touch-action:none;-webkit-user-select:none;user-select:none}
