/* Messe-Inventar - LottiCards.
   Mobile first: Messebesucher am Handy, im Gedraenge, bei hellem Hallenlicht.

   FARBWELT (Entscheidung Dennis 22.08.2026 - "Route A mit Farbgebung C"):
   heller Grund, Navy als Textfarbe, Gold streng als Akzent. Gold #CFA22B hat
   auf Weiss nur ~2,3:1 Kontrast - als Text also unbrauchbar. Deshalb zwei
   Gold-Rollen:
     --gold       Flaechen, Linien, Fokusring, gefuellte Chips (Text darauf Navy)
     --gold-text  abgedunkeltes Gold NUR fuer Text auf Hell (~3,6:1, reicht fuer
                  grossen, fetten Text wie den Preis; kleiner Text bleibt Navy/Grau)

   SCHRIFT: Gilroy ist die Markenschrift (CI-Skill). Sie wird NICHT ausgeliefert
   (Lizenzfrage offen), sondern nur benutzt, wenn sie auf dem Geraet installiert
   ist; sonst greift die System-Schrift. Keine Webfonts - die Seite laedt nichts
   von fremden Hosts (CSP) und nichts, was das Messe-WLAN unnoetig belastet.
   Der Gilroy-Charakter wird ueber Versalien mit Sperrung und kraeftige Zahlen
   nachgebildet, nicht ueber eine geliehene Ersatzschrift. */

:root {
    color-scheme: light; /* verhindert Auto-Dark-Invertierung auf Android-Handys */
    --gold: #CFA22B;
    --gold-text: #A57D14;
    --gold-schleier: rgba(207, 162, 43, 0.12);
    --navy: #001021;
    --grau: #6B7280;
    --linie: #E6E8EC;
    --flaeche: #F1F2F5;
    --weiss: #FFFFFF;
    --fehler: #B3261E;
    --schrift: 'Gilroy', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --leiste-hoehe: 68px;
    --radius: 12px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--weiss);
    color: var(--navy);
    font-family: var(--schrift);
    font-size: 16px;
    line-height: 1.45;
    /* Platz fuer die feste Bedienleiste am unteren Rand */
    padding-bottom: calc(var(--leiste-hoehe) + 24px + env(safe-area-inset-bottom));
}

img { max-width: 100%; display: block; }

/* Autor-CSS schlaegt die Browser-Vorgabe: ohne diese Regel wuerde z.B.
   "img { display: block }" ein <img hidden> trotzdem anzeigen. */
[hidden] { display: none !important; }

h1, h2 { font-weight: 800; }

a { color: var(--navy); }

a:hover, a:focus { text-decoration: underline; }

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.sr-nur {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sprung-link {
    position: absolute;
    left: -999px; top: 0;
    background: var(--gold);
    color: var(--navy);
    padding: 0.6em 1em;
    z-index: 400;
}

.sprung-link:focus { left: 0.5em; top: 0.5em; }

/* ---------- Bausteine ---------- */

.knopf {
    min-height: 44px;
    padding: 0 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--linie);
    background: var(--weiss);
    font-weight: 700;
    font-size: 0.9rem;
}

.knopf-voll {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--weiss);
}

.knopf-klein {
    min-height: 36px;
    padding: 0 0.8rem;
    font-size: 0.8rem;
}

