:root {
  --paper: #f5ecd2;
  --mint: #f0d895;
  --blue: #63d7f1;
  --red: #ff9472;
}
body {
  background: #142d2f;
}
.brand {
  letter-spacing: 3px;
  font-size: 19px;
  text-shadow:
    0 2px 3px #102b34,
    0 0 25px #102b3488;
}
.brand small {
  color: #c8ded7;
  letter-spacing: 4px;
}
.emblem {
  color: #f0d895;
}
.icon-button {
  background: linear-gradient(#24444b, #16323b);
  border: 1px solid #92aeb263;
  box-shadow: 0 3px 0 #0e262e77;
  border-radius: 5px;
  color: #e7e8cf;
}
.icon-button:hover {
  border-color: var(--mint);
}
.weapon-art {
  width: 78px;
  max-width: 100%;
  height: 42px;
  display: block;
  margin: 5px auto 0;
  fill: currentColor;
  filter: drop-shadow(1px 2px 0 #102a3060);
}
.weapon-detail {
  fill: none;
  stroke: #17333bb0;
  stroke-width: 1.8;
}
.help-strip {
  gap: 18px;
  bottom: 12px;
}
.help-strip > span {
  background: #142f378c;
  border-radius: 3px;
  padding: 4px 7px;
}
.help-strip button {
  background: #18343de6;
  border: 1px solid #96b0a85e;
  border-radius: 3px;
  padding: 5px 9px;
  color: #d5dfc9;
}
.help-strip button:hover {
  border-color: var(--mint);
  color: var(--mint);
}
.overlay {
  background: linear-gradient(100deg, #102a34f2 5%, #173638df 62%, #2b4936a6);
}
.wordmark {
  font-size: 23px;
  color: #f4ead1;
}
.wordmark > span {
  color: #e7c985;
}
.build-label {
  border: 1px solid #c8cfaa40;
  padding: 8px 11px;
  border-radius: 3px;
  color: #b9ccbd;
}
.menu-top {
  border-bottom: 1px solid #c4c6a01c;
}
h1 {
  text-shadow: 0 4px 1px #0b273566;
  font-weight: 950;
  letter-spacing: -2.5px;
}
h1 em {
  color: #f0d895;
}
.mint {
  color: #f0d895;
}
.mint i {
  background: #f0d895;
  box-shadow: 0 0 14px #f0d89588;
}
.intro {
  color: #d5dfd2;
}
.mode-tag span {
  background: #d7d28e18;
  color: #f0d895;
  border: 1px solid #d7d28e42;
}
.mission {
  color: #b4c9be;
}
.primary {
  background: linear-gradient(120deg, #f6e2aa, #dfc17d);
  border-bottom-color: #af9359;
  border-radius: 4px;
  box-shadow:
    0 5px 0 #0f293659,
    0 12px 26px #0c263c25;
  color: #1e3940;
}
.primary:hover {
  filter: brightness(1.05);
}
.difficulty-label select {
  background: #26464ae6;
  color: #e5e8d5;
  border-color: #83a39977;
}
.local-note {
  color: #a3bdaf;
}
.local-note span {
  color: #f0d895;
}
.field-card {
  position: relative;
  border: 1px solid #c4ceb075;
  border-top: 2px solid #ecd698;
  background: linear-gradient(130deg, #355552d9, #24433ce0);
  border-radius: 6px;
  box-shadow:
    12px 15px 0 #102b3530,
    0 20px 65px #0c24322e;
  transform: rotate(1.5deg);
}
.field-top {
  color: #e5e1be;
  background: #122f3930;
  border-bottom-color: #c4ceb044;
}
.field-top span:last-child {
  color: #a4c0b1;
}
.illustration {
  background: linear-gradient(135deg, #36564d, #3d5d4c);
}
.illustration svg {
  filter: drop-shadow(0 5px 3px #13313222);
}
.controls dd {
  color: #d3dfd1;
}
.controls kbd {
  background: #0e2b353b;
  color: #e0e9cf;
}
.field-tip {
  color: #b4c8b7;
  border-top: 1px solid #b5c39e21;
  margin: 0 20px;
  padding-inline: 0;
}
.field-tip b {
  color: #f0d895;
}
.menu-bottom {
  color: #a1b9a7;
  font-size: 8px;
  border-top-color: #b7c29b2b;
}
.card-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  right: 8px;
  top: 8px;
  border-radius: 50%;
  background: #d8d4ad66;
  border: 2px solid #193b3566;
}
.compact {
  background: #102b34d9;
  backdrop-filter: blur(5px);
}
.dialog {
  background: linear-gradient(130deg, #24464c, #16363e);
  border: 1px solid #b2c7b46e;
  border-top: 3px solid #f0d895;
  border-radius: 6px;
  box-shadow: 0 20px 70px #0b243a55;
}
.dialog h2 {
  color: #f3e6bd;
}
.dialog p {
  color: #b6cfc1;
}
.personal-stats {
  border-color: #b2c7b444;
}
.secondary {
  color: #d4dfc9;
  border-color: #c2cbaa55;
}
.secondary:hover {
  background: #c2cbaa14;
}
.personal-stats b {
  color: #f0d895;
}
#mapOverlay {
  background: #17343bf5;
  border: 1px solid #c1cfb36b;
  border-top: 2px solid #efd794;
  border-radius: 5px;
}
#mapOverlay canvas {
  border: 1px solid #c1cfb337;
}
@media (max-width: 1000px) {
  .weapon-art {
    height: 38px;
  }
  .brand {
    font-size: 16px;
  }
}
@media (min-width: 731px) and (max-width: 850px) {
  .weapon-art {
    height: 36px;
  }
}
@media (max-width: 730px) {
  .weapon-art {
    height: 33px;
    margin-top: 5px;
  }
  .help-strip {
    gap: 4px;
    left: 8px;
    right: 8px;
  }
  .help-strip > span {
    padding: 3px;
  }
  .help-strip button {
    font-size: 7px;
    padding: 4px 5px;
  }
  .help-strip kbd {
    font-size: 7px;
  }
  .field-card {
    transform: none;
  }
  .wordmark {
    font-size: 19px;
  }
  .build-label {
    font-size: 7px;
    padding: 6px;
  }
}

/* Four battlefield cards show the actual geometry used by the simulation. */
.menu-layout {
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1180px;
}
.map-selector {
  transform: none;
  max-width: none;
  width: 100%;
  overflow: visible;
  background: linear-gradient(135deg, #294b4fee, #173840f5);
}
.map-selector .field-top {
  padding: 15px 18px;
  border-radius: 4px 4px 0 0;
  letter-spacing: 1px;
}
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px 0;
}
.map-choice {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 0;
  background: #132e36;
  border: 1px solid #779c9e80;
  border-radius: 4px;
  color: #d5e4d9;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.map-choice:hover {
  border-color: #f0d895;
  transform: translateY(-2px);
}
.map-choice.selected {
  border: 2px solid #f0d895;
  box-shadow:
    0 0 0 1px #f0d89535,
    0 3px 12px #071f2860;
}
.map-choice canvas {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  background: #18373c;
  pointer-events: none;
}
.map-choice-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border-top: 1px solid #c3d3b733;
}
.map-choice-text b {
  font-size: 13px;
  letter-spacing: 0.3px;
}
.map-choice-text small {
  font-size: 7px;
  letter-spacing: 1.1px;
  color: #a8c2bb;
}
.map-choice.selected .map-choice-text b {
  color: #f0d895;
}
.map-check {
  display: none;
  position: absolute;
  top: 7px;
  right: 7px;
  background: #f0d895;
  color: #203a41;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
}
.selected .map-check {
  display: block;
}
.map-description {
  padding: 13px 18px 10px;
  min-height: 86px;
}
.map-description h2 {
  font-size: 16px;
  margin: 0 0 5px;
  color: #f1e4c0;
  letter-spacing: 0.4px;
}
.map-description p {
  font-size: 11px;
  line-height: 1.6;
  color: #c1d5cb;
  margin: 0;
}
.map-selector .field-tip {
  margin: 0 18px;
  padding: 10px 0 12px;
  min-height: 68px;
  font-size: 10px;
}
.map-selector .field-tip b {
  margin-bottom: 3px;
}
.quick-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 6px;
  padding: 12px 18px;
  border-top: 1px solid #9ebfa22e;
  background: #102b3533;
  color: #adc8bd;
  font-size: 7px;
  letter-spacing: 0.3px;
}
.quick-controls kbd {
  font-size: 8px;
  padding: 2px 3px;
  margin-right: 3px;
}
.brief .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brief .eyebrow span {
  float: none;
  font-size: 10px;
  letter-spacing: 1.5px;
}
.brief .eyebrow i {
  margin: 0;
  flex-shrink: 0;
}
#mapName {
  font-size: 8px;
  letter-spacing: 0.6px;
  font-weight: 700;
}
#pauseMenu .secondary {
  margin: 3px;
}
@media (max-height: 760px) and (min-width: 800px) {
  .menu-layout {
    max-width: 1120px;
    gap: 44px;
    padding-top: 18px;
  }
  .map-choice canvas {
    height: 91px;
  }
  .map-choice-text {
    padding: 7px 10px;
  }
  .map-grid {
    padding-top: 12px;
  }
  .map-description {
    min-height: 80px;
    padding-top: 11px;
  }
  .map-selector .field-tip {
    min-height: 62px;
    padding-bottom: 10px;
  }
  .quick-controls {
    padding-block: 10px;
  }
  .menu-bottom {
    margin-top: 12px;
    padding-block: 16px;
  }
}
@media (max-width: 900px) {
  .menu-layout {
    gap: 24px;
  }
  .map-grid {
    padding-inline: 12px;
    gap: 8px;
  }
  .map-choice-text b {
    font-size: 12px;
  }
  .map-choice-text small {
    font-size: 6px;
  }
  .quick-controls {
    grid-template-columns: 1fr 1fr;
  }
  .map-selector .field-top {
    font-size: 8px;
    padding-inline: 12px;
  }
  .start-row {
    gap: 12px;
  }
  .start-row .primary {
    min-width: 160px;
  }
}
@media (max-width: 730px) {
  .menu-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .map-selector {
    max-width: 480px;
  }
  .map-choice canvas {
    height: 115px;
  }
  .map-description {
    min-height: 0;
  }
  .map-selector .field-tip {
    min-height: 0;
  }
  .quick-controls {
    grid-template-columns: repeat(3, 1fr);
  }
  .brief .eyebrow span {
    font-size: 9px;
  }
}

.menu-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.menu-tools .secondary {
  font-size: 9px;
  padding: 9px 12px;
  color: #efd99f;
}
.loadout-brief {
  margin: 15px 0 16px;
  max-width: 390px;
}
.loadout-brief > .eyebrow {
  justify-content: space-between;
  font-size: 8px;
  color: #b6cbbf;
}
.loadout-brief .eyebrow span {
  font-size: 9px;
  color: #f0d895;
}
#loadoutSummary {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 8px 0;
}
#loadoutSummary > span {
  font-size: 9px;
  padding: 5px 7px;
  background: #102f36a6;
  border: 1px solid #aec5ad47;
  border-radius: 3px;
  color: #d6e0ca;
}
#loadoutSummary i {
  font-style: normal;
  color: #f0d895;
  margin-right: 6px;
}
#editLoadout {
  padding: 7px 10px;
  font-size: 8px;
  letter-spacing: 1px;
}
.brief .mission {
  margin-bottom: 8px;
}
.brief h1 {
  margin-top: 14px;
  margin-bottom: 14px;
}
#arsenal {
  z-index: 10;
  background: #0d2532ef;
}
.arsenal-dialog {
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  background: linear-gradient(135deg, #28474e, #15343e);
  border: 1px solid #7d9e9e;
  border-top: 3px solid #f0d895;
  border-radius: 6px;
  box-shadow: 0 20px 80px #061c39aa;
}
.arsenal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.arsenal-heading h2 {
  font-size: 24px;
  margin: 7px 0;
  color: #f3e5be;
  letter-spacing: -0.6px;
}
.arsenal-heading p {
  font-size: 11px;
  color: #b8cdc2;
  margin: 0;
}
.arsenal-heading button {
  min-width: 90px;
  color: #f3dda5;
  border-color: #f0d89599;
}
.inventory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.inventory-weapon {
  position: relative;
  text-align: left;
  color: #dce6d6;
  border: 1px solid #779c9e80;
  background: #112e38;
  border-radius: 4px;
  padding: 12px 13px 8px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.inventory-weapon:hover {
  background: #284a51;
  border-color: #dae4c4;
}
.inventory-weapon.equipped {
  border-color: #edd698;
  background: linear-gradient(125deg, #475346, #213d3e);
}
.inventory-weapon > .weapon-art {
  position: absolute;
  right: 12px;
  top: 2px;
  width: 66px;
  height: 35px;
  color: #c7cdae;
  margin: 0;
}
.inventory-weapon.equipped > .weapon-art {
  color: #f0d895;
}
.weapon-heading b {
  display: block;
  font-size: 14px;
  letter-spacing: 1px;
}
.weapon-heading small {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  color: #a9c1b9;
  margin-top: 3px;
}
.inventory-weapon p {
  font-size: 10px;
  color: #bfd0c5;
  margin: 9px 0;
  line-height: 1.35;
}
.weapon-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.weapon-stats small {
  display: block;
  color: #a7bfb5;
  font-size: 7px;
  letter-spacing: 0.8px;
}
.weapon-stats b {
  display: block;
  font-size: 14px;
  margin-top: 3px;
  color: #f1e3b9;
}
.equip-state {
  font-size: 7px;
  letter-spacing: 1px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #9bb5a433;
  color: #a4bcb2;
}
.equipped .equip-state {
  color: #f0d895;
}
.arsenal-footer {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  color: #edd9a6;
  font-size: 10px;
  line-height: 1.5;
}
.arsenal-footer > span:last-child {
  max-width: 155px;
  text-align: right;
  color: #9bb9ad;
  font-size: 8px;
  flex-shrink: 0;
}
@media (max-height: 760px) and (min-width: 800px) {
  .brief h1 {
    font-size: 50px;
  }
  .brief .intro {
    margin-bottom: 10px;
  }
  .loadout-brief {
    margin: 10px 0 12px;
  }
  .inventory-weapon {
    padding-top: 9px;
  }
  .inventory-weapon p {
    margin-block: 6px;
  }
  .arsenal-dialog {
    padding: 18px;
  }
  .arsenal-heading {
    margin-bottom: 14px;
  }
  .arsenal-heading h2 {
    font-size: 22px;
  }
  .equip-state {
    padding-top: 5px;
    margin-top: 6px;
  }
}
@media (max-width: 730px) {
  .menu-tools {
    gap: 8px;
  }
  .menu-tools .build-label {
    display: none;
  }
  .menu-tools .secondary {
    font-size: 8px;
  }
  .inventory-grid {
    grid-template-columns: 1fr;
  }
  .arsenal-dialog {
    padding: 16px;
  }
  .arsenal-heading h2 {
    font-size: 18px;
  }
  .arsenal-heading p {
    font-size: 10px;
  }
  .arsenal-footer {
    align-items: flex-start;
  }
  .arsenal-footer > span:last-child {
    max-width: 100px;
  }
}

/* Breakthrough operation briefing, radio and after-action report. */
.mode-picker {
  display: flex;
  gap: 8px;
  margin: 15px 0 12px;
}
.mode-picker button {
  flex: 1;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #94b4a55c;
  border-radius: 4px;
  background: #14333dbb;
  color: #ccdacf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
}
.mode-picker button small {
  display: block;
  font-size: 7px;
  margin-top: 5px;
  color: #a6bfb1;
}
.mode-picker button.selected {
  background: #e6cf9022;
  border-color: #efd998;
  color: #f5dfa4;
}
.map-choice:disabled {
  opacity: 0.3;
  cursor: default;
  filter: grayscale(0.8);
}
.result-dialog {
  max-width: 780px;
  width: min(780px, 94vw);
  max-height: 94vh;
  overflow: auto;
}
.result-dialog h2 {
  font-size: 30px;
  margin-bottom: 6px;
}
.final-score {
  font-size: 44px;
  margin: 10px 0;
}
.final-score small {
  font-size: 17px;
}
.personal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
  padding: 16px 0;
  margin: 14px 0;
}
.personal-stats b {
  font-size: 25px;
}
.personal-stats small {
  font-size: 8px;
}
.sector-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0;
}
.sector-timeline div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  background: #102d3555;
  border: 1px solid #8ba79744;
  border-radius: 4px;
  font-size: 9px;
  color: #8ca89b;
}
.sector-timeline .secured {
  color: #e8d49a;
  border-color: #cbbb7f77;
}
.sector-timeline span {
  font-size: 13px;
}
.score-table .eyebrow {
  font-size: 10px;
}
.score-table .eyebrow span {
  font-size: 7px;
}
.score-table p {
  font-size: 11px;
}
.score-table p b {
  display: inline-block;
  min-width: 43px;
  color: #f0d895;
}
.score-key {
  font-size: 9px;
  line-height: 1.6;
  margin: 8px 0 15px !important;
}
@media (max-height: 800px) and (min-width: 800px) {
  .brief h1 {
    font-size: 43px;
    line-height: 1;
  }
  .brief .intro {
    font-size: 14px;
    margin: 10px 0;
  }
  .mode-picker {
    margin: 10px 0;
  }
  .mode-picker button {
    padding: 8px 10px;
  }
  .brief .mission {
    font-size: 12px;
    margin: 10px 0;
  }
  .brief .mode-tag {
    margin-bottom: 8px;
  }
  .result-dialog {
    padding: 22px;
  }
  .result-dialog h2 {
    font-size: 26px;
  }
  .personal-stats {
    gap: 10px;
    padding: 10px 0;
  }
  .score-table p {
    padding: 5px 0;
  }
  .final-score {
    font-size: 32px;
    margin: 7px 0;
  }
  .sector-timeline {
    margin: 8px 0;
  }
  .sector-timeline div {
    padding: 7px;
  }
}
@media (max-width: 1000px) {
  .result-dialog {
    padding: 18px;
  }
}
@media (max-width: 730px) {
  .personal-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  .personal-stats small {
    font-size: 6px;
  }
  .score-table {
    gap: 10px;
  }
  .score-table .eyebrow span {
    font-size: 6px;
  }
  .score-table p {
    font-size: 9px;
  }
  .result-dialog h2 {
    font-size: 23px;
  }
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}
.result-actions .primary {
  margin: 0;
  min-width: 230px;
}
.result-actions .secondary {
  padding: 16px 20px;
}
@media (max-height: 800px) and (min-width: 800px) {
  .score-table p {
    padding: 2px 0;
    margin: 2px 0;
    line-height: 1.4;
  }
  .result-dialog #resultReason {
    margin: 8px 0;
  }
  .result-dialog .personal-stats {
    margin: 10px 0;
    gap: 8px;
  }
  .result-dialog .personal-stats b {
    font-size: 23px;
  }
  .result-actions {
    margin-top: 8px;
  }
}
@media (max-width: 550px) {
  .result-actions {
    flex-direction: column;
  }
  .result-actions .primary {
    width: 100%;
    min-width: 0;
  }
  .result-actions .secondary {
    width: 100%;
  }
}

