/* The ship stays in the middle. Left: your ship's slots and the hull parts. Right: the chosen slot and everything that fits it,
   one tap to fit. Compact rows, never a wall of cards. */
.visual-hangar .modular-rail>:not(#hangar-left),.visual-hangar .modular-inspector>:not(#hangar-right){display:none!important}
.visual-hangar .modular-rail,.visual-hangar .modular-inspector{padding:10px}
.hangar-left,.hangar-right{min-width:0}
.hangar-left h3,.hangar-right h3{margin:12px 0 4px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#8ad4cc}.hangar-left>h3:first-child{margin-top:0}
.hangar-note{font:11px/1.45 system-ui;color:#a1bdc8;margin:2px 0 6px}
.hangar-warning{color:#efc083;font:11px/1.45 system-ui;margin:6px 0}
.hangar-description{font-size:12px;line-height:1.45;color:#a9c2ce;margin:4px 0}
.hangar-effect{color:#a2e6d2;font:11px/1.4 system-ui;margin:2px 0 0;grid-column:1/-1}
.hangar-art{display:flex;align-items:center;justify-content:center;overflow:hidden}.hangar-art img,.hangar-art canvas{max-width:100%;max-height:100%;object-fit:contain}
/* rows */
.hz-slots,.hz-parts,.hz-list,.hz-picklist{display:grid;gap:4px}
.hz-slot,.hz-part,.hz-row{display:grid!important;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-height:44px!important;padding:4px 8px!important;text-align:left;font-size:12px!important;line-height:1.25}
.hz-slot{grid-template-columns:22px minmax(0,1fr)}.hz-slot.active{border-color:#8ce4cf!important;background:#1b383a!important}.hz-slot.empty .hz-text small{color:#7f98a3;font-style:italic}
.hz-part.active{border-color:#e7c478!important;background:#2a2c1e!important}
.hz-row{border-left:3px solid var(--tint,#9fd8cf)!important}.hz-row.fitted{border-color:#8ce4cf!important;background:#173634!important}.hz-row.over .hz-price{color:#efc083}.hz-row.over{opacity:.75}
.hz-glyph{font-size:17px;color:#e7c478;text-align:center}
.hz-icon{width:34px;height:30px;display:flex;align-items:center;justify-content:center;overflow:hidden}.hz-icon .hangar-art{width:34px;height:30px;margin:0;border:0;background:none}.hz-icon img,.hz-icon canvas{width:34px;height:30px;object-fit:contain}
.hz-text{display:flex;flex-direction:column;min-width:0}.hz-text strong{font-size:12px;color:#e4eeef;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hz-text small{font:11px/1.3 system-ui;letter-spacing:0;color:#a3bcc7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hz-price{font-size:11px;color:#ebca82;white-space:nowrap;display:flex;flex-direction:column;align-items:flex-end;gap:1px}.hz-price small{font:10px/1.2 system-ui;letter-spacing:0;color:#d9b16a}.hz-row.fitted .hz-price{color:#8ce4cf}
.hz-family{margin:8px 0 2px;font:700 10px/1.2 system-ui;letter-spacing:.12em;text-transform:uppercase;color:#8ad4cc}
.hz-budget{font:11px/1.4 system-ui;color:#c8dfdf;margin:6px 0 0;padding:5px 8px;border:1px solid #2b4351;border-radius:6px}
/* the right panel: a head, the slot picker, what is fitted, and the list that scrolls */
#hangar-right{display:flex;flex-direction:column;height:100%;gap:6px}
.hz-head{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:8px}.hz-head .hz-text strong{font-size:15px}
.hz-mount-upgrade{display:grid;gap:5px;padding:8px;border:1px solid #456670;border-radius:5px;background:#12252b}.hz-mount-upgrade p,.hz-mount-upgrade small{margin:0;font-size:11px;line-height:1.35;color:#b0c8cb}.hz-mount-upgrade button{min-height:40px;padding:7px;color:#baf7e9;border-color:#548e82}.hz-mount-upgrade strong{font-size:12px;color:#c1e6e1}.hz-fallback>summary{font-size:12px}
#hangar-right select{margin:0;min-height:40px;font-size:12px}@media(min-width:1001px){#hangar-right select{display:none}}
.hz-info{display:grid;grid-template-columns:48px minmax(0,1fr);gap:4px 10px;align-items:center;padding:8px;border:1px solid #2b4653;border-radius:7px;background:radial-gradient(ellipse at left,#163241,#0a1823 80%);height:92px;box-sizing:border-box;overflow:hidden;flex:none;align-content:center}.hz-info>.hz-text small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.hz-info>.hangar-effect{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hz-info>.hangar-art{width:48px;height:48px;grid-row:1}.hz-info>.hz-text small{white-space:normal}.hz-info>.hangar-description{grid-column:1/-1}
.hz-listhead{display:flex;align-items:center;justify-content:space-between;gap:8px}.hz-listhead h3{margin:4px 0}
.hz-mini{min-height:36px!important;padding:4px 10px!important;font-size:12px!important}
.hz-list{flex:1;min-height:90px;overflow:auto;overscroll-behavior:contain;align-content:start;padding-right:2px}
.hangar-browse,.hangar-research{width:100%;font-size:12px!important}
.hangar-section-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.hangar-section-actions button{font-size:11px!important;padding:4px 2px!important;min-height:40px!important}
.hangar-side-doors{border-top:1px solid #2b4351;margin-top:10px;padding-top:8px;display:grid;grid-template-columns:1fr 1fr;gap:5px}.hangar-side-doors button{font-size:12px;min-height:40px}.hangar-side-doors #hangar-shop{grid-column:1/-1}
.hangar-price{color:#ebca82;font-size:12px}
#hangar-picker{box-sizing:border-box;width:min(1080px,calc(100vw - 24px));height:min(790px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #587b85;border-radius:10px;background:#091824;color:#deeaee;font:14px/1.4 system-ui;overflow:hidden}#hangar-picker::backdrop{background:#000c}#hangar-picker[open]{display:flex;flex-direction:column}#hangar-picker>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;background:#112734;border-bottom:1px solid #2e4c59;flex:none}#hangar-picker h2{margin:0;font-size:17px}#hangar-picker button,#hangar-picker select,#hangar-picker input{font:inherit;box-sizing:border-box;min-height:44px;padding:8px 10px;background:#142d3a;color:#deeaee;border:1px solid #3c5a68;border-radius:6px}#hangar-picker button{cursor:pointer}#hangar-picker button:disabled{opacity:.35;cursor:default}#hangar-picker button:hover:not(:disabled){border-color:#9be0d1}#hangar-picker button:focus-visible{outline:2px solid #9be0d1;outline-offset:2px}.hangar-picker-body{padding:14px;min-height:0;overflow:auto;overscroll-behavior:contain}.hangar-filter{display:grid;grid-template-columns:2fr 1fr 1fr 1.3fr;gap:7px;margin-bottom:12px}.hangar-filter>*{min-width:0}.hangar-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.hangar-item{display:flex;flex-direction:column;align-items:stretch;gap:6px;text-align:left;min-width:0;background:#0e2330!important}.hangar-item .hangar-art{height:88px;margin:0 0 2px}.hangar-item .hangar-art img{height:85px}.hangar-item strong{font-size:13px}.hangar-item>span,.hangar-item>small{font:11px/1.4 system-ui;letter-spacing:0;color:#abc2ce}.hangar-item>b{font-size:12px;margin-top:auto}.hangar-item>img{height:70px;max-width:100%;object-fit:contain}.hangar-item>canvas{height:78px;max-width:100%;object-fit:contain}.hangar-hull-symbol{height:44px;color:#99d3d1;display:flex;justify-content:center;align-items:center;font-size:27px}.hangar-action{color:#9be0d1!important}.hangar-dialog-actions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
@media(max-width:1000px){.phone-fitting[data-phone-pane=parts] .modular-rail>#hangar-left{display:block!important}.phone-fitting[data-phone-pane=fit] .modular-inspector>#hangar-right{display:flex!important}.phone-fitting #hangar-right{height:auto}.phone-fitting .hz-list{max-height:none;overflow:visible}.phone-fitting .hangar-side-doors{display:none}}
@media(max-width:740px){.hangar-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.hangar-filter{grid-template-columns:1fr 1fr;gap:6px}.hangar-filter input{grid-column:1/-1}.hangar-picker-body{padding:10px}#hangar-picker h2{font-size:14px}#hangar-picker>header{padding:7px 10px}.hangar-item .hangar-art{height:75px}.hangar-item .hangar-art img{height:72px}.hangar-item strong{font-size:12px}.hangar-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.hangar-pages{font-size:11px}.hangar-pages button{font-size:11px;padding:6px!important}}
/* desktop: the left panel never scrolls as a whole; its two lists scroll inside it */
.hz-info{position:relative}.hz-info:has([data-codex-guide])>.hz-text{padding-right:42px}.hz-info [data-codex-guide]{position:absolute;right:3px;top:3px;min-width:44px;width:44px;height:44px;min-height:44px;padding:0!important;font-size:21px!important;line-height:1}
@media(min-width:1001px){#hangar-left{display:flex!important;flex-direction:column;height:100%}#hangar-left>*{flex:none}#hangar-left>.hz-slots{flex:0 1 auto;min-height:96px;overflow:auto}#hangar-left>.hz-parts{flex:1 1 0;min-height:96px;overflow:auto;align-content:start}}
@media(max-width:1000px) and (max-height:500px){.phone-fitting .hz-head,.phone-fitting .hz-info>.hz-text small,.phone-fitting .hz-info>.hangar-effect{display:none}.phone-fitting .hz-info{height:44px;padding:4px 8px;grid-template-columns:30px minmax(0,1fr)}.phone-fitting .hz-info>.hangar-art{width:30px;height:30px}}
/* between a phone and a wide screen the three columns stay (the side panels were pushed below the ship) */
@media(min-width:1001px) and (max-width:1180px){#modular-yard.visual-hangar{overflow:hidden}.visual-hangar .modular-shell{height:100%;display:grid}.visual-hangar .modular-columns{grid-template-columns:230px minmax(0,1fr) 270px;grid-template-areas:none}.visual-hangar .modular-columns>*{overflow:auto;grid-area:auto}.visual-hangar #modular-stage{flex:1;height:auto}.visual-hangar .modular-shell footer{position:static}}
@media(min-width:1001px) and (max-height:760px){.visual-hangar .modular-top{padding:7px 12px;gap:12px}.visual-hangar .modular-heading>small{display:none}.visual-hangar #modular-title{font-size:22px}.visual-hangar .modular-numbers{font-size:10px;gap:4px}.visual-hangar .modular-numbers>*{padding:3px 7px}.visual-hangar .modular-shell footer{padding:7px 12px}.visual-hangar #modular-message:not(.bad){display:none}.visual-hangar .modular-status p{font-size:11px}.hangar-left>.hangar-note{display:none}}
/* the pickers: one compact list that scrolls, not pages of cards */
.hangar-picker-body[data-view=gear],.hangar-picker-body[data-view=kit]{display:flex;flex-direction:column;overflow:hidden}
.hangar-picker-body>.hz-picklist{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));align-content:start;gap:5px}
.hz-picklist>.hz-family,.hz-picklist>.hangar-note{grid-column:1/-1}
#hangar-picker .hz-row{min-height:46px;padding:4px 8px}
.hangar-dialog-actions{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}#hangar-picker .hangar-dialog-actions [aria-pressed=true]{border-color:#9be0d1;background:#1d3d3c;color:#fff}.hangar-dialog-actions .hz-back{margin-left:auto}
.hangar-picker-body[data-view=training]{display:flex;flex-direction:column;gap:6px}.hangar-picker-body[data-view=training]>*{margin:0}.hangar-picker-body[data-view=training] h3,.hangar-picker-body[data-view=training] h4,.hangar-picker-body[data-view=training] strong{color:#e4eeef}

/* Keep page navigation visible while showing at most six visual choices. */
.hangar-picker-body[data-view=gear],.hangar-picker-body[data-view=kit]{display:flex;flex-direction:column;overflow:hidden}
.hangar-picker-body[data-view=gear]>.hangar-cards,.hangar-picker-body[data-view=kit]>.hangar-cards{flex:1;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr));overflow:auto}
.hangar-picker-body[data-view=gear]>.hangar-filter,.hangar-picker-body[data-view=kit]>.hangar-filter,.hangar-picker-body>.hangar-pages,.hangar-picker-body>.hangar-note{flex:none}
#hangar-picker .hangar-item{gap:4px;padding:8px;min-height:0}
#hangar-picker .hangar-item .hangar-art{height:60px;flex:none}
#hangar-picker .hangar-item .hangar-art img{height:58px}
#hangar-picker .hangar-item strong{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#hangar-picker .hangar-item>small{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#hangar-picker .hangar-item>img{height:58px;flex:none}

@media(max-height:500px){.hangar-picker-body[data-view=gear]>.hangar-cards,.hangar-picker-body[data-view=kit]>.hangar-cards{grid-template-rows:minmax(0,1fr);grid-template-columns:repeat(3,minmax(0,1fr))}.hangar-filter{grid-template-columns:2fr 1fr 1fr 1.3fr;margin-bottom:6px}.hangar-filter input{grid-column:auto}.hangar-picker-body{padding:8px}.hangar-pages{margin-top:6px}.hangar-item>small{font-size:10px!important}}

.hangar-picker-body{flex:1}

/* Frame requirements must remain readable in full, including training costs. */
.hangar-picker-body[data-view=frames] .hangar-item>small{white-space:normal;overflow:visible;text-overflow:clip}
.hangar-hull-symbol{height:56px}
.hangar-hull-symbol svg{height:54px;width:100%;max-width:110px}
.hangar-hull-symbol.has-ship{display:block;height:auto;min-height:72px;max-width:100%;overflow:hidden}
.hangar-hull-symbol canvas{display:block;width:100%;max-width:min(240px,100%);height:auto;aspect-ratio:240/96;margin:0 auto}

.hangar-effect{clear:both;color:#a2e6d2;font:11px/1.4 system-ui;margin:5px 0}
.hangar-draft-context{display:flex;align-items:center;gap:8px;padding:8px;margin-bottom:8px;border:1px solid #b89c62;border-radius:6px;background:#263029;flex:none}
.hangar-draft-context>span{min-width:0;flex:1}.hangar-draft-context strong{display:block;color:#f0d59d;font:600 12px/1.4 system-ui}.hangar-draft-context small{display:block;color:#b9cfc5;font:11px/1.4 system-ui}.hangar-draft-context button{min-height:44px!important;padding:5px 8px!important;font-size:11px!important;max-width:120px;white-space:normal}

/* Quick fitting stays one tap; the adjacent information control gives touch
   players the same opportunity to inspect a choice as a mouse hover. */
.hz-choice{display:grid;grid-template-columns:minmax(0,1fr)44px;gap:4px;min-width:0}
.hz-choice>.hz-row{min-width:0;width:100%}
#hangar-picker .hz-inspect{width:44px;min-height:44px;padding:0;font-size:20px;color:#a7e5d8;background:#102e39}
#hangar-picker .hz-choice .hz-row{grid-template-columns:30px minmax(0,1fr)auto;gap:6px}
#hangar-picker .hz-choice .hz-price{font-size:10px;max-width:104px;text-align:right;white-space:normal}
#hangar-picker .hz-choice .hz-price small{max-width:104px}
.hangar-picker-body[data-view=inspect]{display:block;overflow:auto;overscroll-behavior:contain}
.hz-inspect-back{margin-bottom:12px}
.hz-equipment-hero{display:grid;grid-template-columns:96px minmax(0,1fr);gap:4px 14px;align-items:center;padding:12px;border:1px solid #355562;border-radius:8px;background:radial-gradient(ellipse at left,#1d3c48,#0d202b 80%)}
.hz-equipment-hero>.hangar-art{grid-row:1/3;width:96px;height:80px;margin:0;background:none;border:0}
.hz-equipment-hero>.hangar-art img,.hz-equipment-hero>.hangar-art canvas{width:96px;height:80px;object-fit:contain}
.hz-equipment-hero h3{margin:0;color:#eee3c3;font-size:20px;line-height:1.2}
.hz-equipment-hero p{margin:0;color:#b5cdd2;font:12px/1.5 system-ui}
.hz-equipment-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}
.hz-equipment-stats>div{padding:10px;background:#102631;border:1px solid #294653;border-radius:5px;min-width:0}
.hz-equipment-stats dt{font:11px system-ui;color:#97b6bf;margin-bottom:6px}
.hz-equipment-stats dd{margin:0;color:#e5eeeb;font:600 16px/1.4 system-ui;overflow-wrap:anywhere}
.hz-copy-count,.hz-inspect-bill{padding:10px 12px;background:#162d32;border-left:2px solid #dbb86e;color:#e2dbbd;font:12px/1.5 system-ui}
.hz-inspect-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#hangar-inspect-fit{background:#bda064;border-color:#efd594;color:#101d24;font-weight:700}
@media(max-width:740px){.hz-equipment-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.hz-equipment-hero{grid-template-columns:70px minmax(0,1fr);gap:5px 10px}.hz-equipment-hero>.hangar-art,.hz-equipment-hero>.hangar-art img,.hz-equipment-hero>.hangar-art canvas{width:70px;height:65px}.hz-equipment-hero h3{font-size:17px}.hz-inspect-actions{display:grid;grid-template-columns:1fr}}

#hangar-picker .hangar-picker-body[data-view=frames] .hangar-item>small{white-space:normal;overflow:visible;text-overflow:clip}

/* Dense equipment pages: no tall empty cards; details stay in the inspector. */
#hangar-picker .hangar-picker-body[data-view=gear]>.hangar-cards,#hangar-picker .hangar-picker-body[data-view=kit]>.hangar-cards{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:max-content;align-content:start;gap:7px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item{position:relative;gap:3px;padding:6px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item .hangar-art{height:44px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item .hangar-art img{height:42px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item>img{height:42px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item strong{font-size:11px;line-height:15px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item>span,#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item>small{font-size:10px;line-height:13px}
#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item>b{font-size:11px;line-height:15px;margin-top:2px}
#hangar-picker .hangar-item>.hangar-warning{display:none}
#hangar-picker .hangar-item[data-tech-locked=true]::after{content:'🔒';position:absolute;top:5px;right:5px;font-size:11px}
@media(max-width:1000px){#hangar-picker .hangar-picker-body[data-view=gear]>.hangar-cards,#hangar-picker .hangar-picker-body[data-view=kit]>.hangar-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:740px){.hangar-filter{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.hangar-filter input{grid-column:1/-1}#hangar-picker .hangar-filter select{font-size:10px;padding:6px}#hangar-picker .hangar-picker-body[data-view=gear]>.hangar-cards,#hangar-picker .hangar-picker-body[data-view=kit]>.hangar-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item .hangar-art{height:36px}#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item .hangar-art img{height:34px}#hangar-picker .hangar-picker-body:not([data-view=frames]) .hangar-item>img{height:34px}}
@media(max-height:500px){#hangar-picker .hangar-picker-body[data-view=gear]>.hangar-cards,#hangar-picker .hangar-picker-body[data-view=kit]>.hangar-cards{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:none}.hangar-filter{grid-template-columns:2fr 1fr 1fr 1.3fr}.hangar-filter input{grid-column:auto}}
/* Short desktop windows (Route 5 item 8): the fitting column fits without a long scroll. The mount card keeps its heading
   and button (its explanation is the button's tooltip), the info box clamps and the rows tighten; the gear list keeps the rest. */
@media(min-width:1001px) and (max-height:760px){#hangar-right{gap:4px}.hz-mount-upgrade{gap:4px;padding:6px 8px}.hz-mount-upgrade p,.hz-mount-upgrade small{display:none}.hz-mount-upgrade button{min-height:34px;padding:5px}#hangar-right .hz-info{max-height:58px;-webkit-mask-image:linear-gradient(#000 62%,transparent);mask-image:linear-gradient(#000 62%,transparent)}#hangar-right .hangar-browse,#hangar-right .hangar-section-actions button{min-height:34px}}
