/* ============================================================
   Nicholas & Allyson — wedding site
   Palette and typography carried over from the original site:
   grayscale/elegant, Great Vibes script, Raleway sans, Georgia serif.
   ============================================================ */

:root {
    --bg-white: #ffffff;
    --bg-light: #f7f6f4;
    --bg-soft: #efedea;
    --bg-dark: #1c1c1c;
    --bg-dark-2: #242424;
    --text-dark: #2a2a2a;
    --text-mid: #6b6b6b;
    --text-light: #eaeaea;
    --text-faint: #bdbdbd;
    --accent: #bfbfbf;
    --accent-dark: #9d9d9d;
    --border: #e3e0dc;
    --border-dark: rgba(255, 255, 255, 0.12);

    --attending: #5f8465;
    --declined: #b05d5d;
    --pending: #c9a24b;

    --font-script: "Italianno", cursive;
    --font-sans: "Raleway", "Segoe UI", sans-serif;
    --font-serif: "Georgia", "Times New Roman", serif;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.18);

    --radius: 18px;
    --radius-sm: 10px;

    --nav-height: 72px;
}

/* ---------- Base ---------- */

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: var(--font-serif);
    color: var(--text-dark);
    background: var(--bg-white);
}

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

img {
    max-width: 100%;
}

/* Blazor's FocusOnNavigate focuses the page heading after navigation;
   headings aren't interactive, so don't draw a focus ring around them. */
h1:focus, h2:focus, h3:focus {
    outline: none;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
}

/* ---------- Buttons & forms ---------- */

.btn {
    display: inline-block;
    padding: 13px 34px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    line-height: 1.2;
}

