/* PotluckHero — World-Class design system (see design skill). Light only. No blue. */

:root {
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --faint: #94A3B8;
  --brand: #F56E14;
  --brand-hover: #DF5D08;
  --brand-soft: #FFF7ED;
  --brand-border: #FED7AA;
  --green: #15803D;
  --green-dot: #22C55E;
  --green-soft: #F0FDF4;
  --green-border: #BBF7D0;
  --red: #DC2626;
  --red-soft: #FEF2F2;
  --canvas: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #F1F5F9;
  --border: #E2E8F0;
  --border-subtle: #F1F5F9;
  --glass: rgba(255, 255, 255, .76);
  --glass-border: rgba(255, 255, 255, .85);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14.5px; color: var(--ink); }
h1, h2, h3, p { margin: 0; }

/* ── Web nav ─────────────────────────────────────────────── */
.web-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup-tile { display: block; border-radius: 8px; }
.lockup-word { font-weight: 800; font-size: 19px; letter-spacing: -0.025em; color: var(--ink); }
.web-nav-links { display: flex; gap: 24px; margin-left: 8px; }
.web-nav-links a {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--muted); padding: 4px 0;
}
.web-nav-links a:hover { color: var(--ink); }
.web-nav-links a.active { color: var(--ink); font-weight: 600; }
.host-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; position: relative;
}
.host-chip-name { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex: none;
}
.avatar.lg { width: 38px; height: 38px; font-size: 15px; }
.unread-badge {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
body.guest-mode .web-nav-links, body.guest-mode .host-chip { display: none; }

/* ── Layout ──────────────────────────────────────────────── */
.app-main { max-width: 1120px; margin: 0 auto; padding: 34px 28px 90px; }
.page-head { margin-bottom: 26px; }
.page-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.page-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.head-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.head-row .spacer { flex: 1; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.loading, .empty-note { color: var(--muted); padding: 30px 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-ink {
  background: var(--ink); color: #fff; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity .15s; text-decoration: none;
}
.btn-ink:hover { opacity: .9; }
.btn-ink.pill { border-radius: 999px; }
.btn-ink.block { width: 100%; }
.btn-ink:disabled { opacity: .35; cursor: not-allowed; }
.btn-outline {
  background: #fff; color: var(--ink); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
}
.btn-outline:hover { background: var(--surface); }
.btn-outline.block { width: 100%; }
.btn-brand {
  background: var(--brand); color: #fff; border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 600; flex: none; transition: background .15s;
}
.btn-brand:hover { background: var(--brand-hover); }
.btn-picked {
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green-border);
  border-radius: 999px; padding: 7px 15px; font-size: 13.5px; font-weight: 600; flex: none;
}
.btn-claimed {
  background: var(--surface-2); color: var(--muted); border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 600; flex: none; cursor: default;
}
.btn-text-danger {
  background: none; border: none; color: var(--red); font-size: 14px; font-weight: 600; padding: 6px 0;
}
.btn-text {
  background: none; border: none; color: var(--ink-2); font-size: 14px; font-weight: 600; padding: 6px 0;
}

/* ── Pills ───────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 5px 11px; flex: none;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pill-covered { background: var(--green-soft); border: 1px solid var(--green-border); color: var(--green); }
.pill-covered i { background: var(--green-dot); }
.pill-open { background: var(--brand-soft); border: 1px solid var(--brand-border); color: var(--brand-hover); }
.pill-open i { background: var(--brand); }
.pill-claimed, .pill-draft, .pill-done { background: var(--surface-2); border: 1px solid var(--border-subtle); color: var(--muted); }
.pill-claimed i, .pill-draft i, .pill-done i { background: var(--faint); }
.pill-active { background: var(--green-soft); border: 1px solid var(--green-border); color: var(--green); }
.pill-active i { background: var(--green-dot); }
.pill-tag { background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); }
.pill-tag i { background: var(--faint); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); background: #fff; border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); display: inline-block; }

/* ── Editorial lists ─────────────────────────────────────── */
.group-block { margin-bottom: 30px; }
.group-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}
.group-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.group-count { font-size: 13px; color: var(--muted); font-weight: 500; }
.dish-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border-subtle);
}
.dish-row:last-child { border-bottom: none; }
.dish-main { flex: 1; min-width: 0; }
.dish-name { font-size: 15.5px; font-weight: 600; }
.dish-meta { font-size: 13px; color: var(--muted); margin-top: 1px; }
.dish-meta .promise { color: var(--green); font-weight: 600; }
.dish-meta .reopened { color: var(--brand-hover); font-weight: 500; }
.tag-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-right: 6px; vertical-align: 1px; }
.tag-chip {
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px;
}
.dish-edit-fields { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-width: 520px; }
.dish-edit-fields input {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  font-size: 13px; color: var(--ink); background: #fff; width: 100%;
}
.flat-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 0;
  border-bottom: 1px solid var(--border-subtle); text-decoration: none;
}
.flat-row:last-child { border-bottom: none; }
a.flat-row:hover .dish-name { text-decoration: underline; }

