/* Vera - Gestaltung
 *
 * Futuristisch, aber ruhig: Die Zielgruppe sind Gemeinden, Bauhoefe und
 * Handwerksbetriebe. Tiefe und Leuchtkanten ja, Effekthascherei nein - wer
 * damit acht Stunden arbeitet, soll hinterher keine Kopfschmerzen haben.
 *
 * Bewegung ist sparsam und respektiert prefers-reduced-motion.
 */

:root {
    --grund:        #05070f;
    --grund-2:      #080c18;
    --flaeche:      rgba(255,255,255,.045);
    --flaeche-fest: #0d1322;
    --kante:        rgba(255,255,255,.10);
    --kante-hell:   rgba(255,255,255,.18);

    --schrift:      #e6ecf7;
    --schrift-leise:#8b98b4;

    --tuerkis:      #5eead4;
    --blau:         #38bdf8;
    --violett:      #a78bfa;
    --warn:         #fbbf24;
    --fehler:       #fb7185;

    --verlauf:      linear-gradient(120deg, var(--tuerkis), var(--blau) 55%, var(--violett));
    --rund:         14px;
    --rund-klein:   10px;
    --schatten:     0 18px 50px rgba(0,0,0,.55);
    --leiste-breit: 288px;

    /* Ab hier: was frueher fest in einzelnen Regeln stand. Erst mit
       einem Namen laesst es sich fuer die helle Fassung tauschen,
       ohne eine einzige Regel zu wiederholen (Max, 25.08.2026: Darstellung). */
    --schriftgroesse:  15px;
    --flaeche-2:       rgba(255,255,255,.085);  /* Knopf unter dem Zeiger */
    --feld:            rgba(0,0,0,.28);         /* Eingabefelder */
    --glas:            rgba(10,14,26,.72);      /* Anmeldekarte */
    --glas-stark:      rgba(10,14,26,.80);      /* Eingabeleiste */
    --glas-leiste:     rgba(6,9,18,.62);        /* Seitenleiste */
    --glas-voll:       rgba(6,9,18,.97);        /* Seitenleiste am Handy */
    --raster-linie:    rgba(255,255,255,.028);
    --balken-grund:    rgba(255,255,255,.09);
    --code-grund:      rgba(0,0,0,.42);
    --code-block:      rgba(0,0,0,.46);
    --kopfzeile:       rgba(255,255,255,.05);
    --zeile-hover:     rgba(255,255,255,.035);
    --schalter-aus:    rgba(255,255,255,.12);
    --schalter-knopf:  #fff;
    --blende-farbe:    rgba(0,0,0,.62);
    --verweis:         #7dd3fc;
    --schimmer-kraft:  .30;
    --auf-fehler:      #ffd7dd;   /* Schrift in roten Feldern */
    --auf-gut:         #cffaf1;
    --auf-beleg:       #ddd0ff;
    --auf-web:         #c9f7ee;
    --warn-schrift:    #ff8b96;

    /* Damit der Browser Rollbalken, Aufklappmenues und Kaestchen
       passend zeichnet - sonst bleibt das aufgeklappte Auswahlfeld
       dunkel, waehrend die Seite hell ist. */
    color-scheme: dark;
}

/* ------------------------------------------------------ Helle Fassung
 * Nur Namen werden getauscht, keine Regel doppelt geschrieben.
 * Die Markenfarben (Tuerkis, Blau, Violett) bleiben - sie tragen die
 * Wiedererkennung. Umgedreht wird, was auf Dunkel hell war: Schrift,
 * Kanten, Flaechen, Glas.
 *
 * Das Attribut setzt das kleine Skript im Kopf von index.html, BEVOR
 * gezeichnet wird - sonst blitzt beim Start die falsche Fassung auf.
 */
:root[data-thema="hell"] {
    --grund:           #f4f6fb;
    --grund-2:         #e9edf6;
    --flaeche:         rgba(9,14,28,.045);
    --flaeche-2:       rgba(9,14,28,.085);
    --flaeche-fest:    #ffffff;
    --kante:           rgba(9,14,28,.13);
    --kante-hell:      rgba(9,14,28,.24);

    --schrift:         #131a2b;
    --schrift-leise:   #5a6784;

    --feld:            rgba(255,255,255,.92);
    --glas:            rgba(255,255,255,.82);
    --glas-stark:      rgba(255,255,255,.90);
    --glas-leiste:     rgba(255,255,255,.74);
    --glas-voll:       rgba(255,255,255,.98);
    --raster-linie:    rgba(9,14,28,.05);
    --balken-grund:    rgba(9,14,28,.10);
    --code-grund:      rgba(9,14,28,.07);
    --code-block:      rgba(9,14,28,.05);
    --kopfzeile:       rgba(9,14,28,.05);
    --zeile-hover:     rgba(9,14,28,.035);
    --schalter-aus:    rgba(9,14,28,.18);
    --schalter-knopf:  #ffffff;
    --blende-farbe:    rgba(9,14,28,.38);
    --verweis:         #0369a1;
    --schatten:        0 18px 50px rgba(9,14,28,.16);
    --schimmer-kraft:  .16;

    /* Die getoenten Hinweisfelder bleiben zart - die Schrift darin muss
       deshalb dunkel werden. #ffd7dd auf Hellrosa waere unlesbar. */
    --auf-fehler:      #8a1c2b;
    --auf-gut:         #0e5a4b;
    --auf-beleg:       #45348a;
    --auf-web:         #0e5a4b;
    --warn-schrift:    #b3243a;

    color-scheme: light;
}

* { box-sizing: border-box; }