.btn-hero {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

    .btn-hero:hover {
        background: #fff;
        color: var(--text-dark);
        border-color: #fff;
    }

.btn-dark-solid {
    background: var(--bg-dark);
    color: #fff;
    border-color: var(--bg-dark);
}

    .btn-dark-solid:hover {
        background: #3a3a3a;
        border-color: #3a3a3a;
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.btn-solid {
    background: var(--attending);
    color: #fff;
    border-color: var(--attending);
}

    .btn-solid:hover {
        filter: brightness(1.08);
    }

.btn-ghost {
    background: transparent;
    color: var(--text-dark);
    border-color: var(--accent-dark);
}

    .btn-ghost:hover {
        background: var(--bg-soft);
        border-color: var(--text-dark);
    }

.btn-danger {
    background: transparent;
    color: var(--declined);
    border-color: var(--declined);
}

    .btn-danger:hover {
        background: var(--declined);
        color: #fff;
    }

.btn-sm {
    padding: 7px 16px;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 8px;
}

.form-row {
    margin-bottom: 18px;
    text-align: left;
}

    .form-row label {
        display: block;
        margin-bottom: 7px;
        font-family: var(--font-sans);
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--text-mid);
    }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .checkbox-row label {
        margin-bottom: 0;
    }

.input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .input:focus {
        outline: none;
        border-color: var(--accent-dark);
        box-shadow: 0 0 0 4px rgba(157, 157, 157, 0.14);
    }

.input-sm {
    padding: 6px 10px;
    font-size: 0.9rem;
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6b6b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 38px;
}

textarea.input {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.notice {
    margin: 14px 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.notice-warn {
    background: #faf3e3;
    border: 1px solid #e8d9b0;
    color: #7a6633;
}

.notice-info {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-mid);
}

/* ---------- Navigation ---------- */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(18px, 4vw, 44px);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

    .site-nav.scrolled {
        background: rgba(20, 20, 20, 0.82);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    }

.nav-monogram {
    font-family: var(--font-script);
    font-size: 2.4rem;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    line-height: 1;
}

.nav-amp {
    font-size: 1.2rem;
    color: var(--text-faint);
    margin: 0 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 26px);
}

    .nav-links a {
        font-family: var(--font-sans);
        font-size: 0.78rem;
        font-weight: 500;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: #f0f0f0;
        text-decoration: none;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
        padding: 6px 2px;
        border-bottom: 1px solid transparent;
        transition: border-color 0.2s ease, color 0.2s ease;
    }

        .nav-links a:hover {
            color: #fff;
            border-bottom-color: rgba(255, 255, 255, 0.6);
        }

    .nav-links .nav-cta {
        border: 1px solid rgba(255, 255, 255, 0.65);
        border-radius: 999px;
        padding: 9px 22px;
        transition: all 0.2s ease;
    }

        .nav-links .nav-cta:hover {
            background: #fff;
            color: var(--text-dark);
            border-color: #fff;
        }

.nav-logout {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 6px 2px;
}

    .nav-logout:hover {
        color: #fff;
    }

/* Mobile toggle */

.nav-toggle {
    display: none;
    position: relative;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

    .nav-toggle span {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #f5f5f5;
        transition: transform 0.25s ease;
    }

        .nav-toggle span:first-child {
            transform: translate(-50%, calc(-50% - 3px));
        }

        .nav-toggle span:last-child {
            transform: translate(-50%, calc(-50% + 3px));
        }

    .nav-toggle.open span:first-child {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .nav-toggle.open span:last-child {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 15, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.nav-overlay-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

    .nav-overlay-links a {
        font-family: var(--font-sans);
        font-size: 1.05rem;
        font-weight: 300;
        letter-spacing: 0.32em;
        text-transform: uppercase;
        color: var(--text-light);
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .nav-overlay-links a:hover {
            color: #fff;
        }

    .nav-overlay-links .overlay-cta {
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 999px;
        padding: 12px 40px;
        margin-top: 8px;
    }

.overlay-admin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

    .overlay-admin button {
        background: transparent;
        border: none;
        cursor: pointer;
        font-family: var(--font-sans);
        font-size: 0.9rem;
        letter-spacing: 0.28em;
        text-transform: uppercase;
        color: var(--text-faint);
    }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%) contrast(1.03);
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.12) 40%,
        rgba(0, 0, 0, 0.45) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 6vw;
    animation: hero-rise 1.1s cubic-bezier(0.19, 1, 0.22, 1) both;
}

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-kicker {
    margin: 0 0 18px 0;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(0.72rem, 1.4vw, 0.9rem);
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.hero-names {
    margin: 0;
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 8.5rem);
    line-height: 1.02;
    color: #fff;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}

.hero-amp {
    font-size: 0.55em;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0.08em;
}

.hero-rule {
    width: 90px;
    height: 1px;
    margin: 26px auto;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.hero-date {
    margin: 0 0 34px 0;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(0.85rem, 1.8vw, 1.15rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #ddd;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 26px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

    .hero-scroll span {
        width: 3px;
        height: 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.85);
        animation: scroll-hint 1.8s ease-in-out infinite;
    }

@keyframes scroll-hint {
    0%, 100% { transform: translateY(0); opacity: 1; }
    55% { transform: translateY(12px); opacity: 0.15; }
}

/* ---------- Sections ---------- */

.section {
    padding: clamp(80px, 11vw, 130px) 6vw;
}

.section-light {
    background: var(--bg-white);
}

.section-soft {
    background: var(--bg-light);
}

.section-dark {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    color: var(--text-light);
}

.section-inner {
    max-width: 1050px;
    margin: 0 auto;
    text-align: center;
}

.section-kicker {
    margin: 0 0 12px 0;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-mid);
}

.section-dark .section-kicker {
    color: var(--text-faint);
}

.section-heading {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 4vw, 3rem);
    color: var(--text-dark);
}

.section-dark .section-heading {
    color: var(--text-light);
}

.section-divider {
    width: 80px;
    height: 2px;
    margin: 22px auto 26px auto;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.section-copy {
    max-width: 640px;
    margin: 0 auto 28px auto;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #4f4f4f;
}

.section-dark .section-copy {
    color: #cfcfcf;
}

/* Scroll reveal — visible by default; JS arms the animation */

.reveal-armed {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

    .reveal-armed.in-view {
        opacity: 1;
        transform: translateY(0);
    }

@media (prefers-reduced-motion: reduce) {
    .reveal-armed {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-content {
        animation: none;
    }
}

/* ---------- Map ---------- */

.map-card {
    max-width: 900px;
    margin: 14px auto 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.map-frame {
    display: block;
    width: 100%;
    height: 430px;
    border: 0;
}

/* ---------- Timeline ---------- */

.timeline {
    max-width: 620px;
    margin: 46px auto 0 auto;
    position: relative;
    padding-left: 26px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    text-align: left;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    position: relative;
    padding-bottom: 40px;
}

    .timeline-item:last-child {
        padding-bottom: 0;
    }

    .timeline-item::before {
        content: "";
        position: absolute;
        left: -31px;
        top: 7px;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--bg-dark);
        border: 2px solid var(--accent);
    }

.timeline-time {
    min-width: 92px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    color: var(--text-faint);
    margin-top: 3px;
    text-align: right;
}

.timeline-details h3 {
    margin: 0 0 6px 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.28rem;
    color: #fff;
}

.timeline-details p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.7;
    color: #bdbdbd;
}

/* ---------- Cards ---------- */

.card-grid {
    display: grid;
    gap: 24px;
    margin-top: 44px;
    text-align: left;
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.info-card {
    border-radius: var(--radius);
    padding: 34px 28px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .info-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }

    .info-card h3 {
        margin: 0 0 14px 0;
        font-family: var(--font-serif);
        font-weight: 400;
        font-size: 1.3rem;
        color: var(--text-dark);
    }

    .info-card p {
        margin: 0 0 10px 0;
        font-size: 0.98rem;
        line-height: 1.75;
        color: #555;
    }

    .info-card ul {
        margin: 0;
        padding-left: 0;
        list-style: none;
    }

    .info-card li {
        padding: 8px 0;
        border-bottom: 1px dashed var(--border);
        font-size: 0.98rem;
        line-height: 1.6;
        color: #555;
    }

        .info-card li:last-child {
            border-bottom: none;
        }

.menu-card-intro {
    font-style: italic;
    color: var(--text-mid);
    margin-top: -4px;
}

.menu-note {
    font-size: 0.85rem;
    color: var(--text-mid);
    font-style: italic;
}

.card-note {
    font-size: 0.88rem;
    font-style: italic;
    color: var(--text-mid);
}

.dark-card {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--border-dark);
    box-shadow: none;
}

    .dark-card h3 {
        color: #fff;
    }

    .dark-card p {
        color: #c9c9c9;
    }

    .dark-card .card-note {
        color: #9b9b9b;
    }

/* ---------- Registry ---------- */

.registry-grid {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.registry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 32px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-dark);
    text-decoration: none;
    transition: all 0.25s ease;
}

    .registry-card:hover {
        background: rgba(255, 255, 255, 0.09);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-4px);
    }

.registry-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #fff;
}

.registry-arrow {
    font-size: 1.2rem;
    color: var(--text-faint);
    transition: transform 0.25s ease;
}

.registry-card:hover .registry-arrow {
    transform: translateX(5px);
    color: #fff;
}

/* ---------- Toast ---------- */

.toast-notice {
    position: fixed;
    top: calc(var(--nav-height) + 14px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 13px 26px;
    border-radius: 999px;
    background: rgba(28, 28, 28, 0.92);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: toast-in 0.35s ease both;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ---------- Sub-pages (RSVP, login, admin) ---------- */

.subpage {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 46px) 5vw 70px 5vw;
    background:
        radial-gradient(1200px 500px at 50% -100px, #ffffff 0%, transparent 70%),
        var(--bg-light);
}

.subpage-shell {
    margin: 0 auto;
}

    .subpage-shell.narrow {
        max-width: 660px;
    }

    .subpage-shell.wide {
        max-width: 1250px;
    }

.subpage-header {
    text-align: center;
    margin-bottom: 34px;
}

/* Sub-pages sit on a light background — the fixed nav needs its dark glass */
.subpage ~ * .site-nav,
body:has(.subpage) .site-nav {
    background: rgba(20, 20, 20, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.panel-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: clamp(28px, 5vw, 52px);
    text-align: center;
    margin-bottom: 26px;
}

    .panel-card.left-align {
        text-align: left;
    }

.panel-title {
    margin: 0 0 20px 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.35rem;
    color: var(--text-dark);
}

/* ---------- RSVP ---------- */

.guest-rsvp-card {
    margin: 22px 0;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-light);
    text-align: left;
}

.guest-rsvp-name {
    margin: 0 0 16px 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--text-dark);
}

.rsvp-textarea {
    min-height: 84px;
}

.rsvp-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

/* ---------- Login ---------- */

.login-card {
    margin-top: 4vh;
}

/* ---------- Guest list admin ---------- */

.stat-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.stat-chip {
    min-width: 120px;
    padding: 16px 22px;
    border-radius: var(--radius);
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--text-dark);
}

.stat-label {
    display: block;
    margin-top: 2px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-mid);
}

.stat-attending .stat-number { color: var(--attending); }
.stat-declined .stat-number { color: var(--declined); }
.stat-pending .stat-number { color: var(--pending); }

.guest-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 22px;
    margin-bottom: 12px;
}

