:root {
  color-scheme: light dark;
  --color-surface-page: #f4f6f9;
  --color-surface-card: #ffffff;
  --color-surface-raised: #ffffff;
  --color-surface-soft: #eceff4;
  --color-text-primary: #16171c;
  --color-text-secondary: #565a66;
  --color-text-muted: #868b98;
  --color-border-subtle: #e0e4ec;
  --color-accent-primary: #7057e4;
  --color-accent-strong: #5a43c9;
  --color-accent-ink: #ffffff;
  --color-status-going: #6349d8;
  --color-status-going-soft: #ebe7fb;
  --color-status-maybe: #5c606b;
  --color-status-maybe-soft: #eceff4;
  --color-status-no: #868b98;
  --color-status-no-soft: #eef0f4;
  --gradient-invite: linear-gradient(145deg, #6f9cff 0%, #7057e4 58%, #5a3fd0 100%);
  --gradient-hero: linear-gradient(145deg, #6f9cff 0%, #7158eb 58%, #6639cf 100%);
  --radius-control: 12px;
  --radius-card: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 34, .05);
  --shadow-card: 0 1px 2px rgba(20, 22, 34, .04), 0 12px 32px rgba(20, 22, 34, .07);
  --shadow-raised: 0 2px 4px rgba(20, 22, 34, .05), 0 22px 52px rgba(20, 22, 34, .11);
  --shadow-button: 0 8px 20px rgba(112, 87, 228, .22);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-surface-page: #121317;
    --color-surface-card: #191b21;
    --color-surface-raised: #1f222a;
    --color-surface-soft: #23262f;
    --color-text-primary: #f4f5f8;
    --color-text-secondary: #b4b8c4;
    --color-text-muted: #868b98;
    --color-border-subtle: #2b2f39;
    --color-accent-primary: #9d8bf0;
    --color-accent-strong: #b3a4f5;
    --color-accent-ink: #ffffff;
    --color-status-going: #b9aaff;
    --color-status-maybe: #c3c7d2;
    --color-status-no: #9aa0ad;
    --color-status-going-soft: #2e2856;
    --color-status-maybe-soft: #262a33;
    --color-status-no-soft: #212530;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 44px rgba(0, 0, 0, .36);
    --shadow-raised: 0 2px 6px rgba(0, 0, 0, .34), 0 26px 60px rgba(0, 0, 0, .44);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--color-surface-page); color: var(--color-text-primary); }
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.site-header { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0; display: flex; align-items: center; gap: 12px; }
.brand { color: var(--color-text-primary); font-size: 24px; line-height: 1; font-weight: 900; letter-spacing: -.06em; text-decoration: none; }
.brand span { color: var(--color-accent-primary); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 750; }
.site-nav a, .site-nav button { color: var(--color-text-secondary); text-decoration: none; }
.site-nav form { margin: 0; }
.site-nav button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.site-nav .nav-cta { padding: 10px 18px; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-control); background: var(--color-surface-card); color: var(--color-text-primary); box-shadow: var(--shadow-sm); }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 18px 0 80px; }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 40px 0 52px; }
.hero h1, .event-header-card h1, .invite-art h1, .verify-card h1 { margin: 0; font-size: clamp(44px, 8vw, 92px); line-height: .92; letter-spacing: -.07em; }
.hero-copy { max-width: 590px; margin: 22px 0 0; color: var(--color-text-secondary); font-size: 18px; line-height: 1.6; }
.eyebrow { margin: 0 0 10px; color: var(--color-accent-primary); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.button { position: relative; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-pill); padding: 0 24px; background: var(--color-surface-card); color: var(--color-text-primary); font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--color-accent-primary) 40%, var(--color-border-subtle)); }
.button:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 2px; }
.button--primary { border-color: transparent; background: var(--color-accent-primary); color: var(--color-accent-ink); box-shadow: var(--shadow-button); }
.button--primary:hover { border-color: transparent; background: var(--color-accent-strong); }
.button--full { width: 100%; }
.button--large { min-height: 56px; padding-inline: 28px; }

