/* ============================================================
   Wadham Campus Map - reinvented
   Map first. Search to find. Explore to browse. Popups to learn.
   ============================================================ */
:root {
  --red: #C00D0D;
  --red-deep: #8e0a0a;
  --gold: #C5A777;
  --ink: #17120f;
  --muted: #5c5148;
  --soft: #8f8276;
  --glass: rgba(255, 251, 246, 0.92);
  --solid: #fffdf9;
  --line: rgba(23, 18, 15, 0.1);
  --shadow: 0 20px 50px rgba(23, 18, 15, 0.2);
  --shadow-sm: 0 6px 18px rgba(23, 18, 15, 0.12);
  --r: 20px;
  --r-sm: 12px;
  --display: "Fraunces", Georgia, serif;
  --ui: "Sora", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --g: 12px;
  --hud-w: min(440px, calc(100% - 24px));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  font-family: var(--ui);
  color: var(--ink);
  background: #1a1410;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, input, a { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

#app {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
}

.mapboxgl-ctrl-top-right { display: none; }
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  margin-bottom: calc(12px + var(--safe-bottom));
  max-width: min(180px, 42vw);
  overflow: hidden;
}

.mapboxgl-map {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.mapboxgl-canvas-container,
.mapboxgl-canvas {
  width: 100% !important;
  max-width: 100% !important;
}

.mapboxgl-popup {
  max-width: min(360px, calc(100% - 24px)) !important;
}

/* ============================================================
   HUD - search first
   ============================================================ */
.hud {
  position: absolute;
  z-index: 40;
  top: calc(var(--safe-top) + var(--g));
  left: calc(var(--g) + var(--safe-left));
  right: calc(var(--g) + var(--safe-right));
  width: auto;
  max-width: min(440px, calc(100% - (2 * var(--g)) - var(--safe-left) - var(--safe-right)));
  min-width: 0;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  animation: settle 0.55s var(--ease) both;
  box-sizing: border-box;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  border: none;
}

@keyframes settle {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hud > * {
  pointer-events: auto;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.search-bar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: var(--solid);
  border: 1px solid rgba(23, 18, 15, 0.08);
  box-shadow: var(--shadow);
}

.crest-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.crest-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.search-box > i {
  position: absolute;
  left: 12px;
  color: var(--soft);
  font-size: 0.85rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 34px 12px 36px;
  font-size: 0.95rem;
  outline: none;
}

.search-box input::placeholder { color: var(--soft); }
.search-box input::-webkit-search-cancel-button { display: none; }

.clear-btn {
  position: absolute;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(23, 18, 15, 0.06);
  color: var(--muted);
}

.explore-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.18s var(--ease);
}

.explore-btn:hover { background: var(--red); }
.explore-btn[aria-expanded="true"] {
  background: var(--red);
  box-shadow: 0 8px 20px rgba(192, 13, 13, 0.3);
}

.explore-btn:active { transform: scale(0.97); }

/* Live search results */
.search-results {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: min(52dvh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r);
  background: var(--solid);
  border: 1px solid rgba(23, 18, 15, 0.08);
  box-shadow: var(--shadow);
  padding: 8px;
  box-sizing: border-box;
}

.search-results[hidden] { display: none !important; }

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px;
  border-radius: var(--r-sm);
  text-align: left;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.result-item:hover,
.result-item.is-active {
  background: rgba(192, 13, 13, 0.08);
}

.result-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
}

.result-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-title {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
}

.result-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--soft);
  font-size: 0.88rem;
}

/* Category chips */
.chip-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-bottom: 2px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.chip-rail::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(23, 18, 15, 0.08);
  background: var(--solid);
  box-shadow: var(--shadow-sm);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.18s var(--ease);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ============================================================
   Explore panel
   ============================================================ */
.explore-panel {
  position: absolute;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(78dvh, 720px);
  display: flex;
  flex-direction: column;
  padding: 0 18px calc(18px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--solid);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-bottom: none;
  box-shadow: 0 -18px 50px rgba(23, 18, 15, 0.24);
  animation: sheetUp 0.4s var(--ease) both;
}

.explore-panel[hidden] { display: none !important; }

@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.explore-grabber {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 14px 0 8px;
  touch-action: none;
  flex-shrink: 0;
}

.explore-grabber span {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(23, 18, 15, 0.2);
}

