:root {
  --ink: #142b35;
  --navy: #102631;
  --paper: #f7f2df;
  --muted: #52615d;
  --mint: #b9e5a5;
  --orange: #ed825e;
  --line: #cdd2bc;
  --base: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--ink);
  font-size: var(--base);
  background: var(--navy);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  min-height: 42px;
}
button:hover,
a.button:hover {
  background: #fff9e8;
  transform: translateY(-1px);
}
button:active {
  box-shadow: 1px 1px 0 var(--ink);
  transform: translate(2px, 2px);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
button.primary {
  background: var(--mint);
}
button.danger {
  background: #f4b293;
}
button.quiet {
  box-shadow: none;
  background: transparent;
}
button.selected {
  background: var(--mint);
  outline: 3px solid #548b5f;
  outline-offset: 2px;
}
:focus-visible {
  outline: 4px solid #b3552e;
  outline-offset: 4px;
}
input,
select {
  padding: 11px;
  border: 2px solid var(--ink);
  background: #fffdf1;
  max-width: 100%;
  width: 100%;
}
label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  font-size: 0.85rem;
  font-weight: bold;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #264d3d;
}
input[type="range"] {
  padding: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}
h2 {
  font-size: 1.6rem;
  letter-spacing: -0.05em;
}
h3 {
  font-size: 1rem;
  line-height: 1.45;
}
p {
  line-height: 1.55;
}
small,
.small {
  font-size: 0.76rem;
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: bold;
}
.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid currentColor;
  padding: 6px 9px;
  font-size: 0.7rem;
}
.dot {
  width: 7px;
  height: 7px;
  background: #80c68b;
  display: inline-block;
}
.dot.offline {
  background: var(--orange);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 14px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 24px;
}
.brand {
  font-weight: 900;
  letter-spacing: -0.06em;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--mint);
  color: var(--ink);
  box-shadow: 4px 4px 0 #38624e;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 30px;
  color: var(--paper);
  border-bottom: 1px solid #49605f;
}
.topbar .eyebrow {
  color: #c9d8c0;
}
.landing {
  max-width: 1240px;
  min-height: 100vh;
  min-height: 100svh;
  margin: auto;
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  min-height: 0;
  color: var(--paper);
}
.hero-copy {
  padding: clamp(16px, 2.5vh, 32px) 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}
