/* Mobile play view: keep the original arena geometry and scoring. */
.aim-loupe{position:fixed!important;z-index:1002;width:80px!important;height:80px!important;aspect-ratio:1!important;border:2px solid #b9ff65;border-radius:50%;pointer-events:none;background:#0b1327;box-shadow:0 4px 20px #0008}
.mobile-tip{display:none}
@media(max-width:900px) and (any-pointer:coarse), (max-width:650px){
 body.playing{overflow:hidden;overscroll-behavior:none}
 .playing #playArea,.playing #mission{position:fixed;inset:0;z-index:1000;margin:0;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));height:100dvh;background:#090d1b;border:0;border-radius:0;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:8px;overflow:hidden}
 .playing #playArea>*,.playing #mission>*{display:none}
 .playing #playArea>.stats,.playing #mission>.hud{display:flex;margin:0;gap:8px;flex-shrink:0}
 .playing .stats strong,.playing .hud strong{font-size:20px;margin:0}
 .playing .stats small,.playing .hud{font-size:10px;letter-spacing:0}
 .playing #arena{display:block;flex:none;width:min(100%,calc((100dvh - 160px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*900/570));max-width:none!important;min-height:0;margin:0 auto;border-radius:10px}
 .playing #arena>canvas{width:100%;height:auto;aspect-ratio:900/570}
 .playing #playArea>.bottom,.playing #mission>.controls{display:flex;margin:0;justify-content:flex-end;align-items:center;flex-shrink:0}
 .playing .bottom>.hint,.playing .controls>span,.playing #fireReady{display:none}
 .playing .play-state{width:100%;justify-content:space-between;flex-wrap:nowrap}
 .playing #notice,.playing #feedback{display:block;font-size:12px;line-height:1.4;min-height:17px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .playing .mobile-tip{display:block;font-size:12px;color:#b9cce8;text-align:center;margin:0}
 .playing #giveUp,.playing #quit{min-height:44px;padding:8px 12px;font-size:12px}
 .playing .stats>div:last-child{display:none}
 .playing .stats .mobile-time{display:block!important}
}
@media(max-height:500px) and (orientation:landscape){
 .playing #arena{width:min(100%,calc((100dvh - 100px - env(safe-area-inset-top) - env(safe-area-inset-bottom))*900/570))}
 .playing #playArea,.playing #mission{gap:4px}
 .playing .mobile-tip,.playing #notice,.playing #feedback{display:none}
 .playing .stats strong,.playing .hud strong{font-size:17px}
}
.mobile-time{display:none}
@media(max-width:900px) and (any-pointer:coarse), (max-width:650px){.playing .bottom #timer{display:none}.playing .play-state{justify-content:flex-end}}
/* v0.5.2: explicit dimensions avoid intrinsic canvas width and viewport drift. */
html,body{max-width:100%;overflow-x:clip}
@media(any-pointer:coarse),(max-width:650px){
 .playing #playArea,.playing #mission{
  inset:auto;left:var(--play-left,0px);top:var(--play-top,0px);
  width:var(--play-width,100%);max-width:var(--play-width,100%);min-width:0;
  height:var(--play-height,100dvh);max-height:var(--play-height,100dvh);
  box-sizing:border-box;justify-content:flex-start;
 }
 .playing #playArea>*,.playing #mission>*{min-width:0;max-width:100%;box-sizing:border-box}
 .playing #arena{
  width:min(100%,calc((var(--play-height,100dvh) - 200px)*1.578947));
  max-width:100%!important;min-width:0;flex-shrink:1;
 }
 .playing #arena>canvas{min-width:0;max-width:100%;width:100%;height:auto}
 .playing #playArea>.stats,.playing #mission>.hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}
 .playing .stats>div,.playing .hud>div{min-width:0;overflow:hidden}
 .playing .stats strong,.playing .hud strong{font-size:18px;white-space:nowrap}
 .playing .mobile-tip{display:block!important;line-height:1.4;font-size:11px;white-space:normal;margin:0 0 84px}
 .playing #notice,.playing #feedback{white-space:normal}
 .playing #giveUp,.playing #quit{max-width:100%}
}
@media(any-pointer:coarse) and (min-width:901px){
 .playing #playArea,.playing #mission{position:static;width:auto;height:auto;max-height:none}
}
@media(max-height:500px) and (orientation:landscape){
 .playing #arena{width:min(100%,calc((var(--play-height,100dvh) - 100px)*1.578947))}
 .playing .mobile-tip{display:none!important}
}
