:root {
  --cream: #fff7df;
  --ink: #214b45;
  --mint: #d9e6bf;
  --gold: #e9bf79;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #8ec5c4;
  color: var(--cream);
  font:
    15px/1.5 Arial,
    Helvetica,
    sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  color: inherit;
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #ffdc90;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, #143f4847, transparent 70%),
    linear-gradient(
      0deg,
      #17485136,
      transparent 25%,
      transparent 80%,
      #244b5420
    );
}
.topline {
  position: absolute;
  top: max(25px, env(safe-area-inset-top));
  left: max(4vw, env(safe-area-inset-left));
  right: max(4vw, env(safe-area-inset-right));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 12;
}
.brand {
  color: var(--cream);
  font-size: 25px;
  letter-spacing: -1.3px;
  font-weight: 900;
  text-decoration: none;
  pointer-events: auto;
}
.brand span {
  letter-spacing: 2px;
  font-size: 8px;
  vertical-align: middle;
  margin-left: 14px;
}
.local {
  font-size: 8px;
  letter-spacing: 1.8px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.local i {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #ffe19b;
}
.utility {
  position: absolute;
  right: 4vw;
  top: 75px;
  z-index: 20;
  display: flex;
  gap: 8px;
}
.utility button {
  font-size: 8px;
  letter-spacing: 1px;
  background: #204c4647;
  border: 1px solid #fff7df66;
  border-radius: 5px;
  padding: 9px 12px;
  min-height: 36px;
  backdrop-filter: blur(8px);
}
.utility #fullscreen {
  font-size: 20px;
  padding: 3px 10px;
}
.menu {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.menu-copy {
  margin-left: 7vw;
  max-width: 85%;
  padding-top: 10px;
}
.eyebrow,
.small-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  font-weight: bold;
}
.menu h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(70px, 11vw, 170px);
  line-height: 0.95;
  letter-spacing: -8px;
  margin: 28px 0 30px;
  text-shadow: 0 6px 40px #2a5f5b35;
}
.menu h1 span {
  display: block;
  font:
    8px/1 Arial,
    sans-serif;
  letter-spacing: 3.5px;
  margin-top: 20px;
  margin-left: 5px;
}
.menu-copy > p {
  font:
    italic clamp(19px, 2.3vw, 33px) / 1.3 Georgia,
    serif;
  color: #fff1d5;
  margin: 0 0 27px;
}
.menu-actions {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  max-width: 640px;
  pointer-events: auto;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--cream);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  padding: 18px 24px;
  min-height: 54px;
  border-radius: 3px;
  box-shadow: 0 5px 24px #154f4820;
}
.primary span {
  font-size: 22px;
  font-weight: 400;
}
.primary:hover {
  background: #ffdfa2;
}
.quiet {
  background: transparent;
  border-bottom: 1px solid #f8f4d888;
  padding: 12px 0;
  letter-spacing: 1.5px;
  font-size: 9px;
  min-height: 44px;
}
.quiet span {
  margin-left: 20px;
}
.menu-copy > small {
  display: block;
  margin-top: 20px;
  font-size: 9px;
  color: #f4f2d6cb;
  letter-spacing: 0.6px;
}
.menu-note {
  position: absolute;
  right: 7vw;
  bottom: 20%;
  text-align: right;
}
.menu-note > span {
  font-size: 8px;
  letter-spacing: 2px;
}
.menu-note strong {
  display: block;
  font:
    italic 26px/1.1 Georgia,
    serif;
  margin-top: 12px;
}
.menu-note i {
  display: block;
  font-style: normal;
  font-size: 55px;
  font-weight: 100;
  margin-top: 12px;
}
.menu-footer {
  position: absolute;
  bottom: 35px;
  left: 4vw;
  right: 4vw;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 2px;
  border-top: 1px solid #f5f2d94a;
  padding-top: 17px;
}
.loading {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: #366e6c;
  z-index: 99;
  padding: 30px;
  text-align: center;
}
.loading strong {
  font:
    72px Georgia,
    serif;
  letter-spacing: -4px;
  margin: 20px;
}
.loading p {
  max-width: 500px;
}
.loading-line {
  height: 2px;
  background: #e4d7ac;
  width: 150px;
}
.hud {
  position: absolute;
  top: 75px;
  left: 4vw;
  right: 4vw;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  text-shadow: 0 2px 5px #244f45;
  z-index: 5;
}
.health {
  display: grid;
  align-content: start;
}
.health > span {
  font-size: 27px;
  letter-spacing: 4px;
}
.health small {
  font-size: 11px;
}
.hud-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font:
    24px Georgia,
    serif;
  letter-spacing: 3px;
  text-align: center;
}
.inventory {
  text-align: right;
  position: absolute;
  right: 0;
  top: 53px;
}
.inventory div {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}
.inventory div b {
  color: #ffe295;
}
.inventory > strong {
  font-size: 24px;
  display: block;
  margin-top: 4px;
  font-weight: 500;
}
.inventory > small {
  font-size: 7px;
  letter-spacing: 2px;
}
.hud #pause {
  pointer-events: auto;
  margin-right: 250px;
  margin-top: 1px;
  align-self: flex-start;
  min-height: 36px;
  min-width: 36px;
  border: 1px solid #fff7df66;
  background: #204c4647;
  border-radius: 5px;
}
#compass {
  display: flex;
  justify-content: center;
  gap: 20px;
  font:
    7px Arial,
    sans-serif;
  letter-spacing: 1px;
  margin-top: 12px;
}
#compass span {
  display: grid;
  gap: 5px;
  justify-items: center;
}
#compass i {
  font: 17px Arial;
  display: block;
  width: 16px;
  font-style: normal;
}
.exploration {
  position: absolute;
  left: 4vw;
  right: 4vw;
  bottom: 26px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  pointer-events: none;
}
.exploration p {
  font:
    italic 17px Georgia,
    serif;
  max-width: 290px;
  margin: 7px 0;
}
.exploration small {
  font-size: 9px;
  color: #f1efd3;
}
.exploration canvas {
  width: 110px;
  height: 110px;
}
.toast {
  position: absolute;
  left: 50%;
  top: 23%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 8px #264e47;
  max-width: 90%;
  width: 650px;
  z-index: 10;
}
.toast-mark {
  font-size: 25px;
  display: block;
  color: #ffe2a4;
}
.toast strong {
  font-size: 15px;
  letter-spacing: 2px;
  display: block;
}
.toast p {
  font:
    italic 18px/1.4 Georgia,
    serif;
  margin: 8px 0;
}
.interact-prompt {
  position: absolute;
  bottom: 155px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.5px;
  background: #204b4680;
  padding: 7px 14px;
  border-radius: 5px;
  pointer-events: none;
  max-width: 90%;
}
.interact-prompt:empty {
  display: none;
}
.controls {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: max(4vw, env(safe-area-inset-left));
  right: max(4vw, env(safe-area-inset-right));
  pointer-events: none;
  z-index: 11;
}
.joystick,
.action-controls {
  display: none;
}
.desktop-hint {
  display: block;
  text-align: center;
  font-size: 8px;
  letter-spacing: 1.1px;
  opacity: 0.8;
  padding: 15px 140px 0 300px;
}
.panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #173e3dcf;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 75px 24px 35px;
  overflow-y: auto;
}
.panel h2 {
  font:
    italic clamp(35px, 5.5vw, 80px) / 1.1 Georgia,
    serif;
  letter-spacing: -2px;
  margin: 16px 0;
}
.panel > p {
  max-width: 600px;
  color: #e0e9ce;
  font-size: 15px;
  margin: 12px 0 24px;
}
.panel .primary {
  margin-top: 18px;
}
.panel .quiet {
  margin-top: 15px;
}
.secondary {
  display: flex;
  gap: 25px;
  margin-top: 20px;
}
.secondary button {
  background: none;
  font-size: 10px;
  letter-spacing: 1.2px;
  min-height: 44px;
}
.instruction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  text-align: left;
  max-width: 650px;
  margin: 12px 0;
}
.instruction-grid b {
  font-size: 9px;
  letter-spacing: 1.5px;
}
.instruction-grid p {
  font-size: 13px;
  line-height: 1.8;
  color: #e0e9ce;
}
.panel > small {
  font-size: 11px;
  line-height: 1.7;
  color: #d4dfc2;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px 40px;
  margin: 16px 0 20px;
}
.result-grid div {
  display: grid;
  gap: 5px;
}
.result-grid span {
  font-size: 8px;
  letter-spacing: 2px;
}
.result-grid b {
  font:
    30px Georgia,
    serif;
  color: #ffe2a4;
}
.portrait-note {
  display: none;
}
#debug {
  position: absolute;
  left: 10px;
  bottom: 5px;
  background: #1239;
  font-size: 12px;
  z-index: 99;
}
@media (pointer: coarse) {
  .joystick {
    display: grid;
    place-items: center;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    border: 1px solid #fff7df70;
    background: #2d61542e;
    pointer-events: auto;
    touch-action: none;
    position: relative;
    user-select: none;
  }
  .pad-lines {
    color: #fff7df50;
    font-size: 50px;
    font-weight: 100;
  }
  #stick {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff7df75;
    border: 1px solid #fff7df8a;
    pointer-events: none;
  }
  .action-controls {
    display: flex;
    gap: 12px;
    position: absolute;
    right: 0;
    bottom: 8px;
    pointer-events: auto;
  }
  .action-controls button {
    width: 62px;
    height: 62px;
    border: 1px solid #fff7df88;
    border-radius: 50%;
    background: #2b605a55;
    font-size: 9px;
    letter-spacing: 0.5px;
    touch-action: none;
    user-select: none;
  }
  .action-controls small {
    font-size: 9px;
    opacity: 0.7;
  }
  .action-controls button:active {
    background: #e4d9a5aa;
  }
  .desktop-hint {
    display: none;
  }
  .exploration {
    bottom: 158px;
  }
  .exploration canvas {
    width: 80px;
    height: 80px;
  }
  .exploration p {
    font-size: 14px;
    max-width: 230px;
  }
  .interact-prompt {
    bottom: 145px;
  }
  .exploration .small-label {
    font-size: 7px;
  }
}
@media (max-width: 700px) {
  .brand span {
    display: none;
  }
  .topline {
    top: 15px;
  }
  .local {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .utility {
    top: 56px;
    right: 4vw;
    gap: 5px;
  }
  .utility button {
    font-size: 7px;
    padding: 7px 8px;
    min-height: 33px;
  }
  .menu h1 {
    font-size: 15vw;
    letter-spacing: -3.5px;
    margin: 24px 0;
  }
  .menu-copy {
    margin-left: 6vw;
  }
  .menu h1 span {
    font-size: 6px;
    letter-spacing: 1.5px;
  }
  .menu .eyebrow {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .menu-copy > p {
    font-size: 23px;
  }
  .menu-actions {
    gap: 12px;
  }
  .menu .primary {
    font-size: 9px;
    padding: 14px 18px;
    gap: 15px;
  }
  .menu-note {
    display: none;
  }
  .menu-footer {
    font-size: 6px;
    letter-spacing: 1px;
    bottom: 25px;
  }
  .hud {
    top: 100px;
  }
  .hud-title {
    font-size: 17px;
    letter-spacing: 1.5px;
  }
  .health > span {
    font-size: 23px;
    letter-spacing: 1px;
  }
  .health small {
    font-size: 9px;
    max-width: 95px;
  }
  .hud #pause {
    position: absolute;
    right: 200px;
    top: -44px;
    margin: 0;
  }
  .inventory {
    top: 0;
  }
  .inventory div {
    gap: 4px;
    font-size: 10px;
  }
  .inventory > strong {
    font-size: 21px;
  }
  .inventory small {
    font-size: 6px;
  }
  #compass {
    font-size: 6px;
    gap: 12px;
  }
  .toast {
    top: 26%;
  }
  .toast strong {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .toast p {
    font-size: 15px;
  }
  .exploration p {
    max-width: 220px;
  }
  .panel h2 {
    font-size: 43px;
  }
  .panel > p {
    font-size: 13px;
  }
  .instruction-grid {
    gap: 24px;
  }
  .instruction-grid p {
    font-size: 11px;
  }
  .panel > small {
    font-size: 10px;
  }
  .result-grid {
    gap: 20px 26px;
  }
  .result-grid b {
    font-size: 25px;
  }
}
@media (orientation: portrait) {
  .portrait-note {
    display: block;
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    text-align: center;
    font-size: 8px;
    pointer-events: none;
    opacity: 0.75;
  }
  .menu-footer {
    bottom: 35px;
  }
  .controls {
    bottom: max(35px, env(safe-area-inset-bottom));
  }
  .action-controls {
    gap: 7px;
  }
  .action-controls button {
    width: 55px;
    height: 55px;
    font-size: 8px;
  }
  .joystick {
    width: 102px;
    height: 102px;
  }
  .toast {
    top: 29%;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .menu-copy {
    padding-top: 35px;
  }
  .menu h1 {
    font-size: 65px;
    margin: 13px 0;
    letter-spacing: -4px;
  }
  .menu h1 span {
    margin-top: 9px;
  }
  .menu-copy > p {
    font-size: 20px;
    margin-bottom: 14px;
  }
  .menu .eyebrow {
    font-size: 7px;
  }
  .menu-copy > small {
    margin-top: 10px;
  }
  .menu-footer {
    display: none;
  }
  .menu-note {
    display: none;
  }
  .utility {
    top: 18px;
    right: 4vw;
  }
  .local {
    display: none;
  }
  .hud {
    top: 64px;
  }
  .hud #pause {
    margin-right: 0;
  }
  .inventory {
    top: 0;
    right: 45px;
  }
  .toast {
    top: 24%;
  }
  .exploration {
    bottom: 135px;
  }
  .exploration p {
    max-width: 200px;
    font-size: 12px;
  }
  .exploration .small-label,
  .exploration canvas {
    display: none;
  }
  .joystick {
    height: 90px;
    width: 90px;
  }
  .controls {
    bottom: 15px;
  }
  .action-controls button {
    width: 52px;
    height: 52px;
  }
  .interact-prompt {
    bottom: 80px;
  }
  .panel {
    padding: 20px;
    justify-content: flex-start;
  }
  .panel h2 {
    font-size: 35px;
    margin: 8px;
  }
  .panel > p {
    margin: 7px 0 12px;
  }
  .panel .primary {
    margin-top: 8px;
    padding: 12px 20px;
    min-height: 44px;
  }
  .result-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 10px;
  }
  .result-grid b {
    font-size: 23px;
  }
  .result-grid span {
    font-size: 7px;
  }
  .instruction-grid {
    margin: 0;
    gap: 35px;
  }
  .instruction-grid p {
    font-size: 11px;
  }
  .panel .quiet {
    margin-top: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

#camera-view {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  padding: 12px 16px;
  min-height: 44px;
  border: 1px solid #ffffff65;
  border-radius: 24px;
  background: #143f43dc;
  color: #fff5da;
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
}
@media (max-width: 600px) and (orientation: portrait) {
  #camera-view {
    bottom: calc(174px + env(safe-area-inset-bottom));
  }
}
