/* Selected Outpost design. Presentation only; game handlers and model remain unchanged. */
body #mars {
  --navy: var(--ink);
  --rust: var(--orange);
  --border: var(--line);
  --pale: var(--surface);
  max-width: 1240px;
  padding-top: 24px;
}
body .site-header .nav {
  min-height: 76px;
}
body #mars .simulation-intro {
  position: relative;
  grid-template-columns: 1fr minmax(260px,.8fr);
  gap: 20px 48px;
  isolation: isolate;
}
body #mars .simulation-intro .kicker {
  color: #79624f;
}
body #mars .simulation-intro h1 {
  font-weight: 500;
}
body #mars .simulation-intro h1 span {
  font: italic 1.3rem/1.3 var(--serif);
  color: #9e4300;
}
body #mars .design-guide,
body #mars .intro-details>details {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
body #mars .design-guide>summary,
body #mars .intro-details>details>summary {
  padding: 12px 0;
  min-height: 46px;
  font-size: .875rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--navy);
}
body #mars .design-guide>summary span {
  display: inline;
  font-weight: 400;
  color: #707066;
  font-size: .875rem;
  margin-left: 12px;
}
body #mars .simulation-guide {
  border-top: 1px solid var(--line);
  padding: 18px 0 24px;
}
body #mars .intro-details {
  display: block;
  margin: 0;
  border-bottom: 0;
}
body #mars .mode-switch button {
  font-size: .9375rem;
}
body #mars .mission {
  background: transparent;
  padding: 12px 16px;
  gap: 13px;
}
body #mars .mission-num {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border: 1px solid #ccc4b9;
  border-radius: 50%;
  font: 12px ui-monospace,Consolas,monospace;
  opacity: 1;
}
body #mars .mission small {
  font-size: .8125rem;
}
body #mars .brief {
  border-left-width: 2px;
}
body #mars .brief .kicker {
  font: 12px/1.5 ui-monospace,Consolas,monospace;
  letter-spacing: .1em;
  color: #765c46;
}
body #mars .mission-rules {
  gap: 22px;
}
body #mars .mission-rules span {
  font-size: .8125rem;
  color: #62635b;
}
body #mars .mission-rules b {
  font: 500 1.35rem/1.3 ui-monospace,Consolas,monospace;
}
body #mars .packing>h2 {
  font-weight: 600;
  font-size: 1.0625rem;
}
body #mars .packing-help {
  color: #62635b;
}
body #mars .supply {
  border-top-width: 2px;
  padding: 15px 12px;
}
body #mars .supply input {
  border-color: #c9c7bc;
  border-radius: 3px;
  font: 1.5rem/1.4 ui-monospace,Consolas,monospace;
}
body #mars .steps button {
  background: transparent;
  border-color: #deddd3;
  font-size: .875rem;
}
body #mars .projection {
  color: #62635b;
  font-size: .8125rem;
}
body #mars .projection strong {
  font-size: .875rem;
}
body #mars .supply-top h3 {
  font-weight: 500;
}
body #mars .cargo strong {
  font: 1.125rem/1.4 ui-monospace,Consolas,monospace;
}
body #mars .cargo-heading {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
body #mars .cargo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid #d8c9b5;
  border-radius: 5px;
  background: #f1ede3;
  color: #76533a;
  font-weight: 600;
  letter-spacing: .025em;
  white-space: nowrap;
}
body #mars .cargo-label svg {
  flex: none;
  color: var(--rust);
}
body #mars .cargo-heading>strong {
  margin-left: auto;
}
body #mars .cargo meter {
  height: 8px;
  margin: 10px 0;
}
body #mars .check {
  font-size: .8125rem;
}
body #mars .pack-actions>.primary {
  min-height: 48px;
  font-size: .9375rem;
}
body #mars .mission-board {
  border-radius: 4px;
  background: #fffefa;
}
body #mars .board-body {
  padding: 22px;
}
body #mars .board-body h2 {
  font-size: 1.65rem;
  font-weight: 500;
}
body #mars .board-body p {
  line-height: 1.6;
}
body #mars .board-caption {
  font: 11px/1.5 ui-monospace,Consolas,monospace;
  background: #292925e6;
}
body #mars button:active:not(:disabled) {
  transform: translateY(1px);
}
/* The colony in view, warm habitat panels. */
body #mars .simulation-intro {
  overflow: hidden;
  border: 1px solid #d8ccba;
  border-radius: 5px;
  background: #eee7db;
}
body #mars .simulation-intro::after {
  content: "";
  position: absolute;
  inset: 0 0 0 43%;
  z-index: -1;
  background: linear-gradient(90deg,#eee7db 0%,#eee7db20 36%,transparent 58%),url('/mars-outpost/outpost-1536.webp') center 58%/cover;
}
body #mars .simulation-intro>div,
body #mars .intro-copy {
  max-width: 46%;
}
body #mars .intro-copy {
  font-size: .9375rem;
  line-height: 1.55;
  margin-top: 16px;
  color: #4c5148;
}
body #mars .simulation-intro .kicker {
  font-size: .6875rem;
  letter-spacing: .1em;
}
body #mars .mission-strip {
  padding: 6px;
  gap: 5px;
  background: #eee9df;
  border: 1px solid #ded6c9;
  border-radius: 6px;
}
body #mars .mission {
  min-height: 56px;
  border-color: transparent;
}
body #mars .mission.selected {
  background: #fffdf6;
  color: #8e4118;
  border-color: #dcc8b2;
  box-shadow: 0 2px 5px #5f442c0a;
}
body #mars .mission.selected:hover {
  background: #fff9ec;
  color: #8e4118;
}
body #mars .mission.selected .mission-num {
  background: #b95000;
  color: #fff;
  border-color: #b95000;
}
body #mars .brief {
  border-left: 0;
}
body #mars .brief h2 {
  font-size: 1.5rem;
}
body #mars .mission-rules {
  padding: 12px 16px;
  border: 1px solid #d8d2c6;
  border-radius: 4px;
  background: #f1eee6;
}
body #mars .packing {
  order: 1;
}
body #mars .mission-board {
  order: 2;
  border-color: #d8c9b5;
}
body #mars .outpost,
body #mars .campaign .campaign-outpost {
  height: 200px;
}
body #mars .outpost-picture {
  display: block;
  height: 100%;
}
body #mars .outpost img,
body #mars .campaign .campaign-outpost img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
body #mars .board-caption {
  font-size: .75rem;
  letter-spacing: .04em;
}
/* Keep the habitat visible beneath a compact, translucent mission status. */
body #mars .result-hero {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  background: rgba(14,29,34,.8);
  border: 1px solid var(--result-accent);
  border-radius: 4px;
}
body #mars .result-emblem {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin: 0;
  border-width: 2px;
  font-size: 1.6rem;
}
body #mars .result-failure .result-emblem {
  border-radius: 8px;
}
body #mars .result-title {
  min-width: 0;
}
body #mars .result-hero .result-eyebrow {
  margin: 0 0 4px;
  font-size: .75rem;
  line-height: 1.3;
  letter-spacing: .06em;
}
body #mars .result-hero h2 {
  margin: 0;
  color: white;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.15;
  letter-spacing: -.02em;
}
body #mars .board-body>.result-reason {
  margin: 0 0 12px;
}
body #mars .board-body {
  background: #f1ede3;
}
body #mars .supply {
  background: #fffefa;
  border-radius: 6px;
  border-top: 4px solid var(--resource);
}
body #mars .resource-symbol {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1rem;
}
body #mars .supply input {
  background: #f9f7f0;
}
@media(max-width:1100px) and (min-width:761px) {
  body #mars .supply-grid {
    grid-template-columns: 1fr;
  }
}
@media(max-width:760px) {
  body #mars {
    padding: 18px 18px 30px;
  }
  body .site-header .nav {
    min-height: 64px;
  }
  body #mars .simulation-intro {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  body #mars .simulation-intro h1 span {
    font-size: 1.2rem;
  }
  body #mars .simulation-intro .kicker {
    font-size: .6875rem;
    line-height: 1.6;
  }
  body #mars .intro-copy {
    font-size: .9375rem;
  }
  body #mars .design-guide>summary span {
    display: none;
  }
  body #mars .mission {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 11px 8px;
    font-size: .8125rem;
    min-height: 85px;
  }
  body #mars .mission-num {
    height: 24px;
    width: 24px;
    flex: none;
    font-size: 11px;
  }
  body #mars .mission small {
    display: none;
  }
  body #mars .brief {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  body #mars .brief h2 {
    font-size: 1.4rem;
  }
  body #mars .mission-rules {
    width: 100%;
    gap: 12px;
  }
  body #mars .mission-rules span {
    font-size: .75rem;
    display: block;
  }
  body #mars .mission-rules b {
    font-size: 1.125rem;
  }
  body #mars .supply {
    padding: 12px;
  }
  body #mars .supply input {
    font-size: 1.3rem;
  }
  body #mars .supply-top {
    padding: 0;
    border: 0;
  }
  body #mars .projection p {
    display: flex;
    justify-content: space-between;
  }
  body #mars .packing {
    order: 0;
  }
  body #mars .mission-board {
    order: 1;
  }
  body #mars .simulation-intro {
    min-height: 0;
  }
  body #mars .simulation-intro::after {
    position: relative;
    inset: auto;
    height: 148px;
    margin: 18px -22px -22px;
    background: url('/mars-outpost/outpost-768.webp') center 59%/cover;
  }
  body #mars .intro-copy {
    margin-top: 11px;
  }
  body #mars .mission-strip {
    padding: 4px;
    gap: 2px;
  }
  body #mars .brief {
    padding: 0;
  }
  body #mars .mission-rules {
    padding: 13px 15px;
  }
  body #mars .supply-top {
    gap: 6px;
  }
  body #mars .resource-symbol {
    width: 24px;
    height: 24px;
    font-size: .875rem;
    flex: none;
  }
}
@media(prefers-reduced-motion:reduce) {
  body #mars button:active {
    transform: none;
  }
}
/* Reserve the tallest brief at the current width, including text enlargement. */
body #mars .mission-brief-stack {
  display: grid;
}
body #mars .mission-brief {
  grid-area: 1 / 1;
  min-width: 0;
}
body #mars .mission-brief[aria-hidden="true"] {
  visibility: hidden;
}
body #mars .packing-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 12px;
}
body #mars .packing-intro h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
}
body #mars .packing-intro .packing-help {
  margin: 0;
}
/* Keep focus visible in the field border without an outer orange ring. */
body #mars input[data-field]:focus-visible {
  outline: none;
  box-shadow: none;
}
body #mars input[data-field]:focus-visible:not([aria-invalid="true"]) {
  border-color: #62635b;
}
/* Three modes keep their reading order and keyboard targets at narrow widths. */
body #mars .mode-line {
  flex-wrap: wrap;
}
body #mars .mode-switch {
  max-width: 100%;
  flex-wrap: wrap;
}
@media(max-width:400px) {
  body #mars .mode-switch {
    width: 100%;
  }
  body #mars .mode-switch button {
    flex: 1;
    padding: 8px 7px;
    font-size: .875rem;
  }
  body .site-header .nav {
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 10px;
  }
  body .site-header .nav-links {
    margin-left: auto;
  }
}
