/* Family Book — warm, personal, mobile-first */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Earthy, warm palette */
  --green-deep: #2d5016;
  --green-mid: #4a7c2e;
  --green-light: #7db356;
  --green-pale: #e8f0de;
  --brown-dark: #3e2c1c;
  --brown-mid: #6b4c35;
  --brown-light: #a67c5b;
  --cream: #faf6f0;
  --cream-dark: #f0e8da;
  --warm-white: #fefcf9;
  --warm-gray: #8a7e72;
  --text: #2c2418;
  --text-muted: #6b6054;
  --text-light: #9a8e82;
  --border: #e0d6c8;
  --border-light: #ede7dd;
  --danger: #b33a3a;
  --danger-light: #f5e0e0;
  --info: #2a6496;
  --info-light: #dce8f4;
  --shadow-sm: 0 1px 3px rgba(60,40,20,0.08);
  --shadow-md: 0 4px 12px rgba(60,40,20,0.1);
  --shadow-lg: 0 8px 24px rgba(60,40,20,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --max-w: 640px;
  --nav-h: 56px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; }

/* ===== Layout ===== */
.page { padding-top: var(--nav-h); min-height: 100dvh; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--green-deep);
  color: white;
  display: flex; align-items: center; padding: 0 16px;
  box-shadow: var(--shadow-md);
}
.nav__brand {
  font-family: var(--font-serif);
  font-size: 1.15rem; font-weight: 600;
  color: white; margin-right: auto;
  display: flex; align-items: center; gap: 8px;
}
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  color: rgba(255,255,255,0.85);
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav__link:hover { background: rgba(255,255,255,0.15); color: white; text-decoration: none; }
.nav__link--active { background: rgba(255,255,255,0.2); color: white; }
.nav__link--icon { font-size: 1.2rem; padding: 8px; }
.nav__hamburger {
  display: none; background: none; border: none; color: white;
  font-size: 1.5rem; padding: 8px; cursor: pointer;
}

@media (max-width: 640px) {
  .nav__links {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--green-deep); flex-direction: column; padding: 8px 16px 16px;
    box-shadow: var(--shadow-lg); gap: 2px;
  }
  .nav__links--open { display: flex; }
  .nav__link { width: 100%; padding: 12px 16px; font-size: 1rem; }
  .nav__hamburger { display: block; }
}

/* ===== Cards ===== */
.card {
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card__body { padding: 16px; }
.card__header {
  padding: 16px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.card__footer {
  padding: 12px 16px; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 16px;
}

/* ===== Avatar ===== */
.avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  object-fit: cover; background: var(--green-pale); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--green-deep); font-size: 0.9rem;
}
.avatar--sm { width: 28px; height: 28px; font-size: 0.7rem; }
.avatar--lg { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar--xl { width: 120px; height: 120px; font-size: 2rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-full); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm); border: none;
  font-weight: 500; font-size: 0.9rem; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--green-deep); color: white; }
