/* The client's own fonts: Vox (headlines) and Play (interface), Latin subsets made by tools/export_ui.py */
@font-face { font-family: 'Vox'; src: url(ui/fonts/vox-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Play'; src: url(ui/fonts/play-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Play'; src: url(ui/fonts/play-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --bg: #080b0f;
  --bg-2: #0c1117;
  --panel: #111820;
  --panel-2: #17202a;
  --panel-3: #1f2a36;
  --edge: #253240;
  --edge-2: #3a4b5d;
  --text: #edf1f4;
  --muted: #95a4b2;
  --dim: #607082;
  /* one action colour; cyan is shields and abilities, yellow is lock-on, as in the game's HUD */
  --fire: #ff7b1c;
  --fire-hi: #ff9b40;
  --fire-ink: #160900;
  --cyan: #46c8ef;
  --lock: #ffcf3a;
  --red: #ff5141;
  --light: #8fd18a;
  --medium: #ffc53a;
  --heavy: #ff7a52;
  --hud: #0b1118d9;
  --accent: var(--fire);
  --accent-ink: var(--fire-ink);
  --line: var(--edge);
  --line-2: var(--edge-2);
  --display: 'Vox', 'Arial Black', Impact, sans-serif;
  --ui: 'Play', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button, a, select { touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fire); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: #ff7b1c66; color: #fff; }
select { appearance: none; padding-right: 26px !important; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2395a4b2' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 9px center / 10px 6px; border: 1px solid var(--edge-2); border-radius: 0; }
select:hover { border-color: #56697d; }
select option { color: var(--text); background: var(--panel); }

/* Chamfered panels: top-left and bottom-right corners cut, with the edge drawn along the cuts.
   Each panel sets --fill (any background) and --edge-c; --cut sizes the corners. */
.cham, .cta, .card, .toolbar, .specs, .skins, .infocard, .tex-grid li, .drive-link, .chips button {
  --cut: 10px;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), var(--edge-c, var(--edge-2)) 0 calc(50% + 1px), transparent 0) 0 0 / var(--cut) var(--cut) no-repeat,
    linear-gradient(135deg, transparent calc(50% - 1px), var(--edge-c, var(--edge-2)) 0 calc(50% + 1px), transparent 0) 100% 100% / var(--cut) var(--cut) no-repeat,
    var(--fill, var(--panel));
  box-shadow: inset 0 0 0 1px var(--edge-c, var(--edge-2));
}
.cta { --cut: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 26px; border: 0; font: 700 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: filter .15s, transform .15s; }
.cta-fire { --fill: linear-gradient(180deg, var(--fire-hi), var(--fire) 55%, #e45f00); --edge-c: #ffb36b; color: var(--fire-ink); }
.cta-fire:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cta-ghost { --fill: #0b1016b3; --edge-c: #6b7f93; color: var(--text); }
.cta-ghost:hover { --edge-c: var(--fire); color: #fff; }
.cta svg { width: 14px; height: 14px; flex: none; fill: currentColor; }
.kicker { margin: 0; font: 700 11px/1.4 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--fire); }

/* Hangar (assets.html) */
.app { height: 100dvh; display: grid; grid-template-columns: 324px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'top top' 'catalog stage'; }
.top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 28px; border-bottom: 1px solid var(--edge); background: linear-gradient(90deg, #0f161e, var(--bg-2) 60%); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: none; }
.top h1 { margin: 0; font: 700 26px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.top .sub { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.top-right { display: flex; align-items: center; gap: 28px; }
.drive-link { --cut: 8px; --fill: transparent; --edge-c: #6b7f93; display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 18px; color: var(--text); font: 700 12px var(--display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.drive-link:hover { --edge-c: var(--fire); }
.tally { display: flex; gap: 26px; margin: 0; }
.tally div { display: flex; flex-direction: column-reverse; gap: 4px; }
.tally dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tally dd { margin: 0; font: 700 22px/1 var(--display); }
.catalog { grid-area: catalog; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--edge); background: var(--bg-2); }
.filters { padding: 18px 16px 14px; border-bottom: 1px solid var(--edge); display: grid; gap: 14px; }
.search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--edge-2); }
.search:focus-within { border-color: var(--fire); }
.search svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.6; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 13px; }
.search input::placeholder { color: var(--dim); }
.search kbd { font: 10px var(--mono); color: var(--dim); border: 1px solid var(--edge); padding: 0 4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected=true] { color: var(--text); background: var(--panel-3); box-shadow: inset 0 -2px 0 var(--fire); }
.tabs button b { font-weight: 400; opacity: .6; letter-spacing: 0; }
.sortrow { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select { height: 26px; padding: 0 8px; font-size: 11px; }
.cards { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; align-content: start; scrollbar-color: var(--edge-2) transparent; scrollbar-width: thin; }
.card { --cut: 9px; --edge-c: var(--edge); --fill: radial-gradient(ellipse 90% 70% at 50% 62%, #1f2c3a, #111820 72%); position: relative; display: flex; flex-direction: column; cursor: pointer; transition: transform .12s; }
.card:hover { --edge-c: #5d7186; }
.card[aria-current=true] { --edge-c: var(--fire); --fill: radial-gradient(ellipse 90% 70% at 50% 62%, #3a2a1d, #17140f 75%); }
.card .thumb { aspect-ratio: 1.12; display: grid; place-items: center; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .thumb .ph { width: 38%; opacity: .25; fill: none; stroke: var(--muted); stroke-width: 1.2; }
.card .meta { padding: 9px 10px 10px; background: #0a0f14b3; }
.card .name { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .stat { margin-top: 2px; font-size: 10px; color: var(--dim); }
.card .badge { position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 5px; color: var(--cyan); background: #071018d0; }
.empty { color: var(--muted); padding: 28px; grid-column: 1 / -1; text-align: center; font-size: 12px; }
.stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; background: radial-gradient(ellipse 75% 65% at 50% 52%, #1d2a37 0%, #111a23 55%, #080b0f 100%); }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud-title { position: absolute; top: 24px; left: 28px; pointer-events: none; max-width: calc(100% - 52px); }
.tag { display: inline-block; font: 700 11px/1.6 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--fire); }
.hud-title h2 { margin: 4px 0 6px; font: 700 clamp(30px, 3.6vw, 52px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 2px 18px #000a; }
.hud-title code { font: 10px var(--mono); color: var(--dim); }
.toolbar { --cut: 8px; --fill: #0b1118e0; --edge-c: var(--edge-2); position: absolute; top: 24px; right: 24px; display: flex; gap: 2px; padding: 4px; }
.toolbar button, .toolbar .btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: 700 10px var(--ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.toolbar button:hover, .toolbar .btn:hover { color: var(--text); background: var(--panel-3); }
.toolbar button.on { color: var(--fire); background: #ff7b1c14; }
.toolbar .btn.drive { color: var(--fire); }
.toolbar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hud-bottom { position: absolute; left: 24px; right: 24px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }
.specs { --cut: 8px; --fill: #0b1118e0; --edge-c: var(--edge-2); display: flex; flex-wrap: wrap; margin: 0; max-width: 100%; }
.specs div { padding: 9px 16px; border-left: 1px solid var(--edge); display: flex; flex-direction: column-reverse; gap: 2px; }
.specs div:first-child { border: 0; }
.specs dt { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 0; font: 700 13px var(--ui); white-space: nowrap; }
.skins { --cut: 8px; --fill: #0b1118e0; --edge-c: var(--edge-2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 7px 10px; max-width: 100%; }
.skins .label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chips button { --cut: 6px; --fill: var(--panel-2); --edge-c: var(--edge); display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 4px; border: 0; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.chips button:hover { --edge-c: #5d7186; }
.chips button img { width: 24px; height: 24px; object-fit: cover; }
.chips button[aria-pressed=true] { --edge-c: var(--fire); --fill: #2a1a0e; color: var(--fire-hi); }
.loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.loading span { width: 18px; height: 18px; border: 2px solid var(--edge-2); border-top-color: var(--fire); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { position: absolute; right: 25px; bottom: 24px; font-size: 11px; color: var(--dim); pointer-events: none; }
.gallery { grid-area: stage; overflow-y: auto; padding: 24px; background: var(--bg); }
.tex-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tex-grid li { --cut: 9px; --edge-c: var(--edge); cursor: zoom-in; }
.tex-grid li:hover { --edge-c: var(--fire); }
.tex-grid .sw { aspect-ratio: 1; background: repeating-conic-gradient(#1b232d 0 25%, #131a22 0 50%) 0 0 / 16px 16px; }
.tex-grid img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tex-grid .cap { padding: 9px 10px 10px; border-top: 1px solid var(--edge); }
.tex-grid .cap b { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tex-grid .cap span { font-size: 10px; color: var(--muted); }
dialog#lightbox { max-width: min(92vw, 1400px); max-height: 92vh; padding: 16px; border: 1px solid var(--edge-2); border-top: 2px solid var(--fire); background: var(--panel); color: var(--text); }
dialog#lightbox::backdrop { background: #04070ae0; }
#lb-img { display: block; max-width: 100%; max-height: calc(92vh - 80px); margin: 0 auto; background: #18202a; }
#lb-cap { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
dialog .close { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border: 0; background: var(--panel-2); font-size: 22px; }
.infocard { --cut: 10px; --fill: #0b1118eb; --edge-c: var(--edge-2); position: absolute; top: 80px; right: 24px; width: min(290px, calc(100% - 48px)); max-height: calc(100% - 230px); overflow-y: auto; padding: 18px; scrollbar-width: thin; }
.infocard[data-empty=true] { display: none; }
.info-desc p { margin: 0 0 12px; font-size: 12px; line-height: 1.7; color: #c9d3db; }
.info-desc p.muted { color: var(--muted); }
.info-stats { margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--edge); }
.info-stats div { padding: 8px 9px; background: var(--panel); display: flex; flex-direction: column-reverse; gap: 2px; min-width: 0; }
.info-stats dt { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.info-stats dd { margin: 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
body.capture .top, body.capture .catalog, body.capture .hud-title, body.capture .toolbar, body.capture .hud-bottom, body.capture .hint, body.capture .infocard { display: none !important; }
body.capture .app { grid-template-columns: 1fr; grid-template-areas: 'stage'; grid-template-rows: 1fr; }
body.capture, body.capture .stage { background: transparent; }
@media(max-width: 1200px) { .toolbar span { display: none; } .toolbar button, .toolbar .btn { width: 32px; justify-content: center; padding: 0; } .hint { display: none; } }
@media(max-width: 900px) {
  .app { height: auto; min-height: 100dvh; grid-template-columns: 1fr; grid-template-rows: auto 60vh auto; grid-template-areas: 'top' 'stage' 'catalog'; }
  .top { padding: 14px 18px; gap: 12px; flex-wrap: wrap; }
  .top-right { width: 100%; }
  .tally { width: 100%; justify-content: space-between; }
  .top h1 { font-size: 21px; }
  .top .sub { font-size: 11px; }
  .top-right { gap: 0; }
  .top-right .drive-link { display: none; }
  .tally { gap: 14px; }
  .tally dd { font-size: 18px; }
  .tally dt { font-size: 8px; }
  .catalog { border-right: 0; border-top: 1px solid var(--edge); }
  .cards { overflow: visible; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .hud-title { top: 64px; left: 18px; }
  .hud-title h2 { font-size: 30px; }
  .toolbar { top: 14px; right: 14px; }
  .hud-bottom { left: 14px; right: 14px; bottom: 14px; }
  .specs div { padding: 7px 10px; }
  .infocard { right: 14px; top: 60px; max-height: calc(100% - 190px); }
  .skins { gap: 8px; padding: 6px; }
  .skins .label { display: none; }
  .chips button { font-size: 10px; }
  .chips button img { width: 20px; height: 20px; }
  .gallery { min-height: 60vh; }
}
@media(max-width: 420px) { .tally { gap: 8px; } .tally dd { font-size: 16px; } .tally dt { font-size: 7px; letter-spacing: .06em; } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