.hero-copy h1 {
  font-size: clamp(2.25rem, min(4.2vw, 7vh), 3.7rem);
  margin: 12px 0;
}
.hero-copy p {
  max-width: 410px;
  margin-bottom: 12px;
  color: #c7d4cb;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
}
.hero-copy h1 span {
  color: var(--mint);
}
.hero-art {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: #739579;
  border-left: 1px solid #49605f;
}
.hero-art canvas {
  position: absolute;
  inset: 0;
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.art-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--ink);
  padding: 14px;
  color: var(--paper);
  font-size: 0.7rem;
  border: 1px solid #a9b9a0;
}
.landing-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #49605f;
  border-top: 1px solid #49605f;
}
.landing-bottom > div {
  background: var(--navy);
  padding: 14px 24px;
  color: var(--paper);
}
.landing-bottom strong {
  display: block;
  font-size: 1.1rem;
  color: var(--mint);
  margin-bottom: 6px;
}
.landing-bottom p {
  font-size: 0.75rem;
  margin: 0;
  color: #bacbc1;
}
.join-form {
  width: 100%;
  max-width: 420px;
}
.join-form input {
  min-width: 0;
  background: #e9eedb;
}
.join-form button {
  flex-shrink: 0;
  white-space: nowrap;
}
.hero-copy .entry-note {
  margin: 12px 0 0;
  font-size: 0.76rem;
}
.join-form .row {
  flex-wrap: nowrap;
  align-items: stretch;
}
.join-form label {
  margin: 8px 0;
  color: #e2e8d6;
}
.error {
  padding: 12px;
  background: #f4d5c4;
  color: #6f281c;
  border-left: 4px solid #a6412c;
}
.notice {
  padding: 12px;
  background: #e0ead0;
  border-left: 4px solid #6b8a54;
  font-size: 0.8rem;
  line-height: 1.55;
}
.setup {
  max-width: 1000px;
  margin: 35px auto;
  padding: 0 24px 40px;
}
.setup > h1 {
  font-size: 2.7rem;
  color: var(--paper);
}
.setup .intro {
  color: #c8d6cb;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.avatar-grid button {
  padding: 5px;
  display: grid;
  gap: 4px;
  font-size: 0.65rem;
}
.avatar-grid canvas {
  width: 48px;
  height: 62px;
  image-rendering: pixelated;
}
.palette-grid {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}
.swatch {
  width: 38px;
  height: 38px;
  padding: 0;
  min-height: 38px;
}
.radio-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #a6b6a0;
  padding: 13px;
  cursor: pointer;
}
.game {
  height: 100vh;
  min-height: 640px;
  display: grid;
  grid-template-rows: 67px minmax(0, 1fr) 55px;
}
.game .topbar {
  padding: 10px 20px;
}
.game-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 0;
  min-height: 0;
}
.world-wrap {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  position: relative;
  overflow: hidden;
  background: #749b7c;
  min-height: 400px;
}
.world {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  outline-offset: -5px;
}
.world-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid #42654b;
}
.map-label {
  font-size: 0.75rem;
  font-weight: 700;
}
.world-hint {
  font-size: 0.7rem;
  color: #d9e5cf;
}
.mission {
  overflow-y: auto;
  background: var(--paper);
  padding: 24px 20px;
  border-left: 3px solid var(--ink);
}
.mission h2 {
  font-size: 1.75rem;
  margin: 13px 0;
}
.mission p {
  font-size: 0.8rem;
}
.chapter-count {
  font-size: 0.7rem;
  color: #526648;
  letter-spacing: 0.1em;
}
.mission button {
  width: 100%;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 0.8rem;
}
.mission hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.mission .notice {
  padding: 10px;
}
.progress-track {
  height: 10px;
  background: #cbd2ba;
  margin: 10px 0 14px;
}
.progress-fill {
  height: 100%;
  background: #4e8560;
  transition: width 0.4s;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin: 12px 0;
}
.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: #e9e7d3;
  border-top: 2px solid var(--ink);
}
.game-footer button {
  padding: 5px 10px;
  min-height: 32px;
  box-shadow: none;
  font-size: 0.7rem;
}
.game-footer .row {
  gap: 7px;
}
.key {
  display: inline-grid;
  place-items: center;
  border: 1px solid #75877a;
  min-width: 20px;
  height: 20px;
  font-size: 0.65rem;
  padding: 1px 4px;
  background: #fff9e8;
}
.timer {
  font-size: 1.7rem;
  font-weight: bold;
  letter-spacing: -0.04em;
  color: var(--mint);
}
.phase-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #c3d3c4;
  text-transform: uppercase;
}
dialog {
  width: min(640px, calc(100vw - 30px));
  max-height: 88vh;
  padding: 0;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 10px 10px 0 #081a25a6;
}
dialog::backdrop {
  background: #071c2ab8;
}
dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
dialog h2 {
  margin: 0;
  font-size: 1.4rem;
}
#close-modal {
  box-shadow: none;
  font-size: 1.5rem;
  min-height: 34px;
  padding: 0 9px;
}
#modal-body {
  padding: 24px;
  overflow-y: auto;
}
#modal-body p {
  font-size: 0.9rem;
}
.choice-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.choice-list button {
  justify-content: flex-start;
  text-align: left;
  line-height: 1.5;
}
.choice-list button .key {
  flex-shrink: 0;
}
#toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  z-index: 8;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 20px;
  font-size: 0.85rem;
  display: none;
}
.inventory-item,
.player-item,
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.inventory-item strong,
.player-item strong {
  font-size: 0.85rem;
}
.player-item button {
  font-size: 0.7rem;
  padding: 6px 10px;
  box-shadow: none;
}
.leaderboard {
  list-style: none;
  padding: 0;
}
.leaderboard li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}
.leaderboard .rank {
  color: #4d6548;
  width: 20px;
}
.leaderboard .score {
  margin-left: auto;
  font-weight: bold;
}
.leaderboard .award {
  font-size: 0.65rem;
  background: #cee6ad;
  padding: 4px;
}
.host-shell {
  max-width: 1180px;
  margin: 30px auto;
  padding: 0 25px;
}
.host-shell > h1 {
  font-size: 2.6rem;
  color: var(--paper);
}
.host-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.host-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.host-stats .card {
  padding: 18px;
}
.host-stats strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}
.host-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.host-actions button {
  font-size: 0.8rem;
}
.log {
  font-size: 0.72rem;
  max-height: 250px;
  overflow: auto;
  line-height: 1.8;
}
.presentation .game-main {
  grid-template-columns: minmax(0, 1fr) 380px;
}
.presentation .mission {
  font-size: 1.2rem;
}
.presentation .timer {
  font-size: 2.5rem;
}
.presentation .topbar {
  padding: 12px 25px;
}
.presentation.game {
  grid-template-rows: 90px minmax(0, 1fr) 55px;
}
.presentation .mission h2 {
  font-size: 2.4rem;
}
.presentation .mission .small,
.presentation .mission .muted,
.presentation .mission .standings,
.presentation .mission .eyebrow,
.presentation .mission p,
.presentation .mission li,
.presentation .mission .award,
.presentation .mission .chapter-count {
  font-size: 1rem;
  line-height: 1.5;
}
.presentation .game-footer .small,
.presentation .world-hint,
.presentation .map-label {
  font-size: 0.9rem;
}
.phone-screen {
  max-width: 650px;
  margin: 10vh auto;
  padding: 30px;
}
.phone-screen h1 {
  font-size: 2.4rem;
}
.target-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.target-grid button {
  min-height: 100px;
  display: grid;
  place-items: center;
}
.target-grid button canvas {
  image-rendering: pixelated;
}
.badge {
  background: #dae8c6;
  padding: 3px 7px;
  font-size: 0.65rem;
}
.hidden {
  display: none !important;
}
.block-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffe2bb;
  z-index: 20;
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
}
.checkline {
  display: flex;
  gap: 12px;
  align-items: center;
}
.chapter-map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.chapter-map button {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  line-height: 1.4;
  font-size: 0.75rem;
  text-align: left;
  justify-content: flex-start;
  min-height: 60px;
}
.content-pending {
  font-size: 0.65rem;
  color: #875339;
  margin-bottom: 12px;
}
.phase-banner {
  padding: 20px;
  background: var(--mint);
  border: 2px solid var(--ink);
  margin-bottom: 16px;
}
.mystery {
  letter-spacing: 0.25em;
  font-size: 1.3rem;
  padding: 20px;
  border: 2px dashed #729469;
  text-align: center;
}
.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.compact-table td,
.compact-table th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.notice:empty {
  display: none;
}
.safe {
  color: #a7cf9a;
}
.reduced-motion * {
  animation: none !important;
  transition: none !important;
}
@media (max-width: 1050px) {
  .game-main {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .mission {
    padding: 18px 15px;
  }
  .topbar .brand {
    font-size: 0.85rem;
  }
  .topbar {
    padding: 15px;
  }
  .game-footer > .small {
    display: none;
  }
}
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    min-height: 300px;
    max-height: 350px;
  }
  .hero-copy {
    padding: 35px 24px;
  }
  .landing-bottom {
    grid-template-columns: 1fr;
  }
  .grid2,
  .host-grid {
    grid-template-columns: 1fr;
  }
  .host-stats {
    grid-template-columns: 1fr 1fr;
  }
  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .topbar {
    gap: 10px;
    flex-wrap: wrap;
  }
  .game {
    min-width: 900px;
  }
  .setup {
    margin-top: 20px;
  }
}
.evidence-card {
  background: #dce8ce;
  border: 2px solid #63835c;
  padding: 18px;
  margin: 18px 0;
}
.evidence-card p {
  margin: 10px 0 0;
  font-size: 1rem !important;
  line-height: 1.6;
}
#activity-prompt:focus {
  outline: 2px solid #6b8a54;
  outline-offset: 6px;
}

