/* ============================================================
   Photo Timeline feature — shared styles
   Namespaced with .tl- to avoid clashing with assets/css/style.css
   ============================================================ */

.tl-frame {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 90px;
}

.tl-brand { color: #0b7dda; }

.tl-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 2px 10px;
  overflow-x: auto;
}
.tl-tab {
  border: none;
  background: #f4f6f9;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.tl-tab.active { background: #0b7dda; color: #fff; }

.tl-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(20,30,50,0.08);
  overflow: hidden;
  border: 1px solid #e7eaf0;
  margin-bottom: 14px;
  cursor: pointer;
}
.tl-card .tl-cover-wrap { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: #dfe3e9; }
.tl-card .tl-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.tl-card .tl-cover-gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.55) 100%); }
.tl-card .tl-cover-meta { position: absolute; left: 12px; bottom: 10px; right: 12px; color: #fff; display: flex; align-items: center; gap: 8px; }
.tl-card .tl-cover-meta img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.tl-card .tl-cover-meta .tl-name { font-weight: 700; font-size: 0.95rem; }
.tl-card .tl-cover-meta .tl-handle { font-size: 0.76rem; opacity: 0.85; }
.tl-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; }
.tl-stat { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; color: #6b7280; font-weight: 600; }
.tl-stat.liked { color: #e0396d; }
.tl-like-btn { background: none; border: none; padding: 0; display: flex; align-items: center; gap: 4px; }

.tl-profile-header { padding: 10px 8px 4px; text-align: center; }
.tl-profile-header .tl-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.tl-profile-header .tl-name { font-weight: 800; font-size: 1.15rem; margin-top: 10px; }
.tl-profile-header .tl-handle { color: #6b7280; font-size: 0.85rem; }
.tl-visibility-toggle { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e7eaf0; border-radius: 999px; padding: 5px 12px; margin-top: 8px; font-size: 0.78rem; font-weight: 600; color: #6b7280; cursor: pointer; }
.tl-stats-row { display: flex; justify-content: center; gap: 26px; margin-top: 14px; }
.tl-stats-row .tl-stat-num { font-weight: 800; font-size: 1.02rem; }
.tl-stats-row .tl-stat-label { font-size: 0.72rem; color: #6b7280; }
.tl-profile-actions { display: flex; gap: 10px; padding: 14px 4px 4px; }
.tl-profile-actions > * { flex: 1; }

.tl-btn-brand { background: #0b7dda; color: #fff; border: none; border-radius: 10px; font-weight: 700; padding: 10px 16px; }
.tl-btn-brand:hover { background: #0964ad; color: #fff; }
.tl-btn-outline { background: #fff; color: #0b7dda; border: 1.5px solid #0b7dda; border-radius: 10px; font-weight: 700; padding: 9px 16px; }

.tl-age-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e7eaf0; border-radius: 14px; padding: 9px 12px; margin-bottom: 8px; cursor: pointer; }
.tl-age-row .tl-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #e7eaf0; flex-shrink: 0; }
.tl-age-row .tl-thumb-placeholder { width: 46px; height: 46px; border-radius: 10px; background: #f4f6f9; border: 1.5px dashed #c6ccd6; display: flex; align-items: center; justify-content: center; color: #b0b7c3; flex-shrink: 0; }
.tl-age-row .tl-age-num { font-weight: 800; width: 30px; text-align: center; color: #6b7280; font-size: 0.9rem; }
.tl-age-row .tl-age-info { flex: 1; min-width: 0; }
.tl-age-row .tl-age-title { font-weight: 700; font-size: 0.9rem; }
.tl-age-row .tl-age-sub { font-size: 0.76rem; color: #6b7280; }
.tl-badge-added { background: #e5f6ea; color: #1c8a45; font-weight: 700; font-size: 0.7rem; padding: 3px 9px; border-radius: 999px; }
.tl-badge-missing { background: #fbeaea; color: #c23a3a; font-weight: 700; font-size: 0.7rem; padding: 3px 9px; border-radius: 999px; }

.tl-stage-wrap { padding: 4px 2px; }
.tl-stage { position: relative; width: 100%; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: #111; box-shadow: 0 6px 20px rgba(20,30,50,0.15); }
.tl-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.tl-stage img.tl-visible { opacity: 1; }
.tl-stage .tl-age-overlay { position: absolute; left: 14px; bottom: 14px; color: #fff; z-index: 5; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.tl-stage .tl-age-overlay .tl-big { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.tl-owner-bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; z-index: 5; }
.tl-owner-bar img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.tl-owner-bar .tl-name { color: #fff; font-weight: 700; font-size: 0.85rem; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

.tl-slider-wrap { padding: 16px 6px 4px; }
.tl-slider-wrap input[type=range] { width: 100%; accent-color: #0b7dda; }
.tl-slider-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: #6b7280; }

.tl-thumb-strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px; }
.tl-thumb-strip .tl-thumb-item { flex-shrink: 0; width: 52px; height: 66px; border-radius: 9px; overflow: hidden; border: 2px solid transparent; position: relative; background: #e7eaf0; cursor: pointer; }
.tl-thumb-strip .tl-thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.tl-thumb-strip .tl-thumb-item.active { border-color: #0b7dda; }
.tl-thumb-strip .tl-thumb-item .tl-thumb-age { position: absolute; bottom: 2px; right: 3px; color: #fff; font-size: 0.6rem; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.tl-thumb-strip .tl-thumb-item.empty { display: flex; align-items: center; justify-content: center; border: 1.5px dashed #c6ccd6; color: #b0b7c3; font-size: 0.65rem; font-weight: 700; }

.tl-upload-drop { border: 2px dashed #c6d6e8; border-radius: 14px; background: #e7f2fd; padding: 26px 14px; text-align: center; color: #0964ad; cursor: pointer; }
.tl-upload-drop i { font-size: 2rem; }
.tl-upload-preview { width: 100%; aspect-ratio: 3/4; max-height: 240px; object-fit: cover; border-radius: 14px; }

.tl-reel-player { border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 9/16; background: #0b0d12; box-shadow: 0 6px 20px rgba(20,30,50,.15); }
.tl-reel-player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.tl-reel-player img.tl-visible { opacity: 1; }
.tl-reel-player .tl-reel-top { position: absolute; top: 0; left: 0; right: 0; padding: 14px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); z-index: 5; color: #fff; font-weight: 700; font-size: 0.85rem; }
.tl-reel-player .tl-reel-age { position: absolute; left: 16px; bottom: 46px; z-index: 5; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.tl-reel-player .tl-reel-age .tl-big { font-size: 2.1rem; font-weight: 800; }
.tl-watermark { position: absolute; right: 12px; bottom: 12px; z-index: 6; color: rgba(255,255,255,.85); font-size: 0.68rem; font-weight: 800; background: rgba(0,0,0,.35); padding: 4px 9px; border-radius: 999px; letter-spacing: .03em; }
.tl-reel-progress { position: absolute; top: 6px; left: 10px; right: 10px; z-index: 6; display: flex; gap: 4px; }
.tl-reel-progress .tl-seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.tl-reel-progress .tl-seg .tl-fill { height: 100%; width: 0%; background: #fff; }
.tl-reel-generating { position: absolute; inset: 0; z-index: 10; background: rgba(11,13,18,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; gap: 10px; }

.tl-music-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid #e7eaf0; border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.tl-music-item.active { border-color: #0b7dda; background: #e7f2fd; }
.tl-music-item .tl-music-icon { width: 38px; height: 38px; border-radius: 50%; background: #e7f2fd; color: #0b7dda; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-music-item.active .tl-music-icon { background: #0b7dda; color: #fff; }
.tl-music-item .tl-music-name { font-weight: 700; font-size: 0.88rem; }
.tl-music-item .tl-music-sub { font-size: 0.74rem; color: #6b7280; }

.tl-plan-banner { border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.tl-plan-banner.free { background: #fff4e2; border: 1px solid #f3d9a8; }
.tl-plan-banner.paid { background: #e5f6ea; border: 1px solid #b9e6c6; }
.tl-plan-banner .tl-plan-title { font-weight: 800; font-size: 0.85rem; }
.tl-plan-banner .tl-plan-sub { font-size: 0.72rem; color: #6b7280; }

.tl-section-title { font-weight: 800; font-size: 1rem; padding: 16px 4px 6px; }
.tl-empty { text-align: center; color: #6b7280; padding: 40px 24px; }
.tl-empty i { font-size: 2.4rem; color: #c6ccd6; }

.tl-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 480px; margin: 0 auto;
  height: 64px; background: #fff; border-top: 1px solid #e7eaf0;
  display: flex; align-items: center; justify-content: space-around;
  z-index: 1030; padding-bottom: env(safe-area-inset-bottom);
}
.tl-nav-item { background: none; border: none; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #6b7280; font-size: 0.65rem; font-weight: 600; flex: 1; padding: 6px 0; }
.tl-nav-item i { font-size: 1.3rem; }
.tl-nav-item.active { color: #0b7dda; }
.tl-nav-item.tl-fab-wrap { flex: 0 0 auto; width: 58px; position: relative; }
.tl-nav-fab { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(145deg, #0b7dda, #0964ad); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(11,125,218,.45); margin-top: -26px; border: 4px solid #f4f6f9; }
.tl-nav-fab i { font-size: 1.5rem; }