.rundknopf {
    width: 44px; height: 44px;
    flex: none;
    border-radius: 999px;
    border: 1px solid var(--linie);
    background: var(--weiss);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rundknopf-herz.ist-gemerkt { border-color: var(--gold); color: var(--gold-text); }
.rundknopf-herz.ist-gemerkt svg { fill: var(--gold); }

/* Versal-Label mit Sperrung - traegt den Gilroy-Charakter, auch ohne Gilroy */
.versal {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    font-size: 0.68rem;
}

/* ---------- Kopf ---------- */

.kopf {
    background: var(--weiss);
    padding: 0.9rem 1rem 0.7rem;
}

.kopf-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.kopf-marke {
    margin: 0;
    flex: none;
    /* Navy-Plaettchen hinter dem goldenen Logo: die Wortmarke ist eine reine
       Outline in Gold und wuerde auf Weiss verblassen. Entspricht der
       Icon-Lockup-Variante aus dem CI-Skill. */
    background: var(--navy);
    border-radius: 10px;
    padding: 8px 10px;
}

.kopf-logo { width: 76px; height: auto; }

.kopf-titel {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--navy);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* Eigene Zeile ueber die volle Breite: neben dem Logo waere sie am Handy
   zweimal umgebrochen. */
.kopf-stand {
    max-width: 1240px;
    margin: 0.4rem auto 0;
    color: var(--grau);
    font-size: 0.76rem;
    font-weight: 500;
}

.sprach-umschalter {
    flex: none;
    display: flex;
    align-items: center;
    border: 1px solid var(--linie);
    border-radius: 999px;
    overflow: hidden;
}

.sprach-knopf {
    min-width: 44px;
    height: 44px;
    padding: 0 0.5rem;
    border: none;
    background: var(--weiss);
    color: var(--grau);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.sprach-knopf.ist-aktiv { background: var(--navy); color: var(--weiss); }

.hinweis-js {
    max-width: 700px;
    margin: 1rem auto;
    padding: 0 1rem;
}

/* ---------- Kategorie-Chips ---------- */

.chip-leiste {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--weiss);
    border-bottom: 1px solid var(--linie);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.chip-leiste::-webkit-scrollbar { display: none; }

.chip-spur {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    width: max-content;
    min-width: 100%;
}

.chip {
    flex: none;
    height: 44px;
    padding: 0 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--linie);
    background: var(--weiss);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    font-size: 0.72rem;
    white-space: nowrap;
}

.chip.ist-aktiv {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
}

.chip-zahl { color: var(--grau); font-weight: 600; }
.chip.ist-aktiv .chip-zahl { color: var(--navy); opacity: 0.7; }

/* ---------- Layout ---------- */

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1rem;
}

.layout {
    display: flex;
    gap: 1.6rem;
    align-items: flex-start;
}

.ergebnis { flex: 1; min-width: 0; }

.ergebnis-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    min-height: 36px;
}

.ergebnis-zeile {
    margin: 0;
    color: var(--grau);
    font-size: 0.82rem;
    font-weight: 600;
}

.ergebnis-knoepfe { display: flex; gap: 0.4rem; }
.fehler-meldung {
    background: #FCEDEC;
    border: 1px solid var(--fehler);
    color: var(--fehler);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
}

.leer-zustand {
    padding: 2.5rem 1rem;
    text-align: center;
    background: var(--flaeche);
    border-radius: var(--radius);
}

.leer-titel { margin: 0 0 0.4rem; font-weight: 800; }
.leer-text { margin: 0; color: var(--grau); font-size: 0.88rem; }

/* ---------- Raster ---------- */

.raster {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
}

.karte { position: relative; min-width: 0; }

.karte-schaltflaeche {
    display: block;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    text-align: left;
}

.karte-bild-feld {
    display: block;
    position: relative;
    width: 100%;
    /* Hoch genug fuer einen Slab (ca. 1:1,75). Eine Raw-Karte bekommt seitlich
       Luft - aber NIE wird eine Karte beschnitten (Vorgabe Dennis). */
    aspect-ratio: 4 / 7;
    background: var(--flaeche);
    border-radius: var(--radius);
    overflow: hidden;
}

.karte-bild {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.karte-platzhalter {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--flaeche);
}

.karte-platzhalter::before {
    content: '';
    width: 58%; height: 76%;
    border: 2px dashed #C9CDD6;
    border-radius: 10px;
}

