/* Layout: one readable column. Event facts, potluck board, RSVP form, guest list. */
:root {
  --bg: #F3F4EE;
  --surface: #FFFFFF;
  --fg: #20251F;
  --muted: #5F665A;
  --line: #DCDED3;
  --accent: #2E5B45;
  --accent-fg: #FFFFFF;
  --gold: #8F6210;
  --gold-soft: #F6E9CC;
  --ok-soft: #DCEBE1;
  --danger: #A33A2C;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141814; --surface: #1D221D; --fg: #EAECE4; --muted: #A2A897; --line: #2F362E;
    --accent: #84BE9B; --accent-fg: #102016; --gold: #E3B256; --gold-soft: #3A3020;
    --ok-soft: #22372A; --danger: #E5806F; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 48px;
}
.wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.1; }
h2 { font-size: 1.6rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--muted); }
section { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; flex-direction: column; gap: 6px; }

header { padding-top: 48px; display: flex; flex-direction: column; gap: 22px; }
header h1 { font-size: clamp(2.2rem, 8vw, 3.8rem); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
header h1 span { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact + .fact { padding-left: 16px; border-left: 1px solid var(--line); }
.fact .label { font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fact .value { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

.btn {
  font: 600 .95rem/1 var(--body); border-radius: 999px; padding: 12px 20px; cursor: pointer;
  border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-fg);
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: 7px 12px; font-size: .82rem; }
.btn.danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .seg input:focus-visible + span, .linkish:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}

.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-variant-numeric: tabular-nums; }
.stat b { font-weight: 600; }

.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cat.need { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pill { font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pill.need { background: var(--gold-soft); color: var(--gold); }
.pill.ok { background: var(--ok-soft); color: var(--accent); }
.dishes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dishes li { display: flex; flex-direction: column; font-size: .95rem; line-height: 1.35; overflow-wrap: anywhere; }
.dishes li .who { font-size: .82rem; color: var(--muted); }
.dishes .empty { color: var(--muted); font-size: .9rem; font-style: italic; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-weight: 600; font-size: .9rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } .panel { padding: 18px; } }
input[type=text], input[type=number], input[type=password], select {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 500; font-size: .92rem; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status-msg { font-size: .9rem; color: var(--muted); }
.status-msg.err { color: var(--danger); }

.guests { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.guests li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.guests .g-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px; }
.guests .g-name { font-weight: 600; overflow-wrap: anywhere; }
.guests .g-sub { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.badge { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.yes { background: var(--ok-soft); color: var(--accent); border-color: transparent; }
.badge.maybe { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.g-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

footer { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.host-login { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 360px; }
.host-login input { flex: 1 1 160px; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: transform .12s ease; } .btn:active { transform: scale(.97); } }
