/* =========================================================
   Gestaltungsgrundlagen – hier lässt sich das Design zentral anpassen
   ========================================================= */
:root {
    /* Farben */
    --color-bg: #eef5e9;
    --color-surface: rgb(255 255 255 / 0.7);
    --color-text: #1e3a2b;
    --color-text-muted: #4d6b58;
    --color-primary: #2f5d3e;
    --color-accent: #f2b705;
    --color-border: #c9dcc3;

    /* Schriften */
    --font-body: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;

    /* Abstände */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;

    /* Sonstiges */
    --radius: 0.75rem;
    --content-width: 75rem;
}

/* =========================================================
   Schriften (lokal eingebunden)
   ========================================================= */
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url("../fonts/cormorant-garamond-400-tFYSwxJ.woff2") format("woff2"),
        url("../fonts/cormorant-garamond-400-xxqmCCU.ttf") format("truetype");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src:
        url("../fonts/cormorant-garamond-500-eox61bC.woff2") format("woff2"),
        url("../fonts/cormorant-garamond-500-i7juKcf.ttf") format("truetype");
}

@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src:
        url("../fonts/cormorant-garamond-600-pbga1fT.woff2") format("woff2"),
        url("../fonts/cormorant-garamond-600-MBS9DMX.ttf") format("truetype");
}

@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url("../fonts/lato-400--w5UOHl.woff2") format("woff2"),
        url("../fonts/lato-400-Jw7ngeM.ttf") format("truetype");
}

@font-face {
    font-family: "Lato";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src:
        url("../fonts/lato-400-italic-hUYTyX2.woff2") format("woff2"),
        url("../fonts/lato-400-italic-xgVjaub.ttf") format("truetype");
}

@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src:
        url("../fonts/lato-700-lGj30dz.woff2") format("woff2"),
        url("../fonts/lato-700-6OBvh45.ttf") format("truetype");
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* Weiche, verschwommene Farbflecken im Hintergrund */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 20%, rgb(242 183 5 / 0.22), transparent 40%),
        radial-gradient(circle at 85% 10%, rgb(120 170 110 / 0.35), transparent 45%),
        radial-gradient(circle at 75% 85%, rgb(242 183 5 / 0.15), transparent 40%),
        radial-gradient(circle at 10% 90%, rgb(90 140 90 / 0.3), transparent 45%);
    filter: blur(40px);
}

h1,
h2 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: var(--space-4) 0;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    margin: var(--space-6) 0 var(--space-3);
}

a {
    color: var(--color-primary);
}

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

/* =========================================================
   Kopfbereich – zuerst für kleine Bildschirme
   ========================================================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-3) var(--space-4);
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: var(--color-primary);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
}

.site-menu {
    display: none;
    flex-basis: 100%;
}

.site-menu.is-open {
    display: block;
}

.site-nav {
    display: flex;
    flex-direction: column;
}

.site-nav a {
    padding: var(--space-2) 0;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.site-nav a[aria-current="page"] {
    font-weight: 700;
}

.section-nav {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
}

.section-nav__label {
    display: none;
}

.section-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-2) 0;
    font: inherit;
    color: var(--color-text);
    background: none;
    border: none;
    cursor: pointer;
}

.section-nav__toggle::after {
    content: "▾";
    transition: rotate 0.2s;
}

.section-nav__toggle[aria-expanded="true"]::after {
    rotate: 180deg;
}

.section-nav__list {
    display: none;
    margin: 0;
    padding: 0 0 0 var(--space-3);
    list-style: none;
}

.section-nav__list.is-open {
    display: block;
}

.section-nav__list a {
    display: block;
    padding: var(--space-2) 0;
    text-decoration: none;
}

.site-main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-4) var(--space-6);
}

section[id] {
    scroll-margin-top: 5rem;
}

section[id] > h2 {
    position: relative;
    z-index: 1;
}

/* =========================================================
   Kopfbereich – ab Tablet-Breite
   ========================================================= */
@media (min-width: 48rem) {
    .menu-toggle,
    .section-nav__toggle {
        display: none;
    }

    .site-menu {
        display: contents;
    }

    .site-nav {
        flex-direction: row;
        gap: var(--space-4);
    }

    .site-nav a {
        padding: var(--space-1) 0;
    }

    .site-nav a:hover {
        border-bottom-color: var(--color-border);
    }

    .site-nav a[aria-current="page"] {
        border-bottom-color: var(--color-accent);
    }

    .section-nav {
        display: flex;
        flex-basis: 100%;
        align-items: center;
        gap: var(--space-3);
        margin: 0;
        padding-top: var(--space-2);
    }

    .section-nav__label {
        display: inline;
        font-size: 0.9rem;
        color: var(--color-text-muted);
    }

    .section-nav__list {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
        padding: 0;
    }

    .section-nav__list a {
        padding: var(--space-1) var(--space-3);
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 999px;
    }

    .section-nav__list a:hover {
        border-color: var(--color-primary);
    }

    section[id] {
        scroll-margin-top: 9rem;
    }
}
/* =========================================================
   Nach-oben-Knopf
   ========================================================= */
