[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --ink: #e9e4d6;
  --ink-dim: #b9b29f;
  --accent: #c9a24a;
  --danger: #c4513f;
  --panel: rgba(18, 19, 16, 0.82);
  --panel-edge: rgba(201, 162, 74, 0.35);
  --font: 'Barlow', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  /* Condensed capitals for titles, tabs and buttons, as in the original game. */
  --cond: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --amber: #e2ac46;
  --own: #5b8fd6;
  --enemy: #d0574a;
  --mono: 'Consolas', 'SFMono-Regular', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0d0e0c;
  color: var(--ink);
  font-family: var(--font);
  user-select: none;
  -webkit-user-select: none;
}

#app {
  position: fixed;
  inset: 0;
}

canvas.game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Loading screen */
.loading {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding-block: 5vh 4vh;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(ellipse at 50% 30%, #23241d 0%, #0d0e0c 72%);
  transition: opacity 0.6s;
}
.ld-head { text-align: center; }
.ld-kind { font-family: var(--cond); font-size: 14px; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase; color: var(--amber); }
.loading h1 { margin: 4px 0 10px; font-family: var(--cond); font-size: clamp(30px, 6vw, 68px); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.ld-sides { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; }
.ld-sides > b { font-family: var(--cond); font-size: 16px; letter-spacing: 0.2em; color: var(--ink-dim); text-transform: uppercase; }
.ld-army { display: flex; align-items: center; gap: 10px; font-family: var(--cond); font-size: 20px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ld-army .ico { width: 34px; height: 34px; }
.ld-army small { display: block; font-family: var(--font); font-size: 11px; font-weight: 400; letter-spacing: 0.12em; color: var(--ink-dim); }
.ld-map { min-height: 0; display: flex; justify-content: center; }
.ld-map canvas { height: 100%; aspect-ratio: 1; max-width: 100%; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); background: #20231c; }
.ld-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ld-tip { width: min(720px, 100%); display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; background: rgba(13, 14, 12, 0.8); border: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.ld-tip b { font-family: var(--cond); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); }
.loading .bar {
  width: min(720px, 100%);
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.loading .bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #b98a35, var(--amber));
  transition: width 0.25s;
}
.loading .status {
  font-size: 12px;
  color: var(--ink-dim);
  font-family: var(--mono);
}
.loading.done {
  opacity: 0;
  pointer-events: none;
}

.error-box {
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 12px 16px;
  background: rgba(120, 20, 10, 0.9);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  z-index: 100;
  max-height: 40vh;
  overflow: auto;
}

/* ------------------------------------------------------------------ HUD */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: var(--font);
  color: var(--ink);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  z-index: 10;
}
.hud-compass {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 300px;
  height: 22px;
  margin-left: -150px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.hud-compass .strip {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  font-size: 11px;
  will-change: transform;
}
.hud-compass .strip span {
  display: inline-block;
  width: 30px;
  text-align: center;
  color: var(--ink-dim);
}
.hud-compass .strip b {
  color: var(--ink);
  font-size: 13px;
}
.hud-compass .strip i {
  font-style: normal;
  font-size: 9px;
}
.hud-compass .needle {
  position: absolute;
  left: 149px;
  bottom: 0;
  width: 2px;
  height: 6px;
  background: var(--accent);
}
.hud-objectives {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  font-size: 12px;
}
.hud-objectives .obj {
  min-width: 34px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
}
.hud-objectives .obj.us { border-color: #6fa0d8; color: #9cc4f0; }
.hud-objectives .obj.them { border-color: #d0604e; color: #f0a090; }
.hud-objectives .obj .p { height: 3px; margin-top: 2px; background: currentColor; }
.hud-killfeed {
  position: absolute;
  top: 14px;
  right: 16px;
  text-align: right;
  font-size: 12px;
  line-height: 1.6;
}
.hud-killfeed .w { color: var(--ink-dim); }
.hud-killfeed .h { color: var(--accent); }
.hud-msg {
  position: absolute;
  bottom: 26%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.05em;
  opacity: 0;
}
.hud-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(760px, 90vw);
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
  opacity: 0;
}
.hud-center {
  position: absolute;
  left: 50%;
  top: 50%;
}
.hud-center .hitmark {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  opacity: 0;
  background:
    linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.85) 45%, rgba(255, 255, 255, 0.85) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, rgba(255, 255, 255, 0.85) 45%, rgba(255, 255, 255, 0.85) 55%, transparent 55%);
  mask-image: radial-gradient(circle, transparent 30%, #000 31%);
  -webkit-mask-image: radial-gradient(circle, transparent 30%, #000 31%);
}
.hud-center .hitmark.kill { filter: sepia(1) saturate(6) hue-rotate(-30deg); }
/* A kill: a small line under the sights that fades. */
.hud-kill {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 44px);
  text-align: center;
  font-family: var(--cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  opacity: 0;
  pointer-events: none;
}
.hud-kill .n { color: var(--ink); font-weight: 600; }
.hud-kill .h,
.hud-kill .p { color: var(--amber); }
.hud-kill .x { color: var(--ink-dim); font-size: 12px; }
.hud-kill.pop { animation: hud-kill-pop 0.22s ease-out; }
@keyframes hud-kill-pop {
  from { transform: translateY(5px) scale(0.96); }
  to { transform: none; }
}
/* Next to a vehicle on foot: the key that gets you in. */
.hud-use {
  position: absolute;
  left: 50%;
  top: calc(50% + 70px);
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  font-size: 13px;
  white-space: nowrap;
}
.hud-use .k { min-width: 18px; padding: 1px 6px; border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); font-weight: 700; text-align: center; }
/* Hip-fire crosshair: --gap is set each frame from the spread of the shots. */
.hud-cross {
  --gap: 12px;
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  opacity: 0;
}
.hud-cross i {
  position: absolute;
  background: rgba(240, 235, 218, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.hud-cross .t,
.hud-cross .b {
  left: -1px;
  width: 2px;
  height: 8px;
}
.hud-cross .l,
.hud-cross .r {
  top: -1px;
  width: 8px;
  height: 2px;
}
.hud-cross .t { top: calc(-1 * var(--gap) - 8px); }
.hud-cross .b { top: var(--gap); }
.hud-cross .l { left: calc(-1 * var(--gap) - 8px); }
.hud-cross .r { left: var(--gap); }
.hud-cross .c {
  left: -1px;
  top: -1px;
  width: 2px;
  height: 2px;
}
.hud-left {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 210px;
  font-size: 11px;
}
.hud-left .bar {
  height: 5px;
  background: rgba(0, 0, 0, 0.45);
  margin: 3px 0 2px;
}
.hud-left .fill {
  height: 100%;
  background: #c9c2a5;
  transition: width 0.15s;
}
.hud-stamina .fill { background: #8a9b6a; }
.hud-left .label { color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
.hud-left .bleed { display: none; margin-left: 8px; color: #e06450; font-weight: 600; }
.hud-stance { margin-top: 6px; color: var(--ink-dim); }
.hud-right {
  position: absolute;
  right: 18px;
  bottom: 18px;
  text-align: right;
}
.hud-weapon { font-size: 13px; color: var(--ink-dim); letter-spacing: 0.05em; }
.hud-ammo { font-family: var(--mono); }
.hud-ammo .loaded { font-size: 34px; font-weight: 700; }
.hud-ammo .reserve { font-size: 14px; color: var(--ink-dim); }
.hud-mode { font-size: 11px; color: var(--ink-dim); }
/* Through a scope: over the black round the eyepiece, and easier to read. */
.hud.scoped .hud-right, .hud.scoped .hud-left, .hud.scoped .hud-msg { z-index: 1; }
.hud.scoped .hud-mode { font-size: 13px; color: var(--ink); }
.hud-scope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}
/* Hurt: red round all the edges of the screen, over a scope's black too (hud.js). */
.hud-hurt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 20vmin 7vmin rgba(205, 18, 8, 0.85);
}
/* Marks pointing where shots at you came from (drawn in hud.js). */
.hud-shots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hud-dead {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(ellipse at center, rgba(40, 0, 0, 0.15), rgba(0, 0, 0, 0.6));
}
.hud-dead .title { font-size: 28px; letter-spacing: 0.2em; text-transform: uppercase; }
.hud-dead .by, .hud-dead .hint { color: var(--ink-dim); font-size: 13px; }
.hud-deploy {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 70px 18px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(ellipse at center, rgba(30, 6, 4, 0.35), rgba(6, 6, 5, 0.82));
  pointer-events: auto;
  animation: br-in 0.5s ease-out;
}
.dp-head { text-align: center; }
.dp-title { font-family: var(--cond); font-size: 30px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.dp-by { font-size: 13px; color: var(--ink-dim); }
.dp-body { flex: 1; min-height: 0; display: flex; justify-content: center; gap: 14px; }
.dp-mapbox { flex: 0 1 auto; min-width: 0; height: 100%; aspect-ratio: 1; max-width: calc(100% - 310px); }
.dp-map { display: block; width: 100%; height: 100%; border: 1px solid rgba(255, 255, 255, 0.12); background: #20231c; cursor: pointer; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.dp-side { width: 290px; flex: none; display: flex; flex-direction: column; gap: 8px; padding: 14px; background: rgba(13, 14, 12, 0.88); border: 1px solid rgba(255, 255, 255, 0.08); min-height: 0; }
.dp-side h3 { margin: 0 0 4px; font-family: var(--cond); font-size: 15px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.dp-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.dp-opt { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.dp-opt.on { background: rgba(226, 172, 70, 0.18); border-color: rgba(226, 172, 70, 0.6); }
.dp-opt b { font-family: var(--cond); font-size: 18px; }
.dp-opt span { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-opt em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.dp-keys { margin-top: auto; font-size: 11px; color: var(--ink-dim); line-height: 1.45; }
.dp-go:disabled { filter: grayscale(0.7) brightness(0.7); cursor: default; }
@media (max-width: 760px) {
  .dp-body { flex-direction: column; align-items: center; }
  .dp-mapbox { max-width: 100%; height: auto; width: min(100%, 52vh); }
  .dp-side { width: min(100%, 420px); }
}
/* The battle map (the map key): over the battle, which goes on round it. */
.hud-map { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; padding: 56px 16px 16px; background: rgba(6, 6, 5, 0.45); }
.hud-map .mp-box { position: relative; height: 100%; aspect-ratio: 1; max-width: 100%; }
.mp-map { display: block; width: 100%; height: 100%; border: 1px solid rgba(255, 255, 255, 0.12); background: #20231c; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.mp-key { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; font-size: 11px; color: var(--ink); background: rgba(13, 14, 12, 0.7); }
.range-card {
  position: absolute;
  right: 18px;
  top: 60px;
  width: 230px;
  padding: 10px 12px;
  background: rgba(14, 15, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.5;
}
.range-card h3 { margin: 0 0 4px; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); }
.range-card .row { display: flex; justify-content: space-between; }
.range-card .row span:last-child { font-family: var(--mono); }

/* Vehicles */
.hud-vehicle {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 300px;
  text-align: right;
  font-size: 11px;
  display: none;
}
.hud-vehicle .vname { font-size: 13px; letter-spacing: 0.05em; color: var(--ink-dim); }
.hud-vehicle .vrow { display: flex; justify-content: flex-end; gap: 12px; font-family: var(--mono); }
.hud-vehicle .vspeed { font-size: 26px; font-weight: 700; }
.hud-vehicle .vgear { font-size: 14px; align-self: flex-end; padding-bottom: 4px; color: var(--ink-dim); }
.hud-vehicle .bar { height: 4px; background: rgba(0, 0, 0, 0.45); margin: 3px 0; }
.hud-vehicle .fill { height: 100%; background: #c9c2a5; margin-left: auto; }
.hud-vehicle .vwarn { color: #e0a04a; font-weight: 600; letter-spacing: 0.04em; margin: 3px 0 0; display: none; }
.hud-vehicle .vwarn.crit { color: #ff6b52; font-size: 14px; font-weight: 700; text-transform: uppercase; text-shadow: 0 0 6px rgba(0, 0, 0, 0.8); animation: hud-crit 0.8s ease-in-out infinite alternate; }
.hud-vehicle .hp.crit .fill { animation: hud-crit 0.8s ease-in-out infinite alternate; }
@keyframes hud-crit { from { opacity: 1; } to { opacity: 0.35; } }
.hud-vehicle .vmods { color: #e06450; font-weight: 600; margin: 4px 0; }
.hud-vehicle .vgun { white-space: pre-line; font-family: var(--mono); margin-top: 6px; }
.hud-vehicle .vseat { margin-top: 6px; color: var(--ink-dim); }
.hud-gunmark {
  position: absolute;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(230, 120, 90, 0.85);
  border-radius: 50%;
  display: none;
  pointer-events: none;
}
.hud-gunmark.ready { border-color: rgba(220, 220, 200, 0.9); }
.hud-tankdir {
  position: absolute;
  left: 18px;
  bottom: 110px;
  width: 54px;
  height: 54px;
  display: none;
}
.hud-tankdir .hull {
  position: absolute;
  left: 15px;
  top: 6px;
  width: 24px;
  height: 42px;
  border: 2px solid rgba(220, 215, 195, 0.8);
  border-radius: 3px;
}
.hud-tankdir .turret {
  position: absolute;
  left: 26px;
  top: 4px;
  width: 3px;
  height: 24px;
  background: rgba(230, 190, 120, 0.95);
  transform-origin: 50% 100%;
}

/* Assault: capture points and timer at the top, over the deploy screen. The
   points show only with the scoreboard (Tab); see Hud._updateScores. */
.assault-bar {
  position: absolute;
  z-index: 9;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.assault-bar .timer { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: 0.05em; }
.assault-bar .pts { display: none; align-items: center; gap: 2px; font-size: 10px; }
.assault-bar.show-pts .pts { display: flex; }
.assault-bar .pts b { color: var(--ink-dim); margin: 0 5px; font-weight: 400; }
.assault-bar .pt {
  position: relative;
  min-width: 24px;
  padding: 2px 3px;
  text-align: center;
  font-family: var(--mono);
  border: 1px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.assault-bar .pt.own { background: rgba(70, 110, 160, 0.75); }
.assault-bar .pt.enemy { background: rgba(160, 60, 50, 0.75); }
.assault-bar .pt.neutral { background: rgba(120, 120, 110, 0.6); }
.assault-bar .pt.obj { min-width: 30px; font-weight: 700; border-color: rgba(255, 230, 160, 0.7); }
.assault-bar .pt.contested { box-shadow: 0 0 0 2px rgba(255, 210, 80, 0.85); }
.assault-bar .pt i { position: absolute; left: 0; bottom: 0; height: 3px; background: #f0d080; }
.assault-result {
  position: absolute;
  inset: 0;
  z-index: 9; /* (the bar's level: coming later, it covers the bar) */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 8, 0.55);
}
.assault-result .title { font-size: 54px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.assault-result .why { margin-top: 8px; font-size: 16px; }
.assault-result .hint { margin-top: 18px; color: var(--ink-dim); }

/* ------------------------------------------------------------------ menus */
.pause button, .fe-settings-box button {
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 14px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.pause button:hover, .fe-settings-box button:hover { background: rgba(201, 162, 74, 0.18); }
.pause button:focus-visible, .pause input:focus-visible, .fe input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pause {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 6, 0.55);
}
.pause .box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
  max-width: min(640px, calc(100% - 32px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
}
.pause h2 { margin: 0 0 8px; font-family: var(--cond); font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; font-size: 24px; text-align: center; }
.pause-home button { padding: 11px 14px; font-family: var(--cond); font-size: 17px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.pause-home .leave:hover { border-color: rgba(208, 87, 74, 0.7); background: rgba(208, 87, 74, 0.12); }
.pause .box.wide { width: min(680px, calc(100% - 32px)); }
.pause-home { display: flex; flex-direction: column; gap: 8px; }
.pause-tip { margin-top: 4px; text-align: center; font-size: 11px; color: var(--ink-dim); letter-spacing: 0.04em; }
/* After Esc closes the menu: the battle waits for a click or a key. */
.pause-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pause-wait > div { padding: 12px 18px; background: rgba(13, 14, 12, 0.9); border: 1px solid rgba(255, 255, 255, 0.1); font-family: var(--cond); font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; }

/* Settings pages (main menu and pause menu). */
.set-view .row { margin: 0 0 14px; }
.set-view .row > label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-dim); margin-bottom: 6px; }
.set-view .choices { display: flex; flex-wrap: wrap; gap: 4px; }
.set-view .note { margin-top: 5px; font-size: 12px; color: var(--ink-dim); line-height: 1.45; }
.set-view input[type='range'] { width: 100%; accent-color: var(--accent); }
.set-view button.on { background: rgba(201, 162, 74, 0.3); border-color: var(--accent); }
.set-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--panel-edge); }
.set-view .set-back { padding: 5px 10px; flex: none; }
.set-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.set-trail .sep { color: var(--ink-dim); }
.set-trail .here { color: var(--accent); }
.set-view .set-trail .crumb { padding: 0; border: 0; background: none; color: var(--ink-dim); text-transform: inherit; letter-spacing: inherit; font-size: inherit; }
.set-view .set-trail .crumb:hover { color: var(--ink); background: none; text-decoration: underline; }
.set-view .set-link { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; width: 100%; margin: 0 0 8px; padding: 10px 12px; text-align: left; }
.set-link .t { grid-column: 1; font-size: 15px; letter-spacing: 0.06em; }
.set-link .s { grid-column: 1; min-width: 0; margin-top: 3px; font-size: 12px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
.set-link .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 22px; color: var(--accent); }
.set-view .set-intro { margin: 0 0 14px; }
.set-view .set-group { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink); }
.set-notice { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 10px; background: rgba(201, 162, 74, 0.12); font-size: 13px; }
.set-notice span { flex: 1; min-width: 0; }
.set-view .set-notice button { padding: 4px 10px; }
.keys-table { display: flex; flex-direction: column; }
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 132px; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.key-row .key-fixed { grid-column: 2 / span 2; font-family: var(--mono); font-size: 13px; color: var(--ink-dim); padding-left: 2px; }
.key-name { font-size: 13px; min-width: 0; }
.key-note { font-size: 11px; color: var(--ink-dim); margin-top: 1px; }
.set-view .key-box { width: 100%; padding: 6px 8px; font-family: var(--mono); font-size: 13px; letter-spacing: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-view .key-box.empty { color: var(--ink-dim); border-style: dashed; }
.set-view .key-box:disabled { opacity: 0.35; cursor: default; }
.set-view .key-box.wait { border-color: var(--accent); background: rgba(201, 162, 74, 0.25); color: var(--ink); animation: key-wait 1s ease-in-out infinite alternate; }
@keyframes key-wait { from { background: rgba(201, 162, 74, 0.12); } to { background: rgba(201, 162, 74, 0.32); } }
.set-view .set-reset { margin-top: 16px; }
@media (max-width: 520px) {
  .key-row { grid-template-columns: 1fr 1fr; }
  .key-name { grid-column: 1 / span 2; }
  .key-row .key-fixed { grid-column: 1 / span 2; }
}
.set-view .set-head { margin: 18px 0 10px; padding-bottom: 4px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--panel-edge); }
.set-view .set-head:first-child { margin-top: 0; }
.set-view .custom-tag { align-self: center; margin-left: 6px; font-size: 12px; color: var(--accent); }
.set-view .set-group { margin: 16px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink); }
.set-view .fps-now { color: var(--ink); }

/* Scoreboard (Tab), over the deploy screen too */
.hud-scores {
  position: absolute;
  z-index: 9;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 16px;
  width: min(760px, calc(100% - 32px));
}
.hud-scores .side { flex: 1; background: var(--panel); border: 1px solid var(--panel-edge); padding: 8px 10px; }
/* (Over the deploy screen: solid, so its map and list don't show through.) */
.hud.deploying .hud-scores .side { background: rgba(14, 15, 12, 0.96); }
.hud-scores .side.own h3 { color: #8fb4e0; }
.hud-scores .side.enemy h3 { color: #e08a7a; }
.hud-scores h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.hud-scores table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hud-scores th { text-align: left; color: var(--ink-dim); font-weight: 400; font-size: 10px; text-transform: uppercase; }
.hud-scores td, .hud-scores th { padding: 2px 4px; }
.hud-scores td:not(:first-child), .hud-scores th:not(:first-child) { text-align: right; font-family: var(--mono); }
.hud-scores tr.me td { color: var(--accent); font-weight: 700; }
.hud-scores tr.dead td { opacity: 0.55; }

/* ------------------------------------------------------------------ front end */
.fe {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #0d0e0c;
  color: var(--ink);
}
/* On the Heroes screen the soldier stands in the game's canvas behind: the middle
   stays clear, the edges darken. */
.fe.stage { background: radial-gradient(ellipse 60% 75% at 50% 52%, rgba(10, 11, 9, 0) 0%, rgba(10, 11, 9, 0.35) 62%, rgba(8, 9, 7, 0.88) 100%); }
.fe .ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: none; }
.fe button { font: inherit; color: inherit; cursor: pointer; }
.fe-top {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(9, 10, 8, 0.97), rgba(12, 13, 10, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.fe-brand { font-family: var(--cond); font-weight: 700; font-size: 24px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; line-height: 1; padding: 6px 0; }
.fe-brand span { display: block; margin-top: 3px; font-size: 9px; font-weight: 500; letter-spacing: 0.2em; color: var(--ink-dim); text-transform: uppercase; }
.fe-tabs { display: flex; align-self: stretch; }
.fe-tabs button {
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.fe-tabs button:hover { color: var(--ink); }
.fe-tabs button.on { color: var(--amber); background: rgba(226, 172, 70, 0.12); }
.fe-status { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fe-level { position: relative; height: 44px; display: flex; align-items: center; gap: 6px; line-height: 1; }
.fe-level b { width: 44px; text-align: center; font-family: var(--cond); font-size: 19px; font-weight: 700; }
.fe-level span { font-family: var(--cond); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.fe-level i { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(var(--amber) calc(var(--p) * 1turn), rgba(255, 255, 255, 0.14) 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); }
.fe-army { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-family: var(--cond); font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; border-left: 1px solid rgba(255, 255, 255, 0.1); border-right: 1px solid rgba(255, 255, 255, 0.1); }
.fe-army .ico { font-size: 24px; }
.fe-icon { width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--ink-dim); }
.fe-icon:hover, .fe-icon.on { color: var(--ink); border-color: var(--amber); }
.fe-main {
  flex: 1;
  min-height: 0;
  position: relative;
  padding-block: 14px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow: auto;
}
.fe-touch { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 3; width: min(560px, calc(100% - 32px)); padding: 8px 12px; border: 1px solid var(--amber); background: rgba(12, 13, 11, 0.92); font-size: 13px; }
.fe-panel { background: rgba(13, 14, 12, 0.86); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); padding: 14px; min-width: 0; }
.fe-panel h3 { margin: 0 0 10px; font-family: var(--cond); font-size: 15px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); display: flex; align-items: baseline; gap: 8px; }
.fe-panel h3 .count { margin-left: auto; font-size: 12px; color: var(--ink-dim); letter-spacing: 0.08em; }
.fe .note { font-size: 12px; color: var(--ink-dim); line-height: 1.45; margin-top: 6px; }

/* Heroes */
.fe-heroes { display: grid; grid-template-columns: 290px minmax(0, 1fr) 390px; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; overflow: hidden; }
.fe-roster { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; min-height: 0; }
.roster-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.soldier-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.soldier-card:hover { background: rgba(226, 172, 70, 0.1); }
.soldier-card.on { background: rgba(226, 172, 70, 0.18); border-color: rgba(226, 172, 70, 0.55); }
.soldier-card .sc-emb { font-size: 28px; display: grid; place-items: center; color: var(--ink-dim); }
.sc-text { display: flex; flex-direction: column; min-width: 0; }
.sc-text b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-text small { font-size: 11px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-rank { display: flex; align-items: center; gap: 3px; font-size: 20px; color: #d8cfb4; }
.sc-rank i { font-style: normal; font-family: var(--cond); font-size: 13px; color: var(--ink-dim); }
.sc-class { font-size: 18px; color: var(--ink-dim); }
.soldier-card.recruit { border-style: dashed; }
.soldier-card.recruit:disabled { opacity: 0.4; cursor: default; }
.roster-foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.roster-foot span { flex: 1 1 100%; }
.roster-foot button { padding: 5px 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; color: var(--ink-dim); }
.roster-foot button:hover { color: var(--ink); border-color: rgba(208, 87, 74, 0.7); }
.roster-foot .yes { border-color: rgba(208, 87, 74, 0.7); color: var(--ink); }
.fe-bulletin { grid-column: 1; grid-row: 2; }
.bul-item { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 12px; line-height: 1.4; }
.bul-item b { font-family: var(--cond); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.bul-item span { color: var(--ink-dim); }
.fe-stage { grid-column: 2; grid-row: 1 / span 2; position: relative; cursor: grab; touch-action: none; min-height: 280px; }
.fe-stage:active { cursor: grabbing; }
.fe-nameplate { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); text-align: center; padding: 10px 14px 12px; background: linear-gradient(180deg, rgba(10, 11, 9, 0), rgba(10, 11, 9, 0.75) 35%); pointer-events: none; }
.np-top { display: flex; align-items: center; justify-content: center; gap: 10px; }
.np-top h2 { margin: 0; font-family: var(--cond); font-weight: 700; font-size: clamp(24px, 3.2vw, 38px); letter-spacing: 0.06em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); text-wrap: balance; }
.np-emb { font-size: 30px; display: inline-grid; }
.np-rank { font-size: 28px; color: #d8cfb4; display: inline-grid; }
.np-sub { margin-top: 2px; font-size: 13px; color: var(--ink-dim); letter-spacing: 0.04em; }
.fe .xp { height: 5px; margin: 8px auto 4px; background: rgba(255, 255, 255, 0.12); max-width: 420px; }
.fe .xp i { display: block; height: 100%; background: linear-gradient(90deg, #b98a35, var(--amber)); }
.np-xp { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.04em; }
.fe-loadout { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; min-height: 0; padding: 0; }
.lo-tabs { display: flex; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lo-tabs button { flex: 1; padding: 11px 6px; background: none; border: 0; border-bottom: 2px solid transparent; font-family: var(--cond); font-size: 15px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.lo-tabs button.on { color: var(--amber); background: rgba(226, 172, 70, 0.12); }
.lo-body { padding: 12px 14px 14px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.slot-label { display: flex; justify-content: space-between; font-family: var(--cond); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 5px; }
.slot-label span { letter-spacing: 0.04em; text-transform: none; font-family: var(--font); font-size: 11px; }
.wpn-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 6px; text-align: left; background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(255, 255, 255, 0.08); }
.wpn-card.on { border-color: rgba(226, 172, 70, 0.6); }
.wpn-card.opens { position: relative; padding-right: 26px; }
.wpn-card.opens::after { content: ''; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--ink-dim); border-bottom: 2px solid var(--ink-dim); transform: translateY(-70%) rotate(45deg); }
.wpn-card:hover { background: rgba(226, 172, 70, 0.1); }
.wpn-pic { height: 44px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.08), transparent 70%); }
.wpn-pic img { max-width: 100%; max-height: 44px; }
.wpn-text { display: flex; flex-direction: column; min-width: 0; }
.wpn-text b { font-family: var(--cond); font-size: 17px; font-weight: 600; letter-spacing: 0.04em; }
.wpn-text small { font-size: 11px; color: var(--ink-dim); line-height: 1.35; }
.slot-pick { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 6px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.06); }
.scope-pick { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.scope-opt { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 6px 10px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.scope-opt.on { border-color: rgba(226, 172, 70, 0.6); background: rgba(226, 172, 70, 0.12); }
.scope-opt:hover { background: rgba(226, 172, 70, 0.1); }
.scope-opt b { font-family: var(--cond); font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
.scope-opt small { font-size: 11px; color: var(--ink-dim); line-height: 1.35; }
.lo-note { font-size: 12px; color: var(--ink-dim); line-height: 1.45; }
.veh-card { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.veh-card.on { border-color: rgba(226, 172, 70, 0.6); background: rgba(226, 172, 70, 0.12); }
.pts-meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: baseline; padding: 8px 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.pts-l { font-family: var(--cond); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.pts-v { font-family: var(--cond); font-size: 16px; color: var(--amber); }
.pts-bar { grid-column: 1 / -1; display: flex; gap: 3px; }
.pts-bar i { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.1); }
.pts-bar i.on { background: var(--amber); }
.wpn-card.empty .wpn-pic { min-height: 40px; border: 1px dashed rgba(255, 255, 255, 0.12); }
.wpn-card.empty b { color: var(--ink-dim); font-weight: 500; }
.wpn-army { display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.wpn-army svg { width: 100%; height: 100%; }
.veh-card.locked,
.wpn-card.locked { opacity: 0.55; cursor: default; }
.wpn-card.locked:hover { background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); }
.wpn-card.locked small,
.veh-card em { color: var(--amber); font-style: normal; font-size: 12px; }
.badge-card { display: grid; gap: 4px; width: 100%; padding: 9px 12px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.badge-card.on { border-color: rgba(226, 172, 70, 0.6); background: rgba(226, 172, 70, 0.1); }
.badge-card.locked { opacity: 0.55; cursor: default; }
.bdg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bdg-head b { font-family: var(--cond); font-size: 16px; letter-spacing: 0.04em; }
.bdg-tier { font-size: 12px; color: var(--amber); white-space: nowrap; }
.bdg-does { font-size: 12px; color: var(--ink); }
.bdg-tiers { display: grid; gap: 1px; font-size: 11px; color: var(--ink-dim); }
.bdg-tiers .open { color: var(--amber); }
.rib-row { display: grid; gap: 4px; padding: 10px 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.rib-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rib-head b { font-family: var(--cond); font-size: 16px; letter-spacing: 0.04em; }
.rib-lv { font-size: 12px; color: var(--amber); white-space: nowrap; }
.rib-note,
.rib-next { font-size: 12px; color: var(--ink-dim); }
.rib-bar { height: 4px; background: rgba(255, 255, 255, 0.1); }
.rib-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b98a35, var(--amber)); }
.veh-card b { font-family: var(--cond); font-size: 18px; font-weight: 600; letter-spacing: 0.04em; }
.veh-card span { font-size: 12px; color: var(--ink-dim); }
.uni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.uni-grid button, .choice-row button { padding: 8px 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; }
.uni-grid button.on, .choice-row button.on { background: rgba(226, 172, 70, 0.22); border-color: var(--amber); }
.fe-ready { grid-column: 3; grid-row: 2; display: flex; flex-direction: column; gap: 8px; }
.ready-mission { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 12px; background: rgba(13, 14, 12, 0.86); border: 1px solid rgba(255, 255, 255, 0.08); }
.rm-practice { grid-column: 1; justify-self: start; margin-top: 6px; padding: 0; font-size: 11px; color: var(--ink-dim); background: none; border: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.rm-practice:hover { color: var(--ink); }
.rm-online { grid-column: 1; justify-self: start; margin-top: 6px; padding: 6px 10px; font-size: 12px; color: var(--amber); background: rgba(226, 172, 70, 0.1); border: 1px solid rgba(226, 172, 70, 0.6); cursor: pointer; }
.rm-kind { grid-column: 1; font-family: var(--cond); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.ready-mission b { grid-column: 1; font-family: var(--cond); font-size: 18px; font-weight: 600; letter-spacing: 0.04em; }
.ready-mission small { grid-column: 1; font-size: 11px; color: var(--ink-dim); }
.rm-change { grid-column: 2; grid-row: 1 / span 3; align-self: center; padding: 6px 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 12px; }
.fe .ready-btn,
.si .ready-btn {
  width: 100%;
  padding: 15px 12px;
  font-size: 24px;
}
/* Every gold button looks like the big Ready for battle button: the amber
   gradient lit along its top edge, dark text in bold condensed capitals, each
   at its own size (the big ones with the deeper shadow). */
.fe .ready-btn,
.si .ready-btn,
.cta,
.pause-home .resume,
.fe .modal-actions .ok,
.fe .cust-close,
.fe .cd-act.buy:not(:disabled),
.fe .hx-icons button.on,
.fe .fe-account.sure,
.fe .fr button.gold,
.fe .fr-add button,
.fe .fr-say button,
.fe .wr-bbtn button[data-act='join'] {
  border: 0;
  background: linear-gradient(180deg, #ecbb56, #c99332);
  color: #1b160c;
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.fe .ready-btn,
.si .ready-btn,
.cta { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 8px 22px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.fe .ready-btn:hover:not(:disabled),
.si .ready-btn:hover:not(:disabled),
.cta:hover,
.pause-home .resume:hover,
.fe .modal-actions .ok:hover,
.fe .cust-close:hover,
.fe .fe-account.sure:hover,
.fe .fr button.gold:hover,
.fe .fr-add button:hover,
.fe .fr-say button:hover,
.fe .cd-act.buy:hover:not(:disabled),
.fe .wr-bbtn button[data-act='join']:hover:not(:disabled) { background: linear-gradient(180deg, #f5c867, #d6a03b); }
.fe button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Recruit */
.fe-modal { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(6, 7, 5, 0.6); padding: 16px; }
.modal-box { width: min(560px, 100%); max-height: 100%; overflow-y: auto; }
.modal-box label { display: block; margin: 12px 0 6px; font-family: var(--cond); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-row button { display: flex; align-items: center; gap: 7px; }
.choice-row button .ico { font-size: 18px; }
.name-row { display: flex; gap: 6px; }
.name-row input { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; color: var(--ink); background: #181915; border: 1px solid rgba(255, 255, 255, 0.16); }
.name-row button { width: 40px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-actions button { padding: 9px 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); font-family: var(--cond); font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; }

/* Generals */
.fe-generals { display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; gap: 14px; overflow: hidden; }
.mission-list { display: flex; flex-direction: column; gap: 6px; }
.mission-card { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.mission-card.on { background: rgba(226, 172, 70, 0.16); border-color: rgba(226, 172, 70, 0.5); }
.mc-kind, .det-kind { font-family: var(--cond); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.mission-card b { font-family: var(--cond); font-size: 19px; font-weight: 600; letter-spacing: 0.03em; }
.mission-card small { font-size: 12px; color: var(--ink-dim); line-height: 1.4; }
.fe-mapbox { display: flex; flex-direction: column; gap: 8px; padding: 8px; min-height: 320px; }
.fe-map { flex: 1; width: 100%; min-height: 0; display: block; background: #20231c; }
.map-caption { font-size: 12px; color: var(--ink-dim); padding: 0 4px 2px; }
.fe-detail { display: flex; flex-direction: column; gap: 4px; }
.fe-detail h2 { margin: 2px 0 6px; font-family: var(--cond); font-size: 28px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-wrap: balance; }
.fe-detail p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.det-row { margin-bottom: 10px; }
.det-row > label { display: block; margin-bottom: 6px; font-family: var(--cond); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.det-row input[type='range'] { width: 100%; accent-color: var(--amber); }
.det-soldier { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; padding: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); }
.fe-detail .ready-btn { margin-top: auto; }

/* Progression */
.fe-progression { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.prog-level { grid-column: 1 / span 2; display: flex; align-items: center; gap: 18px; }
.pl-badge { width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-items: center; align-content: center; border: 3px solid var(--amber); line-height: 1; }
.pl-badge b { font-family: var(--cond); font-size: 30px; font-weight: 700; }
.pl-badge span { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.pl-text { flex: 1; min-width: 0; }
.pl-text h2 { margin: 0; font-family: var(--cond); font-size: 26px; letter-spacing: 0.06em; text-transform: uppercase; }
.pl-text p { margin: 4px 0 0; font-size: 13px; color: var(--ink-dim); line-height: 1.45; max-width: 70ch; }
.pl-text .xp { margin-left: 0; max-width: 520px; }
.prog-soldiers, .prog-ranks { overflow: auto; min-height: 0; }
.ps-table { display: flex; flex-direction: column; min-width: 560px; }
.ps-row { display: grid; grid-template-columns: minmax(150px, 2fr) minmax(130px, 1.6fr) repeat(6, minmax(44px, 0.6fr)); align-items: center; gap: 6px; padding: 7px 8px; text-align: left; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 13px; }
.ps-row.head { font-family: var(--cond); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.ps-row.on { background: rgba(226, 172, 70, 0.14); }
button.ps-row:hover { background: rgba(226, 172, 70, 0.08); }
.ps-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ps-name .ico { font-size: 20px; }
.ps-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-rank { display: flex; align-items: center; gap: 6px; min-width: 0; color: #d8cfb4; }
.ps-rank .ico { font-size: 18px; }
.ps-rank em { font-style: normal; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: grid; grid-template-columns: 26px 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 13px; color: var(--ink-dim); }
.rank-item .ico { font-size: 20px; color: #8f887a; }
.rank-item.done { color: var(--ink); }
.rank-item.done .ico { color: #d8cfb4; }
.rank-item.on { background: rgba(226, 172, 70, 0.18); color: var(--ink); }
.rank-item.on .ico { color: var(--amber); }
.ri-n { font-family: var(--cond); font-size: 14px; text-align: right; }
.ri-xp { font-family: var(--mono); font-size: 11px; }

/* Settings and about */
.fe-settings, .fe-about-screen { display: flex; justify-content: center; }
.fe-settings-box { width: min(760px, 100%); margin: 0 auto; }
.fe-about { width: min(760px, 100%); margin: 0 auto; }
.fe-about h2 { margin: 0 0 8px; font-family: var(--cond); font-size: 26px; letter-spacing: 0.08em; text-transform: uppercase; }
.fe-about p { font-size: 14px; line-height: 1.6; color: var(--ink-dim); max-width: 70ch; }
.fe-about b { color: var(--ink); }
.fe-settings-box .set-view button, .fe-settings-box button { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); padding: 7px 14px; }
.fe-settings-box .set-view button.on { background: rgba(226, 172, 70, 0.3); border-color: var(--amber); }
.fe-settings-box .set-trail .crumb { background: none; border: 0; padding: 0; }

/* Narrow screens: one column. */
@media (max-width: 980px) {
  .fe-heroes, .fe-generals, .fe-progression { display: flex; flex-direction: column; overflow-y: auto; }
  .fe-heroes > *, .fe-generals > *, .fe-progression > * { flex: none; }
  .fe-loadout .lo-body { overflow: visible; }
  .fe-stage { order: -1; height: 52vh; min-height: 300px; }
  .fe-roster .roster-list { max-height: 260px; }
  .fe-tabs button { padding: 0 10px; font-size: 16px; }
  .fe-army span { display: none; }
  .fe-map { min-height: 300px; }
}

/* Battle results */
.battle-result { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(10, 11, 9, 0.55), rgba(8, 9, 7, 0.88)); animation: br-in 0.8s ease-out; }
@keyframes br-in { from { opacity: 0; } to { opacity: 1; } }
.br-box { width: min(620px, 100%); text-align: center; padding: 26px 24px 22px; background: rgba(13, 14, 12, 0.9); border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.br-kind { font-family: var(--cond); font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-dim); }
.br-box h1 { margin: 6px 0 4px; font-family: var(--cond); font-size: clamp(44px, 9vw, 76px); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.battle-result.won h1 { color: var(--amber); }
.br-why { font-size: 14px; color: var(--ink-dim); }
.br-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 20px 0 14px; }
.br-stats div { padding: 10px 4px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); }
.br-stats b { display: block; font-family: var(--cond); font-size: 28px; font-weight: 700; }
.br-stats .xp b { color: var(--amber); }
.br-stats span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.br-rank { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); }
.br-rank .ico { width: 32px; height: 32px; color: #d8cfb4; flex: none; }
.br-rank > div { flex: 1; min-width: 0; }
.br-rank b { display: block; font-family: var(--cond); font-size: 19px; letter-spacing: 0.04em; }
.br-rank small { display: block; font-size: 12px; color: var(--ink-dim); }
.br-xp { height: 5px; margin-top: 7px; background: rgba(255, 255, 255, 0.12); }
.br-xp i { display: block; height: 100%; background: linear-gradient(90deg, #b98a35, var(--amber)); }
.br-ribbons { display: grid; gap: 6px; margin: -6px 0 16px; text-align: left; }
.br-ribbon { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.br-ribbon .ribbon { width: 84px; }
.br-ribbon b { font-family: var(--cond); font-size: 15px; letter-spacing: 0.03em; font-weight: 600; }
.br-ribbon .lvup { display: inline-block; margin-left: 8px; padding: 1px 6px; font-family: var(--cond); font-size: 11px; letter-spacing: 0.1em; background: var(--amber); color: #15130d; }
.br-ribbon .bar { position: relative; height: 5px; margin-top: 4px; background: #23324a; }
.br-ribbon .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #6f97c8; }
.br-ribbon .bar i.new { background: var(--amber); }
.br-ribbon em { font-style: normal; font-family: var(--cond); font-size: 16px; color: var(--amber); }
.br-unlocks { margin: 0 0 16px; padding: 10px 12px; text-align: left; border: 1px solid var(--panel-edge); background: rgba(201, 162, 74, 0.08); }
.br-unlocks span { display: block; font-family: var(--cond); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.br-unlocks b { font-weight: 500; }
.cta { font: inherit; font-family: var(--cond); font-weight: 700; cursor: pointer; width: 100%; padding: 14px 12px; font-size: 22px; }
@media (max-width: 520px) { .br-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Credits, buying, and the customization screen (weapon upgrades). */
.fe-credits { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-family: var(--cond); line-height: 1; }
.fe-credits .ico { font-size: 22px; color: var(--amber); }
.fe-credits b { font-size: 18px; font-weight: 700; }
.fe-credits span { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
.wpn-card .price, .scope-opt .price { grid-column: 1 / -1; font-style: normal; font-family: var(--cond); font-size: 13px; letter-spacing: 0.04em; color: var(--amber); }
.wpn-card.confirm, .scope-opt.confirm { border-color: var(--amber); background: rgba(226, 172, 70, 0.14); }
.upg-open { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 7px 10px; text-align: left; background: rgba(226, 172, 70, 0.08); border: 1px solid rgba(226, 172, 70, 0.35); }
.upg-open:hover { background: rgba(226, 172, 70, 0.16); }
.upg-open .ico { font-size: 16px; color: var(--amber); }
.upg-open span { font-family: var(--cond); font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.upg-open small { margin-left: auto; font-size: 11px; color: var(--ink-dim); }
.cust { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 12px; overflow: auto; padding-block: 14px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: #0b0c0a; }
.cust-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cust-title { flex: 1; min-width: 200px; }
.cust-title h2 { margin: 0; font-family: var(--cond); font-size: 26px; letter-spacing: 0.06em; text-transform: uppercase; text-wrap: balance; }
.cust-title small { font-size: 12px; color: var(--ink-dim); }
.cust-close { padding: 8px 22px; font-size: 16px; }
.br-credits b { color: var(--amber); }
.cust-gun { width: 240px; max-width: 45%; }
.cust-gun img { width: 100%; display: block; }
.cust-body { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 14px; align-items: start; min-height: 0; }
.cust-slots { display: flex; flex-direction: column; gap: 6px; }
.cs-slot { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.cs-slot:hover { background: rgba(226, 172, 70, 0.1); }
.cs-slot.on { border-color: var(--amber); background: rgba(226, 172, 70, 0.14); }
.cs-slot.none { opacity: 0.4; cursor: default; }
.cs-pic { height: 44px; display: grid; place-items: center; color: var(--ink-dim); font-size: 22px; }
.cs-pic img { max-width: 100%; max-height: 100%; }
.cs-text { display: flex; flex-direction: column; min-width: 0; }
.cs-text b { font-family: var(--cond); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.cs-text small { font-size: 11px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.ctile { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 6px 8px 8px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.ctile:hover { background: rgba(226, 172, 70, 0.09); }
.ctile.sel { border-color: var(--amber); background: rgba(226, 172, 70, 0.14); }
.ctile.fitted:not(.sel) { border-color: rgba(159, 194, 122, 0.7); }
.ctile.locked .ct-pic, .ctile.locked b { opacity: 0.45; }
.ct-pic { height: 84px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.07), transparent 70%); }
.ct-pic img { max-width: 100%; max-height: 100%; }
.ctile b { font-family: var(--cond); font-size: 14px; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-sub { font-size: 10px; color: var(--ink-dim); min-height: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-tag { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-family: var(--cond); font-size: 13px; color: var(--amber); }
.ct-tag .ico { font-size: 12px; }
.ctile.fitted .ct-tag { color: #9fc27a; }
.ctile.locked .ct-tag { color: var(--ink-dim); }
.cust-detail { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.cd-pic { height: 170px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.08), transparent 70%); }
.cd-pic img { max-width: 100%; max-height: 100%; }
.cust-detail h3 { margin: 0; font-family: var(--cond); font-size: 22px; letter-spacing: 0.04em; text-wrap: balance; }
.cd-sub { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.cd-line { margin: 2px 0 4px; font-size: 13px; line-height: 1.4; }
.cd-bars { display: flex; flex-direction: column; gap: 5px; }
.cd-bar { display: grid; grid-template-columns: 78px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: 12px; }
.cb-l { color: var(--ink-dim); }
.cb-track { position: relative; height: 7px; background: rgba(255, 255, 255, 0.08); }
.cb-track i { position: absolute; left: 0; top: 0; bottom: 0; }
.cb-now { background: rgba(255, 255, 255, 0.5); }
.cb-diff.up { background: #9fc27a; }
.cb-diff.down { background: #d58c70; }
.cb-v { font-family: var(--cond); font-size: 13px; text-align: right; }
.cd-bar.good .cb-v { color: #9fc27a; }
.cd-bar.bad .cb-v { color: #d58c70; }
.cd-act { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; font-family: var(--cond); font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.cd-act:disabled { opacity: 0.6; cursor: default; background: rgba(255, 255, 255, 0.05); color: var(--ink-dim); border-color: rgba(255, 255, 255, 0.1); }
@media (max-width: 1000px) {
  .cust-body { grid-template-columns: minmax(0, 1fr); }
  .cust-slots { flex-direction: row; overflow-x: auto; }
  .cs-slot { min-width: 150px; }
  .cust-detail { position: static; }
}
/* The top bar's numbers and their labels centered on the letters themselves,
   not on the fonts' line boxes (which differ between fonts and computers). */
.fe-credits b, .fe-credits span, .fe-level b, .fe-level span { text-box: trim-both cap alphabetic; }

/* ------------------------------------------------- Heroes screen (after H&G) */
.fe-heroes { grid-template-columns: 240px minmax(0, 1fr) 300px 260px; grid-template-rows: minmax(0, 1fr); }
.fe-heroes .fe-roster, .fe-heroes .fe-stage, .fe-heroes .hx-load, .fe-heroes .hx-right, .fe-heroes .fe-ready { grid-column: auto; grid-row: auto; }
.hx-col { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.hx-col > * { flex: none; }
.hx-col > .roster-list, .hx-col > .hx-slots { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.hx-filter { display: flex; gap: 6px; align-items: center; }
.hx-filter button { width: 34px; height: 34px; display: grid; place-items: center; font-size: 22px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); opacity: 0.45; }
.hx-filter button.on { opacity: 1; border-color: var(--amber); }
.hx-select { flex: 1; min-width: 0; height: 34px; padding: 0 30px 0 10px; font: inherit; font-size: 12px; color: var(--ink); background: rgba(16, 17, 14, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23c9c4b4' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center / 11px 8px; border: 1px solid rgba(255, 255, 255, 0.12); -webkit-appearance: none; appearance: none; cursor: pointer; }
.hx-select:hover { border-color: rgba(226, 172, 70, 0.6); }
.hx-select option { background: #1c1d1a; color: var(--ink); }
.hx-stage { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.hx-stage .fe-nameplate { position: static; transform: none; width: auto; min-width: 280px; max-width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 12px; background: rgba(13, 14, 12, 0.8); border: 1px solid rgba(255, 255, 255, 0.08); pointer-events: none; }
.hx-stage .fe-nameplate .np-rank .ico { font-size: 34px; }
.hx-stage .fe-nameplate h2 { margin: 0; font-family: var(--cond); font-size: 24px; letter-spacing: 0.04em; }
.hx-stage .fe-nameplate .np-text { flex: 1; min-width: 0; }
.hx-stage .fe-nameplate .np-sub, .hx-stage .fe-nameplate .np-xp { font-size: 11px; color: var(--ink-dim); }
.hx-stage .fe-nameplate .xp { height: 4px; margin: 5px 0 3px; }
.hx-badges { align-self: center; display: flex; gap: 12px; margin-bottom: 4px; }
.hx-badge { width: 140px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px 7px; text-align: center; background: rgba(16, 17, 14, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); cursor: pointer; }
.hx-badge:hover { border-color: rgba(226, 172, 70, 0.6); }
.hx-badge .lab { align-self: flex-start; font-family: var(--cond); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.hx-badge svg { width: 50px; height: 58px; }
.hx-badge b { font-family: var(--cond); font-size: 14px; font-weight: 600; }
.hx-head { display: flex; align-items: center; gap: 6px; min-height: 34px; }
.hx-icons { display: flex; gap: 4px; }
.hx-icons button { width: 34px; height: 32px; display: grid; place-items: center; font-size: 18px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--ink-dim); }
.hx-icons button:hover { color: var(--ink); border-color: var(--amber); }
.hx-icons button.on { cursor: default; }
.hx-pts { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.hx-pts i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.hx-pts i.on { background: var(--amber); }
.hx-slots { display: flex; flex-direction: column; gap: 5px; padding-right: 2px; }
.hx-slot { position: relative; display: grid; grid-template-columns: 1fr; width: 100%; padding: 6px 8px 7px; text-align: left; background: rgba(16, 17, 14, 0.88); border: 1px solid rgba(255, 255, 255, 0.08); }
.hx-slot:hover { border-color: rgba(226, 172, 70, 0.6); }
.hx-slot .lab { font-family: var(--cond); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.hx-slot img { height: 40px; justify-self: center; max-width: 100%; }
.hx-slot.main img { height: 56px; }
.hx-slot b { font-family: var(--cond); font-size: 14px; font-weight: 600; }
.hx-slot .pt { position: absolute; right: 8px; top: 6px; font-family: var(--cond); font-size: 12px; color: var(--amber); }
.hx-slot .mods { position: absolute; right: 8px; bottom: 7px; display: flex; gap: 3px; }
.hx-slot .mods i { width: 7px; height: 7px; background: rgba(255, 255, 255, 0.15); }
.hx-slot .mods i.on { background: #9fc27a; }
.hx-slot.empty { padding: 8px 10px; border-style: dashed; background: transparent; color: var(--ink-dim); font-family: var(--cond); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.hx-slot.empty:hover { color: var(--ink); }
.hx-slot.empty .left { position: absolute; right: 10px; top: 9px; font-family: var(--font); font-size: 11px; letter-spacing: 0; text-transform: none; }
.hx-right { justify-content: space-between; }
.hx-next { display: flex; flex-direction: column; gap: 8px; }
.hx-next h3 { margin-bottom: 2px; }
.hx-nx { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; padding: 2px 0; text-align: left; background: none; border: 0; }
.hx-nx .ribbon { width: 44px; }
.hx-nx b { display: block; font-family: var(--cond); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-nx small { display: block; font-size: 10px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-nx i { display: block; height: 3px; margin-top: 4px; background: rgba(255, 255, 255, 0.1); }
.hx-nx em { display: block; height: 100%; background: #6f97c8; }
.hx-nx:hover b { color: var(--amber); }
.hx-ribbons { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); font-family: var(--cond); font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; }
.hx-ribbons .ribbon { width: 40px; }
.hx-ribbons:hover { border-color: var(--amber); }
.ribbon { display: block; width: 100%; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }

/* Windows over the Heroes screen */
.hx-dim { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(6, 7, 5, 0.74); }
.hx-win { width: min(820px, 100%); max-height: calc(100vh - 110px); display: flex; flex-direction: column; background: rgba(28, 29, 26, 0.98); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.hx-win.hx-wide { width: min(1080px, 100%); }
.hx-win header { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.hx-win header h2 { margin: 0; font-family: var(--cond); font-size: 28px; letter-spacing: 0.04em; text-transform: uppercase; text-wrap: balance; }
.hx-sub { font-size: 12px; color: var(--ink-dim); }
.hx-win header .x { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; background: #8a2a22; border: 0; font-size: 15px; flex: none; }
.hx-wb { padding: 6px 16px 16px; overflow: auto; min-height: 0; }
.hx-win footer { display: flex; justify-content: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.hx-win footer button { padding: 8px 36px; font-family: var(--cond); font-size: 17px; letter-spacing: 0.12em; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.hx-win footer button:hover { border-color: var(--amber); }
.hx-ph { margin: 12px 0 8px; font-family: var(--cond); font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.hx-pg { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.hx-card { position: relative; display: grid; grid-template-columns: 1fr; gap: 1px; padding: 8px 10px 10px; text-align: left; background: rgba(36, 37, 33, 0.95); border: 1px solid rgba(255, 255, 255, 0.08); }
.hx-card:hover { border-color: rgba(226, 172, 70, 0.6); }
.hx-card.on { border-color: var(--amber); }
.hx-card img.gun { height: 66px; justify-self: center; max-width: 100%; object-fit: contain; }
.hx-card b { font-family: var(--cond); font-size: 15px; font-weight: 600; }
.hx-card small { font-size: 11px; color: var(--ink-dim); }
.hx-card .tag { position: absolute; right: 9px; bottom: 9px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-family: var(--cond); font-size: 13px; }
.hx-card .tag .own { color: #9fc27a; }
.hx-card .price, .hx-card .tag .price { display: flex; align-items: center; gap: 4px; font-style: normal; color: var(--amber); }
.hx-card em.price { position: absolute; right: 9px; bottom: 9px; font-family: var(--cond); font-size: 13px; }
.hx-card.confirm { border-color: var(--amber); background: rgba(226, 172, 70, 0.14); }
.hx-card.short { opacity: 0.6; }
.hx-card.locked { cursor: default; }
.hx-card.locked img.gun, .hx-card.locked b { opacity: 0.5; }
.hx-lock { width: 62px; display: block; }
.hx-lock em { display: block; margin-top: 2px; font-style: normal; font-size: 10px; color: var(--ink-dim); text-align: right; white-space: nowrap; }
.hx-cust { display: flex; align-items: center; gap: 4px; padding: 3px 8px; background: rgba(226, 172, 70, 0.12); border: 1px solid rgba(226, 172, 70, 0.4); color: var(--amber); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.hx-cust:hover { background: rgba(226, 172, 70, 0.22); }
.hx-more { display: flex; justify-content: space-between; width: 100%; margin-top: 14px; padding: 10px 12px; background: rgba(255, 255, 255, 0.03); border: 1px dashed rgba(255, 255, 255, 0.16); color: var(--ink-dim); font-size: 13px; }
.hx-more:hover { color: var(--ink); }
.hx-badgegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-top: 8px; }

/* Ribbons overview and one ribbon's levels */
.hx-ovb { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; padding-top: 10px; }
.hx-sel { display: flex; flex-direction: column; gap: 8px; text-align: center; align-self: start; position: sticky; top: 0; }
.hx-sel h3 { margin: 0; font-family: var(--cond); font-size: 22px; text-transform: uppercase; letter-spacing: 0.04em; }
.hx-sel .ribbon { width: 220px; margin: 0 auto; }
.hx-sel .bar, .hx-tile .bar { height: 5px; background: #23324a; }
.hx-sel .bar i, .hx-tile .bar i { display: block; height: 100%; background: #6f97c8; }
.hx-sel .pts { font-size: 13px; }
.hx-sel p { margin: 0; font-size: 13px; line-height: 1.45; }
.hx-sel button { align-self: center; padding: 8px 18px; font-family: var(--cond); font-size: 16px; letter-spacing: 0.06em; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.hx-sel button:hover { border-color: var(--amber); }
.hx-grp h4 { margin: 0 0 8px; padding: 6px; text-align: center; font-family: var(--cond); font-size: 17px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(255, 255, 255, 0.07); }
.hx-tiles { display: grid; grid-template-columns: repeat(auto-fill, 104px); gap: 10px 8px; margin-bottom: 14px; }
.hx-tile { display: flex; flex-direction: column; gap: 3px; padding: 2px; background: none; border: 1px solid transparent; }
.hx-tile:hover { border-color: rgba(226, 172, 70, 0.5); }
.hx-tile.on { border-color: var(--amber); }
.hx-tile span { font-size: 11px; text-align: center; }
.hx-note { margin: 8px 0 6px; font-size: 13px; }
.hx-track { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding-top: 58px; }
.hx-lv { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px; background: none; border: 1px solid transparent; }
.hx-lv.on { border-color: var(--amber); }
.hx-lv > span:first-child { font-family: var(--cond); font-size: 15px; }
.hx-line { position: relative; display: block; height: 4px; width: 100%; background: #23324a; margin-top: 4px; }
.hx-line i { position: absolute; left: 0; top: 0; bottom: 0; background: #6f97c8; }
.hx-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: 4px; background: #13233a; border: 2px solid #6f97c8; font-family: var(--cond); font-size: 12px; color: #e8eef6; }
.hx-mark.got { background: #6f97c8; color: #10192a; }
.hx-mark.none { visibility: hidden; }
.hx-cur { position: absolute; top: 0; transform: translateX(-50%); padding: 4px 8px; background: linear-gradient(180deg, #3a5a8a, #24406a); border: 1px solid #6f97c8; text-align: center; font-family: var(--cond); font-size: 12px; letter-spacing: 0.08em; white-space: nowrap; }
.hx-cur b { display: block; font-size: 15px; }
.hx-detail { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; margin-top: 16px; padding: 16px; background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(255, 255, 255, 0.07); }
.hx-detail .ribbon { width: 220px; }
.hx-detail h3 { margin: 0 0 4px; font-family: var(--cond); font-size: 22px; text-transform: uppercase; }
.hx-dsub { font-size: 13px; color: var(--ink-dim); }
.hx-opens { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.hx-opens > div { width: 150px; padding: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; text-align: center; }
.hx-opens img { width: 100%; height: 56px; object-fit: contain; display: block; }
.hx-opens svg { width: 48px; height: 56px; display: block; margin: 0 auto; }
.hx-opens .hx-none { width: auto; border: 0; background: none; color: var(--ink-dim); }
.hx-tankpic { display: block; font-size: 44px; color: var(--ink-dim); }
@media (max-width: 1180px) {
  .fe-heroes { grid-template-columns: 220px minmax(0, 1fr) 280px; }
  .fe-heroes .hx-right { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .fe-heroes .hx-right > * { flex: 1; }
}
@media (max-width: 980px) {
  .hx-ovb, .hx-detail { grid-template-columns: minmax(0, 1fr); }
  .hx-track { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .fe-heroes .hx-right { flex-direction: column; }
}
/* The battle in the narrow right column: its name on one line, the button under it. */
.hx-right .ready-mission { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
.hx-right .ready-mission b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-right .rm-change { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
/* Badge art: under the soldier, and at the left of each badge's card. */
.hx-badge .badge-art { width: 50px; height: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.hx-badgegrid .badge-card { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.hx-badgegrid .badge-card > :not(.bdg-pic) { grid-column: 2; }
.hx-badgegrid .badge-card .bdg-pic { grid-column: 1; grid-row: 1 / span 3; }
.hx-badgegrid .badge-card.on .bdg-head b { color: var(--amber); }
.bdg-pic .badge-art { width: 56px; height: auto; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.hx-badgegrid .badge-card:first-child { grid-template-columns: minmax(0, 1fr); }
.hx-badgegrid .badge-card:first-child > * { grid-column: 1; }
.hx-opens .badge-art { width: 48px; height: auto; display: block; margin: 0 auto; }
/* The edge darkening over the soldier's backdrop: lighter backdrops keep more of it. */
.fe.stage[data-backdrop="mist"], .fe.stage[data-backdrop="dusk"], .fe.stage[data-backdrop="smoke"], .fe.stage[data-backdrop="night"] { background: radial-gradient(ellipse 70% 80% at 50% 52%, rgba(10, 11, 9, 0) 0%, rgba(10, 11, 9, 0.2) 65%, rgba(8, 9, 7, 0.6) 100%); }
.fe.stage[data-backdrop="pale"] { background: radial-gradient(ellipse 75% 85% at 50% 52%, rgba(10, 11, 9, 0) 0%, rgba(10, 11, 9, 0.12) 70%, rgba(8, 9, 7, 0.4) 100%); }
/* Every card on the Heroes screen at the badge card's 10% background, the backdrop showing through. */
.fe-heroes .soldier-card, .fe-heroes .hx-slot:not(.empty), .hx-stage .fe-nameplate, .fe-heroes .hx-next, .fe-heroes .ready-mission { background: rgba(16, 17, 14, 0.4); box-shadow: none; }
/* Their borders strong enough to see on the light backdrop. */
.fe-heroes .soldier-card:not(.on), .fe-heroes .hx-slot, .hx-stage .fe-nameplate, .fe-heroes .hx-next, .fe-heroes .ready-mission, .fe-heroes .hx-badge, .fe-heroes .hx-ribbons, .fe-heroes .hx-select { border-color: rgba(255, 255, 255, 0.2); }
.fe-heroes .hx-slot:hover, .fe-heroes .hx-badge:hover, .fe-heroes .hx-select:hover { border-color: rgba(226, 172, 70, 0.6); }
.fe-heroes .hx-ribbons:hover { border-color: var(--amber); }

/* Generals: the war map (warMapView.js) with the army on the left and what is
   picked on the right. */
.wr-side { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.wr-side h3 { margin: 4px 0 2px; }
.wr-side .wr-gap, .hx-wb .wr-gap { margin-top: 12px; }
.hx-wb h3.wr-gap { font-family: var(--cond); font-size: 15px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); margin: 14px 0 6px; }
.hx-wb h3.wr-gap:first-child { margin-top: 0; }
.hx-wb .mission-card { margin-bottom: 6px; }
.wr-head { display: flex; align-items: center; gap: 10px; }
.wr-head .ico { font-size: 34px; }
.wr-head b { display: block; font-family: var(--cond); font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase; }
.wr-head small { font-size: 12px; color: var(--ink-dim); }
.wr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wr-stats > div { padding: 7px 9px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.wr-stats span { display: block; font-family: var(--cond); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.wr-stats b { font-family: var(--cond); font-size: 20px; font-weight: 600; }
.wr-teams { display: flex; flex-direction: column; gap: 5px; }
.wr-team { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.wr-team:hover { border-color: rgba(226, 172, 70, 0.5); }
.wr-team.on { border-color: var(--amber); background: rgba(226, 172, 70, 0.12); }
.wr-team.reserve { opacity: 0.75; }
.wr-team.fight { border-color: rgba(201, 80, 60, 0.75); background: rgba(201, 80, 60, 0.1); }
.wr-team .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wr-team .t b { font-family: var(--cond); font-size: 16px; font-weight: 600; letter-spacing: 0.03em; }
.wr-team .t small { font-size: 11px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-team .lv { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 1px solid rgba(226, 172, 70, 0.6); border-radius: 50%; font-family: var(--cond); font-size: 13px; color: var(--amber); }
.wr-team .str { flex: none; font-family: var(--cond); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-dim); }
.wr-sign { width: 30px; height: 20px; flex: none; }
.wr-add { padding: 9px; font-family: var(--cond); font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); background: none; border: 1px dashed rgba(255, 255, 255, 0.25); }
.wr-add:hover { color: var(--amber); border-color: var(--amber); }
.wr-mapbox { position: relative; min-height: 320px; border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; }
.wr-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.wr-map:active { cursor: grabbing; }
.wr-top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.wr-top > * { pointer-events: auto; }
.wr-clock, .wr-score { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(13, 14, 12, 0.85); border: 1px solid rgba(255, 255, 255, 0.12); }
.wr-clock b { font-family: var(--cond); font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.wr-clock span { font-family: var(--cond); font-size: 16px; font-variant-numeric: tabular-nums; }
.wr-clock button { width: 28px; height: 26px; display: grid; place-items: center; padding: 0; font-size: 11px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.wr-sc { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.wr-sc .ico { font-size: 20px; }
.wr-sc b { font-family: var(--cond); font-size: 18px; }
.wr-sc i { font-style: normal; font-size: 12px; color: var(--ink-dim); }
.wr-sc.me b { color: var(--amber); }
.wr-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: calc(100% - 120px); padding: 7px 14px; background: rgba(13, 14, 12, 0.88); border: 1px solid rgba(226, 172, 70, 0.5); font-size: 13px; text-align: center; pointer-events: none; }
.wr-hint.flash { border-color: var(--amber); color: var(--amber); }
.wr-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.wr-zoom button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; font-size: 18px; background: rgba(13, 14, 12, 0.85); border: 1px solid rgba(255, 255, 255, 0.16); }
.wr-zoom button svg { width: 16px; height: 16px; }
.wr-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 9, 7, 0.6); }
.wr-overbox { width: min(440px, calc(100% - 32px)); padding: 22px; text-align: center; background: rgba(20, 21, 18, 0.96); border: 1px solid var(--amber); }
.wr-overbox span { font-family: var(--cond); font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber); }
.wr-overbox h2 { margin: 6px 0; font-family: var(--cond); font-size: 32px; text-transform: uppercase; letter-spacing: 0.05em; }
.wr-overbox p { color: var(--ink-dim); font-size: 13px; line-height: 1.5; }
.wr-detail h2 { margin: 0; font-family: var(--cond); font-size: 28px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-wrap: balance; }
.wr-where { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-dim); }
.wr-where .ico { font-size: 20px; }
.wr-resl { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.wr-res { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; }
.wr-res span { color: var(--ink-dim); text-transform: capitalize; }
.wr-res b { font-family: var(--cond); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wr-res i { grid-column: 1 / -1; height: 4px; background: rgba(255, 255, 255, 0.08); }
.wr-res u { display: block; height: 100%; background: #9fbf5a; }
.wr-res u.m { background: #d6a64a; }
.wr-res u.x { background: #6f9fd0; }
.wr-facts { font-size: 11px; color: var(--ink-dim); line-height: 1.5; }
.wr-caps, .wr-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.wr-caps button, .wr-acts button, .wr-bbtn button { padding: 7px 12px; font-family: var(--cond); font-size: 15px; letter-spacing: 0.05em; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.18); }
.wr-caps button:hover:not(:disabled), .wr-acts button:hover:not(:disabled), .wr-bbtn button:hover:not(:disabled) { border-color: var(--amber); }
.wr-detail button:disabled { opacity: 0.45; cursor: default; }
.lo-note.warn { color: #e0a074; }
.wr-up { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; width: 100%; padding: 8px 10px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.wr-up b { font-family: var(--cond); font-size: 16px; }
.wr-up span { font-family: var(--cond); font-size: 14px; color: var(--amber); }
.wr-up small { grid-column: 1 / -1; font-size: 11px; color: var(--ink-dim); }
.wr-up:hover:not(:disabled) { border-color: var(--amber); }
.wr-battle { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; background: rgba(201, 80, 60, 0.1); border: 1px solid rgba(201, 80, 60, 0.45); }
.wr-battle .k { font-family: var(--cond); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #e0806c; }
.wr-battle b { font-family: var(--cond); font-size: 19px; font-weight: 600; }
.wr-battle small { font-size: 12px; color: var(--ink-dim); }
.wr-bbtn { display: flex; gap: 6px; margin-top: 6px; }
.wr-bbtn button[data-act='join'] { flex: 1; }
.wr-newslist { display: flex; flex-direction: column; gap: 4px; }
.wr-news { display: grid; grid-template-columns: 62px 1fr; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--ink-dim); }
.wr-news time { font-family: var(--cond); font-size: 12px; color: rgba(185, 178, 159, 0.7); font-variant-numeric: tabular-nums; }
.wr-news.a-US span { color: #b9cf8a; }
.wr-news.a-GE span { color: #a9c0dc; }
.wr-news.a-SU span { color: #e09a90; }
.wr-buy { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-bottom: 6px; text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.wr-buy:hover:not(:disabled) { border-color: var(--amber); }
.wr-buy:disabled { opacity: 0.5; cursor: default; }
.wr-buy .wr-sign { width: 42px; height: 28px; }
.wr-buy .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wr-buy .t b { font-family: var(--cond); font-size: 19px; }
.wr-buy .t small, .wr-buy .p small { font-size: 12px; color: var(--ink-dim); }
.wr-buy .p { text-align: right; display: flex; flex-direction: column; }
.wr-buy .p b { font-family: var(--cond); font-size: 19px; color: var(--amber); }
.wr-new { grid-column: 1 / -1; align-self: center; justify-self: center; width: min(760px, 100%); }
.wr-new h2 { margin: 2px 0 6px; font-family: var(--cond); font-size: 32px; text-transform: uppercase; letter-spacing: 0.04em; }
.wr-new p { color: var(--ink-dim); font-size: 14px; line-height: 1.55; max-width: 62ch; }
.wr-armies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.wr-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); }
.wr-pick .ico { font-size: 54px; margin-bottom: 4px; }
.wr-pick b { font-family: var(--cond); font-size: 21px; letter-spacing: 0.06em; text-transform: uppercase; }
.wr-pick small { font-size: 12px; color: var(--ink-dim); text-align: center; }
.wr-pick em { font-style: normal; font-size: 12px; color: var(--amber); }
.wr-pick:hover, .wr-pick.on { border-color: var(--amber); }
.wr-staged { margin-top: 8px; }
@media (max-width: 1100px) {
  .fe-generals { grid-template-columns: 240px minmax(0, 1fr) 280px; }
}
@media (max-width: 860px) {
  .fe-generals .wr-mapbox { min-height: 60vh; }
  .wr-armies { grid-template-columns: 1fr; }
}
.np-gen { margin-left: 8px; padding: 1px 6px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; vertical-align: 3px; color: #1b160c; background: var(--amber); }
.np-promote { pointer-events: auto; margin-top: 6px; padding: 4px 10px; font-family: var(--cond); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); background: rgba(226, 172, 70, 0.1); border: 1px solid rgba(226, 172, 70, 0.6); }
.fe-nameplate h2 { display: inline; }
.np-pen { pointer-events: auto; margin-left: 8px; padding: 2px 4px; font-size: 15px; line-height: 1; vertical-align: 2px; color: var(--ink-dim); background: none; border: 1px solid transparent; cursor: pointer; }
.np-pen:hover { color: var(--amber); border-color: rgba(226, 172, 70, 0.5); }
.fe .np-name, .fe .np-name:focus-visible { pointer-events: auto; display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0 0 1px; font-family: var(--cond); font-size: 24px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2; color: var(--ink); background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.3); border-radius: 0; outline: none; }
.np-promote:hover { background: rgba(226, 172, 70, 0.22); }
.wr-lockline { color: var(--ink); }
.wr-hire:disabled { opacity: 0.5; cursor: default; }

/* Sign-in (src/ui/signIn.js), first thing online. */
.si { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: radial-gradient(120% 90% at 50% 30%, #2a2b24, #0d0e0b 70%); color: var(--ink); overflow-y: auto; }
.si-panel { width: min(400px, 100%); padding: 26px 26px 20px; background: rgba(20, 21, 18, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.si-msg { display: flex; flex-direction: column; gap: 18px; text-align: center; }
.si-msg p { margin: 0; font-size: 15px; line-height: 1.5; }
.si-brand { font-family: var(--cond); font-size: 34px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; }
.si-brand span { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); }
.si-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.si-tabs button { padding: 10px 0; font-family: var(--cond); font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.si-tabs button.on { color: var(--amber); background: rgba(226, 172, 70, 0.12); }
.si-form { display: flex; flex-direction: column; gap: 12px; }
.si-form label { display: flex; flex-direction: column; gap: 5px; font-family: var(--cond); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.si-form label[hidden] { display: none; }
.si-form input { padding: 10px 12px; font: 15px var(--font); letter-spacing: 0; text-transform: none; color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 0; }
.si-form input:focus { outline: none; border-color: var(--amber); background: rgba(255, 255, 255, 0.08); }
.si-error { padding: 8px 10px; font-size: 13px; line-height: 1.4; color: #f0b9a8; background: rgba(170, 60, 40, 0.18); border: 1px solid rgba(200, 90, 70, 0.5); }
.si .si-go { margin-top: 4px; padding: 12px; font-size: 20px; cursor: pointer; }
.si-go:disabled { opacity: 0.7; cursor: default; }
.si-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; text-align: center; color: var(--ink-dim); }
.fe-account { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; font-family: var(--cond); font-size: 14px; letter-spacing: 0.06em; color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); cursor: pointer; }
.fe-account:hover { border-color: var(--amber); }

/* Friends and party (frontend.js friendsWindow). */
.fe-friends { position: relative; padding: 6px 10px; font-family: var(--cond); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); cursor: pointer; }
.fe-friends:hover, .fe-friends.party { border-color: var(--amber); }
.fe-friends i { position: absolute; top: -7px; right: -7px; min-width: 18px; padding: 1px 5px; font: 700 11px/16px var(--font); font-style: normal; text-align: center; color: #1b160c; background: var(--amber); border-radius: 9px; }
.fe-friends i:empty { display: none; }
.fr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 760px) { .fr { grid-template-columns: minmax(0, 1fr); } }
.fr-col { display: grid; gap: 8px; align-content: start; min-width: 0; }
.fr h3 { margin: 6px 0 0; font: 600 12px var(--cond); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.fr-add, .fr-say { display: flex; gap: 8px; }
.fr input { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; color: var(--ink); background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.16); outline: none; }
.fr input:focus { border-color: var(--amber); }
.fr button { padding: 6px 12px; font: 600 13px var(--cond); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); cursor: pointer; }
.fr button:hover { border-color: var(--amber); }
.fr-note { min-height: 1.2em; font-size: 13px; color: var(--ink-dim); }
.fr-list, .fr-party { display: grid; gap: 4px; }
.fr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 6px 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.07); }
.fr-row .dot { grid-row: 1 / span 2; width: 9px; height: 9px; border-radius: 50%; background: #666; }
.fr-row.menus .dot { background: #8fbf6a; }
.fr-row.battle .dot { background: var(--amber); }
.fr-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row small { grid-column: 2; font-size: 12px; color: var(--ink-dim); }
.fr-btns { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 6px; }
.fr-inv { grid-template-columns: minmax(0, 1fr) auto; border-color: var(--amber); }
.fr-inv .fr-btns { grid-column: 2; }
.fr-warn { padding: 6px 8px; font-size: 13px; color: #f1d39a; border: 1px solid rgba(226, 172, 70, 0.5); }
.fr-chat { display: grid; gap: 6px; margin-top: 8px; }
.fr-chat[hidden] { display: none; }
.fr-log { height: 160px; overflow-y: auto; padding: 6px 8px; font-size: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); }
.fr-line b { color: var(--ink-dim); font-weight: 600; }
.fr-line.mine b { color: var(--amber); }

/* Chat in battle (chat.js). */
.hud-chat { position: absolute; left: 16px; bottom: 26%; width: min(440px, 46vw); display: grid; gap: 4px; pointer-events: none; font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); }
.hc-lines { display: grid; gap: 2px; }
.hc-line { padding: 1px 6px; color: #f0ead9; }
.hud-chat.typing .hc-lines { background: rgba(10, 11, 9, 0.45); }
.hc-line i { font-style: normal; color: #f1d39a; }
.hc-line.party i { color: #9fd0f0; }
.hc-line b { color: #b9d79a; font-weight: 600; }
.hc-line.all b { color: #e9c57a; }
.hc-line.mine b { color: var(--amber); }
.hc-say { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(10, 11, 9, 0.8); border: 1px solid var(--amber); pointer-events: auto; }
.hc-say[hidden] { display: none; }
.hc-say span { font: 600 13px var(--cond); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); white-space: nowrap; }
.hc-say input { flex: 1; min-width: 0; font: inherit; color: #f0ead9; background: none; border: 0; outline: none; }
