/* iOS-nahes Erscheinungsbild: Systemschrift, gruppierte Karten, Tab-Bar, Light/Dark. */

:root {
    --bg: #f2f2f7;
    --card: #ffffff;
    --text: #000000;
    --text-secondary: #6c6c70;
    --separator: rgba(60, 60, 67, 0.18);
    --accent: #007aff;
    --accent-pressed: #0062cc;
    --danger: #ff3b30;
    --success: #34c759;
    --bar: rgba(249, 249, 249, 0.82);
    --radius: 14px;
    --tabbar-h: 62px;
    --above-tabbar: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --card: #1c1c1e;
        --text: #ffffff;
        --text-secondary: #98989f;
        --separator: rgba(84, 84, 88, 0.6);
        --accent: #0a84ff;
        --accent-pressed: #0a6fd8;
        --danger: #ff453a;
        --success: #30d158;
        --bar: rgba(22, 22, 24, 0.82);
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Ohne dies zieht ein Wisch nach unten am oberen Rand die Seite neu --
       auf dem Homescreen mitten im Fotografieren besonders aergerlich. Haelt
       ausserdem das Scrollen einer Liste davon ab, die ganze Seite mitzuziehen. */
    overscroll-behavior-y: contain;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* Das hidden-Attribut muss jede display-Angabe schlagen. Die Browser-Vorgabe
   [hidden] { display: none } ist schwächer als jede Klassenregel – ein
   .photo-grid { display: grid } hätte das Ausblenden sonst wirkungslos gemacht.
   Wer einen Bereich per hidden umschaltet, soll sich nicht merken müssen,
   ob dessen Klasse zufällig ein display setzt. */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.4;
    background: var(--bg);
    color: var(--text);
    padding-bottom: calc(var(--above-tabbar) + 16px);
}

.app-header {
    padding: calc(env(safe-area-inset-top) + 12px) 20px 4px;
    max-width: 640px;
    margin: 0 auto;
}

.app-header h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.app-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 8px 20px 24px;
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
}

.header-bar form {
    margin: 0;
}

.header-bar select,
.header-bar button {
    font-size: 13px;
}

.printer-select select {
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--separator);
    background: var(--bar);
    color: var(--text);
}

.printer-single {
    font-weight: 500;
    color: var(--text-secondary);
}

.header-bar button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0;
    text-decoration: underline;
}

.section-title {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin: 24px 4px 8px;
}

/* Gruppierte Liste im Stil der iOS-Einstellungen */
.card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}

.card + .card {
    margin-top: 16px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    min-height: 46px;
    color: var(--text);
    text-decoration: none;
}

.row-compact {
    padding: 9px 16px;
    min-height: 38px;
}

.row + .row {
    border-top: 0.5px solid var(--separator);
}

.row-value {
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

a.row::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(-45deg);
    opacity: 0.6;
    flex: none;
}

a.row:active {
    background: var(--separator);
}

.banner {
    background: color-mix(in srgb, var(--danger) 16%, transparent);
    color: var(--danger);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 16px;
}

.hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 4px;
}

.build-note {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    margin-top: 32px;
}

/* Buttons */
.button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease;
}

.button:active {
    transform: scale(0.975);
    background: var(--accent-pressed);
}

.button:disabled {
    opacity: 0.45;
    transform: none;
}

/* Segment-Umschalter im Stil der iOS-Systemsteuerung */
.segmented {
    display: flex;
    gap: 2px;
    margin-top: 12px;
    padding: 2px;
    background: var(--separator);
    border-radius: 10px;
}

