/* Patrol controls keep touch targets outside the playfield. */
dialog:has(.game-v07){width:calc(100% - 20px);max-width:410px;max-height:calc(100dvh - 12px);padding:12px;margin:auto;overflow:auto;overscroll-behavior:contain}
.game-v07{display:grid;gap:6px;width:100%;max-width:370px;padding-bottom:env(safe-area-inset-bottom,0px)}
.game-v07 .patrol-head{grid-column:1;text-align:left;padding:2px 5px;display:flex;align-items:baseline;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.game-v07 .patrol-head small{font-size:.74rem;color:#d9bfd7}
.game-v07 .patrol-head strong{font-size:.89rem;color:#ffe4b5}
.game-v07 .game-controls button:active{transform:translateY(2px);border-color:#ffdda9}
.game-v07 .game-stage canvas{image-rendering:pixelated}
.game-v07 [data-game-hud]{font-size:12px;line-height:20px;min-height:20px;margin:0;color:#efe5fa;font-variant-numeric:tabular-nums}
.game-v07 .game-stage{display:grid;place-items:center;min-height:0}
.game-v07 .game-stage canvas{display:block;width:min(100%,320px,calc((100dvh - 310px - env(safe-area-inset-bottom,0px)) * .7619));height:auto;max-width:100%;max-height:none;aspect-ratio:320/420;object-fit:contain;border-radius:12px;touch-action:none}
.game-v07 .game-stage [data-game-overlay]{border-radius:12px;gap:8px;padding:10px;font-size:14px}
.game-v07 .game-stage [data-game-overlay] small{font-size:11px}
.game-v07 .game-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;min-height:148px}
.game-v07 .game-dpad{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,48px);gap:2px;flex:0 0 148px}
.game-v07 .game-direction{padding:10px;min-height:48px;width:48px;height:48px;border-radius:12px;background:#39314c;border-color:#76618d;box-shadow:inset 0 2px 0 #b99ac025,0 3px 0 #151325}
.game-v07 .game-up{grid-area:1/2}.game-v07 .game-left{grid-area:2/1}.game-v07 .game-right{grid-area:2/3}.game-v07 .game-down{grid-area:3/2}
.game-v07 .game-pad-center{grid-area:2/2;display:grid;place-items:center;color:#9d83bd;background:#29233c;border-radius:50%;font-size:19px}
.game-v07 .game-weapons{display:grid;grid-template-columns:repeat(2,54px);gap:8px;align-items:center;justify-content:center;min-width:116px}
.game-v07 .game-weapons>button{width:54px;height:54px;min-height:54px;padding:11px;border-radius:50%;box-shadow:inset 0 3px 0 #ffffff20,0 4px 0 #151325}
.game-v07 .game-fire{color:#32233d;background:#f3c48f;border-color:#ffdda9}
.game-v07 .game-laser{color:#c3ecf4;background:#342d51;border-color:#8270a8}
.game-v07 .game-laser[data-state=ready]{border-width:3px;border-style:double;box-shadow:0 0 12px #a7ebf640,0 4px 0 #151325}
.game-v07 .game-laser[data-state=active]{border-style:dashed}
.game-v07 .game-laser:disabled{opacity:.65}
.game-v07 .game-controls svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:2.3;stroke-linejoin:round;stroke-linecap:round;pointer-events:none}
.game-v07 .game-laser-readout{grid-column:1/-1;display:grid;gap:4px;text-align:center;width:116px;min-height:28px}
.game-v07 .game-laser-readout progress{display:block;width:100%;height:6px;border:0;accent-color:#b7dce8;background:#3c3651;border-radius:4px;overflow:hidden}
.game-v07 progress::-webkit-progress-bar{background:#3c3651}
.game-v07 progress::-webkit-progress-value{background:#a4deec}
.game-v07 progress::-moz-progress-bar{background:#a4deec}
.game-v07 [data-game-laser-status]{font-size:10px;line-height:14px;white-space:nowrap;color:#d6c8e7;font-variant-numeric:tabular-nums}
.game-v07 .actions{margin:0;gap:6px}
.game-v07 .actions button{min-height:48px;font-size:11px;padding:7px 5px}
.game-v07 .focus-note{margin:0;text-align:center;line-height:14px;font-size:10px}
.game-v07 button,.game-v07 canvas{-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
.game-v07 .game-controls button{touch-action:none}
.game-v07 button:focus-visible,.game-v07 canvas:focus-visible{outline:3px solid #f4cda0;outline-offset:2px}
@media(min-width:560px) and (max-height:500px){
 dialog:has(.game-v07){max-width:700px}
 .game-v07{max-width:670px;grid-template-columns:minmax(0,1fr) 270px;align-items:center}
 .game-v07>.eyebrow,.game-v07>[data-game-hud],.game-v07>.game-stage{grid-column:1}
 .game-v07>.game-stage{grid-row:3/7}
 .game-v07 .game-stage canvas{height:min(420px,calc(100dvh - 95px));width:auto}
 .game-v07>.game-controls{grid-column:2;grid-row:3}
 .game-v07>.actions{grid-column:2;grid-row:4}
 .game-v07>.focus-note{grid-column:2;grid-row:5}
}
