/* A station matrix shown only after opening the loadout editor. */
.armament-editor{font:13px/1.35 var(--font-ui,system-ui);color:#edf3fc;min-width:0;display:flex;flex-direction:column;gap:10px}
.arm-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.arm-title{font-weight:800;margin-right:auto;letter-spacing:.07em}.arm-sym{display:flex;align-items:center;gap:6px;margin-left:auto;white-space:nowrap}
.armament-editor button,.arm-button,.sh-custom button{font:inherit;color:inherit;cursor:pointer;border:1px solid #7e92a566;background:#344251;border-radius:4px;padding:6px 10px}
.armament-editor button:hover,.arm-button:hover{background:#526479}.armament-editor button:focus-visible{outline:2px solid #ffda69;outline-offset:-3px}
.armament-editor .arm-filter.is-on{background:#8595a4;color:#101924}.arm-scroll{overflow:auto;max-height:46vh;border:1px solid #81919f66;background:#25313b;scrollbar-width:thin;overscroll-behavior:contain}
.arm-matrix{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;min-width:max-content}.arm-matrix th,.arm-matrix td{border-right:1px solid #121c25;border-bottom:1px solid #121c25;text-align:center;padding:0;width:54px;min-width:54px;height:53px}
.arm-matrix th:first-child{width:162px;min-width:162px;text-align:left;padding:7px 10px;font-size:12px}.arm-matrix small{display:block;font-weight:400;color:#abb8c5;margin-top:3px;font-size:10px}
.arm-matrix thead th{position:sticky;top:0;z-index:2;height:36px;background:#3d4b59;color:#e4edf6}.arm-matrix th:first-child{position:sticky;left:0;z-index:1;background:#303e4a}.arm-matrix thead th:first-child{z-index:3}
.armament-editor .arm-cell{width:100%;height:53px;padding:4px;border:2px solid transparent;background:#354550;border-radius:0;position:relative;display:flex;align-items:center;justify-content:center}.arm-cell svg{height:39px;width:39px;filter:drop-shadow(0 2px 1px #111b)}
.armament-editor .arm-cell.is-on{background:#617357;border-color:#d1e999}.armament-editor .arm-cell.is-locked{opacity:.43}.arm-cell .arm-qty{position:absolute;right:3px;bottom:2px;font:bold 10px system-ui;color:#fff;text-shadow:0 1px 2px #000}.arm-empty{font-size:22px;color:#9fadb9}
.arm-incompatible{background:repeating-linear-gradient(135deg,#23303a,#23303a 5px,#25343e 5px,#25343e 6px)}.arm-detail{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:32px;color:#dbe8f3}.arm-detail .arm-mass{margin-left:auto;color:#d2e89d}.arm-detail .is-over{color:#ff8982}.armament-editor button:disabled{opacity:.4;cursor:default}
/* Use the existing pane lifecycle and save actions, with room for the matrix. */
#ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-aircard{position:fixed;left:50%;top:90px;bottom:130px;transform:translateX(-50%);width:min(1180px,94vw);max-height:none;z-index:9;background:#1e2a38fa;display:flex}
#ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-plate{display:none}
#ui .so-hangar[data-tab=loadout] .so-pane--loadout.is-on{display:grid;grid-template-columns:230px minmax(0,1fr);gap:12px;align-items:start;padding:14px}
#ui .so-hangar[data-tab=loadout] .so-lo-sec,#ui .so-hangar[data-tab=loadout] .so-lo-cur{grid-column:1;margin:0}
#ui .so-hangar[data-tab=loadout] .armament-editor{grid-column:2;grid-row:1 / span 5;align-self:stretch}
#ui .so-hangar[data-tab=loadout] .arm-scroll{flex:1;max-height:calc(100vh - 390px);min-height:150px}
#ui .so-hangar[data-tab=loadout] .so-pay,#ui .so-hangar[data-tab=loadout] .so-stores,#ui .so-hangar[data-tab=loadout] .so-lo-foot{grid-column:1}.so-pane--loadout .so-warn{grid-column:1 / -1}
#ui .so-hangar[data-tab=loadout] .so-pres{max-height:145px;overflow:auto}#ui .so-hangar[data-tab=loadout] .so-lo-foot{flex-wrap:wrap}#ui .so-hangar[data-tab=loadout] .so-lo-foot [data-key='lo:view']{display:none}
#ui .so-hangar[data-tab=loadout] .so-co-layer{display:none}#ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-details-toggle{z-index:10}
.sh-custom{margin-top:12px;padding:14px;border:1px solid #8ca7b4;background:#1b2732;pointer-events:auto;display:flex;flex-direction:column;gap:12px}.sh-custom[hidden]{display:none}.sh-custom-head{display:flex;align-items:center;gap:10px}.sh-custom-head b{margin-right:auto}.sh-custom-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.sh-custom-actions input,.sh-custom-actions select{font:inherit;padding:7px;color:#edf3fc;background:#344251;border:1px solid #7e92a566;max-width:210px}.sh-custom-error{color:#ffb084;font-size:13px}
@media(max-width:800px){#ui .so-hangar[data-tab=loadout]:not(.details-hidden) .so-aircard{top:74px;bottom:105px;width:96vw}#ui .so-hangar[data-tab=loadout] .so-pane--loadout.is-on{grid-template-columns:1fr;padding:10px}#ui .so-hangar[data-tab=loadout] .armament-editor{grid-column:1;grid-row:3}#ui .so-hangar[data-tab=loadout] .arm-scroll{max-height:36vh;min-height:180px}#ui .so-hangar[data-tab=loadout] .so-pres{max-height:85px} .arm-matrix th:first-child{width:122px;min-width:122px}.arm-title{width:100%}.arm-sym{margin-left:0}.sh-custom{padding:8px}.sh-custom .arm-scroll{max-height:45vh}}

#ui .armament-editor .arm-cell{border:2px solid transparent;background:#354550;padding:4px;border-radius:0}
#ui .armament-editor .arm-cell:hover{background:#526479}
#ui .armament-editor .arm-cell.is-on{background:#617357;border-color:#d1e999}
#ui .armament-editor .arm-filter{padding:5px 9px;background:#344251;border:1px solid #7e92a566}
#ui .armament-editor .arm-filter.is-on{background:#8595a4;color:#101924}
#ui .so-binding-list{display:grid;grid-template-columns:1fr 1fr;gap:5px 20px;margin:12px 0}
#ui .so-binding-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;border-bottom:1px solid #ffffff20;padding:5px 0}
#ui .so-binding-row button{padding:7px 10px;min-width:105px;background:#324555;color:#fff;border:1px solid #ffffff55;cursor:pointer}
#ui .so-binding-row button.is-listening{background:#675c29;border-color:#ffdd65}
@media(max-width:700px){#ui .so-binding-list{grid-template-columns:1fr}}
#ui .so-hangar[data-tab=loadout] .so-slot{min-width:0;overflow:hidden}#ui .so-hangar[data-tab=loadout] .so-slot-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
