/* =========================================================================
   Gatherly design system
   Tokens first, then layout primitives, then components. Everything is
   responsive down to 360px and honours the visitor's light/dark preference.
   ========================================================================= */

:root {
    color-scheme: light dark;

    --brand:        #6d5efc;
    --brand-ink:    #4c3ce0;
    --brand-soft:   #efecff;
    --accent:       #e2467d;
    --gold:         #f0a81e;

    --bg:           #f6f5fb;
    --surface:      #ffffff;
    --surface-2:    #fbfaff;
    --line:         #e6e3f0;
    --line-strong:  #d3cfe4;

    --ink:          #191529;
    --ink-2:        #4a4560;
    --ink-3:        #77728c;

    --ok:           #148a55;
    --ok-soft:      #e2f6ec;
    --warn:         #b06a00;
    --warn-soft:    #fdf1dc;
    --bad:          #cc3344;
    --bad-soft:     #fdecee;
    --info:         #2a6fd6;
    --info-soft:    #e8f1fd;

    --r-sm: 8px;
    --r:    14px;
    --r-lg: 22px;
    --r-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(24, 20, 45, .06), 0 1px 3px rgba(24, 20, 45, .04);
    --shadow:    0 6px 20px rgba(24, 20, 45, .08);
    --shadow-lg: 0 18px 48px rgba(24, 20, 45, .14);

    --space: 16px;
    --maxw: 1120px;

    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:          #101018;
        --surface:     #1a1a25;
        --surface-2:   #21212e;
        --line:        #2e2e3d;
        --line-strong: #3d3d50;
        --ink:         #f2f1f8;
        --ink-2:       #c0bdd0;
        --ink-3:       #918da5;
        --brand-soft:  #262046;
        --ok-soft:     #10301f;
        --warn-soft:   #33240c;
        --bad-soft:    #351a1e;
        --info-soft:   #14243c;
        --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
        --shadow:      0 8px 24px rgba(0, 0, 0, .45);
        --shadow-lg:   0 20px 50px rgba(0, 0, 0, .6);
    }
}

/* ------------------------------------------------------------------ reset */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
a  { color: var(--brand-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.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;
}

/* ----------------------------------------------------------------- layout */

.wrap { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 32px, 720px); margin-inline: auto; }
.wrap-tight  { width: min(100% - 32px, 480px); margin-inline: auto; }

.stack > * + * { margin-top: var(--space); }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 32px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-end { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1 1 auto; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }

.text-center { text-align: center; }
.muted { color: var(--ink-3); }
.dim   { color: var(--ink-2); }
.tiny  { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", "Courier New", monospace; font-size: .85em; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }

/* ------------------------------------------------------------------ cards */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card-flush { padding: 0; overflow: hidden; }
.card-pad { padding: 20px 24px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-quiet { background: var(--surface-2); box-shadow: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; line-height: 1;
    padding: 12px 20px; border-radius: var(--r-pill);
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(109, 94, 252, .34); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--ink-2); padding-inline: 12px; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #a92b39; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .86rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ----------------------------------------------------------------- pills */

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: var(--r-pill);
    font-size: .78rem; font-weight: 700; letter-spacing: .01em;
    background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.chip-yes      { background: var(--ok-soft);   color: var(--ok);   border-color: transparent; }
.chip-no       { background: var(--bad-soft);  color: var(--bad);  border-color: transparent; }
.chip-maybe    { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip-waitlist { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip-pending  { background: var(--surface-2); color: var(--ink-3); }
.chip-brand    { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.chip-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ----------------------------------------------------------------- forms */

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 18px; }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="url"], input[type="number"], input[type="search"], input[type="date"],
input[type="time"], input[type="datetime-local"], select, textarea {
    width: 100%; font: inherit; color: var(--ink);
    padding: 11px 13px; border-radius: var(--r-sm);
    border: 1px solid var(--line-strong); background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
    background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type="color"] { width: 54px; height: 38px; padding: 2px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .84rem; margin: 6px 0 0; font-weight: 600; }
.hint { color: var(--ink-3); font-size: .84rem; margin: 6px 0 0; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); margin-bottom: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check span small { display: block; color: var(--ink-3); font-weight: 400; }

fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 700; font-size: .95rem; padding: 0; margin-bottom: 10px; }

/* Radio cards used for RSVP answers and design pickers. */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 14px 12px; border-radius: var(--r); text-align: center;
    border: 2px solid var(--line); background: var(--surface); font-weight: 700;
    transition: all .12s ease;
}
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.choice span em { font-style: normal; font-size: 1.4rem; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; vertical-align: middle; }
table.data thead th {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data tbody tr + tr { border-top: 1px solid var(--line); }
table.data tbody tr:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------- alerts */

.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 13px 16px; border-radius: var(--r); font-size: .92rem;
    border: 1px solid transparent; margin-bottom: 14px;
}
.alert-success { background: var(--ok-soft);   color: var(--ok);   border-color: rgba(20, 138, 85, .25); }
.alert-error   { background: var(--bad-soft);  color: var(--bad);  border-color: rgba(204, 51, 68, .25); }
.alert-info    { background: var(--info-soft); color: var(--info); border-color: rgba(42, 111, 214, .25); }
.alert strong { font-weight: 700; }

.flashes { position: sticky; top: 8px; z-index: 40; }

/* ------------------------------------------------------------- site chrome */

.site-header {
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }

.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo-mark {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 800;
    box-shadow: 0 3px 10px rgba(109, 94, 252, .4);
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
    padding: 8px 13px; border-radius: var(--r-pill); font-weight: 600; font-size: .93rem;
    color: var(--ink-2); text-decoration: none;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { background: var(--brand-soft); color: var(--brand-ink); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; color: var(--ink); }

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; margin-left: auto; }
    .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
    .nav.is-open { display: flex; }
    .nav a { padding: 11px 13px; }
    .site-header .wrap { flex-wrap: wrap; }
}

