﻿:root {
  color-scheme: dark;
  --bg: #111f2e;
  --panel: #1b3042;
  --line: #385063;
  --ink: #ecf0ea;
  --muted: #adbdc9;
  --gold: #e3b56b;
  --green: #2d6958;
  --paper: #f5eedc;
  --red: #a74737;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 76% 2%, #284355 0, transparent 50%), var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button,
input,
select,
textarea {
  border-radius: 7px;
}
button {
  transition:
    background 0.16s,
    transform 0.16s;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
canvas:focus-visible {
  outline: 3px solid #e3b56b;
  outline-offset: 4px;
}
button:focus:not(:focus-visible) {
  outline: none;
}
.topbar {
  height: 91px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #41556855;
  background: #112131ab;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: #f0ecd9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2.5px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 3.1px;
  margin-top: 5px;
}
.brand-mark {
  width: 45px;
  height: 48px;
  background: var(--gold);
  color: #223b4d;
  display: grid;
  place-content: center;
  text-align: center;
  letter-spacing: -1px;
  font-size: 19px;
  box-shadow: 4px 4px 0 #4b6071;
}
.brand-mark span {
  font:
    7px Consolas,
    monospace;
  letter-spacing: 2px;
}
.top-context {
  font:
    10px Consolas,
    monospace;
  letter-spacing: 1px;
  color: #b7c7ce;
}
.top-context i,
.map-top i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #92c5ae;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 9px #91c9b244;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.quiet,
.secondary {
  min-height: 44px;
  border: 1px solid #516577;
  background: #23394b;
  color: #ecede3;
  padding: 10px 15px;
  font-weight: 600;
}
.quiet {
  font-size: 12px;
}
.quiet:hover,
.secondary:hover {
  background: #354e60;
}
.primary {
  border: 1px solid #ebc681;
  background: #e3b56b;
  color: #182f41;
  padding: 14px 20px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 4px 16px #07142426;
}
.primary:hover {
  background: #edc589;
}
.primary span {
  font-size: 22px;
  font-weight: 400;
}
.full {
  width: 100%;
}
.eyebrow {
  font:
    10px Consolas,
    monospace;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: #e2bf87;
  margin: 0 0 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.text-btn {
  border: 0;
  background: transparent;
  color: #c7b18c;
  font-size: 12px;
  min-height: 44px;
  padding: 10px;
}
.text-btn:hover {
  color: #f3d39d;
}
.welcome {
  max-width: 1400px;
  margin: auto;
  padding: 62px 5% 0;
  display: grid;
  grid-template-columns: 1.07fr 1fr;
  gap: 32px 70px;
}
.intro-copy h1 {
  font:
    clamp(45px, 4.8vw, 70px)/1.08 Georgia,
    serif;
  letter-spacing: -2px;
  margin: 24px 0;
}
.intro-copy h1 em {
  color: #e3bd7e;
  font-weight: 400;
}
.intro-description {
  font-size: 16px;
  line-height: 1.85;
  max-width: 470px;
  color: #afc1cd;
}
.difficulty-label {
  display: block;
  margin: 27px 0 10px;
}
#difficulty {
  width: min(410px, 100%);
  padding: 14px 12px;
  background: #233b4f;
  border: 1px solid #506679;
  color: #f0e2c9;
  font-size: 14px;
}
.intro-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font:
    10px Consolas,
    monospace;
  color: #9bb0bf;
  margin-top: 18px;
}
.intro-meta span + span:before {
  content: "·";
  margin-right: 20px;
}
.intro-art {
  position: relative;
  min-height: 565px;
  overflow: hidden;
  border: 1px solid #466071;
  border-radius: 95px 12px 12px 12px;
  background:
    radial-gradient(#9bb6b622 1px, transparent 1px),
    linear-gradient(145deg, #355665, #1d354b);
  background-size:
    16px 16px,
    auto;
  box-shadow:
    inset 0 0 110px #10253b44,
    0 20px 70px #09142150;
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-top {
  position: absolute;
  top: 29px;
  left: 38px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  color: #c0d4d4;
  font:
    11px Consolas,
    monospace;
  letter-spacing: 2px;
}
.art-top span {
  font-size: 8px;
  letter-spacing: 1px;
}
.paper-back {
  position: absolute;
  width: 288px;
  height: 370px;
  transform: rotate(-9deg);
  background: #729395;
  box-shadow: 10px 8px 0 #426274;
}
.hero-paper {
  position: relative;
  width: 285px;
  min-height: 385px;
  background: #f5eedc;
  color: #29485b;
  padding: 34px 25px;
  transform: rotate(5deg);
  box-shadow: 10px 20px 32px #10203080;
}
.paper-tab {
  position: absolute;
  right: 20px;
  top: -12px;
  background: #a9814e;
  color: #fff4dc;
  font:
    8px Consolas,
    monospace;
  padding: 8px 12px;
}
.hero-paper > small {
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1px;
}
.hero-paper h2 {
  font:
    27px/1.15 Georgia,
    serif;
  margin: 18px 0;
}
.paper-rule {
  height: 1px;
  background: #bec8ba;
  margin: 20px 0;
}
.hero-paper p {
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1.5px;
}
.paper-line {
  height: 4px;
  background: #ced3c2;
  margin: 9px 0;
}
.paper-line.short {
  width: 72%;
}
.paper-count {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.paper-count > b {
  font:
    42px Georgia,
    serif;
}
.paper-count span {
  font:
    10px/1.5 Consolas,
    monospace;
  color: #6c7b78;
}
.hero-stamp {
  position: absolute;
  right: 19px;
  bottom: 70px;
  border: 3px double #a66b3c;
  color: #a66b3c;
  font-size: 19px;
  font-weight: 800;
  padding: 9px 11px;
  transform: rotate(-14deg);
  background: #f5eedccd;
}
.paper-signatures {
  display: flex;
  justify-content: space-between;
  font:
    7px Consolas,
    monospace;
  border-top: 1px solid #bcc7b9;
  padding-top: 15px;
  margin-top: 18px;
  color: #527664;
}
.art-alert {
  position: absolute;
  bottom: 52px;
  left: 24px;
  right: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px;
  background: #142b3feb;
  border: 1px solid #9b825b;
  border-radius: 8px;
  box-shadow: 0 7px 16px #10212e45;
}
.art-alert > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #e3b56b;
  color: #283d4a;
  border-radius: 7px;
  font-weight: 800;
}
.art-alert b {
  font-size: 13px;
  color: #eacb94;
}
.art-alert small {
  display: block;
  color: #b9c9cd;
  font-size: 11px;
  margin-top: 4px;
}
.art-bottom {
  position: absolute;
  bottom: 12px;
  font:
    7px Consolas,
    monospace;
  letter-spacing: 0.6px;
  color: #b7cbcc;
}
.intro-footer {
  grid-column: 1/-1;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 25px;
  align-items: center;
  padding: 22px 0 6px;
}
.intro-footer > span {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1.3px;
  color: #e2be83;
}
.intro-footer p {
  flex: 1;
  color: #a9bdc8;
  font-size: 12px;
}
.site-footer {
  max-width: 1480px;
  margin: 25px auto 0;
  border-top: 1px solid #354b5e;
  padding: 24px 4%;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #9cb1bf;
  font:
    9px Consolas,
    monospace;
}
.play {
  max-width: 1540px;
  padding: 27px 4% 0;
  margin: auto;
}
.mission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 23px;
}
.mission-header .eyebrow {
  margin-bottom: 8px;
}
.mission-header h1 {
  font:
    29px Georgia,
    serif;
  margin: 0;
}
.mission-header h1 > span {
  display: inline-block;
  vertical-align: middle;
  margin-left: 16px;
  font:
    9px Consolas,
    monospace;
  color: #b5c8c5;
  border: 1px solid #4d6570;
  border-radius: 4px;
  padding: 6px 8px;
}
.stats {
  display: flex;
  gap: 28px;
}
.stats > div {
  min-width: 62px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats span {
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1.2px;
  color: #afc1cd;
}
.stats b {
  font:
    24px Consolas,
    monospace;
  color: #e6c283;
}
.stats #lives {
  color: #dfa08c;
  font-size: 20px;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  align-items: start;
}
.map-column {
  min-width: 0;
}
.map-top {
  padding: 7px 15px;
  min-height: 47px;
  border: 1px solid #415a6d;
  background: #20394c;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font:
    9px Consolas,
    monospace;
  color: #d0dcda;
}
.map-top #room-label {
  color: #a3bbc8;
  font-size: 8px;
}
.map-button {
  border: 0;
  background: transparent;
  color: #e4c791;
  font:
    10px Consolas,
    monospace;
  min-height: 34px;
  padding: 6px;
}
.canvas-wrap {
  position: relative;
  background: #132a3b;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #415a6d;
  border-top: 0;
  overflow: hidden;
  line-height: 0;
}
canvas {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  touch-action: none;
}
.map-legend {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 7px 10px;
  color: #e1d9bb;
  background: #172d40dc;
  border: 1px solid #617d8055;
  border-radius: 3px;
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1px;
  pointer-events: none;
}
.nearby {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #152e43f2;
  border: 1px solid #b29b70;
  color: #f1d294;
  padding: 13px 18px;
  border-radius: 7px;
  font:
    12px Consolas,
    monospace;
  white-space: nowrap;
  pointer-events: none;
}
.map-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  background: #1c3143;
  border: 1px solid #415a6d;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  color: #b8c8d1;
  font-size: 10px;
}
kbd {
  font:
    9px Consolas,
    monospace;
  border: 1px solid #587082;
  background: #2a4357;
  padding: 3px 4px;
  border-radius: 3px;
  color: #e6e5ce;
}
.below-map {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
}
.toast {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  border-left: 2px solid #87b5a2;
  background: #1a3042;
  border-radius: 3px;
  color: #c8d9d7;
  font-size: 12px;
  line-height: 1.65;
}
.save-status {
  color: #a7bcb7;
  font:
    9px/1.6 Consolas,
    monospace;
  text-align: right;
  max-width: 110px;
}
.save-status.error {
  color: #eeb099;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.task-card {
  padding: 20px;
  background: linear-gradient(135deg, #2b495a, #20384a);
  border: 1px solid #506c79;
  border-top: 3px solid #e3b56b;
  border-radius: 10px;
}
.task-card h2 {
  font:
    25px/1.12 Georgia,
    serif;
  margin: 14px 0;
  color: #f3e3c5;
}
.task-card > p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.7;
  color: #bcd1d7;
}
.task-card .primary {
  margin-top: 17px;
  padding: 11px 14px;
  font-size: 13px;
}
.missing-note {
  font-size: 11px;
  line-height: 1.6;
  color: #ebc68f;
  margin: 10px 0;
  padding-left: 10px;
  border-left: 2px solid #cb9d64;
}
.route-card,
.journal-card {
  padding: 18px;
  background: #1b3042;
  border: 1px solid #385266;
  border-radius: 9px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.section-heading h2 {
  font-size: 13px;
  margin: 0;
}
.section-heading > span {
  font:
    10px Consolas,
    monospace;
  color: #b3c6ce;
}
.progress-track {
  height: 4px;
  background: #344e60;
  margin: 17px 0;
}
.progress-track > div {
  height: 100%;
  background: #ddb66d;
  transition: width 0.2s;
}
.route-card ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.route-card li {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
}
.route-card li:before {
  position: absolute;
  content: "";
  left: 9px;
  top: 30px;
  bottom: -7px;
  border-left: 1px solid #466273;
}
.route-card li:last-child:before {
  display: none;
}
.route-number {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #536f7e;
  font:
    9px Consolas,
    monospace;
  color: #bad0d7;
}
.route-step {
  background: none;
  border: 0;
  text-align: left;
  flex: 1;
  min-height: 39px;
  color: #bccdd3;
  font-size: 12px;
}
.route-step small {
  font-size: 8px;
  color: #e3bb7d;
  margin-left: 6px;
}
.current .route-number {
  background: #e3b56b;
  color: #294253;
  border-color: #e3b56b;
}
.current .route-step {
  color: #e8c98e;
  font-weight: 700;
}
.done .route-number {
  color: #b3e1c8;
  background: #31584f;
  border-color: #537b68;
}
.done .route-step {
  color: #b2d7c8;
}
.route-note {
  font-size: 10px;
  line-height: 1.6;
  color: #afc1ca;
  border-top: 1px solid #385266;
  margin: 12px 0 0;
  padding-top: 12px;
}
.folder-button,
.theory-button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  border: 1px solid #61716d;
  background: #283e49;
  color: #f1d59f;
  padding: 17px 16px;
  min-height: 77px;
}
.folder-button b,
.theory-button b {
  display: block;
  font-size: 13px;
}
.folder-button small,
.theory-button small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: #c5cdbc;
}
.folder-button > span:last-child,
.theory-button > span:last-child {
  margin-left: auto;
}
.folder-icon {
  font-size: 30px;
}
.theory-button {
  background: #1a2d3e;
  border-color: #385266;
  color: #dbe7e6;
  min-height: 69px;
}
.theory-button > span:first-child {
  font:
    26px Georgia,
    serif;
}
.theory-button small {
  color: #b2c6cf;
}
.pinned-document {
  font-size: 11px;
  line-height: 1.7;
  border: 1px dashed #718075;
  border-radius: 7px;
  padding: 12px;
  color: #daceac;
}
.journal-card ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0;
  margin: 17px 0 0;
}
.journal-card li {
  padding-left: 12px;
  border-left: 2px solid #80a493;
  font-size: 11px;
  line-height: 1.6;
  color: #b7ccd1;
}
.journal-card li b {
  display: block;
  color: #e2dcc4;
  font:
    9px Consolas,
    monospace;
  margin-bottom: 5px;
}
.event-banner {
  display: flex;
  gap: 15px;
  align-items: center;
  background: linear-gradient(100deg, #574232, #243747);
  border: 1px solid #99744f;
  padding: 15px 18px;
  border-radius: 9px;
  margin-bottom: 20px;
}
.incident-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e3b56b;
  color: #294151;
  font-size: 22px;
  font-weight: 800;
}
.event-banner > div {
  flex: 1;
}
.event-banner .eyebrow {
  display: block;
  font-size: 8px;
  margin-bottom: 5px;
}
.event-banner b {
  display: block;
  color: #f2d49d;
  font-size: 15px;
}
.event-banner p {
  color: #d6c9b5;
  font-size: 12px;
  margin: 4px 0 0;
}
.event-banner .secondary {
  background: #ffffff08;
  border-color: #9c8261;
  color: #efd6aa;
  font-size: 12px;
}
.mobile-controls {
  display: none;
  gap: 7px;
  margin-top: 12px;
}
.mobile-controls button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #547180;
  background: #294457;
  color: #efddad;
  touch-action: none;
}
.mobile-controls #interact {
  margin-left: auto;
  padding: 0 13px;
}
/* Readable paper surfaces, independent from world lighting. */
dialog {
  color-scheme: light;
  width: min(640px, calc(100% - 24px));
  max-height: 90dvh;
  overflow: auto;
  background: #faf8ef;
  color: #29485b;
  border: 1px solid #d6d4c3;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 30px 110px #0008;
}
dialog.wide {
  width: min(1020px, calc(100% - 24px));
}
dialog::backdrop {
  background: #091929ba;
  backdrop-filter: blur(4px);
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.modal-top .eyebrow {
  color: #87653b;
  margin: 0;
}
.close-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: #e8ebdf;
  color: #29485b;
  font-size: 25px;
}
dialog h2 {
  font:
    30px/1.18 Georgia,
    serif;
  color: #29485b;
  margin: 15px 0 20px;
}
dialog h3 {
  font-size: 15px;
  color: #2d6958;
  margin: 22px 0 10px;
}
dialog p {
  font-size: 15px;
  line-height: 1.75;
  color: #526775;
}
dialog .primary {
  background: #2d6958;
  border-color: #2d6958;
  color: #fff;
  box-shadow: none;
  font-size: 14px;
}
dialog .primary:hover {
  background: #245444;
}
dialog .secondary {
  background: #eff0e5;
  border-color: #becbc4;
  color: #29485b;
  font-size: 13px;
}
dialog .text-btn {
  color: #2d6958;
  font-size: 12px;
}
dialog .small {
  font-size: 12px;
}
.npc-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 15px 0;
}
.portrait {
  width: 62px;
  height: 73px;
  flex-shrink: 0;
  background: #e3e8d6;
  border: 1px solid #bacbbb;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portrait img {
  width: 48px;
  height: 72px;
  image-rendering: pixelated;
}
.npc-header b {
  font:
    24px Georgia,
    serif;
  display: block;
}
.npc-header small {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: #6a7a79;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 12px;
}
.choice {
  background: #fffef9;
  border: 1px solid #c5d0c4;
  color: #29485b;
  text-align: left;
  min-height: 48px;
  padding: 14px 15px;
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 2px 3px #213d4310;
}
.choice:hover {
  background: #edf1e4;
  border-color: #84a08d;
}
.choice-number {
  font:
    10px Consolas,
    monospace;
  color: #658877;
  display: inline-block;
  margin-right: 10px;
}
.lesson-box {
  background: #eaf0e2;
  border-left: 3px solid #2d6958;
  padding: 14px 17px;
  margin: 18px 0;
  color: #2d6958;
}
.lesson-box strong {
  font-size: 13px;
}
.lesson-box p {
  font-size: 13px;
  margin: 5px 0 0;
}
.warning-box {
  background: #f5e7d3;
  border-color: #b57c42;
  color: #8a572f;
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.modal-actions button {
  min-height: 44px;
}
.pause-note {
  font-size: 12px !important;
  color: #667c79 !important;
}
.incident-art {
  display: flex;
  align-items: center;
  gap: 14px;
  background: repeating-linear-gradient(
    -45deg,
    #f3dfbe,
    #f3dfbe 10px,
    #f6e7cb 10px,
    #f6e7cb 20px
  );
  border: 1px solid #dec394;
  border-radius: 7px;
  padding: 16px;
  color: #8c6439;
  font:
    15px Consolas,
    monospace;
  font-weight: 800;
  letter-spacing: 2px;
}
.event-cost {
  background: #f4e9d4;
  border: 1px solid #d7c4a0;
  padding: 12px;
  border-radius: 5px;
  font-size: 12px;
  color: #815b34;
  line-height: 1.6;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #e9efdf;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}
.result-stats b {
  display: block;
  font:
    25px Consolas,
    monospace;
  color: #2d6958;
}
.result-stats small {
  display: block;
  font-size: 10px;
  color: #617871;
  margin-top: 7px;
}
.help-list {
  font-size: 14px;
  line-height: 1.8;
  padding-left: 22px;
}
.help-list li {
  margin: 9px 0;
}
.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sector-grid button {
  border: 1px solid #bdcbbf;
  background: #edf1e5;
  color: #29485b;
  padding: 16px 8px;
  text-align: center;
  min-height: 120px;
}
.sector-grid img {
  display: block;
  width: 32px;
  height: 48px;
  image-rendering: pixelated;
  margin: auto auto 8px;
}
.sector-grid small {
  display: block;
  color: #687f77;
  margin-top: 7px;
  font-size: 10px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  font-size: 14px;
}
.settings-row select {
  border: 1px solid #bacbbc;
  padding: 12px;
  background: #fffef7;
  color: #29485b;
}
.result-list {
  font-size: 13px;
  color: #526775;
  line-height: 1.7;
  padding-left: 20px;
}
.result-list li {
  margin: 9px 0;
}
.inventory-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.inventory-toolbar select {
  padding: 10px;
  background: #f8f8ef;
  color: #29485b;
  border: 1px solid #becdc5;
  min-height: 44px;
}
.inventory-layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 22px;
}
.document-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.document-item {
  background: #eef0e4;
  border: 1px solid #c5d0c4;
  padding: 13px;
  text-align: left;
  color: #29485b;
}
.document-item.selected {
  border-color: #2d6958;
  background: #deeadb;
  box-shadow: inset 3px 0 #2d6958;
}
.document-item b {
  display: block;
  font-size: 13px;
}
.document-item small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: #637970;
  margin-top: 6px;
}
.doc-sheet {
  background: #fffdf4;
  border: 1px solid #d6d8c8;
  padding: 22px;
  box-shadow: 4px 5px 0 #e5e8d9;
  min-width: 0;
}
.doc-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font:
    10px Consolas,
    monospace;
  color: #75816d;
}
.doc-sheet h3 {
  font:
    25px Georgia,
    serif;
  color: #29485b;
  margin: 20px 0;
}
.doc-badge {
  display: inline-block;
  border: 2px double #2d6958;
  color: #2d6958;
  padding: 7px 10px;
  font:
    12px Consolas,
    monospace;
  font-weight: 700;
  letter-spacing: 1px;
  transform: rotate(-2deg);
  margin: 8px 0 16px;
}
.doc-badge.pending {
  color: #9a713c;
  border-color: #9a713c;
}
.doc-badge.superseded {
  color: #7b8179;
  border-color: #91988a;
}
.doc-fields {
  margin: 0;
  display: grid;
  gap: 13px;
}
.doc-fields > div {
  border-bottom: 1px solid #e3e5d9;
  padding-bottom: 10px;
}
.doc-fields dt {
  font:
    9px Consolas,
    monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #758879;
}
.doc-fields dd {
  font-size: 14px;
  line-height: 1.65;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
.doc-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.doc-signature {
  border: 1px dashed #bfcbbb;
  padding: 12px;
  color: #687d73;
  font-size: 10px;
  line-height: 1.5;
}
.doc-signature.signed {
  border-style: solid;
  background: #eaf0df;
  color: #2d6958;
}
.doc-signature b {
  display: block;
  font:
    italic 16px Georgia,
    serif;
  margin-top: 5px;
}
.doc-signature small {
  display: block;
  margin-top: 7px;
  font-size: 9px;
}
.revision-list {
  padding: 0;
  list-style: none;
}
.revision-list li {
  border-left: 2px solid #a8bd9e;
  padding: 8px 12px;
  margin: 8px 0;
  font-size: 12px;
  color: #516c65;
  line-height: 1.6;
}
.revision-list b {
  display: block;
}
.change-item {
  background: #f2e9d4;
  padding: 10px;
  margin: 7px 0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: #34574e;
}
.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #bbc9bd;
  background: #fffef7;
  color: #29485b;
  font-size: 15px;
}
.form-error {
  color: #a74737 !important;
  font-size: 13px !important;
}
.form-error:empty {
  display: none;
}
.credits {
  font-size: 12px !important;
}
.stamp-feedback {
  animation: stamp 0.28s ease-out;
}
.stamp-feedback strong {
  font:
    17px Consolas,
    monospace;
  color: #2d6958;
  display: inline-block;
  padding: 13px 17px;
  border: 3px double #2d6958;
  transform: rotate(-3deg);
  margin: 8px 0;
}
@keyframes stamp {
  from {
    opacity: 0;
    transform: scale(1.1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 1150px) {
  .top-context {
    display: none;
  }
  .welcome {
    gap: 35px;
  }
  .intro-copy h1 {
    font-size: 55px;
  }
  .stats {
    gap: 17px;
  }
  .mission-header h1 > span {
    display: none;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
  }
  .play {
    padding-left: 2.5%;
    padding-right: 2.5%;
  }
  .map-bottom {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .map-top #room-label {
    display: none;
  }
}
@media (max-width: 800px) {
  .topbar {
    height: 77px;
    padding: 12px 4%;
  }
  .brand {
    font-size: 10px;
    gap: 10px;
    letter-spacing: 1.5px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .brand-mark {
    width: 34px;
    height: 39px;
    font-size: 17px;
  }
  .quiet {
    font-size: 10px;
    padding: 8px;
    min-height: 42px;
  }
  .top-actions {
    gap: 5px;
  }
  .welcome {
    grid-template-columns: 1fr;
    padding: 35px 5% 0;
    gap: 30px;
  }
  .intro-copy h1 {
    font-size: 55px;
  }
  .intro-art {
    min-height: 510px;
  }
  .intro-footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .intro-footer p {
    flex-basis: 100%;
    order: 3;
  }
  .site-footer {
    flex-wrap: wrap;
    font-size: 8px;
  }
  .game-layout {
    grid-template-columns: 1fr;
  }
  .mission-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .mission-header h1 {
    font-size: 27px;
  }
  .stats {
    width: 100%;
    justify-content: space-between;
    background: #1c3346;
    border: 1px solid #375166;
    border-radius: 8px;
    padding: 14px 16px;
  }
  .stats b {
    font-size: 22px;
  }
  .stats span {
    font-size: 7px;
  }
  .stats > div {
    min-width: 45px;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
  }
  .folder-button,
  .theory-button,
  .pinned-document,
  .sidebar > .text-btn {
    grid-column: 1/-1;
  }
  .task-card,
  .route-card {
    padding: 16px;
  }
  .task-card h2 {
    font-size: 23px;
  }
  .task-card > p:not(.eyebrow) {
    font-size: 12px;
  }
  .route-step {
    font-size: 11px;
  }
  .map-bottom {
    display: none;
  }
  .mobile-controls {
    display: flex;
  }
  .event-banner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px;
  }
  .event-banner > div {
    min-width: 180px;
  }
  .event-banner > .secondary {
    margin-left: 46px;
  }
  .journal-card ol {
    grid-template-columns: 1fr;
  }
  .save-status {
    max-width: 85px;
    font-size: 8px;
  }
  .inventory-layout {
    grid-template-columns: 1fr;
  }
  .document-list {
    flex-direction: row;
    overflow: auto;
    padding-bottom: 6px;
  }
  .document-item {
    min-width: 160px;
  }
  .inventory-toolbar {
    flex-wrap: wrap;
  }
  .doc-sheet {
    padding: 17px;
  }
  .inventory-toolbar select {
    flex: 1;
  }
  .doc-sheet h3 {
    font-size: 23px;
  }
  dialog {
    padding: 19px;
  }
  dialog h2 {
    font-size: 27px;
  }
  .sector-grid {
    grid-template-columns: 1fr 1fr;
  }
  .map-top {
    font-size: 8px;
    padding: 6px 10px;
  }
  .nearby {
    font-size: 10px;
    padding: 10px 13px;
  }
  .canvas-wrap {
    min-height: 280px;
  }
}
@media (max-width: 370px) {
  .brand small {
    letter-spacing: 1px;
  }
  .quiet {
    font-size: 9px;
    padding: 7px;
  }
  .top-actions {
    gap: 3px;
  }
  .intro-copy h1 {
    font-size: 48px;
  }
  .stats {
    gap: 8px;
    padding: 12px;
  }
  .doc-signatures {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Components bind to semantic elements rendered by the UI modules. */
.route-card li > button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 6px 0;
  text-align: left;
  background: transparent;
  border: 0;
  color: #c9d9dd;
  font-size: 12px;
}
.route-card li > button > span:nth-child(2) {
  flex: 1;
}
.route-card li b {
  display: block;
  font-weight: 600;
}
.route-card li small {
  display: block;
  color: #a7bfc9;
  font-size: 9px;
  margin-top: 4px;
}
.route-card .current b,
.route-arrow {
  color: #ebc687;
}
.route-card .complete .route-number {
  background: #31584f;
  border-color: #537b68;
  color: #b3e1c8;
}
.route-card .complete b {
  color: #b2d7c8;
}
.route-card .revalidate .route-number {
  border-color: #c89460;
  color: #e6b884;
}
.pinned-document > b,
.pinned-document > span,
.pinned-document > small {
  display: block;
}
.pinned-document > b {
  font-size: 12px;
  margin: 8px 0;
}
.pinned-document > span {
  font-size: 10px;
  line-height: 1.5;
}
.pinned-document > small {
  font:
    8px Consolas,
    monospace;
  letter-spacing: 1px;
}
.pending-list {
  font-size: 12px;
  line-height: 1.65;
  padding-left: 16px;
  color: #e5c896;
}
.npc-header > div > span {
  display: block;
  font-size: 12px;
  color: #6a7a79;
  margin-top: 7px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
}
.choice > span:nth-last-child(2) {
  flex: 1;
}
.choice > span:last-child {
  flex-shrink: 0;
}
.event-cost {
  display: block;
  margin-top: 10px;
  padding: 6px 9px;
  font-size: 11px;
}
.stamp-feedback {
  display: inline-block;
  border: 3px double #2d6958;
  color: #2d6958;
  padding: 13px 18px;
  font:
    700 17px Consolas,
    monospace;
  transform: rotate(-3deg);
  margin: 12px 0;
}
.stamp-feedback.error {
  border-color: #a74737;
  color: #a74737;
}
.result-stats span {
  display: block;
  font-size: 11px;
  color: #617871;
  line-height: 1.5;
  margin-top: 6px;
}
.result-list li > span {
  display: block;
}
.sector-grid button > span {
  display: block;
  font-size: 12px;
  margin-top: 8px;
}
.settings-row small {
  display: block;
  color: #667c79;
  font-size: 12px;
  margin-top: 7px;
  line-height: 1.6;
}
.settings-row input {
  width: 22px;
  height: 22px;
  accent-color: #2d6958;
  flex-shrink: 0;
}
.doc-signatures .signature {
  border: 1px dashed #bfcbbb;
  padding: 12px;
  color: #687d73;
  font-size: 11px;
  line-height: 1.5;
}
.doc-signatures .signature.signed {
  border-style: solid;
  background: #eaf0df;
  color: #2d6958;
}
.signature b,
.signature span {
  display: block;
}
.signature span {
  font-size: 10px;
  margin-top: 7px;
}
.doc-sheet select {
  max-width: 100%;
  padding: 10px;
  background: #fffef7;
  color: #29485b;
  border: 1px solid #becbc4;
  font-size: 12px;
}
.revision-list summary {
  font-size: 13px;
  cursor: pointer;
  margin-top: 22px;
}
.change-item span {
  display: block;
}
.warning-box {
  padding: 14px 17px;
  border-left: 3px solid #b57c42;
}
.journal-card ol {
  display: block;
}
.journal-card li {
  display: flex;
  gap: 10px;
  margin: 10px 0;
  font-size: 12px;
  line-height: 1.7;
}
.journal-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #8dbba7;
  margin-top: 7px;
}
.journal-dot.penalty {
  background: #e0a08a;
}
.danger {
  color: #eea98e !important;
}
@media (max-width: 480px) {
  .sidebar {
    grid-template-columns: 1fr;
  }
  .route-card,
  .task-card {
    grid-column: 1/-1;
  }
  .topbar {
    gap: 8px;
  }
  .brand {
    letter-spacing: 1px;
  }
  .brand-mark {
    box-shadow: none;
  }
  .intro-meta {
    gap: 10px;
  }
  .intro-meta span + span:before {
    margin-right: 10px;
  }
  .result-stats {
    padding: 14px;
    gap: 8px;
  }
  .doc-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .doc-signatures {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stats b {
    font-size: 21px;
  }
}

dialog .muted {
  color: #617571;
}
.doc-fields dt {
  font-size: 11px;
}
.signature b {
  font-size: 13px;
}
.signature span {
  font-size: 11px;
}
.route-card li > button {
  font-size: 13px;
}
.route-card li small {
  font-size: 10px;
}
