@media (any-pointer:coarse),(max-width:1050px){
 html,body,#root{width:100%;height:var(--game-height);overflow:hidden}.bowling-shell,.chairs-shell,.balloon-shell,.game-shell{height:var(--game-height)!important;min-height:0!important;padding:0!important;overflow:hidden!important}.bowling-nav,.balloon-shell .bowling-nav{height:48px!important;min-height:48px!important;padding:4px 10px!important;gap:6px;flex-wrap:nowrap}.bowling-title{font-size:16px!important;line-height:1.1!important}.bowling-title small{font-size:10px!important}.nav-right{gap:6px!important}.back,.settings-button,.new-balloon-game{min-height:40px!important;padding:6px 8px!important;font-size:12px!important}.bowling-layout,.webgpu-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:6px!important;height:calc(var(--game-height) - 48px)!important;min-height:0!important;margin:0!important;padding:6px!important}.webgpu-lane,.lane-card,.lane-stage,.webgpu-stage,.webgpu-wrap,.webgpu-canvas{min-width:0!important;min-height:0!important;height:100%!important;max-height:100%!important}.lane-stage{border-radius:12px!important}.webgpu-wrap canvas{width:100%!important;height:100%!important;touch-action:none}.bowling-side-stack{display:flex!important;gap:6px!important;max-height:150px;min-height:0;overflow:auto}.score-computer{flex:1;min-width:0}.monitor-neck,.monitor-stand{display:none!important}.monitor-bezel{padding:4px!important;border-width:3px!important}.monitor-screen{padding:3px!important}.score-grid{gap:2px!important}.webgpu-layout .score-frame{height:36px!important}.webgpu-layout .score-frame strong{font-size:17px!important;line-height:23px!important}.webgpu-layout .monitor-result{margin-top:3px!important}.webgpu-layout .monitor-result b{font-size:24px!important;line-height:26px!important}.webgpu-layout .counting-window{min-height:40px!important;padding:3px!important}.webgpu-layout .counting-window>strong{font-size:20px!important;line-height:24px!important}.bowling-aim{font-size:11px!important;padding:5px!important;max-width:100%}.balloon-3d,.balloon-3d canvas{height:calc(var(--game-height) - 48px)!important;min-height:0!important;touch-action:none}.balloon-shell .bowling-title{position:static!important;transform:none!important}.balloon-nav-marker{display:none!important}.balloon-shell .balloon-total{top:58px!important;left:16%!important;width:90px!important;height:78px!important;border-width:4px!important}.balloon-total span{font-size:38px!important}.balloon-total small{font-size:10px!important}.balloon-instructions{top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;left:8px!important;right:8px!important;width:auto!important;max-width:100%!important;font-size:12px!important;padding:8px!important;gap:3px!important}.balloon-instructions b{font-size:13px!important}.balloon-target{top:58px!important;right:8px!important;padding:6px!important;max-width:42%}.chair-heading{height:68px!important;padding:3px!important}.chair-heading h1{font-size:20px!important;margin:2px!important}.chair-stage{height:calc(var(--game-height) - 204px)!important;min-height:80px!important;border-width:2px!important;border-radius:12px!important;margin:0 6px!important}.chair-counter{height:66px!important;min-height:0!important;margin:0 6px!important;gap:10px!important;padding:5px!important;border-width:3px!important;border-radius:12px!important}.chair-big-number{width:52px!important;height:52px!important;margin:0!important;font-size:30px!important;border-width:3px!important}.chair-counter b{font-size:12px!important}.chair-next{padding:8px!important;min-height:40px!important;font-size:12px!important}.chair-arrow-legend{display:none!important}.table-3d canvas{touch-action:none}.party-music-button{max-width:calc(100% - 16px);min-height:44px;font-size:14px!important;padding:8px 14px!important}.select-child-in-scene{font-size:13px!important;max-width:calc(100% - 16px)}
 #web-touch-controls{bottom:calc(84px + env(safe-area-inset-bottom))!important}
}
@media (any-pointer:coarse) and (orientation:landscape),(max-width:1050px) and (orientation:landscape){
 .bowling-layout,.webgpu-layout{grid-template-columns:minmax(0,1fr) minmax(170px,27%)!important;grid-template-rows:minmax(0,1fr)!important}.bowling-side-stack{display:block!important;max-height:100%!important}.chair-heading{height:44px!important}.chair-heading h1{font-size:17px!important}.chair-stage{height:calc(var(--game-height) - 154px)!important}.chair-counter{height:56px!important}.chair-big-number{height:42px!important;width:42px!important;font-size:26px!important}.balloon-instructions{left:8px!important;right:auto!important;max-width:36%!important;font-size:10px!important}.balloon-instructions b{font-size:11px!important}.balloon-shell .balloon-total{width:70px!important;height:62px!important;left:10%!important}.balloon-total span{font-size:30px!important}#web-touch-controls{bottom:calc(68px + env(safe-area-inset-bottom))!important}
}
#web-bowling-controls{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:calc(158px + env(safe-area-inset-bottom));display:flex;gap:8px;direction:ltr}#web-bowling-controls[hidden]{display:none}#web-bowling-controls button{width:44px;height:44px;padding:0;font-size:24px;border:1px solid #fff9;border-radius:12px;background:#123d43ed;color:white;touch-action:manipulation}
@media(any-pointer:coarse){.bowling-aim.mouse-legend{display:none!important}}
@media(any-pointer:coarse) and (orientation:landscape){#web-bowling-controls{left:36%;bottom:max(12px,env(safe-area-inset-bottom))}}
/* Keep the activity title, throw counter and fixed Settings control in separate spaces. */
@media(max-width:700px),(any-pointer:coarse) and (max-height:500px){
 html body.im-native-game .bowling-shell .bowling-nav{box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;align-items:center!important;justify-content:stretch!important;gap:2px!important;height:64px!important;min-height:64px!important;width:100%!important;margin:0!important;padding:5px 136px 5px 10px!important}
 html body.im-native-game .bowling-shell .bowling-nav .bowling-title{position:static!important;inset:auto!important;transform:none!important;min-width:0!important;max-width:100%!important;font-size:14px!important;line-height:16px!important;letter-spacing:0!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:start!important}
 html body.im-native-game .bowling-shell .bowling-nav .nav-right{position:static!important;inset:auto!important;transform:none!important;min-width:0!important;max-width:100%!important;display:flex!important;justify-content:flex-start!important;margin:0!important}
 html body.im-native-game .bowling-shell .bowling-nav .throw-counter{font-size:11px!important;line-height:14px!important;letter-spacing:0!important;white-space:normal!important;padding:0!important}
 html body.im-native-game .bowling-shell .bowling-layout{height:calc(var(--game-height) - 64px)!important}
}
/* Phone layout owns every row; desktop theme rules must not restore 100vh or minimum scene sizes. */
@media(max-width:700px),(any-pointer:coarse) and (max-height:500px){
 html body.im-native-game #root :is(.bowling-shell,.chairs-shell,.balloon-shell){box-sizing:border-box!important;width:100%!important;height:var(--game-height,100dvh)!important;min-height:0!important;padding:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
 html body.im-native-game #root :is(.bowling-shell,.chairs-shell,.balloon-shell) .bowling-nav{box-sizing:border-box!important;position:relative!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;flex:0 0 54px!important;height:54px!important;min-height:54px!important;width:100%!important;max-width:none!important;margin:0!important;padding:4px 112px 4px 8px!important;gap:2px!important}
 html body.im-native-game #root :is(.bowling-shell,.chairs-shell,.balloon-shell) .bowling-title{position:static!important;inset:auto!important;transform:none!important;max-width:100%!important;font-size:14px!important;line-height:17px!important;letter-spacing:0!important;white-space:normal!important;text-align:start!important;overflow-wrap:normal!important}
 html body.im-native-game #root .bowling-nav .nav-right{position:static!important;inset:auto!important;transform:none!important;margin:0!important}
 html body.im-native-game #root .bowling-layout{box-sizing:border-box!important;flex:1 1 0!important;height:auto!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 100px!important;padding:4px 4px 52px!important;gap:4px!important;margin:0!important}
 html body.im-native-game #root .bowling-side-stack{display:flex!important;position:static!important;height:100px!important;min-height:0!important;max-height:100px!important;overflow:auto!important}
 html body.im-native-game #root .score-computer{display:block!important;position:static!important;width:100%!important;height:auto!important}
 html body.im-native-game #root .webgpu-lane,html body.im-native-game #root .webgpu-stage{height:100%!important;min-height:0!important;box-sizing:border-box!important}
 html body.im-native-game #root .chair-heading{box-sizing:border-box!important;flex:0 0 auto!important;height:auto!important;min-height:32px!important;max-height:64px!important;padding:4px!important;overflow:auto!important}
 html body.im-native-game #root .chair-heading .mode-tag{font-size:12px!important;letter-spacing:0!important}
 html body.im-native-game #root .chair-heading h1{font-size:16px!important;line-height:18px!important;margin:0!important}
 html body.im-native-game #root .chair-stage{box-sizing:border-box!important;flex:1 1 0!important;width:calc(100% - 8px)!important;height:auto!important;min-height:0!important;margin:0 4px!important}
 html body.im-native-game #root .chair-counter{box-sizing:border-box!important;flex:0 0 62px!important;width:calc(100% - 8px)!important;height:62px!important;min-height:0!important;margin:4px!important;padding:4px!important;gap:8px!important;overflow:auto!important}
 html body.im-native-game #root .balloon-3d{flex:1 1 0!important;height:auto!important;min-height:0!important;overflow:hidden!important}
 html body.im-native-game #root .balloon-3d canvas{height:100%!important;width:100%!important}
 html body.im-native-game #root .balloon-total{top:60px!important;bottom:auto!important;left:8px!important;transform:none!important;width:64px!important;height:58px!important;padding:0!important}
 html body.im-native-game #root .balloon-total span{font-size:30px!important}
 html body.im-native-game #root .balloon-instructions{box-sizing:border-box!important;position:static!important;flex:0 0 auto!important;inset:auto!important;transform:none!important;width:auto!important;max-width:none!important;max-height:104px!important;overflow:auto!important;pointer-events:auto!important;margin:4px!important;padding:6px 8px!important;font-size:11px!important;line-height:14px!important;gap:2px!important}
 html body.im-native-game #root .balloon-instructions b{font-size:12px!important;line-height:15px!important}
 html body.im-native-game #web-bowling-controls{bottom:max(4px,env(safe-area-inset-bottom))!important;left:50%!important}
 html body.im-native-game #web-touch-controls{bottom:74px!important}
}

.web-phone-counting-title{display:none}
@media(max-width:700px),(any-pointer:coarse) and (max-height:500px){.web-phone-counting-title{display:inline}}
/* Keep the balloon destination visible below the header, aligned with the child. */
html body.im-native-game #root .balloon-shell .balloon-nav-marker{display:block!important;position:absolute!important;left:50%!important;top:100%!important;transform:translateX(-50%)!important;margin:0!important;color:#d91743!important;font-size:30px!important;line-height:30px!important;z-index:50!important;text-shadow:0 1px 2px white;pointer-events:none}
html body.im-native-game #root .chairs-shell .web-pick-child{display:block;font-size:16px;line-height:20px;color:#12394d;padding:3px;font-weight:900}
html body.im-native-game #root .chairs-shell .chair-heading:has(.web-pick-child) .mode-tag{display:none!important}
html body.im-native-game #root .chairs-shell .select-child-in-scene{flex:1;min-width:0;max-width:none;white-space:normal;line-height:16px;font-size:13px!important}
/* The tip is projected from the cluster's actual destination, not the header. */
html body.im-native-game #root .balloon-shell .balloon-nav-marker.web-world-pin{position:fixed!important;left:var(--pin-x)!important;top:var(--pin-y)!important;transform:translate(-50%,-100%)!important;font-size:28px!important;line-height:28px!important}

/* Landscape: use the visible height, with independently scrolling panels. */
@media (any-pointer:coarse) and (orientation:landscape),(max-width:1050px) and (orientation:landscape){
html body.im-native-game #root :is(.bowling-shell,.chairs-shell,.balloon-shell){box-sizing:border-box!important;height:var(--game-height)!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
html body.im-native-game #root :is(.bowling-shell,.chairs-shell,.balloon-shell) .bowling-nav{box-sizing:border-box!important;flex:0 0 40px!important;height:40px!important;min-height:40px!important;padding:3px 136px 3px 8px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
html body.im-native-game #root .bowling-title{font-size:14px!important;line-height:16px!important;position:static!important;transform:none!important}
html body.im-native-game #root .bowling-layout{flex:1 1 0!important;height:auto!important;min-height:0!important;grid-template-columns:minmax(0,1fr) minmax(160px,27%)!important;grid-template-rows:minmax(0,1fr)!important;padding:4px!important}
html body.im-native-game #root .bowling-side-stack{display:block!important;height:100%!important;max-height:100%!important;min-height:0!important;overflow:auto!important}
html body.im-native-game #web-bowling-controls{left:36%!important;bottom:max(6px,env(safe-area-inset-bottom))!important}
html body.im-native-game #root .chair-heading{flex:0 0 auto!important;height:auto!important;min-height:26px!important;max-height:44px!important;padding:2px!important;overflow:auto!important}
html body.im-native-game #root .chair-stage{flex:1 1 0!important;height:auto!important;min-height:0!important;margin:0 4px!important}
html body.im-native-game #root .chair-counter{box-sizing:border-box!important;flex:0 0 54px!important;height:54px!important;min-height:0!important;margin:2px 4px!important;padding:3px 8px 3px 110px!important;overflow:auto!important}
html body.im-native-game #root .chair-big-number{height:40px!important;width:40px!important;font-size:26px!important}
html body.im-native-game #root .balloon-3d{flex:1 1 0!important;height:auto!important;min-height:0!important}
html body.im-native-game #root .balloon-3d canvas{width:100%!important;height:100%!important}
html body.im-native-game #root .balloon-instructions{box-sizing:border-box!important;position:static!important;flex:0 0 auto!important;inset:auto!important;transform:none!important;max-width:none!important;width:auto!important;max-height:58px!important;margin:2px 4px!important;padding:4px 8px!important;overflow:auto!important;font-size:11px!important;line-height:13px!important}
html body.im-native-game #root .balloon-total{top:46px!important;left:8px!important;transform:none!important;width:58px!important;height:52px!important}
html body.im-native-game #root .balloon-target{top:46px!important;right:8px!important;font-size:12px!important}
}
/* Every touch viewport owns three rows: header, scene, complete instructions. */
/* The React language wrapper has auto height; use a definite viewport height here. */
html[data-touch-device="true"] body.im-native-game #root :is(.balloon-shell,.bowling-shell,.chairs-shell){height:calc(var(--game-height,100dvh) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;min-height:0!important;width:100%!important;box-sizing:border-box!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-shell .bowling-nav{position:relative!important;flex:0 0 44px!important;height:44px!important;min-height:44px!important;box-sizing:border-box!important;padding:4px 126px 4px 8px!important;display:flex!important;align-items:center!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-shell .bowling-title{display:block!important;position:static!important;transform:none!important;white-space:normal!important;font-size:14px!important;line-height:17px!important}
html[data-touch-device="true"] body.im-native-game #root .web-phone-counting-title{display:inline!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-3d{flex:1 1 0!important;position:relative!important;min-height:0!important;width:100%!important;height:auto!important;overflow:hidden!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-3d canvas{display:block!important;width:100%!important;height:100%!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-instructions{box-sizing:border-box!important;position:static!important;inset:auto!important;transform:none!important;display:flex!important;flex-direction:column!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;margin:3px!important;padding:5px 8px!important;gap:2px!important;font-size:12px!important;line-height:15px!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-instructions :is(b,span){white-space:normal!important;font-size:12px!important;line-height:15px!important}
html[data-touch-device="true"] body.im-native-game #root .balloon-total{top:calc(env(safe-area-inset-top) + 50px)!important}
