/* Hangar visual system: keep presentation local to the four Hangar destinations. */
body[data-app-state="HANGAR"] #hangar {
  background: linear-gradient(120deg, #030609d9, #030609a8 48%, #030609db),
    url("../unit_asset/ui/neon/hangar-backdrop.webp") center / cover fixed;
}

body[data-app-state="HANGAR"] #hangar .hangar-body {
  border: 1px solid var(--nd-border);
  border-radius: var(--nd-radius-lg);
  background: linear-gradient(145deg, #071820ed, #061019f2 72%);
  box-shadow: inset 0 1px #3ff3ff14, 0 18px 52px #000b, var(--nd-glow);
}

body[data-app-state="HANGAR"] #hangar .hangar-tabs button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  border-bottom-color: var(--nd-border);
  border-radius: var(--nd-radius-sm) var(--nd-radius-sm) 0 0;
  background: #061118b8;
  color: var(--nd-text-2);
  font: 700 var(--nd-size-label)/1.2 var(--nd-font-label);
  letter-spacing: .06em;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

body[data-app-state="HANGAR"] #hangar .hangar-tabs button[aria-current="page"] {
  border-color: #3ff3ff66;
  border-bottom-color: var(--nd-accent);
  background: #0b2029;
  color: var(--nd-accent);
  box-shadow: inset 0 2px var(--nd-accent), 0 0 14px #3ff3ff20;
}

body[data-app-state="HANGAR"] :is(.hangar-dossier-profile, .hangar-dossier-center,
  .hangar-dossier-weapons, #inventory-panel, .workshop-layout, .workshop-bench,
  .workshop-side-panel, .workshop-panel-card) {
  border-color: var(--nd-border);
  border-radius: var(--nd-radius-md);
  box-shadow: inset 0 1px #3ff3ff0d, 0 10px 28px #0006;
}

body[data-app-state="HANGAR"] #hangar .hangar-stat-list > .nd-stat,
body[data-app-state="HANGAR"] #hangar .hangar-weapon-values > span,
body[data-app-state="HANGAR"] #hangar .basic-stat-group {
  border-color: #28546299;
  border-radius: var(--nd-radius-sm);
  background: #061118;
  color: var(--nd-text-2);
}

body[data-app-state="HANGAR"] #hangar :is(.hangar-stat-list b, .hangar-weapon-values b,
  .basic-stat-group dd) {
  color: var(--nd-text-1);
}

body[data-app-state="HANGAR"] :is(.hangar-weapon-card, .inventory-item,
  .current-equipment-slot, .workshop-blueprint, .refinery-weapon-choice,
  .resonance-weapon-choice, .room-card) {
  border-color: #285462;
  background-color: #081720;
}

body[data-app-state="HANGAR"] :is(.hangar-weapon-card, .inventory-item,
  .current-equipment-slot, .workshop-blueprint, .refinery-weapon-choice,
  .resonance-weapon-choice, .room-card):is(:hover, :focus-within, [aria-pressed="true"], [aria-selected="true"]) {
  border-color: #3ff3ff99;
  box-shadow: var(--nd-glow);
}

body[data-app-state="HANGAR"] :is(.hangar-weapon-card button,
  .inventory-item button, #inventory-detail-equip, #basic-inventory-equip,
  .workshop-layout button) {
  border-color: #3ff3ff77;
  border-radius: var(--nd-radius-sm);
  background: linear-gradient(180deg, #10313a, #081b23);
  color: var(--nd-accent);
}

body[data-app-state="HANGAR"] :is(#inventory-panel, .inventory-workspace, #inventory-list, #inventory-items) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body[data-app-state="HANGAR"] #inventory-list {
  width: 100%;
  overflow-x: hidden;
}

body[data-app-state="HANGAR"] #inventory-items {
  width: 100%;
  overflow-x: hidden;
}

body[data-app-state="HANGAR"] #inventory-items :is(.inventory-group, .inventory-grid) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body[data-app-state="HANGAR"] #inventory-items .inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(136px, 100%), 1fr));
}

body[data-app-state="HANGAR"] #inventory-detail-close {
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--nd-border);
  border-radius: var(--nd-radius-sm);
  background: var(--nd-surface-1);
  color: var(--nd-text-1);
}

body[data-app-state="HANGAR"] #inventory-items .inventory-item > .item-hover-card {
  right: 4px;
  left: 4px;
  top: 4px;
  width: auto;
  max-width: none;
}

@media (pointer: coarse) {
  body[data-app-state="HANGAR"] #hangar .hangar-tabs button,
  body[data-app-state="HANGAR"] #inventory-detail-close {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-app-state="HANGAR"] #hangar .hangar-tabs button { transition: none; }
}