.karte-merken {
    position: absolute;
    top: 6px; right: 6px;
    z-index: 2;
    width: 44px; height: 44px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--grau);
    display: flex;
    align-items: center;
    justify-content: center;
}

.karte-merken.ist-gemerkt { color: var(--gold-text); }
.karte-merken.ist-gemerkt svg { fill: var(--gold); }

.karte-zeile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.karte-merkmale {
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 0.63rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.karte-preis {
    flex: none;
    color: var(--gold-text);
    font-weight: 800;
    font-size: 1.2rem; /* gross + fett: bei dieser Groesse reichen 3:1 Kontrast */
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.karte-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    min-height: 2.6em;
}

.mehr-anzeigen { display: block; margin: 1.6rem auto 0; }
/* ---------- Filter ---------- */

.filter-panel {
    display: none;
    flex: none;
    width: 288px;
    background: var(--weiss);
}

.filter-kopf {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0 0.8rem;
}

.filter-titel { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.16em; }

.filter-schliessen {
    width: 44px; height: 44px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-block {
    border-bottom: 1px solid var(--linie);
    padding: 0.7rem 0;
}

.filter-block summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    font-size: 0.72rem;
}

.filter-block summary::-webkit-details-marker { display: none; }

.filter-block summary::after {
    content: '+';
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.filter-block[open] summary::after { content: '\2212'; }

/* Gold-Unterstrich unter dem offenen Block - der Akzent aus dem Shop-Vorbild */
.filter-block[open] summary {
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.45rem;
    margin-bottom: 0.5rem;
}

.filter-werte {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 15rem;
    overflow-y: auto;
}

.filter-werte label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    cursor: pointer;
    font-size: 0.88rem;
}

.filter-werte input[type='checkbox'] {
    width: 18px; height: 18px;
    flex: none;
    accent-color: var(--gold-text);
}

.filter-wert-text { flex: 1; min-width: 0; }

.filter-anzahl { color: var(--grau); font-size: 0.78rem; font-variant-numeric: tabular-nums; }

.preis-eingaben {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.preis-eingaben label {
    flex: 1;
    font-size: 0.72rem;
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.preis-eingaben input {
    width: 100%;
    min-height: 44px;
    padding: 0 0.6rem;
    border: 1px solid var(--linie);
    border-radius: 10px;
    background: var(--flaeche);
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.preis-schieber {
    position: relative;
    height: 2.4rem;
    margin-top: 0.6rem;
}

.preis-schieber input[type='range'] {
    position: absolute;
    left: 0; right: 0; top: 0.9rem;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.preis-schieber input[type='range']::-webkit-slider-runnable-track {
    height: 4px; background: var(--linie); border-radius: 2px;
}

.preis-schieber input[type='range']::-moz-range-track {
    height: 4px; background: var(--linie); border-radius: 2px;
}

/* Beide Regler liegen uebereinander. Zeichnete jeder seine Spur, verdeckte die
   obere den Griff des unteren - er saehe halb abgeschnitten aus. */
#preis-max-schieber::-webkit-slider-runnable-track { background: transparent; }
#preis-max-schieber::-moz-range-track { background: transparent; }

.preis-schieber input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
    margin-top: -8px;
    cursor: pointer;
}

.preis-schieber input[type='range']::-moz-range-thumb {
    pointer-events: auto;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--navy);
    cursor: pointer;
}

.filter-fuss {
    display: flex;
    gap: 0.6rem;
    padding-top: 1rem;
}

.filter-fuss .knopf { flex: 1; }
.filter-fuss .knopf-voll { display: none; } /* auf dem Rechner filtert es sofort */

.filter-hintergrund { display: none; }

/* ---------- Feste Bedienleiste (Daumenzone) ---------- */

.bedienleiste {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--weiss);
    border-top: 1px solid var(--linie);
}

.suche-feld {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.suche-lupe {
    position: absolute;
    left: 0.75rem;
    color: var(--grau);
    pointer-events: none;
}

#suche {
    width: 100%;
    min-height: 44px;
    padding: 0 0.8rem 0 2.4rem;
    border: 1px solid var(--linie);
    border-radius: 999px;
    background: var(--flaeche);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--navy);
}

#suche::-webkit-search-cancel-button { -webkit-appearance: none; }

.leisten-knopf {
    position: relative;
    flex: none;
    width: 44px; height: 44px;
    border-radius: 999px;
    border: 1px solid var(--linie);
    background: var(--weiss);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.leisten-knopf.ist-aktiv {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--weiss);
}

.leisten-knopf.ist-aktiv svg { fill: none; }
.leisten-knopf.ist-gemerkt svg { fill: var(--gold); }

.zaehler {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
}

/* ---------- Sheets (Sortieren, Merkliste uebernehmen) ---------- */

.sheet { position: fixed; inset: 0; z-index: 120; }
.sheet-hintergrund {
    position: absolute;
    inset: 0;
    background: rgba(0, 16, 33, 0.45);
}

.sheet-inhalt {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: var(--weiss);
    border-radius: 18px 18px 0 0;
    padding: 1.1rem 1.1rem calc(1.4rem + env(safe-area-inset-bottom));
    max-height: 80vh;
    overflow-y: auto;
}

.sheet-titel {
    margin: 0 0 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--grau);
}

