*{box-sizing:border-box}body{margin:0;background:#09131e;color:#eef5ff;font-family:system-ui,sans-serif}main{max-width:480px;margin:auto;padding:6px}.arena{position:relative;overflow:hidden;min-height:570px;border:1px solid #63728a;border-radius:16px;background:radial-gradient(ellipse at 50% 45%,#233b50,#101c2d 72%)}.hud{display:flex;justify-content:space-between;font-size:13px;font-weight:800;padding:12px 10px;color:#f8d881}.commander{height:86px;display:flex;align-items:center;padding:0 12px;gap:8px}.commander img{width:80px;height:80px;object-fit:contain}.commander p{font-size:13px;line-height:1.6;margin:0}#board{position:relative;width:100%;height:340px;touch-action:manipulation}.hex{position:absolute;transform:translate(-50%,-50%);width:18%;height:67px;padding:0;border:0;clip-path:polygon(50% 0,98% 25%,98% 75%,50% 100%,2% 75%,2% 25%);background:#526172;color:#fff;font:800 18px system-ui;touch-action:manipulation}.hex .icon{display:block;font-size:14px;line-height:17px}.hex.own{background:#24678c}.hex.enemy{background:#a84d60}.hex.supplied{background:linear-gradient(135deg,#45a3c6,#235978)}.hex.selected{background:#f9d77c;color:#18293a}.hex.target{box-shadow:inset 0 0 0 5px #f9d77c;background-image:linear-gradient(30deg,transparent 65%,#f9d77c 66%)}.hex:disabled{opacity:1}.routes{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.legend{text-align:center;font-size:11px;line-height:1.7;color:#c1ccda}.tools{display:flex;gap:8px;padding:12px 10px}button{font-family:inherit;cursor:pointer;touch-action:manipulation}.tools button,.panel button{min-height:46px;border:1px solid #8b98a9;border-radius:10px;background:#eef0f3;color:#18293a;font-size:14px;font-weight:800;padding:10px;flex:1}.tools #end,.panel #start{background:linear-gradient(#ffdf91,#dab55b);border-color:#f4d384}.tools button:disabled{opacity:.45}.overlay{position:absolute;inset:0;background:#09131ed9;display:grid;place-items:center;padding:16px}.overlay[hidden]{display:none}.panel{width:100%;max-width:320px;text-align:center;border:1px solid #ac925b;background:#172638;border-radius:18px;padding:22px}.panel img{width:115px;height:115px}.panel h1{font-size:24px;color:#ffe2a0;margin:6px 0 14px}.panel p{font-size:14px;line-height:1.8}.panel button{display:block;width:100%;margin-top:10px}.panel button[hidden]{display:none}.save-note{text-align:center;color:#abb9c9;font-size:11px;margin:6px} @media(max-width:360px){#board{height:310px}.hex{height:61px}.commander{height:76px}.commander img{width:70px;height:70px}.arena{min-height:540px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* Keep the full battlefield and both turn controls inside short portrait screens. */
.arena{min-height:0}#board{height:clamp(220px,calc(100svh - 300px),340px)}.hex{height:22%}@media(max-width:360px){.arena{min-height:0}.commander{height:68px}.commander img{width:64px;height:64px}#board{height:clamp(220px,calc(100svh - 285px),310px)}.hex{height:22%}.tools{padding:8px 10px}}
