/* Shared by server-hosted and player-hosted rooms. One scroll area for details. */
#hud.hud.player-status.unit-panel{
 width:min(256px,calc(100vw - 20px));max-width:none;height:auto;max-height:calc(100% - 24px);
 top:12px;bottom:auto;display:flex;flex-direction:column;overflow:hidden;pointer-events:auto;
 font-size:12px;background:#253025f2;
}
#hud.unit-panel .status-main{display:flex;flex-direction:column;gap:6px;padding:10px;flex:none}
#hud.unit-panel .unit-identity{display:flex;gap:10px;align-items:center}
#hud.unit-panel #status-portrait{flex:none;width:66px;height:42px;align-self:center}
#hud.unit-panel #status-portrait.infantry-portrait{width:44px}
#hud.unit-panel #status-portrait.infantry-portrait img{object-fit:cover;object-position:center 8%}
#hud.unit-panel .status-content{min-width:0;flex:1}
#hud.unit-panel #status-title{font-size:16px;line-height:1.2;margin:0 0 2px;overflow-wrap:anywhere}
#hud.unit-panel #status-name{font-size:11px;white-space:normal;line-height:1.25;margin:0}
#hud.unit-panel .unit-metrics{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
#hud.unit-panel .unit-metrics.has-fuel{grid-template-columns:repeat(2,minmax(0,1fr))}
#hud.unit-panel #status-fuel{margin:0;min-width:0}
#hud.unit-panel #health-label,#hud.unit-panel .fuel-line{font-size:11px;line-height:16px;white-space:nowrap}
#hud.unit-panel .fuel-line{gap:2px}
.unit-health-line{display:flex;align-items:baseline;justify-content:space-between;gap:2px}.unit-speed{font-size:9px;color:#dadfca;white-space:nowrap;font-variant-numeric:tabular-nums}
#hud.unit-panel .health-track,#hud.unit-panel .fuel-meter{height:5px;border:0;margin:3px 0 0!important;border-radius:2px;overflow:hidden}
#hud.unit-panel .health-track{max-width:none}
#hud.unit-panel #status-ammo{font-size:13px}
#hud.unit-panel .weapon-status{display:flex;gap:4px;font-size:11px}
#hud.unit-panel .weapon-status[hidden]{display:none!important}
#hud.unit-panel #status-resupply,#hud.unit-panel #status-alert{margin:0;padding:0;font-size:11px;line-height:1.3}
#hud.unit-panel .orders-panel{padding:0;border:0;min-height:0;flex:0 1 auto;display:flex;flex-direction:column}
#hud.unit-panel .orders-switch{display:grid!important;order:0;flex:none;grid-template-columns:minmax(max-content,1.2fr) minmax(max-content,1fr);gap:4px;padding:0 8px 7px}
#hud.unit-panel .orders-switch button{display:inline-flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;font-size:13px;padding:5px;min-height:33px}
#hud.unit-panel .orders-switch kbd{font-size:10px;min-width:15px;padding:0 2px;line-height:1.3}
#hud.unit-panel :is(.orders-heading,#orders-compact,#orders-collapse){display:none!important}
#hud.unit-panel #unit-tab-info{align-self:start;min-width:22px;min-height:24px;padding:2px;font-size:11px;background:transparent;flex:none;color:#e9ce8f}
#hud.unit-panel .orders-vehicle-profile{order:2;margin:0;padding:0 8px 7px;border:0;background:none;flex:none}
#hud.unit-panel .orders-vehicle-profile>strong{display:block;font-size:11px;margin:0 0 4px}
#hud.unit-panel .vehicle-profile-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
#hud.unit-panel .vehicle-profile-options button{display:grid;place-items:center;min-width:0;min-height:36px;padding:4px;font-size:0}
#hud.unit-panel .vehicle-profile-options button::before{display:none}
#hud.unit-panel .vehicle-profile-options svg{display:block;width:21px;height:21px}
#hud.unit-panel #orders-vehicle-profile-state{font-size:11px;line-height:1.3;margin:4px 0 0}
#hud.unit-panel .orders-vehicle-profile:not(.vehicle-profile-emergency) #orders-vehicle-profile-state{display:none}
#hud.unit-panel #orders-combat-row{order:2;padding:0 8px 7px;display:block;flex:none}
#hud.unit-panel #orders-combat-title{display:none}
#hud.unit-panel .orders-combat-options{display:flex;width:100%;gap:4px}
#hud.unit-panel .orders-combat-options label{width:auto;flex:1;height:36px}
#hud.unit-panel .unit-route-line{order:3;display:flex;align-items:center;gap:5px;padding:6px 8px;border-top:1px solid #6a775a66;flex:none}
#hud.unit-panel .unit-route-line #orders-status{font-size:11px;line-height:1.3;font-weight:500;min-width:0;flex:1}
#hud.unit-panel .unit-route-line button{min-height:31px;padding:4px;font-size:11px;white-space:nowrap}
#hud.unit-panel .orders-camera-actions{order:4;display:flex;gap:5px;padding:0 8px 7px;flex:none}
#hud.unit-panel .orders-camera-actions button{flex:1;font-size:12px;min-height:31px;padding:4px}
#hud.unit-panel #orders-priority{display:flex;align-items:stretch;gap:2px;flex:none}
#hud.unit-panel #orders-priority button{display:grid;place-items:center;min-width:31px}
#hud.unit-panel #orders-priority .has-contact{box-shadow:inset 0 -2px #e5b667}
#hud.unit-panel #orders-target-clear[hidden]{display:none}
#hud.unit-panel #orders-priority button[aria-pressed=true]{background:#505333;border-color:#e5b667;color:#fff0c3}
#hud.unit-panel .unit-detail-tabs{order:5;display:flex;gap:2px;padding:6px 8px 0;background:#1c291f;border-top:1px solid #6a775a66;border-bottom:1px solid #778568;flex:none}
#hud.unit-panel .unit-detail-tabs button{position:relative;flex:1;min-width:0;min-height:32px;margin:0 0 -1px;padding:5px 5px 6px;font-size:12px;font-weight:600;white-space:nowrap;border:1px solid #778568;border-top-width:2px;border-bottom:0;border-radius:6px 6px 0 0;background:#253025;box-shadow:none;color:#bac3ab}
#hud.unit-panel .unit-detail-tabs [aria-expanded=true]{border-top-color:#e4bb68;color:#ffe5ac}
#hud.unit-panel .unit-detail-tabs button:focus-visible{outline:2px solid #e4bb68;outline-offset:-4px}
#hud.unit-panel[data-detail=""]{border-bottom-left-radius:8px;border-bottom-right-radius:8px}
#hud.unit-panel[data-detail=""] .orders-panel::after{content:"";order:7;flex:0 0 6px;background:linear-gradient(#253025,#202b21)}
#hud.unit-panel .unit-detail-scroll{order:6;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b1bd9a #263324;scrollbar-gutter:stable;flex:0 1 auto;background:#253025}
#hud.unit-panel .unit-detail-pane{padding:8px}
#hud.unit-panel #orders-body{display:flex;flex-direction:column;overflow:visible;gap:8px;min-height:auto;flex:none}
#hud.unit-panel #orders-body>:not([hidden]){flex-shrink:0}
#hud.unit-panel :is(#orders-edit-route,#orders-edit-back,#orders-route-summary){display:none!important}
#hud.unit-panel #orders-waypoints{display:block!important;list-style:none;margin:0;padding:0}
#hud.unit-panel #orders-waypoints li{display:grid;grid-template-columns:2.2em minmax(0,1fr) 26px;align-items:start;gap:5px;min-height:0;padding:3px 4px;margin:0 0 2px}
#hud.unit-panel #orders-waypoints li[aria-current=step]{background:#4a4d32}
#hud.unit-panel #orders-waypoints li>.orders-point-number{display:grid;align-items:center;height:26px;padding:0;text-align:center;font-size:12px;font-weight:650;white-space:nowrap}
#hud.unit-panel #orders-waypoints [aria-current=step]>.orders-point-number{color:#ffdb8d}
#hud.unit-panel .orders-point-controls,#hud.unit-panel .orders-point-phase{display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;gap:4px;container-type:normal}
#hud.unit-panel .orders-point-arrival{border:0;padding:0}
#hud.unit-panel .orders-point-phase[hidden]{display:none}
#hud.unit-panel .orders-point-phase details{width:28px}
#hud.unit-panel .orders-point-phase :is(summary,button),#hud.unit-panel .orders-point-remove{width:28px;height:26px;min-height:26px;padding:1px}
#hud.unit-panel .orders-point-phase svg{width:18px;height:18px}
#hud.unit-panel .orders-point-pace svg{width:22px;height:22px}
#hud.unit-panel .orders-point-remove{width:26px;font-size:17px;line-height:1}
#hud.unit-panel .orders-point-observe{font-size:18px;line-height:1}
#hud.unit-panel #orders-route{order:-1;padding:4px;flex:none}
#hud.unit-panel .orders-motion-patrol{order:0}
#hud.unit-panel .orders-travel-defaults{order:1}
#hud.unit-panel #orders-road-row{order:1;margin:0;padding:2px 0}
#orders-road-row .route-preferences{display:flex;flex-wrap:wrap;gap:2px 8px}
#orders-road-row .orders-end-row{padding:0;font-size:11px}
#orders-trip-estimate{display:block;min-height:1.4em;font-size:10px;line-height:1.4;white-space:nowrap;font-variant-numeric:tabular-nums;color:#d4d7c6}
#hud.unit-panel .orders-topline{display:none}
#hud.unit-panel .orders-actions{display:none}
#hud.unit-panel #orders-armour-row{order:2;flex:none;display:flex;align-items:flex-start;gap:5px;font-size:11px;line-height:1.35;margin:0;padding:0 8px 7px}
#hud.unit-panel #orders-armour-row input{flex:none;margin:2px 0 0}
#hud.unit-panel .orders-launch{order:2;display:grid;grid-template-columns:1fr 1fr;gap:4px}
#hud.unit-panel .orders-launch button{font-size:10px;min-height:32px;padding:5px 3px}
#hud.unit-panel .orders-route-guide{order:3}
#hud.unit-panel :is(#orders-waypoints,#orders-route-summary,.unit-group-members,[data-escort-list]){max-height:none;overflow:visible}
#hud.unit-panel.route-editing #orders-waypoints{flex:none;max-height:none;overflow:visible}
#hud.unit-panel .orders-ending{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:2px 5px 5px}
#hud.unit-panel #orders-end-row,#hud.unit-panel .orders-ending-actions button{display:inline-grid;place-items:center;position:relative;box-sizing:border-box;width:29px;height:28px;padding:0}
#hud.unit-panel #orders-end-row{border:1px solid #818b71;border-radius:4px;cursor:pointer}
#hud.unit-panel #orders-end-hold{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:inherit}
#hud.unit-panel #orders-end-row:has(:checked){background:#695632;border-color:#edc47b;color:#fff0c4}
#hud.unit-panel #orders-end-row:focus-within{outline:2px solid #edc47b;outline-offset:1px}
#hud.unit-panel #orders-end-row:has(:disabled){opacity:.55;cursor:default}
#hud.unit-panel .orders-ending legend{font-size:12px}
#hud.unit-panel .orders-ending-actions{grid-column:auto}
#hud.unit-panel #orders-stop{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:none;min-height:28px;padding:3px 6px;font-size:11px;white-space:nowrap;color:#f0c6a9}
#hud.unit-panel #status-meta{border:0;line-height:1.5;margin-top:5px}
#hud.unit-panel .escort-panel{padding:0;border:0;margin:0;background:none;font-size:12px}
#hud.unit-panel .escort-row{display:flex;flex-direction:column;align-items:stretch;gap:5px}
#hud.unit-panel .escort-row select{width:100%;min-width:0}
#hud.unit-panel .escort-settings{display:grid;grid-template-columns:1fr;gap:6px}
#hud.unit-panel .escort-settings label{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;font-size:12px}
#hud.unit-panel .escort-settings select{max-width:72%;min-width:0;font-size:12px}
#hud.unit-panel .escort-panel button{min-height:31px}
#hud.unit-panel #unit-crew{order:1;flex:none;padding:0 8px 6px;border:0}
#hud.unit-panel .unit-crew-header{padding:0 0 3px;gap:4px}
#hud.unit-panel .unit-crew-header button{min-height:22px;padding:1px 5px;font-size:10px}
#hud.unit-panel .unit-crew-seats{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:4px 2px}
#hud.unit-panel .unit-crew-seats-tank{grid-template-columns:repeat(2,minmax(0,1fr)) minmax(0,1.06fr) minmax(0,1.14fr)}
#hud.unit-panel .unit-crew-seats-tank .unit-crew-role{white-space:nowrap}
#hud.unit-panel .unit-crew-member{gap:2px;padding:2px 0;min-height:45px}
#hud.unit-panel .unit-crew-face{width:26px;height:26px}
#hud.unit-panel .unit-crew-role{font-size:9px;line-height:11px}
#hud.unit-panel .unit-crew-slot>.crew-driver-control{left:auto;right:0;top:0;width:20px;height:20px}
#hud.unit-panel .unit-crew-actions{gap:2px;margin:1px 0 0}
#hud.unit-panel .unit-crew-actions button{display:grid;place-items:center;width:24px;min-height:22px;padding:0;font-size:12px;line-height:1}
#hud.unit-panel #unit-group{padding:0;margin:0;border:0;max-height:none}
#hud.unit-panel .unit-group-header{flex-wrap:wrap;gap:5px}
#hud.unit-panel .unit-group-actions{display:flex;flex-wrap:wrap;gap:4px}
#hud.unit-panel .unit-group-actions button{font-size:11px}
#hud.unit-panel .unit-group-member{grid-template-columns:minmax(0,1fr) auto}
#hud.unit-panel .unit-group-health{grid-column:1;grid-row:2}
#hud.unit-panel .unit-group-member-actions{grid-column:2;grid-row:1/3}
#hud.unit-panel .unit-group-member>button{min-width:0}
#hud.unit-panel .unit-group-member>button span{white-space:normal;overflow-wrap:anywhere}
#hud.unit-panel #fuel-note{font-size:12px;margin:0 0 7px}
#hud.unit-panel .fuel-transfer{margin:0}
#map-panel.expanded #hud.hud.player-status.unit-panel{width:100%;height:100%;top:auto;max-height:100%;grid-column:1}
#map-panel.expanded[data-side=left] #hud.hud.player-status.unit-panel{grid-column:3}
@media(min-width:901px){
 #map-panel.expanded{grid-template-columns:256px minmax(0,1fr) 182px}
 #map-panel.expanded[data-side=left]{grid-template-columns:182px minmax(0,1fr) 256px}
}
@media(max-width:900px){#hud.unit-panel .orders-switch button{font-size:12px;gap:3px}}

canvas.picking-companion{cursor:crosshair}
#escort-panel [aria-pressed="true"]{border-color:#dbba71;background:#534a31}

#flag-recall{position:absolute;z-index:12;top:14px;left:50%;transform:translateX(-50%);background:#283622;color:#fff1c6;border:1px solid #dab76b;border-radius:5px;padding:8px 13px}
