/* ==========================================================================
   Pilzfinder – Design-System
   Mobile first. Farben als Tokens, Dark Mode über prefers-color-scheme.
   ========================================================================== */

:root {
    --bg: #f5f1e8;
    --surface: #fffdf8;
    --surface-2: #eee8da;
    --surface-3: #e4dccb;
    --text: #29231e;
    --muted: #6e655a;
    --line: #e0d7c5;
    --brand: #2f5d46;
    --brand-strong: #234836;
    --brand-ink: #ffffff;
    --brand-soft: #dbe7dd;
    --accent: #c2662d;
    --accent-soft: #f6e2d2;
    --focus: #e39b3c;

    --ed-hervorragend: #1d7a4b;
    --ed-essbar: #4c8a36;
    --ed-ungeniessbar: #857a6c;
    --ed-giftig: #c47410;
    --ed-toedlich: #b4261d;
    --ed-hervorragend-soft: #d9efe2;
    --ed-essbar-soft: #e2efd8;
    --ed-ungeniessbar-soft: #ece7df;
    --ed-giftig-soft: #fbe9cf;
    --ed-toedlich-soft: #f8dcd8;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(41, 35, 30, .06), 0 1px 1px rgba(41, 35, 30, .04);
    --shadow: 0 6px 20px -8px rgba(41, 35, 30, .22), 0 2px 6px -2px rgba(41, 35, 30, .08);
    --shadow-lg: 0 24px 60px -18px rgba(41, 35, 30, .4);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;

    --gutter: 16px;
    --topbar-h: 60px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #151310;
        --surface: #1f1c18;
        --surface-2: #2a2621;
        --surface-3: #35302a;
        --text: #f1ece3;
        --muted: #a69d90;
        --line: #38322b;
        --brand: #84bd98;
        --brand-strong: #a3d1b2;
        --brand-ink: #0f2419;
        --brand-soft: #22382b;
        --accent: #e8925a;
        --accent-soft: #3a2a1e;
        --focus: #f0b45e;

        --ed-hervorragend: #5fcf91;
        --ed-essbar: #95cf6f;
        --ed-ungeniessbar: #b3a999;
        --ed-giftig: #f2a93b;
        --ed-toedlich: #ff7b6e;
        --ed-hervorragend-soft: #173426;
        --ed-essbar-soft: #1f3219;
        --ed-ungeniessbar-soft: #2b2722;
        --ed-giftig-soft: #3a2a10;
        --ed-toedlich-soft: #431a16;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 8px 24px -10px rgba(0, 0, 0, .6);
        --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .8);

        color-scheme: dark;
    }
}

/* --- Basis ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }

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

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

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }

/* --- Topbar ---------------------------------------------------------------- */

.topbar {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: var(--topbar-h); }

.logo {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
    font: 600 1.25rem/1 var(--font-display);
    letter-spacing: -.01em; flex: none;
}
.logo:hover { color: var(--text); }
.logo-mark { width: 34px; height: 34px; color: var(--accent); }
.logo small { display: block; font: 500 .7rem/1.2 var(--font); color: var(--muted); letter-spacing: .02em; margin-top: 3px; }

.topbar-search { flex: 1; min-width: 0; }
.topbar-search[hidden] { display: none; }

/* --- Hero ------------------------------------------------------------------ */

