/* Iron Vanguard — the game owns its palette. A dusty dusk square does not turn
   white when the phone does, so the whole interface ignores light mode. */

:root {
  color-scheme: dark;
  --ink: #f6edda;
  --ink-dim: #b8ad9c;
  --amber: #f0a63a;
  --amber-hot: #ff8a2b;
  --danger: #d6382a;
  --dusk: #150e13;
  --line: rgba(246, 237, 218, 0.26);
  --panel: rgba(20, 13, 18, 0.72);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  color: var(--ink);
  font: 16px/1.45 var(--mono);
  /* The canvas handles its own gestures; the page must not pan or bounce. */
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#stage { position: fixed; inset: 0; background: #0a0a0a; }

/* Warm haze at the centre, dusk closing in at the corners. Cheaper than any
   postprocessing pass and it is what gives the square its cinema. */
#stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 184, 116, 0.06) 0%, rgba(255, 184, 116, 0) 46%),
    radial-gradient(ellipse at 50% 50%, rgba(18, 10, 16, 0) 36%, rgba(14, 7, 12, 0.66) 100%);
}

#stage canvas { display: block; width: 100%; height: 100%; }

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  font-family: var(--mono);
  color: var(--ink);
  overflow: hidden;
}

/* Readouts never eat a gesture; only the things you press do. */
#hud > * { pointer-events: none; }
#hud .hud-button,
#hud .joystick,
#hud .overlay { pointer-events: auto; }

/* --- type -------------------------------------------------------------- */

.hud-text {
  position: absolute;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.label {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.accent { color: var(--amber); }

/* --- buttons ----------------------------------------------------------- */

.hud-button {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background-color: rgba(24, 15, 21, 0.5);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 46%;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(255, 176, 102, 0.08);
  transition: transform 0.07s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.hud-button:active {
  transform: scale(0.92);
  background-color: rgba(240, 166, 58, 0.28);
  border-color: rgba(240, 166, 58, 0.6);
}

.hud-button.big {
  width: 88px;
  height: 88px;
  background-size: 42%;
}

.hud-button.small {
  width: 54px;
  height: 54px;
  background-size: 48%;
}

.hud-button.ghost {
  background-color: rgba(20, 13, 18, 0.32);
  border-color: rgba(246, 237, 218, 0.16);
}

.hud-button.held {
  background-color: rgba(240, 166, 58, 0.34);
  border-color: rgba(240, 166, 58, 0.7);
}

/* --- grenade control --------------------------------------------------- */

.hud-button .button-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(240, 166, 58, 0.6);
  border-radius: 11px;
  background: rgba(16, 10, 14, 0.92);
  font-size: 12px;
  font-weight: 700;
  line-height: 21px;
  letter-spacing: 0;
  text-align: center;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.hud-button.empty { opacity: 0.55; }

.hud-button.empty .button-badge {
  border-color: rgba(214, 56, 42, 0.72);
  color: var(--danger);
}

/* The wait before the next throw, swept as a pie from the top. */
.hud-button .button-cooldown {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(rgba(8, 5, 8, 0.66) var(--cool, 0deg), rgba(8, 5, 8, 0) 0deg);
  opacity: 0;
  pointer-events: none;
}

.hud-button.cooling .button-cooldown { opacity: 1; }

/* --- crosshair --------------------------------------------------------- */

.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  --spread: 4px;
  transition: opacity 0.15s ease;
}

.crosshair i {
  position: absolute;
  display: block;
  background: rgba(246, 237, 218, 0.9);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.9);
}

.crosshair .ch-up    { left: -1px; top: calc(-9px - var(--spread)); width: 2px; height: 9px; }
.crosshair .ch-down  { left: -1px; top: var(--spread);             width: 2px; height: 9px; }
.crosshair .ch-left  { top: -1px; left: calc(-9px - var(--spread)); width: 9px; height: 2px; }
.crosshair .ch-right { top: -1px; left: var(--spread);             width: 9px; height: 2px; }
.crosshair .ch-dot   { left: -1.5px; top: -1.5px; width: 3px; height: 3px; border-radius: 50%; }

.crosshair.reloading { opacity: 0.35; }

.hitmark {
  position: absolute;
  left: -13px;
  top: -13px;
  width: 26px;
  height: 26px;
  border: 2px solid var(--amber);
  border-radius: 2px;
  opacity: 0;
  transform: rotate(45deg) scale(0.6);
}

.hitmark.hit { animation: hitmark 0.22s ease-out; }

.hitmark.kill {
  border-color: #fff0d2;
  animation: hitmark-kill 0.34s ease-out;
}

@keyframes hitmark {
  0% { opacity: 0.95; transform: rotate(45deg) scale(0.55); }
  100% { opacity: 0; transform: rotate(45deg) scale(1.15); }
}

@keyframes hitmark-kill {
  0% { opacity: 1; transform: rotate(45deg) scale(0.5); border-width: 3px; }
  55% { opacity: 0.9; transform: rotate(45deg) scale(1.5); }
  100% { opacity: 0; transform: rotate(45deg) scale(1.9); }
}

/* --- meters ------------------------------------------------------------ */

.meter {
  position: absolute;
  width: 152px;
  height: 10px;
  border: 1px solid var(--line);
  background: rgba(10, 6, 10, 0.62);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #d06b28, var(--amber));
  transition: transform 0.16s linear, background 0.3s linear;
}

.meter.low .meter-fill {
  background: var(--danger);
  animation: meter-pulse 0.75s ease-in-out infinite;
}

@keyframes meter-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- joystick ---------------------------------------------------------- */

.joystick {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 1px solid rgba(246, 237, 218, 0.2);
  background: radial-gradient(circle, rgba(28, 18, 24, 0.3) 0%, rgba(28, 18, 24, 0.46) 100%);
  box-shadow: inset 0 0 26px rgba(255, 176, 102, 0.07);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.joystick.active {
  border-color: rgba(240, 166, 58, 0.5);
  background: radial-gradient(circle, rgba(240, 166, 58, 0.16) 0%, rgba(28, 18, 24, 0.5) 100%);
}

.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, rgba(246, 237, 218, 0.5), rgba(246, 237, 218, 0.16));
  border: 1px solid rgba(246, 237, 218, 0.34);
}

