/* ============================================================
   Fotogalerie – "Museum Dark", cinematisch
   Das Bild ist der Held; alles andere tritt zurück.
   ============================================================ */

:root {
    --bg:          #0b0c0e;
    --bg-soft:     #101114;
    --bg-elevated: #141518;
    --bg-hover:    #1b1d21;
    --border:      #26282d;
    --border-soft: #1d1f23;
    --text:        #f0efed;
    --text-dim:    #b6b9bf;
    --text-muted:  #85888f;
    --accent:      #d3b47c;
    --accent-hover:#e6cb97;
    --danger:      #e0655f;

    --radius:   12px;
    --radius-sm: 8px;
    --shadow-lift: 0 18px 50px rgba(0, 0, 0, 0.55);
    --shadow-deep: 0 30px 90px rgba(0, 0, 0, 0.7);

    /* Ruhige, "teure" Beschleunigungskurven */
    --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --dur:       0.55s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 28px; }
main.wrap { flex: 1; padding-top: 48px; padding-bottom: 88px; }

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

.badge {
    display: inline-block;
    padding: 2px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    vertical-align: middle;
}
.badge-sm { font-size: 0.62rem; padding: 1px 7px; }

/* ============================================================
   Einblenden beim Scrollen
   ============================================================ */

.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
    will-change: opacity, transform;
}
.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal-now {
    animation: riseIn 0.9s var(--ease-out) both;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   Kopf- & Fusszeile
   ============================================================ */

.site-header {
    border-bottom: 1px solid var(--border-soft);
    background: rgba(11, 12, 14, 0.72);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 68px;
}

.brand {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
}
.brand:hover { color: var(--accent); }

.nav { display: flex; gap: 24px; }

.nav a {
    position: relative;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 0;
    transition: color 0.3s var(--ease);
}
.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--text); }

.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 26px 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-align: center;
}

/* ============================================================
   Seitenkopf & Hero
   ============================================================ */

.page-head { margin-bottom: 44px; }

.page-title {
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    font-weight: 200;
    letter-spacing: 0.01em;
    line-height: 1.12;
    animation: riseIn 0.9s var(--ease-out) both;
}

.hero { padding: 26px 0 8px; }

.hero-title {
    font-size: clamp(2.1rem, 6.5vw, 4rem);
    letter-spacing: 0.02em;
}

.hero-intro {
    max-width: 58ch;
    margin-top: 16px;
    color: var(--text-dim);
    font-size: clamp(1rem, 2vw, 1.12rem);
    font-weight: 300;
    animation: riseIn 0.9s 0.08s var(--ease-out) both;
}

.hero .muted { margin-top: 18px; animation: fadeIn 1.1s 0.25s both; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
    transition: color 0.3s var(--ease);
}
.back-link .arrow { transition: transform 0.35s var(--ease-out); display: inline-block; }
.back-link:hover { color: var(--accent); }
.back-link:hover .arrow { transform: translateX(-4px); }

.page-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 16px;
    animation: fadeIn 1s 0.2s both;
}

.empty {
    color: var(--text-muted);
    padding: 90px 0;
    text-align: center;
    font-size: 1.05rem;
}

/* ============================================================
   Album-Übersicht
   ============================================================ */

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.album-card {
    display: block;
    color: var(--text);
    transition: transform 0.6s var(--ease-out);
}
.album-card:hover { color: var(--text); transform: translateY(-6px); }

.album-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.6s var(--ease-out);
}
.album-card:hover .album-cover { box-shadow: var(--shadow-deep); }

/* Die Fotos werden bewusst NICHT abgedunkelt oder entsättigt –
   dunkle Aufnahmen sollen dunkel bleiben dürfen. */
.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 1.3s var(--ease-out);
}
.album-card:hover .album-cover img { transform: scale(1.09); }

/* Deutliche Innenkante, damit auch sehr dunkle Nachtaufnahmen
   als Kachel erkennbar bleiben und nicht mit dem Grund verschmelzen. */
.album-veil {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    transition: box-shadow 0.6s var(--ease);
    pointer-events: none;
}
.album-card:hover .album-veil { box-shadow: inset 0 0 0 1px rgba(211, 180, 124, 0.5); }

