/* Layout overrides below are ordered deliberately; keep mobile and emergency rules after the base layout. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  --paper: #f2f1e7;
  --ink: #294032;
  --lime: #daed9d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  background: #b8c7b9;
  color: var(--ink);
  font:
    13px "DM Sans",
    sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #dcab61;
  outline-offset: 3px;
}
#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  outline: none;
}
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 30px;
  pointer-events: none;
}
header > * {
  pointer-events: auto;
}
header a {
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
header a > span {
  font-size: 31px;
}
header small {
  font-size: 9px;
  font-weight: 400;
  border-left: 1px solid #6f85775c;
  margin-left: 4px;
  padding-left: 14px;
  letter-spacing: 2px;
}
header button {
  border: 1px solid #748c7766;
  background: #f3f4e8b3;
  border-radius: 30px;
  padding: 10px 15px;
  color: var(--ink);
  font-size: 9px;
  letter-spacing: 1px;
  margin-left: 6px;
}
.location {
  position: absolute;
  top: 93px;
  left: 30px;
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.location > span:not(.live) {
  margin: 0 9px;
  color: #83927e;
}
.location small {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: 9px;
  color: #6f826b;
}
.live {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63854b;
  margin-right: 8px;
}
aside {
  position: absolute;
  top: 159px;
  left: 25px;
  width: 256px;
  background: #f4f3e8ed;
  backdrop-filter: blur(14px);
  border: 1px solid #ffffff90;
  border-radius: 12px;
  padding: 23px;
  box-shadow: 0 15px 50px #29412e12;
}
.eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #7b8967;
  font-weight: 600;
}
h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 13px 0;
}
em {
  font-family: Georgia, serif;
  font-weight: 400;
}
.intro {
  font-size: 10px;
  line-height: 1.6;
  color: #87907b;
  margin-bottom: 22px;
}
.fresh {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fresh > span {
  font-size: 8px;
  letter-spacing: 1px;
}
.fresh strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 500;
}
.meter {
  height: 5px;
  background: #dfe4cf;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 9px;
}
.meter i {
  height: 100%;
  width: 100%;
  display: block;
  background: #8da45c;
  transition: width 0.2s;
}
.hint {
  font-size: 9px;
  line-height: 1.7;
  color: #8d957e;
  margin: 9px 0 23px;
}
.task-title {
  border-top: 1px solid #dbe0ce;
  padding-top: 20px;
  font-size: 9px;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
}
.task-title span {
  color: #939d80;
}
ol {
  padding: 0;
  list-style: none;
  margin: 20px 0 15px;
}
li {
  display: flex;
  gap: 11px;
  margin-bottom: 19px;
}
li > span {
  width: 24px;
  height: 24px;
  border: 1px solid #cbd3b8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 8px;
  flex-shrink: 0;
  color: #8c9b73;
}
li b {
  font-size: 11px;
  font-weight: 500;
}
li small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
  color: #929a83;
}
.done > span {
  background: #d5e6ac;
  border-color: #c2d398;
}
.done b {
  text-decoration: line-through;
  color: #8a9674;
}
#inventory {
  border-radius: 5px;
  padding: 11px;
  background: #e8edda;
  color: #77845e;
  font-size: 9px;
}
#restart {
  border: 0;
  background: none;
  color: #91a07c;
  font-size: 9px;
  display: block;
  margin: 17px auto 0;
}
.controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-30%);
  display: flex;
  gap: 22px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #455f48;
  white-space: nowrap;
  background: #f2f2e2c9;
  padding: 12px 18px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}
kbd {
  font:
    9px "DM Sans",
    sans-serif;
  border: 1px solid #acb89d;
  border-radius: 3px;
  padding: 3px 5px;
  margin-right: 5px;
}
#prompt {
  position: absolute;
  bottom: 94px;
  left: 60%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 24px;
  background: #273f30ed;
  color: #e5efc8;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
#toast {
  position: absolute;
  top: 90px;
  left: 60%;
  transform: translateX(-50%);
  background: #f6f5d9ed;
  box-shadow: 0 5px 20px #233c2f22;
  border-radius: 9px;
  padding: 14px 22px;
  font-size: 12px;
  max-width: 55%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
}
#dialog {
  position: absolute;
  bottom: 85px;
  left: 310px;
  right: 30px;
  background: #f3f3e4f5;
  border: 1px solid #c4d2a4;
  border-radius: 12px;
  padding: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  box-shadow: 0 10px 50px #18332130;
}
#dialog[hidden],
#prompt[hidden],
#overlay[hidden] {
  display: none;
}
#dialog p {
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
}
#choices {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
  max-width: 45%;
  flex-wrap: wrap;
}
#choices button {
  padding: 11px 15px;
  border: 1px solid #b9c99d;
  background: #e4edcc;
  color: #3d5633;
  border-radius: 6px;
  font-size: 10px;
}
#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #1b332a47;
  backdrop-filter: blur(4px);
}
.welcome {
  background: #f4f2e5;
  border: 1px solid #fff8;
  padding: 35px 46px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 100px #18312850;
}
.icon {
  font-size: 40px;
  color: #8ba55e;
  margin-top: 20px;
}
.welcome h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 43px;
  letter-spacing: -2px;
  font-weight: 500;
  line-height: 1.08;
  margin: 10px 0 17px;
}
.welcome p {
  font-size: 12px;
  line-height: 1.9;
  color: #839075;
}
.welcome > button {
  display: block;
  width: 100%;
  background: #2c4b34;
  color: #e3edc3;
  border: 0;
  border-radius: 6px;
  padding: 15px 22px;
  text-align: left;
  font-size: 12px;
  margin: 24px 0 16px;
}
.welcome > button span {
  float: right;
}
.welcome > small {
  font-size: 9px;
  color: #929b80;
  line-height: 1.8;
}
.mobile {
  display: none;
}
@media (max-height: 780px) and (min-width: 761px) {
  aside {
    top: 135px;
    padding: 18px;
    width: 240px;
  }
  h1 {
    font-size: 25px;
  }
  .intro {
    margin-bottom: 12px;
  }
  .hint {
    margin-bottom: 14px;
  }
  li {
    margin-bottom: 12px;
  }
  .task-title {
    padding-top: 14px;
  }
  .location {
    top: 83px;
  }
  ol {
    margin: 14px 0;
  }
  .controls {
    bottom: 17px;
  }
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  header {
    padding: 16px;
  }
  header a {
    font-size: 9px;
    gap: 7px;
  }
  header a > span {
    font-size: 24px;
  }
  header small {
    display: none;
  }
  header button {
    padding: 9px;
    font-size: 8px;
  }
  .location {
    top: 71px;
    left: 17px;
    font-size: 8px;
  }
  .location small {
    display: none;
  }
  aside {
    top: 100px;
    left: 12px;
    width: 180px;
    padding: 14px;
    pointer-events: none;
  }
  aside .eyebrow,
  h1,
  .intro,
  .hint,
  #restart {
    display: none;
  }
  .fresh > span {
    font-size: 7px;
  }
  .fresh strong {
    font-size: 19px;
  }
  .task-title {
    font-size: 8px;
    padding-top: 12px;
    margin-top: 14px;
  }
  ol {
    margin: 13px 0 0;
  }
  li {
    gap: 7px;
    margin-bottom: 12px;
  }
  li > span {
    width: 19px;
    height: 19px;
    font-size: 7px;
  }
  li b {
    font-size: 9px;
  }
  li small {
    font-size: 8px;
    line-height: 1.4;
  }
  #inventory {
    font-size: 8px;
    padding: 8px;
  }
  .controls {
    display: none;
  }
  .mobile {
    position: absolute;
    bottom: 20px;
    left: 18px;
    right: 18px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    touch-action: none;
    user-select: none;
  }
  .dpad {
    display: grid;
    grid-template-columns: repeat(3, 43px);
    gap: 5px;
  }
  .dpad button {
    height: 40px;
    background: #f3f4e2dc;
    border: 1px solid #b5c09e;
    border-radius: 8px;
    color: #3e5a36;
    font-size: 18px;
  }
  .dpad button:first-child {
    grid-column: 2;
  }
  .dpad button:nth-child(2) {
    grid-column: 1;
  }
  #action {
    background: #2c4b34ec;
    border: 1px solid #aec38e;
    color: #e3edc3;
    border-radius: 9px;
    padding: 16px;
    font-size: 10px;
  }
  #prompt {
    bottom: 136px;
    left: 50%;
    font-size: 10px;
    max-width: 94%;
    white-space: normal;
    text-align: center;
  }
  #toast {
    top: 72px;
    left: 50%;
    max-width: 90%;
    width: max-content;
    font-size: 10px;
    padding: 10px 14px;
  }
  #dialog {
    bottom: 139px;
    left: 12px;
    right: 12px;
    padding: 17px;
    display: block;
  }
  #dialog p {
    font-size: 11px;
  }
  #choices {
    margin-top: 12px;
    max-width: 100%;
  }
  .welcome {
    padding: 27px 23px;
    width: calc(100% - 35px);
    max-width: 420px;
  }
  .welcome h2 {
    font-size: 37px;
  }
  .welcome p {
    font-size: 10px;
  }
  .welcome > small {
    font-size: 8px;
  }
}

.multiplayer {
  position: absolute;
  right: 30px;
  top: 88px;
  width: 218px;
  background: #f3f3e7e8;
  border: 1px solid #ffffff80;
  border-radius: 10px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
}
.multiplayer > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#net-status {
  font-size: 8px;
  letter-spacing: 1px;
  color: #879269;
}
#net-status.connected {
  color: #577c43;
}
#invite {
  font-size: 7px;
  background: none;
  border: 0;
  color: #778b62;
  padding: 3px;
}
.multiplayer p {
  font-size: 9px;
  letter-spacing: 1px;
  margin: 14px 0 10px;
}
.hp {
  float: right;
  color: #799252;
}
.hp b {
  font-size: 16px;
  font-weight: 500;
}
.multiplayer > small {
  font-size: 7px;
  letter-spacing: 0.8px;
  color: #89967b;
  display: block;
  margin-top: 12px;
}
#leaderboard {
  font-size: 9px;
  color: #7c8b6d;
  line-height: 1.9;
}
#leaderboard div {
  display: flex;
  justify-content: space-between;
}
#leaderboard .me {
  color: #3e6631;
}
body.hit:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 100px #da856980;
  animation: hitfade 0.35s forwards;
}
@keyframes hitfade {
  to {
    opacity: 0;
  }
}
canvas {
  cursor: crosshair;
}
.touch-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#fire {
  background: #b98550e8;
  border: 1px solid #edd69b;
  color: #fff2d5;
  border-radius: 9px;
  padding: 16px;
  font-size: 11px;
  touch-action: none;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  .multiplayer {
    right: 12px;
    top: 100px;
    width: 148px;
    padding: 11px;
  }
  #net-status {
    font-size: 6px;
    letter-spacing: 0.4px;
  }
  #invite {
    font-size: 6px;
  }
  .multiplayer p {
    font-size: 7px;
    margin-top: 10px;
  }
  .multiplayer > small {
    font-size: 6px;
    line-height: 1.7;
  }
  #leaderboard {
    font-size: 8px;
  }
  .controls {
    display: none;
  }
}
@media (min-width: 761px) and (min-height: 521px) {
  .controls {
    gap: 14px;
  }
}
.name-label {
  display: block;
  text-align: left;
  margin-top: 20px;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #7f8f6d;
}
#player-name,
.rename-input {
  font:
    14px "DM Sans",
    sans-serif;
  color: #345334;
  background: #fffdf0;
  border: 1px solid #c9d4b7;
  border-radius: 7px;
  padding: 12px 14px;
  width: 100%;
  margin-top: 7px;
  outline: none;
}
#player-name:focus,
.rename-input:focus {
  border-color: #819c58;
  box-shadow: 0 0 0 3px #dbe8bb;
}
#rename {
  position: absolute;
  right: 30px;
  top: 265px;
  border: 1px solid #ffffff88;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #617c50;
  background: #f1f4e5c9;
}
#tasks-toggle {
  display: none;
}
.stick {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 1px solid #d9e3c597;
  background: #f2f4de38;
  box-shadow: inset 0 0 30px #f8ffe825;
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.stick:before,
.stick:after {
  content: "";
  position: absolute;
  background: #e6edc94a;
  left: 50%;
  top: 12%;
  width: 1px;
  height: 76%;
}
.stick:after {
  transform: rotate(90deg);
}
.thumb {
  position: absolute;
  left: calc(50% - 24px);
  top: calc(50% - 24px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dfecc8e8;
  box-shadow: 0 3px 14px #22432f25;
  border: 2px solid #f7ffeac9;
  pointer-events: none;
}
.stick.active .thumb {
  background: #c9de9c;
}
.stick-guide {
  position: absolute;
  left: 0;
  right: 0;
  top: 34px;
  text-align: center;
  font-size: 30px;
  color: #40663d70;
  pointer-events: none;
}
.stick-zone > small {
  display: block;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #42613a;
  margin-top: 8px;
}
.aim-stick {
  background: #a77b4930;
  border-color: #f0deb58c;
}
.aim-stick .thumb {
  background: #e7bf7be6;
  border-color: #fff0c2;
}
.aim-stick.active .thumb {
  background: #e4a449;
}
.touch-actions {
  align-items: center;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  header {
    padding: 12px 14px;
  }
  .location {
    display: none;
  }
  aside {
    top: 62px;
    left: 12px;
    width: calc(50% - 18px);
    padding: 9px 11px;
    border-radius: 8px;
    pointer-events: auto;
    background: #f4f3e8d9;
  }
  aside .fresh > span {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .fresh strong {
    font-size: 17px;
  }
  .meter {
    margin-top: 5px;
    height: 3px;
  }
  aside .task-title,
  aside ol,
  aside #inventory {
    display: none;
  }
  .multiplayer {
    top: 62px;
    right: 12px;
    width: calc(50% - 18px);
    padding: 8px 11px;
    border-radius: 8px;
    background: #f4f3e8d9;
  }
  .multiplayer p {
    margin: 5px 0 0;
    font-size: 6px;
  }
  .hp b {
    font-size: 13px;
  }
  .multiplayer > small,
  #leaderboard {
    display: none;
  }
  .multiplayer #net-status {
    font-size: 6px;
  }
  #tasks-toggle {
    display: block;
    position: absolute;
    top: 118px;
    left: 12px;
    z-index: 2;
    border: 1px solid #d9e3c5;
    border-radius: 18px;
    background: #f4f4e5e3;
    color: #526f41;
    font-size: 8px;
    letter-spacing: 0.8px;
    padding: 8px 12px;
  }
  #tasks-toggle span {
    margin-left: 8px;
    color: #849772;
  }
  #rename {
    top: 118px;
    right: 12px;
    padding: 8px 12px;
  }
  body.tasks-open aside {
    top: 156px;
    width: 230px;
    max-height: calc(100dvh - 350px);
    overflow: auto;
    box-shadow: 0 8px 35px #2d452033;
    background: #f4f3e8f5;
  }
  body.tasks-open aside .fresh,
  body.tasks-open aside .meter {
    display: none;
  }
  body.tasks-open aside .task-title {
    display: flex;
    border: 0;
    padding-top: 0;
    margin-top: 4px;
  }
  body.tasks-open aside ol {
    display: block;
  }
  body.tasks-open aside #inventory {
    display: block;
  }
  body.tasks-open aside #restart {
    display: block;
  }
  body.tasks-open aside li {
    margin-bottom: 14px;
  }
  body.tasks-open aside li b {
    font-size: 10px;
  }
  body.tasks-open aside li small {
    font-size: 9px;
  }
  .mobile {
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 20px;
    right: 20px;
    align-items: end;
    pointer-events: none;
  }
  .mobile > * {
    pointer-events: auto;
  }
  .mobile .touch-actions {
    gap: 13px;
  }
  #action {
    border-radius: 25px;
    padding: 11px 17px;
    background: #304e38e8;
    font-size: 9px;
    box-shadow: 0 2px 14px #244e3230;
  }
  #prompt {
    bottom: 196px;
    font-size: 10px;
    padding: 10px 17px;
  }
  #toast {
    top: 157px;
    max-width: calc(100% - 30px);
    font-size: 10px;
    padding: 9px 13px;
  }
  #dialog {
    bottom: 199px;
    max-height: calc(100dvh - 370px);
    overflow: auto;
  }
  #dialog p {
    font-size: 11px;
  }
  .welcome {
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 23px;
  }
  .welcome .icon {
    margin-top: 12px;
    font-size: 30px;
  }
  .welcome h2 {
    font-size: 32px;
    margin-top: 5px;
  }
  .welcome p {
    font-size: 10px;
    margin: 10px 0;
  }
  .welcome > button {
    margin-top: 15px;
  }
  .name-label {
    margin-top: 14px;
  }
  .controls {
    display: none;
  }
}
@media (max-height: 520px) and (max-width: 950px) {
  header {
    padding: 8px 14px;
  }
  .location {
    display: none;
  }
  aside {
    top: 49px;
  }
  .multiplayer {
    top: 49px;
  }
  #tasks-toggle,
  #rename {
    top: 103px;
  }
  .stick {
    width: 88px;
    height: 88px;
  }
  .thumb {
    width: 40px;
    height: 40px;
    left: calc(50% - 20px);
    top: calc(50% - 20px);
  }
  .stick-guide {
    top: 23px;
  }
  .mobile {
    bottom: 10px;
  }
  #toast {
    top: 48px;
  }
  #prompt {
    bottom: 150px;
  }
}
@media (min-width: 761px) and (min-height: 521px) {
  #rename {
    top: 31px;
    right: 235px;
  }
}

#dialog {
  z-index: 10;
  padding-right: 54px;
}
#dialog-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5d7750;
  font-size: 26px;
  line-height: 1;
  touch-action: manipulation;
}
#choices button {
  min-height: 44px;
  touch-action: manipulation;
}
body.dialog-open .stick {
  opacity: 0.4;
  pointer-events: none;
}
#action {
  touch-action: manipulation;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  #dialog {
    max-height: calc(100dvh - 235px);
    bottom: 190px;
    padding: 18px 48px 18px 18px;
  }
  #choices {
    gap: 8px;
  }
  #choices button {
    font-size: 11px;
    padding: 10px 14px;
  }
}
@media (max-height: 520px) and (max-width: 950px) {
  #dialog {
    top: 55px;
    bottom: auto;
    max-height: calc(100dvh - 145px);
    left: 12px;
    right: 12px;
    overflow: auto;
  }
}

#game {
  touch-action: none;
}
.fire-zone {
  text-align: center;
}
.fire-zone #fire {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid #fff0c2aa;
  background: #c89958d9;
  box-shadow: 0 4px 24px #71522525;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  touch-action: manipulation;
  user-select: none;
}
.fire-zone #fire span {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 5px;
}
.fire-zone #fire:active {
  background: #b8843d;
  transform: scale(0.95);
}
.fire-zone > small {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  color: #6e613f;
  margin-top: 8px;
}
@media (max-height: 520px) {
  .fire-zone #fire {
    width: 78px;
    height: 78px;
  }
  .fire-zone #fire span {
    font-size: 26px;
  }
}

.combat-buttons {
  display: flex;
  align-items: end;
  gap: 10px;
}
.fork-zone {
  text-align: center;
}
#fork {
  width: 64px;
  height: 64px;
  border: 2px solid #eff8dcc7;
  border-radius: 50%;
  background: #cbdab7ed;
  color: #3c5d38;
  font-size: 10px;
  font-weight: 600;
  touch-action: manipulation;
  user-select: none;
  box-shadow: 0 3px 16px #304f3120;
}
#fork span {
  display: block;
  font-size: 27px;
  line-height: 1.1;
}
#fork:active,
#fork.jab {
  transform: scale(0.9);
  background: #aec98b;
}
.fork-zone > small {
  display: block;
  font-size: 6px;
  letter-spacing: 0.5px;
  color: #4f6a40;
  margin-top: 9px;
}
body.dialog-open #fork,
body.dialog-open #fire {
  opacity: 0.4;
}
@media (max-width: 360px) {
  .combat-buttons {
    gap: 6px;
  }
  .fire-zone #fire {
    width: 82px;
    height: 82px;
  }
  #fork {
    width: 58px;
    height: 58px;
  }
  .mobile {
    left: 14px;
    right: 14px;
  }
}
#map-toggle {
  position: absolute;
  right: 318px;
  top: 31px;
  border: 1px solid #fff9;
  border-radius: 20px;
  padding: 8px 12px;
  background: #f1f4e5dc;
  color: #567347;
  font-size: 8px;
  letter-spacing: 1px;
}
#objective-status {
  position: absolute;
  top: 88px;
  left: 330px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f3f4dfdb;
  border: 1px solid #fff8;
  border-radius: 10px;
  max-width: calc(100vw - 620px);
  pointer-events: none;
}
#objective-status b {
  font-size: 10px;
  font-weight: 600;
  display: block;
}
#objective-status small {
  display: block;
  font-size: 9px;
  color: #7e8f6d;
  line-height: 1.5;
  margin-top: 4px;
}
#objective-arrow {
  font-size: 22px;
  color: #a28c47;
}
#objective-distance {
  font-size: 12px;
  color: #6b8057;
  white-space: nowrap;
}
#world-map {
  position: absolute;
  right: 30px;
  bottom: 90px;
  z-index: 4;
  width: 260px;
  border: 1px solid #dce6cc;
  border-radius: 9px;
  overflow: hidden;
  background: #e8edd8;
  box-shadow: 0 5px 30px #2c4b3526;
}
#world-map[hidden] {
  display: none;
}
#world-map > div {
  font-size: 9px;
  font-weight: 600;
  padding: 12px;
  color: #536c41;
}
#world-map small {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  margin-top: 5px;
  font-weight: 400;
  color: #879675;
}
#map-canvas {
  display: block;
  width: 100%;
  height: auto;
}
aside ol {
  max-height: 225px;
  overflow: auto;
  scrollbar-width: thin;
}
aside h1 {
  font-size: 26px;
}
aside .intro {
  margin-bottom: 13px;
}
#toast {
  top: 166px;
}
#world-map canvas {
  cursor: default;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  #map-toggle {
    top: 118px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    font-size: 8px;
    padding: 8px 12px;
  }
  #objective-status {
    top: 156px;
    left: 12px;
    right: 12px;
    max-width: none;
    padding: 9px 12px;
    gap: 10px;
  }
  #objective-status b {
    font-size: 9px;
  }
  #objective-status small {
    font-size: 8px;
    margin-top: 2px;
  }
  #objective-arrow {
    font-size: 18px;
  }
  #objective-distance {
    font-size: 10px;
  }
  #toast {
    top: 218px;
  }
  #world-map {
    right: 12px;
    top: 217px;
    bottom: auto;
    width: 210px;
  }
  body.tasks-open aside {
    top: 218px;
    max-height: calc(100dvh - 410px);
  }
  body.tasks-open aside ol {
    max-height: none;
  }
  #dialog {
    z-index: 10;
  }
  aside h1 {
    display: none;
  }
}
@media (max-height: 520px) and (max-width: 950px) {
  #objective-status {
    top: 139px;
    width: 260px;
    right: auto;
  }
  #toast {
    top: 50px;
  }
  #world-map {
    top: 55px;
    width: 200px;
  }
  body.tasks-open aside {
    top: 173px;
    max-height: calc(100dvh - 190px);
  }
}

#trolley-alert {
  position: absolute;
  top: 155px;
  left: 330px;
  width: 340px;
  padding: 14px 17px;
  background: #f4dfacfa;
  border: 2px solid #bc7350;
  border-radius: 10px;
  z-index: 6;
  box-shadow: 0 5px 30px #6b432830;
  pointer-events: none;
}
#trolley-alert[hidden] {
  display: none;
}
#trolley-alert > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #8d432a;
}
#trolley-alert b {
  font-size: 13px;
  letter-spacing: 1px;
}
#trolley-alert strong {
  font-size: 24px;
}
#trolley-alert > span {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: #6e4c31;
}
#trolley-alert small {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  margin-top: 6px;
  color: #8b704c;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  #trolley-alert {
    top: 217px;
    left: 12px;
    right: 12px;
    width: auto;
    padding: 10px 13px;
  }
  #trolley-alert b {
    font-size: 11px;
  }
  #trolley-alert strong {
    font-size: 22px;
  }
  #trolley-alert small {
    font-size: 9px;
  }
  body:has(#trolley-alert:not([hidden])) #toast {
    top: 340px;
  }
}
@media (max-height: 520px) and (max-width: 950px) {
  #trolley-alert {
    top: 55px;
    left: auto;
    width: 280px;
    right: 12px;
  }
  body:has(#trolley-alert:not([hidden])) #toast {
    top: 185px;
  }
}

#objective-status {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 5px 7px;
  text-shadow:
    0 1px 2px #f8f8e8,
    0 0 5px #f8f8e8;
}
#objective-status > div {
  min-width: 0;
}
#objective-status b {
  color: #29462f;
}
#objective-status small {
  color: #49633b;
}
.trolley-choices {
  display: block !important;
  margin-top: 8px;
  border-top: 1px solid #bd9e6955;
  padding-top: 5px;
}
.trolley-choices p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 5px 0;
  font-size: 10px;
  color: #6d4d30;
}
.trolley-choices p b {
  font-size: 9px !important;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.trolley-choices p span {
  text-align: right;
}
.trolley-active #objective-status {
  visibility: hidden;
}
.trolley-active #toast {
  opacity: 0 !important;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  #objective-status {
    top: 153px;
    left: 12px;
    right: 12px;
    max-height: 36px;
    min-height: 30px;
    padding: 2px 3px;
    gap: 8px;
  }
  #objective-status b {
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #objective-status small {
    font-size: 8px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
  }
  #objective-distance {
    flex-shrink: 0;
    margin-left: auto;
  }
  #objective-arrow {
    font-size: 16px;
    flex-shrink: 0;
  }
  #trolley-alert {
    top: 153px;
    padding: 9px 12px;
  }
  #trolley-alert small {
    font-size: 9px;
    line-height: 1.4;
    margin-top: 7px;
  }
  .trolley-choices {
    margin-top: 5px;
    padding-top: 4px;
  }
  .trolley-choices p {
    font-size: 9px;
    margin: 4px 0;
  }
  .trolley-choices p b {
    font-size: 8px !important;
    letter-spacing: 0;
  }
  #trolley-route {
    font-size: 9px !important;
  }
  #toast {
    top: 197px;
  }
  #world-map {
    top: 197px;
  }
}
@media (max-height: 520px) and (max-width: 950px) {
  #objective-status {
    top: 139px;
  }
  #trolley-alert {
    top: 55px;
    left: auto;
    right: 12px;
    width: 290px;
  }
}

#crosshair {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font: 24px monospace;
  color: #fff8dc;
  text-shadow: 0 1px 3px #182b27;
  pointer-events: none;
  z-index: 3;
}
body.first-person #crosshair {
  display: block;
}

/* Path standing: two compact meters under freshness, hidden in the collapsed phone panel. */
#standing {
  display: grid;
  gap: 9px;
  margin: 0 0 20px;
}
#standing > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 8px;
  letter-spacing: 1px;
}
#standing b {
  font-weight: 600;
}
#standing span {
  text-align: right;
  font-size: 9px;
  letter-spacing: 0.3px;
  color: #6d74a8;
}
.standing-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: #dfe4cf;
  border-radius: 9px;
  overflow: hidden;
}
.standing-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #8da45c;
  transition: width 0.3s;
}
#standing-brine .standing-bar i {
  background: #b7a46a;
}
#toast small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #6d74a8;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  aside #standing {
    display: none;
  }
  body.tasks-open aside #standing {
    display: grid;
    margin: 4px 0 14px;
  }
}

/* The finale hides the HUD and letterboxes the view around one caption line. */
#cutscene {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
body.cutscene #cutscene {
  display: block;
}
body.cutscene > :not(#game):not(#cutscene) {
  visibility: hidden;
}
#cutscene::before,
#cutscene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 9vh;
  background: #14100c;
}
#cutscene::before {
  top: 0;
}
#cutscene::after {
  bottom: 0;
}
#cutscene-caption {
  position: absolute;
  left: 50%;
  bottom: calc(9vh + 22px);
  transform: translateX(-50%);
  width: min(680px, calc(100% - 32px));
  margin: 0;
  text-align: center;
  font:
    500 17px/1.5 "Space Grotesk",
    sans-serif;
  color: #f6efd8;
  text-shadow: 0 2px 8px #000a;
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 950px) {
  #cutscene-caption {
    bottom: calc(9vh + 12px);
    font-size: 13px;
  }
}