/* --- banner ------------------------------------------------------------ */

.banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 27%;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
}

.banner.show { animation: banner 2.4s ease-out forwards; }

.banner-title {
  font-size: clamp(22px, 6vw, 38px);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--ink);
  text-shadow: 0 0 26px rgba(240, 166, 58, 0.7), 0 4px 14px rgba(0, 0, 0, 0.9);
}

.banner-sub {
  margin-top: 10px;
  font-size: clamp(11px, 2.8vw, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}

@keyframes banner {
  0% { opacity: 0; transform: translateY(14px) scale(0.96); }
  14% { opacity: 1; transform: translateY(0) scale(1); }
  72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(1.02); }
}

/* --- damage ------------------------------------------------------------ */

.damage-vignette {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(214, 56, 42, 0) 42%, rgba(196, 34, 24, 0.9) 100%);
  transition: opacity 0.12s linear;
}

/* The arc that says where a hit came from: one quadrant of a ring, turned to
   face the shooter. */
.damage-arc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  border-top: 5px solid rgba(220, 62, 46, 0.95);
  filter: drop-shadow(0 0 10px rgba(214, 56, 42, 0.7));
  opacity: 0;
  pointer-events: none;
}

/* A hostile out of sight: a small arrow on the screen edge, turned outward. */
.threat-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 13px solid rgba(220, 62, 46, 0.92);
  filter: drop-shadow(0 0 7px rgba(214, 56, 42, 0.75));
  opacity: 0;
  pointer-events: none;
}

/* --- commander ---------------------------------------------------------- */

