/* WARZONE art direction: painted warfront, brass, charcoal, ivory. */
:root {
  --ink: #101b20;
  --panel: #17262b;
  --panel-deep: #101c21;
  --ivory: #eee8d7;
  --muted: #a5b0ab;
  --brass: #cfaa67;
  --line: #52605c;
  --allied: #83b7d2;
  --danger: #db8378;
  --hud-shadow: 0 12px 35px #0007, inset 0 1px #ffffff0a;
}
body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ivory);
  background: var(--ink);
}
button,
input,
select {
  font-family: inherit;
}
button:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #f2ce89 !important;
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
#main-menu {
  isolation: isolate;
  justify-content: flex-start;
  align-items: center;
  background: #111c23;
  overflow: hidden;
}
.title-art,
.title-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}
.title-art {
  background: url("../assets/art/warzone-keyart.webp") 65% center/cover
    no-repeat;
  animation: warfront-drift 35s ease-in-out infinite alternate;
  transform: scale(1.015);
}
.title-vignette {
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      #0c1922e8 0%,
      #0d1922a8 30%,
      #0d19222b 57%,
      transparent 76%
    ),
    linear-gradient(
      0deg,
      #0a151de0,
      transparent 25%,
      transparent 80%,
      #0a151d77
    );
}
.title-masthead {
  position: absolute;
  top: 30px;
  left: 5.5%;
  right: 5.5%;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #e0d9c4;
  letter-spacing: 3px;
  font-size: 10px;
  font-weight: 700;
}
.brand-mark {
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  width: 33px;
  height: 36px;
  clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 20px;
  color: var(--brass);
}
.masthead-rule {
  height: 1px;
  background: #b6b39c40;
  flex: 1;
  margin-left: 14px;
}
.masthead-edition {
  color: #b7bba9;
  font-size: 9px;
}
#main-menu .menu-content {
  text-align: left;
  padding: 0;
  margin: 45px 0 0 7.5%;
  width: min(430px, 40vw);
  background: none;
  border: 0;
  backdrop-filter: none;
  position: relative;
  max-height: calc(100dvh - 165px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #8b7549 transparent;
}
.menu-eyebrow {
  font-size: 10px;
  color: var(--brass);
  font-weight: 700;
  letter-spacing: 3.2px;
  margin-bottom: 18px;
}
#main-menu .menu-title {
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(65px, 7.5vw, 122px);
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 0.95;
  color: #f1ecda;
  text-shadow: 0 4px 28px #0004;
  margin: 0;
  white-space: nowrap;
}
.title-rule {
  display: block;
  width: 54px;
  height: 4px;
  background: var(--brass);
  margin: 23px 0 16px;
}
#main-menu .menu-subtitle {
  font-size: 14px;
  letter-spacing: 0.6px;
  color: #c3c9c2;
  text-transform: none;
  margin: 0 0 29px;
  line-height: 1.5;
}
#main-menu .menu-buttons {
  align-items: stretch;
  gap: 8px;
}
#main-menu .menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 15px 18px;
  min-height: 70px;
  border: 1px solid #a8b6a728;
  background: linear-gradient(100deg, #16252bdd, #17232b8a);
  color: var(--ivory);
  border-radius: 2px;
  box-shadow: none;
  letter-spacing: 0;
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.18s;
}
#main-menu .menu-btn:hover {
  border-color: #d6b374;
  background: #22333be8;
  box-shadow: none;
  transform: translateX(4px);
}
#main-menu .menu-btn.deploy-btn {
  background: linear-gradient(115deg, #d7b578, #b78c47);
  border-color: #f1d296;
  color: #172126;
  box-shadow:
    0 6px 25px #0003,
    inset 0 1px #ffffff40;
}
#main-menu .deploy-btn:hover {
  background: #e7c68a;
  box-shadow: 0 5px 26px #c3a05a28;
}
.menu-index {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.6;
  border-right: 1px solid currentColor;
  padding-right: 13px;
  line-height: 26px;
}
.menu-action {
  flex: 1;
}
.menu-action strong {
  display: block;
  font-size: 15px;
  letter-spacing: 2px;
  font-weight: 750;
}
.menu-action small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1px;
  text-transform: none;
  margin-top: 5px;
  font-weight: 400;
  opacity: 0.75;
}
.menu-arrow {
  font-size: 23px;
  font-weight: 400;
  opacity: 0.8;
}
.menu-secondary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 14px;
}
.menu-secondary-actions button {
  background: none;
  border: 0;
  color: #aebbb8;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
  line-height: 1.7;
}
.menu-secondary-actions b {
  display: block;
  color: #dbc08c;
  font-size: 11px;
  font-weight: 600;
}
.menu-secondary-actions button:hover {
  color: #fff;
}
.operations-menu {
  border-top: 1px solid #adb5a42b;
  padding-top: 12px;
  color: #bcc3b8;
}
.operations-menu summary {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.operations-menu summary::-webkit-details-marker {
  display: none;
}
.operations-menu summary span {
  color: var(--brass);
  font-size: 16px;
  line-height: 12px;
}
.operations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.operations-grid button {
  border: 1px solid #9cab9e30;
  color: #c4ccc4;
  background: #17262bd9;
  padding: 9px 4px;
  font-size: 10px;
  cursor: pointer;
  border-radius: 2px;
}
.operations-grid button:hover {
  border-color: var(--brass);
  color: #fff;
}
.title-caption {
  position: absolute;
  bottom: 102px;
  right: 5.5%;
  text-align: right;
  pointer-events: none;
}
.caption-line {
  display: block;
  width: 35px;
  height: 2px;
  background: var(--brass);
  margin: 0 0 12px auto;
}
.title-caption small {
  font-size: 9px;
  letter-spacing: 3px;
  color: #e8d6ae;
}
.title-caption p {
  font-size: 13px;
  margin-top: 8px;
  color: #c4c6b9;
}
.title-footer {
  position: absolute;
  bottom: 25px;
  left: 5.5%;
  right: 5.5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #b6b39c30;
  padding-top: 16px;
  color: #9dadae;
  font-size: 9px;
  letter-spacing: 2px;
}
.title-footer i {
  font-style: normal;
  color: var(--brass);
  margin: 0 8px;
}
.title-footer button {
  background: none;
  border: 0;
  color: #e2dccb;
  font-size: 11px;
  cursor: pointer;
  letter-spacing: 1px;
}
.title-footer button span {
  margin-left: 12px;
  color: var(--brass);
}
@keyframes warfront-drift {
  from {
    transform: scale(1.015) translateX(0);
  }
  to {
    transform: scale(1.055) translateX(-0.5%);
  }
}
/* The briefing and secondary screens carry the same materials and palette. */
#nation-select,
#multiplayer-screen,
#challenge-select,
#game-over {
  background:
    linear-gradient(100deg, #0b1720f5, #13252eea),
    url("../assets/art/warzone-keyart.webp") center/cover !important;
  overflow: auto;
  padding: 30px 0;
}
.nation-select-content,
.mp-content,
.game-over-content {
  background: linear-gradient(140deg, #1b2b30f7, #111f26f5);
  border: 1px solid #80908655;
  border-top: 2px solid var(--brass);
  box-shadow: 0 24px 90px #0006;
  border-radius: 3px;
  backdrop-filter: blur(12px);
}
.nation-select-content {
  max-width: 1000px;
  padding: 27px 36px;
  max-height: calc(100dvh - 55px);
  overflow: auto;
  scrollbar-color: #8b7549 #142128;
  scrollbar-width: thin;
}
.nation-select-title,
.mp-title,
.game-over-title {
  font-family: Impact, "Arial Narrow", sans-serif;
  color: var(--ivory);
  text-shadow: none;
  letter-spacing: 3px;
  font-size: 34px;
  margin-bottom: 10px;
}
.briefing-intro {
  color: #aebbb7;
  font-size: 12px;
  margin-bottom: 24px;
}
.nation-select-content > .menu-eyebrow {
  margin-bottom: 10px;
}
.nation-panels {
  gap: 18px;
  margin-bottom: 18px;
}
.nation-panel {
  padding: 16px;
  background: #0d1b2188;
  border: 1px solid #6c827e50;
}
.panel-header {
  font-size: 10px;
  letter-spacing: 2px;
}
.allied-panel .panel-header {
  color: #9cc2d5;
}
.enemy-panel .panel-header {
  color: #db9c8e;
}
.nation-card {
  background: #21343a66;
  border: 1px solid #78908b40;
  padding: 11px 12px;
  border-radius: 2px;
}
.nation-card:hover {
  border-color: #b8a276;
  background: #33484b88;
}
.nation-card.selected {
  border-color: var(--brass);
  background: #83744922;
  box-shadow: inset 3px 0 var(--brass);
}
.nation-name {
  color: var(--ivory);
}
.nation-passive {
  color: #adbab6;
}
.nation-ability {
  color: #b7cbd0;
}
.nation-flag {
  border: 1px solid #eee3;
  box-shadow: inset 0 1px #fff3;
  border-radius: 2px;
}
.menu-btn {
  border: 1px solid #687872;
  background: linear-gradient(#304144, #1b2b31);
  color: var(--ivory);
  text-shadow: none;
  box-shadow: none;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 1.5px;
}
.menu-btn:hover:not(:disabled) {
  border-color: var(--brass);
  background: linear-gradient(#43514b, #293b3b);
  box-shadow: none;
}
.menu-btn-secondary:hover {
  background: #34484b !important;
  border-color: #cab27e !important;
  box-shadow: none !important;
}
#btn-start-game,
.mp-ready-section > .menu-btn {
  background: linear-gradient(115deg, #d7b578, #b78c47);
  color: #182226;
  border-color: #e6c58a;
}
#btn-start-game:disabled {
  background: #3e4846;
  color: #84908b;
  border-color: #596860;
  opacity: 0.6;
}
.difficulty-btn,
.gamemode-btn,
.map-btn,
.biome-btn,
.mp-nation-btn {
  background: #203139;
  border: 1px solid #697c7650;
  color: #bfc9c4;
  border-radius: 2px;
}
.difficulty-btn.selected,
.gamemode-btn.selected,
.map-btn.selected,
.biome-btn.selected,
.mp-nation-btn.selected {
  background: #8d774c33;
  border-color: var(--brass);
  color: #f0ddba;
  box-shadow: none;
}
#options-panel,
#match-history,
#save-load-dialog > div,
#save-confirm-dialog > div {
  background: linear-gradient(140deg, #223238fa, #111e25fa) !important;
  border: 1px solid #9d8a5b !important;
  border-radius: 4px !important;
  box-shadow: var(--hud-shadow);
}
#options-panel button,
#match-history button {
  background: #2b3d40 !important;
  border: 1px solid #82918480 !important;
  color: #eee5ce !important;
}
/* Command HUD: one visual system, with a clear hierarchy and tactical breathing room. */
#resource-bar {
  top: 16px;
  left: 22px;
  right: 22px;
  height: 66px;
  padding: 0 18px;
  gap: 24px;
  border: 1px solid #7a897360;
  border-top: 2px solid var(--brass);
  background: linear-gradient(140deg, #1e3035f5, #101d24f2);
  border-radius: 3px;
  box-shadow: var(--hud-shadow);
  backdrop-filter: blur(12px);
}
.resource-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 16px 23px;
  column-gap: 10px;
  row-gap: 1px;
  min-width: 100px;
}
.resource-glyph {
  grid-row: 1/3;
  display: flex;
  align-items: center;
  color: #ceb476;
}
.resource-glyph svg {
  width: 25px;
  height: 25px;
}
.resource-label {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #a7b6b0;
  line-height: 16px;
}
.resource-value {
  font-size: 19px;
  line-height: 23px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  color: #e5dcc6;
  text-shadow: none;
  min-width: 0;
}
.resource-item:nth-child(2) .resource-glyph {
  color: #bd9380;
}
.resource-item:nth-child(3) .resource-glyph {
  color: #93b59a;
}
.resource-item:nth-child(4) .resource-glyph {
  color: #8cb6cb;
}
.resource-item:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: auto;
  margin-left: auto;
  gap: 6px;
}
#resource-bar button {
  color: #c4cfc8 !important;
  background: #ffffff04 !important;
  border: 1px solid #8b9b8850 !important;
  font-size: 10px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  border-radius: 2px !important;
}
#resource-bar button:hover {
  border-color: var(--brass) !important;
  color: #f6deb2 !important;
}
#selection-panel,
#command-card,
#minimap-container,
#production-panel,
#build-menu,
#prod-overview-panel {
  background: linear-gradient(135deg, #1e2f34f5, #101e25f5);
  border: 1px solid #87947b70;
  border-top: 2px solid var(--brass);
  box-shadow: var(--hud-shadow);
  border-radius: 3px;
  backdrop-filter: blur(10px);
}
#selection-panel {
  left: 22px;
  bottom: 22px;
  width: 300px;
  min-height: 145px;
  max-height: min(410px, calc(100dvh - 180px));
  overflow: auto;
  padding: 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: #8b7549 #142128;
}
.hud-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c9b383;
  letter-spacing: 2.2px;
  font-size: 8px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #a2b09625;
}
.selection-placeholder {
  font-style: normal;
  color: #a9b9b2;
  font-size: 12px;
  line-height: 1.7;
  display: block;
}
.selection-placeholder::before {
  content: "AWAITING ORDERS";
  display: block;
  color: #e8e1d0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 8px 0;
}
.selection-name {
  color: var(--ivory);
  font-size: 15px;
  letter-spacing: 1px;
}
.selection-hp-fill {
  background: #8ba97d;
}
.selection-detail {
  color: #b3c1bc;
}
.selection-portrait {
  width: 78px;
  height: 67px;
  float: left;
  margin: 0 12px 8px 0;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #3d514a, #1b2d32);
  border: 1px solid #7f8b7180;
  position: relative;
  overflow: hidden;
}
.selection-portrait svg {
  width: 58px;
  height: 48px;
  color: #d6c59b;
  filter: drop-shadow(0 4px 5px #0007);
}
.selection-portrait::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #ccd0ad18;
}
#command-card {
  bottom: 22px;
  left: 342px;
  transform: none;
  padding: 12px;
  width: 334px;
}
.hud-section-label:empty {
  display: none;
}
#command-card-grid {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 54px);
  gap: 6px;
}
.cc-btn {
  width: 100%;
  height: 54px;
  border: 1px solid #80908055;
  background: linear-gradient(#30434a, #1b2c34);
  border-radius: 2px;
  box-shadow: inset 0 1px #ffffff06;
}
.cc-btn:hover:not(:disabled) {
  border-color: var(--brass);
  background: #43564f;
  color: #fff0d1;
}
.cc-btn:disabled {
  opacity: 0.18;
}
.cc-btn .cc-icon {
  font-size: 19px;
  color: #d7c69e;
}
.cc-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.cc-btn .cc-key {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 8px;
  color: #b7c1b7;
}
.cc-label {
  font-size: 8px;
  color: #c6d0c8;
  line-height: 1.1;
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.cc-btn .cc-icon {
  margin-top: 0;
}
#minimap-container {
  bottom: 22px;
  right: 22px;
  width: 228px;
  height: 244px;
  padding: 12px 13px 12px;
  overflow: hidden;
}
#minimap-canvas {
  width: 200px;
  height: 200px;
  display: block;
  border: 1px solid #566c60;
}
.minimap-heading {
  font-size: 8px;
  padding-bottom: 8px;
  margin-bottom: 9px;
  letter-spacing: 1.5px;
}
.minimap-heading span {
  font-size: 7px;
  color: #81958e;
  letter-spacing: 1px;
}
#production-panel,
#build-menu {
  top: 100px;
  right: 22px;
  width: 268px;
  max-height: calc(100dvh - 380px);
  padding: 14px;
  overflow: auto;
  scrollbar-width: thin;
}
.production-title,
.build-title {
  color: #e2d7b9;
  border-color: #a4b28c30;
  letter-spacing: 2px;
  font-size: 11px;
}
.cmd-btn,
.prod-btn {
  color: #d4dbcf;
  border: 1px solid #71806a80 !important;
  background: linear-gradient(#2d4145, #1b2d33) !important;
  border-radius: 2px !important;
}
.cmd-btn:hover:not(:disabled),
.prod-btn:hover:not(:disabled) {
  border-color: var(--brass) !important;
  background: #3c514b !important;
}
.cmd-btn:focus-visible,
.prod-btn:focus-visible {
  outline-color: var(--brass);
}
#speed-toggle-btn {
  bottom: 276px !important;
  right: 22px !important;
  color: #e6c58a !important;
  border-color: #7e927480 !important;
  background: #172930eb !important;
}
#nation-ability-btn {
  top: 99px !important;
  left: 22px !important;
  transform: none !important;
  border: 1px solid #9d8c59 !important;
  background: linear-gradient(#34423b, #1b2b2d) !important;
  color: #e7d3a8 !important;
  font-size: 11px !important;
  padding: 10px 14px !important;
  box-shadow: var(--hud-shadow);
}
#control-group-bar {
  bottom: 6px !important;
  gap: 6px !important;
}
#control-group-bar > div {
  border-color: #9c8b5f !important;
  color: #ddcda8 !important;
  background: #15262aee !important;
}
#entity-tooltip {
  background: #17282ff5;
  border-color: #9c8b5f;
  color: #e2dcc9;
  box-shadow: var(--hud-shadow);
}
#loading-screen {
  background: #0b1720 !important;
}
.loading-bg {
  background:
    linear-gradient(90deg, #0b1720d9, #0b17208c),
    url("../assets/art/warzone-keyart.webp") center/cover !important;
}
.loading-title {
  font-family: Impact, "Arial Narrow", sans-serif;
  color: #eee7d5 !important;
  letter-spacing: 8px;
  text-shadow: none !important;
}
.loading-bar-fill {
  background: linear-gradient(90deg, #9c793e, #e6c58c) !important;
  box-shadow: 0 0 16px #c3a26533 !important;
}
.loading-tip,
.loading-detail {
  color: #b9c3ba !important;
}
@media (max-width: 1100px) {
  #resource-bar {
    gap: 15px;
    padding: 0 12px;
  }
  .resource-item {
    min-width: 85px;
  }
  .resource-glyph svg {
    width: 20px;
  }
  .resource-value {
    font-size: 16px;
  }
  #command-card {
    left: 322px;
    width: 300px;
  }
  #selection-panel {
    width: 280px;
  }
  .title-caption {
    max-width: 300px;
  }
  .masthead-edition {
    display: none;
  }
}
@media (max-width: 800px) {
  #main-menu .menu-content {
    width: min(410px, 75vw);
    margin-left: 7%;
    margin-top: 40px;
  }
  .title-art {
    background-position: 62% center;
  }
  .title-vignette {
    background:
      linear-gradient(90deg, #0c1922f0, #0c1922b8 55%, #0c19225e),
      linear-gradient(0deg, #0a151de0, transparent 30%);
  }
  .title-caption {
    display: none;
  }
  .title-masthead {
    top: 20px;
  }
  .title-footer {
    bottom: 18px;
  }
  #main-menu .menu-title {
    font-size: 75px;
  }
  .menu-eyebrow {
    letter-spacing: 2px;
    font-size: 9px;
  }
  #main-menu .menu-btn {
    min-height: 62px;
    padding: 12px 14px;
  }
  .menu-action strong {
    font-size: 13px;
  }
  .menu-subtitle {
    margin-bottom: 22px !important;
  }
  .nation-select-content {
    padding: 23px;
    width: 95%;
    max-height: calc(100dvh - 30px);
  }
  #resource-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    height: 57px;
    gap: 12px;
    padding: 0 10px;
  }
  .resource-glyph {
    display: none;
  }
  .resource-item {
    grid-template-columns: 1fr;
    min-width: 55px;
    gap: 0;
  }
  .resource-label {
    font-size: 7px;
    letter-spacing: 0.7px;
  }
  .resource-value {
    font-size: 14px;
  }
  .resource-item:last-child {
    gap: 3px;
  }
  #resource-bar button {
    font-size: 9px !important;
    padding: 6px !important;
  }
  #selection-panel {
    left: 8px;
    bottom: 8px;
    width: 230px;
    max-height: 240px;
  }
  #command-card {
    left: 250px;
    bottom: 8px;
    width: 260px;
    padding: 8px;
  }
  #command-card-grid {
    grid-template-rows: repeat(3, 47px);
    gap: 4px;
  }
  .cc-btn {
    height: 47px;
  }
  #minimap-container {
    right: 8px;
    bottom: 8px;
    width: 160px;
    height: 180px;
    padding: 8px;
  }
  #minimap-canvas {
    width: 142px;
    height: 142px;
  }
  .minimap-heading span {
    display: none;
  }
  #production-panel,
  #build-menu {
    right: 8px;
    top: 78px;
    width: 235px;
    max-height: calc(100dvh - 290px);
  }
  #nation-ability-btn {
    top: 78px !important;
    left: 8px !important;
  }
  #speed-toggle-btn {
    right: 8px !important;
    bottom: 198px !important;
  }
}
@media (max-width: 620px) {
  .title-masthead {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .title-footer {
    font-size: 7px;
    letter-spacing: 1px;
  }
  #main-menu .menu-content {
    width: 86vw;
    max-height: calc(100dvh - 142px);
    margin-top: 30px;
  }
  .menu-eyebrow {
    margin-bottom: 13px;
  }
  #main-menu .menu-title {
    font-size: 65px;
  }
  .title-rule {
    margin: 16px 0 12px;
  }
  .menu-secondary-actions {
    margin: 15px 0 11px;
  }
  .nation-panels {
    flex-direction: column;
  }
  .nation-select-title {
    font-size: 28px;
  }
  .resource-item:nth-child(3) {
    display: none;
  }
  .resource-item {
    min-width: 48px;
  }
  .resource-item:nth-child(5) {
    flex: 1;
  }
  .resource-item:last-child #btn-techtree {
    display: none;
  }
  #selection-panel {
    width: calc(100vw - 180px);
    min-height: 125px;
    max-height: 200px;
    padding: 10px;
    font-size: 11px;
  }
  #command-card {
    left: 8px;
    bottom: 219px;
    width: calc(100vw - 190px);
    min-width: 190px;
    padding: 6px;
  }
  #command-card-grid {
    grid-template-rows: repeat(3, 39px);
    gap: 3px;
  }
  .cc-btn {
    height: 39px;
  }
  .cc-icon svg {
    width: 16px;
    height: 16px;
  }
  .cc-label {
    font-size: 7px;
  }
  .cc-btn .cc-key {
    font-size: 7px;
  }
  .hud-section-label {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .selection-portrait {
    width: 52px;
    height: 48px;
    margin-right: 7px;
  }
  .selection-portrait svg {
    width: 40px;
  }
  #production-panel,
  #build-menu {
    max-height: calc(100dvh - 300px);
  }
  #resource-bar {
    gap: 8px;
  }
  #resource-bar button {
    font-size: 8px !important;
    padding: 5px !important;
  }
}
@media (max-height: 690px) and (min-width: 801px) {
  #main-menu .menu-content {
    margin-top: 45px;
    max-height: calc(100dvh - 135px);
  }
  #main-menu .menu-title {
    font-size: 80px;
  }
  .menu-eyebrow {
    margin-bottom: 12px;
  }
  .title-rule {
    margin: 16px 0 12px;
  }
  #main-menu .menu-subtitle {
    margin-bottom: 18px;
  }
  #main-menu .menu-btn {
    padding: 10px 15px;
    min-height: 61px;
  }
  .menu-secondary-actions {
    margin: 15px 0 10px;
  }
  .title-caption {
    bottom: 95px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .title-art {
    animation: none;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.selection-stats {
  clear: both;
  padding-top: 4px;
}
.production-emblem {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  margin-right: 8px;
  background: #0d1e2580;
  border: 1px solid #9bab7b30;
  color: #cbb683;
}
.production-emblem svg {
  width: 28px;
  height: 28px;
}
.production-copy {
  flex: 1;
  text-align: left;
}
.production-copy strong {
  font-size: 12px;
}
.hud-score {
  grid-template-columns: 1fr;
  min-width: 76px;
}
.hud-score .resource-value {
  margin: 0 !important;
  font-size: 12px !important;
}
.settings-panel {
  background: linear-gradient(140deg, #223238, #111e25);
  border: 1px solid #9d8a5b;
  border-radius: 4px;
  box-shadow: 0 20px 90px #0008;
}
.settings-header {
  background: #ccb07808;
  border-color: #a5b27e30;
}
.settings-header h2 {
  color: var(--ivory);
  text-shadow: none;
}
.settings-tab {
  color: #adbeb5;
}
.settings-tab.active {
  color: var(--brass);
  border-color: var(--brass);
  background: #cfaa6712;
}
.settings-btn-primary {
  background: linear-gradient(115deg, #d7b578, #b78c47);
  color: #172126;
  border-color: #e6c58a;
}
.settings-group-title {
  color: #cfb989;
}
@media (max-width: 1100px) {
  .hud-score {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-bg {
    animation: none !important;
  }
}
#main-menu .menu-content {
  scrollbar-width: none;
}
#main-menu .menu-content::-webkit-scrollbar {
  display: none;
}
#nation-select .difficulty-btn,
#nation-select .gamemode-btn,
#nation-select .map-btn,
#nation-select .biome-btn {
  background: #203139 !important;
  border: 1px solid #697c7660 !important;
  color: #bfc9c4 !important;
  box-shadow: none !important;
  border-radius: 2px !important;
}
#nation-select .difficulty-btn.selected,
#nation-select .gamemode-btn.selected,
#nation-select .map-btn.selected,
#nation-select .biome-btn.selected {
  background: #8d774c33 !important;
  border-color: var(--brass) !important;
  color: #f0ddba !important;
  box-shadow: inset 0 -2px #cfaa6760 !important;
}
#alert-container {
  top: 150px !important;
  right: 22px !important;
}
.alert-item {
  background: #1a2b31f2 !important;
  border-color: #617666 !important;
  color: #e1ddcc !important;
  border-radius: 3px !important;
  box-shadow: var(--hud-shadow);
}