/* Das Attribut `hidden` muss staerker sein als jede eigene display-Regel.
 *
 * Der Browser bringt zwar `[hidden] { display: none }` mit, aber eine eigene
 * Klassenregel wie `.tor { display: grid }` hat dieselbe Gewichtung und
 * gewinnt, weil sie spaeter kommt. Folge: `hidden` blieb wirkungslos - nach
 * der Anmeldung stand das Anmeldeformular weiter ueber der Anwendung, und
 * beide Reiter waren gleichzeitig zu sehen. Von aussen sah das aus, als ginge
 * es nach der Anmeldung nicht weiter.
 *
 * Gefunden am 22.08.2026 mit einem Bildschirmfoto aus einem echten Browser -
 * die HTTP-Pruefungen davor waren alle gruen.
 */
[hidden] { display: none !important; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--grund);
    color: var(--schrift);
    /* Die Groesse kommt aus der Variablen - "Meine Daten" setzt sie.
       Alles, was keine eigene Groesse traegt (Antworten, Eingabefeld,
       Willkommenstext), waechst und schrumpft damit mit. */
    font: var(--schriftgroesse)/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ---------------------------------------------------------------- Hintergrund */
.raum { position: fixed; inset: 0; overflow: hidden; z-index: 0; }

.schimmer {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: var(--schimmer-kraft);
    will-change: transform;
}
.s1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax;
      background: radial-gradient(circle, #0ea5e9, transparent 68%);
      animation: treiben1 34s ease-in-out infinite; }
.s2 { width: 40vmax; height: 40vmax; right: -14vmax; top: 18vh;
      background: radial-gradient(circle, #7c3aed, transparent 68%);
      animation: treiben2 44s ease-in-out infinite; }
.s3 { width: 34vmax; height: 34vmax; left: 32vw; bottom: -18vmax;
      background: radial-gradient(circle, #14b8a6, transparent 68%);
      animation: treiben3 52s ease-in-out infinite; }

@keyframes treiben1 { 50% { transform: translate3d(7vw, 5vh, 0) scale(1.12); } }
@keyframes treiben2 { 50% { transform: translate3d(-6vw, 7vh, 0) scale(1.08); } }
@keyframes treiben3 { 50% { transform: translate3d(4vw, -6vh, 0) scale(1.15); } }

/* Feines Raster - gibt der Flaeche Tiefe, ohne aufzufallen */
.raster {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--raster-linie) 1px, transparent 1px),
        linear-gradient(90deg, var(--raster-linie) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 25%, transparent 78%);
}

@media (prefers-reduced-motion: reduce) {
    .schimmer { animation: none; }
    * { transition: none !important; }
}

/* ---------------------------------------------------------------- Bausteine */
.knopf {
    font: inherit;
    color: var(--schrift);
    background: var(--flaeche);
    border: 1px solid var(--kante);
    border-radius: var(--rund-klein);
    padding: 9px 14px;
    cursor: pointer;
    transition: background .16s, border-color .16s, transform .08s;
}
.knopf:hover { background: var(--flaeche-2); border-color: var(--kante-hell); }
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, a:focus-visible {
    outline: 2px solid var(--blau);
    outline-offset: 2px;
}

.knopf.haupt {
    background: var(--verlauf);
    color: #04121b;
    font-weight: 650;
    border: none;
}
.knopf.haupt:hover { filter: brightness(1.08); }
.knopf.breit { width: 100%; }
.knopf.leise-knopf { background: transparent; color: var(--schrift-leise); }
.knopf.leise-knopf:hover { color: var(--schrift); background: var(--flaeche); }

.knopf.rund {
    width: 42px; height: 42px; padding: 0;
    border-radius: 50%;
    display: grid; place-items: center;
    flex: 0 0 auto;
    font-size: 17px;
}
.knopf.rund.senden { background: var(--verlauf); color: #04121b; border: none; }
.knopf.rund.laeuft { background: var(--fehler); color: #1a0308; border: none; }

input, textarea, select {
    font: inherit;
    color: var(--schrift);
    background: var(--feld);
    border: 1px solid var(--kante);
    border-radius: var(--rund-klein);
    padding: 10px 12px;
    width: 100%;
}
select { cursor: pointer; }
option { background: var(--flaeche-fest); color: var(--schrift); }

.leise { color: var(--schrift-leise); font-size: .88em; }

.meldung {
    margin: 14px 0 0;
    padding: 10px 13px;
    border-radius: var(--rund-klein);
    background: rgba(251,113,133,.12);
    border: 1px solid rgba(251,113,133,.35);
    color: var(--auf-fehler);
    font-size: .92em;
}
.meldung.gut {
    background: rgba(94,234,212,.10);
    border-color: rgba(94,234,212,.35);
    color: var(--auf-gut);
}

/* ---------------------------------------------------------------- Marke */
.marke { display: flex; align-items: center; gap: 11px; }
.marke.gross { gap: 15px; margin-bottom: 26px; }
.marke h1 { margin: 0; font-size: 27px; letter-spacing: .5px; font-weight: 640; }
.marke span { font-size: 17px; font-weight: 640; letter-spacing: .4px; }
.unterzeile { margin: 2px 0 0; color: var(--schrift-leise); font-size: 12.5px; }

.zeichen { width: 34px; height: 34px; filter: drop-shadow(0 0 12px rgba(56,189,248,.45)); }
.zeichen.klein { width: 26px; height: 26px; }
.zeichen.riesig { width: 66px; height: 66px; opacity: .95; }

/* ---------------------------------------------------------------- Tor */
.tor {
    position: relative; z-index: 1;
    height: 100%;
    display: grid; place-items: center;
    padding: 20px;
    overflow-y: auto;
}
.tor-karte {
    width: min(430px, 100%);
    background: var(--glas);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--kante);
    border-radius: 22px;
    padding: 34px 30px 26px;
    box-shadow: var(--schatten);
    position: relative;
}
/* Leuchtkante oben - das eine Detail, das "futuristisch" traegt */
.tor-karte::before {
    content: ""; position: absolute; inset: -1px; border-radius: 22px;
    padding: 1px;
    background: linear-gradient(140deg, rgba(94,234,212,.55), transparent 42%,
                                transparent 62%, rgba(167,139,250,.45));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none;
}

.reiter { display: flex; gap: 6px; margin-bottom: 20px; }
.reiter button {
    flex: 1;
    font: inherit; font-size: 14px;
    color: var(--schrift-leise);
    background: transparent;
    border: none; border-bottom: 2px solid transparent;
    padding: 9px 4px; cursor: pointer;
    transition: color .16s, border-color .16s;
}
.reiter button.aktiv { color: var(--schrift); border-bottom-color: var(--blau); }

.tor-form { display: grid; gap: 14px; }
.tor-form label { display: grid; gap: 6px; font-size: 13.5px; color: var(--schrift-leise); }
.tor-form .knopf { margin-top: 6px; padding: 12px; }
.tor-fuss { margin: 4px 0 0; font-size: 12.5px; color: var(--schrift-leise); text-align: center; }

.rechtszeile {
    margin-top: 24px; padding-top: 16px;
    border-top: 1px solid var(--kante);
    display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
    font-size: 12px;
}
a { color: var(--verweis); text-decoration: none; }
a:hover { text-decoration: underline; }
.rechtszeile a { color: var(--schrift-leise); }

/* ---------------------------------------------------------------- Anwendung */
.anwendung {
    position: relative; z-index: 1;
    height: 100%;
    display: grid;
    grid-template-columns: var(--leiste-breit) 1fr;
}

.leiste {
    display: flex; flex-direction: column; gap: 14px;
    padding: 18px 14px;
    background: var(--glas-leiste);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid var(--kante);
    min-height: 0;
}

.verlauf {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;      /* sonst laesst sich die Liste seitlich wegschieben */
    display: grid;
    gap: 3px;
    align-content: start;
    margin: 0 -6px;
    padding: 0 6px;
}
.eintrag { min-width: 0; }
.verlauf-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
               color: var(--schrift-leise); margin: 14px 8px 4px; }

