:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--loading);
  --ink: #293f33;
  --muted: #5e7062;
  --green: #4f7357;
  --accent: #ad7d42;
  --warning: #a65d3c;
  --paper: #f5f5ecef;
  --solid: #f5f5ec;
  --raised: #fffef7;
  --line: #35523f26;
  --selected: #50765818;
  --selected-hover: #50765826;
  --button-ink: #365c40;
  --button-line: #52785b30;
  --input-line: #51715b40;
  --primary: #4f7357;
  --primary-hover: #3f6248;
  --on-primary: #fffef6;
  --edge: #ffffff99;
  --dialog-shadow: 0 18px 70px #10281e38;
  --backdrop: #122b2045;
  --loading: #d4dfd7;
  --shadow: 0 10px 30px #102a241c;
  --hud-left: max(20px, env(safe-area-inset-left));
  --hud-right: max(20px, env(safe-area-inset-right));
  --hud-bottom: calc(20px + env(safe-area-inset-bottom));
  --hud-width: 288px;
  --hud-height: 166px;
  --travel-width: 128px;
}
:root[data-ui-theme="night"] {
  color-scheme: dark;
  --ink: #cdd6ca;
  --muted: #a3b0a5;
  --green: #a4c2a0;
  --accent: #c3a273;
  --warning: #d49b7d;
  --paper: #192621f5;
  --solid: #1b2823;
  --raised: #26352d;
  --line: #b4cbb026;
  --selected: #a4c2a016;
  --selected-hover: #a4c2a027;
  --button-ink: #b9d3b5;
  --button-line: #b4cbb037;
  --input-line: #b4cbb04d;
  --primary: #47664c;
  --primary-hover: #55785b;
  --on-primary: #dbe5d6;
  --edge: #9eb69c33;
  --shadow: 0 10px 30px #00000040;
  --dialog-shadow: 0 18px 70px #00000066;
  --backdrop: #060c0aaa;
  --loading: #17231f;
}
/* The world clock sets these surfaces, including a dialog already open at dusk. */
dialog,
#modal-content h2,
.menu-option,
.small-button,
.route-option,
.settings-row select,
.social-form input,
.add-friend input,
.hike-together select,
.toast,
.chat-compose,
.player-name,
.speech-bubble,
.placement-panel,
.arrival {
  transition: background-color 0.35s ease, color 0.35s ease,
    border-color 0.35s ease;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
option {
  background: var(--raised);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.43;
  cursor: default;
}
button:focus,
input:focus,
textarea:focus,
select:focus,
dialog:focus,
[tabindex]:focus {
  outline: none;
}
html[data-input-mode="keyboard"]
  :is(button, input, textarea, select, a[href]):focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
#modal-title:focus,
#modal-title:focus-visible {
  outline: none;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button,
select,
a {
  touch-action: manipulation;
}
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: pan-y;
}
svg,
img,
canvas {
  -webkit-user-drag: none;
}
@media (pointer: coarse) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}
[hidden] {
  display: none !important;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
#game {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 360px;
  overflow: hidden;
  isolation: isolate;
}
#world {
  position: absolute;
  inset: 0;
  touch-action: none;
}
#world canvas {
  display: block;
  outline: none;
  cursor: grab;
}
#world canvas:active {
  cursor: grabbing;
}
.vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    #18382b0a,
    transparent 23%,
    transparent 75%,
    #18312816
  );
}
.field-kit {
  position: absolute;
  z-index: 4;
  left: var(--hud-left);
  bottom: var(--hud-bottom);
  width: var(--hud-width);
  border: 1px solid #ffffffb3;
  border-radius: 12px;
  background: var(--paper);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.kit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: 7px 7px 4px 13px;
}
.trail-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.trail-heading > .icon {
  width: 25px;
  height: 25px;
  color: var(--green);
}
.trail-heading strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.trail-heading small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.menu-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  border-radius: 7px;
  background: none;
  font-size: 9px;
}
.menu-button .icon {
  width: 18px;
  height: 18px;
}
.menu-button:hover,
.actions > button:hover {
  background: var(--selected);
}
.kit-energy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px 7px;
}
.need {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.need > .icon {
  width: 16px;
  height: 16px;
  color: var(--green);
}
.need-track {
  display: block;
  height: 4px;
  flex: 1;
  min-width: 30px;
  overflow: hidden;
  border-radius: 3px;
  background: #54705b20;
}
.need-track > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
  transition: width 0.3s ease;
}
#energy-value {
  min-width: 22px;
  text-align: right;
}
.need.low {
  color: var(--warning);
}
.need.low > .icon {
  color: var(--warning);
}
.need.low .need-track > span {
  background: var(--warning);
}
.lamp-indicator {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.kit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 13px 9px;
  min-height: 26px;
  color: var(--muted);
  font-size: 10px;
}
.environment-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.environment-status .icon {
  width: 14px;
  height: 14px;
  color: var(--green);
}
.compass {
  display: flex;
  align-items: center;
  gap: 3px;
}
.compass .icon {
  width: 13px;
  height: 13px;
}
.compass b {
  min-width: 16px;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}
.actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-top: 1px solid var(--line);
}
.actions > button {
  flex: 1;
  min-width: 44px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 7px;
  background: none;
  font-size: 10px;
}
.actions > button .icon {
  width: 21px;
  height: 21px;
}
.actions > button[aria-pressed="true"] {
  background: var(--selected);
  color: var(--green);
  box-shadow: inset 0 0 0 1px #4f735733;
}
.journey-button {
  position: absolute;
  z-index: 4;
  right: var(--hud-right);
  bottom: var(--hud-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: var(--travel-width);
  height: 64px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ffffffb3;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}
.journey-button .icon {
  color: var(--green);
  width: 24px;
  height: 24px;
}
.journey-button:hover {
  background: var(--raised);
}
.interaction {
  position: absolute;
  z-index: 5;
  right: var(--hud-right);
  bottom: calc(var(--hud-bottom) + 80px);
}
.interaction button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid #ffffffb3;
  box-shadow: var(--shadow);
  font-size: 12px;
}
.interaction .icon {
  width: 18px;
  height: 18px;
  color: var(--green);
}
.key {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  color: var(--muted);
}
.control-hint {
  position: absolute;
  right: var(--hud-right);
  bottom: calc(var(--hud-bottom) + 84px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 10px;
  color: #fffef3;
  text-shadow: 0 1px 4px #183428;
  pointer-events: none;
  transition: opacity 0.5s;
}
.control-hint.dismissed {
  opacity: 0;
}
.interaction:not([hidden]) ~ .control-hint,
.placement-panel:not([hidden]) ~ .control-hint,
.arrival:not([hidden]) ~ .control-hint {
  display: none;
}
.toast {
  position: absolute;
  z-index: 12;
  top: max(20px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  border-radius: 9px;
  padding: 10px 16px;
  background: var(--solid);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}
.joystick {
  display: none;
  position: absolute;
  z-index: 3;
  left: calc(var(--hud-left) + 10px);
  bottom: calc(var(--hud-bottom) + var(--hud-height) + 18px);
  width: 88px;
  height: 88px;
  border: 1px solid #fff8;
  border-radius: 50%;
  background: #f4f6e91f;
  touch-action: none;
}
.joystick:before,
.joystick:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 24%;
  width: 52%;
  height: 1px;
  background: #fff4;
}
.joystick:after {
  transform: rotate(90deg);
}
#joystick-thumb {
  position: absolute;
  left: 26px;
  top: 26px;
  width: 34px;
  height: 34px;
  border: 1px solid #fffc;
  border-radius: 50%;
  background: #f6f5e9bb;
  box-shadow: 0 2px 10px #28453818;
}
.loading,
.fallback {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: var(--loading);
  color: var(--green);
  font-size: 12px;
}
.loading {
  transition: opacity 0.45s;
}
.loading.done {
  opacity: 0;
  pointer-events: none;
}
.loading > .icon {
  width: 40px;
  height: 40px;
}
.fallback button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 7px;
  background: var(--solid);
}
/* A field drawer holds detailed tools; only a return confirmation is centered. */
dialog {
  position: fixed;
  inset: auto auto var(--hud-bottom) var(--hud-left);
  margin: 0;
  width: 366px;
  max-width: calc(100vw - 40px);
  max-height: calc(100svh - 40px);
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 25px 24px 23px;
  background: var(--solid);
  color: var(--ink);
  box-shadow: var(--dialog-shadow);
}
#modal-content {
  max-height: calc(100svh - 92px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2px 3px;
}
#modal-content > h2,
#modal-content > section > h2 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 0;
  padding-bottom: 23px;
  background: var(--solid);
  box-shadow: 0 -8px 0 var(--solid);
}
dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(2px);
  transition: background-color 0.35s ease;
}
dialog[data-surface="confirm"] {
  inset: 0;
  margin: auto;
  width: min(410px, calc(100vw - 28px));
}
.close {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: none;
  color: var(--muted);
}
.close:hover {
  background: var(--selected);
}
.close .icon {
  width: 18px;
  height: 18px;
}
h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 23px;
  padding-right: 35px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.4px;
  font-weight: 550;
}
h2 > .icon {
  width: 23px;
  height: 23px;
  color: var(--green);
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.menu-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 16px 13px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
}
.menu-option:hover {
  background: var(--selected);
}
.menu-option > .icon {
  width: 24px;
  height: 24px;
  color: var(--green);
}
.menu-option small {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 10px;
}
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--button-line);
  border-radius: 7px;
  background: var(--selected);
  color: var(--button-ink);
  font-size: 12px;
  white-space: nowrap;
}
.small-button:hover {
  background: var(--selected-hover);
}
.primary-button {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.primary-button:hover {
  background: var(--primary-hover);
}
.dialog-footer {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.return-notice {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}
.inventory-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.inventory-row > .icon {
  width: 25px;
  height: 25px;
  color: var(--green);
}
.inventory-row > div {
  flex: 1;
  min-width: 0;
}
.inventory-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.bag-energy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -3px 0 22px;
  color: var(--green);
  font-size: 13px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.settings-row select {
  min-height: 44px;
  min-width: 132px;
  padding: 9px 10px;
  border: 1px solid var(--input-line);
  border-radius: 7px;
  background: var(--raised);
  color: var(--ink);
  font-size: 12px;
}
.settings-links,
.tent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.credits {
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.credits h3 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: 14px;
}
.credits p { margin: 12px 0; color: var(--muted); }
.credits ul { margin: 0; padding-left: 20px; }
.credits li + li { margin-top: 12px; }
.credits a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.credits a:hover { color: var(--green); }
.credits a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  font-size: 12px;
}
.controls span:nth-child(odd) {
  color: var(--muted);
}
.placement-panel {
  position: absolute;
  z-index: 6;
  right: var(--hud-right);
  bottom: calc(var(--hud-bottom) + 80px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 250px;
  max-width: calc(100% - 28px);
  padding: 15px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.placement-panel > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.placement-panel .small-button {
  flex: 1;
}
.resting-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.resting-status > .icon {
  width: 19px;
  height: 19px;
  color: var(--green);
}
.resting-status .small-button {
  margin-left: auto;
  padding: 8px 10px;
  min-height: 40px;
  font-size: 11px;
}
body.is-resting .actions {
  display: none;
}
body.is-resting .vignette {
  background: radial-gradient(ellipse at center, #1830230a 30%, #18302375);
}
body.is-placing .actions,
body.is-placing .journey-button {
  display: none;
}
.arrival {
  position: absolute;
  z-index: 5;
  top: max(20px, env(safe-area-inset-top));
  right: var(--hud-right);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 318px;
  max-width: calc(100% - 28px);
  padding: 18px 20px;
  border: 1px solid #d9c29a80;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.arrival > .icon {
  width: 33px;
  height: 33px;
  color: var(--accent);
}
.arrival h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 550;
  letter-spacing: -0.4px;
}
.arrival p {
  margin: 3px 0 11px;
  font-size: 12px;
  color: var(--green);
}
#arrival-stats {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.arrival > button {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  background: none;
  color: var(--muted);
  border-radius: 6px;
  font-size: 21px;
}
@media (pointer: coarse) {
  .joystick {
    display: block;
  }
  .key,
  .control-hint {
    display: none;
  }
}
@media (max-width: 760px) {
  :root {
    --hud-left: max(14px, env(safe-area-inset-left));
    --hud-right: max(14px, env(safe-area-inset-right));
    --hud-bottom: calc(16px + env(safe-area-inset-bottom));
    --hud-width: clamp(188px, calc(100vw - 144px), 280px);
    --hud-height: 154px;
    --travel-width: 96px;
  }
  .kit-header {
    min-height: 52px;
    padding: 5px 5px 3px 10px;
  }
  .trail-heading {
    gap: 7px;
  }
  .trail-heading > .icon {
    width: 23px;
    height: 23px;
  }
  .trail-heading strong {
    font-size: 13px;
  }
  .trail-heading small {
    font-size: 10px;
  }
  .kit-energy {
    padding: 0 10px 6px;
  }
  .kit-meta {
    padding: 0 10px 7px;
    min-height: 24px;
    gap: 6px;
  }
  .environment-status {
    gap: 4px;
  }
  .actions {
    padding: 4px;
    gap: 0;
  }
  .actions > button {
    min-width: 44px;
    height: 48px;
    font-size: 10px;
  }
  .journey-button {
    height: 64px;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    font-size: 11px;
  }
  .journey-button .icon {
    width: 23px;
    height: 23px;
  }
  .interaction button {
    width: var(--travel-width);
    min-height: 59px;
    padding: 8px 4px;
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
  }
  .interaction .key {
    display: none;
  }
  .control-hint {
    display: none;
  }
  .joystick {
    left: calc(var(--hud-left) + 8px);
  }
  dialog {
    inset: auto 12px calc(12px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    max-height: min(75svh, calc(100svh - 32px));
    padding: 23px 20px 20px;
    border-radius: 14px;
  }
  #modal-content {
    max-height: calc(75svh - 48px);
  }
  dialog[data-surface="confirm"] {
    inset: 0;
    width: calc(100vw - 28px);
    max-width: 410px;
  }
  .placement-panel {
    bottom: var(--hud-bottom);
    min-width: 0;
    width: min(300px, calc(100% - 28px));
  }
  body.is-placing .field-kit {
    display: none;
  }
  body.is-placing .joystick {
    bottom: calc(var(--hud-bottom) + 128px);
  }
  .arrival {
    top: max(14px, env(safe-area-inset-top));
    width: 302px;
    padding: 17px;
  }
  .arrival h1 {
    font-size: 20px;
  }
  #arrival-stats {
    gap: 10px;
  }
}
@media (max-width: 380px) {
  :root {
    --hud-left: max(12px, env(safe-area-inset-left));
    --hud-right: max(12px, env(safe-area-inset-right));
    --travel-width: 88px;
  }
  #world-weather {
    display: none;
  }
  .compass .icon {
    display: none;
  }
  .kit-meta {
    gap: 5px;
  }
  .kit-header {
    padding-left: 9px;
  }
  .menu-grid {
    gap: 7px;
  }
  .menu-option {
    min-height: 70px;
    padding: 13px 11px;
    gap: 8px;
    font-size: 12px;
  }
  .menu-option > .icon {
    width: 22px;
    height: 22px;
  }
}
@media (max-height: 500px) and (min-width: 600px) {
  :root {
    --hud-bottom: 12px;
    --hud-height: 146px;
  }
  .field-kit {
    width: 246px;
  }
  .kit-header {
    min-height: 48px;
    padding-top: 3px;
  }
  .kit-meta {
    padding-bottom: 5px;
  }
  .actions > button {
    height: 44px;
  }
  .joystick {
    left: 282px;
    bottom: var(--hud-bottom);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* Sansa's compact top utility groups, adapted to a third-person hiking HUD.
   Passive status stays above the scene; only movement and travel use thumbs. */
:root {
  --hud-top: max(12px, env(safe-area-inset-top));
  --hud-height: 0px;
}
.field-kit {
  top: var(--hud-top);
  bottom: auto;
  left: var(--hud-left);
  right: var(--hud-right);
  width: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}
.status-pill,
.actions,
.resting-status {
  pointer-events: auto;
  border: 1px solid #ffffffa8;
  background: var(--paper);
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 16px #142c2420;
}
.status-pill {
  width: 200px;
  border-radius: 18px;
  padding: 3px 0 1px;
}
.kit-header {
  min-height: 40px;
  padding: 7px 12px 3px;
}
.trail-heading {
  gap: 7px;
}
.trail-heading strong {
  font-size: 12px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trail-heading small {
  font-size: 10px;
  display: inline;
  margin-left: 6px;
}
.trail-heading > .icon {
  width: 20px;
  height: 20px;
}
.kit-energy {
  padding: 4px 12px 5px;
}
.kit-meta {
  padding: 0 12px 7px;
  gap: 6px;
  font-size: 10px;
}
.server-status {
  max-width: 65px;
  min-height: 30px;
}
.actions {
  flex: none;
  gap: 0;
  padding: 3px;
  border-radius: 28px;
}
.actions > button,
.actions > .menu-button {
  flex: none;
  width: 52px;
  height: 50px;
  min-width: 44px;
  border-radius: 24px;
  font-size: 10px;
  gap: 3px;
}
.actions > button .icon {
  width: 21px;
  height: 21px;
}
.travel-actions {
  position: absolute;
  z-index: 4;
  right: var(--hud-right);
  bottom: var(--hud-bottom);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.journey-button {
  position: static;
  height: 56px;
  border-radius: 28px;
  box-shadow: 0 3px 16px #142c2420;
}
#walk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: var(--travel-width);
  height: 48px;
  border: 1px solid #ffffffa8;
  border-radius: 26px;
  background: var(--paper);
  backdrop-filter: blur(12px);
  font-size: 12px;
  box-shadow: 0 3px 16px #142c2420;
}
#walk[aria-pressed="true"] {
  background: var(--green);
  color: var(--raised);
}
.interaction {
  bottom: calc(var(--hud-bottom) + 136px);
}
.joystick {
  bottom: calc(var(--hud-bottom) + 8px);
  left: calc(var(--hud-left) + 8px);
  width: 104px;
  height: 104px;
}
#joystick-thumb {
  left: 34px;
  top: 34px;
}
.resting-status {
  position: absolute;
  top: 102px;
  left: 0;
  border-radius: 24px;
  min-width: 200px;
  padding: 5px 7px 5px 12px;
}
body.is-resting .actions {
  display: flex;
}
body.is-placing .field-kit {
  display: flex;
}
body.is-placing .actions {
  display: none;
}
body.is-placing .status-pill {
  opacity: 0.7;
}
.placement-panel {
  bottom: var(--hud-bottom);
  border-radius: 20px;
}
.toast {
  top: calc(var(--hud-top) + 108px);
}
.arrival {
  top: calc(var(--hud-top) + 108px);
  border-radius: 20px;
}
dialog:not([data-surface="confirm"]) {
  inset: calc(var(--hud-top) + 68px) var(--hud-right) auto auto;
  bottom: auto;
  border-radius: 22px;
}
.route-option {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  margin: 6px 0;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
}
.route-option > .icon {
  color: var(--green);
}
.route-option strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
}
.route-option small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.route-option:hover {
  background: var(--selected);
}
.route-option .route-enter {
  font-size: 20px;
  color: var(--green);
}
@media (max-width: 760px) {
  :root {
    --hud-left: max(12px, env(safe-area-inset-left));
    --hud-right: max(12px, env(safe-area-inset-right));
    --hud-top: max(10px, env(safe-area-inset-top));
    --travel-width: 96px;
  }
  .field-kit {
    gap: 8px;
  }
  .status-pill {
    width: calc(100vw - 216px);
    min-width: 112px;
    max-width: 184px;
    border-radius: 17px;
  }
  .kit-header {
    padding: 7px 10px 3px;
    min-height: 36px;
  }
  .trail-heading {
    gap: 5px;
  }
  .trail-heading strong {
    font-size: 11px;
    max-width: 110px;
  }
  .trail-heading small {
    margin: 2px 0 0;
    display: block;
    font-size: 9px;
  }
  .trail-heading > .icon {
    width: 18px;
    height: 18px;
  }
  .kit-energy {
    padding: 3px 10px 4px;
    gap: 4px;
  }
  .need {
    gap: 5px;
    font-size: 10px;
  }
  .need-track {
    min-width: 16px;
  }
  .kit-meta {
    padding: 0 10px 4px;
    flex-wrap: wrap;
    gap: 0 6px;
  }
  .environment-status {
    gap: 4px;
  }
  #world-weather {
    display: none;
  }
  .compass {
    display: none;
  }
  .server-status {
    font-size: 9px;
    max-width: 64px;
    min-height: 22px;
  }
  .actions {
    padding: 3px;
    gap: 0;
    border-radius: 26px;
  }
  .actions > button,
  .actions > .menu-button {
    min-width: 44px;
    width: 44px;
    height: 48px;
    font-size: 9px;
    gap: 3px;
  }
  .actions > button .icon {
    width: 20px;
    height: 20px;
  }
  .journey-button {
    height: 52px;
    gap: 6px;
    padding: 8px;
    font-size: 11px;
    flex-direction: row;
  }
  #walk {
    height: 46px;
    font-size: 11px;
  }
  .journey-button .icon {
    width: 21px;
    height: 21px;
  }
  .joystick {
    bottom: calc(var(--hud-bottom) + 7px);
  }
  dialog:not([data-surface="confirm"]) {
    inset: auto var(--hud-right) max(12px, env(safe-area-inset-bottom))
      var(--hud-left);
    width: auto;
    max-width: none;
    max-height: calc(100svh - 100px);
  }
  .chat-compose {
    top: calc(var(--hud-top) + 110px);
    bottom: auto;
  }
  .resting-status {
    top: 112px;
    min-width: 188px;
  }
  body.is-placing .field-kit {
    display: flex;
  }
}
@media (max-width: 350px) {
  .status-pill .server-status {
    display: none;
  }
  .trail-heading > .icon {
    display: none;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .status-pill {
    width: 190px;
  }
  .kit-header {
    min-height: 32px;
  }
  .kit-meta {
    padding-bottom: 3px;
  }
  .resting-status {
    top: 94px;
  }
  .toast,
  .arrival {
    top: 104px;
  }
  dialog:not([data-surface="confirm"]) {
    top: 12px;
    bottom: 12px;
    left: auto;
    width: 340px;
    max-height: calc(100svh - 24px);
  }
  .joystick {
    width: 88px;
    height: 88px;
  }
  #joystick-thumb {
    left: 26px;
    top: 26px;
  }
}

