:root {
  color-scheme: dark;
  --ink: #f7efe2;
  --muted: #b9c0b3;
  --panel: rgba(24, 27, 24, 0.82);
  --panel-strong: rgba(12, 14, 13, 0.92);
  --line: rgba(255, 255, 255, 0.15);
  --green: #30b45d;
  --green-dark: #167447;
  --gold: #d8aa43;
  --blue: #3ca9d6;
  --red: #d95b4f;
  --violet: #a071d7;
  --stone: #a8aaa0;
  --wood: #9c7048;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #141813;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(8, 12, 11, 0.9), rgba(8, 12, 11, 0.74) 42%, rgba(8, 12, 11, 0.86)),
    url("./assets/pointcast-rts-reference.png") center / cover fixed;
}

button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(64, 70, 62, 0.92), rgba(30, 34, 31, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, opacity 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 170, 67, 0.72);
}

button:focus-visible {
  outline: 3px solid rgba(60, 169, 214, 0.72);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

button.is-active,
#overlayAction,
#startWaveButton {
  border-color: rgba(48, 180, 93, 0.76);
  background: linear-gradient(180deg, rgba(39, 132, 74, 0.98), rgba(21, 82, 52, 0.98));
}

h1,
h2,
p {
  margin-top: 0;
}

.game-shell {
  width: min(1780px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 24px;
}

.top-hud,
.play-grid {
  display: grid;
  gap: 14px;
}

.top-hud {
  grid-template-columns: minmax(300px, 0.82fr) minmax(620px, 1.3fr) minmax(260px, 0.5fr);
  align-items: stretch;
  margin-bottom: 14px;
}

.brand-panel,
.resource-panel,
.control-panel,
.panel,
.battle-panel,
.command-deck {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-panel {
  min-height: 124px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(28, 92, 60, 0.88), rgba(23, 30, 28, 0.9) 55%),
    rgba(24, 27, 24, 0.82);
}

.eyebrow {
  margin: 0 0 8px;
  color: #8ce0a7;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 9px;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.mission-copy,
#objectiveText,
#selectedDescription {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.resource-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.resource-tile,
.control-panel div,
.intel-list div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.resource-tile {
  position: relative;
  overflow: hidden;
  padding: 13px 12px;
}

.resource-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent, var(--green));
}

.resource-tile.wood { --accent: var(--wood); }
.resource-tile.food { --accent: var(--green); }
.resource-tile.gold { --accent: var(--gold); }
.resource-tile.stone { --accent: var(--stone); }
.resource-tile.signal { --accent: var(--blue); }
.resource-tile.pop { --accent: var(--violet); }

.resource-tile span,
.control-panel span,
.intel-list dt,
.command-label,
.health-readout span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.resource-tile strong,
.control-panel strong,
.intel-list dd {
  display: block;
  overflow-wrap: anywhere;
  margin: 5px 0 0;
  color: #fff7e8;
  font-size: clamp(1.08rem, 1.5vw, 1.65rem);
  line-height: 1;
}

.control-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.control-panel div,
.control-panel button {
  min-height: 52px;
}

.control-panel div {
  padding: 10px 11px;
}

.play-grid {
  grid-template-columns: 285px minmax(0, 1fr) 300px;
  align-items: start;
}

.left-rail,
.right-rail {
  display: grid;
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.panel-heading {
  margin-bottom: 13px;
}

.objective-meter,
.health-readout i {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.objective-meter {
  margin-bottom: 12px;
}

.objective-meter span,
.health-readout b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 180ms ease;
}

.intel-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.intel-list div {
  padding: 11px;
}

.intel-list dd {
  font-size: 1.12rem;
}

.event-log {
  display: grid;
  gap: 8px;
}

.event-log p {
  margin: 0;
  border-left: 3px solid rgba(48, 180, 93, 0.72);
  padding: 8px 9px;
  color: #efe4d0;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.84rem;
  line-height: 1.35;
}

.battle-panel {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: rgba(13, 17, 15, 0.86);
}

.canvas-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #101712;
}

#gameCanvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  cursor: crosshair;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 22px;
  background: linear-gradient(180deg, rgba(5, 8, 7, 0.24), rgba(5, 8, 7, 0.58));
}

.game-overlay.is-visible {
  display: grid;
}