.avatar {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 800;
}
.avatar-lg { width: 46px; height: 46px; font-size: 1rem; }

.site-footer {
    border-top: 1px solid var(--line); margin-top: 64px; padding: 36px 0;
    color: var(--ink-3); font-size: .9rem; background: var(--surface);
}
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand-ink); text-decoration: underline; }
.footer-cols { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* -------------------------------------------------------------- marketing */

.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero p.lede { font-size: 1.16rem; color: var(--ink-2); max-width: 58ch; margin-inline: auto; }
.hero .row { justify-content: center; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand-soft); color: var(--brand-ink);
    padding: 6px 14px; border-radius: var(--r-pill);
    font-weight: 700; font-size: .82rem; margin-bottom: 18px;
}

.feature { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.feature h3 { margin-bottom: 6px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.feature-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-ink); font-size: 1.15rem; margin-bottom: 12px;
}

.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-align: center; }
.stat b { display: block; font-size: 1.7rem; letter-spacing: -.02em; }
.stat span { color: var(--ink-3); font-size: .84rem; font-weight: 600; }

/* ------------------------------------------------------- design thumbnails */

.design-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.design-card {
    border: 2px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); text-decoration: none; color: inherit; display: block;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.design-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.design-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.design-card figcaption { padding: 11px 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.design-card figcaption b { font-size: .92rem; }
.design-card figcaption span { font-size: .74rem; color: var(--ink-3); text-transform: capitalize; }

/* The preview swatch itself -- built entirely from the design tokens. */
.preview {
    aspect-ratio: 5 / 4; position: relative; overflow: hidden;
    background: var(--d-wash); color: var(--d-ink);
    display: grid; place-items: center; padding: 16px; text-align: center;
}
.preview-inner { position: relative; z-index: 2; }
.preview .p-kicker { font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; opacity: .72; }
.preview .p-title { font-family: var(--d-font); font-size: 1.25rem; line-height: 1.15; margin: 6px 0; }
.preview .p-rule { width: 34px; height: 2px; background: var(--d-accent); margin: 8px auto; border-radius: 2px; }
.preview .p-date { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }

/* Generated background patterns -- no image files anywhere. */
.pattern { position: absolute; inset: 0; z-index: 1; opacity: .85; }
.pattern-confetti {
    background-image:
        radial-gradient(circle at 12% 18%, var(--d-accent) 0 4px, transparent 5px),
        radial-gradient(circle at 78% 12%, var(--d-accent2) 0 3px, transparent 4px),
        radial-gradient(circle at 30% 78%, var(--d-accent2) 0 3px, transparent 4px),
        radial-gradient(circle at 88% 68%, var(--d-accent) 0 4px, transparent 5px),
        radial-gradient(circle at 55% 40%, var(--d-accent) 0 2px, transparent 3px);
    opacity: .5;
}
.pattern-dots { background-image: radial-gradient(var(--d-accent) 1.2px, transparent 1.3px); background-size: 14px 14px; opacity: .22; }
.pattern-grid {
    background-image: linear-gradient(var(--d-accent) 1px, transparent 1px), linear-gradient(90deg, var(--d-accent) 1px, transparent 1px);
    background-size: 26px 26px; opacity: .12;
}
.pattern-stripes { background-image: repeating-linear-gradient(135deg, var(--d-accent) 0 10px, transparent 10px 26px); opacity: .16; }
.pattern-waves {
    background-image: radial-gradient(120% 80% at 50% 120%, var(--d-accent) 0 40%, transparent 41%),
                      radial-gradient(120% 70% at 50% 135%, var(--d-accent2) 0 40%, transparent 41%);
    opacity: .3;
}
.pattern-rays {
    background-image: conic-gradient(from 210deg at 50% 115%,
        var(--d-accent) 0deg 8deg, transparent 8deg 22deg,
        var(--d-accent2) 22deg 30deg, transparent 30deg 44deg,
        var(--d-accent) 44deg 52deg, transparent 52deg 66deg,
        var(--d-accent2) 66deg 74deg, transparent 74deg 90deg);
    opacity: .22;
}
.pattern-terrazzo {
    background-image:
        radial-gradient(ellipse 7px 4px at 20% 30%, var(--d-accent) 100%, transparent 0),
        radial-gradient(ellipse 5px 8px at 70% 22%, var(--d-accent2) 100%, transparent 0),
        radial-gradient(ellipse 9px 5px at 42% 72%, var(--d-accent2) 100%, transparent 0),
        radial-gradient(ellipse 4px 7px at 84% 66%, var(--d-accent) 100%, transparent 0),
        radial-gradient(ellipse 6px 6px at 10% 84%, var(--d-accent) 100%, transparent 0);
    background-size: 90px 90px; opacity: .35;
}
.pattern-bokeh {
    background-image:
        radial-gradient(circle at 18% 24%, var(--d-accent) 0 22px, transparent 23px),
        radial-gradient(circle at 82% 30%, var(--d-accent2) 0 16px, transparent 17px),
        radial-gradient(circle at 62% 82%, var(--d-accent) 0 28px, transparent 29px);
    filter: blur(14px); opacity: .45;
}
.pattern-none { display: none; }

/* -------------------------------------------------------- the invitation */

.invite-page { background: var(--d-wash); color: var(--d-ink); min-height: 100vh; }
.invite-shell { width: min(100% - 24px, 760px); margin-inline: auto; padding: 24px 0 80px; }

.invite-card {
    background: var(--d-surface); color: var(--d-ink);
    border-radius: 26px; overflow: hidden; position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .16);
}
.invite-hero { position: relative; padding: 52px 28px 40px; text-align: center; overflow: hidden; }
.invite-hero > * { position: relative; z-index: 2; }
.invite-cover { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.invite-kicker { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; opacity: .7; margin-bottom: 12px; }
.invite-title { font-family: var(--d-font); font-size: clamp(2rem, 1.2rem + 4vw, 3.2rem); margin: 0 0 8px; line-height: 1.05; }
.invite-sub { font-size: 1.05rem; opacity: .82; margin: 0; }
.invite-rule { width: 60px; height: 3px; background: var(--d-accent); border-radius: 3px; margin: 22px auto; }

.invite-body { padding: 8px 28px 32px; }
.invite-section { padding: 26px 0; border-top: 1px solid var(--d-line); }
.invite-section:first-child { border-top: 0; }
.invite-section h2 {
    font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--d-muted); margin-bottom: 14px; font-weight: 800;
}