/* Unboxed HUD: the landscape remains visible through every persistent control. */
:root {
  --hud-ink: #fffef4;
  --hud-soft: #f4f2e2;
  --hud-shadow: 0 1px 2px #14251def, 0 2px 7px #14251dc0;
}
.status-pill,
.actions,
.resting-status,
.journey-button,
#walk,
.interaction button,
.joystick,
#joystick-thumb {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.field-kit,
.travel-actions,
.interaction {
  color: var(--hud-ink);
  text-shadow: var(--hud-shadow);
}
.status-pill .icon,
.trail-heading > .icon,
.status-pill small,
.kit-meta,
.kit-meta .icon,
.field-kit .server-status,
.journey-button,
.journey-button .icon,
.interaction .icon,
.interaction .key,
.resting-status > .icon,
.need > .icon {
  color: var(--hud-ink);
}
.actions .icon,
.journey-button .icon,
#walk .icon,
.interaction .icon,
.status-pill .icon {
  filter: drop-shadow(0 1px 2px #172d24d9);
}
.actions > button,
#walk,
.journey-button,
.interaction button,
.resting-status .small-button {
  color: var(--hud-ink);
  text-shadow: var(--hud-shadow);
  background: transparent;
}
.actions > button:hover,
.actions > button[aria-pressed="true"],
.journey-button:hover,
#walk:hover,
#walk[aria-pressed="true"] {
  background: transparent;
  box-shadow: none;
  color: #ffe0a2;
}
#walk[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.need-track {
  background: #1a30234d;
  box-shadow: 0 0 2px #1a302366;
}
.need-track > span {
  background: var(--hud-ink);
  box-shadow: 0 1px 3px #13271999;
}
.need.low,
.need.low > .icon {
  color: #ffc48e;
}
.need.low .need-track > span {
  background: #ffc48e;
}
.status-pill .lamp-indicator {
  color: #ffe0a2;
}
.field-kit .server-status i {
  background: #fffef4;
  box-shadow: 0 0 3px #172d24;
}
.field-kit .server-status[data-status="offline"] i {
  background: #ffc48e;
}
.joystick {
  border: 1px solid #fffef477;
}
.joystick:before,
.joystick:after {
  background: #fffef459;
}
#joystick-thumb {
  border: 1px solid #fffef4d9;
  box-shadow: 0 1px 5px #172d2466;
}
.field-kit :focus-visible,
.travel-actions :focus-visible,
.interaction :focus-visible {
  outline-color: var(--hud-ink);
}
.resting-status .small-button {
  min-height: 44px;
  border: 1px solid #fff8;
}
body.is-seated .interaction {
  bottom: calc(var(--hud-bottom) + 76px);
}