.explore-chrome {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  background: var(--solid);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.explore-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.explore-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

.explore-title {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ghost-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(23, 18, 15, 0.06);
  color: var(--muted);
}

.explore-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.text-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0;
  text-transform: none;
}

.place-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 4px 2px 12px;
}

.place-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.place-group:first-child {
  margin-top: 0;
}

.place-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.place-section:hover {
  background: rgba(23, 18, 15, 0.04);
  color: var(--ink);
}

.place-section-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-section-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.place-section-count {
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(23, 18, 15, 0.06);
  padding: 3px 7px;
  border-radius: 999px;
}

.place-section-chevron {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 7px;
  border-color: transparent transparent transparent var(--soft);
  transition: transform 0.2s var(--ease);
}

.place-group.is-open .place-section-chevron {
  transform: rotate(90deg);
}

.place-group-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
}

.place-group-body[hidden] {
  display: none !important;
}

.place-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--r-sm);
  text-align: left;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.place-item:hover,
.place-item.is-active {
  background: rgba(192, 13, 13, 0.09);
}

.place-item.is-active {
  color: var(--red-deep);
  font-weight: 600;
}

.place-pin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
}

.place-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-status:empty { display: none; }

.place-status {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23, 18, 15, 0.06);
  color: var(--soft);
}

.place-status.is-free { background: rgba(31, 122, 63, 0.14); color: #1f7a3f; }
.place-status.is-busy { background: rgba(192, 13, 13, 0.12); color: var(--red); }

.list-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--soft);
}

/* ============================================================
   Map tools
   ============================================================ */
.map-tools {
  position: absolute;
  z-index: 30;
  left: calc(var(--g) + var(--safe-left));
  right: calc(var(--g) + var(--safe-right));
  bottom: calc(var(--g) + var(--safe-bottom) + 8px);
  width: auto;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  animation: rise 0.55s var(--ease) 0.08s both;
  box-sizing: border-box;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-dock {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--solid);
  border: 1px solid rgba(23, 18, 15, 0.08);
  box-shadow: var(--shadow-sm);
  pointer-events: auto;
  max-width: calc(100% - 54px);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  flex: 0 1 auto;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}

.view-btn:hover { color: var(--ink); }
.view-btn.is-active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(192, 13, 13, 0.32);
}

.dock-sep {
  width: 1px;
  align-self: stretch;
  margin: 7px 2px;
  background: rgba(23, 18, 15, 0.12);
  flex: 0 0 auto;
}

.boundary-toggle.is-on {
  color: var(--red);
  background: rgba(192, 13, 13, 0.12);
}

.boundary-toggle:not(.is-on) {
  color: var(--muted);
  background: transparent;
}

.tool-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--solid);
  border: 1px solid rgba(23, 18, 15, 0.08);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  pointer-events: auto;
  transition: transform 0.18s var(--ease), color 0.18s ease, background 0.18s ease;
}

.side-tools {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 8px;
  pointer-events: none;
  flex: 0 0 auto;
}

.side-tools .tool-btn { pointer-events: auto; }

.tool-btn.is-locating {
  color: var(--red);
  animation: locatingPulse 0.9s ease-in-out infinite;
}

@keyframes locatingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.tool-btn:hover {
  transform: scale(1.05);
  color: var(--red);
}

/* ============================================================
   Markers
   ============================================================ */
.marker-wrapper {
  position: relative;
  width: 32px;
  height: 48px;
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}

.marker-wrapper:hover {
  transform: translateY(-3px) scale(1.08);
  filter: drop-shadow(0 7px 8px rgba(23, 18, 15, 0.35));
}

.marker-shadow {
  position: absolute;
  top: 6px;
  left: 2px;
  width: 41px;
  height: 41px;
  opacity: 0.5;
  pointer-events: none;
}

.marker-svg { position: absolute; top: 0; left: 0; }

.availability-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: #c00;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 0 2px #fff;
}

.availability-dot.pulse {
  animation: pulseDot 1.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

.custom-tooltip {
  border-radius: 8px !important;
  font-family: var(--ui) !important;
  box-shadow: var(--shadow-sm) !important;
}

.user-location-marker {
  width: 48px;
  height: 48px;
  position: relative;
  pointer-events: none;
  z-index: 5;
}

.radar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.radar-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.25);
  border: 1px solid rgba(26, 115, 232, 0.45);
  -webkit-animation: userPulse 1.8s ease-out infinite;
  animation: userPulse 1.8s ease-out infinite;
  z-index: 1;
}

