/* Öffentliche Galerie (Marke Privat) – hell, ruhig, Fotos im Mittelpunkt. Hausschrift Jost und Markenfarben
   wie svenjaegerfotografie.de (Dunkelblau, Türkis, Rosa). Ohne Build-Schritt, ohne Inline-Styles (CSP). */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("/fonts/jost/jost-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("/fonts/jost/jost-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
    --bg: #fbfaf8; --fg: #14303f; --muted: #5f6a70; --line: #e4e6e6; --soft: #eff1f1;
    --brand-cyan: #00b2ca; --brand-pink: #e9638c; --brand-navy: #14303f;
    --serif: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --gap: 6px; --focus: #00b2ca;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; justify-content: center; color: #fff; background: #2b2a28; overflow: hidden; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.5) 100%); }
.hero-content { position: relative; z-index: 1; text-align: center; padding: 2rem 1.25rem calc(3.5rem + env(safe-area-inset-bottom)); max-width: 900px; }
.hero-logo { position: absolute; z-index: 1; top: calc(1.5rem + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: clamp(120px, 14vw, 190px); height: auto; filter: drop-shadow(0 1px 6px rgba(0,0,0,.35)); }
.hero h1 { font: 300 clamp(2.1rem, 6vw, 4.2rem)/1.1 var(--serif); margin: 0 0 .6rem; letter-spacing: .02em; overflow-wrap: anywhere; }
.hero .date { margin: 0 0 1.75rem; font-size: .95rem; opacity: .9; letter-spacing: .04em; }
.hero-button { display: inline-block; padding: .8rem 1.6rem; border: 1px solid rgba(255,255,255,.85); color: #fff; text-decoration: none; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; transition: background .2s, color .2s; }
.hero-button:hover { background: #fff; color: var(--fg); }
.hero--plain { min-height: 55vh; background: var(--bg); color: var(--fg); padding-top: 9rem; }
.hero--plain::after { display: none; }
.hero--plain .hero-button { border-color: var(--fg); color: var(--fg); }
.hero--plain .hero-button:hover { background: var(--fg); color: #fff; }

/* ---------- Leiste mit Titel und Alben ---------- */
.gallery-bar { position: sticky; top: 0; z-index: 20; background: rgba(250, 249, 247, .94); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.gallery-bar-inner { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; padding: .8rem clamp(1rem, 3vw, 2.5rem); }
.bar-title { font: 400 1.1rem/1.2 var(--serif); letter-spacing: .02em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.album-tabs { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.album-tabs::-webkit-scrollbar { display: none; }
.album-tabs a { display: block; padding: .3rem 0; text-decoration: none; color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; border-bottom: 1px solid transparent; }
.album-tabs a:hover { color: var(--fg); }
.album-tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--brand-pink); }
@media (max-width: 640px) {
    .gallery-bar-inner { flex-direction: column; align-items: stretch; gap: .4rem; }
    .bar-title { max-width: none; text-align: center; }
    .album-tabs { gap: 1rem; justify-content: flex-start; }
}

/* ---------- Raster ---------- */
.photos { max-width: 1600px; margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem) clamp(.5rem, 3vw, 2.5rem) 4rem; outline: none; scroll-margin-top: 4rem; }
.album-title { font: 300 1.7rem/1.2 var(--serif); letter-spacing: .02em; text-align: center; margin: .5rem 0 1.75rem; }
.empty { text-align: center; color: var(--muted); padding: 4rem 0; }
/* Ohne JavaScript: Zeilen gleicher Höhe, Seitenverhältnis bleibt erhalten (kein Zuschnitt). */
.justified { display: flex; flex-wrap: wrap; gap: var(--gap); }
.tile { position: relative; display: block; margin: 0; height: 220px; flex: 0 0 auto; background: var(--soft); overflow: hidden; }
.tile-link { display: block; height: 100%; }
.tile img { width: auto; height: 100%; transition: opacity .3s; }
/* Mit JavaScript: exakt bündige Zeilen (Breiten und Höhen setzt gallery.js). */
.js .justified .tile { height: auto; }
.js .justified .tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover img { opacity: .92; }

/* ---------- Großansicht ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0e0e0d; color: #fff; display: none; touch-action: pan-y pinch-zoom; }
.lightbox.is-open { display: block; }
.lightbox-stage { position: absolute; inset: 3.5rem .5rem 3.5rem; display: flex; align-items: center; justify-content: center; }
.lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lightbox-stage img.is-loading { opacity: .25; }
.lightbox button { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 1.4rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.18); }
.lightbox .lb-close { top: .5rem; right: .5rem; }
.lightbox .lb-prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-counter { position: absolute; top: 1.1rem; left: 1rem; font-size: .8rem; letter-spacing: .12em; opacity: .75; }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: .5rem; transform: none; } .lightbox-stage { inset: 3.5rem 0 4rem; } }
body.lightbox-open { overflow: hidden; }
.lb-actions { position: absolute; top: .65rem; right: 4rem; display: flex; gap: .5rem; }
.lb-download { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border: 1px solid rgba(255,255,255,.55); color: #fff; text-decoration: none; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.lb-download { background: transparent; font-family: inherit; cursor: pointer; }
.lb-download:hover { background: #fff; color: var(--fg); }
.lightbox .lb-download { position: static; width: auto; height: auto; min-height: 40px; border-radius: 0; font-size: .72rem; }
.lb-menu { position: absolute; top: calc(100% + .4rem); right: 0; min-width: 300px; background: #fff; color: var(--fg); box-shadow: 0 10px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.lb-menu[hidden] { display: none; }
.lb-menu a { padding: .8rem 1rem; color: var(--fg); text-decoration: none; font-size: .9rem; border-bottom: 1px solid var(--line); }
.lb-menu a:last-child { border-bottom: 0; }
.lb-menu a:hover, .lb-menu a:focus-visible { background: var(--soft); }
@media (max-width: 640px) { .lb-menu { top: auto; bottom: calc(100% + .4rem); left: 50%; right: auto; transform: translateX(-50%); min-width: 280px; } }
@media (max-width: 640px) { .lb-actions { top: auto; bottom: .75rem; right: auto; left: 50%; transform: translateX(-50%); } }

/* ---------- Einfache Seiten (Passwort, Hinweise) ---------- */
.page-plain { min-height: 100vh; display: flex; flex-direction: column; }
.notice-page { flex: 1; max-width: 440px; width: 100%; margin: 0 auto; padding: 12vh 1.25rem 3rem; text-align: center; }
.brand-logo { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 2.25rem; }
.notice-page h1 { font: 300 2rem/1.2 var(--serif); margin: 0 0 1rem; overflow-wrap: anywhere; letter-spacing: .02em; }
.notice-page p { color: var(--muted); }
.password-form { margin-top: 2rem; text-align: left; }
.password-form label { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.password-form input { width: 100%; min-height: 48px; padding: .7rem .9rem; font: inherit; border: 1px solid #cfcac2; background: #fff; border-radius: 0; }
.password-form input[aria-invalid="true"] { border-color: #b3261e; }
.password-form button { width: 100%; min-height: 48px; margin-top: 1rem; border: 0; background: var(--brand-navy); color: #fff; font: inherit; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.form-error { color: #b3261e !important; font-size: .9rem; margin: .5rem 0 0; }

/* ---------- Fußzeile ---------- */
.site-footer { text-align: center; padding: 2.5rem 1rem 3rem; color: var(--muted); font-size: .8rem; letter-spacing: .06em; }
.site-footer p { margin: 0 0 .4rem; }
.site-footer nav { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* ---------- Besucher ---------- */
.visitor { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .8rem; white-space: nowrap; }
.visitor form { margin: 0; }
.visitor-email { color: var(--muted); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.link-button { background: none; border: 0; padding: .3rem 0; font: inherit; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--brand-cyan); cursor: pointer; }
.toast { max-width: 1600px; margin: 1rem auto 0; padding: .7rem 1rem; text-align: center; background: #e6f6f8; color: var(--fg); font-size: .92rem; }
.notice-page .small { font-size: .88rem; margin-top: 1.25rem; }
.notice-page a { color: var(--fg); }
.text-button { display: inline-block; margin-top: .5rem; padding: .8rem 1.4rem; background: var(--brand-navy); color: #fff !important; text-decoration: none; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }
@media (max-width: 640px) { .visitor { margin-left: 0; justify-content: center; } }

/* ---------- Übersichtsseite (wie bisher bei Pixieset: Logo, Kartenraster, Schloss bei Passwort) ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.overview-head { text-align: center; padding: clamp(2rem, 6vw, 4.5rem) 1rem clamp(1.5rem, 4vw, 3rem); }
.overview-logo { display: inline-block; width: clamp(150px, 16vw, 210px); height: auto; }
.overview { max-width: 1400px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem) 3rem; }
.overview-grid { display: grid; gap: clamp(2rem, 4vw, 3.25rem) clamp(1rem, 2vw, 1.75rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.gallery-card { display: block; text-decoration: none; color: var(--fg); text-align: center; }
.gallery-card-cover { display: block; aspect-ratio: 3 / 2; background: var(--soft); overflow: hidden; }
.gallery-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.gallery-card:hover .gallery-card-cover img { transform: scale(1.03); }
.gallery-card-title { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1rem; font-size: .9rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; overflow-wrap: anywhere; }
.gallery-card-title .lock { width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted); }
.gallery-card-date { display: block; margin-top: .35rem; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.overview-more { grid-column: 1 / -1; justify-self: center; margin-top: 1rem; padding: .8rem 1.6rem; border: 1px solid var(--fg); text-decoration: none; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
.js .overview-more { visibility: hidden; height: 1px; padding: 0; margin: 0; border: 0; }
.overview-loading { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .85rem; }

/* ---------- Passwortseite mit Cover (wie bisher bei Pixieset) ---------- */
.page-cover { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: #1c1c1b; color: #fff; position: relative; }
.page-cover .cover-backdrop { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-cover .notice-page { position: relative; z-index: 1; }
.page-cover .notice-page h1 { color: #fff; }
.page-cover .notice-page p, .page-cover .password-form label { color: rgba(255,255,255,.82); }
.page-cover .password-form input { background: rgba(255,255,255,.95); border-color: transparent; }
.page-cover .password-form button { background: transparent; border: 1px solid #fff; }
.page-cover .password-form button:hover { background: #fff; color: var(--fg); }
.page-cover .site-footer, .page-cover .site-footer a { position: relative; z-index: 1; color: rgba(255,255,255,.7); }
.page-cover .form-error { color: #ffb3c6 !important; }

/* ---------- Herunterladen, Auswahl, ZIP ---------- */
.bar-download { position: relative; }
.bar-download > summary { list-style: none; }
.bar-download > summary::-webkit-details-marker { display: none; }
.bar-download-panel { position: absolute; right: 0; top: calc(100% + .7rem); z-index: 30; width: min(340px, 90vw); background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(20,48,63,.14); padding: 1rem 1.1rem; display: grid; gap: .6rem; text-transform: none; letter-spacing: 0; }
.bar-download-panel form { display: grid; gap: .5rem; }
.panel-title { margin: 0 0 .25rem; font-size: .9rem; color: var(--fg); white-space: normal; }
.radio { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; white-space: normal; cursor: pointer; }
.radio input { margin-top: .25rem; accent-color: var(--brand-navy); }
.panel-button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 0 1.1rem; border: 0; background: var(--brand-navy); color: #fff; font: inherit; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.panel-button:disabled { opacity: .45; cursor: not-allowed; }
.selection-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 40; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: center; padding: .75rem 1rem; background: var(--brand-navy); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.3); width: max-content; max-width: calc(100vw - 2rem); }
.selection-bar[hidden] { display: none; }
.selection-bar select { min-height: 40px; font: inherit; font-size: .85rem; padding: 0 .5rem; max-width: 60vw; }
.selection-bar .panel-button { background: #fff; color: var(--fg); }
.link-button.light { color: #fff; border-bottom-color: rgba(255,255,255,.6); }
.selecting .tile { position: relative; cursor: pointer; }
.selecting .tile::after { content: ""; position: absolute; top: .5rem; right: .5rem; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.selecting .tile.is-selected::after { background: var(--brand-cyan); border-color: #fff; }
.selecting .tile.is-selected img { opacity: .75; }
.spinner { width: 28px; height: 28px; margin: 1rem auto; border: 3px solid var(--line); border-top-color: var(--brand-cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- Favoriten ---------- */
.fav { position: absolute; right: .35rem; bottom: .35rem; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.fav svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2; }
.fav[aria-pressed="true"] { opacity: 1; background: rgba(255,255,255,.92); }
.fav[aria-pressed="true"] svg { fill: var(--brand-pink); stroke: var(--brand-pink); }
.tile:hover .fav, .fav:focus-visible { opacity: 1; }
@media (hover: none) { .fav { opacity: .9; } }
.selecting .fav { display: none; }
.lightbox .lb-fav { top: .5rem; right: auto; left: 50%; transform: translateX(-50%); }
.lb-fav svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; }
.lb-fav[aria-pressed="true"] svg { fill: var(--brand-pink); stroke: var(--brand-pink); }
.lb-fav[hidden] { display: none; }
.fav-link { white-space: nowrap; }
.favorites-head { max-width: 1600px; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 2.5rem) 1rem; display: grid; gap: 1rem; }
.favorites-head h1 { font: 300 1.9rem/1.2 var(--serif); margin: 0; letter-spacing: .02em; }
.list-tabs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.list-tabs a { display: inline-block; padding: .4rem .9rem; border: 1px solid var(--line); text-decoration: none; font-size: .85rem; }
.list-tabs a[aria-current="page"] { border-color: var(--fg); background: var(--fg); color: #fff; }
.fav-tools { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; }
.fav-tools form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; }
.fav-tools input[type=text] { min-height: 40px; padding: 0 .7rem; border: 1px solid #cfcac2; font: inherit; }
.fav-tools .hint { color: var(--muted); font-size: .85rem; margin: 0; }
.share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.share-list li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; }
.share-list input { flex: 1 1 280px; min-height: 36px; padding: 0 .6rem; border: 1px solid var(--line); font: inherit; font-size: .8rem; background: #fff; }
.tile-actions { position: absolute; left: .4rem; bottom: .4rem; display: flex; gap: .25rem; }
.tile-actions form { margin: 0; }
.tile-actions button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--fg); cursor: pointer; font-size: .9rem; }
.small-button { min-height: 40px; padding: 0 1rem; border: 1px solid var(--fg); background: #fff; font: inherit; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.shared-head { text-align: center; justify-items: center; }
.shared-head .hint { color: var(--muted); margin: 0; }
@media (max-width: 1000px) { .visitor-email { display: none; } .bar-title { max-width: 30%; } }
.fav-tools select { min-height: 40px; padding: 0 .6rem; border: 1px solid #cfcac2; background: #fff; font: inherit; font-size: .85rem; max-width: 100%; }

/* Herunterladen als Symbol */
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; cursor: pointer; color: var(--fg); border-radius: 50%; }
.icon-button:hover, .bar-download[open] > .icon-button { background: var(--soft); }
.icon-button .icon, .lb-icon .icon { width: 20px; height: 20px; }
.lightbox .lb-download.lb-icon { width: 40px; min-height: 40px; padding: 0; justify-content: center; border-color: rgba(255,255,255,.45); }