.album-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.album-info {
    padding: 16px 2px 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.album-name {
    font-size: 1.02rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.35s var(--ease);
}
.album-card:hover .album-name { color: var(--accent); }

.album-count {
    color: var(--text-muted);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* ============================================================
   Foto-Raster (Masonry über CSS-Spalten)
   ============================================================ */

.photo-grid {
    columns: 3 330px;
    column-gap: 22px;
}

.photo-item {
    position: relative;
    display: block;
    margin-bottom: 22px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    break-inside: avoid;
    background: var(--bg-elevated);
    aspect-ratio: var(--ar, 4 / 3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

/* Feine Kante über dem Bild, damit sich auch sehr dunkle Fotos
   vom schwarzen Hintergrund abheben. */
.photo-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    transition: box-shadow 0.5s var(--ease);
    pointer-events: none;
}
a.photo-item:hover::after { box-shadow: inset 0 0 0 1px rgba(211, 180, 124, 0.5); }

/* Fotos werden bewusst nicht abgedunkelt – Originalwirkung bleibt erhalten. */
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
}

a.photo-item:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-3px);
}
a.photo-item:hover img { transform: scale(1.055); }

/* Schimmer, der beim Überfahren durchs Bild wandert */
.photo-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.08) 50%, transparent 62%);
    transform: translateX(-110%);
    transition: transform 0.9s var(--ease-out);
    pointer-events: none;
}
a.photo-item:hover .photo-shine { transform: translateX(110%); }

/* ============================================================
   Lightbox & Diashow
   ============================================================ */

/* Hintergrund festhalten, solange die Lightbox offen ist
   (verhindert das Mitscrollen der Seite, besonders auf iOS) */
body.lb-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
}

.lightbox[hidden] { display: none; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #07080a;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s var(--ease) both;
}

.lb-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lb-stage img {
    position: absolute;
    max-width: calc(100vw - 96px);
    max-height: calc(100vh - 112px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.6s var(--ease);
}
.lb-stage img.is-active { opacity: 1; }

/* Ken-Burns: langsames Heranfahren, nur während der Diashow */
.lightbox.is-playing .lb-stage img.is-active {
    animation: kenBurns var(--slide-dur, 5s) linear both;
}
@keyframes kenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.055); }
}

/* Bedienelemente */
.lb-chrome {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s var(--ease);
}
.lb-chrome > * { pointer-events: auto; }
.lightbox.chrome-hidden .lb-chrome { opacity: 0; pointer-events: none; }

.lb-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(to bottom, rgba(4, 5, 6, 0.75), transparent);
}

.lb-counter {
    color: var(--text-dim);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    font-variant-numeric: tabular-nums;
}

.lb-actions { display: flex; gap: 10px; }

.lb-btn, .lb-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: var(--text);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(8px);
}
.lb-btn:hover, .lb-nav:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}
.lb-btn:active, .lb-nav:active { transform: scale(0.94); }

.lb-btn { width: 42px; height: 42px; }
.lb-btn.is-on { background: var(--accent); border-color: var(--accent); color: #14100a; }

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 1.8rem;
    line-height: 0;
    padding-bottom: 4px;
}
.lb-nav:active { transform: translateY(-50%) scale(0.94); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }

.lb-bottombar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 24px 22px;
    background: linear-gradient(to top, rgba(4, 5, 6, 0.8), transparent);
}

.lb-dots {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: min(560px, 80vw);
}

.lb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.26);
    cursor: pointer;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease-out);
}
.lb-dot:hover { background: rgba(255, 255, 255, 0.55); transform: scale(1.35); }
.lb-dot.is-active { background: var(--accent); transform: scale(1.45); }

.lb-hint {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-align: center;
}
.lb-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 1px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    font-family: inherit;
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Fortschrittsbalken der Diashow */
.lb-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 5;
}
.lb-progress[hidden] { display: none; }
.lb-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(211, 180, 124, 0.7);
}
.lb-progress.is-running span {
    animation: slideProgress var(--slide-dur, 5s) linear both;
}
@keyframes slideProgress {
    from { width: 0; }
    to   { width: 100%; }
}

/* Zoom-Ansicht */
.lb-stage.is-zoomed { cursor: zoom-out; overflow: auto; }
.lb-stage.is-zoomed img.is-active {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    transform: scale(var(--zoom, 2));
    transition: transform 0.5s var(--ease-out);
}
.lb-stage:not(.is-zoomed) { cursor: zoom-in; }

