:root {
    color-scheme: light;
    font-family: Georgia, "Times New Roman", serif;
    color: #2b1d14;
    background: #080e21;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
    min-width: 280px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(2px 2px at 15% 20%, #fff, transparent 70%),
        radial-gradient(1.5px 1.5px at 28% 12%, #fffdf0, transparent 70%),
        radial-gradient(2px 2px at 42% 28%, #fff, transparent 70%),
        radial-gradient(1px 1px at 55% 15%, #fffdf0, transparent 70%),
        radial-gradient(2px 2px at 64% 32%, #fff, transparent 70%),
        radial-gradient(1.5px 1.5px at 88% 22%, #fffdf0, transparent 70%),
        radial-gradient(1px 1px at 92% 10%, #fff, transparent 70%),
        radial-gradient(circle at 78% 14%, #243663 0, #162244 35%, #080e21 75%);
    background-attachment: fixed;
}

.page-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(1.25rem, 4vw, 3rem) 1rem;
}

.card {
    width: min(100%, 48rem);
    padding: clamp(1.25rem, 5vw, 3rem);
    border: 2px solid #d4af37;
    border-radius: 6px;
    background: linear-gradient(180deg, #f8f1e3 0%, #ede0c8 100%);
    box-shadow: 0 18px 45px rgb(0 0 0 / 55%), inset 0 0 35px rgb(173 138 82 / 20%);
    line-height: 1.75;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: #8b1e1e;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: #8b1e1e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 7vw, 2.7rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.message {
    max-width: 60ch;
    margin: 1.25rem 0 0;
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.7;
    white-space: pre-line;
}

.music-section { margin-top: 1.75rem; }
.music-section[hidden] { display: none; }

h2 {
    margin: 0 0 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgb(139 30 30 / 30%);
    color: #8b1e1e;
    font-size: 1.25rem;
}

.player {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgb(173 138 82 / 40%);
    border-radius: 5px;
    background: #fff;
}

.player iframe {
    display: block;
    width: 100%;
    min-height: 152px;
    border: 0;
}

.gift-message {
    margin: 0.65rem 0 0;
    color: #5b4636;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
}

.status {
    margin: 1.25rem 0 0;
    color: #691414;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}

.status:empty { display: none; }

body[data-page="home"] .card {
    display: block;
    text-align: center;
}

.guest-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.guest-list a {
    display: block;
    padding: 0.55rem;
    border: 1px solid #d4af37;
    border-radius: 0.35rem;
    background: #fffaf0;
    color: #691414;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.guest-list img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 0.45rem;
    border-radius: 0.2rem;
    object-fit: cover;
}

.guest-list span {
    display: block;
}

.guest-list a:hover,
.guest-list a:focus-visible {
    background: #8b1e1e;
    color: #fff;
}

.guest-list a:focus-visible {
    outline: 3px solid #8b1e1e;
    outline-offset: 3px;
}

footer {
    color: #b8c2dc;
    font-size: 0.9rem;
    text-align: center;
}

footer span { color: #d4af37; }

@media (min-width: 760px) and (orientation: landscape) {
    .card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.8fr);
        align-items: center;
        column-gap: 2rem;
    }

    .eyebrow, h1, .message, .status { grid-column: 1; }
    .music-section { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
}

@media (max-height: 480px) and (orientation: landscape) {
    .page-shell { justify-content: flex-start; padding-block: 0.75rem; }
    .card { padding: 1.25rem; }
    h1 { font-size: clamp(1.6rem, 6vh, 2.5rem); }
    .message { margin-top: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

body[data-theme="winter"] {
    color: #07537a;
    background-color: #dceef6;
    background-image:
        linear-gradient(180deg, rgb(225 242 252 / 8%), rgb(8 28 44 / 30%)),
        url("../images/brigit-winterbos.jpg");
    background-position: center, center 42%;
    background-size: cover;
    background-attachment: fixed;
}

body[data-theme="winter"] .page-shell {
    width: min(100% - 2rem, 52rem);
    justify-content: center;
    margin-inline: auto;
}

body[data-theme="winter"] .card {
    display: block;
    width: 100%;
    padding: clamp(1.25rem, 5vw, 3rem);
    border: 0;
    background: radial-gradient(ellipse at center, rgb(245 251 255 / 84%), rgb(233 247 255 / 55%) 60%, rgb(233 247 255 / 0%) 100%);
    box-shadow: none;
    text-align: center;
}

body[data-theme="winter"] .eyebrow {
    color: #a87b2c;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

body[data-theme="winter"] h1 {
    max-width: 13ch;
    margin-inline: auto;
    color: #07537a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 4.75rem;
    font-weight: 800;
    line-height: 0.98;
    text-transform: uppercase;
    text-wrap: balance;
    text-shadow: 0 1px 14px rgb(255 255 255 / 90%);
}

body[data-theme="winter"] .message {
    margin: 1.25rem auto 0;
    color: #174b66;
    font-size: 1.15rem;
    text-shadow: 0 1px 8px rgb(255 255 255 / 80%);
}

body[data-theme="winter"] .music-section {
    width: min(100%, 34rem);
    margin: 2rem auto 0;
}

body[data-theme="winter"] h2 {
    border: 0;
    color: #07537a;
    text-shadow: 0 1px 8px rgb(255 255 255 / 85%);
}

body[data-theme="winter"] .player {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-theme="winter"] .player iframe {
    border-radius: 0.75rem;
}

body[data-theme="winter"] .status {
    color: #174b66;
    text-shadow: 0 1px 8px rgb(255 255 255 / 85%);
}

body[data-theme="winter"] footer {
    color: #07537a;
    text-shadow: 0 1px 8px #fff;
}

body[data-theme="winter"] footer span {
    color: #a87b2c;
}

@media (max-width: 600px) {
    body[data-theme="winter"] .page-shell {
        width: min(100% - 1rem, 52rem);
        padding-inline: 0.25rem;
    }

    body[data-theme="winter"] .card {
        padding: 1.5rem 1rem;
    }

    body[data-theme="winter"] h1 {
        max-width: 12ch;
        font-size: 2.8rem;
        line-height: 1.02;
    }
}

body[data-guest] {
    color: var(--theme-text, #2b3038);
    background-color: var(--theme-bg, #343943);
    background-image:
        linear-gradient(180deg, var(--theme-overlay-top, rgb(255 255 255 / 5%)), var(--theme-overlay-bottom, rgb(0 0 0 / 20%))),
        var(--theme-image, none),
        radial-gradient(ellipse at 50% 25%, var(--theme-glow, rgb(255 255 255 / 25%)), transparent 60%),
        linear-gradient(145deg, var(--theme-bg, #343943), var(--theme-bg-deep, #171b22));
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

body[data-guest] .page-shell {
    width: min(100% - 2rem, 52rem);
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
    padding: clamp(1.25rem, 4vw, 3rem) 0;
}

body[data-guest] .card {
    display: block;
    width: 100%;
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--theme-border, rgb(255 255 255 / 60%));
    border-radius: 0.75rem;
    background: var(--theme-card, rgb(255 255 255 / 78%));
    box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 18%);
    color: var(--theme-text, #2b3038);
    text-align: center;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

body[data-guest] h2 {
    margin: 0 0 0.75rem;
    padding: 0;
    border: 0;
    color: var(--theme-heading, #303945);
    font-size: 1.2rem;
}

body[data-guest] h1 {
    color: var(--theme-heading, #303945);
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1.02;
    text-shadow: 0 1px 14px rgb(255 255 255 / 70%);
    text-wrap: balance;
}

body[data-guest] .message {
    max-width: 60ch;
    margin: 1rem auto 0;
    color: var(--theme-text, #2b3038);
    font-size: 1rem;
    line-height: 1.65;
    white-space: pre-line;
}

body[data-guest] .message[hidden],
body[data-guest] .music-section[hidden] {
    display: none;
}

body[data-guest] .music-section {
    width: min(100%, 34rem);
    margin: 2rem auto 0;
}

body[data-guest] #music-title[hidden] {
    display: none;
}

body[data-guest] .player {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body[data-guest] .player iframe {
    min-height: 152px;
    border-radius: 0.75rem;
}

body[data-guest] .gift-message {
    color: var(--theme-accent, var(--theme-text, #2b3038));
}

body[data-guest] .status {
    color: var(--theme-accent, var(--theme-text, #2b3038));
}

@media (max-width: 600px) {
    body[data-guest] .page-shell {
        width: min(100% - 1rem, 52rem);
        padding-block: 1rem;
    }

    body[data-guest] .card {
        padding: 1.5rem 1rem;
    }

    body[data-guest] h1 {
        font-size: 2.5rem;
    }
}

@media (max-height: 480px) and (orientation: landscape) {
    body[data-guest] .page-shell {
        justify-content: flex-start;
        min-height: 100svh;
        padding-block: 0.75rem;
    }

    body[data-guest] .card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.9fr);
        align-items: center;
        column-gap: 1.5rem;
        padding: 1.25rem;
    }

    body[data-guest] h1,
    body[data-guest] .message,
    body[data-guest] .status {
        grid-column: 1;
    }

    body[data-guest] .music-section {
        grid-column: 2;
        grid-row: 1 / span 3;
        margin-block: 0;
    }

    body[data-guest] h1 {
        font-size: 2.25rem;
    }

    body[data-guest] .message {
        margin-top: 0.75rem;
        font-size: 0.9rem;
        line-height: 1.45;
    }
}