/* Phone layout — only under html.phone (set by assets/mobile.js); desktop styles are untouched. */
html.phone,html.phone body{height:100%;overflow:hidden;overscroll-behavior:none}
html.phone body{position:fixed;inset:0;-webkit-text-size-adjust:100%}
html.phone #scene{touch-action:none}
html.phone .app{height:100dvh;min-height:0;grid-template-rows:calc(52px + env(safe-area-inset-top)) minmax(0,1fr) 0}
html.phone .footer{display:none}
html.phone .topbar{padding:env(safe-area-inset-top) calc(12px + env(safe-area-inset-right)) 0 calc(12px + env(safe-area-inset-left));gap:6px}
html.phone .brand{font-size:18px;gap:7px}html.phone .brandmark{width:26px;height:26px}
html.phone .headeractions .outlinebtn,html.phone .headeractions .iconbtn,html.phone .headeractions button{min-width:44px;min-height:44px;justify-content:center}
html.phone .workbench{grid-template-columns:0 minmax(0,1fr) 0}
html.phone .sidebar,html.phone .sidebar.mobile-open,html.phone .mobile-menu,html.phone .mobile-info,html.phone .gesture-hint,html.phone .compass,html.phone .walkpad,html.phone .hover-tip{display:none!important}
html.phone .stage-top{left:calc(12px + env(safe-area-inset-left));top:8px;max-width:calc(100% - 130px)}
html.phone .stage-top h1{font-size:15px}html.phone .stage-top p{display:none}html.phone .viewbadge{margin-top:4px;font-size:9px}
html.phone .stage-tools{top:8px;right:calc(10px + env(safe-area-inset-right));display:grid;grid-template-columns:44px 44px;gap:6px}
html.phone .stage-tools .iconbtn{width:44px;height:44px}
html.phone .modebar{top:66px;left:calc(12px + env(safe-area-inset-left));right:auto;transform:none;gap:2px}
html.phone .modebar button{min-height:44px;padding:0 13px;font-size:11px}
html.phone .modebar button .ico{display:none}
/* Thumb toolbar sits on top of the sheet. */
html.phone .stage-bottom{position:fixed;left:0;right:0;transform:none;width:auto;bottom:var(--bar-b,92px);display:flex;justify-content:center;z-index:30;pointer-events:none}
html.phone .stage-bottom>*{pointer-events:auto}
html.phone .maincontrols{width:min(calc(100vw - 16px),380px);height:56px;justify-content:space-between;padding:6px}
html.phone .maincontrols button{min-height:44px;min-width:44px;padding:0 9px;font-size:11px;gap:4px;flex:1;justify-content:center}
html.phone .maincontrols .control-divider{display:none}
html.phone .tourbar{position:absolute;bottom:64px}
html.phone.sheet-full .stage-bottom,html.phone.sheet-full .datatoggles,html.phone.sheet-full .joystick,html.phone.tog-hidden .datatoggles{visibility:hidden}
/* Data-view toggles: right side, above the toolbar, within thumb reach. */
html.phone .datatoggles{position:fixed;left:auto;top:auto;right:calc(12px + env(safe-area-inset-right));bottom:var(--pad-b,156px);flex-direction:column;width:112px;z-index:29}
html.phone .datatoggles button{min-height:44px;font-size:11px;justify-content:center}
/* Bottom sheet: room chips + the inspector (room notes, furniture editor). */
html.phone .sheet{position:fixed;left:0;right:0;bottom:0;height:var(--sheet-h,84px);z-index:40;display:flex;flex-direction:column;background:var(--panel,#fcfbf8);border-top:1px solid var(--line,#e5e4dc);border-radius:16px 16px 0 0;box-shadow:0 -10px 40px #183d2926;padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
html.phone .sheet.anim{transition:height .22s ease}
html.phone .sheet-handle{flex:none;height:44px!important;min-height:44px!important;width:100%;display:flex;align-items:center;justify-content:center;background:none;touch-action:none}
html.phone .sheet-handle i{display:block;width:40px;height:5px;border-radius:3px;background:#c9cdc4}
html.phone .sheet-chips{flex:none;display:flex;gap:6px;overflow-x:auto;padding:0 12px 8px;scrollbar-width:none;overscroll-behavior-x:contain}
html.phone .sheet-chips::-webkit-scrollbar{display:none}
html.phone .sheet-chip{flex:none;width:auto!important;height:44px;margin:0!important;min-height:44px;padding:0 14px;border-radius:22px;font-size:12px;white-space:nowrap;border:1px solid var(--line,#e5e4dc);background:#fff;display:flex;align-items:center}
html.phone .sheet-chip.active{background:var(--green,#2f4a3c);color:#fff;border-color:transparent}
html.phone .sheet-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html.phone .sheet[data-state=peek] .sheet-body{visibility:hidden}
html.phone .sheet .inspector,html.phone .sheet .inspector.mobile-open{display:flex!important;position:static;width:auto;max-height:none;height:auto;box-shadow:none;border:0;border-radius:0;padding:4px 16px 24px;overflow:visible}
html.phone .sheet input,html.phone .sheet select{font-size:16px!important;min-height:44px}
html.phone .sheet button{min-height:44px}
html.phone.night .sheet{background:#1d2a24;border-color:#3d4a40}html.phone.night .sheet-chip{background:#26352d;color:#c7d6bb;border-color:#3d4a40}
/* Walk: joystick above the toolbar (never under the sheet), short hint. */
html.phone .joystick{display:none;position:fixed;left:calc(16px + env(safe-area-inset-left));bottom:var(--joy-b,156px);width:120px;height:120px;border-radius:50%;background:#fffdf7c8;border:1px solid #fff;box-shadow:var(--shadow,0 8px 30px #0002);z-index:29;touch-action:none}
html.phone.phone-walk .joystick{display:block}
html.phone .joystick .knob{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;background:var(--green,#2f4a3c);box-shadow:0 4px 12px #0003;transition:transform .05s}
html.phone .walkhint{top:auto;bottom:calc(var(--pad-b,156px) + 132px);font-size:11px;max-width:80vw;white-space:normal;text-align:center}
@media(orientation:landscape){
 html.phone .app{grid-template-rows:calc(44px + env(safe-area-inset-top)) minmax(0,1fr) 0}
 html.phone .stage-tools{grid-template-columns:repeat(5,44px)}
 html.phone .modebar{top:8px;left:50%;transform:translateX(-50%)}
 html.phone .stage-top{max-width:30vw}
 html.phone .joystick{width:104px;height:104px}
 html.phone .walkhint{bottom:auto;top:112px}
 html.phone .datatoggles{flex-direction:row;width:224px}
 html.phone .datatoggles button{flex:1}
}