.to-top {
    position: fixed;
    right: var(--space-4);
    bottom: var(--space-4);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.08);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.to-top:hover {
    border-color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
    .to-top {
        transition: none;
    }
}
/* =========================================================
   Collage (Blocksatz-Layout)
   ========================================================= */
.collage {
    --row-height: 9rem;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (min-width: 48rem) {
    .collage {
        --row-height: 14rem;
    }
}

.collage::after {
    content: "";
    flex-grow: 999;
}

.collage__item {
    display: block;
    flex-grow: calc(var(--ratio) * 100);
    flex-basis: calc(var(--ratio) * var(--row-height));
    aspect-ratio: var(--ratio);
    overflow: hidden;
    background: var(--color-border);
    border-radius: calc(var(--radius) / 2);
}

.collage__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.3s;
}

.collage__item:hover img {
    scale: 1.03;
}

@media (prefers-reduced-motion: reduce) {
    .collage__item img {
        transition: none;
    }
}
/* =========================================================
   Lightbox
   ========================================================= */
.pswp {
    --pswp-bg: #0f2418;
    --pswp-icon-color: #eef5e9;
    --pswp-icon-color-secondary: #1e3a2b;
}

.pswp__button--download {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pswp__button--download .pswp__icn {
    color: var(--pswp-icon-color);
}

.pswp__removal {
    position: absolute;
    bottom: var(--space-3);
    left: 50%;
    translate: -50% 0;
    padding: var(--space-1) var(--space-3);
    font-size: 0.85rem;
    color: var(--pswp-icon-color);
    text-decoration: none;
    background: rgb(0 0 0 / 0.35);
    border-radius: 999px;
    opacity: 0.8;
}

.pswp__removal:hover,
.pswp__removal:focus-visible {
    opacity: 1;
    text-decoration: underline;
}

/* =========================================================
   Verstreute Abzüge (Galerie)
   ========================================================= */
.scatter {
    position: relative;
    isolation: isolate;
    margin: var(--space-6) 0;
}

.scatter__slot {
    position: absolute;
    left: calc(var(--x) + var(--jx, 0%));
    top: calc(var(--y) + var(--jy, 0%));
    z-index: var(--z, 1);
    width: calc(var(--w) * sqrt(var(--ratio)));
    padding: 0.4rem 0.4rem 1.4rem;
    background: #fffdf8;
    border-radius: 2px;
    box-shadow:
        0 1px 3px rgb(0 0 0 / 0.12),
        0 8px 24px rgb(30 58 43 / 0.15);
    transform: translate(-50%, -50%) rotate(calc(var(--r, 0deg) + var(--jr, 0deg)));
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.4s, scale 0.4s;
}

.scatter__slot.is-hidden {
    opacity: 0;
    scale: 0.9;
}

.scatter--mirrored .scatter__slot {
    left: calc(100% - var(--x) - var(--jx, 0%));
    transform: translate(-50%, -50%) rotate(calc((var(--r, 0deg) + var(--jr, 0deg)) * -1));
}

.scatter__slot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--ratio);
    object-fit: cover;
    transition: opacity 0.4s;
}

.scatter__slot img.is-hidden {
    opacity: 0;
}

.scatter .scatter__slot:hover,
.scatter .scatter__slot:focus-visible {
    z-index: 20;
    transform: translate(-50%, -50%) rotate(0deg) scale(1.04);
    box-shadow:
        0 2px 6px rgb(0 0 0 / 0.15),
        0 16px 40px rgb(30 58 43 / 0.25);
}

@media (prefers-reduced-motion: reduce) {
    .scatter__slot {
        transition: none;
    }
}

/* Positionen auf dem Handy: sieben Plätze */
.scatter {
    aspect-ratio: 4 / 5;
}

