/* ═══════════════════════════════════════════
   FAMILY ARCHIVE — Design System
   ═══════════════════════════════════════════ */

:root {
  --warm-50: #fdf8f4;
  --warm-100: #f9ede2;
  --warm-200: #f0d9c4;
  --warm-300: #e4be9e;
  --warm-400: #d4996f;
  --warm-500: #c47a4a;
  --warm-600: #a65e33;
  --warm-700: #7d4627;
  --warm-800: #5a3320;
  --warm-900: #3d231a;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --forest-600: #4a6741;
  --sky-600: #3a7cb8;
  --rose-500: #c4697a;
  --red-500: #ef4444;
  --green-500: #22c55e;
  --sidebar-w: 240px;
  --shadow-sm: 0 1px 2px rgba(28,25,23,0.05);
  --shadow-md: 0 4px 12px rgba(28,25,23,0.08);
  --shadow-lg: 0 12px 32px rgba(28,25,23,0.12);
  --radius: 8px;
  --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--warm-50);
  color: var(--stone-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-y: scroll;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--stone-900);
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  transition: opacity 0.15s ease-out;
}
.sidebar-brand { padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-brand h1 {
  font-family: 'Playfair Display', serif;
  color: var(--warm-200); font-size: 1.3rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-brand h1 svg { opacity: 0.7; flex-shrink: 0; }
.sidebar-nav { padding: 12px 10px; flex: 1; }
.sidebar-section-label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--stone-500); padding: 16px 12px 6px; font-weight: 600;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--stone-400); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: all 0.15s; position: relative;
}
.sidebar-link:hover { color: var(--warm-100); background: rgba(255,255,255,0.06); }
.sidebar-link.active { color: var(--warm-200); background: rgba(255,255,255,0.1); }
.sidebar-link.active::before {
  content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; background: var(--warm-500); border-radius: 0 3px 3px 0;
}
.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active svg { opacity: 1; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 8px;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--warm-600);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.78rem; flex-shrink: 0;
}
.sidebar-user-info .user-name { font-size: 0.85rem; color: var(--warm-100); font-weight: 500; }
.sidebar-user-info .user-role { font-size: 0.7rem; color: var(--stone-500); }

/* ── Main Content ── */
.main { margin-left: var(--sidebar-w); min-height: 100vh; background: var(--warm-50); }
.content-page { padding: 32px 28px 80px; }

/* ── Page Headers ── */
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: var(--stone-900);
  letter-spacing: -0.02em; line-height: 1.2;
}
.page-subtitle { color: var(--stone-500); font-size: 0.9rem; margin-top: 2px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; border: none; font-family: inherit; white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--stone-900); color: white; }
.btn-primary:hover { background: var(--stone-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: white; color: var(--stone-700); border: 1px solid var(--stone-300); }
.btn-secondary:hover { border-color: var(--stone-400); background: var(--stone-50); }
.btn-danger { background: var(--red-500); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--stone-700); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--stone-200); border-radius: var(--radius);
  font-size: 0.9rem; font-family: inherit; outline: none;
  transition: border-color 0.2s; background: white;
}
.form-input:focus { border-color: var(--warm-400); }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ── Photo Grid ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.photo-card {
  position: relative; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; aspect-ratio: 1;
  background: var(--stone-200);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.photo-card:hover img { transform: scale(1.04); }
.photo-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,25,23,0.65) 0%, transparent 40%, transparent 60%, rgba(28,25,23,0.45) 100%);
  opacity: 0; transition: opacity 0.25s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.photo-card:hover .overlay { opacity: 1; }
.overlay-date { position: absolute; top: 8px; left: 8px; z-index: 2; }
.overlay-place { position: absolute; top: 8px; right: 8px; }
.overlay-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.overlay-tag {
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  color: white; font-size: 0.72rem; padding: 2px 8px;
  border-radius: 12px; font-weight: 500; cursor: pointer;
  transition: background 0.15s;
}
.overlay-tag:hover { background: rgba(255,255,255,0.4); }

/* ── Approximate date tooltip ── */
.approx-date { cursor: help; opacity: 0.6; }
#approx-tooltip {
  display: none; position: fixed; z-index: 9999;
  background: #2C2416; color: #fff; font-size: 0.7rem; font-weight: 500;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
  pointer-events: none;
}

