/* Tresen, Gestaltung „Schaufenster“ (Planung\Tresen-Gestaltung.md).
   Drei Sätze: die Antwort zuerst; das Buch ist der Schmuck; großzügig, nicht
   verspielt. Aufbau: 1 Grundwerte, 2 Grundlagen, 3 Rahmen, 4 Bausteine,
   5 Start und Suche, 6 Trefferliste, 7 Vollanzeige, 8 Bewegung,
   9 schmale Fenster, 10 Druck.

   WER ETWAS ÄNDERN WILL, ÄNDERT ABSCHNITT 1. Farben, Schriftgrößen, Abstände,
   Rundungen und die Stufen der Dichte stehen nur dort; kein anderer Abschnitt
   nennt einen Farbwert. Eine Farbe steht als light-dark(hell, dunkel): beide
   Werte einer Rolle nebeneinander. Für Browser, die light-dark() nicht kennen,
   hängt der Tresen beim Ausliefern dieselben Werte noch einmal in alter
   Schreibweise an (TresenDesign); von Hand wird nichts doppelt gepflegt.
   Die Kontraste misst der Test TresenGestaltungTests; wer eine Farbe ändert,
   lässt ihn laufen. Nichts von fremden Servern; die Schrift liefert der
   eigene Server. Ein Zustand steht immer in Wort und Zeichen, nie nur in Farbe. */

/* ---------- 1 Grundwerte ---------- */