.landing-page { overflow-x: hidden; }
.landing-page .site-header { position: relative; z-index: 5; }
.landing-page .shell { padding-top: 4px; }
.landing-hero { min-height: calc(100vh - 118px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .78fr); gap: clamp(48px, 7vw, 96px); align-items: center; padding: 34px 0 72px; }
.landing-hero__copy { color: var(--color-text-primary); }
.landing-hero__copy h1 { margin: 0; max-width: 650px; font-size: clamp(62px, 7.8vw, 108px); line-height: .9; letter-spacing: -.075em; }
.landing-hero__copy .hero-copy { max-width: 520px; }
.hero-product { position: relative; min-height: 590px; overflow: hidden; padding: 34px; border-radius: 52px; background: var(--gradient-hero); color: #ffffff; box-shadow: 0 34px 80px rgba(72,55,145,.25); }
.hero-product::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.18), transparent 42%); pointer-events: none; }
.hero-product__head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.hero-product__mark { font-size: 24px; font-weight: 900; letter-spacing: -.06em; }
.hero-product__status { color: rgba(255,255,255,.72); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero-product__label { position: relative; margin: 54px 0 18px; color: rgba(255,255,255,.68); font-size: 14px; }
.hero-product__steps { position: relative; display: flex; align-items: center; width: max-content; color: rgba(255,255,255,.88); font-size: 12px; }
.hero-product__steps span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-weight: 800; }
.hero-product__steps b { margin: 0 -4px; padding: 13px 20px; border-radius: 18px; background: rgba(65,35,174,.28); font-weight: 700; white-space: nowrap; }
.hero-action-card { position: absolute; left: 28px; right: 28px; bottom: 28px; padding: 30px; border: 1px solid rgba(255,255,255,.48); border-radius: 34px; background: rgba(248,248,255,.84); color: #1e1d23; box-shadow: 0 28px 50px rgba(39,23,100,.24); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.hero-action-card .eyebrow { margin-bottom: 12px; color: #6655d9; }
.hero-action-card h2 { max-width: 360px; margin: 0; font-size: clamp(34px, 3.5vw, 48px); line-height: .98; letter-spacing: -.055em; }
.hero-action-card p:not(.eyebrow) { margin: 16px 0 24px; color: #66636e; font-size: 14px; line-height: 1.5; }
.hero-action-card .button { justify-content: space-between; min-height: 60px; border-radius: 18px; padding-inline: 22px; }
.hero-action-card small { display: block; margin-top: 13px; color: #77747e; text-align: center; font-size: 11px; font-weight: 700; }
.landing-proof { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--color-border-subtle); border-bottom: 1px solid var(--color-border-subtle); }
.landing-proof div { display: grid; gap: 4px; padding: 24px; text-align: center; }
.landing-proof div + div { border-left: 1px solid var(--color-border-subtle); }
.landing-proof strong { color: var(--color-text-primary); font-size: 16px; }
.landing-proof span { color: var(--color-text-secondary); font-size: 13px; }

.auth-page .shell { min-height: calc(100vh - 100px); display: grid; place-items: center; }
.auth-layout { width: min(540px, 100%); }
.auth-card { padding: clamp(28px, 5vw, 48px); border: 1px solid var(--color-border-subtle); border-radius: 18px; background: var(--color-surface-card); box-shadow: var(--shadow-card), inset 0 1px 0 color-mix(in srgb, white 30%, transparent); }
.auth-card h1 { margin: 0; font-size: clamp(42px, 7vw, 64px); line-height: .96; letter-spacing: -.065em; }
.auth-card > p:not(.eyebrow, .auth-switch) { color: var(--color-text-secondary); line-height: 1.55; }
.auth-switch { margin: 22px 0 0; color: var(--color-text-muted); text-align: center; font-size: 13px; }
.auth-switch a { color: var(--color-text-primary); font-weight: 800; }

.builder-shell { width: min(720px, 100%); margin: 32px auto 0; }
.builder-intro { margin-bottom: 28px; text-align: center; }
.builder-intro h1 { margin: 0; font-size: clamp(48px, 8vw, 78px); line-height: .94; letter-spacing: -.07em; }
.builder-intro > p:last-child { max-width: 540px; margin: 18px auto 0; color: var(--color-text-secondary); line-height: 1.6; }
.builder-card { position: static; padding: clamp(24px, 5vw, 38px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.recent-events { margin-top: 62px; }
.compact-empty { padding: 28px; }

.events-dashboard { width: min(1120px, 100%); margin: 10px auto 0; }
.dashboard-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; padding: clamp(30px, 5vw, 58px); border-radius: 28px; background: var(--gradient-hero); color: #fff; box-shadow: 0 22px 54px rgba(79,57,157,.2); }
.dashboard-hero .eyebrow { color: rgba(255,255,255,.72); }
.dashboard-hero h1 { margin: 0; font-size: clamp(54px, 7vw, 88px); line-height: .9; letter-spacing: -.07em; }
.dashboard-hero p:last-child { margin: 18px 0 0; color: rgba(255,255,255,.75); font-size: 17px; }
.dashboard-hero .button { flex: 0 0 auto; border-color: #fff; background: #fff; color: #25222c; box-shadow: 0 12px 30px rgba(38,26,83,.18); }
.event-library-heading { display: flex; justify-content: space-between; align-items: center; margin: 50px 0 18px; }
.event-library-heading > div { display: flex; align-items: baseline; gap: 13px; }
.event-library-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.event-library-heading span { color: var(--color-text-muted); font-size: 13px; }
.event-library { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.event-library-card { overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: 22px; background: var(--color-surface-card); box-shadow: var(--shadow-card); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.event-library-card:hover { transform: translateY(-4px); box-shadow: 0 24px 64px rgba(57,39,20,.15); }
.event-library-card__art { position: relative; min-height: 230px; display: flex; align-items: flex-end; padding: 24px; overflow: hidden; background: linear-gradient(145deg, #719eff, #7057e4); color: #fff; }
.event-library-card--2 .event-library-card__art { background: linear-gradient(145deg, #ff8876, #db4f8a); }
.event-library-card--3 .event-library-card__art { background: linear-gradient(145deg, #5ed4b1, #287dcc); }
.event-library-card__art::before { content: ''; position: absolute; width: 220px; height: 220px; top: -90px; right: -60px; border-radius: 50%; background: rgba(255,255,255,.18); }
.event-library-card__art strong { position: relative; max-width: 92%; font-size: clamp(30px, 3vw, 44px); line-height: .94; letter-spacing: -.055em; overflow-wrap: anywhere; }
.event-library-card__date { position: absolute; z-index: 1; top: 18px; left: 18px; max-width: calc(100% - 76px); padding: 8px 11px; border-radius: 10px; background: rgba(255,255,255,.9); color: #292631; font-size: 11px; font-weight: 800; }
.event-library-card__arrow { position: absolute; z-index: 1; top: 18px; right: 18px; font-size: 22px; }
.event-library-card__body { padding: 20px; }
.event-library-card__body p { margin: 0 0 16px; color: var(--color-text-secondary); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-library-card__body > div { display: flex; gap: 14px; flex-wrap: wrap; color: var(--color-text-muted); font-size: 11px; }
.event-library-card__body b { color: var(--color-text-primary); }
.create-event-section { display: grid; grid-template-columns: minmax(240px,.7fr) minmax(0,1.3fr); gap: 50px; align-items: start; margin-top: 90px; padding-top: 56px; border-top: 1px solid var(--color-border-subtle); scroll-margin-top: 20px; }
.create-event-section > header { position: sticky; top: 24px; }
.create-event-section > header h2 { margin: 0; font-size: clamp(42px, 5vw, 62px); line-height: .96; letter-spacing: -.06em; }
.create-event-section > header p:last-child { color: var(--color-text-secondary); line-height: 1.55; }

.event-workspace { width: min(1040px, 100%); margin: 8px auto 0; }
.event-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 38px; padding: 42px 0 38px; border-bottom: 1px solid var(--color-border-subtle); }
.event-detail-header h1 { max-width: 760px; margin: 0; font-size: clamp(54px, 8vw, 96px); line-height: .9; letter-spacing: -.075em; overflow-wrap: anywhere; }
.event-lead { margin: 22px 0 0; color: var(--color-text-primary); font-size: 18px; font-weight: 800; }
.event-location { margin: 8px 0 0; color: var(--color-text-secondary); }
.event-description { max-width: 680px; margin: 22px 0 0; color: var(--color-text-secondary); line-height: 1.6; }
.guest-link-row { display: grid; grid-template-columns: 100px 1fr; gap: 18px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--color-border-subtle); overflow-wrap: anywhere; }
.guest-link-row span { color: var(--color-text-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.guest-link-row strong { font-size: 13px; }
.rsvp-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 34px 0 60px; }
.rsvp-column { min-height: 220px; padding: 22px; border: 1px solid var(--color-border-subtle); border-radius: 18px; background: var(--color-surface-card); }
.rsvp-column > header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--color-border-subtle); }
.rsvp-column > header span { font-size: 14px; font-weight: 800; }
.rsvp-column > header strong { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--color-surface-soft); }
.rsvp-column--going > header strong { background: var(--color-status-going-soft); color: var(--color-status-going); }
.rsvp-column--maybe > header strong { background: var(--color-status-maybe-soft); color: var(--color-status-maybe); }
.rsvp-column--declined > header strong { background: var(--color-status-no-soft); color: var(--color-status-no); }
.rsvp-names { display: grid; gap: 12px; padding-top: 16px; }
.rsvp-names > div { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; }
.rsvp-names .avatar { width: 36px; height: 36px; font-size: 12px; }
.rsvp-names p { margin: 0; }
.rsvp-names b, .rsvp-names small { display: block; }
.rsvp-names small { margin-top: 2px; color: var(--color-text-muted); font-size: 10px; }
.rsvp-empty { color: var(--color-text-muted); font-size: 13px; }

.event-chat { overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: 22px; background: var(--color-surface-card); box-shadow: var(--shadow-card); }
.event-chat > header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 24px 26px; border-bottom: 1px solid var(--color-border-subtle); }
.event-chat > header h2 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.event-chat > header > span { color: var(--color-text-muted); font-size: 12px; }
.chat-stream { min-height: 260px; max-height: 520px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; padding: 26px; }
.chat-empty { min-height: 200px; display: grid; place-content: center; gap: 5px; color: var(--color-text-secondary); text-align: center; }
.chat-empty span { color: var(--color-text-muted); font-size: 13px; }
.chat-message { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; }
.chat-message > div { min-width: 0; }
.chat-message header { display: flex; align-items: center; gap: 8px; }
.chat-message header strong { font-size: 13px; }
.chat-message header em { padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, #7057e4 14%, transparent); color: #7057e4; font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.chat-message time { margin-left: auto; color: var(--color-text-muted); font-size: 10px; }
.chat-message p { width: fit-content; max-width: min(620px,100%); margin: 6px 0 0; padding: 11px 14px; border-radius: 5px 16px 16px 16px; background: var(--color-surface-soft); line-height: 1.48; overflow-wrap: anywhere; }
.chat-message--host p { background: color-mix(in srgb, #7057e4 13%, var(--color-surface-soft)); }
.chat-message--mine { direction: rtl; grid-template-columns: minmax(0,1fr) 42px; }
.chat-message--mine > * { direction: ltr; }
.chat-message--mine header { justify-content: flex-end; }
.chat-message--mine time { order: -1; margin: 0 auto 0 0; }
.chat-message--mine p { margin-left: auto; border-radius: 16px 5px 16px 16px; background: color-mix(in srgb, #7057e4 18%, var(--color-surface-soft)); }
.chat-composer { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: end; padding: 18px; border-top: 1px solid var(--color-border-subtle); background: var(--color-surface-raised); }
.chat-composer textarea { width: 100%; resize: vertical; min-height: 52px; max-height: 150px; padding: 14px 16px; border: 1px solid var(--color-border-subtle); border-radius: 14px; background: var(--color-surface-card); color: var(--color-text-primary); outline: none; }
.chat-composer textarea:focus { border-color: #7057e4; box-shadow: 0 0 0 3px color-mix(in srgb, #7057e4 15%, transparent); }
.chat-gif { display: block; max-width: min(320px,100%); max-height: 280px; margin-top: 8px; border-radius: 14px; object-fit: cover; }
.gif-trigger { min-height: 48px; padding: 0 15px; border: 1px solid var(--color-border-subtle); border-radius: 12px; background: var(--color-surface-card); color: var(--color-text-primary); font-weight: 850; cursor: pointer; }
.gif-selected img { max-width: 150px; max-height: 100px; margin-top: 8px; border-radius: 10px; object-fit: cover; }
.guest-event-chat { width: min(940px,100%); margin: 26px auto 0; }
.guest-chat-profile { display: flex; align-items: center; gap: 10px; }
.guest-chat-profile form { margin: 0; }
.guest-chat-profile label { color: #7057e4; font-size: 12px; font-weight: 850; cursor: pointer; }
.guest-chat-profile input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.profile-page .shell { min-height: calc(100vh - 100px); display: grid; place-items: center; }
.profile-shell { width: min(780px,100%); }
.profile-card { display: grid; grid-template-columns: 180px 1fr; gap: 36px; align-items: center; margin-top: 22px; padding: clamp(28px,5vw,50px); border: 1px solid var(--color-border-subtle); border-radius: 24px; background: var(--color-surface-card); box-shadow: var(--shadow-card); }
.profile-avatar { width: 180px; height: 180px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--color-surface-soft); color: var(--color-text-secondary); font-size: 58px; font-weight: 900; }
.profile-card h1 { margin: 0; font-size: clamp(42px,7vw,66px); line-height: .94; letter-spacing: -.065em; }
.profile-card > div:last-child > p:not(.eyebrow) { color: var(--color-text-secondary); line-height: 1.55; }
.photo-upload-form { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.file-picker { min-height: 48px; display: inline-flex; align-items: center; padding: 0 18px; border: 1px solid var(--color-border-subtle); border-radius: 12px; background: var(--color-surface-raised); color: var(--color-text-primary); font-size: 13px; font-weight: 800; cursor: pointer; }
.file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.profile-card small { display: block; margin-top: 12px; color: var(--color-text-muted); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 28px; align-items: start; }
.event-stack { display: grid; gap: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 6px; }
.section-heading h2, .form-card h2, .guest-card h2 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.count-pill { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--color-border-subtle); border-radius: 999px; color: var(--color-text-secondary); font-weight: 700; }
.event-card, .empty-card, .form-card, .event-header-card, .share-card, .guest-card, .verify-card { background: var(--color-surface-card); border: 1px solid var(--color-border-subtle); border-radius: 18px; box-shadow: var(--shadow-card), inset 0 1px 0 color-mix(in srgb, white 30%, transparent); }
.event-card { display: block; padding: 24px; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.event-card:hover { transform: translateY(-3px); border-color: var(--color-accent-primary); }
.event-card h3 { margin: 8px 0 5px; font-size: 25px; letter-spacing: -.04em; }
.event-card p, .event-date { margin: 0; color: var(--color-text-secondary); }
.event-date { font-size: 13px; font-weight: 700; }
.event-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 20px; color: var(--color-text-muted); font-size: 13px; }
.event-stats strong { color: var(--color-text-primary); }
.empty-card { padding: 44px 30px; text-align: center; }
.empty-card h3 { margin: 18px 0 8px; font-size: 24px; }
.empty-card p { margin: 0; color: var(--color-text-secondary); }
.empty-orbit { width: 72px; height: 72px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: var(--color-surface-soft); color: var(--color-accent-primary); font-size: 28px; }
.form-card { position: sticky; top: 20px; padding: 26px; }
.form-stack { display: grid; gap: 16px; margin-top: 24px; }
.form-stack label { display: grid; gap: 7px; color: var(--color-text-secondary); font-size: 13px; font-weight: 700; }
.form-stack input, .form-stack textarea, .form-stack select { width: 100%; border: 1px solid var(--color-border-subtle); border-radius: 9px; background: var(--color-surface-raised); color: var(--color-text-primary); padding: 13px 14px; outline: none; }
.form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus { border-color: var(--color-accent-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent-primary) 18%, transparent); }
.form-stack small { color: var(--color-text-muted); font-weight: 500; }
.optional-field { border: 1px dashed var(--color-border-subtle); border-radius: 12px; padding: 13px 15px; }
.optional-field summary { color: var(--color-text-secondary); font-size: 13px; font-weight: 800; cursor: pointer; list-style: none; }
.optional-field summary span { margin-right: 7px; color: #7057e4; font-size: 18px; }
.optional-field[open] summary { margin-bottom: 14px; }
.check-row { grid-template-columns: 20px 1fr !important; align-items: center; }
.check-row input { width: 18px !important; height: 18px; padding: 0 !important; }

.event-settings-panel { margin: 24px 0 34px; border: 1px solid var(--color-border-subtle); border-radius: 18px; background: var(--color-surface-card); }
.event-settings-panel > summary { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; font-weight: 850; cursor: pointer; list-style: none; }
.event-settings-panel > summary b { color: #7057e4; font-size: 24px; }
.event-settings-panel[open] > summary { border-bottom: 1px solid var(--color-border-subtle); }
.event-settings-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); gap: 30px; padding: 26px; }
.settings-form { margin-top: 0; }
.settings-side { display: grid; gap: 24px; align-content: start; }
.compact-form { margin: 0; padding: 20px; border: 1px solid var(--color-border-subtle); border-radius: 15px; }
.compact-form h3 { margin: 0; }
.compact-form .button { min-height: 42px; }
.cohost-list { display: grid; gap: 10px; }
.cohost-list > div { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; }
.cohost-list b, .cohost-list small { display: block; }
.cohost-list small { margin-top: 2px; color: var(--color-text-muted); font-size: 10px; }
.invite-cover-gif { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rsvp-deadline { color: var(--color-text-muted); font-size: 12px; font-weight: 750; }
.guest-facing-list, .guest-polls { width: min(940px,100%); margin: 26px auto 0; padding: 26px; border: 1px solid var(--color-border-subtle); border-radius: 20px; background: var(--color-surface-card); }
.guest-facing-list h2 { margin: 0; }
.guest-facing-list > div { display: flex; margin-top: 16px; }
.guest-facing-list > div .avatar { margin-right: -8px; border: 2px solid var(--color-surface-card); }
.guest-polls { display: grid; gap: 22px; }
.guest-polls form + form { padding-top: 22px; border-top: 1px solid var(--color-border-subtle); }
.guest-polls h3 { margin: 0 0 12px; }
.guest-polls form > div { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 13px; }
.guest-polls label input { position: absolute; opacity: 0; }
.guest-polls label span { display: block; padding: 9px 13px; border: 1px solid var(--color-border-subtle); border-radius: 10px; cursor: pointer; }
.guest-polls label input:checked + span { border-color: #7057e4; background: color-mix(in srgb,#7057e4 14%,var(--color-surface-card)); }
.event-gallery { margin-top: 34px; padding: 26px; border: 1px solid var(--color-border-subtle); border-radius: 20px; background: var(--color-surface-card); }
.event-gallery > header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.event-gallery h2 { margin: 0; font-size: 30px; }
.guest-event-gallery { width: min(940px,100%); margin-inline: auto; }
.inline-photo-upload label { color: #7057e4; font-size: 13px; font-weight: 850; cursor: pointer; }
.inline-photo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 20px; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 1; display: block; border-radius: 13px; object-fit: cover; }
.photo-grid figcaption { margin-top: 6px; color: var(--color-text-muted); font-size: 10px; }
.gif-picker-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); }
.gif-picker-dialog { width: min(680px,100%); max-height: min(720px,90vh); overflow: auto; padding: 20px; border: 1px solid var(--color-border-subtle); border-radius: 20px; background: var(--color-surface-card); color: var(--color-text-primary); box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.gif-picker-dialog > header { display: flex; justify-content: space-between; align-items: center; }
.gif-picker-dialog > header button { border: 0; background: transparent; color: inherit; font-size: 28px; cursor: pointer; }
.gif-picker-dialog form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 16px 0; }
.gif-picker-dialog input { padding: 12px 14px; border: 1px solid var(--color-border-subtle); border-radius: 10px; background: var(--color-surface-raised); color: var(--color-text-primary); }
.gif-picker-dialog form button { padding: 0 16px; border: 0; border-radius: 10px; background: #7057e4; color: #fff; font-weight: 800; }
.gif-results { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.gif-results button { padding: 0; overflow: hidden; border: 0; border-radius: 9px; background: transparent; cursor: pointer; }
.gif-results img { width: 100%; aspect-ratio: 1.25; display: block; object-fit: cover; }
.gif-picker-dialog > small { display: block; margin-top: 14px; color: var(--color-text-muted); text-align: right; }

.admin-shell { width: min(1180px, 100%); margin: 6px auto 0; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 22px; }
.admin-header h1 { margin: 0; font-size: clamp(40px, 5.5vw, 62px); line-height: .94; letter-spacing: -.06em; }
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--color-border-subtle); }
.admin-tabs a { padding: 11px 16px; border-bottom: 2px solid transparent; color: var(--color-text-secondary); font-size: 14px; font-weight: 750; text-decoration: none; }
.admin-tabs a:hover { color: var(--color-text-primary); }
.admin-tabs a.is-active { border-bottom-color: var(--color-accent-primary); color: var(--color-accent-primary); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.admin-stat { display: grid; gap: 3px; padding: 18px; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-control); background: var(--color-surface-card); }
.admin-stat strong { font-size: 30px; letter-spacing: -.045em; }
.admin-stat span { color: var(--color-text-muted); font-size: 12px; font-weight: 700; }
.admin-stat--alert { border-color: color-mix(in srgb, var(--color-accent-primary) 45%, var(--color-border-subtle)); background: var(--color-status-going-soft); }
.admin-stat--alert strong { color: var(--color-status-going); }
.admin-search { display: flex; gap: 10px; margin-bottom: 18px; }
.admin-search input { flex: 1; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-control); background: var(--color-surface-card); color: var(--color-text-primary); outline: none; }
.admin-search input:focus { border-color: var(--color-accent-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent-primary) 15%, transparent); }
.admin-search .button { min-height: 44px; }
.admin-panel { margin-bottom: 22px; padding: 22px; overflow-x: auto; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card); background: var(--color-surface-card); box-shadow: var(--shadow-sm); }
.admin-panel h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -.035em; }
.admin-empty { margin: 0; color: var(--color-text-muted); font-size: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { padding: 0 12px 10px 0; border-bottom: 1px solid var(--color-border-subtle); color: var(--color-text-muted); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.admin-table td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--color-border-subtle); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table code { font-size: 12px; color: var(--color-text-secondary); }
.admin-person > span { display: inline-block; vertical-align: middle; }
.admin-person .avatar { display: inline-grid; margin-right: 10px; vertical-align: middle; }
.admin-person b, .admin-person small { display: block; }
.admin-person small { margin-top: 2px; color: var(--color-text-muted); font-size: 11px; }
.admin-badge { padding: 2px 6px; border-radius: 6px; background: var(--color-status-going-soft); color: var(--color-status-going); font-size: 10px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.admin-message { max-width: 320px; overflow-wrap: anywhere; }
.admin-muted { color: var(--color-text-muted); }
.admin-actions { padding-right: 0 !important; text-align: right; white-space: nowrap; }
.admin-actions form { display: inline-block; margin: 0 0 0 12px; }
.admin-link { padding: 0; border: 0; background: transparent; color: var(--color-accent-primary); font-size: 13px; font-weight: 800; cursor: pointer; }
.admin-link:hover { text-decoration: underline; }
.admin-link--danger { color: var(--color-text-secondary); }
.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.admin-photo-grid figure { margin: 0; display: grid; gap: 6px; }
.admin-photo-grid img { width: 100%; aspect-ratio: 1; display: block; border-radius: var(--radius-control); object-fit: cover; }
.admin-photo-grid figcaption { color: var(--color-text-muted); font-size: 11px; overflow-wrap: anywhere; }
.status--active { background: var(--color-status-going-soft); color: var(--color-status-going); }
.status--blocked { background: var(--color-status-maybe-soft); color: var(--color-status-maybe); }
.status--deleted { background: var(--color-status-no-soft); color: var(--color-status-no); }

.notice { margin-bottom: 18px; padding: 13px 16px; border-radius: 9px; background: var(--color-surface-soft); border: 1px solid var(--color-border-subtle); }
.notice--success { background: var(--color-status-going-soft); color: var(--color-status-going); }
.back-link { display: inline-block; margin: 0 0 20px; color: var(--color-text-secondary); text-decoration: none; font-weight: 700; }
.event-header-card { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 34px; }
.event-header-card h1 { font-size: clamp(44px, 7vw, 76px); }
.event-lead { margin: 18px 0 0; color: var(--color-text-secondary); font-size: 17px; }
.share-card { display: flex; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 20px 24px; overflow-wrap: anywhere; }
.share-card span { color: var(--color-text-muted); font-size: 13px; }
.response-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.response-stat { padding: 24px; border-radius: 13px; }
.response-stat strong { display: block; font-size: 44px; letter-spacing: -.06em; }
.response-stat span { color: var(--color-text-secondary); font-weight: 700; }
.response-stat--going { background: var(--color-status-going-soft); }
.response-stat--maybe { background: var(--color-status-maybe-soft); }
.response-stat--no { background: var(--color-status-no-soft); }
.guest-card { padding: 28px; }
.guest-empty { padding: 35px 0 10px; color: var(--color-text-muted); text-align: center; }
.guest-list { display: grid; margin-top: 20px; }
.guest-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 13px; align-items: center; padding: 13px 0; border-top: 1px solid var(--color-border-subtle); }
.guest-row small { display: block; margin-top: 3px; color: var(--color-text-muted); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--color-surface-soft); font-weight: 900; }
.avatar img, .profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.status { padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: capitalize; }
.status--going { background: var(--color-status-going-soft); color: var(--color-status-going); }
.status--maybe { background: var(--color-status-maybe-soft); color: var(--color-status-maybe); }
.status--declined { background: var(--color-status-no-soft); color: var(--color-status-no); }

.invite-page .site-header { position: relative; z-index: 2; }
.invite-shell { width: min(940px, 100%); margin: 10px auto 0; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: 18px; background: var(--color-surface-card); box-shadow: var(--shadow-card); }
.invite-art { position: relative; min-height: 670px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 42px; background: var(--gradient-invite); color: var(--color-accent-ink); }
.invite-art__glow { position: absolute; width: 440px; height: 440px; right: -160px; top: -100px; border: 1px solid color-mix(in srgb, var(--color-accent-ink) 15%, transparent); border-radius: 50%; box-shadow: 0 0 0 65px color-mix(in srgb, var(--color-accent-ink) 5%, transparent), 0 0 0 130px color-mix(in srgb, var(--color-accent-ink) 4%, transparent); }
.invite-art h1 { position: relative; max-width: 520px; font-size: clamp(58px, 9vw, 104px); overflow-wrap: anywhere; }
.invite-mini { position: relative; font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.invite-mark { position: relative; font-size: 54px; }
.invite-details { padding: 38px; }
.invite-details h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.invite-place, .invite-description { color: var(--color-text-secondary); line-height: 1.6; }
.invite-description { padding: 18px 0; border-top: 1px solid var(--color-border-subtle); border-bottom: 1px solid var(--color-border-subtle); }
.rsvp-form fieldset { margin: 0; padding: 0; border: 0; }
.rsvp-form legend { margin-bottom: 10px; font-weight: 800; }
.rsvp-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp-options label { display: block; cursor: pointer; }
.rsvp-options input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.rsvp-options span { min-height: 44px; display: grid; place-items: center; border: 1px solid var(--color-border-subtle); border-radius: 12px; background: var(--color-surface-raised); font-size: 12px; }
.rsvp-options input:checked + span { border-color: var(--color-accent-primary); background: color-mix(in srgb, var(--color-accent-primary) 14%, var(--color-surface-raised)); color: var(--color-text-primary); }

.verify-page .shell { min-height: calc(100vh - 110px); display: grid; place-items: center; }
.verify-card { width: min(520px, 100%); padding: 38px; text-align: center; }
.verify-card h1 { font-size: clamp(42px, 7vw, 66px); }
.verify-card p { color: var(--color-text-secondary); line-height: 1.6; }
.verify-card .form-stack { text-align: left; }
.verify-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; background: var(--color-accent-primary); color: var(--color-accent-ink); font-weight: 900; letter-spacing: 3px; }
.local-code { margin: 18px auto 2px; padding: 14px; border-radius: 14px; background: var(--color-surface-soft); font-size: 28px; font-weight: 900; letter-spacing: .18em; }
.verify-card .back-link { margin: 22px 0 0; }

@media (max-width: 820px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .dashboard-grid, .invite-shell { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .invite-art { min-height: 440px; }
  .event-header-card, .share-card { align-items: flex-start; flex-direction: column; }
  .landing-hero { min-height: auto; grid-template-columns: 1fr; gap: 42px; padding-top: 28px; }
  .landing-hero__copy { text-align: center; }
  .landing-hero__copy .hero-copy { margin-inline: auto; }
  .hero-product { width: min(520px, 100%); margin: 0 auto; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .event-library { grid-template-columns: repeat(2,1fr); }
  .create-event-section { grid-template-columns: 1fr; }
  .create-event-section > header { position: static; }
  .event-detail-header { flex-direction: column; }
  .rsvp-board { grid-template-columns: 1fr; }
  .event-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header, .shell { width: min(100% - 28px, 1180px); }
  .hero { padding-top: 20px; }
  .hero h1 { font-size: 50px; }
  .response-grid { gap: 8px; }
  .response-stat { padding: 18px 14px; }
  .response-stat strong { font-size: 34px; }
  .invite-shell { border-radius: 14px; }
  .invite-art { min-height: 360px; padding: 28px; }
  .invite-art h1 { font-size: 58px; }
  .invite-details { padding: 26px; }
  .rsvp-options { grid-template-columns: 1fr; }
  .site-nav { gap: 12px; }
  .site-nav .nav-cta { display: none; }
  .landing-hero__copy h1 { font-size: 58px; }
  .hero-product { min-height: 550px; padding: 24px; border-radius: 36px; }
  .hero-product__label { margin-top: 42px; }
  .hero-action-card { left: 16px; right: 16px; bottom: 16px; padding: 24px; border-radius: 26px; }
  .hero-product__steps b { padding-inline: 14px; }
  .hero-product__steps b:last-of-type, .hero-product__steps span:last-of-type { display: none; }
  .landing-proof { grid-template-columns: 1fr; }
  .landing-proof div + div { border-top: 1px solid var(--color-border-subtle); border-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .event-library { grid-template-columns: 1fr; }
  .event-library-card__art { min-height: 210px; }
  .dashboard-hero { padding: 30px 24px; border-radius: 22px; }
  .dashboard-hero .button { width: 100%; }
  .event-detail-header { padding-top: 30px; }
  .event-detail-header .button { width: 100%; }
  .guest-link-row { grid-template-columns: 1fr; gap: 5px; }
  .chat-composer { grid-template-columns: 1fr; }
  .chat-composer .button { width: 100%; }
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .profile-avatar { margin: auto; }
  .photo-upload-form { align-items: stretch; flex-direction: column; }
  .file-picker { justify-content: center; }
  .guest-chat-profile .avatar { display: none; }
  .photo-grid { grid-template-columns: repeat(2,1fr); }
  .gif-results { grid-template-columns: repeat(2,1fr); }
}