/* ── People Grid ── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.person-card {
  padding: 16px;
  border-radius: var(--radius-lg); background: white;
  border: 1px solid var(--stone-100); cursor: pointer;
  transition: all 0.2s; text-decoration: none; color: inherit;
  display: flex; align-items: center; gap: 14px;
}
.person-card:hover { border-color: var(--warm-200); box-shadow: var(--shadow-md); }
.person-avatar-circle {
  width: 76px; height: 76px; border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--warm-200), var(--warm-300));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; color: var(--warm-700); font-weight: 600;
  border: 3px solid var(--warm-100);
}
.person-card-name { font-weight: 600; font-size: 0.95rem; color: var(--stone-800); }
.person-card-meta { font-size: 0.78rem; color: var(--stone-400); margin-top: 2px; }

/* ── Places Grid ── */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.place-card {
  background: white; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid transparent;
  transition: all 0.2s; text-decoration: none; color: inherit; display: block;
}
.place-card:hover { border-color: var(--warm-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.place-card-map {
  height: 100px;
  background: linear-gradient(135deg, #dde8d6, #c9dae4);
  display: flex; align-items: center; justify-content: center;
}
.place-card-body { padding: 14px 16px; }
.place-card-name { font-weight: 600; font-size: 0.95rem; color: var(--stone-800); }
.place-card-count { font-size: 0.78rem; color: var(--stone-400); margin-top: 2px; }

/* ── Feed ── */
.feed-container { max-width: 680px; margin: 0 auto; padding: 32px 24px 80px; }
.feed-header { margin-bottom: 28px; }
.feed-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: var(--stone-900);
}
.feed-header p { color: var(--stone-500); font-size: 0.92rem; margin-top: 4px; }
.feed-item {
  position: relative;
  background: white; border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 8px;
  border: 1px solid var(--stone-200); transition: border-color 0.2s, box-shadow 0.2s;
}
.feed-item:hover { border-color: var(--warm-200); box-shadow: var(--shadow-md); }
.feed-item-clickable { cursor: pointer; }
a.feed-name-link, a.feed-name-link:visited, a.feed-name-link:active {
  color: var(--warm-700); font-weight: 500; text-decoration: none;
  padding: 1px 4px; border-radius: 4px; transition: background 0.15s;
}
a.feed-name-link:hover { background: var(--warm-100); text-decoration: none; }
.feed-item-delete {
  display: none; position: absolute; top: -8px; right: -8px; z-index: 5;
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: var(--stone-200); color: var(--stone-500);
  font-size: 0.9rem; cursor: pointer; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.feed-item:hover .feed-item-delete { display: flex; }
.feed-item-delete:hover { background: var(--rose-100); color: var(--rose-500); }
.feed-item-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.feed-item-header:last-child { margin-bottom: 0; }
.feed-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.7rem; flex-shrink: 0; color: white;
  background: var(--warm-600);
}
.feed-user { font-weight: 600; font-size: 0.9rem; color: var(--stone-800); }
.feed-action { font-weight: 400; color: var(--stone-500); }
.feed-time { font-size: 0.78rem; color: var(--stone-400); }
.feed-date-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0 16px; font-size: 0.78rem; font-weight: 600;
  color: var(--stone-400); text-transform: uppercase; letter-spacing: 0.08em;
}
.feed-date-divider::before, .feed-date-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--stone-200);
}

.feed-photo-grid {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}
.feed-photo-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-lg); overflow: hidden;
  display: block; flex-shrink: 0;
}
.feed-photo-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.feed-photo-grid .feed-photo-thumb img { transition: transform 0.2s; }
.feed-photo-grid .feed-photo-thumb:hover img { transform: scale(1.05); }

/* ── Flash Messages ── */
.flash-messages { position: fixed; top: 16px; left: var(--sidebar-w); right: 0; padding: 0 28px; z-index: 200; pointer-events: none; }
.flash { pointer-events: auto; animation: flash-fade 4s ease forwards; }
@keyframes flash-fade {
  0%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}
.flash {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500; margin-bottom: 8px;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Filter Bar ── */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--stone-200); background: white; color: var(--stone-600);
  text-decoration: none; transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--warm-400); color: var(--warm-700); }
.filter-chip.active { background: var(--stone-800); color: white; border-color: var(--stone-800); }
.filter-search {
  padding: 7px 14px; border: 1px solid var(--stone-200); border-radius: 20px;
  font-size: 0.82rem; font-family: inherit; outline: none;
  background: white; min-width: 160px; transition: border-color 0.2s;
}
.filter-search:focus { border-color: var(--warm-400); }

/* ── Upload Zone ── */
.upload-zone {
  display: block;
  border: 2px dashed var(--stone-300); border-radius: 20px;
  padding: 48px; text-align: center; cursor: pointer;
  transition: all 0.25s; background: white;
}
.upload-zone:hover { border-color: var(--warm-400); background: var(--warm-50); }
.upload-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; color: var(--stone-700); font-weight: 600;
}
.upload-subtext { color: var(--stone-400); font-size: 0.85rem; margin-top: 6px; }

/* ── Auth Layout ── */
.auth-layout {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--stone-900); padding: 24px;
}
.auth-card {
  background: white; border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700; color: var(--stone-900);
  margin-bottom: 8px;
}
.auth-card p { color: var(--stone-500); font-size: 0.9rem; margin-bottom: 24px; }

/* ── Honeypot (invisible to humans) ── */
.ohnohoney { position: absolute; left: -9999px; opacity: 0; }

