/* ═══════════════════════════════════════════════════════
   BLESSED BEGINNINGS — Design System v9.0
   Warm, intimate, peaceful, premium, family-centered
   Enhanced: Soothing palettes, consistent typography, 
   emotionally resonant color refinements
   ═══════════════════════════════════════════════════════ */

:root {
  --cream: #faf7f2;
  --cream-dark: #f0ebe3;
  --warm-white: #fffdf9;
  --gold: #c9a96e;
  --gold-light: #e8d5a8;
  --gold-dark: #a88a4e;
  --rose: #d4a0a0;
  --rose-light: #f0d4d4;
  --rose-muted: #c48b8b;
  --sage: #8fa68f;
  --sage-light: #c5d6c5;
  --sage-dark: #6b8a6b;
  --olive: #9aab7f;
  --charcoal: #3a3632;
  --charcoal-light: #5a5550;
  --warm-gray: #8a8480;
  --warm-gray-light: #b5afa9;
  --navy: #3a4a5c;
  --navy-light: #5a7090;
  --blush: #f5e6e0;
  --lavender: #e8e0f0;

  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --shadow-sm: 0 1px 3px rgba(58, 54, 50, 0.05), 0 1px 2px rgba(58, 54, 50, 0.03);
  --shadow-md: 0 4px 12px rgba(58, 54, 50, 0.07), 0 2px 4px rgba(58, 54, 50, 0.04);
  --shadow-lg: 0 8px 30px rgba(58, 54, 50, 0.09), 0 4px 8px rgba(58, 54, 50, 0.04);
  --shadow-xl: 0 12px 40px rgba(58, 54, 50, 0.11), 0 6px 12px rgba(58, 54, 50, 0.05);
  --shadow-glow: 0 0 20px rgba(201, 169, 110, 0.12);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: var(--cream);
  --bg-secondary: var(--warm-white);
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --text-primary: var(--charcoal);
  --text-secondary: var(--charcoal-light);
  --text-muted: var(--warm-gray);
  --border-color: #e8e2da;
  --border-light: #f0ebe3;
}

/* Dark theme */
[data-theme="dark"] {
  --bg-primary: #1a1816;
  --bg-secondary: #222018;
  --bg-card: #2a2722;
  --bg-elevated: #332f2a;
  --text-primary: #f0ebe3;
  --text-secondary: #c5bfb5;
  --text-muted: #8a8480;
  --border-color: #3a3632;
  --border-light: #2e2a26;
  --gold: #d4b87a;
  --gold-light: #c9a96e;
  --rose: #d4a0a0;
  --sage: #9ab89a;
}

/* System dark mode fallback — applies before JS runs if no data-theme is set */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg-primary: #1a1816;
    --bg-secondary: #222018;
    --bg-card: #2a2722;
    --bg-elevated: #332f2a;
    --text-primary: #f0ebe3;
    --text-secondary: #c5bfb5;
    --text-muted: #8a8480;
    --border-color: #3a3632;
    --border-light: #2e2a26;
    --gold: #d4b87a;
    --gold-light: #c9a96e;
    --rose: #d4a0a0;
    --sage: #9ab89a;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
input, select, textarea, button { box-sizing: border-box; max-width: 100%; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
}

.bg-warm-cream { background: var(--bg-primary); }
.text-warm-charcoal { color: var(--text-primary); }

/* Typography — refined hierarchy for emotional resonance */
.font-serif { font-family: var(--font-serif); }
.font-display { font-family: var(--font-display); }
.font-sans { font-family: var(--font-sans); }