.sheet-text { margin: 0 0 1rem; color: var(--grau); font-size: 0.9rem; }

.sheet-knoepfe { display: flex; gap: 0.6rem; }
.sheet-knoepfe .knopf { flex: 1; }

.sortier-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 0 0.2rem;
    border: none;
    border-bottom: 1px solid var(--linie);
    background: none;
    font-weight: 600;
    text-align: left;
}

.sortier-option:last-of-type { border-bottom: none; }

.sortier-option.ist-aktiv { font-weight: 800; }

.sortier-option.ist-aktiv::after {
    content: '';
    width: 10px; height: 10px;
    border-radius: 999px;
    background: var(--gold);
}

/* ---------- Detailansicht ---------- */

.detail {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--weiss);
    display: flex;
    flex-direction: column;
}

body.ebene-offen { overflow: hidden; }

.detail-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: calc(0.7rem + env(safe-area-inset-top)) 0.9rem 0.4rem;
}

.detail-zaehler {
    margin: 0;
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.detail-buehne {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 3.4rem 0.6rem;
    touch-action: pan-y;
}

.detail-bild-knopf {
    display: block;
    height: 100%;
    max-width: 100%;
    padding: 0;
    border: none;
    background: none;
}

.detail-bild {
    max-width: 100%;
    max-height: 100%;
    width: auto; height: auto;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 10px;
}

.detail-platzhalter {
    width: 220px; height: 380px;
    border-radius: var(--radius);
}

.pfeil {
    position: absolute;
    top: 50%;
    width: 44px; height: 44px;
    margin-top: -22px;
    border-radius: 999px;
    border: 1px solid var(--linie);
    background: var(--weiss);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pfeil-links { left: 0.5rem; }
.pfeil-rechts { right: 0.5rem; }
.pfeil[disabled] { opacity: 0.35; cursor: default; }

.detail-info {
    flex: none;
    border-top: 1px solid var(--linie);
    padding: 0.9rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));
    max-height: 52vh;
    overflow-y: auto;
}

.segment {
    display: flex;
    gap: 4px;
    padding: 3px;
    margin: 0 auto 0.5rem;
    width: max-content;
    background: var(--flaeche);
    border-radius: 999px;
}

.segment-knopf {
    min-height: 38px;
    padding: 0 1rem;
    border: none;
    border-radius: 999px;
    background: none;
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.68rem;
}

.segment-knopf.ist-aktiv { background: var(--gold); color: var(--navy); }