/* Phone landscape keeps onboarding brief and lets Status grow into the page scroll. */
@media (orientation: landscape) and (max-height: 550px) and (max-width: 1000px) {
  body[data-app-state="HANGAR"] #hangar #first-sortie-guide {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    margin-bottom: 4px;
    padding: 6px 10px;
  }

  body[data-app-state="HANGAR"] #hangar #first-sortie-guide .screen-eyebrow {
    display: none;
  }

  body[data-app-state="HANGAR"] #hangar #first-sortie-guide h3 {
    line-height: 1.2;
  }

  body[data-app-state="HANGAR"] #hangar #first-sortie-guide .first-sortie-copy > p:last-child {
    max-width: 72ch;
    margin-top: 2px;
    line-height: 1.3;
  }

  body[data-app-state="HANGAR"] #hangar #first-sortie-guide .first-sortie-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  body[data-app-state="HANGAR"] #hangar #first-sortie-guide .first-sortie-actions button {
    min-height: 44px;
    padding: 5px 9px;
  }

  body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-center {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-weapons .hangar-weapon-cards {
    display: contents !important;
  }

  body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-weapons .hangar-weapon-card {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

}
.status-label-full{display:none}
.hangar-status-sections{display:none}
/* Touch landscape uses one readable dossier section at a time. The three-panel layout remains the desktop presentation. */
@media (pointer:coarse) and (orientation:landscape) and (max-width:1000px) and (max-height:550px){
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-status-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 6px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-status-sections button{box-sizing:border-box;min-width:0;min-height:44px;padding:6px 8px;border:1px solid #245568;background:#081923;color:#a7dbe3;font:700 11px/1.2 var(--nd-font-label);letter-spacing:.02em}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-status-sections button[aria-selected="true"]{border-color:#55dbe7;background:#10303b;color:#e2fcff;box-shadow:inset 0 -2px #55dbe7}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #first-sortie-guide{display:none}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-character-info{display:flex;flex:0 0 322px;flex-direction:column;gap:0;min-height:322px;overflow:visible}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-grid{display:block;flex:0 0 272px;min-height:272px;width:100%;height:272px;overflow:hidden}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-grid>section{display:none;box-sizing:border-box;width:100%;height:100%;min-height:0;padding:8px;overflow:auto;overscroll-behavior:contain}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-grid[data-status-phone-section="pilot"]>.hangar-dossier-profile,
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-grid[data-status-phone-section="frame"]>.hangar-dossier-center,
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-grid[data-status-phone-section="equipment"]>#hangar-dossier-weapons{display:flex}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-profile{flex-direction:row;align-items:stretch;gap:10px;overflow:hidden}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-head{flex:0 0 164px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:0;margin:0;padding:0 10px 0 0;border:0;border-right:1px solid #164457}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head{box-sizing:border-box;display:flex!important;flex:0 0 196px;flex-direction:row;align-items:flex-start;gap:8px;height:auto;min-height:72px;padding-top:6px;overflow:visible}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head>div{display:block;flex:1 1 0;width:0;min-width:0;overflow:visible}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head h3{display:block;box-sizing:border-box;width:100%;max-width:100%;margin:0;font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head #hangar-dossier-identity{display:block;max-height:none;height:auto;margin:2px 0;overflow:visible;font-size:11px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head #hangar-dossier-identity .rank-emblem{display:inline-block;vertical-align:middle}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head #hangar-dossier-identity .hangar-pilot-name{display:inline;max-width:100%;font-size:11px;white-space:normal;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-head #hangar-dossier-identity>span:last-child{display:inline;max-width:100%;overflow:visible;font-size:11px;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-portrait{width:54px;height:50px;min-width:54px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-portrait img{width:46px;height:46px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-identity{font-size:11px;line-height:1.35;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #status-allocation-panel{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;margin:0;padding:0;border:0;background:none}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #status-allocation-panel>header{flex:none;align-items:center;gap:8px;margin:0 0 3px;padding:0}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #status-allocation-panel>header h4{font-size:13px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #status-allocation-panel>header p{font-size:11px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #status-allocation-panel>header button{box-sizing:border-box;flex:0 0 164px;width:164px;min-height:44px;padding:6px 10px;font-size:11px;line-height:1.2;letter-spacing:0;white-space:normal;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid{flex:0 0 185px;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(5,44px);gap:3px;height:185px;min-height:0;margin:0;overflow:auto}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid article{grid-template-columns:minmax(0,1fr) 44px 42px 44px;gap:7px;min-height:44px;padding:2px 6px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid article>div{grid-column:1;grid-row:1;gap:1px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid article>div>b{font-size:12px;line-height:1.2;white-space:normal;overflow:visible}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid .status-label-short{display:none}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid .status-label-full{display:inline}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid article small{font-size:11px;line-height:1.15}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid article button{box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;font-size:20px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .status-point-grid article>strong{font-size:16px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #status-allocation-save-state{font-size:11px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-center{flex-direction:column;gap:8px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-stats{flex:none}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-stat-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-stat-list>span{min-height:36px;font-size:11px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-stat-list b{font-size:12px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-dossier-weapons{gap:6px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-weapons>h4{font-size:13px;line-height:1.3}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] #hangar-dossier-weapons>h4 small{font-size:11px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-cards{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;gap:7px;overflow:visible}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-card{grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;min-height:0;padding:7px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-card>img{grid-row:1;width:40px;height:44px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-heading small{font-size:11px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-heading b{font-size:12px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-values{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:4px;margin-top:5px}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-values span{min-height:30px;padding:4px;font-size:11px;overflow-wrap:anywhere}
 body[data-app-state="HANGAR"] #hangar[data-menu-section="status"] .hangar-weapon-values b{font-size:12px}
}
