/* MagTag – Gold/Champagner-Theme nach Urlaubsmagnet-Original */

/* Selbst gehostete Schriften statt @import von Google.
 *
 * Vorher lud jede Seite Inter und Playfair Display von
 * fonts.googleapis.com und fonts.gstatic.com nach. Damit ging bei jedem
 * Aufruf die IP-Adresse des Besuchers an Google -- ohne Einwilligung und
 * ohne dass es irgendwo stand (eine Datenschutzerklaerung gab es auch
 * nicht). Beide Schriften stehen unter der SIL Open Font License,
 * Selbsthosten ist also erlaubt.
 *
 * Es sind variable Schriften: EINE Datei deckt alle Gewichte ab, deshalb
 * ein Bereich statt einer Regel je Schnitt. Fuer eine deutsche Seite
 * laedt der Browser nur die beiden Latein-Dateien, zusammen rund 86 KB.
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latein.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latein-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/playfair-display-latein.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/playfair-display-latein-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}


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

[hidden] { display: none !important; }

:root {
    /* Marken-Orange (MagTag / Verpackung) */
    --gold:        #EF6C33;
    --gold-bright: #F68B5C;
    --gold-dark:   #C8531F;
    --gold-glow:   rgba(239, 108, 51, 0.25);

    /* Dark Theme (default) */
    --bg:         #0A0A0F;
    --bg-2:       #12121A;
    --surface:    #1A1A24;
    --surface-2:  #232330;
    --border:     #2A2A38;
    --text:       #F3F0E8;
    --text-muted: #9A9685;
    --text-dim:   #6B6857;

    --teal:       #1F4441;
    --teal-light: #2D6359;
    --hero-bg:    linear-gradient(135deg, #1F4441 0%, #0F2826 100%);

    --success:    #2ECC71;
    --error:      #E74C3C;
    --warning:    #F1C40F;

    --radius:     12px;
    --radius-lg:  16px;
    --shadow:     0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 4px 20px var(--gold-glow);

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
    --bg:         #FAF8F2;
    --bg-2:       #F2EFE5;
    --surface:    #FFFFFF;
    --surface-2:  #F7F4EC;
    --border:     #E0DACF;
    --text:       #1F1B12;
    --text-muted: #5F5849;
    --text-dim:   #8A8472;

    --hero-bg:    linear-gradient(135deg, #2D6359 0%, #1F4441 100%);
    --shadow:     0 8px 24px rgba(0, 0, 0, 0.08);
}

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.25s ease, color 0.25s ease;
}
body.magnet-body { background: var(--bg); }
body.lightbox-open { overflow: hidden; }

a { color: var(--gold); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--gold-bright); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    margin: 0 0 0.6em;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
small { color: var(--text-muted); }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── Theme Toggle (Bulb-Icon top-right) ──────────── */

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--gold);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}
.theme-toggle:hover { background: var(--surface-2); transform: scale(1.05); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ── Buttons ───────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #1F1B12;
    box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
    color: #1F1B12;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--gold-glow);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold-glow); color: var(--gold-bright); text-decoration: none; }

.btn-card {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-card:hover { background: var(--surface); border-color: var(--gold); text-decoration: none; }

.btn-text {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.85rem 1.2rem;
}
.btn-text:hover { color: var(--gold); text-decoration: none; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

/* ── Forms ─────────────────────────────────────── */

.field { margin-bottom: 1.2rem; }
.field label, .field > span:first-child {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
    font-size: 0.95rem;
}
.field .required { color: var(--gold); margin-left: 2px; }

.input, .textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.input:focus, .textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--bg);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.textarea { resize: vertical; min-height: 80px; }

.field-hint { display: block; margin-top: 0.4rem; color: var(--text-muted); font-size: 0.85rem; }

/* ── Magnet-Page Layout ───────────────────────── */

.m-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
    width: 100%;
}

/* Aktivierungs-Card */

.m-activate-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2rem;
    margin-top: 3rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.m-sun-icon {
    color: var(--gold);
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 0 12px var(--gold-glow));
}
.m-sun-icon svg { width: 56px; height: 56px; }

.m-activate-card h1 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.m-activate-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.m-form { text-align: left; }
.m-form .btn { width: 100%; padding: 1rem 1.4rem; }

.m-privacy-hint {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--gold);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.m-privacy-hint svg { width: 16px; height: 16px; }

/* PIN-Login Card */

.m-pin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin-top: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.m-lock-icon { color: var(--gold); margin-bottom: 1rem; }
.m-lock-icon svg { width: 32px; height: 32px; }
.m-pin-card h2 { color: var(--gold); }

