:root{color-scheme:dark;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#fff;background:#05070a}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{display:grid;place-items:center;background:radial-gradient(ellipse at center,#0c1820,#05070a 70%)}[hidden]{display:none!important}#arena{position:relative;width:min(100%,640px);height:100%;height:100dvh;overflow:hidden;background:#000;isolation:isolate}canvas{display:block;width:100%;height:100%;touch-action:none}.screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(12px,2.1vh,22px);padding:max(24px,env(safe-area-inset-top)) 24px max(20px,env(safe-area-inset-bottom));text-align:center;background:rgba(0,0,0,.2)}h1,h2{margin:0;color:#00e5ff;font-size:clamp(30px,7vw,52px);font-weight:650;letter-spacing:.09em;line-height:1.15}h1{font-size:clamp(38px,9vw,64px)}p{font-size:clamp(12px,2.9vw,15px);line-height:1.7;margin:0}.high{color:#ffe96b;letter-spacing:.07em;margin-bottom:8px}.buttons{display:grid;gap:clamp(10px,2vh,20px);width:100%}button{font:400 clamp(14px,3vw,20px) ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.06em;min-height:46px;width:100%;padding:12px 18px;color:white;border:1px solid #a4e9ed;background:rgba(0,229,255,.13);cursor:pointer;transition:background .15s,border-color .15s}button:hover{background:rgba(0,229,255,.26);border-color:#00e5ff}button:focus-visible,a:focus-visible{outline:2px solid #00e5ff;outline-offset:4px}button:disabled{opacity:.45;cursor:wait}.back-site{font-size:11px;color:#8fa4ad;text-decoration:none;margin-top:8px}.back-site:hover{color:#fff}.muted{color:#a3b2bb}.fleet{display:grid;grid-template-columns:repeat(4,1fr);width:100%;gap:8px;margin:8px 0}.fleet figure{margin:0;min-width:0}.fleet img{width:100%;height:92px;object-fit:contain;/* Original sprites contain transparent margins; use a larger image behind a clipped window. */}.fleet figure{overflow:hidden;position:relative;padding-top:85px}.fleet img{position:absolute;top:-145px;left:50%;width:370px;height:370px;max-width:none;transform:translateX(-50%)}.fleet figcaption{font-size:9px;letter-spacing:.04em;color:#9cb8bf;position:relative;background:#000;padding:6px 0}.fleet figure:last-child img{width:310px;height:310px;top:-105px}#instructions{gap:clamp(18px,4vh,34px)}#pause{position:absolute;top:max(16px,env(safe-area-inset-top));right:14px;min-height:38px;width:40px;padding:5px;font-size:19px;background:#061017bf}#hint{position:absolute;top:48%;left:5%;width:90%;text-align:center;pointer-events:none;color:#00e5ff;font-size:clamp(14px,3vw,19px);text-shadow:0 2px 12px #000}#hint span{font-size:.8em;color:#d3e2e7}#loading{position:absolute;bottom:12px;width:100%;text-align:center;background:#000c;color:#8cb4c0;font-size:11px}dialog{color:#fff;background:#070e14;border:1px solid #24717e;padding:30px 22px;width:min(90vw,460px);text-align:center}dialog::backdrop{background:#000b}dialog h2{font-size:clamp(19px,5vw,27px);margin-bottom:18px}.dialog-actions{display:flex;gap:12px;margin-top:25px}.dialog-actions button{font-size:14px}#confirmDelete{border-color:#f97171;color:#ffb9b9;background:#541d2440}#ending h2{font-size:clamp(30px,8vw,54px)}#paused{background:#000c}@media(max-height:600px){.screen{gap:10px;padding-top:16px;padding-bottom:16px}h1{font-size:36px}.buttons{gap:8px;max-width:420px}button{min-height:33px;padding:7px;font-size:13px}.high{margin:0}.back-site{margin:0}.fleet{margin:0}.fleet figure{padding-top:50px}.fleet img{top:-120px;width:290px;height:290px}.fleet figure:last-child img{top:-90px;width:260px;height:260px}#instructions{gap:12px}#instructions h2{font-size:25px}}@media(prefers-reduced-motion:reduce){button{transition:none}}

.fleet figure{padding-top:0;overflow:visible;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:12px}.fleet img,.fleet figure:last-child img{position:static;transform:none;width:65px;height:75px;max-width:100%;object-fit:contain}.fleet figure:last-child img{width:110px;height:105px}.fleet figcaption{padding:0;background:transparent}@media(max-width:440px){.fleet{gap:5px}.fleet img{width:52px;height:62px}.fleet figure:last-child img{height:86px}.fleet figcaption{font-size:8px}}

/* Wide playfield; gameplay and controls stay unchanged. */
#arena{width:100%;max-width:none}.buttons{width:min(100%,600px)}#instructions>button,#ending>button,#paused>button{max-width:600px}.fleet{max-width:600px}