.game-overlay > div {
  width: min(520px, 100%);
  max-width: calc(100% - 24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 24px;
  background: rgba(18, 23, 21, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.game-overlay h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.game-overlay p {
  color: var(--muted);
}

.command-deck {
  display: grid;
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  gap: 12px;
  border-width: 0;
  border-radius: 0;
  padding: 12px;
  box-shadow: none;
}

.selected-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 13px;
  background: rgba(0, 0, 0, 0.24);
}

.selected-copy h2 {
  margin-bottom: 8px;
  font-size: 1.24rem;
}

.health-readout {
  display: grid;
  gap: 7px;
}

.health-readout i {
  height: 9px;
}

.command-groups {
  display: grid;
  grid-template-columns: 0.78fr 1.38fr 0.98fr;
  gap: 10px;
}

.command-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.command-label {
  grid-column: 1 / -1;
  margin: 0 0 1px;
}

.command-group button {
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
  font-size: 0.78rem;
  line-height: 1.05;
}

.command-group button span {
  display: block;
  margin-top: 2px;
  color: #d7caa9;
  font-size: 0.68rem;
  line-height: 1;
}

.mini-panel canvas {
  display: block;
  width: 100%;
  aspect-ratio: 26 / 17;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.faction-list {
  display: grid;
  gap: 8px;
}

.faction-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.22);
}

.faction-row strong,
.faction-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-row strong {
  color: #fff7e8;
  font-size: 0.9rem;
}

.faction-row span {
  color: var(--muted);
  font-size: 0.8rem;
}

.reference-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

@media (max-width: 1280px) {
  .top-hud,
  .play-grid {
    grid-template-columns: 1fr;
  }

  .resource-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .left-rail,
  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-panel,
  .reference-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .game-shell {
    width: min(100% - 18px, 1780px);
    padding-top: 10px;
  }

  .brand-panel,
  .panel {
    padding: 12px;
  }

  .resource-panel,
  .control-panel,
  .left-rail,
  .right-rail,
  .command-deck,
  .command-groups {
    grid-template-columns: 1fr;
  }

  .resource-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.1rem);
  }

  .mission-copy,
  #objectiveText,
  #selectedDescription {
    font-size: 0.96rem;
  }

  .game-overlay {
    padding: 12px;
  }

  .game-overlay > div {
    padding: 18px 14px;
  }

  .game-overlay h2 {
    font-size: clamp(1.55rem, 9vw, 2.35rem);
  }
}

/* RTS screenshot mode */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #10120f;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  box-shadow:
    inset 0 0 0 3px #1d1b18,
    inset 0 0 0 7px rgba(206, 197, 162, 0.18),
    inset 0 0 42px rgba(0, 0, 0, 0.74);
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.top-hud {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 390px;
  gap: 8px;
  align-items: start;
  height: 54px;
  margin: 0;
  padding: 7px 8px 0;
  background:
    linear-gradient(180deg, rgba(16, 16, 15, 0.96), rgba(32, 31, 28, 0.86) 74%, transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 12px);
  border-bottom: 2px solid rgba(214, 201, 154, 0.28);
}

.brand-panel {
  order: 2;
  min-height: 40px;
  padding: 6px 16px 7px;
  text-align: center;
  background: linear-gradient(180deg, rgba(55, 50, 43, 0.98), rgba(19, 20, 19, 0.96));
}

.brand-panel .eyebrow,
.mission-copy {
  display: none;
}

.brand-panel h1 {
  margin: 0;
  color: #eadfc4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1.45;
  text-shadow: 0 2px 0 #000;
}

.resource-panel {
  order: 1;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.resource-tile {
  display: grid;
  grid-template-columns: 26px auto;
  align-items: center;
  gap: 4px;
  min-width: 86px;
  height: 39px;
  padding: 3px 9px 3px 4px;
  border: 1px solid rgba(218, 207, 164, 0.32);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(24, 24, 23, 0.98), rgba(6, 7, 7, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 2px 4px rgba(0,0,0,0.45);
}

.resource-tile::before {
  position: static;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 2px;
  background:
    radial-gradient(circle at 34% 34%, rgba(255,255,255,0.42), transparent 22%),
    var(--accent, var(--green));
}

.resource-tile span {
  display: none;
}

.resource-tile strong {
  margin: 0;
  color: #f8f0d7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  text-shadow: 0 2px 0 #000;
}

.control-panel {
  order: 3;
  display: grid;
  grid-template-columns: 76px 86px 38px 38px 52px 118px;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.control-panel button {
  overflow: hidden;
  padding: 0;
  text-indent: -999px;
  position: relative;
}

.control-panel button::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-indent: 0;
  font-size: 1.05rem;
}

#pauseButton::after {
  content: "Ⅱ";
}

#restartButton::after {
  content: "↻";
}

