:root {
    --bg: #f7f7f6;
    --surface: #ffffff;
    --text: #1d242b;
    --muted: #5b6672;
    --primary: #293f5e;
    --primary-contrast: #ffffff;
    --border: #d7dde4;
    --radius: 12px;
    --space: 1rem;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    line-height: 1.5;
    position: relative;
    min-height: 100vh;
}

#party-effects-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 2;
}

.site-header__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header__brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.site-header__nav {
    display: flex;
    gap: 1rem;
}

.site-header__nav a {
    color: var(--muted);
    text-decoration: none;
}

.page-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.page-home {
    background:
        radial-gradient(circle at 20% 20%, #f6efe5 0%, rgba(246, 239, 229, 0) 40%),
        radial-gradient(circle at 80% 0%, #e8edf6 0%, rgba(232, 237, 246, 0) 45%),
        #f8f6f2;
}

.hero {
    background: linear-gradient(145deg, #20344f, #3f5f87);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 1rem;
    padding: 1rem;
}

.card--narrow {
    max-width: 480px;
}

.gallery {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.gallery--elegant {
    margin-bottom: 2rem;
}

.gallery img {
    width: 100%;
    border-radius: var(--radius);
    height: 220px;
    object-fit: cover;
}

.flash {
    max-width: 980px;
    margin: 0.8rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #eef2f7;
}

.flash--error {
    border-color: #dd9c9c;
    background: #ffefef;
}

.flash--success {
    border-color: #9ac89c;
    background: #effcef;
}

.form {
    display: grid;
    gap: 0.6rem;
}

.form__label {
    font-size: 0.95rem;
    color: var(--muted);
}

.form__input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    font: inherit;
}

.form__choice {
    display: block;
    margin-bottom: 0.4rem;
}

.button {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--primary-contrast);
    border-radius: 10px;
    padding: 0.58rem 0.9rem;
    font: inherit;
    cursor: pointer;
}

.button--ghost {
    background: transparent;
    color: var(--primary);
}

.button--small {
    padding: 0.35rem 0.6rem;
    font-size: 0.88rem;
}

.stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.stats__item {
    background: #f2f5f8;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border);
    text-align: left;
    padding: 0.5rem 0.4rem;
    vertical-align: top;
}

.table td form {
    margin: 0;
}

.actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.message-indicator {
    font-size: 1rem;
    line-height: 1;
    cursor: help;
}

.message-indicator--empty {
    color: var(--muted);
    cursor: default;
}

.qr-box {
    margin-top: 1rem;
}

.qr-box img {
    width: 180px;
    max-width: 100%;
}

.site-footer {
    text-align: center;
    color: var(--muted);
    padding: 1.5rem 1rem 2rem;
    position: relative;
    z-index: 2;
}

.page-home .site-footer {
    display: none;
}
.page-home.page-print-invite .site-footer {
    display: block;
}

.invite-hero {
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #ddd6c9;
    border-radius: 18px;
    padding: 2.2rem 1.2rem 1.8rem;
    margin-top: 1rem;
}

.invite-hero__kicker {
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #8d7552;
    margin: 0 0 0.8rem;
    font-size: 0.84rem;
}

.invite-hero__title {
    margin: 0;
    font-size: clamp(2rem, 8vw, 3.6rem);
    letter-spacing: 0.08em;
}

.invite-hero__names {
    margin: 0.6rem 0 0;
    color: #5d4d3b;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.invite-hero__date {
    margin: 1.2rem 0 0;
    font-size: 1.2rem;
    color: #25313f;
}

.invite-hero__lead {
    max-width: 640px;
    margin: 1rem auto 0;
    color: #3d4a59;
}

.invite-card {
    background: #ffffffde;
    border: 1px solid #dfd6ca;
    border-radius: 18px;
    margin-top: 1rem;
    padding: 1.2rem;
}

.invite-card h2 {
    margin-top: 0;
    color: #2f3e52;
}

.invite-card__list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
}

.invite-card__note {
    margin: 1rem 0 0;
    color: #4d5e74;
}

.invite-card--rsvp,
.invite-card--qr {
    margin-bottom: 2rem;
}

.print-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 1.2rem;
}

.print-qr {
    width: 180px;
    margin-top: 0.5rem;
}

@media (min-width: 800px) {
    .invite-hero {
        padding: 3.4rem 3rem 2.7rem;
    }
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero {
        padding: 2rem;
    }
}

@media print {
    .site-header,
    .site-footer,
    .flash {
        display: none;
    }
    .page-content {
        max-width: none;
        padding: 0;
    }
}