.detail-list { display: grid; gap: 16px; }
.detail { display: flex; gap: 14px; align-items: flex-start; }
.detail-icon {
    width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
    background: var(--d-soft); color: var(--d-accent); font-size: 1.05rem;
}
.detail b { display: block; font-size: 1rem; }
.detail span { color: var(--d-muted); font-size: .9rem; }
.detail a { color: var(--d-accent); font-weight: 600; }

.countdown { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.countdown div {
    background: var(--d-soft); border-radius: var(--r); padding: 12px 18px; min-width: 78px; text-align: center;
}
.countdown b { display: block; font-size: 1.5rem; line-height: 1; }
.countdown span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--d-muted); }

.rsvp-box {
    background: var(--d-soft); border-radius: var(--r-lg); padding: 24px;
    border: 1px solid var(--d-line);
}
.btn-invite {
    background: var(--d-accent); color: #fff; border: 0; border-radius: var(--r-pill);
    padding: 14px 26px; font: inherit; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.btn-invite:hover { filter: brightness(.93); color: #fff; }
.btn-invite-ghost {
    background: transparent; color: var(--d-ink); border: 1px solid var(--d-line);
}

.invite-page .choice span { background: var(--d-surface); border-color: var(--d-line); color: var(--d-ink); }
.invite-page .choice input:checked + span { border-color: var(--d-accent); background: var(--d-soft); color: var(--d-accent); }
.invite-page input, .invite-page select, .invite-page textarea {
    background: var(--d-surface); color: var(--d-ink); border-color: var(--d-line);
}
.invite-page label { color: var(--d-muted); }

.guest-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.guest-pill {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--d-soft); border-radius: var(--r-pill); padding: 5px 13px 5px 5px; font-size: .87rem;
}
.guest-pill .avatar { width: 24px; height: 24px; font-size: .66rem; }

.wall-post { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--d-line); }
.wall-post:first-of-type { border-top: 0; }
.wall-post p { margin: 4px 0 0; }
.wall-meta { font-size: .8rem; color: var(--d-muted); }

