.map-searchbox input,
input,
select,
textarea {
  font-size: 16px;
}
html,
body {
  overscroll-behavior-x: none;
  touch-action: pan-x pan-y;
}
/* Sitzt jetzt im Textfluss der Kopfzeile neben dem Chat-Knopf, nicht mehr
   absolut über dem (entfallenen) Coverbild. */
.map-launcher {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: var(--surface);
  color: var(--text);
  touch-action: manipulation;
}
.map-launcher svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.map-launcher:active { transform: scale(.96); }
.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(14px);
}
.map-sheet {
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  width: min(1180px, 100%);
  height: min(900px, calc(100dvh - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: var(--e-2);
}
.map-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: var(--sp-2) var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 0;
}
.map-head-copy { min-width: 0; }
.map-head h2 { margin: 2px 0 0; font-size: var(--t-title); line-height: var(--lh-title); font-weight: 700; letter-spacing: -.02em; }
.map-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: rgba(255,255,255,.055);
  color: var(--text);
  font-size: 23px;
}
.map-panel { min-width: 0; min-height: 0; }
.map-panel[hidden],
.map-overlay[hidden] { display: none; }
.map-map-panel { display: grid; grid-template-rows: auto auto minmax(0,1fr); }
/* Fest am unteren Kartenrand: die wichtigsten Werkzeuge bleiben im Daumenbereich,
   ohne wie eine zusätzliche schwebende Karte über dem Plan zu wirken. */
