/* 3D-Karte Oerlikon – Darstellung. Die Module in js/ lesen die Farben der Szene (--geb-*, --kat-*, --wald-*, …) von hier. */
:root {
  --bg: #e9e7e2; --surface: #fffdf9; --ink: #1d1a17; --ink-2: #4f4943; --muted: #6b645d; --line: #d9d3ca;
  --accent: #b9503c; --hover: #f3e7d8; --link: #0050c8;
  --schatten: 0 1px 3px rgba(40,30,20,.18), 0 4px 14px rgba(40,30,20,.12);
  --radius: 10px;
  --unter-zeitrad: 128px;   /* Oberkante für Fenster unterhalb des Zeitrads (12 px + 108 px + 8 px) */
  --f-display: "Alegreya SC", "Iowan Old Style", Georgia, serif;
  --f-body: "Alegreya Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Gebäude: alle Zeitstände in den Farben des Stadtmodells 1800 */
  --geb-dach: #9a5b3a; --geb-wand: #eadcc0;
  --geb-kante: #3a3430;
  --auswahl: #ffcc00;
  --geb-gedaempft: #dcd8d1;   /* Legende: Gebäude ausserhalb der hervorgehobenen Kategorie */
  --foto-haupt: #12a150; --foto-gut: #7fd39b;               /* im gewählten Foto sichtbar */

  /* Szene */
  --szene-bg: #e9e7e2; --gelaende-leer: #fce8d0;   /* Papierton Übersichtsplan 1920 (Median plan1920_lv95.jpg) */ --grenze: #c0392b;
  --wald-rand: #2b3322; --wald-nadel: #2f4a2c; --wald-laub: #58763a; --wald-boden: #25321f;
  --obst-krone: #6f9a45; --obst-stamm: #6b4f36; --reben: #7d8f3a;   /* Obsthaine und Reben 1800 (modelliert) */
  --ort: #1a73e8;   /* eigener Standort und Blickkegel (Orientierung) */
  --kam-terrestrial: #8e44ad; --kam-lowOblique: #0b8a96;
  --besch-text: #1d1a17; --besch-text-2: #4f4943; --besch-halo: rgba(255,253,247,.92); --besch-strich: #2a2622; --besch-pfeil: #b03a2e; --besch-film: #b03a2e;   /* Pfeil zu Orten ausserhalb der Karte (Rot der Planziffern) */

  /* Einfärben nach … (Schlüssel aus viewer-build/code/viewer_kategorien.py; «leer» = ohne Angabe) */
  /* Paletten: kontinuierliche Verläufe (Bauzeit) in viridis, ältere Gebäude dunkel; Kategorien in Okabe-Ito.
     Neutrale Klassen (übrige, unsicher, generisch, Bauzeit offen) grau #bdbdbd, «ohne Angabe» hell #e8e4dc.
     Geprüft mit colorspacious (ΔE CAM02-UCS bei voller Deuter-/Protan-/Tritanomalie): Kategorien ≥ 9.6, Bauzeit-Nachbarn ≥ 6 */
  --kat-typ-wohn: #f0e442; --kat-typ-wohn_land: #009e73; --kat-typ-wohn_gewerbe: #d55e00; --kat-typ-gewerbe: #0072b2;
  --kat-typ-oeffentlich: #cc79a7; --kat-typ-uebrige: #bdbdbd; --kat-typ-leer: #e8e4dc;
  --kat-bauzeit-bis_1890: #440154; --kat-bauzeit-1891_1910: #472d7b; --kat-bauzeit-1911_1920: #3b528b; --kat-bauzeit-1921_1931: #2c728e;
  --kat-bauzeit-1932_1942: #21918c; --kat-bauzeit-1943_1961: #28ae80; --kat-bauzeit-1962_1990: #5ec962; --kat-bauzeit-1991_2011: #addc30;
  --kat-bauzeit-2012_2026: #fde725; --kat-bauzeit-offen: #bdbdbd; --kat-bauzeit-leer: #e8e4dc;
  --kat-heute-bestehend: #0072b2; --kat-heute-umgebaut: #56b4e9; --kat-heute-abg_bis_1960: #d55e00; --kat-heute-abg_1961_1990: #e69f00;
  --kat-heute-abg_ab_1991: #f0e442; --kat-heute-abg_unbekannt: #cc79a7; --kat-heute-unsicher: #bdbdbd; --kat-heute-leer: #e8e4dc;
  --kat-quelle-luftbild_1919_1923: #56b4e9; --kat-quelle-luftbild_1929_1935: #0072b2; --kat-quelle-luftbild_1961: #009e73;
  --kat-quelle-lod2_2011: #e69f00; --kat-quelle-lod2_2026: #d55e00; --kat-quelle-stadtmodell_1800: #cc79a7;
  --kat-quelle-geschaetzt: #f0e442; --kat-quelle-generisch: #bdbdbd; --kat-quelle-leer: #e8e4dc;
  --kat-denkmal-schutz: #d55e00; --kat-denkmal-inventar_kantonal: #0072b2; --kat-denkmal-inventar_kommunal: #56b4e9; --kat-denkmal-leer: #e8e4dc;   /* nur 2026 */
  /* ISOS (nur 2026): Erhaltungsziel A > B > C als Rot > Orange > Gelb wie die QGIS-Stile, Einzelelement dunkles Magenta, Umgebungszone grün
     (wie die Ebene «ISOS»); colorspacious: ΔE ≥ 14.6 bei voller Deuter-/Protan-/Tritanomalie */
  --kat-isos-einzel: #7a0177; --kat-isos-a: #d7191c; --kat-isos-b: #f28e2b; --kat-isos-c: #f6d55c; --kat-isos-uzo: #8cc084; --kat-isos-leer: #e8e4dc;

  /* Ebene «ISOS» (nur 2026, js/isos.js, in die Geländetextur gezeichnet; Farben der QGIS-Stile qgis/styles/isos_*.qml) */
  --isos-uzo-a: rgba(26,140,60,.40); --isos-uzo-b: rgba(150,210,95,.40);   /* Umgebungszone, Erhaltungsziel a / b */
  --isos-rand-a: #231f20; --isos-rand-b: #6d6e71;                          /* gestrichelter Rand */
  --isos-hinweis: #231f20; --isos-einzel: #d7191c;                          /* Hinweise schwarz, Einzelelemente rot */
  --isos-schrift: #231f20; --isos-halo: rgba(255,253,247,.9);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.4 var(--f-body); }
#scene { position: absolute; inset: 0; }
#scene canvas { display: block; outline: none; }
#scene canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.box { position: absolute; z-index: 10; background: var(--surface); border-radius: var(--radius); box-shadow: var(--schatten); }
a { color: var(--link); }

/* ---------------------------------------------------------------- Zeitrad */
#zeitrad { position: absolute; z-index: 11; top: 12px; left: 50%; transform: translateX(-50%); width: 230px; height: 108px;
  overflow: hidden; cursor: ns-resize; user-select: none; touch-action: none; outline: none;
  -webkit-mask-image: linear-gradient(rgba(0,0,0,.4) 0, #000 22%, #000 78%, rgba(0,0,0,.4) 100%);
  mask-image: linear-gradient(rgba(0,0,0,.4) 0, #000 22%, #000 78%, rgba(0,0,0,.4) 100%); }
#zeitrad::before { content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 40px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--schatten); }
#zeitrad:focus-visible::before { box-shadow: var(--schatten), 0 0 0 2px var(--accent); }
#jahre { position: relative; list-style: none; margin: 0; padding: 0; transition: transform .25s cubic-bezier(.3,.7,.3,1); }
#jahre li { height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  font: 700 17px var(--f-display); color: var(--ink-2); opacity: .9;
  /* heller Schriftrand: Nachbarjahre auf jedem Hintergrund lesbar */
  text-shadow: 0 0 2px var(--surface), 0 0 2px var(--surface), 0 0 4px var(--surface), 0 0 6px var(--surface); transition: font-size .2s, opacity .2s, color .2s; font-variant-numeric: lining-nums tabular-nums; }
#jahre li small { font: 500 13px var(--f-body); color: var(--muted); }
#jahre li.akt { font-size: 27px; color: var(--ink); opacity: 1; }
#jahre li.akt small { font-size: 15px; color: var(--ink-2); }
#jahre li:not(.akt):hover { opacity: .9; color: var(--accent); cursor: pointer; }
#zeitrad.laedt li.akt { animation: puls 1s ease-in-out infinite alternate; }
@keyframes puls { to { opacity: .35; } }

/* ---------------------------------------------------------------- Icon-Leiste */
#leiste { position: absolute; z-index: 14; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; }
.ik-knopf { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--schatten); cursor: pointer; transition: background .15s, color .15s; }
.ik-knopf:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ik-knopf[aria-expanded=true] { background: var(--ink); color: var(--surface); }
.ik-knopf:disabled { opacity: .4; cursor: not-allowed; }
.ik-knopf .ik { width: 22px; height: 22px; background: currentColor;
  -webkit-mask: var(--ik) center / contain no-repeat; mask: var(--ik) center / contain no-repeat; }
/* Tooltip links neben dem Knopf */
.ik-knopf::after { content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  padding: 4px 9px; border-radius: 6px; background: rgba(29,26,23,.9); color: #fff; font: 500 13px var(--f-body); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s .25s; }
.ik-knopf:focus-visible::after { opacity: 1; transition-delay: 0s; }   /* Tooltip auch bei Tastaturfokus */
.ik-knopf[aria-expanded=true]::after { display: none; }

#knopfStart   { --ik: url(icons/home-fill.svg); }
/* Toggle-Icons: Icon zeigt den aktuellen Zustand; mit Maus beim Hovern das Ziel (siehe unten) */
#knopfFotos { --ik: url(icons/image-off-fill.svg); }
#knopfFotos[aria-pressed=true] { --ik: url(icons/image-fill.svg); }
#knopfAnsicht { --ik: url(icons/side-view-fill.svg); }
#knopfAnsicht[aria-pressed=true] { --ik: url(icons/top-view-fill.svg); }
#knopfOrt { --ik: url(icons/map-pin-off-fill.svg); }
#knopfOrt[aria-pressed=true] { --ik: url(icons/map-pin-fill.svg); }
#knopfEbenen  { --ik: url(icons/stack-fill.svg); }
#knopfSuche   { --ik: url(icons/search-fill.svg); }
#knopfEinst   { --ik: url(icons/settings-fill.svg); }
/* Nur mit Maus (nicht auf Touch-Geräten, wo :hover nach dem Tippen hängen bleibt): Hover-Farbe, Tooltip und Ziel-Icon.
   Nicht direkt nach dem Klick (.frisch), sondern erst wieder, wenn die Maus den Knopf verlassen hat. */
@media (hover: hover) and (pointer: fine) {
  .ik-knopf:hover { background: var(--hover); color: var(--accent); }
  .ik-knopf:hover::after { opacity: 1; }
  #knopfFotos[aria-pressed=false]:hover:not(.frisch) { --ik: url(icons/image-fill.svg); }
  #knopfFotos[aria-pressed=true]:hover:not(.frisch) { --ik: url(icons/image-off-fill.svg); }
  #knopfAnsicht[aria-pressed=false]:hover:not(.frisch):not(:disabled) { --ik: url(icons/top-view-fill.svg); }
  #knopfAnsicht[aria-pressed=true]:hover:not(.frisch) { --ik: url(icons/side-view-fill.svg); }
  #knopfOrt[aria-pressed=false]:hover:not(.frisch) { --ik: url(icons/map-pin-fill.svg); }
  #knopfOrt[aria-pressed=true]:hover:not(.frisch) { --ik: url(icons/map-pin-off-fill.svg); }
}

/* ---------------------------------------------------------------- Menüs (links neben der Leiste) */
.menu { z-index: 11; right: 64px; width: 270px; max-height: calc(100% - 24px); overflow: auto; padding: 12px 14px 14px; }
#menuEbenen { top: 12px; }
#menuEinst { top: 12px; }
/* Gebäude suchen (js/suche.js): Eingabe mit Vorschlagsliste */
#menuSuche { top: 12px; width: 300px; }
#sucheEingabe { width: 100%; padding: 6px 8px; font: inherit; font-size: 14.5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
#sucheEingabe:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#sucheListe { list-style: none; margin: 6px 0 0; padding: 0; max-height: 320px; overflow: auto; }
#sucheListe li { padding: 4px 6px; border-radius: 5px; cursor: pointer; font-size: 14px; line-height: 1.3; }
#sucheListe li small { display: block; color: var(--muted); font-size: 12px; }
#sucheListe li b { font-weight: 600; }                                   /* passender Teil (Adresse des Zeitstands oder heute) */
#sucheListe li .heute { color: var(--muted); white-space: nowrap; }     /* «→ heute Gubelhangstrasse 9» */
#sucheListe li .heute b { color: inherit; }
#sucheListe li[aria-selected=true] { background: var(--hover); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
@media (hover: hover) and (pointer: fine) { #sucheListe li:hover { background: var(--hover); } }
#sucheHinweis:not(:empty) { margin-top: 6px; }
.menu h2 { margin: 12px 0 5px; font: 700 15px var(--f-display); letter-spacing: .02em; color: var(--ink-2); }
.menu h2:first-child { margin-top: 0; }
.menu select { width: 100%; padding: 5px 6px; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.menu select + select { margin-top: 5px; }
label.row.inaktiv, label.row.inaktiv input { cursor: not-allowed; }
label.row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14.5px; cursor: pointer; }
label.row input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
label.row input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
label.row select { flex: 1; width: auto; }
.inaktiv { opacity: .45; }
select:disabled, input:disabled { cursor: not-allowed; }

/* ---------------------------------------------------------------- Legende (unten rechts) */
#legende { right: 12px; bottom: 12px; width: 250px; max-height: calc(100% - 140px); overflow: auto; font-size: 13.5px; }
#legende summary { list-style: none; cursor: pointer; padding: 8px 12px; font: 700 15px var(--f-display); color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between; }
#legende summary::-webkit-details-marker { display: none; }
#legende summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-135deg) translate(-2px, -2px); transition: transform .15s; }
#legende[open] summary::after { transform: rotate(45deg) translate(-2px, -2px); }
#legendeInhalt { padding: 0 12px 10px; }
#legendeInhalt h3 { margin: 8px 0 3px; font: 600 11.5px var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#legendeInhalt h3:first-child { margin-top: 0; }
.lg { display: flex; align-items: center; gap: 7px; margin: 2px 0; line-height: 1.25; }
.lg .sw { width: 14px; height: 14px; flex: none; border: 1px solid rgba(0,0,0,.45); border-radius: 2px; }
.lg .sw.rund { border-radius: 50%; }
.lg .sw-paar { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); }   /* Dach/Wand */
.lg .sw-paar.blass .sw { opacity: .4; }   /* unsichere Gebäude: blass (60 % zu Weiss gemischt) */
.lg .sw.linie { height: 0; border: 0; border-top: 2px dashed var(--grenze); border-radius: 0; }
.lg .sw.bahn { height: 8px; border: 0 solid; border-width: 2.5px 0; border-radius: 0; background: none; }   /* Eisenbahn: zwei Gleise */
.lg .sw + span + .sw { margin-left: 10px; }
.lg .sw.film { border: 0; border-radius: 0; background: var(--besch-film); -webkit-mask: url(icons/movie-fill.svg) center / contain no-repeat; mask: url(icons/movie-fill.svg) center / contain no-repeat; }   /* Filme (Schilder mit Film-Icon) */
button.lg { width: 100%; padding: 1px 3px; margin: 1px -3px; border: 0; border-radius: 4px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.lg:hover { background: var(--hover); }
button.lg[aria-pressed=true] { background: var(--hover); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
button.lg:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.lg-tipp { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.lg .n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw.dach { background: var(--geb-dach); } .sw.wand { background: var(--geb-wand); }
.sw.wald { background: var(--wald-laub); }
.sw.obst { background: var(--obst-krone); } .sw.reben { background: var(--reben); }
.sw.kam-terrestrial { background: var(--kam-terrestrial); } .sw.kam-lowOblique { background: var(--kam-lowOblique); }

/* ---------------------------------------------------------------- Info (links) */
#info { left: 12px; top: 12px; width: 340px; z-index: 12; max-height: calc(100% - 24px); overflow: auto; padding: 12px 14px; font-size: 13.5px; }
#info h3 { font: 700 17px/1.25 var(--f-display); margin: 0 24px 6px 0; }
#info h3 small { font: 400 13px var(--f-body); color: var(--muted); }
#info h4 { font: 600 11.5px var(--f-body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 3px; }
#info table { border-collapse: collapse; line-height: 1.35; }
#info td { padding: 1px 8px 1px 0; vertical-align: top; }
#info td:first-child { color: var(--ink-2); white-space: nowrap; }
#info .x { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
#info .x:hover { color: var(--ink); }
/* Beim Durchschauen: Detail nach unten einklappbar (wie die Legende), eingeklappt nur die Kopfzeile */
#infoKlapp { display: none; }
#info.blick #infoKlapp { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: -4px 0 4px; padding: 0 28px 0 0;
  border: 0; background: none; cursor: pointer; font: 700 15px var(--f-display); color: var(--ink-2); }
#info.blick #infoKlapp::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
#info.blick.zu { top: auto; bottom: 12px; width: 200px; padding: 8px 12px; overflow: hidden; }
#info.blick.zu #infoKlapp { margin: 0; padding: 0; }
#info.blick.zu #infoKlapp::after { transform: rotate(-135deg) translate(-2px, -2px); }
#info.blick.zu #infoInhalt, #info.blick.zu .x { display: none; }
#info button.foto { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
#info .foto img { width: 100%; display: block; border-radius: 6px; margin: 4px 0 6px; cursor: zoom-in; }
#info a.foto img { cursor: pointer; } #info div.foto img { cursor: default; }   /* Standbild eines Films: Link zum Film (js/beschriftung.js) */
#info .thumbs { display: flex; flex-wrap: wrap; gap: 4px; }
#info .thumbs button { position: relative; cursor: pointer; display: block; padding: 0; border: 0; background: none; border-radius: 4px; }
#info .thumbs img { height: 62px; display: block; border-radius: 4px; }
#info .thumbs span { position: absolute; left: 2px; bottom: 2px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 0 3px; border-radius: 2px; }
/* Textknöpfe, die wie Links aussehen (Aktionen im Detail: Gebäude, zurück zum Foto) */
button.lnk { padding: 0; border: 0; background: none; font: inherit; text-align: left; color: var(--link); cursor: pointer; }
button.lnk:hover { text-decoration: underline; }
#info button:focus-visible, #bazBox button:focus-visible, #status button:focus-visible, #nord:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#info h3:focus { outline: none; }
#info h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#info ul { margin: 2px 0; padding-left: 16px; line-height: 1.4; }
#info ul.bew li { margin: 2px 0; }
#info ul.bew li.erst { margin-top: 8px; }   /* Abstand zwischen Firmen und Haushalten */
#info p.lnk { margin: 6px 0; }
#info p.lnk:first-child { margin-top: 0; }
#info p.lnk a { margin-right: 10px; }
.muted { color: var(--muted); font-size: 12.5px; }
/* Textknöpfe: weisse Schrift auf Schwarz; gedrückt/Hover wie die Icon-Knöpfe (Hover-Grund, Akzentfarbe) */
button.knopf { font: 700 14px/1.2 var(--f-body); padding: 6px 12px; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--ink); color: var(--surface); cursor: pointer; transition: background .15s, color .15s; }
button.knopf:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.knopf:active { background: var(--hover); color: var(--accent); border-color: var(--hover); }
@media (hover: hover) and (pointer: fine) { button.knopf:hover { background: var(--hover); color: var(--accent); border-color: var(--hover); } }

/* ---------------------------------------------------------------- BAZ-Foto (js/baz.js)
   Fenster nur so gross wie das Vorschaubild in seiner Auflösung (nicht hochskaliert) plus Angaben; grössere Bilder werden verkleinert.
   Zentriert im Bereich links der Icon-Leiste (rechts 12 + 42 + 12 px frei); der abgedunkelte Hintergrund liegt unter der Leiste (z-index 14). */
#bazFenster { position: absolute; inset: 0; z-index: 13; background: rgba(29,26,23,.45); }
#bazBox { position: absolute; left: calc((100% - 54px) / 2); top: 50%; transform: translate(-50%, -50%);
  max-width: calc(100% - 78px); max-height: calc(100% - 24px); display: flex; overflow: hidden; }
#bazBox .bild { position: relative; flex: 0 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; background: #1d1a17; }
#bazBox .bild img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 24px); }
/* Blättern zwischen den BAZ-Fotos des Gebäudes: Pfeile unten mittig auf dem Bild; ohne Foto davor bzw. danach unsichtbar (Platz bleibt) */
#bazBox .blaettern { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 10px; }
#bazBox .pfeil { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: rgba(255,253,249,.88); color: var(--ink);
  box-shadow: var(--schatten); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
#bazBox .pfeil .ik { width: 26px; height: 26px; background: currentColor; -webkit-mask: var(--ik) center / contain no-repeat; mask: var(--ik) center / contain no-repeat; }
#bazVor { --ik: url(icons/arrow-left-box-fill.svg); }
#bazNach { --ik: url(icons/arrow-right-box-fill.svg); }
#bazBox .pfeil.leer { visibility: hidden; }
@media (hover: hover) and (pointer: fine) { #bazBox .pfeil:hover { background: var(--hover); color: var(--accent); } }
#bazMeta { flex: none; width: 330px; max-height: calc(100vh - 24px); overflow: auto; padding: 14px 16px; font-size: 13.5px; }
#bazMeta h3 { font: 700 17px/1.25 var(--f-display); margin: 0 26px 8px 0; }
#bazMeta table { border-collapse: collapse; line-height: 1.35; }
#bazMeta td { padding: 2px 8px 2px 0; vertical-align: top; }
#bazMeta td:first-child { color: var(--ink-2); white-space: nowrap; }
#bazMeta p { margin: 10px 0 0; }
#bazBox .x { position: absolute; right: 8px; top: 6px; z-index: 1; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
#bazBox .x:hover { color: var(--ink); }
@media (max-width: 700px) {
  #bazBox { flex-direction: column; width: calc(100% - 78px); }
  #bazBox .bild img { max-height: 50vh; }
  #bazMeta { width: auto; max-height: none; flex: 1 1 auto; min-height: 0; }
}

/* ---------------------------------------------------------------- übrige Elemente */
#tip { position: absolute; z-index: 20; pointer-events: none; background: rgba(29,26,23,.88); color: #fff; font-size: 13px; padding: 3px 8px; border-radius: 5px; white-space: nowrap; }
#nord { left: 12px; bottom: 12px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#nord .spitze { fill: var(--grenze); } #nord .ende { fill: #999; }
#status { left: 50%; bottom: 54px; transform: translateX(-50%); z-index: 25; max-width: min(560px, calc(100% - 140px)); padding: 8px 14px;
  font-size: 13.5px; color: var(--ink); border-left: 4px solid var(--ink-2); display: flex; align-items: flex-start; gap: 10px; }
#status[hidden] { display: none; }
#status .x { flex: none; border: 0; background: none; font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; color: var(--muted); }
#status .x:hover { color: var(--ink); }
#status.fehler { border-left-color: #a00; }
#hilfe { left: 70px; bottom: 12px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
#laden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--ink-2); z-index: 30; background: var(--bg); }
#laden.fehler { color: #a00; padding: 20px; text-align: center; line-height: 1.5; }
#fotoBlick { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
#fotoImg { position: absolute; opacity: 0; transition: opacity .35s; }
/* Leiste beim Durchschauen: Titel, Schieber und Knopf übereinander, rechts neben dem eingeklappten Detail (#info.blick.zu, 200 px) */
#blickLeiste { --links: 220px; left: var(--links); bottom: 12px; padding: 10px 14px; display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  width: 280px; max-width: calc(100% - var(--links) - 12px); }
#blickLeiste b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#blickLeiste label.row { margin: 0; }
#blickLeiste input[type=range] { flex: 1; width: auto; }
#blickLeiste .knopf { width: 100%; }

/* Info links oben würde das Zeitrad überdecken: dann unterhalb des Zeitrads öffnen */
@media (max-width: 960px) {
  #info { top: var(--unter-zeitrad); max-height: calc(100% - var(--unter-zeitrad) - 12px); }
}
@media (max-width: 700px) {
  .menu { width: 230px; }
  #info { width: calc(100% - 80px); max-height: calc(100% - var(--unter-zeitrad) - 72px); }
  #info.blick.zu { width: 120px; }   /* beim Durchschauen links unten, die Leiste rechts daneben */
  #blickLeiste { --links: 140px; width: auto; right: 12px; padding: 10px 12px; }
  #legende { width: 200px; }
  #hilfe { display: none; }
  #zeitrad { width: 180px; }
}

/* Beim Durchschauen (body.blick, js/kameras.js): Legende ausblenden, wo sie unten nicht neben Details und Leiste Platz hat */
@media (max-width: 800px) {
  body.blick #legende { display: none; }
}

/* ---------------------------------------------------------------- Weniger Bewegung (Systemeinstellung)
   Übergänge und Puls aus; die Kameraflüge springen direkt ans Ziel (js/basis.js, wenigBewegung) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
