*{box-sizing:border-box}
body{margin:0;background:#101720;color:#eff6fa;font:15px system-ui,sans-serif}
main{max-width:560px;margin:auto;padding:12px}
h1{font-size:clamp(1.3rem,5vw,1.85rem);margin:0 0 9px;line-height:1.25}
.setup{display:flex;align-items:center;gap:8px;margin-bottom:9px}
select,button{font:inherit}
select{background:#19293b;color:#f3f8fc;border:1px solid #5a7291;border-radius:8px;padding:6px 9px}
button{min-height:44px;border:0;border-radius:10px;padding:8px 12px;font-weight:800;cursor:pointer;touch-action:manipulation}
button:disabled{opacity:.52}
button:focus-visible,select:focus-visible{outline:3px solid #89e9ee;outline-offset:2px}
#reset{margin-left:auto;min-height:36px;background:#23364a;color:#e6f4fc}
.arena{border:1px solid #45566a;border-radius:16px;overflow:hidden;background:#182530}
canvas{display:block;width:100%;aspect-ratio:400/260;max-height:calc(100dvh - 205px);object-fit:contain;touch-action:none}
#status{min-height:2.6em;display:grid;place-items:center;margin:8px 0;text-align:center;font-weight:750}
#action{width:100%;background:#daf5a7;color:#213019;touch-action:none}
#results{margin-top:9px;padding:9px 12px;border:1px solid #526777;border-radius:10px;background:#192635}
#results h2{font-size:.9rem;margin:0 0 4px}
#results ol{margin:0;padding-left:1.5rem;max-height:105px;overflow:auto}
#results li{padding:2px 0}
@media(max-height:380px){canvas{max-height:none}}
