.explore-ui[hidden] {
  display: none;
}
.explore-ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  font: 13px system-ui;
  color: #f5e7cf;
}
.explore-exit {
  position: absolute;
  right: 20px;
  top: 20px;
  pointer-events: auto;
  background: #263c36ed;
  border: 1px solid #e2c99b88;
  border-radius: 6px;
  padding: 12px 16px;
  color: inherit;
  cursor: pointer;
}
.explore-help {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: max-content;
  max-width: calc(100vw - 48px);
  box-sizing: border-box;
  text-align: center;
  background: #263c36ed;
  border: 1px solid #e2c99b88;
  padding: 16px 22px;
  border-radius: 10px;
  font: 16px/1.6 system-ui;
  box-shadow: 0 6px 24px #0004;
  pointer-events: none;
}
.explore-help[hidden] {
  display: none;
}
.explore-help:not([hidden]) {
  animation: explore-help-life 3s ease both;
}
@keyframes explore-help-life {
  0% {
    opacity: 0;
  }
  10%,
  80% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(7px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .explore-help:not([hidden]) {
    animation: none;
  }
}

.explore-stick {
  display: none;
  position: absolute;
  bottom: 35px;
  left: 25px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #243d3c77;
  border: 2px solid #e0d1b999;
  touch-action: none;
  pointer-events: auto;
  align-items: center;
  justify-content: center;
}
.explore-stick span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e6cb97cc;
  border: 2px solid #fff1d1;
  pointer-events: none;
}
body.exploring canvas {
  touch-action: none;
}
body.exploring nav,
body.exploring .framing,
body.exploring footer {
  visibility: hidden;
}
body.exploring #forest-stage {
  pointer-events: auto !important;
}
body.exploring #forest-stage canvas {
  pointer-events: auto;
}
#explore-button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
}
#forest-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  visibility: hidden;
}
#forest-stage canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}
@media (pointer: coarse) {
  .explore-stick {
    display: flex;
  }
}

