/* ═══════════════════════════════════════════
   家庭瞬间 v3 — Timeline Layout
   Center-aligned timeline · Alternating cards · Glassmorphism
   ═══════════════════════════════════════════ */

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

:root {
  /* ── Color ── */
  --bg:            #f5f5f7;
  --surface:       #ffffff;
  --text-1:        #1d1d1f;
  --text-2:        #86868b;
  --text-3:        #aeaeb2;
  --border:        rgba(0,0,0,0.06);
  --accent:        #007AFF;
  --accent-end:    #5856D6;
  --accent-grad:   linear-gradient(135deg, #007AFF, #5856D6);
  --accent-light:  rgba(0,122,255,0.08);
  --success:       #34C759;
  --warning:       #FF9500;
  --error:         #FF3B30;
  --wechat:        #07C160;

  --tag-meal-bg:     #FFF3E0; --tag-meal-fg:   #E65100;
  --tag-travel-bg:   #E8F5E9; --tag-travel-fg: #2E7D32;
  --tag-daily-bg:    #E3F2FD; --tag-daily-fg:  #1565C0;
  --tag-festival-bg: #FFEBEE; --tag-festival-fg:#C62828;

  /* ── Spacing ── */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* ── Radius ── */
  --r-sm: 8px;  --r-md: 12px; --r-lg: 16px;  --r-xl: 22px; --r-full: 9999px;

  /* ── Shadow ── */
  --sh-sm: 0 1px 3px rgba(0,0,0,0.04);
  --sh-md: 0 4px 14px rgba(0,0,0,0.06);
  --sh-lg: 0 10px 36px rgba(0,0,0,0.08);
  --sh-xl: 0 20px 60px rgba(0,0,0,0.12);

  /* ── Glass (dynamic via JS) ── */
  --glass-opacity: 0.72;
  --glass-blur:    20px;

  /* ── Font ── */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text",
          "Helvetica Neue", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;

  /* ── Motion ── */
  --ease-out:   cubic-bezier(0.25,0.46,0.45,0.94);
  --ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --dur-fast: 150ms; --dur-base: 280ms; --dur-slow: 500ms;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text-1); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }
img { display: block; }
button { font-family: var(--font); cursor: pointer; }
input { font-family: var(--font); }
.hidden { display: none !important; }

/* ──── Background Layer ──── */
.bg-layer {
  position: fixed; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  background-repeat: no-repeat; transition: background-image 0.5s ease;
}
.bg-dim {
  position: fixed; inset: 0; z-index: -1;
  background: rgba(255,255,255,0.55);
  transition: background 0.3s ease;
}
body.has-bg .bg-dim { background: rgba(0,0,0,0.35); }
body.has-bg { color: #fff; }
body.has-bg .nav { background: rgba(0,0,0,0.3); }
body.has-bg .nav.scrolled { background: rgba(0,0,0,0.55); }
body.has-bg .hero { background: transparent; }
body.has-bg .hero::before, body.has-bg .hero::after { display: none; }
body.has-bg .hero-desc { color: rgba(255,255,255,0.75); }
body.has-bg .filter-bar { background: rgba(0,0,0,0.2); }
body.has-bg .filter { color: rgba(255,255,255,0.65); }
body.has-bg .filter.active { background: rgba(255,255,255,0.2); color: #fff; box-shadow: none; }
body.has-bg .tl-card { background: rgba(255,255,255,var(--glass-opacity)); border-color: rgba(255,255,255,0.25); }
body.has-bg .tl-card:hover { background: rgba(255,255,255,calc(var(--glass-opacity) + 0.06)); }
body.has-bg .tl-card .tl-desc { color: var(--text-1); }
body.has-bg .tl-card .tl-author { color: var(--text-1); }
body.has-bg .tl-card .tl-time { color: var(--text-2); }
body.has-bg .tl-card .tl-stats { color: var(--text-2); }
body.has-bg .tl-divider span { background: rgba(0,0,0,0.25); color: rgba(255,255,255,0.9); }
body.has-bg .timeline-line { background: rgba(255,255,255,0.2); }
body.has-bg .tl-dot { background: rgba(0,0,0,0.2); border-color: rgba(255,255,255,0.3); }
body.has-bg .tl-dot.active { background: var(--accent); border-color: var(--accent); }
body.has-bg .footer { border-top-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
body.has-bg .timeline-empty p { color: rgba(255,255,255,0.8); }
body.has-bg .timeline-empty span { color: rgba(255,255,255,0.5); }
body.has-bg .timeline-empty svg { stroke: rgba(255,255,255,0.3); }

/* ──── Auth Overlay ──── */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--dur-slow) ease;
}
.auth-overlay.out { opacity: 0; pointer-events: none; }

.auth-card {
  background: var(--surface); border-radius: var(--r-xl);
  padding: var(--sp-12) var(--sp-10); width: 400px; max-width: 92vw;
  box-shadow: var(--sh-xl); text-align: center;
  animation: slideUp .45s var(--ease-spring);
}

@keyframes slideUp { from { opacity:0; transform: translateY(28px) scale(.97); } to { opacity:1; transform: none; } }

.auth-logo { margin-bottom: var(--sp-5); }
.auth-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: var(--sp-1); }
.auth-subtitle { font-size: 15px; color: var(--text-2); margin-bottom: var(--sp-8); }