/* ── Mobile ── */
.mobile-header {
  display: none; position: sticky; top: 0; z-index: 100;
  background: var(--stone-900); padding: 14px 20px;
  align-items: center; justify-content: space-between;
}
.mobile-header h1 { font-family: 'Playfair Display', serif; color: var(--warm-200); font-size: 1.15rem; font-weight: 600; }
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px; background: var(--stone-900); z-index: 200;
  padding: 0 8px; align-items: center; justify-content: space-around;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: 8px;
  text-decoration: none; background: none; border: none; font-family: inherit;
}
.mobile-nav-item svg { width: 22px; height: 22px; color: var(--stone-500); }
.mobile-nav-item span { font-size: 0.62rem; font-weight: 600; color: var(--stone-500); }
.mobile-nav-item.active svg { color: var(--warm-300); }
.mobile-nav-item.active span { color: var(--warm-300); }

/* ── Admin ── */
.admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.admin-stat {
  background: white; border-radius: var(--radius-lg);
  padding: 20px; border: 1px solid var(--stone-200);
}
.admin-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: var(--stone-900);
}
.admin-stat-label { font-size: 0.82rem; color: var(--stone-500); margin-top: 2px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 12px; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--stone-500); border-bottom: 2px solid var(--stone-200);
}
.data-table td {
  padding: 12px; border-bottom: 1px solid var(--stone-100);
  font-size: 0.88rem;
}
.data-table tr:hover td { background: var(--warm-50); }

/* ── Person Slideshow ── */
.person-slideshow {
  position: relative;
  height: 85vh;
  min-height: 500px;
  max-height: none;
  overflow: hidden;
  background: var(--stone-900);
}
.person-slideshow-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
  background: black;
}
.person-slideshow-slide.active {
  opacity: 1;
}
.person-slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
  will-change: transform;
}
.person-slideshow-slide img.zooming {
  transform: scale(1.12);
}
/* Gradient overlay at bottom */
.person-slideshow-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, transparent 30%, transparent 55%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s;
}
/* Slideshow controls */
.person-slideshow-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 16px 28px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.person-slideshow-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.person-slideshow-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.person-slideshow-nav button:hover {
  background: rgba(255,255,255,0.3);
}
.person-slideshow-btn-fullscreen {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.person-slideshow-btn-fullscreen:hover {
  background: rgba(255,255,255,0.3);
}
/* Slideshow wrapper — sticky for parallax reveal */
.person-slideshow-wrapper {
  margin: -32px -28px 0;
  position: sticky;
  top: 0;
  z-index: 0;
}
/* Content that scrolls over the slideshow */
.slideshow-content-below {
  position: relative;
  z-index: 1;
  margin: 0 -28px;
  margin-top: -200px;
  padding: 0 28px 80px;
  background: linear-gradient(to bottom, transparent 0px, var(--warm-50) 120px);
}
/* Controls when moved into slideshow wrapper (near fullscreen) */
.person-slideshow-wrapper > #slideshow-controls-right {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  justify-content: center;
  z-index: 10;
  padding: 0 28px;
}
/* Photo counter */
.person-slideshow-counter {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  margin: 0 4px;
  min-width: 40px;
  text-align: center;
}
/* Shuffle button active state */
.person-slideshow-nav button.shuffle-active {
  background: rgba(255,255,255,0.35);
}
/* Settings panel */
.person-slideshow-settings {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.3s;
}
.person-slideshow-settings-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.person-slideshow-settings-btn:hover {
  background: rgba(255,255,255,0.3);
}
.person-slideshow-settings-panel {
  display: none;
  position: absolute;
  top: 42px;
  right: 0;
  background: rgba(28,25,23,0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.person-slideshow-settings-panel.open {
  display: block;
}
.ss-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.ss-setting-row + .ss-setting-row {
  border-top: 1px solid rgba(255,255,255,0.1);
}
.ss-setting-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  white-space: nowrap;
}
.ss-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.ss-toggle.on {
  background: var(--warm-500);
}
.ss-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.ss-toggle.on::after {
  transform: translateX(16px);
}
.ss-duration-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ss-duration-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s;
}
.ss-duration-btn:hover {
  background: rgba(255,255,255,0.3);
}
.ss-duration-value {
  font-size: 0.78rem;
  color: white;
  font-weight: 600;
  min-width: 28px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; }
  .mobile-header { display: flex; }
  .main { margin-left: 0; padding-bottom: 64px; }
  .feed-container { padding: 16px 16px 80px; }
  .content-page { padding: 16px 16px 80px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: 1.6rem; }
  .feed-header h1 { font-size: 1.6rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
  .places-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .auth-card { padding: 28px 24px; }
  .flash-messages { left: 0; padding: 0 16px; }
  .person-slideshow-wrapper { margin: -16px -16px 0; }
  .person-slideshow-controls { padding: 12px 16px 16px; }
  .person-slideshow { min-height: 400px; }
  .slideshow-content-below { margin: -200px -16px 0; padding: 0 16px 80px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .sidebar-link { font-size: 0.84rem; padding: 9px 10px; }
}