@font-face {
    font-family: "Bricolage Grotesque";
    /* Aufräumen 20: WOFF2 zuerst (halb so groß), die TrueType-Datei als Rückfall. */
    src: url("/tresen/schrift/bricolage-grotesque.woff2") format("woff2"), url("/tresen/schrift/bricolage-grotesque.ttf") format("truetype");
    /* Die Datei steht von sich aus auf „96pt ExtraBold“: Bereiche nennen, die Stärke überall ausdrücklich setzen. */
    font-weight: 200 800;
    font-stretch: 75% 100%;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;

    /* Farben je Rolle: light-dark(hell, dunkel). */
    --grund: light-dark(#FFFFFF, #0F1319);
    --flaeche: light-dark(#F1F3F7, #181D26);
    --flaeche-getoent: light-dark(#E9EEF6, #222B3A);
    --text: light-dark(#14181F, #EEF1F6);
    --text-leise: light-dark(#545C6B, #AEB7C6);
    --tinte: light-dark(#22407A, #A9C4FF);
    --tinte-tief: light-dark(#182F5C, #C9DAFF);
    --auf-tinte: light-dark(#FFFFFF, #0F1319);
    --zusage: light-dark(#1B6B4C, #74D6AC);
    --zusage-flaeche: light-dark(#E2F2EA, #14291F);
    --achtung: light-dark(#6B4300, #F2C879);
    --achtung-flaeche: light-dark(#FFF4DF, #2E2412);
    --fehler: light-dark(#8A2E25, #F5A79F);
    --fehler-flaeche: light-dark(#FBEEEC, #331C19);
    --rand: light-dark(#6F7887, #8E98A9);
    --linie: light-dark(#D9DEE7, #303A4A);
    --fokus: light-dark(#22407A, #A9C4FF);

    /* Das Buch gibt die Farbe: das Skript setzt --buch aus dem Titelbild (so dunkel, dass --auf-buch darauf lesbar ist). */
    --buch: light-dark(#22407A, #2B4477);
    --auf-buch: light-dark(#FFFFFF, #FFFFFF);
    --buch-anteil: 9%;

    /* Startseite Teil 2: die Farben der erfundenen Bücher in den Szenen der Startseite (Kinderbuch, Krimi,
       Kochbuch, Reiseführer, Sachbuch). Weiße Schrift (--auf-buch) darauf ist in hell und dunkel gemessen. */
    --buch-rot: light-dark(#A8322B, #962D26);
    --buch-nacht: light-dark(#1E2C55, #2A3D73);
    --buch-safran: light-dark(#8A5600, #7E4F00);
    --buch-tuerkis: light-dark(#0B6566, #0A5C5D);
    --buch-salbei: light-dark(#3F6448, #3A5C42);

    /* Schrift. */
    --schrift-schau: "Bricolage Grotesque", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --schrift-text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --schrift-fest: ui-monospace, "Cascadia Mono", Consolas, monospace;
    --schau-fett: 700;
    --schau-halbfett: 600;
    --schau-breite: 92%;

    /* Schriftgrößen (luftig). Bei 16 Punkt Grundschrift: Frage 40, Titel der Karte 30, Titel groß 48, Titel der Vollanzeige 58, Antwort und Preis 34. */
    --gr-frage: clamp(1.75rem, 1.15rem + 2.4vw, 2.5rem);
    --gr-titel-voll: clamp(1.75rem, 0.9rem + 3.4vw, 3.625rem);
    --gr-titel-gross: clamp(1.5rem, 0.9rem + 2.6vw, 3rem);
    --gr-titel-karte: clamp(1.3125rem, 1.05rem + 1vw, 1.875rem);
    --gr-antwort: clamp(1.375rem, 1rem + 1.3vw, 2.125rem);
    --gr-antwort-gross: clamp(1.5rem, 1.05rem + 1.7vw, 2.375rem);
    --gr-abschnitt: 1.3125rem;
    --gr-text-gross: 1.0625rem;
    --gr-text: 1rem;
    --gr-klein: 0.875rem;
    --gr-kleinst: 0.8125rem;
    --zeile-text: 1.5;
    --zeile-schau: 1.08;
    --zeilenlaenge: 64ch;

    /* Abstände. */
    --raum-1: 0.25rem;
    --raum-2: 0.5rem;
    --raum-3: 0.75rem;
    --raum-4: 1rem;
    --raum-5: 1.5rem;
    --raum-6: 2rem;
    --raum-7: 3rem;
    --breite: 82rem;
    --seitenrand: clamp(1rem, 3vw, 2.5rem);

    /* Form. */
    --rundung-karte: 1.625rem;
    --rundung-klein: 0.75rem;
    --rundung-bild: 0.375rem;
    --rundung-pille: 62rem;
    --ziel: 2.75rem;
    --ziel-haupt: 3.375rem;
    /* Tresen Teil 5: die Kacheln der Wahl „Wer arbeitet hier?“ (mit dem Finger: nie unter 64 hoch). */
    --ziel-kachel: max(4.5rem, 64px);
    --kachel-breite: 10.5rem;
    --gr-pin: 1.5rem;
    --pin-breite: 14rem;
    --suchfeld-hoehe: 4.25rem;
    --fokus-breite: 3px;

    /* Dichte „luftig“ (Vorgabe): Karten, Titelbilder, Abstände der Liste. */
    --karte-innen: 1.75rem;
    --karte-abstand: 1rem;
    --karte-spalte: 2rem;
    --bild-breite: 6.875rem;
    --bild-breite-klein: 4rem;
    --bild-breite-gross: 13.75rem;
    --antwort-breite: 21rem;
    --zeile-quelle: 6.5rem;
    --zeile-ruhig: 1.75rem;
    --platzhalter-schrift: 0.8125rem;
    --platzhalter-schrift-lang: 0.75rem;
    --platzhalter-schrift-sehr-lang: 0.6875rem;
    --platzhalter-schrift-gross: 1.125rem;

    /* Vollanzeige. */
    --titelbild-breite: 18rem;
    --ueberstand: 5rem;
    --buehne-innen: 2.25rem;
    --medium-breite: 5rem;
    --vorschau-breite: 6rem;
    --abstand-block: 1.5rem;
    --abstand-abschnitt: 0.75rem;

    /* Bewegung. */
    --dauer: 320ms;
    --verlauf: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Hell oder dunkel am Gerät gewählt (sonst nach dem System). */
:root[data-farbe="hell"] { color-scheme: light; }
:root[data-farbe="dunkel"] { color-scheme: dark; }

/* Dichte „kompakt“ (Kasse): kleinere Titelbilder, engere Karten, mehr Treffer auf einen Blick. */
:root[data-dichte="kompakt"] {
    --gr-frage: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
    --gr-titel-voll: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    --gr-titel-gross: clamp(1.3125rem, 1rem + 1.2vw, 1.875rem);
    --gr-titel-karte: 1.1875rem;
    --gr-antwort: 1.3125rem;
    --gr-antwort-gross: 1.5rem;
    --gr-abschnitt: 1.125rem;
    --gr-text-gross: 1rem;
    --rundung-karte: 1rem;
    --suchfeld-hoehe: 3.25rem;
    --ziel-haupt: 2.75rem;
    --karte-innen: 0.875rem;
    --karte-abstand: 0.5rem;
    --karte-spalte: 1rem;
    --bild-breite: 3.5rem;
    --bild-breite-klein: 2.75rem;
    --bild-breite-gross: 6.5rem;
    --antwort-breite: 23rem;
    --zeile-quelle: 3.5rem;
    --zeile-ruhig: 1.5rem;
    --platzhalter-schrift: 0.6rem;
    --platzhalter-schrift-lang: 0.52rem;
    --platzhalter-schrift-sehr-lang: 0.45rem;
    --titelbild-breite: 9rem;
    --ueberstand: 3rem;
    --buehne-innen: 1.25rem;
    --raum-6: 1.25rem;
    --raum-7: 1.75rem;
    --abstand-block: 1rem;
}

/* ---------- 2 Grundlagen ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Großschrift: alles wächst mit, weil jede Größe in rem steht. */
html.gross { font-size: 125%; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: var(--gr-text);
    line-height: var(--zeile-text);
    /* Ein Wort, das auch allein nicht in die Zeile passt, bricht, statt die Seite seitlich zu sprengen. */
    overflow-wrap: break-word;
}

h1, h2, h3, h4 {
    font-family: var(--schrift-schau);
    font-weight: var(--schau-fett);
    font-stretch: var(--schau-breite);
    line-height: var(--zeile-schau);
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: var(--gr-frage); }
h2 { font-size: var(--gr-abschnitt); font-weight: var(--schau-halbfett); }
h3 { font-size: var(--gr-text-gross); font-weight: var(--schau-halbfett); }
h4 { font-size: var(--gr-text); font-weight: var(--schau-halbfett); }
p { margin: 0; }

a { color: var(--tinte); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: var(--fokus-breite) solid var(--fokus);
    outline-offset: 3px;
}

main:focus { outline: none; }

.unsichtbar {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Was das Attribut hidden trägt, bleibt verborgen, auch wenn eine Regel es sonst zeigt (das Skript nimmt es weg). */
[hidden] { display: none !important; }

.sprung {
    position: absolute;
    left: var(--raum-2);
    top: -5rem;
    display: inline-flex;
    align-items: center;
    min-height: var(--ziel);
    background: var(--grund);
    color: var(--tinte);
    padding: 0 var(--raum-4);
    border: 2px solid var(--tinte);
    border-radius: var(--rundung-pille);
    z-index: 30;
}

.sprung:focus { top: var(--raum-2); }

/* Betrieb Teil 3, A: der Balken der Probeinstanz über jeder Seite. */
.probe {
    margin: 0;
    padding: var(--raum-2) var(--raum-4);
    background: var(--achtung-flaeche);
    color: var(--achtung);
    border-bottom: 3px solid var(--achtung);
    font-weight: 700;
    text-align: center;
}

kbd {
    font-family: var(--schrift-fest);
    font-size: var(--gr-klein);
    border: 1px solid var(--rand);
    border-bottom-width: 2px;
    border-radius: 0.4rem;
    padding: 0.05rem 0.45rem;
    background: var(--grund);
}

/* ---------- 3 Rahmen ---------- */

.kopfzeile {
    max-width: var(--breite);
    margin: 0 auto;
    padding: var(--raum-3) var(--seitenrand);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--raum-1) var(--raum-5);
}

.marke {
    font-family: var(--schrift-schau);
    font-weight: var(--schau-fett);
    font-stretch: var(--schau-breite);
    font-size: var(--gr-text-gross);
    color: var(--tinte);
}

.wo {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--raum-3);
    color: var(--text-leise);
    font-size: var(--gr-klein);
}

.wo .geraet { font-weight: 600; color: var(--text); }
.wo .datum { font-variant-numeric: tabular-nums; }

/* Tresen Teil 4 (E): ruhig, nur wenn dieses Gerät einen Platz hält. */
.platz-kopf { color: var(--text-leise); font-size: var(--gr-klein); }
/* Lieferaussage Teil 1: die Uhr des Bestellschlusses, weniger als eine Stunde vorher in der Farbe der Achtung, danach ruhig. */
.bestellschluss { display: flex; flex-wrap: wrap; gap: 0 var(--raum-3); font-size: var(--gr-klein); font-variant-numeric: tabular-nums; }
.bestellschluss .bald { color: var(--achtung); font-weight: 600; }
.bestellschluss .vorbei { color: var(--text-leise); }
.beim-schliessen { display: none; }

.navigation { margin-left: auto; }

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--raum-2);
}

.navigation a {
    display: inline-flex;
    align-items: center;
    min-height: var(--ziel);
    padding: 0 var(--raum-4);
    border-radius: var(--rundung-pille);
    background: var(--flaeche);
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
}

.navigation a:hover { background: var(--flaeche-getoent); }

/* Tresen Teil 4 (C): die Zahl der offenen Einträge am „Postfach“. */
.navigation .zahl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    min-height: 1.5rem;
    margin-left: var(--raum-2);
    padding: 0 0.4rem;
    border-radius: var(--rundung-pille);
    background: var(--tinte);
    color: var(--auf-tinte);
    font-size: var(--gr-klein);
    font-variant-numeric: tabular-nums;
}

.navigation a[aria-current="page"] .zahl { background: var(--auf-tinte); color: var(--tinte); }

.navigation a[aria-current="page"] {
    background: var(--tinte);
    color: var(--auf-tinte);
}

main {
    max-width: var(--breite);
    margin: 0 auto;
    padding: var(--raum-4) var(--seitenrand) var(--raum-7);
}

.fuss {
    max-width: var(--breite);
    margin: 0 auto;
    padding: 0 var(--seitenrand) var(--raum-4);
    color: var(--text-leise);
    font-size: var(--gr-kleinst);
}

/* Betrieb Teil 1 (F): Impressum, Datenschutz und Bedingungen auf jeder Seite; Ziele so hoch wie alle anderen (--ziel). */
.fuss .rechtliches { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-2) var(--raum-5); }
.fuss .rechtliches a { color: var(--text-leise); display: inline-flex; align-items: center; min-height: var(--ziel); }
.fuss .rechtliches a:hover { color: var(--text); }

/* ---------- 4 Bausteine ---------- */

/* Eine große Überschrift, eine Karte, ein Hauptknopf (Verbinden, Dieses Gerät, Hilfe, Fehlerseiten). */
.allein { max-width: 40rem; margin: var(--raum-6) auto 0; }
.allein.breit { max-width: 54rem; }
.allein > :where(* + *) { margin-top: var(--karte-abstand); }
.allein > h1 { margin-bottom: var(--raum-5); }
/* Aufräumen 33: In der Erklärung zur Barrierefreiheit stehen die Überschriften mit mehr Abstand darüber als darunter, damit sie zu ihrem Text gehören. */
.erklaerung > * + h2 { margin-top: var(--raum-7); }
.erklaerung > * + h3 { margin-top: 2rem; }
.erklaerung > h1 + * { margin-top: 0; }

.kasten {
    background: var(--flaeche);
    border-radius: var(--rundung-karte);
    padding: var(--karte-innen);
}

.kasten > :where(* + *) { margin-top: var(--raum-3); }
.kasten > h1 + * { margin-top: var(--raum-4); }
.kasten form button { margin-top: var(--raum-4); }
.kasten form + * { margin-top: var(--raum-6); }
.kasten > p, .kasten > .hilfe { max-width: var(--zeilenlaenge); }

.einleitung { font-size: var(--gr-text-gross); }

.hilfe { color: var(--text-leise); }

.feld { display: grid; gap: var(--raum-2); }

label { font-weight: 600; }

input[type="text"], input[type="search"] {
    font: inherit;
    color: var(--text);
    background: var(--grund);
    border: 2px solid var(--rand);
    border-radius: var(--rundung-pille);
    padding: 0 var(--raum-5);
    min-height: var(--ziel-haupt);
    width: 100%;
}

input::placeholder { color: var(--text-leise); opacity: 1; }

/* Tresen Teil 4 (C): Menge, Vermerk und Kundennummer im Formular des Postfachs. */
input[type="number"], textarea {
    font: inherit;
    color: var(--text);
    background: var(--grund);
    border: 2px solid var(--rand);
    min-height: var(--ziel);
}

input[type="number"] { border-radius: var(--rundung-pille); padding: 0 var(--raum-4); width: 8rem; font-variant-numeric: tabular-nums; }
textarea { border-radius: var(--rundung-klein); padding: var(--raum-2) var(--raum-4); width: 100%; resize: vertical; }
.eingabe { display: grid; gap: var(--raum-1); justify-items: start; }
.eingabe input[type="text"], .eingabe textarea { max-width: 36rem; }
.eingabe input[type="text"] { min-height: var(--ziel); padding: 0 var(--raum-4); }
[aria-invalid="true"] { border-color: var(--fehler); }
.feldfehler { color: var(--fehler); font-weight: 600; }
/* Server-Nachschliff, Punkt 7: Die Taste steht nicht im Knopf. Mit der Maus zeigt sie
   der Hinweis des Browsers (title), beim Tastaturfokus dieses Schild; die Ersatzangabe
   nach dem Schrägstrich ist leer, damit ein Vorleseprogramm den Namen nicht doppelt liest
   (es bekommt die Taste aus aria-keyshortcuts). Ohne Kürzel am Gerät gibt es kein title. */
body[data-kuerzel="an"] [data-taste][title] { position: relative; }
body[data-kuerzel="an"] [data-taste][title]:focus-visible::after {
    content: attr(title) / "";
    position: absolute;
    left: 0;
    top: calc(100% + var(--raum-2));
    z-index: 20;
    padding: var(--raum-1) var(--raum-2);
    border: 1px solid var(--rand);
    border-radius: var(--rundung-klein);
    background: var(--grund);
    color: var(--text);
    font-size: var(--gr-klein);
    font-weight: 400;
    white-space: nowrap;
    pointer-events: none;
}

#code {
    font-family: var(--schrift-fest);
    font-size: 1.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    max-width: 18rem;
    border-color: var(--tinte);
}

button, a.knopf {
    font: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ziel-haupt);
    padding: 0 var(--raum-6);
    border-radius: var(--rundung-pille);
    border: 2px solid var(--tinte);
    background: var(--tinte);
    color: var(--auf-tinte);
    text-decoration: none;
    cursor: pointer;
}

button:hover, a.knopf:hover { background: var(--tinte-tief); border-color: var(--tinte-tief); }

button.leise, a.knopf.leise {
    min-height: var(--ziel);
    padding: 0 var(--raum-5);
    background: transparent;
    color: var(--tinte);
    border-color: var(--tinte);
}

button.leise:hover, a.knopf.leise:hover { background: var(--flaeche-getoent); }

button:disabled { opacity: 0.6; cursor: progress; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: var(--raum-1); }

/* Eine Wahl: das Feld und seine ganze Zeile sind das Ziel (mindestens 44 hoch). */
.wahl {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0 var(--raum-3);
}

.wahl input { width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--tinte); }
.wahl label { font-weight: 400; min-height: var(--ziel); display: flex; align-items: center; }
.wahl .hilfe { grid-column: 2; margin-top: calc(-1 * var(--raum-1)); }
.wahl .zuletzt-loeschen { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-3); }
.wahl .zuletzt-loeschen button { margin-top: var(--raum-2); }

/* Tresen Teil 5 (F): „Wer arbeitet hier?“ Die Pille im Kopf, die Kacheln der Wahl und das Feld der PIN.
   Ein Zustand steht in Wort und Zeichen: die gewählte Kachel trägt „✓ gewählt“, die offene Pille ihre Frage. */
.wer {
    display: inline-flex;
    align-items: center;
    min-height: var(--ziel);
    padding: 0 var(--raum-4);
    border-radius: var(--rundung-pille);
    border: 2px solid var(--tinte);
    background: var(--flaeche-getoent);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.wer.offen { background: transparent; color: var(--tinte); border-style: dashed; }
.wer:hover { background: var(--flaeche-getoent); }
.wer[aria-current="page"] { background: var(--tinte); color: var(--auf-tinte); border-style: solid; }

.kuerzel {
    font-family: var(--schrift-schau);
    font-weight: var(--schau-fett);
    font-stretch: var(--schau-breite);
}

.kacheln {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--kachel-breite), 1fr));
    gap: var(--raum-3);
}

button.kachel, label.kachel {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: var(--raum-1);
    min-height: var(--ziel-kachel);
    width: 100%;
    margin: 0;
    padding: var(--raum-3);
    border-radius: var(--rundung-klein);
    border: 2px solid var(--rand);
    background: var(--grund);
    color: var(--text);
    font-weight: 400;
    text-align: center;
    cursor: pointer;
}

.kasten .kacheln button.kachel { margin-top: 0; }
button.kachel:hover, label.kachel:hover { background: var(--flaeche-getoent); border-color: var(--tinte); }
.kachel .kuerzel { font-size: var(--gr-titel-karte); line-height: var(--zeile-schau); overflow-wrap: anywhere; }
.kachel .bezeichnung { font-size: var(--gr-klein); color: var(--text-leise); }
.kachel .zustand { font-size: var(--gr-klein); font-weight: 600; }
.kachel.gewaehlt { border-color: var(--tinte); background: var(--flaeche-getoent); box-shadow: inset 0 0 0 2px var(--tinte); }
.kachel.niemand { border-style: dashed; }

/* Im Formular „Ins Postfach legen“ ist jede Kachel eine Wahl: das Feld liegt unsichtbar über seiner Kachel. */
.kachelwahl { position: relative; display: grid; }
.kachelwahl input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kachelwahl input:focus-visible + label { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }
.kachelwahl input:checked + label { border-color: var(--tinte); background: var(--flaeche-getoent); box-shadow: inset 0 0 0 2px var(--tinte); }
.kachelwahl input:checked + label .kuerzel::before { content: "✓ "; }
.wer-legt-ein > :where(* + *) { margin-top: var(--raum-3); }

input[type="password"] {
    font: inherit;
    font-family: var(--schrift-fest);
    font-size: var(--gr-pin);
    letter-spacing: 0.3em;
    color: var(--text);
    background: var(--grund);
    border: 2px solid var(--rand);
    border-radius: var(--rundung-pille);
    padding: 0 var(--raum-5);
    min-height: var(--ziel-haupt);
    width: var(--pin-breite);
    max-width: 100%;
}

input[type="password"][aria-invalid="true"] { border-color: var(--fehler); }
.pinformular > :where(* + *) { margin-top: var(--raum-4); }
.pinformular .knoepfe button { margin-top: 0; }
.einstellungen > :where(* + *) { margin-top: var(--raum-5); }
.einstellungen fieldset > .hilfe { margin-bottom: var(--raum-1); }

.meldung {
    display: flex;
    gap: var(--raum-2);
    background: var(--flaeche-getoent);
    padding: var(--raum-3) var(--raum-4);
    border-radius: var(--rundung-klein);
}

.meldung.gut { background: var(--zusage-flaeche); color: var(--zusage); }
.meldung.achtung { background: var(--achtung-flaeche); color: var(--achtung); }
.meldung.fehler { background: var(--fehler-flaeche); color: var(--fehler); }

.angaben { margin: 0; display: grid; gap: var(--raum-2); }
.angaben > div { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: var(--raum-3); }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; overflow-wrap: anywhere; }

.tasten { margin: 0; display: grid; gap: var(--raum-2); }
.tasten > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--raum-3); align-items: baseline; }
.tasten dd { margin: 0; }

.zeichen { display: inline-block; min-width: 1.1em; text-align: center; font-weight: 700; }

/* Marken: kleine Pillen. Als Verweis sind sie ein Ziel (mindestens 44 hoch). */
.pillen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-2); }

.pille {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    min-height: 2rem;
    padding: 0.15rem var(--raum-3);
    border-radius: var(--rundung-pille);
    background: var(--flaeche-getoent);
    font-size: var(--gr-klein);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.pille.fehler { background: var(--fehler-flaeche); color: var(--fehler); }

a.pille {
    min-height: var(--ziel);
    padding: 0 var(--raum-4);
    font-size: var(--gr-text);
    font-weight: 600;
    color: var(--tinte);
    text-decoration: none;
}

a.pille:hover { background: var(--flaeche); text-decoration: underline; }
.pille .art { font-weight: 400; color: var(--text-leise); }

.etikett { color: var(--text-leise); }

/* ---------- 5 Start und Suche ---------- */

.suche > :where(* + *) { margin-top: var(--raum-4); }

/* Vor der ersten Suche: die Frage groß, sonst nichts. */
.suche.start { max-width: 60rem; margin: 0 auto; padding-top: clamp(1rem, 9vh, 6rem); }
.frage { font-size: var(--gr-frage); margin-bottom: var(--raum-5); }

.suchfeld {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--grund);
    padding: var(--raum-2) 0;
}

/* Das Suchfeld als große Pille: Feld und Knopf in einem Rahmen. */
.suchfeld .zeile {
    display: flex;
    align-items: center;
    gap: var(--raum-2);
    min-height: var(--suchfeld-hoehe);
    padding: 0 var(--raum-2) 0 var(--raum-5);
    background: var(--grund);
    border: 2px solid var(--tinte);
    border-radius: var(--rundung-pille);
}

/* Der Fokus liegt als ein kräftiger Ring an der Pille (kein zweiter Ring daneben). */
.suchfeld .zeile:focus-within { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 0; }

.suchfeld input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: var(--gr-abschnitt);
    min-height: var(--ziel);
    border-radius: 0;
}

.suchfeld input:focus-visible { outline: none; }
/* Eingrenzen Teil 2, Punkt 2: der Schalter „ähnlich klingend“ zeigt seinen Fokus (das Suchfeld selbst zeigt ihn an der Zeile). */
.suchfeld .schalter-aehnlich input:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }
.suchfeld input::placeholder { text-overflow: ellipsis; }
.suchfeld input { text-overflow: ellipsis; }
.suchfeld button { flex: none; min-height: max(var(--ziel), calc(var(--suchfeld-hoehe) - 1rem)); }

.unter-feld {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--raum-3) var(--raum-6);
}

.deutung { display: grid; gap: var(--raum-2); color: var(--text-leise); min-width: 0; }
/* Ohne Deutung (der Katalog hat nicht geantwortet) rückt der Zustand der Kataloge nach links unter das Feld. */
.deutung:empty, .deutung:not(:has(> :not([hidden]))) { display: none; }
.verstanden { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2); }
.verstanden .pille strong { color: var(--text); }

/* Deutung anwenden Teil 1: Schilder mit Zustand und Kreuz, Angebote als Schaltflächen. Der Zustand steht als Wort da, nie nur als Farbe. */
.angebote { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2); }
.schilder { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-2); }
.schilder form { display: inline; margin: 0; }
.pille.bedingung.achtung { background: var(--achtung-flaeche); color: var(--achtung); }
.schilder .pille { flex-wrap: wrap; overflow-wrap: break-word; }
.pille.bedingung .zustandwort { font-weight: 400; }
/* Aufräumen 28, Punkt 6: Zustandswort und Kreuz als Gruppe; das Wort darf in sich umbrechen, das × bleibt an seiner letzten Zeile. */
.schild-ende { display: inline-flex; align-items: center; gap: 0.35em; min-width: 0; max-width: 100%; }
.schild-ende .zustandwort { min-width: 0; }
.pille.bedingung.abgewaehlt { text-decoration: line-through; text-decoration-thickness: 1px; }
.pille.bedingung.abgewaehlt button { text-decoration: none; }
.pille button.kreuz { min-height: var(--ziel); min-width: var(--ziel); padding: 0; font-size: var(--gr-text); font-weight: 700; border-color: transparent; }
.pille button.wieder { min-height: var(--ziel); padding: 0 var(--raum-3); }
.angebote button.angebot { min-height: var(--ziel); }
.ohne-einschraenkung { display: grid; gap: var(--raum-2); justify-items: start; }
.hinweis { font-size: var(--gr-klein); max-width: var(--zeilenlaenge); }

.katalogliste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--raum-1) var(--raum-5);
    min-height: 2rem;
    align-items: center;
}

.zustand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4em; }
.zustand .name { font-weight: 600; }
.zustand .detail, .zustand .zusatz { color: var(--text-leise); flex-basis: 100%; padding-left: 1.5em; font-size: var(--gr-klein); }
.zustand.gut .zeichen { color: var(--zusage); }
.zustand.leer .zeichen, .zustand.aus .zeichen, .zustand.aus .wort { color: var(--text-leise); }
.zustand.achtung .zeichen, .zustand.achtung .wort { color: var(--achtung); }
.zustand.fehler .zeichen, .zustand.fehler .wort { color: var(--fehler); }

