/* map.css — Kartenansicht (studium/map.html). Eigenständiges SVG, keine
   externen Kachel-Server (bleibt offline-fähig, wie der Rest des Deploys). */

#mapBookSel, #mapLangSel, #mapRouteSel{
  font:inherit; font-size:13px; padding:6px 10px; border-radius:8px; border:1px solid var(--line);
  background:var(--card); color:var(--fg);
}

.map-wrap{
  display:flex; gap:0; height:calc(100vh - 56px); overflow:hidden;
}
.map-main{
  flex:1; min-width:0; display:flex; flex-direction:column; overflow:hidden;
}

/* Kartenwerkzeuge folgen in der eingebetteten Reader-Ansicht demselben
   aufgeraeumten Muster wie die Hauptseite: standardmaessig verborgen und
   ueber einen einzigen kompakten Menueknopf erreichbar. */
.map-tools-shell{ background:var(--card); border-bottom:1px solid var(--line); }
.map-tools-toggle{
  width:100%; min-height:42px; display:flex; align-items:center; gap:8px;
  padding:7px 12px; border:0; background:var(--card); color:var(--fg);
  font:700 12px/1.2 inherit; text-align:left; cursor:pointer;
}
.map-tools-toggle:hover{ background:var(--hl2); color:var(--red); }
.map-tools-toggle>span:first-child{ font-size:17px; }
.map-tools-caret{ margin-left:auto; transition:transform .18s ease; }
.map-tools-toggle.open .map-tools-caret{ transform:rotate(180deg); }
.map-tools-drawer{ padding:4px 10px 10px; background:var(--bg2); }
.map-tools-drawer[hidden]{ display:none !important; }
.map-tools-drawer .map-toolbar{ padding:8px 2px 0; border-bottom:0; background:transparent; }

