/* ==========================================================================
   Foto-Genuss – Stylesheet
   Dunkle, bildzentrierte Oberfläche. Keine Frameworks, keine externen
   Ressourcen. Aufbau: Grundlagen, Layout, Kopf/Fuß, Bausteine, Seiten.
   ========================================================================== */

/* --------------------------------------------------------------- Grundlagen */

:root {
    --bg:            #0e0f10;
    --bg-elevated:   #16181a;
    --bg-sunken:     #0a0b0c;
    --border:        #26292d;
    --border-strong: #383c42;

    --text:          #e9eaec;
    --text-muted:    #9a9da3;
    --text-faint:    #6d7076;

    --accent:        #8fbc6d;
    --accent-soft:   #a9d189;
    --accent-dim:    rgba(143, 188, 109, 0.14);

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --wrap:    82rem;
    --gap:     0.5rem;
    --row-h:   14rem;
    --radius:  4px;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);

    --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
    --step-0:  clamp(.95rem, .92rem + .15vw, 1.02rem);
    --step-1:  clamp(1.15rem, 1.08rem + .35vw, 1.4rem);
    --step-2:  clamp(1.45rem, 1.3rem + .75vw, 2rem);
    --step-3:  clamp(1.9rem, 1.6rem + 1.5vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0; }

p { margin: 0 0 1em; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-color: rgba(143, 188, 109, .4); text-underline-offset: .18em; }
a:hover { color: var(--accent-soft); text-decoration-color: currentColor; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .9em;
    background: var(--bg-elevated);
    padding: .1em .35em;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
    position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
    z-index: 100; padding: .6rem 1.1rem;
    background: var(--accent); color: #10210a; font-weight: 600;
    border-radius: 0 0 var(--radius) var(--radius);
    transition: transform .15s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

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

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.site-main { min-height: 60vh; padding-block: clamp(1.5rem, 4vw, 3rem); }

.section { margin-block: clamp(2.5rem, 6vw, 4.5rem); }

.section__head {
    display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
    align-items: baseline; justify-content: space-between;
    margin-bottom: 1.25rem;
}
.section__title { font-size: var(--step-1); }
.section__more { font-size: var(--step--1); text-decoration: none; }

.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-1); margin: 2.2rem 0 .6rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }
.prose .note { color: var(--text-muted); font-size: var(--step--1); margin-top: 2.5rem; }

.page-head { margin-bottom: 1.75rem; }
.page-head__title { font-size: var(--step-2); }
.page-head__meta { color: var(--text-muted); font-size: var(--step--1); margin: .35rem 0 0; }

.address { font-style: normal; color: var(--text-muted); margin-bottom: 1em; }

/* ------------------------------------------------------------- Kopf und Fuß */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(14, 15, 16, .88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(10px)) {
    .site-header { background: var(--bg); }
}

.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; min-height: 4.25rem; flex-wrap: wrap;
}

.brand { text-decoration: none; color: inherit; display: grid; line-height: 1.25; }
.brand__name { font-size: var(--step-1); font-weight: 600; letter-spacing: -.02em; }
.brand__tld { color: var(--text-faint); font-weight: 400; }
.brand__claim { font-size: var(--step--1); color: var(--text-muted); }

.nav__list { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav__link {
    display: block; padding: .45rem .85rem;
    color: var(--text-muted); text-decoration: none;
    border-radius: var(--radius); font-size: var(--step--1);
    letter-spacing: .02em;
}
.nav__link:hover { color: var(--text); background: var(--bg-elevated); }
.nav__link.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

.nav-toggle {
    display: none; align-items: center; gap: .5rem;
    background: none; border: 1px solid var(--border-strong); color: var(--text);
    padding: .45rem .8rem; border-radius: var(--radius);
    font: inherit; font-size: var(--step--1); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 1rem; height: 1.5px; background: currentColor;
    content: ""; position: relative;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 3.5px; }

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: clamp(3rem, 8vw, 6rem);
    padding-block: 2rem;
    color: var(--text-faint);
    font-size: var(--step--1);
}
.site-footer__inner {
    display: flex; flex-wrap: wrap; gap: .75rem 2rem;
    align-items: center; justify-content: space-between;
}
.site-footer__copy { margin: 0; max-width: 55ch; }
.site-footer__nav { display: flex; gap: 1.25rem; }
.site-footer__nav a { color: var(--text-muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--text); text-decoration: underline; }