.leer { color: var(--text-leise); max-width: var(--zeilenlaenge); }

/* Zuletzt gesucht an diesem Gerät (nur mit Skript, nur im Browser). */
.zuletzt { margin-top: var(--raum-6); }
.zuletzt > :where(* + *) { margin-top: var(--raum-3); }
.zuletzt h2 { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-klein); font-weight: 600; color: var(--text-leise); }

/* ---------- 6 Trefferliste: Karten mit der Antwort zuerst ---------- */

.treffer > :where(* + *) { margin-top: var(--raum-4); }
.treffer > h2 { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-klein); font-weight: 600; color: var(--text-leise); }

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--karte-abstand); }

/* Tresen-Nachschliff (Nacht), Befund 3: „Auch Archivtitel zeigen“ klein über der Liste; der Verweis ist ein Ziel (mindestens 44 hoch). */

.eintrag {
    display: grid;
    grid-template-columns: var(--bild-breite) minmax(0, 1fr) minmax(0, var(--antwort-breite));
    gap: var(--raum-3) var(--karte-spalte);
    align-items: start;
    padding: var(--karte-innen);
    background: var(--flaeche);
    border-radius: var(--rundung-karte);
    scroll-margin-top: calc(var(--suchfeld-hoehe) + var(--raum-5));
}

/* Das Titelbild in einer festen Fläche (2 zu 3), damit nichts springt. */
.bild {
    width: var(--bild-breite);
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-radius: var(--rundung-bild);
    overflow: hidden;
}

.bildlink { display: flex; align-items: flex-start; justify-content: center; width: 100%; height: 100%; text-decoration: none; color: inherit; }

.bild img, .titelbild img, .bild-klein img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--rundung-bild);
    outline: 1px solid var(--linie);
    outline-offset: -1px;
}

/* Kein Bruch mitten im Wort: die Seite setzt lange Wörter kleiner (Klassen lang, sehr-lang); nur ein Wort, das auch so nicht passt, bricht. */
.ohne-bild { font-size: var(--platzhalter-schrift); line-height: 1.2; color: var(--text-leise); text-align: center; padding: 0.4em; hyphens: manual; overflow-wrap: break-word; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--flaeche-getoent); border-radius: var(--rundung-bild); }
.ohne-bild.lang { font-size: var(--platzhalter-schrift-lang); }
.ohne-bild.sehr-lang { font-size: var(--platzhalter-schrift-sehr-lang); }

.eintrag .angaben { display: block; min-width: 0; }
.eintrag .angaben > :where(* + *) { margin-top: var(--raum-1); }

.eintrag .titel {
    font-size: var(--gr-titel-karte);
    font-weight: var(--schau-fett);
    overflow-wrap: break-word;
}

.eintrag .titel a { color: var(--text); text-decoration: none; display: inline-block; min-height: var(--ziel); padding: 0.2em 0; }
.eintrag .titel a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.untertitel { color: var(--text-leise); font-size: var(--gr-text-gross); }
.mitwirkende { font-weight: 600; font-size: var(--gr-text-gross); }
.verlag { color: var(--text-leise); font-size: var(--gr-klein); }
/* Vollanzeige Teil 3, Punkt 5: Reihe und Band in der Trefferkarte. */
.eintrag .reihe { color: var(--text-leise); font-size: var(--gr-klein); font-weight: 600; }

ul.kennzeichen { list-style: none; margin: var(--raum-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-2); }
ul.kennzeichen li { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0.1rem var(--raum-3); border-radius: var(--rundung-pille); background: var(--achtung-flaeche); color: var(--achtung); font-size: var(--gr-klein); font-weight: 600; }
ul.kennzeichen li::before { content: "⚠"; margin-right: 0.4em; }

/* Die Antwort: Lieferbarkeit und Preis groß, mit Quelle. */
.antwort { min-width: 0; }
.antwort > :where(* + *) { margin-top: var(--raum-1); }

/* Bestand Teil 1 (C): „Im Laden“ und „Bestellt“ aus der Warenwirtschaft über der Lieferbarkeit; ohne Antwort gibt es das Element nicht
   (nie „nicht am Lager“). Die erste Zeile steht groß; in der Farbe der Zusage nur „Im Laden“ und „Bestellt“ mit Tag. */
.bestand-zeilen { min-width: 0; }
.bestand-zeilen .bestand { margin: 0; font-family: var(--schrift-text); font-stretch: normal; font-weight: 600; font-size: var(--gr-text); line-height: var(--zeile-text); color: var(--text); overflow-wrap: break-word; }
.bestand-zeilen .bestand + .bestand { margin-top: 0.15rem; }
.bestand-zeilen .bestand.gross { font-family: var(--schrift-schau); font-stretch: var(--schau-breite); font-weight: var(--schau-fett); font-size: var(--gr-antwort); line-height: var(--zeile-schau); }
.bestand-zeilen .bestand.gross .teil + .trenner + .teil { display: block; font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-text); font-weight: 600; }
.bestand-zeilen .bestand.gross .teil:first-child + .trenner { display: none; }
.bestand-zeilen .bestand.zusage { color: var(--zusage); }
.bestand-zeilen .teil { display: inline-block; max-width: 100%; }
.bestand-zeilen .grundlage { display: block; color: var(--text-leise); font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-kleinst); font-weight: 400; }
.bestand-eigen { margin: 0.15rem 0 0; color: var(--text-leise); font-size: var(--gr-kleinst); }
/* Aufräumen 22 (Punkt 2): „Früher möglich: morgen über Kolibri360“ unter „Bestellt 5 · kommt Di“, so groß wie „Bestellt“, in
   ruhiger Farbe (Tinte, nie die Farbe der Zusage): beide Wege stehen zur Wahl, NoNameBib entscheidet nichts. */
.bestand-zeilen .bestand.frueher { color: var(--text); margin-top: var(--raum-1); }
/* In der kompakten Liste sind „Im Laden“ und „Bestellt“ ruhige Marken. */
:root[data-dichte="kompakt"] .liste .bestand-zeilen .bestand.gross { font-family: var(--schrift-text); font-stretch: normal; font-weight: 700; font-size: var(--gr-text); line-height: var(--zeile-text); }

.lieferbar {
    font-family: var(--schrift-schau);
    font-stretch: var(--schau-breite);
    font-weight: var(--schau-fett);
    font-size: var(--gr-antwort);
    line-height: var(--zeile-schau);
    color: var(--text);
    overflow-wrap: break-word;
}

.lieferbar .zeichen { font-family: var(--schrift-text); font-size: 0.62em; min-width: 0; margin-right: 0.15em; vertical-align: 0.12em; }
/* Die Worte der Gruppen stehen klein in den Texten; als Antwort beginnen sie groß. */
.lieferbar .worte { display: inline-block; max-width: 100%; }
.lieferbar .worte::first-letter { text-transform: uppercase; }
.lieferbar.zusage { color: var(--zusage); }
.lieferbar.achtung { color: var(--achtung); }

