@font-face {
  font-family: "EB Garamond";
  src: url("./shared/EBGaramond-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./shared/IBMPlexSans-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./shared/IBMPlexMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --void: #09090b;
  --deep: #050706;
  --carapace: #141417;
  --graphite: #27272d;
  --iron: #50505a;
  --ash: #9898a2;
  --silk: #d8d5ce;
  --paper: #f7f3ea;
  --lamplight: #b8793e;
  --clay: #b87057;
  --spectral: #6f7893;
  --signal: #7fff00;
  --rule: rgba(216, 213, 206, 0.2);
  --serif: "EB Garamond", "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --rail-height: 3.5rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 20rem;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--silk);
}

html {
  scrollbar-color: var(--iron) var(--void);
}

body {
  font: 400 1rem/1.55 var(--sans);
  text-rendering: optimizeLegibility;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  min-height: 2.75rem;
}

button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--lamplight);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-180%);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--silk);
  background: var(--paper);
  color: var(--void);
  font: 0.72rem/1 var(--mono);
  text-transform: uppercase;
}

.skip-link:focus {
  transform: none;
}

.noscript-note {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  margin: 0;
  padding: 2rem;
  background: var(--void);
  color: var(--silk);
  place-items: center;
}

.game-rail {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto minmax(24rem, 1fr);
  align-items: center;
  width: 100%;
  height: var(--rail-height);
  padding: 0 1rem;
  border-bottom: 1px solid var(--rule);
  background: rgba(9, 9, 11, 0.96);
}

.game-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: max-content;
  color: var(--silk);
  font: 500 1rem/1 var(--serif);
  text-decoration: none;
}

.game-brand img {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
}

.game-rail__register,
.folio {
  color: var(--lamplight);
  font: 0.68rem/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-rail nav {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  gap: 0;
}

.game-rail nav button,
.game-rail nav a {
  display: inline-grid;
  min-height: 2.75rem;
  padding: 0.45rem 0.62rem;
  border: 0;
  border-left: 1px solid transparent;
  background: transparent;
  color: var(--ash);
  font: 0.65rem/1 var(--mono);
  text-decoration: none;
  cursor: pointer;
  place-items: center;
}

.game-rail nav button:hover,
.game-rail nav a:hover {
  background: var(--carapace);
  color: var(--silk);
}

.game-rail nav button[aria-pressed="true"] {
  color: var(--signal);
}

.game-rail nav [data-motion][aria-pressed="true"] {
  color: var(--lamplight);
}

.game-shell {
  position: fixed;
  inset: var(--rail-height) 0 0;
}

.title-screen,
.ending-screen,
.play-screen,
.loading-screen {
  position: absolute;
  inset: 0;
}

.ending-screen {
  overflow: auto;
  background: var(--deep);
}

.loading-screen {
  z-index: 20;
  display: grid;
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(5, 7, 6, 0.52), var(--void)),
    var(--void);
  place-items: center;
}

[data-loading="false"] .loading-screen {
  display: none;
}

.loading-screen__instrument {
  width: min(38rem, 100%);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--lamplight);
  border-bottom: 1px solid var(--rule);
  background: rgba(20, 20, 23, 0.68);
}

.loading-screen h2 {
  max-width: 13ch;
  margin: 0.55rem 0 0.75rem;
  font: 500 clamp(2.4rem, 7vw, 5rem)/0.92 var(--serif);
  letter-spacing: -0.035em;
}

.utility-label-short {
  display: none;
}

.loading-screen p {
  margin: 0 0 1.25rem;
  color: var(--ash);
}

.loading-screen progress {
  display: block;
  width: 100%;
  height: 0.42rem;
  border: 1px solid var(--graphite);
  border-radius: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--lamplight);
}

.loading-screen progress::-webkit-progress-bar {
  background: var(--void);
}

.loading-screen progress::-webkit-progress-value {
  background: var(--lamplight);
}

.loading-screen progress::-moz-progress-bar {
  background: var(--lamplight);
}

.loading-screen__measure {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin: 1rem 0 0.85rem;
}

.loading-screen__measure i {
  height: 2px;
  background: var(--graphite);
}

.loading-screen__measure i:first-child {
  background: var(--lamplight);
  animation: loader-measure 1.8s steps(5) infinite;
}

.loading-screen small {
  color: var(--ash);
  font: 0.68rem/1.4 var(--mono);
}

@keyframes loader-measure {
  0%,
  12% {
    transform: scaleX(0.18);
    transform-origin: left;
  }

  72%,
  100% {
    transform: scaleX(1);
    transform-origin: left;
  }
}