.btn--primary:hover { background: var(--green-mid); text-decoration: none; color: white; }
.btn--secondary { background: var(--cream-dark); color: var(--text); }
.btn--secondary:hover { background: var(--border); text-decoration: none; }
.btn--danger { background: var(--danger); color: white; }
.btn--danger:hover { background: #992e2e; text-decoration: none; color: white; }
.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { background: var(--cream-dark); text-decoration: none; }
.btn--sm { padding: 4px 10px; font-size: 0.8rem; }
.btn--lg { padding: 12px 24px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--icon { padding: 8px; border-radius: var(--radius-full); }
.btn[disabled], .btn.htmx-request { opacity: 0.6; pointer-events: none; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: 4px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: white; font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,80,22,0.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

/* ===== Moment Card ===== */
.moment { background: white; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.moment + .moment { margin-top: 16px; }

.moment__header {
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
}
.moment__meta { flex: 1; min-width: 0; }
.moment__author {
  font-weight: 600; font-size: 0.9rem;
  color: var(--text); display: block;
}
.moment__time {
  font-size: 0.8rem; color: var(--text-muted);
}
.moment__source {
  font-size: 0.75rem; color: var(--text-light);
  background: var(--cream-dark); padding: 1px 6px;
  border-radius: var(--radius-sm); display: inline-block;
}

.moment__media {
  width: 100%; position: relative; overflow: hidden;
  background: var(--cream-dark);
}
.moment__media img {
  width: 100%; display: block;
}
.moment__media-grid {
  display: grid; gap: 2px;
}
.moment__media-grid--2 { grid-template-columns: 1fr 1fr; }
.moment__media-grid--3 { grid-template-columns: 1fr 1fr; }
.moment__media-grid--3 > :first-child { grid-row: span 2; }
.moment__media-grid--4 { grid-template-columns: 1fr 1fr; }

.moment__body { padding: 12px 16px; }
.moment__body p { font-size: 0.95rem; line-height: 1.5; }
.moment__body--truncated {
  max-height: 4.5em; overflow: hidden; position: relative;
}
.moment__body--truncated::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1.5em; background: linear-gradient(transparent, white);
}

.moment__milestone {
  padding: 16px; text-align: center;
  background: linear-gradient(135deg, var(--green-pale) 0%, var(--cream) 100%);
}
.moment__milestone-icon { font-size: 2rem; margin-bottom: 4px; }
.moment__milestone-text {
  font-family: var(--font-serif); font-size: 1.1rem;
  color: var(--brown-dark);
}

.moment__actions {
  padding: 8px 16px; border-top: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 8px;
}

/* Reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: white;
  font-size: 0.85rem; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.reaction-btn:hover { background: var(--cream-dark); }
.reaction-btn--active { border-color: var(--green-mid); background: var(--green-pale); }
.reaction-btn__count { font-size: 0.8rem; color: var(--text-muted); }
.reaction-picker {
  display: flex; gap: 4px; padding: 6px 10px;
  background: white; border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.reaction-picker button {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  padding: 4px; border-radius: var(--radius-sm);
  transition: transform 0.1s;
}
.reaction-picker button:hover { transform: scale(1.25); }

/* Comments */
.comments { padding: 12px 16px; border-top: 1px solid var(--border-light); }
.comment {
  display: flex; gap: 8px; padding: 8px 0;
}
.comment + .comment { border-top: 1px solid var(--border-light); }
.comment__body { flex: 1; min-width: 0; }
.comment__name { font-weight: 600; font-size: 0.85rem; }
.comment__text { font-size: 0.9rem; word-break: break-word; }
.comment__time { font-size: 0.75rem; color: var(--text-light); }
.comment-form {
  display: flex; gap: 8px; padding-top: 8px; margin-top: 8px;
  border-top: 1px solid var(--border-light);
}
.comment-form input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 0.9rem;
}
.comment-form input:focus { outline: none; border-color: var(--green-mid); }
.comment-form button {
  background: var(--green-deep); color: white; border: none;
  border-radius: var(--radius-full); padding: 8px 14px;
  font-size: 0.85rem; cursor: pointer;
}

/* ===== Compose bar (bottom of feed) ===== */
.compose-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-top: 1px solid var(--border);
  padding: 8px 16px; display: flex; align-items: center; gap: 8px;
  z-index: 50;
}
.compose-bar input[type="file"] { display: none; }
.compose-bar__photo-btn {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  color: var(--green-mid); padding: 4px;
}
.compose-bar__input {
  flex: 1; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-full); font-size: 0.9rem;
}
.compose-bar__input:focus { outline: none; border-color: var(--green-mid); }
.compose-bar__send {
  background: var(--green-deep); color: white; border: none;
  border-radius: var(--radius-full); width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem;
}

/* ===== Person Profile ===== */
.profile-header {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 100%);
  color: white; padding: 32px 16px 24px; text-align: center;
}
.profile-header .avatar {
  margin: 0 auto 12px; border: 3px solid rgba(255,255,255,0.3);
}
.profile-header__name {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600;
}
.profile-header__nickname {
  font-style: italic; opacity: 0.8; font-size: 0.95rem;
}
.profile-header__meta {
  margin-top: 8px; font-size: 0.85rem; opacity: 0.75;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px;
}
.profile-section { padding: 16px; }
.profile-section + .profile-section { border-top: 1px solid var(--border-light); }
.profile-section__title {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 8px;
}