.map-toolbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3) calc(var(--sp-1) + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--bg-2) 96%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 -10px 24px rgba(0,0,0,.16);
}
.map-tool {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 48px;
  padding: 0 2px;
  border: 0;
  border-radius: var(--r-ctrl);
  background: none;
  color: var(--muted);
  font-size: var(--t-micro);
  line-height: var(--lh-micro);
  font-weight: 700;
}
.map-tool span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.map-tool[aria-pressed="true"],
.map-tool.active { background: var(--surface-2); color: var(--text); }
.map-tool.map-locate.active { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.map-tool.map-private-pins { position: relative; }
.map-tool.map-share.active { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.map-tool.map-private-pins b {
  position: absolute;
  top: 2px;
  right: 18%;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: var(--r-pill);
  color: var(--bg);
  background: var(--warn);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.map-tool.map-private-pins b[hidden] { display: none; }
.map-tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.map-zoom {
  position: absolute;
  right: var(--sp-3);
  top: var(--sp-3);
  z-index: 5;
  display: grid;
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.map-zoom .map-tool {
  width: 44px;
  min-height: 44px;
  border-radius: var(--r-ctrl);
  font-size: var(--t-body);
  color: var(--text);
}
.map-zoom .map-perspective {
  gap: 1px;
  min-height: 50px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-ctrl) var(--r-ctrl);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
}
.map-zoom .map-perspective svg { width: 20px; height: 20px; }
.map-zoom .map-perspective[aria-pressed="true"] {
  background: color-mix(in srgb, var(--s-factory) 18%, transparent);
  color: var(--s-factory);
}

/* Bühnen-Spektrum als Haarlinie: dieselben sieben Farben wie Karte und Timeline */
.map-legend {
  display: flex;
  gap: 2px;
  height: 3px;
  margin: 0 var(--sp-4) var(--sp-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  flex: 0 0 auto;
}
.map-legend b { flex: 1; }

.map-searchbar {
  position: relative;
  z-index: 9;
  padding: var(--sp-2) var(--sp-4);
  background: none;
}
.map-searchbox {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-1) 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: var(--surface);
}
.map-searchbox:focus-within { border-color: var(--accent); }
.map-searchbox > svg { width: 18px; height: 18px; fill: none; stroke: var(--muted-2); stroke-width: 1.8; stroke-linecap: round; }
.map-searchbox input {
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--text);
  /* 16px verhindert den Fokus-Zoom von iOS Safari */
  font-size: 16px;
  font-weight: 500;
}
.map-searchbox input::-webkit-search-cancel-button { display: none; }
.map-searchbox input::placeholder { color: var(--muted-2); font-weight: 500; }
.map-search-clear {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: var(--r-ctrl);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 19px;
}
.map-search-clear[hidden],
.map-search-results[hidden] { display: none; }
.map-search-results {
  position: absolute;
  top: calc(100% - 3px);
  right: 11px;
  left: 11px;
  z-index: 12;
  max-height: min(360px, 48dvh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(86,223,255,.28);
  border-radius: var(--r-ctrl);
  background: rgba(7,9,15,.98);
  box-shadow: 0 18px 46px rgba(0,0,0,.68);
  overscroll-behavior: contain;
  backdrop-filter: blur(16px);
}
.map-search-result {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-ctrl);
  background: transparent;
  color: var(--text);
  text-align: left;
}
.map-search-result:hover,
.map-search-result:focus-visible { outline: 0; background: linear-gradient(105deg,rgba(86,223,255,.14),rgba(255,54,93,.08)); }
.map-search-result > span { display: grid; min-width: 0; gap: 3px; }
.map-search-result strong { overflow: hidden; font-size: var(--t-label); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.map-search-result small { overflow: hidden; color: var(--muted); font-size: var(--t-micro); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.map-search-result em { display: grid; min-width: 29px; height: 25px; place-items: center; border-radius: var(--r-ctrl); background: var(--surface-2); color: var(--muted); font-size: var(--t-micro); font-style: normal; font-weight: 700; }
.map-search-empty { padding: var(--sp-3); color: var(--muted); font-size: var(--t-label); text-align: center; }
/* (.map-sharebar entfällt: der Teilen-Knopf sitzt in der festen Werkzeugleiste.) */
.map-tool.map-share:disabled { opacity: .55; }
.map-share-copy {
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-ctrl);
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: var(--t-micro);
  line-height: var(--lh-micro);
  text-align: center;
}
.map-share-copy b { color: var(--text); }
.map-share-copy:empty { display: none; }
.map-share-panel {
  position: absolute;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 13;
  width: min(410px, calc(100% - 20px));
  max-height: calc(100% - 92px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-sizing: border-box;
  padding: var(--sp-4);
  border: 1px solid color-mix(in srgb, var(--s-factory) 40%, var(--line));
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--bg-2) 96%, transparent);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0,0,0,.58);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}
.map-share-panel[hidden] { display: none; }
.map-share-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.map-share-panel header small { display: block; color: var(--s-factory); font-size: var(--t-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.map-share-panel h3 { margin: 2px 0 0; font-size: 18px; }
.map-share-panel header button {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font: inherit;
  font-size: 21px;
}
.map-share-panel > p { margin: var(--sp-3) 0; color: var(--muted); font-size: var(--t-label); line-height: 1.45; }
.map-share-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--sp-2); }
.map-share-options button {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
}
.map-share-options button:hover,
.map-share-options button:focus-visible,
.map-share-options button[aria-pressed="true"] { border-color: var(--s-factory); background: color-mix(in srgb, var(--s-factory) 14%, var(--surface)); outline: 0; }
.map-share-options button:disabled { opacity: .45; }
.map-share-options strong { font-size: var(--t-label); }
.map-share-options span { color: var(--muted); font-size: var(--t-micro); line-height: 1.25; }
.map-share-stop {
  width: 100%;
  min-height: 44px;
  margin-top: var(--sp-3);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: var(--r-ctrl);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: #ffb2bd;
  font: inherit;
  font-size: var(--t-label);
  font-weight: 700;
}
.map-share-stop[hidden] { display: none; }
.map-compass {
  --compass-rotation: 0deg;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  width: min(340px, calc(100% - 84px));
  min-height: 82px;
  display: grid;
  grid-template-columns: 66px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  padding: 9px 38px 9px 9px;
  border: 1px solid color-mix(in srgb, var(--s-factory) 42%, var(--line));
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--bg-2) 91%, transparent);
  color: var(--text);
  box-shadow: 0 16px 36px rgba(0,0,0,.38);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}