.phone-row {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; background: var(--bg); transition: border-color var(--dur-fast);
}
.phone-row:focus-within { border-color: var(--accent); }
.prefix {
  padding: var(--sp-3) var(--sp-4); font-size: 15px; font-weight: 500;
  border-right: 1.5px solid var(--border); white-space: nowrap; background: transparent;
}
.phone-row input {
  flex: 1; border: none; outline: none; padding: var(--sp-3) var(--sp-4);
  font-size: 15px; background: transparent; color: var(--text-1);
}
.phone-row input::placeholder { color: var(--text-3); }

.code-row { display: flex; gap: var(--sp-2); justify-content: center; }
.code-digit {
  width: 44px; height: 50px; text-align: center; font-size: 20px; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: var(--r-sm); outline: none;
  background: var(--bg); transition: border-color var(--dur-fast);
}
.code-digit:focus { border-color: var(--accent); }

.form-hint { font-size: 12px; color: var(--text-3); margin-top: var(--sp-2); }

.auth-divider { position: relative; margin: var(--sp-6) 0; text-align: center; }
.auth-divider::before { content:''; position:absolute; left:0; top:50%; width:100%; height:1px; background:var(--border); }
.auth-divider span { position:relative; background:var(--surface); padding:0 var(--sp-4); font-size:13px; color:var(--text-3); }

.btn-wechat {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  width: 100%; padding: var(--sp-3) var(--sp-4); border: none; border-radius: var(--r-md);
  background: var(--wechat); color: white; font-size: 15px; font-weight: 500;
  transition: all var(--dur-base);
}
.btn-wechat:hover { background: #06ad56; transform: scale(1.01); }

.btn-text {
  background: none; border: none; color: var(--text-2); font-size: 14px;
  margin-top: var(--sp-4); transition: color var(--dur-fast);
}
.btn-text:hover { color: var(--accent); }

/* ──── Buttons ──── */
.btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 13px; border: none; border-radius: var(--r-md);
  background: var(--accent-grad); color: white; font-size: 15px; font-weight: 600;
  transition: all var(--dur-base); margin-top: var(--sp-5);
}
.btn-primary:disabled { background: var(--text-3); cursor: not-allowed; }
.btn-primary:not(:disabled):hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,122,255,0.3); }

.btn-secondary {
  display: block; width: 100%; padding: 10px; border: 1.5px solid var(--accent);
  border-radius: var(--r-md); background: transparent; color: var(--accent);
  font-size: 14px; font-weight: 500; transition: all var(--dur-fast); margin-top: var(--sp-2);
}
.btn-secondary:hover { background: var(--accent-light); }

.btn-text-sm {
  display: block; width: 100%; padding: 8px; border: none; background: none;
  color: var(--text-3); font-size: 13px; margin-top: var(--sp-1); transition: color var(--dur-fast);
}
.btn-text-sm:hover { color: var(--text-2); }