.contact-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: white;
  font-size: 0.85rem; cursor: pointer; color: var(--text);
  transition: background 0.15s;
}
.contact-btn:hover { background: var(--cream-dark); text-decoration: none; }

/* Relationship chips */
.rel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--green-pale); font-size: 0.85rem; color: var(--green-deep);
}
.rel-chip a { color: var(--green-deep); font-weight: 500; }

/* Media gallery */
.media-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; padding: 16px;
}
.media-gallery__item {
  aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm);
  cursor: pointer; position: relative;
}
.media-gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.2s;
}
.media-gallery__item:hover img { transform: scale(1.05); }

/* ===== People List ===== */
.people-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; padding: 16px 0;
}
.person-card-sm {
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 16px; text-align: center;
  transition: box-shadow 0.15s, transform 0.15s;
}
.person-card-sm:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
  text-decoration: none;
}
.person-card-sm .avatar { margin: 0 auto 8px; }
.person-card-sm__name {
  font-weight: 600; font-size: 0.9rem; color: var(--text);
  display: block;
}
.person-card-sm__branch {
  font-size: 0.75rem; color: var(--text-light);
  text-transform: capitalize;
}
.person-card-sm__country { font-size: 1.1rem; }

/* ===== Search ===== */
.search-bar {
  position: relative; margin-bottom: 16px;
}
.search-bar input {
  width: 100%; padding: 10px 16px 10px 40px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: white; font-size: 0.95rem;
}
.search-bar input:focus { outline: none; border-color: var(--green-mid); }
.search-bar__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); font-size: 0.9rem;
}

/* ===== Tree ===== */
.tree-page {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--cream); overflow: hidden;
}
.tree-controls {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  display: flex; flex-direction: column; gap: 4px;
}
.tree-controls button {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: white; border: 1px solid var(--border); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); font-size: 1rem;
  transition: background 0.15s;
}
.tree-controls button:hover { background: var(--cream-dark); }
#tree-svg { width: 100%; height: 100%; }

