/* ===== CLASPER – Keeping Family Close ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

/* Prevent white flash before CSS loads */
html { background: #f5ebe0; }

:root {
  --warm-cream: #f5ebe0;
  --warm-tan: #ddb892;
  --warm-brown: #7f4f24;
  --warm-dark: #3b1f0e;
  --warm-accent: #b5703a;
  --warm-green: #588157;
  --warm-red: #a4262c;
  --warm-blue: #3d7a8a;
  --warm-purple: #6b5b95;
  --white: #fdf6ee;
  --shadow: 0 4px 20px rgba(59,31,14,0.12);
  --shadow-lg: 0 8px 40px rgba(59,31,14,0.18);
  --radius: 16px;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  --font-size-base: 16px;
  /* Dark mode surface vars (overridden below) */
  --dm-bg: #1a1008;
  --dm-surface: #2a1a0e;
  --dm-card: #2e1e10;
  --dm-border: rgba(221,184,146,0.15);
  --dm-text: #e8d5b7;
  --dm-muted: #a08060;
}

/* ── DARK MODE ─────────────────────────────────────────── */
body.dark-mode {
  --warm-cream: #1a1008;
  --warm-tan: #5a3820;
  --warm-brown: #ddb892;
  --warm-dark: #f0e0c8;
  --white: #2a1a0e;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.55);
  background: #1a1008;
  color: #e8d5b7;
}
body.dark-mode .widget,
body.dark-mode .card,
body.dark-mode .feature-card,
body.dark-mode .step-card,
body.dark-mode .wall-post,
body.dark-mode .profile-card,
body.dark-mode .settings-panel,
body.dark-mode .settings-sidebar,
body.dark-mode .ob-card,
body.dark-mode .form-box,
body.dark-mode .msg-window,
body.dark-mode .msg-list,
body.dark-mode .tl-card {
  background: #2a1a0e !important;
  border-color: rgba(221,184,146,0.15) !important;
  color: #e8d5b7;
}
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #1e1208 !important;
  border-color: #5a3820 !important;
  color: #e8d5b7 !important;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder { color: #7a5a3a !important; }
body.dark-mode .feed-item { background: #2a1a0e; border-color: rgba(221,184,146,0.1); }
body.dark-mode .msg-thread { background: #2a1a0e; }
body.dark-mode .msg-thread:hover { background: #3a2a1a; }
body.dark-mode footer { background: #0e0804; }
body.dark-mode .ob-overlay { background: linear-gradient(135deg,rgba(10,5,2,0.88) 0%,rgba(80,50,25,0.7) 100%); }
body.dark-mode .code-box { background: linear-gradient(135deg,#5a3820,#3a2010); }
body.dark-mode .path-card { background: #2a1a0e; border-color: #5a3820; }
body.dark-mode .path-card:hover { background: #3a2a1a; }
body.dark-mode .filter-tab { background: #2a1a0e; color: #a08060; }
body.dark-mode .filter-tab.active { background: var(--warm-accent); color: white; }
body.dark-mode .page-hero-content h1,
body.dark-mode .page-hero-content p { color: white; }
body.dark-mode .section-title,
body.dark-mode .ob-title { color: #ddb892 !important; }
body.dark-mode .ob-sub,
body.dark-mode label,
body.dark-mode p { color: #a08060; }
body.dark-mode .btn-outline {
  border-color: #5a3820;
  color: #ddb892;
  background: transparent;
}
body.dark-mode .btn-outline:hover { background: #3a2a1a; }
body.dark-mode .dark-toggle-icon::before { content: '\2600\FE0F'; }

/* Dark mode toggle button */
.dark-toggle {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--warm-accent);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 999;
  transition: transform 0.2s, background 0.2s;
}
.dark-toggle:hover { transform: scale(1.1); }

/* Floating back button */
.floating-back-btn {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 1000;
  background: rgba(253,246,238,0.92);
  color: var(--warm-brown);
  border: 2px solid var(--warm-tan);
  border-radius: 24px;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  font-family: var(--font-body);
  transition: all 0.2s;
}
.floating-back-btn:hover { background: var(--warm-accent); color: white; border-color: var(--warm-accent); transform: translateY(-1px); }
body.dark-mode .floating-back-btn { background: rgba(42,26,14,0.92); color: #ddb892; border-color: #5a3a1e; }

/* Quick Menu FAB + Panel */
.quick-menu-fab {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--warm-accent), var(--warm-brown));
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(181,112,58,0.4);
  transition: all 0.2s;
}
.quick-menu-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(181,112,58,0.5); }
.quick-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1100;
  backdrop-filter: blur(2px);
}
.quick-menu-overlay.open { display: block; }
.quick-menu-panel {
  display: none;
  position: fixed;
  bottom: 6rem;
  right: 1rem;
  z-index: 1101;
  background: #fdf6ee;
  border-radius: 18px;
  padding: 1.2rem;
  width: min(340px, 88vw);
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  animation: fadeUp 0.2s ease;
}
.quick-menu-panel.open { display: block; }
.qm-header {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--warm-brown);
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.qm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.qm-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  background: rgba(181,112,58,0.08);
  border-radius: 10px;
  text-decoration: none;
  color: var(--warm-brown);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
}
.qm-item:hover { background: rgba(181,112,58,0.18); transform: translateY(-1px); }
.qm-icon { font-size: 1.05rem; flex-shrink: 0; }
body.dark-mode .quick-menu-panel { background: #1e140a; }
body.dark-mode .qm-item { background: rgba(221,184,146,0.1); color: #ddb892; }
body.dark-mode .qm-header { color: #ddb892; }

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

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  background: var(--warm-cream);
  color: var(--warm-dark);
  line-height: 1.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23f5ebe0'/%3E%3Ccircle cx='1' cy='1' r='0.5' fill='rgba(127,79,36,0.05)'/%3E%3Ccircle cx='3' cy='3' r='0.5' fill='rgba(127,79,36,0.05)'/%3E%3C/svg%3E");
}

/* ===== NAV ===== */
nav {
  background: linear-gradient(135deg, #2c1810 0%, #3e2723 50%, #5a3825 100%);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(200,149,108,0.15);
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
nav.scrolled {
  background: rgba(44,24,16,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.45);
}

.nav-logo { display:flex; align-items:center; gap:12px; text-decoration:none; }
.nav-logo img { height:72px; filter:drop-shadow(0 2px 8px rgba(0,0,0,0.4)); transition:transform 0.3s; }
.nav-logo img:hover { transform:scale(1.08) rotate(-2deg); }
.nav-logo-text { display:flex; flex-direction:column; }
.nav-logo span { font-family:var(--font-heading); font-size:1.9rem; color:var(--warm-tan); font-weight:700; letter-spacing:1px; line-height:1; }
.nav-logo small { font-size:0.7rem; color:rgba(232,213,183,0.5); letter-spacing:2px; text-transform:uppercase; margin-top:1px; }

/* Nav date/clock strip */
.nav-meta {
  display:flex; flex-direction:column; align-items:center; gap:1px;
  color:rgba(232,213,183,0.6); font-size:0.72rem; letter-spacing:1px;
  text-transform:uppercase;
}
.nav-clock {
  font-family:var(--font-heading); font-size:1.1rem; color:var(--warm-tan);
  letter-spacing:2px; font-weight:600;
}

.nav-links { display:flex; gap:0.4rem; list-style:none; align-items:center; flex-wrap:nowrap; overflow:hidden; }
.nav-links a {
  text-decoration:none; color:rgba(255,255,255,0.85); padding:0.4rem 0.85rem;
  border-radius:20px; font-size:0.88rem; transition:all 0.2s;
  display:flex; align-items:center; gap:5px;
}
.nav-links a:hover, .nav-links a.active { background:rgba(255,255,255,0.15); color:white; }
.nav-links a.safe-travels { background:var(--warm-green); color:white; }
.nav-links a.safe-travels:hover { background:#557a5b; color:white; }
.nav-links a.settings-link { background:var(--warm-accent); color:white; }
.nav-links a.settings-link:hover { background:var(--warm-brown); color:white; }
.nav-links a.msg-link { background:var(--warm-blue); color:white; }
.nav-links a.msg-link:hover { background:#3a7a8e; color:white; }

.nav-badge {
  background:var(--warm-red); color:white; border-radius:50%;
  width:18px; height:18px; font-size:0.7rem; display:inline-flex;
  align-items:center; justify-content:center; font-weight:700; margin-left:2px;
}

/* ===== HERO ===== */
.hero {
  position:relative; min-height:92vh; display:flex;
  align-items:center; justify-content:center; text-align:center; overflow:hidden;
}
.hero-bg {
  position:absolute; inset:0;
  background:
    linear-gradient(135deg, rgba(62,39,35,0.85) 0%, rgba(139,94,60,0.7) 100%),
    url('https://images.unsplash.com/photo-1542314831-068cd1dbfeeb?w=1600&auto=format&fit=crop') center/cover no-repeat;
  background-color: #3e2723;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero-bg.loaded { transform: scale(1); }
/* Shimmer overlay on hero */
.hero-bg::after {
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(120deg,
    transparent 0%,
    rgba(255,255,255,0.03) 40%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.03) 60%,
    transparent 100%);
  background-size: 200% 100%;
  animation: heroShimmer 6s ease-in-out infinite;
}
@keyframes heroShimmer {
  0%,100% { background-position: 200% 0; }
  50%      { background-position: -200% 0; }
}
.hero-content { position:relative; z-index:1; color:white; max-width:780px; padding:2rem; }

/* ---- Scroll indicator ---- */
.scroll-indicator {
  position:absolute; bottom:1rem; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:0.3rem;
  text-decoration:none; z-index:2; animation:scrollFadeIn 1.2s ease 1.5s both;
  pointer-events:auto;
}
@media (max-width: 1024px) {
  .scroll-indicator { display:none !important; }
}
.scroll-text {
  color:rgba(255,255,255,0.55); font-size:0.7rem; letter-spacing:3px;
  text-transform:uppercase; font-family:var(--font-body);
}
.scroll-mouse {
  width:24px; height:38px; border:2px solid rgba(255,255,255,0.45);
  border-radius:12px; display:flex; justify-content:center; padding-top:5px;
  transition:border-color 0.3s;
}
.scroll-indicator:hover .scroll-mouse { border-color:rgba(255,255,255,0.85); }
.scroll-wheel {
  width:4px; height:8px; background:rgba(255,255,255,0.7);
  border-radius:2px; animation:scrollWheel 1.6s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%   { transform:translateY(0); opacity:1; }
  60%  { transform:translateY(10px); opacity:0; }
  61%  { transform:translateY(0); opacity:0; }
  100% { transform:translateY(0); opacity:1; }
}
@keyframes scrollFadeIn {
  from { opacity:0; transform:translateX(-50%) translateY(12px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}
.hero-content h1 {
  font-family:var(--font-heading); font-size:clamp(2.5rem,6vw,4.8rem);
  margin-bottom:1rem; line-height:1.15;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.hero-content p { font-size:clamp(1rem,2vw,1.3rem); margin-bottom:2rem; opacity:0.9; }
.hero-tagline { font-family:var(--font-heading); font-style:italic; font-size:clamp(1rem,2vw,1.2rem); opacity:0.75; margin-bottom:2rem; }

/* ===== BUTTONS ===== */
.btn {
  display:inline-block; padding:0.8rem 2rem; border-radius:30px;
  font-family:var(--font-body); font-size:1rem; font-weight:700;
  cursor:pointer; text-decoration:none; border:none; transition:all 0.25s;
  position:relative; overflow:hidden;
}
/* Ripple effect */
.btn::after {
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:rgba(255,255,255,0.18);
  transform:scale(0); opacity:0;
  transition:transform 0.4s ease, opacity 0.4s ease;
}
.btn:active::after { transform:scale(2.5); opacity:0; transition:0s; }
.btn-primary { background:var(--warm-accent); color:white; box-shadow:0 4px 18px rgba(200,149,108,0.35); }
.btn-primary:hover { background:var(--warm-brown); transform:translateY(-2px); box-shadow:0 8px 28px rgba(139,94,60,0.4); }
.btn-secondary { background:transparent; color:white; border:2px solid rgba(255,255,255,0.7); }
.btn-secondary:hover { background:#fdf6ee; color:var(--warm-dark); }
.btn-outline { background:transparent; color:var(--warm-brown); border:2px solid var(--warm-brown); }
.btn-outline:hover { background:var(--warm-brown); color:white; }
.btn-green { background:var(--warm-green); color:white; box-shadow:0 4px 14px rgba(107,143,113,0.3); }
.btn-green:hover { background:#557a5b; transform:translateY(-1px); }
.btn-blue { background:var(--warm-blue); color:white; }
.btn-blue:hover { background:#3a7a8e; }
.btn-sm { padding:0.4rem 1rem; font-size:0.85rem; }
.btn-group { display:flex; gap:1rem; flex-wrap:wrap; justify-content:center; }

/* ===== SECTIONS ===== */
section { padding:5rem 2rem; }
.section-title { font-family:var(--font-heading); font-size:clamp(1.8rem,4vw,2.8rem); color:var(--warm-brown); margin-bottom:0.5rem; }
.section-sub { color:#888; margin-bottom:3rem; font-size:1.05rem; }
.container { max-width:1100px; margin:0 auto; }

/* ===== FEATURE CARDS ===== */
.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1.5rem; }
.feature-card {
  background:#fdf6ee; border-radius:var(--radius); padding:2rem;
  box-shadow:var(--shadow); text-align:center; transition:all 0.3s ease;
  text-decoration:none; color:inherit; display:block;
  border:1px solid rgba(181,112,58,0.12);
  position:relative; overflow:hidden;
}
.feature-card::before {
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:linear-gradient(135deg, rgba(200,149,108,0.06) 0%, rgba(139,94,60,0.04) 100%);
  opacity:0; transition:opacity 0.3s;
}
.feature-card:hover { transform:translateY(-7px); box-shadow:0 16px 48px rgba(62,39,35,0.18); border-color:rgba(200,149,108,0.3); }
.feature-card:hover::before { opacity:1; }
.feature-icon { font-size:2.5rem; margin-bottom:1rem; display:block; transition:transform 0.3s; }
.feature-card:hover .feature-icon { transform:scale(1.15) rotate(-3deg); }
.feature-card h3 { font-family:var(--font-heading); color:var(--warm-brown); margin-bottom:0.5rem; }
.feature-card p { font-size:0.9rem; color:#666; }

/* ===== PAGE HERO ===== */
.page-hero {
  position:relative; height:320px; display:flex;
  align-items:center; justify-content:center; text-align:center; overflow:hidden;
}
.page-hero-bg {
  position:absolute; inset:0; background-size:cover; background-position:center;
  filter:brightness(0.38);
  transform:scale(1.08);
  transition:transform 6s ease;
}
.page-hero-bg.loaded { transform:scale(1); }
/* Warm gradient overlay on page heroes */
.page-hero::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(to bottom, rgba(62,39,35,0.2) 0%, rgba(62,39,35,0.55) 100%);
  pointer-events:none;
  z-index: 0;
}
.page-hero-content { position:relative; z-index:1; color:white; }
.page-hero-content .page-icon {
  font-size:3.2rem; margin-bottom:0.5rem; display:block;
  filter:drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  animation:popIn 0.5s ease both;
}
.page-hero-content h1 {
  font-family:var(--font-heading); font-size:3rem;
  text-shadow:0 4px 20px rgba(0,0,0,0.5);
  animation:fadeUp 0.5s 0.1s ease both;
}
.page-hero-content p {
  opacity:0.9; margin-top:0.4rem; font-size:1.05rem;
  animation:fadeUp 0.5s 0.2s ease both;
}

/* Hero cover photo upload button */
.hero-upload-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(181,112,58,0.92);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 24px;
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-upload-btn:hover { background: var(--warm-brown); border-color: white; transform: translateY(-1px); }
@media(max-width:600px) {
  .hero-upload-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    bottom: 0.5rem;
    right: 0.5rem;
    border-radius: 20px;
    opacity: 0.75;
  }
  .page-hero { height: auto !important; min-height: 160px !important; }
  .page-hero-content { padding: 0 0.8rem; }
  .hb-hero-tags { display: none !important; }
  .hero-upload-btn { padding: 0.2rem 0.55rem; font-size: 0.65rem; bottom: 0.4rem; right: 0.4rem; opacity: 0.65; }
}

/* ===== CARDS ===== */
.cards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.5rem; }
.card {
  background:#fdf6ee; border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow); transition:all 0.3s ease;
  border:1px solid rgba(181,112,58,0.1);
}
.card:hover { transform:translateY(-5px); box-shadow:0 16px 48px rgba(62,39,35,0.16); border-color:rgba(200,149,108,0.25); }
.card img { width:100%; height:200px; object-fit:cover; transition:transform 0.4s ease; }
.card:hover img { transform:scale(1.04); }
.card-body { padding:1.2rem; }
.card-body h3 { font-family:var(--font-heading); color:var(--warm-brown); margin-bottom:0.3rem; }
.card-body p { font-size:0.9rem; color:#666; }

/* ===== REACTIONS ===== */
.reactions-bar {
  display:flex; gap:0.4rem; align-items:center;
  padding:0.6rem 0; border-top:1px solid #f0e8df; flex-wrap:wrap;
}
.reaction-btn {
  background:#ede0d4; border:1.5px solid var(--warm-tan);
  border-radius:20px; padding:0.3rem 0.7rem; cursor:pointer;
  font-size:0.9rem; transition:all 0.2s; display:flex; align-items:center; gap:4px;
  font-family:var(--font-body);
}
.reaction-btn:hover { background:var(--warm-tan); transform:scale(1.1); }
.reaction-btn.reacted { background:var(--warm-tan); border-color:var(--warm-accent); font-weight:700; }
.reaction-count { font-size:0.8rem; color:#888; font-weight:700; }

/* ===== COMMENTS ===== */
.comments-section { padding:0.8rem 0 0; }
.comment-item {
  display:flex; gap:0.7rem; margin-bottom:0.8rem; align-items:flex-start;
}
.comment-avatar {
  width:34px; height:34px; border-radius:50%; object-fit:cover; flex-shrink:0;
}
.comment-bubble {
  background:#ede0d4; border-radius:12px; padding:0.5rem 0.9rem;
  font-size:0.88rem; flex:1;
}
.comment-bubble strong { color:var(--warm-brown); font-size:0.82rem; display:block; margin-bottom:2px; }
.comment-input-row { display:flex; gap:0.5rem; margin-top:0.5rem; align-items:center; }
.comment-input-row input {
  flex:1; padding:0.5rem 1rem; border:2px solid var(--warm-tan);
  border-radius:20px; font-family:var(--font-body); font-size:0.9rem;
  background:var(--warm-cream); color:var(--warm-dark);
}
.comment-input-row input:focus { outline:none; border-color:var(--warm-accent); }
.comment-input-row button {
  background:var(--warm-accent); color:white; border:none;
  border-radius:20px; padding:0.5rem 1rem; cursor:pointer; font-size:0.85rem;
  font-family:var(--font-body); font-weight:700; transition:background 0.2s;
}
.comment-input-row button:hover { background:var(--warm-brown); }

/* ===== PHOTO GRID ===== */
.photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1rem; }
.photo-item { border-radius:12px; overflow:hidden; position:relative; aspect-ratio:1; cursor:pointer; }
.photo-item img { width:100%; height:100%; object-fit:cover; transition:transform 0.3s; }
.photo-item:hover img { transform:scale(1.05); }
.photo-caption {
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(transparent,rgba(0,0,0,0.65));
  color:white; padding:1rem 0.8rem 0.6rem; font-size:0.85rem;
  opacity:0; transition:opacity 0.3s;
}
.photo-item:hover .photo-caption { opacity:1; }

/* ===== PHOTO MODAL ===== */
.photo-modal {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.88);
  z-index:999; align-items:center; justify-content:center; padding:1rem;
}
.photo-modal.open { display:flex; }
.photo-modal-inner {
  background:#fdf6ee; border-radius:var(--radius); overflow:hidden;
  max-width:900px; width:100%; display:grid;
  grid-template-columns:1fr 360px; max-height:90vh;
}
.photo-modal-img { width:100%; height:100%; object-fit:cover; min-height:300px; }
.photo-modal-side { display:flex; flex-direction:column; overflow:hidden; }
.photo-modal-header { padding:1rem 1.2rem; border-bottom:1px solid #f0e8df; display:flex; justify-content:space-between; align-items:center; }
.photo-modal-header h3 { font-family:var(--font-heading); color:var(--warm-brown); font-size:1.1rem; }
.modal-close { background:none; border:none; font-size:1.5rem; cursor:pointer; color:#aaa; }
.modal-close:hover { color:var(--warm-dark); }
.photo-modal-comments { flex:1; overflow-y:auto; padding:1rem 1.2rem; }
.photo-modal-footer { padding:0.8rem 1.2rem; border-top:1px solid #f0e8df; }

/* ===== FEED ===== */
.feed-item {
  background:#fdf6ee; border-radius:var(--radius); box-shadow:var(--shadow);
  margin-bottom:1.5rem; overflow:hidden;
}
.feed-header { padding:1rem 1.2rem; display:flex; align-items:center; gap:0.8rem; }
.feed-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; }
.feed-meta strong { display:block; color:var(--warm-dark); font-size:0.95rem; }
.feed-meta span { font-size:0.8rem; color:#aaa; }
.feed-img { width:100%; max-height:420px; object-fit:cover; }
.feed-body { padding:0.8rem 1.2rem 0; }

/* Post options menu */
.feed-menu-wrap { margin-left:auto; position:relative; }
.feed-menu-btn {
  background:none; border:none; cursor:pointer; color:#bbb;
  font-size:1.3rem; line-height:1; padding:0.2rem 0.5rem;
  border-radius:8px; transition:background 0.15s, color 0.15s;
}
.feed-menu-btn:hover { background:#f0e8df; color:var(--warm-brown); }
.feed-menu-dropdown {
  display:none; position:absolute; right:0; top:110%;
  background:#fdf6ee; border:2px solid var(--warm-tan); border-radius:12px;
  box-shadow:0 8px 28px rgba(59,31,14,0.15); min-width:140px; z-index:500;
  overflow:hidden;
}
.feed-menu-dropdown.open { display:block; animation:fadeUp 0.15s ease; }
.feed-menu-dropdown button {
  display:flex; align-items:center; gap:0.6rem;
  width:100%; padding:0.65rem 1rem; background:none; border:none;
  font-family:var(--font-body); font-size:0.88rem; color:var(--warm-dark);
  cursor:pointer; text-align:left; transition:background 0.15s;
}
.feed-menu-dropdown button:hover { background:#f5ebe0; }
.feed-menu-dropdown button.danger { color:#c0392b; }
.feed-menu-dropdown button.danger:hover { background:#fdecea; }

/* Inline edit textarea */
.feed-edit-area {
  width:100%; padding:0.7rem 1rem; border:2px solid var(--warm-accent);
  border-radius:10px; font-family:var(--font-body); font-size:0.95rem;
  background:var(--warm-cream); resize:vertical; min-height:70px;
  box-sizing:border-box; margin-bottom:0.5rem;
}
.feed-edit-actions { display:flex; gap:0.5rem; padding:0 1.2rem 1rem; }
.feed-body p { font-size:0.95rem; color:#444; }
.feed-actions { padding:0.5rem 1.2rem 1rem; }

/* ===== MESSAGES ===== */
.messages-layout { display:grid; grid-template-columns:300px 1fr; gap:1.5rem; align-items:start; }
.msg-list { background:#fdf6ee; border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.msg-list-header { padding:1rem 1.2rem; border-bottom:1px solid #f0e8df; font-family:var(--font-heading); color:var(--warm-brown); font-size:1.1rem; }
.msg-thread {
  display:flex; align-items:center; gap:0.8rem; padding:0.9rem 1.2rem;
  cursor:pointer; transition:background 0.2s; border-bottom:1px solid #faf5ef;
}
.msg-thread:hover, .msg-thread.active { background:var(--warm-cream); }
.msg-thread-avatar { width:42px; height:42px; border-radius:50%; object-fit:cover; }
.msg-thread-info { flex:1; min-width:0; }
.msg-thread-info strong { display:block; font-size:0.9rem; }
.msg-thread-info span { font-size:0.8rem; color:#aaa; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.msg-unread { width:10px; height:10px; background:var(--warm-accent); border-radius:50%; flex-shrink:0; }

.msg-window { background:#fdf6ee; border-radius:var(--radius); box-shadow:var(--shadow); display:flex; flex-direction:column; height:600px; }
.msg-window-header { padding:1rem 1.5rem; border-bottom:1px solid #f0e8df; display:flex; align-items:center; gap:0.8rem; }
.msg-window-header img { width:40px; height:40px; border-radius:50%; object-fit:cover; }
.msg-window-header strong { font-family:var(--font-heading); color:var(--warm-brown); }
.msg-body { flex:1; overflow-y:auto; padding:1.5rem; display:flex; flex-direction:column; gap:0.8rem; }
.msg-bubble-row { display:flex; gap:0.6rem; align-items:flex-end; }
.msg-bubble-row.mine { flex-direction:row-reverse; }
.msg-bubble {
  max-width:70%; padding:0.6rem 1rem; border-radius:18px;
  font-size:0.9rem; line-height:1.5;
}
.msg-bubble-row:not(.mine) .msg-bubble { background:#ede0d4; color:var(--warm-dark); border-bottom-left-radius:4px; }
.msg-bubble-row.mine .msg-bubble { background:var(--warm-accent); color:white; border-bottom-right-radius:4px; }
.msg-bubble small { display:block; font-size:0.72rem; opacity:0.6; margin-top:3px; }
.msg-input-row { padding:1rem 1.5rem; border-top:1px solid #f0e8df; display:flex; gap:0.8rem; }
.msg-input-row input {
  flex:1; padding:0.7rem 1.2rem; border:2px solid var(--warm-tan);
  border-radius:25px; font-family:var(--font-body); font-size:0.95rem;
  background:var(--warm-cream);
}
.msg-input-row input:focus { outline:none; border-color:var(--warm-accent); }

/* ===== GIFTS ===== */
.gift-card {
  background:#fdf6ee; border-radius:var(--radius); padding:1.5rem;
  box-shadow:var(--shadow); text-align:center; cursor:pointer;
  transition:transform 0.2s; border:2px solid rgba(181,112,58,0.1);
}
.gift-card:hover { transform:translateY(-4px); border-color:var(--warm-accent); }
.gift-card .gift-icon { font-size:3rem; margin-bottom:0.8rem; }
.gift-card h3 { font-family:var(--font-heading); color:var(--warm-brown); margin-bottom:0.3rem; }
.gift-card p { font-size:0.85rem; color:#888; }

/* ===== FAMILY TREE ===== */
.tree-node {
  background:#fdf6ee; border-radius:var(--radius); padding:1.2rem;
  box-shadow:var(--shadow); text-align:center; min-width:140px;
  display:inline-block; position:relative;
}
.tree-node img { width:60px; height:60px; border-radius:50%; object-fit:cover; margin-bottom:0.5rem; border:3px solid var(--warm-tan); }
.tree-node strong { display:block; font-size:0.9rem; color:var(--warm-brown); }
.tree-node span { font-size:0.78rem; color:#aaa; }
.tree-row { display:flex; justify-content:center; gap:2rem; flex-wrap:wrap; margin-bottom:2rem; position:relative; }
.tree-connector { text-align:center; color:var(--warm-tan); font-size:1.5rem; margin-bottom:1rem; }

/* ===== FORMS ===== */
.form-page {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:url('https://images.unsplash.com/photo-1529156069898-49953e39b3ac?w=1200&auto=format&fit=crop') center/cover no-repeat;
  padding:2rem;
}
.form-box {
  background:#fdf6ee; border-radius:var(--radius); padding:2.5rem;
  width:100%; max-width:440px; box-shadow:0 8px 40px rgba(0,0,0,0.2);
}
.form-box h2 { font-family:var(--font-heading); color:var(--warm-brown); margin-bottom:0.3rem; font-size:1.8rem; }
.form-box p { color:#888; margin-bottom:1.5rem; font-size:0.9rem; }
.form-group { margin-bottom:1.2rem; }
.form-group label { display:block; font-size:0.85rem; font-weight:700; color:var(--warm-dark); margin-bottom:0.4rem; }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:0.75rem 1rem; border:2px solid var(--warm-tan);
  border-radius:10px; font-family:var(--font-body); font-size:1rem;
  background:var(--warm-cream); color:var(--warm-dark); transition:border 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline:none; border-color:var(--warm-accent);
  box-shadow:0 0 0 3px rgba(200,149,108,0.18);
}
.form-divider { text-align:center; color:#aaa; margin:1rem 0; font-size:0.85rem; }
.form-footer { text-align:center; margin-top:1rem; font-size:0.9rem; color:#888; }
.form-footer a { color:var(--warm-accent); text-decoration:none; font-weight:700; }

/* ===== SAFE TRAVELS ===== */
.safe-card {
  background:#fdf6ee; border-radius:var(--radius); padding:1.2rem 1.5rem;
  box-shadow:var(--shadow); display:flex; align-items:center; gap:1rem; margin-bottom:1rem;
}
.safe-avatar { width:52px; height:52px; border-radius:50%; object-fit:cover; }
.safe-status { display:inline-block; padding:0.25rem 0.8rem; border-radius:20px; font-size:0.8rem; font-weight:700; }
.status-safe { background:#d4edda; color:#155724; }
.status-traveling { background:#fff3cd; color:#856404; }
.status-unknown { background:#f0f0f0; color:#999; }
.status-sos { background:#fdecea; color:#c0392b; animation:sos-pulse 1.5s ease-in-out infinite; }
@keyframes sos-pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

/* ===== SETTINGS ===== */
.settings-grid { display:grid; grid-template-columns:240px 1fr; gap:2rem; align-items:start; }
.settings-sidebar { background:#fdf6ee; border-radius:var(--radius); padding:1.5rem; box-shadow:var(--shadow); }
.settings-sidebar ul { list-style:none; }
.settings-sidebar li a { display:flex; align-items:center; gap:8px; padding:0.7rem 1rem; border-radius:10px; text-decoration:none; color:var(--warm-dark); font-size:0.95rem; transition:all 0.2s; }
.settings-sidebar li a:hover, .settings-sidebar li a.active { background:var(--warm-tan); color:var(--warm-brown); }
.settings-panel { background:#fdf6ee; border-radius:var(--radius); padding:2rem; box-shadow:var(--shadow); }

/* ===== DASHBOARD ===== */
.dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:1.5rem; }
.widget {
  background:#fdf6ee; border-radius:var(--radius); padding:1.5rem;
  box-shadow:var(--shadow); transition:all 0.3s ease;
  border-left:3px solid transparent;
}
.widget:hover { border-left-color:var(--warm-accent); box-shadow:0 8px 32px rgba(62,39,35,0.13); }
.widget h3 { font-family:var(--font-heading); color:var(--warm-brown); margin-bottom:1rem; display:flex; align-items:center; gap:8px; font-size:1.15rem; }

/* ===== NOTIFICATION TOAST ===== */
@keyframes slideIn { from { transform:translateX(100px); opacity:0; } to { transform:translateX(0); opacity:1; } }
@keyframes fadeOut { to { opacity:0; transform:translateY(10px); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }

/* ===== FOOTER ===== */
footer {
  background:linear-gradient(135deg, #1a0f0a 0%, var(--warm-dark) 60%, #2c1810 100%);
  color:var(--warm-tan); text-align:center; padding:3rem 2rem 2.5rem; font-size:0.9rem;
  position:relative; overflow:hidden;
}
footer::before {
  content:''; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--warm-brown), var(--warm-accent), var(--warm-brown));
}
.footer-tagline {
  display:none;
  color:var(--warm-tan);
}
footer::after {
  content:'';
  display:none;
}
footer a { color:var(--warm-accent); text-decoration:none; transition:color 0.2s; }
footer a:hover { color:var(--warm-tan); }
.footer-links { display:flex; justify-content:center; gap:1.5rem; flex-wrap:wrap; margin-bottom:1.2rem; }
.footer-links a {
  color:rgba(232,213,183,0.6); font-size:0.85rem; transition:color 0.2s;
  padding:0.2rem 0;
  border-bottom:1px solid transparent;
}
.footer-links a:hover { color:var(--warm-accent); border-bottom-color:var(--warm-accent); }

/* ===== UTILITY ===== */
.text-center { text-align:center; }
.mt-1 { margin-top:1rem; } .mt-2 { margin-top:2rem; }
.mb-1 { margin-bottom:1rem; } .mb-2 { margin-bottom:2rem; }
.tag {
  display:inline-block;
  background:linear-gradient(135deg, var(--warm-tan), rgba(200,149,108,0.3));
  color:var(--warm-brown); padding:0.25rem 1rem; border-radius:20px;
  font-size:0.82rem; font-weight:700; letter-spacing:0.5px;
  border:1px solid rgba(200,149,108,0.3);
}
.empty-state { text-align:center; padding:3rem; color:#bbb; }
.empty-state .empty-icon { font-size:3rem; margin-bottom:1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width:900px) {
  .photo-modal-inner { grid-template-columns:1fr; }
  .photo-modal-img { max-height:300px; }
  .messages-layout { grid-template-columns:1fr; }
  .msg-window { height:450px; }
}
@media (max-width:768px) {
  nav { flex-wrap:nowrap; height:60px; padding:0 1rem; gap:0; }
  .settings-grid { grid-template-columns:1fr; }
  section { padding:3rem 1.2rem; }
}

/* ===== HAMBURGER NAV ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(255,255,255,0.1); }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--warm-tan);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--warm-dark);
    flex-direction: column;
    padding: 1rem;
    gap: 0.3rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
  }
  /* Hide clock widget — no room on mobile/tablet/landscape */
  .nav-clock-widget, #navClock, #navDate { display: none !important; }
}

/* ===== SKELETON LOADER ===== */
.skeleton {
  background: linear-gradient(90deg, #f0e8df 25%, #e8d5b7 50%, #f0e8df 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #fdf6ee;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.skeleton-img { height: 200px; }
.skeleton-line { height: 14px; margin: 0.8rem 1.2rem 0.4rem; }
.skeleton-line.short { width: 60%; }

/* ===== PAGE TRANSITIONS ===== */
body { transition: opacity 0.3s ease; }

/* ===== GREETING BANNER ===== */
.greeting-banner {
  background: linear-gradient(135deg, var(--warm-brown), var(--warm-accent));
  color: white;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  letter-spacing: 0.5px;
}

/* ===== QUOTE WIDGET ===== */
.quote-widget {
  background: linear-gradient(135deg, var(--warm-dark), var(--warm-brown));
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow), 0 0 0 1px rgba(200,149,108,0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quote-widget::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-family: var(--font-heading);
  font-size: 6rem;
  color: rgba(255,255,255,0.06);
  line-height: 1;
  pointer-events: none;
}
.quote-widget p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  position: relative;
}
.quote-widget cite { font-size: 0.82rem; opacity: 0.65; }

/* ===== MEMORY LINK NAV ===== */
.nav-links a.memory-link { background: var(--warm-purple); color: white; }
.nav-links a.memory-link:hover { background: #6a5a8e; color: white; }

/* ===== INSTALL BANNER ===== */
.install-banner {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warm-dark);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  align-items: center;
  gap: 1rem;
  max-width: 420px;
  width: 90%;
  animation: slideIn 0.4s ease;
}
.install-banner.show { display: flex; }
.install-banner p { font-size: 0.9rem; flex: 1; }
.install-banner p strong { display: block; margin-bottom: 2px; }

/* ===== HERO ANIMATED TAGLINE ===== */
.hero-tagline-wrap { overflow: hidden; }
.hero-tagline-wrap span {
  display: inline-block;
  animation: fadeUp 0.6s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== ONLINE/OFFLINE INDICATOR ===== */
.connection-bar {
  display: none;
  background: var(--warm-red);
  color: white;
  text-align: center;
  padding: 0.4rem;
  font-size: 0.85rem;
  position: sticky;
  top: 70px;
  z-index: 99;
}
.connection-bar.show { display: block; }

/* ===== PROFILE AVATAR RING ===== */
.avatar-ring {
  border: 3px solid var(--warm-accent);
  padding: 2px;
  border-radius: 50%;
}

/* ===== SMOOTH CARD HOVER ===== */
.feature-card, .card, .widget, .memory-card, .safe-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Safe card hover accent */
.safe-card {
  border-left: 3px solid transparent;
  transition: all 0.25s ease;
}
.safe-card:hover { border-left-color: var(--warm-accent); transform: translateX(3px); }

/* Feed item left accent on hover */
.feed-item {
  border-left: 3px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.feed-item:hover { border-left-color: var(--warm-accent); box-shadow: 0 8px 32px rgba(62,39,35,0.13); }

/* ===== BACK TO TOP ===== */
/* (defined later in the file — see duplicate below) */

/* ===== MICRO ANIMATIONS ===== */
@keyframes floatUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes popIn {
  0%   { transform:scale(0.8); opacity:0; }
  70%  { transform:scale(1.05); }
  100% { transform:scale(1); opacity:1; }
}
@keyframes heartbeat {
  0%,100% { transform:scale(1); }
  14%     { transform:scale(1.15); }
  28%     { transform:scale(1); }
  42%     { transform:scale(1.1); }
  70%     { transform:scale(1); }
}

.animate-float  { animation:floatUp 0.5s ease both; }
.animate-pop    { animation:popIn 0.4s ease both; }
.animate-heart  { animation:heartbeat 1.5s ease infinite; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay:0.05s; }
.stagger > *:nth-child(2) { animation-delay:0.1s; }
.stagger > *:nth-child(3) { animation-delay:0.15s; }
.stagger > *:nth-child(4) { animation-delay:0.2s; }
.stagger > *:nth-child(5) { animation-delay:0.25s; }
.stagger > *:nth-child(6) { animation-delay:0.3s; }
.stagger > *:nth-child(7) { animation-delay:0.35s; }
.stagger > *:nth-child(8) { animation-delay:0.4s; }

/* ===== SETTINGS EXTRAS ===== */
.theme-swatch {
  width:36px; height:36px; border-radius:50%; cursor:pointer;
  border:3px solid transparent; transition:all 0.2s; display:inline-block;
}
.theme-swatch:hover, .theme-swatch.selected { border-color:var(--warm-dark); transform:scale(1.15); }

.bg-preset {
  height:80px; border-radius:12px; background-size:cover; background-position:center;
  cursor:pointer; position:relative; overflow:hidden; border:3px solid transparent;
  transition:all 0.2s;
}
.bg-preset:hover { transform:scale(1.04); border-color:var(--warm-accent); }
.bg-preset.selected { border-color:var(--warm-accent); box-shadow:0 0 0 3px rgba(200,149,108,0.4); }
.bg-preset span {
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(transparent,rgba(0,0,0,0.65));
  color:white; font-size:0.7rem; font-weight:700; padding:0.3rem 0.4rem;
  text-align:center;
}

.settings-section-title {
  font-family:var(--font-heading); color:var(--warm-brown);
  font-size:1.3rem; margin-bottom:1rem; padding-bottom:0.5rem;
  border-bottom:2px solid var(--warm-tan);
}

/* ===== NOTIFICATION DOT ===== */
.notif-dot {
  width:8px; height:8px; background:var(--warm-red);
  border-radius:50%; display:inline-block; margin-left:4px;
  animation:heartbeat 2s ease infinite;
}

/* ===== WEATHER WIDGET ===== */
.weather-widget {
  background:linear-gradient(135deg,var(--warm-blue),#2c6e7f);
  color:white; border-radius:var(--radius); padding:1.2rem 1.5rem;
  display:flex; align-items:center; gap:1rem;
}
.weather-widget .weather-icon { font-size:2.5rem; }
.weather-widget .weather-temp { font-family:var(--font-heading); font-size:1.8rem; }
.weather-widget .weather-desc { font-size:0.82rem; opacity:0.8; }

/* ===== FAMILY MOOD ===== */
.mood-btn {
  background:#fdf6ee; border:2px solid var(--warm-tan); border-radius:12px;
  padding:0.6rem 0.8rem; cursor:pointer; font-size:1.4rem;
  transition:all 0.2s; text-align:center;
}
.mood-btn:hover, .mood-btn.selected {
  border-color:var(--warm-accent); background:var(--warm-cream);
  transform:scale(1.1);
}

/* ===== COVER PHOTO ===== */
.hub-cover {
  width:100%; height:320px; object-fit:cover;
  border-radius:0 0 var(--radius) var(--radius);
}

/* ===== RESPONSIVE NAV HEIGHT ===== */
@media (max-width:1024px) {
  nav { height:70px; }
  .nav-meta { display:none; }
  .nav-logo img { height:44px; }
  .nav-logo span { font-size:1.5rem; }
  .nav-links { top:70px; }
}

/* ===== ADMIN SETTINGS SECTIONS ===== */
.admin-section-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.admin-badge {
  background: linear-gradient(135deg, #b5703a, #7f4f24);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.admin-fields {
  position: relative;
}

/* ===== SEASONAL THEME BANNER ===== */
.season-banner {
  display: none;
  padding: 0.55rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 99;
}
.season-banner.show { display: block; }
.season-banner.christmas  { background: linear-gradient(90deg,#1a472a,#2d6a4f); color:#fff; }
.season-banner.halloween  { background: linear-gradient(90deg,#2d1b00,#7a3b00); color:#ff9a3c; }
.season-banner.thanksgiving { background: linear-gradient(90deg,#5c2e00,#8b4513); color:#ffd59e; }
.season-banner.valentine  { background: linear-gradient(90deg,#6b0f1a,#b5173a); color:#ffd6e0; }
.season-banner.summer     { background: linear-gradient(90deg,#0077b6,#00b4d8); color:#fff; }
.season-banner.autumn     { background: linear-gradient(90deg,#6b2d0f,#c1440e); color:#ffe8d6; }
.season-banner.spring     { background: linear-gradient(90deg,#386641,#6a994e); color:#fff; }

/* Seasonal CSS variable overrides — applied via JS */
body.season-christmas  { --warm-accent:#c41e3a; --warm-cream:#f0f7f0; }
body.season-halloween  { --warm-accent:#e07b00; --warm-cream:#1a0a00; --warm-dark:#ff9a3c; }
body.season-thanksgiving { --warm-accent:#c1440e; --warm-cream:#fdf0e0; }
body.season-valentine  { --warm-accent:#b5173a; --warm-cream:#fff0f3; }
body.season-summer     { --warm-accent:#0096c7; --warm-cream:#f0f8ff; }
body.season-autumn     { --warm-accent:#c1440e; --warm-cream:#fdf0e0; }
body.season-spring     { --warm-accent:#588157; --warm-cream:#f0f7f0; }

/* ===== MOBILE DASHBOARD ===== */
@media (max-width: 860px) {
  .dashboard-main-grid,
  main[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .dashboard-main-grid > section,
  .dashboard-main-grid > div:first-child {
    order: -1;
  }
  .dashboard-main-grid > aside {
    order: 1;
  }
  .dashboard-main-grid textarea {
    min-width: 0;
    width: 100% !important;
    box-sizing: border-box;
  }
}

/* ===== MOBILE GIFT PICKER ===== */
@media (max-width: 600px) {
  #giftPicker {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
  }
  #giftForm {
    grid-template-columns: 1fr !important;
  }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--warm-accent); color: white;
  border: none; border-radius: 50%; width: 44px; height: 44px;
  font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow);
  display: none; align-items: center; justify-content: center;
  z-index: 9000; transition: all 0.2s;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--warm-brown); transform: translateY(-2px); }

/* ===== CONNECTION BAR ===== */
.connection-bar {
  background: #c0392b; color: white; text-align: center;
  padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600;
  display: none; z-index: 101; position: relative;
}
.connection-bar.show { display: block; }

/* ===== MOOD BUTTONS ===== */
.mood-btn {
  background: #fdf6ee; border: 2px solid var(--warm-tan);
  border-radius: 12px; font-size: 1.5rem; cursor: pointer;
  padding: 0.5rem; transition: all 0.2s; line-height: 1;
}
.mood-btn:hover { transform: scale(1.15); border-color: var(--warm-accent); }
.mood-btn.selected { background: var(--warm-tan); border-color: var(--warm-accent); }

/* ===== PROFILE PAGE ===== */
.theme-swatch {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: all 0.2s;
}
.theme-swatch:hover { transform: scale(1.15); }
.theme-swatch.selected { border-color: var(--warm-dark); box-shadow: 0 0 0 2px var(--warm-tan); }

/* ===== SETTINGS ADMIN BADGE ===== */
.admin-section-header {
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 0.5rem; flex-wrap: wrap;
}
.admin-badge {
  background: linear-gradient(135deg, var(--warm-accent), var(--warm-brown));
  color: white; font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.7rem; border-radius: 20px; letter-spacing: 0.5px;
}
.settings-section-title {
  font-family: var(--font-heading); color: var(--warm-brown);
  margin-bottom: 0.3rem; font-size: 1.3rem;
}

/* ===== ANIMATIONS ===== */
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}


/* ===== CONFETTI ===== */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 99999;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== SHOPPING LIST ===== */
.shopping-list { display: flex; flex-direction: column; gap: 0; }
.shopping-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.65rem 0; border-bottom: 1px solid #f0e8e0;
  transition: opacity 0.2s;
}
.shopping-item.checked { opacity: 0.45; }
.shopping-item.checked .shop-label { text-decoration: line-through; color: #bbb; }
.shop-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--warm-tan); background: transparent;
  cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-size: 0.75rem; color: white;
}
.shop-check.done { background: var(--warm-green); border-color: var(--warm-green); }
.shop-label { flex: 1; font-size: 0.9rem; color: var(--warm-brown); }
.shop-qty { font-size: 0.75rem; color: #aaa; white-space: nowrap; }
.shop-del { background: none; border: none; cursor: pointer; color: #ddd; font-size: 1rem; padding: 0 0.2rem; transition: color 0.2s; }
.shop-del:hover { color: var(--warm-red); }
.shop-category-badge {
  font-size: 0.65rem; padding: 2px 7px; border-radius: 10px;
  background: var(--warm-tan); color: var(--warm-brown); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}

/* ===== RECIPE RATINGS ===== */
.star-rating { display: flex; gap: 2px; cursor: pointer; }
.star-rating .star { font-size: 1.1rem; color: #ddd; transition: color 0.15s; }
.star-rating .star.lit { color: #f4a623; }
.star-rating .star:hover,
.star-rating .star:hover ~ .star { color: #ddd; }
.star-rating:hover .star { color: #f4a623; }
.recipe-rating-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.recipe-rating-avg { font-size: 0.78rem; color: #aaa; }

/* ===== PHOTO ALBUMS ===== */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.album-card {
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
  background: #fdf6ee; position: relative;
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.album-cover { width: 100%; height: 160px; object-fit: cover; display: block; }
.album-cover-placeholder {
  width: 100%; height: 160px; background: linear-gradient(135deg, var(--warm-tan), var(--warm-accent));
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.album-info { padding: 0.75rem; }
.album-info h4 { font-family: var(--font-heading); color: var(--warm-brown); font-size: 0.95rem; margin-bottom: 2px; }
.album-info small { color: #aaa; font-size: 0.75rem; }
.album-count-badge {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: rgba(0,0,0,0.55); color: white; font-size: 0.72rem;
  padding: 2px 8px; border-radius: 10px; font-weight: 700;
}

/* ===== ONLINE PRESENCE DOT ===== */
.presence-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-left: 5px; vertical-align: middle; flex-shrink: 0;
}
.presence-dot.online  { background: #4caf50; box-shadow: 0 0 0 2px rgba(76,175,80,0.25); }
.presence-dot.away    { background: #ff9800; }
.presence-dot.offline { background: #ccc; }
.last-seen-label { font-size: 0.7rem; color: #aaa; }

/* ===== YEAR IN REVIEW ===== */
.year-review-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem;
}
.year-stat-card {
  background: linear-gradient(135deg, #fdf6ee, #f5ebe0);
  border-radius: 14px; padding: 1.2rem; text-align: center;
  border: 1px solid rgba(181,112,58,0.12); box-shadow: var(--shadow);
}
.year-stat-num {
  font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700;
  color: var(--warm-accent); line-height: 1;
}
.year-stat-label { font-size: 0.72rem; color: #aaa; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ===== BIRTHDAY COUNTDOWN WIDGET ===== */
.bday-countdown {
  background: linear-gradient(135deg, #fff5e6, #fdf6ee);
  border-radius: 14px; padding: 1rem; text-align: center;
  border: 1px solid rgba(244,166,35,0.25); margin-bottom: 0.6rem;
}
.bday-countdown .bday-name { font-family: var(--font-heading); font-size: 1rem; color: var(--warm-brown); font-weight: 700; }
.bday-countdown .bday-days { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700; color: var(--warm-accent); line-height: 1; }
.bday-countdown .bday-sub { font-size: 0.72rem; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.bday-today { background: linear-gradient(135deg, #fff3cd, #ffe082); border-color: #f4a623; }
.bday-today .bday-days { color: #e67e22; }

/* ===== DIRECT MESSAGE ENHANCEMENTS ===== */
.msg-typing { font-size: 0.78rem; color: #aaa; padding: 0.3rem 0.8rem; font-style: italic; }
.msg-status { font-size: 0.65rem; color: #bbb; text-align: right; margin-top: 2px; }
.msg-status.delivered { color: #aaa; }
.msg-status.read { color: var(--warm-green); }
.msg-thread-online { width: 9px; height: 9px; border-radius: 50%; background: #4caf50; border: 2px solid #fdf6ee; position: absolute; bottom: 0; right: 0; }

/* ===== SHOPPING PAGE LAYOUT ===== */
.shopping-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .shopping-layout { grid-template-columns: 1fr; } }
.shop-category-section { margin-bottom: 1.2rem; }
.shop-category-header {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--warm-accent); font-weight: 700; padding: 0.4rem 0; margin-bottom: 0.3rem;
  border-bottom: 2px solid var(--warm-tan);
}

/* ===== SMOOTH PAGE TRANSITIONS ===== */
.page-transition-overlay {
  position: fixed; inset: 0; background: var(--warm-cream);
  z-index: 99998; pointer-events: none;
  opacity: 0; transition: opacity 0.25s ease;
}
.page-transition-overlay.active { opacity: 1; }


/* ============================================================
   MOBILE APP EXPERIENCE
   ============================================================ */

/* Safe area insets for notched phones (iPhone X+) */
:root {
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

/* ── Bottom Nav Bar (mobile only) ─────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(135deg, #2c1810 0%, #3e2723 60%, #5a3825 100%);
  border-top: 1px solid rgba(200,149,108,0.2);
  padding: 0.4rem 0 calc(0.4rem + var(--safe-bottom));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
}
.mobile-bottom-nav ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.mobile-bottom-nav li { flex: 1; }
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.35rem 0.2rem;
  text-decoration: none;
  color: rgba(232,213,183,0.55);
  font-size: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  justify-content: center;
}
.mobile-bottom-nav a .nav-icon { font-size: 1.35rem; line-height: 1; }
.mobile-bottom-nav a.active,
.mobile-bottom-nav a:active { color: var(--warm-tan); }
.mobile-bottom-nav a.active .nav-icon { filter: drop-shadow(0 0 6px rgba(221,184,146,0.6)); }

/* More menu overlay */
.mobile-more-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0,0,0,0.55);
  animation: fadeIn 0.15s ease;
}
.mobile-more-overlay.open { display: block; }
.mobile-more-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: #fdf6ee;
  border-radius: 20px 20px 0 0;
  padding: 1rem 1.2rem calc(1.2rem + var(--safe-bottom));
  box-shadow: 0 -8px 40px rgba(59,31,14,0.25);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.mobile-more-sheet.open { transform: translateY(0); }
.mobile-more-sheet-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: #ddd; margin: 0 auto 1rem;
}
.mobile-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.mobile-more-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.7rem 0.3rem; border-radius: 14px;
  background: #f5ebe0; text-decoration: none;
  color: var(--warm-brown); font-size: 0.68rem; font-weight: 700;
  font-family: var(--font-body); text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.mobile-more-item:active { background: var(--warm-tan); }
.mobile-more-item .mi-icon { font-size: 1.5rem; }

/* ── Touch target improvements ────────────────────────────── */
@media (max-width: 768px) {
  /* Minimum 44px touch targets everywhere */
  .btn, button, a.btn, input[type="submit"] {
    min-height: 44px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }
  .btn-sm { min-height: 36px; padding-top: 0.4rem; padding-bottom: 0.4rem; }

  /* Form inputs — bigger on mobile */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="url"], input[type="tel"], textarea, select {
    font-size: 16px !important; /* prevents iOS zoom */
    min-height: 44px;
  }
  textarea { min-height: 80px; }

  /* Add bottom padding so content isn't hidden behind bottom nav */
  /* No top padding needed — top nav is hidden on mobile */
  body { padding-bottom: calc(70px + var(--safe-bottom)); padding-top: 0; }

  /* Show bottom nav */
  .mobile-bottom-nav { display: block; }

  /* HIDE the entire top nav on mobile — bottom nav handles all navigation */
  nav, .site-nav {
    display: none !important;
  }

  /* But keep it visible on login/signup pages which have no bottom nav */
  body.no-bottom-nav nav {
    display: flex !important;
    height: 60px !important;
    padding: 0 1rem !important;
  }

  /* Tighter container padding */
  .container { padding: 0 0.8rem; }
  section { padding: 1.2rem 0; }

  /* Page hero smaller on mobile */
  .page-hero { min-height: 160px; }
  .page-hero-content h1 { font-size: 1.8rem; }
  .page-hero-content p { font-size: 0.85rem; }

  /* Memories grid stacks on mobile */
  .memories-grid { grid-template-columns: 1fr !important; }
  .page-icon { font-size: 2rem; }

  /* Widget padding tighter */
  .widget { padding: 1rem; }

  /* Cards full width */
  .card-grid { grid-template-columns: 1fr 1fr !important; gap: 0.8rem; }

  /* Feed items */
  .feed-item { border-radius: 14px; }

  /* Photo grid 2 cols on mobile */
  .photo-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.5rem; }

  /* Messages layout stacked */
  .messages-layout { grid-template-columns: 1fr !important; }
  .msg-list { max-height: 280px; overflow-y: auto; }

  /* Dashboard banner smaller */
  .dashboard-bg { padding: 2.5rem 1rem !important; }
  .dashboard-bg h1 { font-size: 2rem !important; }

  /* Milestone strip wrap */
  #milestoneStrip { gap: 1rem !important; }

  /* Quick access grid 3 cols */
  .widget .stagger { grid-template-columns: repeat(3, 1fr) !important; }

  /* Nav logo text smaller */
  .nav-logo-text span { font-size: 1.4rem !important; }

  /* Back-to-top — hidden on mobile */
  .back-to-top,
  .back-to-top.show,
  #backToTop,
  #backToTop.show { display: none !important; }

  /* Dark toggle — reposition above mobile bottom nav */
  .dark-toggle,
  .dark-toggle.show,
  #darkToggleBtn { bottom: 9rem !important; right: 0.8rem !important; display: flex !important; width: 38px; height: 38px; font-size: 1.1rem; }

  /* Back button — below nav bar on mobile */
  .floating-back-btn { top: auto; bottom: 5.5rem; left: 0.8rem; padding: 0.3rem 0.8rem; font-size: 0.75rem; }

  /* Quick menu FAB — above bottom nav on mobile */
  .quick-menu-fab { bottom: 5.2rem; right: 0.8rem; width: 42px; height: 42px; font-size: 1.1rem; }
  .quick-menu-panel { bottom: 8.5rem; right: 0.5rem; }

  /* FAB hidden on mobile — bottom nav handles it */
  .mobile-fab,
  .mobile-fab.show { display: none !important; }

  /* Season banner below top nav */
  .season-banner { font-size: 0.8rem; padding: 0.5rem 1rem; }

  /* Reaction buttons bigger tap area */
  .reaction-btn { min-width: 40px; min-height: 36px; }

  /* Shopping layout single col already handled above */
  .shopping-layout { grid-template-columns: 1fr !important; }

  /* Year review grid 3 cols */
  .year-review-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Album grid 2 cols */
  .album-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Mood grid stays 5 cols but bigger buttons */
  #moodGrid button { font-size: 1.6rem; min-height: 48px; }

  /* Toast above bottom nav */
  .clasper-toast { bottom: calc(5rem + var(--safe-bottom)) !important; }

  /* Confirm dialog full width */
  #clasperConfirmDialog > div { width: 92vw !important; }

  /* Install banner above bottom nav */
  .install-banner { bottom: calc(70px + var(--safe-bottom)); }
}

/* ── Splash screen feel — hide scrollbar on mobile ────────── */
@media (max-width: 768px) {
  ::-webkit-scrollbar { display: none; }
  * { -ms-overflow-style: none; scrollbar-width: none; }
}

/* ── Pull-to-refresh visual hint ─────────────────────────── */
.ptr-indicator {
  display: none;
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%);
  background: var(--warm-accent);
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 700;
  z-index: 150;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: fadeIn 0.2s ease;
}
.ptr-indicator.show { display: block; }

/* ── App-like tap feedback ────────────────────────────────── */
@media (hover: none) {
  .feature-card:active, .card:active, .widget:active { transform: scale(0.98); }
  .btn:active { transform: scale(0.96); }
}

/* ── Login / Signup mobile polish ────────────────────────── */
@media (max-width: 480px) {
  .form-page {
    padding: 0;
    align-items: flex-end;
  }
  .form-box {
    border-radius: 24px 24px 0 0;
    padding: 2rem 1.4rem 2.5rem;
    max-width: 100%;
    box-shadow: 0 -8px 40px rgba(59,31,14,0.25);
    min-height: 60vh;
  }
  .form-box h2 { font-size: 1.5rem; }
  .form-box img[alt="Clasper"] { height: 64px !important; }
  .form-divider { font-size: 0.78rem; }
}

/* ── Index landing page mobile ───────────────────────────── */
@media (max-width: 600px) {
  .hero-stats { gap: 1.2rem; margin-top: 1.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .hero-stat-divider { display: none; }
  .hero-badge { font-size: 0.68rem; padding: 0.3rem 0.9rem; }
}

/* ── Swipe-back edge indicator ───────────────────────────── */
.swipe-back-hint {
  position: fixed;
  left: 0; top: 50%;
  transform: translateY(-50%) translateX(-100%);
  background: var(--warm-accent);
  color: white;
  padding: 0.6rem 0.5rem;
  border-radius: 0 12px 12px 0;
  font-size: 1.2rem;
  z-index: 300;
  transition: transform 0.2s ease;
  pointer-events: none;
}
.swipe-back-hint.peek { transform: translateY(-50%) translateX(0); }

/* ── Mobile FAB quick-nav ─────────────────────────────────── */
.mobile-fab {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: calc(86px + var(--safe-bottom, 0px));
  width: auto;
  height: 48px;
  padding: 0 1.1rem;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--warm-accent), var(--warm-brown));
  color: white;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59,31,14,0.55), 0 0 0 3px rgba(221,184,146,0.25);
  z-index: 190;
  display: none;
  align-items: center;
  gap: 0.45rem;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mobile-fab:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(59,31,14,0.4);
}
/* FAB only shown on tablet (1024px) but NOT on mobile (handled by bottom nav) */
@media (min-width: 769px) and (max-width: 1024px) {
  .mobile-fab {
    display: flex;
  }
}


/* ===== ONBOARDING WALKTHROUGH ===== */
.ob-walkthrough-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 30000;
  animation: fadeIn 0.3s ease;
}
.ob-spotlight {
  position: fixed;
  z-index: 30001;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.6), 0 0 30px rgba(200,149,108,0.5);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.ob-tooltip {
  position: fixed;
  z-index: 30002;
  background: #fdf6ee;
  border-radius: 20px;
  padding: 1.6rem;
  width: min(380px, 90vw);
  box-shadow: 0 16px 60px rgba(59,31,14,0.35);
  animation: popIn 0.3s ease;
  border: 2px solid rgba(181,112,58,0.2);
}
.ob-tooltip-title {
  font-family: var(--font-heading);
  color: var(--warm-brown);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ob-tooltip-body {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}
.ob-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ob-dots {
  display: flex;
  gap: 6px;
}
.ob-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warm-tan);
  transition: all 0.2s;
}
.ob-dot.active {
  background: var(--warm-accent);
  width: 20px;
  border-radius: 4px;
}
.ob-tooltip-btns {
  display: flex;
  gap: 0.5rem;
}
.ob-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.ob-btn-skip {
  background: transparent;
  color: #aaa;
}
.ob-btn-skip:hover { color: var(--warm-brown); }
.ob-btn-next {
  background: var(--warm-accent);
  color: white;
  box-shadow: 0 4px 14px rgba(200,149,108,0.35);
}
.ob-btn-next:hover { background: var(--warm-brown); }
.ob-btn-done {
  background: var(--warm-green);
  color: white;
  box-shadow: 0 4px 14px rgba(88,129,87,0.35);
}
.ob-btn-done:hover { background: #4a7050; }
.ob-welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  animation: fadeIn 0.3s ease;
}
.ob-welcome-card {
  background: #fdf6ee;
  border-radius: 24px;
  padding: 2.5rem;
  width: min(460px, 92vw);
  text-align: center;
  box-shadow: 0 24px 80px rgba(59,31,14,0.3);
  animation: popIn 0.4s ease;
}
.ob-welcome-icon {
  font-size: 3.5rem;
  margin-bottom: 0.8rem;
}
.ob-welcome-title {
  font-family: var(--font-heading);
  color: var(--warm-brown);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.ob-welcome-sub {
  font-size: 0.92rem;
  color: #888;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.ob-welcome-btns {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== LOADING SKELETON PULSE ===== */
.skeleton-pulse {
  background: linear-gradient(90deg, #f0e8df 25%, #e8d5b7 50%, #f0e8df 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}
