/* Reserve the scene first. Opening a dial must not take space from the ball. */
#putter-workspace.pt452-workspace .pt420-stage{
 --pt528-scene:clamp(360px,48svh,640px);
 --pt528-panel:0px;
 --pt528-controls:214px;
 --pt528-rail:334px;
 height:clamp(560px,76svh,880px);
 min-height:0;
}
#putter-workspace .camera521{padding-block:6px}
#putter-workspace .pt494-outcome{min-height:54px;padding-block:8px}
#putter-workspace #putter-3d-canvas{height:calc(100% - 100px)}
#putter-workspace .pt452-playback{height:82px;grid-template-columns:minmax(0,1fr) minmax(330px,.9fr);grid-template-rows:64px;align-items:center;gap:14px;bottom:10px}
#putter-workspace .pt523-transport{grid-template-columns:minmax(132px,1.8fr) repeat(3,minmax(0,1fr))}
#putter-workspace .pt434-face-badge,#putter-workspace .pt429-distance-badge{bottom:112px}
#putter-workspace .pt420-model-tag{top:14px}
#putter-workspace .pt420-phase{top:54px}

/* Phones and portrait tablets: image, nearby selector, current dial, playback. */
@media(max-width:1400px){
 #putter-workspace.pt452-workspace .pt420-stage{height:calc(var(--pt528-scene) + var(--pt528-panel) + var(--pt528-controls));min-height:0}
 #putter-workspace.pt452-workspace .pt420-stage:has(.pt452-panel:not([hidden])){--pt528-panel:clamp(144px,19svh,220px)}
 #putter-workspace #putter-3d-canvas{width:100%;height:var(--pt528-scene);bottom:auto}
 #putter-workspace .pt507-switcher{top:calc(var(--pt528-scene) + 8px);bottom:auto;left:10px;right:10px;width:auto;height:56px;box-sizing:border-box;padding:5px;gap:5px}
 #putter-workspace .pt507-switcher>button,#putter-workspace .pt507-more{min-height:44px}
 #putter-workspace .pt452-popovers{top:calc(var(--pt528-scene) + 72px);bottom:auto;left:10px;right:10px;width:auto;height:var(--pt528-panel);max-height:var(--pt528-panel)}
 #putter-workspace .pt452-panel{height:100%;max-height:100%;box-sizing:border-box}
 #putter-workspace .pt452-panel-body{max-height:none;min-height:0}
 #putter-workspace .pt452-camera{right:10px}
 #putter-workspace .pt452-playback{left:10px;right:10px;height:130px;grid-template-columns:minmax(0,1fr);grid-template-rows:64px 44px;gap:4px}
 #putter-workspace .pt434-face-badge,#putter-workspace .pt429-distance-badge{top:calc(var(--pt528-scene) - 60px);bottom:auto}
 #putter-workspace .pt434-face-badge{right:12px}
}
@media(min-width:761px) and (max-width:1400px){
 #putter-workspace.pt452-workspace .pt420-stage{--pt528-controls:166px;--pt528-scene:clamp(440px,58svh,780px)}
 #putter-workspace .pt452-playback{height:82px;grid-template-columns:minmax(0,1fr) minmax(330px,.9fr);grid-template-rows:64px;gap:14px}
}
@media(max-width:760px){
 #putter-workspace.pt452-workspace .pt420-stage{--pt528-scene:clamp(320px,48svh,460px)}
 #putter-workspace .camera521-label{display:none}
 #putter-workspace .pt494-outcome{padding-bottom:22px}
 #putter-workspace .pt523-transport{grid-template-columns:1.45fr 1fr 1fr 1fr}
}

/* Landscape keeps the dials beside a larger, unobstructed scene. */
@media(min-width:961px) and (max-width:1400px) and (min-height:501px) and (orientation:landscape){
 #putter-workspace.pt452-workspace .pt420-stage{height:clamp(440px,calc(100svh - 210px),800px);--pt528-rail:314px}
 #putter-workspace #putter-3d-canvas{width:calc(100% - var(--pt528-rail));height:calc(100% - 100px)}
 #putter-workspace .pt507-switcher{left:auto;right:10px;top:10px;bottom:auto;width:294px}
 #putter-workspace .pt452-popovers{left:auto;right:10px;top:76px;bottom:10px;width:294px;height:auto;max-height:calc(100% - 86px)}
 #putter-workspace .pt452-playback{right:calc(var(--pt528-rail) + 10px);grid-template-columns:minmax(0,1fr) 330px;gap:10px}
 #putter-workspace .pt452-camera{right:calc(var(--pt528-rail) + 10px)}
 #putter-workspace .pt434-face-badge,#putter-workspace .pt429-distance-badge{top:auto;bottom:112px}
 #putter-workspace .pt434-face-badge{right:calc(var(--pt528-rail) + 12px)}
}
/* Short phone landscape still gives the model its full width. */
@media(max-height:500px) and (max-width:1400px){
 #putter-workspace.pt452-workspace .pt420-stage{--pt528-scene:280px}
}