/* --------------------------------------------------------------- Bausteine */

.button {
    display: inline-block; padding: .6rem 1.4rem;
    background: var(--accent); color: #10210a;
    border-radius: var(--radius); text-decoration: none;
    font-weight: 600; font-size: var(--step--1); letter-spacing: .01em;
}
.button:hover { background: var(--accent-soft); color: #10210a; }

.link-quiet { color: var(--text-muted); text-decoration: none; margin-left: 1rem; }
.link-quiet:hover { color: var(--text); text-decoration: underline; }

.flash {
    margin: 1rem 0; padding: .7rem 1rem;
    border-left: 3px solid var(--accent);
    background: var(--bg-elevated); border-radius: var(--radius);
    font-size: var(--step--1);
}
.flash--error { border-left-color: #d1685f; }

.empty {
    padding: 3rem 1rem; text-align: center;
    color: var(--text-muted); background: var(--bg-elevated);
    border: 1px dashed var(--border-strong); border-radius: var(--radius);
}

/* Chips – Schlagwörter                                                      */

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips--inline { display: inline-flex; }

.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .7rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted); text-decoration: none;
    font-size: var(--step--1); line-height: 1.4;
    transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); background: #1c1f22; }

.chip--active {
    background: var(--accent-dim); border-color: var(--accent);
    color: var(--accent-soft); font-weight: 500;
}
.chip--active:hover { background: rgba(143, 188, 109, .22); color: var(--accent-soft); }
.chip__remove { font-size: 1.05em; line-height: 1; opacity: .8; }
.chip__count { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: .9em; }
.chip--reset { border-style: dashed; }

/* Filterbereich                                                             */

.filter { margin-bottom: 1.25rem; display: grid; gap: .75rem; }

.filter__active, .filter__choose {
    display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: baseline;
}
.filter__active {
    padding-bottom: .75rem; border-bottom: 1px solid var(--border);
}
.filter__label {
    margin: 0; flex: 0 0 auto;
    font-size: .72rem; font-weight: 600;
    color: var(--text-faint); letter-spacing: .06em; text-transform: uppercase;
}

/* Die übrigen Schlagwörter liegen hinter einem Aufklapper, damit die
   Bilder nicht unter die Falz rutschen. */
.filter__more { position: relative; display: inline-block; }
.filter__more > summary { cursor: pointer; list-style: none; }
.filter__more > summary::-webkit-details-marker { display: none; }

.chip--more { border-style: dashed; color: var(--text-faint); }
.chip--more::after { content: " ▾"; font-size: .8em; }
.filter__more[open] .chip--more::after { content: " ▴"; }

.chips--panel {
    position: absolute; z-index: 20; top: calc(100% + .4rem); left: 0;
    width: min(44rem, 88vw); max-height: 17rem; overflow-y: auto;
    padding: .75rem; border: 1px solid var(--border-strong);
    border-radius: var(--radius); background: var(--bg-elevated);
    box-shadow: var(--shadow);
}

@media (max-width: 46rem) {
    .chips--panel { position: static; width: auto; max-height: 13rem; }
}

/* Sortierung                                                                */

.sort {
    display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .75rem;
    margin-bottom: 1.25rem; font-size: var(--step--1);
}
.sort__label { color: var(--text-faint); text-transform: uppercase; letter-spacing: .03em; }
.sort__option { color: var(--text-muted); text-decoration: none; padding: .15rem .1rem; }
.sort__option:hover { color: var(--text); }
.sort__option.is-active { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

/* Bildraster – bündige Reihen ohne JavaScript                               */

/* Alle Kacheln einer Reihe sind gleich hoch, die Breite ergibt sich aus dem
   Seitenverhältnis des Bildes – Hochformate bleiben schmal und hoch, nichts
   wird beschnitten. Ohne JavaScript endet die Reihe rechts unregelmäßig;
   site.js gleicht die Reihenhöhen so an, dass sie bündig abschließen. */
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }

.grid__item { flex: 0 0 auto; height: var(--row-h); }

.tile {
    position: relative; display: block; height: 100%; width: auto;
    overflow: hidden; border-radius: var(--radius);
    background: var(--bg-elevated);
}
.tile__img {
    /* Höhe vorgegeben, Breite folgt dem Seitenverhältnis aus width/height. */
    height: 100%; width: auto; max-width: none; object-fit: cover;
    transition: transform .35s cubic-bezier(.2, .7, .3, 1), opacity .2s;
}
.tile:hover .tile__img, .tile:focus-visible .tile__img { transform: scale(1.04); }

.tile__caption {
    position: absolute; inset: auto 0 0 0;
    display: grid; gap: .1rem;
    padding: 1.75rem .7rem .55rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
    opacity: 0; transition: opacity .2s ease;
}
.tile:hover .tile__caption, .tile:focus-visible .tile__caption { opacity: 1; }
.tile__title {
    color: #fff; font-size: var(--step--1); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile__date { color: rgba(255, 255, 255, .65); font-size: .72rem; }

@media (prefers-reduced-motion: reduce) {
    .tile__img, .tile__caption { transition: none; }
    .tile:hover .tile__img { transform: none; }
}

/* Auf Touch-Geräten gibt es kein Hover – Bildunterschrift dauerhaft zeigen */
@media (hover: none) {
    .tile__caption { opacity: 1; }
}

/* Seitennummerierung                                                        */

.pager {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .35rem 1rem; margin-top: 2.5rem;
    font-size: var(--step--1);
}
.pager__list { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
.pager__page, .pager__step {
    display: block; padding: .4rem .7rem;
    color: var(--text-muted); text-decoration: none;
    border-radius: var(--radius); font-variant-numeric: tabular-nums;
}
.pager__page:hover, .pager__step:hover { color: var(--text); background: var(--bg-elevated); }
.pager__page.is-current { color: var(--text); font-weight: 600; background: var(--accent-dim); }
.pager__step.is-disabled, .pager__gap { color: var(--text-faint); padding: .4rem .5rem; }
.pager__step.is-disabled:hover { background: none; color: var(--text-faint); }

/* ------------------------------------------------------------ Startseite */

.hero {
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(80rem 30rem at 70% -20%, rgba(143, 188, 109, .09), transparent 60%),
        var(--bg-sunken);
}
.hero__inner { padding-block: clamp(3rem, 10vw, 6.5rem); }
.hero__title, .hero__lead { max-width: 34rem; }
.hero__title { font-size: var(--step-3); }
.hero__lead {
    margin-top: 1rem; color: var(--text-muted);
    font-size: var(--step-1); font-weight: 300; line-height: 1.5;
}
.hero__actions { margin-top: 1.75rem; margin-bottom: 0; }

/* ---------------------------------------------------------------- Einzelbild */

 /* Dieselbe Spaltenbreite wie Kopf, Fuß und alle anderen Seiten: sonst
    läuft der Bildbereich weiter nach außen als die Navigation darüber. */
.photo { --photo-max: var(--wrap); margin-top: -.75rem; }

/* Kompakte Gruppe in der Mitte statt einer Leiste über die ganze Breite:
   die Bildbreite schwankt zwischen Hochformat und Panorama, eine Leiste am
   Fensterrand steht dann weit neben dem Bild und wirkt beziehungslos. */
.photo__nav {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: .25rem .5rem;
    max-width: var(--photo-max);
    margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem);
    font-size: var(--step--1);
}
.photo__step, .photo__back {
    padding: .45rem .85rem; border-radius: 999px;
    color: var(--text-muted); text-decoration: none; white-space: nowrap;
}
.photo__step:hover, .photo__back:hover { color: var(--text); background: var(--bg-elevated); }
.photo__step.is-disabled { color: var(--text-faint); }
.photo__step.is-disabled:hover { background: none; }

.photo__back {
    display: inline-flex; align-items: baseline; gap: .5rem;
    border: 1px solid var(--border); 
}
.photo__position { color: var(--text-faint); font-variant-numeric: tabular-nums; }

.photo__figure {
    margin: .9rem auto 0; max-width: var(--photo-max);
    padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.photo__figure img {
    margin-inline: auto;
    max-height: 82vh; width: auto; max-width: 100%;
    border-radius: var(--radius); box-shadow: var(--shadow);
}
/* Ohne JavaScript zeigt /bild/{id}/gross die große Fassung in der Seite. */
.photo__figure.is-big img { max-height: none; }

/* Der Link umschließt nur das Bild, nicht die volle Spaltenbreite. Sonst
   liegt der Fokusrahmen – nach dem Schließen der Lightbox mit der Tastatur
   sichtbar – als großes Rechteck um viel Leerraum. */
.photo__zoom {
    position: relative; display: block; text-decoration: none; cursor: zoom-in;
    width: fit-content; max-width: 100%; margin-inline: auto;
    border-radius: var(--radius);
}
.photo__zoom:focus-visible { outline-offset: 4px; }

.photo__zoomctl {
    display: flex; align-items: center; justify-content: center;
    gap: .75rem; margin-top: .85rem;
}
.photo__zoombtn {
    display: inline-flex; align-items: baseline; gap: .55rem;
    padding: .45rem 1rem;
    background: var(--bg-elevated); color: var(--text-muted);
    border: 1px solid var(--border-strong); border-radius: 999px;
    font: inherit; font-size: var(--step--1); cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
.photo__zoombtn:hover { color: var(--text); border-color: var(--accent); background: #1c1f22; }
.photo__zoombtn[aria-pressed="true"] {
    color: var(--accent-soft); border-color: var(--accent); background: var(--accent-dim);
}
.photo__zoomsize { color: var(--text-faint); font-size: .8em; font-variant-numeric: tabular-nums; }
.photo__zoomkey { color: var(--text-faint); font-size: .75rem; letter-spacing: .04em; }

/* Ohne JavaScript ist der Umschalter eine reine Verdopplung des Links –
   der Hinweis auf die Taste ergäbe dort keinen Sinn. Auf Geräten ohne
   Tastatur ebenso wenig. */
html:not(.js) .photo__zoomkey { display: none; }
@media (max-width: 46rem), (hover: none) {
    .photo__zoomkey { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .photo__figure img { transition: none; }
    .photo__figure.is-loading .photo__zoom::after { animation: none; }
}

.photo__caption { max-width: 44rem; margin: 1.75rem auto 0; }
.photo__title { font-size: var(--step-2); }
.photo__desc { margin-top: .75rem; color: var(--text-muted); }
.photo__desc i, .photo__desc em { color: var(--text); font-style: italic; }

.photo__meta {
    display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
    margin: 1.75rem 0 0; padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: var(--step--1);
}
.photo__meta dt {
    color: var(--text-faint); text-transform: uppercase;
    letter-spacing: .04em; font-size: .72rem; margin-bottom: .35rem;
}
.photo__meta dd { margin: 0; color: var(--text-muted); }

/* ---------------------------------------------------------------- Lightbox */

.lb {
    width: 100vw; max-width: 100vw;
    height: 100dvh; max-height: 100dvh;
    margin: 0; padding: 0; border: 0;
    background: rgba(8, 9, 10, .97);
    color: var(--text);
    overflow: hidden;
}
.lb::backdrop { background: rgba(0, 0, 0, .8); }

.lb__stage {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    /* Die Spur muss ausdrücklich auf die Bühne festgelegt werden. Eine
       Zeile mit auto-Höhe wächst mit dem Bild, dann bezieht sich dessen
       max-height: 100% auf das Bild selbst und begrenzt nichts. Bei
       Querformat fällt das nicht auf, weil dort die Breite begrenzt –
       Hochformat lief oben und unten aus der Bühne heraus. */
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    padding: 3.5rem 1rem;
    overflow: hidden;
}
/* Klick aufs Bild schließt – deshalb zoom-out, nicht zoom-in. */
.lb__img {
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    cursor: zoom-out;
    transition: opacity .15s ease;
}
.lb.is-loading .lb__img { opacity: .35; }

/* Der Zoomknopf wird ausgeblendet, wenn das Bild ohnehin ganz auf die
   Bühne passt. Ohne diese Regel gewönne display:inline-flex gegen hidden. */
.lb__btn[hidden] { display: none; }

/* Originalgröße: die Bühne wird scrollbar, das Bild behält seine Pixel. */
.lb.is-zoomed .lb__stage { overflow: auto; place-items: start; padding: 3.5rem 1rem; }
.lb.is-zoomed .lb__img { max-width: none; max-height: none; cursor: zoom-out; margin: auto; }

.lb__spinner { display: none; }
.lb.is-loading .lb__spinner {
    display: block; position: absolute; inset: 0; margin: auto;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .2);
    border-top-color: var(--accent);
    animation: lb-spin .7s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }

.lb__bar {
    position: absolute; left: 0; right: 0; z-index: 2;
    display: flex; align-items: center; gap: .75rem 1.25rem;
    padding: .6rem clamp(.75rem, 2vw, 1.5rem);
    pointer-events: none;
}
.lb__bar > * { pointer-events: auto; }

.lb__bar--top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent);
}
.lb__bar--bottom {
    bottom: 0; justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
}

.lb__title {
    margin: 0; font-size: var(--step-0); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb__pos {
    margin: 0 auto 0 0; color: var(--text-faint);
    font-size: var(--step--1); font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lb__btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .4rem; padding: .4rem .85rem;
    background: rgba(255, 255, 255, .07); color: var(--text);
    border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px;
    font: inherit; font-size: var(--step--1); text-decoration: none;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, opacity .12s ease;
}
.lb__btn:hover { background: rgba(255, 255, 255, .16); color: var(--text); }
.lb__btn[disabled] { opacity: .25; cursor: default; }
.lb__btn[disabled]:hover { background: rgba(255, 255, 255, .07); }
.lb__btn[aria-pressed="true"] {
    background: var(--accent-dim); border-color: var(--accent); color: var(--accent-soft);
}

.lb__btn--close { width: 2.25rem; height: 2.25rem; padding: 0; font-size: 1.4rem; line-height: 1; }

.lb__nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 2.75rem; height: 2.75rem; padding: 0; font-size: 1.25rem;
}
.lb__nav--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lb__nav--next { right: clamp(.5rem, 2vw, 1.5rem); }

.lb__hint { margin: 0; color: var(--text-faint); font-size: .75rem; }
.lb__hint kbd {
    display: inline-block; padding: .05rem .3rem; margin-inline: .1rem;
    border: 1px solid var(--border-strong); border-radius: 3px;
    font-family: inherit; font-size: .95em;
}

@media (max-width: 46rem) {
    .lb__stage { padding: 3rem .5rem; }
    .lb__hint, .lb__detail { display: none; }
    .lb__nav { width: 2.5rem; height: 2.5rem; }
    .lb__title { font-size: var(--step--1); }
}

@media (prefers-reduced-motion: reduce) {
    .lb__img { transition: none; }
    .lb.is-loading .lb__spinner { animation: none; }
}

/* ------------------------------------------------------------- Über mich */

/* Bild mitten im Text: über die volle Breite der Textspalte, mit Abstand
   nach oben und unten, damit es den Absatzfluss nicht zerreißt. */
.beitragsbild { margin: 1.75rem 0 2rem; }
.beitragsbild a { display: block; text-align: center; }
.beitragsbild img {
    display: inline-block; vertical-align: top;
    width: auto; height: auto;
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Ein Hochformat über die volle Textbreite wird höher als das Fenster und
   steht dann wie eine Wand im Text - gemessen 936 px gegen 416 px bei den
   Querformaten. Deshalb ab Tablettbreite die Höhe begrenzen statt der
   Breite; das Bild wird schmaler und bleibt mittig. Auf dem Telefon
   entfällt das: dort ist die Spalte ohnehin schmal. */
@media (min-width: 46rem) {
    .beitragsbild img { max-height: 72vh; }
}
.beitragsbild figcaption {
    display: flex; flex-wrap: wrap; gap: .25rem .75rem;
    align-items: baseline;
    margin-top: .6rem;
    color: var(--text-muted); font-size: var(--step--1);
}
.beitragsbild__datum { color: var(--text-faint); }

/* Platzhalter: absichtlich auffällig, damit kein Entwurfstext unbemerkt
   online geht. Verschwindet, sobald der Absatz ersetzt wird. */
.entwurf {
    position: relative;
    margin: 1.5rem 0; padding: 1rem 1.1rem;
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    background: var(--accent-dim);
    color: var(--text-muted);
    font-size: var(--step--1);
}
.entwurf::before {
    content: "Entwurf";
    position: absolute; top: -.6rem; left: .9rem;
    padding: 0 .4rem;
    background: var(--bg); color: var(--accent);
    font-size: .68rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
}
.entwurf strong { color: var(--text); }

.reiseliste { margin-bottom: 1.5rem; }

.geraete { display: grid; gap: .9rem; margin: 1.25rem 0 1.5rem; }
.geraete > div { display: grid; gap: .15rem; }
.geraete dt {
    color: var(--text-faint); font-size: .72rem;
    letter-spacing: .06em; text-transform: uppercase;
}
.geraete dd { margin: 0; }

.zitat {
    margin: 1.25rem 0 1.5rem; padding: .25rem 0 .25rem 1.25rem;
    border-left: 2px solid var(--border-strong);
    color: var(--text-muted);
}
.zitat p { margin-bottom: .8em; }
.zitat footer { color: var(--text-faint); font-size: var(--step--1); }

/* --------------------------------------------------------------- Linkseite */

.linkgroup { margin-bottom: 2.5rem; }
.linkgroup__title { font-size: var(--step-1); margin-bottom: .9rem; }
.linklist__item {
    padding: .6rem 0; border-bottom: 1px solid var(--border);
    display: grid; gap: .1rem;
}
.linklist__item:last-child { border-bottom: 0; }
.linklist__link { font-weight: 500; text-decoration: none; }
.linklist__link:hover { text-decoration: underline; }
.linklist__desc { color: var(--text-muted); font-size: var(--step--1); }

/* ------------------------------------------------------------ Fehlerseite */

.error-page { padding-block: clamp(3rem, 10vw, 7rem); text-align: center; margin-inline: auto; }
.error-page__code {
    font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 700;
    color: var(--border-strong); line-height: 1; margin: 0;
}
.error-page__title { font-size: var(--step-2); margin: .5rem 0 .75rem; }
.error-page__message { color: var(--text-muted); }
.error-page__actions { margin-top: 2rem; }

/* ------------------------------------------------------------ Schmale Sicht */

/* Auf dem Handy passt ohnehin nur eine Kachel je Reihe. Dann lieber das
   ganze Bild zeigen als es auf Reihenhöhe zu beschneiden – aus 3:2 wurde
   sonst 2,5:1. */
@media (max-width: 34rem) {
    .grid { display: block; }
    .grid__item { height: auto; width: 100%; margin-bottom: var(--gap); }
    .tile { height: auto; width: 100%; }
    /* Volle Breite, Höhe aus width/height des Bildes – kein Beschnitt. */
    .tile__img { width: 100%; height: auto; max-width: 100%; object-fit: fill; }
    .tile__caption { opacity: 1; }
}

@media (max-width: 46rem) {
    :root { --row-h: 9.5rem; --gap: .35rem; }

    .site-header__inner { min-height: 3.75rem; }

    .nav-toggle { display: inline-flex; order: 2; }

    /* Ohne JavaScript bleibt die Navigation sichtbar; mit JavaScript wird sie
       eingeklappt und über die Schaltfläche geöffnet. */
    .js .nav { display: none; }
    .js .nav.is-open { display: block; }
    .nav { order: 3; flex-basis: 100%; }
    .nav__list { flex-direction: column; gap: 0; padding-bottom: .75rem; }
    .nav__link { padding: .6rem .25rem; }
    .nav__link.is-active { box-shadow: inset 2px 0 0 var(--accent); padding-left: .75rem; }

    .photo__nav { font-size: .8rem; }
    .photo__step, .photo__back { padding: .4rem .5rem; }
    .photo__figure img { max-height: 70vh; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 90rem) {
    :root { --row-h: 16rem; }
}

@media print {
    .site-header, .site-footer, .photo__nav, .filter, .sort, .pager { display: none; }
    body { background: #fff; color: #000; }
}