.preis .betrag {
    font-family: var(--schrift-schau);
    font-stretch: var(--schau-breite);
    font-weight: var(--schau-fett);
    font-size: var(--gr-antwort);
    line-height: var(--zeile-schau);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.preis .zusatz { text-decoration: none; color: var(--text-leise); font-weight: 600; }
.preis .ohne { color: var(--text-leise); }
.preis span.kennzeichen { color: var(--text-leise); font-size: var(--gr-klein); white-space: nowrap; }
.preis span.kennzeichen::before { content: "("; }
.preis span.kennzeichen::after { content: ")"; }
span.kennzeichen.fehler { color: var(--fehler); }
.quelle { color: var(--text-leise); font-size: var(--gr-kleinst); }

/* Eigene Nummern Teil 1 (D): die eigenen Nummern der Buchhandlung neben den Angaben der Kataloge, leise. In der Vollanzeige
   „Kolibri360 15 · bei Ihnen: 3 nachbestellen“; in der Liste eine kleine Marke in der Zeile der Quelle, die die Karte nicht
   höher macht (eine Zeile, abgeschnitten mit „…“). */
.eigene-nummer { margin-top: var(--raum-1); color: var(--text-leise); font-size: var(--gr-klein); }
.eigene-nummer .bei-ihnen { color: var(--text); }
.eigene-nummer.wawi .herkunft { color: var(--text-leise); }
.eigene-werte { margin-top: var(--raum-2); }
.quelle.mit-marke { display: flex; align-items: baseline; min-width: 0; white-space: nowrap; }
.quelle.mit-marke .quelle-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.eigene-marke { flex: none; margin-left: var(--raum-2); padding: 0 0.35em; line-height: 1.2; border: 1px solid var(--linie); border-radius: 0.3em; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.eigene-marke[hidden], .eigene-marke [hidden], .eigene-nummer[hidden] { display: none; }

/* Tresen Teil 4 (A3): ein Teil der Meldung („12 am Lager“, die Lieferzeit des Katalogs) bleibt zusammen; getrennt wird nur an den Trennpunkten. */
/* Mehrere Teile fließen als Zeile weiter (das Zeichen bleibt davor); jeder Teil bleibt zusammen. */
.lieferbar .worte.teile { display: inline; }
.lieferbar .worte .teil { display: inline-block; max-width: 100%; }
.lieferbar .worte > .teil:first-child::first-letter { text-transform: uppercase; }
.lieferbar .mehr { font-size: 0.62em; font-family: var(--schrift-text); font-stretch: normal; font-weight: 600; }

/* Tresen Teil 4 (A1): die Meldungen der Kataloge, die beste zuerst. Der Platz steht fest, bevor die Barsortimente geladen sind (nichts springt). */
.lieferung { display: grid; align-content: start; gap: var(--raum-1); }
.lieferung.platz-1 { min-height: calc(var(--zeile-quelle) + 0 * var(--zeile-ruhig)); }
.lieferung.platz-2 { min-height: calc(var(--zeile-quelle) + 1 * var(--zeile-ruhig)); }
.lieferung.platz-3 { min-height: calc(var(--zeile-quelle) + 2 * var(--zeile-ruhig)); }
.lieferung.platz-4 { min-height: calc(var(--zeile-quelle) + 3 * var(--zeile-ruhig)); }

/* Aufräumen 22 (Punkt 1): in der Liste die große Zeile und eine Kurzzeile mit den übrigen Quellen („auch: Libri morgen ·
   Umbreit morgen · Kolibri360 vergriffen“), höchstens eine Zeile, abgeschnitten mit „…“. Die ruhigen Meldungen bleiben im
   Dokument (das Skript ordnet nach ihnen), stehen aber nur in der Vollanzeige ausführlich. Der freie Platz reicht darum
   für die große Zeile und eine Zeile darunter. */
.liste .lieferung > .katalogmeldung.ruhig,
.liste .lieferung > .geprueft,
.liste .lieferung > .verlagsweg:not(.leitzeile),
.liste .lieferung > .leitzeile.unter-bestand { display: none; }
.liste .lieferung.platz-2, .liste .lieferung.platz-3, .liste .lieferung.platz-4 { min-height: calc(var(--zeile-quelle) + var(--zeile-ruhig)); }
.auch { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-leise); font-size: var(--gr-klein); line-height: var(--zeile-text); }
.auch .etikett { font-weight: 600; }
/* Steht Bestand über der Lieferung, enthält sie nur noch die Kurzzeile; dann bleibt kein Platz frei. */
.liste .antwort:has(> .bestand-zeilen .bestand) > .lieferung { min-height: 0; }
/* Kompakt besonders knapp: unter einem Tag nicht noch die Meldung des Katalogs, keine Meldenummer der Abfrage (beides in der
   Vollanzeige); „Bestellt 5 · kommt Di, 24.11.“ auf einer Zeile; Preis und Quelle links, „Ins Postfach“ rechts daneben. */
:root[data-dichte="kompakt"] .liste .katalogmeldung.gross[data-tag] > .lieferbar,
:root[data-dichte="kompakt"] .liste .katalogmeldung.gross .geprueft-angaben { display: none; }
:root[data-dichte="kompakt"] .liste .bestand-zeilen .bestand.gross .teil + .trenner + .teil { display: inline-block; font-weight: 400; }
:root[data-dichte="kompakt"] .liste .bestand-zeilen .bestand.gross .teil:first-child + .trenner { display: inline; }
:root[data-dichte="kompakt"] .liste .antwort { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row dense; gap: var(--raum-1) var(--raum-3); align-items: center; }
:root[data-dichte="kompakt"] .liste .antwort > * { grid-column: 1 / -1; margin-top: 0; }
:root[data-dichte="kompakt"] .liste .antwort > .preis, :root[data-dichte="kompakt"] .liste .antwort > .quelle { grid-column: 1; }
:root[data-dichte="kompakt"] .liste .antwort > .ablegen-zeile { grid-column: 2; grid-row: span 2; padding-top: 0; }

/* Die beste Meldung groß, in der Schrift der Überschriften, mit dem Namen ihres Katalogs klein darüber. */
.katalogmeldung { min-width: 0; }
.katalogmeldung .von { display: block; color: var(--text-leise); font-size: var(--gr-kleinst); }
.katalogmeldung.gross .lieferbar { display: block; }
.katalogmeldung.gross .abweichend { display: block; }

/* Jede weitere eine ruhige Zeile: Name, Meldung, ein abweichender Preis. */
.katalogmeldung.ruhig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--raum-2); }
.katalogmeldung.ruhig .von { display: inline; }
.katalogmeldung.ruhig .lieferbar { font-family: var(--schrift-text); font-stretch: normal; font-weight: 600; font-size: var(--gr-text); line-height: var(--zeile-text); }
.katalogmeldung.ruhig .lieferbar .zeichen { font-size: 0.9em; vertical-align: baseline; }
.katalogmeldung.ruhig .lieferbar .mehr { font-size: 1em; font-weight: 400; }
.lieferbar.neutral { color: var(--text-leise); }
.lieferbar.fehler { color: var(--fehler); }
.abweichend { font-family: var(--schrift-text); font-size: var(--gr-text); font-weight: 400; color: var(--text); }
.abweichend .etikett { color: var(--text-leise); }
.abweichend .betrag-klein { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Lieferaussage Teil 1: die Antwortzeile „wann ist es da“ unter der Meldung des Katalogs (die Meldung bleibt), in der Farbe
   der Zusage; ihre Grundlage klein darunter. Sie steht in jeder Meldung auf eigener Zeile, auch in der ruhigen. */
.aussage { display: block; flex-basis: 100%; font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-text); line-height: var(--zeile-text); color: var(--text); }
.aussage.zusage .antwort-satz { color: var(--zusage); }
.aussage .antwort-satz { font-weight: 600; }
.aussage .antwort-satz .teil { display: inline-block; max-width: 100%; }
.aussage .antwort-satz .teil + .trenner + .teil { font-weight: 400; }
.aussage .grundlage { display: block; color: var(--text-leise); font-size: var(--gr-kleinst); font-weight: 400; }
.katalogmeldung.gross .aussage .antwort-satz { font-family: var(--schrift-schau); font-stretch: var(--schau-breite); font-weight: var(--schau-fett); font-size: calc(var(--gr-antwort) * 0.72); line-height: var(--zeile-schau); }
.katalogmeldung.gross .aussage .antwort-satz .teil + .trenner + .teil { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-text); font-weight: 600; }
/* Aufräumen 20: die Lieferzeit ist keine Zusage; sie steht in der ruhigen Schrift der Grundlage (Tinte, normale Größe), auch in der großen Meldung. */
.aussage.ruhig .antwort-satz, .katalogmeldung.gross .aussage.ruhig .antwort-satz { font-family: var(--schrift-text); font-stretch: normal; font-weight: 400; font-size: var(--gr-text); line-height: var(--zeile-text); color: var(--text); }
.verlagsweg { margin-top: var(--raum-1); }
/* Bestand Teil 1 (C): groß oben die erste Zeile, die gilt. Auf der Karte „über den Verlag“, wenn kein Barsortiment einen Tag nennt;
   in der Vollanzeige der früheste Tag mit seiner Quelle (oder „über den Verlag“) über den Zeilen der Kataloge. Steht Bestand
   darüber, wird sie ruhig. */
.verlagsweg.leitzeile { margin-top: 0; }
/* Nennt die große Meldung einen Tag, steht der Tag groß unter dem Namen des Katalogs; seine Lieferbarkeit steht ruhig darunter. */
.katalogmeldung.gross[data-tag] { display: flex; flex-direction: column; align-items: flex-start; }
.katalogmeldung.gross[data-tag] > .von { order: -2; }
.katalogmeldung.gross[data-tag] > .aussage { order: -1; }
/* Aufräumen 22 (nach den Bildern): bringt das Ergebnis der Abfrage den Tag, steht es ebenso über der Meldung des Katalogs. */
.katalogmeldung.gross[data-tag] > .geprueft:not(.nicht-abfragbar) { order: -1; }
.katalogmeldung.gross[data-tag] > .lieferbar { font-family: var(--schrift-text); font-stretch: normal; font-weight: 600; font-size: var(--gr-text); line-height: var(--zeile-text); }
.katalogmeldung.gross[data-tag] > .lieferbar .zeichen { font-size: 0.9em; vertical-align: baseline; }
.katalogmeldung.gross[data-tag] > .lieferbar .mehr { font-size: 1em; font-weight: 400; }
.katalogmeldung.gross[data-tag] .aussage .antwort-satz { font-size: calc(var(--gr-antwort) * 0.85); }
.verlagsweg.leitzeile .antwort-satz { font-family: var(--schrift-schau); font-stretch: var(--schau-breite); font-weight: var(--schau-fett); font-size: calc(var(--gr-antwort) * 0.72); line-height: var(--zeile-schau); }
.leitsatz { margin: 0; }
.leitsatz .antwort-satz { font-family: var(--schrift-schau); font-stretch: var(--schau-breite); font-weight: var(--schau-fett); font-size: var(--gr-antwort); line-height: var(--zeile-schau); }
.leitsatz .antwort-satz .teil + .trenner + .teil { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-text); font-weight: 600; }
.unter-bestand .antwort-satz, .leitsatz.unter-bestand .antwort-satz { font-family: var(--schrift-text); font-stretch: normal; font-weight: 600; font-size: var(--gr-text); line-height: var(--zeile-text); }
.quellen .aussage { margin-top: 0.1rem; }
/* Lieferaussage Teil 2: die Lieferbarkeitsabfrage. Das Ergebnis steht an Stelle der Aussage aus dem Datensatz; Menge und
   Meldenummer ruhig darunter; die Zustände klein oben in der Antwortzeile der Vollanzeige, nie an jeder Karte. */
.geprueft { display: block; flex-basis: 100%; margin-top: 0.1rem; }
.geprueft .geprueft-von { display: block; color: var(--text-leise); font-size: var(--gr-kleinst); font-weight: 600; }
.geprueft-angaben { margin: 0; color: var(--text); font-size: var(--gr-klein); font-variant-numeric: tabular-nums; }
.geprueft-angaben .teil { display: inline-block; max-width: 100%; }
.abfrage-warten { display: block; color: var(--text-leise); font-size: var(--gr-kleinst); }
.abfrage-warten[hidden] { display: none; }
.abfrage-zustand { margin: 0 0 var(--raum-2); color: var(--text-leise); font-size: var(--gr-kleinst); }
.abfrage-zustand .teil { display: inline-block; max-width: 100%; }
.abfrage-zustand .etikett { font-weight: 600; }
.abfrage-form { margin: 0 0 var(--raum-2); }
.abfrage-form[hidden] { display: none; }

/* Der Zustand der Kataloge: schmal stehen sie untereinander, der Platz für die Barsortimente bleibt fest. */
.kataloge { min-width: 0; }

/* Der erste Treffer groß: die Suche war eine Kennung, oder es kam genau ein Treffer. */
.eintrag.gross { grid-template-columns: var(--bild-breite-gross) minmax(0, 1fr) minmax(0, var(--antwort-breite)); }
.eintrag.gross .bild { width: var(--bild-breite-gross); }
.eintrag.gross .titel { font-size: var(--gr-titel-gross); }
.eintrag.gross .lieferbar, .eintrag.gross .betrag { font-size: var(--gr-antwort-gross); }
.eintrag.gross .ohne-bild { font-size: var(--platzhalter-schrift-gross); }

.blaettern ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-3); align-items: center; }
.blaettern .stand { color: var(--text-leise); }
.blaettern a { display: inline-flex; align-items: center; min-height: var(--ziel); padding: 0 var(--raum-5); border-radius: var(--rundung-pille); background: var(--flaeche); text-decoration: none; font-weight: 600; }
.blaettern a:hover { background: var(--flaeche-getoent); }

.knoepfe { display: flex; flex-wrap: wrap; gap: var(--raum-3); align-items: center; }
.knoepfe a.zurueck { display: inline-flex; align-items: center; min-height: var(--ziel); }

/* Tresen Teil 4 (C): „Ins Postfach“ an der Karte; das Formular und die Bestätigung über die ganze Breite der Karte. */
.ablegen-zeile { padding-top: var(--raum-2); }
.eintrag > .ablage { grid-column: 1 / -1; }
.ablage { background: var(--grund); border-radius: var(--rundung-klein); padding: var(--raum-4) var(--raum-5); min-width: 0; }
.ablage.bestaetigt { background: transparent; padding: 0; }
.ablage > :where(* + *), .ablageformular > :where(* + *) { margin-top: var(--raum-4); }
.ablage .knoepfe button { margin-top: 0; }
.ablage-kopf { font-size: var(--gr-titel-karte); }
.quellen .wahl label { flex-wrap: wrap; gap: 0 var(--raum-2); }
.quellen .name { font-weight: 600; }
.quellen .lieferbar { font-family: var(--schrift-text); font-stretch: normal; font-weight: 400; font-size: var(--gr-text); line-height: var(--zeile-text); }
.quellen .lieferbar .zeichen { font-size: 0.9em; vertical-align: baseline; }
.quellen .lieferbar .mehr { font-size: 1em; font-weight: 400; }