/* Symbole */
.ico-play, .ico-pause, .ico-full, .ico-close {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: currentColor;
}
.ico-play {
    clip-path: polygon(16% 6%, 16% 94%, 94% 50%);
}
.ico-pause {
    clip-path: polygon(14% 8%, 40% 8%, 40% 92%, 14% 92%, 14% 8%, 60% 8%, 86% 8%, 86% 92%, 60% 92%, 60% 8%);
}
.ico-full {
    clip-path: polygon(0 0, 40% 0, 40% 12%, 12% 12%, 12% 40%, 0 40%,
                       100% 0, 100% 40%, 88% 40%, 88% 12%, 60% 12%, 60% 0,
                       100% 100%, 60% 100%, 60% 88%, 88% 88%, 88% 60%, 100% 60%,
                       0 100%, 0 60%, 12% 60%, 12% 88%, 40% 88%, 40% 100%);
}
.ico-close {
    clip-path: polygon(9% 0, 50% 38%, 91% 0, 100% 9%, 62% 50%, 100% 91%,
                       91% 100%, 50% 62%, 9% 100%, 0 91%, 38% 50%, 0 9%);
}
.btn .ico-play { width: 11px; height: 11px; margin-right: 2px; }

/* ============================================================
   Anmeldung & Einrichtung
   ============================================================ */

.centered-page {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Stimmungsvoller Lichtschein hinter der Anmeldekarte */
.login-page { position: relative; overflow: hidden; }
.login-aura {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(140vw, 1100px);
    height: min(140vw, 1100px);
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        rgba(211, 180, 124, 0.10) 0%,
        rgba(211, 180, 124, 0.04) 32%,
        transparent 66%);
    pointer-events: none;
    animation: auraPulse 9s ease-in-out infinite;
}
@keyframes auraPulse {
    0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.07); }
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 410px;
    background: linear-gradient(180deg, rgba(24, 25, 29, 0.95), rgba(17, 18, 21, 0.95));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 46px 38px;
    box-shadow: var(--shadow-deep);
    margin: auto;
    backdrop-filter: blur(10px);
}

.setup-card { max-width: 470px; }

.auth-title {
    font-size: 1.35rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.4;
}

.auth-sub {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    margin-bottom: 30px;
}

.auth-alt { margin-top: 22px; text-align: center; font-size: 0.85rem; }

.checks { list-style: none; margin-bottom: 22px; font-size: 0.9rem; }
.checks li { padding: 4px 0; }
.checks li.ok { color: #86c78a; }
.checks li.fail { color: var(--danger); }

.hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 22px;
}
.hint code { color: var(--accent); }

.shake { animation: shake 0.45s var(--ease) both; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-7px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(3px); }
}

/* ============================================================
   Formulare & Schaltflächen
   ============================================================ */

