/* =========================================================================
   Lena & Katarina – Hochzeitsseite
   Warme, romantische, farbenfrohe Gestaltung
   Inspiriert von goldenem Abendlicht, Wald-Grün & Wildblumen
   ========================================================================= */

:root {
    /* Grundtöne */
    --cream:      #fdf8f1;
    --cream-2:    #f6ecdc;
    --paper:      #fffdf9;
    --ink:        #3a2e26;
    --ink-soft:   #6f5d4f;

    /* Wärme / Gold */
    --honey:      #d98e4a;
    --honey-deep: #c2722f;
    --amber:      #e8b04b;

    /* Natur / Grün */
    --moss:       #5a7a4f;
    --moss-deep:  #3f5a39;

    /* Wildblumen-Akzente */
    --rose:       #d98a9e;
    --rose-deep:  #c26b82;
    --terracotta: #e07b46;

    /* Flieder / Lavendel – Leitfarbe der Einladung */
    --lavender:   #b9a4dd;
    --lilac:      #9f7fc9;
    --lilac-deep: #7e5fa8;

    --radius:     18px;
    --radius-lg:  28px;
    --shadow:     0 18px 50px -22px rgba(80, 50, 25, .45);
    --shadow-sm:  0 8px 22px -14px rgba(80, 50, 25, .5);
    --maxw:       1080px;

    --serif: "Cormorant Garamond", Georgia, serif;
    --sans:  "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 82% -10%, #efe6fb 0%, transparent 60%),
        radial-gradient(900px 520px at -10% 8%, #f3e9d6 0%, transparent 55%),
        radial-gradient(700px 500px at 50% 115%, #f1e8fa 0%, transparent 60%),
        var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
p  { margin: 0 0 1rem; }
a  { color: var(--honey-deep); }

.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* --- Schmuck-Linie mit Blüte ------------------------------------------- */
.divider {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; color: var(--lilac-deep); margin: 1.2rem 0;
}
.divider::before, .divider::after {
    content: ""; height: 1px; width: clamp(40px, 18vw, 130px);
    background: linear-gradient(90deg, transparent, var(--lavender), transparent);
}

/* =========================================================================
   Buttons & Formulare
   ========================================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    font-family: var(--sans); font-weight: 700; font-size: 1rem;
    padding: .85em 1.6em; border: none; border-radius: 999px; cursor: pointer;
    color: #fff; text-decoration: none;
    background: linear-gradient(135deg, var(--honey) 0%, var(--terracotta) 48%, var(--lilac) 112%);
    box-shadow: 0 12px 26px -12px rgba(150, 100, 180, .85);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 18px 32px -14px rgba(150, 100, 180, .9); }
.btn:active { transform: translateY(0); }
.btn--ghost {
    background: transparent; color: var(--lilac-deep);
    border: 2px solid var(--lavender); box-shadow: none;
}
.btn--ghost:hover { background: rgba(159, 127, 201, .12); }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

label { display: block; font-weight: 700; margin: 0 0 .35rem; font-size: .95rem; }
.field { margin-bottom: 1.15rem; }
.field .hint { font-weight: 400; font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }

input[type=text], input[type=email], input[type=password], textarea {
    width: 100%; font-family: var(--sans); font-size: 1.02rem; color: var(--ink);
    padding: .8em .95em; border-radius: 14px; background: var(--paper);
    border: 1.5px solid #e7d6bf; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--lilac);
    box-shadow: 0 0 0 4px rgba(159, 127, 201, .20);
}
textarea { resize: vertical; min-height: 120px; }

/* Hinweismeldungen */
.alert { border-radius: 14px; padding: .85em 1.1em; margin: 0 0 1.2rem; font-weight: 600; font-size: .95rem; }
.alert--error { background: #fde6e6; color: #9a3030; border: 1px solid #f1c0c0; }
.alert--ok    { background: #e8f3e2; color: #3c6b2c; border: 1px solid #cfe6c2; }
.alert--info  { background: #fcf1dc; color: #8a5a1c; border: 1px solid #f1ddb6; }

/* =========================================================================
   Auth-Seiten (Login / Setup)
   ========================================================================= */
.auth {
    min-height: 100vh; display: grid;
    grid-template-columns: 1.1fr .9fr;
}
.auth__visual {
    position: relative; overflow: hidden;
    background-size: cover; background-position: center;
}
.auth__visual::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(60,40,20,.15), rgba(120,60,30,.45));
}
.auth__visual-cap {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 2.4rem; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.4);
}
.auth__visual-cap h1 { color: #fff; font-size: clamp(2.6rem, 4vw, 4rem); }
.auth__visual-cap .ampersand { font-style: italic; color: #ffe7c4; }

.auth__panel {
    display: flex; align-items: center; justify-content: center;
    padding: clamp(1.5rem, 5vw, 3.5rem);
}
.auth__card { width: 100%; max-width: 420px; }
.auth__eyebrow {
    text-transform: uppercase; letter-spacing: .22em; font-size: .72rem;
    font-weight: 800; color: var(--lilac-deep); margin-bottom: .5rem;
}
.auth__card h2 { margin-bottom: .25rem; }
.auth__lead { color: var(--ink-soft); margin-bottom: 1.6rem; }
.auth__footnote { margin-top: 1.4rem; font-size: .85rem; color: var(--ink-soft); text-align: center; }

@media (max-width: 820px) {
    .auth { grid-template-columns: 1fr; }
    /* Bildausschnitt höher legen, damit der Text auf Boot/Wasser fällt
       und nicht über die Gesichter von Lena & Katarina. */
    .auth__visual { min-height: 40vh; background-position: center 65%; }
    .auth__visual-cap { padding: 1.6rem; }
}

/* =========================================================================
   Topbar (eingeloggt)
   ========================================================================= */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2.4rem);
    background: rgba(253, 248, 241, .82); backdrop-filter: blur(10px);
    border-bottom: 1px solid #efe0c9;
}
.topbar__brand { text-decoration: none; }
.topbar__names { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.topbar__nav { display: flex; align-items: center; gap: .5rem 1.1rem; flex-wrap: wrap; }
.topbar__hello { color: var(--ink-soft); font-weight: 600; font-size: .92rem; }
.topbar__link { text-decoration: none; font-weight: 700; color: var(--honey-deep); padding: .4em .2em; }
.topbar__link--ghost { border: 2px solid #ead7bd; border-radius: 999px; padding: .35em 1em; color: var(--ink-soft); }
.topbar__link--ghost:hover { border-color: var(--honey); color: var(--honey-deep); }

/* =========================================================================
   Allgemeines Layout
   ========================================================================= */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.4rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem); }
.section { margin-bottom: 3rem; }

.card {
    background: var(--paper); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: clamp(1.4rem, 3.5vw, 2.4rem);
    border: 1px solid #f0e3cf;
}

/* Begrüßungs-Banner */
.hello-banner {
    position: relative; overflow: hidden;
    border-radius: var(--radius-lg); color: #fff; box-shadow: var(--shadow);
    padding: clamp(2rem, 5vw, 3.4rem); margin-bottom: 2.4rem;
    background-size: cover; background-position: center 35%;
}
.hello-banner::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, rgba(55,40,60,.72) 0%, rgba(150,75,40,.42) 50%, rgba(130,100,180,.45) 100%);
}
.hello-banner > * { position: relative; z-index: 2; }
.hello-banner h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hello-banner p  { color: #ffeede; max-width: 46ch; }
.countdown-pill {
    display: inline-flex; align-items: center; gap: .5em;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(6px); border-radius: 999px;
    padding: .5em 1.1em; font-weight: 700; color: #fff; margin-top: .4rem;
}

/* =========================================================================
   Upload-Bereich
   ========================================================================= */
.upload-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }

.dropzone {
    border: 2.5px dashed #e0b27f; border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fffaf2, #fbf0dd);
    padding: clamp(2rem, 5vw, 3.2rem); text-align: center;
    transition: border-color .15s, background .15s, transform .15s;
    cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag {
    border-color: var(--honey); background: #fdf3e2; transform: translateY(-2px);
}
.dropzone__emoji { font-size: 2.6rem; line-height: 1; }
.dropzone h3 { margin: .6rem 0 .2rem; }
.dropzone input[type=file] { display: none; }

/* Kategorien-Chips */
.cat-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.chip {
    font-size: .8rem; font-weight: 700; padding: .35em .9em; border-radius: 999px;
    background: #fbeede; color: var(--honey-deep); border: 1px solid #f0d8b6;
}
.chip--rose { background: #fbe7ec; color: var(--rose-deep); border-color: #f3cdd6; }
.chip--moss { background: #e9f1e3; color: var(--moss-deep); border-color: #d3e6c8; }
.chip--lav  { background: #efe9f6; color: #6b568f; border-color: #ddd1ee; }

/* Upload-Liste (laufende Uploads) */
.queue { margin-top: 1.4rem; display: grid; gap: .7rem; }
.queue:empty { display: none; }
.q-item {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    gap: .8rem; padding: .7rem .9rem; background: var(--paper);
    border: 1px solid #f0e3cf; border-radius: 14px;
}
.q-item__icon { font-size: 1.3rem; }
.q-item__name { font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item__meta { font-size: .78rem; color: var(--ink-soft); }
.q-item__status { font-size: .8rem; font-weight: 700; white-space: nowrap; }
.q-item__status.ok { color: var(--moss); }
.q-item__status.err { color: #b23b3b; }
.progress { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: #f0e3cf; overflow: hidden; }
.progress__bar {
    height: 100%; width: 0%; border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), var(--terracotta), var(--rose));
    transition: width .2s ease;
}

/* =========================================================================
   Galerie der eigenen Inhalte
   ========================================================================= */
.media-group { margin-top: 1.8rem; }
.media-group__title {
    display: flex; align-items: center; gap: .6rem;
    font-family: var(--serif); font-size: 1.5rem; margin-bottom: .8rem;
}
.media-group__count { font-family: var(--sans); font-size: .8rem; font-weight: 700;
    color: var(--honey-deep); background: #fbeede; padding: .2em .7em; border-radius: 999px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.media-tile {
    position: relative; border-radius: 16px; overflow: hidden; background: #f3e7d4;
    aspect-ratio: 1; box-shadow: var(--shadow-sm); border: 1px solid #f0e3cf;
}
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile__audio {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; gap: .4rem; padding: .6rem; text-align: center;
}
.media-tile__audio audio { width: 100%; }
.media-tile__name {
    position: absolute; left: 0; right: 0; bottom: 0;
    font-size: .72rem; font-weight: 600; color: #fff; padding: .9rem .6rem .45rem;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-del {
    position: absolute; top: .4rem; right: .4rem; z-index: 3;
    width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.9); color: #b23b3b; font-size: 1rem; font-weight: 800;
    display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.media-del:hover { background: #fff; }

/* Nachrichten */
.msg-list { display: grid; gap: .8rem; }
.msg {
    background: linear-gradient(180deg, #fefbf5, #f6f0fb);
    border: 1px solid #e7dcf0; border-left: 5px solid var(--lavender);
    border-radius: 14px; padding: 1rem 1.1rem; position: relative;
}
.msg__date { font-size: .76rem; color: var(--ink-soft); margin-bottom: .35rem; }
.msg__text { white-space: pre-wrap; font-size: 1.02rem; }
.msg .media-del { position: absolute; top: .6rem; right: .6rem; }

.empty {
    text-align: center; color: var(--ink-soft); padding: 1.6rem;
    font-style: italic; font-family: var(--serif); font-size: 1.2rem;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer { text-align: center; padding: 2.6rem 1rem 3rem; color: var(--ink-soft); }
.footer__hash { font-family: var(--serif); font-size: 1.6rem; color: var(--lilac-deep); margin: 0; }
.footer__small { font-size: .85rem; margin-top: .3rem; }

/* Tab-Umschaltung */
.tabs { display: flex; gap: .5rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.tab {
    border: none; cursor: pointer; font-family: var(--sans); font-weight: 700;
    padding: .6em 1.2em; border-radius: 999px; font-size: .95rem;
    background: #f6e8d3; color: var(--ink-soft);
}
.tab.is-active { background: linear-gradient(135deg, var(--honey), var(--terracotta) 55%, var(--lilac)); color: #fff; box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

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

/* =========================================================================
   Einladung
   ========================================================================= */
/* Zitat auf der Anmeldeseite */
.invite-quote {
    position: relative; margin: 0 0 1.4rem; padding: 1.1rem 1.2rem 1.2rem 1.4rem;
    background: linear-gradient(180deg, #f3eefaff, #fbf3ee);
    border-left: 4px solid var(--lavender); border-radius: 14px;
    font-family: var(--serif); font-style: italic; font-size: 1.12rem;
    line-height: 1.5; color: #5a4a55;
}
.invite-quote__heart { color: var(--lavender); font-style: normal; margin-right: .15em; }
.invite-quote__sign {
    display: block; margin-top: .7rem; font-size: 1.35rem; color: var(--rose-deep);
    /* wirkt wie die handschriftliche Zeile auf der Karte */
}

/* Aufklappbare Einladungs-Ansicht (eingeloggt) */
.invite-card {
    background: var(--paper); border: 1px solid #e9ddee; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: .4rem 1.2rem; margin-bottom: 2.2rem;
}
.invite-card > summary {
    cursor: pointer; list-style: none; padding: .9rem .2rem; font-weight: 800;
    color: #6b568f; display: flex; align-items: center; gap: .5rem;
}
.invite-card > summary::-webkit-details-marker { display: none; }
.invite-card > summary::after { content: "▾"; margin-left: auto; transition: transform .2s; }
.invite-card[open] > summary::after { transform: rotate(180deg); }
.invite-card__body { padding: .4rem .2rem 1.2rem; }
.invite-card__imgs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem;
}
@media (max-width: 560px) { .invite-card__imgs { grid-template-columns: 1fr; } }
.invite-card__imgs img {
    width: 100%; border-radius: 14px; box-shadow: var(--shadow-sm);
    border: 1px solid #efe3d0; display: block; transition: transform .15s;
}
.invite-card__imgs a:hover img { transform: scale(1.015); }
.invite-card__text {
    font-family: var(--serif); font-style: italic; font-size: 1.15rem;
    line-height: 1.6; color: var(--ink-soft); max-width: 60ch; margin: 0 auto;
    text-align: center;
}
.invite-card__sign {
    text-align: center; font-family: var(--serif); font-size: 1.5rem;
    color: var(--rose-deep); margin-top: .6rem;
}
