/* ============================================================================
   Y-H的家 · 私密家庭相册 — 全局样式
   风格: 温馨暖色系 (米白/暖棕/浅金) / 家庭时光纪念册
   ============================================================================ */
:root {
  --bg: #faf6ef;              /* 暖米白 */
  --bg-deep: #f2eadd;
  --card: #ffffff;
  --ink: #4a3a2a;             /* 暖棕 */
  --ink-2: #7a6a58;
  --ink-3: #a89888;
  --line: #eae0d2;
  --accent: #c8a46e;          /* 浅金 */
  --accent-deep: #a8834f;
  --accent-soft: rgba(200, 164, 110, 0.14);
  --red: #c2574e;
  --green: #5c8a5c;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(120, 96, 60, 0.08);
  --shadow-md: 0 10px 30px rgba(120, 96, 60, 0.14);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d9ccba; border-radius: 8px; }

/* ============================================================================
   顶部导航
   ============================================================================ */
.topbar {
  position: sticky; top: 0; z-index: 90;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 22px; height: 72px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 68px; width: auto; object-fit: contain; }
.topnav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a {
  font-size: 21px; color: var(--ink-2);
  padding: 8px 14px; border-radius: 8px; white-space: nowrap; flex-shrink: 0;
  transition: all 0.2s;
}
.topnav a:hover { color: var(--accent-deep); background: var(--accent-soft); }
.topnav a.active { color: var(--accent-deep); font-weight: 600; background: var(--accent-soft); }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; padding: 8px; }
.hamburger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 500;
  transition: all 0.2s var(--ease); white-space: nowrap;
}
.btn-primary { background: linear-gradient(145deg, var(--accent), var(--accent-deep)); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 7px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* 头像与下拉 */
.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep)); color: #fff;
  border: none; font-size: 14px; font-weight: 600; display: grid; place-items: center;
}
.avatar-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: 44px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-md); min-width: 160px; padding: 6px; z-index: 100;
  animation: fadeIn 0.2s var(--ease);
}
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 7px; border: none; background: none;
  font-size: 13.5px; color: var(--ink-2);
}
.dropdown a:hover, .dropdown button:hover { background: var(--accent-soft); color: var(--accent-deep); }
.dd-label { font-size: 12px; color: var(--ink-3); padding: 6px 12px 4px; }

/* ============================================================================
   主视图: 时间轴 + 内容区
   ============================================================================ */