body.exploring #explore-button {
  visibility: hidden;
}
.contact-links #explore-button {
  font-size: 14px;
  padding: 7px 0;
  border-bottom: 1px solid #ffffff80;
  text-decoration: none;
}
.clearing-life[hidden],
.world-action[hidden] {
  display: none;
}
.clearing-life {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 22;
  font: 14px system-ui;
  color: #f9ecd4;
}
.game-clock {
  position: absolute;
  top: 24px;
  left: 24px;
  background: #263c36dc;
  padding: 9px 14px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.world-action {
  position: absolute;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  pointer-events: auto;
  background: #f0d6a2;
  color: #243d35;
  border: 1px solid #c4a675;
  border-radius: 8px;
  padding: 13px 20px;
  font: inherit;
  cursor: pointer;
  max-width: 90vw;
}
.world-notice {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  text-shadow: 0 2px 3px #162719;
  text-align: center;
}
.fetch-tools[hidden],
.fetch-aim[hidden],
.fetch-power[hidden] {
  display: none;
}
.fetch-tools {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  color: #f9ecd4;
  text-align: center;
}
.fetch-charging .fetch-tools {
  opacity: 0;
}
.fetch-charging .fetch-buttons button {
  pointer-events: none;
}
.fetch-instructions {
  margin: 0 0 8px;
  padding: 7px 12px;
  border-radius: 6px;
  background: #20342ff2;
}
.fetch-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}
.fetch-buttons button {
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  padding: 8px 11px;
  min-height: 36px;
  border: 1px solid #c6ad7caa;
  border-radius: 6px;
  background: #263c36f5;
  color: inherit;
  font: inherit;
}
.fetch-buttons .fetch-throw {
  background: #f0d6a2;
  color: #243d35;
}
.fetch-aim {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.fetch-aim-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff8e6;
  box-shadow: 0 0 0 1px #17231e, 0 1px 4px #111c;
}
.fetch-cancel {
  --cancel-light: #ffb27c9e;
  --cancel-halo: #eb795056;
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: min(100%, 560px);
  height: clamp(84px, 16dvh, 134px);
  margin-inline: auto;
  padding: 0 12px env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  background: radial-gradient(
    ellipse 54% 106% at 50% 100%,
    var(--cancel-light),
    var(--cancel-halo) 48%,
    transparent 100%
  );
  text-align: center;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
  opacity: 0;
}
.fetch-charging .fetch-cancel {
  visibility: visible;
  opacity: 1;
}
.fetch-cancel[data-armed] {
  --cancel-light: #ffd098e6;
  --cancel-halo: #ec79518c;
}
.fetch-cancel-label {
  padding: 6px 11px;
  border: 1px solid #d9ac86aa;
  border-radius: 6px;
  background: #2c241def;
  color: #fff2df;
  font: 600 13px/1.25 system-ui;
}
.fetch-cancel[data-armed] .fetch-cancel-label {
  border-color: #ffcc99;
  background: #663c26;
}
.fetch-cancel::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid #ffe1bb;
  border-bottom: 2px solid #ffe1bb;
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .fetch-cancel,
  .fetch-tools {
    transition: opacity 150ms ease-out;
  }
}
.fetch-power {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#ffba64 var(--throw-power, 0%), #20342fdd 0);
  mask-image: radial-gradient(circle, transparent 58%, #000 60%, #000 69%, transparent 71%);
}
.holding-ball .world-action {
  bottom: 121px;
}
.world-dialog {
  background: #243d35;
  color: #f3e3c7;
  border: 1px solid #ba9e72;
  border-radius: 12px;
  max-width: 90vw;
  padding: 28px;
  font: 16px system-ui;
}
.world-dialog::backdrop {
  background: #0c1919aa;
}
.world-dialog button {
  background: #e7c98f;
  color: #243d35;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  margin: 6px;
  cursor: pointer;
  font: inherit;
}
.world-dialog .dialog-close {
  float: right;
  margin: 0;
  font-size: 22px;
}
.world-dialog a {
  color: #f6d796;
}
.computer-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border-radius: 0;
  box-sizing: border-box;
}
.computer-dialog .dialog-content {
  height: calc(100% - 85px);
}
.computer-dialog iframe {
  display: block;
  width: 100%;
  height: calc(100% - 38px);
  border: 0;
  background: #eee;
  margin-bottom: 10px;
}
@media (pointer: coarse) {
  .world-action {
    bottom: 230px;
  }
  .holding-ball .world-action {
    bottom: 230px;
  }
  .fetch-tools {
    left: auto;
    right: 14px;
    bottom: 26px;
    max-width: calc(100% - 153px);
    transform: none;
  }
  .fetch-cancel {
    inset-inline-start: auto;
    width: min(560px, calc(100% - 142px));
  }
  .fetch-buttons button {
    min-height: 44px;
  }
  .world-dialog {
    padding: 18px;
  }
}
#pixel-copy {
  position: fixed;
  inset-inline: max(24px, 8%);
  bottom: 16%;
  max-width: 420px;
  z-index: 3;
  pointer-events: none;
  color: #fff0d5;
  text-shadow: 0 2px 8px #243941;
  font: clamp(18px, 2vw, 28px)/1.5 monospace;
  visibility: hidden;
}
.sound-controls[hidden] {
  display: none;
}
.sound-controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 23;
  display: flex;
  gap: 6px;
  font: 12px system-ui;
}
.sound-controls button {
  background: #263c36ed;
  color: #f4e6ca;
  border: 1px solid #c6ad7c77;
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
}
.sound-controls button[hidden] {
  display: none;
}
body.exploring .sound-controls {
  bottom: auto;
  top: 72px;
}
@media (max-width: 600px), (pointer: coarse) and (max-height: 600px) {
  @media (prefers-reduced-motion: no-preference) {
    body.exploring :is(
      .explore-exit, .explore-stick, .game-clock, .camp-introduction,
      .sound-controls, .world-action, .fetch-tools
    ) {
      transition: opacity 260ms ease;
    }
  }

  body.exploring.explore-hud-idle :is(
    .explore-exit, .explore-stick, .game-clock, .camp-introduction,
    .sound-controls, .world-action, .fetch-tools
  ):not(:focus-visible, :has(:focus-visible)) {
    opacity: 0;
  }

  /* Keep the transparent joystick available for the first movement gesture. */
  body.exploring.explore-hud-idle :is(
    .explore-exit, .camp-introduction, .sound-controls, .world-action,
    .fetch-buttons button
  ):not(:focus-visible, :has(:focus-visible)) {
    pointer-events: none;
  }
}
@media (max-width: 600px) {
  .world-notice {
    top: 110px;
    width: max-content;
    box-sizing: border-box;
  }
  .sound-controls {
    bottom: 12px;
    right: 10px;
  }
  .sound-controls button {
    padding: 8px;
  }
}

#explore-button {
  display: block;
  margin: 0 auto 18px;
  padding: 12px 32px;
  border: 1px solid #f6d99a;
  border-radius: 8px;
  color: #fff5d5;
  background: #4a6149;
  box-shadow: 0 0 18px #f6d99a66;
  animation: explore-glow 3s ease-in-out infinite alternate;
}
@keyframes explore-glow {
  to {
    box-shadow: 0 0 30px #f6d99aaa;
  }
}
@media (prefers-reduced-motion: reduce) {
  #explore-button {
    animation: none;
  }
}
.computer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 16px;
}
.computer-links a {
  color: #d9e9d0;
}
.computer-screen {
  flex: 1;
  min-height: 0;
  width: 100%;
}
.computer-screen iframe {
  width: 100%;
  height: 100%;
  min-height: 60vh;
  border: 0;
}

.computer-dialog .dialog-content {
  display: flex;
  flex-direction: column;
}

.world-dialog.arcade-dialog {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
  background: #101724;
}
.arcade-bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 10px;
  box-sizing: border-box;
}
.arcade-bar button {
  padding: 6px 12px;
  margin: 0;
}
.arcade-dialog iframe {
  display: block;
  border: 0;
  width: 100%;
  height: calc(100% - 44px);
  background: #101724;
}
body.playing-arcade .explore-ui,
body.playing-arcade .clearing-life,
body.playing-arcade .sound-controls {
  visibility: hidden;
}

