:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2e5d3a;
  --accent-soft: #e8f1ea;
  --danger: #b91c1c;
  --warn: #b45309;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; display: flex; flex-direction: column; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: white; font-weight: 700; font-size: 13px;
}
.brand-text { font-size: 16px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 18px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-nav a:hover { color: var(--ink); }

.main { flex: 1; padding: 32px 20px 56px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0; }

/* Hero / section */
.hero { margin-bottom: 28px; }
.hero h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 28px 0 12px; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.center { text-align: center; }

.back-link { color: var(--muted); text-decoration: none; font-size: 13px; display: inline-block; margin-bottom: 12px; }
.back-link:hover { color: var(--ink); }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #d1d5db; }
.card-title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.card-sub { color: var(--muted); font-size: 13px; }
.card-meta { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* Search */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input[type=search] {
  flex: 1; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
}
.search-bar input[type=search]:focus { outline: none; border-color: var(--accent); }
.search-bar button {
  padding: 10px 16px; background: var(--accent); color: white;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.search-bar button:hover { background: #254a2d; }
.btn-link { padding: 10px 12px; color: var(--muted); text-decoration: none; font-size: 14px; align-self: center; }

/* Roster table */
.roster {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.roster th, .roster td {
  padding: 10px 14px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.roster thead th { background: #f3f4f1; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.roster tr:last-child td { border-bottom: none; }
.roster .contact a { color: var(--accent); text-decoration: none; }
.roster .contact a:hover { text-decoration: underline; }
.roster .phone { color: var(--muted); font-size: 13px; }
.person-link { color: var(--ink); text-decoration: none; font-weight: 500; }
.person-link:hover { color: var(--accent); }

/* Tags */
.tag {
  display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
  letter-spacing: 0.05em;
}
.tag-guest { background: #fef3c7; color: var(--warn); }
.tag-minor { background: #dbeafe; color: #1e40af; }

/* Member list (household page) */
.member-list { list-style: none; padding: 0; margin: 0; }
.member-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.member-row:last-child { border-bottom: none; }
.role-badge {
  font-size: 10px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.role-badge.role-child { background: #fef9c3; color: #854d0e; }
.inline-email { color: var(--muted); font-size: 13px; text-decoration: none; }
.inline-email:hover { color: var(--ink); }
.inline-phone { color: var(--muted); font-size: 13px; }

/* Person page */
.person-hero {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: white; font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase; flex-shrink: 0;
}
.person-hero h1 { margin: 0 0 4px; font-size: 22px; }

.two-col {
  display: grid; gap: 24px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

.kv { margin: 0; }
.kv dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 10px; }
.kv dt:first-child { margin-top: 0; }
.kv dd { margin: 2px 0 0; font-size: 14px; }
.kv a { color: var(--accent); text-decoration: none; }
.kv a:hover { text-decoration: underline; }

.rel-list { list-style: none; padding: 0; margin: 0; }
.rel-list li { padding: 6px 0; font-size: 14px; }
.rel-kind {
  display: inline-block; width: 110px; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.rel-list a { color: var(--ink); text-decoration: none; }
.rel-list a:hover { color: var(--accent); }

/* Gift chips */
.gift-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gift-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px; border-radius: 16px; text-decoration: none;
  background: var(--accent-soft); color: var(--accent); font-size: 13px;
  border: 1px solid transparent;
}
.gift-chip:hover { border-color: var(--accent); }
.gift-kind { font-weight: 600; text-transform: capitalize; }
.gift-label { color: var(--ink); font-size: 12px; }

/* Nav */
.nav-me { color: var(--ink) !important; font-weight: 500; }
.nav-muted { color: var(--muted) !important; font-size: 12px; }
.nav-admin {
  color: var(--accent) !important; font-weight: 600;
  border: 1px solid var(--accent-soft); padding: 2px 8px; border-radius: 6px;
}
.nav-admin:hover { background: var(--accent-soft); }

/* Auth */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-wrap h1 { font-size: 24px; margin: 0 0 8px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.auth-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  padding: 10px 12px; font-size: 15px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink);
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form button {
  padding: 12px; font-size: 15px; font-weight: 500;
  background: var(--accent); color: white; border: none; border-radius: 8px; cursor: pointer;
}
.auth-form button:hover { background: #254a2d; }

.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin: 16px 0; }
.alert-ok { background: var(--accent-soft); color: var(--accent); }
.alert-warn { background: #fef3c7; color: var(--warn); }
.alert-info { background: #dbeafe; color: #1e40af; }
.alert code { background: rgba(0,0,0,0.05); padding: 1px 6px; border-radius: 4px; }

/* Buttons */
.btn-primary {
  display: inline-block; padding: 10px 16px; background: var(--accent); color: white;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer;
}
.btn-primary:hover { background: #254a2d; }
.btn-outline {
  display: inline-block; padding: 8px 14px; background: transparent; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 8px; font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer;
}
.btn-outline:hover { background: var(--accent-soft); }
.btn-tiny-danger {
  padding: 4px 10px; background: transparent; border: 1px solid var(--line);
  color: var(--danger); border-radius: 6px; font-size: 11px; cursor: pointer;
}
.btn-tiny-danger:hover { border-color: var(--danger); background: #fef2f2; }

.flex-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }

/* Forms */
.form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 24px;
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input,
.form-grid select,
.form-grid textarea {
  padding: 9px 11px; font-size: 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink);
  text-transform: none; letter-spacing: normal;
  font-family: inherit;
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus { outline: none; border-color: var(--accent); }
.form-grid .inline-check {
  flex-direction: row; align-items: center; gap: 8px; text-transform: none; font-size: 14px; color: var(--ink);
}
.form-actions { margin-top: 16px; display: flex; gap: 12px; align-items: center; }
.form-actions button {
  padding: 10px 18px; background: var(--accent); color: white;
  border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.form-actions button:hover { background: #254a2d; }

.gift-edit-list { list-style: none; padding: 0; margin: 0 0 14px 0; display: flex; flex-direction: column; gap: 8px; }
.gift-edit-list li { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.gift-add-form {
  display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
  padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: var(--bg);
}
.gift-add-form select,
.gift-add-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 14px; }
.gift-add-form input[type=text] { flex: 1; min-width: 200px; }
.gift-add-form button {
  padding: 8px 16px; background: var(--accent); color: white; border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
}

/* Event list */
.event-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.event-row {
  display: grid; grid-template-columns: 180px 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; text-decoration: none; color: var(--ink);
}
.event-row:hover { border-color: var(--accent); }
.event-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.event-title { font-weight: 500; }
.event-host { color: var(--muted); font-size: 12px; }
.event-meta { color: var(--accent); font-size: 12px; font-weight: 500; }
.event-list-muted .event-row { background: transparent; color: var(--muted); }
@media (max-width: 680px) {
  .event-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Person hero extra */
.person-hero-body { flex: 1; }

/* RSVP */
.rsvp-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px;
}
.rsvp-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.rsvp-pill { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.rsvp-yes, .rsvp-tag-yes { background: var(--accent-soft); color: var(--accent); }
.rsvp-maybe, .rsvp-tag-maybe { background: #fef3c7; color: var(--warn); }
.rsvp-no, .rsvp-tag-no { background: #fee2e2; color: var(--danger); }
.rsvp-pending, .rsvp-tag-pending { background: #f3f4f6; color: var(--muted); }

.rsvp-form { display: flex; align-items: center; gap: 6px; }
.rsvp-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.rsvp-btn {
  padding: 8px 14px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer;
}
.rsvp-btn:hover { border-color: var(--accent); }
.rsvp-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

.invite-list { list-style: none; padding: 0; margin: 0; }
.invite-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.invite-row:last-child { border-bottom: none; }
.invite-row a { color: var(--ink); text-decoration: none; }
.invite-row a:hover { color: var(--accent); }
.rsvp-tag { padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; text-transform: capitalize; }

/* Email list */
.email-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.email-label {
  font-size: 11px; color: var(--muted); padding: 1px 7px;
  background: #f3f4f6; border-radius: 10px; text-transform: lowercase;
}
.email-primary {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  color: var(--accent); padding: 1px 6px; letter-spacing: 0.05em;
  background: var(--accent-soft); border-radius: 4px;
}

.email-edit-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.email-edit-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px;
}
.email-edit-addr { font-weight: 500; flex: 1; min-width: 200px; word-break: break-all; }
.btn-tiny {
  padding: 4px 10px; font-size: 11px; background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.btn-tiny:hover { border-color: var(--accent); color: var(--accent); }
.email-add-form {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: var(--bg);
}
.email-add-form input[type=email] { flex: 1; min-width: 200px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--surface); }
.email-add-form input[type=text] { flex: 0 1 180px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--surface); }
.email-add-form button { padding: 8px 16px; background: var(--accent); color: white; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }

/* Social links */
.social-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px; border-radius: 16px; text-decoration: none;
  background: #eef2ff; color: #3730a3; font-size: 13px;
  border: 1px solid transparent;
}
.social-chip:hover { border-color: #3730a3; }
.social-kind { font-weight: 600; text-transform: capitalize; }
.social-label { color: var(--ink); font-size: 12px; }
.social-linkedin { background: #e0f2fe; color: #0369a1; }
.social-instagram { background: #fce7f3; color: #be185d; }
.social-facebook { background: #dbeafe; color: #1e40af; }
.social-x { background: #f3f4f6; color: #111827; }
.social-tiktok { background: #f5f5f5; color: #111827; }
.social-youtube { background: #fee2e2; color: #991b1b; }
.social-website { background: var(--accent-soft); color: var(--accent); }

/* Management card */
.manage-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.manage-form {
  display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap;
  padding: 14px; background: var(--bg); border: 1px dashed var(--line); border-radius: 8px;
}
.manage-form label { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 220px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.manage-form select { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; }
.manage-form button { padding: 10px 18px; background: var(--accent); color: white; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; }

/* Feed */
.feed-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.feed-post {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px;
}
.feed-kind-badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--accent-soft); color: var(--accent);
  padding: 4px 10px; border-radius: 12px; text-align: center; align-self: start;
}
.feed-kind-engagement .feed-kind-badge { background: #fde68a; color: #92400e; }
.feed-kind-wedding .feed-kind-badge { background: #fbcfe8; color: #9d174d; }
.feed-kind-baby .feed-kind-badge { background: #e0e7ff; color: #3730a3; }
.feed-kind-graduation .feed-kind-badge { background: #dcfce7; color: #14532d; }
.feed-kind-funeral .feed-kind-badge { background: #e5e7eb; color: #374151; }
.feed-kind-anniversary .feed-kind-badge { background: #fce7f3; color: #831843; }
.feed-kind-job .feed-kind-badge { background: #dbeafe; color: #1e40af; }
.feed-kind-move .feed-kind-badge { background: #fef3c7; color: #92400e; }

.feed-headline { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.feed-text { margin: 4px 0 8px; font-size: 14px; color: var(--ink); }
.feed-meta { color: var(--muted); font-size: 12px; }
.feed-meta a { color: var(--muted); text-decoration: none; }
.feed-meta a:hover { color: var(--ink); }
@media (max-width: 680px) {
  .feed-post { grid-template-columns: 1fr; gap: 6px; padding: 14px; }
  .feed-kind-badge { justify-self: start; }
}

/* Admin */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.admin-stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.admin-stat .stat-num { font-size: 28px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.admin-stat .stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.admin-nav { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 24px; }
.admin-nav a {
  padding: 8px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px;
}
.admin-nav a.active { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.admin-nav a:hover { border-color: var(--accent); }
.tag-admin { background: #fde68a; color: #92400e; font-size: 10px; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: 0.05em; font-weight: 600; }

/* Yearbook */
.gen-section { margin-bottom: 28px; }
.gen-heading {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 18px; margin: 24px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.gen-range { font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0.02em; }
.gen-count {
  margin-left: auto; font-size: 12px; color: var(--accent);
  background: var(--accent-soft); padding: 2px 10px; border-radius: 10px; font-weight: 500;
}

.yearbook-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.yearbook-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 10px 12px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.yearbook-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #d1d5db; }
.yearbook-muted { opacity: 0.6; }
.yearbook-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: white; font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase; overflow: hidden;
  margin-bottom: 6px;
}
.yearbook-avatar img { width: 100%; height: 100%; object-fit: cover; }
.yearbook-name { font-weight: 600; font-size: 14px; text-align: center; }
.yearbook-year { font-size: 11px; color: var(--accent); }
.yearbook-house { font-size: 11px; color: var(--muted); text-align: center; }

@media (max-width: 680px) {
  .yearbook-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .yearbook-avatar { width: 58px; height: 58px; font-size: 18px; }
}

/* Event header image */
.event-header-image {
  height: 220px; width: 100%; background-size: cover; background-position: center;
  border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 14px;
}
.image-controls { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.upload-label { cursor: pointer; display: inline-flex; align-items: center; }
@media (max-width: 680px) {
  .event-header-image { height: 160px; }
  .image-controls { flex-direction: column; align-items: stretch; }
  .upload-label { justify-content: center; }
}

/* Bring list */
.bring-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.bring-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.bring-row.bring-claimed { background: var(--accent-soft); border-color: var(--accent); }
.bring-item { font-size: 14px; }
.bring-claimer { color: var(--accent); font-size: 13px; font-weight: 500; margin-left: auto; margin-right: 8px; }
.btn-tiny-primary {
  padding: 4px 12px; background: var(--accent); color: white;
  border: none; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.btn-tiny-primary:hover { background: #254a2d; }
.bring-add-form { display: flex; gap: 8px; }
.bring-add-form input[type=text] { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--surface); }
.bring-add-form button { padding: 8px 14px; background: var(--accent); color: white; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }

/* Map */
.map-canvas {
  width: 100%; height: 560px; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden; margin-bottom: 20px;
  background: #e5e7eb;
}
.map-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.map-pop-name { font-weight: 600; }
.map-pop-name a { color: var(--accent); text-decoration: none; }
.map-pop-loc { color: var(--muted); font-size: 12px; }
.map-pop-count { font-size: 12px; color: var(--accent); margin-top: 4px; }

/* Mobile */
@media (max-width: 680px) {
  .wrap { padding: 0 14px; }
  .main { padding: 20px 14px 40px; }
  .site-header { padding: 12px 0; }
  .site-header .wrap { flex-wrap: wrap; gap: 8px; }
  .brand-text { display: none; }
  .site-nav { gap: 12px; font-size: 13px; flex-wrap: wrap; }

  .hero h1 { font-size: 22px; }
  h2 { font-size: 16px; }

  /* Directory table → card list */
  .roster thead { display: none; }
  .roster, .roster tbody, .roster tr, .roster td {
    display: block; width: 100%; border: none;
  }
  .roster { background: transparent; border: none; }
  .roster tr {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
  }
  .roster td { padding: 2px 0 !important; border: none !important; font-size: 14px; }
  .roster td.contact { margin-top: 6px; font-size: 13px; color: var(--muted); }
  .roster td.contact a { color: var(--accent); }

  /* Event rows */
  .event-row { grid-template-columns: 1fr; gap: 2px; padding: 12px 14px; }
  .event-date { font-size: 12px; }
  .event-meta { font-size: 12px; }

  /* Person hero */
  .person-hero { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .avatar { width: 52px; height: 52px; font-size: 18px; }

  /* RSVP */
  .rsvp-bar { flex-direction: column; align-items: stretch; padding: 12px 14px; }
  .rsvp-form { justify-content: space-between; }
  .rsvp-btn { flex: 1; text-align: center; }

  /* Forms */
  .form-card { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-actions { flex-wrap: wrap; }

  /* Email editor */
  .email-edit-row { flex-direction: column; align-items: flex-start; }
  .email-edit-addr { min-width: 0; width: 100%; }
  .email-add-form { flex-direction: column; align-items: stretch; }
  .email-add-form input,
  .email-add-form button { width: 100%; }

  /* Gift add form */
  .gift-add-form { flex-direction: column; align-items: stretch; }
  .gift-add-form select,
  .gift-add-form input,
  .gift-add-form button { width: 100%; }

  /* Household address card */
  .auth-wrap { margin: 20px auto; }

  /* Admin cards */
  .admin-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-stat { padding: 12px 14px; }
  .admin-stat .stat-num { font-size: 22px; }

  /* Map */
  .map-canvas { height: 400px; }
}
