:root {
    --bg: #241318;          /* sehr dunkles Wein/Bordeaux */
    --bg2: #3c2026;         /* dunkles Weinrot */
    --accent: #b23a48;      /* Bordeaux/Rosenrot – wie Kleid & Rosen */
    --accent2: #ddc8a0;     /* Creme/Champagner – wie das Korsett */
    --text: #f4ece2;        /* cremiges Off-White */
    --muted: #cdbcad;       /* warmes Taupe */
    --ink: #2a1216;         /* dunkle Schrift auf hellen Flächen/Buttons */
    --card: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.13);
    --ok-bg: rgba(120, 165, 105, 0.16);
    --ok-bd: #7ba65f;       /* gedämpftes Laubgrün */
    --err-bg: rgba(208, 120, 70, 0.18);
    --err-bd: #d07846;      /* warmes Orange – klar vom Bordeaux unterscheidbar */
}

* { box-sizing: border-box; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 600px at 50% -10%, var(--bg2), var(--bg));
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.55;
    padding: 24px 16px 48px;
}

.card {
    max-width: 620px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px 22px 22px;
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* ---- Hero ---- */
.hero { text-align: center; padding-bottom: 8px; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0 0 6px;
}
.hero h1 {
    margin: 0;
    font-size: clamp(1.9rem, 7vw, 2.8rem);
    line-height: 1.1;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.date {
    margin: 12px 0 0;
    font-size: 1.15rem;
    color: var(--accent);
    font-weight: 600;
}
.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.logo img {
    width: 64%;
    height: 64%;
    object-fit: contain;
}
.hero-photo {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 300px;       /* deckelt die Höhe des Hochkant-Fotos */
    height: auto;
    margin: 18px auto 0;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
@media (max-width: 560px) {
    .hero-photo { max-height: 44vh; }  /* nimmt auf kleinen Screens höchstens knapp die halbe Höhe ein */
}

/* ---- Intro ---- */
.intro { margin: 22px 2px; color: var(--text); }
.intro p { margin: 0 0 12px; }
.intro strong { color: var(--accent); }

/* ---- Alerts ---- */
.alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin: 18px 0;
    border: 1px solid var(--line);
}
.alert.success { background: var(--ok-bg);  border-color: var(--ok-bd); }
.alert.closed  { background: rgba(255,255,255,0.05); }
.alert.error   { background: var(--err-bg); border-color: var(--err-bd); }
.alert a { color: var(--accent); }

/* ---- Form ---- */
form.rsvp, .admin form { margin-top: 6px; }
label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    font-size: 0.95rem;
}
input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 13px 14px;
    font-size: 1rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(178, 58, 72, 0.3);
}
textarea { resize: vertical; }

fieldset.attend {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 18px 0 4px;
    padding: 12px 14px;
}
fieldset.attend legend { padding: 0 6px; font-weight: 600; }
.radio, .checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-weight: 400;
    cursor: pointer;
}
.radio input, .checkbox input { width: 20px; height: 20px; accent-color: var(--accent); }

.plus-one {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 16px 0;
}
.plus-one .checkbox { margin: 4px 0 2px; }

button[type="submit"] {
    width: 100%;
    margin-top: 22px;
    padding: 15px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fbf3ea;
    background: linear-gradient(90deg, var(--accent), #8f2a37);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.15s ease;
}
button[type="submit"]:hover { filter: brightness(1.06); }
button[type="submit"]:active { transform: translateY(1px); }

.foot {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

/* ---- Admin ---- */
.admin { max-width: 960px; }
.admin-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.admin-head h1 { margin: 0; font-size: 1.6rem; }
.admin-actions { display: flex; gap: 8px; }
.btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    color: #fbf3ea;
    background: var(--accent);
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}
.stat {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
}
.stat .num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 0.78rem; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
a.sortlink, a.sortlink:visited { color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap; }
a.sortlink:hover { color: var(--accent); }
tr.decline { opacity: 0.55; }
.nowrap { white-space: nowrap; }

/* Begleitung als eingerückte Unterzeile unter der Hauptperson */
tr.subrow td { border-top: none; padding-top: 2px; }
tr.subrow .po-cell { padding-left: 26px; }

@media (max-width: 560px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .card { padding: 22px 16px 18px; }
}