/* Tresen Teil 4 (D): die Seite „Postfach“. Karten wie die Treffer, ruhiger; rechts der Zustand. */
.postfach { max-width: 64rem; margin: var(--raum-6) auto 0; }
.postfach > :where(* + *) { margin-top: var(--karte-abstand); }
.postfach > h1 { margin-bottom: var(--raum-4); }
.postfach .einleitung { color: var(--text-leise); max-width: var(--zeilenlaenge); }
.postfach .ruhig-gross { font-size: var(--gr-text-gross); }
.postfach > .postfach-teil { margin-top: var(--raum-6); }
.postfach-teil > :where(* + *) { margin-top: var(--raum-3); }
.postfach-teil > h2 .anzahl { color: var(--text-leise); font-weight: 400; }
.karte-postfach {
    display: grid;
    grid-template-columns: var(--bild-breite-klein) minmax(0, 1fr) minmax(0, 14rem);
    gap: var(--raum-2) var(--karte-spalte);
    align-items: start;
    padding: var(--karte-innen);
    background: var(--flaeche);
    border-radius: var(--rundung-karte);
}
.karte-postfach .bild { width: var(--bild-breite-klein); }
.karte-postfach .angaben { display: block; min-width: 0; }
.karte-postfach .angaben > :where(* + *) { margin-top: var(--raum-1); }
.karte-postfach .titel { font-size: var(--gr-titel-karte); font-weight: var(--schau-fett); overflow-wrap: break-word; }
.karte-postfach .titel a { color: var(--text); text-decoration: none; display: inline-block; min-height: var(--ziel); padding: 0.2em 0; }
.karte-postfach .titel a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.karte-postfach .was { font-weight: 600; }
.karte-postfach .vermerk { overflow-wrap: anywhere; }
.karte-postfach .etikett { color: var(--text-leise); }
.karte-postfach .herkunft { color: var(--text-leise); font-size: var(--gr-klein); }
.zustand-postfach { min-width: 0; display: grid; gap: var(--raum-1); justify-items: start; }
.zustand-postfach .status { font-weight: 600; }
.zustand-postfach .status.offen { color: var(--text); }
.zustand-postfach .status.abgeholt { color: var(--zusage); }
.zustand-postfach form { margin-top: var(--raum-2); }
.datei > :where(* + *) { margin-top: var(--raum-4); }
.datei .dateiformular > :where(* + *) { margin-top: var(--raum-4); }
.datei .dateiformular button { margin-top: 0; }
.datei .nur-csv > :where(* + *) { margin-top: var(--raum-4); }
.datei .dateiformular > .gewaehlt { margin-top: var(--raum-2); }
.datei .dateiformular > .dateiwahl { margin-top: var(--raum-1); }
.dateiwahl-inhalt { padding-top: var(--raum-3); }
.dateiwahl-inhalt > :where(* + *) { margin-top: var(--raum-4); }
.wahlreihe .wahl { display: inline-flex; margin-right: var(--raum-5); }
.wahlreihe .hilfe { margin-top: var(--raum-1); }
.kennzeichnen { border-top: 1px solid var(--linie); padding-top: var(--raum-4); }
.kennzeichnen > :where(* + *) { margin-top: var(--raum-3); }
.kennzeichnen h3 { font-size: var(--gr-text-gross); }
.kurzliste { margin: 0; padding-left: 1.5em; display: grid; gap: var(--raum-1); }
.kurzliste .name { font-weight: 600; }
.kasten .frage { font-size: var(--gr-text-gross); }

/* Tresen Teil 4 (E): die Plätze. */
.plaetze > :where(* + *) { margin-top: var(--raum-5); }
.platzkatalog > :where(* + *) { margin-top: var(--raum-3); }
.platzkatalog .belegt { font-size: var(--gr-text-gross); font-variant-numeric: tabular-nums; }
.halter { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--raum-2); }
.halter li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--raum-3); padding: var(--raum-2) var(--raum-3); border-radius: var(--rundung-karte); }
.halter .name { font-weight: 600; }
.halter .leerlauf { color: var(--text-leise); margin-left: auto; font-variant-numeric: tabular-nums; }
.halter li.eigen { background: var(--flaeche-getoent); }
.halter .marke-eigen { color: var(--tinte); }
.plaetze form.freigeben button { margin-top: 0; }
.plaetze form.freigeben + .hilfe { margin-top: var(--raum-3); }

/* Während das Skript lädt. */
[aria-busy="true"] { opacity: 0.6; }

/* ---------- 7 Vollanzeige ---------- */

.vollanzeige > :where(* + *) { margin-top: var(--raum-5); }

/* Der Kopf: ohne Titelbild oder ohne Skript die getönte Fläche; mit beidem die Farbe des Buchs. */
.buehne {
    position: relative;
    display: flow-root;
    /* Aufräumen 35: Das Titelbild hängt unten am Kopf; die Höhe rechnet die Zeile „zurück zur Liste“ mit, sonst überdeckt das Bild sie bei kurzem Kopf. */
    min-height: calc(var(--titelbild-breite) * 1.5 - var(--ueberstand) + var(--raum-3) + var(--ziel) + var(--raum-4) + var(--raum-2));
    padding: var(--raum-3) var(--buehne-innen) var(--buehne-innen) calc(var(--buehne-innen) + var(--titelbild-breite) + var(--raum-6));
    background: var(--flaeche-getoent);
    color: var(--text);
    border-radius: var(--rundung-karte);
}

.buehne.buchfarbe { background: var(--buch); color: var(--auf-buch); }
.buehne.buchfarbe a, .buehne.buchfarbe .untertitel, .buehne.buchfarbe .oberzeile, .buehne.buchfarbe .verlagszeile, .buehne.buchfarbe .kopfquelle { color: var(--auf-buch); }
.buehne.buchfarbe :focus-visible { outline-color: var(--auf-buch); }
.buehne.buchfarbe button.leise { color: var(--auf-buch); border-color: var(--auf-buch); }
.buehne.buchfarbe button.leise:hover { background: transparent; text-decoration: underline; }

.rueckweg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2) var(--raum-5); margin-left: calc(-1 * (var(--titelbild-breite) + var(--raum-6))); margin-bottom: var(--raum-4); }
/* Tresen-Nachschliff (Nacht), Befund 5: ruhige runde Pfeilknöpfe (mindestens 44 mal 44); der Text steht unsichtbar darin. */
.rueckweg .blaetterknoepfe { display: inline-flex; gap: var(--raum-2); }
.pfeilknopf { display: inline-flex; align-items: center; justify-content: center; width: var(--ziel); height: var(--ziel); border: 1px solid var(--rand); border-radius: var(--rundung-pille); color: inherit; text-decoration: none; }
.pfeilknopf:hover { background: var(--flaeche-getoent); color: var(--tinte); }
.buehne.buchfarbe .pfeilknopf { border-color: currentColor; }
.buehne.buchfarbe .pfeilknopf:hover { background: transparent; color: inherit; }
.pfeilknopf svg { display: block; }
.rueckweg a { display: inline-flex; align-items: center; min-height: var(--ziel); font-weight: 600; }
.rueckweg a.zurueck:not(.pfeilknopf)::before { content: "←"; margin-right: 0.4em; }
.rueckweg button { margin-left: auto; }

.buehne-text > :where(* + *) { margin-top: var(--raum-2); }
.oberzeile { font-size: var(--gr-klein); font-weight: 600; color: var(--text-leise); letter-spacing: 0.01em; }
/* Vollanzeige Teil 3, Punkt 8: woraus ein Paket besteht, im Kopf unter der Oberzeile. */
.paketzeile { font-weight: 600; margin-top: var(--raum-2); }
.buehne.buchfarbe .paketzeile { color: var(--auf-buch); }
.buehne .titel { font-size: var(--gr-titel-voll); font-weight: var(--schau-fett); line-height: 1.02; overflow-wrap: break-word; }
.buehne .mitwirkende { font-size: var(--gr-abschnitt); }
.buehne .untertitel { font-size: var(--gr-abschnitt); color: inherit; }
.verlagszeile { color: var(--text-leise); margin-top: var(--raum-4); }
.kopfquelle { color: var(--text-leise); font-size: var(--gr-kleinst); }

/* Das Titelbild ragt unten aus dem Kopf in die Seite. */
.buehne > .titelbild {
    position: absolute;
    left: var(--buehne-innen);
    bottom: calc(-1 * var(--ueberstand));
    width: var(--titelbild-breite);
    height: calc(var(--titelbild-breite) * 1.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.titelbild a { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%; }
.ohne-bild.gross { font-size: var(--platzhalter-schrift-gross); padding: var(--raum-3); background: var(--flaeche); outline: 1px solid var(--linie); outline-offset: -1px; }

/* Die Antwortzeile (Tresen Teil 4, A4): je Katalog Lieferbarkeit und Preis als zwei ruhige, gleich gewichtete Felder; rechts der Hauptknopf. */
.antwortzeile {
    margin-left: calc(var(--buehne-innen) + var(--titelbild-breite) + var(--raum-6));
    min-height: calc(var(--ueberstand) - var(--raum-5));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--raum-4) var(--raum-6);
}

.antwortzeile .zeilen { display: grid; gap: var(--raum-4); min-width: 0; }
.katalogzeile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--raum-6); min-width: 0; }
.katalogzeile + .katalogzeile { padding-top: var(--raum-3); border-top: 1px solid var(--linie); }
.katalogzeile .quelle { grid-column: 1 / -1; }
.katalogzeile .feld { min-width: 0; }
.katalogzeile .feldname { display: block; color: var(--text-leise); font-size: var(--gr-kleinst); font-weight: 600; }
.katalogzeile .lieferbar, .katalogzeile .preis .betrag { font-size: var(--gr-antwort); }
.katalogzeile .preis.gleich, .katalogzeile .abweichung { color: var(--text-leise); }
.katalogzeile .zustandsfeld { grid-column: 1 / -1; font-weight: 600; font-size: var(--gr-text-gross); }
.zustandsfeld.leer .zeichen, .zustandsfeld.aus { color: var(--text-leise); }
.zustandsfeld.achtung { color: var(--achtung); }
.zustandsfeld.fehler { color: var(--fehler); }
.antwortzeile .hauptknopf { min-width: 0; }
.antwortzeile > .ablage { grid-column: 1 / -1; }
/* Schritt G (Korrektur nach den Bildern): Zustände und Knopf der Abfrage stehen über die ganze Breite, nicht in einer Spalte. */
.antwortzeile > .abfrage-zustand, .antwortzeile > .abfrage-form { grid-column: 1 / -1; }
/* Bestand Teil 1 (C): Bestand und Leitsatz stehen über die ganze Breite, über den Zeilen der Kataloge. */
.antwortzeile > .bestand-zeilen, .antwortzeile > .leitsatz { grid-column: 1 / -1; }
/* Eigene Nummern Teil 1 (D, Korrektur nach den Bildern): die eigenen Warengruppen stehen unter den Zeilen der Kataloge über die ganze Breite. */
.antwortzeile > .eigene-werte { grid-column: 1 / -1; }

/* Bestand Teil 1 (D): die zwei Schalter über der Liste, nur mit Skript und nur nach einer Antwort mit Bestand. */
.bestand-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2) var(--raum-4); margin: 0 0 var(--raum-3); }
.bestand-filter .etikett { color: var(--text-leise); font-size: var(--gr-kleinst); font-weight: 600; }
.bestand-filter label { display: inline-flex; align-items: center; gap: var(--raum-2); min-height: max(2.75rem, 44px); cursor: pointer; }
.liste .eintrag[hidden] { display: none; }

.auch-als { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2) var(--raum-3); }
.auch-als .etikett { font-weight: 600; }

/* Die Abschnitte als Karten im Raster: breit drei Spalten, die Beschreibung über zwei. */
.raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--karte-abstand); align-items: start; }

.karte {
    background: var(--flaeche);
    border-radius: var(--rundung-karte);
    padding: var(--karte-innen);
    min-width: 0;
}

.karte > :where(* + *) { margin-top: var(--raum-3); }
.karte.breit { grid-column: span 2; }
.karte.achtung { background: var(--achtung-flaeche); }
.karte.achtung h2 { color: var(--achtung); }
.karte.achtung h2::before { content: "⚠ "; }
.karte .text { font-size: var(--gr-text-gross); max-width: var(--zeilenlaenge); }
.karte .mehr { font-size: var(--gr-klein); }
.karte .mehr a { display: inline-flex; align-items: center; min-height: var(--ziel); }
.karte .eintraege { gap: var(--raum-3); }
.karte .angaben > div { grid-template-columns: 1fr; gap: 0; }
.karte .angaben dt { font-size: var(--gr-klein); }

ul.preisliste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--raum-2); }
ul.preisliste li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--raum-3); }
ul.preisliste .betrag { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
ul.preisliste .code { color: var(--text-leise); font-size: var(--gr-klein); }

/* Darunter: alle Angaben der Kataloge, je Katalog getrennt und aufklappbar (wie in Teil 3 gebaut). */
.alle-angaben-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--raum-2) var(--raum-4); margin-top: var(--raum-7); }
.alle-angaben-kopf .alle-angaben { margin: 0; }
.alle-angaben-kopf + .hilfe { margin-top: var(--raum-2); }

.katalogblock {
    background: var(--flaeche);
    border-radius: var(--rundung-karte);
    padding: var(--karte-innen);
}

.vollanzeige > .katalogblock + .katalogblock { margin-top: var(--karte-abstand); }
.katalogblock > :where(* + *) { margin-top: var(--abstand-abschnitt); }
.quellenkopf { font-size: var(--gr-abschnitt); }
.blocktitel { font-family: var(--schrift-schau); font-stretch: var(--schau-breite); font-size: var(--gr-text-gross); font-weight: var(--schau-halbfett); }

