#renderDiv {
  position: fixed;
  inset: 0;
  background: var(--vt-void);
}

#renderDiv canvas {
  display: block;
  outline: none;
}

/* ---------------------------------------------------------------- HUD root
   Inset to the safe area so panels clear notches and the home indicator; the 3D view behind still
   fills the screen. Layers placed at screen coordinates (waypoint, tooltip, floats) are fixed instead. */
#hud {
  position: fixed;
  inset: var(--vt-safe-t) var(--vt-safe-r) var(--vt-safe-b) var(--vt-safe-l);
  pointer-events: none;
  z-index: 100;
  font-family: var(--vt-font-body);
  color: var(--vt-text);
  opacity: 0;
  transition: opacity 0.6s ease;
}

#hud.visible {
  opacity: 1;
}

#hud .interactive,
#hud button {
  pointer-events: auto;
}

/* HUD instruments are etched with the stabilizer's hex lattice. */
#hud .vt-plate {
  background: var(--vt-hex) 0 0 / 13.86px 24px, var(--vt-plate-fill);
}

#hud .hud-actions.vt-plate {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 22%),
    var(--vt-hex) 0 0 / 13.86px 24px,
    linear-gradient(180deg, rgba(16, 19, 36, 0.94), rgba(6, 8, 20, 0.96));
}

/* Canopy frame: corner brackets and edge ticks, as if seen through the ship's windscreen. */
.hud-visor {
  position: absolute;
  inset: 6px;
  pointer-events: none;
}

.hud-visor i {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 0 solid rgba(125, 232, 255, 0.26);
}

.hud-visor i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.hud-visor i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.hud-visor i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.hud-visor i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }

.hud-visor::before,
.hud-visor::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 81px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(180deg, rgba(125, 232, 255, 0.3) 0 1px, transparent 1px 10px);
}

.hud-visor::before { left: 0; }
.hud-visor::after { right: 0; }

/* Hexagonal icon badge used for resources, buildings and panel emblems. */
.vt-badge {
  --badge: var(--vt-cyan);
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 26px;
  color: var(--badge);
  background: color-mix(in srgb, var(--badge) 15%, transparent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.vt-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--badge) 60%, transparent);
  clip-path: polygon(evenodd,
    25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%, 25% 0,
    calc(25% + 0.6px) 1px, 1.2px 50%, calc(25% + 0.6px) calc(100% - 1px),
    calc(75% - 0.6px) calc(100% - 1px), calc(100% - 1.2px) 50%, calc(75% - 0.6px) 1px, calc(25% + 0.6px) 1px);
}

.vt-badge .vt-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.vt-badge.lg {
  width: 48px;
  height: 42px;
}

.vt-badge.lg .vt-icon {
  width: 24px;
  height: 24px;
}

.vt-badge.xl {
  width: 82px;
  height: 72px;
}

.vt-badge.xl .vt-icon {
  width: 38px;
  height: 38px;
}

/* --------------------------------------------------------- Resources (TL) */
.hud-resources {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 226px;
  box-sizing: border-box;
  padding: 10px 12px 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.res-row {
  --res: var(--vt-cyan);
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  column-gap: 10px;
}

.res-row[data-type="metal"] { --res: var(--vt-metal); }
.res-row[data-type="biomass"] { --res: var(--vt-biomass); }
.res-row[data-type="water"] { --res: var(--vt-water); }

.res-row .vt-badge {
  --badge: var(--res);
}

.res-main {
  min-width: 0;
}

.res-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.res-name {
  font-family: var(--vt-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vt-muted);
}

.res-count {
  font-family: var(--vt-font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
}

.res-count small {
  margin-left: 1px;
  font-size: 11px;
  color: var(--vt-dim);
}

/* Storage canister: a glass tube filled with the resource, graduated in tenths. */
.res-bar {
  position: relative;
  height: 7px;
  margin-top: 4px;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.res-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(4, 6, 18, 0.65) calc(10% - 1px) 10%);
}

.res-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--res) 55%, #fff) 0%, var(--res) 45%, color-mix(in srgb, var(--res) 65%, #000) 100%);
  box-shadow: 0 0 9px color-mix(in srgb, var(--res) 55%, transparent);
  transition: width 0.25s ease;
}

.res-row.full .res-count {
  color: var(--vt-warn);
}

.res-row.full .res-bar > span {
  --res: var(--vt-warn);
}

/* Share of the planet's original deposit still in the ground. */
.res-meter {
  --r: 1;
  position: relative;
  flex: none;
  width: 26px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 5.5px);
  mask: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 5.5px);
}

.res-meter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--r) * 100%);
  background: var(--res);
  opacity: 0.8;
  transition: width 0.4s ease;
}

.res-row.dry .res-meter::before {
  background: var(--vt-warn);
}

.res-row.bump .res-count {
  animation: vt-bump 0.35s ease;
}

@keyframes vt-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); color: #fff; text-shadow: 0 0 10px var(--res); }
  100% { transform: scale(1); }
}

.res-meta {
  display: flex;
  gap: 5px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.res-chip {
  --chip: var(--vt-cyan);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  font-family: var(--vt-font-display);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--chip) 55%, transparent);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.res-chip .vt-icon {
  width: 14px;
  height: 14px;
  color: var(--chip);
}

.res-chip.power { --chip: #ffd36a; }
.res-chip.rovers { --chip: #ffb36a; }
.res-chip.seeds { --chip: var(--vt-biomass); }

.res-chip.low {
  color: var(--vt-warn);
  background: rgba(255, 176, 58, 0.14);
}

/* Rover priority: what the fleet gathers first. */
.res-fleet {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.fleet-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: auto;
  font-family: var(--vt-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vt-muted);
}

.fleet-tag .vt-icon {
  width: 14px;
  height: 14px;
  color: #ffb36a;
}

.fleet-opt,
.seg-opt {
  --opt: #ffb36a;
  border: 0;
  color: var(--vt-dim);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.fleet-opt[data-priority="metal"],
.seg-opt[data-type="metal"] { --opt: var(--vt-metal); }
.fleet-opt[data-priority="biomass"],
.seg-opt[data-type="biomass"] { --opt: var(--vt-biomass); }
.fleet-opt[data-priority="water"],
.seg-opt[data-type="water"] { --opt: var(--vt-water); }

.fleet-opt {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  padding: 0;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.fleet-opt .vt-icon {
  width: 15px;
  height: 15px;
}

.fleet-opt:hover,
.seg-opt:hover {
  color: var(--vt-text);
  background: color-mix(in srgb, var(--opt) 16%, transparent);
}

.fleet-opt.on,
.seg-opt.on {
  color: #fff;
  background: color-mix(in srgb, var(--opt) 32%, transparent);
  box-shadow: inset 0 -2px 0 var(--opt);
}

.fleet-opt.on .vt-icon,
.seg-opt.on .vt-icon {
  color: var(--opt);
  opacity: 1;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--opt) 70%, transparent));
}

/* What's still in the island's deposits: finite for metal and water, regrowing for biomass. */
.res-reserve {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.15;
  color: var(--vt-dim);
  white-space: nowrap;
}

.res-reserve .vt-icon {
  width: 12px;
  height: 12px;
  color: var(--res);
  opacity: 0.8;
}

.res-reserve b {
  font-family: var(--vt-font-display);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vt-muted);
}

.res-row.dry .res-reserve,
.res-row.dry .res-reserve b,
.res-row.dry .res-reserve .vt-icon {
  color: var(--vt-warn);
}

.hud-resources.coach-focus {
  --plate-line: var(--vt-teal);
  animation: vt-coach-focus 1.4s ease-in-out infinite;
}

.hud-resources.coach-focus .res-reserve {
  color: var(--vt-teal);
}

.hud-resources.coach-focus .res-reserve b {
  color: #fff;
}

@keyframes vt-coach-focus {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.3); }
}

.res-alert {
  --tone: var(--vt-warn);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  padding: 6px 9px 6px 7px;
  border: 0;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 13%, transparent);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  cursor: pointer;
}

.res-alert .vt-icon {
  width: 15px;
  height: 15px;
}

.res-alert:hover {
  background: color-mix(in srgb, var(--tone) 24%, transparent);
}

.res-alert.short {
  --tone: var(--vt-danger);
  animation: vt-alert-pulse 1.6s ease-in-out infinite;
}

@keyframes vt-alert-pulse {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.35); }
}

/* ---------------------------------------------------- Containment gauge (TC)
   Lattice miniature | core clock | core tremor trace, in one visor. */