h1, h2, h3, .heading { 
  font-family: var(--font-display); 
  font-weight: 500; 
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { line-height: 1.65; }
.text-sm { line-height: 1.5; }
.text-xs { line-height: 1.45; letter-spacing: 0.01em; }

/* Cards — softened, more spacious */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-width: 0;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-elevated {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

/* Buttons — refined with smoother interactions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gold);
  color: white;
}
.btn-primary:hover { background: var(--gold-dark); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-secondary); }
.btn-rose {
  background: var(--rose);
  color: white;
}
.btn-rose:hover { background: var(--rose-muted); }
.btn-sage {
  background: var(--sage);
  color: white;
}
.btn-sage:hover { background: var(--sage-dark); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-secondary); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; min-height: 36px; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; min-height: 52px; }

/* Inputs — softer focus glow */
.input {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  box-sizing: border-box;
}

/* ── Fix broken native date/time input icons ── */
/* Prevent FontAwesome from overriding native calendar/clock picker glyphs */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  font-family: initial !important;
  font-size: 1rem;
  opacity: 0.6;
  cursor: pointer;
  padding: 4px;
  width: 20px;
  height: 20px;
}
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button,
input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-clear-button {
  font-family: initial !important;
  -webkit-appearance: none;
  display: none;
}
/* iOS Safari: Reset date input decoration font */
input[type="date"]::-webkit-date-and-time-value {
  font-family: var(--font-sans);
}
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12), 0 1px 3px rgba(201, 169, 110, 0.08);
}
textarea.input { min-height: 100px; resize: vertical; }

.label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}

/* Tags / Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.badge-gold { background: rgba(201,169,110,0.15); color: var(--gold-dark); }
.badge-rose { background: rgba(212,160,160,0.15); color: var(--rose-muted); }
.badge-sage { background: rgba(143,166,143,0.15); color: var(--sage-dark); }
.badge-navy { background: rgba(58,74,92,0.12); color: var(--navy); }

/* Navigation */
.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  padding: 0.25rem 0;
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.625rem;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  transition: color 0.2s;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--gold); }
.nav-item:hover { color: var(--gold); }
.nav-item i { font-size: 1.125rem; }

/* Sidebar (desktop) */
@media (min-width: 1024px) {
  .nav-bottom { display: none; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 100;
  }
  .main-content { margin-left: 240px; }
}
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .main-content { padding-bottom: 80px; }
}

/* Page transitions */
.page-enter { animation: pageIn 0.3s ease forwards; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast */
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
  min-width: 200px;
}
.toast-success { background: var(--sage); }
.toast-error { background: var(--rose-muted); }
.toast-info { background: var(--navy); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 90vh;
  width: 100%;
  max-width: 540px;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .modal-content { border-radius: var(--radius-xl); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}
.progress-gold { background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
.progress-rose { background: linear-gradient(90deg, var(--rose-light), var(--rose)); }
.progress-sage { background: linear-gradient(90deg, var(--sage-light), var(--sage)); }

/* Scripture / verse cards */
.verse-card {
  background: linear-gradient(135deg, rgba(201,169,110,0.08), rgba(212,160,160,0.06));
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-style: italic;
}
.verse-ref {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  color: var(--gold-dark);
  margin-top: 0.5rem;
  display: block;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-secondary);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Timeline */
.timeline-line {
  position: absolute;
  left: 1.25rem;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-light), var(--rose-light), var(--sage-light));
}
.timeline-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 2;
}