.eintrag {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 10px;
    border-radius: var(--rund-klein);
    cursor: pointer;
    color: var(--schrift-leise);
    font-size: 13.5px;
    border: 1px solid transparent;
    transition: background .14s, color .14s;
}
.eintrag:hover { background: var(--flaeche); color: var(--schrift); }
.eintrag.aktiv {
    background: rgba(56,189,248,.13);
    border-color: rgba(56,189,248,.30);
    color: var(--schrift);
}
/* min-width: 0 ist der entscheidende Teil: ein Flex-Element schrumpft
   sonst nicht unter die Breite seines Inhalts, und ein langer Titel schiebt
   das x aus dem Bild. */
.eintrag span {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Der Loeschknopf ist SICHTBAR - auch ohne Maus.
 *
 * Vorher stand hier `opacity: 0` mit Aufdecken bei :hover. Auf einem
 * Touchscreen gibt es kein :hover: das x war auf allen Eintraegen ausser dem
 * geoeffneten unsichtbar, liess sich aber anklicken. Gemeldet am 22.08.2026.
 * Ein Knopf, der loescht und den man nicht sieht, ist schlimmer als gar
 * keiner. */
.eintrag button {
    flex: 0 0 auto;
    opacity: .5;
    background: none;
    border: none;
    color: var(--schrift-leise);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    width: 30px;
    height: 30px;
    margin: -6px -4px -6px 0;   /* grosses Tippziel, ohne die Zeile zu dehnen */
    border-radius: 8px;
    display: grid;
    place-items: center;
    transition: opacity .14s, color .14s, background .14s;
}
.eintrag button:hover,
.eintrag button:focus-visible { opacity: 1; color: var(--fehler);
                                background: rgba(251,113,133,.12); }

/* Nur wo es einen Mauszeiger gibt, darf sich der Knopf zurueckhalten. */
@media (hover: hover) and (pointer: fine) {
    .eintrag button { opacity: 0; }
    .eintrag:hover button,
    .eintrag.aktiv button,
    .eintrag button:focus-visible { opacity: .75; }
}

.leiste-fuss { display: grid; gap: 10px; border-top: 1px solid var(--kante); padding-top: 12px; }
.speicher small { color: var(--schrift-leise); font-size: 11.5px; }
.speicher-balken { height: 4px; border-radius: 3px; background: var(--balken-grund); overflow: hidden; margin-bottom: 5px; }
.speicher-balken span { display: block; height: 100%; width: 0; background: var(--verlauf); transition: width .4s; }
.speicher-balken.voll span { background: var(--fehler); }

.konto { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.konto strong { display: block; font-size: 13.5px; font-weight: 600; }
.konto small { font-size: 11.5px; }

/* ---------------------------------------------------------------- Bühne */
.buehne { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.kopf {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--kante);
}

.lauf { flex: 1; overflow-y: auto; padding: 26px 22px 8px; scroll-behavior: smooth; }
/* Waehrend Vera schreibt: KEIN weiches Scrollen.
 *
 * Bei jedem Textstueck wird ans Ende gescrollt - rund 20-mal je Sekunde. Mit
 * "smooth" ist das jedes Mal eine Animation, die neu ansetzt, sobald der
 * Finger etwas verschoben hat. Der Finger verliert dann immer, und der
 * Verlauf laesst sich waehrend einer Antwort nicht nach oben schieben. */
.lauf.schreibt { scroll-behavior: auto; }

/* Zurueck ans Ende, wenn man weiter oben mitliest. Ohne diesen Knopf muesste
 * man sich durch eine wachsende Antwort zurueckarbeiten. */
.nach-unten {
    position: fixed;
    left: 50%;
    bottom: 108px;
    z-index: 30;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--kante-hell);
    background: var(--flaeche-fest);
    color: var(--schrift);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--schatten);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
}
.nach-unten.zeigen {
    opacity: .96;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .nach-unten { transition: none; }
}