/* Centred, unless that would run it into the supply readout (--mission-l) or the menu buttons (--mission-r). */
.hud-mission {
  --slant: 26px;
  --state: var(--vt-ember);
  --mission-w: 368px;
  --mission-l: 248px;
  --mission-r: 152px;
  position: absolute;
  top: 0;
  left: clamp(calc(var(--mission-l) + var(--mission-w) / 2), 50%, calc(100% - var(--mission-r) - var(--mission-w) / 2));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 50px;
  align-items: center;
  column-gap: 12px;
  width: var(--mission-w);
  box-sizing: border-box;
  padding: 6px 36px 8px;
  text-align: center;
  background:
    radial-gradient(110% 120% at 50% 0%, color-mix(in srgb, var(--state) 9%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(3, 4, 16, 0.94), rgba(10, 13, 36, 0.86)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, var(--slant) 100%);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  transition: background 0.6s ease;
}

.mission-core {
  min-width: 0;
}

.mission-wing {
  --b: color-mix(in srgb, var(--state) 45%, rgba(125, 232, 255, 0.4));
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px;
}

/* Instrument bezel: a bracket on each corner of the readout. */
.mission-wing::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--b), var(--b)) left top / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) left top / 1px 7px no-repeat,
    linear-gradient(var(--b), var(--b)) right top / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) right top / 1px 7px no-repeat,
    linear-gradient(var(--b), var(--b)) left bottom / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) left bottom / 1px 7px no-repeat,
    linear-gradient(var(--b), var(--b)) right bottom / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) right bottom / 1px 7px no-repeat;
  transition: background 0.6s ease;
}

.mission-wing canvas {
  display: block;
}

.mission-wing.glyph canvas {
  width: 36px;
  height: 36px;
}

.mission-wing.tremor canvas {
  width: 44px;
  height: 22px;
  background: repeating-linear-gradient(90deg, rgba(150, 170, 230, 0.07) 0 1px, transparent 1px 9px);
}

.mission-wing.tremor span {
  font-family: var(--vt-font-display);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--vt-dim);
}

.hud-mission::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--vt-line-strong);
  clip-path: polygon(evenodd,
    0 0, 100% 0, calc(100% - var(--slant)) 100%, var(--slant) 100%, 0 0,
    1.4px 0, calc(var(--slant) + 0.7px) calc(100% - 1px), calc(100% - var(--slant) - 0.7px) calc(100% - 1px), calc(100% - 1.4px) 0, 1.4px 0);
}

.hud-mission::after {
  content: "";
  position: absolute;
  left: calc(var(--slant) + 30px);
  right: calc(var(--slant) + 30px);
  bottom: 0;
  height: 2px;
  background: var(--state);
  box-shadow: 0 0 12px var(--state);
  transition: background 0.6s ease;
}

.mission-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--vt-font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 16px rgba(120, 220, 255, 0.45);
}

.mission-timer b {
  font-weight: inherit;
}

.hud-mission.warning { --state: var(--vt-warn); }
.hud-mission.warning .mission-timer {
  color: var(--vt-warn);
  text-shadow: 0 0 14px rgba(255, 176, 58, 0.6);
}

.hud-mission.critical { --state: var(--vt-danger); }
.hud-mission.critical .mission-timer {
  color: var(--vt-danger);
  text-shadow: 0 0 18px rgba(255, 74, 90, 0.8);
  animation: vt-pulse 0.9s ease-in-out infinite;
}

.hud-mission.stable { --state: var(--vt-ok); }
.hud-mission.stable .mission-timer {
  color: var(--vt-ok);
  text-shadow: 0 0 16px rgba(61, 255, 197, 0.6);
}

.stability {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.stability .stability-bar {
  flex: 1;
  height: 6px;
}

/* One segment per lattice cell (`--segments` is set from the puzzle size). */
.stability-bar,
.core-meter {
  --segments: 64;
  --seg: calc(100% / var(--segments));
  position: relative;
  height: 7px;
  background: rgba(255, 255, 255, 0.09);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 1px), transparent calc(var(--seg) - 1px) var(--seg));
  mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 1px), transparent calc(var(--seg) - 1px) var(--seg));
}

.stability-bar > span,
.core-meter > span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--vt-ember), #ffd36a 50%, var(--vt-teal));
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
  transition: clip-path 0.4s ease;
}

.stability-count {
  min-width: 3.4em;
  font-family: var(--vt-font-display);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
}

@keyframes vt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes vt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --------------------------------------------------------- Top-right menu */
.hud-menu {
  position: absolute;
  top: 14px;
  right: 60px;
  display: flex;
  gap: 8px;
}

