@font-face {
  font-family: Barlow;
  src: url(fonts/barlow.ttf);
}
@font-face {
  font-family: Barlow;
  src: url(fonts/barlow-bold.ttf);
  font-weight: 700;
}
@font-face {
  font-family: Bungee;
  src: url(fonts/bungee.ttf);
}
:root {
  color-scheme: dark;
  --cream: #fff2c9;
  --gold: #ffcc65;
  --mint: #8fdabb;
  --edge: #9d804e;
  --panel: #142e2e;
  --sa-top: max(12px, env(safe-area-inset-top));
  --sa-bottom: max(14px, env(safe-area-inset-bottom));
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #0c2224;
  color: var(--cream);
  font:
    17px/1.36 Barlow,
    system-ui,
    sans-serif;
}
button,
a {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #fff4b7;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
button {
  touch-action: manipulation;
}
a {
  color: var(--gold);
}
.symbols,
[hidden] {
  display: none !important;
}
.i {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vertical-align: middle;
}
#console {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #153333;
}
#console:fullscreen {
  height: 100%;
}
#title-scene,
#world,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#title-scene {
  --cover-art: url(cover.webp);
  --cover-position: 70% 22%;
  background:
    linear-gradient(90deg, #091e2399, transparent 66%),
    linear-gradient(0deg, #062020a8, transparent 40%),
    var(--cover-art) var(--cover-position) / cover no-repeat;
}
#world {
  image-rendering: pixelated;
  outline: none;
  touch-action: none;
  visibility: hidden;
}
#console[data-field='true'] #world {
  visibility: visible;
}
#titlebar {
  position: absolute;
  z-index: 3;
  inset: var(--sa-top) max(18px, env(safe-area-inset-right)) auto max(18px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand img {
  display: block;
  width: clamp(116px, 14vw, 166px);
  height: auto;
  filter: drop-shadow(0 2px 2px #10201ccc);
}
.brand small {
  font:
    9px Bungee,
    monospace;
  letter-spacing: 1.1px;
  border-left: 1px solid #f8d899aa;
  padding-left: 9px;
  color: #ffdc93;
  text-shadow: 0 1px 3px #10201c, 0 0 4px #10201c;
}
#expand,
#pause-game,
.back {
  background: #112e31ea;
  border: 1px solid #d4b779b3;
  box-shadow:
    inset 0 0 0 2px #243e39,
    0 3px #10221f;
  border-radius: 6px;
  min-width: 43px;
  min-height: 42px;
}
#expand {
  font: 28px/1 monospace;
  pointer-events: auto;
}
#console:not([data-view='title']) #titlebar {
  display: none;
}
#overlay {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #061c22af;
  overflow: hidden;
}
#screen {
  position: relative;
  width: min(660px, 100%);
  max-height: 100%;
  min-height: 0;
  border: 2px solid #c19c59;
  border-radius: 10px;
  background: linear-gradient(155deg, #20433f, #102b2d 75%);
  box-shadow:
    0 0 0 3px #17302c,
    0 0 0 4px #917346,
    0 14px 50px #06161680,
    inset 0 0 0 3px #36504a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#console[data-view='title'] #overlay {
  background: transparent;
  display: block;
  padding: 0;
}
#console[data-view='title'] #screen {
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  box-shadow: none;
  background: none;
  border-radius: 0;
  overflow: visible;
}
.title-layout {
  position: absolute;
  inset: max(10%, calc(var(--sa-top) + 58px)) auto max(4%, var(--sa-bottom)) max(5%, env(safe-area-inset-left));
  width: min(38%, 650px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 2vh, 24px);
}
.game-logo {
  display: block;
  min-height: 0;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 40vh;
  object-fit: contain;
  filter: drop-shadow(0 6px 0 #33221f70);
}
.title-controls {
  width: clamp(180px, 65%, 285px);
  max-width: 100%;
  flex: none;
  display: grid;
  gap: 9px;
  text-align: center;
}
.title-menu {
  display: grid;
  gap: 8px;
}
.title-credits {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 2px 10px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #102a2de6;
  color: #fff2ce;
  font: 14px/1.25 Barlow, sans-serif;
}
.title-credits span:last-child {
  color: #ffce79;
  white-space: nowrap;
}
.title-menu button,
.gold,
.wood,
.back,
.chip,
.pin,
.choice-key,
.eyebrow,
.pouch,
.journey,
.touch-hint,
.tag {
  font-family: Bungee, monospace;
  font-weight: 400;
}
.title-menu button,
.gold,
.wood {
  border: 2px solid #927345;
  border-radius: 6px;
  padding: 10px 16px;
  line-height: 1.25;
  background: linear-gradient(#244747, #173333);
  box-shadow:
    inset 0 0 0 2px #395853,
    0 3px #0a1b1b;
  color: #ffe9af;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.title-menu button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.title-menu .gold,
.gold {
  background: linear-gradient(#ffe69a, #f2b84e);
  border-color: #8f552a;
  color: #442a24;
  box-shadow:
    inset 0 0 0 2px #ffe8a8,
    0 3px #663727;
}
.title-menu button:hover,
.gold:hover,
.wood:hover,
.back:hover,
.chip:hover {
  filter: brightness(1.13);
}
.touch-hint {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #fff0c3;
  text-shadow: 0 2px 3px #10201c;
}
.head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  padding: 20px 68px 11px 24px;
  border-bottom: 1px solid #c4ac6b42;
  flex: none;
}
.head:not(:has(.back)) {
  padding-right: 18px;
}
.head .eyebrow,
.head h2 {
  grid-column: 1;
}
.menu-brand {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 100px;
  height: auto;
}
.head .back {
  position: absolute;
  right: 14px;
  top: 14px;
  font: 21px/1 Barlow;
  min-width: 39px;
  min-height: 37px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}
.head h1,
.head h2,
.map-details h3 {
  margin: 0;
  font:
    clamp(21px, 3vh, 30px) / 1.18 Bungee,
    monospace;
  color: var(--cream);
}
.scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #9b8553 #17322f;
  padding: 16px 24px 18px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.scroll p {
  margin: 0 0 13px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  padding: 12px 24px 17px;
  border-top: 1px solid #baa67140;
  flex: none;
}
.actions > * {
  min-height: 42px;
}
.actions .spacer {
  margin-right: auto;
}
.muted,
.fine {
  color: #c4d8c9;
}
.fine {
  font-size: 14px;
}
.country-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.country-list button,
.toggle,
.answer,
.source,
.chip {
  border: 1px solid #587466;
  background: #203d38;
  color: var(--cream);
  border-radius: 4px;
  text-align: left;
  padding: 9px 11px;
}
.country-list button:hover,
.answer:hover:not(:disabled),
.source:hover,
.toggle:hover {
  background: #315047;
}
.country-list button[aria-pressed='true'],
.role[aria-pressed='true'] {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px #f2c262;
  background: #384737;
}
.country-list button b {
  color: var(--gold);
  display: inline-block;
  min-width: 24px;
  font: 10px Bungee;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mint);
}
.selection-line {
  margin-top: 2px;
}
.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.role {
  position: relative;
  background: linear-gradient(#284947, #1a3534);
  border: 2px solid #537364;
  border-radius: 6px;
  padding: 12px 3px 10px;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.role img {
  height: clamp(82px, 21vh, 150px);
  max-width: 94%;
  object-fit: contain;
  filter: drop-shadow(2px 4px #102c28);
}
.role strong {
  font: clamp(11px, 2vw, 17px) Bungee;
}
.role small {
  color: #bed5c6;
  font-size: 13px;
}
.role[aria-pressed='true']:after {
  content: '✓';
  position: absolute;
  right: 5px;
  top: 4px;
  background: #ffce71;
  color: #312b24;
  border-radius: 50%;
  font: bold 12px/19px Barlow;
  width: 19px;
  height: 19px;
}
.map-board {
  width: min(100%, 65vh);
  aspect-ratio: 1250/833;
  position: relative;
  margin: 0 auto 11px;
  background: url(map.webp) center/100% 100%;
  border: 2px solid #bda068;
  border-radius: 5px;
  box-shadow: 0 3px #102d2b;
}
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 2px solid #fce5ab;
  color: #f3e7bc;
  background: #344744;
  box-shadow: 0 2px 0 2px #26332d;
  text-shadow: 0 1px #172b30;
}
.pin.done {
  background: #246856;
}
.pin[aria-pressed='true'] {
  background: #f3bb58;
  color: #33251e;
  text-shadow: none;
  outline: 2px solid #fff1aa;
  outline-offset: 2px;
}
.map-details {
  text-align: center;
}
.map-details h3 {
  font-size: 18px;
}
.map-details p {
  margin: 4px 0 0;
  font-size: 15px;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 7px;
  border-bottom: 1px solid #d0be8236;
}
.table-wrap thead {
  background: #21403c;
  color: #ffdc94;
}
.table-wrap .selected {
  background: #3c4635;
}
.sources {
  display: grid;
  gap: 7px;
}
.source {
  display: block;
  text-decoration: none;
}
.settings {
  display: grid;
  gap: 8px;
}
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
}
.toggle b {
  color: var(--gold);
}
.settings-foot {
  margin: 13px 0 0 !important;
}
.case-portrait {
  float: left;
  width: 52px;
  height: 65px;
  margin: 0 13px 6px 0;
  object-fit: contain;
  object-position: center bottom;
}
.case-story {
  min-height: 65px;
}
.question {
  clear: both;
  font-weight: 700;
  font-size: 19px;
  margin: 12px 0 9px;
}
.answers {
  display: grid;
  gap: 7px;
}
.answer {
  line-height: 1.22;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.choice-key {
  font-size: 12px;
  color: var(--gold);
  border: 1px solid #9a855c;
  padding: 3px 6px;
  border-radius: 3px;
}
.answer.right {
  background: #285e49;
  border-color: #8ad5a7;
}
.answer.wrong {
  background: #583e36;
  border-color: #cc8b74;
}
.feedback {
  line-height: 1.32;
  font-size: 15px;
  margin: 10px 0 0 !important;
  color: #ffe3a2;
}
.feedback:empty {
  display: none;
}
#hud {
  position: absolute;
  z-index: 1;
  top: var(--sa-top);
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.pouch,
.journey {
  background: #102a2bea;
  border: 1px solid #d6b26a;
  border-radius: 6px;
  box-shadow: 0 2px #203229;
  color: var(--gold);
  padding: 6px 10px;
  font-size: 12px;
}
.pouch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}
.pouch svg {
  height: 17px;
  width: 17px;
  color: #f26c53;
  margin-right: 2px;
}
.pouch svg.empty {
  color: #45615b;
}
.journey {
  width: clamp(112px, 20vw, 220px);
  font-size: 9px;
  letter-spacing: 0.035em;
}
.journey span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.journey progress {
  display: block;
  width: 100%;
  height: 5px;
  accent-color: var(--gold);
  border: 0;
  margin: 3px 0 1px;
  background: #426258;
}
.journey progress::-webkit-progress-bar {
  background: #426258;
}
.journey progress::-webkit-progress-value {
  background: var(--gold);
}
#pause-game {
  pointer-events: auto;
  margin-left: auto;
  font-size: 18px;
}
#touch {
  position: absolute;
  z-index: 1;
  bottom: var(--sa-bottom);
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: none;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
#touch > div {
  display: flex;
  gap: 8px;
}
#console[data-view='playing'],
#console[data-view='playing'] *,
#touch, #touch * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
}
#touch .action-label { display: none; }
.pad-arrow {
  display: inline-block;
  width: 23px;
  height: 20px;
  background: currentColor;
  clip-path: polygon(0 30%, 48% 30%, 48% 0, 100% 50%, 48% 100%, 48% 70%, 0 70%);
}
[data-hold='left'] .pad-arrow { transform: rotate(180deg); }
[data-hold='down'] .pad-arrow { transform: rotate(90deg); }
#touch button {
  pointer-events: auto;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background: #153633bc;
  color: #ffe5a1;
  border: 2px solid #e5cb87c9;
  border-radius: 14px;
  width: clamp(52px, 12vw, 72px);
  height: clamp(52px, 12vw, 72px);
  font: bold 23px Barlow;
  box-shadow:
    inset 0 0 0 3px #36524b80,
    0 3px #142f2bb3;
}
#touch button[data-hold='jump'] {
  border-radius: 50%;
  background: #885830cb;
}
#touch button:active,
#touch button.held {
  background: #6b7957;
}
#note {
  position: absolute;
  z-index: 1;
  top: calc(var(--sa-top) + 55px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 86%;
  text-align: center;
  color: #fff2d0;
  background: #173331ee;
  box-shadow: 0 2px #a78752;
  border-radius: 4px;
  font-weight: 700;
  padding: 5px 12px;
  pointer-events: none;
}
#note:empty {
  display: none;
}
@media (pointer: coarse), (max-width: 680px) {
  #touch {
    display: flex;
  }
  .touch-hint {
    display: none;
  }
}
@media (orientation: portrait) {
  .touch-hint {
    display: none;
  }
  .map-board {
    width: 100%;
  }
}
/* This illustration places the jumping nurse on the right even in a square crop. */
@media (max-aspect-ratio: 7/4) {
  #title-scene {
    --cover-art: url(title-vertical.webp);
    --cover-position: 80% 27%;
  }
}
/* Stack the title and controls where there is room above and below her silhouette. */
@media (max-aspect-ratio: 4/5) and (min-height: 501px), (max-aspect-ratio: 2/3) {
  #title-scene {
    --cover-position: 80% 19%;
    background: linear-gradient(0deg, #08262b60, transparent 36%),
      var(--cover-art) var(--cover-position) / cover no-repeat;
  }
  .title-layout {
    --title-top: max(8dvh, calc(var(--sa-top) + 46px));
    inset: var(--title-top) 4% max(4%, var(--sa-bottom));
    width: auto;
    justify-content: space-between;
    gap: 0;
  }
  .game-logo {
    max-width: min(80%, 470px);
    max-height: min(17dvh, calc(24dvh - var(--title-top) - 10px));
  }
  .title-controls {
    width: min(82%, 285px);
  }
}
@media (min-aspect-ratio: 3/1) {
  #console[data-view='title'] :is(#title-scene, #overlay) {
    max-width: 300dvh;
    margin-inline: auto;
  }
  #titlebar {
    max-width: calc(300dvh - 36px);
    margin-inline: auto;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  #overlay {
    padding: max(12px, env(safe-area-inset-top)) 11px max(12px, env(safe-area-inset-bottom));
  }
  .head {
    padding: 15px 55px 10px 15px;
  }
  .head h2 {
    grid-column: 1 / -1;
  }
  .head .eyebrow {
    align-self: center;
  }
  .menu-brand {
    grid-row: 1;
    width: 82px;
    margin-bottom: 3px;
  }
  .head .back {
    top: 9px;
    right: 9px;
  }
  .scroll {
    padding: 12px 14px;
  }
  .actions {
    padding: 10px 13px 13px;
    gap: 7px;
  }
  .gold,
  .wood {
    font-size: 12px;
    padding: 9px;
  }
  .country-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .country-list button {
    font-size: 15px;
  }
  .roles {
    gap: 5px;
  }
  .role small {
    display: none;
  }
  .role strong {
    font-size: 12px;
  }
  .table-wrap th,
  .table-wrap td {
    font-size: 13px;
    padding: 6px 3px;
  }
  .title-menu button {
    font-size: 14px;
  }
  .journey {
    flex: 1;
    max-width: 176px;
  }
  .pouch {
    gap: 6px;
    padding: 5px 6px;
  }
  .pouch svg {
    width: 14px;
  }
  .pouch,
  .journey {
    min-height: 33px;
  }
  .question {
    font-size: 17px;
  }
}
@media (orientation: landscape) and (max-height: 530px) {
  #overlay {
    padding: 8px 16px;
  }
  .head {
    padding: 9px 52px 7px 16px;
  }
  .head .back {
    top: 4px;
  }
  .head h2 {
    font-size: 20px;
  }
  .eyebrow {
    margin: 0;
  }
  .scroll {
    padding: 8px 16px;
  }
  .actions {
    padding: 6px 16px;
  }
  .actions > * {
    min-height: 34px;
  }
  .role img {
    height: 20vh;
  }
  .title-layout {
    top: calc(var(--sa-top) + 42px);
    bottom: max(3%, var(--sa-bottom));
    gap: 6px;
  }
  .game-logo {
    max-height: 33vh;
  }
  .brand img { width: 110px; }
  .title-controls { gap: 6px; }
  .title-menu {
    gap: 5px;
  }
  .title-menu button {
    padding: 5px 10px;
    font-size: 12px;
  }
  .touch-hint {
    display: none;
  }
  .map-board {
    max-width: 46vh;
  }
  .question {
    margin: 6px 0;
  }
  .pin {
    width: 23px;
    height: 23px;
    font-size: 11px;
  }
}