.map-places {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: normal;
}

/* The trail is a field expedition: quiet body text, compact pixel-like labels. */
body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.eyebrow,
.chapter-count,
.hud-caption,
.timer,
.phase-label,
.map-label,
.brand,
.delivery-trail,
.supply-total strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.game-main {
  grid-template-columns: minmax(0, 1fr) 330px;
}
.world-wrap {
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #203a40;
}
.map-viewport {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #203a40;
}
.world {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  max-width: 100%;
  max-height: 100%;
}
.supply-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 10px 16px;
  color: #f4efd9;
  background: #1d3740;
  border-bottom: 2px solid #687b6d;
}
.hud-caption {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #b9c9b7;
}
.supply-total strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
}
.supply-total small {
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: #cbd5c2;
}
.supply-counts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.supply-count {
  display: grid;
  grid-template-columns: 15px auto;
  align-items: center;
  gap: 0 6px;
  font-size: 0.7rem;
  text-transform: capitalize;
}
.supply-count strong {
  font-size: 1rem;
}
.supply-count > span {
  grid-column: 2;
  color: #cbd5c2;
}
.supply-icon {
  width: 13px;
  height: 13px;
  display: block;
  background: #c6ad78;
  border: 3px solid #8f805e;
  box-shadow: 2px 2px 0 #0e2630;
}
.supply-icon.filters {
  background: repeating-linear-gradient(90deg, #d2d6bb 0 2px, #6e8e89 2px 4px);
}
.supply-icon.food {
  background: #b9cd8f;
  border-color: #718d61;
}
.supply-icon.cable {
  border: 3px double #ddbe79;
  background: #253e43;
}
.hud-safe {
  font-size: 0.75rem;
  color: #c9ddb9;
}
.mission {
  padding: 23px 20px;
  background: #f5efdc;
  border-color: #263f48;
}
.mission h2 {
  font-size: 1.9rem;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.mission p {
  font-size: 0.86rem;
  line-height: 1.5;
}
.mission .chapter-count {
  color: #527164;
}
.mission .stat-row {
  font-size: 0.78rem;
  margin: 11px 0;
}
.mission .stat-row strong {
  font-size: 1rem;
}
.mission .task-primary {
  display: flex;
  min-height: 52px;
  padding: 13px;
  border-color: #264c43;
  background: #bfd6a2;
  font-size: 0.93rem;
}
.mission .task-destination {
  font-size: 0.73rem;
  margin: 9px 0 18px;
  color: #4c6862;
}
.secondary-heading {
  font:
    700 0.63rem ui-monospace,
    monospace;
  letter-spacing: 0.1em;
  color: #627266;
  border-top: 1px solid #c9cfb8;
  padding-top: 16px;
  margin-top: 18px;
}
.secondary-actions {
  display: grid;
  gap: 0;
}
.secondary-actions button.quiet {
  border: 0;
  border-bottom: 1px solid #d5d8c4;
  min-height: 36px;
  margin: 0;
  padding: 9px 2px;
  font-weight: 600;
  font-size: 0.81rem;
}
.delivery-trail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 20px 0 17px;
}
.delivery-trail span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  color: #6c776c;
  font-size: 0.59rem;
  line-height: 1.2;
}
.delivery-trail b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid #bec7ac;
  background: #e8e7d2;
  font-size: 0.75rem;
}
.delivery-trail .current {
  color: #213c3b;
  font-weight: 700;
}
.delivery-trail .current b {
  color: #f7f2df;
  border-color: #203f49;
  background: #203f49;
  outline: 2px solid #d5af6a;
  outline-offset: 2px;
}
.delivery-trail .done b {
  background: #b9d2a3;
  border-color: #839d76;
}
#modal-body h3 {
  line-height: 1.25;
}
#modal-body p {
  line-height: 1.5;
}
.choice-list button {
  text-align: left;
  line-height: 1.4;
}
.world-legend {
  background: #1d3740;
  padding: 9px 15px;
  gap: 5px 16px;
}
.world-hint {
  font-size: 0.72rem;
}
@media (max-width: 1100px) {
  .game-main {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .supply-hud {
    padding: 8px 10px;
    gap: 8px;
  }
  .supply-counts {
    gap: 10px;
  }
}
.cargo-panel {
  background: #203f49;
  color: #f5efdc;
  padding: 18px;
  margin-bottom: 20px;
  border-left: 5px solid #cfac6b;
}
.cargo-panel p {
  margin: 10px 0;
}
.cargo-panel .eyebrow {
  color: #c3d5b7;
}
.cargo-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.cart-slots {
  display: flex;
  gap: 6px;
  margin: 15px 0 10px;
}
.cart-slots span {
  width: 29px;
  height: 25px;
  border: 2px solid #758d86;
  background: #2e4e56;
}
.cart-slots .filled {
  background: #c4ab71;
  border-color: #f1d596;
  box-shadow: inset 0 -5px #a88e5d;
}
.reserve-note {
  font-size: 0.72rem;
  color: #ced9c4;
  padding-top: 10px;
  border-top: 1px solid #5c776e;
}
.choice-list button {
  display: block;
  width: 100%;
}
.choice-detail {
  display: block;
  margin-top: 7px;
  font-size: 0.78em;
  font-weight: 500;
  color: #536962;
}
.choice-list button.selected .choice-detail {
  color: #284b40;
}
.action-receipt h3 {
  font-size: 1.8rem;
  letter-spacing: -0.035em;
  margin: 10px 0 18px;
}
.receipt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 9px;
  margin-bottom: 20px;
}
.receipt-stats > div {
  border-top: 3px solid #5f8b6e;
  background: #e5e8d2;
  padding: 12px;
}
.receipt-stats strong {
  display: block;
  font:
    700 1.6rem ui-monospace,
    monospace;
  color: #244b43;
}
.receipt-stats span {
  font-size: 0.7rem;
  color: #48635b;
}
#receipt-next button {
  min-width: 200px;
  margin-top: 10px;
}
.hero-art {
  background: #203a40;
}
.hero-art canvas {
  object-fit: contain;
}
.host-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .host-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
h1,
h2,
h3 {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: -0.035em;
}
.hero-copy h1 {
  letter-spacing: -0.045em;
  line-height: 1.03;
}
.mission h2 {
  font-size: 1.65rem;
  line-height: 1.12;
  letter-spacing: -0.04em;
}
dialog {
  width: min(720px, calc(100vw - 30px));
  max-height: 90vh;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog > header {
  flex-shrink: 0;
  padding: 14px 20px;
}
dialog h2 {
  font-size: 1.2rem;
}
#modal-body {
  min-height: 0;
  padding: 20px;
}
#activity-prompt {
  margin: 12px 0;
}
.cargo-panel {
  padding: 12px 14px;
  margin-bottom: 16px;
}
.cargo-heading {
  align-items: center;
}
.cargo-manifest {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  font-size: 0.72rem;
  margin-top: 9px;
  color: #dbe4cf;
}
.cargo-manifest details {
  font-size: 0.7rem;
}
.cargo-manifest summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cargo-manifest details > span {
  display: block;
  padding: 7px 0 2px;
}
.cart-slots {
  align-items: center;
  gap: 4px;
  margin: 0;
}
.cart-slots span {
  width: 17px;
  height: 16px;
}
.cart-slots strong {
  font-size: 0.74rem;
  margin-left: 5px;
}
.choice-list {
  gap: 8px;
  margin: 12px 0;
}
.choice-list button {
  padding: 10px 12px;
}
.choice-detail {
  margin-top: 4px;
}
#task-confirm {
  position: sticky;
  bottom: -20px;
  padding: 12px 0;
  background: var(--paper);
  border-top: 1px solid #d3d8c1;
}
#selection-status {
  font-size: 0.75rem;
  margin: 8px 0;
}
.receipt-caption {
  color: #617568;
  margin-bottom: 7px;
}
.receipt-stats:empty {
  display: none;
}
.receipt-supplies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -8px 0 16px;
  padding: 10px 0;
  border-bottom: 1px solid #d3d8c1;
  font-size: 0.75rem;
  color: #48635b;
}
#receipt-next {
  position: sticky;
  bottom: -20px;
  padding: 5px 0 10px;
  background: var(--paper);
}

