/* Tactical map: controls outside the map, readable symbols and optional expansion. */
#mmwrap { display:flex; flex-direction:column; border:1px solid #62878b; border-radius:10px; overflow:hidden; background:#0b151d; box-shadow:0 5px 20px #0008; min-height:0; }
.mm-heading { display:flex; align-items:center; gap:6px; padding:3px 5px; min-height:32px; background:linear-gradient(110deg,#20323b,#14212c); flex:none; }
.mm-heading>b { font:700 10px system-ui; letter-spacing:.8px; color:#e0ecef; white-space:nowrap; }
#mmzoom { position:static; font:700 10px system-ui; color:#a4d7df; margin-left:auto; }
#mmz { position:static; display:flex; flex-direction:row; gap:2px; }
#mmz button { width:28px; height:28px; font:600 21px system-ui; display:grid; place-items:center; background:#293e49; border:1px solid #62818c; border-radius:5px; }
#mmz button:hover,#mmz button:focus-visible { background:#456574; outline:2px solid #9af4eb; outline-offset:-2px; }
#minimap { height:0; flex:1; min-height:0; border:0; border-radius:0; cursor:crosshair; }
.mm-legend { display:flex; justify-content:space-around; gap:4px; padding:4px; font:600 9px system-ui; flex:none; background:#0b151d; }
.mm-legend span::before { content:''; display:inline-block; width:5px; height:5px; margin-right:3px; background:currentColor; border-radius:50%; }
.mm-own {color:#53eddd}.mm-ally {color:#79baff}.mm-enemy {color:#ff756e}.mm-resource {color:#f5ce69}
body.mobile #mmwrap { width:184px; height:181px; top:32px; right:max(6px,env(safe-area-inset-right)); bottom:auto; }
body.mobile .mm-heading { gap:3px; padding:3px; min-height:38px; }
body.mobile .mm-heading>b { font-size:9px; letter-spacing:.1px; }
body.mobile #mmz button { width:32px; height:32px; }
body.mobile #mmzoom { display:none; }
body.mobile .mm-legend { font-size:8px; gap:2px; padding:4px 2px; }
body.mobile #msgs { max-width:calc(100vw - 200px); }
#mmwrap.expanded,body.mobile #mmwrap.expanded { position:fixed; top:40px; right:50%; transform:translateX(50%); width:min(520px,calc(100vw - 24px)); height:min(410px,calc(100dvh - var(--panelH) - 54px)); z-index:8; }
#mmwrap.expanded .mm-heading>b {font-size:11px}
#mmwrap.expanded #mmz button {width:40px;height:40px}
#mmwrap.expanded #mmzoom {display:inline}
#mmwrap.expanded .mm-legend {font-size:11px;padding:6px}
body.map-expanded #tools,body.map-expanded #info {visibility:hidden;pointer-events:none}
@media (orientation:landscape) and (max-height:500px) {
 body.mobile #mmwrap { top:28px; width:184px; height:159px; }
 body.mobile #mmwrap.expanded { width:min(380px,55vw); height:calc(100dvh - var(--panelH) - 44px); top:28px; }
}
@media (max-width:350px) { body.mobile #mmwrap {width:166px;height:165px;} body.mobile .mm-heading>b {font-size:8px;} body.mobile #mmz button {width:30px;height:32px;} }
@media (orientation:portrait) and (max-height:740px) {
 body.mobile #tools { display:grid; grid-template-columns:repeat(3,44px); gap:4px; }
 body.mobile #tools button {width:44px;height:40px;font-size:16px}
 body.mobile #tools button small {font-size:8px}
}
