
:root {
  --fm-primary: #D8C178;
  --fm-primary-dark: #976429;
  --fm-accent: #744E24;
  --fm-cream: #F5EFE1;
  --fm-surface: #FAF8F2;
  --fm-text: #1E1E1E;

  font-family: system-ui, -apple-system, sans-serif;
  color: #fff;
  background: var(--fm-cream);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow: hidden;
}

#world {
  display: block;
  width: 100vw;
  height: 100dvh;
  touch-action: none;
}

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#brand {
  position: absolute;
  left: 20px;
  top: 16px;
  font-weight: 900;
  letter-spacing: .16em;
  text-shadow: 0 2px 8px #111;
}

#brand span {
  font-weight: 400;
  color: var(--fm-primary);
}

#hint {
  position: absolute;
  top: 55px;
  left: 20px;
  font-size: 12px;
  color: var(--fm-cream);
  max-width: 75vw;
  text-shadow: 0 1px 4px #222;
}

#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 25px;
  text-shadow: 0 1px 4px #0009;
}

#interact {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: #744e24ed;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

#boothPanel {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: #1e1e1eaa;
  display: grid;
  place-items: center;
  padding: 20px;
}

.panel {
  background: var(--fm-surface);
  color: var(--fm-text);
  border-radius: 18px;
  max-width: 410px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px #0008;
}

.panel h2 {
  font-size: 27px;
  margin: 10px 0;
}

.panel p {
  line-height: 1.5;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--fm-primary-dark);
}

.close {
  position: absolute;
  right: 14px;
  top: 10px;
  background: none;
  border: 0;
  font-size: 30px;
  cursor: pointer;
  color: var(--fm-accent);
}

.panel a {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 18px;
  background: var(--fm-accent);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

#loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--fm-cream);
  color: var(--fm-text);
  font-size: 18px;
  z-index: 10;
}

#mobile {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#joystick {
  position: absolute;
  left: 25px;
  bottom: 25px;
  width: 120px;
  height: 120px;
  border: 2px solid #ffffff77;
  border-radius: 50%;
  background: #ffffff20;
  pointer-events: auto;
  touch-action: none;
}

#stick {
  position: absolute;
  width: 50px;
  height: 50px;
  left: 33px;
  top: 33px;
  border-radius: 50%;
  background: #D8C178ad;
}

#touch-actions {
  position: absolute;
  right: 18px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 12px;
}

#mobileVisit {
  pointer-events: auto;
  border: 0;
  border-radius: 12px;
  background: var(--fm-primary);
  color: var(--fm-text);
  padding: 15px 18px;
  font-weight: 800;
}

#mobileVisit:disabled {
  opacity: .4;
}

#touch-actions small {
  font-size: 11px;
  background: #744e24c9;
  padding: 6px;
  border-radius: 6px;
}

@media (max-width: 720px) {
  #hint {
    font-size: 11px;
    top: 48px;
  }

  #brand {
    font-size: 14px;
  }

  #interact {
    bottom: 175px;
    max-width: 85vw;
    white-space: normal;
  }
}
