/* sd-downloads – Produktseite: Cover-Raster mit Detail-Zeile (Entwurf 19 §4.4, Stufe 1b).
   Port der dl-*-Regeln aus dem Prototyp (tools/downloads-prototyp/index.html, „Cover-Ansicht“), an das Theme angepasst.
   Variablen (--primary-color …) kommen aus style.css. Rahmen (.downloads, .headline-grid, h2) bleibt beim Theme. */

/* ── Rücksetzer gegen Theme-Regeln (li { margin-left: 20px }, ul/p mit Abstand, svg { width: 100% }, a { outline: none !important }) */
.dl [hidden] { display: none !important; }
.dl .sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.dl ul, .dl li { margin: 0; padding: 0; list-style: none; }
:where(.dl) button, :where(.dl) select { font: inherit; }   /* :where = ohne Gewicht, Klassen wie .dl-pill gewinnen */
.dl a:focus-visible, .dl button:focus-visible, .dl select:focus-visible { outline: 3px solid var(--primary-color) !important; outline-offset: 2px; }
.dl .ic { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl .flagge { display: inline-block; flex: 0 0 auto; width: 20px; height: 13.3px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); vertical-align: -2px; }
.dl .flagge--text { width: auto; height: auto; min-width: 20px; padding: 1px 3px; font-size: 10px; font-weight: 700; line-height: 12px; letter-spacing: .03em; text-align: center; color: var(--primary-color); background: #fff; }

/* ── Kopf */
.dl .dl-intro { margin: 0; }
.dl .dl-zahlen { margin: 2px 0 0; font-weight: 600; color: var(--primary-color); }
.dl-kopf-rechts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 24px; }
.dl-feld { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dl-feld label { font-weight: 600; font-size: 14px; }
.dl-select { border: 0; background: #fff; border-radius: 5px; padding: 0 10px; height: 40px; font-weight: 600; color: var(--text-color); box-shadow: var(--box-shadow); max-width: 100%; min-width: 0; }

/* ── Typ-Filter in einer Zeile; passt es nicht, erscheint die Auswahlliste (downloads.js setzt .ist-eng) */
.dl-filter { display: flex; align-items: center; gap: 10px 24px; margin-bottom: 14px; min-width: 0; }
.dl-typen { display: flex; flex-wrap: nowrap; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; padding: 4px 3px 7px; margin: -4px -3px -7px; scrollbar-width: thin; }
.dl-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 6px 11px; border: 0; border-radius: 16px; background: #fff; color: var(--primary-color); font-size: 13px; line-height: 1; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .10); cursor: pointer; transition: background .2s, color .2s; }
.dl-pill:hover { background: #f4f8fb; }
.dl-pill[aria-pressed="true"] { color: #fff; background: var(--primary-color); }
.dl-pill .anzahl { font-size: 11px; background: var(--gray-color); color: var(--primary-color); border-radius: 9px; padding: 2px 6px; min-width: 18px; text-align: center; }
.dl-pill[aria-pressed="true"] .anzahl { background: rgba(255, 255, 255, .22); color: #fff; }
.dl-pill:disabled { opacity: .5; cursor: default; box-shadow: none; }
.dl-typwahl { display: none; }
.dl-filter.ist-eng .dl-typen { display: none; }
.dl-filter.ist-eng .dl-typwahl { display: flex; }
.dl-statuszeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 24px; margin: 0 0 18px; font-size: 14px; }
.dl .dl-status { margin: 0; font-weight: 600; }
.dl-zuruecksetzen { padding: 0; border: 0; background: none; color: var(--primary-color); font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.dl-leer { background: #fff; border-radius: var(--border-radius); padding: 22px 24px; }
.dl .dl-leer p { margin: 0; }

/* ── Raster: alphabetisch, alle Karten sichtbar; die Details öffnen als Zeile unter der Reihe (wie die Google-Bildersuche) */
.dl-raster { --spalte: 160px; --abstand-y: 24px; --r: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--spalte), 1fr)); gap: var(--abstand-y) 20px; }
.dl .dl-karte { position: relative; min-width: 0; }
.dl-karte-knopf { display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; height: 100%; padding: 10px 10px 14px; border: 0; border-radius: var(--r); background: #fff; color: inherit; text-align: left; text-decoration: none; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); transition: transform .2s ease, box-shadow .2s ease; }
.dl-karte-knopf:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .14); }
.dl-karte-knopf:hover .dl-karte-titel { color: var(--primary-color); }
.dl .dl-karte-knopf:focus-visible { outline-offset: 3px; }
.dl-cover { position: relative; display: block; aspect-ratio: 210 / 297; margin-bottom: 8px; background: #fff; border-radius: 6px; overflow: hidden; border: 1px solid #e3e3e3; }
.dl-cover img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.dl-symbol { display: grid; place-items: center; width: 100%; height: 100%; background: #f7f7f7; color: var(--primary-color); }
.dl-symbol .ic { width: 44px; height: 44px; }
/* Mini-Flagge + Zahl weiterer Sprachen; gelb = Pflichtdokument ohne Seitensprache */
.dl-cover-sprache { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 5px; background: rgba(255, 255, 255, .95); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); font-size: 11px; font-weight: 700; line-height: 1; color: #666; }
.dl-cover-sprache.ist-pflicht { background: var(--alert-yellow); color: #664d03; box-shadow: 0 0 0 1px #b88a00; }
.dl .dl-karte-typ { display: block; margin: 0; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-color); overflow-wrap: anywhere; hyphens: auto; }
.dl-karte-titel { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-color); overflow-wrap: anywhere; transition: color .2s; }
.dl-zusatz { font-weight: 500; color: #666; }
/* Offene Karte: unten offen, ein weißer Steg füllt den Abstand, Hohlkehlen links und rechts runden den Übergang ab.
   Erste/letzte Spalte (.ist-links/.ist-rechts): dort läuft die Kante gerade weiter. */
.dl-karte.ist-offen .dl-karte-knopf { border-radius: var(--r) var(--r) 0 0; box-shadow: none; transform: none; }
.dl-karte.ist-offen::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: calc(var(--abstand-y) + 2px); background: #fff; pointer-events: none; }
.dl-karte.ist-offen::before { content: ""; position: absolute; left: calc(-1 * var(--r)); right: calc(-1 * var(--r)); top: calc(100% + var(--abstand-y) - var(--r)); height: var(--r); pointer-events: none;
    background: radial-gradient(circle at 0 0, transparent calc(var(--r) - .5px), #fff var(--r)) left bottom / var(--r) var(--r) no-repeat,
                radial-gradient(circle at 100% 0, transparent calc(var(--r) - .5px), #fff var(--r)) right bottom / var(--r) var(--r) no-repeat; }
.dl-karte.ist-offen.ist-links::before { left: 0; background: radial-gradient(circle at 100% 0, transparent calc(var(--r) - .5px), #fff var(--r)) right bottom / var(--r) var(--r) no-repeat; }
.dl-karte.ist-offen.ist-rechts::before { right: 0; background: radial-gradient(circle at 0 0, transparent calc(var(--r) - .5px), #fff var(--r)) left bottom / var(--r) var(--r) no-repeat; }
.dl-karte.ist-offen.ist-links.ist-rechts::before { display: none; }

/* ── Detail-Zeile (downloads.js kopiert .dl-karte-details hinein); Aufklappen über grid-template-rows 0fr → 1fr */
.dl .dl-detail { grid-column: 1 / -1; }
.dl-detail-innen { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.4, 0, .2, 1); }
.dl-detail-innen.offen { grid-template-rows: 1fr; }
.dl-detail-klappe { min-height: 0; overflow: hidden; }
.dl-detail-box { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "cover kopf" "cover aktion" "cover sprachen"; column-gap: 32px; padding: 26px 28px 24px; border-radius: var(--r); background: #fff; }
.dl-detail.ecke-links .dl-detail-box { border-top-left-radius: 0; }
.dl-detail.ecke-rechts .dl-detail-box { border-top-right-radius: 0; }
.dl-detail-cover { grid-area: cover; align-self: start; }
.dl-detail-cover-knopf { display: block; width: 100%; }
.dl-detail-cover img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid #e3e3e3; background: #fff; }
.dl-detail-cover .dl-symbol { height: 280px; border-radius: 6px; }
.dl-detail-cover .dl-symbol .ic { width: 56px; height: 56px; }
.dl-detail-kopf { grid-area: kopf; min-width: 0; }
.dl .dl-detail-kopf .dl-karte-typ { margin-right: 52px; }   /* nicht unter den Schließen-Knopf */
.dl .dl-detail-titel { margin: 4px 52px 8px 0; font-size: 22px; line-height: 28px; font-weight: 600; color: var(--primary-color); overflow-wrap: anywhere; }
.dl .dl-detail-titel:focus { outline: none; }
.dl .dl-detail-titel:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
.dl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 14px; line-height: 20px; color: #666; }
.dl-detail-sprache { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-color); }
.dl-sprachhinweis { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; color: #666; }
.dl-sprachhinweis .ic { width: 15px; height: 15px; }
.dl .dl-hinweis { display: inline-flex; align-items: flex-start; gap: 6px; margin: 6px 0 0; padding: 3px 8px; border-radius: 4px; background: var(--alert-yellow); color: #664d03; font-size: 13px; line-height: 18px; font-weight: 600; }
.dl-hinweis .ic { width: 16px; height: 16px; margin-top: 1px; }
.dl .dl-detail-hinweis { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: #666; }
.dl-aktionen { grid-area: aktion; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; align-self: start; margin-top: 18px; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 2px solid var(--primary-color); border-radius: 18px; font-size: 14px; line-height: 1; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.dl-btn .ic { width: 16px; height: 16px; }
.dl-btn--pdf { background: var(--primary-color); color: #fff; }
.dl-btn--pdf:hover { background: #0a6aa6; border-color: #0a6aa6; color: #fff; }
.dl-btn--ansehen { background: #fff; color: var(--primary-color); }   /* ab Stufe 3 */
.dl-btn--ansehen:hover { background: #eef4f8; }
.dl-btn--ansehen[aria-busy="true"] { cursor: progress; }   /* ohne Aufhellen: Text bleibt kontrastreich */
.dl-groesse { font-weight: 600; }
/* Sprachwahl in den Details: Chips mit Flagge, der gewählte ist gefüllt */
.dl-detail-sprachen { grid-area: sprachen; min-width: 0; margin-top: 20px; padding-top: 14px; border-top: 1px dashed #d5d5d5; }
.dl .dl-detail-sprachen h4 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-color); }
.dl-detail-sprachen h4 .anzahl { font-weight: 500; color: #666; }
.dl .dl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px 0 8px; border: 1px solid #cfd6dc; border-radius: 16px; background: #fff; color: var(--text-color); font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; }
.dl-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }
.dl-chip[aria-pressed="true"] { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.dl-chip[aria-pressed="true"] .flagge { box-shadow: 0 0 0 1px rgba(255, 255, 255, .75); }
.dl-chip-kurz { display: none; }
.dl-detail-zu { position: absolute; top: 14px; right: 14px; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--gray-color); color: var(--primary-color); cursor: pointer; }
.dl-detail-zu:hover { background: #e2e8ed; }
.dl-detail-zu .ic { width: 20px; height: 20px; }

/* ── Downloadcenter (Stufe 2, inc/downloadcenter.php) ─────────────────────────────────────────────── */
/* Aufbau wie das alte Downloadcenter (Roman 10.11.2026): graue Kopfleiste des Themes mit H1 und rundem Merklisten-Symbol,
   darunter auf Weiß Pills und Suchzeile (Theme: .pill, .document-search), die Karten in einer grauen Fläche (.downloads). */
/* Alte Merkliste im Kopf des Themes (header.php) ausblenden – das Theme bleibt unverändert (15 Nr. 28) */
.sd-dl-dc .document-management-interface, .sd-dl-dc .document-management .pop-up-fact { display: none !important; }
/* Merklisten-Symbol (das JS setzt es in die Kopfleiste): weißer Kreis mit Zähler wie früher (.document-management-interface) */
.dl-merkliste-knopf { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50px; background: #fff; color: var(--primary-color); font: inherit; cursor: pointer; transition: var(--transition); }
.dl-merkliste-knopf:hover, .dl-merkliste-knopf[aria-expanded="true"] { background: var(--primary-color); color: #fff; }
.dl-merkliste-knopf:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.dl-merkliste-knopf .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl-merkliste-knopf .sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.dl-merkliste-zahl { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 50px;
    background: var(--secundary-color, var(--primary-color)); color: #fff; font-size: 12px; line-height: 20px; font-weight: 600; text-align: center; }
.dl-merkliste-knopf--zeile { box-shadow: var(--box-shadow); }   /* ohne Kopfleiste: in der Suchzeile auf Weiß */
/* Typ-Filter: Pills wie .pill im Theme, mehrzeilig */
.dl--dc .dl-filter { display: block; margin: 40px 0 0; }
.dl--dc .dl-typen { flex-wrap: wrap; gap: 0 15px; overflow: visible; padding: 0; margin: 0; }
.dl--dc .dl-pill { min-height: 0; margin-bottom: 15px; padding: 7px 15px; border-radius: 15px; font-size: 12px; line-height: 12px; box-shadow: var(--box-shadow); }
.dl--dc .dl-pill:hover { background: var(--gray-color); }
.dl--dc .dl-pill[aria-pressed="true"] { background: var(--primary-color); }
.dl--dc .dl-pill .anzahl { min-width: 0; padding: 1px 5px; border-radius: 8px; font-size: 10px; line-height: 12px; }
/* Suchzeile wie .document-search: rundes graues Symbol, Felder mit dünnem Rand */
.dl--dc .dl-werkzeuge { display: flex; align-items: center; gap: 20px; margin: 10px 0 30px; }
.dl-suche-symbol { display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50px; background: var(--gray-color); color: var(--primary-color); }
.dl .dl-suche-symbol .ic { width: 20px; height: 20px; }
.dl--dc .dl-feld { display: block; min-width: 0; }
.dl--dc .dl-filter .dl-typwahl { display: none; }   /* Desktop: nur Pills (am Handy umgekehrt, siehe unten) */
.dl--dc .dl-suche { flex: 1 1 auto; }
.dl--dc .dl-sprachwahl { flex: 0 1 300px; }
.dl--dc .dl-eingabe, .dl--dc .dl-select { display: block; width: 100%; height: 38px; padding: 6px 10px; box-sizing: border-box; border: 1px solid #ccc;
    border-radius: var(--border-radius); background: #fff; box-shadow: none; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.3; color: #333; }
.dl .dl-eingabe:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.dl--dc .dl-statuszeile { min-height: 0; margin: 0 0 15px; }
/* Graue Fläche mit den Karten (wie .download-center .downloads) */
.dl-flaeche { margin: 0 0 50px; padding: 50px; border-radius: var(--border-radius); background: var(--gray-color); }
.dl .dl-keine { margin: 0 0 18px; padding: 22px 24px; border-radius: var(--border-radius); background: #fff; }
.dl-gruppe-kopf { margin: 50px 0 20px; }
.dl .dl-gruppe-kopf h2 { margin: 0 0 6px; color: var(--primary-color); }
.dl .dl-mehr-zeile { margin: 22px 0 0; text-align: center; }
.dl-mehr { min-height: 40px; padding: 0 20px; border: 2px solid var(--primary-color); border-radius: 20px; background: #fff; color: var(--primary-color); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.dl-mehr:hover { background: #eef4f8; }
/* Details: Merken, „Produkt: …“ / „Für: …“ */
.dl-btn--merken { background: #fff; color: var(--primary-color); }
.dl-btn--merken:hover { background: #eef4f8; }
.dl-btn--merken[aria-pressed="true"] { background: #eef4f8; }
.dl-btn--merken[aria-pressed="true"] .ic { fill: currentColor; }
.dl .dl-merken-hinweis { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: #664d03; }
.dl .dl-merken-hinweis:empty, .dl .dl-zip-status:empty { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }   /* leer, aber im Baum: Screenreader sagen die Meldung an */
.dl .dl-fuer { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: #666; }
.dl-fuer a { color: var(--primary-color); font-weight: 600; }
.dl-gemerkt-marke { position: absolute; top: 6px; right: 6px; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-color); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.dl-gemerkt-marke .ic { width: 14px; height: 14px; fill: currentColor; }
/* Merkliste (auf Weiß unter der Kopfleiste, wie die alte „Downloadübersicht“ als Kasten mit Schatten) */
.dl-merkliste { margin: 30px 0 0; padding: 20px 24px; border-radius: var(--border-radius); background: #fff; box-shadow: var(--box-shadow); }
/* Produktseite: zwischen Kopf und Typ-Filter – oben reicht der Abstand des Kopfs (.mb50), unten derselbe (Theme: 45 px, bis 767 px 25 px) */
.dl-merkliste--produkt { margin: 0 0 45px; }
@media (max-width: 767px) { .dl-merkliste--produkt { margin-bottom: 25px; } }
.dl-merkliste-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.dl .dl-merkliste-kopf h3 { margin: 0; font-size: 20px; line-height: 26px; color: var(--primary-color); }
.dl .dl-merkliste-kopf h3:focus { outline: none; }
.dl-merkliste-zu { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--gray-color); color: var(--primary-color); cursor: pointer; }
.dl-merkliste-zu:hover { background: #e2e8ed; }
.dl .dl-merkliste-leer { margin: 0; color: #666; }
.dl-ml-eintrag { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "titel weg" "meta weg"; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid #ddd; }
.dl-ml-titel { grid-area: titel; font-weight: 600; color: var(--primary-color); text-decoration: none; overflow-wrap: anywhere; }
.dl-ml-titel:hover { text-decoration: underline; }
.dl-ml-meta { grid-area: meta; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; color: #666; }
/* „Von Liste entfernen“: roter Textknopf ohne Kreis – anders als das graue Schließen-X der Merkliste (Roman 10.11.2026);
   dunkleres Rot als --alert-red des Themes (#e78282 hätte auf Weiß zu wenig Kontrast für Text) */
.dl-ml-weg { grid-area: weg; align-self: center; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 4px 0; border: 0;
    background: none; color: #c0392b; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.dl-ml-weg span { text-decoration: underline; text-underline-offset: 2px; }
.dl-ml-weg:hover span { text-decoration-thickness: 2px; }
.dl .dl-ml-weg .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.dl-merkliste-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 16px; }
.dl-merkliste-leeren { padding: 0; border: 0; background: none; color: var(--primary-color); font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.dl .dl-zip-status { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.dl-zip[aria-disabled="true"] { opacity: .6; cursor: progress; }

@media (prefers-reduced-motion: reduce) {
    .dl-detail-innen, .dl-karte-knopf, .dl-karte-titel, .dl-pill { transition: none; }
    .dl-karte-knopf:hover { transform: none; }
}

@media (max-width: 820px) {
    .dl-kopf-rechts { justify-content: flex-start; }
}

/* Handy: Auswahlliste statt Pills, 2 Spalten; in der Detail-Zeile Cover klein neben dem Titel, Knöpfe und Sprachen darunter */
@media (max-width: 640px) {
    .dl-typen { display: none; }
    .dl-typwahl { display: flex; }
    .dl-filter { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .dl-feld { display: grid; grid-template-columns: 96px minmax(0, 1fr); }
    .dl-select { width: 100%; }
    .dl-kopf-rechts .dl-feld { width: 100%; }
    /* 130 px: auch bei 320 px Breite (iPhone SE mit Zoom) noch 2 Spalten (2 × 130 + 12 ≤ 90 % von 320) */
    .dl-raster { --spalte: 130px; --abstand-y: 20px; --r: 12px; column-gap: 12px; }
    .dl-karte-knopf { padding: 8px 8px 12px; }
    .dl-karte-titel { font-size: 14px; line-height: 19px; }
    .dl-detail-box { grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "cover kopf" "aktion aktion" "sprachen sprachen"; column-gap: 14px; padding: 16px 14px 14px; }
    .dl-detail-cover .dl-symbol { height: 118px; }
    .dl-detail-cover .dl-symbol .ic { width: 32px; height: 32px; }
    .dl .dl-detail-titel { font-size: 17px; line-height: 23px; margin-right: 40px; }
    .dl .dl-detail-kopf .dl-karte-typ { margin-right: 40px; }
    .dl-detail-zu { top: 10px; right: 10px; }
    .dl-aktionen { margin-top: 14px; }
    .dl-btn { min-height: 40px; }
    /* Sprach-Chips: Flagge + Kürzel; der Name bleibt für Screenreader */
    .dl-chip { padding: 0 9px 0 7px; }
    .dl-chip-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .dl-chip-kurz { display: inline; }
    /* Downloadcenter: Typ als Auswahlliste, Suche und Sprache untereinander; graue Fläche mit wenig Rand (2 Spalten ab 320 px:
       90 % von 320 = 288, minus 2 × 10 Rand = 268 ≥ 2 × 124 + 12) */
    .dl--dc .dl-filter { margin-top: 30px; }
    .dl--dc .dl-filter .dl-typwahl { display: block; }
    .dl--dc .dl-werkzeuge { flex-wrap: wrap; gap: 10px 12px; margin-bottom: 20px; }
    .dl--dc .dl-suche { flex: 1 1 0; }
    .dl--dc .dl-sprachwahl { flex: 1 1 100%; }
    .dl-flaeche { margin-bottom: 30px; padding: 16px 10px; }
    .dl--dc .dl-raster { --spalte: 124px; }
    .dl-merkliste { padding: 16px 14px; }
    .dl-ml-eintrag { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titel" "meta" "weg"; }
    .dl-ml-weg { justify-self: start; }
}