/* ──── Navbar ──── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(245,245,247,0.72);
  backdrop-filter: saturate(180%) blur(var(--glass-blur)); -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border-bottom: 0.5px solid var(--border); transition: background var(--dur-base);
}
.nav.scrolled { background: rgba(245,245,247,0.92); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-6);
  height: 52px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: var(--sp-2); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.nav-actions { display: flex; align-items: center; gap: var(--sp-2); }
.nav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent;
  color: var(--text-1); display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
}
.nav-btn:hover { background: rgba(0,0,0,0.05); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-grad); color: white; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ──── Hero ──── */
.hero {
  padding: 136px var(--sp-6) var(--sp-20);
  text-align: center; background: linear-gradient(180deg, var(--bg) 0%, #fff 100%);
  position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18; pointer-events: none;
}
.hero::before { width: 400px; height: 400px; background: #007AFF; top: -80px; left: -100px; }
.hero::after  { width: 350px; height: 350px; background: #5856D6; bottom: -60px; right: -80px; }
.hero-inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }
.hero-title {
  font-size: clamp(34px, 7vw, 56px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: var(--sp-5);
}
.hero-gradient {
  background: var(--accent-grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { font-size: 19px; color: var(--text-2); font-weight: 300; line-height: 1.5; margin-bottom: var(--sp-8); }
.btn-hero {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 15px 30px; border: none; border-radius: var(--r-full);
  background: var(--accent-grad); color: white; font-size: 16px; font-weight: 600;
  transition: all var(--dur-base);
}
.btn-hero:hover { transform: scale(1.05); box-shadow: 0 6px 28px rgba(0,122,255,0.3); }

/* ──── Filter Bar (sticky) ──── */
.filter-bar {
  position: sticky; top: 52px; z-index: 100;
  background: rgba(245,245,247,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--border);
  transition: background var(--dur-base);
}
.filter-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: var(--sp-3) var(--sp-6);
  display: flex; justify-content: center;
}
.filters {
  display: flex; gap: 3px; background: rgba(0,0,0,0.04);
  border-radius: var(--r-full); padding: 3px;
}
.filter {
  padding: 6px 16px; border: none; border-radius: var(--r-full);
  background: transparent; font-size: 13px; font-weight: 500;
  color: var(--text-2); transition: all var(--dur-fast);
}
.filter.active { background: var(--surface); color: var(--text-1); box-shadow: var(--sh-sm); }
.filter:hover:not(.active) { color: var(--text-1); }

/* ──── Timeline ──── */
.timeline-main {
  max-width: 1000px; margin: 0 auto; padding: var(--sp-8) var(--sp-6) var(--sp-20);
}

.timeline-container {
  position: relative;
  padding: var(--sp-4) 0;
}

.timeline-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px; background: var(--border);
  transform: translateX(-50%);
  z-index: 0;
}

/* ── Timeline Node ── */
.tl-node {
  position: relative;
  width: 100%;
  margin-bottom: var(--sp-6);
  animation: nodeIn 0.5s var(--ease-out) both;
}
@keyframes nodeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tl-dot {
  position: absolute;
  left: 50%; top: 18px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: var(--surface);
  transform: translateX(-50%);
  z-index: 2;
  transition: all var(--dur-base);
}
.tl-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.15);
}

/* ── Timeline Card ── */
.tl-card {
  position: absolute;
  width: calc(50% - 36px);
  background: rgba(255,255,255, var(--glass-opacity));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 0.5px solid rgba(255,255,255,0.45);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--sh-sm);
  transition: all var(--dur-base);
  cursor: pointer;
}
.tl-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  background: rgba(255,255,255, calc(var(--glass-opacity) + 0.06));
}
.tl-card.left  { right: calc(50% + 20px); }
.tl-card.right { left:  calc(50% + 20px); }

.tl-time {
  font-size: 11px; color: var(--text-3); margin-bottom: var(--sp-2);
  font-weight: 400;
}

.tl-author-row {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.tl-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-grad); color: white;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tl-author {
  font-weight: 500; font-size: 13px;
}
.tl-action {
  font-size: 11px; color: var(--text-3); margin-left: 2px;
}

.tl-desc {
  font-size: 13px; line-height: 1.5; color: var(--text-1);
  margin-bottom: var(--sp-3);
}

/* ── Single image / video (full-width in card) ── */
.tl-media {
  width: 100%; border-radius: var(--r-md); overflow: hidden;
  position: relative; background: #f0f0f2;
}
.tl-media img {
  width: 100%; display: block; object-fit: cover;
  max-height: 420px;
  transition: transform 0.6s var(--ease-out);
}
.tl-card:hover .tl-media img { transform: scale(1.02); }