.full-art,
.full-art img,
.screen-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.full-art img {
  object-fit: cover;
  image-rendering: pixelated;
}

.screen-shade {
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.98) 0%, rgba(5, 7, 6, 0.88) 34%, rgba(5, 7, 6, 0.24) 72%),
    linear-gradient(0deg, rgba(5, 7, 6, 0.76), transparent 52%);
}

.screen-shade--ending {
  background:
    linear-gradient(90deg, rgba(5, 7, 6, 0.97) 0%, rgba(5, 7, 6, 0.84) 50%, rgba(5, 7, 6, 0.36)),
    linear-gradient(0deg, rgba(5, 7, 6, 0.72), transparent 65%);
}

.title-copy,
.ending-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(1.25rem, 6vw, 7rem);
  width: min(43rem, calc(100% - 2.5rem));
  transform: translateY(-50%);
}

.title-copy h1,
.ending-copy h2,
.screen-overlay h2,
.reset-dialog h2,
.transcript-panel h2 {
  margin: 0.45rem 0 1rem;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.title-copy h1 {
  max-width: 12ch;
  font-size: clamp(3.25rem, 7vw, 6.6rem);
  line-height: 0.88;
}

.title-copy > p {
  max-width: 40rem;
  font: 400 clamp(1rem, 1.4vw, 1.2rem)/1.55 var(--serif);
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.primary-button,
.secondary-button {
  min-height: 2.85rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--lamplight);
  border-radius: 2px;
  background: var(--lamplight);
  color: var(--void);
  font: 0.68rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.secondary-button {
  border-color: var(--rule);
  background: rgba(9, 9, 11, 0.74);
  color: var(--silk);
}

.primary-button:hover,
.secondary-button:hover {
  border-color: var(--silk);
  background: var(--silk);
  color: var(--void);
}

.audio-note,
.resume-note {
  color: var(--ash);
  font: 0.68rem/1.45 var(--mono) !important;
}

.audio-note {
  margin: 0.8rem 0 0 !important;
}

.resume-note {
  margin-top: 0.45rem !important;
}

.title-instrument,
.ending-account {
  position: absolute;
  z-index: 3;
  right: clamp(1.25rem, 5vw, 6rem);
  bottom: clamp(1.25rem, 5vw, 5rem);
  display: grid;
  width: min(25rem, calc(100% - 2.5rem));
  border: 1px solid var(--rule);
  background: rgba(9, 9, 11, 0.88);
}

.title-instrument div,
.ending-account div {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1rem;
  padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.title-instrument__actor {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: end;
  gap: 0.8rem;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(90deg, rgba(184, 121, 62, 0.08), transparent);
}

.title-instrument__actor img {
  width: 5.5rem;
  height: auto;
  image-rendering: pixelated;
}

.title-instrument__actor figcaption {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.2rem;
}

.title-instrument span,
.ending-account span {
  color: var(--ash);
  font: 0.62rem/1.35 var(--mono);
  letter-spacing: 0.08em;
}

.title-instrument strong,
.ending-account strong {
  font: 0.7rem/1.4 var(--mono);
}

.play-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 23px,
      rgba(216, 213, 206, 0.025) 24px
    ),
    var(--deep);
}

.field-hud {
  z-index: 3;
  display: grid;
  grid-template-columns:
    minmax(8rem, 0.72fr)
    minmax(12rem, 1.18fr)
    minmax(13rem, 1.28fr)
    minmax(8rem, 0.68fr);
  gap: 1rem;
  align-items: center;
  min-height: 6.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--void);
}

.field-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.12rem;
}

.field-title strong {
  overflow: hidden;
  font: 500 1.05rem/1.2 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-objective {
  min-width: 0;
  padding-inline: 1rem;
  border-inline: 1px solid var(--rule);
}

.field-objective > span,
.field-progress__label {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--ash);
  font: 0.58rem/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field-objective p {
  margin: 0;
  color: var(--silk);
  font: 0.78rem/1.4 var(--sans);
  text-align: center;
}

.field-briefing {
  min-width: 0;
  padding-inline: 1rem;
  border-right: 1px solid var(--rule);
}

.field-briefing > span {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--lamplight);
  font: 0.58rem/1.2 var(--mono);
  letter-spacing: 0.1em;
}