/* ---------------------------------------------------------------- Willkommen */
.willkommen { max-width: 720px; margin: 8vh auto 0; text-align: center; }
.willkommen h2 { margin: 18px 0 6px; font-size: 27px; font-weight: 600; }
.vorschlaege {
    margin-top: 30px;
    display: grid; gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.vorschlag {
    font: inherit; font-size: 13.5px; text-align: left;
    color: var(--schrift-leise);
    background: var(--flaeche);
    border: 1px solid var(--kante);
    border-radius: var(--rund);
    padding: 13px 15px;
    cursor: pointer;
    transition: border-color .16s, color .16s, transform .1s;
}
.vorschlag:hover {
    color: var(--schrift);
    border-color: rgba(56,189,248,.42);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------------- Nachrichten */
.nachricht { max-width: 780px; margin: 0 auto 22px; display: flex; gap: 13px; }
.nachricht.von-nutzer { flex-direction: row-reverse; }

.kopfbild {
    width: 32px; height: 32px; flex: 0 0 auto;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700;
}
.von-vera .kopfbild { background: var(--verlauf); color: #04121b; }
.von-nutzer .kopfbild { background: var(--flaeche); border: 1px solid var(--kante); }

.blase {
    padding: 13px 17px;
    border-radius: var(--rund);
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}
.von-nutzer .blase {
    background: rgba(56,189,248,.13);
    border: 1px solid rgba(56,189,248,.26);
}
.von-vera .blase {
    background: var(--flaeche);
    border: 1px solid var(--kante);
}

.blase p { margin: 0 0 .7em; }
.blase p:last-child { margin-bottom: 0; }
.blase ul, .blase ol { margin: .3em 0 .8em; padding-left: 1.3em; }
.blase li { margin: .22em 0; }
.blase h1, .blase h2, .blase h3 { margin: .8em 0 .4em; font-size: 1.06em; font-weight: 640; }
.blase code {
    background: var(--code-grund); padding: 1px 5px; border-radius: 5px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .89em;
}
.blase pre {
    background: var(--code-block); padding: 13px 15px; border-radius: var(--rund-klein);
    overflow-x: auto; border: 1px solid var(--kante); margin: .6em 0;
}
.blase pre code { background: none; padding: 0; }
.blase table { border-collapse: collapse; width: 100%; margin: .6em 0; font-size: .93em; display: block; overflow-x: auto; }
.blase th, .blase td { border: 1px solid var(--kante); padding: 6px 10px; text-align: left; }
.blase th { background: var(--kopfzeile); }
.blase img { max-width: 100%; border-radius: var(--rund-klein); }
/* Bild aus der Bildersuche: steht als eigener Block ueber dem Satz dazu,
   nicht mitten im Text. */
.blase img.antwortbild { display: block; margin: .2em 0 .8em; }

.belege { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--kante);
          display: flex; flex-wrap: wrap; gap: 6px; }
.beleg {
    font-size: 11.5px; padding: 4px 9px; border-radius: 20px;
    background: rgba(167,139,250,.13); border: 1px solid rgba(167,139,250,.28);
    color: var(--auf-beleg);
}
.beleg.web { background: rgba(94,234,212,.11); border-color: rgba(94,234,212,.28); color: var(--auf-web); }

.werkzeuge { margin-top: 8px; display: flex; gap: 4px; }
.werkzeuge button {
    background: none; border: none; cursor: pointer;
    color: var(--schrift-leise); font-size: 12px; padding: 4px 8px;
    border-radius: 7px;
}
.werkzeuge button:hover { background: var(--flaeche); color: var(--schrift); }
.werkzeuge button.laeuft { color: var(--tuerkis); }

.stand {
    max-width: 780px; margin: -12px auto 20px; padding-left: 45px;
    font-size: 12.5px; color: var(--schrift-leise);
    display: flex; align-items: center; gap: 8px;
}
.puls {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--tuerkis);
    animation: pulsen 1.3s ease-in-out infinite;
}
@keyframes pulsen { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.25); } }

