@font-face {
  font-family: "Pangolin";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pangolin-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Pangolin";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/pangolin-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #071018;
  --panel: rgba(8, 18, 28, 0.92);
  --soft: rgba(12, 28, 40, 0.78);
  --line: rgba(214, 186, 112, 0.42);
  --line-soft: rgba(130, 190, 210, 0.2);
  --cyan: #7cecff;
  --gold: #e4c16a;
  --text: #e8f4ff;
  --muted: #8eaab8;
  --danger: #ff8a7a;
  --ok: #9be7b2;
  --font: "Pangolin", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: #071018;
  color: var(--text);
  font-family: var(--font);
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  position: relative;
  overflow: hidden;
}

.stage-map {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: blur(6px) saturate(0.7) brightness(0.35);
  pointer-events: none;
}

.window {
  position: relative;
  width: min(1120px, 100%);
  min-width: min(960px, 100%);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(28, 56, 72, 0.18), transparent 42%),
    var(--panel);
  box-shadow:
    inset 0 0 40px rgba(48, 151, 205, 0.04),
    12px 0 0 #1a2832,
    0 12px 0 #0a1218,
    12px 12px 0 #0a1218,
    18px 28px 70px rgba(0, 0, 0, 0.45);
}

.window-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}

.window-head h1 {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 400;
}

.head-meta {
  margin-left: auto;
  display: flex;
  gap: 16px;
  color: var(--muted);
}

.close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  background: rgba(5, 12, 18, 0.5);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.tabs button {
  font: inherit;
  color: var(--muted);
  background: rgba(5, 12, 18, 0.45);
  border: 1px solid transparent;
  padding: 8px 12px;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  color: #1a1408;
  background: var(--gold);
  border-color: #f0d78a;
}

.window-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 520px;
}

.hero {
  padding: 18px 16px 20px;
  border-right: 1px solid var(--line-soft);
  background: rgba(5, 12, 18, 0.35);
}

.portrait {
  height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: transparent;
  box-shadow: 8px 0 0 #3a4650, 0 8px 0 #1a2228, 8px 8px 0 #1a2228;
}

.portrait img {
  width: 560%;
  height: 180%;
  max-width: none;
  object-fit: cover;
  object-position: 2% 48%;
  transform: translate(-1%, -16%);
}

.hero-name,
.hero-rank {
  margin: 10px 0 0;
}

.hero-rank {
  color: var(--muted);
  margin-top: 2px;
}

.bars {
  margin-top: 16px;
}

.bars label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-soft);
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5aa86a, #b6e38a);
}

.bar.energy i { background: linear-gradient(90deg, #1a6d86, var(--cyan)); }
.bar.warm i { background: linear-gradient(90deg, #b45a28, var(--gold)); }

.quick {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.quick li,
.reps li,
.modules li,
.vehicle ul li,
.exo-info p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}

.panel {
  padding: 18px 22px 24px;
}

.panel[hidden] { display: none !important; }

.panel h2,
.panel h3 {
  margin: 0 0 12px;
  font-weight: 400;
}

.panel h3 { margin-top: 22px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.panel-head p,
.note {
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-grid article {
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line-soft);
}

.stat-grid small,
.stat-grid em {
  display: block;
  color: var(--muted);
}

.stat-grid b {
  font-size: 28px;
  color: var(--gold);
}

.reps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reps li {
  align-items: center;
}

.reps i {
  height: 7px;
  background: var(--cyan);
  justify-self: stretch;
  flex: 1;
  max-width: 220px;
}

.equip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.slot {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 18, 0.45);
}

.slot::before {
  content: attr(data-slot);
  display: block;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 6px;
}

.slot.empty { border-style: dashed; color: var(--muted); }

.grid {
  display: grid;
  gap: 6px;
}

.pack-grid { grid-template-columns: repeat(6, 1fr); }
.cargo-grid { grid-template-columns: repeat(8, 1fr); margin-top: 14px; }
.store-grid { grid-template-columns: repeat(8, 1fr); }

.cell {
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  background: rgba(5, 12, 18, 0.4);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  padding: 4px;
  color: var(--text);
}

.cell.filled {
  border-color: var(--line);
  background: rgba(40, 32, 14, 0.45);
}

.cell.empty { color: transparent; }

.exo {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.exo-frame {
  position: relative;
  min-height: 360px;
  background:
    radial-gradient(circle at 50% 42%, rgba(124, 236, 255, 0.08), transparent 36%),
    rgba(5, 12, 18, 0.4);
  border: 1px solid var(--line-soft);
}

.exo-node {
  position: absolute;
  font: inherit;
  color: var(--text);
  background: rgba(8, 18, 28, 0.92);
  border: 1px solid var(--line);
  padding: 6px 8px;
  cursor: pointer;
  min-width: 86px;
}

.exo-node.helm { left: 50%; top: 18px; transform: translateX(-50%); }
.exo-node.chest { left: 50%; top: 92px; transform: translateX(-50%); }
.exo-node.core { left: 50%; top: 168px; transform: translateX(-50%); border-color: var(--cyan); }
.exo-node.arm-l { left: 18px; top: 128px; }
.exo-node.arm-r { right: 18px; top: 128px; }
.exo-node.leg-l { left: 22%; bottom: 28px; }
.exo-node.leg-r { right: 22%; bottom: 28px; }

.modules {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vehicle {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.vehicle h3 { margin: 4px 0 8px; font-weight: 400; }
.vehicle ul { list-style: none; margin: 0; padding: 0; min-width: 180px; }

@media (max-width: 720px) {
  .window { min-width: 0; }
  .window-body,
  .stat-grid,
  .equip,
  .exo { grid-template-columns: 1fr; }
  .hero { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .head-meta { display: none; }
}