/* Tabs */
.tab-group {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-item {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: none;
  transition: all 0.2s;
  min-height: 36px;
}
.tab-item.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Checkbox */
.checkbox-custom {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.checkbox-custom.checked {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: 90px;
  right: 1rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  border: none;
  z-index: 50;
  transition: all 0.2s;
}
.fab:hover { transform: scale(1.05); box-shadow: var(--shadow-xl); }
.fab:active { transform: scale(0.95); }
@media (min-width: 1024px) { .fab { bottom: 2rem; right: 2rem; } }

/* Print styles */
@media print {
  .nav-bottom, .sidebar, .fab, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  body { background: white !important; color: #333 !important; }
  .verse-card { border-left-color: #999 !important; }
  .page-break { page-break-before: always; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--warm-gray-light); border-radius: 3px; }

/* Utility animations */
.animate-pulse-soft { animation: pulseSoft 3s ease-in-out infinite; }
@keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.animate-float { animation: floatUp 3s ease-in-out infinite; }
@keyframes floatUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Hidden section trigger */
.hidden-trigger {
  opacity: 0;
  width: 44px;
  height: 44px;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

/* Offline indicator */
.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--rose-muted);
  color: white;
  text-align: center;
  padding: 0.375rem;
  font-size: 0.75rem;
  z-index: 9999;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Week pill */
.week-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: white;
}

/* Gradient overlays */
.gradient-gold { background: linear-gradient(135deg, rgba(201,169,110,0.1), rgba(232,213,168,0.05)); }
.gradient-rose { background: linear-gradient(135deg, rgba(212,160,160,0.1), rgba(240,212,212,0.05)); }
.gradient-sage { background: linear-gradient(135deg, rgba(143,166,143,0.1), rgba(197,214,197,0.05)); }

/* Transition helpers */
.transition-all { transition: all 0.2s ease; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; }

/* ═══════════════════════════════════════════════════════
   ENHANCED UI v3.0 — Medical Guidance, Data Sections, 
   Severity Indicators, Resource Cards, Typography
   ═══════════════════════════════════════════════════════ */

/* Icon Badges — Large round icon containers for section headers */
.icon-badge {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.icon-badge-gold { background: rgba(201,169,110,0.15); color: var(--gold-dark); }
.icon-badge-rose { background: rgba(212,160,160,0.15); color: var(--rose-muted); }
.icon-badge-sage { background: rgba(143,166,143,0.15); color: var(--sage-dark); }
.icon-badge-navy { background: rgba(58,74,92,0.12); color: var(--navy); }

/* Section Header Enhanced */
.section-header-enhanced {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

/* Medical Callout — Highlighted info boxes for medical guidance */
.medical-callout {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border-left: 4px solid;
}
.medical-callout-info {
  background: rgba(58,74,92,0.06);
  border-left-color: var(--navy);
}
.medical-callout-warning {
  background: rgba(201,169,110,0.08);
  border-left-color: var(--gold);
}
.medical-callout-danger {
  background: rgba(212,100,100,0.08);
  border-left-color: #c44;
  color: #8b0000;
}
[data-theme="dark"] .medical-callout-danger {
  background: rgba(212,100,100,0.12);
  color: #ff8888;
}
.medical-callout-success {
  background: rgba(143,166,143,0.08);
  border-left-color: var(--sage);
}

/* Data Sections — Structured table/list containers */
.data-section {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.data-section-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}
.data-section-header.data-section-info {
  background: rgba(58,74,92,0.06);
  color: var(--navy);
}
.data-section-header.data-section-warning {
  background: rgba(201,169,110,0.1);
  color: var(--gold-dark);
}
.data-section-header.data-section-danger {
  background: rgba(212,100,100,0.1);
  color: #8b0000;
}
[data-theme="dark"] .data-section-header.data-section-danger {
  color: #ff8888;
}
.data-section-header.data-section-success {
  background: rgba(143,166,143,0.08);
  color: var(--sage-dark);
}
.data-section-body {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
}

/* Data Table — Clean medical-style tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}
.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-secondary); }

/* Severity Dots — Visual severity indicator */
.severity-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.severity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.15s ease;
}
.severity-dot.active { transform: scale(1.15); }

/* Resource Card — Location resource styling */
.resource-card {
  transition: all 0.2s ease;
}
.resource-card a {
  text-decoration: none;
}
.resource-card a:hover {
  text-decoration: underline;
}

/* Enhanced Progress Ring */
.progress-ring-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.progress-ring-text {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 500;
}

/* Gradient Backgrounds */
.gradient-navy { background: linear-gradient(135deg, rgba(58,74,92,0.06), rgba(90,112,144,0.03)); }

/* Enhanced card hover for interactive elements */
.card-interactive {
  cursor: pointer;
  transition: all 0.2s ease;
}
.card-interactive:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card-interactive:active {
  transform: scale(0.99);
}

/* Ring utility */
.ring-2 { box-shadow: 0 0 0 2px var(--gold); }
.ring-offset-1 { box-shadow: 0 0 0 1px var(--bg-card), 0 0 0 3px var(--gold); }

/* Checked state for severity buttons */
.sev-btn { transition: all 0.15s ease; }
.sev-btn:hover { transform: scale(1.1); }

/* Animated counter */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-count { animation: countUp 0.4s ease forwards; }

/* Enhanced select styling */
select.input {
  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='%238a8480'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Disabled button state */
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Line through for completed items */
.line-through { text-decoration: line-through; opacity: 0.6; }

/* ═══════════════════════════════════════════════════════
   YUKA-STYLE SCANNER v2 — Immersive, animated, responsive
   ═══════════════════════════════════════════════════════ */

/* Scanner viewport container */
.scanner-viewport {
  padding: 0;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-xl);
  min-height: 340px;
  background: #0a0a0a;
}

/* Scanner overlay layer */
.scanner-overlay-layer {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  flex-direction: column;
  justify-content: flex-end;
}

/* Scan window with clear area */
.scan-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72%;
  height: 42%;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.42);
  transition: box-shadow 0.3s ease;
}
.scan-window.detected {
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.42), 0 0 40px rgba(143,166,143,0.7), inset 0 0 20px rgba(143,166,143,0.25);
}

/* Corner brackets */
.scan-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  transition: border-color 0.3s ease;
}
.scan-corner-tl { top: -2px; left: -2px; border-top: 3px solid var(--sage); border-left: 3px solid var(--sage); border-radius: 8px 0 0 0; }
.scan-corner-tr { top: -2px; right: -2px; border-top: 3px solid var(--sage); border-right: 3px solid var(--sage); border-radius: 0 8px 0 0; }
.scan-corner-bl { bottom: -2px; left: -2px; border-bottom: 3px solid var(--sage); border-left: 3px solid var(--sage); border-radius: 0 0 0 8px; }
.scan-corner-br { bottom: -2px; right: -2px; border-bottom: 3px solid var(--sage); border-right: 3px solid var(--sage); border-radius: 0 0 8px 0; }
.scan-window.detected .scan-corner { border-color: #4ade80; }

/* Animated scan beam */
.scanner-beam {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--sage) 20%, rgba(143,166,143,0.9) 50%, var(--sage) 80%, transparent 100%);
  box-shadow: 0 0 12px var(--sage), 0 0 28px rgba(143,166,143,0.35);
  border-radius: 2px;
  animation: scanBeam 2s ease-in-out infinite;
}
@keyframes scanBeam {
  0%, 100% { top: 12%; opacity: 0.2; }
  50% { top: 88%; opacity: 1; }
}

