html,body,#app{width:100%;height:100%;margin:0}body{background:#000;color:#fff;font-family:Menlo,Monaco,Consolas,monospace;overflow:hidden}*{box-sizing:border-box}button,summary{font:inherit;color:inherit;cursor:pointer}button{border:1px solid #777;border-radius:4px;padding:8px 12px;background:#111;min-height:40px}button:hover,button:active{background:#333}button:disabled{opacity:.4;cursor:default}button:focus-visible,summary:focus-visible{outline:2px solid white;outline-offset:3px}[hidden]{display:none!important}.game{position:relative;width:100%;height:100%;height:100dvh;background:#000;overflow:hidden}.playfield{position:absolute;inset:60px 0 0}canvas{display:block;width:100%;height:100%}.toolbar{position:absolute;top:0;left:0;width:100%;min-height:60px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #444;background:#000;z-index:3}.toolbar nav{display:flex;align-items:center;gap:8px}.stats{font-size:14px;white-space:nowrap}.help{font-size:13px}.help summary{padding:10px 4px}.help>div{position:absolute;right:8px;top:100%;width:min(350px,calc(100vw - 16px));max-height:calc(100dvh - 100px);overflow:auto;padding:12px 18px;background:#111;border:1px solid #777;line-height:1.6}.view-option{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer}.view-option input{accent-color:white;flex-shrink:0}.view-option input:focus-visible{outline:2px solid white;outline-offset:3px}.game-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(380px,calc(100% - 32px));padding:24px;background:#000000ed;border:1px solid #777;text-align:center;max-height:calc(100% - 16px);overflow:auto}h1{font-size:24px;margin:0 0 14px}.game-panel p{font-size:14px;line-height:1.6}.game-panel .instructions{color:#bbb;font-size:12px}.game-panel button{min-width:150px}.pane-label{position:absolute;transform:translate(-50%);font-size:12px;white-space:nowrap;pointer-events:none;background:#000000b3;padding:3px 6px}.pane-divider{position:absolute;background:#555;pointer-events:none}.reticle{position:absolute;width:16px;height:16px;transform:translate(-50%,-50%);pointer-events:none;opacity:.8}.reticle:before,.reticle:after{content:"";position:absolute;background:#fff}.reticle:before{top:7px;left:0;width:16px;height:1px}.reticle:after{top:0;left:7px;width:1px;height:16px}.touch-controls{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:700px),(pointer:coarse){.toolbar{padding:6px 10px;min-height:88px;flex-wrap:wrap;gap:4px}.toolbar nav{gap:6px}.toolbar button,.help{font-size:12px}.stats{width:100%;font-size:13px}.playfield{top:88px;bottom:142px}.touch-controls{position:absolute;left:0;bottom:0;width:100%;height:142px;display:flex;align-items:center;justify-content:center;gap:16px;padding:8px 12px max(8px,env(safe-area-inset-bottom));border-top:1px solid #444}.touch-controls button{min-width:48px;min-height:48px;touch-action:none;-webkit-user-select:none;user-select:none}.direction-pad{display:grid;grid-template-columns:repeat(3,44px);gap:4px}.direction-pad button{min-width:44px;min-height:44px;padding:5px;font-size:20px}.direction-pad button:first-child{grid-column:2}.direction-pad button:nth-child(2){grid-column:1}}@media(max-height:500px)and (orientation:landscape){.toolbar{min-height:48px;padding:4px 10px;flex-wrap:nowrap}.stats{width:auto;font-size:12px}.playfield{inset:48px 90px 0 144px}.touch-controls{height:calc(100% - 48px);width:100%;bottom:0;padding:0;border:0;pointer-events:none;display:block}.touch-controls button{pointer-events:auto}.direction-pad{display:grid;grid-template-columns:repeat(3,44px);gap:4px;position:absolute;left:4px;top:50%;transform:translateY(-50%)}.direction-pad button{min-width:44px;min-height:44px;padding:5px;font-size:20px;touch-action:none}.direction-pad button:first-child{grid-column:2}.direction-pad button:nth-child(2){grid-column:1}.touch-controls>[data-hold]{position:absolute;right:8px;top:20%}.touch-controls>[data-fire]{position:absolute;right:8px;bottom:20%}.game-panel{padding:12px}.game-panel h1{font-size:18px}.game-panel .instructions{display:none}}.geometry-choices{border:0;padding:0;margin:18px 0;text-align:left}.geometry-choices legend{font-size:12px;color:#bbb;margin-bottom:8px}.geometry-choices label{display:flex;align-items:center;gap:10px;border:1px solid #555;border-radius:4px;padding:12px;margin:8px 0;font-size:13px;line-height:1.5;cursor:pointer}.geometry-choices label:has(input:checked){border-color:#fff;background:#202020}.geometry-choices input{accent-color:white;flex-shrink:0}.game-panel .geometry-description{font-size:12px;color:#ccc}.game-panel [data-menu]{margin-top:10px;font-size:12px}@media(max-height:500px)and (orientation:landscape){.geometry-choices{margin:8px 0}.geometry-choices label{padding:6px;margin:4px 0;font-size:11px}.game-panel .geometry-description{display:none}}.external-model{position:absolute;transform:translate(-50%,-100%);display:flex;align-items:center;gap:8px;padding:3px 6px;background:#000000d9;font-size:12px;white-space:nowrap}.external-model select{min-width:0;min-height:40px;padding:6px;border:1px solid #777;border-radius:4px;background:#111;color:#fff;font:inherit;cursor:pointer}.external-model select:focus-visible{outline:2px solid white;outline-offset:2px}