.tippen span {
    display: inline-block; width: 6px; height: 6px; margin-right: 4px;
    border-radius: 50%; background: var(--schrift-leise);
    animation: huepfen 1.3s ease-in-out infinite;
}
.tippen span:nth-child(2) { animation-delay: .18s; }
.tippen span:nth-child(3) { animation-delay: .36s; }
@keyframes huepfen { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

/* ---------------------------------------------------------------- Eingabe */
.eingabe-raum { padding: 8px 22px 14px; }

.anhaenge { max-width: 780px; margin: 0 auto 8px; display: flex; flex-wrap: wrap; gap: 7px; }
.anhang {
    display: flex; align-items: center; gap: 7px;
    background: var(--flaeche); border: 1px solid var(--kante);
    border-radius: 20px; padding: 5px 8px 5px 12px; font-size: 12.5px;
}
.anhang button { background: none; border: none; color: var(--schrift-leise);
                 cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px; }
.anhang button:hover { color: var(--fehler); }
.anhang.laedt { opacity: .6; }

.eingabe {
    max-width: 780px; margin: 0 auto;
    display: flex; align-items: flex-end; gap: 9px;
    background: var(--glas-stark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--kante);
    border-radius: 26px;
    padding: 7px 8px;
    transition: border-color .18s, box-shadow .18s;
}
.eingabe:focus-within {
    border-color: rgba(56,189,248,.45);
    box-shadow: 0 0 0 4px rgba(56,189,248,.09);
}
.eingabe textarea {
    flex: 1; border: none; background: none; padding: 11px 4px;
    resize: none; max-height: 220px; line-height: 1.5;
}
.eingabe textarea:focus { outline: none; }

/* Am Handy zwei Zeilen statt einer.
 *
 * Textfeld und VIER runde Knoepfe teilten sich eine Zeile. Bei 360 px
 * Bildschirmbreite und rund 200 px Knoepfen blieben dem Text keine
 * 150 px: Ein normaler Satz brach auf sieben Zeilen um, und das Feld
 * wuchs ueber den halben Bildschirm. Jetzt steht der Text oben ueber
 * die volle Breite, die Knoepfe darunter.
 *
 * order: -1 statt einer Umstellung im HTML: Die Reihenfolge im
 * Quelltext bleibt so, wie eine Vorlesehilfe sie braucht - erst der
 * Anhang-Knopf, dann das Feld.
 * Gemeldet von Max mit Bildschirmfoto, 26.08.2026.
 */
@media (max-width: 560px) {
    .eingabe {
        flex-wrap: wrap;
        align-items: center;
        border-radius: 22px;
        padding: 6px 10px 8px;
        row-gap: 4px;
    }
    .eingabe textarea {
        order: -1;
        flex: 1 0 100%;
        width: 100%;
        padding: 9px 6px 3px;
        max-height: 160px;
    }
    .eingabe .knopf.rund { width: 40px; height: 40px; font-size: 16px; }
    /* Senden nach rechts - dort sucht der Daumen ihn. */
    .eingabe #knopf-senden { margin-left: auto; }
}

.knopf.rund.hoert { background: var(--fehler); color: #fff; border: none;
                    animation: pulsen 1.1s ease-in-out infinite; }

.hinweiszeile { max-width: 780px; margin: 8px auto 0; text-align: center; font-size: 11.5px; }
.hinweiszeile a { color: var(--schrift-leise); }

/* Der Stand einer laufenden Antwort: Satz, Balken, Zahlen.
   Der Balken erscheint nur, wo der Anteil wirklich bekannt ist. */
.lauf-stand { margin-top: 10px; }
.stand-satz { font-size: .88em; color: var(--schrift-leise); }
.stand-zahlen { font-size: .82em; color: var(--schrift-leise);
                margin-top: 4px; font-variant-numeric: tabular-nums; }
.ladebalken {
    height: 5px; margin-top: 7px; border-radius: 3px;
    background: var(--balken-grund); overflow: hidden;
}
.ladebalken span {
    display: block; height: 100%; width: 0;
    background: var(--verlauf);
    transition: width .5s ease;
}

/* Der Balken auf dem STROMWEG haengt als Geschwister unter der
   Standzeile - .stand ist ein Flex-Element und vertruege kein
   Blockkind. Damit er nicht am linken Rand klebt, teilt er deren
   Geometrie; der negative Abstand oben holt ihn unter den Satz. */
.stand-fortschritt {
    max-width: 780px; margin: -16px auto 20px; padding-left: 45px;
}
.stand-fortschritt:empty { display: none; }
.stand-fortschritt .lauf-stand { margin-top: 0; }

/* ---------------------------------------------------------------- Fenster */
.blende { position: fixed; inset: 0; background: var(--blende-farbe);
          backdrop-filter: blur(3px); z-index: 40; }

.fenster {
    position: fixed; z-index: 41;
    left: 50%; top: 50%; transform: translate(-50%,-50%);
    width: min(560px, calc(100vw - 32px));
    max-height: min(76vh, 700px);
    overflow-y: auto;
    background: var(--flaeche-fest);
    border: 1px solid var(--kante-hell);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--schatten);
}
.fenster.gross { width: min(880px, calc(100vw - 32px)); }
.fenster h3 { margin: 0 0 5px; font-size: 18px; font-weight: 620; }
.fenster-fuss { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }

.liste { margin-top: 16px; display: grid; gap: 8px; }
.zeile {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px;
    background: var(--flaeche); border: 1px solid var(--kante);
    border-radius: var(--rund-klein);
}
/* Der Textblock waechst und schiebt Knoepfe und Schalter nach rechts.
   Der zweite Selektor kam am 25.08.2026 dazu: Seit der Aufklapp-Pfeil
   VOR dem div steht, ist das div nicht mehr :first-child - die Regel
   griff ins Leere, und die Umschalter klebten am Text, bei jeder Zeile
   woanders. */
.zeile > div:first-child,
.zeile > .aufklapp + div { flex: 1; min-width: 0; }
.zeile strong { display: block; font-size: 14px; font-weight: 600; }
.zeile small { color: var(--schrift-leise); font-size: 12px; }
.zeile select { width: auto; padding: 5px 8px; font-size: 12.5px; }

.schalter { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.schalter input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.schalter i {
    position: absolute; inset: 0; border-radius: 20px;
    background: var(--schalter-aus); transition: background .18s;
}
.schalter i::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--schalter-knopf); transition: transform .18s;
}
.schalter input:checked + i { background: var(--blau); }
.schalter input:checked + i::after { transform: translateX(18px); }