.photo-mode .field-kit, .photo-mode .travel-actions, .photo-mode .interaction,
.photo-mode .joystick, .photo-mode .control-hint, .photo-mode .player-labels { visibility: hidden; }
.photo-controls { position: fixed; z-index: 15; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 14px; padding: 10px 14px; border-radius: 16px; background: rgba(28, 47, 37, .9); color: #fffaf0; }
.postcard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.postcard-grid figure { margin: 0; }
.postcard-grid img { width: 100%; height: auto; border-radius: 8px; }
.postcard-grid figcaption { font-size: 12px; margin-top: 5px; }
.photo-controls button { color: #fffaf0; }
.photo-controls .small-button { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.photo-controls .small-button:hover { background: var(--primary-hover); }

#control-hint { display: flex; bottom: auto; top: 118px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 40px); pointer-events: none; }
#control-hint.dismissed { opacity: 0; visibility: hidden; }
@media (max-width: 760px) { #control-hint { top: 122px; font-size: 11px; gap: 14px; } }

/* A single visual anchor: conditions first, then place and energy. */
.field-kit { gap: 24px; }
.status-pill { width: 232px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.status-pill .environment-status { display: flex; align-items: center; justify-content: flex-start; gap: 16px; min-height: 68px; padding: 0; color: var(--hud-ink); }
#world-time { display: block; font-size: 52px; font-weight: 400; line-height: 1; letter-spacing: -2.5px; font-variant-numeric: tabular-nums; }
.weather-detail { min-width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.weather-detail .icon { width: 36px; height: 36px; stroke-width: 1.35; }
#world-weather { display: block; font-size: 11px; line-height: 1.2; font-weight: 500; letter-spacing: .15px; }
.status-pill .kit-header { display: block; min-height: 0; margin-top: 3px; padding: 0; }
.status-pill .trail-heading { gap: 7px; width: 100%; }
.status-pill .trail-heading > .icon { display: block; width: 16px; height: 16px; }
.place-details { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.status-pill .trail-heading strong { display: block; min-width: 0; max-width: 142px; font-size: 13px; font-weight: 500; letter-spacing: .1px; line-height: 1.5; }
.status-pill .trail-heading small { display: block; flex-shrink: 0; margin: 0; font-size: 10px; line-height: 1.5; }
.status-pill .kit-energy { padding: 0; margin-top: 4px; max-width: 192px; gap: 6px; }
.status-pill .need { gap: 7px; font-size: 10px; }
.status-pill .need > .icon, .status-pill .lamp-indicator { width: 14px; height: 14px; }
.status-pill .need-track { height: 3px; min-width: 48px; }
.hud-tools { pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.hud-tools .actions { pointer-events: auto; display: grid; grid-template-columns: repeat(4,48px); flex: none; gap: 6px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.hud-tools .actions > button { width: 48px; min-width: 44px; height: 48px; padding: 3px 0; gap: 4px; border-radius: 8px; font-size: 10px; }
.hud-tools .actions > button .icon { width: 22px; height: 22px; }
.connection-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 32px; padding-right: 2px; color: var(--hud-soft); font-size: 10px; }
.connection-row .compass { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.connection-row .compass .icon { width: 14px; height: 14px; }
.connection-row .compass b { font-weight: 500; min-width: 16px; }
.connection-row .server-status { pointer-events: auto; display: flex; align-items: center; justify-content: flex-end; gap: 5px; width: auto; min-width: 44px; max-width: 90px; min-height: 44px; padding: 0; font-size: 10px; }
.connection-row .server-status i { width: 4px; height: 4px; }
.field-kit .resting-status { top: 134px; left: 0; min-width: 0; padding: 0; gap: 8px; border: 0; }
#control-hint { top: calc(var(--hud-top) + 148px); }
.toast, .arrival { top: calc(var(--hud-top) + 154px); }
@media (max-width:760px) {
  .field-kit { gap: 8px; }
  .status-pill { width: min(220px, calc(100vw - 144px)); }
  .status-pill .environment-status { min-height: 58px; gap: 12px; }
  #world-time { font-size: 44px; letter-spacing: -2px; }
  .weather-detail { min-width: 38px; gap: 3px; }
  .weather-detail .icon { width: 31px; height: 31px; }
  #world-weather { display: block; font-size: 10px; }
  .status-pill .trail-heading strong { max-width: 132px; font-size: 12px; }
  .status-pill .trail-heading small { font-size: 9px; }
  .place-details { gap: 7px; }
  .status-pill .kit-energy { max-width: 180px; margin-top: 4px; }
  .hud-tools .actions { grid-template-columns: repeat(2,44px); gap: 7px 8px; }
  .hud-tools .actions > button { width: 44px; height: 44px; font-size: 9px; gap: 3px; }
  .hud-tools .actions > button .icon { width: 21px; height: 21px; }
  .connection-row { gap: 6px; min-height: 30px; padding-right: 0; }
  .connection-row .server-status { max-width: 62px; font-size: 9px; min-height: 44px; }
  .connection-row .compass { font-size: 9px; gap: 2px; }
  .connection-row .compass .icon { width: 12px; height: 12px; }
  .field-kit .resting-status { top: 132px; }
  .chat-compose { top: calc(var(--hud-top) + 150px); }
  #control-hint { top: calc(var(--hud-top) + 148px); }
}
@media (max-width:350px) {
  #world-time { font-size: 40px; }
  .status-pill .environment-status { gap: 9px; }
  .weather-detail .icon { width: 29px; height: 29px; }
  .status-pill .trail-heading strong { max-width: 88px; }
}
@media (max-height:500px) and (orientation:landscape) {
  .status-pill { width: 210px; }
  .status-pill .environment-status { min-height: 45px; }
  #world-time { font-size: 38px; }
  .weather-detail .icon { width: 27px; height: 27px; }
  .status-pill .kit-header { margin-top: 3px; }
  .status-pill .kit-energy { margin-top: 3px; }
  .field-kit .resting-status { top: 98px; }
  #control-hint { top: calc(var(--hud-top) + 106px); }
  .toast, .arrival { top: calc(var(--hud-top) + 112px); }
}

/* Travel stays beside Menu; the thumb tools read Bag, Tent, Walk left to right. */
.hud-tools .actions { grid-template-columns: 52px 44px; gap: 8px; }
.hud-tools #journey { width: 52px; min-width: 52px; height: 48px; padding: 3px 0; gap: 4px; flex-direction: column; border: 0; border-radius: 8px; background: transparent; box-shadow: none; backdrop-filter: none; font-size: 9px; }
.travel-actions { flex-direction: row; gap: 8px; align-items: center; }
.travel-actions > button,
.travel-actions #walk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 48px; min-width: 48px; height: 56px; min-height: 48px; padding: 4px 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; backdrop-filter: none; color: var(--hud-ink); font-size: 10px; text-shadow: var(--hud-shadow); }
.travel-actions .icon { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px #172d24d9); }
.travel-actions #walk[aria-pressed="true"] { color: #ffe0a2; text-decoration: none; }
.interaction,
body.is-seated .interaction { bottom: calc(var(--hud-bottom) + 76px); }
body.is-placing .travel-actions { display: none; }
.nearby-chat { position: absolute; z-index: 4; left: var(--hud-left); bottom: max(calc(var(--hud-bottom) + 132px), calc(var(--chat-keyboard, 0px) + 12px)); width: min(300px, calc(100vw - 116px)); color: var(--hud-ink); text-shadow: var(--hud-shadow); background: transparent; }
#chat-log { display: grid; gap: 5px; max-height: 110px; overflow: hidden; font-size: 12px; line-height: 1.5; cursor: text; }
#chat-log > div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#chat-log b { font-weight: 600; color: #e4d5ad; }
#chat { display: flex; align-items: center; gap: 7px; min-width: 76px; min-height: 44px; padding: 5px 0; background: transparent; font-size: 11px; color: var(--hud-ink); text-shadow: var(--hud-shadow); }
#chat .icon { width: 19px; height: 19px; filter: drop-shadow(0 1px 2px #172d24d9); }
.nearby-chat:has(#chat-compose:not([hidden])) #chat { display: none; }
.nearby-chat .chat-compose { position: static; width: 100%; margin-top: 8px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.nearby-chat .chat-compose label { display: none; }
.nearby-chat .chat-compose form { gap: 4px; }
.nearby-chat .chat-compose input { width: 70px; padding: 0 5px; border-bottom: 1px solid #fff6; color: var(--hud-ink); text-shadow: var(--hud-shadow); }
.nearby-chat .chat-compose input::placeholder { color: var(--hud-soft); }
.nearby-chat .chat-compose button { color: var(--hud-ink); text-shadow: var(--hud-shadow); }
.nearby-chat .chat-compose #chat-close { min-width: 32px; }
.photo-mode .nearby-chat { visibility: hidden; }
.grid-location { position: relative; flex: 0 0 100%; min-width: 44px; min-height: 24px; height: 24px; padding: 0; text-align: left; white-space: nowrap; line-height: 24px; background: transparent; color: var(--hud-soft); text-shadow: var(--hud-shadow); font-size: 10px; font-variant-numeric: tabular-nums; }
/* Keep a 44px touch target without stretching the location text row. */
.grid-location::before { content: ""; position: absolute; inset: -10px 0; }
.status-pill .trail-heading strong { flex-shrink: 1; }
.place-details { flex: 1; flex-wrap: wrap; row-gap: 0; }
.placement-panel { width: min(260px,calc(100vw - 144px)); min-width: 0; padding: 10px; gap: 8px; border-radius: 12px; }
.placement-panel .placement-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.placement-controls .small-button { min-width: 0; padding: 7px; min-height: 44px; }
#placement-label { font-size: 12px; line-height: 1.4; }
#joystick-label { position: absolute; bottom: -17px; left: 0; width: 100%; color: var(--hud-ink); text-shadow: var(--hud-shadow); text-align: center; font-size: 10px; white-space: nowrap; }
body.is-placing .joystick { bottom: calc(var(--hud-bottom) + 7px); }
body.is-placing .nearby-chat,body.is-placing .interaction,body.is-placing #control-hint { display: none; }
.companion-status { position:absolute; top:118px; left:0; display:flex; align-items:center; gap:6px; font-size:12px; max-width:min(260px,calc(100vw - 40px)); }
.companion-status span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.companion-status .icon { width:16px; height:16px; }
.companion-status .text-action { pointer-events:auto; min-width:44px; min-height:44px; padding:0; color:inherit; text-shadow:var(--hud-shadow); }
.has-companion #control-hint { visibility:hidden; }
@media (max-height:500px) and (orientation:landscape) { .companion-status { top:98px; } }
.update-notice { position: fixed; z-index: 18; top: calc(var(--hud-top) + 136px); left: 50%; transform: translateX(-50%); width: min(360px, calc(100vw - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--edge); border-radius: 12px; background: var(--solid); color: var(--ink); box-shadow: var(--shadow); font-size: 12px; }
.update-notice > div { display: flex; align-items: center; gap: 5px; }
#update-required h2 { padding-right: 0; }
#update-required .small-button { min-width: 110px; }
@media (max-width:760px) {
  .hud-tools .actions { grid-template-columns: 52px 44px; }
  #chat-log { max-height: 90px; font-size: 11px; }
}
@media (max-height:500px) and (orientation:landscape) {
  .nearby-chat { bottom: max(calc(var(--hud-bottom) + 122px), calc(var(--chat-keyboard, 0px) + 8px)); }
  #chat-log { max-height: 42px; }
}

.loading-track { width: 100px; height: 2px; overflow: hidden; background: var(--line); }
#loading-progress { display: block; height: 100%; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .15s linear; }
@media (prefers-reduced-motion: reduce) { #loading-progress { transition: none; } }

.route-region{font-size:.72rem;font-weight:500;letter-spacing:.06em;color:var(--muted);margin:1.1rem 0 .35rem;}

/* Inspection tools stay behind Settings, separate from the normal playfield. */
#modal[data-surface="developer"] {
  inset: 0;
  margin: auto;
  width: min(880px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
}
.developer-map-toolbar { display: flex; gap: 5px; margin: 0 0 10px; }
.developer-map-toolbar button { min-width: 44px; min-height: 44px; padding: 8px 12px; }
.developer-map-toolbar #dev-back { margin-right: auto; }
.developer-map-frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #354c3b; }
#dev-map { display: block; width: 100%; height: clamp(190px, 46svh, 470px); touch-action: none; cursor: grab; }
#dev-map:active { cursor: grabbing; }
#dev-map:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.developer-map-north { position: absolute; top: 10px; right: 12px; color: #fff4dc; font-size: 12px; text-shadow: 0 1px 3px #122218; pointer-events: none; }
.developer-map-key { display: flex; gap: 15px; align-items: center; margin: 10px 0 14px; font-size: 11px; color: var(--muted); }
.developer-map-key span::before { content: ""; display: inline-block; width: 12px; height: 3px; margin-right: 5px; vertical-align: middle; background: #c39a53; }
.developer-map-key .dev-key-water::before { background: #529ca6; }
.developer-map-key .dev-key-player::before { width: 6px; height: 6px; border-radius: 50%; background: #e87556; }
.developer-map-key #dev-zoom { margin-left: auto; font-variant-numeric: tabular-nums; }
.developer-map-key #dev-zoom::before { content: none; }
.developer-destination { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.developer-destination select { min-width: 0; flex: 1; min-height: 44px; padding: 8px; border: 1px solid var(--input-line); border-radius: 7px; background: var(--raised); color: var(--ink); font: inherit; }
.developer-map-status { min-height: 16px; margin: 12px 0 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  #modal[data-surface="developer"] { width: calc(100vw - 20px); max-width: calc(100vw - 20px); padding: 18px; }
  #dev-map { height: clamp(180px, 36svh, 300px); }
  .developer-destination { gap: 6px; }
}
@media (max-height: 500px) { #dev-map { height: 150px; } }
#entrance-dialog .entry-developer-tools { display: block; min-height: 44px; margin-top: 18px; padding: 8px 0; border: 0; background: transparent; color: var(--entry-ink); font: inherit; cursor: pointer; }
