/* Compact touch HUD. Loaded last; desktop and original command handlers remain. */
.mobile-command-list{display:none}
.touch-navigation{display:none;position:absolute;inset:0;pointer-events:none;z-index:48;user-select:none;-webkit-user-select:none}
.touch-navigation[hidden]{display:none!important}
@media(max-width:900px){
 :root{--mobile-safe-top:env(safe-area-inset-top,0px);--mobile-safe-bottom:env(safe-area-inset-bottom,0px);--mobile-safe-left:env(safe-area-inset-left,0px);--mobile-safe-right:env(safe-area-inset-right,0px);--mobile-hud-gap:10px;--mobile-dock-bottom:calc(10px + var(--mobile-safe-bottom));--mobile-stick-bottom:calc(84px + var(--mobile-safe-bottom))}
 html,body{overflow:hidden}#stage,#apartment-stage,.scene-tools,.scene-bottom,.apartment-toolbar,.apartment-bottom,#interior-action,#world-enter{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.header{height:52px;padding:0 8px;gap:8px}.brand{width:145px;height:52px;flex-shrink:0}.brand img{width:170px;height:85px}.header nav{display:none}.header-actions{margin-left:auto;gap:4px}.header .share,.header .contact{min-width:44px;min-height:44px}.header .contact{display:none}
 .experience,.immersive .experience{display:block;height:calc(100dvh - 52px);min-height:0;padding:0}.viewport,.immersive .viewport{margin:0;width:100%;height:100%;min-height:0;border-radius:0}.sidebar,.apartment-open #sidebar{display:none!important}
 .tour-embedded{--mobile-safe-top:0px}.tour-embedded .experience,.tour-embedded.immersive .experience{height:100dvh;padding:0}.tour-embedded .viewport{height:100%}
 .scene-caption,.scene-button,.apartment-toolbar>span,.apartment-toolbar button,.apartment-bottom,.view-switch{border-radius:12px;background:#fffef8ed;box-shadow:0 3px 18px #102d2517;border:1px solid #fefcf8a6}
 .apartment-open .scene-bottom,.apartment-open #choose-house,.apartment-open .scene-tools,.apartment-open #selection,.apartment-open #hotspots,.apartment-open #world-enter{display:none!important}
 .scene-top,.scene-note,.walk-guide,#mouse-hint,#minimap,#viewer-help,#mobile-walk,.apartment-touch,.apartment-instructions,.apartment-disclaimer,#apartment-room-chip,.apartment-floor-switch{display:none!important}
 /* Commands removed from the HUD remain in the existing More panel. */
 .scene-tools,.walk-mode .scene-tools{display:block;position:static;pointer-events:none}.scene-tools>button{display:none}.scene-tools #viewer-quality{display:flex;position:absolute;z-index:52;right:calc(10px + var(--mobile-safe-right));top:calc(8px + var(--mobile-safe-top));width:44px;height:44px;pointer-events:auto;font-size:0}
 #viewer-quality::after{content:'•••';font-size:17px;letter-spacing:1px}.apartment-open .scene-tools #viewer-quality{display:none}
 #choose-house{top:calc(8px + var(--mobile-safe-top));left:calc(10px + var(--mobile-safe-left));width:calc(100% - 74px - var(--mobile-safe-left) - var(--mobile-safe-right));max-width:290px;height:44px;min-height:44px;padding:0 14px;justify-content:space-between;font-size:12px;z-index:50}
 .scene-bottom{left:calc(10px + var(--mobile-safe-left));right:calc(10px + var(--mobile-safe-right));bottom:var(--mobile-dock-bottom);display:block;z-index:51}.view-switch{width:100%;padding:4px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.view-switch button{min-height:44px;padding:6px;justify-content:center;gap:6px;font-size:15px}.view-switch button span{font-size:11px}.view-switch button.active{background:#005a5a;border-radius:8px}
 #crosshair{opacity:.6;font-size:12px}.selection{top:calc(62px + var(--mobile-safe-top));left:10px;right:10px;width:auto;max-height:calc(100% - 150px - var(--mobile-safe-top));padding:16px;border-radius:14px;overflow:auto}.selection .close{min-width:44px;min-height:44px;right:3px;top:3px}.selection h3{margin:7px 42px 6px 0;font-size:20px}.selection p{font-size:11px;line-height:1.6;margin:8px 0}.selection .primary,.selection .secondary{min-height:44px}
 .apartment-toolbar{top:calc(8px + var(--mobile-safe-top));left:calc(10px + var(--mobile-safe-left));right:calc(10px + var(--mobile-safe-right));display:grid;grid-template-columns:44px minmax(0,1fr) 62px;gap:6px;align-items:stretch;flex-wrap:nowrap;z-index:51}
 .apartment-toolbar #apartment-exit,.apartment-toolbar #tour-navigate{order:0;margin:0;min-width:44px;width:44px;min-height:48px;padding:0;font-size:0;line-height:1}.apartment-toolbar #apartment-exit::before{content:'←';font-size:22px}.apartment-toolbar #tour-navigate::before{content:'▦';display:block;font-size:17px;line-height:1}.apartment-toolbar #tour-navigate::after{content:'Комнаты';display:block;font-size:9px;line-height:1;margin-top:4px}.apartment-toolbar #tour-navigate{width:62px;background:#fffef8ed;color:#005a5a}
 .apartment-toolbar #apartment-caption{order:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-width:0;max-width:none;width:auto;min-height:48px;flex-basis:auto;margin:0;padding:6px 10px;font-size:0;line-height:1.25;border-radius:12px;overflow:hidden;color:#184c44}
 #apartment-caption::before{content:attr(data-mobile-context);display:block;font-size:11px;font-weight:500;line-height:1.3;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#apartment-caption::after{content:attr(data-mobile-room);display:block;font-size:10px;font-weight:400;line-height:1.25;color:#657b71;max-width:100%;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .apartment-toolbar #apartment-source,.apartment-toolbar [data-environment]{display:none!important}
 .apartment-bottom{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));left:calc(10px + var(--mobile-safe-left));right:calc(10px + var(--mobile-safe-right));bottom:var(--mobile-dock-bottom);padding:4px;gap:3px;max-width:none;z-index:51}.apartment-bottom>button{min-width:0;width:100%;min-height:44px;padding:6px 4px;font-size:11px;white-space:nowrap;flex:none;box-shadow:none;border-radius:8px}.apartment-bottom #apartment-window,.apartment-bottom #interior-style-trigger{display:none!important}.apartment-bottom #viewer-more{font-size:11px}
 #interior-action,#world-enter{z-index:53;left:auto;right:calc(14px + var(--mobile-safe-right));bottom:calc(99px + var(--mobile-safe-bottom));transform:none;min-height:48px;max-width:calc(100% - 158px - var(--mobile-safe-left) - var(--mobile-safe-right));width:max-content;padding:10px 14px;font-size:12px;line-height:1.45;white-space:normal;border-radius:14px;box-shadow:0 4px 20px #15392d28}
 .touch-navigation:not([hidden]){display:block}.touch-navigation-stick{position:absolute;left:calc(16px + var(--mobile-safe-left));bottom:var(--mobile-stick-bottom);width:108px;height:108px;min-width:108px;min-height:108px;border:1px solid #fff9;border-radius:50%;background:radial-gradient(circle,#003f3f12 40%,#fff7 42%,#fff5 66%,#fff9 68%);box-shadow:0 3px 20px #103c3420;backdrop-filter:blur(5px);padding:0;touch-action:none;pointer-events:auto;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;outline-offset:4px}
 .touch-navigation-knob{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:#fffdf4ed;border:1px solid #fff;box-shadow:0 2px 8px #173f3433;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none;will-change:transform}.touch-navigation-knob::after{content:'';position:absolute;inset:15px;border:1px solid #738e83;border-radius:50%}
 .touch-navigation-look{pointer-events:none;position:absolute;right:calc(18px + var(--mobile-safe-right));bottom:calc(77px + var(--mobile-safe-bottom));font-size:0;color:white;text-shadow:0 1px 5px #001f1b;line-height:1.3}.touch-navigation-look::after{content:'Свайп — обзор';font-size:9px}.touch-navigation-stick::after{content:attr(data-label);position:absolute;left:0;right:0;bottom:-18px;font:9px/1.2 'Gotham Pro',sans-serif;color:white;text-shadow:0 1px 5px #001f1b;pointer-events:none}.touch-navigation[data-look-active=true] .touch-navigation-look{opacity:0}.touch-navigation[data-stick-active=true] .touch-navigation-stick::after{opacity:0}.touch-navigation-hint{position:absolute;left:calc(16px + var(--mobile-safe-left));bottom:calc(66px + var(--mobile-safe-bottom));width:108px;text-align:center;color:#fff;font-size:9px;line-height:1.2;text-shadow:0 1px 5px #001f1b;pointer-events:none}.touch-navigation[data-stick-active=true] .touch-navigation-stick{border-color:#e9d7b6;background-color:#005a5a26}
 body:has(dialog[open]) .touch-navigation,body:has(#viewer-options:not([hidden])) .touch-navigation,body:has(#environment-panel:not([hidden])) .touch-navigation,body:has(#interior-style-panel:not([hidden])) .touch-navigation{visibility:hidden}
 #viewer-options,#viewer-options.outside-options,#interior-style-panel,#environment-panel,.apartment-open #environment-panel{left:calc(8px + var(--mobile-safe-left));right:calc(8px + var(--mobile-safe-right));top:auto;bottom:calc(72px + var(--mobile-safe-bottom));width:auto;max-width:none;max-height:calc(100% - 140px - var(--mobile-safe-top) - var(--mobile-safe-bottom));padding:14px;border-radius:17px;overscroll-behavior:contain;scrollbar-width:thin;z-index:80}
 #viewer-options .viewer-options-heading,.style-heading,.environment-heading{position:sticky;top:-14px;z-index:2;background:#fffef9;padding:0 0 9px;margin:0 0 8px;min-height:44px;align-items:center}.viewer-options-heading button,.style-heading button,.environment-heading button{flex-shrink:0;min-width:44px;min-height:44px}.environment-heading h2{font-size:17px;margin:3px 0}.environment-heading small{display:none}
 #viewer-options .viewer-secondary,#viewer-options.outside-options .viewer-secondary,.mobile-command-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mobile-command-list{margin-top:7px}.mobile-command-list button{display:flex;align-items:center;gap:8px;min-height:48px;padding:10px 12px;text-align:left;font:11px/1.4 'Gotham Pro',sans-serif;color:#204f45;background:#f1f4ec;border:1px solid #d3ded3;border-radius:9px}.mobile-command-icon{width:18px;flex:0 0 18px;font-size:17px;text-align:center;color:#005a5a}.mobile-command-list button[hidden]{display:none!important}
 body:not(.apartment-open) #viewer-options .viewer-secondary>#apartment-furniture,body:not(.apartment-open) #viewer-options .viewer-secondary>#apartment-pointer,body:not(.apartment-open) #viewer-options .viewer-secondary>#apartment-reset,body:not(.apartment-open) #viewer-options .viewer-secondary>#interior-parking{display:none}
 #viewer-options .viewer-secondary>#concept-menu{display:none!important}
 #viewer-options .viewer-secondary button{min-height:48px;font-size:11px;padding:10px 12px;border-radius:9px}.tour-embedded .mobile-site-command{display:none!important}.quality-options{margin-top:18px}.quality-options button{min-height:44px}.quality-options p{font-size:10px;line-height:1.5}
 dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:calc(100dvh - 18px - var(--mobile-safe-top));border-radius:20px 20px 0 0;padding:0;overscroll-behavior:contain}dialog::backdrop{backdrop-filter:blur(3px)}.modal-header{position:sticky;top:0;z-index:5;min-height:64px;padding:10px 14px;background:#fffef9;border-bottom:1px solid #dce3dc;gap:12px}.modal-header h2{font-size:16px;line-height:1.4;margin:4px 0}.modal-header .smallcaps{font-size:8px}.modal-header>button{min-width:44px;min-height:44px;flex-shrink:0}#modal-body{padding:16px 14px calc(20px + var(--mobile-safe-bottom));overflow:visible}.floor-dialog,.room-picker{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}.floor-dialog button,.room-picker button{padding:12px;min-height:78px;gap:7px;min-width:0}.floor-dialog span,.room-picker span{font-size:12px;line-height:1.4;overflow-wrap:anywhere}.room-picker strong{font-size:20px}.room-picker small{font-size:10px}.tour-breadcrumb{gap:6px}.tour-breadcrumb button{min-height:44px;font-size:11px}.tour-access button,.navigation-actions button{min-height:44px}.helper{font-size:11px;line-height:1.6}.house-browser .house-picker{grid-template-columns:repeat(5,minmax(0,1fr))}
 #stream-status{top:calc(68px + var(--mobile-safe-top));font-size:11px;padding:9px 12px;max-width:calc(100% - 24px)}#stream-status button{min-width:44px;min-height:44px}.apartment-open #toast,#toast{bottom:calc(76px + var(--mobile-safe-bottom));max-width:calc(100% - 28px);width:max-content;padding:9px 13px;font-size:11px;line-height:1.5;border-radius:10px;pointer-events:none}
}
@media(max-width:900px) and (max-height:500px){
 :root{--mobile-stick-bottom:calc(72px + var(--mobile-safe-bottom));--mobile-dock-bottom:calc(6px + var(--mobile-safe-bottom))}
 .header{height:44px}.brand{height:44px}.experience,.immersive .experience{height:calc(100dvh - 44px)}.tour-embedded .experience,.tour-embedded.immersive .experience{height:100dvh}
 .apartment-toolbar{right:auto;max-width:430px;width:calc(100% - 28px - var(--mobile-safe-left) - var(--mobile-safe-right))}.apartment-toolbar #apartment-caption,.apartment-toolbar #apartment-exit,.apartment-toolbar #tour-navigate{min-height:44px}
 .apartment-bottom,.scene-bottom{left:50%;right:auto;transform:translateX(-50%);width:340px;max-width:calc(100% - 210px)}
 .touch-navigation-stick{width:92px;height:92px;min-width:92px;min-height:92px;left:calc(18px + var(--mobile-safe-left))}.touch-navigation-hint{display:none}.touch-navigation-look{bottom:calc(60px + var(--mobile-safe-bottom))}.touch-navigation-stick::after{bottom:-15px}
 #interior-action,#world-enter{bottom:calc(78px + var(--mobile-safe-bottom));right:calc(18px + var(--mobile-safe-right));max-width:220px}
 #viewer-options,#viewer-options.outside-options,#interior-style-panel,#environment-panel,.apartment-open #environment-panel{left:auto;right:calc(8px + var(--mobile-safe-right));top:8px;bottom:8px;width:min(370px,calc(100% - 24px));max-height:calc(100% - 16px);padding:12px}.viewer-options-heading,.style-heading,.environment-heading{top:-12px!important}.quality-options p{display:none}
 dialog{left:50%;right:auto;transform:translateX(-50%);width:min(660px,calc(100% - 24px));max-height:calc(100dvh - 12px);border-radius:16px 16px 0 0}.modal-header{min-height:52px;padding:5px 14px}.modal-header .smallcaps{display:none}.room-picker,.floor-dialog{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* Floor selection has its own bottom card. Keep the pan stick clear of both
   its current-unit and taller open-another-unit states. */
@media(max-width:900px) and (min-height:501px){
 .floor-layout-three-active{--mobile-stick-bottom:calc(284px + var(--mobile-safe-bottom))}
}
@media(max-width:900px) and (max-height:500px){
 .floor-layout-three-active .touch-navigation-stick{left:auto;right:calc(18px + var(--mobile-safe-right))}
}