/* ---------------------------------------------------------- Objective (R) */
.hud-objective {
  position: absolute;
  top: 62px;
  right: 14px;
  width: 270px;
  box-sizing: border-box;
  padding: 10px 14px 12px 17px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hud-objective::after {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 12px;
  width: 2px;
  background: var(--vt-violet);
  box-shadow: 0 0 10px var(--vt-violet);
}

.hud-objective.done {
  opacity: 0;
  transform: translateX(30px);
}

.hud-objective.done button {
  pointer-events: none;
}

.objective-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.objective-head .vt-tag {
  color: var(--vt-violet);
}

.obj-step {
  font-family: var(--vt-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--vt-muted);
}

.objective-title {
  margin-top: 6px;
  font-family: var(--vt-font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.objective-hint {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vt-muted);
}

.objective-progress {
  margin-top: 9px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.objective-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--vt-violet);
  box-shadow: 0 0 8px var(--vt-violet);
  transition: width 0.3s ease;
}

/* Step pips: done, current, and still to come. */
.obj-track {
  display: flex;
  gap: 3px;
  margin-top: 7px;
}

.obj-track i {
  flex: 1;
  max-width: 16px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.obj-track i.done {
  background: color-mix(in srgb, var(--vt-violet) 70%, transparent);
}

.obj-track i.now {
  background: #fff;
  box-shadow: 0 0 6px var(--vt-violet);
  animation: vt-pulse 1.2s ease-in-out infinite;
}

.hud-objective.coach .obj-track i.done {
  background: color-mix(in srgb, var(--coach) 70%, transparent);
}

.hud-objective.coach .obj-track i.now {
  box-shadow: 0 0 6px var(--coach);
}

.obj-signal,
.obj-from {
  display: none;
}

/* Uplink signal: bars climb while a training transmission is open. */
.obj-signal {
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.obj-signal i {
  width: 3px;
  background: var(--coach, var(--vt-teal));
  opacity: 0.3;
  animation: vt-signal 2.4s steps(1) infinite;
}

.obj-signal i:nth-child(1) { height: 3px; animation-delay: 0s; }
.obj-signal i:nth-child(2) { height: 5px; animation-delay: 0.3s; }
.obj-signal i:nth-child(3) { height: 7px; animation-delay: 0.6s; }
.obj-signal i:nth-child(4) { height: 10px; animation-delay: 0.9s; }

@keyframes vt-signal {
  0%, 70% { opacity: 1; }
  71%, 100% { opacity: 0.3; }
}

.hud-objective.coach .obj-signal {
  display: inline-flex;
}

.hud-objective.coach .obj-from {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 6px;
  font-family: var(--vt-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vt-dim);
}

.obj-from b {
  font-weight: 600;
  color: var(--coach);
}

.obj-from span::before {
  content: "// ";
  opacity: 0.6;
}

/* A new step decodes in from the left like an incoming transmission. */
.hud-objective.incoming .objective-title,
.hud-objective.incoming .objective-body {
  animation: vt-uplink 0.55s ease-out;
}

@keyframes vt-uplink {
  0% { clip-path: inset(0 100% 0 0); filter: brightness(2); }
  70% { clip-path: inset(0 0 0 0); filter: brightness(1.4); }
  100% { clip-path: inset(0 0 0 0); filter: none; }
}

.hud-objective.flash {
  animation: vt-objective-flash 0.9s ease;
}

@keyframes vt-objective-flash {
  0% { filter: brightness(1.8) saturate(1.4); }
  100% { filter: none; }
}

/* Training coach: the directive card grows a briefing body, a skip control and a continue button. */
.obj-badge,
.obj-skip,
.objective-body,
.objective-next {
  display: none;
}

.hud-objective.coach {
  --coach: var(--vt-teal);
  width: 316px;
}

.hud-objective.coach::after {
  background: var(--coach);
  box-shadow: 0 0 10px var(--coach);
}

.hud-objective.coach .objective-head {
  justify-content: flex-start;
  gap: 8px;
}

.hud-objective.coach .objective-head .vt-tag {
  color: var(--coach);
}

.hud-objective.coach .obj-badge {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--coach);
  background: color-mix(in srgb, var(--coach) 16%, transparent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.hud-objective.coach .obj-badge .vt-icon {
  width: 14px;
  height: 14px;
}

.hud-objective.coach .obj-step {
  margin-right: auto;
}

.hud-objective.coach .obj-skip {
  display: inline-block;
  padding: 3px 0 3px 6px;
  border: 0;
  background: none;
  font-family: var(--vt-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vt-dim);
  cursor: pointer;
}

.hud-objective.coach .obj-skip:hover {
  color: var(--vt-text);
}

.hud-objective.coach .obj-skip[data-armed] {
  color: var(--vt-warn);
}

.hud-objective.coach .objective-hint {
  display: none;
}

/* A long briefing scrolls inside the card rather than running down over the minimap. */
.hud-objective.coach .objective-body {
  display: block;
  max-height: calc(100 * var(--vt-safe-vh) - 420px);
  margin-top: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  pointer-events: auto;
  font-size: 13px;
  line-height: 1.5;
  color: #c9d6f0;
}

.hud-objective.coach .objective-progress > span {
  background: var(--coach);
  box-shadow: 0 0 8px var(--coach);
}

.hud-objective.coach.briefing .objective-progress {
  display: none;
}

.hud-objective.coach.briefing .objective-next {
  display: inline-flex;
  margin-top: 11px;
}

/* A building's side sheet is open: the coach shrinks to its one-line hint so the two don't collide. */
.hud-objective.coach.yield .objective-body {
  display: none;
}

.hud-objective.coach.yield .objective-hint {
  display: block;
}

/* --------------------------------------------------------------- Waypoint */
.hud-waypoint {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform;
}

.wp-marker {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px rgba(61, 255, 197, 0.75));
  animation: vt-wp-bob 1.6s ease-in-out infinite;
}

.wp-marker > .vt-icon {
  width: 30px;
  height: 30px;
  color: var(--vt-teal);
}

.wp-arrow {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
}

.wp-arrow .vt-icon {
  width: 18px;
  height: 18px;
  color: #fff;
  transform: translateX(25px);
}

.hud-waypoint.edge .wp-arrow {
  display: grid;
}

.hud-waypoint.edge .wp-marker {
  animation: none;
}

.wp-label {
  position: absolute;
  left: 0;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 9px 4px;
  transform: translateX(-50%);
  font-family: var(--vt-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  background: linear-gradient(180deg, rgba(4, 7, 20, 0.72), rgba(4, 7, 20, 0.5));
  border-top: 1px solid rgba(61, 255, 197, 0.45);
  transition: opacity 0.3s ease;
}

/* What to do there: "Mine metal", "Board colonists"… */
.wp-label em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--vt-teal);
}

.wp-label em:empty {
  display: none;
}

.wp-sub {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.wp-label b {
  font-weight: 600;
  color: #fff;
}

.wp-label span {
  color: var(--vt-teal);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.hud-waypoint.edge .wp-label b {
  display: none;
}

.hud-waypoint.edge-left .wp-label {
  align-items: flex-start;
  transform: translateX(-16px);
}

.hud-waypoint.edge-right .wp-label {
  align-items: flex-end;
  transform: translateX(calc(16px - 100%));
}

.hud-waypoint.edge-bottom .wp-label {
  top: auto;
  bottom: 24px;
}

/* Arrived: the marker steps back so the work underneath stays visible. */
.hud-waypoint.near .wp-marker,
.hud-waypoint.near .wp-label {
  opacity: 0.3;
}

.wp-marker {
  transition: opacity 0.3s ease;
}

@keyframes vt-wp-bob {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 5px)); }
}

/* ---------------------------------------------------------------- Toasts */
.hud-toasts {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(480px, 80 * var(--vt-safe-vw));
}

.toast {
  --cut: 8px;
  --tone: var(--vt-cyan);
  --plate-line: color-mix(in srgb, var(--tone) 55%, transparent);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 7px 16px 8px 8px;
  background: var(--vt-plate-fill);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  animation: vt-toast-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast.success { --tone: var(--vt-ok); }
.toast.warning { --tone: var(--vt-warn); }
.toast.error { --tone: var(--vt-danger); }

.toast-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 15%, transparent);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.toast-icon .vt-icon {
  width: 16px;
  height: 16px;
}

/* Comms channel the message came in on. */
.toast-chan {
  flex: none;
  align-self: stretch;
  display: flex;
  align-items: center;
  margin-left: -2px;
  padding-right: 10px;
  border-right: 1px solid color-mix(in srgb, var(--tone) 35%, transparent);
  font-family: var(--vt-font-display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tone);
}

.toast-timer {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: var(--tone);
  opacity: 0.55;
  transform-origin: left;
  animation: vt-toast-timer var(--life, 3s) linear forwards;
}

.toast.out {
  opacity: 0;
  transform: translateY(-8px);
}

@keyframes vt-toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@keyframes vt-toast-timer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Pirate raid banner: heads the comms stack from the warning until the raid is over. */
.hud-raid {
  --tone: var(--vt-danger);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(430px, 100%);
  box-sizing: border-box;
  padding: 7px 14px 8px 8px;
  border: 0;
  color: var(--vt-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 26%, rgba(8, 10, 24, 0.94)), rgba(8, 10, 24, 0.92) 72%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 60%, transparent);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: vt-toast-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.hud-raid.ready:not([data-state="raid"]) { --tone: var(--vt-warn); }

.raid-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  animation: vt-raid-blink 1.1s steps(2, jump-none) infinite;
}

.hud-raid[data-state="raid"] .raid-icon { animation-duration: 0.5s; }
.hud-raid.ready:not([data-state="raid"]) .raid-icon { animation: none; }

.raid-icon .vt-icon {
  width: 19px;
  height: 19px;
}

.raid-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.raid-title {
  font-family: var(--vt-font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tone);
}

.raid-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  color: var(--vt-muted);
}

.raid-note {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.raid-pips {
  display: flex;
  flex: none;
  gap: 3px;
}

.raid-pips i {
  width: 9px;
  height: 9px;
  background: color-mix(in srgb, var(--vt-danger) 70%, transparent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.raid-pips i.on {
  background: var(--vt-cyan);
  box-shadow: 0 0 6px var(--vt-cyan);
}

.raid-clock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--vt-font-display);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--tone);
  text-shadow: 0 0 12px color-mix(in srgb, var(--tone) 60%, transparent);
}

.raid-clock .vt-icon {
  width: 17px;
  height: 17px;
}

@keyframes vt-raid-blink {
  from { opacity: 1; }
  to { opacity: 0.45; }
}

/* ----------------------------------------------------------- Bottom area */
/* The console centres under the view. Its side columns are at least as wide as the corner panels beside it
   (--bottom-l, --bottom-r) and share the rest, so on a narrow screen it slides toward the roomier side. */
.hud-bottom {
  --bottom-l: 248px;
  --bottom-r: 198px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: grid;
  grid-template-columns: minmax(var(--bottom-l), 1fr) auto minmax(var(--bottom-r), 1fr);
  justify-items: center;
  row-gap: 8px;
}

.hud-bottom > * {
  grid-column: 2;
}

.hud-prompt {
  --cut: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  font-size: 14px;
  white-space: nowrap;
}

.hud-prompt .sub {
  color: var(--vt-muted);
  font-size: 13px;
}

.hud-progress {
  --cut: 7px;
  width: 300px;
  box-sizing: border-box;
  padding: 8px 12px 10px;
}

.hud-progress .label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: var(--vt-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hud-progress .p-value {
  font-variant-numeric: tabular-nums;
  color: var(--bar-color, var(--vt-cyan));
}

.hud-progress .bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
  mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
}

.hud-progress .bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--bar-color, var(--vt-cyan));
}

/* Ship console: a gunmetal deck of keys, each with a status lamp. */
.hud-actions {
  --cut: 12px;
  display: flex;
  gap: 6px;
  padding: 7px;
}