/* ---------------------------------------------------------------- Brotkrumen */
.brot { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
        z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.krume {
    background: var(--flaeche-fest); border: 1px solid var(--kante-hell);
    border-radius: 11px; padding: 10px 16px; font-size: 13.5px;
    box-shadow: var(--schatten);
    animation: auftauchen .22s ease-out;
    max-width: min(520px, calc(100vw - 32px));
}
.krume.fehler { border-color: rgba(251,113,133,.5); color: var(--auf-fehler); }
@keyframes auftauchen { from { opacity: 0; transform: translateY(9px); } }

/* ---------------------------------------------------------------- Schmal */
.nur-schmal { display: none; }

@media (max-width: 860px) {
    .anwendung { grid-template-columns: 1fr; }
    .leiste {
        position: fixed; inset: 0 auto 0 0; width: 84vw; max-width: 320px;
        z-index: 50; transform: translateX(-102%); transition: transform .24s ease;
        background: var(--glas-voll);
    }
    .leiste.offen { transform: none; }
    /* Nichts darf die Leiste breiter machen als den Bildschirm - sonst muss
       man zum Loeschknopf hin- und herwischen. */
    .leiste { overflow-x: hidden; }
    .leiste > * { min-width: 0; }
    .nur-schmal { display: grid; place-items: center; }
    .marke .nur-schmal { margin-left: auto; }
    .lauf, .eingabe-raum { padding-left: 14px; padding-right: 14px; }
    .kopf { padding: 10px 14px; }
    .willkommen { margin-top: 5vh; }
    .vorschlaege { grid-template-columns: 1fr; }
}

/* Zusaetze: Sammlungsverwaltung und Passwortaenderung */
.abschnitt-titel {
    margin: 22px 0 6px;
    font-size: 13px; font-weight: 620;
    text-transform: uppercase; letter-spacing: .7px;
    color: var(--schrift-leise);
}
.knopf.gefahr {
    background: rgba(251,113,133,.12);
    border-color: rgba(251,113,133,.35);
    color: var(--auf-fehler);
    margin-right: auto;
}
.knopf.gefahr:hover { background: rgba(251,113,133,.22); }
.zeile .knopf.leise-knopf { padding: 6px 10px; flex: 0 0 auto; }
#fenster-passwort .fenster-fuss { margin-top: 6px; }
/* ================================================================ Nachtrag
 * Kopfzeile ohne Modellauswahl.
 *
 * Die Auswahl ist entfallen: Es gibt nur ein Modell (siehe modell.py). In der
 * schmalen Ansicht brach sie ausserdem um und schob den Kopf auseinander -
 * auf dem Telefon sah das nach Fehler aus. Jetzt steht dort der Titel des
 * Gespraechs, was ohnehin nuetzlicher ist.
 */
.kopf {
    gap: 10px;
    min-height: 56px;
}
.kopf-titel {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    font-weight: 560;
    letter-spacing: .1px;
    color: var(--schrift);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#knopf-sammlungen {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

/* ---------------------------------------------------------------- Tabellen
 * Wetter- und Preisauskuenfte kommen als Markdown-Tabelle. Ohne Darstellung
 * standen die Striche roh in der Antwort.
 * Der Rahmen scrollt fuer sich - die Seite selbst darf nie seitlich wandern.
 */
.tabellenrahmen {
    margin: .7em 0;
    overflow-x: auto;
    border: 1px solid var(--kante);
    border-radius: var(--rund-klein);
    -webkit-overflow-scrolling: touch;
}
.blase .tabellenrahmen table {
    display: table;
    width: 100%;
    margin: 0;
    border: none;
    border-collapse: collapse;
    font-size: .92em;
    white-space: nowrap;
}
.blase .tabellenrahmen th,
.blase .tabellenrahmen td {
    border: none;
    border-bottom: 1px solid var(--kante);
    padding: 9px 13px;
    text-align: left;
}
.blase .tabellenrahmen thead th {
    background: var(--kopfzeile);
    font-weight: 620;
    font-size: .86em;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--schrift-leise);
    position: sticky;
    top: 0;
}
.blase .tabellenrahmen tbody tr:last-child td { border-bottom: none; }
.blase .tabellenrahmen tbody tr:hover { background: var(--zeile-hover); }

.blase hr {
    border: none;
    border-top: 1px solid var(--kante);
    margin: 1em 0;
}

/* ---------------------------------------------------------------- Schmal */
.nur-breit { display: inline; }

@media (max-width: 860px) {
    /* Auf dem Telefon nur das Rautensymbol - der Text sprengte den Kopf. */
    .nur-breit { display: none; }
    #knopf-sammlungen { padding: 9px 12px; }
    .kopf-titel { font-size: 14.5px; }
    .blase .tabellenrahmen th,
    .blase .tabellenrahmen td { padding: 7px 10px; font-size: .95em; }
    .nachricht { gap: 9px; margin-bottom: 18px; }
    .blase { padding: 11px 14px; }
}
/* Anleitung im Installieren-Hinweis (iPhone) */
.anleitung {
    margin: 16px 0 12px;
    padding-left: 22px;
    display: grid;
    gap: 9px;
    font-size: 14px;
}
.anleitung li { padding-left: 4px; }
.anleitung li::marker { color: var(--blau); font-weight: 640; }

/* --- Meine Daten ------------------------------------------------------ */
.datenblock {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid var(--rand, var(--kante));
}
.datenblock:first-of-type { border-top: 0; }
.datenblock > div { min-width: 0; }
/* Zwei Auswahlfelder nebeneinander, am Handy untereinander. */
.darstellung-wahl { display: flex; gap: 10px; flex: 0 0 auto; }
.darstellung-wahl label { display: grid; gap: 3px; }
.darstellung-wahl select { width: auto; padding: 6px 9px; font-size: 13px; }
@media (max-width: 560px) {
    .darstellung-wahl { width: 100%; }
    .darstellung-wahl label { flex: 1 1 0; min-width: 0; }
    .darstellung-wahl select { width: 100%; }
}

.datenblock strong { display: block; margin-bottom: 2px; }
.datenblock small { display: block; line-height: 1.45; }
.datenblock .knopf { flex: 0 0 auto; }
.datenblock.gefahr { margin-top: 4px; }
.knopf.warnung {
    border-color: #e0576855;
    color: var(--warn-schrift);
}
.knopf.warnung:hover:not(:disabled) {
    background: #e0576822;
    border-color: #e05768aa;
}
.daten-bestaetigung {
    display: block;
    margin-top: 10px;
    font-size: .85rem;
    opacity: .85;
}
.daten-bestaetigung input {
    display: block;
    width: 100%;
    margin-top: 4px;
}
@media (max-width: 520px) {
    .datenblock { flex-direction: column; align-items: stretch; }
}


/* --- Weitere Bereiche ------------------------------------------------- */
.bereiche {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 6px 0 8px;
    padding-top: 8px;
    border-top: 1px solid var(--kante);
}
.bereich {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--rund-klein);
    color: var(--schrift-leise);
    text-decoration: none;
    font-size: .92rem;
    transition: background .15s, color .15s;
}
.bereich:hover {
    background: var(--flaeche);
    color: var(--schrift);
}
.bereich-zeichen { font-size: 1.05rem; line-height: 1; flex: 0 0 auto; }
.bereich-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   Verbrauchsanzeige und Gruendlich-Schalter          (23.08.2026)
   ==========================================================================
   Der Kunde sah bisher nirgends, wieviel von seinem Tagesvolumen verbraucht
   ist - er merkte es erst, wenn eine Frage abgelehnt wurde. Die Zahl steht
   deshalb dort, wo das Auge beim Tippen ohnehin ist: unter dem Eingabefeld.

   Bewusst KEIN Balken. Ein Fortschrittsbalken, der sich fuellt, macht Druck;
   eine Zahl informiert. Erst ab vier Fuenfteln wird die Farbe deutlicher -
   dann ist der Hinweis auch etwas wert.
   ------------------------------------------------------------------------ */

