/* 8.96: size the scene to the window, not to a fixed virtual phone. */
#game #collectionScreen.active{padding:0!important;overflow:hidden!important}
#game #collectionScreen .house-scene{height:100%!important;min-height:0!important}
#game #collectionScreen .living-house{inset:76px 3% 16px!important;max-width:none!important;gap:10px!important;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr) 48px!important}
#game #collectionScreen .house-object{max-width:260px;justify-self:center}
#game #collectionScreen .house-object img,#game #collectionScreen .house-grand-chest img{flex:1 1 0!important;height:0!important;min-height:0!important;max-height:none!important;object-fit:contain!important}
#game #collectionScreen .house-beaver-zone{gap:8px!important;align-items:center!important}
#game #collectionScreen .house-dialog{width:100%!important;max-width:440px!important;min-height:0!important;padding:8px 14px!important;font-size:14px!important}
#game #collectionScreen .house-beaver-stage{flex:1 1 0!important;min-height:0!important;height:0!important;max-height:none!important;width:100%!important;display:flex!important;justify-content:center;align-items:center}
#game #collectionScreen #houseBeaver{width:auto!important;height:100%!important;max-width:100%!important;object-fit:contain!important}
#game #collectionScreen .house-talk-btn{min-height:40px!important;padding:6px 14px!important}
#game #collectionScreen .living-go-btn{height:46px!important;min-height:44px!important;font-size:17px!important;padding:5px 18px!important;display:flex;align-items:center;gap:10px}
#game #collectionScreen .living-go-btn span{font-size:20px!important;width:32px!important;height:32px!important}
#game #collectionScreen .furniture-label{min-height:30px!important;padding:5px 10px!important;font-size:13px!important}
#game #collectionScreen .house-grand-chest{height:100%!important;max-height:150px!important;max-width:160px!important}
/* The map itself fills the screen. Controls float over it without blank bands. */
#game #pathScreen.active{padding:0!important;overflow:hidden!important}
#game #pathScreen .map-viewport{inset:0!important;width:100%!important;height:100%!important;overflow:auto!important;scroll-padding:90px 20px 70px;touch-action:pan-x pan-y}
#game #pathScreen .map-title-wood,#game #pathScreen .map-bottom-hint{display:none!important}
#game #pathScreen .map-topbar{position:absolute!important;inset:14px 240px auto 200px!important;height:auto!important;transform:none!important;display:flex!important;justify-content:center!important;pointer-events:none}
#game #pathScreen .map-progress-hud{width:min(100%,300px)!important;margin:0!important;padding:8px 14px!important;max-width:300px!important}
#game #pathScreen .map-next-task-fixed{position:absolute!important;inset:auto 16px 14px auto!important;transform:none!important;width:240px!important;height:56px!important;max-width:60%!important;z-index:95!important}
#game #pathScreen .map-to-beaver{position:absolute!important;inset:auto auto 14px 16px!important;transform:none!important;min-height:44px!important;z-index:95!important}
/* Three complete cards share the available area on wide screens. */
#game #miniSelectScreen.active{padding:80px 3% 18px!important;overflow-y:auto!important}
#game #miniSelectScreen .mini-lobby{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:1500px!important;height:100%!important;min-height:0!important;margin:0 auto!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:14px!important;overflow:visible!important}
#game #miniSelectScreen .mini-lobby-head{margin:0!important;padding:8px 18px!important;min-height:0!important;height:auto!important;display:flex!important;gap:14px!important}
#game #miniSelectScreen .mini-lobby-beaver{width:52px!important;height:52px!important;flex:none!important}
#game #miniSelectScreen .mini-lobby-beaver img{width:100%!important;height:100%!important;object-fit:contain!important}
#game #miniSelectScreen .mini-lobby-copy b{font-size:24px!important}
#game #miniSelectScreen .mini-lobby-copy span{font-size:14px!important}
#game #miniSelectScreen .mini-select-card{position:static!important;inset:auto!important;transform:none!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;overflow:visible!important;margin:0!important;padding:0!important}
#game #miniSelectScreen .mini-choice{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:14px!important;display:flex!important;flex-direction:column!important;gap:10px!important;overflow:hidden!important;border-radius:26px!important}
#game #miniSelectScreen .mini-card-art{flex:1 1 0!important;height:auto!important;min-height:60px!important;max-height:300px!important;width:100%!important;margin:0!important;border-radius:16px!important}
#game #miniSelectScreen .mini-card-copy{flex:none!important;padding:0 6px!important}
#game #miniSelectScreen .mini-card-copy b{font-size:clamp(18px,2.2vw,28px)!important;line-height:1.12!important;margin:6px 0!important}
#game #miniSelectScreen .mini-card-copy span{font-size:14px!important;line-height:1.35!important;display:block!important}
#game #miniSelectScreen .mini-card-copy small{font-size:11px!important}
#game #miniSelectScreen .mini-lock-note{position:static!important;inset:auto!important;flex:none!important;margin:0!important;font-size:12px!important}
#game #miniSelectScreen .mini-stats{position:static!important;inset:auto!important;transform:none!important;width:100%!important;margin:0!important;padding:0!important;display:flex!important;justify-content:center;gap:12px!important}
#game #miniSelectScreen .mini-record{padding:6px 14px!important;font-size:12px!important}
@media (max-height:600px) and (min-width:650px){
 #game #collectionScreen .living-house{inset:64px 3% 10px!important;gap:6px!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr) 44px!important}
 #game #collectionScreen .house-dialog{font-size:12px!important;padding:6px 10px!important}
 #game #collectionScreen .house-grand-chest{max-height:110px!important}
 #game #collectionScreen .furniture-label{font-size:12px!important;min-height:26px!important;padding:4px 8px!important}
 #game #miniSelectScreen.active{padding:66px 2% 10px!important}
 #game #miniSelectScreen .mini-lobby{gap:8px!important}
 #game #miniSelectScreen .mini-lobby-head{padding:5px 14px!important;border-radius:18px!important}
 #game #miniSelectScreen .mini-lobby-beaver{width:36px!important;height:36px!important}
 #game #miniSelectScreen .mini-lobby-copy b{font-size:20px!important}
 #game #miniSelectScreen .mini-lobby-copy span{font-size:12px!important}
 #game #miniSelectScreen .mini-choice{padding:10px!important;gap:6px!important;border-radius:20px!important}
 #game #miniSelectScreen .mini-card-copy b{font-size:20px!important}
 #game #miniSelectScreen .mini-card-copy span{font-size:12px!important}
 #game #miniSelectScreen .mini-record{padding:3px 10px!important}
}
@media(max-width:649px){
 #game #collectionScreen .living-house{inset:70px 8px max(12px,env(safe-area-inset-bottom))!important;gap:6px!important;grid-template-columns:1fr 1.45fr 1fr!important}
 #game #collectionScreen .house-dialog{font-size:11px!important;padding:7px!important}
 #game #collectionScreen .furniture-label{font-size:10px!important;padding:5px 3px!important}
 #game #collectionScreen .house-talk-btn{font-size:11px!important;padding:6px!important}
 #game #collectionScreen .house-grand-chest{max-height:110px!important}
 #game #pathScreen .map-topbar{inset:68px 12px auto!important}
 #game #pathScreen .map-progress-hud{padding:5px 12px!important;width:230px!important}
 #game #pathScreen .map-next-task-fixed{width:190px!important;right:8px!important}
 #game #pathScreen .map-to-beaver{left:8px!important;padding:8px!important}
 #game #miniSelectScreen.active{padding:72px 12px 16px!important}
 #game #miniSelectScreen .mini-lobby{height:auto!important;display:flex!important;flex-direction:column!important;gap:12px!important}
 #game #miniSelectScreen .mini-select-card{height:auto!important;grid-template-columns:1fr!important;gap:12px!important}
 #game #miniSelectScreen .mini-choice{min-height:210px!important;display:grid!important;grid-template-columns:38% minmax(0,1fr)!important;gap:10px!important;padding:12px!important;text-align:left}
 #game #miniSelectScreen .mini-card-art{grid-row:1 / 3!important;height:100%!important;max-height:none!important;min-height:150px!important}
 #game #miniSelectScreen .mini-card-copy{padding:36px 0 0!important}
 #game #miniSelectScreen .mini-card-copy b{font-size:20px!important}
 #game #miniSelectScreen .mini-card-copy span{font-size:13px!important}
 #game #miniSelectScreen .mini-lock-note{grid-column:2!important}
 #game #miniSelectScreen .mini-stats{flex-wrap:wrap!important}
}
#game #miniSelectScreen .mini-lobby-head{width:100%!important;max-width:none!important;box-sizing:border-box!important}
#game #miniSelectScreen .mini-choice{animation:none!important;transform:none!important}
#game #miniSelectScreen .mini-choice:disabled{opacity:1!important;filter:none!important}
#game #pathScreen .map-topbar{width:auto!important;max-width:none!important;margin:0!important}
#game #pathScreen .map-progress-hud{position:relative!important;inset:auto!important;transform:none!important}
#game #collectionScreen .house-beaver-stage{container-type:size}
#game #collectionScreen #houseBeaver{width:min(100cqw,100cqh)!important;height:min(100cqw,100cqh)!important;aspect-ratio:1!important;flex:none!important}
#game #miniSelectScreen .mini-choice.progress-locked{opacity:1!important;filter:none!important;background:#f7e4ba!important}
#game #miniSelectScreen .mini-card-art img{max-height:100%!important;object-fit:contain!important}
@media(max-height:450px) and (min-width:650px){
 #game #miniSelectScreen .mini-lobby-head{padding:4px 12px!important}
 #game #miniSelectScreen .mini-lobby-beaver{width:28px!important;height:28px!important}
 #game #miniSelectScreen .mini-lobby-copy b{font-size:17px!important}
 #game #miniSelectScreen .mini-choice{padding:8px!important;gap:4px!important}
 #game #miniSelectScreen .mini-card-art{min-height:40px!important}
 #game #miniSelectScreen .mini-card-copy b{font-size:18px!important;margin:3px 0!important}
 #game #miniSelectScreen .mini-card-copy small{font-size:10px!important}
 #game #miniSelectScreen .mini-card-copy span{font-size:12px!important;line-height:1.2!important}
 #game #miniSelectScreen .mini-lock-note{font-size:11px!important}
}