.hero { padding: 20px 0 8px; }
.hero h1 {
    font: 600 clamp(1.9rem, 6.5vw, 3.3rem)/1.05 var(--font-display);
    letter-spacing: -.025em;
    max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero p { color: var(--muted); margin-top: 10px; max-width: 46ch; }

/* --- Suchfeld -------------------------------------------------------------- */

.search { position: relative; }
.search-field {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 0 6px 0 16px;
    height: 54px;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.search-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-field .icon { color: var(--muted); }
.search-field input {
    flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
    font-size: 1.0625rem; height: 100%;
}
.search-field input::placeholder { color: var(--muted); opacity: .85; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear {
    width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2);
    display: grid; place-items: center; cursor: pointer; color: var(--muted);
}
.search-clear[hidden] { display: none; }

.suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 6px; max-height: min(70vh, 520px); overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; }
.suggest-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px;
    color: var(--text); text-decoration: none; cursor: pointer; width: 100%; border: 0; background: none; text-align: left;
}
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); color: var(--text); }
.suggest-item img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.suggest-item .s-text { min-width: 0; flex: 1; }
.suggest-item strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item small { display: block; color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.suggest-filter-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.suggest-all { justify-content: center; color: var(--brand); font-weight: 600; }

/* --- Chips / Buttons ------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
    font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-block { width: 100%; }
.btn .count-pill {
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
    background: var(--brand); color: var(--brand-ink); font-size: .75rem; display: inline-grid; place-items: center;
}
.btn .count-pill:empty, .btn .count-pill[data-count="0"] { display: none; }

.toolbar {
    display: flex; gap: 8px; overflow-x: auto; padding: 14px var(--gutter) 4px; margin: 0 calc(-1 * var(--gutter));
    scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
}
.toolbar::-webkit-scrollbar { display: none; }
.toolbar > * { flex: none; scroll-snap-align: start; }

.quick {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    background: var(--surface); border: 1.5px solid var(--line); font-weight: 500; font-size: .92rem;
    user-select: none; transition: background .15s, border-color .15s, color .15s;
}
.quick input { position: absolute; opacity: 0; pointer-events: none; }
.quick:hover { border-color: var(--muted); }
.quick:has(input:checked), .quick.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
.quick:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.quick .dot { width: 9px; height: 9px; border-radius: 50%; }

.chip {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 6px 12px; border-radius: 12px; cursor: pointer;
    background: var(--surface); border: 1.5px solid var(--line);
    font-size: .92rem; font-weight: 500; line-height: 1.2; user-select: none;
    transition: background .15s, border-color .15s, opacity .15s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--muted); }
.chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--text); }
.chip:has(input:checked)::before {
    content: ""; width: 14px; height: 14px; flex: none; margin-left: -2px;
    background: var(--brand);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip .n { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.is-empty:not(:has(input:checked)) { opacity: .42; }

.swatch {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
    width: 64px; padding: 4px 0; cursor: pointer; user-select: none; font-size: .78rem; text-align: center; line-height: 1.15;
    transition: opacity .15s;
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .sw {
    width: 40px; height: 40px; border-radius: 50%; background: var(--c);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 0 var(--brand);
    display: grid; place-items: center; transition: box-shadow .15s, transform .15s;
}
.swatch:hover .sw { transform: scale(1.06); }
.swatch:has(input:checked) .sw { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 0 0 3px var(--bg), 0 0 0 5.5px var(--brand); }
.swatch:has(input:checked) .sw::after {
    content: ""; width: 18px; height: 18px; background: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.swatch[data-light] input:checked + .sw::after { background: #29231e; filter: none; }
.swatch:has(input:focus-visible) .sw { outline: 3px solid var(--focus); outline-offset: 3px; }
.swatch .n { color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.swatch.is-empty:not(:has(input:checked)) { opacity: .38; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, currentColor); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }

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

.layout { display: block; padding-bottom: 96px; }
.results-col { min-width: 0; }

.results-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 18px 0 12px;
}
.results-count { font-size: .95rem; color: var(--muted); }
.results-count strong { color: var(--text); font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.select {
    appearance: none; -webkit-appearance: none;
    height: 40px; padding: 0 36px 0 14px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23887d70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/16px no-repeat;
    font-size: .9rem; font-weight: 500; cursor: pointer;
}

.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.active-filters:empty { display: none; }
.active-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px;
    border-radius: 999px; background: var(--brand-soft); color: var(--text); border: 0;
    font-size: .85rem; font-weight: 500; cursor: pointer;
}
.active-chip .x { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 18%, transparent); }
.active-chip:hover .x { background: var(--brand); color: var(--brand-ink); }
.active-clear { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .85rem; cursor: pointer; padding: 0 6px; }

.notice {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--radius); margin: 0 0 16px;
    background: var(--accent-soft); color: var(--text); font-size: .92rem;
}
.notice .icon { color: var(--accent); margin-top: 1px; }
.notice a, .notice button.link { font-weight: 600; color: inherit; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* --- Karten ---------------------------------------------------------------- */

.grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.results-col.is-loading .grid, .results-col.is-loading .results-head { opacity: .45; transition: opacity .2s .1s; }

.card {
    position: relative; background: var(--surface); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: rise .35s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card h3 { font: 600 1rem/1.25 var(--font); letter-spacing: -.005em; overflow-wrap: anywhere; hyphens: auto; }
.card .latin { font-style: italic; color: var(--muted); font-size: .82rem; line-height: 1.3; overflow-wrap: anywhere; }
.card .alt { font-size: .8rem; color: var(--accent); }
.card .meta > span { white-space: nowrap; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: .78rem; color: var(--muted); }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    height: 24px; padding: 0 9px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
    background: var(--ed-soft); color: var(--ed);
}
.card-media .badge { position: absolute; left: 8px; top: 8px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); box-shadow: var(--shadow-sm); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ed); }
.match {
    position: absolute; right: 8px; top: 8px; height: 24px; padding: 0 9px; border-radius: 999px;
    background: var(--text); color: var(--bg); font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center;
}

