:root {
  --lsz-tabbar-height: 0px;
  --water: #07101c;
  --ink: #1c2128;
  --muted: #5a616c;
  --chrome: rgba(226, 230, 236, 0.90);
  --chrome-face:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.28) 42%, rgba(186, 194, 204, 0.22) 100%),
    rgba(214, 220, 228, 0.88);
  --chrome-border: rgba(255, 255, 255, 0.78);
  --chrome-edge: rgba(90, 100, 114, 0.28);
  --chrome-hover: rgba(255, 255, 255, 0.62);
  --chrome-inset: rgba(255, 255, 255, 0.72);
  --link: #2a4a7a;
  --link-hover: #1a355c;
  --shadow:
    0 8px 24px rgba(40, 48, 60, 0.18),
    0 0 0 1px rgba(120, 130, 142, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-family: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  background: #efe8de;
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #efe8de;
  cursor: grab;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
#stage.dragging { cursor: grabbing; }

#world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
#tile-layer {
  position: relative;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
#tile-layer img {
  position: absolute;
  display: block;
  max-width: none;
  border: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  transform-origin: 0 0;
}

.nav {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 4px 8px;
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.nav button,
.nav a.nav-bug {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 450 13px/1 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.01em;
  padding: 8px 9px;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
}
.nav button:hover,
.nav a.nav-bug:hover { color: var(--ink); background: var(--chrome-hover); }
.nav .brand {
  color: var(--ink);
  font-weight: 700;
  padding-right: 12px;
  margin-right: 2px;
}

.rail {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--chrome-border);
  background: var(--chrome-face);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  cursor: pointer;
  font: 560 20px/1 "Outfit", system-ui, sans-serif;
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--chrome-hover); }
.zoom-stack {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.zoom-stack .icon-btn {
  border-radius: 0;
  box-shadow: none;
}
.zoom-stack .icon-btn:first-child { border-radius: 10px 10px 0 0; }
.zoom-stack .icon-btn:last-child { border-radius: 0 0 10px 10px; border-top: 0; }

.status {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: min(220px, calc(100vw - 200px));
  padding: 8px 12px;
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  color: var(--muted);
  font: 450 12.5px/1.3 "Outfit", system-ui, sans-serif;
  pointer-events: none;
}

.status .attrib {
  color: var(--muted);
  font: 450 10px/1.25 "Outfit", system-ui, sans-serif;
}

.lsz-credit {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: min(200px, calc(100vw - 200px));
  padding: 6px 10px 6px 6px;
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  touch-action: manipulation;
}
.lsz-credit-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}
.lsz-credit-author:hover { color: var(--link-hover); }
.lsz-credit-photo,
.lsz-credit-author picture {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.lsz-credit-photo {
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: #c5ccd4;
}
.lsz-credit-by {
  font: 560 11.5px/1.25 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.01em;
}
@media (max-height: 420px) {
  .lsz-credit { padding: 4px 8px 4px 4px; }
  .lsz-credit-photo, .lsz-credit-author picture { width: 28px; height: 28px; flex-basis: 28px; }
}
@media (max-width: 640px) {
  .status {
    max-width: calc(50vw - 22px);
    padding: 6px 8px;
    font-size: 11.5px;
  }
  .lsz-credit {
    max-width: calc(50vw - 22px);
  }
}

.panel {
  position: fixed;
  top: max(62px, calc(env(safe-area-inset-top) + 48px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 30;
  width: min(380px, calc(100vw - 28px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  color: var(--ink);
}
.panel.hidden { display: none; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 0;
}
.panel-head h2 {
  margin: 0;
  font: 560 16px/1.2 "Outfit", system-ui, sans-serif;
  color: var(--ink);
}
#panel-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
#panel-close:hover { color: var(--ink); }
.panel-body {
  padding: 10px 14px 16px;
  font: 360 13.5px/1.55 "Outfit", system-ui, sans-serif;
  color: var(--muted);
}
.panel-body p { margin: 0 0 0.8em; }
.panel-body a { color: var(--link); }
.panel-body a:hover { color: var(--link-hover); }
.panel-body input {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--chrome-edge);
  background: var(--chrome-inset);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(40, 48, 60, 0.08);
}
.panel-body input::placeholder { color: #8a9098; }

.nav .lang-toggle {
  display: flex;
  margin-left: 4px;
  padding-left: 6px;
  border-left: 1px solid var(--chrome-edge);
  gap: 0;
}
.nav .lang-toggle button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--chrome-hover);
  box-shadow: inset 0 0 0 1px var(--chrome-edge);
}

.panel-body .search-box { margin-top: 8px; }
.panel-body .search-results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.panel-body .search-results li { margin: 0; }
.panel-body .search-results button {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 8px;
  font: 450 13.5px/1.35 "Outfit", system-ui, sans-serif;
}
.panel-body .search-results button:hover,
.panel-body .search-results button:focus-visible {
  background: var(--chrome-hover);
}
.panel-body .search-results .place-sub {
  display: block;
  color: var(--muted);
  font-weight: 360;
  font-size: 12px;
  margin-top: 2px;
}
.panel-body .lang-row,
.panel-body .about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.panel-body .chip {
  appearance: none;
  border: 1px solid var(--chrome-edge);
  background: var(--chrome-inset);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font: 450 12px/1 "Outfit", system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.panel-body .chip[aria-pressed="true"],
.panel-body .chip:hover { background: var(--chrome-hover); }
.place-links { line-height: 1.7; }

.lsz-traffic {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.lsz-vehicle,
.lsz-drone {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.45));
  overflow: visible;
}
.lsz-vehicle svg,
.lsz-drone svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.lsz-vehicle:focus-visible,
.lsz-drone:focus-visible,
.lsz-label:focus-visible {
  outline: 2px solid #2a4a7a;
  outline-offset: 2px;
  border-radius: 6px;
}

.lsz-label {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  background: var(--chrome-face);
  color: var(--ink);
  box-shadow:
    0 4px 16px rgba(40, 48, 60, 0.32),
    0 0 0 1px rgba(70, 80, 94, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  font: 700 13px/1.2 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 50% 100%;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lsz-label:hover { background: var(--chrome-hover); }
.lsz-label[hidden] { display: none; }

.lsz-card {
  position: fixed;
  top: max(62px, calc(env(safe-area-inset-top) + 48px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 32;
  width: min(304px, calc(100vw - 28px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  color: var(--ink);
}
.lsz-card.hidden { display: none; }
.lsz-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 0 16px;
}
.lsz-card-kicker {
  font: 560 10px/1 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.lsz-card-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.lsz-card-close:hover { color: var(--ink); }
.lsz-card-art {
  margin: 10px 16px 0;
  height: 118px;
  border-radius: 10px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.9), transparent 55%),
    linear-gradient(180deg, #d8dee6, #b7c0ca);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lsz-card-art svg {
  width: 148px;
  height: 100px;
  overflow: visible;
  filter: drop-shadow(0 6px 8px rgba(40, 48, 60, 0.28));
}
.lsz-card-title {
  margin: 12px 16px 0;
  font: 560 18px/1.2 "Outfit", system-ui, sans-serif;
  color: var(--ink);
}
.lsz-card-lead {
  margin: 6px 16px 0;
  font: 360 13px/1.5 "Outfit", system-ui, sans-serif;
  color: var(--muted);
}
.lsz-card-rows {
  margin: 12px 16px 0;
  padding-top: 10px;
  border-top: 1px solid var(--chrome-edge);
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 7px 10px;
  font: 360 12.5px/1.35 "Outfit", system-ui, sans-serif;
}
.lsz-card-rows dt {
  margin: 0;
  color: var(--muted);
}
.lsz-card-rows dd {
  margin: 0;
  color: var(--ink);
}

.lsz-card-fact {
  margin: 12px 16px 16px;
  padding: 10px 12px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(236,240,245,0.9));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 1px 2px rgba(40,48,60,0.06);
}
.lsz-card-fact-title {
  margin: 0 0 4px;
  font: 560 10px/1 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lsz-card-fact-body {
  margin: 0;
  font: 360 12.5px/1.5 "Outfit", system-ui, sans-serif;
  color: var(--ink);
}

.lsz-card-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 16px 16px;
  width: calc(100% - 32px);
  appearance: none;
  border: 1px solid var(--chrome-edge);
  background: var(--chrome-inset);
  color: var(--ink);
  font: 560 13px/1.2 "Outfit", system-ui, sans-serif;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  touch-action: manipulation;
}
.lsz-card-share[hidden] { display: none; }
.lsz-card-share:hover { background: var(--chrome-hover); }
.lsz-card-share svg { width: 16px; height: 16px; display: block; }


.nav-search-icon {
  width: 32px;
  min-width: 32px;
  padding: 6px !important;
  display: grid;
  place-items: center;
}
.nav-search-icon svg { width: 16px; height: 16px; }

.metro-btn { padding: 0; overflow: hidden; }
.metro-btn picture,
.metro-btn img,
.metro-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.metro-btn[aria-pressed="true"] {
  outline: 2px solid #13a034;
  outline-offset: 1px;
}

.lsz-metro {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}
.lsz-metro svg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  display: block;
}
.lsz-traffic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.lsz-metro-ui {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: visible;
}
.lsz-metro-badge {
  position: absolute;
  left: 0;
  top: 0;
  appearance: none;
  margin: 0;
  transform: translate(-50%, -50%);
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.85);
  color: #fff;
  background: #00ab39;
  font: 700 11px/18px "Outfit", system-ui, sans-serif;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}
.lsz-metro-badge:hover { filter: brightness(1.1); }
.lsz-metro-badge:focus-visible {
  outline: 2px solid #2a4a7a;
  outline-offset: 2px;
}
.lsz-metro-stop {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 8;
}
.lsz-metro-stop-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #1c1c1c;
  box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0,0,0,0.35);
}
.lsz-metro-stop.interchange .lsz-metro-stop-dot {
  width: 11px;
  height: 11px;
  border-width: 2.5px;
}
.lsz-metro-stop-name {
  font: 600 10px/1.15 "Outfit", system-ui, sans-serif;
  color: #16181c;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.28);
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.lsz-metro-stop.dots-only .lsz-metro-stop-name { display: none; }
.lsz-metro-stop[hidden] { display: none; }
.lsz-card-stops {
  margin: 10px 16px 4px;
  padding-top: 8px;
  border-top: 1px solid var(--chrome-edge);
  max-height: 188px;
  overflow: auto;
  font: 360 12px/1.45 "Outfit", system-ui, sans-serif;
  color: var(--ink);
}
.lsz-card-stops-title {
  margin: 0 0 6px;
  font: 560 10px/1 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lsz-card-stops ol {
  margin: 0;
  padding: 0 0 4px 1.2em;
}
.lsz-card-stops li { margin: 0 0 1px; }
.lsz-card-swatch {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 3px;
  vertical-align: -0.1em;
  margin-right: 0.35em;
  border: 1px solid rgba(0,0,0,0.2);
}

.lsz-district {
  font: 700 16px/1.15 "Outfit", system-ui, sans-serif;
  padding: 7px 13px;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #edf2f8 0%, #d5e0ee 100%);
  color: #153a6b;
  border: 1px solid rgba(30, 70, 120, 0.42);
  box-shadow:
    0 6px 20px rgba(30, 48, 80, 0.32),
    0 0 0 1px rgba(40, 70, 120, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  z-index: 6;
}
.lsz-district[hidden] { display: none; }
.lsz-place {
  background: linear-gradient(180deg, #f7f1e4 0%, #e7d7c0 100%);
  color: #4a3014;
  border: 1px solid rgba(130, 88, 36, 0.4);
  box-shadow:
    0 4px 16px rgba(80, 50, 24, 0.22),
    0 0 0 1px rgba(120, 80, 36, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.lsz-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(28, 33, 40, 0.28);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 16px 16px;
}
.lsz-search-overlay.hidden { display: none; }
.lsz-search-dialog {
  width: min(480px, 100%);
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 12px 14px 10px;
  color: var(--ink);
}
.lsz-search-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.lsz-search-head h2 {
  margin: 0;
  flex: 1;
  font: 560 16px/1.2 "Outfit", system-ui, sans-serif;
}
.lsz-search-kbd {
  font: 560 11px/1 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--chrome-edge);
  background: var(--chrome-inset);
  border-radius: 6px;
  padding: 3px 6px;
}
.lsz-search-overlay .search-box {
  width: 100%;
  border: 1px solid var(--chrome-edge);
  background: var(--chrome-inset);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: 360 15px/1.3 "Outfit", system-ui, sans-serif;
  outline: none;
}
.lsz-search-overlay .search-box:focus {
  border-color: rgba(42, 74, 122, 0.45);
  box-shadow: 0 0 0 3px rgba(42, 74, 122, 0.15);
}
.lsz-search-overlay .search-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: min(48vh, 420px);
  overflow: auto;
}
.lsz-search-overlay .search-results li { margin: 0; }
.lsz-search-overlay .search-results button {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 450 14px/1.3 "Outfit", system-ui, sans-serif;
}
.lsz-search-overlay .search-results button:hover,
.lsz-search-overlay .search-results button.is-active,
.lsz-search-overlay .search-results button:focus-visible {
  background: var(--chrome-hover);
  outline: none;
}
.lsz-search-overlay .search-results .place-sub {
  color: var(--muted);
  font-weight: 360;
  font-size: 12px;
}

.place-links .place-jump {
  appearance: none; border: 0; background: transparent; color: var(--link);
  font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px;
}
.place-links .place-jump:hover { color: var(--link-hover); }

.panel,
.lsz-card,
.lsz-search-overlay,
.lsz-search-dialog { touch-action: pan-y; }
input, textarea, .search-box { touch-action: auto; }

#map-loading {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 64px));
  z-index: 25;
  padding: 5px 8px;
  background: rgba(14,16,20,.82);
  color: #e8e6e1;
  font: 11px system-ui;
  border-radius: 5px;
  pointer-events: none;
}

/* Hidden on desktop; shown as a native bottom tab bar on compact screens. */
.lsz-tabbar {
  display: none;
}
.lsz-tabbar button,
.lsz-tabbar a.lsz-tabbar-bug {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  font: 560 10px/1.1 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  flex: 1 1 0;
  padding: 6px 2px 4px;
  border-radius: 10px;
}
.lsz-tabbar button svg,
.lsz-tabbar a.lsz-tabbar-bug svg { width: 20px; height: 20px; display: block; }
.lsz-tabbar button:hover,
.lsz-tabbar a.lsz-tabbar-bug:hover,
.lsz-tabbar button.is-active,
.lsz-tabbar a.lsz-tabbar-bug.is-active { color: var(--ink); background: var(--chrome-hover); }
.lsz-tabbar-lang {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0.9 1 0;
  min-width: 0;
  padding: 2px;
  border-radius: 10px;
  background: rgba(255,255,255,0.35);
  border: 1px solid var(--chrome-border);
}
.lsz-tabbar-lang button {
  flex: 1 1 0;
  padding: 7px 4px;
  font: 560 11px/1 "Outfit", system-ui, sans-serif;
  border-radius: 8px;
}
.lsz-tabbar-lang button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--chrome-hover);
}

@media (max-width: 720px) {
  :root { --lsz-tabbar-height: 58px; }

  header.nav { display: none; }

  .lsz-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 34;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
    padding: 4px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--chrome-face);
    border-top: 1px solid var(--chrome-border);
    box-shadow: 0 -8px 24px rgba(40, 48, 60, 0.12);
    backdrop-filter: blur(18px);
    touch-action: manipulation;
  }

  .status { display: none; }

  .lsz-credit {
    bottom: calc(var(--lsz-tabbar-height) + env(safe-area-inset-bottom) + 8px);
    max-width: min(150px, calc(46vw - 16px));
    padding: 3px 6px 3px 3px;
    gap: 1px;
    border-radius: 10px;
  }
  .lsz-credit-author { gap: 5px; }
  .lsz-credit-photo,
  .lsz-credit-author picture {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }
  .lsz-credit-by {
    font: 560 8.5px/1.2 "Outfit", system-ui, sans-serif;
  }

  body.lsz-card-open .lsz-credit,
  body.lsz-panel-open .lsz-credit,
  body.lsz-share-open .lsz-credit {
    opacity: 0;
    pointer-events: none;
  }

  #map-loading {
    bottom: calc(var(--lsz-tabbar-height) + env(safe-area-inset-bottom) + 8px) !important;
  }

  .lsz-card {
    top: auto;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--lsz-tabbar-height) + env(safe-area-inset-bottom) + 8px);
    width: auto;
    max-width: none;
    max-height: min(58vh, calc(100dvh - var(--lsz-tabbar-height) - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 24px));
    border-radius: 16px;
    z-index: 32;
    will-change: transform;
  }
  .lsz-card-head { position: relative; padding-top: 18px; }
  .lsz-card-head::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: rgba(90, 100, 114, 0.35);
  }
  .lsz-card-art { height: 84px; margin-top: 8px; }
  .lsz-card-art svg { width: 120px; height: 80px; }
  .lsz-card-title { font-size: 16px; margin-top: 8px; }
  .lsz-card-fact { margin-bottom: 12px; }

  .panel {
    top: auto;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--lsz-tabbar-height) + env(safe-area-inset-bottom) + 8px);
    width: auto;
    max-height: min(62vh, calc(100dvh - var(--lsz-tabbar-height) - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 24px));
    z-index: 33;
  }

  .lsz-search-overlay {
    padding: 8vh 14px calc(var(--lsz-tabbar-height) + env(safe-area-inset-bottom) + 12px);
    align-items: flex-start;
  }
}