.action-btn {
  --cut: 8px;
  --plate-line: rgba(120, 220, 255, 0.2);
  --glyph: var(--vt-cyan);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 80px;
  height: 60px;
  padding: 7px 10px 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 55%, rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -2px 0 rgba(0, 0, 0, 0.4);
  color: var(--vt-text);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.action-btn .led {
  position: absolute;
  top: 6px;
  left: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--glyph);
  box-shadow: 0 0 6px var(--glyph);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.action-btn:hover:not(:disabled) .led,
.action-btn.active .led {
  opacity: 1;
}

.action-btn.highlight .led {
  opacity: 1;
  animation: vt-blink 0.8s ease-in-out infinite;
}

.action-btn:disabled .led {
  background: #30333d;
  box-shadow: none;
  opacity: 1;
}

.action-btn .icon {
  display: grid;
  place-items: center;
  color: var(--glyph);
}

.action-btn .icon .vt-icon {
  width: 23px;
  height: 23px;
}

.action-btn .name {
  font-family: var(--vt-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.action-btn kbd {
  position: absolute;
  top: 4px;
  right: 5px;
  min-width: 0;
  height: 15px;
  padding: 0 4px;
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--vt-dim);
  font-size: 9px;
}

.action-btn::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 0;
  height: 2px;
  background: var(--glyph);
  box-shadow: 0 0 10px var(--glyph);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.action-btn:hover:not(:disabled) {
  --plate-line: var(--vt-line-strong);
  background: linear-gradient(180deg, rgba(95, 246, 255, 0.15), rgba(95, 246, 255, 0.03));
}

.action-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.action-btn.active {
  --plate-line: var(--vt-cyan);
  background: linear-gradient(180deg, rgba(95, 246, 255, 0.28), rgba(95, 246, 255, 0.06));
}

.action-btn.active::after {
  transform: scaleX(1);
}

.action-btn.highlight {
  --plate-line: var(--vt-violet);
  --glyph: #c4b8ff;
  animation: vt-highlight 1.6s ease-in-out infinite;
}

@keyframes vt-highlight {
  0%, 100% { box-shadow: inset 0 0 14px rgba(155, 139, 255, 0); }
  50% { box-shadow: inset 0 0 26px rgba(155, 139, 255, 0.6); }
}

.action-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------------------------------------------------------------- Minimap */
.hud-minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  cursor: crosshair;
  background: rgba(6, 10, 22, 0.9);
  box-shadow:
    0 0 0 1px rgba(110, 230, 220, 0.55),
    0 0 0 6px rgba(10, 13, 26, 0.92),
    0 0 0 7px rgba(110, 230, 220, 0.22),
    0 10px 26px rgba(0, 0, 0, 0.45);
}

.hud-minimap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Scope glass: a soft highlight and a darkened rim over the scan. */
.hud-minimap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.08), transparent 42%),
    radial-gradient(circle closest-side, transparent 78%, rgba(0, 0, 0, 0.42) 100%);
}

.hud-minimap::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 1;
  width: 10px;
  height: 6px;
  transform: translateX(-50%);
  background: var(--vt-cyan);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  filter: drop-shadow(0 0 4px var(--vt-cyan));
  pointer-events: none;
}

/* ------------------------------------------------------- Tooltip & floats */
.hud-tooltip {
  --cut: 7px;
  position: fixed;
  z-index: 5;
  max-width: 270px;
  padding: 8px 12px 9px;
  font-size: 13px;
  pointer-events: none;
  transform: translate(16px, 16px);
}

.tt-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--vt-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tt-title .vt-icon {
  width: 16px;
  height: 16px;
  color: var(--tt-color, var(--vt-cyan));
}

.tt-sub {
  margin-top: 3px;
  line-height: 1.35;
  color: var(--vt-muted);
}

.tt-action {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--vt-cyan);
}

.tt-action .vt-icon {
  width: 13px;
  height: 13px;
}

.hud-floats {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.float-text {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--vt-font-display);
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 14px currentColor;
  white-space: nowrap;
  will-change: transform, opacity;
}

.float-text .vt-icon {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

/* ------------------------------------------------------------ Placement */
.hud-placement {
  --cut: 8px;
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px 11px;
  font-size: 14px;
  text-align: center;
}

.hud-placement b {
  font-family: var(--vt-font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.hud-placement .reason {
  margin-top: 4px;
  font-weight: 600;
  color: var(--vt-danger);
}

.hud-placement .reason:empty {
  display: none;
}

.hud-placement .keys {
  margin-top: 5px;
  font-size: 12px;
  color: var(--vt-muted);
}

.hud-placement-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

/* ---------------------------------------------------------------- Panels */
.vt-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--vt-safe-t) var(--vt-safe-r) var(--vt-safe-b) var(--vt-safe-l);
  box-sizing: border-box;
  background: radial-gradient(ellipse at center, rgba(3, 2, 12, 0.3), rgba(3, 2, 12, 0.62));
  pointer-events: auto;
  animation: vt-fade-in 0.2s ease;
  font-family: var(--vt-font-body);
  color: var(--vt-text);
}

.vt-overlay.dim {
  background: rgba(3, 2, 12, 0.74);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

@keyframes vt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vt-panel {
  --cut: 18px;
  --plate-line: var(--vt-line-strong);
  display: flex;
  flex-direction: column;
  max-width: min(980px, calc(95 * var(--vt-safe-vw)));
  max-height: calc(92 * var(--vt-safe-vh));
  padding: 1px;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(95, 246, 255, 0.07), transparent 140px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(14, 17, 46, 0.97), rgba(6, 7, 22, 0.98));
  animation: vt-panel-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.vt-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  --b: var(--vt-cyan);
  background:
    linear-gradient(var(--b), var(--b)) right top / 22px 2px no-repeat,
    linear-gradient(var(--b), var(--b)) right top / 2px 22px no-repeat,
    linear-gradient(var(--b), var(--b)) left bottom / 22px 2px no-repeat,
    linear-gradient(var(--b), var(--b)) left bottom / 2px 22px no-repeat;
  opacity: 0.8;
}

.vt-panel-body {
  position: relative;
  min-height: 0;
  overflow: auto;
  padding: 22px 26px 24px;
}

@keyframes vt-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 44px;
}

.panel-head .vt-badge {
  --badge: var(--emblem, var(--vt-cyan));
}

.panel-head .vt-tag {
  margin-bottom: 4px;
  color: var(--emblem, var(--vt-cyan));
}

.vt-panel h2 {
  margin: 0;
  font-family: var(--vt-font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.vt-panel h3.section {
  margin: 20px 0 10px;
}

.vt-panel .subtitle {
  margin: 10px 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--vt-muted);
}

.vt-panel .subtitle b {
  color: var(--vt-text);
}

.vt-panel .subtitle .vt-icon {
  width: 15px;
  height: 15px;
}

/* Costs */
.cost {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.cost-chip {
  --res: var(--vt-cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 5px;
  font-family: var(--vt-font-display);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
  background: rgba(255, 255, 255, 0.06);
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
  white-space: nowrap;
}

.cost-chip .vt-icon {
  width: 14px;
  height: 14px;
  color: var(--res);
}

.cost-chip.metal { --res: var(--vt-metal); }
.cost-chip.biomass { --res: var(--vt-biomass); }
.cost-chip.water { --res: var(--vt-water); }
.cost-chip.power { --res: #ffd36a; }

.cost-chip.missing {
  color: #ffb9c0;
  background: rgba(255, 74, 90, 0.16);
}

.cost-chip.gain {
  color: var(--vt-ok);
}

.cost-chip.draw {
  color: var(--vt-warn);
}

/* Build menu */
.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 10px;
  width: min(880px, calc(86 * var(--vt-safe-vw)));
}

.build-card,
.upgrade-card {
  --cut: 10px;
  --accent: var(--vt-cyan);
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px 12px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  color: var(--vt-text);
  font-family: var(--vt-font-body);
}

.build-card {
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.build-card:hover:not(.locked) {
  --plate-line: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, transparent), rgba(255, 255, 255, 0.02));
  transform: translateY(-2px);
}

.build-card.locked {
  opacity: 0.55;
  cursor: default;
}

.build-card .head,
.upgrade-card .head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.build-card .vt-badge,
.upgrade-card .vt-badge {
  --badge: var(--accent);
}

.build-card .head kbd {
  margin-left: auto;
  align-self: flex-start;
}

.build-card .title,
.upgrade-card .title {
  font-family: var(--vt-font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.build-card .count {
  margin-top: 1px;
  font-family: var(--vt-font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vt-muted);
}

.build-card .count b {
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
}

.build-card .desc {
  min-height: 36px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vt-muted);
}

/* When to build it. */
.build-card .tip {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 7px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #b9c6e4;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.build-card .tip .vt-icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--accent);
}

.build-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.build-card .reason {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
  font-size: 12px;
  color: var(--vt-warn);
}

.build-card .reason .vt-icon {
  width: 14px;
  height: 14px;
}

.build-card .reason:empty {
  display: none;
}

/* The building the current directive asks for. */
.build-card.suggested {
  --plate-line: var(--vt-teal);
  background: linear-gradient(180deg, rgba(61, 255, 197, 0.14), rgba(255, 255, 255, 0.02));
  animation: vt-suggest 1.6s ease-in-out infinite;
}

@keyframes vt-suggest {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.25); }
}

/* Purchases that would leave the island unable to pay for a full lattice. */
.lattice-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--vt-warn);
}