/* Override scroll-written styles, but keep copy painted until its exit fade ends. */
body.exploring #contact-copy,
body.exploring #pixel-copy,
body.exploring #earth-copy,
body.exploring #welcome-copy {
  opacity: 0 !important;
  filter: blur(9px);
  visibility: hidden !important;
  pointer-events: none !important;
  transition:
    opacity 0.6s ease,
    filter 0.6s ease,
    visibility 0s 0.6s;
}
body.exploring #contact-copy #explore-button {
  visibility: inherit;
}
@media (prefers-reduced-motion: reduce) {
  body.exploring :is(#contact-copy, #pixel-copy, #earth-copy, #welcome-copy) {
    filter: none;
    transition: none;
  }
}
.world-notice:not(:empty) {
  padding: 12px 18px;
  border: 1px solid #d4bb81;
  border-radius: 8px;
  background: #20342fed;
  box-shadow: 0 5px 20px #0005;
  max-width: min(440px, 85vw);
}
.world-notice:empty {
  display: none;
}
.camp-introduction {
  position: absolute;
  top: 68px;
  left: 24px;
  pointer-events: auto;
  background: #263c36ee;
  color: #f8e5bf;
  border: 1px solid #bfa773;
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
}
.world-dialog[open] {
  animation: camp-menu-in 0.22s ease-out;
  max-height: 90dvh;
  overflow: auto;
}
.world-dialog.arcade-dialog[open] {
  max-height: 100dvh;
}
@keyframes camp-menu-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
body.exploring a,
.world-dialog a,
.contact-links a,
.secondary-links a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition:
    background-size 0.2s,
    color 0.2s;
}
body.exploring a:hover,
.world-dialog a:hover,
.contact-links a:hover,
.secondary-links a:hover {
  background-size: 100% 2px;
}
.world-dialog button:hover,
.world-dialog button:focus-visible {
  background: #ffdf9f;
  outline: 2px solid #fff0cf;
  outline-offset: 2px;
}
.world-dialog button {
  transition:
    background 0.15s,
    transform 0.15s;
  text-transform: none;
}
.world-dialog button:active {
  transform: translateY(1px);
}
.world-dialog.conversation-dialog {
  position: fixed;
  inset: auto 0 20px;
  margin: 0 auto;
  width: min(720px, 90vw);
  max-height: 40dvh;
  padding: 16px 20px;
  overflow: visible;
}
.conversation-options {
  max-height: 25dvh;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.conversation-options button {
  font-size: 14px;
  padding: 9px;
}
.paul-speech {
  position: fixed;
  z-index: 40;
  width: min(380px, calc(100vw - 32px));
  padding: 16px 35px 16px 18px;
  box-sizing: border-box;
  background: #fff0ce;
  color: #263d36;
  border: 3px solid #9d8257;
  border-radius: 18px;
  box-shadow: 0 5px 0 #503f3155;
  font: 16px/1.5 monospace;
  pointer-events: auto;
}
.paul-speech::after {
  content: "";
  position: absolute;
  bottom: -13px;
  left: 50%;
  border: 7px solid transparent;
  border-top-color: #fff0ce;
}
.paul-speech[hidden],
.world-changing[hidden] {
  display: none;
}
.speech-skip {
  position: absolute;
  right: 4px;
  bottom: 5px;
  background: transparent !important;
  color: #263d36;
  border: 0;
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.world-changing {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #12251fc9;
  display: grid;
  place-items: center;
  color: #ffebc0;
  font: 22px monospace;
  backdrop-filter: blur(3px);
}
.guide-dialog {
  width: min(850px, 90vw);
}
.guide-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
}
.guide-tabs {
  display: flex;
  flex-wrap: wrap;
}
.guide-tabs [aria-pressed="true"] {
  outline: 2px solid #fff1cc;
}
.camp-model-preview {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.menu-object {
  float: left;
  margin: 0 18px 12px 0;
}
.credits-frame {
  width: min(750px, 75vw);
  height: 65dvh;
  border: 0;
  background: #111;
}
.laptop-code {
  background: #17252e;
  padding: 20px;
  color: #a8d5ba;
  white-space: pre-wrap;
}
@media (max-width: 600px) {
  .guide-detail {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .guide-object {
    display: flex;
    justify-content: center;
  }
  .camp-model-preview {
    width: 220px;
  }
  .menu-object {
    float: none;
  }
  .paul-speech {
    font-size: 13px;
  }
  .conversation-options button {
    font-size: 12px;
    padding: 8px;
  }
  .camp-introduction {
    left: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-dialog[open] {
    animation: none;
  }
  .world-dialog button,
  body.exploring a {
    transition: none;
  }
}
.paul-speech[data-side="right"]::after {
  left: -14px;
  bottom: 30%;
  border-top-color: transparent;
  border-right-color: #fff0ce;
}
.paul-speech[data-side="left"]::after {
  left: auto;
  right: -14px;
  bottom: 30%;
  border-top-color: transparent;
  border-left-color: #fff0ce;
}
.conversation-dialog::backdrop {
  background: #0c19193b;
}