.field-briefing p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--silk);
  font: 0.72rem/1.35 var(--sans);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.field-briefing small {
  display: -webkit-box;
  margin-top: 0.28rem;
  overflow: hidden;
  color: var(--ash);
  font: 0.56rem/1.35 var(--mono);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.field-progress {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.14rem;
  text-align: right;
}

.field-progress strong {
  color: var(--lamplight);
  font: 0.68rem/1.3 var(--mono);
}

.field-progress [data-save-status] {
  color: var(--ash);
  font: 0.59rem/1.3 var(--mono);
}

.canvas-frame {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, transparent, rgba(184, 121, 62, 0.04), transparent),
    #030504;
  place-items: center;
}

.canvas-frame::after {
  position: absolute;
  z-index: 8;
  inset: 0.5rem;
  border: 1px solid rgba(216, 213, 206, 0.12);
  content: "";
  pointer-events: none;
}

canvas {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  touch-action: none;
}

canvas:focus-visible {
  outline-offset: -4px;
}

.field-footer {
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(18rem, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 3rem;
  padding: 0.48rem 1rem;
  border-top: 1px solid var(--rule);
  background: var(--void);
  font: 0.64rem/1.35 var(--mono);
}

.field-footer .control-help {
  color: var(--ash);
}

.field-footer strong {
  color: var(--signal);
  font-weight: 400;
  text-align: right;
}

.field-toast {
  position: absolute;
  z-index: 7;
  right: 1rem;
  bottom: 1rem;
  width: min(27rem, calc(100% - 2rem));
  padding: 0.78rem 0.9rem;
  border-top: 1px solid var(--signal);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: rgba(9, 9, 11, 0.94);
}

.field-toast span {
  color: var(--signal);
  font: 0.58rem/1.2 var(--mono);
  letter-spacing: 0.12em;
}

.field-toast p {
  margin: 0.35rem 0 0;
  font: 400 0.86rem/1.45 var(--serif);
}

.stability-meter {
  position: absolute;
  z-index: 6;
  top: 1rem;
  left: 1rem;
  display: grid;
  width: 11rem;
  gap: 0.35rem;
  color: var(--lamplight);
  font: 0.58rem/1.2 var(--mono);
  letter-spacing: 0.08em;
}

.stability-meter i {
  height: 0.42rem;
  border: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.62);
}

.stability-meter b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--clay), var(--lamplight));
}

.touch-controls {
  position: relative;
  z-index: 9;
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem max(0.7rem, env(safe-area-inset-right)) max(0.7rem, env(safe-area-inset-bottom)) max(0.7rem, env(safe-area-inset-left));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(9, 9, 11, 0.82);
  pointer-events: none;
}

.field-ledger {
  display: none;
}

.touch-controls button {
  border: 1px solid rgba(216, 213, 206, 0.48);
  border-radius: 2px;
  background: rgba(9, 9, 11, 0.78);
  color: var(--silk);
  font: 0.76rem/1 var(--mono);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.touch-controls button:active {
  border-color: var(--lamplight);
  background: var(--lamplight);
  color: var(--void);
}

.touch-pad {
  display: grid;
  grid-template-columns: repeat(3, 2.85rem);
  grid-template-rows: repeat(2, 2.85rem);
  gap: 2px;
}

.touch-pad button {
  grid-row: 2;
}

.touch-pad button:first-child {
  grid-row: 1;
  grid-column: 2;
}

.touch-pad button:nth-child(2) {
  grid-column: 1;
}

.touch-pad button:nth-child(3) {
  grid-column: 2;
}

.touch-pad button:nth-child(4) {
  grid-column: 3;
}

.touch-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.touch-actions button {
  width: 4.25rem;
  height: 4.25rem;
}

.touch-actions button:first-child {
  border-color: rgba(127, 255, 0, 0.6);
  color: var(--signal);
}

.screen-overlay {
  position: fixed;
  z-index: 40;
  inset: var(--rail-height) 0 0;
  display: grid;
  padding: 1.25rem;
  overflow: auto;
  background: rgba(5, 7, 6, 0.94);
  place-items: center;
}

.screen-overlay > div {
  width: min(52rem, 100%);
  padding: clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--lamplight);
  border-bottom: 1px solid var(--rule);
  background: var(--void);
}

.screen-overlay h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.screen-overlay p {
  color: var(--ash);
  font: 400 1rem/1.65 var(--serif);
}

.ending-copy h2 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 0.95;
}

.ending-copy > p {
  max-width: 45rem;
  font: 400 clamp(1rem, 1.5vw, 1.15rem)/1.65 var(--serif);
}

.ending-account {
  width: min(32rem, calc(100% - 2.5rem));
  max-height: calc(100% - 2.5rem);
  overflow: auto;
}

.ending-account .primary-button {
  margin: 0.8rem;
}