#hud-research-display {
  bottom: 278px !important;
  right: 22px !important;
  background: #172930eb !important;
  border-color: #948159 !important;
  color: #e0c993 !important;
}
@media (max-width: 800px) {
  #alert-container {
    top: 132px !important;
    right: 8px !important;
    max-width: 235px;
  }

}
@media (max-width: 620px) {
  #alert-container {
    top: 126px !important;
    font-size: 10px;
  }

}
#hud-daynight {
  top: 99px !important;
  right: 22px !important;
  background: #16272ed9 !important;
  border: 1px solid #65796870 !important;
  border-radius: 2px !important;
  padding: 6px 10px !important;
  color: #cfb783 !important;
}
#tutorial-panel {
  background: linear-gradient(135deg, #203238f7, #14242bf7) !important;
  border: 1px solid #9c8b5f !important;
  border-radius: 3px !important;
  box-shadow: var(--hud-shadow) !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  top: 150px !important;
  transform: none !important;
  left: 22px !important;
  width: 265px !important;
}
#tutorial-panel > div:first-child {
  color: #d2b477 !important;
  border-color: #9c8b5f55 !important;
  text-shadow: none !important;
  font-size: 10px !important;
  letter-spacing: 2px !important;
}
#tutorial-panel > div:nth-child(2) {
  color: #97ada5 !important;
}
#tutorial-panel > div:nth-child(3) {
  color: #eee5ce !important;
  text-shadow: none !important;
  font-size: 15px !important;
}
#tutorial-panel > div:nth-child(5) {
  color: #ceb176 !important;
}
.alert-notification {
  background: #17282ff2 !important;
  box-shadow: var(--hud-shadow);
  border-radius: 3px !important;
}
.alert-type-low-resources {
  border-left-color: #cfaa67 !important;
  color: #dac898 !important;
}
.alert-type-production {
  border-left-color: #9ab58b !important;
  color: #b9cfb0 !important;
}
@media (max-width: 800px) {
  #hud-daynight {
    top: 78px !important;
    right: 8px !important;
  }
  #tutorial-panel {
    top: 130px !important;
    left: 8px !important;
    width: 225px !important;
  }
}
@media (max-width: 620px) {
  #tutorial-panel {
    top: 130px !important;
    left: 8px !important;
    width: 200px !important;
    padding: 12px !important;
  }
}
/* The full menu remains available on narrow screens; redundant legacy shortcut stays hidden. */
#main-menu #btn-spectate-quick {
  display: none !important;
}
#main-menu .menu-buttons > #btn-multiplayer {
  display: flex !important;
}
#alert-container {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
}
@media (max-width: 800px) {
  #alert-container {
    left: auto !important;
    right: 8px !important;
    transform: none;
  }
}