.lattice-warning .vt-icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.lattice-warning.tip {
  color: var(--vt-teal);
}

.build-card.costly {
  --plate-line: rgba(255, 176, 58, 0.45);
}

/* Upgrades & synthesizer */
.upgrade-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  gap: 10px;
  width: min(900px, calc(86 * var(--vt-safe-vw)));
}

.upgrade-card .vt-btn {
  margin-top: auto;
}

.upgrade-card .sub {
  font-size: 12.5px;
  color: var(--vt-muted);
}

.pips {
  display: flex;
  gap: 3px;
}

.pips i {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%);
}

.pips i.on {
  background: var(--accent);
}

.upgrade-card .value {
  font-size: 13px;
  color: var(--vt-muted);
}

.upgrade-card .value b {
  font-family: var(--vt-font-display);
  font-weight: 600;
  color: var(--vt-ok);
}

.upgrade-card .value.reason {
  color: var(--vt-warn);
  font-size: 12px;
}

.upgrade-card .giant-times {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: grid;
  gap: 3px;
  border-top: 1px dashed rgba(140, 200, 255, 0.16);
  font-size: 12px;
  color: var(--vt-muted);
}

.upgrade-card .giant-times li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
}

.upgrade-card .giant-times .vt-icon {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}

.upgrade-card .giant-times .gt-time {
  font-variant-numeric: tabular-nums;
}

.upgrade-card .giant-times b {
  font-family: var(--vt-font-display);
  font-weight: 600;
  color: var(--vt-ok);
}

.mini-shape {
  display: inline-grid;
  gap: 2px;
}

.mini-shape i {
  width: 12px;
  height: 12px;
}

.mini-shape i.on {
  background: var(--shape-color, var(--vt-violet));
  box-shadow: 0 0 6px var(--shape-color, var(--vt-violet));
}

.shape-holder {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  background: rgba(180, 155, 255, 0.08);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* --------------------------------------------------------- Evacuation (BL) */
.hud-evac {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 226px;
  box-sizing: border-box;
  padding: 9px 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evac-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.evac-head .vt-tag {
  flex: 1;
  min-width: 0;
}

.evac-safe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--vt-font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #4fe3b5;
}

.evac-safe .vt-icon {
  width: 14px;
  height: 14px;
}

.evac-safe b {
  font-size: 15px;
}

.evac-safe small {
  font-size: 11px;
  color: var(--vt-dim);
}

/* The rescue window: when it closes, quakes level every colony still holding people. */
.evac-clock {
  --tone: var(--vt-cyan);
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 7px;
  border: 1px solid color-mix(in srgb, var(--tone) 34%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 15%, transparent), color-mix(in srgb, var(--tone) 3%, transparent));
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  font-family: var(--vt-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tone);
}

.evac-clock .vt-icon {
  width: 14px;
  height: 14px;
}

.evac-clock-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.evac-clock b {
  display: inline-flex;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
}

.evac-clock b .vt-icon {
  width: 15px;
  height: 15px;
}

.evac-clock[data-tone="warn"] { --tone: var(--vt-warn); }
.evac-clock[data-tone="danger"] { --tone: #ff5a4a; animation: evac-alarm 1s ease-in-out infinite; }
.evac-clock[data-tone="done"] { --tone: #4fe3b5; }
.evac-clock[data-tone="lost"] { --tone: #8a90a8; }
.evac-clock:is([data-tone="warn"], [data-tone="danger"], [data-tone="done"]) b { color: var(--tone); }
.evac-clock[data-tone="danger"] b { text-shadow: 0 0 12px rgba(255, 90, 74, 0.7); }

.evac-ship {
  display: grid;
  grid-template-columns: 14px auto 1fr auto;
  align-items: center;
  gap: 7px;
  font-family: var(--vt-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vt-muted);
}

.evac-ship .vt-icon {
  width: 14px;
  height: 14px;
}

.evac-seats {
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.evac-seats span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--vt-cyan);
  box-shadow: 0 0 8px rgba(95, 246, 255, 0.6);
  transition: width 0.2s ease;
}

.evac-ship b {
  font-size: 12px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
}

.evac-ship.busy .vt-icon { color: var(--vt-cyan); }
.evac-ship.full b { color: var(--vt-warn); }
.evac-ship.full .evac-seats span { background: var(--vt-warn); box-shadow: 0 0 8px rgba(255, 176, 58, 0.6); }

.evac-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.evac-row {
  --tone: var(--vt-cyan);
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
  padding: 4px 7px 4px 5px;
  border: 0;
  border-left: 2px solid var(--tone);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.evac-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.evac-row .vt-badge {
  --badge: var(--tone);
  grid-row: span 2;
  width: 24px;
  height: 21px;
}

.evac-row .vt-badge .vt-icon {
  width: 13px;
  height: 13px;
}

.evac-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--vt-text);
}

.evac-count {
  font-family: var(--vt-font-display);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
}

.evac-line {
  grid-column: 2 / 4;
  font-family: var(--vt-font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--tone);
}

.evac-row[data-tone="warn"] { --tone: var(--vt-warn); }
.evac-row[data-tone="danger"] { --tone: #ff5a4a; animation: evac-alarm 1s ease-in-out infinite; }
.evac-row[data-tone="done"] { --tone: #4fe3b5; }
.evac-row[data-tone="lost"] { --tone: #8a90a8; opacity: 0.7; }

@keyframes evac-alarm {
  50% { background: rgba(255, 90, 74, 0.18); }
}

/* Side panel (facility / rover / bridge). Centred in the band below the menu buttons (--side-top) and never
   taller than it: on a short screen the body scrolls under the head, so the close button stays in reach. */
.vt-side {
  --side-top: 62px;
  --side-bottom: 14px;
  position: absolute;
  right: 14px;
  top: calc(var(--side-top) + (100% - var(--side-top) - var(--side-bottom)) / 2);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  width: 292px;
  max-height: calc(100% - var(--side-top) - var(--side-bottom));
  box-sizing: border-box;
  padding: 14px 15px 15px;
  pointer-events: auto;
  animation: vt-side-in 0.2s ease;
}

/* The padding gives a coached button's glow room inside the scroll box. */
.side-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 -8px -8px;
  padding: 0 8px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.side-body > .status + .buttons {
  margin-top: 2px;
}

@keyframes vt-side-in {
  from { opacity: 0; transform: translate(20px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}

.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
}

.side-head .vt-badge {
  --badge: var(--accent, var(--vt-cyan));
}

.vt-side h3 {
  margin: 0;
  font-family: var(--vt-font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vt-side .status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vt-muted);
}

.vt-side .status.ok { color: var(--vt-ok); }
.vt-side .status.bad { color: var(--vt-warn); }

.side-lore {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #b9c6e4;
}

.vt-btn.coach-pulse:not(:disabled) {
  animation: vt-coach-focus 1.4s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(61, 255, 197, 0.45);
}

.vt-side .stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  color: var(--vt-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.vt-side .stat b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--vt-font-display);
  font-weight: 600;
  color: var(--vt-text);
}

.vt-side .stat b .vt-icon {
  width: 14px;
  height: 14px;
}

.vt-side .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.side-priority {
  margin-top: 11px;
}

.side-list-label {
  margin-top: 10px;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--vt-text);
}

.side-list li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.side-list .vt-icon {
  width: 14px;
  height: 14px;
  color: var(--accent, var(--vt-cyan));
}

.sp-label {
  margin-bottom: 6px;
  font-family: var(--vt-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vt-muted);
}

.side-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}

.seg-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 7px 1px 6px;
  font-family: var(--vt-font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--vt-muted);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.seg-opt .vt-icon {
  width: 17px;
  height: 17px;
  color: var(--opt);
  opacity: 0.7;
}

.vt-side .vt-close {
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
}

.vt-side .vt-close .vt-icon {
  width: 15px;
  height: 15px;
}

/* Pause */
.pause-panel {
  width: min(420px, calc(88 * var(--vt-safe-vw)));
}

.pause-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 16px 0 16px;
}

.pause-stat {
  padding: 8px 10px 9px;
  background: rgba(255, 255, 255, 0.045);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.pause-stat .vt-tag {
  font-size: 9px;
  letter-spacing: 0.18em;
}

.pause-stat b {
  display: block;
  margin-top: 4px;
  font-family: var(--vt-font-display);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pause-ship {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -6px 0 16px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--vt-muted);
  background: rgba(255, 255, 255, 0.035);
  border-left: 2px solid var(--vt-cyan);
}

.pause-ship .vt-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--vt-cyan);
}