@media (max-width: 720px) and (max-height: 420px) {
  .lsz-card-art { height: 56px; }
  .lsz-card { max-height: calc(100dvh - var(--lsz-tabbar-height) - env(safe-area-inset-bottom) - 16px); }
}

.lsz-share {
  position: fixed;
  inset: 0;
  z-index: 36;
  background: transparent;
}
.lsz-share.hidden { display: none; }
.lsz-share-dialog {
  position: absolute;
  top: max(62px, calc(env(safe-area-inset-top) + 52px));
  left: max(14px, env(safe-area-inset-left));
  width: min(300px, calc(100vw - 28px));
  max-height: calc(100dvh - 80px);
  overflow: auto;
  padding: 10px 12px 14px;
  background: var(--chrome-face);
  border: 1px solid var(--chrome-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  color: var(--ink);
  touch-action: manipulation;
}
.lsz-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.lsz-share-head h2 {
  margin: 0;
  font: 560 16px/1.2 "Outfit", system-ui, sans-serif;
  color: var(--ink);
}
.lsz-share-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.lsz-share-actions button,
.lsz-share-copy-fallback {
  appearance: none;
  width: 100%;
  border: 1px solid var(--chrome-edge);
  background: var(--chrome-inset);
  color: var(--ink);
  font: 560 13px/1.2 "Outfit", system-ui, sans-serif;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
}
.lsz-share-actions button:hover,
.lsz-share-copy-fallback:hover { background: var(--chrome-hover); }
.lsz-share-actions button[data-share="system"] { margin-top: 2px; }
.lsz-share-wechat {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--chrome-edge);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.lsz-share-qr {
  width: 148px;
  height: 148px;
  padding: 6px;
  background: #fff;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(40, 48, 60, 0.08);
}
.lsz-share-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.lsz-share-hint {
  margin: 0;
  color: var(--muted);
  font: 450 11.5px/1.35 "Outfit", system-ui, sans-serif;
  text-align: center;
}
.lsz-share-copy-fallback { width: auto; min-width: 44%; padding: 7px 12px; font-size: 12px; }

@media (max-width: 720px) {
  .lsz-share { background: rgba(28, 33, 40, 0.28); }
  .lsz-share-dialog {
    top: auto;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(var(--lsz-tabbar-height) + env(safe-area-inset-bottom) + 8px);
    width: auto;
    max-height: min(70vh, calc(100dvh - var(--lsz-tabbar-height) - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 24px));
    border-radius: 16px;
  }
}

/* Map markers must not take over the touch gesture; the viewer pans/pinches,
   and a tap that did not drag still clicks through to open the card. */
.lsz-vehicle,
.lsz-drone,
.lsz-label,
.lsz-metro-badge,
.lsz-metro-stop {
  touch-action: none;
}