.m-login-hero {
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--hero-bg);
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}
.m-login-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
}
.m-login-hero h1 {
    color: white;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.m-footer-info {
    text-align: center;
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}
.m-footer-info svg { width: 16px; height: 16px; color: var(--gold); }

/* Messages */

.m-message {
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}
.m-message svg { flex-shrink: 0; width: 20px; height: 20px; }
.m-message.success {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #6FE0A3;
}
.m-message.error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #FF8B7E;
}

/* ── Galerie ──────────────────────────────────── */

.m-gallery { max-width: 880px; margin: 0 auto; padding: 1rem; }

/* Hero-Header mit Teal-Gradient + Sun-Pattern */

.m-hero {
    position: relative;
    background: var(--hero-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 2.5rem 2rem 2rem;
    margin-bottom: 1.5rem;
    background-size: cover;
    background-position: center;
}
.m-hero.has-image::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
}
.m-hero-content { position: relative; z-index: 2; }

/* Sun decoration (only when no header image) */
.m-hero-sun {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    width: 200px;
    height: 200px;
    color: var(--gold);
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
}
.m-hero.has-image .m-hero-sun { display: none; }

.m-hero h1 {
    color: white;
    margin: 0 0 1rem;
    font-size: 2.6rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.m-hero-name-input {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1.5px solid var(--gold);
    border-radius: var(--radius);
    color: white;
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 600;
    padding: 0.4em 0.6em;
    margin: 0 0 1rem;
    line-height: 1.2;
}
.m-hero-name-input:focus { outline: none; border-color: var(--gold-bright); }

.m-hero-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.m-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}
.m-pill svg { width: 14px; height: 14px; color: var(--gold); }

.m-hero-titelbild {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
}
.m-hero-titelbild label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid var(--gold);
    border-radius: var(--radius);
    color: var(--gold);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.m-hero-titelbild label:hover { background: var(--gold-glow); }
.m-hero-titelbild input { display: none; }
.m-hero-titelbild svg { width: 16px; height: 16px; }

/* Welcome-Card (3-step onboarding) */

.m-welcome {
    background: linear-gradient(180deg, rgba(239, 108, 51, 0.05) 0%, var(--surface) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}
.m-welcome .m-sun-icon { margin-bottom: 1rem; }
.m-welcome h2 { color: var(--gold); margin-bottom: 0.5rem; }
.m-welcome p { color: var(--text-muted); max-width: 380px; margin-left: auto; margin-right: auto; }
.m-welcome-steps { display: flex; flex-direction: column; gap: 0.6rem; max-width: 380px; margin: 1.5rem auto 0; }
.m-welcome-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.2rem;
    text-align: left;
}
.m-welcome-step-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: #1F1B12;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}
.m-welcome-step span { color: var(--text); }

/* Nutzen-Kacheln auf der Aktivierungsseite */
.m-activate-tagline {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    margin: 0.25rem auto 0.75rem;
    max-width: 380px;
}
.m-benefits {
    display: flex;
    gap: 0.6rem;
    max-width: 420px;
    margin: 1.5rem auto 0;
}
.m-benefit {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.95rem 0.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.m-benefit strong { color: var(--text); display: block; font-size: 0.9rem; }
.m-benefit-icon { color: var(--gold); }
.m-benefit-icon svg { width: 26px; height: 26px; display: block; }

/* Trenner + Formular-Überschrift */
.m-activate-formhead {
    margin: 1.85rem 0 1rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text);
    text-align: center;
}

/* Vertrauens-Zeile (Verpackungs-Footer) */
.m-trust {
    margin-top: 1rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.5;
}

/* Fließtext (Verpackungs-Wortlaut) */
.m-activate-copy { max-width: 420px; margin: 0.75rem auto 0; text-align: left; }
.m-activate-copy p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin: 0 0 0.7rem; }
.m-activate-copy p:last-child { margin-bottom: 0; }
.m-activate-copy strong { color: var(--text); }
.m-accent { color: var(--gold); }

/* IHR VORTEIL */
.m-vorteil {
    max-width: 420px;
    margin: 1.5rem auto 0;
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    text-align: left;
}
.m-vorteil-head {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--gold); font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; font-size: 0.9rem; margin-bottom: 0.6rem;
}
.m-vorteil-head svg { width: 20px; height: 20px; flex-shrink: 0; }
.m-vorteil p { color: var(--text-muted); font-size: 0.87rem; line-height: 1.45; margin: 0 0 0.5rem; }
.m-vorteil p:last-child { margin-bottom: 0; }
.m-vorteil p.m-vorteil-accent { color: var(--gold); font-weight: 600; }

