/* HUD shell (M19). Every box is positioned inline from layout.js; this file only styles what is inside. No element scrolls (R-HUD-02):
   no element here scrolls. Dark translucent panels, thin borders, small upper-case labels, as in review/index.html. */
.hud { position: absolute; inset: 0; pointer-events: none; font: calc(15px * var(--text-scale, 1))/1.3 "Roboto Condensed", "DejaVu Sans Condensed", "Segoe UI", system-ui, sans-serif; color: var(--fg); }
[data-palette="highContrast"] .hud [data-box] { border-width: 2px; border-color: var(--sel); }
[data-text-scale="125"] .hud .cap, [data-text-scale="125"] .strip .ms, [data-text-scale="125"] .tile.res .sub { font-size: 12px; }
[data-text-scale="150"] .hud .cap, [data-text-scale="150"] .strip .ms, [data-text-scale="150"] .tile.res .sub { font-size: 13px; }
[data-text-scale="125"] .row.ast, [data-text-scale="125"] .inspector dl { font-size: 15px; }
[data-text-scale="150"] .row.ast, [data-text-scale="150"] .inspector dl { font-size: 16px; }
[data-text-scale="125"] section.actionbar .tile { font-size: 14px; }
[data-text-scale="150"] section.actionbar .tile { font-size: 15px; }
.hud * { box-sizing: border-box; }
.hud [data-box] { position: absolute; pointer-events: auto; background: var(--panel); border: 1px solid var(--line); }
.hud .panel, .hud .inspector, .hud .minimap { overflow: hidden; }
.hud .minibtns { background: none; border: 0; }
.hud button { font: inherit; color: var(--fg); background: var(--raise); border: 1px solid var(--line); cursor: pointer; }
.hud button:hover { border-color: var(--sel); }
.hud button:focus-visible, .hud .tile:focus-visible { outline: 2px solid var(--sel); outline-offset: 1px; }
.hud [aria-disabled="true"] { opacity: 0.55; cursor: default; }
.hud .cap { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.hud .bar { display: block; height: 4px; background: var(--track); }
.hud .bar > i { display: block; height: 100%; background: var(--live); }
.hud .ico { display: inline-block; width: 22px; height: 22px; background: var(--dim); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }

/* strip */
.strip { border-width: 0 0 1px !important; }
.strip > * { position: absolute; top: 0; height: 56px; }
.strip .mission { display: flex; flex-direction: column; justify-content: center; }
.strip .mt { font-size: 16px; letter-spacing: 0.06em; white-space: nowrap; }
.strip select.mt { font-family: inherit; font-size: 14px; letter-spacing: 0.02em; font-weight: 700; color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 3px; margin: 0 0 0 -4px; padding: 0 2px; width: 252px; height: 22px; cursor: pointer; color-scheme: dark; }
.strip select.mt:hover { border-color: var(--sel); }
.strip select.mt:focus-visible { outline: 2px solid var(--sel); outline-offset: 1px; }
.strip select.mt option { background: var(--panel-solid); color: var(--fg); font-weight: 400; }
.strip .ms { font-size: 11px; letter-spacing: 0.1em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 248px; display: block; }
.strip .wave { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.strip .wl { font-size: 17px; }
.strip .segs { display: flex; gap: 3px; }
.strip .segs i { width: 18px; height: 5px; background: var(--track); border: 1px solid var(--line); }
.strip .segs i.on { background: var(--live); } .strip .segs i.cur { background: var(--overload); }
.tile.res { display: grid; grid-template-columns: 24px 1fr; grid-template-rows: auto auto auto; column-gap: 6px; align-content: center; padding: 0 6px; font-variant-numeric: tabular-nums; }
.tile.res.res-sorties { grid-template-columns: 1fr; }
.tile.res .ico { grid-row: 1 / 4; align-self: center; }
.tile.res .val { font-size: 15px; white-space: nowrap; } .tile.res .sub { font-style: normal; font-size: 11px; color: var(--live); white-space: nowrap; }
.tile.res[data-state="flag"] .sub { color: var(--overload); }
.tile .tip { position: absolute; left: 0; top: 58px; width: max-content; max-width: 360px; max-height: 140px; padding: 8px 10px; font-size: 13px; background: var(--panel-solid); border: 1px solid var(--line); visibility: hidden; opacity: 0; transition: opacity 0s 0s; z-index: 5; pointer-events: none; }
.tile.res:hover .tip, .tile.res:focus .tip { visibility: visible; opacity: 1; transition-delay: 250ms; }

/* collapsible panels */
.panel { display: flex; flex-direction: column; }
.panel .ph { display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; flex: none; }
.panel .pt { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.panel .ph::after { content: "\25BE"; color: var(--dim); margin-left: 8px; }
.panel .ph[aria-expanded="false"]::after { content: "\25B8"; }
.panel .more { margin-left: auto; font-size: 12px; color: var(--zone); }
.panel .rows { list-style: none; margin: 0; padding: 0; }
.panel .rows[hidden] { display: none; }
.row { position: relative; padding: 0 12px; }
.row.obj { height: 44px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; column-gap: 6px; }
.row.obj small { display: block; font-size: 12px; color: var(--dim); }
.row.obj .bar { position: absolute; left: 38px; right: 12px; bottom: 4px; }
.row.obj .glyph { font-size: 15px; } .row.obj.st-met .glyph { color: var(--live); } .row.obj.st-failed .glyph { color: var(--cut); } .row.obj.st-partial .glyph { color: var(--overload); }
.row.obj .left { font-size: 12px; color: var(--dim); }
.row.ast { height: 28px; display: grid; grid-template-columns: 1fr 18px 44px; align-items: center; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.row.ast:hover { background: var(--raise); }
.row.ast .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.ast .pct { text-align: right; }
.row.ast .bar { position: absolute; left: 12px; right: 12px; bottom: 2px; }
.row.ast.off .bar > i { background: var(--cut); }

/* minimap */
.minimap canvas { position: absolute; display: block; cursor: pointer; touch-action: none; }
.minibtns { display: flex; flex-direction: column; gap: 5px; }
.mbtn { width: 36px; height: 28px; padding: 0; font-size: 13px; letter-spacing: 0; }
.mbtn.active { background: var(--active); border-color: var(--sel); color: var(--sel); }
.mbtn.pulse { border-color: var(--overload); color: var(--overload); }

/* action bar */
section.actionbar .tabs { display: flex; height: 40px; border-bottom: 1px solid var(--line); }
section.actionbar .tab { border: 0; padding: 0 22px; font-size: 13px; letter-spacing: 0.12em; color: var(--dim); background: none; }
section.actionbar .tab[aria-selected="true"] { color: var(--fg); background: var(--active); }
section.actionbar .pager { position: absolute; left: 948px; top: 4px; width: 76px; height: 32px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
section.actionbar .pager[hidden] { display: none; }
section.actionbar .arrow { width: 24px; height: 28px; padding: 0; }
section.actionbar .tiles { position: absolute; left: 8px; top: 44px; width: 1012px; height: 120px; display: grid; grid-template-columns: repeat(10, 94px); gap: 8px; }
section.actionbar .tile { position: relative; width: 94px; height: 120px; padding: 7px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; background: var(--tile); font-size: 13px; line-height: 1.15; }
section.actionbar .tile.armed { border-color: var(--sel); background: var(--active); }
section.actionbar .tile[aria-disabled="true"] { opacity: 0.75; }
section.actionbar .tile .nm { width: 100%; font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; }
section.actionbar .tile .mono { width: 42px; height: 42px; display: grid; place-items: center; font-size: 12px; background: center / contain no-repeat; }
section.actionbar .tile .tile-sprite { width: 38px; height: 38px; object-fit: contain; pointer-events: none; }
section.actionbar .tile .cost { font-style: normal; color: var(--zone); font-variant-numeric: tabular-nums; font-size: 12px; }
section.actionbar .tile .cost.free { color: var(--live); font-weight: 700; }
section.actionbar .tile .cap-badge { position: absolute; right: 5px; top: 5px; font-size: 10px; padding: 1px 4px; background: var(--panel-solid); border: 1px solid var(--line); color: var(--dim); font-variant-numeric: tabular-nums; }
section.actionbar .tile .cap-badge.kit { border-color: var(--live); color: var(--live); }
section.actionbar .tile .tip { top: auto; bottom: 124px; left: 0; }
section.actionbar .tile:hover .tip, section.actionbar .tile:focus .tip { visibility: visible; opacity: 1; transition-delay: 250ms; }

/* inspector */
.inspector .portrait { position: absolute; left: 12px; top: 12px; width: 96px; height: 96px; background: center / contain no-repeat; display: grid; place-items: center; }
.inspector .portrait-sprite { width: 80px; height: 80px; object-fit: contain; pointer-events: none; }
.inspector .ico.big { width: 56px; height: 56px; background: var(--fg); }
.inspector .insp-actions { position: absolute; left: 12px; top: 114px; width: 96px; display: flex; flex-direction: column; gap: 4px; }
.inspector .insp-actions button { width: 100%; height: 24px; padding: 0 4px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inspector .insp-actions button.primary { background: var(--active); border-color: var(--sel); }
.inspector .insp-actions button.danger { border-color: var(--cut); color: var(--cut); }
.inspector .insp-actions[hidden] { display: none; }
.inspector .info { position: absolute; left: 120px; top: 10px; right: 12px; }
.inspector .nm { font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inspector .empty { padding: 10px 14px; } .inspector .hint { color: var(--dim); }
.inspector .hp { display: grid; grid-template-columns: 24px 1fr 44px; align-items: center; gap: 8px; margin: 4px 0 6px; }
.inspector .hpv { text-align: right; font-variant-numeric: tabular-nums; }
.inspector dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 14px; font-size: 14px; }
.inspector dt { color: var(--dim); white-space: nowrap; } .inspector dd { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inspector [hidden] { display: none; }
.inspector dd.state[data-state="damaged"] { color: var(--overload); } .inspector dd.state[data-state="destroyed"] { color: var(--cut); }