.pause-ship b {
  color: var(--vt-text);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-list > .vt-btn {
  justify-content: flex-start;
  width: 100%;
}

.menu-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 2px 0;
}

.menu-row .vt-tag {
  gap: 7px;
  white-space: nowrap;
}

.menu-row .vt-tag .vt-icon {
  width: 15px;
  height: 15px;
  color: var(--vt-cyan);
}

/* End screen */
.end-screen {
  width: min(540px, calc(90 * var(--vt-safe-vw)));
  text-align: center;
}

.end-screen .vt-badge.xl {
  margin: 2px auto 10px;
  --badge: var(--vt-ok);
}

.end-screen.defeat .vt-badge.xl {
  --badge: var(--vt-danger);
}

.end-screen .vt-tag {
  justify-content: center;
}

.end-screen h1 {
  margin: 8px 0 6px;
  font-family: var(--vt-font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
}

.end-screen.victory h1 {
  color: var(--vt-ok);
  text-shadow: 0 0 24px rgba(61, 255, 197, 0.55);
}

.end-screen.defeat h1 {
  color: var(--vt-danger);
  text-shadow: 0 0 24px rgba(255, 74, 90, 0.55);
}

.end-epilogue {
  margin: -2px auto 8px;
  max-width: 44ch;
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.5;
  color: #bfe9dc;
}

.end-screen .stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 10px;
}

.end-screen .stars .vt-icon {
  width: 34px;
  height: 34px;
  color: #ffd36a;
  filter: drop-shadow(0 0 10px rgba(255, 211, 106, 0.6));
}

.end-screen .stars .off {
  color: rgba(255, 255, 255, 0.18);
  filter: none;
}

.star-criteria {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--vt-dim);
}

.star-criteria li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.star-criteria .vt-icon {
  width: 13px;
  height: 13px;
}

.star-criteria li.ok {
  color: #ffe4a0;
}

.end-stats div.bad b {
  color: var(--vt-warn);
}

.end-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 16px 0 20px;
  text-align: left;
}

.end-stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 7px 11px;
  font-size: 13px;
  color: var(--vt-muted);
  background: rgba(255, 255, 255, 0.04);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.end-stats b {
  font-family: var(--vt-font-display);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--vt-text);
}

.end-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sideways and on desktops the result and the record sit side by side over the buttons, and each column
   scrolls on its own on a short screen, so the outcome, the XP and the buttons are always in view. */
@media (min-aspect-ratio: 5/4) and (min-width: 560px) {
  .end-screen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: 28px;
    box-sizing: border-box;
    width: min(960px, calc(95 * var(--vt-safe-vw) - 2px));
    overflow: hidden;
  }

  .end-main,
  .end-side {
    align-self: center;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .end-main {
    display: flex;
    flex-direction: column;
  }

  .end-side {
    container-type: inline-size;
  }

  .end-screen h1 { font-size: clamp(20px, 3.4 * var(--vt-safe-vw), 36px); }
  .end-side .end-xp { margin-top: 0; }
  .end-side .end-stats { margin-bottom: 0; }
  .end-actions { grid-column: 1 / -1; margin-top: 16px; }
}

.record-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 12px;
  font-family: var(--vt-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #ffe39a;
  background: rgba(255, 210, 90, 0.15);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.record-badge .vt-icon {
  width: 14px;
  height: 14px;
}

.end-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.end-badges:empty {
  display: none;
}

.record-badge.unlock {
  color: #b8ffe9;
  background: rgba(61, 255, 197, 0.14);
}

/* Rank and XP after a win (xpSection in Panels.js) */
.vt-insignia {
  display: block;
  flex: none;
  width: 44px;
  height: 44px;
  overflow: visible;
}

.end-xp {
  --rank: var(--vt-cyan);
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 10px 14px 11px;
  text-align: left;
  border-left: 2px solid var(--rank);
  background: linear-gradient(100deg, color-mix(in srgb, var(--rank) 13%, transparent), rgba(255, 255, 255, 0.025) 65%);
}

.ex-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ex-rank {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.end-screen .ex-rank .vt-tag {
  justify-content: flex-start;
  color: var(--rank);
}

.ex-rank b {
  font-family: var(--vt-font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.ex-gain {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-left: auto;
  font-family: var(--vt-font-display);
  color: #ffe39a;
}

.ex-gain b {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(255, 211, 106, 0.45);
}

.ex-gain span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.ex-bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

/* Fills from where the rank stood before the win (the start of the bar after a promotion). */
.ex-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--now);
  background: linear-gradient(90deg, color-mix(in srgb, var(--rank) 55%, #ffffff), var(--rank));
  box-shadow: 0 0 10px var(--rank);
  animation: ex-fill 1.4s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

@keyframes ex-fill {
  from { width: var(--was); }
}

.ex-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--vt-muted);
}

.ex-lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 18px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.3;
}

.ex-lines li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: var(--vt-text);
}

.ex-lines em {
  display: block;
  font-size: 11px;
  font-style: normal;
  color: var(--vt-dim);
}

.ex-lines b {
  font-family: var(--vt-font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #ffe39a;
}

@container (max-width: 260px) {
  .ex-lines { grid-template-columns: 1fr; }
}

.end-xp.promoted .vt-insignia {
  animation: ex-promote 0.9s 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) backwards;
  filter: drop-shadow(0 0 10px var(--rank));
}

@keyframes ex-promote {
  from { opacity: 0; transform: scale(0.3) rotate(-30deg); }
}

/* The launch special (launchSpecialCard in Panels.js) */
.end-offer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  padding: 11px 14px;
  text-align: left;
  border: 1px solid rgba(255, 211, 106, 0.45);
  background: linear-gradient(100deg, rgba(255, 211, 106, 0.16), rgba(255, 211, 106, 0.04));
}

.end-offer .vt-badge {
  --badge: #ffd36a;
}

.eo-text {
  display: grid;
  gap: 2px;
}

.end-screen .eo-text .vt-tag {
  justify-content: flex-start;
  color: #ffd36a;
}

.eo-text b {
  font-family: var(--vt-font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}

.eo-text p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--vt-muted);
}

.end-offer .vt-btn {
  white-space: nowrap;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .ex-bar i,
  .end-xp.promoted .vt-insignia { animation: none; }
}

/* Field manual */
.help-panel {
  width: min(860px, calc(88 * var(--vt-safe-vw)));
}

.help-cols {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 8px 32px;
}

.help-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px 14px;
  font-size: 13.5px;
}

.help-grid > span:nth-child(odd) {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  font-weight: 600;
}

.help-grid > span:nth-child(even) {
  color: var(--vt-muted);
}

.tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--vt-muted);
}

.tips li .vt-icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--vt-cyan);
}

.tips li b {
  color: var(--vt-text);
}

.vt-panel .vt-tag.section {
  margin: 4px 0 12px;
}

.help-cols + .vt-tag.section {
  margin-top: 22px;
}

.help-structures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.hs-card {
  --accent: var(--vt-cyan);
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  padding: 10px 12px 11px 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, transparent), rgba(255, 255, 255, 0.01));
  border-left: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
}

.hs-card .vt-badge {
  --badge: var(--accent);
}

.hs-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--vt-font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hs-title span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
}

.hs-card p {
  margin: 4px 0 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--vt-muted);
}

.hs-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Fact lists inside training briefings. */
.obj-facts {
  display: grid;
  gap: 3px;
  margin: 7px 0;
  padding: 0;
  list-style: none;
}

