:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: #08151a;
  color: #edf4ef;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#world.dragging {
  cursor: grabbing;
}
#walk-world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.walk-minimap {
  position: fixed;
  bottom: 18px;
  left: 18px;
  width: 224px;
  padding: 4px;
  pointer-events: none;
}
.walk-minimap[hidden] {
  display: none;
}
.walk-minimap canvas {
  display: block;
  width: 100%;
}
.walk-minimap div {
  text-align: center;
  padding-bottom: 5px;
  font-size: 11px;
  color: #edf4ef;
}
.shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  padding: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.brand h1 {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}
#render-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #f2c65c;
}
#render-indicator[data-state="ready"] {
  background: #72d49a;
}
#render-indicator[data-state="failed"] {
  background: #ee7878;
}
.brand .icon {
  display: grid;
  place-items: center;
  margin-left: auto;
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
.panel {
  pointer-events: auto;
  background: rgba(7, 21, 25, 0.82);
  border: 1px solid rgba(211, 232, 220, 0.2);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}
.controls {
  max-height: calc(100dvh - 86px);
  overflow-y: auto;
  width: min(270px, calc(100vw - 36px));
  padding: 13px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}
label,
.label {
  color: #9fb5aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}
.row {
  display: flex;
  gap: 7px;
}
input,
select {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(211, 232, 220, 0.23);
  border-radius: 3px;
  padding: 8px 9px;
  background: rgba(3, 13, 16, 0.74);
  color: #f1f7f1;
  outline: none;
}
input:focus,
select:focus {
  border-color: #77c7a7;
  box-shadow: 0 0 0 2px rgba(119, 199, 167, 0.17);
}
.icon,
.command {
  border: 1px solid rgba(211, 232, 220, 0.23);
  border-radius: 3px;
  color: #e8f2eb;
  background: rgba(10, 31, 35, 0.88);
}
.icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.icon:hover,
.command:hover {
  background: #17433f;
  border-color: #77c7a7;
}
.icon:disabled {
  opacity: 0.4;
  cursor: default;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(211, 232, 220, 0.23);
  border-radius: 3px;
  overflow: hidden;
}
.segmented button {
  padding: 7px 3px;
  border: 0;
  border-right: 1px solid rgba(211, 232, 220, 0.18);
  background: transparent;
  color: #adc1b6;
  font-size: 11px;
}
.segmented button:last-child {
  border-right: 0;
}
.segmented button[aria-pressed="true"] {
  color: #06201b;
  background: #91d8ba;
  font-weight: 750;
}
.readout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 15px;
  padding-top: 12px;
  margin-top: 13px;
  border-top: 1px solid rgba(211, 232, 220, 0.17);
}
.readout span,
.measurement > span {
  color: #9fb5aa;
  font-size: 11px;
}
.readout strong,
.measurement strong {
  overflow-wrap: anywhere;
  max-width: 155px;
  color: #edf5ef;
  font:
    600 12px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.measurement {
  display: flex;
  align-items: center;
  gap: 8px;
}
.measurement strong {
  margin-left: auto;
  min-width: 0;
}
.advanced,
.experimental {
  border-top: 1px solid rgba(211, 232, 220, 0.17);
  margin-top: 13px;
  padding-top: 12px;
}
.advanced summary,
.experimental summary {
  cursor: pointer;
  font-size: 12px;
  color: #bdd0c4;
}
.advanced .readout {
  border: 0;
  margin-top: 0;
}
.seed-field {
  margin-top: 14px;
  margin-bottom: 0;
}
.advanced summary:focus-visible,
.experimental summary:focus-visible,
button:focus-visible {
  outline: 2px solid #77c7a7;
  outline-offset: 3px;
}
kbd {
  border: 1px solid rgba(211, 232, 220, 0.25);
  border-radius: 2px;
  display: inline-block;
  padding: 3px 6px;
  color: #f4faf5;
  background: rgba(0, 0, 0, 0.18);
  font:
    12px ui-monospace,
    monospace;
}
.scale {
  position: fixed;
  bottom: 18px;
  right: 18px;
  pointer-events: none;
  padding: 8px 10px;
  background: rgba(7, 21, 25, 0.82);
  text-align: right;
  color: #d2e4d9;
  font-size: 10px;
}
#shortcuts-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(211, 232, 220, 0.25);
  border-radius: 6px;
  background: #0c2025;
  color: #edf4ef;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
#shortcuts-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dialog-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}
.shortcuts-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.5;
}
.shortcuts-table th {
  color: #9fb5aa;
  font-size: 11px;
  font-weight: 600;
}
.shortcuts-table th,
.shortcuts-table td {
  border-bottom: 1px solid rgba(211, 232, 220, 0.17);
  padding: 10px 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.shortcuts-table th:first-child,
.shortcuts-table td:first-child {
  width: 70%;
  padding-right: 14px;
}
.shortcuts-table td:last-child,
.shortcuts-table th:last-child {
  text-align: right;
}
.shortcuts-table tr:last-child td {
  border-bottom: 0;
}
.scale i {
  display: block;
  margin: 5px 0 0 auto;
  width: 100%;
  height: 4px;
  border-top: 1px solid #d2e4d9;
  border-left: 1px solid #d2e4d9;
  border-right: 1px solid #d2e4d9;
}
.map-only .shell {
  display: none;
}
.view-links {
  display: flex;
  gap: 14px;
  margin: -2px 0 15px;
  font-size: 11px;
}
.view-links a {
  color: #91d8ba;
  text-underline-offset: 3px;
}
.view-links [aria-current] {
  color: #edf5ef;
}
.globe-relief {
  margin-top: 14px;
}
.globe-help {
  color: #9fb5aa;
  font-size: 12px;
  line-height: 1.6;
}
.experimental .walk-toolbar {
  margin-top: 12px;
}
.walk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.walk-toolbar span,
.walk-controls p {
  font-size: 11px;
  color: #9fb5aa;
}
.walk-toolbar button,
.walk-controls button {
  border: 1px solid rgba(211, 232, 220, 0.23);
  border-radius: 3px;
  padding: 7px 10px;
  background: rgba(3, 13, 16, 0.74);
  color: #edf4ef;
  font-size: 11px;
}
.walk-toolbar button:disabled {
  opacity: 0.5;
  cursor: default;
}
.walk-controls {
  margin-bottom: 14px;
}
.walk-controls[hidden] {
  display: none;
}
.walk-controls input[type="range"] {
  accent-color: #91d8ba;
  min-width: 40px;
  flex: 1;
  width: 100px;
}
.walk-controls label {
  font-size: 11px;
}
.walk-active #world {
  cursor: crosshair;
}
.walk-active #world[data-walk-mouse-bound="false"],
#walk-world[data-walk-mouse-bound="false"] {
  cursor: default;
}
.globe-view .readout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 145px);
}
.globe-view .readout strong {
  min-width: 0;
  text-align: right;
}
.globe-view #status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 620px) {
  .shell {
    padding: 10px;
  }
  .controls {
    padding: 10px;
    max-height: calc(100dvh - 74px);
  }
  .scale {
    bottom: 10px;
    right: 10px;
  }
}