.titelkopf { display: grid; grid-template-columns: var(--medium-breite) minmax(0, 1fr); gap: var(--raum-5); align-items: start; }
.titelkopf .titelbild { width: var(--medium-breite); aspect-ratio: 2 / 3; display: flex; align-items: flex-start; justify-content: center; }
.titelkopf .titelbild a { align-items: flex-start; }
.titelkopf .ohne-bild.gross { font-size: var(--platzhalter-schrift-sehr-lang); padding: 0.3em; background: var(--flaeche-getoent); outline: 0; }
.kopfangaben > :where(* + *) { margin-top: var(--raum-2); }

.handelskopf { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--abstand-abschnitt); }

/* Jeder Abschnitt eine helle Fläche auf der Karte des Katalogs: Flächen statt Linien. */
.abschnitt { background: var(--grund); border-radius: var(--rundung-klein); padding: var(--raum-3) var(--raum-4); }
.abschnitt > :where(* + *) { margin-top: var(--raum-2); }
.abschnitt.offen { padding-top: var(--raum-4); padding-bottom: var(--raum-4); }
.handelskopf .angaben > div { grid-template-columns: 1fr; gap: 0; }
.abschnitt h3 { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-text); font-weight: 600; }
.abschnitt h4 { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-klein); margin: var(--raum-2) 0 0; color: var(--text-leise); font-weight: 600; }
.abschnitt .preis .betrag { font-size: var(--gr-abschnitt); }
.abschnitt .lieferbar { font-family: var(--schrift-text); font-stretch: normal; font-size: var(--gr-text); line-height: var(--zeile-text); }

details.abschnitt { padding-top: 0; padding-bottom: 0; }
details.abschnitt[open] { padding-bottom: var(--raum-4); }
details.abschnitt > summary { cursor: pointer; list-style-position: inside; min-height: var(--ziel); display: flex; align-items: center; gap: var(--raum-2); border-radius: var(--rundung-klein); }
details.abschnitt > summary::before { content: "+"; font-weight: 700; color: var(--tinte); width: 1em; text-align: center; }
details.abschnitt[open] > summary::before { content: "–"; }
details.abschnitt > summary::-webkit-details-marker { display: none; }
details.abschnitt > summary h3 { display: inline; }
details.abschnitt > summary:hover h3 { color: var(--tinte); }
details.abschnitt > summary + * { margin-top: 0; }

.begruendung, .rechnung, .vergleich, .spaeter, .feldwert { color: var(--text-leise); font-size: var(--gr-klein); }

.text p + p { margin-top: var(--raum-2); }
.text ul, .text ol { margin: var(--raum-2) 0; padding-left: 1.5rem; }
.text { overflow-wrap: break-word; }
.textart { font-family: var(--schrift-text); }
.beschreibung .text { max-width: var(--zeilenlaenge); }

.eintraege { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--raum-2); }
.eintraege li { overflow-wrap: anywhere; }
.eintraege .code, ul.bezugsquellen .code { color: var(--text-leise); font-size: var(--gr-klein); }
.eintraege .werte { font-variant-numeric: tabular-nums; }
.eintraege .angaben { margin-top: var(--raum-1); }
.eintraege a { display: inline-block; padding: 0.3em 0; }

ul.bezugsquellen { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--raum-2); }
ul.bezugsquellen li { overflow-wrap: anywhere; }
details.kontakt, details.aufklapp { margin-top: var(--raum-1); }
details.kontakt > summary, details.aufklapp > summary { cursor: pointer; color: var(--tinte); min-height: var(--ziel); display: flex; align-items: center; gap: var(--raum-2); width: fit-content; border-radius: var(--rundung-klein); }
details.kontakt > summary::before, details.aufklapp > summary::before { content: "+"; font-weight: 700; width: 1em; text-align: center; }
details.kontakt[open] > summary::before, details.aufklapp[open] > summary::before { content: "–"; }
details.kontakt > summary::-webkit-details-marker, details.aufklapp > summary::-webkit-details-marker { display: none; }
.aufgeloest { color: var(--text-leise); }
.werte { overflow-wrap: anywhere; }

.tabelle { overflow-x: auto; }
table.preise { border-collapse: collapse; width: 100%; font-size: var(--gr-klein); }
table.preise th, table.preise td { text-align: left; padding: var(--raum-2) var(--raum-3) var(--raum-2) 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.preise th { color: var(--text-leise); font-weight: 600; }
table.preise .betrag { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* Vollanzeige Teil 3, Punkt 3: der Preis, der heute für die Buchhandlung gilt, getönt und mit „gilt heute“ in Worten
   (nicht nur Farbe). Weiß auf --zusage und --grund auf --zusage sind in hell und dunkel über 4,5 : 1. */
table.preise tr.gilt td { background: var(--zusage-flaeche); }
table.preise tr.gilt td:first-child { box-shadow: inset 4px 0 0 var(--zusage); padding-left: var(--raum-3); }
.gilt-marke { display: inline-block; margin-left: var(--raum-2); padding: 0 var(--raum-2); border-radius: var(--rundung-klein); background: var(--zusage); color: var(--grund); font-size: 0.85em; font-weight: 700; white-space: nowrap; }

/* Vollanzeige Teil 3, Punkt 8: die Aufteilung der Mehrwertsteuer eines Pakets, wie die Preise. */
.steuerteile-titel { margin-top: var(--raum-4); font-size: var(--gr-klein); }
table.steuerteile { border-collapse: collapse; width: 100%; font-size: var(--gr-klein); margin-top: var(--raum-2); }
table.steuerteile caption { text-align: left; font-weight: 600; padding-bottom: var(--raum-1); }
table.steuerteile th, table.steuerteile td { text-align: left; padding: var(--raum-2) var(--raum-3) var(--raum-2) 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.steuerteile th { color: var(--text-leise); font-weight: 600; }
table.steuerteile .betrag { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Vollanzeige Teil 3, Punkt 4: mehrere Texte unter einer Überschrift als Liste. */
ul.textliste { margin: var(--raum-1) 0 var(--raum-3); padding-left: 1.25rem; }
ul.textliste > li + li { margin-top: var(--raum-2); }

/* Vollanzeige Teil 3, Punkt 7: das Bild der Person bei ihr, links neben Namen und Angaben. */
li.mit-bild { display: flow-root; }
.bild-klein.person-bild { float: left; width: 4rem; aspect-ratio: 4 / 5; margin: 0 var(--raum-3) var(--raum-2) 0; }
.bild-klein.person-bild img { object-fit: cover; }
.person-web { margin-top: var(--raum-1); }

/* Quellen und Lizenzen Teil 1: die Gruppen der Pakete, die Lizenztexte zum Aufklappen, die Datenquellen. */
.quellen-seite .vorspann { font-size: var(--gr-text-gross); max-width: var(--zeilenlaenge); }
.quellen-seite .kasten > h3 { margin-top: var(--raum-5); }
table.lizenzen .paket { overflow-wrap: anywhere; }
table.lizenzen .fassung { white-space: nowrap; font-variant-numeric: tabular-nums; }
pre.lizenztext { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--schrift-fest); font-size: var(--gr-kleinst); line-height: 1.5; max-width: var(--zeilenlaenge); margin: var(--raum-2) 0 0; padding: var(--raum-3); background: var(--flaeche-getoent); border-radius: var(--rundung-klein); color: var(--text); }
.angaben.quellen { margin-top: var(--raum-4); }
.angaben.quellen > div { grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); }

.fremd-hinweis { color: var(--text-leise); font-size: var(--gr-klein); }
.adresse, a.fremd { overflow-wrap: anywhere; }

ul.medien { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--raum-2); }
ul.medien li { display: flex; gap: var(--raum-3); align-items: center; }
.bild-klein { flex: none; width: var(--medium-breite); aspect-ratio: 2 / 3; display: flex; align-items: center; justify-content: center; }

/* Vollanzeige-Nachschliff: der Code klein hinter seinem Wort; was unbekannt ist, steht klein (Befunde 4 und 7). */
.schluessel { color: var(--text-leise); font-size: var(--gr-kleinst); font-family: var(--schrift-fest); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.lieferbar.unbekannt { font-size: var(--gr-klein); font-weight: 400; }

/* Vollanzeige-Nachschliff: Claim und Verkaufshinweise in der Karte der Beschreibung (Vergleich mit VLB Online). */
.karte .claim { font-size: var(--gr-text-gross); font-weight: 600; margin: 0 0 var(--raum-3); }
.karte .claim p { margin: 0; }
.karte .verkaufshinweis { margin-top: var(--raum-4); padding-top: var(--raum-3); border-top: 1px solid var(--linie); }
.karte .verkaufshinweis .textart { font-size: var(--gr-klein); font-weight: 600; color: var(--text-leise); margin: 0 0 var(--raum-1); }

/* Vollanzeige-Nachschliff, Befund 11: die weiteren Medien als Vorschau mit der Art in Worten. */
ul.medien { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: var(--raum-3); }
ul.medien li { align-items: flex-start; }
ul.medien .bild-klein { width: var(--vorschau-breite); }
ul.medien .medienart { display: block; }

/* Vollanzeige-Nachschliff, Befund 12: nachgeladen nennt „Auch als“ nur Form, Jahr und Preis (der Titel ist derselbe). */
.auch-als .nachgeladen-titel { display: none; }
.eintraege .nachgeladen-titel::after { content: " ·"; }

.verlag-laden { display: flex; flex-wrap: wrap; gap: var(--raum-2); align-items: center; }

.weitere-kataloge ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-2) var(--raum-3); }
.weitere-kataloge a { display: inline-flex; align-items: center; min-height: var(--ziel); padding: 0 var(--raum-5); border-radius: var(--rundung-pille); background: var(--flaeche); text-decoration: none; font-weight: 600; }
.weitere-kataloge a:hover { background: var(--flaeche-getoent); }

/* Das Titelbild groß (nur mit Skript). */
.gross-ansicht {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--raum-3);
    padding: var(--seitenrand);
    background: var(--grund);
}

.gross-ansicht img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; border-radius: var(--rundung-bild); }

/* Das Buch tönt die Karte zart (nur wo der Browser Farben mischen kann; die Mischung bleibt so hell, dass jeder Text lesbar ist: Test). */
@supports (background: color-mix(in srgb, red 9%, blue)) {
    .eintrag.buchfarbe { background: color-mix(in srgb, var(--buch) var(--buch-anteil), var(--flaeche)); }
}

/* ---------- 8 Bewegung (nur wer sie nicht abgestellt hat) ---------- */

@media (prefers-reduced-motion: no-preference) {
    /* Befund 20: das Bild im Karussell blendet weich über. */
    .gross-ansicht.karussell > img { transition: opacity var(--dauer) var(--verlauf); }

    /* Tresen-Nachschliff 3, Punkt 4: der runde Knopf „Ins Postfach“ gleitet weich herein; sonst erscheint er ohne Bewegung. */
    .schwebeknopf { transform: translateY(0.75rem); transition: opacity var(--dauer) var(--verlauf), transform var(--dauer) var(--verlauf), visibility 0s linear var(--dauer); }
    .schwebeknopf.sichtbar { transform: none; transition: opacity var(--dauer) var(--verlauf), transform var(--dauer) var(--verlauf), visibility 0s; }

    /* Von der Liste in die Vollanzeige: das Titelbild wächst an seinen Platz (Browser, die es können; alle anderen wechseln die Seite). */
    @view-transition { navigation: auto; }

    .buehne > .titelbild, .bild.wandert, .eintrag:target .bild { view-transition-name: titelbild; }

    /* Zurück aus der Vollanzeige wächst das Bild in seine Karte (die Adresse nennt sie); wird dann eine andere geöffnet, wandert nur deren Bild. */
    .liste:has(.wandert) .eintrag:target .bild:not(.wandert) { view-transition-name: none; }
    ::view-transition-group(titelbild) { animation-duration: var(--dauer); animation-timing-function: var(--verlauf); }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }

    /* Nachgeladenes erscheint an seinem festen Platz, ohne Sprung. */
    .neu { animation: erscheinen var(--dauer) var(--verlauf) both; }
    .buehne { transition: background-color var(--dauer) var(--verlauf), color var(--dauer) var(--verlauf); }
    .eintrag { transition: background-color var(--dauer) var(--verlauf); }
}

