/* ==========================================================================
   FamilyEvent – Design
   ========================================================================== */

:root {
    --bg: #faf6f1;
    --bg-soft: #f3ece3;
    --surface: #ffffff;
    --text: #2d2521;
    --muted: #7b6f67;
    --border: #ebe2d8;
    --primary: #c4553f;
    --primary-dark: #a7432f;
    --primary-soft: #fbe9e4;
    --yes: #4f8a5b;
    --yes-soft: #e6f2e7;
    --maybe: #c98a1b;
    --maybe-soft: #fcf1dc;
    --danger: #c0392b;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 1px 2px rgba(60, 40, 30, .04), 0 10px 30px -12px rgba(60, 40, 30, .14);
    --shadow-lg: 0 20px 50px -20px rgba(60, 40, 30, .3);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
p { margin: 0 0 1em; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 3px solid rgba(196, 85, 63, .45); outline-offset: 2px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .75em 1.35em;
    border: 1.5px solid transparent; border-radius: 999px;
    font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .1s, box-shadow .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px rgba(196, 85, 63, .8); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn--soft:hover { background: #f7d9d1; }
.btn--lg { padding: .95em 1.8em; font-size: 1.02rem; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--muted);
    cursor: pointer; transition: all .2s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn--danger:hover { color: var(--danger); border-color: var(--danger); background: #fdeeec; }
.icon-btn .icon { width: 18px; height: 18px; }

.link {
    display: inline-flex; align-items: center; gap: .35em;
    color: var(--primary); font-weight: 600; text-decoration: none; font-size: .92rem;
}
.link:hover { text-decoration: underline; }

/* ---------- Sprache ---------- */

.lang-switch {
    display: inline-flex; padding: 3px; gap: 2px;
    background: rgba(255, 255, 255, .7); border: 1px solid var(--border); border-radius: 999px;
    backdrop-filter: blur(8px);
}
.lang-switch a {
    padding: .3em .75em; border-radius: 999px;
    font-size: .8rem; font-weight: 700; letter-spacing: .04em;
    color: var(--muted); text-decoration: none; transition: all .2s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-active { background: var(--primary); color: #fff; }

/* ---------- Topbar & Hero ---------- */

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 16px 0; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar__brand {
    display: inline-flex; align-items: center; gap: .45em;
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--primary);
}
.has-image .topbar__brand { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }

.hero {
    position: relative; overflow: hidden;
    padding: 120px 0 90px; text-align: center;
    background:
        radial-gradient(1200px 500px at 15% -10%, #f7d8c9 0%, transparent 60%),
        radial-gradient(900px 500px at 100% 0%, #f4e3c3 0%, transparent 55%),
        linear-gradient(180deg, #fbefe7 0%, var(--bg) 100%);
}
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
    background: linear-gradient(180deg, transparent, var(--bg));
}
.hero--image { color: #fff; padding: 150px 0 120px; background: #3a2c26; }
.hero--image::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(30, 20, 15, .35) 0%, rgba(30, 20, 15, .55) 60%, rgba(30, 20, 15, .75) 100%);
}
.hero--image::after { display: none; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: heroZoom 18s ease-out both; }
.hero__content { position: relative; z-index: 2; }
.hero__eyebrow {
    display: inline-block; margin-bottom: 1rem; padding: .35em 1em;
    border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary-dark); background: rgba(255, 255, 255, .75);
}
.hero--image .hero__eyebrow { color: #fff; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.hero__title { font-size: clamp(2.3rem, 7vw, 4.2rem); margin-bottom: .35em; text-wrap: balance; }
.hero--image .hero__title { text-shadow: 0 2px 30px rgba(0, 0, 0, .3); }
.hero__date {
    display: inline-flex; align-items: center; gap: .5em;
    font-size: clamp(1rem, 2.5vw, 1.2rem); font-weight: 500; margin-bottom: 1.6rem; opacity: .95;
}

@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.countdown { display: flex; justify-content: center; gap: 10px; margin: 0 0 2rem; flex-wrap: wrap; }
.countdown__item {
    min-width: 74px; padding: 12px 10px 10px; border-radius: 16px;
    background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .6);
    backdrop-filter: blur(8px); box-shadow: var(--shadow);
}
.hero--image .countdown__item { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); box-shadow: none; }
.countdown__value { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__label { display: block; margin-top: 6px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }

/* ---------- Seite & Karten ---------- */

.page { display: grid; gap: 22px; padding-top: 8px; padding-bottom: 60px; position: relative; z-index: 3; }
.hero--image + .page { margin-top: -48px; }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow);
}
.card--flush { padding: 0; overflow: hidden; }
.card--center { text-align: center; max-width: 520px; margin: 0 auto; }
.section-title { font-size: clamp(1.45rem, 3vw, 1.8rem); }
.card-title { display: flex; align-items: center; gap: .5em; font-size: 1.25rem; margin-bottom: .75rem; }
.card-title .icon { color: var(--primary); }

.info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.info-card {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.info-card__icon {
    display: grid; place-items: center; flex-shrink: 0;
    width: 46px; height: 46px; border-radius: 14px;
    background: var(--primary-soft); color: var(--primary);
}
.info-card__label { font-family: var(--font); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 2px 0 4px; }
.info-card__value { font-weight: 600; margin: 0; }
.info-card__sub { color: var(--muted); margin: 2px 0 6px; font-size: .95rem; }

.prose { font-size: 1.05rem; color: #463b35; }
.prose p:last-child { margin-bottom: 0; }
.prose a { word-break: break-word; }

/* ---------- Neuigkeiten: Laufband ---------- */

.ticker {
    display: flex; align-items: stretch; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.ticker__label {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .45em; flex-shrink: 0;
    padding: .7em 1.1em .7em 1em; border-radius: 999px;
    background: var(--primary); color: #fff; text-decoration: none;
    font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.ticker__label .icon { width: 18px; height: 18px; transform-origin: 50% 10%; animation: ring 4s ease-in-out infinite; }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(14deg); } 92% { transform: rotate(-12deg); } 95% { transform: rotate(8deg); } }

.ticker__viewport {
    flex: 1; min-width: 0; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.ticker__viewport::-webkit-scrollbar { display: none; }
.ticker__track { display: flex; width: max-content; }
.js .ticker__viewport { overflow: hidden; }
.js .ticker__track { animation: ticker var(--ticker-duration, 30s) linear infinite; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.ticker__group { display: flex; flex-shrink: 0; list-style: none; margin: 0; padding: 0 0 0 24px; }
.ticker__group li { display: flex; align-items: center; white-space: nowrap; }
.ticker__group li::after { content: "•"; margin: 0 22px; color: #d9cdc2; }
.ticker__group a { display: inline-flex; align-items: center; gap: .55em; color: var(--text); text-decoration: none; font-size: .95rem; }
.ticker__group a:hover strong { color: var(--primary); text-decoration: underline; }
.ticker__date { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.ticker__new, .news-item__new {
    padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark);
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .js .ticker__viewport { overflow-x: auto; }
}
@media (max-width: 520px) {
    .ticker__label span { display: none; }
    .ticker__label { padding: .7em .85em; }
}

/* ---------- Neuigkeiten: Liste ---------- */

.news { scroll-margin-top: 20px; }
.news__head { display: flex; align-items: center; gap: 14px; margin-bottom: 1rem; }
.news__head .section-title { margin: 0; }
.news__icon {
    display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px;
    background: var(--primary-soft); color: var(--primary);
}
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { position: relative; padding: 18px 0 18px 22px; scroll-margin-top: 20px; }
.news-item + .news-item { border-top: 1px dashed var(--border); }
.news-item::before { content: ""; position: absolute; left: 0; top: 27px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.news-item:last-child { padding-bottom: 0; }
.news-item:target { animation: newsFlash 2s ease-out; }
@keyframes newsFlash { from { background: var(--primary-soft); } to { background: transparent; } }
.news-item__meta { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; color: var(--muted); font-size: .85rem; }
.news-item__title { font-size: 1.25rem; margin-bottom: .35em; }

/* ---------- Lied ---------- */

.song {
    display: flex; align-items: center; gap: 22px; position: relative; overflow: hidden;
    background:
        radial-gradient(500px 220px at 0% 0%, rgba(247, 216, 201, .7) 0%, transparent 70%),
        radial-gradient(400px 200px at 100% 100%, rgba(244, 227, 195, .6) 0%, transparent 70%),
        var(--surface);
}
.song__art {
    position: relative; display: grid; place-items: center; flex-shrink: 0;
    width: 92px; height: 92px; border-radius: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #e08a5f 100%); color: #fff;
    box-shadow: 0 14px 30px -14px rgba(196, 85, 63, .9);
}
.song__art > .icon { width: 40px; height: 40px; transition: opacity .3s, transform .3s; }
.song__eq { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding-bottom: 26px; opacity: 0; transition: opacity .3s; }
.song__eq i { width: 6px; height: 40%; border-radius: 3px; background: #fff; animation: eq 1s ease-in-out infinite; }
.song__eq i:nth-child(2) { animation-delay: -.3s; }
.song__eq i:nth-child(3) { animation-delay: -.6s; }
.song__eq i:nth-child(4) { animation-delay: -.15s; }
.song.is-playing .song__art > .icon { opacity: 0; transform: scale(.6); }
.song.is-playing .song__eq { opacity: 1; }
@keyframes eq { 0%, 100% { height: 18%; } 50% { height: 48%; } }

.song__main { flex: 1; min-width: 0; }
.song__eyebrow { margin: 0 0 2px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.song__title { font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 0 0 12px; overflow-wrap: anywhere; }
.song__native { width: 100%; }
.js .song__native { display: none; }
html:not(.js) .song__player { display: none; }

.song__player { display: flex; align-items: center; gap: 14px; }
.song__toggle {
    display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; padding: 0;
    border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer;
    box-shadow: 0 8px 20px -10px rgba(196, 85, 63, .9); transition: background .2s, transform .1s;
}
.song__toggle:hover { background: var(--primary-dark); }
.song__toggle:active { transform: scale(.95); }
.song__toggle .icon { width: 22px; height: 22px; }
.song__icon-play .icon { margin-left: 3px; }
.song__icon-pause, .song.is-playing .song__icon-play { display: none; }
.song.is-playing .song__icon-pause { display: inline; }

.song__track { flex: 1; min-width: 0; }
.song__bar {
    position: relative; height: 8px; border-radius: 999px; cursor: pointer;
    background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--border);
}
.song__bar::before { content: ""; position: absolute; inset: -10px 0; } /* größere Klickfläche */
.song__progress {
    position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit;
    background: linear-gradient(90deg, #e08a5f, var(--primary));
}
.song__progress::after {
    content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 3px var(--primary), 0 2px 6px rgba(0, 0, 0, .2);
    transform: translateY(-50%) scale(0); transition: transform .15s;
}
.song__bar:hover .song__progress::after, .song__bar:focus-visible .song__progress::after,
.song.is-playing .song__progress::after { transform: translateY(-50%) scale(1); }
.song__time { display: flex; justify-content: space-between; margin-top: 6px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.song__download { flex-shrink: 0; align-self: center; }

@media (max-width: 640px) {
    .song { display: grid; grid-template-columns: 64px 1fr; gap: 2px 14px; align-items: center; }
    .song__art { grid-row: 1 / 3; width: 64px; height: 64px; border-radius: 18px; }
    .song__art > .icon { width: 28px; height: 28px; }
    .song__eq { padding-bottom: 18px; gap: 4px; }
    .song__eq i { width: 4px; }
    .song__main { display: contents; }
    .song__eyebrow { grid-column: 2; align-self: end; }
    .song__title { grid-column: 2; align-self: start; margin: 0; }
    .song__player, .song__native { grid-column: 1 / -1; margin-top: 14px; }
    .song__download { grid-column: 1 / -1; width: 100%; margin-top: 10px; }
}

.song-admin { display: grid; gap: 6px; }
.song-admin audio { width: 100%; max-width: 520px; }

/* ---------- Karte ---------- */

.map { position: relative; height: clamp(300px, 42vw, 420px); background: var(--bg-soft); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__consent {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 24px; text-align: center; color: var(--muted);
    background:
        repeating-linear-gradient(45deg, transparent 0 22px, rgba(196, 85, 63, .04) 22px 44px),
        var(--bg-soft);
}
.map__consent > * { max-width: 100%; }
.map__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); color: var(--primary); box-shadow: var(--shadow); margin-bottom: 6px; }
.map__icon .icon { width: 26px; height: 26px; }
.map__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Anmeldung ---------- */

.card--rsvp { scroll-margin-top: 20px; border-top: 4px solid var(--primary); }
.rsvp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: .5rem; }
.rsvp-head .section-title { margin: 0; }
.rsvp-intro { margin-bottom: 1.5rem; }
.pill {
    display: inline-flex; align-items: center; gap: .4em; margin: 0;
    padding: .35em .9em; border-radius: 999px;
    background: var(--maybe-soft); color: #8a5d0e; font-size: .85rem; font-weight: 600;
}

.rsvp-done { text-align: center; padding: 10px 0 0; }
.rsvp-done h3 { font-size: 1.6rem; margin-bottom: .25em; }
.rsvp-done__badge {
    display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px;
    border-radius: 50%; animation: pop .5s cubic-bezier(.3, 1.6, .6, 1) both;
}
.rsvp-done__badge .icon { width: 34px; height: 34px; }
.rsvp-done__badge--yes { background: var(--yes-soft); color: var(--yes); }
.rsvp-done__badge--maybe { background: var(--maybe-soft); color: var(--maybe); }
.rsvp-done__badge--closed { background: var(--bg-soft); color: var(--muted); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.facts { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 1.25rem 0; }
.facts li {
    display: inline-flex; align-items: center; gap: .45em;
    padding: .5em 1em; border-radius: 999px; background: var(--bg-soft); font-weight: 600; font-size: .95rem;
}
.facts .icon { color: var(--primary); }
.quote {
    max-width: 520px; margin: 0 auto 1.25rem; padding: 12px 18px;
    border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0;
    background: var(--bg); color: #5a4d45; text-align: left; font-style: italic;
}
.rsvp-done .actions { justify-content: center; }

.personal-link { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px dashed var(--border); text-align: left; }
.personal-link p { font-size: .9rem; color: var(--muted); margin-bottom: .6rem; }
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-size: .85rem; color: var(--muted); }
.copy-field .btn { flex-shrink: 0; }

/* ---------- Formulare ---------- */

.form { display: grid; gap: 18px; }
.grid-2, .grid-3 { display: grid; gap: 18px; }
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; align-content: start; }
.field__label { font-weight: 600; font-size: .92rem; padding: 0; }
.field__hint { color: var(--muted); font-size: .82rem; }
.optional { font-style: normal; font-weight: 400; color: var(--muted); font-size: .85em; }

.input {
    width: 100%; padding: .8em 1em;
    font: inherit; font-size: 1rem; color: var(--text);
    background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s, background .2s;
    -webkit-appearance: none; appearance: none;
}
.input:hover { border-color: #ddd0c2; }
.input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(196, 85, 63, .12); }
textarea.input { resize: vertical; min-height: 3em; line-height: 1.5; }
select.input {
    padding-right: 2.5em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b6f67' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .9em center; background-size: 1.1em;
}
input[type="file"].input { padding: .6em; cursor: pointer; }
.input--mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; }

/* Teilnahme-Auswahl */
.choice-group { display: grid; gap: 12px; }
@media (min-width: 520px) { .choice-group { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
    display: flex; align-items: center; gap: 12px; height: 100%;
    padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg); transition: all .2s;
}
.choice__icon {
    display: grid; place-items: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface); color: var(--muted); border: 1.5px solid var(--border); transition: all .2s;
}
.choice__text { display: grid; line-height: 1.3; }
.choice__text small { color: var(--muted); }
.choice:hover .choice__box { border-color: #ddd0c2; }
.choice input:focus-visible + .choice__box { box-shadow: 0 0 0 4px rgba(196, 85, 63, .15); }
.choice--yes input:checked + .choice__box { border-color: var(--yes); background: var(--yes-soft); }
.choice--yes input:checked + .choice__box .choice__icon { background: var(--yes); border-color: var(--yes); color: #fff; }
.choice--maybe input:checked + .choice__box { border-color: var(--maybe); background: var(--maybe-soft); }
.choice--maybe input:checked + .choice__box .choice__icon { background: var(--maybe); border-color: var(--maybe); color: #fff; }

/* Zähler */
.stepper { display: flex; align-items: stretch; gap: 8px; }
.stepper__btn {
    display: grid; place-items: center; flex-shrink: 0;
    width: 50px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); cursor: pointer; transition: all .2s;
}
.stepper__btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.stepper__btn:disabled { opacity: .4; cursor: default; }
.stepper__input { text-align: center; font-weight: 700; font-size: 1.15rem; -moz-appearance: textfield; }
.stepper__input::-webkit-outer-spin-button, .stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Checkbox & Schalter */
.check, .toggle { display: inline-flex; align-items: center; gap: .65em; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__track {
    position: relative; flex-shrink: 0; width: 46px; height: 26px; border-radius: 999px;
    background: #ddd2c7; transition: background .2s;
}
.toggle__track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s;
}
.toggle input:checked + .toggle__track { background: var(--yes); }
.toggle input:checked + .toggle__track::after { transform: translateX(20px); }
.toggle input:focus-visible + .toggle__track { box-shadow: 0 0 0 4px rgba(196, 85, 63, .2); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { margin: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Hinweise ---------- */

.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-sm);
    font-size: .95rem; font-weight: 500; animation: slideIn .3s ease-out both;
}
.alert ul { margin: 0; padding-left: 1.1em; }
.alert .icon { margin-top: 2px; }
.alert--success { background: var(--yes-soft); color: #2f5f39; }
.alert--error { background: #fdecea; color: #9b2c20; }
.alert--info { background: var(--maybe-soft); color: #7a520c; }
.alert--info a { color: inherit; font-weight: 700; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Gästeliste ---------- */

.guests { scroll-margin-top: 20px; }
.guests__head { display: flex; align-items: center; gap: 16px; margin-bottom: 1.5rem; }
.guests__head .section-title { margin-bottom: .15em; }
.guests__head p { margin: 0; }
.guests__icon {
    display: grid; place-items: center; flex-shrink: 0; width: 54px; height: 54px; border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #e08a5f 100%); color: #fff;
    box-shadow: 0 10px 24px -12px rgba(196, 85, 63, .9);
}
.guests__icon .icon { width: 26px; height: 26px; }

.guest-stats { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin-bottom: 2rem; }
@media (max-width: 640px) { .guest-stats { grid-template-columns: repeat(2, 1fr); } }
.guest-stat {
    position: relative; display: grid; gap: 2px; padding: 16px 16px 14px; overflow: hidden;
    border-radius: 18px; background: var(--bg); border: 1px solid var(--border);
}
.guest-stat__icon { position: absolute; top: 12px; right: 12px; color: #d9cdc2; }
.guest-stat__value { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.guest-stat__label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.guest-stat--yes { background: var(--yes-soft); border-color: #cfe5d2; }
.guest-stat--yes .guest-stat__value, .guest-stat--yes .guest-stat__icon { color: var(--yes); }
.guest-stat--maybe { background: var(--maybe-soft); border-color: #f3e0b8; }
.guest-stat--maybe .guest-stat__value, .guest-stat--maybe .guest-stat__icon { color: var(--maybe); }

.guest-group + .guest-group { margin-top: 1.75rem; }
.guest-group__title {
    display: flex; align-items: center; gap: .5em; margin-bottom: .9rem;
    font-family: var(--font); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.guest-group--yes .guest-group__title { color: var(--yes); }
.guest-group--maybe .guest-group__title { color: #9a6a12; }
.guest-group__count {
    min-width: 24px; padding: 1px 8px; border-radius: 999px; text-align: center;
    font-size: .75rem; letter-spacing: 0; background: var(--bg-soft);
}
.guest-group__title::after { content: ""; flex: 1; height: 1px; background: var(--border); margin-left: 6px; }

.guest-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); list-style: none; margin: 0; padding: 0; }
.guest-card {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    animation: fadeUp .4s ease-out both;
}
.guest-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #e2d6ca; }
.guest-group--maybe .guest-card { background: #fffdf8; border-style: dashed; }
.guest-card.is-me { border: 1.5px solid var(--primary); background: #fff8f6; }
.guest-card__body { display: grid; min-width: 0; line-height: 1.35; }
.guest-card__name { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.guest-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .82rem; }
.guest-card__meta > span { display: inline-flex; align-items: center; gap: 4px; }
.guest-card__meta .icon { width: 14px; height: 14px; }
.me-tag {
    flex-shrink: 0; padding: 1px 8px; border-radius: 999px;
    background: var(--primary); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.avatar {
    display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
    background: hsl(var(--h, 15) 60% 91%); color: hsl(var(--h, 15) 45% 32%);
    font-size: .85rem; font-weight: 700; letter-spacing: .02em;
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px hsl(var(--h, 15) 40% 85%);
}
.guest-group--maybe .avatar { filter: saturate(.6); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Telefon-Login & Kontakt ---------- */

.phone-step { max-width: 520px; margin: 0 auto; padding: 12px 0 4px; text-align: center; }
.phone-step h3 { font-size: 1.45rem; margin-bottom: .3em; }
.phone-step__icon {
    display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px;
    border-radius: 20px; background: var(--primary-soft); color: var(--primary);
}
.phone-step__icon .icon { width: 30px; height: 30px; }
.phone-step__form { display: flex; gap: 10px; margin: 1.25rem 0 .9rem; }
.phone-step__form .input-icon { flex: 1; }
.phone-step .contact-hint { display: inline-flex; max-width: 100%; margin: 0; text-align: left; }
.input--lg { padding-top: .95em; padding-bottom: .95em; font-size: 1.1rem; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 520px) {
    .phone-step__form { flex-direction: column; }
    .phone-step__form .btn { width: 100%; }
}

.phone-new {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    margin-bottom: 1.25rem; padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--yes-soft); color: #2f5f39; font-weight: 600; font-size: .95rem;
}
.phone-new > span { display: inline-flex; align-items: center; gap: 8px; }
.phone-new form { margin: 0; }
.input[readonly] { background: var(--bg-soft); color: var(--muted); cursor: default; }
.input[readonly]:focus { box-shadow: none; border-color: var(--border); }

.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 2.75em; }
.field-single { display: grid; }
@media (min-width: 640px) { .field-single { grid-template-columns: 1fr 1fr; } }
.contact-hint { display: flex; align-items: flex-start; gap: 6px; margin: -8px 0 0; }
.contact-hint .icon { width: 14px; height: 14px; margin-top: 2px; }

.guest-logout { margin-top: 1rem; }
.link--muted { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: .85rem; color: var(--muted); }
.link--muted:hover { color: var(--primary); }

.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn--glass { background: rgba(255, 255, 255, .7); color: var(--text); border-color: rgba(255, 255, 255, .8); backdrop-filter: blur(8px); }
.btn--glass:hover { background: #fff; }
.hero--image .btn--glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero--image .btn--glass:hover { background: rgba(255, 255, 255, .26); }

.contact-cell a { display: flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-size: .88rem; white-space: nowrap; }
.contact-cell a:hover { color: var(--primary); }
.contact-cell .icon { width: 15px; height: 15px; color: var(--muted); }
@media (max-width: 760px) { .contact-cell { flex-wrap: wrap; } .contact-cell a { justify-content: flex-end; } }

/* ---------- Footer & Leerzustand ---------- */

.footer { padding: 26px 0 40px; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 22px; }
.footer__inner > span { display: inline-flex; align-items: center; gap: .45em; }
.footer__inner > span .icon { color: var(--primary); }
.footer__admin { color: #c2b6ac; display: inline-flex; padding: 6px; border-radius: 8px; }
.footer__admin:hover { color: var(--primary); }

.empty-state { min-height: 100vh; display: grid; place-items: center; padding-top: 80px; padding-bottom: 40px; }
.empty-state__icon {
    display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px;
    border-radius: 20px; background: var(--primary-soft); color: var(--primary);
}
.empty-state__icon .icon { width: 30px; height: 30px; }
.empty { text-align: center; padding: 48px 20px; margin: 0; }

/* ==========================================================================
   Backend
   ========================================================================== */

.admin { background: #f7f3ee; }
.admin .container { max-width: 1180px; }

.admin-bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.admin-bar__inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand {
    display: inline-flex; align-items: center; gap: .5em; min-width: 0; max-width: 240px;
    font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--text); text-decoration: none;
}
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand .icon { color: var(--primary); }
.admin-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a {
    display: inline-flex; align-items: center; gap: .45em; white-space: nowrap;
    padding: .5em .9em; border-radius: 10px;
    color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; transition: all .2s;
}
.admin-nav a:hover { color: var(--text); background: var(--bg-soft); }
.admin-nav a.is-active { color: var(--primary-dark); background: var(--primary-soft); }
.admin-nav .icon { width: 18px; height: 18px; }
.admin-bar__end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.admin-bar__end form { margin: 0; }

@media (max-width: 860px) {
    .admin-bar__inner { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; }
    .admin-nav { order: 3; flex-basis: 100%; padding-bottom: 8px; margin: 0 -6px; }
}
@media (max-width: 520px) {
    .admin-nav a span { display: none; }
    .admin-nav a { padding: .6em .8em; }
    .admin-nav a.is-active span { display: inline; }
}

.admin-main { padding-top: 28px; padding-bottom: 80px; display: grid; gap: 22px; align-content: start; }
.admin-main > .alert { margin-bottom: 0; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { margin: .1em 0 .15em; }
.page-head p { margin: 0; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Kennzahlen */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat {
    position: relative; display: grid; gap: 2px; padding: 18px 18px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.stat__icon { position: absolute; top: 16px; right: 16px; color: #d6cabf; }
.stat__value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat--accent { background: var(--primary); border-color: var(--primary); color: #fff; }
.stat--accent .stat__label, .stat--accent .stat__icon { color: rgba(255, 255, 255, .8); }
.stat--yes .stat__value, .stat--yes .stat__icon { color: var(--yes); }
.stat--maybe .stat__value, .stat--maybe .stat__icon { color: var(--maybe); }

/* Werkzeugleiste */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; }
.search .input { padding-left: 2.6em; padding-top: .6em; padding-bottom: .6em; }
.segmented { display: inline-flex; padding: 3px; background: var(--bg-soft); border-radius: 12px; }
.segmented button {
    padding: .45em 1em; border: 0; border-radius: 9px; background: transparent;
    font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s;
}
.segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* Tabelle */
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th {
    padding: 12px 18px; text-align: left; white-space: nowrap;
    font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
    background: #fcfaf7; border-bottom: 1px solid var(--border);
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fdfbf8; }
.table .num { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.table .actions-col { white-space: nowrap; text-align: right; width: 1%; }
.table .actions-col form { display: inline; }
.comment-cell { max-width: 280px; color: #5a4d45; font-size: .9rem; }
.lang-tag { margin-left: 6px; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--bg-soft); }

.badge {
    display: inline-flex; align-items: center; gap: .35em; white-space: nowrap;
    padding: .3em .8em .3em .6em; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.badge .icon { width: 15px; height: 15px; }
.badge--yes { background: var(--yes-soft); color: var(--yes); }
.badge--maybe { background: var(--maybe-soft); color: #9a6a12; }

@media (max-width: 760px) {
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { position: relative; padding: 14px 18px; border-bottom: 1px solid var(--border); }
    .table tbody tr:last-child { border-bottom: 0; }
    .table td { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border: 0; text-align: right; }
    .table td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; font-weight: 600; text-align: left; }
    .table td:first-child { padding-right: 96px; text-align: left; font-size: 1.02rem; }
    .table td:first-child::before { display: none; }
    .table .num { text-align: right; }
    .table .actions-col { position: absolute; top: 12px; right: 14px; width: auto; padding: 0; }
    .table .actions-col::before { display: none; }
    .comment-cell { max-width: none; }
}

/* Formular-Seiten */
.form-card { max-width: 760px; }
.form-card--narrow { max-width: 480px; }
.event-form { gap: 22px; }
.event-form .card { display: grid; gap: 16px; }
.event-form .card > * { margin: 0; }

.tabs__list { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs__tab {
    display: inline-flex; align-items: center; gap: .5em;
    padding: .7em 1.1em; margin-bottom: -1px; border: 0; border-bottom: 2.5px solid transparent;
    background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tabs__panel { display: grid; gap: 16px; }
.tabs__panel + .tabs__panel { margin-top: 28px; }
.tabs__fallback { font-size: 1rem; margin: 0; }
.js .tabs__panel:not(.is-active) { display: none; }
.js .tabs__panel + .tabs__panel { margin-top: 0; }
.js .tabs__fallback { display: none; }
html:not(.js) .tabs__list { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e0d5ca; }
.dot--on { background: var(--yes); }

/* Neuigkeiten & E-Mail-Versand */
.notify-box { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
.notify-box .toggle > span:last-child { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; }
.notify-box.is-disabled { opacity: .6; }
.notify-box.is-disabled .toggle { cursor: not-allowed; }
.news-table tr.is-editing { background: var(--primary-soft); }
.news-table td small.muted { margin-left: 6px; }
.mail-settings { display: grid; gap: 16px; scroll-margin-top: 80px; }
.mail-settings > * { margin: 0; }
.mail-test { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; border-top: 1px dashed var(--border); }
.mail-test .input-icon { flex: 1 1 260px; }
@media (max-width: 760px) { .news-table td:first-child { padding-right: 140px; } }

.image-field { display: grid; gap: 20px; align-items: start; }
@media (min-width: 640px) { .image-field { grid-template-columns: 280px 1fr; } }
.image-preview {
    position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden;
    background: var(--bg-soft); border: 1.5px dashed var(--border);
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview__empty { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: .88rem; }
.image-preview.is-empty .image-preview__empty { display: flex; }
.image-field__controls { display: grid; gap: 14px; }

.save-bar {
    position: sticky; bottom: 16px; z-index: 10;
    display: flex; justify-content: flex-end; width: fit-content; margin-left: auto;
    padding: 8px; border-radius: 999px;
    background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px);
    border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
@media (max-width: 520px) { .save-bar { width: 100%; } .save-bar .btn { width: 100%; } }

/* Login */
.auth { min-height: 100vh; background:
    radial-gradient(900px 500px at 10% 0%, #f7d8c9 0%, transparent 60%),
    radial-gradient(700px 500px at 100% 100%, #f4e3c3 0%, transparent 55%), var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 70px 20px 40px; position: relative; }
.auth-top { position: absolute; top: 18px; right: 20px; }
.auth-card { width: 100%; max-width: 420px; text-align: center; box-shadow: var(--shadow-lg); }
.auth-card .form { text-align: left; margin-top: 8px; }
.auth-card__icon {
    display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 14px;
    border-radius: 18px; background: var(--primary); color: #fff; box-shadow: 0 10px 24px -10px rgba(196, 85, 63, .9);
}
.auth-card__icon .icon { width: 28px; height: 28px; }
.auth-card .alert { text-align: left; }
.auth-back { margin-top: 20px; }

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Mobil ---------- */

@media (max-width: 520px) {
    .container { padding: 0 16px; }
    .hero { padding: 96px 0 70px; }
    .hero--image { padding: 120px 0 100px; }
    .countdown__item { min-width: 64px; padding: 10px 6px 8px; }
    .countdown__value { font-size: 1.45rem; }
    .card--rsvp .actions .btn--lg { width: 100%; }
    .copy-field { flex-direction: column; }
    .page-head__actions { width: 100%; }
    .page-head__actions .btn { flex: 1; }
}