.tl-media.video-cover {
  cursor: pointer;
}
.tl-media .play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  border: none; color: white;
  transition: all var(--dur-base);
}
.tl-media .play-btn svg { margin-left: 2px; }
.tl-media .play-btn:hover { background: rgba(0,0,0,0.6); transform: translate(-50%,-50%) scale(1.08); }

.tl-media video {
  width: 100%; display: block; max-height: 420px; object-fit: cover;
  border-radius: var(--r-md);
}

/* ── Multi-image Carousel ── */
.tl-carousel {
  width: 100%; overflow: hidden; border-radius: var(--r-md);
  position: relative; background: #f0f0f2;
  touch-action: pan-y;
}
.tl-carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}
.tl-carousel-track > .tl-carousel-item {
  min-width: 100%; height: auto;
}
.tl-carousel-track > .tl-carousel-item img {
  width: 100%; display: block; object-fit: cover;
  max-height: 320px;
}

.tl-carousel-dots {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 2;
}
.tl-carousel-dots .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transition: all 0.25s ease;
}
.tl-carousel-dots .dot.active {
  background: #fff; width: 16px; border-radius: 3px;
}

.tl-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: var(--text-1);
  z-index: 2; transition: all var(--dur-fast);
  user-select: none; opacity: 0;
}
.tl-carousel:hover .tl-carousel-arrow { opacity: 1; }
.tl-carousel-arrow:hover { background: rgba(255,255,255,1); transform: translateY(-50%) scale(1.05); }
.tl-carousel-arrow.prev { left: 6px; }
.tl-carousel-arrow.next { right: 6px; }

/* ── Card Stats ── */
.tl-stats {
  display: flex; gap: var(--sp-4); margin-top: var(--sp-3);
  font-size: 12px; color: var(--text-3);
}

/* ── Tag Badge ── */
.tag-badge {
  font-size: 11px; padding: 2px 8px; border-radius: var(--r-full); font-weight: 500; white-space: nowrap;
  display: inline-block;
}
.tag-badge.meal     { background: var(--tag-meal-bg);     color: var(--tag-meal-fg); }
.tag-badge.travel   { background: var(--tag-travel-bg);   color: var(--tag-travel-fg); }
.tag-badge.daily    { background: var(--tag-daily-bg);    color: var(--tag-daily-fg); }
.tag-badge.festival { background: var(--tag-festival-bg); color: var(--tag-festival-fg); }

/* ── Date Divider ── */
.tl-divider {
  position: relative; z-index: 2;
  text-align: center; padding: var(--sp-4) 0;
}
.tl-divider span {
  display: inline-block;
  background: var(--bg);
  padding: 3px 16px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  border: 0.5px solid var(--border);
}

/* ── Empty State ── */
.timeline-empty {
  text-align: center; padding: var(--sp-20) var(--sp-4); color: var(--text-3);
}
.timeline-empty p { font-size: 17px; margin-top: var(--sp-4); color: var(--text-2); }
.timeline-empty span { font-size: 14px; display: block; margin-top: var(--sp-1); }

/* ──── Upload Modal ──── */
.modal-bg {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal {
  background: var(--surface); border-radius: var(--r-xl);
  padding: var(--sp-8); width: 520px; max-width: 92vw; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--sh-xl);
  animation: slideUp .35s var(--ease-spring);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-6); }
.modal-head h3 { font-size: 20px; font-weight: 600; }

.close-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.06); font-size: 18px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
}
.close-btn:hover { background: rgba(0,0,0,0.12); }

.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  padding: var(--sp-12) var(--sp-6); text-align: center; cursor: pointer;
  transition: all var(--dur-fast); margin-bottom: var(--sp-6);
}
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--accent-light); }
.drop-zone p { margin-top: var(--sp-3); font-size: 15px; color: var(--text-2); }
.drop-zone span { font-size: 13px; color: var(--text-3); display: block; margin-top: var(--sp-1); }

.preview-wrap { margin-bottom: var(--sp-5); }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: var(--sp-2); }
.preview-item { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(0,0,0,0.5); border: none;
  color: white; font-size: 13px; display: flex; align-items: center; justify-content: center;
}

.form-group { margin-bottom: var(--sp-5); }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: var(--sp-1); }
.form-group input[type="text"] {
  width: 100%; padding: 10px var(--sp-4); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); font-size: 15px; outline: none; background: var(--bg);
  transition: border-color var(--dur-fast);
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-3); }