.boss-bar {
  position: absolute;
  left: 50%;
  top: 14px;
  width: min(430px, 58vw);
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.boss-bar.show { opacity: 1; }

.boss-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--danger);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.boss-track {
  position: relative;
  height: 9px;
  margin-top: 5px;
  border: 1px solid rgba(214, 56, 42, 0.6);
  background: rgba(10, 6, 10, 0.7);
  box-shadow: 0 0 20px rgba(214, 56, 42, 0.3);
  overflow: hidden;
}

.boss-fill {
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #7d1c14, #d6382a 62%, #ff8a2b);
  transition: transform 0.14s linear;
}

/* --- overlays ---------------------------------------------------------- */

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 26px;
  text-align: center;
  /* Light enough that the square still reads behind the title. */
  background: radial-gradient(ellipse at 50% 45%, rgba(26, 14, 20, 0.22) 0%, rgba(10, 6, 10, 0.82) 82%);
}

.overlay.clear { background: transparent; }

.title {
  font-size: clamp(38px, 12vw, 92px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 0.98;
  text-transform: uppercase;
  /* Brushed metal, cut out of the letters: a gradient that runs from bone at
     the top through brass to a burnt edge at the bottom. */
  background: linear-gradient(178deg, #fffdf6 0%, #f6edda 36%, #f2bd74 72%, #c9591a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 0 24px rgba(240, 140, 60, 0.55))
    drop-shadow(0 10px 26px rgba(0, 0, 0, 0.85));
}

.tagline {
  font-size: clamp(12px, 3.2vw, 17px);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.legend {
  max-width: 30em;
  font-size: clamp(11px, 2.9vw, 15px);
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: #e4ddd0;
  opacity: 0.92;
}

.legend b { color: var(--amber); font-weight: 700; }

.deploy {
  margin-top: 8px;
  font-size: clamp(14px, 3.6vw, 20px);
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-dim);
  animation: deploy-pulse 2s ease-in-out infinite;
}

@keyframes deploy-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; color: var(--amber); }
}

.menu-button {
  min-width: 220px;
  padding: 16px 26px;
  border: 1px solid rgba(240, 166, 58, 0.55);
  border-radius: 2px;
  background: rgba(240, 166, 58, 0.1);
  color: var(--ink);
  font: 700 15px/1 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}

.menu-button:active {
  transform: scale(0.97);
  background: rgba(240, 166, 58, 0.28);
}

.menu-button.ghost {
  border-color: var(--line);
  background: rgba(246, 237, 218, 0.06);
  color: var(--ink-dim);
}

.card {
  width: min(420px, 86vw);
  padding: 22px 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.card-title {
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--amber);
}

.big-number {
  margin: 6px 0 2px;
  font-size: clamp(44px, 13vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 0 40px rgba(240, 140, 60, 0.5);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(246, 237, 218, 0.09);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

.stat-row b { color: var(--ink); font-weight: 700; }

/* --- downed ------------------------------------------------------------ */

.down-card {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 22px;
  border: 1px solid rgba(214, 56, 42, 0.6);
  background: rgba(16, 8, 12, 0.78);
  text-align: center;
  pointer-events: none;
}

.down-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--danger);
  text-shadow: 0 0 24px rgba(214, 56, 42, 0.7);
}

.down-sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.down-timer {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* --- lobby -------------------------------------------------------------- */

.overlay.lobby {
  gap: 10px;
  padding: 22px 18px;
  overflow-y: auto;
  /* The page refuses touch scrolling so the canvas keeps its gestures; the
     lobby's own list still has to scroll. */
  touch-action: pan-y;
  background: radial-gradient(ellipse at 50% 45%, rgba(26, 14, 20, 0.62) 0%, rgba(8, 5, 9, 0.94) 84%);
}

.lobby-title {
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: 0 0 30px rgba(240, 140, 60, 0.55);
}

.lobby-sub {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.lobby-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: min(340px, 86vw);
  text-align: left;
}

.lobby-label {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.lobby-input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(10, 6, 10, 0.75);
  color: var(--ink);
  font: 700 15px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  -webkit-user-select: text;
  user-select: text;
}

.lobby-input:focus { border-color: rgba(240, 166, 58, 0.8); }

.lobby-input.code { letter-spacing: 0.5em; text-align: center; }

.lobby-code {
  font: 700 clamp(24px, 7vw, 34px)/1 var(--mono);
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--amber);
  text-shadow: 0 0 26px rgba(240, 140, 60, 0.6);
}