[data-ed="hervorragend"] { --ed: var(--ed-hervorragend); --ed-soft: var(--ed-hervorragend-soft); }
[data-ed="essbar"] { --ed: var(--ed-essbar); --ed-soft: var(--ed-essbar-soft); }
[data-ed="ungeniessbar"], [data-ed=""] { --ed: var(--ed-ungeniessbar); --ed-soft: var(--ed-ungeniessbar-soft); }
[data-ed="giftig"] { --ed: var(--ed-giftig); --ed-soft: var(--ed-giftig-soft); }
[data-ed="toedlich"] { --ed: var(--ed-toedlich); --ed-soft: var(--ed-toedlich-soft); }
.card[data-ed="toedlich"] { border-color: color-mix(in srgb, var(--ed-toedlich) 35%, var(--line)); }

/* Saisonleiste: 12 Segmente */
.season { display: inline-flex; gap: 2px; align-items: flex-end; }
.season i { width: 5px; height: 10px; border-radius: 2px; background: var(--surface-3); }
.season i.on { background: var(--brand); }
.season i.now { height: 14px; }
.season i.now:not(.on) { background: var(--muted); opacity: .5; }


.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty > svg { width: 72px; height: 72px; color: var(--surface-3); margin: 0 auto 12px; }
.empty h2 { font: 600 1.4rem/1.2 var(--font-display); color: var(--text); margin-bottom: 6px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- Filter-Panel (Mobile: Bottom-Sheet, Desktop: Seitenleiste) ------------ */

.filters {
    position: fixed; inset: 0; z-index: 80;
    display: flex; flex-direction: column;
    background: var(--bg);
    transform: translateY(100%); visibility: hidden;
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s .32s;
}
.filters.is-open { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.filters-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px var(--gutter); border-bottom: 1px solid var(--line); flex: none;
}
.filters-head h2 { font: 600 1.25rem/1.2 var(--font-display); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.filters-body { flex: 1; overflow-y: auto; padding: 8px var(--gutter) 24px; overscroll-behavior: contain; }
.filters-foot {
    flex: none; display: flex; gap: 10px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--surface);
}
.filters-foot .btn-primary { flex: 1; height: 50px; font-size: 1rem; }

.f-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.f-section:last-child { border-bottom: 0; }
.f-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.f-hint { font-size: .82rem; color: var(--muted); margin: -6px 0 12px; }
.f-options { display: flex; flex-wrap: wrap; gap: 8px; }
.f-swatches { display: flex; flex-wrap: wrap; gap: 6px 2px; margin: 0 -4px; }

.f-group { border-bottom: 1px solid var(--line); }
.f-group:last-child { border-bottom: 0; }
.f-group summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
    padding: 16px 0; font-weight: 600; font-size: 1rem;
}
.f-group summary::-webkit-details-marker { display: none; }
.f-group summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.f-group[open] summary .chev { transform: rotate(180deg); }
.f-group summary .sel { font-size: .75rem; font-weight: 700; background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 2px 8px; }
.f-group summary .sel:empty { display: none; }
.f-group-body { padding: 0 0 18px; }