.photo-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.photo-grid a { border-radius: var(--r-sm); overflow: hidden; display: block; aspect-ratio: 1; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

.potluck-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--d-line); }
.potluck-item:first-of-type { border-top: 0; }
.potluck-item .grow b { display: block; }

.meter { height: 7px; border-radius: 4px; background: var(--d-line); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--d-accent); border-radius: 4px; }

.poll-option { display: block; padding: 11px 0; border-top: 1px solid var(--d-line); }
.poll-bar { height: 8px; border-radius: 4px; background: var(--d-line); overflow: hidden; margin-top: 6px; }
.poll-bar i { display: block; height: 100%; background: var(--d-accent); }

/* -------------------------------------------------------- host dashboard */

.page-head { padding: 28px 0 18px; }
.page-head h1 { margin-bottom: 4px; }
.page-head .muted { margin: 0; }

.tabs {
    display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px;
    border-bottom: 1px solid var(--line); margin-bottom: 26px; -webkit-overflow-scrolling: touch;
}
.tabs a {
    padding: 11px 15px; font-weight: 600; font-size: .93rem; color: var(--ink-3);
    text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--brand-ink); border-bottom-color: var(--brand); }

.metric-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.metric {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: 16px; text-align: center;
}
.metric b { display: block; font-size: 1.85rem; line-height: 1.1; letter-spacing: -.02em; }
.metric span { font-size: .78rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.metric-yes b { color: var(--ok); }
.metric-no b { color: var(--bad); }
.metric-maybe b { color: var(--warn); }

.event-card {
    display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .14s ease, box-shadow .14s ease;
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.event-card .preview { width: 132px; flex: none; aspect-ratio: auto; }
.event-card .body { padding: 16px 18px; min-width: 0; flex: 1; }
.event-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.event-card h3 a { color: inherit; text-decoration: none; }
.event-card h3 a:hover { color: var(--brand-ink); }
@media (max-width: 560px) {
    .event-card { flex-direction: column; }
    .event-card .preview { width: 100%; aspect-ratio: 5/2; }
}

.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0 10px 20px; position: relative; border-left: 2px solid var(--line); }
.timeline li::before {
    content: ""; position: absolute; left: -5px; top: 16px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--brand);
}
.timeline li:last-child { border-left-color: transparent; }

.empty { text-align: center; padding: 48px 24px; color: var(--ink-3); }
.empty-icon { font-size: 2.4rem; margin-bottom: 10px; }

.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: .85rem; }

details.disclose { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
details.disclose > summary {
    cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after { content: "＋"; color: var(--ink-3); font-weight: 400; }
details.disclose[open] > summary::after { content: "－"; }
details.disclose > div { padding: 0 18px 18px; }

/* Inline disclosure inside a table cell: no chrome, no ＋ marker. */
details.disclose-plain { border: 0; background: none; }
details.disclose-plain > summary { padding: 4px 8px; }
details.disclose-plain > summary::after { content: none; }
details.disclose-plain > div { padding: 12px 0; min-width: 230px; }

/* Appended by app.js when the visitor's zone differs from the event's. */
.local-time-hint { display: block; margin-top: 4px; color: var(--d-muted, var(--ink-3)); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar form { display: contents; }

.danger-zone { border-color: rgba(204, 51, 68, .35); }
.danger-zone h3 { color: var(--bad); }

@media print {
    .site-header, .site-footer, .tabs, .btn, .toolbar, form { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ccc; }
}