@keyframes erscheinen {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- 9 schmale Fenster (Tablet hochkant, Telefon) ---------- */

@media (max-width: 64rem) {
    :root { --titelbild-breite: 13rem; --buehne-innen: 1.5rem; --antwort-breite: 17rem; }
    :root[data-dichte="kompakt"] { --titelbild-breite: 8rem; --buehne-innen: 1.25rem; }
    .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 46rem) {
    :root { --titelbild-breite: 8rem; --ueberstand: 0rem; --buehne-innen: 1.125rem; --karte-innen: 1.125rem; --karte-spalte: 1rem; --bild-breite: 4.5rem; --bild-breite-gross: 6.5rem; --bild-breite-klein: 3rem; --raum-6: 1.25rem; --rundung-karte: 1.25rem; --suchfeld-hoehe: 3.5rem; }
    :root[data-dichte="kompakt"] { --titelbild-breite: 5rem; --ueberstand: 0rem; --buehne-innen: 0.875rem; --karte-innen: 0.75rem; --bild-breite: 3rem; --bild-breite-gross: 4.5rem; }

    /* Alles untereinander, die Antwort unter den Angaben. */
    .eintrag, .eintrag.gross { grid-template-columns: var(--bild-breite) minmax(0, 1fr); }
    .eintrag.gross { grid-template-columns: var(--bild-breite-gross) minmax(0, 1fr); }
    .antwort { grid-column: 1 / -1; }
    .karte-postfach { grid-template-columns: var(--bild-breite-klein) minmax(0, 1fr); }
    .zustand-postfach { grid-column: 1 / -1; }
    .unter-feld { display: grid; }
    .katalogliste { display: grid; gap: var(--raum-1); align-items: start; }
    .kataloge.platz-1 { min-height: calc(2 * 1.75rem); }
    .kataloge.platz-2 { min-height: calc(3 * 1.75rem); }
    .kataloge.platz-3 { min-height: calc(4 * 1.75rem); }
    .kataloge.platz-4 { min-height: calc(5 * 1.75rem); }

    .navigation { margin-left: 0; width: 100%; }
    .navigation ul { flex-wrap: wrap; }
    .navigation a { padding: 0 var(--raum-3); }
    .angaben > div, .angaben.quellen > div { grid-template-columns: 1fr; gap: 0; }
    .suchfeld .zeile { padding-left: var(--raum-4); padding-right: var(--raum-1); }
    .suchfeld input { font-size: var(--gr-text-gross); }
    .suchfeld button { padding: 0 var(--raum-4); }

    /* Der Kopf schmal: alles untereinander, das Titelbild oben. */
    .buehne { min-height: 0; padding: var(--raum-2) var(--buehne-innen) var(--buehne-innen); }
    .rueckweg { margin-left: 0; }
    .buehne > .titelbild { position: static; width: var(--titelbild-breite); height: auto; aspect-ratio: 2 / 3; justify-content: flex-start; margin-bottom: var(--raum-4); }
    .titelbild a { justify-content: flex-start; }
    .antwortzeile { margin-left: 0; min-height: 0; grid-template-columns: minmax(0, 1fr); }
    .katalogzeile { gap: 0 var(--raum-4); }
    .raster { grid-template-columns: minmax(0, 1fr); }
    .karte.breit { grid-column: auto; }
    .titelkopf { grid-template-columns: 1fr; }

    /* Die Preise untereinander, jeder Wert mit seiner Spalte. */
    table.preise thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    table.preise tr { display: block; padding: var(--raum-2) 0; border-bottom: 1px solid var(--linie); }
    table.preise td { display: block; border: 0; padding: 0.05rem 0; }
    table.preise td:empty { display: none; }
    table.preise td::before { content: attr(data-etikett) ": "; color: var(--text-leise); font-weight: 400; }
    table.steuerteile thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    table.steuerteile tr { display: block; padding: var(--raum-2) 0; border-bottom: 1px solid var(--linie); }
    table.steuerteile td { display: block; border: 0; padding: 0.05rem 0; }
    table.steuerteile td:empty { display: none; }
    table.steuerteile td::before { content: attr(data-etikett) ": "; color: var(--text-leise); font-weight: 400; }
    table.lizenzen td.paket { font-weight: 600; overflow-wrap: anywhere; }
    table.lizenzen td.paket::before { content: none; }

    /* Vollanzeige-Nachschliff: In der schmalen Katalogzeile darf ein Kennzeichen des Preises („bis 31. Dezember 2026“)
       umbrechen; mit den Textabständen aus WCAG 1.4.12 ragte es sonst über den Rand, und die Seite rollte waagrecht. */
    .katalogzeile .preis span.kennzeichen { white-space: normal; }
    .katalogzeile .feld { overflow-wrap: break-word; }
}

/* ---------- 9b Eingrenzen (Eingrenzen Teil 1): Schild, Facetten, Filter der Liste ---------- */

.eingrenzen { display: grid; gap: var(--raum-3); margin: var(--raum-3) 0 var(--raum-4); }
.schild-eingrenzung { padding: var(--raum-2) var(--raum-4); border-radius: var(--rundung-klein); background: var(--flaeche-getoent); max-width: var(--zeilenlaenge); }
.schild-eingrenzung.nicht { background: var(--achtung-flaeche); color: var(--achtung); }
.schild-eingrenzung p { margin: 0; }
.schild-eingrenzung p + p { margin-top: var(--raum-1); }
.schild-text { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2); }
.schild-text .satz { font-weight: 600; overflow-wrap: anywhere; }
.schild-text .zustand { font-weight: 400; }
.schild-text .kreuz { display: inline-flex; align-items: center; min-height: var(--ziel); padding: 0 var(--raum-3); font-size: var(--gr-klein); }
.eingrenzen-oeffnen, .facetten-schliessen { margin: 0; }
.eingrenzen-oeffnen a, .facetten-schliessen a { display: inline-flex; align-items: center; min-height: var(--ziel); font-weight: 600; }
.facetten { display: grid; gap: var(--raum-4); padding: var(--raum-4); border: 1px solid var(--linie); border-radius: var(--rundung-klein); }
.facetten-titel { margin: 0; font-size: var(--gr-text); }
.facette h4, .merkmal h4 { margin: 0 0 var(--raum-1); font-size: var(--gr-klein); color: var(--text-leise); font-weight: 600; }
.facette > .hilfe { margin: 0 0 var(--raum-1); font-size: var(--gr-klein); }
ul.werte { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--raum-1) var(--raum-2); }
ul.werte.davon { display: grid; gap: var(--raum-1); padding-left: var(--raum-4); border-left: 2px solid var(--linie); margin-top: var(--raum-1); }
.wert { display: inline-flex; align-items: center; gap: 0.4em; min-height: var(--ziel); padding: 0 var(--raum-3); border-radius: var(--rundung-pille); background: var(--flaeche); overflow-wrap: anywhere; }
a.wert { color: var(--tinte); text-decoration: none; font-weight: 600; }
a.wert:hover { text-decoration: underline; }
/* Aufräumen 34: ein nicht wählbarer Wert ist ruhiger Text mit Zahl, keine Schaltfläche. */
.wert.lesen { min-height: 0; padding: 0; border-radius: 0; background: none; color: var(--text); font-weight: 400; }
.facette.nur-ansicht ul.werte { gap: var(--raum-1) var(--raum-4); }
.nur-ansicht-hinweis { font-weight: 400; }
.wert.gewaehlt { background: var(--tinte); color: var(--auf-tinte); font-weight: 600; }
.wert .zahl { font-weight: 400; font-variant-numeric: tabular-nums; }
details.knoten > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 0.4em; min-height: var(--ziel); padding: 0 var(--raum-3); border-radius: var(--rundung-pille); background: var(--flaeche); }
details.knoten > summary::before { content: "+"; font-weight: 700; color: var(--tinte); }
details.knoten[open] > summary::before { content: "–"; }
details.knoten > summary::-webkit-details-marker { display: none; }
details.knoten[open] { display: grid; gap: var(--raum-1); justify-items: start; }
ul.werte > li:has(> details.knoten[open]) { flex-basis: 100%; }
.davon-titel { margin: 0; font-size: var(--gr-klein); color: var(--text-leise); }
nav.spur ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-1); }
nav.spur li + li::before { content: "›"; color: var(--text-leise); margin-right: var(--raum-1); }
details.listenfilter > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--ziel); font-weight: 600; color: var(--tinte); }
details.listenfilter[open] { display: grid; gap: var(--raum-3); }
details.listenfilter .merkmal { margin-top: var(--raum-2); }
.merkmal { display: grid; gap: var(--raum-1); }
.notbehelf { font-size: var(--gr-klein); }
details.ohne-angabe { margin-top: var(--raum-3); }
details.ohne-angabe > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--ziel); font-weight: 600; }
/* Eingrenzen Teil 2: Lesemotive ohne Facette, der Schalter „ähnlich klingend“, die Vorschläge anderer Schreibweisen. */
details.lesemotive > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--ziel); font-weight: 600; color: var(--tinte); }
.schalter-aehnlich { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--raum-2); margin: var(--raum-2) 0 0 var(--raum-5); min-height: var(--ziel); }
.suchfeld .schalter-aehnlich input { flex: none; width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0; padding: 0; border: revert; background: revert; accent-color: var(--tinte); }
.schalter-aehnlich .hilfe { flex: 1 1 20rem; }
.schalter-aehnlich label { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--ziel); }
.vorschlaege .werte form, .aehnlich form { display: inline; }
.eintrag.e2-aus { display: none; }

/* ---------- 10 Druck ---------- */

@media print {
    .kopf nav, .suchfeld, .knoepfe, .blaettern, .sprung, .rueckweg, .verlag-laden, .weitere-kataloge, .zuletzt { display: none; }
}

/* ---------- 11 E-Book-Kauf (E-Book-Kauf Teil 4) ---------- */

.ebookformular > :where(* + *), .ebook-dialog > :where(* + *) { margin-top: var(--raum-4); }
.ebookformular .eingabe input.kurz { max-width: 6rem; text-transform: uppercase; }
.ebook-kunde > :where(* + *) { margin-top: var(--raum-3); }
.ebook-angebot .betrag, .angaben .betrag { font-weight: 600; font-variant-numeric: tabular-nums; }
.angaben .code, .ebook-vorgaenge .code { font-family: var(--schrift-fest); letter-spacing: 0.06em; }
.ebook-bezuege a { display: inline-flex; align-items: center; min-height: var(--ziel); margin-right: var(--raum-3); }
.hauptknopf { display: flex; flex-wrap: wrap; gap: var(--raum-3); align-items: center; }

/* Die Marke des Vorführbezugs: Zeichen und Wort, in hell und dunkel deutlich. */
.vorfuehrung {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: var(--raum-2) var(--raum-4);
    border: 2px solid var(--achtung);
    border-radius: var(--rundung-klein);
    background: var(--achtung-flaeche);
    color: var(--achtung);
    font-weight: 700;
}
.vorfuehrung.klein { padding: 0 var(--raum-2); border-width: 1px; font-size: var(--gr-kleinst); }

/* Der Zustand: Zeichen und Wort; die Farbe kommt nur dazu. */
.ebook-zustand { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; white-space: nowrap; }
.ebook-zustand.gut { color: var(--zusage); }
.ebook-zustand.achtung { color: var(--achtung); }
.ebook-zustand.fehler { color: var(--fehler); }
.ebook-stand { font-size: var(--gr-titel-karte); }
.ebook-vorgang .kasten .frage { font-size: var(--gr-text-gross); margin-bottom: 0; }
.ebook-handlung .hilfe { margin-top: var(--raum-2); }
/* E-Book-Kauf Teil 4 Nachschliff: der Rückweg steht in der Spalte des Inhalts (der Rückweg der Titelseite ragt um das Titelbild nach links). */
.ebook-vorgang > .rueckweg { margin-left: 0; }

/* Der QR-Code: immer schwarz auf weiß mit Ruhezone, damit Kasse und Handy ihn in hell und dunkel lesen. */
.qr { display: block; width: min(100%, 22rem); height: auto; aspect-ratio: 1; border-radius: var(--rundung-bild); }
.qr.gross { width: min(100%, 26rem); margin: var(--raum-4) auto; }
.qr-grund { fill: white; }
.qr-punkte { fill: black; }
.ebook-kasse { display: grid; grid-template-columns: minmax(12rem, 22rem) minmax(0, 1fr); gap: var(--raum-5); align-items: start; }
.ebook-kasse-text > :where(* + *) { margin-top: var(--raum-2); }
.ebook-code strong { font-family: var(--schrift-fest); font-size: var(--gr-antwort); letter-spacing: 0.08em; }
.ebook-betrag { font-size: var(--gr-antwort); font-weight: 700; font-variant-numeric: tabular-nums; }
.ebook-kasse .knoepfe { margin-top: var(--raum-4); }
.ebook-abholen .kasten { text-align: center; }
.ebook-abholen .kasten .frage { font-size: var(--gr-abschnitt); }
.ebook-abholen .knoepfe { justify-content: center; }
@media (max-width: 40rem) {
    .ebook-kasse { grid-template-columns: minmax(0, 1fr); }
}

/* Die Liste. */
.ebook-suche { display: flex; flex-wrap: wrap; gap: var(--raum-3); align-items: end; }
.ebook-suche input { font-family: var(--schrift-fest); text-transform: uppercase; }
.ebook-filter a.pille { min-height: var(--ziel); color: var(--text); text-decoration: none; }
.ebook-filter a.pille[aria-current] { background: var(--tinte); color: var(--auf-tinte); }
.ebook-filter a.pille[aria-current] .art { color: var(--auf-tinte); }
table.ebook-vorgaenge { font-size: var(--gr-text); }
table.ebook-vorgaenge tbody th { font-weight: 600; color: var(--text); }
table.ebook-vorgaenge a { display: inline-flex; align-items: center; min-height: var(--ziel); }
.ebook-verlauf time { margin-right: var(--raum-2); }