/* Trust-Badges (Verpackungs-Footer) */
.m-trustbadges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    max-width: 420px;
    margin: 1.25rem auto 0;
}
.m-trustbadge {
    display: flex; align-items: flex-start; gap: 0.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 0.85rem;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.m-trustbadge svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--gold); margin-top: 1px; }
.m-trustbadge strong { display: block; color: var(--text); font-size: 0.82rem; margin-bottom: 1px; }

/* Alben-Section */

.m-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.m-section-head h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--text);
}
.m-section-head h2 svg { width: 22px; height: 22px; color: var(--gold); }

.m-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.m-album-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text);
}
.m-album-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: var(--shadow);
}
.m-album-cover {
    aspect-ratio: 1;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    overflow: hidden;
    position: relative;
}
.m-album-cover img { width: 100%; height: 100%; object-fit: cover; }
.m-album-cover-empty {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    color: var(--text-dim); font-size: 0.85rem;
}
.m-album-cover-empty svg { width: 36px; height: 36px; }
.m-album-info { padding: 0.9rem 1rem; }
.m-album-info h3 { margin: 0 0 0.2rem; font-size: 1rem; color: var(--text); font-family: var(--font-serif); }
.m-album-info p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

/* Bottom Action Bar */

.m-action-bar {
    border-top: 1px solid var(--border);
    margin-top: 2rem;
    padding-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* ── Album-Detail-Seite ───────────────────────── */

.m-album-detail { padding-top: 0.5rem; }

.m-breadcrumb {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
}
.m-back {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.95rem;
}
.m-back:hover { color: var(--gold); text-decoration: none; }
.m-album-title-input {
    flex: 1;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
}
.m-album-title-input:focus { outline: none; border-color: var(--gold); }
.m-album-count { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }

/* Upload-Card */

.m-upload-card {
    background: var(--surface);
    border: 2px dashed var(--gold);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.m-upload-card:hover { background: var(--surface-2); border-style: solid; }
.m-upload-card.drag-over { background: var(--gold-glow); border-style: solid; }
.m-upload-icon { color: var(--gold); margin-bottom: 1rem; }
.m-upload-icon svg { width: 40px; height: 40px; }
.m-upload-btn { min-width: 200px; cursor: pointer; }
.m-upload-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.8rem; }
.m-upload-progress { margin-top: 0.8rem; color: var(--gold); font-weight: 600; }
.m-upload-progress.error { color: var(--error); }

/* Photo Grid */

.m-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.m-photo {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface-2);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}
.m-photo img, .m-photo video {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.2s ease;
}
.m-photo:hover img { transform: scale(1.05); }
.m-photo video { cursor: default; }
.m-photo-delete {
    position: absolute; top: 6px; right: 6px;
    width: 28px; height: 28px;
    border: none; border-radius: 50%;
    background: rgba(0,0,0,0.7); color: white;
    cursor: pointer; font-size: 18px; line-height: 1;
    opacity: 0; transition: opacity 0.15s ease;
    display: flex; align-items: center; justify-content: center;
}
.m-photo:hover .m-photo-delete,
.m-photo-delete:focus { opacity: 1; }
.m-photo-delete:hover { background: var(--error); }