#modeButton {
  color: #b9fff4;
  text-indent: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-weight: 900;
}

#modeButton::after {
  content: "";
}

#modeButton.is-active {
  border-color: rgba(36, 224, 223, 0.78);
  background: linear-gradient(180deg, rgba(31, 101, 108, 0.98), rgba(12, 47, 55, 0.98));
}

.control-panel div,
.control-panel button,
.agent-picker {
  min-height: 39px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(38, 37, 34, 0.98), rgba(10, 11, 10, 0.98));
}

.control-panel div,
.agent-picker {
  padding: 5px 8px;
}

.control-panel span,
.agent-picker span {
  font-size: 0.58rem;
}

.control-panel strong {
  margin-top: 1px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.agent-picker {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(218, 207, 164, 0.32);
}

.agent-picker select {
  width: 100%;
  min-width: 0;
  border: 0;
  color: #f8f0d7;
  background: transparent;
  font: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 900;
}

.play-grid {
  position: absolute;
  inset: 0;
  display: block;
}

.battle-panel {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #111712;
}

.canvas-wrap {
  position: absolute;
  inset: 48px 0 0 0;
  border: 0;
  background: #1c241b;
}

.mission-strip {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 310px;
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, auto));
  gap: 0;
  overflow: hidden;
  min-width: 390px;
  border: 1px solid rgba(214, 201, 154, 0.34);
  background: rgba(11, 13, 11, 0.76);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.32);
}

.mission-strip div {
  min-width: 0;
  padding: 6px 11px 7px;
  border-right: 1px solid rgba(214, 201, 154, 0.18);
}

.mission-strip div:last-of-type {
  border-right: 0;
}

.mission-strip span {
  display: block;
  color: #9ed8a5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mission-strip strong {
  display: block;
  overflow: hidden;
  color: #f5ead0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-strip i {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  background: rgba(0, 0, 0, 0.45);
}

.mission-strip b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #38ca63, #7be1ff);
  transition: width 180ms ease;
}

.coach-panel {
  position: absolute;
  z-index: 8;
  top: 72px;
  left: 310px;
  width: min(330px, calc(100vw - 760px));
  min-width: 268px;
  padding: 9px 11px 10px;
  border: 1px solid rgba(214, 201, 154, 0.28);
  background: rgba(11, 13, 11, 0.68);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  color: #e9dec4;
}

.coach-panel .eyebrow {
  margin-bottom: 4px;
  color: #87d68d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.coach-panel h2 {
  margin: 0 0 4px;
  color: #f6ecd3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.1;
}

.coach-panel p {
  margin: 0;
  color: #d7c49c;
  font-size: 0.72rem;
  line-height: 1.35;
}

#gameCanvas {
  width: 100%;
  height: calc(100vh - 48px);
  max-width: none;
  aspect-ratio: auto;
}

.left-rail {
  position: absolute;
  z-index: 7;
  top: 118px;
  left: 20px;
  width: 272px;
  display: block;
}

.left-rail .mission-panel,
.left-rail > .panel:not(.log-panel) {
  display: none;
}

.log-panel {
  padding: 8px 10px;
  border-radius: 1px;
  border: 1px solid rgba(214, 201, 154, 0.28);
  background: rgba(20, 19, 17, 0.7);
  box-shadow: 0 4px 12px rgba(0,0,0,0.34);
}

.log-panel .panel-heading {
  display: none;
}

.event-log {
  gap: 2px;
}

.event-log p {
  border-left: 0;
  padding: 0;
  color: #f0f0e8;
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-shadow: 0 2px 0 #000;
}

.event-log p:nth-child(1) {
  color: #5dd2ff;
}

.event-log p:nth-child(2) {
  color: #49ef66;
}