.segmented button {
    flex: 1;
    padding: 7px 0;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.segmented button.is-active {
    background: var(--card);
    color: var(--accent);
    font-weight: 600;
}

.button-secondary {
    background: var(--card);
    color: var(--accent);
}

.button-secondary:active {
    background: var(--separator);
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.button-row .button {
    flex: 1;
}

/* Formulare */
textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 17px;
    color: var(--text);
    background: var(--card);
    border: none;
    border-radius: var(--radius);
    resize: vertical;
    outline: none;
}

textarea:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

/* System-Panel: Formularfelder im Stil der iOS-Einstellungen (Label links,
   Eingabe rechts, in eine .row eingebettet statt eigener Blockelemente). */
.field-row input[type="text"],
.field-row input[type="number"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: none;
    border-radius: 8px;
    outline: none;
    text-align: right;
}

.field-row input[type="text"]:focus,
.field-row input[type="number"]:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

.field-row select {
    padding: 8px 10px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: none;
    border-radius: 8px;
}

.field-row select:disabled {
    opacity: 0.6;
}

.field-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
}

.hint-danger {
    color: var(--danger);
}

/* Kamera und Vorschau */
.viewfinder {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

.viewfinder video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Weiße Fläche, damit die Papierkante sichtbar bleibt und dunkle Bildteile
   nicht mit dem Seitenhintergrund verschmelzen. */
.paper {
    display: flex;
    justify-content: center;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Höhe begrenzen, damit Regler und Druck-Button ohne Scrollen erreichbar bleiben. */
.preview-canvas {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 40vh;
    background: #fff;
    image-rendering: pixelated;
}

/* Aktionsleiste des Editors: immer über der Tab-Bar sichtbar, ohne Scrollen. */
.editor-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--above-tabbar);
    display: flex;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 20px;
    background: var(--bar);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9;
}

/* Platz, damit die fixierte Leiste den Inhalt nicht verdeckt. */
.editor-view {
    padding-bottom: 84px;
}

.editor-actions .button {
    flex: 1;
}

.editor-actions .button-secondary {
    flex: 0 0 38%;
}

/* Tab-Bar */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    padding: 6px 0 calc(env(safe-area-inset-bottom) + 4px);
    background: var(--bar);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--separator);
    z-index: 10;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}

.tab svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.tab-active {
    color: var(--accent);
}

/* Toasts */
.toast-host {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--above-tabbar) + 12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    pointer-events: none;
    z-index: 20;
}

.toast {
    max-width: 100%;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: rgba(28, 28, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-success { background: color-mix(in srgb, var(--success) 88%, black); }
.toast-error { background: color-mix(in srgb, var(--danger) 88%, black); }

/* Warteschlangen-Anzeige */
.queue-pill {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(28, 28, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    display: none;
    z-index: 20;
}

.queue-pill-visible {
    display: block;
}

/* Historie */
/* Raster wie in der Fotos-App: quadratische Kacheln, schmale Fugen */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 12px;
}

@media (min-width: 600px) {
    .photo-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.photo-tile {
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    border: none;
    background: var(--card);
    cursor: pointer;
    overflow: hidden;
}

.photo-tile img {
    width: 100%;
    height: 100%;
    /* Der Ausschnitt zeigt die Bildmitte – die Kacheln bleiben so gleich groß,
       obwohl die Bons unterschiedliche Seitenverhältnisse haben. */
    object-fit: cover;
    background: #fff;
    display: block;
}

.photo-tile:active img {
    opacity: 0.7;
}

/* Vollbild */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    /* Deckend, nicht durchscheinend: Sonst schimmern Tab-Leiste und Überschrift
       durch die Knöpfe und machen die Ansicht unruhig. */
    background: #000;
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.lightbox-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 8px);
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 26px;
    line-height: 1;
    color: #fff;
    background: rgba(120, 120, 128, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 56px 16px 8px;
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
}

.lightbox-bar {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}

.lightbox-date {
    margin: 0 0 12px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lightbox-actions .button {
    flex: 1 1 30%;
    /* .button ist auf volle Breite gesetzt – hier teilen sich drei die Zeile. */
    width: auto;
    margin: 0;
    padding: 12px 8px;
    font-size: 15px;
    text-align: center;
}

.lightbox-actions .button-secondary {
    background: rgba(120, 120, 128, 0.36);
    color: #fff;
}

/* Solange das Vollbild offen ist, darf der Hintergrund nicht mitscrollen. */
body.no-scroll {
    overflow: hidden;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 48px 20px;
}

/* Karte */
#map {
    height: 65vh;
    min-height: 320px;
    border-radius: var(--radius);
    /* Leaflet zeichnet Kacheln bis an die Kante; ohne dies stehen sie über. */
    overflow: hidden;
    background: var(--card);
    /* Leaflet vergibt intern z-index bis 1000 (Kacheln, Marker, Sprechblasen,
       Zoom-Kontrollen). Ohne eigenen Stapelkontext zählen diese Werte global
       mit und malen sich über Elemente wie .lightbox (z-index: 60) hinweg. */
    isolation: isolate;
}

.popup-bild {
    display: block;
    width: 160px;
    height: auto;
    background: #fff;
    border-radius: 6px;
}

/* Die Sprechblase bleibt bewusst hell, auch im Dunkelmodus: Sie sitzt auf den
   Kartenkacheln, und die sind immer hell. */

/* ---------------------------------------------------------------------------
   Bausteine für Verwaltung, Konto und Statusanzeigen.
   Bewusst im selben Stylesheet und ohne Framework -- das Projekt hat keinen
   Build-Schritt, alles muss ohne Werkzeugkette lesbar bleiben.
   --------------------------------------------------------------------------- */

.card-pad { padding: 16px; }
.card + .card { margin-top: 12px; }

.stack > * + * { margin-top: 14px; }

.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--separator);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    width: 100%;
    box-sizing: border-box;
}