.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.month {
    position: relative; display: grid; place-items: center; height: 40px; border-radius: 10px; cursor: pointer;
    background: var(--surface); border: 1.5px solid var(--line); font-size: .85rem; font-weight: 500;
}
.month input { position: absolute; opacity: 0; pointer-events: none; }
.month:has(input:checked) { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.month:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.month.is-now::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.range { display: flex; align-items: center; gap: 14px; }
.range input[type=range] { flex: 1; accent-color: var(--brand); height: 32px; }
.range output { min-width: 84px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.range-reset { font-size: .82rem; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch span small { display: block; color: var(--muted); font-size: .82rem; }
.switch input { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }

.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(20, 16, 12, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }

/* --- Detailseite ----------------------------------------------------------- */

.crumbs { display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; font-size: .9rem; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }

.detail { padding-bottom: 64px; }
.detail-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.detail-main, .detail-aside { grid-template-columns: minmax(0, 1fr); }
.gallery { min-width: 0; }
.aka summary { cursor: pointer; color: var(--brand); font-weight: 600; display: inline; }

.gallery { position: relative; margin: 0 calc(-1 * var(--gutter)); }
.gallery-track {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
    flex: 0 0 86%; scroll-snap-align: center; aspect-ratio: 4 / 3; border-radius: var(--radius);
    overflow: hidden; background: var(--surface-2); border: 0; padding: 0; cursor: zoom-in;
}
.gallery-item:only-child { flex-basis: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { position: absolute; right: calc(var(--gutter) + 10px); bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; pointer-events: none; }

.detail-head h1 { font: 600 clamp(1.9rem, 6vw, 2.9rem)/1.08 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; hyphens: auto; }
.detail-head .latin { font: italic 400 1.15rem/1.35 var(--font-display); color: var(--muted); margin-top: 6px; }
.detail-head .aka { margin-top: 10px; font-size: .92rem; color: var(--muted); }
.detail-head .aka strong { color: var(--text); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

.edibility {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius);
    background: var(--ed-soft); border: 1.5px solid color-mix(in srgb, var(--ed) 30%, transparent);
}
.edibility .ed-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--ed); color: var(--surface); display: grid; place-items: center; flex: none; }
.edibility strong { display: block; font-size: 1.1rem; color: var(--ed); }
.edibility p { font-size: .9rem; margin-top: 2px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.fact dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.fact dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fact-wide { grid-column: 1 / -1; }

.season-lg { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; width: 100%; margin-top: 4px; }
.season-lg span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .66rem; font-weight: 600; color: var(--muted); }
.season-lg span::before { content: ""; width: 100%; height: 10px; border-radius: 4px; background: var(--surface-3); }
.season-lg span.on::before { background: var(--brand); }
.season-lg span.now { color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.panel > h2 { font: 600 1.35rem/1.2 var(--font-display); margin-bottom: 14px; }
.desc { display: grid; gap: 16px; }
.desc h3 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--brand); margin-bottom: 4px; }
.desc p { line-height: 1.6; overflow-wrap: anywhere; }

.feature-groups { display: grid; gap: 14px; }
.feature-groups h3 { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.feature-groups .f-options a { text-decoration: none; color: var(--text); }
.feature-groups .chip { min-height: 34px; font-size: .86rem; }

.lookalikes { display: grid; gap: 8px; }
.lookalike { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--surface); }
a.lookalike:hover { border-color: var(--muted); color: var(--text); }
.lookalike img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.lookalike .l-text { min-width: 0; flex: 1; }
.lookalike strong { display: block; font-weight: 600; }
.lookalike small { display: block; color: var(--muted); font-size: .82rem; }
.lookalike .badge { flex: none; }
.lookalike.is-plain { border-style: dashed; padding: 10px 12px; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px var(--gutter) 12px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller .card { scroll-snap-align: start; }

.source { font-size: .88rem; color: var(--muted); display: grid; gap: 6px; }
.source a { font-weight: 600; }

.disclaimer { display: flex; gap: 12px; font-size: .86rem; color: var(--muted); padding: 16px; border-radius: var(--radius); background: var(--surface-2); }
.disclaimer .icon { color: var(--accent); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 8, 6, .94); display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lightbox-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lightbox-track::-webkit-scrollbar { display: none; }
.lightbox-track figure { flex: 0 0 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; padding: 56px 8px; }
.lightbox-track img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; color: #fff; font-weight: 600; }
.lightbox .icon-btn { background: rgba(255,255,255,.14); color: #fff; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); display: none; }
.lightbox-nav.prev { left: 16px; } .lightbox-nav.next { right: 16px; }

/* --- Footer ---------------------------------------------------------------- */

.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); font-size: .85rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 6px; }

/* Alerts (Flash-Meldungen) */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; background: var(--accent-soft); }

