/* SpatialStay experience shell. Does not change the canvas or rendering settings. */
:root{--muted:#606457;--ui-stroke:#d4d1c5;--ui-paper:#f6f2e9;--ui-focus:#705632;--ui-gap:8px}
::selection{background:#d7c6a9;color:var(--ink)}
button,a,input,select,summary{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
button:disabled{cursor:wait;opacity:.5}
button svg,a svg,summary svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
#experience{height:100svh;min-height:0}
.vignette{background:linear-gradient(180deg,transparent 72%,rgba(18,23,20,.24));pointer-events:none}
header{padding:20px 24px;gap:16px;align-items:flex-start;pointer-events:none}
header>*{pointer-events:auto}
.identity{display:flex;align-items:center;gap:18px;padding:10px 14px;background:var(--ui-paper);border-radius:12px}
.brand{gap:8px;font-size:9px;letter-spacing:1.4px}
.brand-mark{width:32px;height:32px;font-size:25px}
.property-heading{margin:0;padding-left:18px;border-left:1px solid var(--ui-stroke);text-align:left}
h1{margin:0;font-size:23px;line-height:1.18;letter-spacing:-.03em}
.property-location{margin:3px 0 0;color:var(--muted);font-size:11px;line-height:1.3}
.title-dot{display:none}
.header-actions{display:flex;gap:6px;align-items:center;padding:4px;background:var(--ui-paper);border-radius:12px}
.icon-button{display:flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border:0;border-radius:8px;background:none;font:inherit}
.icon-button:hover,.scene-controls summary:hover,.scene-controls button:hover,.views button:hover{background:#e5dfd1}
.presence{position:static}
#peopleButton{min-height:44px;gap:7px;padding:0 12px;background:none;border:0;border-radius:8px;backdrop-filter:none;font-size:11px;white-space:nowrap}
#peopleButton i{display:none}
body[data-world=online] #peopleButton i{box-shadow:none}
.scene-caption,#sceneNumber,.tour-intro{display:none!important}
.scene-controls{position:absolute;z-index:4;right:24px;top:92px;width:280px;color:var(--ink)}
.scene-controls>summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;width:max-content;margin-left:auto;padding:0 14px;border-radius:8px;background:var(--ui-paper);font-size:12px;cursor:pointer}
.scene-controls>summary::-webkit-details-marker{display:none}
.scene-controls .disclosure-icon{width:14px;height:14px;margin-left:4px}
.scene-controls[open] .disclosure-icon{transform:rotate(180deg)}
.scene-controls-body{margin-top:8px;padding:16px;background:var(--ui-paper);border-radius:12px;max-height:calc(100svh - 176px);overflow:auto;scrollbar-color:#b7ad99 var(--ui-paper);scrollbar-width:thin}
.scene-controls .lighting{position:static;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:0;border:0;border-radius:0;background:none;font-size:12px;overflow:visible}
.scene-controls .lighting>span{display:block;grid-column:1/-1;margin-bottom:5px;padding:0;font-size:12px;letter-spacing:0;font-weight:600}
.scene-controls .lighting button{min-height:44px;padding:8px 9px;border-radius:6px;font-size:12px}
.scene-controls .lighting button.selected{background:#262c24;color:var(--ui-paper)}
.scene-controls .lamp-toggle{grid-column:1/-1;justify-content:center;margin:4px 0 0;border:1px solid var(--ui-stroke)!important;border-radius:6px!important}
.scene-controls .lamp-toggle span{display:inline}
.scene-controls .lamp-toggle.selected i{box-shadow:none;background:#936b3d}
.scene-controls .space-actions,.scene-controls .walk-actions,.walking .scene-controls .space-actions,.walking .scene-controls .walk-actions{position:static;inset:auto;display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.scene-controls .walk-actions{display:none}
.scene-controls .space-actions button,.scene-controls .walk-actions button{flex:1;min-height:44px;padding:9px 11px;border:1px solid var(--ui-stroke);border-radius:6px;background:none;color:var(--ink);backdrop-filter:none;font-size:12px}
.scene-controls .space-actions button[aria-pressed=true],.scene-controls .walk-actions button[aria-pressed=true]{background:#262c24;color:var(--ui-paper)}
.walking .scene-controls #roofButton{display:none}
.scene-help{margin:16px 0 0;padding-top:14px;border-top:1px solid var(--ui-stroke);font-size:11px;line-height:1.65;color:var(--muted)}
.touch-control-help{display:none}
.scene-info-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;width:100%;margin-top:12px;border:1px solid var(--ui-stroke);border-radius:6px;background:none;font-size:12px}
.scene-controls #infoButton{font:500 12px 'DM Sans',sans-serif}
.bottom-area,.walking .bottom-area{left:24px;right:24px;bottom:max(20px,env(safe-area-inset-bottom));pointer-events:none;color:var(--ink)}
.tour-dock{width:max-content;max-width:100%;margin:0 auto;padding:5px;gap:5px;border:0;border-radius:12px;background:var(--ui-paper);pointer-events:auto}
.views{min-width:0;gap:2px;overflow:auto;scrollbar-width:thin;scrollbar-color:#b7ad99 var(--ui-paper)}
.views button{min-height:44px;padding:10px 13px;font-size:12px;gap:0;border-radius:7px;flex-shrink:0}
.views button span{display:none}
.views button.active{background:#e5dfd1;color:var(--ink)}
#walkButton{order:-1;display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;min-width:156px;padding:10px 18px;border-radius:7px;font-size:12px;font-weight:500}
#walkButton span{margin:0}
#walkButton:hover{background:#3b4235}
#walkButton[aria-pressed=true]{background:#705632}
#walkButton[aria-pressed=true]:hover{background:#5b4528}
#roomViewsButton{display:none;align-items:center;justify-content:center;gap:8px;min-height:44px;border:0;border-radius:7px;padding:10px 14px;background:none;font-size:12px;white-space:nowrap}
#walkHint{top:auto;bottom:88px;left:50%;max-width:calc(100% - 48px);padding:9px 13px;border:0;border-radius:8px;background:#262c24;color:var(--ui-paper);font-size:11px;line-height:1.5;white-space:normal;text-align:center;pointer-events:none}
#walkHint kbd{background:none;border:0;border-bottom:1px solid #f6f2e966;padding:0 2px;border-radius:0;font:500 11px 'DM Sans',sans-serif}
dialog{max-height:calc(100svh - 32px);overflow:auto;border-radius:12px;padding:32px;scrollbar-color:#b7ad99 var(--ui-paper);scrollbar-width:thin}
dialog::backdrop{background:#14191082;backdrop-filter:none}
dialog h2,#settings h2{margin:0 0 24px;font-size:28px;letter-spacing:-.03em}
.dialog-close{display:flex;align-items:center;justify-content:center;right:10px;top:10px;width:44px;height:44px;border-radius:7px}
dialog .info-footer{display:flex;flex-direction:column;gap:12px;margin:24px 0 0;padding-top:18px;border-top:1px solid var(--ui-stroke);font-size:11px;color:var(--muted);opacity:1}
.walking dialog .info-footer{display:flex}
.info-footer a{display:inline-flex;align-items:center;gap:6px;min-height:44px;color:var(--ink);text-decoration:underline;text-underline-offset:4px;font-size:12px}
.settings-grid{gap:8px 20px}
.settings-grid .row{min-height:44px;grid-template-columns:180px 1fr}
.settings-grid select{min-height:44px;color:var(--ink)}
.settings-grid input[type=range]{min-height:44px;cursor:pointer}
.check{min-height:44px;gap:10px;line-height:1.4}
.check input{flex:none;width:18px;height:18px}
.settings-actions{flex-wrap:wrap;gap:8px;margin-top:24px}
.settings-actions button,.guest-row button,.people-list li button{min-height:44px}
#settings[open]{display:flex;flex-direction:column;overflow:hidden}
#settings h2,#settings .keys,#settings .settings-actions{flex:none}
#settings .settings-grid{flex:1 1 auto;min-height:0;overflow:auto;scrollbar-color:#b7ad99 var(--ui-paper);scrollbar-width:thin;padding:3px 4px 3px 0}
.guest-row input{min-width:0;caret-color:#705632}
.swatches button{width:36px;height:36px;position:relative}
.swatches button::after{content:'';position:absolute;inset:-4px}
#fps{top:86px;left:24px;right:auto}
#worldToast{top:90px;max-width:calc(100% - 48px);white-space:normal;text-align:center;line-height:1.5;border-radius:8px}
body.clean .scene-controls,body.clean .presence{display:none}
/* portal.js appends its base style later. Higher specificity keeps this shell authoritative. */
body .portal-label{z-index:2;display:flex;align-items:center;justify-content:center;gap:0;min-height:44px;max-width:calc(100vw - 32px);padding:0 14px;border:0;border-radius:8px;background:var(--ui-paper);color:var(--ink);font:500 12px/1.3 'DM Sans',sans-serif;white-space:nowrap;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
body .portal-label>span,body .portal-label>em{display:none}
body .portal-label>strong{font:inherit}
body .portal-label:hover{background:#e5dfd1}
body:has(#sceneControls[open]) .portal-label,body:has(.room-views-open) .portal-label,body:has(dialog[open]) .portal-label,body:has(#loader:not([hidden])) .portal-label,body:has(#error:not([hidden])) .portal-label,body.clean .portal-label{visibility:hidden!important;pointer-events:none!important}
@media(max-width:900px){header{padding:16px}.identity{gap:10px;padding:9px 11px}.brand span:not(.brand-mark){display:none}.property-heading{padding-left:10px}.property-location{font-size:10px}.bottom-area,.walking .bottom-area{left:16px;right:16px}.views button{padding-inline:10px;font-size:11px}#walkButton{min-width:142px;padding-inline:14px}.scene-controls{right:16px;top:88px}}
@media(max-width:600px){
  header{padding:12px;gap:8px;align-items:center}.identity{gap:8px;padding:8px;min-width:0;border-radius:10px}.brand-mark{width:28px;height:28px;font-size:22px}.property-heading{padding:0;border:0;min-width:0}.property-heading h1{font-size:19px;letter-spacing:-.03em;white-space:nowrap}.property-location{display:none}.walking .property-heading{visibility:visible}
  .header-actions{gap:0;padding:2px;border-radius:10px}.icon-button{width:44px;height:44px}.presence{position:static}#peopleButton{width:44px;height:44px;min-height:44px;padding:0;justify-content:center}#peopleCount{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .scene-controls{right:12px;top:72px;width:min(280px,calc(100% - 24px))}.scene-controls>summary{min-height:44px;padding:0 12px;font-size:11px}.scene-controls-body{max-height:calc(100svh - 196px);padding:14px}
  .desktop-control-help{display:none}.touch-control-help{display:inline}
  .bottom-area,.walking .bottom-area{left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom))}.tour-dock{position:relative;width:100%;padding:4px;gap:4px;border-radius:10px;flex-direction:row}.tour-dock #walkButton{min-width:0;flex:1;min-height:44px;font-size:12px;padding:10px}.tour-dock #roomViewsButton{display:flex;flex:1}
  .tour-dock .views{display:none;position:absolute;left:0;right:0;bottom:calc(100% + 8px);padding:5px;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;overflow:visible;background:var(--ui-paper);border-radius:10px}.tour-dock.room-views-open .views{display:grid}.views button{min-width:0;min-height:44px;padding:9px 6px;font-size:11px;white-space:normal}.tour-dock.room-views-open #roomViewsButton{background:#e5dfd1}
  #sticks{bottom:calc(112px + env(safe-area-inset-bottom));padding:0 20px}.stick{width:108px;height:108px;backdrop-filter:none}.stick .knob{box-shadow:0 2px 8px #0003}.stick span{font-size:9px;letter-spacing:.08em}
  #walkHint{top:128px;bottom:auto;max-width:calc(100% - 32px);width:max-content;font-size:10px;padding:8px 12px}.mobile-hint{display:block}.desktop-hint{display:none}
  #fps{top:72px;left:12px;right:auto}#worldToast{top:124px;max-width:calc(100% - 24px);font-size:11px}
  dialog,#settings{padding:24px;max-height:calc(100svh - 24px)}dialog h2,#settings h2{font-size:25px;margin-bottom:20px}.settings-grid{grid-template-columns:1fr;gap:4px}.settings-grid .row{grid-column:auto;grid-template-columns:1fr;gap:2px;margin-bottom:8px}.settings-grid .check{min-height:44px}#settings .keys{display:none}#settings .settings-actions{margin-top:16px;padding-top:12px;border-top:1px solid var(--ui-stroke)}.settings-actions button{flex:1;padding-inline:12px}.info-facts{flex-wrap:wrap;font-size:11px;gap:12px}.info-footer a{max-width:none;text-align:left}
}
@media(max-width:359px){.identity{gap:6px;padding:8px 6px}.brand{display:none}.property-heading h1{font-size:19px}.header-actions .icon-button,#peopleButton{width:44px}.scene-controls{top:72px}}
@media(max-height:540px) and (pointer:coarse){header{padding:8px 12px}.property-location{display:none}.scene-controls{top:64px}.scene-controls-body{max-height:calc(100svh - 128px)}#sticks{bottom:90px}.stick{width:84px;height:84px}.stick .knob{width:38px;height:38px}#walkHint{display:none!important}}
@media(prefers-reduced-motion:reduce){.stick .knob{transition:none}}