.scatter__slot:nth-child(1) { --x: 50%; --y: 50%; --w: 57%;   --r: -2deg; --z: 10; }
.scatter__slot:nth-child(2) { --x: 25%; --y: 23%; --w: 39%;   --r: -5deg; --z: 5; }
.scatter__slot:nth-child(3) { --x: 70%; --y: 18%; --w: 42.5%; --r: 4deg;  --z: 5; }
.scatter__slot:nth-child(4) { --x: 30%; --y: 81%; --w: 42.5%; --r: 3deg;  --z: 5; }
.scatter__slot:nth-child(5) { --x: 76%; --y: 77%; --w: 36.5%; --r: -4deg; --z: 5; }
.scatter__slot:nth-child(6) { --x: 16%; --y: 52%; --w: 24.5%; --r: 6deg;  --z: 3; }
.scatter__slot:nth-child(7) { --x: 86%; --y: 50%; --w: 29.5%; --r: -6deg; --z: 3; }
.scatter__slot:nth-child(n + 8) { display: none; }

/* Positionen ab Tablet-Breite: dreizehn Plätze */
@media (min-width: 48rem) {
    .scatter {
        aspect-ratio: 16 / 9;
    }

    .scatter__slot:nth-child(n + 8) { display: block; }

    .scatter__slot:nth-child(1)  { --x: 50%; --y: 50%; --w: 24.5%; --r: -2deg; --z: 10; }
    .scatter__slot:nth-child(2)  { --x: 31%; --y: 40%; --w: 18.5%; --r: -5deg; --z: 6; }
    .scatter__slot:nth-child(3)  { --x: 71%; --y: 33%; --w: 19.5%; --r: 4deg;  --z: 6; }
    .scatter__slot:nth-child(4)  { --x: 30%; --y: 72%; --w: 19.5%; --r: 3deg;  --z: 6; }
    .scatter__slot:nth-child(5)  { --x: 70%; --y: 68%; --w: 17%;   --r: -4deg; --z: 6; }
    .scatter__slot:nth-child(6)  { --x: 12%; --y: 33%; --w: 18%;   --r: 6deg;  --z: 4; }
    .scatter__slot:nth-child(7)  { --x: 88%; --y: 40%; --w: 16%;   --r: -6deg; --z: 4; }
    .scatter__slot:nth-child(8)  { --x: 87%; --y: 72%; --w: 16.5%; --r: 5deg;  --z: 4; }
    .scatter__slot:nth-child(9)  { --x: 11%; --y: 66%; --w: 16%;   --r: -3deg; --z: 4; }
    .scatter__slot:nth-child(10) { --x: 50%; --y: 18%; --w: 16.5%; --r: 2deg;  --z: 3; }
    .scatter__slot:nth-child(11) { --x: 51%; --y: 82%; --w: 16.5%; --r: -2deg; --z: 3; }
    .scatter__slot:nth-child(12) { --x: 22%; --y: 14%; --w: 13%;   --r: -4deg; --z: 5; }
    .scatter__slot:nth-child(13) { --x: 78%; --y: 86%; --w: 13%;   --r: 4deg;  --z: 5; }
}

/* =========================================================
   Mosaik aus Polaroids (Galerie)
   ========================================================= */
section[id] {
    container-type: inline-size;
}

.mosaic {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2);
    isolation: isolate;
    margin: var(--space-4) 0 var(--space-6);
}