/* Mobiler Filter-Button (schwebend) */
.fab {
    position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
    height: 52px; padding: 0 22px; border-radius: 999px; border: 0;
    background: var(--text); color: var(--bg); font-weight: 600; font-size: 1rem;
    display: inline-flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); cursor: pointer;
}
.fab .count-pill { background: var(--accent); color: #fff; min-width: 24px; height: 24px; border-radius: 12px; padding: 0 7px; display: inline-grid; place-items: center; font-size: .8rem; }
.fab .count-pill[data-count="0"] { display: none; }

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

@media (min-width: 560px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .scroller { grid-auto-columns: 30%; }
    .gallery-item { flex-basis: 62%; }
}

@media (min-width: 768px) {
    :root { --gutter: 24px; --topbar-h: 68px; }
    .hero { padding: 40px 0 12px; }
    .card-body { padding: 12px 14px 14px; }
    .card h3 { font-size: 1.05rem; }
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .panel { padding: 28px; }
    .desc { grid-template-columns: 1fr 1fr; gap: 20px 28px; }
    .scroller { grid-auto-columns: 23%; }

    .filters {
        inset: auto 0 0 auto; top: 0; width: 440px; transform: translateX(100%);
        border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
    }
}

@media (min-width: 1100px) {
    .layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 48px; }
    .fab, .filters-head .icon-btn, .filters-foot, .backdrop, [data-open-filters] { display: none !important; }
    .filters {
        /* top wird per JS gesetzt: klebt oben oder unten, je nach Scrollrichtung */
        position: sticky; top: calc(var(--topbar-h) + 12px); inset: auto; width: auto; z-index: 1;
        transform: none; visibility: visible; transition: none; box-shadow: none; border: 0;
        background: transparent; align-self: start;
    }
    .filters-head { padding: 18px 0 10px; }
    .filters-body { padding: 0 0 24px; overflow: visible; flex: none; }
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
    .detail-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: start; }
    .detail-aside { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 16px; }
    .gallery { margin: 0; }
    .gallery-track { padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; }
    .gallery-item { aspect-ratio: 4 / 3; }
    .gallery-item:first-child { grid-column: 1 / -1; }
    .gallery-item:nth-child(n+8) { display: none; }
    .gallery-count { right: 10px; }
    .lightbox-nav { display: grid; }
}

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


