* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #dfe8d3;
  color: #35432e;
  font-family: monospace;
}
button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  min-width: 42px;
  min-height: 44px;
  border: 0;
  background: none;
  touch-action: manipulation;
}
button:hover {
  background: #d5debd;
}
button:focus-visible {
  outline: 3px solid #c49b47;
  outline-offset: -3px;
}
button[aria-pressed="true"],
button[aria-expanded="true"] {
  background: #d5debd;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
#stage:active {
  cursor: grabbing;
}
#world {
  display: block;
  image-rendering: pixelated;
}
#loading {
  position: absolute;
  top: 48%;
  width: 100%;
  text-align: center;
  font-size: 14px;
  text-shadow: 0 2px #fff;
}
.hud {
  background: #faf9e9ed;
  border: 2px solid #737e60;
  box-shadow: 0 3px 0 #49573a30;
  border-radius: 5px;
}
.location {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  padding: 12px 17px;
  pointer-events: none;
}
.hotel-mark {
  font: bold 9px monospace;
  letter-spacing: 2px;
  color: #899761;
}
.location h1 {
  font: bold 15px monospace;
  margin: 5px 0 7px;
}
.location #connection {
  font-size: 9px;
  color: #78865d;
}
.location #connection:before {
  content: "●";
  color: #8ca357;
  margin-right: 6px;
}
.top-controls {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  display: flex;
}
.top-controls button {
  font-size: 20px;
}
.top-controls button span {
  font-size: 12px;
}
.top-controls button + button {
  border-left: 1px solid #cbd1b9;
}
.bottom-hud {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  right: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.bottom-hud > * {
  pointer-events: auto;
}
.presence {
  font-size: 11px;
  color: #526444;
  line-height: 1.6;
  text-shadow: 0 1px #f5f9eb;
}
.presence small {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  opacity: 0.7;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #82964d;
  border-radius: 50%;
  margin-right: 6px;
}
.toolbar {
  display: flex;
  align-items: center;
  padding: 2px;
}
.toolbar button {
  padding: 0 13px;
  font-size: 16px;
}
.toolbar button span,
.toolbar #reset {
  font-size: 11px;
}
.divider {
  height: 24px;
  width: 1px;
  background: #c5cdb3;
}
.panel {
  position: fixed;
  background: #faf9e9f5;
  border: 2px solid #737e60;
  border-radius: 5px;
  box-shadow: 0 4px 0 #49573a30;
  width: 300px;
  max-width: calc(100vw - 32px);
  z-index: 2;
}
.panel[hidden] {
  display: none;
}
.panel-title {
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d1d7c1;
  font-size: 11px;
  font-weight: bold;
  min-height: 44px;
}
.panel-title button {
  font-size: 23px;
  min-width: 30px;
}
#residents {
  right: 20px;
  top: 80px;
}
#residents article {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 15px;
}
#residents article + article {
  border-top: 1px solid #e0e3d3;
}
.portrait {
  width: 45px;
  height: 58px;
  image-rendering: pixelated;
}
h2 {
  font-size: 13px;
  margin: 0 0 8px;
}
.panel p {
  font-size: 10px;
  color: #879171;
  margin: 0;
}
#chat-panel {
  right: 20px;
  bottom: 82px;
  width: 350px;
}
#chatter {
  list-style: none;
  padding: 8px 14px;
  margin: 0;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
}
#chatter li {
  padding: 8px 0;
  display: flex;
  gap: 10px;
  font-size: 11px;
  line-height: 1.5;
}
#chatter li + li {
  border-top: 1px solid #e1e4d5;
}
#chatter strong {
  color: #788f4a;
  min-width: 33px;
}
#chatter span {
  color: #59664b;
}
@media (max-width: 600px) {
  .location {
    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    padding: 9px 12px;
  }
  .location h1 {
    font-size: 13px;
  }
  .hotel-mark {
    font-size: 8px;
  }
  .top-controls {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }
  .bottom-hud {
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: center;
    gap: 9px;
  }
  .presence {
    text-align: center;
    font-size: 10px;
  }
  .presence small {
    font-size: 7px;
  }
  .toolbar {
    justify-content: center;
    width: 100%;
    max-width: 360px;
  }
  .toolbar button {
    flex: 1;
    padding: 0 9px;
  }
  .toolbar button span {
    font-size: 10px;
  }
  #chat-panel {
    right: 12px;
    bottom: 110px;
  }
  #residents {
    right: 12px;
    top: 75px;
  }
}
@media (max-width: 600px) {
  .toolbar button {
    padding: 0 6px;
    white-space: nowrap;
  }
  .toolbar #sound {
    flex: 2;
    min-width: 98px;
  }
  .toolbar #chat {
    min-width: 65px;
  }
}