@media (min-width: 48rem) {
    .mosaic {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mosaic__band {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    aspect-ratio: 1;
}

.mosaic__tile {
    min-width: 0;
    min-height: 0;
    padding: 0.3rem;
}

.mosaic__tile--landscape-medium { grid-column: span 3; grid-row: span 2; }
.mosaic__tile--landscape-large  { grid-column: span 6; grid-row: span 4; }
.mosaic__tile--portrait-medium  { grid-column: span 2; grid-row: span 3; }
.mosaic__tile--portrait-large   { grid-column: span 4; grid-row: span 6; }

/* Auf dem Handy nur die ersten acht Fotos */
.mosaic__tile:nth-child(n + 9) {
    display: none;
}

@media (min-width: 48rem) {
    .mosaic__tile:nth-child(n + 9) {
        display: block;
    }
}

.polaroid {
    position: relative;
    z-index: var(--z, 1);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0.4rem 0.4rem 1.4rem;
    background: #fffdf8;
    border-radius: 2px;
    box-shadow:
        0 1px 3px rgb(0 0 0 / 0.12),
        0 8px 24px rgb(30 58 43 / 0.15);
    transform: translate(var(--jx, 0%), var(--jy, 0%)) rotate(var(--jr, 0deg));
    scale: 1.06;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.4s, scale 0.4s;
}

.polaroid img {
    display: block;
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: cover;
}

.mosaic .polaroid:hover,
.mosaic .polaroid:focus-visible {
    z-index: 20;
    transform: rotate(0deg);
    scale: 1.12;
    box-shadow:
        0 2px 6px rgb(0 0 0 / 0.15),
        0 16px 40px rgb(30 58 43 / 0.25);
}

.polaroid.is-hidden {
    opacity: 0;
    scale: 0.9;
}

@media (prefers-reduced-motion: reduce) {
    .polaroid {
        transition: none;
    }
}

/* =========================================================
   Download-Seite
   ========================================================= */
.lead {
    max-width: 40rem;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
    margin: var(--space-6) 0 var(--space-3);
}

.section-heading h2 {
    margin: 0;
}

.section-heading__meta {
    margin: 0;
    color: var(--color-text-muted);
}

.justified {
    --row-height: 8rem;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

@media (min-width: 48rem) {
    .justified {
        --row-height: 12rem;
    }
}

.justified::after {
    content: "";
    flex-grow: 999;
}

.justified__item {
    position: relative;
    flex-grow: calc(var(--ratio) * 100);
    flex-basis: calc(var(--ratio) * var(--row-height));
    aspect-ratio: var(--ratio);
    margin: 0;
    overflow: hidden;
    background: var(--color-border);
    border-radius: calc(var(--radius) / 2);
}

.justified__item > a:first-child {
    display: block;
    height: 100%;
}

.justified__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-button {
    position: absolute;
    right: var(--space-2);
    bottom: var(--space-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
    transition: opacity 0.2s;
}

.download-button:hover {
    background: var(--color-bg);
}

.button {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font: inherit;
    font-weight: 700;
    color: var(--color-bg);
    text-decoration: none;
    background: var(--color-primary);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.button:hover {
    background: var(--color-text);
}

.button__meta {
    font-weight: 400;
    opacity: 0.8;
}

.button--danger {
    background: #8a2a1f;
}

.button--danger:hover {
    background: #6e2018;
}

@media (hover: hover) {
    .download-button {
        opacity: 0;
    }

    .justified__item:hover .download-button,
    .justified__item:focus-within .download-button {
        opacity: 1;
    }
}

.select-box {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
    cursor: pointer;
}

.select-box input {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.justified__item:has(.select-box input:checked) {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

@media (hover: hover) {
    .select-box {
        opacity: 0;
        transition: opacity 0.2s;
    }

    .justified__item:hover .select-box,
    .justified__item:focus-within .select-box,
    .selection-form:has(input[name="photos[]"]:checked) .select-box {
        opacity: 1;
    }
}

.link-button {
    padding: 0;
    font: inherit;
    color: var(--color-primary);
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

/* =========================================================
   Login-Seite
   ========================================================= */
.page-login::before {
    inset: -2rem;
    background: url("../images/login-background-j9yx7f-.webp") center / cover;
    filter: blur(2px) brightness(0.85) saturate(1.1);
}

.page-login .site-main {
    padding: 0;
}

.login {
    display: grid;
    place-items: center;
    height: 100%;
    padding: var(--space-4);
}

.page-login .site-main {
    display: grid;
}

.login__card {
    width: 100%;
    max-width: 24rem;
    padding: var(--space-5) var(--space-5) var(--space-6);
    background: #fffdf8;
    border-radius: 2px;
    box-shadow:
        0 2px 6px rgb(0 0 0 / 0.15),
        0 24px 60px rgb(15 36 24 / 0.35);
    rotate: -1deg;
}

.login__eyebrow {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.login__title {
    margin: var(--space-1) 0 var(--space-3);
}

.login__text {
    margin: 0 0 var(--space-4);
    color: var(--color-text-muted);
}

/* =========================================================
   Formulare
   ========================================================= */
.form {
    display: grid;
    gap: var(--space-3);
}

.form__field {
    display: grid;
    gap: var(--space-1);
}

.form__field label {
    font-weight: 700;
}

.form__field input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font: inherit;
    color: var(--color-text);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius) / 2);
}

.form__field input:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 1px;
    border-color: var(--color-primary);
}

.form-error {
    margin: 0 0 var(--space-3);
    padding: var(--space-2) var(--space-3);
    color: #8a2a1f;
    background: #fbeae6;
    border-left: 3px solid #8a2a1f;
    border-radius: 2px;
}
/* =========================================================
   Fußzeile und Textseiten
   ========================================================= */
body {
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    width: 100%;
}

.site-footer {
    padding: var(--space-4);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer nav {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

.site-footer a {
    color: var(--color-text-muted);
}

.page-login .site-footer a {
    color: #fffdf8;
}

.prose {
    max-width: 45rem;
    margin: var(--space-4) auto var(--space-6);
}

.prose h2 {
    margin: var(--space-5) 0 var(--space-2);
    font-size: 1.5rem;
}

.prose h3 {
    margin: var(--space-4) 0 var(--space-1);
    font-family: var(--font-body);
    font-size: 1.1rem;
}
/* =========================================================
   Upload
   ========================================================= */
.uploader {
    display: grid;
    gap: var(--space-4);
    max-width: 40rem;
}

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-6) var(--space-4);
    text-align: center;
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-active {
    background: #fff;
    border-color: var(--color-primary);
}

.dropzone__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.dropzone__hint {
    color: var(--color-text-muted);
}

@media (hover: none) {
    .dropzone__hint {
        display: none;
    }
}

.uploader__summary {
    margin: 0;
    color: var(--color-text-muted);
}

.upload-list {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.upload-item {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    grid-template-areas:
        "thumb name"
        "thumb progress"
        "thumb status";
    column-gap: var(--space-3);
    align-items: center;
    padding: var(--space-2);
    background: var(--color-surface);
    border-radius: calc(var(--radius) / 2);
}

.upload-item__thumb {
    grid-area: thumb;
    width: 3.5rem;
    height: 3.5rem;
    overflow: hidden;
    background: var(--color-border);
    border-radius: 4px;
}

.upload-item__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-item__name {
    grid-area: name;
    min-width: 0;
    overflow: hidden;
    font-size: 0.9rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.upload-item progress {
    grid-area: progress;
    width: 100%;
    accent-color: var(--color-primary);
}

.upload-item__status {
    grid-area: status;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.upload-item[data-state="done"] .upload-item__status {
    color: var(--color-primary);
}

.upload-item[data-state="failed"] .upload-item__status {
    color: #8a2a1f;
}
/* =========================================================
   Nachsortieren
   ========================================================= */
.flash {
    padding: var(--space-2) var(--space-3);
    border-left: 3px solid var(--color-primary);
    background: var(--color-surface);
    border-radius: 2px;
}

.flash--error {
    color: #8a2a1f;
    background: #fbeae6;
    border-left-color: #8a2a1f;
}

.sorter__group h2 {
    margin-top: var(--space-5);
}

.sorter__count {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-muted);
}

.sorter__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sorter__photo {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: calc(var(--radius) / 2);
    cursor: pointer;
    outline: 3px solid transparent;
    outline-offset: 2px;
    transition: outline-color 0.15s;
}

.sorter__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.15s;
}

.sorter__photo:has(input:checked) {
    outline-color: var(--color-primary);
}

.sorter__photo:has(input:checked) img {
    scale: 0.9;
}

.sorter__photo:has(input:checked)::after {
    content: "✓";
    position: absolute;
    top: var(--space-1);
    right: var(--space-1);
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    font-weight: 700;
    color: var(--color-bg);
    background: var(--color-primary);
    border-radius: 50%;
}

.sorter__photo:has(input:focus-visible) {
    outline-color: var(--color-accent);
}

.sorter__toolbar, .selection-bar {
    position: sticky;
    bottom: var(--space-3);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin-top: var(--space-5);
    padding: var(--space-3);
    background: color-mix(in srgb, var(--color-bg) 90%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgb(0 0 0 / 0.08);
}

.sorter__toolbar select {
    flex: 1;
    min-width: 10rem;
    padding: var(--space-2);
    font: inherit;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius) / 2);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.sorter__group {
    padding: var(--space-2) var(--space-3) var(--space-3);
    margin: 0 calc(-1 * var(--space-3));
    border: 2px dashed transparent;
    border-radius: var(--radius);
    transition: border-color 0.15s, background 0.15s;
}

.sorter__group.is-drop-target {
    background: var(--color-surface);
    border-color: var(--color-primary);
}

.sorter__empty {
    display: none;
    margin: 0;
    padding: var(--space-4);
    text-align: center;
    color: var(--color-text-muted);
    border: 2px dashed var(--color-border);
    border-radius: calc(var(--radius) / 2);
}

.sorter__group--empty .sorter__empty {
    display: block;
}

@media (hover: none) {
    .sorter__group--empty {
        display: none;
    }
}

.sorter__grid > li.is-dragging {
    opacity: 0.4;
}

@media (hover: hover) {
    .sorter__grid > li {
        cursor: grab;
    }
}