.obj-facts li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 3px 6px 3px 8px;
  border-left: 2px solid color-mix(in srgb, var(--coach, var(--vt-teal)) 55%, transparent);
  background: linear-gradient(90deg, rgba(61, 255, 197, 0.07), transparent 80%);
  font-size: 12px;
  line-height: 1.35;
}

.obj-facts.stack li {
  grid-template-columns: 1fr;
  gap: 1px;
}

.obj-facts b {
  font-family: var(--vt-font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.obj-facts span {
  color: #c9d6f0;
}

/* Screen effects */
.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  opacity: 0;
}

.screen-vignette {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(255, 30, 40, 0.3) 100%);
  opacity: 0;
}

/* Pulsing opacity rather than the gradient keeps the full-screen layer from repainting every frame. */
.screen-vignette.critical {
  animation: vt-vignette 1.2s ease-in-out infinite;
}

@keyframes vt-vignette {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ------------------------------------------------------------ Responsive */
@media (pointer: coarse) {
  .vt-plate,
  .toast,
  .hud-mission,
  .hud-raid {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .vt-plate,
  .toast {
    --vt-plate: rgba(8, 11, 30, 0.9);
  }
}

@media (max-width: 1100px) {
  .hud-objective { width: 236px; }
  .hud-minimap { width: 144px; height: 144px; }
  .hud-bottom { --bottom-r: 166px; }
  .hud-objective.coach .objective-body { max-height: calc(100 * var(--vt-safe-vh) - 388px); }
}

@media (max-width: 900px), (max-height: 620px) {
  .hud-resources { top: 10px; left: 10px; width: 184px; padding: 8px 10px 8px 9px; gap: 5px; }
  .hud-resources > .vt-tag { display: none; }
  .res-row { grid-template-columns: 26px 1fr; column-gap: 8px; }
  .res-row .vt-badge { width: 26px; height: 22px; }
  .res-row .vt-badge .vt-icon { width: 14px; height: 14px; }
  .res-name { font-size: 9.5px; letter-spacing: 0.14em; }
  .res-count { font-size: 14px; }
  .res-bar { margin-top: 3px; height: 4px; }
  .res-meta { padding-top: 6px; gap: 4px; }
  .res-chip { font-size: 11px; padding: 2px 6px 2px 5px; }
  .res-chip .vt-icon { width: 12px; height: 12px; }
  .res-fleet { padding-top: 5px; gap: 3px; }
  .fleet-tag span { display: none; }
  .fleet-opt { width: 27px; height: 21px; }
  .fleet-opt .vt-icon { width: 13px; height: 13px; }
  .res-reserve { margin-top: 3px; font-size: 9.5px; gap: 4px; }
  .res-reserve b { font-size: 10.5px; }
  .res-reserve .vt-icon { width: 10px; height: 10px; }
  .res-alert { font-size: 10.5px; padding: 4px 7px 4px 6px; }
  .hud-objective.coach { width: 262px; }
  .hud-objective.coach .objective-body { max-height: calc(100 * var(--vt-safe-vh) - 330px); font-size: 12px; line-height: 1.45; }
  .hud-mission { --slant: 22px; --mission-w: 316px; --mission-l: 200px; --mission-r: 142px; padding: 5px 30px 7px; grid-template-columns: 30px minmax(0, 1fr) 36px; column-gap: 8px; }
  .mission-wing { padding: 2px; }
  .mission-wing.glyph canvas { width: 26px; height: 26px; }
  .mission-wing.tremor canvas { width: 32px; height: 18px; }
  .mission-wing.tremor span { display: none; }
  .mission-timer { font-size: 23px; gap: 6px; }
  .stability { margin-top: 3px; gap: 6px; }
  .stability-count { font-size: 9.5px; }
  .res-meter { width: 20px; height: 4px; }
  .hud-visor { display: none; }
  .tag-more,
  .obj-from span { display: none; }
  .action-btn .led { top: 4px; left: 5px; width: 4px; height: 4px; }
  .toast-chan { font-size: 8.5px; padding-right: 8px; }
  .hud-menu { top: 10px; right: 54px; gap: 6px; }
  .sound-toggle { top: calc(10px + var(--vt-safe-t)); right: calc(10px + var(--vt-safe-r)); }
  .hud-objective { top: 56px; right: 10px; width: 212px; padding: 8px 11px 9px 14px; }
  .objective-title { font-size: 13.5px; margin-top: 4px; }
  .objective-hint { display: none; }
  .hud-minimap { width: 116px; height: 116px; right: 10px; bottom: 10px; }
  .hud-bottom { --bottom-l: 200px; --bottom-r: 132px; bottom: 10px; }
  .hud-actions { padding: 5px; gap: 5px; }
  .action-btn { min-width: 60px; height: 52px; padding: 5px 7px 4px; gap: 3px; }
  .action-btn .icon .vt-icon { width: 20px; height: 20px; }
  .action-btn .name { font-size: 9.5px; letter-spacing: 0.1em; }
  .action-btn kbd { display: none; }
  .hud-toasts { top: 58px; }
  .toast { font-size: 13px; padding: 6px 14px 7px 7px; }
  .vt-panel-body { padding: 16px 18px 18px; }
  .vt-panel h2 { font-size: 20px; }
  .vt-side { --side-top: 56px; --side-bottom: 10px; right: 10px; width: 250px; padding: 12px 13px 13px; }
  /* Actions first, then the fleet setting and the description, so Build rover and the like stay in view
     without scrolling. */
  .side-priority { order: 1; }
  .side-lore { order: 2; margin: 10px 0 0; }
  .hud-evac { left: 10px; bottom: 10px; width: 184px; padding: 7px 9px 8px; gap: 5px; }
  .evac-head .vt-tag { font-size: 9.5px; }
  .evac-clock { font-size: 9.5px; letter-spacing: 0.12em; gap: 6px; }
  .evac-clock b { font-size: 15px; }
  .evac-row { padding: 3px 6px 3px 4px; column-gap: 6px; }
  .evac-name { font-size: 11px; }
  .evac-line { font-size: 9px; }
}

@media (max-height: 480px) {
  .hud-resources .res-meta { display: none; }
  .res-reserve span { display: none; }
  .vt-side { padding: 10px 12px 11px; }
  .vt-side .vt-close { top: 7px; right: 7px; }
  .vt-side .status { margin: 6px 0 7px; font-size: 12px; line-height: 1.35; }
  .vt-side .stat { padding: 3px 0; font-size: 12px; }
  .vt-side .buttons { margin-top: 9px; }
  .seg-opt { padding: 5px 1px 4px; }
  .seg-opt .vt-icon { width: 15px; height: 15px; }
  /* Short landscape phones: the directive moves to the free bottom-left corner beside the action bar
     (500px: the bar, the minimap and the gaps around them). */
  #hud { --corner-w: min(200px, calc(100 * var(--vt-safe-vw) - 500px)); }
  .hud-objective { top: auto; bottom: 10px; left: 10px; right: auto; width: var(--corner-w); padding: 6px 10px 7px 13px; }
  .hud-bottom { --bottom-l: calc(16px + var(--corner-w)); }
  .hud-objective .vt-tag { font-size: 9px; }
  .objective-title { font-size: 12.5px; margin-top: 2px; }
  /* One line, so the evacuation panel stacked above always clears it. */
  .hud-objective:not(.coach) .objective-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  /* The coach needs more room than the corner offers: it takes the top-right column and drops the long text. */
  .hud-objective.coach { display: block; top: 52px; bottom: auto; left: auto; right: 10px; width: 236px; }
  .hud-objective.coach .objective-body { display: none; }
  .hud-objective.coach .objective-hint { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; }
  .hud-objective.coach.briefing .objective-next { margin-top: 7px; }
  .hud-objective .skip-more { display: none; }
  .hud-mission { padding: 4px 28px 6px; }
  .mission-wing.glyph canvas { width: 24px; height: 24px; }
  .mission-wing.tremor canvas { width: 30px; height: 16px; }
  .mission-timer { font-size: 20px; }
  .obj-track { margin-top: 5px; }
  .toast-chan { display: none; }
  /* Toasts keep to the band between the supply readout and the right column, wrapping when they must. */
  .hud-toasts { top: 52px; gap: 4px; left: 202px; right: 202px; width: auto; max-width: 480px; margin: 0 auto; transform: none; }
  #hud:has(> .hud-objective.coach:not(.vt-hidden)) .hud-toasts { right: 254px; }
  .toast { padding: 4px 12px 5px 5px; font-size: 12px; }
  .toast-icon { width: 22px; height: 22px; }
  .hud-toasts .toast:nth-last-child(n + 3) { display: none; }
  .vt-panel { max-height: calc(96 * var(--vt-safe-vh)); }
  .vt-panel-body { padding: 12px 16px 14px; }
  .vt-panel .subtitle { margin: 6px 0 10px; font-size: 13px; }
  .panel-head .vt-badge.lg { width: 38px; height: 33px; }
  .build-card .desc,
  .build-card .tip { display: none; }
  .build-card, .upgrade-card { padding: 10px 12px; gap: 7px; }
  .end-screen .vt-badge.xl { display: none; }
  /* The epilogue goes last, so a short screen cuts the story rather than the stars and unlock badges. */
  .end-main .end-epilogue { order: 1; margin: 6px auto 0; }
  .end-actions .vt-btn.short-icon > span { display: none; }
  .end-screen h1 { margin: 6px 0 4px; letter-spacing: 0.08em; }
  .end-screen .subtitle { font-size: 12.5px; line-height: 1.45; }
  .end-epilogue { max-width: none; margin-bottom: 6px; font-size: 11.5px; }
  .end-screen .stars { margin: 4px 0 6px; gap: 8px; }
  .end-screen .stars .vt-icon { width: 24px; height: 24px; }
  .star-criteria { gap: 3px 10px; margin-bottom: 8px; font-size: 11px; }
  .end-xp { gap: 5px; padding: 8px 12px 9px; }
  .end-xp .vt-insignia { width: 34px; height: 34px; }
  .ex-rank b { font-size: 15px; }
  .ex-gain b { font-size: 20px; }
  .ex-lines { gap: 2px 14px; font-size: 11.5px; }
  .ex-lines em { display: none; }
  .end-offer { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 8px; padding: 8px 12px; }
  .end-offer .vt-badge { display: none; }
  .eo-text b { font-size: 13px; }
  .eo-text p,
  .eo-more { display: none; }
  .end-stats { gap: 4px; margin: 8px 0 10px; }
  .end-stats div { padding: 4px 9px; font-size: 11.5px; }
  .end-stats b { font-size: 13px; }
  .end-actions { gap: 8px; }
  .end-screen .end-actions { margin-top: 10px; }
  .end-actions .vt-btn { min-height: 38px; padding-block: 6px; }
  /* Stacked above the directive in the bottom-left corner, one line per colony. */
  .hud-evac { bottom: 80px; padding: 5px 8px 6px; gap: 3px; }
  .evac-clock { padding: 2px 6px 2px 5px; }
  .evac-clock b { font-size: 13px; }
  .evac-ship,
  .evac-line { display: none; }
  .evac-row { padding: 2px 6px 2px 3px; }
  .evac-row .vt-badge { grid-row: auto; width: 20px; height: 17px; }
}

@media (max-height: 480px) and (max-width: 720px) {
  /* No room in the corner, so the directive keeps the top-right column the coach uses in training. */
  .hud-objective { top: 52px; bottom: auto; left: auto; right: 10px; width: 236px; }
  #hud:has(> .hud-objective:not(.done)) .hud-toasts { right: 254px; }
  /* Squeezed into the corner left of the action bar: headcount, countdown and colonies only. Under 618px of
     HUD (the bar, the minimap and the panel's least width) the corner can't hold it, so it stays stacked
     above. --narrow is hugely positive or hugely negative, so each clamp() below lands on one of its ends. */
  #hud {
    --corner-w: max(128px, calc(50 * var(--vt-safe-vw) - 187px));
    --narrow: calc((618px - 100 * var(--vt-safe-vw)) * 1000);
  }
  .hud-evac { bottom: clamp(10px, var(--narrow), 80px); width: var(--corner-w); }
  .hud-bottom { --bottom-l: clamp(16px, calc(-1 * var(--narrow)), calc(16px + var(--corner-w))); }
  .evac-head .vt-tag,
  .evac-clock-label { display: none; }
  .evac-head { justify-content: flex-end; }
  .evac-clock { grid-template-columns: 14px 1fr; }
  .evac-clock b { justify-content: flex-end; }
  .evac-name { font-size: 10.5px; }
}

/* The shortest phones: the supply readout drops its reserve lines and the minimap shrinks, so the evacuation
   panel stacked under the readout and the coach above the minimap both clear them. */
@media (max-height: 340px) {
  .res-reserve { display: none; }
  .hud-minimap { width: 96px; height: 96px; }
  .hud-bottom { --bottom-r: 112px; }
}

/* Narrow screens: the gauge must fit between the supply panel and the menu. */
@media (max-width: 760px) {
  .hud-mission { --mission-w: min(256px, calc(100 * var(--vt-safe-vw) - 342px)); padding: 4px 26px 6px; grid-template-columns: 24px minmax(0, 1fr) 28px; column-gap: 6px; }
  .mission-wing { padding: 2px; }
  .mission-wing.glyph canvas { width: 20px; height: 20px; }
  .mission-wing.tremor canvas { width: 24px; height: 14px; }
}

@media (orientation: portrait) and (max-width: 600px) {
  .hud-mission {
    left: 0;
    transform: none;
    width: calc(100 * var(--vt-safe-vw) - 150px);
    padding: 5px 26px 7px 12px;
    grid-template-columns: 28px minmax(0, 1fr);
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
  }
  .mission-wing.glyph canvas { width: 24px; height: 24px; }
  .mission-wing.tremor { display: none; }
  .toast-chan { display: none; }
  .hud-mission::before {
    clip-path: polygon(evenodd,
      0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%, 0 0,
      0 calc(100% - 1px), calc(100% - var(--slant) - 0.7px) calc(100% - 1px), calc(100% - 1.4px) 0, 0 0);
  }
  .hud-mission::after { left: 14px; right: calc(var(--slant) + 14px); }
  .hud-menu { right: 54px; }
  .hud-resources { top: 64px; }
  .hud-objective { top: 64px; width: calc(100 * var(--vt-safe-vw) - 214px); }
  /* Left column beside the minimap, below the supply readout. */
  .hud-toasts { top: 244px; left: 10px; transform: none; align-items: flex-start; width: calc(100 * var(--vt-safe-vw) - 144px); }
  .hud-toasts .toast:nth-last-child(n + 4) { display: none; }
  .hud-bottom { left: 8px; right: 8px; bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .hud-actions { width: 100%; box-sizing: border-box; }
  .action-btn { flex: 1; min-width: 0; }
  .hud-progress { width: min(300px, 100%); }
  .hud-prompt { white-space: normal; }
  .hud-minimap { width: 104px; height: 104px; right: 10px; top: 154px; bottom: auto; }
  /* Under the minimap: icons, headcounts and countdowns only. */
  .hud-evac { left: auto; right: 10px; bottom: auto; top: 268px; width: 124px; padding: 6px 7px 7px; }
  .evac-head .vt-tag,
  .evac-name,
  .evac-clock-label,
  .evac-ship-label { display: none; }
  .evac-head { justify-content: flex-end; }
  .evac-clock { grid-template-columns: 14px 1fr; padding: 3px 6px; }
  .evac-clock b { justify-content: flex-end; font-size: 14px; }
  .evac-ship { grid-template-columns: 14px 1fr auto; }
  .evac-row { grid-template-columns: 20px minmax(0, 1fr); }
  .evac-row .vt-badge { grid-row: span 2; width: 20px; height: 17px; }
  .evac-count { text-align: right; }
  .evac-line { grid-column: 2; font-size: 8.5px; letter-spacing: 0.04em; }
  .hud-placement { bottom: 150px; width: calc(100 * var(--vt-safe-vw) - 20px); box-sizing: border-box; }
  .vt-side { left: 10px; right: 10px; width: auto; top: auto; bottom: 150px; transform: none; max-height: 45vh; animation: none; }
  /* The coach sits above the action bar and gives way to the side sheet and placement controls there. */
  .hud-objective.coach { top: auto; bottom: 150px; left: 10px; right: 10px; width: auto; }
  /* Opaque, because a long briefing covers the evacuation column. */
  #hud .hud-objective.coach { background-color: rgb(8, 11, 30); }
  /* A long briefing scrolls inside the card rather than climbing over the minimap. */
  .hud-objective.coach .objective-body { max-height: calc(100 * var(--vt-safe-vh) - 556px); }
  .hud-objective.coach.yield { display: none; }
  .help-cols { grid-template-columns: 1fr; }
  .pause-stats { grid-template-columns: 1fr 1fr 1fr; }
}
