/* Gemeinsame Bildmitten, ruhige Lesebreiten und feste Bildformate. */
.satz,
.kopfband-text h1,
.kopfband-text > p {
    text-wrap: balance;
}

/* Neben Bildern bleibt Fliesstext linksbuendig; die Bloecke teilen eine Mitte. */
.text-paar--bild {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
}

.text-paar--bild > .abschnitt {
    min-width: 0;
    max-width: 52ch;
    justify-self: center;
}

.text-paar > * {
    min-width: 0;
}

.text-paar--bild > .bild-block {
    width: 100%;
    aspect-ratio: 4 / 5;
}

.text-paar--bild .bild-block img,
.station .bild-block img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.station:has(> .bild-block) {
    align-items: center;
}

.station > .bild-block {
    aspect-ratio: 4 / 3;
}

.station-jahr {
    align-self: start;
}

/* Ueberschriften auf Bildern liegen auf deren horizontaler und vertikaler Mitte. */
.seiten-kopfband {
    align-items: center;
    padding-block: calc(var(--kopfhoehe) + 32px);
}

.seiten-kopfband::after {
    background: linear-gradient(to bottom, rgba(4, 16, 26, .56), rgba(4, 16, 26, .5) 50%, rgba(4, 16, 26, .64));
}

.kopfband-text {
    justify-items: center;
    text-align: center;
    gap: 18px;
}

.kopfband-text > p {
    max-width: 48ch;
}

.galerie figcaption,
.raster-bilder figcaption,
.crew-karte,
.portrait > .portrait-rolle,
.portrait > h2 {
    text-align: center;
}

.portrait > p {
    margin-inline: auto;
}

#anbord .bahn > .taucht:first-child,
#crew .bahn > .taucht:first-child,
#crew .bahn > p:last-child {
    text-align: center;
}

#anbord .bahn > .taucht:first-child .satz,
#crew .bahn > .taucht:first-child .satz {
    margin-inline: auto;
}

@media (min-width: 901px) {
    /* Intrinsische Bildhoehen duerfen die Textspalte nicht aufziehen. */
    #schiff .halbbild img {
        position: absolute;
        inset: 0;
    }

    #schiff .halbtext {
        padding-block: max(calc(var(--kopfhoehe) + 28px), calc(var(--leiste) + 32px));
        gap: clamp(18px, 2.4vh, 26px);
    }
}

@media (max-width: 900px) {
    .text-paar--bild {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .text-paar--bild > .bild-block {
        aspect-ratio: 4 / 3;
        order: -1;
    }

    .text-paar--bild > .abschnitt {
        max-width: 60ch;
        justify-self: stretch;
    }

    .station > .bild-block {
        aspect-ratio: 3 / 2;
    }

    .kopfband-text h1 {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 560px) {
    .blatt .titel {
        font-size: 18px;
        letter-spacing: .16em;
        margin-right: -.16em;
        overflow-wrap: anywhere;
    }
}