.tools-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.guest-search {
    flex: 1;
    min-width: 220px;
    max-width: 340px;
    margin-left: auto;
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.status-attending {
    background: rgba(95, 132, 101, 0.14);
    color: var(--attending);
}

.status-declined {
    background: rgba(176, 93, 93, 0.13);
    color: var(--declined);
}

.status-pending {
    background: rgba(201, 162, 75, 0.16);
    color: #8f7231;
}

/* ---------- Tables ---------- */

.guest-table-wrap {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

    .data-table th {
        padding: 14px 16px;
        text-align: left;
        font-family: var(--font-sans);
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--text-mid);
        border-bottom: 1px solid var(--border);
        background: var(--bg-light);
        white-space: nowrap;
    }

    .data-table td {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
        color: var(--text-dark);
        vertical-align: middle;
    }

    .data-table tbody tr:last-child td {
        border-bottom: none;
    }

    .data-table tbody tr:hover {
        background: var(--bg-light);
    }

.actions-cell {
    white-space: nowrap;
}

    .actions-cell .btn {
        margin-right: 6px;
    }

/* Mobile guest cards */

.guest-cards {
    display: none;
}

.guest-card-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.guest-card-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.95rem;
}

    .guest-card-row:last-of-type {
        border-bottom: none;
    }