/* Scanner status bar */
.scanner-status-bar {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}
.scanner-status-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.35);
  padding: 4px 14px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* Scan count badge */
.scan-count-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  background: rgba(143,166,143,0.85);
  padding: 4px 10px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  animation: fadeIn 0.3s ease;
}

/* Floating scanner button */
.scanner-float-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background 0.2s;
}
.scanner-float-btn:active { background: rgba(0,0,0,0.7); transform: scale(0.92); }

/* Green flash on barcode detect */
.scanner-flash {
  position: absolute;
  inset: 0;
  background: rgba(143,166,143,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: inherit;
  z-index: 5;
}
.scanner-flash.active {
  opacity: 1;
  animation: flashPulse 0.4s ease;
}
@keyframes flashPulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.2; }
  100% { opacity: 0; }
}

/* Score circle animation */
.score-circle-animated {
  animation: scorePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scorePopIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Product card slide-up animation */
.slide-up-enter {
  animation: slideUpCard 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideUpCard {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Skeleton loading pulse */
.skeleton-pulse {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-light) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Loading skeleton shapes */
.skeleton-line { height: 12px; border-radius: 6px; }
.skeleton-line-lg { height: 18px; border-radius: 8px; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card { height: 80px; border-radius: var(--radius-lg); }

/* ═══════════════════════════════════════════════════════
   ENHANCED MOBILE UX v2 — GPU-accelerated, 60fps
   ═══════════════════════════════════════════════════════ */

/* GPU-accelerated transforms for smooth animations */
.card, .btn, .nav-item, .tab-item, .fab, .modal-content, .gallery-item {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Momentum scrolling + containment */
.page-enter, .main-content, .modal-content, .tab-group {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Smooth scroll containers */
.main-content {
  scroll-behavior: smooth;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Enhanced active/pressed states for native feel */
.btn:active, .card-interactive:active {
  transform: scale(0.97) !important;
  transition: transform 0.06s ease !important;
}
.nav-item:active {
  transform: scale(0.90) !important;
  transition: transform 0.05s ease !important;
}
.gallery-item:active {
  transform: scale(0.95) !important;
}
.tab-item:active {
  transform: scale(0.95) !important;
  transition: transform 0.05s ease !important;
}

/* Faster page transitions */
@keyframes pageIn {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.page-enter { animation: pageIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* Smoother modal slide-up */
@keyframes slideUp {
  from { transform: translate3d(0, 100%, 0); opacity: 0.8; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}
.modal-content { animation: slideUp 0.25s cubic-bezier(0.22, 1, 0.36, 1); }

/* GPU-optimized card hover */
.card-interactive:hover {
  box-shadow: var(--shadow-md);
  transform: translate3d(0, -1px, 0);
}

/* Reduce layout thrash on rapid interactions */
.nav-item, .btn, .tab-item, .card-interactive {
  contain: layout style;
}

/* ═══════════════════════════════════════════════════════
   IPHONE / MOBILE RESPONSIVE v2 — 
   Touch optimized, safe-area, faster, larger targets
   ═══════════════════════════════════════════════════════ */

/* Safe area support for notch/home-indicator iPhones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .nav-bottom {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
  .fab {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
  body {
    padding-top: env(safe-area-inset-top);
  }
}

/* Mobile-first (max-width: 767px) */
@media (max-width: 767px) {
  /* ── TOUCH TARGETS: 44px minimum per Apple HIG ── */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 0.5rem 0.875rem; }
  .input { min-height: 44px; font-size: 16px !important; } /* 16px prevents iOS zoom */
  select.input { min-height: 44px; font-size: 16px !important; }
  textarea.input { min-height: 80px; font-size: 16px !important; }
  .tab-item { min-height: 40px; padding: 0.5rem 0.75rem; font-size: 0.75rem; }
  .nav-item { min-height: 52px; min-width: 52px; }
  .nav-item i { font-size: 1.25rem; }
  .nav-item span { font-size: 0.625rem; font-weight: 500; }
  .checkbox-custom { width: 28px; height: 28px; }

  /* ── OVERFLOW PREVENTION ── */
  .page-enter { overflow-x: hidden; }
  .main-content { overflow-x: hidden; }
  #page-content { overflow-x: hidden; word-break: break-word; }

  /* ── CARD SPACING ── */
  .card { padding: 1rem; }
  
  /* ── TABLE SCROLL ── */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  
  /* ── GRID FIXES ── */
  .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ── GALLERY ── */
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }

  /* ── MODAL ── */
  .modal-content { max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 88vh; }
  
  /* ── HEADINGS ── */
  h1, h2, h3, h4 { overflow-wrap: break-word; word-wrap: break-word; }

  /* ── BOTTOM NAV ── */
  .nav-bottom {
    padding: 0.375rem 0.25rem;
    padding-bottom: max(0.375rem, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .main-content { padding-bottom: 88px; }
  
  /* ── MORE MENU GRID ── */
  .modal-content .grid-cols-2 { gap: 0.5rem; }
  
  /* ── TOAST FULL-WIDTH ── */
  #toast-root { top: max(1rem, env(safe-area-inset-top, 1rem)); right: 0.75rem; left: 0.75rem; }
  .toast { min-width: auto; width: 100%; }

  /* ── SCANNER MOBILE ── */
  .scanner-viewport { min-height: 300px; border-radius: var(--radius-lg); }
  #scanner-video { max-height: 55vh; }
  .scan-window { width: 78%; height: 44%; }
}

/* Small phones (iPhone SE, 5s, etc.) */
@media (max-width: 374px) {
  .card { padding: 0.75rem; }
  .btn { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }
  .btn-lg { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
  h1.font-display { font-size: 1.5rem; }
  .tab-item { padding: 0.375rem 0.5rem; font-size: 0.6875rem; }
  .icon-badge { width: 40px; height: 40px; border-radius: 12px; font-size: 1rem; }
  .badge { font-size: 0.65rem; padding: 0.2rem 0.5rem; }
  .nav-item { min-width: 44px; min-height: 48px; }
  .nav-item i { font-size: 1.125rem; }
  .nav-item span { font-size: 0.5625rem; }
  .modal-content { padding: 1rem; }
  .scanner-viewport { min-height: 260px; }
  .scan-window { width: 82%; height: 46%; }
}

/* Medium phones (375-428px: iPhone 13/14/15) */
@media (min-width: 375px) and (max-width: 428px) {
  .nav-item { min-width: 56px; }
  .scan-window { width: 74%; height: 42%; }
}

/* Tab overflow scroll for many tabs */
.tab-group {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tab-group::-webkit-scrollbar { display: none; }

/* Truncation utility */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Flex min-width fix for text truncation */
.min-w-0 { min-width: 0; }

/* Active state for filter buttons */
.fs-filter-btn.active,
.fs-shop-filter.active,
.fs-browse-filter.active {
  background: var(--gold) !important;
  color: white !important;
  border-color: var(--gold) !important;
}

/* Smooth transitions for filter/tab interactions */
.fs-history-item,
.fs-browse-item {
  transition: all 0.15s ease;
}

/* Touch-action for better mobile touch handling */
.btn, .card-interactive, .nav-item, .tab-item, .checkbox-custom {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Prevent double-tap zoom on interactive elements */
* { touch-action: manipulation; }

/* Details/summary for collapsible sections */
details summary {
  list-style: none;
  cursor: pointer;
}
details summary::-webkit-details-marker { display: none; }
details summary::marker { display: none; }
details summary::before {
  content: '▸ ';
  transition: transform 0.2s ease;
  display: inline-block;
}
details[open] summary::before {
  transform: rotate(90deg);
}

/* Bottom nav frosted glass effect on mobile */
@media (max-width: 767px) {
  .nav-bottom {
    background: color-mix(in srgb, var(--bg-card) 88%, transparent);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
  }
}

/* ═══════════════════════════════════════════════════════
   v9.0 — Palette Transitions, Enhanced Components,
   Soothing Refinements, Partner Profile
   ═══════════════════════════════════════════════════════ */

/* Smooth palette transitions — all themed properties animate */
:root {
  transition: 
    --gold 0.4s ease,
    --rose 0.4s ease,
    --sage 0.4s ease;
}
body, .card, .btn, .input, .nav-bottom, .sidebar, .modal-content, 
.badge, .verse-card, .fab, .toast, .tab-group, .tab-item {
  transition: 
    background 0.4s ease, 
    color 0.3s ease, 
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Palette picker card states */
.palette-option {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}
.palette-option:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.palette-option.ring-2 {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-md) !important;
}

/* Enhanced profile avatar ring */
.profile-avatar-ring {
  box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px var(--gold-light);
}

/* Partner avatar styling */
.partner-avatar-ring {
  box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px var(--navy-light);
}

/* Reminder category type chips */
.erem-type-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.erem-type-btn.active {
  transform: scale(1.02);
}

/* Enhanced reminder card overdue pulse */
@keyframes overduePulse {
  0%, 100% { border-left-color: var(--rose); }
  50% { border-left-color: var(--rose-light); }
}
.card[style*="border-left:3px solid var(--rose)"] {
  animation: overduePulse 2s ease-in-out infinite;
}

/* Soothing section transitions */
.section-header-enhanced {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  transition: border-color 0.3s ease;
}

/* Enhanced badge glow for active palette */
.badge-glow {
  box-shadow: 0 0 8px rgba(201, 169, 110, 0.2);
}

/* Smoother gradient backgrounds that respond to palette */
.gradient-gold { background: linear-gradient(135deg, rgba(201,169,110,0.08), rgba(232,213,168,0.04)); }
.gradient-rose { background: linear-gradient(135deg, rgba(212,160,160,0.08), rgba(240,212,212,0.04)); }
.gradient-sage { background: linear-gradient(135deg, rgba(143,166,143,0.08), rgba(197,214,197,0.04)); }

/* Quick-add reminder chips scroll */
.reminder-chips-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.reminder-chips-scroll::-webkit-scrollbar { display: none; }

/* Settings card sections — subtle separation */
.settings-section > .card {
  margin-bottom: 0.75rem;
}

/* Enhanced empty state for reminders */
.empty-state-enhanced {
  padding: 3.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(201,169,110,0.04), rgba(212,160,160,0.03));
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-color);
}
.empty-state-enhanced i {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  opacity: 0.3;
  color: var(--gold);
}

/* Softer print styles */
@media print {
  .palette-option { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ═══════════════════════════════════════════════════════
   ONBOARDING TUTORIAL — Full-screen guided walkthrough
   ═══════════════════════════════════════════════════════ */

/* Overlay — full-screen backdrop */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.onboarding-overlay.visible { opacity: 1; }
.onboarding-overlay.exiting { opacity: 0; pointer-events: none; }

/* Container — centered column layout */
.onboarding-container {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  position: relative;
}

/* Skip button — top-right */
.onboarding-skip {
  position: absolute;
  top: 0;
  right: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}
.onboarding-skip:hover { color: white; }

/* Progress dots */
.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 0 1rem;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}
.onboarding-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--gold);
}
.onboarding-dot.completed {
  background: rgba(201, 169, 110, 0.6);
}

/* Card wrapper — swipe container */
.onboarding-card-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

/* Card — the main content area */
.onboarding-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  max-height: 100%;
  animation: onboardCardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  -webkit-overflow-scrolling: touch;
}
@keyframes onboardCardIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.onboarding-card.exit-left {
  animation: onboardExitLeft 0.2s ease forwards;
}
.onboarding-card.exit-right {
  animation: onboardExitRight 0.2s ease forwards;
}
@keyframes onboardExitLeft {
  to { opacity: 0; transform: translateX(-40px) scale(0.95); }
}
@keyframes onboardExitRight {
  to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* Hero icon — big animated circle */
.onboarding-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: white;
  animation: heroFloat 3s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Typography */
.onboarding-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}
.onboarding-subtitle {
  font-size: 0.875rem;
  text-align: center;
  color: var(--gold-dark);
  font-weight: 500;
  margin-bottom: 0.875rem;
}
.onboarding-body {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.25rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature list */
.onboarding-features {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.onboarding-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  animation: featureSlideIn 0.3s ease forwards;
  opacity: 0;
  transform: translateX(-8px);
}
@keyframes featureSlideIn {
  to { opacity: 1; transform: translateX(0); }
}
.onboarding-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .onboarding-feature-icon {
  background: rgba(255, 255, 255, 0.06);
}
.onboarding-feature-text {
  font-size: 0.8125rem;
  color: var(--text-primary);
  font-weight: 450;
}

/* Scripture verse */
.onboarding-verse {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(201,169,110,0.08), rgba(212,160,160,0.06));
  border-left: 3px solid var(--gold);
}
.onboarding-verse-quote {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--gold-light);
  opacity: 0.5;
}
.onboarding-verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 0.5rem;
}
.onboarding-verse-ref {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-top: 0.5rem;
  padding-left: 0.5rem;
}

/* Quick action button */
.onboarding-action-btn {
  display: block;
  width: 100%;
  padding: 0.625rem;
  border: 1.5px dashed var(--gold-light);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gold-dark);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.onboarding-action-btn:hover {
  background: rgba(201, 169, 110, 0.08);
  border-color: var(--gold);
}

/* Bottom navigation */
.onboarding-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.25rem 0;
  gap: 0.75rem;
}
.onboarding-nav .btn {
  min-width: 100px;
}
.onboarding-btn-start {
  flex: 1;
  animation: pulseGold 2s ease-in-out infinite;
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 4px 16px rgba(201, 169, 110, 0.3); }
  50% { box-shadow: 0 4px 24px rgba(201, 169, 110, 0.5); }
}

/* ── Responsive adjustments ── */
@media (max-width: 374px) {
  .onboarding-card { padding: 1.25rem 1rem; }
  .onboarding-title { font-size: 1.25rem; }
  .onboarding-hero-icon { width: 60px; height: 60px; font-size: 1.5rem; }
  .onboarding-feature { padding: 0.5rem 0.75rem; }
  .onboarding-feature-icon { width: 28px; height: 28px; font-size: 0.75rem; }
  .onboarding-feature-text { font-size: 0.75rem; }
  .onboarding-body { font-size: 0.8125rem; }
}

@media (min-width: 640px) {
  .onboarding-card { padding: 2rem 2rem; }
  .onboarding-hero-icon { width: 80px; height: 80px; font-size: 2rem; }
  .onboarding-title { font-size: 1.75rem; }
}

/* Print enhancements */
@media print {
  .medical-callout { border: 1px solid #ccc !important; background: #f9f9f9 !important; }
  .data-section { border: 1px solid #ccc !important; }
  .severity-dots { display: none; }
  .onboarding-overlay { display: none !important; }
}

/* ═══════════════════════════════════════════════════════
   v9.2 — GLOBAL OVERFLOW FIX
   Prevents inputs/fields from breaking out of card containers.
   Placed at end of file for max specificity over Tailwind CDN.
   ═══════════════════════════════════════════════════════ */

/* Force all form elements to respect parent width */
.card input,
.card select,
.card textarea,
.card .input,
.modal-content input,
.modal-content select,
.modal-content textarea,
.modal-content .input {
  max-width: 100% !important;
  box-sizing: border-box !important;
  width: 100%;
}

/* Ensure cards never let children overflow */
.card {
  overflow: hidden;
  min-width: 0;
}

/* Fix flex children min-width: auto default (the #1 cause of overflow) */
.card > *,
.card > div > *,
.space-y-3 > *,
.space-y-4 > * {
  min-width: 0;
}

/* Date/time inputs specifically (native widgets can be extra wide) */
input[type="date"].input,
input[type="time"].input,
input[type="datetime-local"].input,
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* Page content overflow prevention (all screen sizes) */
#page-content {
  overflow-x: hidden;
  max-width: 100%;
}

.page-enter {
  overflow-x: hidden;
  max-width: 100%;
}

/* Fix flex rows with inputs */
.flex > .input,
.flex > input,
.flex > select,
.flex > textarea {
  min-width: 0;
}

/* Grid overflow fix */
.grid > .card {
  min-width: 0;
  overflow: hidden;
}
