/* Basic Hangar presentation. Detailed screens keep their existing rules. */
#hangar-view-toolbar[hidden], #basic-status[hidden], #basic-inventory[hidden],
#basic-inventory-inspector[hidden], #basic-inventory-equip[hidden], #basic-guide-toggle[hidden],
#basic-inventory-stat-head[hidden], #basic-inventory-delta-help[hidden], .hangar-view-switch[hidden] { display: none !important; }
#hangar-view-toolbar { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; min-height:44px; }
#hangar-view-toolbar p { margin:0; color:#9cbac8; font-size:13px; }
.hangar-view-switch { display:flex; gap:4px; }
#hangar-view-toolbar button, .hangar-view-switch button { min-height:44px; min-width:84px; margin:0; padding:8px 14px; border:1px solid #24647a; background:#071b28; color:#b6d9e6; font-size:13px; letter-spacing:.02em; }
#hangar-view-toolbar button[aria-pressed="true"], #hangar-view-toolbar button[aria-selected="true"], .hangar-view-switch button[aria-pressed="true"] { border-color:#e7bd49; background:#423318; color:#ffe397; }
#hangar[data-hangar-view="basic"] :is(.basic-status,.basic-inventory) { color:#d6e8ef; font-size:14px; line-height:1.4; }
#hangar[data-hangar-view="basic"] :is(.basic-status,.basic-inventory) button { cursor:pointer; }
#hangar[data-hangar-view="basic"] :is(.basic-status,.basic-inventory) button:focus-visible, #hangar-view-toolbar button:focus-visible { outline:2px solid #9af1ff; outline-offset:2px; }
#hangar[data-hangar-view="basic"] :is(.basic-status,.basic-inventory) button:disabled { cursor:default; opacity:.55; }
body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] #hangar-character-info,
body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"] #current-equipment,
body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"] #inventory-panel > .inventory-heading-row,
body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"] #inventory-panel > .inventory-workspace { display:none !important; }
body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] #basic-status { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:16px; min-height:0; margin:6px 0 0; }
.basic-status-overview { display:grid; grid-template-columns:minmax(230px,.95fr) minmax(260px,1fr); gap:16px; min-width:0; min-height:0; }
.basic-frame, .basic-build-summary, .basic-status-points { box-sizing:border-box; min-width:0; min-height:0; border:1px solid #24566b; background:linear-gradient(145deg,#0a2430e8,#061620f2); }
.basic-frame { display:flex; flex-direction:column; padding:20px; }
.basic-frame-stage { display:flex; align-items:center; justify-content:center; flex:1; min-height:220px; background:radial-gradient(ellipse,#13516666,transparent 65%),linear-gradient(#20455425 1px,transparent 1px),linear-gradient(90deg,#20455425 1px,transparent 1px); background-size:auto,24px 24px,24px 24px; }
.basic-frame-stage img { width:100%; max-width:300px; max-height:350px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 8px 24px #0008); }
.basic-frame-identity { margin-top:20px; }
.basic-frame-identity small { color:#a0c0ce; overflow-wrap:anywhere; }
#basic-frame-name { margin:5px 0; font-size:25px; color:#d9f4ff; }
#basic-frame-role { margin:0 0 14px; color:#80d8ea; font-size:13px; }
#basic-change-frame, #basic-manage-equipment, .basic-inspector-actions button { min-height:44px; padding:9px 14px; border:1px solid #28859e; background:#0b2b3a; color:#b5edfa; font-size:13px; }
.basic-build-summary { display:flex; flex-direction:column; padding:20px; gap:18px; }
.basic-build-summary header h3 { margin:0 0 5px; font-size:15px; color:#79dfed; letter-spacing:.1em; }
.basic-build-summary header small { display:block; font-size:12px; color:#95b5c5; }
#basic-stat-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.basic-stat-group { padding:14px; border:1px solid #164d60; background:#061822; }
.basic-stat-group h4 { margin:0 0 10px; font-size:12px; color:#7cdbec; letter-spacing:.1em; }
.basic-stat-group dl { margin:0; display:flex; gap:12px; }
.basic-stat-group dl > div { flex:1; min-width:0; }
.basic-stat-group dt { font-size:12px; color:#a4bbc9; }
.basic-stat-group dd { margin:3px 0 0; font-size:20px; font-weight:700; color:#f0f5f7; white-space:nowrap; }
#basic-manage-equipment { margin-top:auto; }
#basic-equipped-weapons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
#basic-equipped-weapons article { display:flex; gap:10px; align-items:center; min-width:0; padding:12px; border:1px solid #164d60; background:#061822; }
#basic-equipped-weapons img { width:40px; height:40px; flex:none; object-fit:contain; image-rendering:pixelated; }
#basic-equipped-weapons article > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
#basic-equipped-weapons small { color:#80d9e9; font-size:10px; }
#basic-equipped-weapons b { font-size:12px; overflow-wrap:anywhere; }
#basic-equipped-weapons span { color:#d9e9ef; font-size:12px; }
#hangar[data-hangar-view="basic"] #basic-status #status-allocation-panel { display:flex; flex-direction:column; padding:14px; margin:0; border:0; background:none; }
#hangar[data-hangar-view="basic"] #basic-status #status-allocation-panel > header { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:54px; height:auto; margin:0 0 15px; padding:0; }
#hangar[data-hangar-view="basic"] #basic-status #status-allocation-title { font-size:14px; margin:0 0 6px; color:#7cdeee; }
#hangar[data-hangar-view="basic"] #basic-status #status-points-remaining { font-size:12px; margin:0; color:#a8c7d3; }
#hangar[data-hangar-view="basic"] #basic-status #reset-status-points { min-height:44px; height:auto; max-width:130px; padding:8px; font-size:11px; white-space:normal; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid { order:2; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:none; grid-auto-rows:auto; gap:10px; margin:0; overflow:visible; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid article { display:grid; grid-template-columns:minmax(0,1fr) 44px 24px 44px; gap:5px; box-sizing:border-box; min-width:0; min-height:74px; height:auto; padding:8px; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid article > div { min-width:0; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid article b { font-size:13px; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid .basic-point-code { display:inline-block; margin-left:6px; font-size:9px; font-weight:400; color:#829da9; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid article small { display:block; margin-top:4px; font-size:11px; line-height:1.4; white-space:normal; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid article strong { font-size:16px; text-align:center; }
#hangar[data-hangar-view="basic"] #basic-status #status-point-grid article button { box-sizing:border-box; width:44px; height:44px; min-width:44px; min-height:44px; font-size:20px; padding:0; }
#hangar[data-hangar-view="basic"] #basic-status #status-allocation-save-state { order:1; position:sticky; top:0; z-index:1; background:#0a2430; min-height:18px; font-size:12px; margin:0 0 8px; padding:4px; }
#hangar[data-hangar-view="basic"] #basic-status #status-allocation-save-state:empty { display:none; }

body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] #inventory-panel { display:block; flex:1; min-height:0; height:auto; padding:0; margin:0; border:0; background:none; overflow:hidden; }
.basic-inventory { display:grid; grid-template-columns:170px minmax(0,1fr) 400px; gap:16px; height:100%; min-height:0; min-width:0; }
#basic-inventory-slots { display:flex; flex-direction:column; gap:8px; min-width:0; }
#basic-inventory-slots button { display:grid; grid-template-columns:38px minmax(0,1fr); grid-template-rows:auto auto; align-items:center; column-gap:9px; box-sizing:border-box; width:100%; min-height:76px; padding:10px; margin:0; border:1px solid #205569; background:#061b27; text-align:left; }
#basic-inventory-slots button[aria-pressed="true"] { border-color:#e1b743; background:#342d1b; }
#basic-inventory-slots img { grid-column:1; grid-row:1/3; width:36px; height:36px; object-fit:contain; image-rendering:pixelated; }
#basic-inventory-slots b { grid-column:2; font-size:12px; color:#a5e0ed; }
#basic-inventory-slots small { grid-column:2; font-size:10px; color:#a3b9c6; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.basic-inventory-catalog { display:flex; flex-direction:column; min-height:0; min-width:0; padding:16px; border:1px solid #24566b; background:#071b26e8; }
.basic-inventory-catalog > header { display:flex; flex:none; justify-content:space-between; align-items:start; gap:8px; padding-bottom:14px; border-bottom:1px solid #214a5b; }
#basic-inventory-title { font-size:18px; margin:0 0 4px; color:#bde7f2; }
#basic-inventory-count { margin:0; font-size:12px; color:#9bbac9; }
#basic-inventory-frame { font-size:12px; color:#7ad8e8; white-space:nowrap; }
#basic-inventory-items { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); align-content:start; grid-auto-rows:210px; gap:12px; overflow:auto; overscroll-behavior:contain; padding:14px 2px 2px; min-height:0; }
#basic-inventory-items .basic-item-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; box-sizing:border-box; min-width:0; min-height:0; padding:12px; margin:0; border:1px solid #215369; background:#081e2b; color:#daebf1; text-align:center; }
#basic-inventory-items .basic-item-card[aria-pressed="true"] { border-color:#6cdff4; background:#103446; box-shadow:inset 0 0 0 1px #68cde666; }
#basic-inventory-items .basic-item-card.equipped { border-color:#d1ad43; }
.basic-item-card img { height:64px; width:64px; object-fit:contain; image-rendering:pixelated; }
.basic-item-card strong { font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.basic-item-card small { font-size:11px; color:#98bdca; }
.basic-item-card.equipped small { color:#f0cf74; }
.basic-item-card .basic-item-tradeoff { font-size:10px; color:#a7c4cd; line-height:1.4; }
.basic-empty { grid-column:1/-1; color:#a0becc; }
.basic-inventory-inspector { display:flex; flex-direction:column; box-sizing:border-box; min-width:0; min-height:0; padding:18px; border:1px solid #24566b; background:#081d28f0; overflow:auto; overscroll-behavior:contain; }
.basic-inventory-inspector header small { font-size:11px; color:#82d6e8; letter-spacing:.08em; }
.basic-inventory-inspector > header { display:flex; flex:none; align-items:center; gap:12px; }
#basic-inventory-back { display:none; flex:none; min-height:44px; padding:8px 12px; border:1px solid #28758c; background:#0b2b3a; color:#b5edfa; font-size:12px; }
#basic-inventory-item-name { margin:6px 0 12px; font-size:17px; color:#e2f0f5; overflow-wrap:anywhere; }
.basic-inspector-identity { display:flex; flex-direction:column; align-items:start; gap:12px; }
#basic-inventory-item-image { align-self:center; width:92px; height:92px; object-fit:contain; image-rendering:pixelated; }
#basic-inventory-item-description { font-size:12px; line-height:1.6; margin:0; color:#a6c0cc; }
#basic-inventory-comparison { font-size:11px; margin:15px 0 8px; color:#9bbdca; }
#basic-inventory-stats { display:flex; flex-direction:column; }
.basic-compare-row, .basic-compare-head { display:grid; grid-template-columns:minmax(0,1.1fr) repeat(2,minmax(0,1fr)) minmax(0,.9fr); gap:6px; align-items:center; padding:10px 0; border-bottom:1px solid #173e50; font-size:12px; }
.basic-compare-head { flex:none; padding:7px 0; font-size:10px; color:#88adbb; }
.basic-compare-head > span:not(:first-child), .basic-compare-row > :not(:first-child) { text-align:right; }
.basic-compare-row > span { color:#acccd8; }
.basic-compare-row b { font-size:14px; color:#ecf3f6; }
.basic-compare-row small { font-size:12px; color:#87a6b6; }
.basic-compare-row em { font-size:11px; font-style:normal; white-space:nowrap; }
#basic-inventory-delta-help { flex:none; margin-top:8px; font-size:10px; color:#88adbb; }
.basic-compare-row .better { color:#63deb3; }
.basic-compare-row .worse { color:#ff998e; }
.basic-inspector-actions { display:flex; flex:none; gap:8px; margin-top:18px; }
.basic-inspector-actions button { flex:1; min-width:0; }
#basic-inventory-equip { border-color:#e1b844; background:#493818; color:#ffe39a; }
#basic-inventory-save-state { margin:10px 0 0; min-height:16px; font-size:11px; color:#a1c4cf; }

@media (min-width:1001px) {
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] .hangar-body { display:flex; flex-direction:column; height:calc(100dvh - 140px); max-height:1100px; box-sizing:border-box; overflow:hidden; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] #basic-status { flex:1; overflow:hidden; }
 .basic-status-points, .basic-build-summary { overflow:auto; overscroll-behavior:contain; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] .hangar-body { display:flex; flex-direction:column; height:calc(100dvh - 140px); max-height:1100px; box-sizing:border-box; overflow:hidden; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] .hangar-columns { flex:1; display:flex; min-height:0; margin:0; overflow:hidden; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] .hangar-columns > article { display:flex; flex:1; min-height:0; min-width:0; padding:0; overflow:hidden; }
}
@media (max-width:1000px), (pointer:coarse) and (orientation:landscape) {
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"] #main-menu-nav { margin-bottom:2px; }
 #hangar-view-toolbar { margin:2px 0 4px; gap:6px; }
 #hangar-view-toolbar > p { display:none; }
 #hangar-view-toolbar { justify-content:start; }
 #basic-guide-toggle { grid-column:1/-1; min-height:44px; margin:0; }
 #hangar .hangar-utility-menu { display:block; position:relative; }
 #hangar .hangar-utility-menu > summary { display:flex; box-sizing:border-box; justify-content:center; align-items:center; gap:4px; min-height:44px; padding:6px; border:1px solid #1985a2; background:#082330; color:#7ceaff; }
 #hangar .hangar-utility-items { display:none; }
 #hangar .hangar-utility-menu[open] > .hangar-utility-items { display:grid; position:fixed; z-index:80; top:calc(env(safe-area-inset-top) + 54px); right:10px; left:auto; grid-template-columns:repeat(2,minmax(110px,1fr)); gap:6px; width:min(420px,calc(100vw - 20px)); max-width:none; max-height:calc(100dvh - 70px); padding:8px; overflow:auto; border:1px solid #1683a1; background:#061622f8; }
 #hangar .hangar-view-switch { grid-column:1/-1; justify-content:stretch; }
 #hangar .hangar-view-switch button { flex:1; min-height:44px; }
 #hangar-view-toolbar button { min-width:70px; padding:7px 10px; font-size:12px; }
 #hangar[data-hangar-view="basic"] #first-sortie-guide { min-height:44px; padding:4px 10px; margin:2px 0 6px; }
 #hangar[data-hangar-view="basic"] #first-sortie-guide button { min-height:44px; }
 #hangar[data-hangar-view="basic"] #first-sortie-guide #first-sortie-quick-play { display:block; }
 #hangar[data-hangar-view="basic"] #first-sortie-guide .first-sortie-kicker { display:none; }
 #hangar[data-hangar-view="basic"][data-basic-guide-expanded="false"] #first-sortie-guide { display:none !important; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] #basic-status { display:grid; flex:1; grid-template-columns:minmax(0,1fr) clamp(300px,38vw,380px); min-height:0; gap:8px; margin:0; overflow:hidden; }
 .basic-status-overview { display:flex; flex-direction:column; min-height:0; gap:8px; }
 .basic-frame { display:grid; flex:none; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:8px; padding:4px; }
 .basic-frame-stage { min-height:0; }
 .basic-frame-stage img { max-height:44px; max-width:44px; }
 .basic-frame-identity { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; margin:0; }
 .basic-frame-identity small { display:none; }
 #basic-frame-name { grid-column:1; grid-row:1; font-size:16px; margin:0; }
 #basic-frame-role { grid-column:1; grid-row:2; font-size:10px; margin:0; }
 #basic-change-frame { grid-column:2; grid-row:1/3; }
 #basic-change-frame, #basic-manage-equipment { padding:6px 10px; font-size:12px; }
 .basic-build-summary { flex:1; padding:6px; gap:6px; overflow:auto; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] #basic-status { overflow:visible; }
 #hangar[data-hangar-view="basic"] #basic-status #basic-manage-equipment { position:sticky; bottom:0; z-index:1; flex:none; margin-top:auto; background:#0b2b3a; }
 .basic-build-summary header { display:none; }
 #basic-stat-groups { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
 .basic-stat-group { padding:4px; }
 .basic-stat-group h4 { font-size:9px; line-height:1.2; margin-bottom:3px; }
 .basic-stat-group dl { gap:4px; }
 .basic-stat-group dt { font-size:9px; line-height:1.2; }
 .basic-stat-group dd { font-size:15px; line-height:1.2; margin-top:1px; }
 #basic-equipped-weapons { gap:6px; }
 #basic-equipped-weapons article { padding:5px; gap:5px; }
 #basic-equipped-weapons img { height:24px; width:24px; }
 #basic-equipped-weapons article > div { gap:1px; }
 #basic-equipped-weapons small, #basic-equipped-weapons span { font-size:10px; }
 #basic-equipped-weapons b { font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .basic-status-points { overflow:auto; }
 #hangar[data-hangar-view="basic"] #basic-status #status-allocation-panel { padding:0; }
 #hangar[data-hangar-view="basic"] #basic-status #status-allocation-panel > header { min-height:44px; margin-bottom:4px; }
 #hangar[data-hangar-view="basic"] #basic-status #status-allocation-title { font-size:11px; margin-bottom:3px; }
 #hangar[data-hangar-view="basic"] #basic-status #status-points-remaining { font-size:10px; }
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:44px; gap:0; }
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article { min-height:44px; height:44px; padding:0 4px; border:0; }
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article small { display:none; }
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article b { font-size:12px; }
 #hangar[data-hangar-view="basic"] #basic-status #status-allocation-save-state { min-height:0; padding:0; margin:0; font-size:10px; line-height:12px; }
 .basic-inventory { box-sizing:border-box; width:100%; max-width:100%; min-width:0; grid-template-columns:minmax(0,1fr); grid-template-rows:44px minmax(0,1fr); gap:8px; }
 .basic-inventory[data-pane="catalog"] .basic-inventory-inspector { display:none; }
 .basic-inventory[data-pane="detail"] { grid-template-rows:minmax(0,1fr); }
 .basic-inventory[data-pane="detail"] :is(#basic-inventory-slots,.basic-inventory-catalog) { display:none; }
 #basic-inventory-slots { box-sizing:border-box; width:100%; max-width:100%; min-width:0; grid-column:1/-1; grid-row:1; flex-direction:row; gap:5px; overflow-x:auto; overflow-y:hidden; }
 #basic-inventory-slots button { display:flex; flex:1; justify-content:center; min-width:80px; min-height:44px; padding:5px; text-align:center; }
 #basic-inventory-slots b { font-size:11px; }
 #basic-inventory-slots img, #basic-inventory-slots small { display:none; }
 .basic-inventory-catalog { box-sizing:border-box; width:100%; max-width:100%; min-width:0; grid-column:1; grid-row:2; padding:8px; }
 .basic-inventory-catalog > header { padding-bottom:5px; }
 #basic-inventory-title { font-size:13px; margin:0; }
 #basic-inventory-count, #basic-inventory-frame { font-size:10px; }
 #basic-inventory-items { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:84px; gap:6px; padding-top:7px; }
 #basic-inventory-items .basic-item-card { display:grid; grid-template-columns:44px minmax(0,1fr); grid-template-rows:1fr auto; column-gap:7px; row-gap:2px; padding:8px; text-align:left; }
 .basic-item-card img { grid-column:1; grid-row:1/4; width:42px; height:42px; }
 .basic-item-card strong { font-size:11px; }
 .basic-item-card small { font-size:10px; }
 .basic-item-card .basic-item-tradeoff { grid-column:2; font-size:9px; }
 .basic-inventory-inspector { box-sizing:border-box; width:100%; max-width:100%; min-width:0; grid-column:1; grid-row:1; padding:8px; position:relative; overflow-x:hidden; overflow-y:auto; }
 #basic-inventory-back { display:block; }
 .basic-inventory-inspector > header > div { min-width:0; }
 .basic-inventory-inspector header small { display:none; }
 #basic-inventory-item-name { font-size:15px; line-height:1.3; margin:0; }
 .basic-inspector-identity { display:none; }
 #basic-inventory-comparison { font-size:11px; line-height:1.3; margin:3px 0; flex:none; }
 #basic-inventory-stats { min-height:56px; overflow:auto; overscroll-behavior:contain; flex:1; }
 .basic-compare-head { padding:4px 0; font-size:10px; }
 .basic-compare-row { flex:none; padding:3px 0; font-size:12px; line-height:1.2; }
 .basic-compare-row small { font-size:12px; }
 .basic-compare-row b { font-size:13px; line-height:1.2; }
 .basic-compare-row em { font-size:12px; line-height:1.2; }
 #basic-inventory-delta-help { font-size:9px; margin-top:3px; }
 .basic-inspector-actions { margin-top:4px; padding:0; background:#081d28; }
 .basic-inspector-actions button { font-size:11px; padding:5px; }
 #basic-inventory-equip { scroll-margin-bottom:3px; }
 #basic-inventory-save-state { margin:2px 0 0; min-height:12px; font-size:10px; line-height:1.2; }
 #hangar[data-hangar-view="basic"] #basic-status #reset-status-points { width:auto; min-width:120px; max-width:none; font-size:10px; line-height:1.2; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] #inventory-panel { overflow:hidden; }
}
@media (max-width:760px) and (orientation:portrait) {
 #hangar-view-toolbar { flex-wrap:wrap; }
 #hangar-view-toolbar button { min-width:65px; padding:5px 8px; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] #basic-status { display:flex; flex-direction:column; overflow:visible; }
 .basic-status-overview { flex:none; }
 .basic-build-summary { flex:none; overflow:visible; }
 .basic-frame-stage { height:44px; }
 .basic-status-points { overflow:visible; }
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid { grid-template-columns:minmax(0,1fr); }
 .basic-inventory { display:flex; flex-direction:column; overflow:visible; }
 #basic-inventory-slots { flex:none; min-height:44px; }
 #basic-inventory-slots button { flex:0 0 85px; }
 .basic-inventory-catalog { flex:none; max-height:290px; }
 #basic-inventory-items { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:145px; min-height:110px; max-height:220px; }
 #basic-inventory-items .basic-item-card { display:flex; gap:4px; text-align:center; }
 .basic-inventory-inspector { flex:none; overflow:visible; }
 #basic-inventory-stats { flex:none; overflow:visible; }
 .basic-inspector-actions { position:static; }
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] #inventory-panel { flex:none; overflow:visible; }
}

@media (max-width:1000px) and (orientation:landscape) {
 #hangar[data-hangar-view="basic"] #basic-inventory-items { grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-rows:60px; max-height:none; overflow:visible; }
 #hangar[data-hangar-view="basic"] #basic-inventory-items .basic-item-card { grid-template-columns:30px minmax(0,1fr); grid-template-rows:1fr auto; column-gap:5px; row-gap:1px; padding:4px; }
 #hangar[data-hangar-view="basic"] #basic-inventory-items .basic-item-card img { width:28px; height:28px; }
 #hangar[data-hangar-view="basic"] #basic-inventory-items .basic-item-card .basic-item-tradeoff { display:none; }
}
@media (min-width:1001px) and (pointer:coarse) and (orientation:landscape) {
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="status"] .hangar-body,
 body[data-app-state="HANGAR"] #hangar[data-hangar-view="basic"][data-menu-section="inventory"] .hangar-body { height:calc(100dvh - 140px); max-height:none; }
}
.basic-item-card .basic-item-gains{display:block;color:#55e49a}
.basic-item-card .basic-item-losses{display:block;color:#ff7777}
/* Full labels need their own row on touch landscape; keep their text clear of 44px controls. */
@media (orientation:landscape) and (max-width:1000px){
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-auto-rows:54px;gap:4px}
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article{grid-template-columns:minmax(0,1fr) 44px 32px 44px;grid-template-rows:1fr;gap:5px;min-height:54px;height:54px;padding:4px 6px}
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article>div{min-width:0;overflow:hidden}
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article b{min-width:0;font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
 #hangar[data-hangar-view="basic"] #basic-status #status-point-grid article button{width:44px;height:44px;min-width:44px;min-height:44px}
}
