@font-face {
  font-family: "Barlow Condensed";
  src: url("type/barlow-condensed-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("type/work-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("type/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("type/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f4eddb;
  --paper-light: #fcf6e8;
  --forest: #133c32;
  --signal: #d44326;
  --orange: #fa7046;
  --ink: var(--forest);
  --muted: #526559;
  --edge: #a7ad97;
  --bg: var(--paper);
  --lime: #f6d37d;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --body: "Work Sans", Arial, sans-serif;
  --sans: var(--body);
}
html { scrollbar-color: #859484 var(--paper); }
body { color: var(--ink); background: var(--paper); }
::selection { color: #fff6df; background: #235646; }
button:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid #9d351f;
  outline-offset: 3px;
}
.page {
  max-width: 1360px;
  padding: 0 clamp(16px, 4.7vw, 70px) 48px;
  margin: auto;
}
.mast {
  position: relative;
  height: auto;
  min-height: clamp(74px, 7.6vw, 102px);
  display: flex;
  gap: 24px;
  border-bottom: 3px solid var(--forest);
}
.brand {
  flex: none;
  display: block;
  line-height: 0;
}
#mast-title-art {
  display: block;
  height: clamp(48px, 4.7vw, 65px);
  width: auto;
  image-rendering: pixelated;
}
.termini {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 600 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.termini i {
  position: relative;
  width: clamp(33px, 5.5vw, 78px);
  height: 2px;
  background: var(--forest);
}
.termini i::before, .termini i::after {
  position: absolute;
  content: "";
  top: -3px;
  border: 2px solid var(--forest);
  background: var(--paper);
  border-radius: 50%;
  width: 5px;
  height: 5px;
}
.termini i::before { left: 0; }
.termini i::after { right: 0; background: var(--forest); }
.mast nav { gap: 6px; }
.mast nav button {
  background: transparent;
  color: var(--forest);
  font: 650 14px/1 var(--body);
  border: 1px solid #8b9a85;
  border-radius: 3px;
  min-height: 43px;
  padding: 9px 13px;
}
.mast nav button:hover, .mast nav button:focus-visible { background: #e4e3ca; border-color: var(--forest); }
.mast .symbol { width: 17px; height: 17px; }
main { padding-top: clamp(15px, 2vw, 29px); }
.cabinet {
  overflow: hidden;
  background: var(--forest);
  border: 2px solid var(--forest);
  border-radius: 7px;
  box-shadow: 0 5px 10px -7px #183c32a8;
}
.stage:has(#message:not([hidden])), .stage:has(#commute-result:not([hidden])) { touch-action: pan-y; }
.cabinet .status {
  height: 44px;
  padding-inline: clamp(12px, 1.6vw, 25px);
  background: var(--forest);
  color: var(--paper-light);
  font: 600 12px/1.15 var(--mono);
  letter-spacing: .065em;
}
.origin { gap: 12px; }
.station-symbol {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 17px; height: 17px;
  border: 3px solid #f7c270;
  border-radius: 50%;
}
.station-symbol::before {
  position: absolute;
  top: 3px; left: 3px;
  width: 5px; height: 5px;
  border-radius: 100%;
  background: #f7c270;
  content: "";
}
[data-direction="north"] .station-symbol { border-color: #a3d6c1; }
[data-direction="north"] .station-symbol::before { background: #a3d6c1; }
.clock, #run-stats { color: var(--paper-light); }
.clock { font-size: 11px; }
#cue { color: #ffbe93; }
#objective { color: #e3ebdf; }
#pause, #skip-finale {
  background: transparent;
  color: var(--paper-light);
  border: 1px solid #88a197;
  min-height: 32px;
  border-radius: 3px;
}
#pause:hover, #skip-finale:hover { background: #315e50; }
.progress-line { background: #bac2a8; height: 4px; }
.progress-line i { background: var(--signal); }
.understage {
  gap: 22px;
  padding: 10px clamp(12px, 1.6vw, 24px);
  min-height: 68px;
  background: var(--paper-light);
  color: var(--ink);
}
.tracker { flex: 1 1 auto; display: flex; align-items: center; gap: 15px; }
.route-word { color: #57695a; font: 600 11px/1 var(--mono); letter-spacing: .09em; }
.understage .tracker ol {
  display: flex;
  align-items: start;
  flex: 1;
  flex-wrap: nowrap;
  gap: 0;
}
.understage .tracker li {
  position: relative;
  display: grid;
  grid-template-rows: 15px auto;
  justify-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  color: #4b5c50;
  font: 600 11px/1.12 var(--body);
  letter-spacing: -.015em;
  white-space: nowrap;
}
.understage .tracker li::before {
  position: relative; z-index: 1;
  content: "";
  align-self: center;
  box-sizing: border-box;
  width: 8px; height: 8px;
  margin: 0;
  border: 1.5px solid #607463;
  border-radius: 50%;
  background: var(--paper-light);
}
.understage .tracker li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 100%; height: 1px;
  background: #8e9e89;
}
.understage .tracker li.done::before { background: var(--forest); border-color: var(--forest); }
.understage .tracker li.done::after { background: var(--forest); }
.understage .tracker li.active { color: #922c1b; font-weight: 800; }
.understage .tracker li.active::before {
  width: 12px; height: 12px;
  border: 3px solid var(--signal);
  background: var(--paper-light);
}
.desktop-controls {
  padding-left: 16px;
  gap: 12px;
  border-left: 1px solid #c3c8b4;
  color: var(--forest);
  font: 600 11px/1 var(--body);
}
kbd {
  min-width: 23px;
  color: var(--forest);
  background: #eee9d7;
  border-color: #9ba58e;
  border-bottom-width: 2px;
}
.touch-controls button {
  background: transparent;
  color: var(--forest);
  border: 1px solid #7e907f;
  border-radius: 3px;
  font-family: var(--body);
}
.steer-chevron {
  width: 9px; height: 9px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
#left .steer-chevron { transform: rotate(135deg); }
.touch-controls button:active, .touch-controls button.held { background: var(--forest); color: var(--paper-light); }
.touch-controls button:disabled { opacity: .55; }
.inventory-strip {
  background: #234e40;
  border-top-color: #64806a;
  color: #f5efdc;
}
.clip-count .symbol, .clip-count strong { color: #ffd694; }
.power-meter .symbol { color: #c5d9c3; }
.power-gauge { background: #355446; border-color: #869982; }
.power-gauge i { background: #ffcc82; }
.gear-slot { background: #537561; border-color: #85947b; }
.gear-slot.found { background: #e7ca8f; border-color: #ffdfa9; }
.gear-pickup { background: #193e34; border-color: #f8ad75; }
.gear-pickup strong { color: #ffcb9b; }
.commute-hud { background: #f5d3a6; color: #3b3926; border-top: 1px solid #9c744e; }
.commute-hud #commute-brake { color: #3b3926; }
.commute-hud #commute-target.beaten { color: #184c38; }
.speech:not(.river-sign) {
  --shell: #fff2d9;
  --outline: #193c32;
  border-radius: 4px;
  box-shadow: 0 2px 5px #18382f40;
}
#speech-name { color: #983820; }
.river-sign #speech-name { color: #ceeacf; }
.people { margin-top: clamp(18px, 2.5vw, 34px); }
.people > summary {
  min-height: 64px;
  padding: 7px 0 12px;
  border: 0;
  border-bottom: 1px solid #8f9b87;
  font: 800 clamp(27px, 2.9vw, 36px)/1 var(--display);
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.people > summary::after { display: none; }
.guide-toggle {
  display: grid;
  place-items: center;
  position: relative;
  width: 29px; height: 29px;
  border: 1px solid #768a77;
  border-radius: 50%;
}
.guide-toggle::before,.guide-toggle::after {
  content: "";
  position: absolute;
  width: 11px; height: 2px;
  background: var(--forest);
}
.guide-toggle::after { transform: rotate(90deg); }
.people[open] .guide-toggle::after { display: none; }
.people>summary:hover .guide-toggle { background: #d9ddc6; }
.people>summary:focus-visible { outline-color: #9d351f; }
.guide-options { margin-block: 18px; }
.guide-directions button {
  border-color: #829580;
  background: transparent;
  color: var(--forest);
}
.guide-directions button[aria-pressed="true"] { background: var(--forest); color: var(--paper-light); border-color: var(--forest); }
.section-label { color: #4f6354; }
.people-bar { border-color: #aab69c; }
.tabs button { color: #58695b; }
.tabs button[aria-selected="true"] { color: var(--forest); border-color: var(--signal); }
.card { background: var(--paper-light); border: 1px solid #a4ad96; border-radius: 3px; }
.art { border-bottom-color: #9ca88e; }
.card h2 { font: 800 25px/1 var(--display); letter-spacing: 0; }
.card-kind { color: #536756; }
.card p { color: #394e41; }
#gear .card.found .card-kind { color: #207046; }
@media (max-width: 980px) {
  .termini { display: none; }
  .route-word { display: none; }
  .understage { gap: 12px; }
  .desktop-controls { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 790px) {
  .understage .tracker li { font-size: 0; gap: 0; grid-template-rows: 14px; }
  .understage .tracker li.active { font-size: 0; }
  .understage .tracker { min-height: 27px; }
  .understage .tracker li.active::before { height: 12px; width: 12px; }
}
@media (max-width: 700px), (pointer:coarse) and (max-width:980px) {
  .understage { flex-direction: column; align-items: stretch; padding: 4px 10px 9px; gap: 0; }
  .understage .tracker { width: 100%; }
  .desktop-controls { display: none; }
  .touch-controls { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
  .cabinet .status:has(#playhud:not([hidden])) { min-height: 40px; height: auto; padding-top: 4px; }
  #road-advice { padding: 4px 0; border-color: #5e7e6b; }
}
@media (max-width: 620px) {
  .page { padding: 0 9px 23px; }
  .mast { min-height: 60px; gap: 8px; border-bottom-width: 2px; }
  #mast-title-art { height: 40px; }
  .mast nav { gap: 5px; }
  .mast nav button { padding: 7px 9px; min-height: 42px; font-size: 12px; gap: 5px; }
  .mast #sound { width: 41px; height: 42px; }
  .mast #sound-word { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
  main { padding-top: 11px; }
  .cabinet { border-radius: 5px; }
  .cabinet .status { height: 35px; padding-inline: 10px; font-size: 11px; gap: 8px; }
  .origin { gap: 7px; }
  .station-symbol { width: 13px; height: 13px; border-width: 2px; }
  .station-symbol::before { top: 2px; left: 2px; }
  .clock { font-size: 11px; }
  .people { margin-top: 12px; }
  .people > summary { min-height: 49px; padding-block: 5px 9px; }
}
@media (min-width: 621px) and (max-height: 480px) {
  .mast { min-height: 46px; }
  #mast-title-art { height: 35px; }
  .mast nav button { min-height: 35px; }
  main { padding-top: 6px; }
  .stage { height: max(220px, calc(100svh - 148px)); }
  .understage { min-height: 39px; padding-block: 3px; }
}
@media (max-width: 350px) {
  .page { padding-inline: 6px; }
  .mast, .mast nav { gap: 4px; }
  .mast nav button { padding-inline: 7px; }
  .inventory-strip { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 10px; padding-block: 5px; }
  .inventory-strip .clip-count { grid-column: 1; grid-row: span 2; }
  .inventory-strip .power-meter, .inventory-strip .gear-slots { grid-column: 2; justify-self: end; }
  .inventory-strip .gear-slots { margin-left: 0; }
}