/* Move Day is a single illustrated crossing with choices beside the cart. */
.move-day-game .game-main {
  grid-template-columns: minmax(0, 1fr) 350px;
}
.move-day-game .world-wrap,
.move-day-game .map-viewport {
  background: #789170;
}
.move-day-game .supply-hud {
  padding: 8px 14px;
  min-height: 36px;
  gap: 7px 15px;
}
.move-day-game .supply-hud strong {
  font-size: 0.82rem;
}
.move-day-game .world-legend {
  padding: 7px 12px;
}
.move-day-game .map-label {
  font-size: 0.65rem;
}
.move-day-game .world-hint {
  font-size: 0.66rem;
}
.move-day-mission {
  padding: 15px 18px;
}
.move-day-mission h2 {
  margin: 7px 0 5px;
  font-size: 1.8rem;
}
.move-day-mission .chapter-count {
  font-size: 0.64rem;
}
.move-day-mission .move-day-story {
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0 0 11px;
}
.travel-journal {
  border-left: 3px solid #7d936a;
  padding: 6px 10px;
  background: #e6e7cf;
  margin: 0 0 10px;
}
.travel-journal .eyebrow {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}
.travel-journal h3 {
  font-size: 0.86rem;
  margin: 4px 0;
}
.move-day-mission .travel-journal p {
  font-size: 0.72rem;
  line-height: 1.35;
  margin: 0;
}
.focused-cart {
  border-block: 1px solid #b7c3a9;
  padding: 7px 0;
  margin-bottom: 10px;
  font-size: 0.72rem;
}
.focused-cart .spread {
  justify-content: space-between;
  gap: 6px;
}
.focused-cart strong {
  font-size: 0.8rem;
}
.focused-supplies {
  display: flex;
  gap: 15px;
  color: #526557;
  margin-top: 5px;
}
.move-day-mission #move-day-prompt {
  font-size: 1rem;
  margin: 9px 0 7px;
}
.move-day-choices {
  display: grid;
  gap: 6px;
}
.move-day-choices button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.79rem;
  line-height: 1.15;
  border-width: 1px;
  box-shadow: none;
}
.move-day-choices button.selected {
  border-color: #365a43;
  background: #ccdab6;
  outline: 1px solid #365a43;
}
.move-day-choices .choice-detail {
  margin-top: 4px;
  font-size: 0.85em;
  line-height: 1.3;
}
.move-day-controls {
  margin-top: 9px;
}
.move-day-controls .move-day-primary {
  width: 100%;
  margin: 0;
  padding: 10px;
  font-size: 0.86rem;
}
.move-day-mission .move-day-travel {
  font-size: 0.65rem;
  margin: 5px 0 0;
}
.move-day-companions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.move-day-companions > p {
  width: 100%;
  font-size: 0.65rem;
  margin: 0 0 3px;
}
.move-day-companions button {
  font-size: 0.59rem;
  padding: 5px;
  border-width: 1px;
  margin: 0;
}
.move-day-game .game-footer {
  padding-block: 8px;
}
.move-day-game .game-footer button {
  padding: 7px 9px;
  font-size: 0.72rem;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .move-day-game .game-main {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .move-day-mission {
    padding: 12px;
  }
}
.move-day-game {
  grid-template-rows: 57px minmax(0, 1fr) 47px;
}
.move-day-game .topbar {
  padding-block: 5px;
}
.move-day-broadcast {
  font-size: 0.72rem;
  border-bottom: 1px solid #c4cdb4;
  padding: 0 0 6px;
  margin-bottom: 7px;
}
.move-day-broadcast summary {
  cursor: pointer;
  color: #486653;
}
.move-day-mission .move-day-broadcast p {
  margin-bottom: 5px;
}
.move-day-mission .travel-journal {
  padding: 5px 9px;
  margin-bottom: 9px;
}
.move-day-mission .travel-journal .eyebrow {
  display: none;
}
.move-day-mission .move-day-choices button {
  height: auto;
  min-height: 48px;
  white-space: normal;
  overflow-wrap: anywhere;
  flex: none;
}
.move-day-mission .move-day-choices .choice-detail {
  width: 100%;
  white-space: normal;
}
.move-day-mission .move-day-companions button {
  width: auto;
  flex: 1 1 auto;
  min-height: 28px;
}
.neighbor-emote {
  display: block;
  color: #365f4a;
  font-weight: 700;
}
.neighbor-emote:empty {
  display: none;
}

/* Chapter two keeps the resident, equipment and installation choices together. */
.filter-mission .filter-supply-line { display:flex; gap:8px; justify-content:space-between; border-block:1px solid #b7c3a9; padding:7px 0; font-size:.72rem; margin-bottom:10px; }
.filter-mission .filter-evidence { background:#f3e9ca; border-left:3px solid #80654b; padding:8px 10px; margin-bottom:10px; }
.filter-mission .filter-evidence .eyebrow { font-size:.6rem; }
.filter-mission .filter-evidence p { margin:5px 0 0; font-size:.8rem; line-height:1.35; }
.filter-mission #filter-actions h3 { margin:8px 0; font-size:.95rem; }
.filter-mission .filter-choices button { font-size:.8rem; line-height:1.25; min-height:44px; }
.filter-mission .filter-status { font-size:.68rem; line-height:1.3; margin:7px 0 0; }
.filter-mission .travel-journal h3 { font-size:.9rem; }
.filter-mission .move-day-companions { margin-top:8px; }

/* Shared arrival and event surfaces; gameplay scene controls keep their own layout. */
.setup-welcome,.host-welcome{display:flex;align-items:center;gap:24px;margin-bottom:24px;color:var(--paper)}
.setup-welcome>div,.host-welcome>div{flex:1;min-width:0}
.setup-welcome h1,.host-welcome h1{font-size:2.5rem;margin:10px 0}
.setup-welcome canvas,.host-welcome canvas{display:block;width:180px;height:120px;flex:none;border:3px solid #80654b;image-rendering:pixelated;object-fit:contain;background:#789170}
.setup-welcome .intro,.host-welcome p{margin:8px 0;font-family:system-ui,sans-serif}
.practice-progress{border-left:4px solid #80654b;background:#e1e6cc;padding:12px;margin:16px 0}
.practice-progress strong,.practice-progress span{display:block}
.practice-progress span{font:0.85rem/1.4 system-ui,sans-serif;margin-top:6px}
#tutorial-actions{display:grid;gap:8px}
#tutorial-actions button{text-align:left;line-height:1.45;min-height:44px}
.host-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
.host-actions button{min-height:44px}
@media(max-width:1100px){.host-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.setup-welcome canvas,.host-welcome canvas{width:144px;height:96px}.setup-welcome h1,.host-welcome h1{font-size:2rem}}
@media(max-width:760px){.setup-welcome canvas,.host-welcome canvas{display:none}.host-grid{grid-template-columns:1fr}.host-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Every active chapter has a distinct worksite, sharing readable task controls. */
.chapter-scene-mission h2 {font-size:1.55rem;line-height:1.12; margin:7px 0;}
.chapter-scene-mission .travel-journal {margin-bottom:8px;}
.chapter-scene-mission .scene-balance {font-size:.8rem; margin:7px 0;}
.chapter-scene-mission .scene-clock {font-size:.76rem;padding:8px;margin:7px 0;}
.chapter-scene-mission .scene-choices button {font-size:.79rem;line-height:1.2;min-height:44px;}
.chapter-scene-mission .scene-targets button {min-height:44px;}
.chapter-scene-mission .scene-node-grid {display:grid;grid-template-columns:1fr 1fr;gap:5px;}
.chapter-scene-mission .scene-node-grid button {font-size:.68rem;padding:7px 4px;min-height:35px;margin:0;box-shadow:none;border-width:1px;}
.chapter-scene-mission .scene-node-grid button.selected {background:#ccdab6;outline:2px solid #365a43;}
.chapter-scene-mission .scene-path,.chapter-scene-mission .scene-links {font-size:.65rem;line-height:1.3;overflow-wrap:anywhere;margin:7px 0;}
.chapter-scene-mission .scene-route-summary {font-size:.76rem;line-height:1.3;margin:7px 0;}
.chapter-scene-mission .scene-auto {display:flex;align-items:flex-start;gap:8px;font-size:.73rem;line-height:1.3;margin:10px 0;}
.chapter-scene-mission .scene-auto input {width:auto;flex:0 0 auto;margin:2px 0;}
.chapter-scene-mission .scene-primary-wrap {position:sticky;bottom:-12px;background:var(--paper);padding:7px 0;z-index:2;}
/* Error copy must win over the pale hero paragraph rule. */
.error,.hero-copy .error,.phone-screen .error{color:#6f281c;background:#f4d5c4}
.chapter-scene-mission .scene-supplies {display:flex;gap:9px;justify-content:space-between;border-block:1px solid #b7c3a9;padding:7px 0;margin:8px 0;font-size:.74rem;}
.chapter-scene-mission .scene-supplies span {display:flex;flex-direction:column;gap:3px;}
.chapter-scene-mission .scene-supplies small {font-size:.65rem;color:#526557;}
/* Long participant names stay inside standings and award columns. */
.leaderboard li > span:not(.rank):not(.score) {min-width:0;overflow-wrap:anywhere;}
.leaderboard .rank,.leaderboard .score {flex-shrink:0;}
#host-players .player-item strong,#host-players .host-player-status{flex:1;min-width:0;overflow-wrap:anywhere}
#host-players .player-item button{flex:none;min-height:44px}
