/* Broadcast instrument strips. Team colour identifies; amber/red convey reserves. */
.plate{box-sizing:border-box;width:218px;padding:7px 9px 6px;border:0;border-top:2px solid var(--team);background:#0c1119e8;box-shadow:none;line-height:1.1}
.pl-head{align-items:center;gap:6px;margin-bottom:5px;min-width:0}
.pl-name{font-size:18px;letter-spacing:.035em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.pl-bet{font:600 9px 'Saira',sans-serif;white-space:nowrap;color:#f3e7c8;letter-spacing:.03em}
.pl-bet[hidden]{display:none}.plate.backed{outline:1px solid #e7d5a85c;outline-offset:2px}
.pl-hull{height:3px;margin:0 30px 4px 27px;background:#303744}
.pl-hull b{font-size:9px;top:-5px;letter-spacing:.06em}.pl-hull span{font-size:11px;top:-6px}
.critical-hull .pl-hull span{color:#ff8090}
.pl-meta{display:flex;flex-wrap:nowrap;gap:5px;align-items:center;margin:0 0 4px;min-height:19px}
.pl-plan{font-size:10px;font-weight:600;letter-spacing:.06em;margin:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-plan b{margin-left:3px}.pl-crew{gap:3px;flex-shrink:0}
.pl-crew i.crew-face{width:14px;height:17px;border-radius:0}
.pl-ammo{display:grid;grid-template-columns:1fr 1fr 1.12fr;gap:0;font-family:'Saira Condensed',sans-serif;text-transform:uppercase;letter-spacing:.04em;border-top:1px solid #303744;border-bottom:1px solid #303744;padding:4px 0}
.pl-weapon{display:flex;align-items:baseline;gap:4px;white-space:nowrap;border-right:1px solid #303744;padding:0 5px}
.pl-weapon:first-child{padding-left:0}.pl-weapon:last-child{border:0;padding-right:0}
.pl-weapon small{font-size:10px;color:#9cabbc}.pl-weapon b{font-size:16px;line-height:1;color:#e0e7ed;font-weight:600;font-variant-numeric:tabular-nums}
.pl-weapon em{font-size:8px;font-weight:700;font-style:normal;color:#cbd6e2;letter-spacing:.04em}
.pl-weapon.low b,.pl-weapon.low em{color:#efbc66}.pl-weapon.empty b,.pl-weapon.empty em,.pl-weapon.disabled em{color:#ff8090}.pl-weapon.disabled b{color:#8693a2}
.pl-action{height:13px;display:flex;align-items:center;justify-content:space-between;margin-top:4px}
.pl-rail{font-size:10px;letter-spacing:.05em}.pl-rail.ready{animation:none;color:#efbc66}.pl-rail.over{color:#ff8090}
.pl-mounts{font-size:9px;letter-spacing:.03em;color:#94a7ba}.pl-mounts.unavailable{color:#ff8090}
.pl-signal{min-height:28px;display:flex;flex-direction:column;gap:2px;margin-top:3px;border-left:2px solid #536172;padding-left:6px;color:#b3c0d0}
.pl-signal:empty{border-color:transparent;min-height:0;margin:0}.pl-signal b{font-size:11px;letter-spacing:.06em;font-weight:700}.pl-signal span{font-family:'Saira',sans-serif;font-size:9px;line-height:1.3}
.pl-signal.opening{border-color:#9fce95}.pl-signal.opening b{color:#a8d79e}.pl-signal.danger{border-color:#ff8090}.pl-signal.danger b{color:#ff8090}.pl-signal.reserve{border-color:#efbc66}.pl-signal.reserve b{color:#efbc66}
.pl-outs,.pl-outs.fresh{font-size:10px;letter-spacing:.03em;margin:4px 0 0;padding:2px 4px;line-height:1.2;animation:none;background:#632b3a;color:#ffc0c9}
.pl-flag,.pl-flag.death{margin:4px 0 0;padding:3px 4px;font-size:11px;line-height:1.2;letter-spacing:.03em;animation:none}
.pl-chat{position:static;width:auto;margin-top:4px;font-size:10px;line-height:1.25;white-space:normal;max-height:26px;overflow:hidden;display:none;transform:none}
.pl-chat.on{display:block;opacity:.8}.pl-chat b{font-size:9px}
.plate.edge-docked{background:#0c1119f2}
.ship-backed{position:absolute;top:0;left:0;z-index:8;color:#f3e7c8;font:10px 'Saira',sans-serif;text-align:center;text-indent:0;line-height:0;text-shadow:0 1px 4px #070b14;pointer-events:none;background:linear-gradient(#e7d5a8,#e7d5a8) left top/9px 1px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) left top/1px 9px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) right top/9px 1px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) right top/1px 9px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) left bottom/9px 1px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) left bottom/1px 9px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) right bottom/9px 1px no-repeat,linear-gradient(#e7d5a8,#e7d5a8) right bottom/1px 9px no-repeat}
.ship-backed[hidden]{display:none}
.sb-side.picked{box-shadow:inset 0 2px #e7d5a8;background:#24231c80}
.sb-side.picked .sb-name::after{content:''}
.sb-pick{position:static;display:block;font:600 9px 'Saira',sans-serif;letter-spacing:.1em;color:#f3e7c8;margin-top:4px;line-height:1}
.shiptag.backed::before{content:'◆ ';color:#f3e7c8}
.camera-bearing{bottom:12px}
body.portrait .sb-pick{display:block;font-size:8px;margin-top:3px}
body.portrait #dock{gap:6px;align-items:end}
body.portrait #dock .plate{padding:6px 7px;border:0;border-top:2px solid var(--team);text-align:left;min-width:0}
body.portrait #dock .plate.t1{border-right:0;text-align:left}
body.portrait #dock .plate.t1 .pl-head,body.portrait #dock .plate.t1 .pl-meta{flex-direction:row}
body.portrait .pl-name{font-size:16px}body.portrait .pl-bet{font-size:8px}
body.portrait .pl-crew i.crew-face{width:12px;height:15px}
body.portrait .pl-plan{font-size:9px;letter-spacing:.03em;margin:0}
body.portrait #dock .plate .pl-hull,body.portrait #dock .plate.t1 .pl-hull{margin:0 28px 5px 26px;height:3px}
body.portrait #dock .plate .pl-hull i,body.portrait #dock .plate.t1 .pl-hull i{inset:0 auto 0 0}
body.portrait #dock .plate .pl-hull span,body.portrait #dock .plate.t1 .pl-hull span{left:calc(100% + 5px);right:auto;top:-6px;font-size:10px}
body.portrait #dock .plate .pl-hull b,body.portrait #dock .plate.t1 .pl-hull b{right:calc(100% + 5px);left:auto;font-size:9px;top:-5px}
body.portrait .pl-weapon{gap:3px;padding:0 3px}body.portrait .pl-weapon small{font-size:9px}body.portrait .pl-weapon b{font-size:14px}body.portrait .pl-weapon em{font-size:7px}
body.portrait .pl-signal b{font-size:10px}body.portrait .pl-signal span{font-size:8px}
body.portrait .pl-outs,body.portrait .pl-outs.fresh,body.portrait .pl-flag{font-size:9px;margin:3px 0 0;padding:3px 4px}
body.portrait .pl-chat{position:static;width:auto;font-size:9px;max-height:23px}
#soundhint{left:50%;bottom:18px;transform:translateX(-50%)}
@media(max-height:520px) and (min-width:601px){
  .plate{width:176px;padding:5px 7px}.pl-name{font-size:16px}.pl-bet{font-size:8px}
  .pl-plan{font-size:9px}.pl-crew i.crew-face{width:12px;height:14px}
  .pl-weapon{padding:0 3px;gap:3px}.pl-weapon small{font-size:9px}.pl-weapon b{font-size:14px}.pl-weapon em{font-size:7px}
  .pl-action{height:11px}.pl-signal{min-height:24px}.pl-signal b{font-size:10px}.pl-signal span{font-size:8px}
  .pl-chat{font-size:9px;max-height:22px}.pl-outs,.pl-flag{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.pl-hull i{transition:none}}

/* One continuous component tag: offline, real repair fill, then restored. */
.plate .pl-outs,.plate .pl-outs.fresh{display:flex;flex-wrap:wrap;gap:3px;background:none;margin:4px 0 0;padding:0;animation:none}
.plate .pl-outs:empty{display:none}
.pl-system-tag{position:relative;isolation:isolate;display:flex;align-items:center;gap:5px;overflow:hidden;padding:3px 4px;background:#632b3a;border:1px solid #a44c5c;color:#ffd0d7;font-size:9px;letter-spacing:.025em;line-height:1.2}
.pl-system-tag b,.pl-system-tag span{position:relative;z-index:1;font-size:inherit;white-space:nowrap}.pl-system-tag b{font-weight:700}.pl-system-tag span{font-variant-numeric:tabular-nums;color:#f4e7ca}
.pl-repair-fill{position:absolute;inset:0;background:#42644d;transform-origin:left;z-index:0;pointer-events:none}
.pl-system-tag.restored{border-color:#527b52;background:#294832;color:#c2e8bc}.pl-system-tag.paused .pl-repair-fill{background:#47514b}
body.portrait .plate .pl-outs,body.portrait .plate .pl-outs.fresh{padding:0;margin:3px 0 0}.plate .pl-system-tag{font-size:9px}

/* Exchange calls occupy the existing doctrine line, never the playing field. */
.sb-style{display:flex;align-items:center;justify-content:space-between;gap:5px;height:17px;letter-spacing:.05em;min-width:0}
.sb-ex-status{font-size:11px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:17px;min-width:0}
.sb-ex-tally{font-size:10px;color:var(--dim);white-space:nowrap;font-variant-numeric:tabular-nums;flex-shrink:0;border-left:1px solid #59637166;padding-left:5px}
.sb-ex-status[data-state=won]{background:var(--team);color:#080d14;padding:0 5px;font-weight:800}
.sb-ex-status[data-state=lost]{color:#c5cdd6;font-weight:700}
.sb-ex-status[data-state=edge]{color:var(--team);font-weight:800}
.sb-ex-status[data-state=even],.sb-ex-status[data-state=trading]{color:#9aa9ba}
.sb-side[data-exchange=won]{box-shadow:inset 0 -2px var(--team)}
.sb-side.picked[data-exchange=won]{box-shadow:inset 0 2px #e7d5a8,inset 0 -2px var(--team)}
.sb-lead.settled{color:#d6dde5;letter-spacing:.05em}
body.portrait .sb-style{height:15px;gap:3px}body.portrait .sb-ex-status{font-size:9px;line-height:15px}body.portrait .sb-ex-tally{font-size:9px;padding-left:3px}
body.portrait .sb-ex-status[data-state=won]{padding:0 3px}
@media(max-height:520px) and (min-width:601px){.sb-style{height:15px}.sb-ex-status{font-size:10px;line-height:15px}.sb-ex-tally{font-size:9px}}

/* Fleet information extends the established plates, type and team colors. */
.fleet-roster{position:fixed;right:14px;top:132px;width:180px;max-height:40vh;overflow:auto;z-index:12;background:#0c1119e8;border-top:1px solid #d5dce22e;padding:8px;pointer-events:auto}
.fleet-roster-title{font-size:10px;letter-spacing:1px;color:#a4b2c0;margin-bottom:6px}
.fleet-ship{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;padding:7px 5px;border:0;border-left:2px solid var(--team);background:transparent;color:#d9e0e8;text-align:left;font:11px Saira,sans-serif;cursor:pointer}
.fleet-ship span{min-width:0;overflow-wrap:anywhere}.fleet-ship b{font-size:10px;white-space:nowrap}.fleet-ship[aria-pressed=true]{background:#b6c8e01a}.fleet-ship.lost{opacity:.4}
body.fleet-combat .shiptag{font-size:11px;pointer-events:none}body.fleet-combat .sb-name{font-size:23px}
body.portrait .fleet-roster{top:112px;right:8px;width:128px;max-height:125px;padding:5px}body.portrait .fleet-roster-title{font-size:8px}body.portrait .fleet-ship{font-size:9px;padding:5px 3px}body.portrait.fleet-combat .sb-name{font-size:16px}

.combat-scenario{width:100%;font:12px Saira,sans-serif;color:#e0e6ef;background:#0c1119;border:1px solid #8899aa50;padding:5px;margin-top:5px}.ctl-open .ct-title:has(.combat-scenario){flex-wrap:wrap}
.fleet-hull-icon{width:24px;height:32px;object-fit:contain;flex:0 0 24px}
.fleet-type{display:block;color:#a4b2c0;font-size:9px;line-height:1.2}
.fleet-ship>span{flex:1}
body.portrait .fleet-hull-icon{width:20px;height:28px;flex-basis:20px}
body.portrait .fleet-type{font-size:8px}
body.portrait.fleet-combat #fight-fullscreen{left:8px;right:auto}
.fleet-filters{display:flex;gap:3px;position:sticky;top:0;background:#0c1119;z-index:1;padding:3px 0 6px}
.fleet-filters button{flex:1;font:9px Saira,sans-serif;color:#a4b2c0;background:transparent;border:1px solid #53646c;padding:3px 0;cursor:pointer}
.fleet-filters button[aria-pressed=true]{color:#e6edf5;background:#b6c8e01a}
.fleet-ship[hidden]{display:none}

/* Bracketed class silhouettes identify subpixel hulls without inflating the
   physical ship or letting the cinematic focus pass blur the identity cue. */
 .ship-distance-marker{position:absolute;left:0;top:0;width:32px;height:32px;margin:-16px;pointer-events:none;z-index:3;color:var(--team);filter:drop-shadow(0 1px 2px #000) drop-shadow(0 0 2px #000)}
.ship-distance-marker::before{content:'';position:absolute;inset:0;background:linear-gradient(currentColor,currentColor) 0 0/7px 1px,linear-gradient(currentColor,currentColor) 0 0/1px 7px,linear-gradient(currentColor,currentColor) 100% 0/7px 1px,linear-gradient(currentColor,currentColor) 100% 0/1px 7px,linear-gradient(currentColor,currentColor) 0 100%/7px 1px,linear-gradient(currentColor,currentColor) 0 100%/1px 7px,linear-gradient(currentColor,currentColor) 100% 100%/7px 1px,linear-gradient(currentColor,currentColor) 100% 100%/1px 7px;background-repeat:no-repeat}
.ship-distance-marker img{width:24px;height:24px;margin:4px;display:block}
.ship-distance-marker b{position:absolute;left:35px;top:8px;font:700 10px system-ui;color:currentColor}
.ship-distance-marker[hidden]{display:none}

/* Wings remain legible without obscuring capital hulls with full-size labels. */
.ship-distance-marker.fighter-marker{width:18px;height:18px;margin:-9px;z-index:2}
.ship-distance-marker.fighter-marker::before{opacity:.6}
.ship-distance-marker.fighter-marker img{width:14px;height:14px;margin:2px}
.ship-distance-marker.fighter-marker b{display:none;left:21px;top:2px}
.ship-distance-marker.fighter-marker.selected b{display:block}
.wing-toggle{width:100%;padding:5px;border:0;border-left:2px solid var(--team);background:#ffffff09;color:#aab8c8;text-align:left;font:600 9px Saira,sans-serif;cursor:pointer}
.wing-toggle[hidden]{display:none}
.pl-profile {font-size:12px;line-height:1.5;color:#c4ccd8;letter-spacing:.025em;padding-top:3px;}
.pl-profile[hidden] {display:none;}
/* Vessel identity stays separate from its class and current tactical order. */
.pl-vessel-type{font-size:10px;line-height:13px;color:#a9b6c6;letter-spacing:.07em;margin:-2px 0 6px;text-transform:uppercase}
body.portrait .pl-vessel-type{font-size:9px;line-height:12px;margin-bottom:4px}
.ship-distance-marker b{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Fleet broadcasts: stable details, an unobstructed stage, optional deep inspection. */
.fleet-rail{position:fixed;right:12px;bottom:38px;width:224px;z-index:12;pointer-events:auto;display:flex;flex-direction:column;gap:8px}
.fleet-rail-controls{display:flex;gap:6px;flex-shrink:0}
.fleet-rail-controls button{flex:1;border:1px solid #70819565;background:#0b111cec;color:#d8e1ed;font:600 10px Saira,sans-serif;letter-spacing:.06em;padding:7px;cursor:pointer}
.fleet-rail-controls button[aria-pressed=true],.fleet-rail-controls button[aria-expanded=true]{background:#283443;color:#fff}
.fleet-focus-cards{display:flex;flex-direction:column;gap:10px;overflow:auto;min-height:0;scrollbar-width:thin}
.fleet-rail .plate{position:relative;left:auto;top:auto;width:100%;box-sizing:border-box;transform:none!important;padding:9px 10px;background:#0b111cef;flex-shrink:0;pointer-events:auto}
.fleet-rail .plate::before{content:attr(data-focus);display:block;font:600 9px Saira,sans-serif;letter-spacing:.13em;color:#98a9bc;margin-bottom:3px}
.fleet-rail .pl-chat{position:static;width:auto}
.fleet-rail:not(.details-open) .pl-crew,.fleet-rail:not(.details-open) .pl-profile,.fleet-rail:not(.details-open) .pl-chat{display:none}
.fleet-rail .pl-outs{max-height:48px;overflow:auto}
.fleet-rail .pl-action{height:auto;min-height:13px;flex-wrap:wrap;gap:3px}
.fleet-rail .pl-name{font-size:21px}
.fleet-rail .fleet-roster{position:absolute;inset:38px 0 auto auto;width:100%;max-height:calc(100% - 38px);box-sizing:border-box;background:#101923;box-shadow:0 12px 30px #0009;padding:8px;z-index:2}
.fleet-roster[hidden]{display:none}
body.fleet-combat .tactical{max-width:calc(100% - 270px);width:max-content;background:#0b111cd9;line-height:1.35;padding:5px 10px;text-align:center;white-space:normal}
body.fleet-combat .tactical b{display:block;font:700 12px Saira,sans-serif;letter-spacing:.05em;color:#e7edf5}
body.fleet-combat .tactical span{display:block;font:500 10px Saira,sans-serif;color:#acbbcf}
body.fleet-combat .slabel.torp{font-size:10px;background:#08111beb;padding:3px 6px;border-left:2px solid var(--team);max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.fleet-combat .sb-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:21px}
body.portrait .fleet-rail{left:8px;right:8px;bottom:34px;top:auto!important;width:auto;max-height:43vh;gap:6px}
body.portrait .fleet-focus-cards{display:grid;grid-template-columns:1fr 1fr;gap:6px;align-items:start}
body.portrait .fleet-rail .plate{padding:6px 7px;min-width:0}
body.portrait .fleet-rail .pl-name{font-size:17px}
/* Keep the portrait battlefield open; detailed battery/wing telemetry is opt-in. */
body.portrait .fleet-rail:not(.details-open) .pl-action,
body.portrait .fleet-rail:not(.details-open) .pl-signal,
body.portrait .fleet-rail:not(.details-open) .pl-outs,
body.portrait .fleet-rail:not(.details-open) .pl-rail,
body.portrait .fleet-rail:not(.details-open) .pl-flag{display:none}
body.portrait .fleet-rail .pl-crew{gap:3px}
body.portrait .fleet-rail-controls button{padding:5px;font-size:9px}
body.portrait .fleet-rail .fleet-roster{max-height:34vh;font-size:11px;inset:auto 0 30px auto}
body.portrait.fleet-combat .tactical{max-width:calc(100% - 28px);width:max-content}
body.portrait.fleet-combat .tactical b{font-size:10px}
body.portrait.fleet-combat .tactical span{font-size:9px}
body.portrait.fleet-combat .sb-name{font-size:16px}
body.portrait.fleet-combat #dock{display:none}
@media(max-height:540px) and (min-width:601px){.fleet-rail{width:202px;bottom:24px;gap:5px}.fleet-rail .plate{padding:5px 7px}.fleet-rail .pl-name{font-size:17px}.fleet-focus-cards{gap:5px}.fleet-rail .pl-signal{min-height:0}}
body.fleet-combat #scoreboard{left:12px;right:250px;transform:none;grid-template-columns:minmax(0,1fr) 120px minmax(0,1fr)}
body.fleet-combat .sb-name{font-size:20px;white-space:normal;line-height:1.05}
body.fleet-combat .sb-side{padding:8px 12px}
body.fleet-combat .sb-ex-status{white-space:normal;height:auto;font-size:10px;line-height:14px}
body.fleet-combat .sb-style{height:auto;min-height:17px}
body.fleet-combat .tactical{left:calc((100% - 238px)/2)}
body.portrait.fleet-combat #scoreboard{left:8px;right:8px;grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr)}
body.portrait.fleet-combat .sb-side{padding:6px 8px}
body.portrait.fleet-combat .sb-name{font-size:15px}
body.portrait.fleet-combat .sb-ex-status{font-size:8px;line-height:11px}
body.portrait.fleet-combat .tactical{left:50%}
.fleet-map{position:fixed;left:12px;bottom:46px;width:156px;background:#0a121bcc;border:1px solid #7891ad30;z-index:6;pointer-events:auto;padding:7px}
.fleet-map-title{font:600 9px Saira,sans-serif;letter-spacing:.1em;color:#acbdce}
.fleet-map-area{position:relative;height:98px;background:linear-gradient(#7891ad14 1px,transparent 1px),linear-gradient(90deg,#7891ad14 1px,transparent 1px);background-size:25% 25%;margin:5px 0}
.fleet-map-ship{position:absolute;transform:translate(-50%,-50%);padding:0;border:0;width:17px;height:17px;background:transparent;cursor:pointer;filter:drop-shadow(0 0 2px var(--team))}
.fleet-map-ship img{width:100%;height:100%;object-fit:contain}
.fleet-map-ship.fighter{width:6px;height:6px;opacity:.7}
.fleet-map-ship[aria-pressed=true]{outline:1px solid var(--team);outline-offset:3px}
.fleet-map-ship[hidden]{display:none}
.fleet-map-range{font:500 8px Saira,sans-serif;color:#a5b5c8;white-space:nowrap}
body.portrait .fleet-map{bottom:auto;top:var(--fleet-map-top,190px);width:116px;left:8px;padding:5px}
body.portrait .fleet-map-area{height:66px}
body.portrait .fleet-map-title{font-size:8px}
body.portrait .fleet-map-range{font-size:7px}
body.portrait.fleet-combat .camera-ident{bottom:calc(100dvh - var(--fleet-rail-top,620px) + 10px);left:8px;font-size:8px}
body.portrait.fleet-combat #timebadge{bottom:calc(100dvh - var(--fleet-rail-top,620px) + 8px);right:8px}
body.portrait.fleet-combat #fight-fullscreen{top:auto;bottom:4px;left:auto;right:8px;min-height:26px;padding:3px 8px;font-size:10px}
body.fleet-combat #soundhint{display:none}
.fleet-map-title,.fleet-map-range{display:block;line-height:1.2}
.fleet-map-ship.t0 img{filter:sepia(1) saturate(4)}
.fleet-map-ship.t1 img{filter:sepia(1) saturate(4) hue-rotate(175deg)}
body.fleet-combat .ship-distance-marker b{display:none}
body.fleet-combat .shiptag{display:block;background:#07111bba;padding:1px 4px;text-shadow:0 1px 2px #000}
.fleet-rail-controls button{white-space:nowrap;font-size:9px}
.fleet-rail-controls button:first-child{flex:1.4}
.fleet-rail-controls button:last-child{flex:.8}
body.fleet-combat .sb-lead{font-size:10px;letter-spacing:.04em;white-space:nowrap}