.book-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.book-tabs button {
  min-height: 36px;
  padding: 4px 11px;
  background: #193b39;
  border: 1px solid #608172;
  border-radius: 4px;
  color: var(--cream);
  font-weight: 700;
}
.book-tabs button[aria-pressed='true'] {
  color: #352a1e;
  background: #f5cc79;
  border-color: #ffe1a0;
}
.table-wrap {
  margin-bottom: 12px;
}

.food-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url(props.webp) 100% 100%/300% 200% no-repeat;
  image-rendering: pixelated;
}
.stock {
  display: inline-flex;
  align-items: center;
  color: #ffda8b;
}
.stock .food-icon {
  width: 20px;
  height: 20px;
}
#touch button[data-hold='food'] {
  border-radius: 50%;
  background: #426451c9;
}
#touch [data-hold='food']:disabled {
  opacity: 0.5;
}
#touch .food-icon {
  width: 31px;
  height: 31px;
}
#console[data-view='case'] #screen,
#console[data-view='mentor'] #screen {
  width: min(760px, 100%);
}
#console[data-view='case'] .scroll,
#console[data-view='mentor'] .scroll {
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.48;
  overflow-wrap: anywhere;
}
#console[data-view='case'] .question {
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.28;
  margin: 13px 0 12px;
}
#console[data-view='case'] .answer {
  font-size: clamp(17px, 1.75vw, 20px);
  line-height: 1.32;
  min-height: 46px;
  padding: 9px 12px;
}
.choice-key {
  flex: none;
}
.answer[data-discarded] {
  opacity: 0.62;
  background: #513c38;
}
#console[data-view='case'] .feedback {
  font-size: clamp(17px, 1.65vw, 19px);
  line-height: 1.4;
}
.clinic-energy {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-right: auto;
  min-height: 0;
}
.clinic-energy svg {
  color: #ee8064;
  width: 18px;
  height: 18px;
}
.clinic-energy svg.empty {
  color: #53716a;
}
.mentor-talk {
  display: flex;
  gap: 17px;
  align-items: flex-start;
}
.mentor-talk img {
  width: clamp(66px, 15vw, 121px);
  height: auto;
  flex: none;
  filter: drop-shadow(1px 3px 0 #102b29);
}
.mentor-talk h3 {
  color: #ffda88;
  margin: 0 0 8px;
  font-size: 1.17em;
  line-height: 1.27;
}
.mentor-talk p {
  margin: 0;
}
.mentor-loss {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #9e946048;
  color: #ffe3af;
  font-size: 16px;
}
.mentor-loss .clinic-energy {
  margin: 0;
}
.load-scene {
  height: clamp(85px, 22vh, 155px);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center 53%;
  border: 1px solid #b09865;
  border-radius: 5px;
  image-rendering: pixelated;
}
.load-trail {
  position: absolute;
  bottom: 12%;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, #e4bd76 0 15px, #96744e 15px 17px);
  border-bottom: 2px solid #583a2b;
}
#load-runner {
  position: absolute;
  left: 6%;
  bottom: calc(12% + 4px);
  width: 52px;
  height: 52px;
  transform: translateX(-50%);
  transition: left 0.22s ease-out;
}
#load-runner img {
  height: 48px;
  max-width: 50px;
  display: block;
  margin: 3px auto 0;
}
#load-runner.running img,
#load-runner:not(.running) i {
  display: none;
}
#load-runner i {
  display: block;
  width: 52px;
  height: 52px;
  background-size: 416px 156px;
  animation: trail-run 0.62s steps(8) infinite;
}
.load-flag {
  position: absolute;
  right: 4%;
  bottom: 14%;
  font: 28px/1 Bungee;
  color: #ffe486;
  text-shadow: 2px 2px #3c4434;
}
.load-readout {
  margin: 12px 0 5px;
  display: flex;
  justify-content: space-between;
  gap: 7px;
  font-weight: 700;
}
#load-progress {
  width: 100%;
  height: 7px;
  accent-color: var(--gold);
}
.load-hint {
  margin: 8px 0 0 !important;
  color: #cce1d0;
  font-size: 16px;
}
@keyframes trail-run {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -416px 0;
  }
}
@media (max-width: 600px) {
  #touch {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
  }
  #touch > div {
    gap: 4px;
  }
  #touch button {
    width: clamp(43px, 12vw, 59px);
    height: clamp(45px, 13vw, 62px);
  }
  #console[data-view='case'] .actions {
    justify-content: flex-end;
  }
  .mentor-talk {
    display: block;
  }
  .mentor-talk img {
    float: left;
    margin: 0 12px 5px 0;
  }
  .mentor-loss {
    clear: both;
  }
  .stock .food-icon {
    width: 16px;
    height: 16px;
  }
  .pouch {
    gap: 5px;
  }
}
@media (max-height: 450px) and (orientation: landscape) {
  #console:is([data-view='case'], [data-view='mentor']) .head {
    padding-top: 5px;
    padding-bottom: 4px;
  }
  #console:is([data-view='case'], [data-view='mentor']) .actions {
    padding: 5px 12px 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #load-runner {
    transition: none;
  }
  #load-runner i {
    animation: none;
  }
}