label {
    display: block;
    margin-bottom: 18px;
    font-size: 0.84rem;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

input[type="text"], input[type="password"], input[type="number"], textarea, select {
    width: 100%;
    margin-top: 7px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus,
textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(211, 180, 124, 0.14);
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
                color 0.3s var(--ease), transform 0.25s var(--ease-out);
    white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #17130a;
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #17130a;
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost { background: transparent; }

.btn-danger {
    border-color: rgba(224, 101, 95, 0.45);
    color: var(--danger);
    background: transparent;
}
.btn-danger:hover { background: rgba(224, 101, 95, 0.13); border-color: var(--danger); color: var(--danger); }

.btn-block { width: 100%; margin-top: 10px; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

.error, .notice {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 22px;
    animation: riseIn 0.5s var(--ease-out) both;
}
.error  { background: rgba(224, 101, 95, 0.12); border: 1px solid rgba(224, 101, 95, 0.4); color: #f0918c; }
.notice { background: rgba(134, 199, 138, 0.1); border: 1px solid rgba(134, 199, 138, 0.35); color: #a3d6a6; }

/* ============================================================
   Verwaltung
   ============================================================ */

.admin-section {
    margin-bottom: 44px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border-soft);
}
.admin-section:last-child { border-bottom: none; }

.section-title {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.create-album-form, .inline-form {
    display: flex;
    gap: 12px;
    max-width: 560px;
    align-items: flex-start;
}
.create-album-form input, .inline-form input { margin-top: 0; }
.create-album-form input, .inline-form input[type="text"] { flex: 1; }

.settings-form { max-width: 470px; }
.settings-grid { display: grid; gap: 0; }

.dropzone {
    position: relative;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 46px 24px;
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.012);
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease-out);
}
.dropzone.dragover {
    border-color: var(--accent);
    background: rgba(211, 180, 124, 0.06);
    transform: scale(1.008);
}

.dz-title { font-size: 1.12rem; font-weight: 400; letter-spacing: 0.01em; }
.dz-sub { color: var(--text-muted); margin: 8px 0 16px; font-size: 0.84rem; }
.dz-hint { color: var(--text-muted); font-size: 0.78rem; margin-top: 16px; }

.upload-status {
    margin: 22px auto 0;
    text-align: left;
    max-width: 500px;
    font-size: 0.85rem;
}
.upload-status .u-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    animation: riseIn 0.4s var(--ease-out) both;
}
.upload-status .u-row.ok   { color: #a3d6a6; }
.upload-status .u-row.err  { color: #f0918c; }
.upload-status .u-row.busy { color: var(--text-muted); }
.upload-status .u-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sortierbares Foto-Raster im Admin */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    columns: auto;
}

.admin-item {
    position: relative;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: grab;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), opacity 0.25s var(--ease);
}
.admin-item img { width: 100%; height: 100%; object-fit: cover; }
.admin-item:hover { box-shadow: var(--shadow-lift); }
.admin-item.is-dragging { opacity: 0.35; cursor: grabbing; transform: scale(0.96); }
.admin-item.drop-target { box-shadow: 0 0 0 2px var(--accent); }

.item-tools {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 9px;
    background: linear-gradient(to bottom, rgba(4, 5, 6, 0.6), transparent 45%, rgba(4, 5, 6, 0.6));
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.admin-item:hover .item-tools { opacity: 1; }

.item-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 9, 11, 0.78);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s var(--ease), transform 0.25s var(--ease-out);
    padding: 0;
}
.item-btn:hover { transform: scale(1.12); }
.item-btn.del:hover { background: var(--danger); border-color: var(--danger); }
.item-btn.cover:hover { background: var(--accent); border-color: var(--accent); color: #17130a; }
.item-btn.is-cover { background: var(--accent); border-color: var(--accent); color: #17130a; opacity: 1; }

.admin-item.is-cover .item-tools { opacity: 1; background: none; }
.admin-item.is-cover .item-btn.del { opacity: 0; }
.admin-item.is-cover:hover .item-tools { background: linear-gradient(to bottom, rgba(4, 5, 6, 0.6), transparent 45%, rgba(4, 5, 6, 0.6)); }
.admin-item.is-cover:hover .item-btn.del { opacity: 1; }

.order-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 16px;
}
.order-saved {
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.order-saved.show { opacity: 1; }

.admin-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    cursor: pointer;
}
.toggle-row input { width: auto; margin: 0; accent-color: var(--accent); width: 17px; height: 17px; }

/* ============================================================
   Mobil
   ============================================================ */

@media (max-width: 720px) {
    .wrap { padding: 0 17px; }
    main.wrap { padding-top: 28px; padding-bottom: 56px; }

    .header-inner {
        height: auto;
        flex-wrap: wrap;
        gap: 6px 16px;
        padding-top: 13px;
        padding-bottom: 13px;
    }
    .brand { font-size: 0.9rem; letter-spacing: 0.14em; }
    .nav { gap: 16px; }
    .nav a { font-size: 0.73rem; letter-spacing: 0.06em; }

    .page-head { margin-bottom: 28px; }
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
    .album-info { padding-top: 11px; }
    .album-name { font-size: 0.9rem; }

    .photo-grid { columns: 2 140px; column-gap: 11px; }
    .photo-item { margin-bottom: 11px; }

    .lb-stage img { max-width: 100vw; max-height: calc(100vh - 132px); border-radius: 0; }
    .lb-nav { width: 44px; height: 44px; font-size: 1.5rem; }
    .lb-prev { left: 10px; }
    .lb-next { right: 10px; }
    .lb-topbar { padding: 15px 16px; }
    .lb-bottombar { padding: 20px 16px 16px; }
    .lb-hint { display: none; }

    .auth-card { padding: 34px 24px; }
    .create-album-form, .inline-form { flex-direction: column; }
    .create-album-form .btn, .inline-form .btn { width: 100%; }
    .admin-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .item-tools { opacity: 1; }
}

/* Auf Touch-Geräten Bedienelemente dauerhaft zeigen */
@media (hover: none) {
    .item-tools { opacity: 1; }
    .album-veil { opacity: 0.8; }
}

/* ============================================================
   Rücksicht auf "Bewegung reduzieren"
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
    .lightbox.is-playing .lb-stage img.is-active { animation: none; }
    .photo-shine { display: none; }
}