.radar-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1a73e8;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  z-index: 2;
  opacity: 0;
}

.radar-icon {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.45), 0 0 0 3px #fff;
}

.radar-icon i {
  display: block;
  line-height: 1;
}

@-webkit-keyframes userPulse {
  0% { -webkit-transform: scale(0.55); opacity: 0.85; transform: scale(0.55); }
  100% { -webkit-transform: scale(1.9); opacity: 0; transform: scale(1.9); }
}

@keyframes userPulse {
  0% { transform: scale(0.55); opacity: 0.85; }
  100% { transform: scale(1.9); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .radar-pulse {
    -webkit-animation: none;
    animation: none;
    opacity: 0.35;
  }
}

/* Status toast for location / system messages */
.status-toast {
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: calc(78px + var(--safe-bottom));
  max-width: min(360px, calc(100% - 24px));
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(23, 18, 15, 0.92);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  box-shadow: var(--shadow-sm);
  -webkit-transform: translate(-50%, 8px);
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.status-toast.is-visible {
  opacity: 1;
  -webkit-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.status-toast.is-error {
  background: rgba(142, 10, 10, 0.95);
}

.tool-btn.is-located {
  color: #1a73e8;
}

/* Popup styles live in css/popups.css */

.hidden { display: none; }
.tag-group { display: flex; flex-direction: column; margin-bottom: 2px; }

/* ============================================================
   Lightbox
   ============================================================ */
#image-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 12, 10, 0.92);
  z-index: 99999;
  justify-content: center;
  align-items: center;
}

#image-modal img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 14px;
  cursor: zoom-out;
}

#modal-close {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  color: #fff;
}

#watermark {
  position: absolute;
  z-index: 15;
  right: var(--g);
  bottom: calc(70px + var(--safe-bottom));
  width: 100px;
  opacity: 0.85;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(23, 18, 15, 0.25));
}

#watermark img { width: 100%; display: block; }

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 821px) {
  :root {
    --g: 18px;
    --hud-w: 420px;
  }

  .hud {
    left: var(--g);
    right: auto;
    width: var(--hud-w);
    max-width: var(--hud-w);
    margin-inline: 0;
    animation-name: settleLeft;
  }

  @keyframes settleLeft {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .chip-rail {
    flex-wrap: wrap;
    overflow: visible;
  }

  .explore-panel {
    left: var(--g);
    right: auto;
    top: calc(var(--safe-top) + 132px);
    bottom: var(--g);
    width: var(--hud-w);
    height: auto;
    max-height: calc(100dvh - var(--safe-top) - 150px);
    border-radius: var(--r);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    padding: 16px 18px 16px;
    animation: settleLeft 0.4s var(--ease) both;
  }

  .explore-grabber { display: none; }

  .explore-chrome {
    margin-bottom: 10px;
    padding-bottom: 14px;
  }

  .mapboxgl-ctrl-top-right {
    display: block;
    top: 120px;
    right: 12px;
  }

  .mapboxgl-ctrl-group {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
  }

  #watermark {
    bottom: var(--g);
    right: var(--g);
    width: 112px;
  }

  #app.is-explore-open .map-tools {
    left: calc(var(--hud-w) + var(--g) * 2);
  }

  #app.is-explore-open .status-toast {
    left: calc(50% + (var(--hud-w) + var(--g)) / 2);
  }
}

/* Touch phones + narrow screens: icon-only controls (Pro Max is 430px) */
@media (hover: none), (max-width: 820px) {
  .explore-btn span { display: none; }
  .explore-btn {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .view-btn {
    gap: 0;
    padding: 10px 11px;
  }

  .view-btn span { display: none; }

  .dock-sep { margin: 7px 1px; }

  .view-dock { max-width: calc(100% - 54px); }
}

html.is-compact-ui .explore-btn span,
html.is-compact-ui .view-btn span {
  display: none !important;
}

html.is-compact-ui .explore-btn {
  width: 42px;
  padding: 0;
  justify-content: center;
}

html.is-compact-ui .view-btn {
  gap: 0;
  padding: 10px 11px;
}

@media (max-width: 480px) {
  .map-tools {
    left: calc(10px + var(--safe-left));
    right: calc(10px + var(--safe-right));
  }

  .hud {
    left: calc(10px + var(--safe-left));
    right: calc(10px + var(--safe-right));
  }
}