.m-empty-photos {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

/* ── Lightbox ──────────────────────────────────── */

.lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.lightbox-img-wrap {
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
    backdrop-filter: blur(8px);
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
}

/* Toast */

.toast {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 10000;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: white;
    max-width: 320px;
    animation: slidein 0.2s ease;
}
.toast.info { background: var(--gold); color: #1F1B12; }
.toast.error { background: var(--error); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Storage-Bar ──────────────────────────────── */

.m-storage {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.m-storage-info { color: var(--text-muted); margin-bottom: 0.4rem; }
.m-storage-bar { height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.m-storage-fill { height: 100%; background: var(--gold); transition: width 0.3s ease; }
.m-storage-fill.warn { background: var(--warning); }

/* ── Landing / Info / Admin Site-Layout ──────────── */

.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.site-header .logo { font-weight: 700; font-size: 1.3rem; color: var(--text); font-family: var(--font-serif); }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.site-nav a { color: var(--text); }
.site-nav a:hover { color: var(--gold); text-decoration: none; }
.link-button { background: none; border: none; color: var(--text); cursor: pointer; font: inherit; padding: 0; }
.link-button:hover { color: var(--gold); }
.inline-form { display: inline; margin: 0; }

.site-main { flex: 1; max-width: 1080px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem; }

.site-footer {
    padding: 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.site-footer a { color: var(--text-muted); margin-left: 1rem; }

.flash {
    margin: 1rem auto; max-width: 1080px;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
}
.flash-info    { background: rgba(239, 108, 51, 0.12);  border-left: 4px solid var(--gold); color: var(--gold); }
.flash-error   { background: rgba(231, 76, 60, 0.12);   border-left: 4px solid var(--error); color: #FF8B7E; }
.flash-success { background: rgba(46, 204, 113, 0.12);  border-left: 4px solid var(--success); color: #6FE0A3; }

.hero { text-align: center; padding: 3rem 0; }
.hero h1 { color: var(--gold); }
.hero .lead { font-size: 1.2rem; color: var(--text-muted); max-width: 640px; margin: 0 auto 2rem; }
.hero .cta-row { justify-content: center; }
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin: 3rem 0; }
.feature { background: var(--surface); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.feature h3 { margin-top: 0; color: var(--gold); }

.error-page { text-align: center; padding: 3rem 1rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.error-page h1 { font-size: 4rem; color: var(--gold); }

.back-link { display: inline-block; margin-bottom: 1rem; color: var(--text-muted); }
.back-link:hover { color: var(--gold); text-decoration: none; }
.hint { color: var(--text-muted); font-size: 0.9rem; margin-top: 1rem; }

/* Admin */

.form { max-width: 460px; margin-bottom: 1rem; }
.form label { display: block; margin-bottom: 1rem; }
.form label > span { display: block; font-weight: 600; margin-bottom: 0.3rem; color: var(--text); }
.form input[type="text"], .form input[type="email"], .form input[type="password"],
.form input[type="number"], .form textarea, .form select {
    width: 100%; padding: 0.7rem 0.9rem;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--bg-2); color: var(--text);
    font-size: 1rem; font-family: inherit;
}
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 0.7rem 1.4rem; border-radius: var(--radius); font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-secondary:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.btn-danger { background: var(--error); color: white; padding: 0.7rem 1.4rem; border-radius: var(--radius); font-weight: 600; cursor: pointer; border: none; }
.btn-danger:hover { background: #B83A2E; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat { background: var(--surface); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); text-align: center; }
.stat strong { display: block; font-size: 2rem; color: var(--gold); font-family: var(--font-serif); }
.stat span { color: var(--text-muted); font-size: 0.85rem; }

.admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.admin-nav a { color: var(--text); background: var(--surface); padding: 0.6rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); }
.admin-nav a:hover { background: var(--gold); color: #1F1B12; text-decoration: none; }

.export-bar {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0;
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.export-bar strong { margin-right: 0.5rem; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.data-table th, .data-table td { padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-muted); font-weight: 600; }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }

.status { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.15em 0.6em; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; }
.status-unregistered { background: rgba(241, 196, 15, 0.2); color: var(--warning); }
.status-active { background: rgba(46, 204, 113, 0.2); color: var(--success); }
.status-inactive { background: rgba(139, 152, 165, 0.2); color: var(--text-muted); }

.batch-result { background: var(--surface); border: 1px solid var(--success); border-radius: var(--radius); padding: 1.2rem; margin: 1.5rem 0; }
.batch-result h2 { margin-top: 0; color: var(--success); }
.batch-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.batch-table { font-family: monospace; font-size: 0.85rem; max-height: 400px; overflow: auto; display: block; }
.batch-table code { background: var(--bg-2); padding: 2px 6px; border-radius: 4px; user-select: all; }
.batch-table td:nth-child(2) code { color: var(--gold); }

.auth-form { max-width: 460px; margin: 2rem auto; }
.auth-form h1 { text-align: center; color: var(--gold); }

.meta-info { background: var(--bg-2); padding: 1rem; border-radius: var(--radius); margin: 1rem 0; }
.meta-info p { margin: 0.3em 0; color: var(--text-muted); }

.danger-form { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--border); }

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 600px) {
    .site-header { flex-direction: column; gap: 0.5rem; }
    .site-main { padding: 1rem; }
    .m-page { padding: 1rem 1rem 4rem; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.4rem; }
    .m-hero { padding: 2rem 1.2rem 1.5rem; }
    .m-hero h1, .m-hero-name-input { font-size: 1.9rem; }
    .m-hero-sun { width: 140px; height: 140px; }
    .m-hero-titelbild label { font-size: 0.8rem; padding: 0.45rem 0.7rem; }
    .m-hero-titelbild label span { display: none; }
    .m-photo-grid, .m-albums-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .m-action-bar { flex-direction: column; }
    .m-breadcrumb { flex-wrap: wrap; }
    .m-album-title-input { width: 100%; order: 3; }
}