.detail-zoomhinweis {
    margin: 0 0 0.8rem;
    text-align: center;
    color: var(--grau);
    font-size: 0.78rem;
}

.detail-zeile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.detail-name {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.detail-preis {
    margin: 0;
    flex: none;
    color: var(--gold-text);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.merkmal-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.9rem 0 0;
    padding: 0;
}

.merkmal-chip {
    height: 32px;
    padding: 0 0.7rem;
    border: 1px solid var(--navy);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.65rem;
}

.detail-kategorien {
    margin: 0.7rem 0 0;
    color: var(--grau);
    font-size: 0.78rem;
}

.detail-fussnote {
    margin: 0.7rem 0 0;
    color: var(--grau);
    font-size: 0.78rem;
}

/* ---------- Zoom ---------- */

.zoom {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: var(--flaeche);
    overflow: hidden;
}

.zoom-buehne {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Alle Gesten gehoeren der Zoom-Ebene: kein Browser-Pinch, kein Scrollen */
    touch-action: none;
    overscroll-behavior: contain;
}

.zoom-bild {
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    will-change: transform;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-laden {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--weiss);
    color: var(--grau);
    font-size: 0.82rem;
}

.zoom-schliessen {
    position: absolute;
    top: calc(0.8rem + env(safe-area-inset-top));
    right: 0.8rem;
    z-index: 2;
}

.zoom-leiste {
    position: absolute;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--weiss);
    border: 1px solid var(--linie);
    border-radius: 999px;
}

.zoom-knopf {
    width: 44px; height: 44px;
    border: none;
    border-radius: 999px;
    background: none;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.78rem;
}

.zoom-knopf-text { width: auto; padding: 0 0.9rem; }

/* ---------- Swipe-Modus ---------- */

.swipe {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: var(--weiss);
    display: flex;
    flex-direction: column;
}

.swipe-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: calc(0.7rem + env(safe-area-inset-top)) 0.9rem 0.4rem;
}

.swipe-fortschritt {
    margin: 0;
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
}

.swipe-buehne {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
}

.swipe-stapel {
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 100%;
}

.swipe-karte {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 0.9rem;
    background: var(--weiss);
    border: 1px solid var(--linie);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 16, 33, 0.08);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.swipe-karte-bild-feld {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--flaeche);
    border-radius: var(--radius);
    overflow: hidden;
}

.swipe-karte-bild { max-width: 100%; max-height: 100%; object-fit: contain; }