/* Convoy Run and optional line-of-sight play. */
.mode-picker button {
  font-size: 10px;
  padding: 10px;
}
.mode-picker button small {
  font-size: 7px;
  letter-spacing: 0.5px;
}
.fog-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.fog-setting button {
  flex-shrink: 0;
  background: #12333dcc;
  color: #c0d6ce;
  border: 1px solid #99b9b566;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.fog-setting button[aria-pressed='true'] {
  color: #f5dfa4;
  border-color: #efd998;
  background: #e6cf9022;
}
.fog-setting span {
  font-size: 8px;
  line-height: 1.4;
  color: #9cbab0;
}
#convoyHelp {
  border-top: 1px solid #a5bd9e33;
  padding-top: 7px;
  color: #f0d895;
}
@media (max-height: 800px) and (min-width: 800px) {
  .brief h1 {
    font-size: 38px;
  }
  .mode-picker {
    margin: 8px 0;
  }
  .mode-picker button {
    font-size: 9px;
    padding: 8px;
  }
  .fog-setting {
    margin: 6px 0;
  }
  .brief .intro {
    font-size: 13px;
    margin: 8px 0;
  }
  .brief .mission {
    line-height: 1.6;
  }
  .loadout-brief {
    margin: 8px 0;
  }
  .mode-tag {
    font-size: 9px;
  }
}
@media (max-width: 730px) {
  .mode-picker {
    gap: 4px;
  }
  .mode-picker button {
    font-size: 8px;
    padding: 8px 6px;
  }
  .mode-picker button small {
    font-size: 6px;
  }
  .fog-setting {
    gap: 7px;
  }
  .fog-setting span {
    font-size: 7px;
  }
}