#toggle-controls {
  display: none;
}
.mobile-ui #toggle-controls {
  display: block;
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  z-index: 2;
}
.mobile-ui:not(.controls-expanded) .shell {
  display: none;
}
.mobile-ui .shell {
  padding: calc(max(10px, env(safe-area-inset-top)) + 54px) 10px 10px;
}
.mobile-ui .controls {
  max-height: calc(
    100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)) - 152px
  );
}
.mobile-ui #toggle-shortcuts,
.mobile-ui #experimental {
  display: none;
}
.map-tools {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom));
  right: max(10px, env(safe-area-inset-right));
  width: 158px;
  pointer-events: none;
  display: grid;
  gap: 6px;
}
.map-tools .scale {
  position: static;
}
.render-progress {
  padding: 8px 10px;
  background: rgba(7, 21, 25, 0.82);
  color: #d2e4d9;
  font-size: 10px;
}
.render-progress progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 6px;
  accent-color: #91d8ba;
}
.render-progress[data-state="failed"] {
  color: #ee7878;
}
#toggle-fullscreen {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  z-index: 2;
  width: 44px;
  height: 44px;
}
:fullscreen {
  background: #08151a;
}

.render-progress[hidden] {
  display: none;
}
#reload-viewer {
  pointer-events: auto;
  margin-top: 6px;
}

.render-progress[data-state="failed"] {
  justify-self: end;
  max-height: 40dvh;
  overflow-y: auto;
  pointer-events: auto;
}
#render-progress-label {
  overflow-wrap: anywhere;
  user-select: text;
}

#render-progress-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