.swipe-karte-name {
    margin: 0.7rem 0 0;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.swipe-karte-zeile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.swipe-karte-merkmale {
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 0.63rem;
}

.swipe-karte-preis {
    color: var(--gold-text);
    font-weight: 800;
    font-size: 1.3rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Stempel, die beim Ziehen einblenden - zeigen die Entscheidung an */
.swipe-stempel {
    position: absolute;
    top: 1.2rem;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    border: 3px solid;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
}

.swipe-stempel-ja { left: 1.2rem; color: var(--gold-text); border-color: var(--gold); }
.swipe-stempel-nein { right: 1.2rem; color: var(--grau); border-color: var(--grau); }

.swipe-knoepfe {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 0.6rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
}

.swipe-gross {
    width: 56px; height: 56px;
    border-radius: 999px;
    border: 1px solid var(--linie);
    background: var(--weiss);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swipe-gross[disabled] { opacity: 0.35; cursor: default; }

.swipe-nein { color: var(--grau); }
.swipe-ja { color: var(--gold-text); border-color: var(--gold); }

.swipe-ende {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    text-align: center;
    padding: 1rem;
}

.swipe-ende-titel { margin: 0 0 0.4rem; font-weight: 800; font-size: 1.1rem; }

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--leiste-hoehe) + 1rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 500;
    margin: 0;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: var(--navy);
    color: var(--weiss);
    font-size: 0.85rem;
    font-weight: 600;
    max-width: 90vw;
    text-align: center;
}

/* ---------- Fuss ---------- */

.fuss {
    max-width: 1240px;
    margin: 2.5rem auto 0;
    padding: 1rem;
    text-align: center;
    color: var(--grau);
    font-size: 0.8rem;
    border-top: 1px solid var(--linie);
}

.fuss-links a { text-decoration: none; }
.fuss-links a:hover, .fuss-links a:focus { text-decoration: underline; }

/* ---------- Hinweisseite (messefreie Zeit) ---------- */

.hinweisseite { padding-bottom: 0; }

.hinweis-inhalt {
    max-width: 640px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

.hinweis-karte {
    background: var(--weiss);
    border: 1px solid var(--linie);
    border-radius: 18px;
    padding: 2.2rem 1.6rem;
    text-align: center;
}

.hinweis-label {
    margin: 0 0 0.6rem;
    color: var(--grau);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    font-size: 0.7rem;
}

.hinweis-termin {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 0.9rem;
}

.hinweis-strich {
    width: 56px; height: 2px;
    margin: 0 auto 1.1rem;
    background: var(--gold);
}

.hinweis-text { margin: 0 0 1.6rem; line-height: 1.6; color: var(--navy); }

.hinweis-shop-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.5rem;
    border-radius: 999px;
    background: var(--navy);
    color: var(--weiss);
    text-decoration: none;
    font-weight: 700;
}

.hinweis-shop-link:hover, .hinweis-shop-link:focus {
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
}

/* ---------- Breakpoints ---------- */

@media (max-width: 899px) {
    .layout { flex-direction: column; }

    /* Filter als Bottom-Sheet */
    .filter-panel.ist-offen {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        top: 12vh;
        z-index: 130;
        border-radius: 18px 18px 0 0;
        padding: 1rem 1.1rem calc(0.8rem + env(safe-area-inset-bottom));
        width: auto;
    }

    .filter-panel.ist-offen .filter-kopf { display: flex; flex: none; }

    /* Nur die Liste scrollt - Titel und die beiden Knoepfe bleiben stehen,
       damit "Anwenden" immer mit dem Daumen erreichbar ist. */
    .filter-panel.ist-offen .filter-inhalt {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .filter-panel.ist-offen .filter-fuss {
        flex: none;
        border-top: 1px solid var(--linie);
    }

    /* Im Sheet scrollt schon das Panel - ein zweiter Scrollbereich je Block
       waere am Handy nur fummelig. */
    .filter-panel.ist-offen .filter-werte { max-height: none; }

    .filter-fuss .knopf-voll { display: block; }

    .filter-hintergrund.ist-offen {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 16, 33, 0.45);
        z-index: 125;
    }
}

@media (min-width: 640px) {
    .raster { grid-template-columns: repeat(3, 1fr); }
    .karte-name { font-size: 0.88rem; }
}

@media (min-width: 900px) {
    .filter-panel { display: block; position: sticky; top: 4.5rem; }

    .sheet-inhalt {
        left: 50%;
        right: auto;
        bottom: 2rem;
        width: min(520px, 92vw);
        transform: translateX(-50%);
        border-radius: 18px;
    }

    #filter-umschalten { display: none; }
    .detail-info { padding-left: 2rem; padding-right: 2rem; }
    .detail-name { font-size: 1.15rem; }
    .detail-preis { font-size: 2.4rem; }
}

@media (min-width: 1040px) {
    .raster { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 420px) {
    .kopf-marke { padding: 6px 8px; }
    .kopf-logo { width: 60px; }
    .kopf-titel { font-size: 0.8rem; letter-spacing: 0.12em; }
    /* Die Kurzmerkmale teilen sich die Zeile mit dem Preis - der bleibt gross
       (Kontrast!), also wird hier gespart. Vollstaendig stehen sie im Detail. */
    .karte-merkmale { font-size: 0.6rem; letter-spacing: 0.07em; }
}
