:root { --farbe: #2f3e46; --akzent: #8a7a5c; --papier: #faf8f5; --text: #2b2b2b; --leise: #6b6b6b; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--text); font: 18px/1.7 Georgia, "Times New Roman", serif; }
body.offen { overflow: hidden; }
a { color: var(--farbe); }

.vorschau { background: #fff3cd; color: #5b4a00; text-align: center; padding: 8px 16px; font: 15px/1.4 system-ui, sans-serif; }


main { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }
.titel { text-align: center; padding: 44px 0 20px; }
.portrait { width: 220px; height: 220px; border-radius: 50%; overflow: hidden; border: 5px solid #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); margin: 0 auto 18px; background: #e9e5dd; }
/* Das volle Bild (Größe per style, "cover") liegt mittig in .pan; .pan wird verschoben/gezoomt, der Kreis beschneidet */
.portrait { position: relative; }
.portrait .pan { position: absolute; inset: 0; }
.portrait .pan img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: none; max-height: none; object-fit: cover; display: block; }
.vorspann { margin: 0; color: var(--leise); font-style: italic; }
h1 { margin: .15em 0 .1em; font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: normal; color: var(--farbe); line-height: 1.2; }
.daten { margin: 0; color: var(--akzent); letter-spacing: .08em; white-space: pre; }
blockquote { margin: 28px auto 0; max-width: 560px; font-style: italic; color: var(--farbe); white-space: pre-line; }
/* Formatierte Texte aus dem Editor */
.rte p { margin: 0 0 1em; }
.rte .a-l { text-align: left; } .rte .a-c { text-align: center; } .rte .a-r { text-align: right; }
.rte .a-j { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.rte ul { margin: 0 0 1em; padding-left: 1.4em; text-align: left; }
.rte li { margin: 0 0 .3em; }
.rte a { color: var(--farbe); text-decoration: underline; overflow-wrap: anywhere; }
blockquote.rte { white-space: normal; }
blockquote.rte p { margin: 0 0 .4em; }
blockquote.rte ul { display: inline-block; }
blockquote::before, blockquote::after { content: ""; display: block; width: 60px; height: 1px; background: var(--akzent); margin: 14px auto; }

.block { padding: 18px 0; }
.block h2 { font-size: 1.15rem; font-weight: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--akzent); text-align: center; margin: 0 0 16px; }
.text p, .block > p { margin: 0 0 1em; }

.termin { background: #fff; border: 1px solid #e6e1d8; border-radius: 6px; padding: 16px 20px; margin-bottom: 14px; text-align: center; }
.termin h3 { margin: 0 0 4px; font-size: 1.2rem; font-weight: normal; color: var(--farbe); }
.termin p { margin: 2px 0; }
.termin .zeit { font-weight: bold; }
.termin .hinweis { color: var(--leise); font-style: italic; font-size: .95rem; }
.termin .karte { display: inline-block; margin-top: 8px; font: 14px system-ui, sans-serif; }

audio { width: 100%; }

.kondolenz { text-align: center; }
.kond-auf { padding: 12px 30px; border: 0; border-radius: 28px; background: var(--farbe); color: #fff; font: 16px system-ui, sans-serif; cursor: pointer; letter-spacing: .02em; }
.kond-auf:hover, .kond-auf:focus-visible { background: var(--akzent); }
.kond-dialog { border: 0; border-radius: 10px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 10px 40px rgba(0,0,0,.35); color: var(--text); background: #fff; }
.kond-dialog::backdrop { background: rgba(0,0,0,.55); }
.kond-form { padding: 22px 24px 20px; font: 15px/1.5 system-ui, sans-serif; text-align: left; }
.kond-form h3 { margin: 0 0 6px; font: normal 1.35rem/1.3 Georgia, serif; color: var(--farbe); }
.kond-hinweis { margin: 0 0 14px; color: var(--leise); font-size: .92rem; }
.kond-form label { display: block; margin: 10px 0 0; font-weight: 600; font-size: .9rem; }
.kond-form input[type=text], .kond-form input[type=email], .kond-form textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid #bdb6a9; border-radius: 6px; font: inherit; font-weight: normal; box-sizing: border-box; }
.kond-form textarea { resize: vertical; min-height: 130px; }
.kond-honig { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kond-form .kond-zustimmung { font-weight: normal; font-size: .85rem; color: var(--leise); }
.kond-form .kond-zustimmung input { margin-right: 6px; }
.kond-meldung { margin: 12px 0 0; padding: 8px 12px; border-radius: 6px; font-size: .92rem; }
.kond-meldung[hidden] { display: none; }
.kond-meldung.fehler { background: #fdecea; color: #8a1c13; }
.kond-meldung.ok { background: #e8f3ea; color: #1d5c2d; }
.kond-knoepfe { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.kond-knoepfe button { padding: 9px 20px; border-radius: 22px; border: 1px solid var(--akzent); background: #fff; color: var(--farbe); font: inherit; cursor: pointer; }
.kond-knoepfe .kond-senden { background: var(--farbe); color: #fff; border-color: var(--farbe); }
.kond-knoepfe button:disabled { opacity: .55; cursor: default; }
.kond-knoepfe button[hidden] { display: none; }
.teilen { text-align: center; font: 15px/1.4 system-ui, sans-serif; }
.teilen[hidden] { display: none; }
.teilen h2 { font-family: Georgia, "Times New Roman", serif; }
.teilen button, .teilen a { display: inline-block; margin: 4px; padding: 7px 16px; border: 1px solid var(--akzent); border-radius: 20px; background: #fff; color: var(--farbe); text-decoration: none; cursor: pointer; font: inherit; }
.teilen button:hover, .teilen a:hover { background: var(--farbe); color: #fff; }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.galerie .foto { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: #e9e5dd; }
.galerie img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.galerie .foto:hover img { transform: scale(1.04); }

.fuss { background: #fff; border-top: 1px solid #e6e1d8; font: 14px/1.6 system-ui, sans-serif; color: var(--leise); }
.fuss-in { max-width: 860px; margin: 0 auto; padding: 22px 20px; text-align: center; }
.fuss nav { margin-top: 8px; }
.fuss-credit { border-top: 1px solid #eee9e0; font: 12px/1.4 system-ui, sans-serif; }
.fuss-credit-in { max-width: 860px; margin: 0 auto; padding: 8px 20px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.fuss-credit a { color: #9a948a; text-decoration: none; }
.fuss-credit a:hover { color: var(--farbe); text-decoration: underline; }
.fuss-credit img { display: block; height: 20px; width: auto; opacity: .75; }
.fuss-credit a:hover img { opacity: 1; }
@media (max-width: 560px) { .fuss-credit-in { justify-content: center; } }
.fuss-logo { margin: 0 0 8px; }
.fuss-logo img { height: 34px; width: auto; max-width: 60%; opacity: .9; }
.titel { padding-top: 48px; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50; cursor: pointer; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 84vh; }
.lightbox .bildtitel { color: #ddd; font: 15px system-ui, sans-serif; margin: 10px 0 0; min-height: 1.4em; }
.lightbox .vor, .lightbox .weiter { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 72px; background: rgba(255,255,255,.12); border: 0; border-radius: 6px; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; }
.lightbox .vor { left: 12px; }
.lightbox .weiter { right: 12px; }
.lightbox .vor:hover, .lightbox .weiter:hover { background: rgba(255,255,255,.28); }
.lightbox .vor[hidden], .lightbox .weiter[hidden] { display: none; }
@media (max-width: 600px) { .lightbox .vor, .lightbox .weiter { width: 40px; height: 56px; font-size: 34px; } }
.lightbox .zu { position: absolute; top: 10px; right: 16px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

@media print { .lightbox, audio, .galerie, .teilen, .kondolenz { display: none; } body { background: #fff; } }
