@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --primary: #880E4F;
  --secondary: #AD1457;
  --accent: #C2185B;
  --light: #EC407A;
  --bg: #FCE4EC;
  --card: #ffffff;
  --text: #3E2723;
  --text-secondary: #6D4C41;
  --text-light: #8D6E63;
  --border: #FFE0B2;
  --shadow: rgba(245, 127, 23, 0.1);
  --shadow-md: rgba(245, 127, 23, 0.15);
  --danger: #E53935;
  --danger-light: #FFEBEE;
  --success: #43A047;
  --timeline-line: #FFE0B2;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

::selection {
  background: var(--accent);
  color: var(--text);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Quicksand', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== APP LAYOUT ===== */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 20%;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.header-icon {
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.header-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.header-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin-top: 2px;
}

/* ===== TAB NAVIGATION ===== */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  margin: 1rem 1rem 0;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.25s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 3px 10px var(--shadow-md);
}

.tab-btn:not(.active):hover {
  background: var(--bg);
  color: var(--text);
}

.tab-icon {
  font-size: 1.1rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding: 1rem;
}

/* ===== LOADING ===== */
.loading-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.skeleton-card {
  height: 120px;
  background: linear-gradient(110deg, #f0f0f0 8%, #fafafa 18%, #f0f0f0 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== TIMELINE HEADER ===== */
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.milestone-count {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.count-number {
  font-family: 'Nunito', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.count-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--shadow-md);
  transition: all 0.25s ease;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--shadow-md);
}

.add-icon {
  font-size: 1.2rem;
  font-weight: 800;
}

/* ===== FILTER STRIP ===== */
.filter-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.85rem;
  border: 2px solid var(--border);
  background: var(--card);
  border-radius: 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(251, 192, 45, 0.3);
}

.filter-chip:not(.active):hover {
  border-color: var(--accent);
  background: var(--bg);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: fadeIn 0.5s ease;
}

.empty-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-text {
  font-size: 0.9rem;
  color: var(--text-light);
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding: 0.5rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  border-radius: 3px;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: flex;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.4s ease both;
}

.timeline-item.left {
  justify-content: flex-start;
  padding-right: calc(50% + 24px);
}

.timeline-item.right {
  justify-content: flex-end;
  padding-left: calc(50% + 24px);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 3px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 2;
  box-shadow: 0 2px 8px var(--shadow);
}

.timeline-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  width: 100%;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-md);
}

.card-photo {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.card-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.card-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-relative {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
}

.card-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.card-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: capitalize;
}

.card-actions {
  display: flex;
  border-top: 1px solid var(--border);
}

.action-btn {
  flex: 1;
  padding: 0.65rem;
  border: none;
  background: transparent;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.edit-btn {
  color: var(--primary);
  border-right: 1px solid var(--border);
}

.edit-btn:hover {
  background: var(--bg);
}

.delete-btn {
  color: var(--danger);
}

.delete-btn:hover {
  background: var(--danger-light);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(62, 39, 35, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

/* ===== FORM ===== */
.milestone-form {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--card);
  transition: border-color 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(251, 192, 45, 0.2);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238D6E63'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg);
}

.photo-upload-area:hover {
  border-color: var(--accent);
  background: rgba(251, 192, 45, 0.1);
}

.file-input-hidden {
  display: none;
}

.upload-icon {
  font-size: 1.8rem;
}

.upload-text {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 600;
}

.photo-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 200px;
}

.photo-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
}

.photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.photo-remove:hover {
  background: var(--danger);
}

/* ===== FORM ACTIONS ===== */
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-secondary {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--text-light);
  color: var(--text);
}

.btn-primary {
  flex: 2;
  padding: 0.75rem;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== SUGGESTIONS ===== */
.suggestions-container {
  animation: fadeIn 0.3s ease;
}

.suggestions-header {
  margin-bottom: 1rem;
}

.suggestions-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.suggestions-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.suggestions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  animation: fadeInUp 0.3s ease both;
}

.suggestion-card:hover:not(.recorded) {
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--shadow);
  transform: translateX(4px);
}

.suggestion-card.recorded {
  opacity: 0.6;
  cursor: default;
  background: var(--bg);
}

.suggestion-emoji {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 12px;
  flex-shrink: 0;
}

