.touch-bar{display:none}
@media(max-width:600px),(pointer:coarse){
 body{--scene-top:164px;--scene-bottom:94px}
 header{top:8px;left:10px;right:10px;padding:8px 12px;border-radius:8px}
 header h1{font-size:18px;margin:0}header small{display:none}
 nav{top:52px;left:10px;right:10px;max-width:none;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
 nav button{min-height:44px;padding:8px 4px;font-size:15px;border-radius:6px}
 canvas#view{position:absolute;top:var(--scene-top);left:0;width:100%;height:calc(100dvh - var(--scene-top) - var(--scene-bottom))}
 #help,#pad{display:none}
 .touch-bar{display:flex;position:absolute;bottom:0;left:0;right:0;min-height:var(--scene-bottom);padding:8px 12px;gap:8px;align-items:center;justify-content:space-between;background:#17333b;flex-wrap:wrap}
 .touch-bar span{font-size:14px;color:#e4f1ed}.touch-bar button{min-height:44px;font-size:16px;padding:8px 12px}
 #scene-tools{display:none;bottom:calc(var(--scene-bottom) + 8px);left:10px;right:10px;width:auto;padding:12px;max-height:calc(100dvh - var(--scene-top) - var(--scene-bottom) - 16px);overflow:auto;border-radius:8px;background:#17333b;font-size:15px}
 #scene-tools.is-open{display:block}#scene-tools label{margin:4px 0;min-height:44px;display:flex;align-items:center;gap:8px}#scene-tools label:first-child{min-height:24px}
 #lift{height:44px;margin:0;touch-action:pan-x}#wall{width:24px!important;height:24px}#reset{min-height:44px;font-size:16px;padding:8px 12px}#value{font-size:24px}
 #status{top:var(--scene-top);left:10px;right:10px;font-size:14px}
 button:active{background:#31565f}
}
@media (max-height:500px) and (pointer:coarse){
 body{--scene-top:60px;--scene-bottom:60px}header{display:none}
 nav{top:8px;grid-template-columns:repeat(6,1fr)}
 .touch-bar{flex-wrap:nowrap}.touch-bar span{font-size:14px}
 #scene-tools{left:auto;width:300px}
}