.lobby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: min(340px, 86vw);
}

.lobby-actions .menu-button { flex: 1 1 140px; min-width: 0; }

.menu-button[disabled] { opacity: 0.4; }

.menu-button.small { min-width: 0; padding: 11px 22px; font-size: 12px; }

.lobby-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(340px, 86vw);
}

.lobby-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(246, 237, 218, 0.12);
  background: rgba(16, 10, 14, 0.6);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lobby-row.empty { opacity: 0.45; }

.lobby-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(246, 237, 218, 0.24); }

.lobby-dot.on {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(240, 166, 58, 0.85);
}

.lobby-name {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-tag { font-size: 10px; color: var(--ink-dim); }

.lobby-notice {
  min-height: 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--danger);
}

/* --- debrief ------------------------------------------------------------ */

.debrief { width: min(440px, 88vw); }

.debrief-rows {
  margin: 10px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debrief-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.debrief-bar {
  position: relative;
  height: 6px;
  border: 1px solid rgba(246, 237, 218, 0.12);
  background: rgba(10, 6, 10, 0.7);
  overflow: hidden;
}

.debrief-bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #d06b28, var(--amber));
}

.debrief-value {
  min-width: 4.6em;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.debrief-end {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--danger);
}

.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* --- field upgrades ---------------------------------------------------- */

.upgrade {
  background: radial-gradient(ellipse at 50% 45%, rgba(26, 14, 20, 0.5) 0%, rgba(8, 5, 9, 0.93) 82%);
}

.upgrade-title {
  font-size: clamp(18px, 5vw, 30px);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: 0 0 34px rgba(240, 140, 60, 0.6), 0 6px 20px rgba(0, 0, 0, 0.9);
}

.upgrade-sub {
  margin-top: -8px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.upgrade-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(760px, 94vw);
}

.upgrade-card {
  flex: 1 1 170px;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 15px 14px 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34, 21, 27, 0.94), rgba(15, 9, 14, 0.94));
  color: var(--ink);
  font: 13px/1.45 var(--mono);
  text-align: left;
  cursor: pointer;
  transition: transform 0.09s ease, border-color 0.15s ease, background 0.15s ease;
}

.upgrade-card:hover,
.upgrade-card:active {
  border-color: rgba(240, 166, 58, 0.8);
  background: linear-gradient(180deg, rgba(62, 34, 22, 0.96), rgba(26, 14, 16, 0.96));
  transform: translateY(-2px);
}

.upgrade-icon {
  width: 26px;
  height: 26px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 8px rgba(240, 166, 58, 0.45));
}

.upgrade-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}

.upgrade-detail {
  font-size: 12px;
  color: var(--ink-dim);
}

.upgrade-level {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 237, 218, 0.4);
}

.upgrade-key {
  align-self: flex-end;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(246, 237, 218, 0.32);
}

/* A phone reads the cards as a stack: icon on the left, the rest beside it. */
@media (max-width: 560px) {
  .upgrade-cards {
    flex-direction: column;
    width: min(390px, 92vw);
  }

  .upgrade-card {
    flex: 0 0 auto;
    max-width: none;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    grid-template-areas:
      "icon name key"
      "icon detail key"
      "icon level key";
    column-gap: 12px;
    row-gap: 1px;
    align-items: center;
    padding: 12px 14px;
  }

  .upgrade-icon { grid-area: icon; align-self: center; }
  .upgrade-name { grid-area: name; }
  .upgrade-detail { grid-area: detail; }
  .upgrade-level { grid-area: level; margin-top: 0; }
  .upgrade-key { grid-area: key; align-self: center; }
}

.top-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.top-corner .hud-button { position: relative; }