.ending-account > a {
  padding: 0 0.8rem 0.9rem;
  color: var(--ash);
  font: 0.66rem/1.3 var(--mono);
}

.transcript-panel {
  position: fixed;
  z-index: 50;
  top: var(--rail-height);
  right: 0;
  bottom: 0;
  width: min(34rem, 100%);
  overflow: auto;
  padding: 1.25rem;
  border-left: 1px solid var(--rule);
  background: var(--void);
  box-shadow: -2rem 0 5rem rgba(0, 0, 0, 0.48);
}

.transcript-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--rule);
}

.transcript-heading h2 {
  font-size: 2rem;
}

.transcript-heading button {
  border: 0;
  background: transparent;
  color: var(--ash);
  font: 0.7rem/1 var(--mono);
  cursor: pointer;
}

.transcript-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.transcript-panel li {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.transcript-panel li strong {
  color: var(--lamplight);
  font: 0.58rem/1.2 var(--mono);
  letter-spacing: 0.1em;
}

.transcript-panel li span {
  font: 400 0.92rem/1.55 var(--serif);
}

.reset-dialog {
  width: min(32rem, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--void);
  color: var(--silk);
}

.reset-dialog::backdrop {
  background: rgba(0, 0, 0, 0.84);
}

.reset-dialog form {
  padding: 2rem;
}

.reset-dialog h2 {
  font-size: 2.5rem;
}

.reset-dialog p {
  color: var(--ash);
  font: 400 1rem/1.6 var(--serif);
}

.reset-dialog form > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

@media (hover: none), (pointer: coarse) {
  .touch-controls {
    display: flex;
  }

  .field-footer .control-help {
    display: none;
  }

  .field-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --rail-height: 6rem;
  }

  .game-rail {
    grid-template-columns: auto 1fr;
    grid-template-rows: 2.55rem 3.45rem;
    padding: 0 0.55rem;
  }

  .game-brand {
    padding-left: 0.25rem;
  }

  .game-rail__register {
    justify-self: end;
    padding-right: 0.25rem;
    font-size: 0.57rem;
  }

  .game-rail nav {
    grid-row: 2;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    border-top: 1px solid var(--rule);
  }

  .game-rail nav button,
  .game-rail nav a {
    min-width: 0;
    min-height: 2.9rem;
    padding: 0.25rem 0.1rem;
    border-left-color: var(--rule);
    font-size: 0.56rem;
    text-align: center;
  }

  .game-rail nav :first-child {
    border-left-color: transparent;
  }

  .utility-label-full {
    display: none;
  }

  .utility-label-short {
    display: inline;
  }

  .field-hud {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    min-height: 9rem;
    padding: 0.55rem 0.7rem;
  }

  .play-screen {
    grid-template-rows: auto auto minmax(5.75rem, 1fr) auto;
  }

  .canvas-frame {
    grid-row: 2;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .canvas-frame canvas {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .touch-controls {
    grid-row: 3;
  }

  .field-ledger {
    grid-row: 3;
    align-self: stretch;
    padding: clamp(1.15rem, 4vw, 2rem);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background:
      linear-gradient(90deg, rgba(184, 121, 62, 0.06), transparent 45%),
      rgba(9, 9, 11, 0.7);
  }

  .field-ledger > span {
    color: var(--lamplight);
    font: 0.58rem/1.2 var(--mono);
    letter-spacing: 0.12em;
  }

  .field-ledger ol {
    display: grid;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
  }

  .field-ledger li {
    display: grid;
    grid-template-columns: minmax(4.75rem, 0.22fr) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(216, 213, 206, 0.08);
  }

  .field-ledger li strong {
    color: var(--ash);
    font: 0.58rem/1.4 var(--mono);
    font-weight: 400;
  }

  .field-ledger li span {
    color: var(--silk);
    font: 400 0.78rem/1.4 var(--serif);
  }

  .field-objective {
    grid-row: 2;
    grid-column: 1 / -1;
    padding: 0.45rem 0 0;
    border-top: 1px solid var(--rule);
    border-right: 0;
    border-left: 0;
  }

  .field-objective > span {
    display: none;
  }

  .field-objective p {
    text-align: left;
  }

  .field-briefing {
    grid-row: 3;
    grid-column: 1 / -1;
    padding: 0.45rem 0 0;
    border-top: 1px solid var(--rule);
    border-right: 0;
  }

  .field-briefing > span {
    margin-bottom: 0.16rem;
  }

  .field-title strong {
    font-size: 0.92rem;
  }

  .field-progress {
    max-width: 9.5rem;
  }

  .field-progress__label {
    display: none;
  }

  .field-footer {
    grid-row: 4;
    min-height: 3.7rem;
    padding: 0.5rem 0.7rem;
  }

  .field-footer strong {
    font-size: 0.62rem;
    text-align: left;
  }

  .canvas-frame::after {
    inset: 0.25rem;
  }

  .title-copy {
    top: 7%;
    left: 1.15rem;
    width: calc(100% - 2.3rem);
    transform: none;
  }

  .title-copy h1 {
    font-size: clamp(2.7rem, 13vw, 4.6rem);
  }

  .title-copy > p {
    font-size: 0.98rem;
  }

  .title-actions {
    margin-top: 1rem;
  }

  .title-instrument {
    right: 1.15rem;
    bottom: 1.15rem;
    width: calc(100% - 2.3rem);
  }

  .title-instrument div {
    padding: 0.55rem 0.75rem;
  }

  .ending-copy {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    margin: 0 1.15rem;
    padding-top: 2.5rem;
    transform: none;
  }

  .ending-copy h2 {
    font-size: clamp(2.3rem, 10vw, 4rem);
  }

  .ending-account {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    max-height: none;
    margin: 2rem 1.15rem 1.15rem;
  }

  .transcript-panel {
    width: 100%;
    border-left: 0;
  }

  .screen-overlay {
    padding: 0.75rem;
  }

  .screen-overlay > div {
    padding: 1.35rem;
  }
}

@media (max-width: 760px) and (hover: hover) and (pointer: fine) {
  .field-ledger {
    display: grid;
    align-content: start;
  }
}

@media (max-width: 420px) {
  .game-brand span {
    display: none;
  }

  .game-rail__register {
    grid-column: 2;
  }

  .title-copy > p {
    max-width: 31ch;
  }

  .audio-note {
    display: none;
  }

  .touch-pad {
    grid-template-columns: repeat(3, 2.65rem);
    grid-template-rows: repeat(2, 2.65rem);
  }

  .touch-actions button {
    width: 3.85rem;
    height: 3.85rem;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  :root {
    --rail-height: 2.85rem;
  }

  .game-rail {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    height: var(--rail-height);
    padding: 0 0.55rem;
  }

  .game-brand span,
  .game-rail__register {
    display: none;
  }

  .game-rail nav {
    grid-row: 1;
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(7, minmax(3rem, 1fr));
    width: min(32rem, 100%);
    justify-self: end;
    border-top: 0;
  }

  .game-rail nav button,
  .game-rail nav a {
    min-height: 2.55rem;
  }

  .field-hud {
    grid-template-columns:
      minmax(6.5rem, 0.62fr)
      minmax(10rem, 1.05fr)
      minmax(11rem, 1.12fr)
      minmax(6rem, 0.65fr);
    gap: 0.6rem;
    min-height: 4.2rem;
    padding: 0.35rem 0.65rem;
  }

  .field-objective {
    grid-row: auto;
    grid-column: auto;
    padding: 0 0.6rem;
    border-top: 0;
    border-right: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
  }

  .field-objective > span {
    display: none;
  }

  .field-objective p {
    font-size: 0.66rem;
    text-align: center;
  }

  .field-briefing {
    grid-row: auto;
    grid-column: auto;
    padding: 0 0.55rem;
    border-top: 0;
    border-right: 1px solid var(--rule);
  }

  .field-briefing > span {
    display: none;
  }

  .field-briefing p {
    font-size: 0.62rem;
  }

  .field-briefing small {
    display: none;
  }

  .field-title strong {
    font-size: 0.84rem;
  }

  .field-footer {
    min-height: 2.45rem;
    padding-block: 0.3rem;
  }

  .title-copy {
    top: 50%;
    left: clamp(1.15rem, 5vw, 4rem);
    width: min(34rem, calc(100% - 2.3rem));
    transform: translateY(-50%);
  }

  .title-copy h1 {
    font-size: clamp(2.7rem, 12vh, 4.7rem);
  }

  .title-copy > p {
    margin: 0.45rem 0;
    font-size: 0.9rem;
  }

  .title-actions {
    margin-top: 0.7rem;
  }

  .audio-note,
  .title-instrument {
    display: none;
  }

  .touch-pad {
    grid-template-columns: repeat(3, 2.35rem);
    grid-template-rows: repeat(2, 2.35rem);
  }

  .touch-actions button {
    width: 3.55rem;
    height: 3.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

[data-motion="reduced"] *,
[data-motion="reduced"] *::before,
[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