.suggestion-info {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.suggestion-age {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.suggestion-status {
  flex-shrink: 0;
}

.status-recorded {
  font-size: 1.3rem;
}

.status-add {
  padding: 0.35rem 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 640px) {
  .app-header {
    padding: 1.5rem 1rem 1.25rem;
  }

  .header-title {
    font-size: 1.3rem;
  }

  .header-icon {
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }

  .tab-nav {
    margin: 0.75rem 0.75rem 0;
  }

  .main-content {
    padding: 0.75rem;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-item.left,
  .timeline-item.right {
    padding-left: 56px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-dot {
    left: 20px;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .card-photo {
    height: 140px;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .modal-content {
    max-height: 95vh;
  }

  .filter-chip {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }

  .chip-label {
    display: none;
  }
}

@media (min-width: 641px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-content {
    border-radius: var(--radius-lg);
    margin: 1rem;
  }

  .suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
}
```

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Baby Milestones! This is your personal timeline to track all your baby's special moments.", "view": "user", "highlight_selector": ".app-header", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "The Timeline tab shows all recorded milestones in a beautiful alternating timeline. Right now it's empty — let's add one!", "view": "user", "highlight_selector": ".empty-state", "wait_for": "tap_to_continue"},
  {"step": 3, "narration": "Tap 'Add Milestone' to record a new first moment. You can add a title, date, category, notes, and even a photo!", "view": "user", "highlight_selector": ".add-btn", "wait_for": "user_interaction"},
  {"step": 4, "narration": "Fill in what happened, pick the date, choose a category, and optionally add a photo. Then tap 'Save Milestone'.", "view": "user", "highlight_selector": ".milestone-form", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Your milestone now appears on the timeline! Tap any card to expand it and see edit/delete options.", "view": "user", "highlight_selector": ".timeline-card", "wait_for": "tap_to_continue"},
  {"step": 6, "narration": "Use the category filters to view milestones by type — Physical, Speech, Social, Cognitive, Feeding, or Other.", "view": "user", "highlight_selector": ".filter-strip", "wait_for": "tap_to_continue"},
  {"step": 7, "narration": "Switch to the Suggestions tab to browse common baby milestones organized by expected age.", "view": "user", "highlight_selector": ".tab-btn:last-child", "wait_for": "user_interaction"},
  {"step": 8, "narration": "Tap any suggestion to instantly add it to your timeline. Recorded milestones show a green checkmark.", "view": "user", "highlight_selector": ".suggestion-card", "wait_for": "tap_to_continue"}
]
-->

/* ===== AUTH / FAMILY ACCOUNT ===== */
.auth-screen {
  display: flex;
  flex-direction: column;
}

.auth-panel {
  padding: 1.25rem 1rem 2rem;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px var(--shadow);
  padding: 1.5rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.auth-hero {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.auth-copy {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.auth-benefits {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.auth-benefits li {
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

.google-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.google-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.google-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #4285F4;
  background: #fff;
  border: 2px solid #E0E0E0;
}

.auth-footnote {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.9rem;
  line-height: 1.5;
}

.auth-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  margin: 0 auto 0.85rem;
  animation: spin 0.9s linear infinite;
}

.auth-text {
  color: var(--text-secondary);
  font-weight: 600;
}

.family-account-line {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-weight: 800;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
}

.user-email {
  font-size: 0.76rem;
  color: var(--text-light);
}

.signout-btn {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--card);
  color: var(--text-secondary);
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
  cursor: pointer;
}

.signout-btn:hover {
  background: var(--bg);
  color: var(--text);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .user-bar {
    padding: 0.75rem 0.75rem 0;
  }

  .auth-panel {
    padding: 1rem 0.75rem 1.5rem;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .signout-btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ===== TIMELINE SHARING ===== */
.timeline-share-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: var(--card);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  border-color: var(--accent);
  background: var(--bg);
  color: var(--text);
}

.share-link-panel {
  margin-bottom: 1rem;
}

.share-link-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 10px var(--shadow);
}

.share-link-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.share-link-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 0.75rem;
}

.share-copy-btn {
  width: 100%;
}

.share-error {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--danger-light);
  color: var(--danger);
  font-weight: 600;
  border: 1px solid rgba(229, 57, 53, 0.15);
}

.share-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: rgba(67, 160, 71, 0.08);
  border: 1px solid rgba(67, 160, 71, 0.2);
}

.share-banner-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.shared-access-state {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
}

.share-revoke-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .timeline-share-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .share-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.timeline-share-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: var(--card);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  border-color: var(--accent);
  background: var(--bg);
  color: var(--text);
}

.share-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.share-link-panel {
  margin-bottom: 1rem;
}

.share-link-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 10px var(--shadow);
}

.share-link-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.share-link-value {
  font-size: 0.9rem;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 0.75rem;
}

.share-copy-btn {
  width: 100%;
}

.share-error {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--danger-light);
  color: var(--danger);
  font-weight: 600;
  border: 1px solid rgba(229, 57, 53, 0.15);
}

.share-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: rgba(67, 160, 71, 0.08);
  border: 1px solid rgba(67, 160, 71, 0.2);
}

.share-banner-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.shared-access-state {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
}

.share-revoke-btn {
  white-space: nowrap;
}

.pdf-export-shell {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.pdf-export-page {
  width: 800px;
  min-height: 1120px;
  padding: 32px;
  background: #fff;
  color: #222;
  font-family: 'Quicksand', sans-serif;
}

.pdf-export-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0e0b8;
}

.pdf-export-header h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 28px;
  margin-bottom: 6px;
}

.pdf-export-header p {
  color: #666;
  font-size: 14px;
}

.pdf-export-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdf-export-card {
  border: 1px solid #e9e0cf;
  border-radius: 14px;
  padding: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.pdf-export-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pdf-export-date {
  font-size: 12px;
  font-weight: 700;
  color: #b57a00;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pdf-export-card h2 {
  font-size: 18px;
  margin: 0;
  color: #222;
}

.pdf-export-category {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
}

.pdf-export-photo-wrap {
  margin-bottom: 12px;
}

.pdf-export-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
}

.pdf-export-description {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

@media (max-width: 640px) {
  .timeline-share-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .share-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.ai-suggestions-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}

.ai-suggestions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.ai-suggestions-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.3rem;
}

.ai-suggestions-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.ai-suggestions-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ai-refresh-btn {
  flex: 0 0 auto;
}

.ai-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ai-suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}

.ai-suggestion-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-suggestion-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.ai-suggestion-empty {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .ai-suggestions-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-suggestions-grid {
    grid-template-columns: 1fr;
  }
}
