:root {
  --grund: #fafafa;
  --karte: #fff;
  --text: #1b1b1b;
  --leise: #666;
  --akzent: #0d8a7a;
  --auf-akzent: #fff;
  --rand: #ddd;
  --fehler: #b3261e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #121212;
    --karte: #1e1e1e;
    --text: #eee;
    --leise: #aaa;
    --akzent: #4fd1be;
    --auf-akzent: #06302b;
    --rand: #333;
    --fehler: #ff8a80;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.4 system-ui, sans-serif; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* --- Kopf und Navigation ----------------------------------------------------
   Wie die Handy-App: vier Hauptbereiche und die Bibliothek in Gruppen. Breit
   eine Seitenleiste, schmal die Reiter unten. --seite und --unten sind der
   Platz, den die Navigation links bzw. unten belegt. */
:root { --kopf: 56px; --seite: 0px; --unten: 0px; }
#kopf { display: flex; align-items: center; gap: 8px; height: var(--kopf); padding: 0 16px; position: sticky; top: 0; z-index: 3; margin-left: var(--seite); background: color-mix(in srgb, var(--grund) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--rand); }
#kopf-titel { flex: 1; min-width: 0; margin: 0; font-size: 1.2em; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#kopf button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--rand); background: var(--karte); color: var(--text); font-weight: 560; }
#kopf button:hover { border-color: color-mix(in srgb, var(--akzent) 55%, var(--rand)); }
#kopf button.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
#kopf .symbol { width: 20px; height: 20px; }
#konto-knopf { flex: 0 0 36px; height: 36px; margin-left: 4px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #8e4ec6, var(--akzent)); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 0 0 2px var(--grund); }
#konto-knopf.aktiv { box-shadow: 0 0 0 2px var(--grund), 0 0 0 4px var(--akzent); }
.symbolsatz { position: absolute; width: 0; height: 0; overflow: hidden; }
.symbol { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#nav a { text-decoration: none; }
.nav-marke, .nav-gruppe a, .nav-haupt a { color: var(--text); }
.farbsymbol { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 10px; color: var(--farbe); background: color-mix(in srgb, var(--farbe) 15%, transparent); }
.farbsymbol .symbol { width: 19px; height: 19px; stroke-width: 2; }

@media (min-width: 900px) {
  /* Ohne Pinnnadel belegt die Leiste nur die Symbolspalte; geöffnet legt
     sie sich über den Inhalt. Die Symbole stehen in beiden Zuständen an
     derselben Stelle, damit beim Öffnen nichts springt. */
  :root { --seite: 68px; --nav-offen: 248px; }
  body.nav-fixiert { --seite: var(--nav-offen); }
  #inhalt { margin-left: var(--seite); }
  #nav { position: fixed; left: 0; top: 0; bottom: 0; width: var(--seite); z-index: 6; display: flex; flex-direction: column; gap: 2px; overflow-x: hidden; overflow-y: auto; padding: 14px 10px 14px; background: var(--karte); border-right: 1px solid var(--rand); transition: width .18s ease .25s, box-shadow .18s ease .25s; }
  body:not(.nav-fixiert) #nav:hover, body:not(.nav-fixiert) #nav:focus-within { width: var(--nav-offen); box-shadow: 6px 0 24px rgba(0,0,0,.16); transition-delay: .06s; }
  .nav-text, .nav-marke span, .nav-gruppe h2 { white-space: nowrap; transition: opacity .12s ease .25s; }
  body:not(.nav-fixiert) #nav:not(:hover):not(:focus-within) :is(.nav-text, .nav-marke span, .nav-gruppe h2) { opacity: 0; }
  body:not(.nav-fixiert) #nav:is(:hover, :focus-within) :is(.nav-text, .nav-marke span, .nav-gruppe h2) { transition-delay: .12s; }
  .nav-marke { display: flex; align-items: center; gap: 12px; padding: 4px 9px 16px; font-weight: 700; font-size: 1.1em; }
  .nav-marke img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
  .nav-haupt, .nav-gruppe { display: flex; flex-direction: column; gap: 2px; }
  .nav-haupt a, .nav-gruppe a, .nav-nadel { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; font-weight: 520; }
  .nav-haupt .nav-symbol, .nav-nadel .nav-symbol { display: inline-flex; justify-content: center; flex: none; width: 32px; color: var(--leise); }
  .nav-haupt a:hover, .nav-gruppe a:hover, .nav-nadel:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
  .nav-haupt a.aktiv, .nav-gruppe a.aktiv { background: color-mix(in srgb, var(--akzent) 14%, transparent); font-weight: 650; }
  .nav-haupt a.aktiv .nav-symbol { color: var(--akzent); }
  .nav-gruppe { margin-top: 10px; padding-top: 6px; border-top: 1px solid transparent; transition: border-color .12s ease .25s; }
  body:not(.nav-fixiert) #nav:not(:hover):not(:focus-within) .nav-gruppe { border-top-color: var(--rand); }
  .nav-gruppe h2 { margin: 0 10px 6px; font-size: .72em; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--leise); }
  .nav-fuss { margin-top: auto; padding-top: 12px; }
  .nav-nadel { width: 100%; border: 0; background: none; color: var(--leise); font: inherit; text-align: left; cursor: pointer; }
  .nav-nadel .symbol { transform: rotate(35deg); transition: transform .15s; }
  body.nav-fixiert .nav-nadel { color: var(--text); }
  body.nav-fixiert .nav-nadel .nav-symbol { color: var(--akzent); }
  body.nav-fixiert .nav-nadel .symbol { transform: none; }
  .nur-schmal { display: none !important; }
  #kopf, #inhalt, #auswahlleiste { transition: margin-left .2s ease, left .2s ease; }
}
@media (max-width: 899.98px) {
  :root { --unten: calc(64px + env(safe-area-inset-bottom)); }
  .nav-marke, .nav-gruppe, .nav-fuss { display: none; }
  #nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; height: var(--unten); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--karte) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--rand); }
  .nav-haupt { display: flex; height: 64px; }
  #nav .nav-haupt a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--leise); font-size: .75em; font-weight: 600; }
  .nav-haupt .nav-symbol { display: flex; align-items: center; justify-content: center; width: 60px; height: 30px; border-radius: 15px; transition: background .15s; }
  #nav .nav-haupt a.aktiv { color: var(--text); }
  .nav-haupt a.aktiv .nav-symbol { color: var(--akzent); background: color-mix(in srgb, var(--akzent) 20%, transparent); }
  #inhalt { padding-bottom: var(--unten); }
  #kopf { padding: 0 10px 0 14px; }
  #kopf .lang { display: none; }
  #kopf button { width: 40px; padding: 0; justify-content: center; }
  #hochladen-stand { bottom: calc(var(--unten) + 12px); }
  #meldung { bottom: calc(var(--unten) + 16px); }
}

/* Die Bibliothek als Seite: Personen, dann die Gruppen. */
#bereich-bibliothek { padding: 4px 16px 32px; max-width: 760px; }
.bib-abschnitt { margin-top: 18px; }
.bib-kopf { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
main#inhalt .bib-kopf h2 { margin: 0; font-size: 1.05em; font-weight: 650; }
.bib-kopf a { color: var(--akzent); text-decoration: none; font-weight: 600; }
.bib-personen { display: flex; gap: 14px; overflow-x: auto; padding: 2px 4px 6px; scrollbar-width: none; }
.bib-person { flex: 0 0 76px; text-align: center; color: var(--text); text-decoration: none; }
.bib-gesicht { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, #8e4ec6 18%, var(--karte)); color: #8e4ec6; font-size: 28px; font-weight: 700; }
.bib-gesicht img { width: 100%; height: 100%; object-fit: cover; }
.bib-name { display: block; margin-top: 6px; font-size: .8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bib-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.bib-kacheln .bib-eintrag { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--karte); border: 1px solid var(--rand); color: var(--text); text-decoration: none; font-weight: 600; transition: transform .12s, box-shadow .12s; }
.bib-kacheln .bib-eintrag:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.bib-kacheln .farbsymbol { width: 40px; height: 40px; border-radius: 12px; }
.bib-kacheln .farbsymbol .symbol { width: 22px; height: 22px; }
.bib-liste { background: var(--karte); border: 1px solid var(--rand); border-radius: 16px; overflow: hidden; }
.bib-liste .bib-eintrag { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); text-decoration: none; font-weight: 560; }
.bib-liste .bib-eintrag + .bib-eintrag { border-top: 1px solid var(--rand); }
.bib-liste .bib-eintrag .nav-text { flex: 1; }
.bib-liste .bib-eintrag > .symbol { width: 18px; height: 18px; color: var(--leise); }
.bib-liste .bib-eintrag:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }

.karte { max-width: 22em; margin: 12vh auto; padding: 24px; background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; }
.karte h1 { margin-top: 0; }
.karte label { display: block; margin: 12px 0 4px; color: var(--leise); }
.karte input { display: block; width: 100%; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
.karte button[type=submit] { margin-top: 16px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; }
/* Passkeys (#277): zweitrangig unter dem Anmelden, auf der eigenen Seite
   der einzige Knopf. */
.karte button.zweitrangig { margin-top: 10px; width: 100%; padding: 10px; border: 1px solid var(--rand); border-radius: 8px; background: transparent; color: var(--text); font-weight: 600; }
body[data-seite=passkey] #los { margin-top: 16px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; }
body[data-seite=passkey] #los:disabled { opacity: .5; }
.karte code { user-select: all; word-break: break-all; }
.fehler { color: var(--fehler); min-height: 1.4em; }
.leise { color: var(--leise); text-align: center; padding: 16px; }

#raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; padding: 2px; touch-action: pan-x pan-y; }
#raster.feste-spalten { grid-template-columns: repeat(var(--spalten), minmax(0, 1fr)); }
#raster h2 { grid-column: 1 / -1; font-size: 0.95em; font-weight: 600; margin: 14px 10px 4px; color: var(--leise); }
#raster .kachel { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--rand); border: 0; padding: 0; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Jede Kachel für sich: Ohne das legte das Markieren einer einzigen das
   ganze Raster neu an (9 ms bei 6000 geladenen), und Kacheln ausserhalb
   des Bildes kosten so nichts. */
#raster .kachel { content-visibility: auto; contain-intrinsic-size: auto 140px; }
#raster .kachel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .14s ease-out, border-radius .14s ease-out; -webkit-user-drag: none; }
/* Die Marken der Kachel – wie am Rechner: Favorit oben links, Ort unten
   links, Videolänge oder Live unten rechts, Serie oder Format oben rechts. */
.kachel .zeichen { width: 18px; height: 18px; fill: #fff; stroke: none; filter: drop-shadow(0 0 2px rgba(0,0,0,.75)); }
.kachel > .zeichen { position: absolute; z-index: 1; pointer-events: none; }
.kachel > .herz { left: 5px; top: 5px; width: 17px; height: 17px; fill: #ff5a5f; }
.kachel > .ort { left: 4px; bottom: 5px; width: 15px; height: 15px; }
.kachel .unten-rechts { position: absolute; right: 5px; bottom: 4px; display: flex; align-items: center; gap: 3px; color: #fff; font-size: 11px; font-weight: 600; text-shadow: 0 0 3px #000; pointer-events: none; z-index: 1; }
.kachel .unten-rechts .zeichen { width: 19px; height: 19px; }
.kachel .schild { position: absolute; right: 5px; top: 5px; display: flex; align-items: center; gap: 3px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .02em; line-height: 15px; pointer-events: none; z-index: 1; }
.kachel .schild .zeichen { width: 11px; height: 11px; filter: none; }
/* Der Rahmen der Tastatur – wie am Rechner. */
/* Die Ansichtsleiste (#194) und die bündigen Reihen: Jede Kachel wächst
   im Verhältnis ihres Formats, so werden alle einer Reihe gleich hoch;
   ein Füller am Ende jeder Gruppe lässt deren letzte Reihe ungestreckt. */
#ansichtsleiste { display: flex; align-items: center; gap: 2px; margin: 2px 8px 6px; min-width: 0; }
#ansichtsleiste[hidden] { display: none; }
#ansichtsleiste select { min-width: 0; padding: 5px 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; font-size: .9em; }
#ansichtsleiste button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text); }
#ansichtsleiste button:hover:not(:disabled) { background: var(--karte); }
#ansichtsleiste button[aria-pressed="true"] { background: var(--karte); border-color: var(--rand); }
#ansichtsleiste button:disabled { opacity: .35; }
#ansichtsleiste button[hidden] { display: none; }
#ansichtsleiste .symbol { width: 20px; height: 20px; }
#ansichtsleiste #ansicht-jahre { margin-right: 4px; }
#ansichtsleiste .ansicht-art { display: inline-flex; flex: none; margin-right: 6px; border: 1px solid var(--rand); border-radius: 9px; padding: 1px; }
#ansichtsleiste .ansicht-art button { width: 32px; height: 28px; }
#ansichtsleiste #ansicht-sortierung { flex: 0 1 auto; margin-right: auto; }
#ansichtsleiste #ansicht-gliederung { flex: 0 1 auto; margin-left: 4px; }
#ansichtsleiste button { flex: none; }
/* Die Liste (#195): jede Zeile ein Raster aus den gewählten Spalten,
   deren Breiten als --listen-spalten am Raster stehen. */
#raster.liste { display: block; overflow-x: auto; padding: 0 0 2px; }
#raster.liste .listenkopf, #raster.liste .kachel { display: grid; grid-template-columns: 56px var(--listen-spalten); align-items: center; min-width: max-content; }
#raster.liste .listenkopf { padding: 4px 0; border-bottom: 1px solid var(--rand); color: var(--leise); font-size: .8em; font-weight: 600; }
#raster.liste .listenkopf .kopfzelle { position: relative; padding: 0 10px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#raster.liste .listenkopf .griff { position: absolute; top: -4px; bottom: -4px; right: 0; width: 8px; cursor: col-resize; touch-action: none; }
#raster.liste .listenkopf .griff::after { content: ''; position: absolute; top: 25%; bottom: 25%; right: 3px; width: 1px; background: var(--rand); }
#raster.liste .kachel { aspect-ratio: auto; width: 100%; height: auto; padding: 4px 0; overflow: visible; background: none; color: var(--text); text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--rand) 50%, transparent); content-visibility: auto; contain-intrinsic-size: auto 46px; }
#raster.liste .kachel:hover { background: var(--karte); }
#raster.liste .kachel.gewaehlt { background: color-mix(in srgb, var(--akzent) 22%, transparent); }
#raster.liste .kachel img { width: 48px; height: 36px; margin-left: 4px; border-radius: 4px; object-fit: cover; }
#raster.liste .kachel.gewaehlt img { transform: none; border-radius: 4px; }
#raster.liste .zelle { padding-right: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .85em; color: var(--leise); font-variant-numeric: tabular-nums; }
#raster.liste .zelle.dateiname { color: var(--text); font-size: .95em; }
#raster.liste .weitere { display: contents; }
#raster.liste .sterne-klein { letter-spacing: 1px; color: var(--akzent); }
#raster.liste .farbpunkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
#raster.liste h2 { margin: 18px 10px 6px; }
#raster.liste .fueller { display: none; }
/* Schmal wie auf dem Telefon: zwei Zeilen statt Spalten, dieselben Angaben. */
@media (max-width: 700px) {
  #raster.liste .listenkopf { display: none; }
  #raster.liste .kachel { grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: auto auto; min-width: 0; column-gap: 4px; }
  #raster.liste .kachel img { grid-row: 1 / 3; }
  #raster.liste .weitere { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .85em; color: var(--leise); }
  #raster.liste .weitere .zelle { display: inline; padding: 0; font-size: 1em; }
  #raster.liste .weitere .zelle:not(:first-child)::before { content: ' · '; }
  #raster.liste .weitere .zelle.leer { display: none; }
}
/* Zwei Fotos vergleichen (#197): dunkel wie am Rechner, zwei gleich grosse
   Felder nebeneinander oder übereinander. */
#vergleich { position: fixed; inset: 0; z-index: 12; display: flex; flex-direction: column; background: #111; color: #eee; }
#vergleich[hidden] { display: none; }
#vergleich .vergleich-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid #333; }
#vergleich .vergleich-leiste h3 { margin: 0 auto 0 0; font-size: 1em; font-weight: 600; }
#vergleich .vergleich-leiste button { padding: 6px 10px; border: 1px solid #444; border-radius: 8px; background: #222; color: #eee; }
#vergleich .vergleich-leiste #vergleich-zu { font-size: 1.2em; line-height: 1; }
#vergleich .vergleich-flaeche { flex: 1; display: flex; min-height: 0; }
#vergleich.uebereinander .vergleich-flaeche { flex-direction: column; }
#vergleich .vergleich-feld { flex: 1 1 0; min-width: 0; min-height: 0; margin: 0; display: flex; flex-direction: column; border-left: 1px solid #333; }
#vergleich .vergleich-feld:first-child { border-left: 0; }
#vergleich.uebereinander .vergleich-feld { border-left: 0; border-top: 1px solid #333; }
#vergleich.uebereinander .vergleich-feld:first-child { border-top: 0; }
#vergleich .vergleich-bild { flex: 1; min-height: 0; overflow: hidden; position: relative; touch-action: none; cursor: grab; }
#vergleich .vergleich-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; user-select: none; -webkit-user-drag: none; }
#vergleich figcaption { padding: 4px 8px; font-size: 12px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.konto-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.konto-kopf p { margin: 0; }
#codes-dialog { max-width: 24em; width: calc(100vw - 32px); }
#codes-liste { margin: 10px 0; padding: 10px 14px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05em; line-height: 1.6; user-select: all; -webkit-user-select: all; }

#spalten-dialog { max-width: 22em; width: calc(100vw - 32px); }
#spalten-liste { display: grid; gap: 2px; margin: 8px 0; }
#spalten-liste label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; }
#spalten-liste label:hover { background: var(--karte); }
#raster .fueller { display: none; }
#raster.reihen { display: flex; flex-wrap: wrap; align-items: flex-start; }
#raster.reihen > :is(h2, .tageskopf) { flex: 0 0 100%; }
#raster.reihen .kachel { flex: var(--v, 1.5) 1 calc(var(--v, 1.5) * var(--hoehe, 140px)); aspect-ratio: var(--v, 1.5); contain-intrinsic-size: auto var(--hoehe, 140px); }
#raster.reihen .fueller { display: block; flex: 1000000 1 0; height: 0; }
#raster.reihen::after { content: ''; flex: 1000000 1 0; }

/* Vorschau beim Darüberfahren (#193): über dem Standbild, sichtbar erst
   mit dem ersten Bild. */
#raster .kachel video.schwebe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; transition: opacity .12s ease-out; }
#raster .kachel.schwebt video.schwebe { opacity: 1; }
#raster .kachel.rahmen { outline: 3px solid var(--akzent); outline-offset: -3px; z-index: 1; }
#kuerzel-dialog { max-width: 34em; width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto; }
#kuerzel-dialog h4 { margin: 14px 0 6px; font-size: .9em; color: var(--leise); }
#kuerzel-dialog dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
#kuerzel-dialog dt { font-family: ui-monospace, monospace; font-size: .85em; white-space: nowrap; padding: 1px 6px; border: 1px solid var(--rand); border-radius: 5px; background: var(--grund); justify-self: start; }
#kuerzel-dialog dd { margin: 0; }
/* Im Auswahlmodus steht oben links der Kreis. */
body.waehlt #raster .kachel > .herz { display: none; }
/* Auf kleinen Kacheln nur das Nötigste: kein Format, keine Länge. */
#raster .kachel { container-type: inline-size; }
@container (max-width: 72px) {
  .kachel .schild, .kachel .dauer { display: none; }
  .kachel > .ort { display: none; }
}

#betrachter { position: fixed; inset: 0; background: #000; z-index: 10; display: flex; align-items: center; justify-content: center; }
#betrachter figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#betrachter img, #betrachter video { max-width: 100vw; max-height: calc(100vh - 40px); object-fit: contain; }
#betrachter figure { touch-action: none; position: relative; }
/* Gesichtsrahmen im Betrachter (#190) – Farben wie am Rechner: benannt
   grün, unbenannt orange, beiseitegelegt grau. Die Fläche liegt genau über
   dem Bild und macht dessen Zoom und Verschiebung mit. */
#rahmenflaeche { position: absolute; pointer-events: none; transform-origin: 50% 50%; }
#rahmenflaeche.gleitet { transition: transform .18s ease-out; }
#rahmenflaeche.ziehen { pointer-events: auto; cursor: crosshair; }
#rahmenflaeche .rahmen { position: absolute; box-sizing: border-box; border: 2px solid #ffab40; border-radius: 3px; pointer-events: auto; cursor: pointer; background: none; padding: 0; }
#rahmenflaeche.ziehen .rahmen { pointer-events: none; }
#rahmenflaeche .rahmen.benannt { border-color: #69f0ae; }
#rahmenflaeche .rahmen.beiseite { border-color: #9e9e9e; border-style: dashed; }
#rahmenflaeche .rahmen .name { position: absolute; left: -2px; top: 100%; margin-top: 2px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.78); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
#rahmenflaeche .neu { position: absolute; box-sizing: border-box; border: 2px dashed #18ffff; background: rgba(24,255,255,.12); pointer-events: none; }
#gesichter-knopf[aria-pressed="true"], #aufziehen-knopf[aria-pressed="true"] { background: #fff; color: #000; }
#video-hinweis { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; max-width: min(28em, 80vw); padding: 12px 16px; border-radius: 12px; background: rgba(0,0,0,.72); color: #fff; text-align: center; pointer-events: none; }
#live { width: auto !important; height: 28px !important; line-height: 25px !important; margin-top: 8px; padding: 0 9px; border: 1.5px solid rgba(255,255,255,.85) !important; border-radius: 14px !important; font-size: 11px !important; font-weight: 700; letter-spacing: .08em; }
#live.aktiv { background: #fff; color: #000; }
#betrachter img { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; will-change: transform; }
#betrachter .gleitet { transition: transform .18s ease-out; }
#betrachter > button, #betrachter > a, #betrachter figcaption { transition: opacity .2s; z-index: 1; }
#betrachter.still > button, #betrachter.still > a, #betrachter.still figcaption { opacity: 0; pointer-events: none; }
#betrachter figcaption { color: #ddd; font-size: 0.9em; padding: 8px; height: 40px; }
#betrachter > button { position: absolute; background: rgba(0,0,0,.45); color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 26px; line-height: 44px; padding: 0; }
#zu { top: 12px; right: 12px; }
#zurueck { left: 12px; top: 50%; transform: translateY(-50%); }
#vor { right: 12px; top: 50%; transform: translateY(-50%); }
#favorit { font-size: 22px; }
#betrachter .oben-links { top: 12px; left: calc(12px + var(--platz, 0) * 56px); }
#teilen, #weg, #holen { font-size: 20px; }

/* --- Stufe 2: Wege, Karten, Auswahl, Konto -------------------------------- */
#kopf #auswaehlen.aktiv { background: color-mix(in srgb, var(--akzent) 16%, var(--karte)); border-color: var(--akzent); color: var(--akzent); }
main#inhalt section h2 { font-size: 1.1em; margin: 16px 12px 8px; }
#raster-titel { font-size: 1.1em; margin: 16px 12px 4px; }

.zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; }
.zeile input[type=search] { flex: 1; min-width: 12em; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
.zeile button { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; }

#karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding: 0 12px 24px; }
.albumkarte { color: var(--text); text-decoration: none; }
.albumbild { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--rand); }
.albumbild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.albumkarte.person .albumbild { border-radius: 50%; width: 70%; margin: 0 auto 6px; }
.albumkarte.person { text-align: center; }
.albumkarte .titel { margin-top: 6px; font-weight: 600; }
.klein { font-size: 0.85em; padding: 0; text-align: inherit; }

/* Gewählt rückt die Kachel ein und rundet sich; solange gewählt wird,
   zeigt jede Kachel ihren Kreis – wie auf dem Telefon. */
#raster .kachel.gewaehlt { background: color-mix(in srgb, var(--akzent) 22%, var(--grund)); }
#raster .kachel.gewaehlt img { transform: scale(0.86); border-radius: 12px; }
body.waehlt #raster .kachel::before { content: ''; position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 4px rgba(0,0,0,.55); box-sizing: border-box; z-index: 1; }
#raster .kachel.gewaehlt::after { content: '✓'; position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--akzent); color: var(--auf-akzent); font-size: 14px; line-height: 22px; text-align: center; z-index: 2; box-shadow: 0 0 0 2px #fff; }
#raster h2.monat { font-size: 1.25em; font-weight: 600; color: var(--text); margin: 22px 10px 0; }
#raster .tageskopf { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; padding: 6px 10px; background: none; border: 0; color: var(--text); font-weight: 600; font-size: 0.95em; text-align: left; border-radius: 8px; }
#raster .tageskopf:hover { background: var(--karte); }
#raster .tageskopf .tag { flex: 1; }
#raster .tageskopf .kreis { position: relative; flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--leise); opacity: .55; box-sizing: border-box; }
#raster .tageskopf:hover .kreis, body.waehlt #raster .tageskopf .kreis { opacity: 1; }
#raster .tageskopf.alle .kreis { background: var(--akzent); border-color: var(--akzent); opacity: 1; }
#raster .tageskopf.alle .kreis::after { content: '✓'; position: absolute; inset: 0; color: var(--auf-akzent); font-size: 12px; line-height: 18px; text-align: center; }

/* Das Blatt unter dem Raster, sobald etwas gewählt ist. */
#auswahlleiste { position: fixed; left: var(--seite); right: 0; bottom: 0; z-index: 5; background: var(--karte); border-top: 1px solid var(--rand); border-radius: 18px 18px 0 0; box-shadow: 0 -4px 18px rgba(0,0,0,.18); padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
#auswahlleiste .griffleiste { width: 36px; height: 4px; border-radius: 2px; background: var(--leise); opacity: .4; margin: 2px auto 4px; }
#auswahlleiste .auswahl-kopf { display: flex; align-items: center; gap: 8px; }
#auswahlleiste #auswahl-zu { background: none; border: 0; color: var(--text); font-size: 24px; width: 40px; height: 40px; padding: 0; }
#auswahlleiste #auswahl-anzahl { flex: 1; font-weight: 600; font-size: 1.05em; }
#auswahlleiste .auswahl-aktionen { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 8px; }
#auswahlleiste .auswahl-aktionen button { flex: 1 0 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 0; border-radius: 10px; background: none; color: var(--text); font-size: 0.8em; }
#auswahlleiste .auswahl-aktionen button:hover { background: var(--grund); }
#auswahlleiste .auswahl-aktionen .zeichen { font-size: 20px; line-height: 24px; color: var(--akzent); }
#auswahlleiste .auswahl-aktionen svg.zeichen { width: 24px; height: 24px; stroke-width: 1.9; }
/* Mit der Maus gibt es kein Wischen, und macOS blendet die Bildlaufleiste
   aus: Am Rechner stehen die Aktionen deshalb in Zeilen untereinander, statt
   rechts aus dem Blatt zu laufen – „Papierkorb“ war sonst nicht zu erreichen. */
@media (hover: hover) and (pointer: fine) {
  #auswahlleiste .auswahl-aktionen { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); overflow-x: visible; }
}
#auswahl-alben-feld { border-top: 1px solid var(--rand); padding-top: 8px; }
#auswahl-alben-feld h3 { margin: 0 4px 6px; font-size: 0.9em; }
#auswahl-alben { display: flex; gap: 10px; overflow-x: auto; padding: 0 4px 4px; }
.albumkachel { flex: 0 0 76px; display: flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 0; color: var(--text); font-size: 0.75em; text-align: left; }
.albumkachel .bild { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--grund); border: 1px solid var(--rand); display: flex; align-items: center; justify-content: center; color: var(--akzent); font-size: 28px; }
.albumkachel .bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.albumkachel .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.mit-leiste #ende { padding-bottom: 280px; }

/* Bildlaufleiste mit Monat beim Ziehen. */
#bildlauf { position: fixed; right: 0; top: 60px; bottom: 12px; width: 44px; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .2s; }
#bildlauf.sichtbar, #bildlauf.zieht { opacity: 1; }
#bildlauf.sichtbar #bildlauf-griff, #bildlauf.zieht #bildlauf-griff { pointer-events: auto; }
#bildlauf-griff { position: absolute; right: 0; top: 0; width: 40px; height: 44px; border-radius: 22px 0 0 22px; background: var(--karte); border: 1px solid var(--rand); border-right: 0; box-shadow: 0 1px 6px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; color: var(--leise); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
#bildlauf.zieht #bildlauf-griff { cursor: grabbing; }
#bildlauf-monat { position: absolute; right: 52px; top: 6px; white-space: nowrap; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; padding: 6px 12px; border-radius: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
#bildlauf-monat.laedt { opacity: .7; }
/* Die Jahre beim Ziehen (#278), nah am Griff keins – dort steht der Monat. */
#bildlauf-jahre { position: absolute; right: 46px; top: 0; bottom: 0; width: 64px; pointer-events: none; opacity: 0; transition: opacity .15s; }
#bildlauf.zieht #bildlauf-jahre { opacity: 1; }
#bildlauf-jahre span { position: absolute; right: 0; transform: translateY(-50%); font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 8px; background: color-mix(in srgb, var(--karte) 92%, transparent); color: var(--leise); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: opacity .1s; }
#bildlauf-jahre span.nah { opacity: 0; }

/* Kurze Meldungen und das Hochladen. */
#meldung { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; background: var(--text); color: var(--grund); padding: 10px 16px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.3); max-width: calc(100vw - 32px); }
body.mit-leiste #meldung { bottom: 250px; }
#hochladen-stand { position: fixed; right: 16px; bottom: 16px; z-index: 6; width: min(340px, calc(100vw - 32px)); background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.25); padding: 12px 14px; }
#hochladen-stand .hl-kopf { display: flex; justify-content: space-between; align-items: center; }
#hochladen-stand .hl-kopf button { background: none; border: 0; color: var(--text); font-size: 20px; padding: 0 4px; }
#hochladen-stand p { margin: 6px 0; overflow-wrap: anywhere; }
#hochladen-stand progress { width: 100%; accent-color: var(--akzent); }
#hochladen-fehler { margin: 4px 0; padding-left: 18px; color: var(--fehler); max-height: 8em; overflow: auto; }
#hochladen-abbrechen { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
#ablage { position: fixed; inset: 0; z-index: 30; background: color-mix(in srgb, var(--akzent) 25%, transparent); border: 4px dashed var(--akzent); display: flex; align-items: center; justify-content: center; pointer-events: none; }
#ablage p { background: var(--karte); color: var(--text); padding: 14px 20px; border-radius: 12px; font-weight: 600; }
@media (max-width: 520px) {
  #betrachter > button, #laden { width: 38px; height: 38px; line-height: 38px; font-size: 20px; }
  #betrachter .oben-links { top: calc(8px + var(--reihe, 0) * 44px); left: calc(8px + var(--platz, 0) * 44px); }
  #zu { top: 8px; right: 8px; }
}

#bereich-konto { padding: 0 12px 24px; max-width: 40em; }
#bereich-konto h3 { margin: 20px 0 6px; font-size: 1em; }
#geraete { list-style: none; padding: 0; margin: 0; }
#geraete li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rand); }
#geraete button, #bereich-konto > button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
.karte.schmal { margin: 8px 0; max-width: none; }
.karte.schmal .zeile { padding: 8px 0 0; }

dialog { border: 1px solid var(--rand); border-radius: 12px; background: var(--karte); color: var(--text); padding: 20px; max-width: 24em; }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog h3 { margin-top: 0; }
#album-liste { list-style: none; padding: 0; max-height: 40vh; overflow: auto; }
#album-liste li { padding: 4px 0; }
dialog label { display: block; margin: 10px 0 4px; }
dialog input[type=text], dialog input:not([type]) { width: 100%; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 16px 0 0; }
dialog menu button { padding: 8px 14px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
dialog menu button[type=submit], dialog menu button.primaer { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }

#laden { position: absolute; background: rgba(0,0,0,.45); color: #fff; border-radius: 50%; width: 44px; height: 44px; font-size: 22px; line-height: 44px; text-align: center; text-decoration: none; }
.karte label.zeile { display: flex; align-items: center; gap: 8px; padding: 12px 0 0; }
.karte label.zeile input { width: auto; display: inline; }

/* --- Stufe 3: Erinnerungen, Papierkorb, Verwaltung ------------------------- */
#erinnerungen h2 { font-size: 1.1em; margin: 16px 12px 6px; }
#erinnerungen-karten { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 8px; }
.erinnerung { position: relative; flex: 0 0 120px; height: 150px; border-radius: 12px; overflow: hidden; background: var(--rand); border: 0; padding: 0; cursor: pointer; }
.erinnerung img { width: 100%; height: 100%; object-fit: cover; display: block; }
.erinnerung span { position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-weight: 600; text-shadow: 0 0 6px #000; text-align: left; }
#server-stand, #konten { list-style: none; padding: 0; margin: 0; }
#server-stand li, #konten li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rand); }
.autoregeln { list-style: none; margin: 0; padding: 0; }
.autoregeln li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.autoregeln .wer { flex: 1; min-width: 12em; }
.autoregeln .text { color: var(--leise); font-size: 0.9em; }
.autoregeln button { padding: 6px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
.nur-ausloeser { display: grid; gap: 8px; }
.nur-ausloeser[hidden] { display: none; }
.ort-vorschlaege { display: grid; gap: 4px; margin-top: 8px; }
.ort-vorschlaege button { display: grid; gap: 2px; padding: 8px 10px; text-align: left; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
.ort-vorschlaege .neben { font-size: 0.85em; opacity: 0.75; }
.aussen-form { display: grid; gap: 8px; max-width: 34em; }
.aussen-form label { display: grid; gap: 4px; font-size: 0.9em; }
.aussen-form label[hidden] { display: none; }
.aussen-form input, .aussen-form select { padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
.aussen-form button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); margin-right: 6px; }
#konten button, #verwaltung > p button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); margin-left: 6px; }
#form-konto-neu input { padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
#anmeldung-fassung { text-align: center; margin-top: 12px; }

/* --- Karte ----------------------------------------------------------------- */
#karte { height: calc(100vh - var(--kopf) - var(--unten)); background: var(--grund); }
.punkt { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--akzent); color: var(--auf-akzent); font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
.punkt.gross { width: 44px; height: 44px; }
@media (prefers-color-scheme: dark) {
  /* Nur die Kacheln umkehren – Marker und Bedienelemente bleiben, wie sie sind. */
  .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.9); }
  .leaflet-container { background: #111; }
  .leaflet-control-attribution { background: rgba(0,0,0,.6); color: #ccc; }
}

/* --- Statistik ------------------------------------------------------------- */
#bereich-statistik { padding: 0 12px 24px; max-width: 60em; }
#bereich-statistik h3 { margin: 24px 0 8px; font-size: 1em; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kennzahl { background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; padding: 12px 14px; }
.kennzahl .wert { font-size: 1.4em; font-weight: 600; }
.kennzahl .name { color: var(--leise); font-size: 0.85em; }
.balken { display: flex; align-items: stretch; gap: 4px; height: 190px; padding: 10px 12px 6px; background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; overflow-x: auto; }
.balken .spalte { flex: 1 1 0; min-width: 24px; display: flex; flex-direction: column; align-items: center; }
.balken .wert { font-size: 0.7em; color: var(--leise); height: 1.2em; }
.balken .raum { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.balken .stab { width: 100%; max-width: 40px; background: var(--akzent); border-radius: 4px 4px 0 0; }
.balken .achse { font-size: 0.75em; color: var(--leise); margin-top: 4px; white-space: nowrap; }
.kameras { list-style: none; padding: 6px 0; margin: 0; background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; }
.kameras li { display: grid; grid-template-columns: minmax(8em, 14em) 1fr 4.5em; gap: 10px; align-items: center; padding: 6px 14px; font-size: 0.9em; }
.kameras .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kameras .leiste { height: 14px; background: color-mix(in srgb, var(--akzent) 15%, transparent); border-radius: 4px; overflow: hidden; }
.kameras .fuell { height: 100%; background: var(--akzent); border-radius: 4px; }
.kameras .n { text-align: right; color: var(--leise); }

/* --- Duplikate ------------------------------------------------------------- */
#bereich-duplikate { padding: 0 12px 24px; }
#bereich-duplikate .zeile { padding: 12px 0; }
#bereich-duplikate .zeile h2 { margin: 0; flex: 1; }
#bereich-duplikate .zeile label { display: flex; align-items: center; gap: 8px; color: var(--leise); }
#dupl-alle { background: var(--fehler); }
#bereich-aufnahmedaten .zeile { padding: 12px 0; }
#bereich-aufnahmedaten .zeile h2 { margin: 0; flex: 1; }
#daten-uebernehmen { background: var(--akzent); color: var(--auf-akzent); }
.datumszeile { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rand); cursor: pointer; }
.datumszeile img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; cursor: zoom-in; background: var(--rand); }
.datumszeile .inhalt { min-width: 0; }
.datumszeile .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datumszeile .neben { color: var(--leise); font-size: 0.85em; }
#datierung { margin-top: 24px; }
#datierung .datumszeile { cursor: default; }
.datierung-ende { margin-left: auto; flex: none; }
.datumsvorschlag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; color: var(--leise); font-size: 0.9em; }
.datumsvorschlag button { padding: 3px 10px; border: 1px solid var(--akzent); border-radius: 8px; background: none; color: var(--akzent); }
.gruppe { background: var(--karte); border: 1px solid var(--rand); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.gruppenkopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--leise); }
.gruppenkopf button, .dupl button { padding: 4px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
.reihe { display: flex; gap: 10px; overflow-x: auto; }
.dupl { flex: 0 0 150px; font-size: 0.85em; }
.dupl img { width: 150px; height: 150px; object-fit: cover; border-radius: 8px; display: block; cursor: zoom-in; background: var(--rand); }
.dupl.beste img { outline: 3px solid var(--akzent); outline-offset: -3px; }
.dupl .name { margin-top: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dupl .angaben { color: var(--leise); }
.dupl button { margin-top: 6px; }
.dupl.beste button { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }
.gruppenkopf button.aufraeumen { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }
.gruppenkopf button.aufraeumen:disabled { opacity: .45; }

/* --- Angaben im Betrachter, Serien ---------------------------------------- */
#info { font-size: 20px; font-weight: 700; font-family: Georgia, serif; }
#info[aria-pressed=true] { background: var(--akzent); }
#betrachter.mit-angaben figure { width: calc(100% - 340px); }
#betrachter.mit-angaben #vor { right: 352px; }
#angaben-feld { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; overflow-y: auto; background: var(--karte); color: var(--text); padding: 16px 16px 24px; border-left: 1px solid var(--rand); font-size: 0.9em; }
#angaben-feld h3 { margin: 0 0 12px; font-size: 1.05em; }
#angaben-feld .reihe { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--rand); }
#angaben-feld .reihe .zeichen { flex: 0 0 1.6em; text-align: center; color: var(--akzent); }
#angaben-feld .reihe .haupt { font-weight: 600; overflow-wrap: anywhere; }
#angaben-feld .reihe .neben { color: var(--leise); overflow-wrap: anywhere; white-space: pre-line; }
#angaben-feld .reihe .inhalt { flex: 1; min-width: 0; }
#angaben-feld a { color: var(--akzent); text-decoration: none; }
#angaben-feld .marke { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 10px; background: var(--grund); border: 1px solid var(--rand); font-size: 0.9em; }
#angaben-feld button.marke { font: inherit; font-size: 0.9em; color: inherit; cursor: pointer; }
#angaben-feld button.marke:hover { border-color: var(--akzent, var(--rand)); }
#angaben-feld .beschreibung { display: grid; gap: 6px; justify-items: start; }
#angaben-feld textarea { display: block; width: 100%; min-height: 3.5em; padding: 6px 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; resize: vertical; }
#angaben-feld .sterne button { background: none; border: 0; color: var(--leise); font-size: 20px; padding: 0 2px; line-height: 1; }
#angaben-feld .sterne button.voll { color: #e3a008; }
#angaben-feld details { margin-top: 6px; }
#angaben-feld details pre { white-space: pre-wrap; font: inherit; color: var(--leise); margin: 6px 0 0; }
#angaben-feld .speichern { padding: 4px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
@media (max-width: 700px) {
  #betrachter.mit-angaben figure { display: none; }
  #angaben-feld { width: 100%; border-left: 0; }
  #betrachter.mit-angaben #vor, #betrachter.mit-angaben #zurueck { display: none; }
}

/* --- Stammbaum ------------------------------------------------------------- */
#bereich-stammbaum { padding: 0 12px 24px; }
#bereich-stammbaum .zeile { padding: 12px 0; }
#bereich-stammbaum .zeile h2 { margin: 0; flex: 1; }
#bereich-stammbaum .zeile label { display: flex; align-items: center; gap: 8px; color: var(--leise); }
/* Ohne Hinweis kein Abstand: Der leere Absatz hielt mit seinem Innenrand
   den Baum gut 60 px vom Kopf fern. */
#baum-hinweis:empty, #lb-hinweis:empty { display: none; }
#baum-person { font: inherit; padding: 6px 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); max-width: 16em; }
/* Der Zierbaum wie am Rechner (#234): Grund still dahinter, der Baum auf
   einer Bühne, die man zieht und zoomt (stammbaum.js). */
#baum-flaeche { position: relative; overflow: hidden; height: 480px; min-height: 320px; border: 1px solid var(--rand); border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
#baum-flaeche.zieht { cursor: grabbing; }
#baum-grund { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#baum-buehne { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#baum-buehne svg { display: block; overflow: visible; }
.zb-schild { cursor: pointer; }
.zb-schild.mitte { cursor: inherit; }
.baum-knoepfe { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 14px; background: rgba(18, 16, 14, 0.62); }
.baum-knoepfe button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #f3e6c8; font-size: 19px; line-height: 1; cursor: pointer; }
.baum-knoepfe button:hover { background: rgba(255, 255, 255, 0.12); }

/* --- Einstellungen --------------------------------------------------------- */
#bereich-einstellungen { padding: 0 12px 24px; max-width: 44em; }
.einst { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.einst .inhalt { flex: 1; }
.einst .titel { font-weight: 600; }
.einst .text { color: var(--leise); font-size: 0.9em; }
.einst input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; }
.einst .regler { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.einst input[type=number] { width: 5em; padding: 4px 6px; border: 1px solid var(--rand); border-radius: 6px; background: var(--grund); color: var(--text); }

/* --- Entwickeln ------------------------------------------------------------ */
#bearbeiten { font-size: 20px; }
.entw { display: flex; gap: 0; min-height: calc(100vh - var(--kopf) - var(--unten)); background: #111; }
.entw-bild { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; min-width: 0; }
#entw-leinwand { max-width: 100%; max-height: calc(100vh - 130px - var(--unten)); object-fit: contain; display: block; }
.entw-bild .leise { color: #aaa; max-width: 40em; text-align: center; }
.entw-seite { width: 320px; flex: 0 0 320px; background: var(--karte); border-left: 1px solid var(--rand); padding: 12px 16px 24px; overflow-y: auto; max-height: calc(100vh - var(--kopf) - var(--unten)); }
.entw-seite h2 { margin: 4px 0 12px; font-size: 1.1em; }
.entw-regler-zeile { display: block; margin: 10px 0; }
.entw-regler-zeile.aus { opacity: .45; }
.entw-oben { display: flex; justify-content: space-between; font-size: 0.9em; }
.entw-zahl { color: var(--leise); font-variant-numeric: tabular-nums; }
.entw-regler-zeile input[type=range] { width: 100%; }
.entw-auto { display: flex; align-items: center; gap: 6px; margin: 14px 0 4px; font-size: 0.9em; }
.entw-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.entw-knoepfe button { padding: 8px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
.entw-knoepfe button.haupt { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); font-weight: 600; }
.entw-knoepfe button:disabled { opacity: .5; }
@media (max-width: 760px) {
  .entw { flex-direction: column; }
  .entw-seite { width: auto; flex: none; border-left: 0; border-top: 1px solid var(--rand); max-height: none; }
  #entw-leinwand { max-height: 55vh; }
}

/* --- Lebensbaum ------------------------------------------------------------ */
@font-face { font-family: 'Zierschrift'; src: url('schrift/ebgaramond.ttf') format('truetype'); font-weight: 400 800; font-style: normal; font-display: block; }
@font-face { font-family: 'Zierschrift'; src: url('schrift/ebgaramond.ttf') format('truetype'); font-weight: 400 800; font-style: italic; font-display: block; }
@font-face { font-family: 'Zierschrift Gross'; src: url('schrift/greatvibes.ttf') format('truetype'); font-display: block; }
#bereich-lebensbaum { padding: 0 12px 24px; }
.lb-leiste { padding: 12px 0; }
.lb-leiste h2 { margin: 0; flex: 1 0 100%; }
.lb-leiste label { display: flex; align-items: center; gap: 6px; color: var(--leise); }
.lb-leiste select { font: inherit; padding: 4px 6px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); max-width: 14em; }
.lb-leiste button, #baum-zum-lebensbaum { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); font-weight: 400; }
#lb-flaeche { display: flex; justify-content: center; }
#lb-leinwand { max-width: 100%; max-height: calc(100vh - 170px - var(--unten)); height: auto; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.35); cursor: pointer; }
.einst-sprache .inhalt { display: flex; flex-direction: column; gap: 4px; }
.einst-sprache select { align-self: flex-start; margin-top: 6px; font: inherit; padding: 4px 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }

/* --- Reisen und Aktivitäten ------------------------------------------------ */
#karten .abschnitt { grid-column: 1 / -1; }
#karten h3.abschnitt { margin: 18px 0 0; font-size: 1.05em; }
#karten p.abschnitt { text-align: left; padding: 4px 0; }
.albumbild { position: relative; }
.albumbild .kennzeichen { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 0.78em; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
#raster-kopf { padding: 0 12px 8px; }
.reisekopf .fakten { margin: 0 0 4px; color: var(--leise); }
.reisekopf .nebenzeile { margin: 2px 0; color: var(--leise); font-size: 0.9em; }
.reisekopf .nebenzeile a { color: var(--akzent); text-decoration: none; }
.reisekopf .notiz { margin: 8px 0; white-space: pre-line; }
.reisekopf h3 { margin: 14px 0 8px; font-size: 1em; }
.kartenreihe { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kartenreihe .albumkarte { flex: 0 0 160px; }
.routenkarte { height: 260px; margin: 10px 0 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--rand); isolation: isolate; }


/* Gesichter benennen: Gruppen ohne Namen, der Dialog, die Angaben. */
#ohne-namen { padding: 0 12px 8px; }
#ohne-namen .bib-kopf h3 { margin: 4px 0; font-size: 1em; }
#ohne-namen .bib-kopf .rechts { display: flex; align-items: baseline; gap: 10px; }
.kopf-menue { padding: 2px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font-size: 1.1em; line-height: 1.2; }
#wahl-dialog { max-width: 26em; width: calc(100vw - 32px); }
#wahl-titel { margin: 0 0 8px; }
#wahl-liste { display: grid; gap: 6px; }
#wahl-liste .wahl { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); text-align: left; }
#wahl-liste .wahl:hover:not(:disabled) { border-color: var(--akzent); }
#wahl-liste .wahl:disabled { opacity: .45; }
#wahl-liste .wahl.gefahr > span:first-child { color: var(--fehler); }
/* „Ignoriert“: antippen wählt aus, wie am Rechner. */
#karten > :is(.ignoriert-kopf, .ignoriert-raster) { grid-column: 1 / -1; }
.ignoriert-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 4px 12px; }
.ignoriert-kopf .leise { flex: 1 1 12em; text-align: left; }
.ignoriert-kopf button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
.ignoriert-kopf button.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.ignoriert-kopf button:disabled { opacity: .45; }
.ignoriert-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 0 4px; }
.ignoriert-raster .gesicht { padding: 0; border: 3px solid transparent; border-radius: 50%; overflow: hidden; background: var(--rand); }
.ignoriert-raster .gesicht img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .6; }
.ignoriert-raster .gesicht.gewaehlt { border-color: var(--akzent); }
.ignoriert-raster .gesicht.gewaehlt img { opacity: 1; }
.gesichtsgruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.gesichtsgruppe { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--rand); border-radius: 14px; background: var(--karte); color: var(--text); text-align: left; }
.gesichtsgruppe:hover { border-color: var(--akzent); }
.gesichtsgruppe .mosaik { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--rand); }
.gesichtsgruppe .mosaik img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gesichtsgruppe .wer { font-weight: 650; }
.gesichtsgruppe .leise { font-size: .8em; color: var(--leise); text-align: left; padding: 0; }
#gesicht-dialog { max-width: 30em; width: calc(100vw - 32px); }
#gesicht-dialog menu { flex-wrap: wrap; }
#gesicht-dialog menu button { white-space: nowrap; }
/* Löschen steht abseits und in Rot: Es nimmt den Rahmen aus dem Foto. */
#gesicht-loeschen { margin-right: auto; order: -1; color: var(--fehler); }
#gesicht-auswahl, #vorschlag-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 40vh; overflow: auto; }
#vorschlag-auswahl { max-height: 55vh; margin: 8px 0; }
:is(#gesicht-auswahl, #vorschlag-auswahl) .gesicht { padding: 0; border: 0; border-radius: 50%; overflow: hidden; aspect-ratio: 1; background: var(--rand); position: relative; }
:is(#gesicht-auswahl, #vorschlag-auswahl) .gesicht img { width: 100%; height: 100%; object-fit: cover; display: block; }
:is(#gesicht-auswahl, #vorschlag-auswahl) .gesicht.aus img { opacity: .25; filter: grayscale(1); }
/* Je Gesicht ein Knopf „Im Foto zeigen“ in der Ecke (#189). */
.gesicht-zelle { position: relative; aspect-ratio: 1; }
.gesicht-zelle .gesicht { width: 100%; height: 100%; }
.im-foto { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--karte); border-radius: 50%; background: var(--text); color: var(--karte); cursor: pointer; }
.im-foto .symbol { width: 15px; height: 15px; stroke-width: 2.2; }
.im-foto:hover { background: var(--akzent); color: var(--auf-akzent); }
#imfoto-dialog { max-width: min(1100px, calc(100vw - 32px)); padding: 12px; }
#imfoto-bild { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
#imfoto-bild img { display: block; max-width: 100%; max-height: calc(100vh - 160px); border-radius: 8px; }
.imfoto-rahmen { position: absolute; box-sizing: border-box; border: 2px solid rgba(255,255,255,.75); border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.imfoto-rahmen.benannt { border-color: #30a46c; }
.imfoto-rahmen.gewaehlt { border: 3px solid #f76b15; box-shadow: 0 0 0 1px rgba(0,0,0,.4); z-index: 1; }
.imfoto-rahmen .name { position: absolute; left: -2px; top: 100%; margin-top: 3px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.75); color: #fff; font-size: .75em; white-space: nowrap; }
#imfoto-text { margin: 8px 4px 0; }
/* Rückblick, Jahresrückblick, Kalender (#185) */
#rueckblick-inhalt { padding: 0 16px 32px; max-width: 1100px; }
.rb-abschnitt { margin-top: 22px; }
.rb-abschnitt h3 { margin: 0 0 10px; }
.rb-liste { display: flex; flex-direction: column; gap: 14px; }
.rb-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-weight: 600; }
.rb-knopf { display: inline-flex; align-items: center; justify-content: center; padding: 5px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); font: inherit; font-size: .85em; font-weight: 500; cursor: pointer; }
.rb-knopf:hover { border-color: var(--akzent); }
.rb-streifen { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.rb-bild { flex: none; width: 112px; height: 112px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--rand); cursor: pointer; }
.rb-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.rb-auswahl .rb-bild { width: auto; height: auto; aspect-ratio: 1; }
.rb-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.rb-jahr { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding: 16px 18px; border-radius: 14px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #d6409f, #6e56cf); }
.rb-jahr strong { font-size: 1.25em; }
.rb-jahr .leise { color: rgba(255,255,255,.85); text-align: left; padding: 0; }
.rb-jahrkopf { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; }
.rb-jahrkopf h3 { margin: 0; flex: 1; text-align: center; font-size: 1.3em; }
.rb-jahrkopf .rb-knopf { text-decoration: none; min-width: 40px; font-size: 1.2em; }
.rb-jahrkopf .rb-knopf.aus { pointer-events: none; opacity: .35; }
/* Intelligente Alben (#187) */
.karten-abschnitt { grid-column: 1 / -1; margin: 12px 0 0; }
.albumkarte.intelligent .albumbild { display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--akzent), #6e56cf); }
.albumkarte.intelligent .albumbild .symbol { width: 42%; height: 42%; stroke-width: 1.6; }
.suche-merken { margin: 0 16px 8px; padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); font: inherit; cursor: pointer; }
.suche-merken:hover { border-color: var(--akzent); }
.rb-jahrkarte { grid-column: 1 / -1; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, #d6409f 12%, transparent); }
#vorschlag-dialog { width: min(560px, calc(100vw - 32px)); }
#gesicht-ja { margin-top: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; }
#zusammen-dialog select { width: 100%; padding: 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
.gesichter-reihe { display: flex; flex-wrap: wrap; gap: 10px; }
.angaben-gesicht { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px; padding: 0; border: 0; background: none; color: inherit; font-size: .75em; }
.angaben-gesicht img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--rand); box-shadow: 0 0 0 2px transparent; }
.angaben-gesicht.unbekannt img { box-shadow: 0 0 0 2px var(--akzent); }
.angaben-gesicht span { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Filter der Suche */
#form-suche #filter-knopf { background: var(--grund); color: var(--text); border: 1px solid var(--rand); }
#form-suche #filter-knopf.aktiv { background: color-mix(in srgb, var(--akzent) 16%, var(--grund)); border-color: var(--akzent); color: var(--text); font-weight: 600; }
#suchfilter { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 0 12px 8px; padding: 12px; border: 1px solid var(--rand); border-radius: 14px; background: var(--karte); }
#suchfilter[hidden] { display: none !important; }
.filter-feld { display: flex; flex-direction: column; gap: 4px; font-size: .9em; }
.filter-feld .filter-name { color: var(--leise); font-size: .85em; }
.filter-feld select, .filter-feld input[type=date] { padding: 6px 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; }
.filter-personen { flex-basis: 100%; }
#filter-personen { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--rand); border-radius: 18px; background: var(--grund); color: var(--text); }
.filter-person[aria-pressed=true] { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 16%, var(--grund)); }
.filter-gesicht { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, #8e4ec6 18%, var(--karte)); color: #8e4ec6; font-weight: 700; font-size: .8em; }
.filter-gesicht img { width: 100%; height: 100%; object-fit: cover; }
.filter-haken { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 6px; }
#filter-leeren { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
#suche-filterzeile { margin: 0 14px; text-align: left; padding: 0 0 4px; }

/* Die Seite einer Freigabe (teilen.html) */
body.teilen { min-height: 100vh; }
#teilen-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--rand); background: var(--karte); }
#teilen-kopf img { border-radius: 8px; flex: none; }
#teilen-kopf h1 { margin: 0; font-size: 1.15em; }
#teilen-unterzeile { margin: 2px 0 0; color: var(--leise); font-size: .85em; }
#teilen-inhalt { padding: 2px; }
#teilen-hinweis { padding: 24px 16px; }
#teilen-beitragen { margin: 10px; padding: 12px 14px; border: 1px solid var(--rand); border-radius: 14px; background: var(--karte); }
#teilen-beitragen h2 { margin: 0 0 4px; font-size: 1.05em; }
#teilen-beitragen .beitragen-kopf { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
#teilen-beitragen .beitragen-kopf p { margin: 0; }
#teilen-beitragen .knopf-datei { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px; background: var(--akzent); color: var(--auf-akzent); font-weight: 600; cursor: pointer; flex: none; }
#teilen-beitragen .knopf-datei input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#teilen-beitragen .knopf-datei:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
#teilen-beitragen .beitragen-name { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-width: 320px; font-size: .9em; }
#teilen-uploads { list-style: none; margin: 8px 0 0; padding: 0; }
#teilen-uploads li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--rand); font-size: .9em; }
#teilen-uploads li .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#teilen-uploads li progress { grid-column: 1 / -1; width: 100%; height: 6px; }
#teilen-uploads li.fertig > span:last-child { color: var(--akzent); }
#teilen-uploads li.fehler > span:last-child { color: #d33; }
#teilen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; }
#teilen-raster .kachel { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--rand); border: 0; padding: 0; cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 140px; }
#teilen-raster .kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
#teilen-raster .marke { position: absolute; right: 6px; bottom: 6px; color: #fff; text-shadow: 0 0 4px #000; font-size: 18px; }
#teilen-betrachter { position: fixed; inset: 0; background: #000; z-index: 10; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
#teilen-betrachter figure { margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
#teilen-betrachter img, #teilen-betrachter video { max-width: 100vw; max-height: 100vh; object-fit: contain; }
#teilen-betrachter > button, #teilen-betrachter > a { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 26px; line-height: 44px; text-align: center; text-decoration: none; cursor: pointer; }
#teilen-betrachter > button:disabled { opacity: .25; cursor: default; }
#t-zu { top: 12px; right: 12px; }
#t-laden { top: 12px; right: 64px; font-size: 22px !important; }
#t-zurueck { left: 12px; top: 50%; transform: translateY(-50%); }
#t-vor { right: 12px; top: 50%; transform: translateY(-50%); }
#t-hinweis { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: 12px 16px; border-radius: 12px; background: rgba(0,0,0,.72); color: #fff; }

/* Als Link teilen */
#link-dialog { max-width: 30em; width: calc(100vw - 32px); }
#link-dialog select { width: 100%; padding: 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
#link-dialog input[type=password] { width: 100%; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
#link-dialog label.haken { display: flex; align-items: center; gap: 8px; }
#link-dialog input[type=range] { width: 100%; }
#link-adresse { width: 100%; padding: 10px; border: 1px solid var(--akzent); border-radius: 8px; background: var(--grund); color: var(--text); font-family: ui-monospace, monospace; font-size: .85em; }
#freigaben { list-style: none; padding: 0; margin: 0; }
#freigaben li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rand); }
#freigaben li .knoepfe { display: flex; gap: 6px; flex: none; }
#freigaben button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
#beitraege { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.beitrag { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--rand); border-radius: 12px; background: var(--karte); }
.beitrag-bild { position: relative; width: 72px; height: 72px; flex: none; border-radius: 8px; overflow: hidden; background: var(--rand); display: flex; align-items: center; justify-content: center; font-size: 11px; text-align: center; }
.beitrag-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.beitrag-bild .unten-rechts { position: absolute; right: 4px; bottom: 3px; display: flex; align-items: center; gap: 2px; color: #fff; font-size: 10px; font-weight: 600; text-shadow: 0 0 3px #000; }
.beitrag-bild .zeichen { width: 15px; height: 15px; fill: #fff; stroke: none; filter: drop-shadow(0 0 2px rgba(0,0,0,.75)); }
.beitrag-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.beitrag-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beitrag .knoepfe { display: flex; gap: 6px; flex: none; }
.beitrag button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); color: var(--text); }
.beitrag button.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.beitrag.abgewiesen { opacity: .75; }
@media (max-width: 560px) { .beitrag { flex-wrap: wrap; } .beitrag .knoepfe { width: 100%; justify-content: flex-end; } }

/* Diashow (Issue #170): zwei Bilder übereinander, Überblendung und ein
   langsamer Zoom wie in der Diashow des Rechners. */
#diashow { position: fixed; inset: 0; z-index: 30; background: #000; overflow: hidden; cursor: none; }
#diashow.mit-leiste { cursor: default; }
#diashow .dia { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .8s ease-in-out; will-change: opacity, transform; }
#diashow .dia.sichtbar { opacity: 1; }
/* Diashow als Video (#281): die laufende Aufnahme im Kleinen. */
#diavideo-bild { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 8px 0; border-radius: 8px; background: #000; }
#diavideo-bild[hidden] { display: none; }
#diashow .dia.sichtbar.links { animation: dia-zoom-links 5s ease-out forwards; }
#diashow .dia.sichtbar.rechts { animation: dia-zoom-rechts 5s ease-out forwards; }
@keyframes dia-zoom-links { from { transform: scale(1); } to { transform: scale(1.06) translate(-1%, -1%); } }
@keyframes dia-zoom-rechts { from { transform: scale(1); } to { transform: scale(1.06) translate(1%, 1%); } }
@media (prefers-reduced-motion: reduce) { #diashow .dia.sichtbar.links, #diashow .dia.sichtbar.rechts { animation: none; } }
#dia-leiste { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .25s; pointer-events: none; }
#diashow.mit-leiste #dia-leiste { opacity: 1; pointer-events: auto; }
#dia-leiste button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
#dia-leiste button:hover { background: rgba(255,255,255,.15); }
#dia-stand { min-width: 4.5em; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Die Städte eines Landes über seinen Aufnahmen (Issue #173). */
.ortsreihe { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.ortsreihe .albumkarte { flex: 0 0 132px; }

/* --- Spur, Höhenprofil und Landschaft (Issue #181) --------------------------
   Die aufgezeichnete Spur unter der Karte einer Aktivität, und die
   Landschaft mit dem Flug darüber (gelaende.js). */
:root { --spur: #c2410c; }
@media (prefers-color-scheme: dark) { :root { --spur: #fb923c; } }
.spur { margin: 10px 0 4px; }
.spurkopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spurkopf h3 { flex: 1; margin: 6px 0; font-size: 1em; }
.spur .knopf-flach, .landschaft .knopf-flach, .landschaft .knopf, .l-videodialog .knopf, .l-videodialog .knopf-flach { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--rand); background: var(--karte); color: var(--text); font-weight: 560; white-space: nowrap; }
.spur .knopf-flach:hover, .landschaft .knopf-flach:hover { border-color: color-mix(in srgb, var(--akzent) 55%, var(--rand)); }
.spur .knopf-flach:disabled { opacity: .6; cursor: progress; }
.landschaft .knopf, .l-videodialog .knopf { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.spur .leise { text-align: left; padding: 0; margin: 4px 0; }
.hoehenprofil { position: relative; margin-top: 4px; }
.hoehenprofil svg, .l-profil svg { display: block; width: 100%; height: 140px; touch-action: pan-y; cursor: crosshair; }
.hoehenprofil .flaeche { fill: color-mix(in srgb, var(--akzent) 18%, transparent); }
.hoehenprofil .linie, .l-profil .linie { fill: none; stroke: var(--akzent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hoehenprofil .strich, .l-profil .strich { stroke: var(--fehler); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hoehenprofil .achse { display: flex; justify-content: space-between; font-size: .8em; color: var(--leise); }
.hoehenprofil .marke { position: absolute; top: 2px; right: 4px; padding: 2px 8px; border-radius: 8px; background: var(--karte); border: 1px solid var(--rand); font-size: .85em; }

body.landschaft-offen { overflow: hidden; }
.landschaft { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--grund); }
.l-kopf { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--rand); flex-wrap: wrap; }
.l-titel { flex: 1; min-width: 10em; }
.l-titel h2 { margin: 0; font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-titel .leise { text-align: left; padding: 0; margin: 0; }
.l-zu { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rand); background: var(--karte); color: var(--text); font-size: 22px; line-height: 1; padding: 0; }
.l-flaeche { position: relative; flex: 1; min-height: 0; }
.l-karte { position: absolute; inset: 0; z-index: 0; }
.l-laden { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--leise); }
.l-flugbild { position: absolute; z-index: 2; top: 12px; right: 56px; margin: 0; padding: 6px 6px 4px; border-radius: 10px; background: color-mix(in srgb, var(--karte) 92%, transparent); box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: opacity .25s; pointer-events: none; }
.l-flugbild img { display: block; width: min(240px, 38vw); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.l-flugbild figcaption { text-align: center; font-size: 11px; padding-top: 3px; }
.l-abspann { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 18px 28px; border-radius: 12px; background: color-mix(in srgb, var(--karte) 88%, transparent); box-shadow: 0 6px 24px rgba(0,0,0,.33); text-align: center; pointer-events: none; }
.l-gross { font-size: 34px; font-weight: 650; }
.l-zahlen { display: flex; gap: 28px; justify-content: center; margin-top: 6px; }
.l-zahlen div { display: flex; flex-direction: column; }
.l-zahlen b { font-size: 20px; }
.l-zahlen .leise, .l-wert .leise { padding: 0; text-align: inherit; }
.l-fuss { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 4px; margin: 0; font-size: 11px; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.8); pointer-events: none; text-align: right; }
.l-leiste { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rand); display: flex; flex-direction: column; gap: 6px; }
.l-reihe { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.l-reihe input[type=range] { flex: 1; min-width: 120px; accent-color: var(--akzent); }
.l-km { font-variant-numeric: tabular-nums; min-width: 5.5em; text-align: right; }
.l-werte { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; min-height: 1.4em; }
.l-wert { display: inline-flex; gap: 6px; align-items: baseline; font-variant-numeric: tabular-nums; }
.l-wert .l-auf { color: var(--fehler); }
.l-wert .l-ab { color: var(--akzent); }
.l-profil svg { height: 48px; cursor: default; }
.l-profil .flaeche { fill: color-mix(in srgb, var(--akzent) 10%, transparent); }
.l-profil .flaeche-voll { fill: color-mix(in srgb, var(--akzent) 26%, transparent); }
.l-profil .linie-blass { fill: none; stroke: color-mix(in srgb, var(--akzent) 45%, transparent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.l-ausgabe { display: flex; align-items: center; gap: 10px; }
.l-ausgabe progress { flex: 1; accent-color: var(--akzent); }
.l-menue { position: absolute; z-index: 4; min-width: 15em; padding: 6px; border-radius: 12px; background: var(--karte); border: 1px solid var(--rand); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.l-menue hr { border: 0; border-top: 1px solid var(--rand); margin: 4px 0; }
.l-punkt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; }
.l-punkt:hover { background: color-mix(in srgb, var(--akzent) 12%, transparent); }
.l-haken { width: 1em; color: var(--akzent); }
.l-fotomarke { padding: 2px; border: 2px solid #fff; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; }
.l-fotomarke img { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 5px; }
.l-schild { display: flex; align-items: flex-end; gap: 3px; pointer-events: none; }
.l-zeichen { font-size: 14px; line-height: 1; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.l-name { padding: 2px 5px; border: 1px solid; border-radius: 4px; background: rgba(255,255,255,.86); color: #222; font-size: 12px; white-space: nowrap; transform: translateY(-8px); }
.l-videokarte { position: fixed; left: -100000px; top: 0; }
.l-videodialog { max-width: 30em; width: calc(100vw - 32px); }
.l-videodialog .klein { margin: 12px 0 4px; }
.l-segmente { display: flex; gap: 6px; flex-wrap: wrap; }
.l-dauer { display: flex; align-items: center; gap: 10px; }
.l-dauer input { flex: 1; accent-color: var(--akzent); }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@media (max-width: 600px) {
  /* Schmal: Titel und Schliessen oben, die beiden Menüs darunter. */
  .l-titel { flex: 1 1 calc(100% - 52px); }
  .l-zu { order: 1; }
  .l-kopf .knopf-flach { order: 2; padding: 0 10px; font-size: .9em; }
  .l-flugbild { right: 8px; top: 56px; }
  .l-flugbild img { width: 34vw; }
}

/* Alben zwischen Konten teilen (#105) */
.teilungsliste { list-style: none; padding: 0; margin: 12px 0; }
.teilungszeile { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.teilungszeile .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.teilungszeile select { padding: 6px 8px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
#konten-neu select:first-child { flex: 1; min-width: 0; }
.teilungszeile button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }

/* Kommentare und „Gefällt mir“ in geteilten Alben (#297) */
#gefaellt, #kommentare-knopf { font-size: 16px; white-space: nowrap; min-width: 44px; width: auto; padding: 0 10px; }
#gefaellt.aktiv { background: var(--akzent); color: var(--auf-akzent); }
#kommentar-dialog { max-width: 32em; width: calc(100% - 32px); }
.kommentare { margin-bottom: 16px; }
.kommentarliste { list-style: none; padding: 0; margin: 0 0 10px; max-height: 50vh; overflow-y: auto; }
.kommentar { padding: 8px 0; border-bottom: 1px solid var(--rand); }
.kommentarkopf { display: flex; align-items: baseline; gap: 8px; }
.kommentarkopf .name { font-weight: 600; }
.kommentarkopf .kommentar-weg { margin-left: auto; border: none; background: none; color: var(--leise); font-size: 1.1em; cursor: pointer; }
.kommentar .text { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.kommentarform { display: flex; gap: 8px; align-items: flex-end; }
.kommentarform textarea { flex: 1; min-width: 0; resize: vertical; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); font: inherit; }

/* Albumregeln (#298) und eingeschränkte Partnerfreigabe (#299) */
.regelpersonen { list-style: none; padding: 0; margin: 8px 0; max-height: 40vh; overflow: auto; border: 1px solid var(--rand); border-radius: 8px; }
.regelpersonen li label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; }
.regelpersonen li label:hover { background: rgba(127,127,127,.12); }
.regelpersonen .anzahl { margin-left: auto; }
#regel-art label, .regelab { display: block; margin: 6px 0; }
#regel-suche { width: 100%; box-sizing: border-box; }
.kachel .partnermarke { position: absolute; left: 5px; top: 5px; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; pointer-events: none; }
.teilungszeile { flex-wrap: wrap; }
.teilungszeile .einschraenkung { flex-basis: 100%; margin-top: -4px; }

/* Nachlasskontakt (#300): wer Zugang verlangt, über der Zeitleiste */
#nachlass-hinweis { margin: 8px 0 12px; }
.nachlasszeile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, #d9534f 18%, var(--grund)); border: 1px solid color-mix(in srgb, #d9534f 45%, var(--rand)); margin-bottom: 6px; }
.nachlasszeile span { flex: 1; }
.nachlasszeile button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }

/* Collagen (#301) */
#collage-dialog { max-width: min(980px, 96vw); }
.collageflaeche { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 720px) { .collageflaeche { grid-template-columns: 1fr; } }
#collage-bild { width: 100%; max-height: 62vh; object-fit: contain; background: var(--rand); border-radius: 8px; transition: opacity .15s; }
#collage-bild.laedt { opacity: .55; }
.collagewahl { display: flex; flex-direction: column; gap: 12px; }
.collagewahl label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.collagevorlagen { display: flex; flex-wrap: wrap; gap: 6px; }
.collagevorlagen .gewaehlt { outline: 2px solid var(--akzent); }
.collagefarben { display: flex; gap: 8px; margin-top: 6px; }
.farbknopf { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--rand); padding: 0; cursor: pointer; }
.farbknopf.gewaehlt { outline: 2px solid var(--akzent); outline-offset: 2px; }
.collagereihe { display: flex; gap: 6px; overflow-x: auto; margin-top: 6px; }
.collagekachel { flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; }
.collagekachel.vorn { border-color: var(--akzent); }
.collagekachel img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Fotokammer (#336) */
#bereich-fotokammer { padding: 0 12px 24px; }
#bereich-fotokammer .zeile { padding: 12px 0; gap: 8px; flex-wrap: wrap; }
#bereich-fotokammer .zeile h2 { margin: 0; flex: 1; }
#bereich-fotokammer .zeile button { padding: 6px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--grund); color: var(--text); }
#bereich-fotokammer .zeile button.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
#bereich-fotokammer .zeile button:disabled { opacity: 0.5; }
.kammer-schalter { display: flex; align-items: center; gap: 8px; color: var(--leise); }
#kammer-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.kammerkachel { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--rand); cursor: pointer; }
.kammerkachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kammerkachel .ohne { display: flex; align-items: center; justify-content: center; height: 100%; padding: 6px; font-size: 0.8em; color: var(--leise); word-break: break-all; }
.kammerkachel .video { position: absolute; left: 6px; bottom: 4px; color: #fff; text-shadow: 0 0 3px #000; }
.kammerkachel::after { content: ''; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.8); box-shadow: 0 0 3px rgba(0, 0, 0, 0.5); }
#angaben-feld .formate { display: flex; flex-wrap: wrap; gap: 6px; }
#angaben-feld .formate a { padding: 2px 8px; border: 1px solid var(--rand); border-radius: 6px; color: inherit; text-decoration: none; }
#angaben-feld .formate a:hover { border-color: var(--akzent); }
.kammerkachel.gewaehlt { outline: 3px solid var(--akzent); outline-offset: -3px; }
.kammerkachel.abgelehnt img, .kammerkachel.abgelehnt .ohne { opacity: 0.35; }
.kammerkachel .sterne { position: absolute; left: 6px; top: 4px; color: #ffd54a; font-size: 0.9em; letter-spacing: 1px; text-shadow: 0 0 3px #000; }
.kammerkachel .nein { position: absolute; left: 6px; top: 2px; color: #ff6b6b; font-weight: 700; text-shadow: 0 0 3px #000; }
.kammerkachel.gewaehlt::after { background: var(--akzent); border-color: #fff; }
#kammer-gross { position: fixed; inset: 0; z-index: 60; background: #000; display: grid; grid-template-columns: 48px 1fr 48px; grid-template-rows: auto 1fr; align-items: center; }
#kammer-gross[hidden] { display: none; }
.kammer-gross-kopf { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: #ddd; }
.kammer-gross-kopf span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kammer-gross-kopf button { padding: 6px 12px; border: 1px solid #555; border-radius: 8px; background: #222; color: #eee; }
.kammer-gross-kopf button.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
#kammer-gross-sterne { display: flex; gap: 2px; }
#kammer-gross-sterne button { padding: 2px 4px; border: 0; background: transparent; color: #888; font-size: 1.3em; line-height: 1; }
#kammer-gross-sterne button.an { color: #ffd54a; }
#kammer-gross-ablehnen.an { background: #a33; border-color: #a33; color: #fff; }
#kammer-gross > button { height: 100%; border: 0; background: transparent; color: #aaa; font-size: 2.2em; cursor: pointer; }
#kammer-gross-bild { max-width: 100%; max-height: calc(100vh - 56px); margin: auto; object-fit: contain; }

/* Vorschläge und Rückblickausschlüsse passen auch auf schmale Bildschirme. */
.sammlungs-dialog { width: min(90vw, 42rem); max-height: 85vh; overflow: auto; }
.sammlungs-wahl { max-height: 12rem; overflow: auto; display: grid; gap: .4rem; }
.sammlungs-wahl label { display: flex; gap: .5rem; }
.sammlungs-zeit { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .5rem; }
.beschriftung { border-bottom: 1px solid var(--rand, #888); padding-block: .8rem; }
.beschriftung-bild { position: relative; width: 100%; max-width: 24rem; }
.beschriftung-bild img { display: block; width: 100%; }
.beschriftung-bild span { position: absolute; border: 2px solid #f5b400; color: #fff; background: #0005; box-sizing: border-box; }

/* Endgültige Schritte wie „Konto endgültig löschen“ (#507). */
button.gefahr { color: var(--fehler); border-color: var(--fehler); }