.tag-pick { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tag-opt {
  padding: 6px 14px; border: 1.5px solid var(--border); border-radius: var(--r-full);
  background: transparent; font-size: 14px; color: var(--text-2);
  transition: all var(--dur-fast);
}
.tag-opt.on { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.tag-opt:hover:not(.on) { border-color: var(--text-3); }

/* ──── Lightbox (fullscreen preview) ──── */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s ease;
  flex-direction: column;
}
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.15); color: white; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast); cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-content {
  max-width: 92vw; max-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lightbox-content img {
  max-width: 92vw; max-height: 80vh; object-fit: contain;
  border-radius: var(--r-md);
  animation: lbZoomIn 0.35s var(--ease-spring);
}
.lightbox-content video {
  max-width: 92vw; max-height: 80vh; border-radius: var(--r-md);
}
@keyframes lbZoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-counter {
  margin-top: var(--sp-4);
  font-size: 13px; color: rgba(255,255,255,0.6);
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: white; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--dur-fast);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ──── Settings Panel ──── */
.settings-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 2500;
  width: 320px; max-width: 85vw;
  background: var(--surface);
  box-shadow: var(--sh-xl);
  animation: slideRight 0.3s var(--ease-spring);
  overflow-y: auto;
}
@keyframes slideRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.settings-inner { padding: var(--sp-6); }
.settings-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-8);
}
.settings-head h3 { font-size: 20px; font-weight: 600; }
.settings-group { margin-bottom: var(--sp-6); }
.settings-group label {
  display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: var(--sp-2);
}
.settings-val { float: right; font-weight: 400; color: var(--text-3); }
.settings-group input[type="range"] {
  width: 100%; margin-bottom: var(--sp-3);
  accent-color: var(--accent);
}
.settings-group input[type="text"] {
  width: 100%; padding: 10px var(--sp-4); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); font-size: 14px; outline: none; background: var(--bg);
  transition: border-color var(--dur-fast);
}
.settings-group input[type="text"]:focus { border-color: var(--accent); }
.settings-group input[type="text"]::placeholder { color: var(--text-3); }

/* ──── Toast ──── */
.toast-wrap { position: fixed; bottom: var(--sp-8); left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; }
.toast {
  padding: var(--sp-3) var(--sp-6); border-radius: var(--r-full);
  background: var(--text-1); color: white; font-size: 14px; font-weight: 500;
  box-shadow: var(--sh-lg); animation: toastIn .35s var(--ease-spring), toastOut .3s ease 2.7s forwards;
}
@keyframes toastIn  { from { opacity:0; transform:translateY(16px) scale(.95); } to { opacity:1; transform:none; } }
@keyframes toastOut { to { opacity:0; transform:translateY(-8px); } }

/* ──── Footer ──── */
.footer { text-align: center; padding: var(--sp-10) var(--sp-6); border-top: 0.5px solid var(--border); color: var(--text-3); font-size: 13px; }

/* ──── Scrollbar ──── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

/* ──── Responsive ──── */
@media (max-width: 768px) {
  .hero { padding: 116px var(--sp-5) var(--sp-16); }
  .hero-title { font-size: 32px; }
  .hero-desc { font-size: 16px; }
  .btn-hero { padding: 13px 26px; font-size: 15px; }
  .auth-card { padding: var(--sp-10) var(--sp-7); }
  .modal { padding: var(--sp-6); }
}

/* ──── Mobile: Timeline collapses to single column ──── */
@media (max-width: 640px) {
  .timeline-line { left: 20px; }
  .tl-dot { left: 20px; width: 14px; height: 14px; top: 14px; }
  .tl-card.left, .tl-card.right {
    position: relative;
    left: 48px !important; right: auto !important;
    width: calc(100% - 56px);
    margin-bottom: var(--sp-4);
  }
  .tl-node { margin-bottom: 0; }
  .tl-carousel-arrow { opacity: 1; width: 24px; height: 24px; font-size: 12px; }
  .filters { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .filter-bar-inner { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .tl-card { padding: var(--sp-3); }
  .tl-media img, .tl-media video { max-height: 300px; }
  .tl-carousel-track > .tl-carousel-item img { max-height: 240px; }
}
