/* Buddy – dunkel, rund, freundlich. Farben vom Buddy: Türkis, Navy, Weiss. Fürs iPhone gebaut. */
:root {
  --navy: #0e1e38;
  --navy-2: #16294a;
  --navy-3: #22395f;
  --navy-4: #2d4772;
  --tuerkis: #20c9b6;
  --tuerkis-dunkel: #17a092;
  --weiss: #f5f8fc;
  --leise: #a3b4cd;
  --gruen: #58c45c;
  --rot: #ff6b6b;
  --gelb: #ffcd40;
  --radius: 20px;
  --tipp: 44px;
  --app-hoehe: 100dvh;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--navy-2); }  /* Absicherung: ein Spalt unten hat die Farbe der Eingabeleiste */
body { background: var(--navy); }
html, body { margin: 0; color: var(--weiss);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .4; cursor: default; }
a { color: var(--tuerkis); }
code { background: #0a1629; padding: .1em .35em; border-radius: 6px; font: .88em/1.4 ui-monospace, Menlo, monospace; }
/* Codeblöcke scrollen waagrecht; Schatten am Rand zeigen, dass es weitergeht (scroll shadows) */
pre { padding: 10px 12px; border-radius: 12px; overflow-x: auto; margin: .4em 0;
  background:
    linear-gradient(to right, #0a1629 40%, #0a162900) left center / 28px 100% no-repeat local,
    linear-gradient(to left, #0a1629 40%, #0a162900) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, #20c9b6aa, #20c9b600) left center / 10px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, #20c9b6aa, #20c9b600) right center / 10px 100% no-repeat scroll,
    #0a1629;
  -webkit-overflow-scrolling: touch; max-width: 100%; }
pre code { background: none; padding: 0; white-space: pre; }
.leise { color: var(--leise); font-size: .88em; margin: .15em 0; }
.gut { color: var(--gruen); }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Icons ---------- */
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.icon .voll { fill: currentColor; stroke: none; }

/* ---------- Knöpfe ---------- */
.knopf { min-height: var(--tipp); padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--tuerkis); color: var(--navy); font-weight: 600; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; }
.knopf:active { background: var(--tuerkis-dunkel); }
.knopf.gross { width: 100%; min-height: 54px; font-size: 1.05em; }
.knopf.klein { min-height: 40px; padding: 0 16px; font-size: .9em; }
.knopf.breit { width: 100%; }
.leise-knopf { background: var(--navy-3); color: var(--weiss); }
.leise-knopf:active { background: var(--navy-4); }
.gefahr-knopf { background: var(--rot); color: #fff; }
.icon-knopf { width: var(--tipp); height: var(--tipp); flex: none; border: 0; border-radius: 50%;
  background: transparent; color: var(--weiss); display: grid; place-items: center; padding: 0; }
.icon-knopf:active { background: var(--navy-3); }
.icon-knopf.haupt { background: var(--tuerkis); color: var(--navy); }
.icon-knopf.haupt:disabled { background: var(--navy-3); color: var(--leise); opacity: 1; }
.icon-knopf.stopp { background: var(--rot); color: #fff; }

/* ---------- Login ---------- */
body.login { min-height: 100dvh; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.login-karte { width: 100%; max-width: 400px; text-align: center; }
.login-logo { border-radius: 50%; display: block; margin: 0 auto; }
.login h1 { margin: .3em 0 0; font-size: 1.7em; }
.login .leise { margin-bottom: 22px; }
.login details { margin-top: 14px; text-align: left; background: var(--navy-2); border-radius: var(--radius); padding: 4px 16px; }
.login summary { min-height: var(--tipp); display: flex; align-items: center; cursor: pointer; color: var(--leise); }
.login form, #code-ok { display: grid; gap: 12px; padding: 4px 0 14px; }
label { display: grid; gap: 6px; font-size: .88em; color: var(--leise); }
input { min-height: var(--tipp); padding: 0 14px; border-radius: 12px; border: 1px solid var(--navy-4);
  background: var(--navy); font-size: 17px; width: 100%; }
#einmalcode { font-size: 20px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
input:focus, textarea:focus { outline: 2px solid var(--tuerkis); outline-offset: 1px; }
.meldung { color: var(--rot); margin: 12px 0; }
.meldung.gut { color: var(--gruen); }

/* ---------- App-Gerüst ---------- */
body.app { position: fixed; inset: 0; background: var(--navy); display: flex; flex-direction: column;
  overflow: hidden; }
.kopf { display: flex; align-items: center; gap: 10px; flex: none;
  /* oben 12 px: Platz für Hüpfen (−9 px) und Gedankenblase – body.app schneidet am Bildschirmrand ab */
  padding: calc(env(safe-area-inset-top) + 12px) max(10px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  background: var(--navy-2); box-shadow: 0 1px 0 #ffffff12; z-index: 2; }
.kopf-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  background: none; border: 0; padding: 0; text-align: left; min-height: var(--tipp); justify-content: center; }
.kopf-text .name { font-weight: 700; font-size: 1.02em; line-height: 1.2; }
.zustand { color: var(--leise); font-size: .8em; line-height: 1.25; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.verlauf { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 12px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.hinweis { text-align: center; color: var(--leise); font-size: .85em; margin: 10px 20px; }

.nachricht { display: flex; gap: 6px; margin: 8px 0; align-items: flex-end; overflow: visible; }
.nachricht.von-benjamin { justify-content: flex-end; }
.inhalt { max-width: 80%; min-width: 0; padding: 8px 12px 6px; border-radius: var(--radius);
  background: var(--navy-2); overflow-wrap: anywhere; font-size: 16.5px; line-height: 1.45; }
.von-buddy .inhalt { border-bottom-left-radius: 6px; max-width: calc(80% + 10px); }
.von-benjamin .inhalt { background: var(--tuerkis); color: var(--navy); border-bottom-right-radius: 6px; }
.von-benjamin .inhalt a, .von-benjamin .inhalt code { color: var(--navy); }
.von-benjamin .inhalt code { background: #ffffff55; }
.nachricht.fehler .inhalt { box-shadow: inset 0 0 0 1px var(--rot); }
.nachricht.abgebrochen .inhalt { opacity: .75; }
.text > :first-child { margin-top: 0; }
.text > :last-child { margin-bottom: 0; }
.text p { margin: .35em 0; }
.text ul, .text ol { margin: .35em 0; padding-left: 1.3em; }
.text li { margin: .15em 0; }
.text h3, .text h4, .text h5, .text h6 { margin: .6em 0 .2em; font-size: 1em; }
.text blockquote { margin: .35em 0; padding-left: 10px; border-left: 3px solid var(--tuerkis); color: var(--leise); }
.fuss { font-size: .7em; opacity: .6; text-align: right; margin-top: 2px; }
.werkzeug { font-size: .78em; color: var(--leise); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bilder { display: flex; flex-wrap: wrap; gap: 6px; }
.bilder:empty { display: none; }
.bilder a { display: block; max-width: 100%; }
.bilder img { max-width: 100%; max-height: 300px; border-radius: 14px; display: block; margin-top: 6px; }

.mini-buddy { flex: none; width: 28px; height: 28px; }
.mini-buddy img { width: 28px; height: 28px; object-fit: contain; display: block; }  /* frei, ohne Kreis */
.nachricht.laeuft .text:empty::after { content: "…"; animation: punkt 1.2s infinite; letter-spacing: 2px; }

/* ---------- Eingabe unten (einhändig) ---------- */
.eingabe { flex: none; padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: var(--navy-2); box-shadow: 0 -1px 0 #ffffff12; }
/* Nur bei offener Tastatur: App auf die sichtbare Höhe (visualViewport) begrenzen; sonst füllt inset:0
   den ganzen Bildschirm bis unter die Home-Leiste. */
body.app.feste-hoehe { top: var(--app-oben, 0px); bottom: auto; height: var(--app-hoehe); }
html:has(body.app), body.app { overscroll-behavior: none; }
.diag { position: fixed; left: 4px; right: 4px; top: calc(env(safe-area-inset-top) + 2px); z-index: 50; pointer-events: none;
  background: #000c; color: #9ff; font: 11px/1.3 ui-monospace, Menlo, monospace; padding: 4px 6px; border-radius: 6px; }
.sa-sonde { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
body.tastatur .eingabe { padding-bottom: 8px; }  /* Home-Leiste ist hinter der Tastatur */
.zeile { display: flex; gap: 6px; align-items: flex-end; }
textarea#text { flex: 1; min-width: 0; min-height: var(--tipp); max-height: 132px; resize: none;
  padding: 10px 14px; border-radius: 22px; border: 1px solid var(--navy-4); background: var(--navy);
  font-size: 17px; line-height: 1.3; }
.vorschau { display: flex; gap: 10px; padding: 6px 4px 10px; overflow-x: auto; }
.vorschau-bild { position: relative; flex: none; width: 68px; height: 68px; border-radius: 14px; background: var(--navy-3); }
.vorschau-bild img { width: 68px; height: 68px; object-fit: cover; border-radius: 14px; display: block; }
.vorschau-bild.laedt img { opacity: .45; }
.vorschau-weg { position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--navy-2); background: var(--navy-4); color: #fff; display: grid; place-items: center; padding: 0; }
.vorschau-weg .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.vorschau-weg::before { content: ""; position: absolute; inset: -8px; }  /* grössere Tippfläche */
.lader { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid #ffffff55; border-top-color: #fff; animation: drehen .8s linear infinite; }

/* ---------- Buddy mit Zuständen (nur transform/opacity, CSP-konform) ----------
   ruhig: Atmen + gelegentliches Nicken · denkt: Gedankenblase · schreibt: Schreib-Wackeln ·
   arbeitet: Ball rollt daneben · fertig: Hüpfer + Haken-Abzeichen · fehler: Schütteln + rotes Abzeichen ·
   winkt: Begrüssung beim Öffnen */
.buddy { position: relative; width: var(--tipp); height: var(--tipp); flex: none; padding: 0; border: 0; background: none; overflow: visible; }
.buddy .figur { display: block; -webkit-transform: translateZ(0); width: 44px; height: 44px; transform-origin: 50% 100%; will-change: transform; }
.buddy img { width: 44px; height: 44px; object-fit: contain; display: block; transform-origin: 50% 85%;
  transition: filter .3s; }  /* frei auf dem Hintergrund, ohne Kreis/Ring – die Tippfläche (44 px) bleibt */
.buddy .blase, .buddy .abzeichen { position: absolute; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; }
.buddy .blase { top: -6px; right: -20px; background: var(--weiss); border-radius: 10px; padding: 3px 5px;
  display: flex; gap: 3px; transform: scale(.6); transform-origin: 0 100%; }
.buddy .blase::after { content: ""; position: absolute; left: -3px; bottom: -3px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--weiss); }
.buddy .blase i { width: 5px; height: 5px; border-radius: 50%; background: var(--navy); }
.buddy.denkt .blase i { animation: punkt 1.1s ease-in-out infinite; }
.buddy .blase i:nth-child(2) { animation-delay: .18s; }
.buddy .blase i:nth-child(3) { animation-delay: .36s; }
.buddy .abzeichen { right: -6px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid;
  place-items: center; transform: scale(0); box-shadow: 0 0 0 2px var(--navy-2); }
.buddy .abzeichen svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.buddy .abzeichen.gut { background: var(--gruen); }
.buddy .abzeichen.schlecht { background: var(--rot); }

.buddy.ruhig .figur, .buddy.arbeitet .figur { -webkit-animation: atmen 3.6s ease-in-out infinite; animation: atmen 3.6s ease-in-out infinite; }
.buddy.ruhig img, .buddy.arbeitet img { animation: nicken 8s ease-in-out infinite 2s; }
.buddy.denkt .blase { opacity: 1; transform: scale(1); }
.buddy.denkt .figur { animation: neigen 2.6s ease-in-out infinite; }
.buddy.schreibt .figur { animation: schreiben .45s ease-in-out infinite; }
.buddy.fertig .figur { animation: huepfen .55s cubic-bezier(.3, .7, .4, 1) 2; }
.buddy.fertig .abzeichen.gut { opacity: 1; transform: scale(1); animation: pop .45s ease-out; }
.buddy.fehler .figur { animation: schuetteln .42s ease-in-out 2; }
.buddy.fehler img { filter: drop-shadow(0 0 3px var(--rot)); }
.buddy.fehler .abzeichen.schlecht { opacity: 1; transform: scale(1); animation: pop .45s ease-out; }
.buddy.winkt .figur { animation: winken 1.6s ease-in-out 2; }
/* Eigene Bild-Animation aktiv (z. B. Benjamins Winke-GIF): keine zusätzliche CSS-Bewegung darüber */
.buddy.mit-anim .figur, .buddy.mit-anim img, .mini-buddy.mit-anim img { animation: none !important; }

.mini-buddy img { transform-origin: 50% 100%; }
.mini-buddy.denkt img { animation: neigen 2.6s ease-in-out infinite; }
.mini-buddy.schreibt img { animation: schreiben .45s ease-in-out infinite; }
.mini-buddy.fertig img { animation: huepfen-klein .55s cubic-bezier(.3, .7, .4, 1) 1; }
.mini-buddy.fehler img { animation: schuetteln .42s ease-in-out 1; filter: drop-shadow(0 0 2px var(--rot)); }

@keyframes atmen { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.06); } }
@keyframes nicken { 0%, 78%, 100% { transform: rotate(0); } 82% { transform: rotate(-15deg); } 87% { transform: rotate(9deg); }
  91% { transform: rotate(-5deg); } 95% { transform: rotate(0); } }
@keyframes neigen { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-11deg) translateY(-2px); } 60% { transform: rotate(6deg); } }
@keyframes schreiben { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-2px); } }
@keyframes rollen { 0% { transform: translateX(-2px) rotate(0); } 50% { transform: translateX(3px) rotate(180deg); }
  100% { transform: translateX(-2px) rotate(360deg); } }
@keyframes huepfen { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-8px) scale(1.03, .97); }
  60% { transform: translateY(0) scale(1.05, .94); } 75% { transform: translateY(-2px); } }
@keyframes huepfen-klein { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-5px); } 70% { transform: translateY(0); } }
@keyframes schuetteln { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-4deg); }
  40% { transform: translateX(5px) rotate(4deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes winken { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-18deg); } 35% { transform: rotate(15deg); }
  55% { transform: rotate(-13deg); } 75% { transform: rotate(8deg); } }
@keyframes drehen { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes punkt { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* Weniger Bewegung gewünscht: Zustände bleiben sichtbar (Blase, Ball, Abzeichen), aber ohne Animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Bottom-Sheets (Menü, Panels, Frage) ---------- */
dialog { color: var(--weiss); border: 0; padding: 0; }
dialog::backdrop { background: #000a; }
.blatt { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 520px; max-height: 88dvh;
  background: var(--navy-2); border-radius: 24px 24px 0 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px max(14px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 12px) max(14px, env(safe-area-inset-left)); }
.blatt[open] { animation: hoch .22s ease-out; }
@keyframes hoch { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.blatt.hoch { height: 88dvh; }
.blatt-griff { width: 40px; height: 5px; border-radius: 3px; background: var(--navy-4); margin: 2px auto 12px; }
.menue-kopf { display: flex; align-items: center; gap: 10px; margin: 0 4px 10px; }
@media (max-height: 700px) { .kachel { min-height: 60px; gap: 3px; } .zeile-knopf { min-height: 45px; } .menue-kopf { display: none; } }
.menue-kopf img { width: 40px; height: 40px; object-fit: contain; }
.menue-kopf div { display: flex; flex-direction: column; min-width: 0; }
.menue-kopf .leise { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.kachel { min-height: 70px; border: 0; border-radius: 16px; background: var(--navy-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--weiss); }
.kachel .icon { width: 26px; height: 26px; color: var(--tuerkis); }
.kachel span { font-size: .88em; font-weight: 600; }
.kachel:active, .zeile-knopf:active { background: var(--navy-4); }
.liste { display: flex; flex-direction: column; background: var(--navy-3); border-radius: 16px; overflow: hidden; margin-bottom: 10px; }
.zeile-knopf { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border: 0;
  background: none; text-align: left; font-size: .97em; }
.zeile-knopf + .zeile-knopf { box-shadow: inset 0 1px 0 #ffffff14; }
.zeile-knopf .icon { width: 22px; height: 22px; color: var(--leise); }
.zeile-knopf.gefahr, .zeile-knopf.gefahr .icon { color: var(--rot); }
.panel-kopf { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -8px;
  background: var(--navy-2); padding: 4px 0; z-index: 1; }
.panel-kopf h2 { margin: 0; font-size: 1.15em; }
.panel-inhalt { font-size: .95em; }
.job { background: var(--navy-3); border-radius: 16px; padding: 10px 12px; margin: 8px 0; }
.job-kopf { display: flex; justify-content: space-between; align-items: center; }
.job-titel { margin: 6px 0; overflow-wrap: anywhere; }
.job-frage { color: var(--gelb); }
.job-knoepfe { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.zusatz { display: grid; gap: 8px; margin-top: 10px; }
.zusatz textarea { border-radius: 12px; padding: 10px; background: var(--navy); border: 1px solid var(--navy-4); font-size: 17px; }
.marke { font-size: .78em; padding: 2px 10px; border-radius: 999px; background: var(--navy-2); white-space: nowrap; }
.marke.laeuft, .marke.fertig { background: #12443f; color: var(--tuerkis); }
.marke.entscheidung, .marke.wartend { background: #4a3d12; color: var(--gelb); }
.marke.fehlgeschlagen, .marke.gestoppt, .marke.unterbrochen { background: #4a1f2b; color: var(--rot); }
.status-zeile { display: flex; justify-content: space-between; align-items: center; min-height: 40px; border-bottom: 1px solid var(--navy-3); }
.laeufe { padding-left: 1.1em; font-size: .82em; color: var(--leise); overflow-wrap: anywhere; }
.frage { width: min(340px, calc(100% - 32px)); border-radius: var(--radius); background: var(--navy-2); padding: 18px; }
.frage p { margin-top: 0; }
.frage-knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- PC (Guacamole) ---------- */
.desktop { position: fixed; inset: 0; z-index: 10; background: #000; }
.desktop iframe { width: 100%; height: 100%; border: 0; display: block; }
.desktop-zu { position: absolute; top: calc(env(safe-area-inset-top) + 6px); right: max(8px, env(safe-area-inset-right));
  background: #000b; color: #fff; z-index: 11; }
.dialog-titel { margin: 0 0 4px; font-size: 1.05em; }
select { min-height: var(--tipp); padding: 0 12px; border-radius: 12px; border: 1px solid var(--navy-4);
  background: var(--navy); color: var(--weiss); font-size: 17px; width: 100%; }
.frage label { margin: 10px 0; }
.anim-liste { display: grid; gap: 6px; margin: 10px 0; }
.anim-eintrag { display: flex; align-items: center; gap: 10px; background: var(--navy-3); border-radius: 12px; padding: 6px 10px; }
.anim-eintrag img { width: 40px; height: 40px; object-fit: contain; }
.anim-eintrag span { flex: 1; font-size: .9em; }
/* Warteschlange: Nachrichten während einer laufenden Antwort */
.nachricht.wartet .inhalt { opacity: .8; }
.warte-hinweis { font-size: .72em; opacity: .85; margin-top: 2px; text-align: right; }
.wartend-zaehler { position: absolute; top: -4px; left: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gelb); color: var(--navy); font: 700 11px/18px sans-serif; text-align: center;
  pointer-events: none; box-shadow: 0 0 0 2px var(--navy-2); }
/* PC übernehmen: Tastatur-Knopf, verstecktes Eingabefeld (öffnet die iOS-Tastatur), Zusatzleiste */
.desk-tastatur { position: absolute; top: calc(env(safe-area-inset-top) + 6px); right: calc(max(8px, env(safe-area-inset-right)) + 52px);
  background: #000b; color: #fff; z-index: 11; }
.desk-eingabe { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; font-size: 16px;
  border: 0; padding: 0; z-index: 1; }
.desk-leiste { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; gap: 6px; overflow-x: auto;
  padding: 6px max(8px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 6px) max(8px, env(safe-area-inset-left));
  background: #0e1e38ee; -webkit-overflow-scrolling: touch; }
.desk-leiste button { flex: none; min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px;
  background: var(--navy-3); color: var(--weiss); font-size: 15px; }
.desk-leiste button.an { background: var(--tuerkis); color: var(--navy); }

/* offene iOS-Tastatur (Eingabe für den PC): Desktop + Zusatzleiste auf den sichtbaren Bereich über der Tastatur */
body.tastatur .desktop { top: var(--app-oben, 0px); bottom: auto; height: var(--app-hoehe); }
/* v13: iOS zeichnete hinter/unter dem Textfeld einen helleren Kasten bis zum unteren Rand (nur auf dem Gerät).
   Textfeld ohne System-Erscheinung, Fusszeile als abgeschlossene Ebene, nichts ragt heraus. */
.eingabe { position: relative; z-index: 3; overflow: hidden; isolation: isolate; }
textarea#text { -webkit-appearance: none; appearance: none; background-color: var(--navy); background-clip: padding-box;
  box-shadow: none; -webkit-tap-highlight-color: transparent; }
/* Bildansicht (Lightbox) */
.bildansicht { position: fixed; inset: 0; z-index: 30; background: #000e; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: calc(env(safe-area-inset-top) + 56px) 12px calc(env(safe-area-inset-bottom) + 16px); touch-action: pan-y pinch-zoom; }
.bildansicht img { max-width: 100%; max-height: 100%; min-height: 0; flex: 1 1 auto; object-fit: contain;
  -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.bild-knoepfe { display: flex; gap: 10px; flex: none; }
.bild-knoepfe a { text-decoration: none; }
.bild-zu { position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: max(10px, env(safe-area-inset-right));
  background: #fff2; color: #fff; }
/* v15: Bilder nicht antippbar, darunter «Herunterladen» */
.bild-box { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 100%; }
.bild-box img { -webkit-touch-callout: default; cursor: default; }
.bild-laden-knopf { min-height: 40px; gap: 6px; }
.bild-laden-knopf .icon { width: 18px; height: 18px; }
.von-benjamin .bild-laden-knopf { background: #ffffff40; color: var(--navy); }
.bild-hinweis { color: #fff; font-size: .95em; text-align: center; margin: 0; flex: none; }