/* Tree nodes */
.person-node { cursor: pointer; }
.person-node circle.photo-clip { fill: var(--green-pale); stroke: white; stroke-width: 2; }
.person-node circle.tap-target { fill: transparent; }
.person-node text.name-label {
  fill: var(--text); font-size: 11px; text-anchor: middle;
  font-weight: 500; pointer-events: none;
}
.person-node text.rel-label {
  fill: var(--text-muted); font-size: 9px; text-anchor: middle;
  pointer-events: none;
}
.person-node:hover circle.photo-clip { stroke: var(--green-mid); stroke-width: 2.5; }
.person-node--branch-martin circle.photo-clip { fill: #dce8d4; }
.person-node--branch-semesock circle.photo-clip { fill: #d4dce8; }
.person-node--branch-maternal circle.photo-clip { fill: #e8d4dc; }

.partnership-line { stroke: var(--brown-light); stroke-width: 2; fill: none; }
.partnership-line--dissolved { stroke-dasharray: 5,5; }
.parent-child-line { stroke: var(--border); stroke-width: 1.5; fill: none; }

/* Person sidebar (slide-out on tree node click) */
.person-sidebar {
  position: absolute; top: 0; right: 0; bottom: 0; width: 320px;
  background: white; box-shadow: -4px 0 16px rgba(0,0,0,0.1);
  transform: translateX(100%); transition: transform 0.25s ease;
  z-index: 20; overflow-y: auto;
}
.person-sidebar--open { transform: translateX(0); }
.person-sidebar__close {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; font-size: 1.2rem;
  cursor: pointer; color: var(--text-muted); padding: 4px 8px;
}
@media (max-width: 640px) {
  .person-sidebar { width: 100%; }
}

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: linear-gradient(135deg, var(--green-deep) 0%, var(--brown-dark) 100%);
}
.auth-card {
  background: white; border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 400px; box-shadow: var(--shadow-lg);
}
.auth-card__title {
  font-family: var(--font-serif); font-size: 1.5rem; text-align: center;
  margin-bottom: 8px; color: var(--green-deep);
}
.auth-card__subtitle {
  text-align: center; color: var(--text-muted); font-size: 0.9rem;
  margin-bottom: 24px;
}
.auth-card__divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-light); font-size: 0.85rem;
}
.auth-card__divider::before, .auth-card__divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ===== Admin ===== */
.admin-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 768px) {
  .admin-grid { grid-template-columns: 1fr 1fr; }
}
.stat-card {
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.stat-card__label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card__value { font-size: 1.8rem; font-weight: 700; color: var(--green-deep); }
.stat-card__desc { font-size: 0.85rem; color: var(--text-light); margin-top: 2px; }

.audit-row {
  display: flex; gap: 12px; padding: 10px 0; align-items: flex-start;
  border-bottom: 1px solid var(--border-light); font-size: 0.85rem;
}
.audit-row__action {
  padding: 2px 8px; border-radius: var(--radius-sm); font-size: 0.75rem;
  font-weight: 600; text-transform: uppercase;
}
.audit-row__action--create { background: var(--green-pale); color: var(--green-deep); }
.audit-row__action--update { background: var(--info-light); color: var(--info); }
.audit-row__action--delete { background: var(--danger-light); color: var(--danger); }
.audit-row__detail { flex: 1; }
.audit-row__time { color: var(--text-light); white-space: nowrap; }

/* Invite list */
.invite-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.invite-row__name { font-weight: 500; flex: 1; }
.invite-row__status {
  font-size: 0.8rem; padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.invite-row__status--active { background: var(--green-pale); color: var(--green-deep); }
.invite-row__status--claimed { background: var(--cream-dark); color: var(--text-muted); }
.invite-row__status--expired { background: var(--danger-light); color: var(--danger); }

/* ===== Settings ===== */
.settings-section {
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 16px;
}
.settings-section__title {
  font-size: 1rem; font-weight: 600; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-light);
}
.lang-picker { display: flex; gap: 8px; }
.lang-btn {
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: white; cursor: pointer;
  font-size: 0.9rem; transition: all 0.15s;
}
.lang-btn--active { border-color: var(--green-mid); background: var(--green-pale); }

/* ===== Country Flag ===== */
.flag { font-size: 1.2rem; line-height: 1; }

/* ===== Loading / HTMX ===== */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-request.htmx-indicator { display: inline-block; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--green-mid);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Toast ===== */
.toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 200;
}
.toast {
  background: var(--brown-dark); color: white;
  padding: 10px 20px; border-radius: var(--radius-full);
  font-size: 0.9rem; box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ===== Empty states ===== */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state__text { font-size: 1rem; }
.empty-state__action { margin-top: 16px; }

/* ===== Misc Utilities ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }

/* Feed bottom spacing for compose bar */
.feed-spacer { height: 72px; }

/* ===== Modal / Lightbox ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  background: white; border-radius: var(--radius-lg);
  max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal__header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.modal__title { font-size: 1.1rem; font-weight: 600; }
.modal__close {
  background: none; border: none; font-size: 1.2rem;
  cursor: pointer; color: var(--text-muted); padding: 4px 8px;
}
.modal__body { padding: 20px; }
.modal__footer {
  padding: 12px 20px; border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* Lightbox for photos */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  z-index: 400; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lightbox img { max-width: 95%; max-height: 95vh; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  color: white; font-size: 1.5rem; background: none; border: none;
  cursor: pointer;
}

/* ===== Filter bar ===== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.filter-chip {
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: white;
  font-size: 0.85rem; cursor: pointer; transition: all 0.15s;
}
.filter-chip:hover { background: var(--cream-dark); }
.filter-chip--active {
  background: var(--green-deep); color: white; border-color: var(--green-deep);
}

/* ===== Landing page (anonymous) ===== */
.landing {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--brown-dark) 100%);
  color: white;
}
.landing__title {
  font-family: var(--font-serif); font-size: 2.5rem;
  font-weight: 700; margin-bottom: 8px;
}
.landing__tagline {
  font-size: 1.1rem; opacity: 0.8; margin-bottom: 32px;
  font-style: italic;
}
.landing__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.landing .btn--primary {
  background: white; color: var(--green-deep);
  font-size: 1rem; padding: 12px 28px;
}
.landing .btn--primary:hover { background: var(--cream); }