.stand-verbrauch {
    display: inline-block;
    margin-right: 10px;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid var(--kante);
    background: var(--flaeche);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    cursor: default;
}

.stand-verbrauch.knapp {
    color: var(--warn);
    border-color: rgba(251, 191, 36, .35);
    background: rgba(251, 191, 36, .10);
}

/* Sparmodus: der Puffer laeuft. Kein Rot - es ist keine Stoerung, es geht ja
   weiter. Nur deutlich genug, dass die duennere Antwort erklaerbar ist. */
.stand-verbrauch.sparmodus {
    color: var(--warn);
    border-color: rgba(251, 191, 36, .55);
    background: rgba(251, 191, 36, .16);
    font-weight: 600;
}

/* --- Gruendlich-Schalter ------------------------------------------------- */

#knopf-gruendlich {
    position: relative;
    transition: background .15s, box-shadow .15s, opacity .15s;
}

#knopf-gruendlich[aria-pressed="true"] {
    background: rgba(94, 234, 212, .16);
    box-shadow: inset 0 0 0 1px rgba(94, 234, 212, .55);
}

/* Nicht im Tarif enthalten: sichtbar, aber gedaempft. Ausblenden waere
   bequemer und unehrlicher - der Kunde erfuehre nie, dass es das gibt,
   obwohl es auf der Preisseite steht. */
#knopf-gruendlich.gesperrt {
    opacity: .40;
}

/* --- Nutzung in "Meine Daten" -------------------------------------------- */

.nutzung-verlauf {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 46px;
    margin-top: 12px;
    padding: 0 1px;
    overflow-x: auto;
}

.nutzung-verlauf .tag {
    flex: 1 0 6px;
    min-width: 6px;
    border-radius: 2px 2px 0 0;
    background: var(--tuerkis);
    opacity: .55;
    min-height: 2px;
}

.nutzung-verlauf .tag.heute {
    opacity: 1;
    background: var(--blau);
}

/* Ein Tag ohne jede Anfrage bekommt trotzdem eine sichtbare Grundlinie -
   sonst sieht eine Luecke im Verlauf wie ein Darstellungsfehler aus. */
.nutzung-verlauf .tag.leer {
    background: var(--kante-hell);
    opacity: 1;
}

#block-nutzung .nutzung-zahl {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--schrift);
}

/* --- Hinweiszeile im Chat (Sparmodus, Dokumentkosten) -------------------- */

.chat-hinweis {
    margin: 10px auto;
    max-width: 760px;
    padding: 10px 14px;
    border-radius: var(--rund-klein);
    border: 1px solid rgba(251, 191, 36, .35);
    background: rgba(251, 191, 36, .10);
    color: var(--schrift);
    font-size: .92rem;
    line-height: 1.5;
}

.chat-hinweis b { color: var(--warn); }

@media (max-width: 560px) {
    .stand-verbrauch { margin-right: 6px; padding: 1px 6px; }
}

/* Hinweis ueber dem Eingabefeld: was die naechste Frage kostet.
   Ruhig gehalten - er steht dauerhaft da und darf nicht schreien. */
.hinweis-gruendlich {
    margin: 0 0 8px;
    padding: 8px 13px;
    border-radius: var(--rund-klein);
    border: 1px solid rgba(94, 234, 212, .28);
    background: rgba(94, 234, 212, .08);
    color: var(--schrift);
    font-size: .88rem;
    line-height: 1.45;
}

.hinweis-gruendlich b { color: var(--tuerkis); font-weight: 600; }

@media (max-width: 560px) {
    .hinweis-gruendlich { font-size: .84rem; padding: 7px 11px; }
}

/* Was die letzte Antwort gekostet hat - erscheint kurz neben dem Stand.
   Vorher laesst es sich nicht sagen: Ob Vera nachsehen muss, entscheidet
   sich an der Frage. */
.stand-zuwachs {
    display: inline-block;
    margin-right: 10px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(94, 234, 212, .16);
    color: var(--tuerkis);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
    transition: opacity .4s;
}


/* Werkzeugleiste ueber der Sammlungsliste: suchen und sortieren.
   Bei mehreren Wissensspeichern mit vielen Dokumenten waere die Liste
   sonst nur noch zum Scrollen (Max, 25.08.2026). */