/* --- Merkmal-Icons --------------------------------------------------------- */

.fi {
    width: 24px; height: 24px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
    color: var(--muted); transition: color .15s;
}
.fi-sm { width: 18px; height: 18px; }

.chip-icon { padding: 6px 12px 6px 8px; min-height: 44px; }
.chip-icon:has(.fi):has(input:checked)::before { display: none; }
.chip:has(input:checked) .fi, .chip:hover .fi { color: var(--brand); }
.chip:has(input:checked) .fi { stroke-width: 1.7; }
a.chip .fi { color: var(--brand); }

.f-group summary .g-icon {
    width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2);
    display: grid; place-items: center; flex: none;
}
.f-group summary .g-icon .fi { width: 22px; height: 22px; color: var(--text); }
.f-group[open] summary .g-icon { background: var(--brand-soft); }
.f-group[open] summary .g-icon .fi { color: var(--brand); }

.feature-groups h3 { display: flex; align-items: center; gap: 6px; }
.feature-groups h3 .fi { color: var(--muted); }
.active-chip .fi { color: var(--brand); }
.suggest-filter-icon .fi { color: var(--brand); width: 26px; height: 26px; }

/* --- Pagination ------------------------------------------------------------ */

.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 32px 0 6px; }
.pager-pages { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pager-page, .pager-step {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px;
    font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--text);
    background: var(--surface); border: 1.5px solid var(--line); transition: border-color .15s, background .15s;
}
a.pager-page:hover, a.pager-step:hover { border-color: var(--muted); color: var(--text); }
.pager-page.is-current { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pager-step .icon { width: 18px; height: 18px; }
.pager-step.is-disabled { opacity: .4; }
.pager-gap { color: var(--muted); padding: 0 2px; }
.pager-info { text-align: center; font-size: .82rem; color: var(--muted); }
@media (max-width: 479px) {
    .pager { gap: 4px; }
    .pager-step span { display: none; }
    .pager-step { padding: 0; }
    .pager-page, .pager-step { min-width: 40px; height: 40px; border-radius: 10px; }
}

/* Platz für den schwebenden Bestimmen-Button */
@media (max-width: 1099px) {
    body:has(.fab) .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* --- Offline-Hinweis ------------------------------------------------------- */

.offline-bar {
    position: fixed; top: calc(var(--topbar-h) + 8px); left: 50%; z-index: 90;
    transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
    background: var(--text); color: var(--bg); font-size: .86rem; font-weight: 600; box-shadow: var(--shadow);
    transition: opacity .25s, transform .25s; white-space: nowrap;
}
.offline-bar.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --- Bestimmungs-Assistent ------------------------------------------------- */

.assistant { max-width: 760px; margin: 0 auto; padding: 16px 0 0; display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-h)); }
.assistant-head { display: grid; gap: 14px; margin-bottom: 8px; }
.assistant-head h1 { font: 600 clamp(1.6rem, 5vw, 2.2rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.assistant-head p { color: var(--muted); margin-top: 6px; font-size: .95rem; }

.meter { position: sticky; top: var(--topbar-h); z-index: 5; background: var(--bg); padding: 8px 0 10px; }
.meter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted); }
.meter-row strong { color: var(--text); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.meter-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.meter-preview { display: flex; }
.meter-preview a { margin-left: -8px; }
.meter-preview img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); background: var(--surface-2); }

.chat { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 12px 0 20px; }
.msg { display: flex; gap: 10px; align-items: flex-end; animation: rise .3s ease both; }
.msg .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; flex: none; }
.msg .avatar svg { width: 22px; height: 22px; }
.msg .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 12px 16px; max-width: min(100%, 560px); display: grid; gap: 8px; min-width: 0; }
.msg .bubble .q { font-weight: 600; font-size: 1.02rem; }
.bubble-hint { font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.bubble-hint .icon { color: var(--accent); margin-top: 2px; }
.bubble-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); border-radius: 18px 18px 6px 18px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.msg.user .fi { color: var(--brand-ink); }
.msg.user .sw { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--brand-ink); }
.chat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.msg.bot:has(.chat-cards) .bubble { max-width: 100%; flex: 1; }