.post-reward {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 230px;
  color: var(--cream);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.2;
}
.post-reward strong {
  color: var(--gold);
}
.post-reward .clinic-energy {
  margin: 0 0 0 auto;
}
.drink-icon {
  width: 36px;
  height: 36px;
  flex: none;
  shape-rendering: crispEdges;
}
@media (orientation: portrait) {
  #touch {
    --pad-key: clamp(53px, 15vw, 68px);
    --pad-height: clamp(49px, 13vw, 59px);
    --jump-size: clamp(70px, 19vw, 86px);
    --pad-edge: clamp(12px, 4vw, 30px);
    left: max(var(--pad-edge), env(safe-area-inset-left));
    right: max(var(--pad-edge), env(safe-area-inset-right));
    bottom: calc(clamp(14px, 2.8dvh, 25px) + env(safe-area-inset-bottom, 0px));
    align-items: flex-end;
  }
  #touch .move-pad {
    display: grid;
    grid-template-columns: repeat(2, var(--pad-key));
    grid-template-rows: var(--pad-height);
    gap: 3px;
    margin-bottom: 4px;
  }
  #touch button {
    display: grid;
    place-content: center;
    justify-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    color: #ffedbc;
    background: linear-gradient(#234e4aef, #143535f2);
    border: 2px solid #d3c597;
    box-shadow: inset 0 2px #a9d8ba40, inset 0 -3px #092728aa, 0 3px #101f22d9;
  }
  #touch [data-hold='left'] { grid-area: 1 / 1; border-radius: 18px 7px 7px 18px; }
  #touch [data-hold='right'] { grid-area: 1 / 2; border-radius: 7px 18px 18px 7px; }
  #touch [data-hold='down'] {
    height: clamp(55px, 15vw, 68px);
    border-radius: 19px;
    gap: 4px;
  }
  #touch .action-pad {
    display: grid;
    grid-template-columns: clamp(64px, 17vw, 76px) var(--jump-size);
    gap: clamp(7px, 2vw, 12px);
    align-items: end;
  }
  #touch button[data-hold='jump'] {
    height: var(--jump-size);
    margin-bottom: 4px;
    border: 3px solid #f7d18a;
    background: linear-gradient(#f6c571, #dfa04e);
    color: #402819;
    box-shadow: inset 0 2px #fff0bf, inset 0 -4px #bc743c, 0 3px #38271cea;
  }
  #touch [data-hold='jump'] .i { width: 27px; height: 27px; stroke-width: 3.5; }
  #touch .action-label { display: block; font: 11px/1.1 Bungee, system-ui; }
  #touch [data-hold='down'] .action-label { font-size: 9px; }
  #touch button[data-hold='food'] {
    position: absolute;
    bottom: calc(var(--pad-height) + 17px);
    left: 0;
    width: 48px;
    height: 48px;
    background: #254c44ec;
  }
  #touch [data-hold='food']:disabled { opacity: .62; filter: saturate(.35); }
  #touch button.held { background: #43756b; color: #fff9d9; box-shadow: inset 0 3px #17342fcc, 0 1px #142829; }
  #touch button[data-hold='jump'].held { color: #382211; background: #ffd99a; box-shadow: inset 0 3px #ca8c44, 0 1px #452c1b; }
}
@media (max-width: 420px) {
  .post-reward {
    flex-basis: 100%;
  }
  .drink-icon {
    width: 30px;
    height: 30px;
  }
}