.command-deck {
  position: absolute;
  z-index: 9;
  left: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 275px minmax(410px, 610px);
  gap: 0;
  width: min(980px, calc(100vw - 420px));
  height: 190px;
  padding: 8px 10px 10px;
  border-top: 3px double rgba(214, 201, 154, 0.55);
  border-right: 3px double rgba(214, 201, 154, 0.55);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(64, 60, 52, 0.98), rgba(23, 22, 20, 0.98)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 8px);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.45);
}

.selected-panel,
.command-group {
  border-radius: 1px;
  border-color: rgba(214, 201, 154, 0.25);
  background: rgba(0, 0, 0, 0.3);
}

.selected-panel {
  padding: 12px 14px;
}

.selected-copy .eyebrow,
.command-label {
  color: #d2c290;
}

.selected-copy h2 {
  color: #f5ead0;
  font-family: Georgia, "Times New Roman", serif;
}

.selected-copy p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
}

.health-readout span {
  color: #e8dcc0;
}

.command-groups {
  grid-template-columns: 0.8fr 1.35fr 0.9fr;
  gap: 8px;
  padding-left: 10px;
}

.command-group {
  gap: 6px;
  padding: 7px;
}

.command-group button {
  min-height: 37px;
  border-radius: 1px;
  border-color: rgba(214, 201, 154, 0.24);
  background: linear-gradient(180deg, rgba(80, 82, 72, 0.94), rgba(25, 26, 24, 0.98));
  color: #f3ead6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
}

.command-group button span {
  color: #d6c698;
  font-size: 0.61rem;
}

.broadcast-panel {
  position: absolute;
  z-index: 12;
  right: 426px;
  bottom: 198px;
  width: 390px;
  border: 3px double rgba(214, 201, 154, 0.58);
  background: linear-gradient(180deg, rgba(31, 29, 25, 0.97), rgba(9, 10, 9, 0.96));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.48);
}

.broadcast-panel[hidden] {
  display: none;
}

.broadcast-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(214, 201, 154, 0.28);
}

.broadcast-heading .eyebrow {
  margin-bottom: 3px;
  color: #8ce0a7;
  font-size: 0.64rem;
}

.broadcast-heading h2 {
  color: #f5ead0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.broadcast-heading button {
  min-height: 31px;
  border-radius: 1px;
  padding: 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.74rem;
}

.broadcast-tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 9px 10px 0;
}

.broadcast-tracks button {
  min-height: 34px;
  border-radius: 1px;
  padding: 0 8px;
  color: #f3ead6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
}

.broadcast-frame {
  padding: 10px;
}

.broadcast-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(214, 201, 154, 0.24);
  background: #050505;
}

.right-rail {
  position: absolute;
  z-index: 10;
  right: 10px;
  bottom: 0;
  width: 410px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.right-rail > .panel:not(.mini-panel):not(:nth-child(2)) {
  display: none;
}

.mini-panel {
  order: 2;
  height: 182px;
  padding: 10px;
  border: 3px double rgba(214, 201, 154, 0.55);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(52, 47, 39, 0.98), rgba(20, 18, 16, 0.98));
}

.mini-panel .panel-heading {
  display: none;
}

.mini-panel canvas {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border-color: rgba(7, 7, 7, 0.8);
}

.right-rail > .panel:nth-child(2) {
  order: 1;
  margin-bottom: 0;
  padding: 8px 10px;
  border: 2px solid rgba(214, 201, 154, 0.32);
  border-bottom: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(26, 25, 22, 0.94), rgba(11, 12, 11, 0.92));
}

.right-rail > .panel:nth-child(2) .panel-heading {
  display: none;
}

.faction-list {
  gap: 4px;
}

.faction-row {
  border-radius: 0;
  padding: 2px 4px 2px 8px;
  background: transparent;
  border-color: transparent;
  color: #f4eacb;
}

.faction-row strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
}

.faction-row span {
  color: #e9ddbf;
  font-family: Georgia, "Times New Roman", serif;
}

.game-overlay {
  inset: 48px 0 0 0;
  background: rgba(0, 0, 0, 0.18);
}

.game-overlay > div {
  width: min(500px, 80vw);
  border-radius: 1px;
  border: 2px solid rgba(214, 201, 154, 0.34);
  background: rgba(18, 18, 16, 0.78);
}

.game-overlay h2 {
  font-family: Georgia, "Times New Roman", serif;
}

@media (max-width: 1100px) {
  html,
  body {
    overflow: auto;
  }

  .game-shell {
    min-width: 1100px;
    min-height: 720px;
  }
}