.map-toolbar{
  display:flex; gap:10px; align-items:center; padding:8px 12px; border-bottom:1px solid var(--line);
  background:var(--card); flex-wrap:wrap;
}
.map-scope-bar, .map-style-bar{ display:flex; gap:6px; flex-wrap:wrap; }
.map-scope-btn, .map-style-btn{
  font:inherit; font-size:12px; padding:5px 12px; border-radius:50px;
  border:1px solid var(--line); background:var(--bg2); color:var(--fg2); cursor:pointer;
}
.map-scope-btn:hover, .map-style-btn:hover{ background:var(--hl2); }
.map-scope-btn.active{ background:var(--red); border-color:var(--red); color:#fff; font-weight:700; }
.map-style-btn.active{ background:var(--play); border-color:var(--play); color:#fff; font-weight:700; }

.map-stage{
  flex:1; min-width:0; position:relative; background:var(--bg2);
  overflow:hidden; touch-action:none;
}
.map-stage svg{ width:100%; height:100%; display:block; cursor:grab; }
.map-stage svg:active{ cursor:grabbing; }

/* vector-effect="non-scaling-stroke" (inline, s. map.js) hält Linienbreiten
   beim Zoomen konstant in Bildschirm-Pixeln — hier nur Farbe/Deckkraft. */
.map-sea{ fill:var(--bg2); }
.map-land-shape{ fill:var(--bg); stroke:var(--line); stroke-width:0.6; }
.map-lake-shape{ fill:var(--bg2); stroke:var(--line); stroke-width:0.4; }
.map-river-shape{ stroke:var(--play); stroke-width:0.7; opacity:0.55; }
.map-graticule{ stroke:var(--line); stroke-width:0.5; fill:none; opacity:0.35; }
/* Antike Küstenlinie (AWMC) — dünne gestrichelte Referenzlinie ÜBER der
   modernen Küste, zeigt an, wo antike Quellen abweichende Verläufe
   überliefern (z.B. Persischer Golf, Totes Meer, damals ausgedehnter). */
.map-ancient-coast path{
  stroke:var(--play); stroke-width:0.5; stroke-dasharray:2 1.5; opacity:0.5; fill:none;
}
/* Heutige Stadtplan-Grundrisse (OSM via Overpass) — nur bei starkem
   Reinzoomen auf eine einzelne Altstadt überhaupt sichtbar (Gebäudemaßstab). */
.map-cityplan-building{ fill:var(--fg2); stroke:var(--line); stroke-width:0.15; opacity:0.5; }
.map-cityplan-wall{ stroke:var(--red); stroke-width:0.6; opacity:0.6; }

.map-political-territory path{ cursor:pointer; transition:opacity .12s; }
.map-political-territory:hover path{ opacity:0.75; }
.map-political-territory.active path{
  opacity:1; stroke:var(--red); stroke-width:2.2;
}
/* font-size NICHT hier — wird als SVG-Attribut gesetzt und bei Zoom in
   map.js#applyZoomScale() gegenskaliert, damit Beschriftungen beim Reinzoomen
   nicht riesig werden und eng beieinanderliegende Punkte sich trennen lassen. */
.map-political-label{
  font-weight:700; fill:var(--fg); opacity:0.75; text-anchor:middle;
  pointer-events:none; user-select:none;
  /* Halo/Kontur gegen unruhigen Terrain-/Politik-Hintergrund — sonst auf
     manchen Kartenausschnitten praktisch unlesbar (Nutzerfeedback: "Karten
     haben oft schwer lesbare Beschriftungen"). */
  paint-order:stroke fill; stroke:var(--card); stroke-width:3px;
  stroke-linejoin:round; vector-effect:non-scaling-stroke;
}

/* Straße (Itiner-e, echter antiker Straßenverlauf): durchgezogen. */
.map-route-leg-road{ stroke:#8a5a2a; stroke-width:2.4; opacity:0.9; }
/* Seereise (Apostelgeschichte-Text sagt ausdrücklich "sie segelten"): gestrichelt, blau. */
.map-route-leg-sea{ stroke:#2a6a8a; stroke-width:2; stroke-dasharray:1 3; stroke-linecap:round; opacity:0.85; }
/* Keine Quelle für diese Etappe (z.B. vorrömische Routen, oder Netzlücke): gestrichelt, rot — bewusst als Näherung erkennbar. */
.map-route-leg-unknown{ stroke:var(--red); stroke-width:2; stroke-dasharray:4 3; opacity:0.85; }
.map-route-stop{ cursor:pointer; }
.map-route-stop circle{ fill:var(--card); stroke:var(--red); stroke-width:1.6; vector-effect:non-scaling-stroke; }
.map-route-stop text{
  font-weight:800; fill:var(--red); text-anchor:middle; pointer-events:none;
  paint-order:stroke fill; stroke:var(--card); stroke-width:3px;
  stroke-linejoin:round; vector-effect:non-scaling-stroke;
}
.map-route-stop:hover circle{ fill:var(--red); }

.map-marker{ cursor:pointer; }
.map-marker circle{
  fill:var(--red); stroke:var(--card); stroke-width:1.2; opacity:0.85;
  vector-effect:non-scaling-stroke; transition:opacity .12s;
}
.map-marker:hover circle, .map-marker.active circle{ opacity:1; fill:var(--hlfull); }
.map-marker text{
  fill:var(--fg2); pointer-events:none; user-select:none;
  paint-order:stroke fill; stroke:var(--card); stroke-width:3px;
  stroke-linejoin:round; vector-effect:non-scaling-stroke;
}
.map-marker.active text{ fill:var(--fg); font-weight:700; }
/* Unsichtbarer, großzügigerer Klickbereich hinter dem sichtbaren Punkt —
   MUSS die generische ".map-marker circle"/".map-route-stop circle"-Regel
   oben überschreiben, sonst würde er wegen der geteilten Selektor-Regel
   ebenfalls rot/gefüllt gerendert. */
.map-marker-hit{ fill:transparent !important; stroke:none !important; pointer-events:all; }

.map-zoom-ctl{
  position:absolute; top:10px; right:10px; display:flex; flex-direction:column; gap:2px;
  background:var(--card); border:1px solid var(--line); border-radius:8px; overflow:hidden;
}
.map-zoom-ctl button{
  font:inherit; font-size:16px; width:32px; height:32px; border:none; background:transparent;
  color:var(--fg); cursor:pointer; border-bottom:1px solid var(--line);
}
.map-zoom-ctl button:last-child{ border-bottom:none; font-size:13px; }
.map-zoom-ctl button:hover{ background:var(--hl2); }

.map-count{
  position:absolute; top:10px; left:10px; font-size:12px; color:var(--fg2);
  background:var(--card); border:1px solid var(--line); border-radius:8px; padding:4px 10px;
  pointer-events:none;
}

.map-legend-bar{
  display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:6px 12px;
  border-top:1px solid var(--line); background:var(--card); font-size:12px; color:var(--fg2);
}
.map-legend-item a{ color:var(--fg2); }
.map-legend-epoch{ font-weight:700; color:var(--fg); }
.map-legend-note{ color:var(--red); }
.map-legend-src{ margin-left:auto; opacity:0.8; }
.map-legend-route-key{ display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.map-legend-line-sample{ display:inline-block; width:18px; height:0; border-top-width:2px; margin-right:2px; vertical-align:middle; }
.map-legend-line-sample.road{ border-top-style:solid; border-top-color:#8a5a2a; }
.map-legend-line-sample.sea{ border-top-style:dotted; border-top-color:#2a6a8a; }
.map-legend-line-sample.unknown{ border-top-style:dashed; border-top-color:var(--red); }

/* Gleicher Apostroph-Bug wie im Wort-Detail-Panel (reader.css .dl-gene/
   .dl-ency-text: "Yahweh's" o.ae. zeigte eine Leerzeile) -- Noto Sans TC
   (Seiten-Standardfont) rendert den Apostroph in englischen Kontraktionen
   ueberbreit. Ortsname/Beschreibung/Easton's-Text hier sind durchgehend
   Englisch, daher auf dem ganzen Panel gefixt statt einzeln je Unterklasse. */
.map-panel{
  width:340px; flex:0 0 340px; border-left:1px solid var(--line); background:var(--card);
  overflow-y:auto; padding:18px; font-family:"Noto Serif",serif;
}
.map-panel-empty{ color:var(--fg2); font-size:14px; margin-top:20px; text-align:center; }
.map-panel.has-content{ scroll-margin-top:12px; }

.map-place-name{ font-size:22px; font-weight:700; margin-bottom:2px; }
.map-place-modern{ font-size:13px; color:var(--fg2); margin-bottom:10px; }
.map-place-langs{
  display:flex; flex-direction:column; gap:3px; margin-bottom:12px; padding:8px 10px;
  background:var(--bg2); border-radius:8px;
}
.map-place-lang-row{ font-size:14px; display:flex; gap:8px; align-items:baseline; }
.map-place-lang-tag{
  font-size:11px; color:var(--fg2); font-weight:700; text-transform:uppercase;
  flex:0 0 auto; min-width:70px;
}
.map-place-meta{ font-size:12px; color:var(--fg2); margin-bottom:14px; line-height:1.6; }
.map-place-meta a{ color:var(--play); }
.map-ency{ margin-top:14px; border-top:1px solid var(--line); padding-top:10px; }
.map-ency-lbl{
  font-size:12px; color:var(--fg2); font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; margin-bottom:8px;
}
.map-ency-text{ font-size:13px; line-height:1.7; margin-bottom:8px; }
.map-ency-text p{ margin:0 0 10px 0; }
.map-ency-text p:last-child{ margin-bottom:0; }
.map-wiki-text{ font-size:13px; line-height:1.7; margin-bottom:8px; }
.map-wiki-text p{ margin:0; }
.map-illus-lbl{
  font-size:12px; color:var(--fg2); font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; margin-top:14px; padding-top:10px; border-top:1px solid var(--line);
}
.map-illus-grid{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
/* .map-illus-card selbst + Lightbox-Overlay: s. reader.css (dort geteilt,
   da map.html reader.css ebenfalls lädt). */
.ency-vref, .ency-xref{
  font:inherit; border:none; padding:0 2px; margin:0 -1px; border-radius:4px; cursor:pointer;
}
.ency-vref{ background:var(--hl2); color:var(--fg); font-weight:600; }
.ency-vref:hover{ background:var(--hl); }
.ency-xref{ background:none; color:var(--play); text-decoration:underline; text-decoration-style:dotted; text-underline-offset:2px; }
.ency-xref:hover{ background:var(--hl2); }
.map-place-verses-lbl{
  font-size:12px; color:var(--fg2); font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; margin:14px 0 6px;
}
.map-verse-list{ display:flex; flex-wrap:wrap; gap:6px; }
.map-verse-chip{
  display:inline-flex; align-items:center; padding:4px 10px; border-radius:50px;
  background:var(--hl2); border:1px solid var(--gold); font-size:12px; cursor:pointer;
}
.map-verse-chip:hover{ background:var(--hl); }
.map-verse-more{ font-size:12px; color:var(--fg2); padding:4px 2px; }

@media (max-width: 760px){
  .map-wrap{ flex-direction:column; height:auto; }
  .map-main{ height:70vh; }
  .map-panel{ width:auto; flex:none; border-left:none; border-top:1px solid var(--line); max-height:40vh; }
}

/* Eingebettete Karte innerhalb des Wort-Detail-Panels (#detail in read.html)
   — dieselbe Fenster-Mechanik wie alle anderen Zusatzinfos, kein eigener
   Seitenwechsel mehr. Immer einspaltig gestapelt (Karte oben, Ortsdetails
   darunter im selben Scrollfluss), unabhängig von der Bildschirmbreite —
   der Container ist ohnehin schon ein schmales, begrenztes Panel, kein
   Vollbild wie die frühere eigenständige map.html-Seite. Betrifft NUR
   #mapView (existiert ausschließlich in read.html) — die eigenständige
   map.html-Seite bleibt von diesen Regeln unberührt. */
#mapView{ padding:0; }
#mapView .map-tools-shell{ margin:0 0 8px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
#mapView .map-embed-toolbar{
  display:flex; gap:8px; flex-wrap:wrap; padding:4px 2px 2px;
}
#mapView .map-wrap{ display:block; height:auto; overflow:visible; }
#mapView .map-main{ display:flex; flex-direction:column; height:48vh; min-height:280px; }
#mapView .map-stage{ min-height:0; }
#mapView .map-panel{
  width:auto; flex:none; border-left:none; border-top:1px solid var(--line);
  max-height:none; overflow:visible; padding:14px 2px 0;
}