.camera-controls{display:flex;gap:4px;margin:5px 0 8px;pointer-events:auto}
.camera-controls button{flex:1;min-height:32px;background:#24353b;border:1px solid #71827e;color:#e9e4ce;border-radius:3px;cursor:pointer;font:12px system-ui}
.camera-controls button:hover,.camera-controls button:focus-visible{background:#3d555c;border-color:#dac184;outline:2px solid #dac184;outline-offset:1px}
.camera-controls kbd{font:10px system-ui;color:#cbbd96}

/* Command briefing: deliberate nation choices, then battlefield configuration. */
#nation-select{padding:20px 0;align-items:flex-start}
#nation-select .command-briefing{width:min(1160px,calc(100% - 40px));max-width:1160px;max-height:calc(100dvh - 40px);padding:28px 32px 0;text-align:left;overflow:auto;box-sizing:border-box}
.command-briefing [hidden]{display:none!important}
.command-briefing .nation-select-title{font-size:38px;letter-spacing:1px;margin:0 0 4px}
.command-briefing .briefing-intro{margin-bottom:18px;font-size:13px}
.briefing-steps{display:flex;border-bottom:1px solid #81948b40;margin-bottom:20px;gap:25px}
.briefing-steps button{background:none;color:#9aaea7;border:0;border-bottom:2px solid transparent;padding:12px 0;font:600 13px "Segoe UI",sans-serif;cursor:pointer}
.briefing-steps button span{display:inline-grid;place-items:center;background:#283b40;border:1px solid #81948b40;width:25px;height:25px;margin-right:9px;font-size:10px}
.briefing-steps button[aria-current=step]{color:#f0d49b;border-color:#d2b477}
.briefing-steps button:disabled{opacity:.45;cursor:default}
.command-briefing .nation-panels{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:22px}
.command-briefing .nation-panel{padding:0;background:none;border:0;min-width:0}
.command-briefing .panel-header{margin:0 0 12px;font-size:10px;letter-spacing:2px;text-align:left;color:#bac9be!important}
.command-briefing .nation-grid{display:grid;grid-template-columns:1fr;gap:10px}
.command-briefing .nation-card{position:relative;display:flex;flex-direction:column;align-items:stretch;width:100%;padding:15px 18px;text-align:left;color:#d3ded4;font-family:inherit;background:linear-gradient(125deg,#2c4148aa,#1b2c32aa);border:1px solid #7f958f50;border-radius:5px;cursor:pointer;transition:border-color .15s,background .15s;box-sizing:border-box}
.command-briefing .nation-card:hover{border-color:#d3b577;background:linear-gradient(125deg,#40534eaa,#21373daa);transform:none}
.command-briefing .nation-card.selected{border-color:#e0bd7d;box-shadow:inset 3px 0 #e0bd7d;background:linear-gradient(120deg,#71613c55,#293c3e99)}
.country-heading{display:flex;align-items:center;gap:14px;margin-bottom:8px}
.country-heading>span:nth-child(2){flex:1}
.command-briefing .nation-code{display:block;color:#b3c4b7;font-size:9px;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:4px}
.command-briefing .nation-name{display:block;font-size:21px;letter-spacing:.1px;font-weight:600;line-height:1.1}
.country-check{display:grid;place-items:center;width:24px;height:24px;color:transparent;border:1px solid #8d9d8c66;border-radius:50%;font-size:14px}
.selected .country-check{color:#17292d;background:#e0bd7d;border-color:#e0bd7d}
.country-tagline{font-size:12px;color:#e7dfc8;margin-bottom:7px}
.command-briefing .nation-passive,.command-briefing .nation-ability{display:block;width:auto;padding-left:0;margin:3px 0 0;line-height:1.4;font-size:11px;font-style:normal}
.command-briefing .nation-passive{color:#b8c9bd}.command-briefing .nation-ability{color:#c9b98e}
.opponent-note{font-size:11px;line-height:1.5;color:#9bafa8;margin:-5px 0 9px}
.random-opponent{border:1px solid #83948a66;background:#23363b;color:#c4d2c5;border-radius:4px;padding:7px 12px;margin-bottom:10px;cursor:pointer;font-family:inherit;font-size:11px}
.random-opponent[aria-pressed=true]{border-color:#d6b777;color:#e3c78b;background:#64573544}
.command-briefing .nation-flag{position:relative;display:inline-block;flex-shrink:0;width:52px;height:34px;margin:0;border:1px solid #fff4;border-radius:3px;overflow:hidden;box-shadow:0 2px 8px #0005}
.flag-america{background:repeating-linear-gradient(#b34c49 0 2.6px,#e5e2d5 2.6px 5.2px)}
.flag-america:after{content:'★';position:absolute;left:0;top:0;background:#344d71;width:24px;height:19px;color:#eee;font-size:14px;text-align:center;line-height:19px}
.flag-britain{background:linear-gradient(90deg,transparent 39%,#c54f4b 39% 61%,transparent 61%),linear-gradient(transparent 33%,#c54f4b 33% 66%,transparent 66%),linear-gradient(90deg,transparent 32%,#efecdd 32% 68%,transparent 68%),linear-gradient(transparent 25%,#efecdd 25% 75%,transparent 75%),linear-gradient(33deg,transparent 44%,#eee9d9 44% 55%,transparent 55%),linear-gradient(-33deg,#334b75 44%,#eee9d9 44% 55%,#334b75 55%)}
.flag-france{background:linear-gradient(90deg,#395785 33.3%,#eee9dc 33.3% 66.6%,#bd5250 66.6%)}
.flag-japan{background:radial-gradient(circle at center,#bb4947 0 9px,#eee9dc 9.5px)}
.flag-germany{background:linear-gradient(#252d31 33.3%,#b54b44 33.3% 66.6%,#d0ac5e 66.6%)}
.flag-austria{background:linear-gradient(#ba5550 33.3%,#eee8d9 33.3% 66.6%,#ba5550 66.6%)}
.briefing-battlefield{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px}
.briefing-setting{background:#10222899;border:1px solid #7c938e44;border-radius:5px;padding:18px;margin:0!important;min-width:0}
.briefing-setting>div:first-of-type{justify-content:flex-start!important;gap:7px!important;flex-wrap:wrap}
.briefing-setting button{font-family:inherit!important;min-height:38px;padding:9px 12px!important;letter-spacing:.2px!important;color:#d0dcd0!important}
.briefing-setting button.selected{color:#f2d495!important}
.briefing-setting [id$="-desc"]{font-size:12px!important;line-height:1.5;color:#a8bcb0!important;margin-top:12px!important}
#nation-select #map-select{grid-column:1/-1}
#nation-select #map-select>div:first-of-type{display:grid!important;grid-template-columns:repeat(5,1fr)}
#nation-select .map-btn{display:flex;flex-direction:column;gap:8px;text-align:left;align-items:stretch;padding:10px!important}
#nation-select .map-btn:before{content:'';height:64px;border:1px solid #9aaf9d44;background:repeating-linear-gradient(0deg,transparent 0 13px,#a9b59d12 13px 14px),linear-gradient(112deg,#607761 65%,#c1ad7a 65% 69%,#355b6b 69%);border-radius:2px}
#nation-select .map-btn[data-map=islands]:before{background:radial-gradient(ellipse at 28% 40%,#7a8b68 0 18%,transparent 20%),radial-gradient(ellipse at 75% 63%,#7a8b68 0 21%,transparent 23%),#355b6b}
#nation-select .map-btn[data-map=river]:before{background:linear-gradient(110deg,#6c8265 42%,#c4b27e 43% 46%,#355b6b 47% 54%,#c4b27e 55% 58%,#6c8265 59%)}
#nation-select .map-btn[data-map=plains]:before{background:repeating-radial-gradient(ellipse at 25% 70%,#6f8260 0 12px,#798d68 13px 15px,#6f8260 16px 29px)}
#nation-select .map-btn[data-map=random]:before{background:linear-gradient(135deg,#355b6b,#6b7c62 65%,#af9e6a)}
#nation-select #map-seed-input{width:150px!important;padding:9px 11px!important;font-size:12px!important;color:#e9e2ce!important}
.briefing-footer{position:sticky;bottom:0;display:flex;align-items:center;gap:12px;padding:18px 0!important;margin:0!important;border-top:1px solid #a9b7a044;background:#182a30;z-index:2;box-shadow:0 -12px 22px #182a30c9}
.deployment-summary{flex:1;min-width:0;text-align:left}.deployment-summary strong{display:block;font-size:13px;font-weight:600;color:#efdfb9}.deployment-summary span{display:block;color:#a6b9ad;font-size:10px;line-height:1.5;margin-top:5px}
.briefing-footer .menu-btn{width:auto;min-width:140px;margin:0!important;padding:13px 18px;font-size:12px;letter-spacing:1px}
.briefing-footer .briefing-next,#nation-select #btn-start-game{color:#17272c;background:linear-gradient(120deg,#e0c28a,#bfa062);border-color:#e1c486;font-weight:700}
.briefing-previous{background:none;border:0;color:#c8baa0;cursor:pointer;font-family:inherit;font-size:12px}
.command-briefing button:focus-visible,.command-briefing input:focus-visible{outline:2px solid #edd395;outline-offset:3px}
.command-briefing button:disabled{cursor:default;opacity:.4}
#main-menu button:focus-visible,#main-menu summary:focus-visible{outline:2px solid #e1c18b;outline-offset:4px}
@media(min-width:761px) and (max-height:800px){
 #nation-select .command-briefing{padding:18px 28px 0}
 .command-briefing>.menu-eyebrow{margin-bottom:6px}
 .command-briefing .nation-select-title{font-size:30px}
 .command-briefing .briefing-intro{margin-bottom:8px}
 .briefing-steps{margin-bottom:14px}.briefing-steps button{padding:8px 0}
 .command-briefing .nation-card{padding:8px 14px;gap:0;flex-wrap:nowrap}
 .command-briefing .nation-grid{gap:8px}
 .country-heading{margin-bottom:5px}.country-tagline{margin-bottom:4px}
 .command-briefing .nation-panels{margin-bottom:14px}
 .opponent-note{display:inline-block;max-width:calc(100% - 150px);vertical-align:middle;margin-right:10px}
 .random-opponent{vertical-align:middle}
 .briefing-footer{padding:12px 0!important}
}
@media(max-width:760px){#nation-select{padding:10px 0}.command-briefing .nation-panels,.briefing-battlefield{grid-template-columns:1fr}#nation-select .command-briefing{width:calc(100% - 20px);padding:22px 16px 0;max-height:calc(100dvh - 20px)}.briefing-footer{flex-wrap:wrap}.deployment-summary{flex-basis:100%}.briefing-footer .menu-btn{flex:1;min-width:115px}.briefing-previous{order:2;width:100%;text-align:left}.briefing-steps{gap:14px}.briefing-steps button{font-size:12px}.command-briefing .nation-select-title{font-size:30px}#nation-select #map-select>div:first-of-type{grid-template-columns:repeat(2,1fr)}.command-briefing .nation-name{font-size:19px}}
@media(prefers-reduced-motion:reduce){.command-briefing *{transition:none!important;scroll-behavior:auto!important}}

/* Fit rotation controls without clipping the tactical map. */
#minimap-container{height:286px}
@media(max-width:900px){#minimap-container{height:222px}.camera-controls{gap:2px}.camera-controls button{font-size:10px;min-height:30px}}

/* Compact event feed: leave the center of the battlefield clear. */
#hud-notifications{position:fixed;top:136px;left:auto;transform:none;right:12px;width:min(238px,calc(100vw - 24px));z-index:100;pointer-events:none;display:flex;flex-direction:column;gap:4px;}
.battle-notice{box-sizing:border-box;padding:6px 9px;border-left:2px solid;border-radius:3px;background:rgba(15,28,32,.88);font:11px/1.35 system-ui,sans-serif;text-align:left;box-shadow:0 2px 8px #0003;overflow-wrap:anywhere;max-height:48px;overflow:hidden;}
@media(max-width:700px){#hud-notifications{top:146px;right:8px;width:190px;}.battle-notice{font-size:10px;padding:5px 7px;}}

/* Brief peripheral battle feedback; the battlefield center stays unobstructed. */
.battle-feedback { pointer-events:none; }
.battle-feedback [hidden] { display:none !important; }
.battle-damage { position:fixed; z-index:85; background:#ef927c; opacity:.7; border-radius:4px; box-shadow:0 0 12px #ef927c55; }
.battle-damage-left,.battle-damage-right { top:42%; width:3px; height:62px; }
.battle-damage-left { left:10px; }.battle-damage-right { right:10px; }
.battle-damage-top,.battle-damage-bottom { left:calc(50% - 31px); width:62px; height:3px; }
.battle-damage-top { top:65px; }.battle-damage-bottom { bottom:180px; }
.battle-status { position:fixed; right:16px; bottom:230px; display:flex; gap:6px; align-items:center; z-index:90; font:11px system-ui,sans-serif; }
.battle-status span,.battle-status button { padding:5px 9px; border:1px solid #879eac55; border-radius:5px; background:#101e29e8; color:#d4e4ed; }
.battle-status span { color:#ffcf73; }.battle-status button { pointer-events:auto; cursor:pointer; }
.battle-status button:hover,.battle-status button:focus-visible { border-color:#83c8ff; background:#243d50; }
@media(max-width:700px) { .battle-status { bottom:190px; right:10px; }.battle-damage-bottom { bottom:145px; } }
body[data-studio-intro] { background:#07070c; }
body[data-studio-intro] #main-menu { visibility:hidden; }
.title-footer-actions { display:flex; gap:20px; align-items:center; }
@media(max-width:600px) { .title-footer { flex-wrap:wrap; gap:12px; }.title-footer-actions { margin-left:auto; gap:14px; } }

/* Campaign operations share the title screen's charcoal, ivory and brass. */
.campaign-screen { scrollbar-color: #8b7549 #142128; scrollbar-width:thin; }
.campaign-screen::-webkit-scrollbar-thumb { background:#8b7549; }
.campaign-screen { position:fixed; inset:0; z-index:1000; overflow:auto; color:var(--ivory); font-family:"Segoe UI",Arial,sans-serif; background:linear-gradient(110deg,#101b20fa 20%,#101b20ec 65%,#101b20c9),url('../assets/art/warzone-keyart.webp') center/cover fixed; }
.campaign-shell { max-width:1240px; margin:auto; padding:48px 48px 28px; }
.campaign-header { display:flex; justify-content:space-between; gap:24px; align-items:center; border-bottom:1px solid #cfaa6740; padding-bottom:26px; }
.campaign-eyebrow { color:var(--brass); font-size:11px; letter-spacing:2.5px; font-weight:700; }
.campaign-screen h1 { font-family:Impact,"Arial Narrow",sans-serif; font-weight:400; font-size:clamp(42px,5vw,68px); text-transform:uppercase; letter-spacing:2px; margin:10px 0; line-height:1.1; }
.campaign-header p,.campaign-help,.campaign-footer { color:var(--muted); font-size:14px; line-height:1.6; margin:0; }
.campaign-back { border:1px solid #a5b0ab55; background:#17262bcc; color:var(--ivory); padding:13px 20px; cursor:pointer; font-size:13px; white-space:nowrap; }
.campaign-back:hover { border-color:var(--brass); background:#243538; }
.campaign-toolbar { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:26px 0 12px; }
#campaign-stars-total { display:grid; grid-template-columns:auto auto; align-items:center; column-gap:16px; row-gap:5px; }
#campaign-stars-total strong { font-size:28px; grid-row:span 2; }
#campaign-stars-total strong span { color:var(--muted); font-size:16px; font-weight:400; }
#campaign-stars-total > span { font-size:10px; letter-spacing:1.2px; color:var(--muted); }
#campaign-stars-total .campaign-star-total { color:var(--brass); font-size:13px; }
#campaign-stars-total progress { grid-column:span 2; width:100%; height:3px; accent-color:var(--brass); border:0; margin-top:6px; }
#campaign-stars-total progress::-webkit-progress-bar { background:#ffffff15; }
#campaign-stars-total progress::-webkit-progress-value { background:var(--brass); }
.campaign-difficulty { display:flex; gap:4px; border:0; padding:0; margin:0; }
.campaign-difficulty legend { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:1.5px; margin-bottom:8px; }
.campaign-diff-btn { min-width:84px; min-height:40px; padding:8px 16px; border:1px solid #52605c80; background:#17262b; color:var(--muted); text-transform:capitalize; cursor:pointer; }
.campaign-diff-btn.selected { background:#cfaa6722; border-color:var(--brass); color:#f2ce89; }
.campaign-diff-btn:hover { color:var(--ivory); border-color:var(--brass); }
.campaign-help { font-size:12px; padding-bottom:6px; }
.campaign-act { margin-top:26px; }
.campaign-act h2 { color:var(--ivory); font-size:16px; font-weight:600; margin:0 0 12px; padding-bottom:10px; border-bottom:1px solid #52605c66; }
.campaign-mission-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.campaign-mission { display:flex; flex-direction:column; text-align:left; padding:18px; min-height:222px; border:1px solid #52605c80; border-top:2px solid #cfaa6799; background:linear-gradient(145deg,#233439ee,#142126f5); color:var(--ivory); cursor:pointer; transition:border-color .15s,background .15s; }
.campaign-mission.available:hover { border-color:var(--brass); background:#2a3a3d; }
.campaign-mission.locked { cursor:default; background:#162328d9; border-color:#52605c55; color:#bdc4bc; }
.campaign-card-top { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; font-size:9px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; }
.campaign-status { color:var(--brass); }
.locked .campaign-status { color:var(--muted); }
.campaign-mission > strong { font-size:19px; font-weight:600; line-height:1.25; margin:18px 0 8px; }
.campaign-nation { color:var(--allied); font-size:10px; font-weight:600; letter-spacing:1.5px; text-transform:uppercase; }
.campaign-card-summary { font-size:12px; color:var(--muted); line-height:1.5; margin:12px 0 18px; }
.campaign-card-bottom { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin-top:auto; padding-top:12px; border-top:1px solid #52605c55; font-size:10px; color:var(--muted); }
.campaign-card-bottom > span:first-child { color:var(--brass); font-size:14px; letter-spacing:2px; }
.campaign-footer { border-top:1px solid #52605c66; padding-top:20px; margin-top:28px; font-size:12px; }
.campaign-briefing-panel { max-width:900px; margin:5vh auto; padding:40px; background:#17262bf5; border:1px solid #cfaa6755; box-shadow:0 24px 80px #0008; }
.campaign-briefing-panel h1 { font-size:clamp(34px,5vw,54px); margin:16px 0; }
.campaign-briefing-meta { display:flex; flex-wrap:wrap; gap:12px 24px; font-size:11px; color:var(--allied); text-transform:uppercase; letter-spacing:1px; padding-bottom:20px; border-bottom:1px solid #52605c80; }
.campaign-briefing-copy { white-space:pre-wrap; font-size:16px; line-height:1.8; color:#d1d5c9; margin:24px 0; }
.campaign-objectives { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.campaign-objectives h2 { color:var(--brass); font-size:11px; text-transform:uppercase; letter-spacing:1.5px; }
.campaign-objectives ul { padding-left:18px; }
.campaign-objectives li { padding:4px 0; font-size:14px; }
.campaign-objectives li::marker { color:var(--brass); }
.campaign-objectives p { margin:5px 0 10px; font-size:13px; line-height:1.6; color:var(--muted); }
.campaign-briefing-actions { display:flex; justify-content:space-between; gap:16px; margin-top:30px; padding-top:24px; border-top:1px solid #52605c80; }
.campaign-deploy { color:#172126; background:var(--brass); border:1px solid var(--brass); padding:14px 28px; font-weight:700; text-transform:uppercase; letter-spacing:1px; cursor:pointer; }
.campaign-deploy:hover { background:#e5c48a; }
@media(max-width:1050px) { .campaign-mission-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .campaign-shell { padding:24px 18px; } .campaign-header { align-items:flex-start; flex-direction:column-reverse; gap:22px; } .campaign-toolbar { align-items:flex-start; flex-direction:column; } .campaign-mission-grid,.campaign-objectives { grid-template-columns:1fr; } .campaign-mission { min-height:190px; } .campaign-briefing-panel { margin:16px; padding:24px 20px; } .campaign-briefing-actions { flex-direction:column-reverse; } .campaign-deploy { min-height:48px; } }

/* Persistent RTS construction entry point and categorized build palette. */
.construction-launcher { position:fixed; top:82px; left:22px; display:flex; align-items:center; gap:12px; padding:12px 16px; min-height:58px; border:1px solid var(--brass); background:linear-gradient(135deg,#38433b,#1a2b30); color:var(--ivory); box-shadow:var(--hud-shadow); pointer-events:auto; cursor:pointer; text-align:left; z-index:110; }
.construction-launcher strong { display:block; font-size:14px; }
.construction-launcher small { display:block; color:#b5bdb0; font-size:10px; margin-top:4px; }
.construction-launcher kbd { margin-left:12px; border:1px solid #cfaa6770; padding:4px 7px; color:var(--brass); font-size:11px; }
.construction-symbol { font-size:25px; color:var(--brass); }
.construction-launcher:hover,.construction-launcher[aria-expanded="true"] { background:#465447; border-color:#f2ce89; }
#build-menu { left:22px; right:auto; top:150px; width:340px; max-height:calc(100dvh - 365px); border-top:2px solid var(--brass); z-index:111; }
.construction-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.construction-heading h4 { margin:0; border:0; padding:0; }
#build-menu-close { width:32px; height:32px; background:transparent; border:1px solid #52605c; color:var(--ivory); font-size:22px; cursor:pointer; }
.construction-help { font-size:12px; line-height:1.5; color:var(--muted); margin:10px 0 14px; }
#build-categories { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; }
#build-categories button { padding:8px; border:1px solid #52605c; color:var(--muted); background:#17262b; font-size:11px; cursor:pointer; }
#build-categories button[aria-pressed="true"] { border-color:var(--brass); color:var(--brass); background:#cfaa6718; }
#build-options [hidden] { display:none !important; }
#build-options .cmd-btn { min-height:64px; margin-bottom:7px !important; }
#build-options .cmd-btn:disabled { cursor:not-allowed; }
.build-availability { display:block; color:var(--brass); font-size:10px; margin-top:6px; }
#build-options .cmd-btn:disabled .build-availability { color:#dbb5a0; }
body.spectate-mode .construction-launcher { display:none; }
@media(max-width:800px) { .construction-launcher { left:12px; top:94px; padding:8px 12px; min-height:46px; gap:8px; } .construction-launcher small { display:none; } .construction-launcher strong { font-size:12px; } .construction-symbol { font-size:20px; } #build-menu { left:12px; top:148px; width:min(340px,calc(100vw - 24px)); max-height:calc(100dvh - 290px); } }
@media(max-height:550px) { .construction-launcher { top:55px; min-height:38px; padding:6px 10px; } .construction-launcher small { display:none; } #build-menu { top:100px; max-height:calc(100dvh - 125px); } }
/* Keep construction clear of the nation ability and tutorial at the left edge. */
.construction-launcher { left:50%; transform:translateX(-50%); }
#build-menu { left:50%; transform:translateX(-50%); scrollbar-color:#8b7549 #142128; }
#build-menu::-webkit-scrollbar-thumb { background:#8b7549; }
#build-menu { z-index:1200; }
@media(max-width:800px) { .construction-launcher,#build-menu { left:50%; } }
#build-placement-guide { position:fixed; top:152px; left:50%; transform:translateX(-50%); width:min(380px,calc(100vw - 24px)); padding:16px; display:grid; gap:8px; color:var(--ivory); background:#17262bf5; border:1px solid var(--brass); box-shadow:var(--hud-shadow); z-index:112; pointer-events:auto; }
#build-placement-guide strong { font-size:15px; color:var(--brass); }
#build-placement-guide span { font-size:12px; line-height:1.5; }
#build-placement-guide small { font-size:11px; color:var(--muted); }
#build-placement-cancel { padding:9px; background:#26363b; border:1px solid #52605c; color:var(--ivory); cursor:pointer; }
@media(max-height:550px) { #build-placement-guide { top:100px; } }
.selected-order-status { position:fixed; bottom:230px; left:50%; transform:translateX(-50%); max-width:min(460px,calc(100vw - 32px)); padding:7px 12px; background:#14252ee8; border:1px solid #83c8ff66; color:#d9e5e6; font-size:11px; line-height:1.5; pointer-events:none; text-align:center; z-index:95; }
@media(max-width:800px) { .selected-order-status { bottom:180px; max-width:45vw; font-size:10px; } }
.battle-status { flex-wrap:wrap; max-width:min(320px,50vw); justify-content:flex-end; }
.battle-status .battle-threat { color:#f3c5ae; border-color:#db837877; font-size:11px; }
.production-entry { display:flex; gap:5px; margin-bottom:5px; }
.production-entry > .cmd-btn { flex:1; min-width:0; margin:0 !important; }
.production-bulk { flex:none; width:38px; color:var(--brass); background:#26383a; border:1px solid #71806a80; cursor:pointer; font-weight:700; }
.production-bulk:hover { border-color:var(--brass); background:#3c514b; }
#prod-queue-icons button { min-height:44px; min-width:52px; }
#prod-queue-icons small { font-size:8px; color:#d6b36d; }
.production-queue-label { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; color:var(--brass); font-size:11px; margin:8px 0; }
.production-queue-label small { color:var(--muted); font-size:10px; }
#prod-queue-icons { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:14px; }
.production-key { display:inline-block; padding:1px 4px; margin-left:5px; border:1px solid #cfaa6755; color:var(--brass); font:10px monospace; vertical-align:middle; }

/* The training debrief shares the command interface palette. */
#tutorial-complete-screen {
  box-sizing: border-box;
  padding: 28px !important;
  background: radial-gradient(ellipse at top, #263b42f5, #0c171df5) !important;
  color: #eee8d7 !important;
  font-family: "Segoe UI", Arial, sans-serif !important;
  overflow-y: auto;
}
#tutorial-complete-title {
  color: #cfaa67 !important;
  text-shadow: none !important;
  font-size: clamp(22px, 4vw, 34px) !important;
  letter-spacing: 2px !important;
  text-align: center;
}
#tutorial-complete-screen > div:nth-child(2) {
  color: #bccac9 !important;
  max-width: 480px !important;
}
#tutorial-complete-screen > div:last-child {
  flex-wrap: wrap;
  justify-content: center;
}
#tutorial-complete-screen button {
  font-family: inherit !important;
  background: #21343b !important;
  border-color: #72898c !important;
  color: #eee8d7 !important;
  min-height: 48px;
}
#tutorial-complete-screen button:first-child {
  background: #cfaa67 !important;
  border-color: #e6c88f !important;
  color: #14242b !important;
}
#tutorial-complete-screen button:hover { filter: brightness(1.12); }
#tutorial-complete-screen button:focus-visible {
  outline: 3px solid #83b7d2;
  outline-offset: 4px;
}

.cc-btn:has(.cc-ability-status) { padding-bottom: 15px; }
.cc-ability-status {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  font: 9px "Segoe UI", sans-serif;
  line-height: 11px;
  text-align: center;
  color: #cfaa67;
  white-space: nowrap;
}
.cc-btn:disabled .cc-ability-status { color: #bccac9; }
