/* Let the browser own gestures inside panels; only the 3D canvas owns camera gestures. */
html body :is(.explore-panel,.store-list,.filters,.catalog-scroll,.product-panel,.cart-items,.chat-messages,.chat-suggestions,.search-results,.city-social-body,.city-social-people,.city-social-messages,.own-dialog,.room-access-dialog){touch-action:auto;-webkit-overflow-scrolling:touch;min-height:0}
html body :is(.catalog-scroll,.product-panel,.cart-items,.chat-messages,.search-results,.city-social-body){overscroll-behavior:contain}
html body .product-body #product-description{max-height:none;overflow:visible}
html body .store-list{overscroll-behavior-x:contain}
html body .store-card{scroll-snap-align:start;scroll-snap-stop:always}
html body{height:100dvh}
@media(max-width:760px),(max-width:1024px) and (max-height:600px),(pointer:coarse) and (max-height:600px){
  html body .topbar,html body.in-shop .topbar{height:44px;padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));gap:8px}
  html body .world-view,html body.in-shop .world-view{top:44px}
  html body .brand,html body.in-shop .brand{font-size:0;gap:0;letter-spacing:0}
  html body .brand-mark,html body.in-shop .brand-mark{width:28px;height:28px;font-size:18px;border-radius:8px}
  html body :is(.edition,.location,.top-divider,.search),html body.in-shop .edition{display:none}
  html body .market-home{display:block;font-size:10px}
  html body .city-owner-top,html body.in-shop .city-owner-top{margin-left:auto;font-size:10px!important;padding:7px 9px!important}
  html body .cart-button{padding:5px;gap:4px}
  html body .cart-word{display:none}
  html body .cart-button svg{width:20px;height:20px}
  html body .help-btn{display:grid;width:28px;height:28px}
  html body .explore-panel{height:auto;max-height:32%;padding:9px 10px;border-radius:14px 14px 0 0}
  html body .explore-panel :is(.city-create-banner,.interiors-open){display:none}
  html body .explore-panel .filters{margin:0 0 6px;gap:5px}
  html body .filters button{padding:7px 10px;font-size:10px}
  html body .store-card{flex:0 0 195px;min-width:195px}
  html body #map-view .maplibregl-ctrl-bottom-right{bottom:33%}
  html body .maplibregl-ctrl-top-right{top:8px!important}
  html body.in-shop .shop-top{top:7px;left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));gap:5px;display:flex;flex-wrap:nowrap}
  html body.in-shop .shop-title{padding:5px 8px;min-width:0;max-width:150px;flex:1;border-radius:8px}
  html body.in-shop .shop-title>span{display:none}
  html body.in-shop .shop-title h1{font-size:13px;margin:0;max-width:100%}
  html body.in-shop .shop-top .surface-button{font-size:9px;padding:8px;border-radius:10px}
  html body.in-shop #invite{width:auto;max-width:92px;margin-left:auto}
  html body.in-shop #owner-edit{top:39px;right:0;padding:7px}
  html body.in-shop #stream-open{position:absolute;top:78px;right:0;font-size:9px;padding:7px}
  html body.in-shop .city-social{top:46px;left:8px;width:235px;max-width:calc(100% - 64px)}
  html body.in-shop .city-social.is-collapsed{width:auto;max-width:170px}
  html body.in-shop .city-social-toggle{font-size:10px;padding:8px;gap:5px;min-height:32px}
  html body.in-shop .city-social:not(.is-collapsed){max-height:calc(100dvh - 155px)}
  html body .city-microphone-control{top:46px;right:8px}
  html body .city-room-mic{width:34px;min-height:34px;height:34px;padding:7px;border-radius:50%}
  html body .city-microphone-label{display:none}
  html body .city-microphone-icon{width:18px;height:18px}
  html body .room-audio-control{top:119px;right:8px}
  html body .room-audio-toggle{width:32px;height:32px;font-size:15px}
  html body.in-shop .walk-toolbar{bottom:max(8px,env(safe-area-inset-bottom));left:max(8px,env(safe-area-inset-left));gap:4px}
  html body.in-shop .mode-switch{padding:3px;border-radius:18px}
  html body.in-shop .mode-switch button{padding:8px 10px;font-size:10px}
  html body.in-shop .walk-toolbar>.surface-button{padding:6px 9px;font-size:16px}
  html body.in-shop .consultant-launch{bottom:max(8px,env(safe-area-inset-bottom));right:max(8px,env(safe-area-inset-right));padding:5px;border-radius:12px}
  html body.in-shop .consultant-launch>span:not(.robot-mini){display:none}
  html body.in-shop .robot-mini{width:27px;height:27px;font-size:18px}
  html body .showroom-actions{right:max(8px,env(safe-area-inset-right));bottom:53px;left:auto;transform:none;padding:3px;gap:2px;flex-direction:column;border-radius:14px}
  html body .showroom-action{min-width:34px;width:34px;height:34px;padding:6px;gap:0;border-radius:10px}
  html body .showroom-action :is(span,kbd){display:none}
  html body .showroom-action i{font-size:19px}
  html body .shared-table-launch{right:52px;bottom:54px;padding:8px 10px;font-size:10px;border-radius:12px}
  html body .carry-launch{left:110px;bottom:94px;padding:7px 10px;font-size:10px;border-radius:12px}
  html body .carry-panel{inset:7px;width:auto;max-width:none;max-height:calc(100dvh - 58px)}
  html body .showroom-hint{display:none}
  html body .showroom-joystick{left:max(17px,env(safe-area-inset-left));bottom:66px;width:84px;height:84px}
  html body .showroom-joystick>div{width:34px;height:34px}
  html body .showroom-target{font-size:10px;padding:7px 10px;max-width:60%}
  html body.in-shop :is(.product-panel,.consultant-panel){top:7px;bottom:7px;left:7px;right:7px;max-height:none}
  html body.in-shop .catalog-panel{inset:7px!important;width:auto;max-width:none;padding:0!important}
  html body .catalog-heading{padding:12px 14px 8px}
  html body .catalog-search-form{padding:0 14px}
  html body .catalog-filters{padding:8px 14px}
  html body .catalog-scroll{padding:10px 14px}
  html body :is(.product-panel,.cart-panel,.consultant-panel,.catalog-panel){max-height:calc(100dvh - 58px)}
  html body :is(.room-audio-settings,.city-microphone-feedback){max-height:calc(100dvh - 220px);overflow:auto}
}
@media(orientation:landscape) and (max-height:600px){
  html body .explore-panel{top:8px;bottom:8px;left:8px;right:auto;width:225px;height:auto;max-height:none;padding:10px;border-radius:13px}
  html body .explore-panel :is(.eyebrow,h1,.intro,.explore-note,.list-heading,.city-create-banner,.interiors-open){display:none}
  html body .explore-panel .filters{display:flex;overflow-x:auto;flex-wrap:nowrap;margin:0 0 8px}
  html body .explore-panel .store-list{display:grid;overflow:visible}
  html body .explore-panel .store-card{min-width:0}
  html body .store-card-top{padding:7px;gap:7px}
  html body .store-card-top img,html body .store-placeholder{width:36px;height:36px}
  html body .store-card-top h2{font-size:12px}
  html body .store-card-top p{font-size:9px}
  html body #map-view .maplibregl-ctrl-bottom-right{bottom:4px}
  html body.in-shop .shop-title{max-width:180px}
  html body .showroom-actions{flex-direction:row;bottom:8px;right:54px}
  html body .shared-table-launch{bottom:50px;right:8px}
  html body .carry-launch{bottom:8px;left:198px}
  html body .showroom-joystick{bottom:58px;width:78px;height:78px}
  html body.in-shop .city-social:not(.is-collapsed){max-height:calc(100dvh - 110px)}
  html body.in-shop #stream-open{position:static;max-width:110px;margin-left:0}
  html body.in-shop #owner-edit{position:static}
  html body .room-audio-control{top:88px}
  html body .product-panel>img{height:130px}
  html body .catalog-heading h2{font-size:17px}
  html body .catalog-heading p{margin:2px 0;font-size:10px}
  html body .catalog-filters{padding:4px 0;gap:6px}
  html body .catalog-search-form{margin:5px 0}
  html body .city-catalog .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  html body .city-catalog{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto}
  html body .catalog-heading{grid-column:1/-1;padding:7px 12px;align-items:center}
  html body .catalog-heading :is(.eyebrow,p){display:none}
  html body .catalog-heading h2{margin:0}
  html body .catalog-search-form{grid-column:1;padding:0 8px 6px 12px;margin:0;align-self:end}
  html body .catalog-search{min-height:34px}
  html body .catalog-search input{padding:7px 0}
  html body .catalog-filters{grid-column:2;padding:0 12px 6px 0;border:0}
  html body .catalog-filters label>span{display:none}
  html body .catalog-filters select{height:34px;padding-top:6px;padding-bottom:6px}
  html body .catalog-scroll{grid-column:1/-1}
  html body .catalog-footer{grid-column:1/-1;padding:7px 12px}
}

.showroom-point-prompt{position:absolute;top:82px;left:50%;transform:translateX(-50%);z-index:20;max-width:calc(100% - 32px);width:max-content;padding:8px 12px;border-radius:12px;background:#244536;color:#fff9ed;font:12px/1.4 Arial,sans-serif;pointer-events:none;text-align:center}
.showroom-point-prompt[hidden]{display:none}
@media(orientation:landscape) and (max-height:600px){.showroom-point-prompt{top:76px;max-width:50%;font-size:11px;padding:6px 9px}}

/* Keep the return buttons accessible while a shop panel is open. */
@media(max-width:700px){body.in-shop:has(#catalog-panel:not([hidden]),#consultant-panel:not([hidden])) .bc-topbar-inventory{visibility:hidden}}