/* ── Cards ───────────────────────────────────────────────── */
.rail-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.rail-card.white { background: #fff; }
.rail-label {
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.hero-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 30px; text-decoration: none; color: inherit;
}
.hero-when { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-hover); }
.hero-title { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; margin-top: 5px; }
.hero-meta { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.hero-stats { display: flex; gap: 28px; }
.hero-stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring-num { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.ring-sub { font-size: 13px; color: var(--muted); }
.link-field {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; color: var(--ink-2);
  word-break: break-all; margin-bottom: 12px;
}
.rail-actions { display: flex; flex-direction: column; gap: 9px; }

/* ── Underline tabs ──────────────────────────────────────── */
.web-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin: 26px 0 24px; }
.web-tabs button {
  border: none; background: none; padding: 10px 0; font-size: 14.5px; font-weight: 500;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.web-tabs button:hover { color: var(--ink); }
.web-tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ── Segmented controls ──────────────────────────────────── */
.rsvp-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.rsvp-seg button {
  border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 9px 6px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.rsvp-seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg-inline { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-inline button {
  border: none; background: transparent; border-radius: 999px; padding: 7px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.seg-inline button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(15, 23, 42, .1); }

/* ── Forms ───────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input[type="text"], .field input[type="date"], .field input[type="email"],
.field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: #fff; font-size: 14.5px;
}
.field textarea { min-height: 74px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-row {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; margin-bottom: 10px; cursor: pointer; font-size: 14.5px;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.check-row .dish-tag { color: var(--muted); font-size: 13px; display: block; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--border-subtle);
}
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); transition: background .15s; pointer-events: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .2); transition: left .15s;
}
.switch input:checked + .track { background: var(--green); border-color: var(--green); }
.switch input:checked + .track::after { left: 20px; }
.radio-card {
  display: flex; gap: 13px; align-items: flex-start; width: 100%; text-align: left;
  padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; margin-bottom: 11px;
}
.radio-card[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.radio-dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border);
  flex: none; margin-top: 1px; position: relative;
}
.radio-card[aria-pressed="true"] .radio-dot { border-color: var(--ink); }
.radio-card[aria-pressed="true"] .radio-dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink);
}
.radio-card b { font-size: 15px; display: block; }
.radio-card span { font-size: 13.5px; color: var(--muted); display: block; margin-top: 2px; }

/* ── Banners, notes, misc ────────────────────────────────── */
.update-banner {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; font-size: 14px;
}
.update-banner.read { background: var(--surface); border-color: var(--border); color: var(--ink-2); }
.update-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; }
.update-banner.read .dot { background: var(--faint); }
.update-banner small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.note-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 15px 17px; font-size: 14.5px; color: var(--ink-2); margin-bottom: 22px;
}
.feedback { font-size: 13.5px; color: var(--green); font-weight: 600; margin-top: 8px; }
.error-text { font-size: 13.5px; color: var(--red); font-weight: 500; margin-top: 8px; }
.step-line { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.wizard-nav { display: flex; gap: 10px; align-items: center; margin-top: 26px; }
.wizard-nav .spacer { flex: 1; }
.member-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.member-row:last-child { border-bottom: none; }
.member-row .who { flex: 1; }
.member-row .who b { font-size: 15px; display: block; }
.member-row .who span { font-size: 13px; color: var(--muted); }
.guest-group-title { font-size: 15px; font-weight: 700; margin: 22px 0 2px; }
.guest-group-title span { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.checkback { font-size: 13px; color: var(--muted); }

/* ── Guest page ──────────────────────────────────────────── */
.guest-head { margin-bottom: 8px; }
.guest-title { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin-top: 14px; }
.guest-meta { color: var(--muted); font-size: 15px; margin-top: 7px; }
.guest-note { font-size: 15.5px; color: var(--ink-2); margin-top: 12px; max-width: 560px; }
.rsvp-card-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.bringing-line { font-size: 14px; color: var(--ink-2); margin: 4px 0 14px; }
.bringing-line b { color: var(--ink); }
.dietary-block { margin: 4px 0 14px; }
.dietary-block .rail-label { margin-bottom: 8px; }
.pin-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; text-align: center; margin: 22px 0;
}
.pin-value { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: .35em; text-indent: .35em; margin: 8px 0 10px; }
.pin-help { font-size: 13.5px; color: var(--muted); max-width: 420px; margin: 0 auto; }
.big-check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft);
  border: 1px solid var(--green-border); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
}
.thanks-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.return-box { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 22px; }
.pin-inputs { display: flex; gap: 8px; }
.pin-inputs input {
  width: 52px; height: 58px; text-align: center; font-family: var(--mono);
  font-size: 24px; font-weight: 700; border: 1px solid var(--border); border-radius: 12px;
}
.edit-banner {
  background: var(--green-soft); border: 1px solid var(--green-border); color: var(--green);
  border-radius: 12px; padding: 12px 15px; font-size: 14px; font-weight: 600; margin-bottom: 20px;
}

/* ── Mobile glass bars ───────────────────────────────────── */
#mobilebar { display: none; }
.glass-tabbar {
  position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; padding: 5px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(190%); -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--glass-border); box-shadow: 0 12px 32px rgba(15, 23, 42, .15);
}
.glass-tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; border-radius: 999px; text-decoration: none;
  font-size: 10.5px; font-weight: 600; color: var(--muted);
}
.glass-tabbar a[aria-current="page"] { color: var(--ink); background: rgba(15, 23, 42, .06); }
.glass-tabbar svg { width: 21px; height: 21px; }
.glass-confirm {
  position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(190%); -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--glass-border); box-shadow: 0 12px 32px rgba(15, 23, 42, .15);
}
.glass-confirm .txt { flex: 1; min-width: 0; }
.glass-confirm .txt b {
  display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.glass-confirm .txt span { font-size: 12px; color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1023px) {
  .two-col { display: flex; flex-direction: column; }
  .rail { position: static; }
  .guest-rail { order: -1; }
  #mobilebar { display: block; }
  .app-main { padding: 24px 18px 120px; }
  .web-nav { padding: 11px 16px; gap: 16px; }
  .page-title { font-size: 26px; }
  .guest-title { font-size: 27px; }
  .hero-card { padding: 20px; }
  .hero-stats { gap: 20px; }
}
@media (min-width: 1024px) {
  .glass-confirm { display: none; }
}