.view { max-width: 1440px; margin: 0 auto; padding: 20px 22px 60px; min-height: calc(100vh - 72px); }
.view-enter { animation: fadeUp 0.5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.home-layout { display: grid; grid-template-columns: 190px 1fr; gap: 26px; align-items: start; }
.home-main { min-width: 0; }

/* ---------- 左侧固定时间轴 ---------- */
.timeline-side {
  position: sticky; top: 92px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 18px 14px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.timeline-side h3 {
  font-family: var(--serif); font-size: 14px; letter-spacing: 3px;
  color: var(--accent-deep); text-align: center; margin-bottom: 14px;
}
.tl-year-group { margin-bottom: 10px; }
.tl-year-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--ink); padding: 6px 8px; cursor: pointer;
  border-radius: 8px; transition: background 0.2s;
}
.tl-year-label:hover { background: var(--accent-soft); }
.tl-year-label .tl-year-count { font-size: 11px; color: var(--ink-3); font-family: var(--font); font-weight: 400; }
.tl-year-label.active { color: var(--accent-deep); }
.tl-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 2px 4px; }
.tl-month {
  font-size: 11.5px; color: var(--ink-2); text-align: center;
  padding: 4px 2px; border-radius: 6px; cursor: pointer;
  position: relative; transition: all 0.2s;
}
.tl-month:hover { background: var(--accent-soft); color: var(--accent-deep); }
.tl-month.active { background: var(--accent); color: #fff; }
.tl-month .tm-count {
  display: block; font-size: 9.5px; opacity: 0.75; margin-top: 1px;
}
.tl-month:not(.has) { opacity: 0.4; }
.tl-month:not(.has):hover { opacity: 1; }
.tl-year-collapsed .tl-months { display: none; }

/* ---------- 年份标签条 ---------- */
.year-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px; align-items: center;
}
.year-chip {
  padding: 7px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; color: var(--ink-2);
  transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.year-chip:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.year-chip.active { background: linear-gradient(145deg, var(--accent), var(--accent-deep)); color: #fff; border-color: transparent; }
.year-chip .yc-count { font-size: 11px; opacity: 0.7; }

/* 筛选状态行 */
.filter-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; font-size: 13px; color: var(--ink-2);
}
.filter-status .fs-active {
  background: var(--accent-soft); color: var(--accent-deep);
  padding: 4px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
}
.filter-status .fs-clear { color: var(--ink-3); cursor: pointer; font-size: 12px; }
.filter-status .fs-clear:hover { color: var(--red); }

/* ---------- 照片墙 (整齐网格) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.photo-card {
  position: relative; background: var(--card);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  cursor: pointer; min-width: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  animation: fadeUp 0.4s var(--ease) both;
}
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pc-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-deep); }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.photo-card:hover .pc-thumb img { transform: scale(1.05); }
.pc-type {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(60, 45, 30, 0.65); color: #f6efe4;
  font-size: 11px; padding: 3px 8px; border-radius: 5px;
}
.pc-loc {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  background: rgba(60, 45, 30, 0.72); color: #f6efe4;
  font-size: 11.5px; padding: 3px 9px; border-radius: 5px;
  letter-spacing: 0.5px;
}
.pc-body { padding: 10px 12px 12px; }
.pc-title { font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; display: flex; justify-content: space-between; }
.pc-like { font-size: 11px; color: var(--red); }

/* 骨架屏 */
.skeleton { position: relative; overflow: hidden; background: #efe7d9; border-radius: var(--radius); aspect-ratio: 4/3; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* 空状态 */
.sort-btn.active { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); font-weight: 600; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty-state .es-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 13.5px; }

/* 加载更多 */
.load-more { text-align: center; padding: 22px 0; color: var(--ink-3); font-size: 13px; }

/* ============================================================================
   灯箱
   ============================================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(25, 18, 10, 0.95);
  display: grid; place-items: center;
  animation: fadeIn 0.25s var(--ease);
}
.lb-stage {
  position: relative;
  display: flex; gap: 0;
  max-width: 96vw; max-height: 94vh;
  background: #1a130c; border-radius: 12px; overflow: hidden;
}
.lb-stage img, .lb-stage video {
  max-width: 70vw; max-height: 94vh;
  object-fit: contain;
}
/* 渐进加载: 缩略图先显(秒开), 原图淡入替换 */
.lb-stage img#lb-img {
  transition: opacity 0.4s var(--ease);
  opacity: 0;
  position: relative; z-index: 2;
}
.lb-stage img#lb-img.ready { opacity: 1; }
.lb-stage img#lb-img-thumb {
  position: absolute; z-index: 1; opacity: 0.55; filter: blur(5px);
  transition: opacity 0.4s var(--ease);
}
.lb-zoom-hint {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.55); color: #e8ddc8;
  font-size: 12px; padding: 6px 14px; border-radius: 999px;
  pointer-events: none; transition: opacity 0.4s;
  z-index: 6; white-space: nowrap;
}
/* 图片加载进度条 */
.lb-progress {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: min(360px, 60vw); z-index: 7;
  background: rgba(0,0,0,0.6); border-radius: 12px;
  padding: 12px 16px; backdrop-filter: blur(6px);
  animation: fadeUp 0.3s var(--ease);
}
.lb-progress-track {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.18);
}
.lb-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #e6c98c);
  border-radius: 999px;
  transition: width 0.2s linear;
  position: relative;
}
.lb-progress-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: progressShine 1.2s infinite;
}
@keyframes progressShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.lb-progress-text {
  text-align: center; color: #e8ddc8; font-size: 11.5px;
  margin-top: 8px; letter-spacing: 1px;
}
.lb-side {
  width: 320px; background: #241a10; color: #efe6d6;
  padding: 20px; overflow-y: auto; max-height: 94vh;
  display: flex; flex-direction: column; gap: 10px;
}
.lb-title { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.lb-meta { font-size: 12px; color: #c4b49e; line-height: 1.8; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.lb-tags span { font-size: 11.5px; background: rgba(255,255,255,0.1); color: #e8dc c8; color: #e8dcc8; padding: 3px 9px; border-radius: 5px; }
.lb-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.lb-actions .btn { color: #efe6d6; border-color: rgba(255,255,255,0.25); background: transparent; }
.lb-actions .btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-actions .btn.liked { color: var(--red); border-color: var(--red); }
.lb-comments { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 10px; flex: 1; overflow-y: auto; }
.lb-comments .lc-item { font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.lc-name { color: var(--accent); font-weight: 600; margin-right: 6px; }
.lc-time { font-size: 10.5px; color: #8d7f6b; margin-left: 6px; }
.lb-comments .lc-empty { color: #8d7f6b; font-size: 12px; padding: 8px 0; }
.lb-comment-input { display: flex; gap: 6px; }
.lb-comment-input input {
  flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px; padding: 8px 10px; color: #efe6d6; outline: none; font-size: 12.5px;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.12); color: #fff;
  border: none; font-size: 18px;
  display: grid; place-items: center;
  transition: background 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* 分享弹窗 */
.modal { position: fixed; inset: 0; z-index: 300; background: rgba(30, 22, 12, 0.5); display: grid; place-items: center; animation: fadeIn 0.2s; }
.modal-card {
  background: #fff; border-radius: 14px; padding: 26px;
  width: min(420px, 92vw); box-shadow: var(--shadow-md);
}
.modal-card h3 { font-size: 17px; font-weight: 600; }
.share-box { display: flex; gap: 8px; }
.share-box input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 13px; outline: none; }

/* ============================================================================
   专题 / 地图 / 上传 / 个人中心 / 后台 (通用卡片)
   ============================================================================ */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 16px; }
.section-head h2 { font-size: 18px; font-weight: 600; font-family: var(--serif); letter-spacing: 2px; }
.section-head a { font-size: 13px; color: var(--accent-deep); }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.topic-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tc-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-deep); }
.tc-cover img { width: 100%; height: 100%; object-fit: cover; }
.tc-body { padding: 14px 16px; }
.tc-title { font-size: 15px; font-weight: 600; }
.tc-count { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.tc-intro { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
#family-map { width: 100%; height: 640px; }

.upload-wrap { max-width: 860px; margin: 0 auto; }
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.upload-zone {
  border: 2px dashed #d9ccba; border-radius: var(--radius);
  padding: 42px 20px; text-align: center; color: var(--ink-3);
  cursor: pointer; transition: 0.2s; background: #fdfaf4;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone .uz-icon { font-size: 34px; margin-bottom: 8px; }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.up-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; border: 1px solid var(--line); }
.up-item img, .up-item video { width: 100%; height: 100%; object-fit: cover; }
.up-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.form-field input, .form-field textarea, .form-field select {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 13.5px; font-family: var(--font);
  outline: none; background: #fff; transition: border-color 0.2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--accent); }
.form-field textarea { resize: vertical; min-height: 70px; }
.form-full { grid-column: 1 / -1; }
.chip-select { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-opt {
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: 0.2s;
}
.chip-opt:hover { border-color: var(--accent); }
.chip-opt.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 个人中心 / 后台 */
.me-wrap, .admin-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 22px; }
.me-side, .admin-side {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; height: fit-content; box-shadow: var(--shadow-sm);
}
.me-user { text-align: center; padding: 10px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.me-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep)); color: #fff;
  font-size: 24px; font-weight: 600; display: grid; place-items: center; margin: 0 auto 10px;
}
.me-name { font-size: 15px; font-weight: 600; }
.me-role { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.me-nav, .admin-nav { display: flex; flex-direction: column; gap: 2px; }
.me-nav button, .admin-nav button {
  text-align: left; padding: 10px 12px; border-radius: 8px;
  border: none; background: none; font-size: 13.5px; color: var(--ink-2);
}
.me-nav button:hover, .admin-nav button:hover { background: var(--accent-soft); }
.me-nav button.active, .admin-nav button.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 500; }
.me-main, .admin-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-height: 500px; box-shadow: var(--shadow-sm); }
.me-main h2, .admin-main h2 { font-size: 17px; font-weight: 600; margin-bottom: 18px; font-family: var(--serif); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-3); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
tbody tr:hover { background: #fdfaf4; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 5px; font-size: 11.5px; font-weight: 500; }
.badge-pending { background: #fdf0d0; color: #9a6a1e; }
.badge-approved { background: #e2efe2; color: #3d6b3d; }
.badge-rejected { background: #f8e0de; color: #a34a42; }

/* 回忆页 */
.remember-groups { display: flex; flex-direction: column; gap: 24px; }
.rg-year { font-family: var(--serif); font-size: 16px; color: var(--accent-deep); margin-bottom: 12px; letter-spacing: 2px; }
.rg-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.rg-photo { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; cursor: zoom-in; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform 0.3s var(--ease); }
.rg-photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rg-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Toast */
.toast-wrap { position: fixed; top: 86px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(60, 45, 30, 0.94); color: #f6efe4;
  padding: 10px 22px; border-radius: 999px; font-size: 13px;
  box-shadow: var(--shadow-md); animation: toastIn 0.25s var(--ease);
}
.toast.out { animation: toastOut 0.25s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* 认证页 */
.auth-wrap { max-width: 420px; margin: 50px auto; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px; box-shadow: var(--shadow-md); }
.auth-card .auth-logo-img { display: block; max-width: 200px; max-height: 56px; object-fit: contain; margin: 0 auto 16px; }
.auth-title { text-align: center; font-family: var(--serif); font-size: 21px; letter-spacing: 3px; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 16px; }
.auth-switch a { color: var(--accent-deep); }
.auth-status { margin-top: 14px; padding: 12px 14px; background: var(--accent-soft); border-radius: 8px; font-size: 13px; color: var(--accent-deep); text-align: center; }

/* ============================================================================
   响应式
   ============================================================================ */
@media (max-width: 1024px) {
  .home-layout { grid-template-columns: 1fr; }
  .timeline-side {
    position: static; max-height: none;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px;
    padding: 14px;
  }
  .timeline-side h3 { grid-column: 1 / -1; margin-bottom: 6px; }
  .tl-year-group { margin-bottom: 4px; }
  .tl-months { grid-template-columns: repeat(6, 1fr); }
  .me-wrap, .admin-wrap { grid-template-columns: 1fr; }
  .lb-stage { flex-direction: column; max-width: 94vw; max-height: 92vh; }
  .lb-stage img, .lb-stage video { max-width: 94vw; max-height: 50vh; }
  .lb-side { width: 94vw; max-height: 40vh; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .topnav {
    position: fixed; top: 72px; left: 0; right: 0;
    background: #fdfaf4; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch;
    padding: 10px 16px; display: none; z-index: 89; box-shadow: var(--shadow-md);
  }
  .topnav.open { display: flex; }
  .view { padding: 14px 12px 50px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .lb-close { top: 10px; right: 10px; }
}
@media (max-width: 480px) {
  .photo-grid { gap: 8px; }
  .pc-title { font-size: 12px; }
}