.map-compass[hidden] { display: none; }
.map-compass-close {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--r-ctrl);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font: inherit;
  font-size: 20px;
}
.map-compass-dial {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86,223,255,.34);
  border-radius: 50%;
  background: radial-gradient(circle,rgba(86,223,255,.12),rgba(4,9,15,.42));
  box-shadow: inset 0 0 0 5px rgba(86,223,255,.035);
}
.map-compass-arrow {
  width: 48px;
  height: 48px;
  color: var(--s-factory);
  transform: rotate(var(--compass-rotation));
  transition: transform .22s ease-out;
  filter: drop-shadow(0 0 8px rgba(86,223,255,.48));
}
.map-compass-arrow svg { width: 100%; height: 100%; overflow: visible; }
.map-compass-arrow path:first-child { fill: currentColor; stroke: #effcff; stroke-width: 1.5; stroke-linejoin: round; }
.map-compass-arrow path:last-child { fill: none; stroke: rgba(5,12,20,.68); stroke-width: 2; }
.map-compass-copy { display: grid; min-width: 0; gap: 2px; }
.map-compass-copy > small { color: var(--s-factory); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.map-compass-copy > strong { overflow: hidden; font-size: 13px; line-height: 1.18; text-overflow: ellipsis; white-space: nowrap; }
.map-compass-copy > div { display: grid; gap: 1px; }
.map-compass-copy b { color: #fff; font-family: var(--mono); font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.map-compass-copy span { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.map-compass.is-arrived { border-color: color-mix(in srgb, var(--ok) 64%, var(--line)); }
.map-compass.is-arrived .map-compass-dial { border-color: var(--ok); box-shadow: 0 0 24px rgba(65,245,168,.28); }
.map-compass.is-arrived .map-compass-arrow { color: var(--ok); }
.map-world.is-navigating .map-symbol-hint { display: none; }
.map-world {
  position: relative;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  background: #10151c;
  contain: layout paint;
}
.map-world .maplibregl-canvas { touch-action: none; }
.map-world.is-perspective .map-stage-card { box-shadow: 0 10px 26px rgba(0,0,0,.44); }
/* Die Quellenangabe muss über der festen Werkzeugleiste bleiben, sonst
   verdeckt die Leiste sie — und die Attribution ist lizenzrechtlich Pflicht. */
.map-world .maplibregl-ctrl-bottom-right,
.map-world .maplibregl-ctrl-bottom-left { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
.map-world .maplibregl-ctrl-attrib { border-radius: 8px 0 0; background: color-mix(in srgb, var(--bg) 74%, transparent); color: var(--muted-2); font-size: 10px; backdrop-filter: blur(8px); }
.map-world .maplibregl-ctrl-attrib a { color: var(--muted); }
.map-world-fallback { overflow: auto; touch-action: pan-x pan-y; }
.map-world-fallback-content { min-width: 1100px; line-height: 0; }
.map-world-fallback-content img { display: block; width: 100%; height: auto; }
.map-private-pin-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 12;
  width: min(350px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg-2);
  box-shadow: var(--e-2);
  color: var(--text);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}
.map-private-pin-panel[hidden] { display: none; }
.map-private-pin-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.map-private-pin-panel header small { display: block; color: #ffba7d; font-size: 10px; font-weight: 700; letter-spacing: .85px; text-transform: uppercase; }
.map-private-pin-panel h3 { margin: 2px 0 0; font-size: 18px; }
.map-private-pin-panel header button {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  color: var(--text);
  background: rgba(255,255,255,.06);
  font: inherit;
  font-size: 18px;
}
.map-private-pin-panel > p { margin: var(--sp-2) 0 var(--sp-3); color: var(--muted); font-size: var(--t-micro); line-height: 1.45; }
.map-private-pin-types { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.map-private-pin-types button {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  color: var(--text);
  background: rgba(255,255,255,.055);
  font: inherit;
  text-align: left;
}
.map-private-pin-types button:hover,
.map-private-pin-types button:focus-visible { border-color: rgba(255,159,69,.58); outline: 0; background: rgba(255,159,69,.10); }
.map-private-pin-types button span { font-size: 17px; }
.map-private-pin-types button b { font-size: var(--t-micro); font-weight: 700; }
.map-private-pin-list { display: grid; gap: 6px; margin-top: 8px; }
.map-private-pin-empty { padding: var(--sp-2) var(--sp-1) 2px; color: var(--muted-2); font-size: var(--t-micro); text-align: center; }
.map-private-pin-entry {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: var(--r-ctrl);
  background: rgba(255,255,255,.04);
}
.map-private-pin-entry > span { min-width: 0; color: var(--muted); font-size: 10px; }
.map-private-pin-entry > span b { display: block; color: var(--text); font-size: 11px; }
.map-private-pin-entry button {
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  color: var(--text);
  background: rgba(255,255,255,.055);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
}
.map-private-pin-entry button[data-private-pin-delete] { color: #ff9ab0; }
.map-pin-divider { height: 1px; margin: 13px 0 11px; background: var(--line); }
.map-meetup-head small { color: #41f5a8; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.map-meetup-head h3 { margin: 2px 0 0; font-size: 14px; }
.map-meetup-types { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.map-meetup-types button { min-height: 44px; padding: 6px 4px; border: 1px solid var(--line); border-radius: var(--r-ctrl); background: rgba(255,255,255,.055); color: var(--muted); font: inherit; font-size: 10px; font-weight: 700; }
.map-meetup-types button.active { border-color: rgba(65,245,168,.55); background: rgba(65,245,168,.12); color: #caffdf; }
.map-meetup-field { display: grid; gap: 4px; margin-top: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
/* 16px verhindert den automatischen Fokus-Zoom von iOS Safari */
.map-meetup-field input { min-width: 0; height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-ctrl); background: rgba(255,255,255,.055); color: var(--text); font: inherit; font-size: 16px; }
.map-meetup-place { width: 100%; min-height: 44px; margin-top: 9px; border: 0; border-radius: var(--r-ctrl); background: #41f5a8; color: #04130d; font: inherit; font-size: 11px; font-weight: 700; }
.map-public-marker { --private-pin-color: #27b778; }
.map-public-marker.public-pin-beerpong { --private-pin-color: #ff9f45; }
.map-public-marker.public-pin-chill { --private-pin-color: #8e4dff; }
.map-public-popup-content { display: grid; gap: 4px; }
.map-public-popup-content small { color: #41f5a8; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.map-public-popup-content strong { font-size: 13px; }
.map-public-popup-content p { margin: 0; color: var(--muted); font-size: var(--t-micro); line-height: 1.4; }
.map-public-popup-content button { min-height: 44px; margin-top: var(--sp-1); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: var(--r-ctrl); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font: inherit; font-size: var(--t-micro); font-weight: 700; }
.map-world.is-placing-meetup-pin .maplibregl-canvas { cursor: crosshair; }
.map-private-marker {
  position: relative;
  width: 36px;
  height: 43px;
  display: grid;
  place-items: start center;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 6px 7px rgba(0,0,0,.46));
  cursor: pointer;
}
.map-private-marker::after {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: var(--private-pin-color);
  transform: translateX(-50%) rotate(45deg);
  content: '';
}
.map-private-marker span {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--private-pin-color);
  font-size: 15px;
}
.map-private-marker.private-pin-tent { --private-pin-color: #8e4dff; }
.map-private-marker.private-pin-car { --private-pin-color: #ff9f45; }
.map-private-marker:focus-visible span { outline: 3px solid rgba(86,223,255,.72); outline-offset: 2px; }
.map-world.is-placing-private-pin .maplibregl-canvas { cursor: crosshair; }
.map-symbol-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 7;
  display: flex;
  min-height: 32px;
  max-width: calc(100% - 28px);
  align-items: center;
  gap: 7px;
  padding: var(--sp-1) var(--sp-3) var(--sp-1) var(--sp-1);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  color: var(--muted);
  box-shadow: var(--e-1);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.15;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  animation: map-symbol-hint-pulse 2.8s ease-in-out 2;
}
.map-symbol-hint > span {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--t-micro);
  font-weight: 700;
}
.map-symbol-hint > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-symbol-hint.is-zoom-hint > span { background: rgba(255,255,255,.16); color: #fff; }
.map-symbol-hint.is-search-active { border-color: color-mix(in srgb, var(--ok) 50%, transparent); color: var(--text); }
.map-symbol-hint.is-search-active > span { background: var(--ok); color: var(--bg); }
.map-symbol-hint.is-used { animation: none; opacity: .78; }
.map-own-marker { position: absolute; top: 0; left: 0; z-index: 5; width: 0; height: 0; pointer-events: none; }
.map-location-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #28b9ff;
  box-shadow: 0 0 0 3px rgba(40,185,255,.28), 0 4px 14px rgba(0,0,0,.62);
  transform: translate(-50%,-50%);
}
.map-friend-marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  line-height: 1.1;
}
.map-friend-marker-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}
.map-friend-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg,#ff365d,#8e4dff);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.72), 0 0 0 3px rgba(255,54,93,.24);
  font-size: 12px;
  font-weight: 1000;
  object-fit: cover;
}
.map-friend-label {
  position: absolute;
  left: 50%;
  bottom: calc(50% + 23px);
  transform: translateX(-50%);
  min-width: max-content;
  max-width: 150px;
  display: grid;
  justify-items: center;
  gap: 2px;
}
.map-friend-distance,
.map-friend-name {
  max-width: 150px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-ctrl);
  background: var(--bg-2);
  color: var(--text);
  box-shadow: var(--e-1);
  font-size: var(--t-micro);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-friend-distance { padding: 3px 6px; border-color: rgba(86,223,255,.38); background: rgba(5,15,22,.92); color: var(--s-factory); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.map-friend-name { padding: 4px 7px; }
.map-friend-marker:focus-visible .map-friend-avatar,
.map-friend-marker:hover .map-friend-avatar,
.map-friend-marker.is-navigation-target .map-friend-avatar { outline: 3px solid var(--s-factory); outline-offset: 3px; }
.map-symbol-marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity .16s ease, visibility .16s ease;
}
.map-symbol-marker::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(86,223,255,.56);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(5,10,17,.2);
}
.map-symbol-marker > span {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--e-1);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.map-symbol-3d-emoji {
  display: none;
  pointer-events: none;
}
.map-world.is-perspective .map-symbol-marker.is-perspective-landmark {
  z-index: 7;
  width: 36px;
  height: 46px;
}
.map-world.is-perspective .map-symbol-marker.is-perspective-landmark::before {
  display: none;
}
.map-world.is-perspective .map-symbol-marker.is-perspective-landmark > span { display: none; }
.map-world.is-perspective .map-symbol-marker.is-perspective-landmark .map-symbol-3d-emoji {
  position: absolute;
  bottom: 16px;
  left: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  transform: translateX(-50%);
  place-items: center;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 50%;
  background: rgba(8,11,18,.88);
  box-shadow: 0 7px 15px rgba(0,0,0,.48);
  font-size: 23px;
  line-height: 1;
  transition: transform .16s ease;
}
.map-world.is-perspective .map-symbol-marker.is-perspective-landmark:hover .map-symbol-3d-emoji,
.map-world.is-perspective .map-symbol-marker.is-perspective-landmark:focus-visible .map-symbol-3d-emoji {
  transform: translateX(-50%) translateY(-3px) scale(1.08);
}
.map-symbol-marker:hover::before,
.map-symbol-marker:focus-visible::before { border-width: 2px; border-color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.map-symbol-marker:hover > span,
.map-symbol-marker:focus-visible > span { display: grid; }
.map-symbol-marker:focus-visible { outline: none; }
.map-symbol-marker.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.map-symbol-marker.is-search-dimmed { opacity: .13; pointer-events: none; }
.map-symbol-marker.is-search-match { z-index: 6; opacity: 1; }
.map-symbol-marker.is-search-match > span { top: -6px; right: -8px; display: grid; width: 26px; height: 18px; border-radius: var(--r-ctrl); font-size: 10px; }
.map-symbol-marker.is-search-match::before {
  inset: -5px;
  border: 3px solid #41f5a8;
  background: rgba(65,245,168,.14);
  box-shadow: 0 0 0 5px rgba(5,15,12,.58), 0 0 26px rgba(65,245,168,.92);
  animation: map-search-match 1.15s ease-in-out infinite;
}
.map-symbol-marker.is-navigation-target::before {
  inset: -5px;
  border: 3px solid var(--s-factory);
  background: rgba(86,223,255,.18);
  box-shadow: 0 0 0 5px rgba(5,15,20,.62), 0 0 28px rgba(86,223,255,.92);
}
.map-symbol-popup { z-index: 8; }
.map-symbol-popup .maplibregl-popup-content {
  min-width: 168px;
  padding: 12px 34px 12px 13px;
  border: 1px solid rgba(86,223,255,.38);
  border-radius: var(--r-ctrl);
  background: rgba(7,10,16,.96);
  color: #fff;
  box-shadow: var(--e-2);
  backdrop-filter: blur(12px);
}
.map-symbol-popup .maplibregl-popup-tip { border-top-color: rgba(7,10,16,.96); border-bottom-color: rgba(7,10,16,.96); }
.map-symbol-popup .maplibregl-popup-close-button { top: 4px; right: 5px; width: 27px; height: 27px; border-radius: var(--r-ctrl); color: rgba(255,255,255,.76); font-size: 19px; }
.map-symbol-popup-content { display: grid; gap: 3px; }
.map-symbol-popup-kicker { color: var(--muted-2); font-size: var(--t-micro); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.map-symbol-popup-content strong { font-size: 12px; font-weight: 1000; line-height: 1.2; }
.map-symbol-popup-content small { color: var(--muted); font-size: var(--t-micro); font-weight: 500; line-height: 1.35; }
.map-compass-launch {
  min-height: 44px;
  margin-top: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(86,223,255,.48);
  border-radius: var(--r-ctrl);
  background: rgba(86,223,255,.12);
  color: #c9f7ff;
  font: inherit;
  font-size: var(--t-micro);
  font-weight: 800;
}
.map-stage-marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 0;
  height: 0;
  pointer-events: none;
}
.map-stage-card {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: max-content;
  min-width: 108px;
  max-width: 150px;
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--stage-color) 42%, transparent);
  border-radius: var(--r-ctrl);
  background: color-mix(in srgb, var(--stage-color) 16%, var(--surface));
  box-shadow: var(--e-2);
  color: var(--text);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  transition: opacity .18s ease, filter .18s ease, transform .18s ease;
  backdrop-filter: blur(10px) saturate(1.15);
}
.map-stage-card::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--stage-color);
}
.map-stage-head { display: flex; align-items: center; gap: 4px; min-width: 0; }
.map-stage-signal { display: inline-flex; height: 10px; flex: 0 0 11px; align-items: flex-end; justify-content: center; gap: 1px; }
.map-stage-signal i { width: 2px; height: 4px; border-radius: 2px; background: var(--stage-color); transform-origin: 50% 100%; }
.map-stage-marker.is-live .map-stage-signal i { animation: map-stage-equalizer .72s ease-in-out infinite alternate; }
.map-stage-marker.is-live .map-stage-signal i:nth-child(2) { animation-delay: -.36s; }
.map-stage-marker.is-live .map-stage-signal i:nth-child(3) { animation-delay: -.18s; }
.map-stage-name { min-width: 0; flex: 1 1 auto; overflow: hidden; color: var(--stage-color); font-size: var(--t-micro); line-height: var(--lh-micro); font-weight: 700; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.map-stage-state { flex: 0 0 auto; color: var(--muted-2); font-size: var(--t-micro); line-height: var(--lh-micro); font-weight: 700; letter-spacing: .06em; }
.map-stage-act { display: block; margin-top: 2px; overflow: hidden; font-size: var(--t-label); line-height: var(--lh-label); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.map-stage-time { display: block; color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: var(--t-micro); line-height: var(--lh-micro); font-weight: 500; }
.map-stage-marker.is-live .map-stage-card { border-color: color-mix(in srgb, var(--stage-color) 70%, transparent); }
.map-stage-marker.is-paused .map-stage-card { border-color: var(--line); background: var(--surface); box-shadow: var(--e-1); filter: grayscale(1); opacity: .62; }
.map-stage-marker.is-paused .map-stage-card::after { background: var(--muted-2); }
.map-stage-marker.is-paused .map-stage-signal i { height: 3px; background: #8a8e98; }
.map-stage-marker.is-paused .map-stage-state { display: none; }
.map-stage-marker.is-paused .map-stage-time { color: var(--muted-2); }
.map-stage-marker.is-compact .map-stage-card { min-width: 112px; max-width: 148px; transform: translateX(-50%) scale(.86); }
.map-stage-connector {
  position: absolute;
  top: -160px;
  left: -160px;
  width: 320px;
  height: 320px;
  display: none;
  overflow: visible;
}
.map-stage-connector line { stroke: var(--stage-color); stroke-width: 1.25; stroke-dasharray: 3 3; opacity: .58; vector-effect: non-scaling-stroke; }
.map-stage-connector-mobile { display: none; }
.map-stage-marker.is-overview .map-stage-connector { display: block; }
.map-stage-marker.is-overview .map-stage-card {
  transform: translateX(calc(-50% + var(--stage-overview-x))) translateY(var(--stage-overview-y)) scale(.78);
}
.map-stage-marker.is-too-far .map-stage-card { opacity: 0; }
.map-stage-marker.is-too-far .map-stage-connector { display: none; }
@keyframes map-stage-equalizer {
  0% { height: 3px; }
  45% { height: 9px; }
  100% { height: 5px; }
}
@keyframes map-symbol-hint-pulse {
  0%, 100% { opacity: .82; }
  50% { opacity: 1; }
}
@keyframes map-search-match {
  0%, 100% { transform: scale(.86); opacity: .8; }
  50% { transform: scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .map-stage-marker.is-live .map-stage-card,
  .map-stage-marker.is-live .map-stage-signal i,
  .map-symbol-hint,
  .map-symbol-marker.is-search-match::before { animation: none; }
}
.map-status {
  position: absolute;
  left: var(--sp-3);
  bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  width: fit-content;
  max-width: min(520px, calc(100% - 24px));
  min-height: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: color-mix(in srgb, var(--bg-2) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--muted-2);
  font-size: var(--t-micro);
  line-height: var(--lh-micro);
  box-shadow: var(--e-1);
}
.map-status[data-state="ok"] { color: var(--ok); }
.map-status[data-state="error"] { color: var(--accent); }
body.map-open { overflow: hidden; }
html[data-theme="light"] .map-sheet,
html[data-theme="light"] .map-toolbar,
html[data-theme="light"] .map-searchbar,
html[data-theme="light"] .map-sharebar,
html[data-theme="light"] .map-status { background: rgba(248,245,247,.88); }
html[data-theme="light"] .map-searchbox { background: rgba(255,255,255,.88); }
html[data-theme="light"] .map-search-results { background: rgba(250,247,249,.98); }
html[data-theme="light"] .map-private-pin-panel { background: rgba(250,247,249,.96); box-shadow: 0 14px 36px rgba(45,29,39,.20); }
html[data-theme="light"] .map-compass { background: rgba(250,247,249,.94); box-shadow: 0 14px 34px rgba(45,29,39,.24); }
html[data-theme="light"] .map-compass-copy b { color: #141824; }
html[data-theme="light"] .map-private-pin-entry { background: rgba(20,24,38,.045); }
@media (max-width: 600px) {
  .map-overlay { padding: 0; }
  .map-sheet { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
  .map-head { padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 9px; }
  .map-search-results { right: var(--sp-4); left: var(--sp-4); max-height: 44dvh; }
  /* Die Labels bleiben sichtbar: fünf Icons ohne Beschriftung sind auf einem
     fremden Gelände nicht zu erraten. Die Leiste ist als 5er-Raster ausgelegt. */
  .map-private-pin-panel { top: 8px; right: 8px; width: min(350px, calc(100% - 16px)); max-height: calc(100% - 16px); }
  .map-friend-label,
  .map-friend-distance,
  .map-friend-name { max-width: 110px; }
  .map-friend-name { padding: 4px 6px; font-size: var(--t-micro); }
  .map-symbol-hint { top: 8px; max-width: calc(100% - 20px); font-size: var(--t-micro); }
  .map-symbol-marker { width: 30px; height: 30px; }
  .map-stage-marker.is-overview .map-stage-card {
    transform: translateX(calc(-50% + var(--stage-overview-mobile-x))) translateY(var(--stage-overview-mobile-y)) scale(.78);
  }
  .map-stage-connector-desktop { display: none; }
  .map-stage-connector-mobile { display: inline; }
}
