/* Seite eAGFF (templates/eagff.html.twig, assets/eagff.js) */
.ea { --ea-gruen: #2f6b62; --ea-rand: rgba(120, 120, 120, .25); margin-top: 1.2rem; }
.ea-leiste { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.ea-filter { display: grid; gap: .45rem; min-width: 0; }
.ea-gruppen { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ea-themen-label { font-size: .8rem; color: #666; margin-right: .1rem; }
.ea-chip--klein { font-size: .8rem; padding: .2rem .65rem; }
@media (max-width: 640px) {
  .ea-gruppen { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .ea-chip { flex: 0 0 auto; white-space: nowrap; }
}
.ea-chip { font: inherit; font-size: .88rem; padding: .32rem .8rem; border-radius: 999px; border: 1px solid var(--ea-rand); background: #fff; color: #333; cursor: pointer; }
.ea-chip span { color: #888; font-size: .8rem; }
.ea-chip.an { background: var(--ea-gruen); border-color: var(--ea-gruen); color: #fff; }
.ea-chip.an span { color: #d9ebe7; }
.ea-suche { font: inherit; padding: .5rem .8rem; border: 1px solid var(--ea-rand); border-radius: 8px; min-width: min(100%, 340px); }
.ea-groesse { display: inline-flex; border: 1px solid var(--ea-rand); border-radius: 8px; overflow: hidden; }
.ea-groesse button { border: 0; background: #fff; padding: .45rem .55rem; cursor: pointer; display: grid; place-items: center; }
.ea-groesse button + button { border-left: 1px solid var(--ea-rand); }
.ea-groesse button.an { background: var(--ea-gruen); }
.ea-gr { display: block; border: 1.5px solid #555; border-radius: 2px; }
.ea-groesse button.an .ea-gr { border-color: #fff; }
.ea-gr--k { width: 7px; height: 10px; box-shadow: 9px 0 0 -1px transparent; }
.ea-gr--m { width: 10px; height: 14px; }
.ea-gr--g { width: 13px; height: 18px; }
.ea-backlinks { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .3rem; }
.ea-backlinks a { color: var(--ea-gruen); }
.ea-pfad { display: block; font-size: .75rem; color: #888; text-transform: capitalize; }
.ea-dl details summary { cursor: pointer; color: var(--ea-gruen); }
/* Grösse «klein»: kompakte Liste */
.ea--klein .ea-raster { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: .5rem; }
.ea--klein .ea-karte { grid-template-columns: 64px minmax(0, 1fr); gap: .7rem; padding: .5rem .6rem; }
.ea--klein .ea-seiten { display: none; }
.ea--klein .ea-kurz { -webkit-line-clamp: 2; font-size: .82rem; }
.ea--klein .ea-info h3 { font-size: .95rem; }
/* Grösse «gross»: Galerie mit grossem Titelbild */
.ea--gross .ea-raster { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.ea--gross .ea-karte { grid-template-columns: 1fr; align-content: start; }
.ea--gross .ea-titelbild { width: 100%; }
.ea--gross .ea-titelbild img { aspect-ratio: 210 / 297; object-fit: cover; object-position: top; }
.ea--gross .ea-kurz { -webkit-line-clamp: 3; }
@media (max-width: 640px) { .ea-groesse { display: none; } }
.ea-anzahl { font-size: .9rem; color: #666; min-height: 1.2em; margin: 0 0 .4rem; }
.ea-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; }
.ea-karte { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .9rem; padding: .8rem; border: 1px solid var(--ea-rand); border-radius: 12px; background: #fff; }
.ea-titelbild { position: relative; padding: 0; border: 1px solid var(--ea-rand); border-radius: 6px; overflow: hidden; background: #f4f4f2; cursor: zoom-in; align-self: start; }
.ea-titelbild img { display: block; width: 100%; height: auto; transition: transform .2s; }
.ea-titelbild:hover img { transform: scale(1.03); }
.ea-seiten { position: absolute; right: 4px; bottom: 4px; font-size: .72rem; background: rgba(0, 0, 0, .6); color: #fff; padding: 1px 6px; border-radius: 999px; }
.ea-info h3 { margin: .1rem 0 .3rem; font-size: 1rem; line-height: 1.3; }
.ea-meta { margin: 0; font-size: .78rem; color: #666; display: flex; gap: .4rem; align-items: center; }
.ea-i { margin-left: auto; flex: 0 0 auto; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1.5px solid var(--ea-gruen); background: #fff; color: var(--ea-gruen); font: italic 700 .82rem/1 Georgia, serif; cursor: pointer; padding: 0; }
.ea-i[aria-expanded=true] { background: var(--ea-gruen); color: #fff; }
.ea-infobox { grid-column: 1 / -1; margin: 0; padding: .6rem .8rem; border-radius: 8px; background: #f3f6f5; font-size: .82rem; }
.ea-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .8rem; margin: 0; }
.ea-dl dt, .ea-dl dd { margin: 0; padding: 0; float: none; width: auto; line-height: 1.4; font-weight: 400; }
.ea-dl dt { color: #666; }
@media (max-width: 480px) { .ea-dl { grid-template-columns: 1fr; } .ea-dl dd { margin-bottom: .3rem; } }
.ea-stelle { margin: 0 0 .4rem; }
.ea-stelle-k { font: inherit; font-size: .84rem; line-height: 1.45; text-align: left; color: #444; background: #fffbe6; border: 1px solid #f0e2a6; border-radius: 6px; padding: .3rem .5rem; cursor: pointer; }
.ea mark { background: #ffe58a; color: inherit; padding: 0 1px; border-radius: 2px; }
.ea-nr { font-weight: 700; color: #fff; background: var(--ea-gruen); padding: 0 .45rem; border-radius: 4px; }
.ea-kurz { margin: 0 0 .4rem; font-size: .86rem; line-height: 1.45; color: #333; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ea-links { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .88rem; }
.ea-link { font: inherit; border: 0; background: none; padding: 0; color: var(--ea-gruen); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ea-links a { color: var(--ea-gruen); }
.ea-gast { margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: 12px; background: #f3f6f5; max-width: 640px; }
.ea-gast p { margin: 0 0 .5rem; }
.ea-quelle, .ea-leer { font-size: .85rem; color: #777; margin-top: 1.2rem; }
/* Blaetter-Ansicht */
.ea-blick { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #fff; }
html.ea-offen { overflow: hidden; }
.ea-blick::backdrop { background: rgba(20, 25, 24, .78); }
.ea-blick[open] { display: flex; flex-direction: column; }
.ea-blick-kopf { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; padding: .6rem .9rem; border-bottom: 1px solid var(--ea-rand); }
.ea-blick-nr { font-weight: 700; color: var(--ea-gruen); }
.ea-blick-knoepfe { display: flex; flex-wrap: wrap; gap: .4rem; }
.ea-k { font: inherit; font-size: .85rem; padding: .3rem .7rem; border-radius: 6px; border: 1px solid var(--ea-rand); background: #fff; color: #333; cursor: pointer; text-decoration: none; }
.ea-k.an { background: var(--ea-gruen); border-color: var(--ea-gruen); color: #fff; }
.ea-buehne { position: relative; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem; background: #e3e7e5; min-height: 0; flex: 1 1 0; overflow: hidden; }
.ea-buehne[hidden], .ea-leiste-unten[hidden] { display: none; }
.ea-blatt { display: flex; gap: 4px; justify-content: center; align-items: flex-start; touch-action: pan-y; }
.ea-blatt { height: 100%; min-height: 0; align-items: center; }
.ea-blatt img { max-height: 100%; max-width: min(46vw, 900px); width: auto; height: auto; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); background: #fff; }
.ea-rolle { flex: 1 1 auto; min-height: 0; overflow: auto; background: #e3e7e5; padding: 1rem; display: grid; justify-items: center; align-content: start; gap: 1rem; }
.ea-rolle[hidden] { display: none; }
.ea-rolle figure { margin: 0; width: min(100%, 900px); }
.ea-rolle img { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); aspect-ratio: 210 / 297; }
.ea-rolle figcaption { text-align: center; font-size: .78rem; color: #666; margin-top: .25rem; }
.ea-pfeil { font-size: 2rem; line-height: 1; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #222; cursor: pointer; flex: 0 0 auto; }
.ea-pfeil:disabled { opacity: .25; cursor: default; }
.ea-leiste-unten { padding: .4rem .8rem .7rem; display: grid; gap: .4rem; }
.ea-seitenzahl { font-size: .82rem; color: #555; text-align: center; }
.ea-mini { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.ea-mini img { height: 58px; width: auto; border: 2px solid transparent; border-radius: 3px; cursor: pointer; opacity: .7; }
.ea-mini img.an { border-color: var(--ea-gruen); opacity: 1; }
.ea-textansicht { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1rem 1.4rem; line-height: 1.55; font-size: .95rem; }
.ea-textansicht > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
.ea-hinweis { font-size: .8rem; color: #777; }
@media (max-width: 899px) {
  .ea-blatt img { max-width: 92vw; }
  .ea-blick-kopf { padding: .45rem .6rem; }
  .ea-k { padding: .25rem .5rem; font-size: .8rem; }
  .ea-pfeil { position: absolute; top: 50%; transform: translateY(-50%); }
  .ea-zurueck { left: 4px; } .ea-weiter { right: 4px; }
}
@media (max-width: 480px) {
  .ea-karte { grid-template-columns: 90px minmax(0, 1fr); }
}
.ea-intern { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 .4rem; border-radius: 4px; background: #fdecc8; color: #8a5a00; }
.ea-spr { font-size: .68rem; font-weight: 700; padding: 0 .35rem; border-radius: 4px; background: #eef1f0; color: #555; }
.ea-chip--intern:not(.an) { border-style: dashed; }
.ea-hinweis-intern { color: #8a5a00; }
.ea-hinweis-intern a { color: inherit; }
.ea-datei { display: block; font-size: .75rem; color: #888; overflow-wrap: anywhere; }

/* Filterleiste: Zeile 1 Sprache + Dokumentart, Zeile 2 Themen + Grösse + Suche */
.ea-leiste { display: grid !important; gap: .55rem; }
.ea-zeile { display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: center; }
.ea-zeile .ea-suche { flex: 1 1 260px; min-width: 0; }
.ea-dd { position: relative; }
.ea-dd[hidden] { display: none; }
.ea-dd-knopf { list-style: none; cursor: pointer; font-size: .88rem; padding: .32rem .75rem; border: 1px solid var(--ea-rand); border-radius: 999px; background: #fff; white-space: nowrap; }
.ea-dd-knopf::-webkit-details-marker { display: none; }
.ea-dd-knopf::after { content: ' ▾'; color: #888; }
.ea-dd[open] .ea-dd-knopf { border-color: var(--ea-gruen); }
.ea-dd-label { color: #777; }
.ea-dd-feld { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 240px; max-width: min(92vw, 340px); background: #fff; border: 1px solid var(--ea-rand); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: .5rem; display: grid; gap: .2rem; }
.ea-dd-suche { font: inherit; font-size: .85rem; padding: .35rem .55rem; border: 1px solid var(--ea-rand); border-radius: 6px; margin-bottom: .2rem; }
.ea-dd-liste { display: grid; gap: .1rem; max-height: 260px; overflow-y: auto; }
.ea-dd-wahl { display: flex; align-items: center; gap: .45rem; font-size: .88rem; padding: .25rem .35rem; border-radius: 6px; cursor: pointer; }
.ea-dd-wahl:hover { background: #f1f5f4; }
.ea-dd-wahl[hidden] { display: none; }
.ea-dd-wahl span { margin-left: auto; color: #888; font-size: .78rem; }
.ea-dd-leeren { justify-self: start; font-size: .82rem; margin-top: .2rem; }

/* Zoomen im Blätter-Fenster (Gesten statt Lupe) */
.ea-buehne { touch-action: none; }
.ea-blatt { transform-origin: 0 0; will-change: transform; }
.ea-gezoomt .ea-buehne { cursor: grab; }
.ea-gezoomt .ea-buehne:active { cursor: grabbing; }
.ea-gezoomt .ea-pfeil { opacity: .35; }
.ea-zoom { display: inline-flex; }
.ea-zoom[hidden] { display: none; }
.ea-zoom .ea-k { border-radius: 0; margin-left: -1px; min-width: 2.1rem; }
.ea-zoom .ea-k:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.ea-zoom .ea-k:last-child { border-radius: 0 6px 6px 0; }
.ea-zoom-wert { font-variant-numeric: tabular-nums; min-width: 3.6rem !important; }
.ea-rolle { touch-action: pan-x pan-y; --zoom: 1; justify-items: start; }
.ea-rolle figure { width: calc(min(100%, 900px) * var(--zoom)) !important; margin: 0 auto; }
.ea-rolle img { cursor: zoom-in; }
.ea-gezoomt .ea-rolle img { cursor: zoom-out; }

/* Ansichts-Knöpfe als Symbole */
.ea-k--ico { display: inline-grid; place-items: center; min-width: 2.2rem; padding: .25rem .45rem; }
.ea-ico { width: 1.2rem; height: 1.2rem; display: block; }
.ea-k--abc { font-size: .72rem; font-weight: 800; letter-spacing: .02em; font-family: Georgia, 'Times New Roman', serif; }
.ea-blick-knoepfe { align-items: center; }
/* Schliessen immer oben rechts, auch wenn die Knöpfe umbrechen */
.ea-blick-kopf { position: relative; padding-right: 3.2rem !important; }
.ea-blick-kopf .ea-zu { position: absolute; top: 50%; right: .6rem; transform: translateY(-50%); }
@media (max-width: 640px) { .ea-blick-kopf .ea-zu { top: .45rem; transform: none; } }
@media (max-width: 640px) { .ea-zoom { display: none !important; } }   /* am Handy zoomt man mit den Fingern */