/* Der Dialog „E-Book verkaufen“ (mit Skript; ohne Skript ist es eine eigene Seite). */
dialog.dialog {
    width: min(46rem, calc(100vw - 2 * var(--seitenrand)));
    max-height: calc(100vh - 2 * var(--seitenrand));
    overflow: auto;
    padding: var(--raum-5);
    border: 1px solid var(--rand);
    border-radius: var(--rundung-karte);
    background: var(--grund);
    color: var(--text);
}
dialog.dialog::backdrop { background: color-mix(in srgb, var(--text) 55%, transparent); }
.dialog-kopf { color: var(--text-leise); font-weight: 600; }

/* Der Ausdruck für die Kasse: A6 oder Bonbreite; auf dem Bildschirm als Blatt gezeigt. */
.ebook-druck {
    background: white;
    color: black;
    border: 1px solid var(--rand);
    padding: 6mm;
    margin-inline: auto;
    text-align: center;
    display: grid;
    gap: 2mm;
    justify-items: center;
}
.ebook-druck.a6 { width: 105mm; max-width: 100%; box-sizing: border-box; min-height: 148mm; align-content: start; }
.ebook-druck.bon { width: 72mm; max-width: 100%; box-sizing: border-box; padding: 3mm; }
.ebook-druck h1 { font-size: 1.25rem; line-height: 1.2; color: black; overflow-wrap: anywhere; }
.ebook-druck.bon h1 { font-size: 1rem; }
.ebook-druck .druck-laden { font-weight: 600; }
.ebook-druck .druck-zeile { font-size: 0.875rem; }
.ebook-druck .druck-preis { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ebook-druck .druck-code strong { font-family: var(--schrift-fest); font-size: 1.25rem; letter-spacing: 0.08em; }
.ebook-druck .qr { width: 68mm; max-width: 100%; border-radius: 0; }
.ebook-druck.bon .qr { width: 62mm; }
.ebook-druck .vorfuehrung { background: white; color: black; border-color: black; }

@page ebook-a6 { size: 105mm 148mm; margin: 0; }
@page ebook-bon { size: 72mm 190mm; margin: 0; }
@media print {
    .druck-leiste, .kopf, .fuss, .probe { display: none; }
    .ebook-druck { border: 0; margin: 0; }
    .ebook-druck.a6 { page: ebook-a6; max-width: none; }
    .ebook-druck.bon { page: ebook-bon; max-width: none; }
}

/* ---------- Tresen-Nachschliff (Nacht, 05./06.12.2026) ---------- */

/* Tresen-Nachschliff 3, Punkt 4: „Ins Postfach“ als runder schwebender Knopf unten rechts (nur mit Skript). Er wechselt nur
   Deckkraft und Lage, nichts wird umgebaut; die Seite hat unten von Anfang an Raum, damit er nie Inhalt verdeckt. */
.schwebeknopf {
    position: fixed; z-index: 20; right: max(var(--seitenrand), env(safe-area-inset-right)); bottom: max(var(--raum-5), env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    background: var(--tinte); color: var(--grund); border: 2px solid var(--grund);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--text) 30%, transparent);
    opacity: 0; visibility: hidden;
}
.schwebeknopf.sichtbar { opacity: 1; visibility: visible; }
.schwebeknopf svg { display: block; }
.schwebeknopf::after {
    content: attr(data-hinweis); position: absolute; right: calc(100% + var(--raum-2)); top: 50%; transform: translateY(-50%);
    white-space: nowrap; padding: var(--raum-1) var(--raum-2); border-radius: var(--rundung-bild);
    background: var(--tinte); color: var(--grund); font-size: var(--gr-klein); font-weight: 600;
    opacity: 0; pointer-events: none;
}
.schwebeknopf:hover::after, .schwebeknopf:focus-visible::after { opacity: 1; }
body.mit-schwebeknopf { padding-bottom: calc(3.5rem + 2 * var(--raum-5)); }

/* Grundregel: die Codes eines Blocks zugeklappt ganz unten, als ruhige Tabelle. */
.rohcodes-tabelle { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: var(--gr-klein); }
.rohcodes-tabelle th, .rohcodes-tabelle td { text-align: left; padding: var(--raum-1) var(--raum-3) var(--raum-1) 0; border-bottom: 1px solid var(--linie); vertical-align: top; overflow-wrap: anywhere; }
.rohcodes-tabelle th { color: var(--text-leise); font-weight: 600; }
.rohcodes-tabelle code { font-family: var(--schrift-fest); }

/* Befunde 11 und 15: Webadressen als ruhige Liste, Art links, Verweis rechts. */
.webliste { margin-top: var(--raum-2); }
.webliste dd a { overflow-wrap: anywhere; }

/* Befund 19: keine leere Vollanzeige; „Auch als“ ohne Titel im Katalog ist kein Verweis mehr. */
.nichts-gefunden { max-width: var(--zeilenlaenge); margin-top: var(--raum-5); }
.nichts-gefunden > :where(* + *) { margin-top: var(--raum-3); }
.pille.unbekannt { color: var(--text-leise); cursor: default; }

/* Befund 20: das Karussell der großen Bildansicht (nur mit Skript) und die Bilderseite ohne Skript. */
.gross-ansicht.karussell img { max-height: calc(100vh - 14rem); }
.karussell-leiste { display: flex; align-items: center; gap: var(--raum-3); }
.karussell-leiste .pfeilknopf { background: transparent; font: inherit; cursor: pointer; }
.karussell-leiste .pfeilknopf.voriger::before { content: "←"; }
.karussell-leiste .pfeilknopf.naechster::before { content: "→"; }
.karussell-stelle { margin: 0; min-width: 12em; text-align: center; }
.karussell-vorschau { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--raum-2); }
.karussell-vorschau button { min-width: var(--ziel); min-height: var(--ziel); padding: 2px; border: 2px solid transparent; border-radius: var(--rundung-bild); background: transparent; cursor: pointer; }
.karussell-vorschau button[aria-current="true"] { border-color: var(--tinte); }
.gross-ansicht .karussell-vorschau img { display: block; width: 40px; height: 60px; max-height: none; object-fit: cover; }
.alle-bilder { display: inline-flex; align-items: center; min-height: var(--ziel); margin-top: var(--raum-2); }
.bilder-liste { list-style: none; padding: 0; display: grid; gap: var(--raum-5); }
.bilder-liste img { display: block; max-width: 100%; height: auto; border-radius: var(--rundung-bild); }
.bilder-liste figcaption { margin-top: var(--raum-2); }

/* Punkt 4, Barrierefreiheit (2.4.11): Der runde Knopf verdeckt nie den Fokus; beim Rollen zum Fokus bleibt unten sein Platz frei. */
html:has(body.mit-schwebeknopf) { scroll-padding-bottom: calc(3.5rem + 2 * var(--raum-5)); }

/* ---------- Tresen-Nachschliff 3 (06.12.2026) ---------- */

/* Punkt 3: die ganze Trefferkarte öffnet die Vollanzeige. Der Titel bleibt der eine Verweis (für Vorleseprogramme keine doppelte
   Ansage); seine Fläche reicht über die Karte. Knöpfe, Felder und andere Verweise der Karte liegen darüber und bleiben eigene Ziele. */
.liste .eintrag { position: relative; }
.liste .eintrag .titel a::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.liste .eintrag :is(a:not(.titel a), button, input, select, textarea, summary, label, .ablage, .kennzeichen, .auch) { position: relative; z-index: 1; }
.liste .eintrag:has(.titel a:hover) { box-shadow: 0 0 0 2px var(--linie-stark, var(--linie)); }

/* Punkt 2: der Fuß der Liste ohne Seiten (Stand, „Weitere 20 laden“, die Grenze). */
.nachladen { display: grid; justify-items: center; gap: var(--raum-2); margin-top: var(--raum-5); text-align: center; }
.nachladen .stand { margin: 0; color: var(--text-leise); font-size: var(--gr-klein); }
.nachladen .weiter { margin: 0; }
.nachladen .grenze { margin: 0; max-width: var(--zeilenlaenge); font-weight: 600; }
.nachladen a[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* Punkt 1: der ruhige Satz zum VLB-Archiv unter der Liste. */
.archiv-hinweis { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 var(--raum-3); margin-top: var(--raum-4); font-size: var(--gr-klein); color: var(--text-leise); }
.archiv-hinweis a { display: inline-flex; align-items: center; min-height: var(--ziel); color: var(--tinte); font-weight: 600; }

/* Punkt 10: „zurück zur Liste“ mit sichtbarem Wort, damit es nie wie „voriger Treffer“ aussieht. */
.pfeilknopf.mit-wort { width: auto; gap: var(--raum-2); padding: 0 var(--raum-4) 0 var(--raum-3); font-weight: 600; }
.pfeilknopf.mit-wort .wort { white-space: nowrap; }

/* Punkt 5: kein Bild mehr im Block des führenden Katalogs; im Karussell oben klein „Alle Bilder groß ansehen“; ohne Skript ein unauffälliger Verweis. */
.titelkopf.ohne-bild-spalte { grid-template-columns: minmax(0, 1fr); }
.alle-bilder.leise { font-size: var(--gr-klein); color: var(--text-leise); }
.gross-ansicht .karussell-alle { align-self: flex-end; display: inline-flex; align-items: center; min-height: var(--ziel); font-size: var(--gr-klein); font-weight: 600; color: inherit; }

/* Punkt 7: Mitwirkende als ruhiges Raster: Bildspalte fester Breite (leer ohne Bild), daneben der Name, darunter klein die Rolle. */
.eintraege.personen > li.person { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--raum-3); align-items: start; }
.eintraege.personen.mit-bildspalte > li.person { grid-template-columns: 64px minmax(0, 1fr); }
.person-bildplatz { display: block; width: 64px; }
.person-bildplatz .bild-klein.person-bild { float: none; display: block; width: 64px; margin: 0; }
.person-text { display: block; min-width: 0; }
.person-text > .person-name { display: block; }
.person-text > .rolle { display: block; font-size: var(--gr-klein); color: var(--text-leise); }

/* Erzeugt aus den Grundwerten (TresenDesign): Browser ohne light-dark(). */
@supports not (color: light-dark(#000, #fff)) {
    :root { --grund: #FFFFFF; --flaeche: #F1F3F7; --flaeche-getoent: #E9EEF6; --text: #14181F; --text-leise: #545C6B; --tinte: #22407A; --tinte-tief: #182F5C; --auf-tinte: #FFFFFF; --zusage: #1B6B4C; --zusage-flaeche: #E2F2EA; --achtung: #6B4300; --achtung-flaeche: #FFF4DF; --fehler: #8A2E25; --fehler-flaeche: #FBEEEC; --rand: #6F7887; --linie: #D9DEE7; --fokus: #22407A; --buch: #22407A; --auf-buch: #FFFFFF; --buch-rot: #A8322B; --buch-nacht: #1E2C55; --buch-safran: #8A5600; --buch-tuerkis: #0B6566; --buch-salbei: #3F6448; }
    @media (prefers-color-scheme: dark) { :root:not([data-farbe="hell"]) { --grund: #0F1319; --flaeche: #181D26; --flaeche-getoent: #222B3A; --text: #EEF1F6; --text-leise: #AEB7C6; --tinte: #A9C4FF; --tinte-tief: #C9DAFF; --auf-tinte: #0F1319; --zusage: #74D6AC; --zusage-flaeche: #14291F; --achtung: #F2C879; --achtung-flaeche: #2E2412; --fehler: #F5A79F; --fehler-flaeche: #331C19; --rand: #8E98A9; --linie: #303A4A; --fokus: #A9C4FF; --buch: #2B4477; --auf-buch: #FFFFFF; --buch-rot: #962D26; --buch-nacht: #2A3D73; --buch-safran: #7E4F00; --buch-tuerkis: #0A5C5D; --buch-salbei: #3A5C42; } }
    :root[data-farbe="dunkel"] { --grund: #0F1319; --flaeche: #181D26; --flaeche-getoent: #222B3A; --text: #EEF1F6; --text-leise: #AEB7C6; --tinte: #A9C4FF; --tinte-tief: #C9DAFF; --auf-tinte: #0F1319; --zusage: #74D6AC; --zusage-flaeche: #14291F; --achtung: #F2C879; --achtung-flaeche: #2E2412; --fehler: #F5A79F; --fehler-flaeche: #331C19; --rand: #8E98A9; --linie: #303A4A; --fokus: #A9C4FF; --buch: #2B4477; --auf-buch: #FFFFFF; --buch-rot: #962D26; --buch-nacht: #2A3D73; --buch-safran: #7E4F00; --buch-tuerkis: #0A5C5D; --buch-salbei: #3A5C42; }
}