.guest-card-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-mid);
    padding-top: 3px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.guest-card-mini {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

    .guest-card-mini:last-child {
        border-bottom: none;
    }

/* ---------- Seating chart ---------- */

.seating-card {
    padding: clamp(12px, 2vw, 24px);
}

.chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.seating-svg-host {
    border-radius: var(--radius-sm);
    background:
        radial-gradient(circle at 50% 30%, #fdfdfc 0%, var(--bg-light) 100%);
    border: 1px solid var(--border);
    overflow: hidden;
    touch-action: none; /* let pointer events drive dragging on touch screens */
}

    .seating-svg-host svg {
        width: 100%;
        height: auto;
        display: block;
        user-select: none;
    }

.chart-table {
    cursor: pointer;
}

.seating-svg-host[data-edit-mode="true"] .chart-table {
    cursor: grab;
}

.table-shape {
    fill: #ffffff;
    stroke: var(--text-dark);
    stroke-width: 1.6;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
}

.seating-svg-host[data-edit-mode="true"] .table-shape {
    stroke-dasharray: 5 4;
    stroke: var(--accent-dark);
}

.table-label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-anchor: middle;
    fill: var(--text-dark);
    pointer-events: none;
}

.chart-seat {
    cursor: pointer;
}

    .chart-seat circle {
        stroke-width: 1.4;
        transition: fill 0.2s ease, stroke 0.2s ease;
    }

    .chart-seat:hover circle {
        stroke-width: 2.4;
    }

.seat-label {
    font-family: var(--font-sans);
    font-size: 8.5px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
}

.seat-empty circle {
    fill: #ffffff;
    stroke: var(--accent-dark);
}

.seat-empty .seat-label {
    fill: var(--text-mid);
}

.seat-attending circle {
    fill: var(--attending);
    stroke: #4c6b51;
}

.seat-declined circle {
    fill: var(--declined);
    stroke: #8f4a4a;
}

.seat-pending circle {
    fill: var(--pending);
    stroke: #a3823a;
}

.seat-attending .seat-label,
.seat-declined .seat-label,
.seat-pending .seat-label {
    fill: #ffffff;
}

.seat-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    margin-top: 20px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--text-mid);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-attending { background: var(--attending); }
.legend-pending { background: var(--pending); }
.legend-declined { background: var(--declined); }
.legend-empty {
    background: var(--bg-white);
    border: 1px solid var(--accent-dark);
}

/* ---------- Popups ---------- */

.popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: backdrop-in 0.2s ease both;
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-card {
    width: 430px;
    max-width: 94vw;
    max-height: 86vh;
    overflow-y: auto;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: popup-in 0.25s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.popup-wide {
    width: 640px;
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light);
    position: sticky;
    top: 0;
}

    .popup-header h4 {
        margin: 0;
        font-family: var(--font-serif);
        font-weight: 400;
        font-size: 1.15rem;
        color: var(--text-dark);
    }

