/* Mobile uses one expandable information layer; the scene remains the main surface. */
.mobile-only,.explore-dock .mobile-only,#mobile-location,#mobile-task{display:none}
body:not(.mobile-ui) .device-more{display:contents}body:not(.mobile-ui) .device-more>summary{display:none}
@media(max-width:767px),(max-height:500px) and (max-width:1023px){
 :root{--mobile-header:calc(56px + env(safe-area-inset-top,0px));--mobile-dock-bottom:calc(8px + env(safe-area-inset-bottom,0px));--mobile-context-bottom:calc(76px + env(safe-area-inset-bottom,0px));}
 .mobile-only,.explore-dock .mobile-only{display:flex}#mobile-location{display:block;font-size:10px;letter-spacing:0;line-height:1.3;max-width:108px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .app-header{height:var(--mobile-header);padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));background:#faf9f5f2}
 .room-breadcrumb{display:none}.brand{font-size:19px;gap:7px;letter-spacing:-.6px}.brand-symbol{width:30px;height:30px;font-size:21px;border-radius:10px}.brand small:not(#mobile-location){display:none}.header-actions{gap:0}.view-switch{padding:2px;border-radius:12px}.view-switch button{min-width:44px;padding:4px 8px;font-size:11px}.icon-button{min-width:44px;min-height:44px}
 .explore-dock{bottom:var(--mobile-dock-bottom);width:min(440px,calc(100% - 24px));max-width:calc(100% - 24px);height:60px;border-radius:18px;padding:3px;gap:0;box-shadow:0 5px 22px #23331b14}
 .explore-dock button{min-width:44px;min-height:52px;padding:5px 4px;gap:3px;flex:1;font-size:10px;flex-direction:column}.explore-dock svg{width:18px;height:18px}.dock-divider{display:none}.explore-dock [data-nav=command][aria-expanded=true]{background:var(--soft);color:var(--green)}
 #arrival-change{display:none}#mobile-arrival-change{display:flex;width:100%;margin:0 0 18px;justify-content:center}
 #ui-background{top:calc(var(--mobile-header) + 5px);max-width:calc(100% - 32px);padding:5px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;line-height:14px;border-radius:12px;pointer-events:none;box-shadow:none}
 .scene-caption{left:auto;right:12px;bottom:var(--mobile-context-bottom);max-width:calc(100% - 116px);padding:0;border:0;background:none;box-shadow:none;border-radius:14px}
 .scene-caption>.eyebrow,.scene-caption>h1,.scene-caption>p{display:none}.scene-caption #ui-enter{width:158px;max-width:100%;min-width:0;min-height:46px;padding:10px 14px;font-size:13px;border-radius:14px;box-shadow:0 4px 20px #23331b20}
 #touch-joystick{left:max(14px,env(safe-area-inset-left));bottom:var(--mobile-context-bottom);width:76px;height:76px;background:#f8faf233;border:1px solid #fafbf477;backdrop-filter:blur(3px)}#touch-joystick>span{width:30px;height:30px;margin:-15px}
 #virtual-command{display:none;top:auto;left:12px;right:12px;bottom:var(--mobile-context-bottom);width:auto;padding:12px 14px;border-radius:20px;max-height:min(46dvh,360px);overflow-y:auto;overscroll-behavior:contain;background:#fafbf7fa;box-shadow:0 8px 36px #23331b20}
 .command-open #virtual-command{display:block}.command-open .scene-caption,.command-open #mobile-task,.command-open #touch-joystick,.command-open .map{display:none!important}
 .virtual-heading{gap:6px}.virtual-heading strong{font-size:14px}.virtual-badge{font-size:10px}.virtual-heading #virtual-collapse{min-width:44px;min-height:44px;padding:0;font-size:25px}.virtual-dot{display:none}
 #virtual-form{margin-top:4px;flex-shrink:0}#virtual-input{padding:12px 10px;font-size:16px;min-height:48px}#virtual-send{width:44px;min-height:44px;margin:3px}#virtual-example{font-size:11px;min-height:44px;padding:8px 0;line-height:1.5}#virtual-status{margin:0;font-size:11px}#virtual-command:not(:has(#virtual-progress:not([hidden]))) #virtual-status{display:none}#virtual-feedback{font-size:12px;margin:6px 0;line-height:1.6}
 #mobile-task:not([hidden]){display:block;position:fixed;z-index:18;right:12px;bottom:var(--scene-actions-clearance,var(--mobile-context-bottom));max-width:calc(100% - 116px);font-size:11px;min-height:44px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#fafbf3f2;box-shadow:var(--shadow);padding:10px 12px}
 body:has(#mobile-task:not([hidden])) .scene-caption{display:none}body.ui-panel-open #mobile-task,body.ui-panel-open .scene-caption{display:none!important}
 #ui-panel,#ui-panel:has(iframe){left:12px;right:12px;top:auto;bottom:var(--mobile-context-bottom);width:auto;max-height:calc(var(--mobile-vh,100dvh) - var(--mobile-header) - 100px);height:min(56dvh,490px);border-radius:20px}
 #ui-panel.nonblocking{top:calc(var(--mobile-header) + 32px);bottom:auto;max-height:min(36dvh,300px);height:auto;width:auto;left:12px;right:12px}
 .panel-header{padding:10px 14px}.panel-header .eyebrow{display:none}.panel-header h2{font-size:17px;margin:0}.panel-handle{margin:7px auto 0;height:3px;width:28px}#ui-panel-body{padding:12px 14px}#ui-panel-body p{font-size:12px;line-height:1.55}.room{min-height:76px;gap:10px;padding:12px}.roomlabel{font-size:14px}.command-card{min-height:56px;padding:10px}.command-icon{width:30px;height:30px}
 #device-card>.small-label,#device-card>.device-room,#device-card>.device-roam-hint{display:none}#device-card #device-card-title{display:none}#device-card .device-live{margin:8px 0}.device-properties{padding:10px;gap:6px}#device-card .device-more{margin:10px 0 0;padding-top:0;border:0}#device-card .device-more>summary{min-height:44px;display:flex;align-items:center;color:var(--green);font-size:12px}
 .map{top:calc(var(--mobile-header) + 32px);right:12px;width:160px;padding:10px}.map canvas{width:140px;height:140px}
 #arrival-controls,#vehicle-arrival{top:auto;left:auto;right:12px;bottom:var(--mobile-context-bottom);width:calc(100% - 116px);max-width:340px;transform:none;padding:11px 12px;border-radius:16px}
 #vehicle-arrival>small,#vehicle-arrival>div:first-child>span,#arrival-controls .arrival-label>span{display:none}#vehicle-arrival>div:first-child{margin:0 0 6px}#vehicle-arrival strong{font-size:12px}.vehicle-actions{gap:5px}.vehicle-actions button{font-size:11px;padding:7px 9px;min-height:44px;flex:1}#arrival-controls .arrival-label strong{font-size:12px}#arrival-controls progress{margin:8px 0}.arrival-actions{gap:8px}.arrival-actions button{min-height:44px;padding:4px 0;font-size:11px}
 #ui-toast{bottom:var(--mobile-context-bottom);font-size:12px;line-height:1.5}
 #arrival-choice{padding:max(16px,env(safe-area-inset-top)) 18px max(16px,env(safe-area-inset-bottom));overflow-y:auto;place-items:center}.arrival-card{max-width:420px}.arrival-card h1{font-size:26px;margin:12px 0 10px;max-width:none}.arrival-card>p{margin:0 0 18px;font-size:13px}.arrival-options{gap:10px}.arrival-options button{padding:16px;gap:9px;border-radius:18px;min-height:0}.arrival-number{font-size:25px}.arrival-options strong{font-size:16px}.arrival-options button>span:not(.arrival-number){font-size:12px}.arrival-options button>small{display:none}.arrival-note{font-size:10px;margin-top:16px}
 .mobile-keyboard .explore-dock,.mobile-keyboard #touch-joystick,.mobile-keyboard .scene-caption,.mobile-keyboard #mobile-task,.mobile-keyboard .app-header,.mobile-keyboard #ui-background{display:none!important}
 .mobile-keyboard #virtual-command{bottom:calc(var(--mobile-bottom,0px) + 8px);max-height:calc(var(--mobile-vh,100dvh) - 16px)}
 .mobile-keyboard #ui-panel{bottom:calc(var(--mobile-bottom,0px) + 8px);max-height:calc(var(--mobile-vh,100dvh) - 16px);height:calc(var(--mobile-vh,100dvh) - 16px)}
 .mobile-keyboard .panel-handle{display:none}
 body:has(#arrival-choice:not([hidden])) #mobile-task{display:none!important}
}
@media(max-height:500px) and (max-width:1023px){
 :root{--mobile-header:calc(48px + env(safe-area-inset-top,0px));--mobile-context-bottom:calc(74px + env(safe-area-inset-bottom,0px))}
 #virtual-command{left:auto;right:max(12px,env(safe-area-inset-right));width:min(370px,calc(100% - 120px));max-height:calc(var(--mobile-vh,100dvh) - var(--mobile-header) - 86px)}
 #ui-panel,#ui-panel:has(iframe),#ui-panel.nonblocking{left:auto;right:max(12px,env(safe-area-inset-right));top:calc(var(--mobile-header) + 8px);bottom:var(--mobile-context-bottom);width:min(370px,calc(100% - 120px));height:auto;max-height:none}
 #ui-background{left:12px;transform:none;max-width:230px}#virtual-example{min-height:44px;padding:4px 0}.arrival-card{max-width:720px}.arrival-card>p,.arrival-number,.arrival-note{display:none}.arrival-card h1{font-size:21px;margin:0 0 12px}.arrival-options{grid-template-columns:1fr 1fr}.arrival-options button{padding:16px}.arrival-options strong{font-size:15px}
 .mobile-keyboard #ui-panel{top:calc(var(--mobile-top,0px) + 8px);height:auto}.mobile-keyboard #virtual-command{max-height:calc(var(--mobile-vh,100dvh) - 16px)}
}

@media(max-width:767px),(max-height:500px) and (max-width:1023px){.command-open .virtual-heading{position:sticky;top:-12px;background:#fafbf7;z-index:1}}

@media(max-width:767px),(max-height:500px) and (max-width:1023px){.map button{min-width:44px;min-height:44px}.device-more a{min-height:44px;align-items:center;padding:10px 0}}
@media(max-height:500px) and (max-width:1023px){
 .map,#mobile-task,.scene-caption,#vehicle-arrival,#arrival-controls{right:max(12px,env(safe-area-inset-right))}
 body:has(.map:not([hidden])) .scene-caption,body:has(.map:not([hidden])) #mobile-task,body:has(.map:not([hidden])) #vehicle-arrival,body:has(.map:not([hidden])) #arrival-controls{display:none!important}
}
@media(max-width:767px),(max-height:500px) and (max-width:1023px){
 body.mobile-ui.command-open #virtual-command{display:block!important}
 .command-open #vehicle-arrival,.command-open #arrival-controls{display:none!important}
 body:has(#vehicle-arrival:not([hidden])) #mobile-task,body:has(#arrival-controls:not([hidden])) #mobile-task{display:none!important}
}
@media(max-width:767px),(max-height:500px) and (max-width:1023px){
 #ui-settings-content #look{display:none}.device-more>summary::after{content:'⌄';margin-left:auto}.device-more[open]>summary::after{content:'⌃'}
}

@media(max-width:767px),(max-height:500px) and (max-width:1023px){
 #ui-panel.experience-controls{top:auto;bottom:var(--mobile-context-bottom);height:auto;max-height:min(32dvh,260px);left:12px;right:12px;width:auto}
 #ui-panel.experience-controls .panel-handle{display:none}
 #ui-panel.experience-controls .panel-header{padding:6px 12px}
 #ui-panel.experience-controls #ui-panel-body{padding:8px 12px;min-height:0}
 #ui-panel.experience-controls .panel-header h2{font-size:14px}
 #experience-resume{right:12px;bottom:var(--mobile-context-bottom);max-width:calc(100vw - 116px)}
}
@media(max-height:500px) and (max-width:1023px){
 #ui-panel.experience-controls{left:auto;width:min(340px,48vw);max-height:calc(var(--mobile-vh,100dvh) - var(--mobile-header) - 100px)}
}