button {
    font: inherit;
    padding: 10px 16px;
    border: 1px solid var(--separator);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.primary:active { background: var(--accent-pressed); }
button.secondary { color: var(--text-secondary); }
button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button-row form { margin: 0; }

.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input[type="text"] { flex: 1; }

.row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.lead { font-size: 17px; margin: 0 0 8px; }

.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.check input { width: auto; }

.tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-secondary);
    white-space: nowrap;
}
.tag-ok { color: var(--success); }
.tag-warn { color: #b26b00; }
.tag-muted { opacity: 0.7; }

/* Statuspunkt: Ein Farbpunkt allein wäre für Farbenblinde nicht lesbar --
   deshalb steht in der Oberfläche immer auch ein Wort daneben. */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-on { background: var(--success); }
.dot-off { background: var(--text-secondary); }

.kv { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; }
.kv > div > span:first-child { color: var(--text-secondary); }
.kv > div > span:last-child { text-align: right; }

.tabs-inline { display: flex; gap: 16px; margin-bottom: 12px; font-size: 15px; }
.tabs-inline .active { font-weight: 600; }

.banner-warn { background: #fff4e0; color: #7a4a00; }
.banner-error { background: #ffe9e7; color: #8c1d16; }
.banner-success { background: #e6f9ea; color: #12621f; }

@media (prefers-color-scheme: dark) {
    .banner-warn { background: #3a2a08; color: #ffcf80; }
    .banner-error { background: #3a1512; color: #ff9d94; }
    .banner-success { background: #0e2c15; color: #7ee29a; }
}

.queue-pill-waiting { opacity: 0.85; }

/* --- Gastzugang ---------------------------------------------------------- */
/* Der Gast bekommt dieselbe Fotoseite wie alle anderen; nur die Auswahl der
   freigegebenen Drucker und das freiwillige Namensfeld kommen hinzu. */
.gast-liste { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.gast-wahl { text-align: center; }

.gast-name { display: block; margin: 16px 0 4px; }
.gast-name input {
    width: 100%;
    margin-top: 6px;
}

.badge-offen {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85em;
    background: var(--ok-bg, #d8f3dc);
    color: var(--ok, #1b5e34);
    margin-right: 8px;
}

/* Marke auf Bildern, die über den Gastzugang kamen -- im Verlauf soll
   erkennbar sein, was Besuch gedruckt hat und was man selbst. */
.photo-tile { position: relative; }
.tile-gast {
    position: absolute;
    left: 4px; bottom: 4px; right: 4px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 0.72rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Versionsanzeige in der Verwaltung -- gross genug zum Vorlesen am Telefon. */
.version-gross { font-size: 1.3rem; margin: 4px 0 2px; }
.version-gross code { letter-spacing: 0.04em; }


/* --- Bedienelemente verhalten sich wie in einer App ---------------------- */
/* Langes Tippen auf einen Knopf markierte bisher dessen Beschriftung oder
   oeffnete Safaris Menue. Auf einem Telefon ist beides nie gewollt --
   getippt wird, nicht ausgewaehlt. touch-action: manipulation nimmt
   zusaetzlich die Verzoegerung, mit der iOS auf einen moeglichen Doppeltipp
   zum Zoomen wartet. */
button,
.button,
.tab,
.tabs-inline a,
.tabs-inline span,
.segmented button,
.lightbox-close {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

/* Bilder sind die Ausnahme: Langes Tippen soll dort weiterhin „Sichern" und
   „Teilen" anbieten. Genau so holt man sich ein gedrucktes Foto aufs
   Telefon -- ein eigener Herunterladen-Knopf waere dafuer der Umweg. */
.photo-tile img,
#lightboxImage {
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto;
}

/* Fliessender Bildlauf innerhalb von Bereichen, die selbst scrollen. */
.photo-grid,
.lightbox-stage {
    -webkit-overflow-scrolling: touch;
}

/* Rückweg zur Druckerauswahl im Gastzugang. Ohne Navigationsleiste gäbe es
   sonst keinen Weg zurück -- der Zurück-Knopf des Browsers fehlt auf dem
   Homescreen. */
.gast-zurueck { margin: 0 0 12px; }
.gast-zurueck a { text-decoration: none; font-size: 0.95rem; }

/* --- Vorschaubilder auf der Karte ---------------------------------------- */
/* Statt einer Nadel steht das Foto selbst an seinem Ort. Die Bons sind reines
   Schwarz/Weiß -- auf der bunten Karte brauchen sie einen weißen Rand und
   einen Schatten, sonst verschwimmen sie mit dem Hintergrund. */
.foto-pin {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 2.5px solid #fff;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    overflow: visible;
}

.foto-pin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Der Ausschnitt zeigt den oberen Rand: Dort steht bei einem Bon meist
       das Motiv, unten läuft er oft weiß aus. */
    object-position: top center;
    border-radius: 9.5px;
    display: block;
}

/* Die Spitze, die auf den Standort zeigt. */
.foto-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #fff;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.3));
}

/* Zahl für zusammengefasste Standorte. */
.foto-pin-zahl {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent, #0a84ff);
    border: 2px solid #fff;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Der Collage-Link ist lang und muss abschreibbar oder kopierbar sein --
   deshalb umbrechend statt abgeschnitten. */
.collage-link {
    margin: 4px 0 10px;
    word-break: break-all;
    font-size: 0.82rem;
    line-height: 1.45;
}

/* --- Blättern in der Großansicht ---------------------------------------- */
/* Gebraucht, seit ein Tipp auf eine Gruppe auf der Karte alle Bilder dieses
   Standorts öffnet -- vorher zeigte die Großansicht immer nur eins. */
.lightbox-blaettern {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 52px;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.lightbox-zurueck { left: calc(env(safe-area-inset-left) + 10px); }
.lightbox-weiter  { right: calc(env(safe-area-inset-right) + 10px); }

.lightbox-zaehler {
    margin: 0 0 4px;
    font-size: 0.85rem;
    opacity: 0.75;
}

/* --- Gastzugang in der Verwaltung --------------------------------------- */
/* QR-Code neben dem Link: Ein 43-Zeichen-Schlüssel wird nicht abgetippt, er
   wird gescannt oder kopiert. */
.gast-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rand, rgba(128,128,128,.25));
}

.gast-qr {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.gast-qr img {
    /* Weißer Grund auch im dunklen Erscheinungsbild -- ein invertierter
       QR-Code wird von vielen Kameras nicht gelesen. */
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    flex: none;
}

.gast-qr-neben {
    flex: 1 1 260px;
    min-width: 0;
}

.gast-qr-neben .collage-link code {
    word-break: break-all;
}