.sammlung-werkzeuge {
    display: flex;
    gap: .5rem;
    margin: 0 0 .75rem;
    max-width: 100%;
}
.sammlung-werkzeuge input,
.sammlung-werkzeuge select {
    background: var(--feld, rgba(255,255,255,.04));
    color: inherit;
    border: 1px solid var(--rand, rgba(255,255,255,.12));
    border-radius: .5rem;
    padding: .45rem .6rem;
    font: inherit;
}
/* width: auto ist hier entscheidend. Global gilt
       input, textarea, select { width: 100%; }
   und damit ist die Flex-Grundbreite des Auswahlfeldes die volle Zeile.
   Zusammen mit "nicht schrumpfen" nahm es alles, und das Suchfeld
   blieb als leeres Kaestchen uebrig (Bildschirmfoto Max, 25.08.2026). */
.sammlung-werkzeuge input {
    flex: 1 1 auto;
    width: auto;
    min-width: 6rem;
}
.sammlung-werkzeuge select {
    flex: 0 1 auto;
    width: auto;
    max-width: 45%;
}

/* Die Dokumente einer Sammlung, eingerueckt darunter. */
.dokumente {
    margin: .25rem 0 .5rem 1.25rem;
    border-left: 2px solid var(--rand, rgba(255,255,255,.12));
    padding-left: .75rem;
}
.dokumente .zeile { padding: .3rem 0; }
/* Der Dateiname war ein <strong>, seit dem 25.08.2026 ist er ein
   Link zum Ansehen. Die alte Regel traf nichts mehr. */
.dokumente .zeile strong,
.dokumente .zeile .dateiname { font-weight: 500; }
.aufklapp {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 .4rem;
    opacity: .7;
}
.aufklapp:hover { opacity: 1; }


/* Dateien im Wissensspeicher: der Name ist der Link zum Ansehen, der
   Pfeil daneben laedt herunter (25.08.2026). */
.dateiname {
    /* Wie das <strong>, das hier vorher stand: eigene Zeile, damit die
       Beschreibung darunter steht und nicht daneben. */
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    word-break: break-word;
}
.dateiname:hover,
.dateiname:focus-visible { text-decoration: underline; }
.datei-werkzeuge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.datei-werkzeuge a.knopf {
    text-decoration: none;
    line-height: 1;
}


/* Fortschritt beim Ansehen eingescannter PDF (26.08.2026).
   Rund 35 s je Seite - ohne sichtbaren Balken haelt der Kunde die
   Sammlung fuer kaputt und laedt die Datei ein zweites Mal hoch. */
.balken {
    display: inline-block;
    width: 110px;
    height: 5px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 3px;
    background: var(--feld, rgba(0,0,0,.28));
    overflow: hidden;
}
.balken i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: var(--verlauf);
    transition: width .4s ease;
}
small.zeile-fehler { color: var(--fehler); }
@media (prefers-reduced-motion: reduce) {
    .balken i { transition: none; }
}


/* Rueckfrage mit Knoepfen (26.08.2026). EINE Runde, dann baut Vera.
   Ein Klick schickt die Auswahl als gewoehnliche Nachricht. */
.wahl {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--kante);
    border-radius: var(--rund-klein);
    background: var(--flaeche);
}
.wahl-gruppe { display: flex; flex-direction: column; gap: 7px; }
.wahl-frage { font-size: 13px; color: var(--schrift-leise); }
.wahl-knoepfe { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.wahl-option {
    font: inherit;
    font-size: 14px;
    color: var(--schrift);
    background: var(--flaeche-2);
    border: 1px solid var(--kante-hell);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
}
.wahl-option:hover { border-color: var(--tuerkis); }
.wahl-option[aria-pressed="true"] {
    background: var(--tuerkis);
    border-color: var(--tuerkis);
    color: #05070f;
}
.wahl-frei {
    font: inherit;
    font-size: 14px;
    color: var(--schrift);
    background: var(--feld);
    border: 1px solid var(--kante-hell);
    border-radius: 999px;
    padding: 6px 14px;
    min-width: 190px;
    flex: 1 1 190px;
}
.wahl-senden {
    align-self: flex-start;
    font: inherit;
    font-size: 14px;
    color: #05070f;
    background: var(--verlauf);
    border: 0;
    border-radius: 999px;
    padding: 8px 20px;
    cursor: pointer;
}
.wahl button:disabled, .wahl input:disabled { opacity: .5; cursor: default; }
.wahl-option:focus-visible, .wahl-senden:focus-visible, .wahl-frei:focus-visible {
    outline: 2px solid var(--tuerkis);
    outline-offset: 2px;
}


/* Dokumentansicht ueber der Unterhaltung (26.08.2026). Auf dem Telefon
   laeuft Vera als App ohne Adressleiste - ein Dokument in einem neuen
   Fenster zu oeffnen hiess dort, nicht mehr zurueckzukommen. */
body.ansicht-offen { overflow: hidden; }
.dokument-ansicht {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    background: var(--grund);
}
.da-kopf {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--kante);
    background: var(--flaeche-fest);
    padding-top: max(10px, env(safe-area-inset-top));
}
.da-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: var(--schrift);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.da-knopf {
    flex: 0 0 auto;
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    color: var(--schrift);
    background: var(--flaeche-2);
    border: 1px solid var(--kante-hell);
    border-radius: 999px;
    padding: 7px 15px;
    cursor: pointer;
}
.da-knopf:hover { border-color: var(--tuerkis); }
.da-zu { background: var(--verlauf); color: #05070f; border: 0; }
.da-knopf:focus-visible { outline: 2px solid var(--tuerkis); outline-offset: 2px; }
.da-rahmen {
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: #fff;
}