.popup-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-mid);
    padding: 2px 6px;
    border-radius: 8px;
}

    .popup-close:hover {
        color: var(--text-dark);
        background: var(--bg-soft);
    }

.popup-body {
    padding: 22px 24px;
}

    .popup-body p {
        margin: 0 0 12px 0;
        line-height: 1.6;
    }

.popup-rule {
    border: none;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.table-guests-mobile {
    display: none;
}

/* ---------- RSVP reminders ---------- */

.hint-copy {
    margin: -8px 0 14px 0;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    color: var(--text-mid);
}

    .hint-copy code {
        background: var(--bg-soft);
        border-radius: 6px;
        padding: 1px 6px;
    }

.party-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

    .party-card-head .panel-title {
        margin-bottom: 10px;
    }

.party-count {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-mid);
    white-space: nowrap;
}

.party-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.member-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-light);
    font-size: 0.9rem;
}

.party-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 18px;
    align-items: end;
}

.party-actions {
    display: flex;
    gap: 10px;
    padding-bottom: 18px;
}

.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 820px) {
    .party-controls {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .party-actions {
        padding-bottom: 0;
    }

        .party-actions .btn {
            flex: 1;
        }
}

/* ---------- Party builder ---------- */

.party-rename {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.party-name-input {
    max-width: 320px;
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

.party-search {
    position: relative;
    margin-top: 6px;
    max-width: 420px;
}

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.search-result {
    text-align: left;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.15s ease;
}

    .search-result:last-child {
        border-bottom: none;
    }

    .search-result:hover {
        background: var(--bg-light);
    }

.search-empty {
    padding: 11px 14px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-mid);
}

.party-member-list {
    margin: 14px 0 16px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.party-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-white);
}

    .party-member-row:last-child {
        border-bottom: none;
    }

.party-member-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leader-star {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--accent-dark);
    padding: 2px;
    transition: transform 0.15s ease, color 0.15s ease;
}

    .leader-star:hover {
        transform: scale(1.2);
        color: var(--pending);
    }

    .leader-star.is-leader {
        color: var(--pending);
    }

.member-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--text-mid);
    padding: 2px 6px;
    border-radius: 8px;
}

    .member-remove:hover {
        color: var(--declined);
        background: rgba(176, 93, 93, 0.1);
    }

/* ---------- Background music ---------- */

.music-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 150;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 20, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #cfcfcf;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.25s ease;
}

    .music-toggle:hover {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.6);
        transform: translateY(-2px);
    }

    .music-toggle .music-icon {
        line-height: 1;
    }

    /* Paused state: a subtle slash through the note */
    .music-toggle:not(.playing)::after {
        content: "";
        position: absolute;
        width: 26px;
        height: 1.5px;
        background: #cfcfcf;
        transform: rotate(-45deg);
        border-radius: 999px;
    }

    .music-toggle.playing .music-icon {
        animation: music-sway 2.2s ease-in-out infinite;
    }

@keyframes music-sway {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
    .music-toggle.playing .music-icon {
        animation: none;
    }
}

/* ---------- Footer ---------- */

.site-footer {
    padding: 60px 6vw 46px 6vw;
    background: #131313;
    text-align: center;
}

.footer-names {
    margin: 0;
    font-family: var(--font-script);
    font-size: 2.7rem;
    color: #eee;
}

.footer-date {
    margin: 10px 0 0 0;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: #8b8b8b;
}

.footer-login {
    display: inline-block;
    margin-top: 24px;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #6d6d6d;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

    .footer-login:hover {
        color: #bbb;
        border-bottom-color: #666;
    }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .guest-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .card-grid-3,
    .card-grid-2 {
        grid-template-columns: 1fr;
    }

    .guest-form-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 4px;
    }

    .timeline-time {
        text-align: left;
        min-width: 0;
    }

    .timeline-item::before {
        left: -25px;
    }

    .map-frame {
        height: 330px;
    }

    .guest-table-wrap {
        display: none;
    }

    .guest-cards {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .table-guests-desktop {
        display: none;
    }

    .table-guests-mobile {
        display: block;
    }

    .rsvp-actions {
        flex-direction: column-reverse;
    }

        .rsvp-actions .btn {
            width: 100%;
        }

    .guest-search {
        max-width: none;
        margin-left: 0;
    }
}