.typing { display: inline-flex !important; gap: 4px; padding: 14px 16px !important; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.composer {
    position: sticky; bottom: 0; z-index: 6; margin: 0 calc(-1 * var(--gutter));
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; }
.options:empty { display: none; }
.options.is-busy { opacity: .5; pointer-events: none; }
.options-swatch { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.options-month { grid-template-columns: 1fr; }
.opt {
    display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 14px;
    background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; text-align: left; font-weight: 600; font-size: .92rem;
    transition: border-color .15s, background .15s, transform .1s; list-style: none;
}
.opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.opt:active { transform: scale(.98); }
.opt .fi { width: 30px; height: 30px; color: var(--brand); }
.opt .sw { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.opt-label { flex: 1; min-width: 0; line-height: 1.2; }
.opt-n { font-size: .75rem; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.opt-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); justify-content: center; }
.opt-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.opt-more summary { justify-content: center; }
.opt-more summary::-webkit-details-marker { display: none; }
.opt-more .months { margin-top: 8px; }
.opt-more .month { border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.opt-more .month:hover { border-color: var(--brand); }
.composer-actions { display: flex; gap: 6px; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; }
.composer-actions [data-to-search] { margin-left: auto; }

body:has(.assistant) .site-footer { display: none; }

@media (min-width: 768px) {
    .options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .options-swatch { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .options-month { grid-template-columns: 1fr; }
    .chat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .composer { margin: 0; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* Horizontal-Slider per Maus ziehen */
.scroller.is-draggable { cursor: grab; }
.scroller.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.scroller.is-dragging a { pointer-events: none; }

.scroller img { -webkit-user-drag: none; }

/* Navigation in der Kopfzeile */
.nav-link {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px;
    color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; flex: none;
    border: 1.5px solid var(--line); background: var(--surface);
}
.nav-link:hover { border-color: var(--brand); color: var(--brand); }
.nav-link.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.topbar .nav-link { margin-left: auto; }
.topbar-search + .nav-link { margin-left: 0; }
@media (max-width: 559px) { .nav-link span { display: none; } .nav-link { width: 44px; padding: 0; justify-content: center; } }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Assistent: kompakte Aktionsleiste & Karten im Chat */
.composer-actions { flex-wrap: nowrap; align-items: center; }
.composer-actions .btn { height: 40px; padding: 0 12px; font-size: .88rem; }
.msg.bot:has(.chat-cards) .avatar { display: none; }
.msg.bot:has(.chat-cards) .bubble { padding: 12px; border-radius: 18px; }
.chat-cards .card .meta { flex-wrap: wrap; row-gap: 4px; }
.chat-cards .card h3 { font-size: .95rem; }

/* --- Assistent prominent --------------------------------------------------- */

.nav-cta { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.nav-cta:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-ink); }
.nav-cta.is-active { box-shadow: 0 0 0 3px var(--brand-soft); }

.assist-card {
    position: relative; display: grid; gap: 20px; margin-top: 16px; padding: 22px;
    border-radius: var(--radius-lg); text-decoration: none; overflow: hidden;
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
        linear-gradient(140deg, #2f5d46, #234836 70%);
    color: #fff; box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.assist-card:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.assist-eyebrow {
    display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    background: rgba(255, 255, 255, .14); padding: 5px 10px; border-radius: 999px;
}
.assist-card h2 { font: 600 clamp(1.45rem, 5vw, 2rem)/1.12 var(--font-display); letter-spacing: -.015em; margin: 12px 0 8px; }
.assist-card p { color: rgba(255, 255, 255, .82); font-size: .95rem; max-width: 44ch; }
.assist-cta { margin-top: 16px; background: #fff; border-color: #fff; color: #234836; height: 48px; padding: 0 20px; font-size: 1rem; }
.assist-card:hover .assist-cta { color: #234836; border-color: #fff; }

.assist-card-demo {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; align-content: start;
}
.demo-bubble { background: #fffdf8; color: #29231e; border-radius: 14px 14px 14px 4px; padding: 9px 12px; font-weight: 600; font-size: .88rem; justify-self: start; }
.demo-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.demo-opt {
    display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: .84rem; font-weight: 600;
    background: rgba(255, 255, 255, .92); color: #29231e;
}
.demo-opt .fi { width: 24px; height: 24px; color: #2f5d46; }
.demo-opt.is-picked { background: #e8925a; color: #fff; }
.demo-opt.is-picked .fi { color: #fff; }
.demo-meter { display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; color: rgba(255, 255, 255, .85); }
.demo-meter i { flex: 1; height: 5px; border-radius: 999px; background: linear-gradient(90deg, #fff 55%, rgba(255, 255, 255, .25) 55%); }

.assist-banner {
    display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 16px;
    border-radius: var(--radius); background: var(--brand-soft); border: 1.5px solid color-mix(in srgb, var(--brand) 30%, transparent);
    color: var(--text); text-decoration: none; transition: border-color .15s;
}
.assist-banner:hover { border-color: var(--brand); color: var(--text); }
.assist-banner-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.assist-banner-text { flex: 1; min-width: 0; font-size: .9rem; display: grid; }
.assist-banner-text span { color: var(--muted); }
.assist-banner > .icon { color: var(--brand); }

.fab { text-decoration: none; background: var(--brand); color: var(--brand-ink); }
.fab:hover { color: var(--brand-ink); }

@media (min-width: 768px) {
    .assist-card { grid-template-columns: 1.15fr 1fr; align-items: center; padding: 32px; }
}
@media (min-width: 1100px) {
    .assist-card { margin-top: 20px; }
}

/* Assistent: Foto */
.bubble-photo { padding: 4px !important; overflow: hidden; }
.bubble-photo img { width: 180px; max-width: 60vw; border-radius: 14px; }
.found { display: flex; flex-wrap: wrap; gap: 6px; }
.found-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); font-size: .85rem; font-weight: 600; }
.found-chip .fi { color: var(--brand); }
.found-chip .sw { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.is-analyzing .typing { padding: 0 !important; border: 0; }
@media (max-width: 479px) { .hide-sm { display: none; } }

/* Assistent: Such-Archiv */
.assistant-tools { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.assistant-tools > .btn { margin-left: auto; height: 40px; }
.assistant-archive { flex: 1 1 260px; min-width: 0; }
.archive { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.archive summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; font-size: .92rem; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.archive[open] summary .chev { transform: rotate(180deg); }
.arch-n { font-size: .72rem; background: var(--surface-2); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.arch-list { display: grid; gap: 6px; padding: 0 8px 10px; max-height: 50vh; overflow-y: auto; }
.arch-item { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.arch-item.is-current { background: var(--brand-soft); }
.arch-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 12px; color: var(--text); }
.arch-main:hover { background: var(--surface-2); }
.arch-thumbs { display: flex; flex: none; }
.arch-thumbs img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); margin-left: -10px; background: var(--surface-2); }
.arch-thumbs img:first-child { margin-left: 0; }
.arch-thumbs .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent); display: grid; place-items: center; }
.arch-thumbs .avatar svg { width: 20px; height: 20px; }
.arch-text { min-width: 0; display: grid; }
.arch-text strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-text strong em { font-style: normal; color: var(--brand); font-weight: 600; }
.arch-text small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-time { opacity: .8; }
.arch-del { width: 36px; height: 36px; background: transparent; color: var(--muted); }
.arch-del:hover { background: var(--surface-2); color: var(--text); }
.arch-clear { justify-self: start; margin: 4px 8px 0; font-size: .82rem; color: var(--muted); }
