/* ============================================================
   芸溪成长纪念册 · 深空梦境主题
   深夜紫底 + 极光 + 星空 + 玻璃拟态 + 玫瑰金点缀
   ============================================================ */
:root {
  --bg0: #0d0a1a;
  --bg1: #171028;
  --ink: #f3ecdf;
  --ink-dim: rgba(243, 236, 223, 0.62);
  --ink-faint: rgba(243, 236, 223, 0.38);
  --gold: #e8c07d;
  --gold-deep: #caa05e;
  --rose: #e8a0b4;
  --violet: #b9a7ee;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --grad-text: linear-gradient(120deg, #f6dfb8 0%, #e8c07d 30%, #f0b8cc 65%, #c9b8f2 100%);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(185, 167, 238, 0.10), transparent 60%),
    radial-gradient(1000px 700px at -10% 30%, rgba(232, 160, 180, 0.09), transparent 55%),
    radial-gradient(900px 900px at 50% 110%, rgba(232, 192, 125, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, #120c22);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
.hidden { display: none !important; }
img { display: block; }
a { color: var(--gold); }
::selection { background: rgba(232, 192, 125, 0.35); }

/* ---------- 背景特效层 ---------- */
.aurora { position: fixed; inset: -10vmax; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
  mix-blend-mode: screen; will-change: transform;
}
.aurora .b1 {
  width: 55vmax; height: 45vmax; left: -8vmax; top: -5vmax;
  background: radial-gradient(circle, rgba(158, 120, 220, 0.35), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora .b2 {
  width: 50vmax; height: 42vmax; right: -10vmax; top: 20vmax;
  background: radial-gradient(circle, rgba(226, 140, 175, 0.28), transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.aurora .b3 {
  width: 60vmax; height: 50vmax; left: 20vmax; bottom: -18vmax;
  background: radial-gradient(circle, rgba(232, 192, 125, 0.20), transparent 65%);
  animation: drift3 38s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(9vmax, 7vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vmax, -6vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-6vmax, -9vmax) scale(1.1); } }

#fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 130;
  background: linear-gradient(90deg, var(--gold), var(--rose), var(--violet));
  box-shadow: 0 0 12px rgba(232, 192, 125, 0.6);
  transition: width 0.1s linear;
}

#app, .gate, .intro, #admin-login, #admin-app { position: relative; z-index: 2; }

/* ---------- 密码门 ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate-card {
  width: 100%; max-width: 380px; text-align: center;
  padding: 46px 36px 38px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  animation: cardIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(0.96); } }
.gate-gift {
  width: 74px; height: 74px; margin: 0 auto 16px; color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(232,192,125,0.22), rgba(232,192,125,0.05));
  border-radius: 50%; border: 1px solid rgba(232, 192, 125, 0.35);
  animation: giftPulse 3s ease-in-out infinite;
}
.gate-gift svg { width: 36px; height: 36px; filter: drop-shadow(0 0 8px rgba(232,192,125,0.5)); }
@keyframes giftPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 192, 125, 0.25); }
  50% { box-shadow: 0 0 0 14px rgba(232, 192, 125, 0); }
}
.gate-card h1 {
  font-family: var(--serif); font-size: 24px; letter-spacing: 3px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-card p { color: var(--ink-dim); font-size: 14px; margin: 10px 0 24px; }
#gate-form input {
  width: 100%; padding: 13px 16px; text-align: center; letter-spacing: 3px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border);
  border-radius: 14px; color: var(--ink); font-size: 15px; outline: none;
  transition: border 0.25s, box-shadow 0.25s;
}
#gate-form input::placeholder { letter-spacing: 1px; color: var(--ink-faint); }
#gate-form input:focus {
  border-color: rgba(232, 192, 125, 0.65);
  box-shadow: 0 0 0 4px rgba(232, 192, 125, 0.12);
}
#gate-form button {
  width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 14px;
  font-size: 15px; letter-spacing: 6px; text-indent: 6px; cursor: pointer; color: #241505;
  background: linear-gradient(120deg, #f2d5a0, #e8c07d 45%, #eab7c8);
  box-shadow: 0 8px 26px rgba(232, 192, 125, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
#gate-form button:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(232, 192, 125, 0.5); }
#gate-form button:active { transform: translateY(0); }
.gate-err { color: #f0a3a3; font-size: 13px; margin-top: 12px; min-height: 1em; }

/* ---------- 开场动画 ---------- */
.intro {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1000px 700px at 50% 40%, #241640, #0d0a1a 70%);
  animation: introFade 2.6s ease forwards; pointer-events: none;
}
@keyframes introFade {
  0% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; visibility: hidden; }
}
.intro-inner { text-align: center; animation: cardIn 1s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.intro-title {
  font-family: var(--serif); font-size: clamp(30px, 7vw, 54px); letter-spacing: 8px; text-indent: 8px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(232, 192, 125, 0.35));
}
.intro-title span { display: inline-block; opacity: 0; animation: charIn 0.7s ease forwards; }
@keyframes charIn {
  from { opacity: 0; transform: translateY(22px) scale(0.8); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.intro-flourish {
  color: var(--gold); font-size: 20px; opacity: 0;
  animation: flourishIn 1s ease 1.1s forwards;
}
@keyframes flourishIn { to { opacity: 0.9; transform: scale(1.15); } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 90;
  background: rgba(13, 10, 26, 0.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 11px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand {
  font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 2px;
  cursor: pointer; white-space: nowrap;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tools { display: flex; align-items: center; gap: 10px; }
.search {
  border: 1px solid var(--glass-border); border-radius: 999px; color: var(--ink);
  background: rgba(0, 0, 0, 0.28); padding: 8px 16px; font-size: 13px; width: 200px;
  outline: none; transition: border 0.25s, box-shadow 0.25s;
}
.search::placeholder { color: var(--ink-faint); }
.search:focus { border-color: rgba(232, 192, 125, 0.6); box-shadow: 0 0 0 4px rgba(232, 192, 125, 0.1); }
.ghost-btn {
  border: 1px solid var(--glass-border); background: var(--glass); color: var(--ink-dim);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.ghost-btn:hover { border-color: rgba(232, 192, 125, 0.6); color: var(--gold); }
.ghost-btn.danger { color: #f0a3a3; border-color: rgba(230, 110, 110, 0.45); background: rgba(230, 110, 110, 0.12); }
.ghost-btn.danger:hover { color: #ffc0c0; border-color: rgba(230, 110, 110, 0.75); }
.ghost-btn:disabled { opacity: 0.45; cursor: default; }

.year-chips {
  max-width: 1200px; margin: 0 auto; padding: 0 22px 10px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.year-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 5px 16px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: var(--glass); color: var(--ink-dim); border: 1px solid transparent;
  transition: all 0.2s;
}
.chip:hover { color: var(--gold); border-color: rgba(232, 192, 125, 0.4); }
.chip.active {
  background: linear-gradient(120deg, rgba(232,192,125,0.25), rgba(232,160,180,0.25));
  color: var(--ink); border-color: rgba(232, 192, 125, 0.5);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative; text-align: center; padding: 76px 22px 56px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
}
.hero-frame { position: relative; z-index: 2; animation: cardIn 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.15s backwards; }
.hero-birthday { display: flex; justify-content: center; margin-bottom: 20px; }
.hero-birthday span {
  padding: 7px 22px; border-radius: 999px; font-size: 14px; color: var(--ink);
  background: linear-gradient(120deg, rgba(232,192,125,0.2), rgba(232,160,180,0.2));
  border: 1px solid rgba(232, 192, 125, 0.45);
  box-shadow: 0 0 24px rgba(232, 192, 125, 0.18);
  animation: birthdayGlow 2.6s ease-in-out infinite;
}
@keyframes birthdayGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(232, 192, 125, 0.15); }
  50% { box-shadow: 0 0 34px rgba(232, 192, 125, 0.4); }
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(32px, 6.5vw, 52px); letter-spacing: 6px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 26px rgba(232, 192, 125, 0.28));
}
.hero h1 span { display: inline-block; opacity: 0; animation: charIn 0.8s ease forwards; }
.hero-flourish {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 14px;
  color: var(--gold); font-size: 14px;
}
.hero-flourish i {
  display: block; width: min(120px, 22vw); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 192, 125, 0.7));
}
.hero-flourish i:last-child { transform: scaleX(-1); }
.hero-sub { color: var(--ink-dim); font-size: 15px; letter-spacing: 1px; }
.hero-stats { margin-top: 22px; font-size: 14px; color: var(--ink-faint); letter-spacing: 1px; }
.hero-stats b {
  font-family: var(--serif); font-weight: 600; color: var(--gold); font-size: 20px;
  padding: 0 3px; text-shadow: 0 0 18px rgba(232, 192, 125, 0.45);
}

/* 封面照片：拱门相框 + 缓缓漂浮 */
.hero-cover {
  position: relative; z-index: 1; margin-top: 30px;
  width: clamp(150px, 20vw, 196px); aspect-ratio: 4 / 5.1;
  border-radius: 999px 999px 22px 22px; overflow: hidden; cursor: zoom-in;
  border: 1.5px solid rgba(232, 192, 125, 0.55);
  box-shadow:
    0 0 0 6px rgba(232, 192, 125, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 44px rgba(232, 192, 125, 0.16);
  animation: coverFloat 7s ease-in-out infinite, coverIn 1.3s cubic-bezier(0.2, 0.9, 0.3, 1.15) 0.5s backwards;
  transition: box-shadow 0.3s;
}
.hero-cover:hover {
  box-shadow:
    0 0 0 6px rgba(232, 192, 125, 0.14),
    0 28px 70px rgba(0, 0, 0, 0.6),
    0 0 70px rgba(232, 192, 125, 0.3);
}
@keyframes coverFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes coverIn { from { opacity: 0; transform: translateY(40px) scale(0.9); } }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 时间轴 ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 6px 22px 60px; }
.year-section { margin-bottom: 60px; }
.year-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px;
}
.year-head h2 {
  font-family: var(--serif); font-size: 30px; letter-spacing: 2px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.year-head::after {
  content: ""; flex: 1; height: 1px; margin-left: 6px;
  background: linear-gradient(90deg, rgba(232,192,125,0.5), rgba(255,255,255,0.04));
}
.year-age { color: var(--rose); font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.year-count { color: var(--ink-faint); font-size: 13px; }

.masonry { columns: 4 240px; column-gap: 16px; }

.ph-card {
  position: relative; break-inside: avoid; margin-bottom: 16px;
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(26px) scale(0.97);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
  will-change: transform;
}
.ph-card.shown { opacity: 1; transform: none; }
.ph-card img { width: 100%; height: auto; background: #1d1633; min-height: 60px; }
.ph-card .ph-gif {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; line-height: 1;
  color: #241505; padding: 4px 7px; border-radius: 6px;
  background: linear-gradient(120deg, #f2d5a0, #e8c07d);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

/* 底部信息浮层 */
.ph-overlay {
  position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 5, 18, 0.82));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s;
}
.ph-date {
  font-size: 11px; letter-spacing: 1px; color: var(--ink-dim);
  background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(6px);
  padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.1);
}
.ph-cap { font-size: 13px; color: var(--ink); text-shadow: 0 1px 6px rgba(0,0,0,0.8); }

/* 悬停：金边光晕 + 上浮（桌面倾斜由 JS 控制） */
@media (hover: hover) {
  .ph-card:hover .ph-overlay { opacity: 1; transform: none; }
  .ph-card:hover {
    border-color: rgba(232, 192, 125, 0.55);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(232, 192, 125, 0.18);
  }
}
@media (hover: none) {
  .ph-overlay { opacity: 1; transform: none; }
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 70px 22px 110px; }
.empty h2 { font-family: var(--serif); margin: 20px 0 8px; letter-spacing: 2px; }
.empty p { color: var(--ink-dim); font-size: 14px; margin-bottom: 26px; }
.btn-primary {
  display: inline-block; color: #241505; text-decoration: none;
  padding: 13px 34px; border-radius: 999px; font-size: 15px; letter-spacing: 2px;
  background: linear-gradient(120deg, #f2d5a0, #e8c07d 45%, #eab7c8);
  box-shadow: 0 10px 30px rgba(232, 192, 125, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(232, 192, 125, 0.5); }

/* ---------- 页脚 ---------- */
.footer {
  text-align: center; padding: 34px 22px 46px; color: var(--ink-faint); font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-links { margin-top: 8px; display: flex; gap: 16px; justify-content: center; }
.footer-links a { color: var(--ink-faint); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(7, 5, 15, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; flex-direction: column; animation: lbIn 0.3s ease;
}
@keyframes lbIn { from { opacity: 0; } }
.lb-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 600px at 50% 45%, rgba(232, 192, 125, 0.09), transparent 60%);
}
.lb-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 24px 64px;
}
#lb-img {
  max-width: 100%; max-height: 100%; border-radius: 10px; user-select: none;
  -webkit-user-drag: none; cursor: zoom-in;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: imgIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  transition: transform 0.25s ease; transform-origin: center;
}
@keyframes imgIn { from { opacity: 0; transform: scale(0.92); } }
#lb-img.zoomed { cursor: zoom-out; }
.lb-close {
  position: absolute; top: 16px; right: 20px; z-index: 5;
  width: 44px; height: 44px; font-size: 26px; line-height: 1; cursor: pointer;
  color: var(--ink); background: var(--glass-strong); border: 1px solid var(--glass-border);
  border-radius: 50%; backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.lb-close:hover { color: var(--gold); border-color: rgba(232,192,125,0.6); transform: rotate(90deg); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 48px; height: 48px; font-size: 30px; cursor: pointer;
  color: var(--ink); background: var(--glass-strong); border: 1px solid var(--glass-border);
  border-radius: 50%; backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.lb-nav:hover { color: var(--gold); border-color: rgba(232,192,125,0.6); box-shadow: 0 0 24px rgba(232,192,125,0.25); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-bar { padding: 14px 22px 20px; text-align: center; }
.lb-caption {
  font-size: 15px; letter-spacing: 1px; max-width: 720px; margin: 0 auto 4px;
  color: var(--ink); animation: capUp 0.4s ease;
}
@keyframes capUp { from { opacity: 0; transform: translateY(10px); } }
.lb-count { font-size: 12px; letter-spacing: 2px; color: var(--ink-faint); }

/* ---------- 管理后台 ---------- */
.admin-top {
  position: sticky; top: 0; z-index: 90;
  background: rgba(13, 10, 26, 0.6); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.admin-top-inner {
  max-width: 980px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 14px;
}
.admin-brand {
  font-family: var(--serif); font-weight: 700; letter-spacing: 1px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tabs { display: flex; gap: 6px; margin-left: 8px; }
.tab {
  border: 1px solid transparent; background: transparent; padding: 8px 15px; font-size: 14px;
  color: var(--ink-dim); cursor: pointer; border-radius: 12px;
}
.tab.active {
  background: var(--glass-strong); color: var(--gold);
  border-color: rgba(232, 192, 125, 0.35);
}
.admin-actions { margin-left: auto; display: flex; align-items: center; }
.admin-actions a { font-size: 13px; margin-right: 12px; }

.admin-wrap { max-width: 980px; margin: 0 auto; padding: 28px 22px 90px; }

.login-card {
  max-width: 370px; margin: 70px auto; padding: 40px 32px; text-align: center;
  border-radius: 24px; background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: cardIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.login-card h1 {
  font-family: var(--serif); font-size: 22px; letter-spacing: 3px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-card p { color: var(--ink-dim); font-size: 13px; margin: 8px 0 22px; }
.login-card input {
  width: 100%; padding: 12px 14px; font-size: 15px; outline: none; margin-bottom: 13px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border);
  border-radius: 13px; color: var(--ink); transition: border 0.25s, box-shadow 0.25s;
}
.login-card input:focus { border-color: rgba(232, 192, 125, 0.65); box-shadow: 0 0 0 4px rgba(232, 192, 125, 0.12); }
.login-card button {
  width: 100%; padding: 12px; border: 0; border-radius: 13px; cursor: pointer;
  color: #241505; font-size: 15px; letter-spacing: 4px; text-indent: 4px;
  background: linear-gradient(120deg, #f2d5a0, #e8c07d 45%, #eab7c8);
  box-shadow: 0 8px 26px rgba(232, 192, 125, 0.3);
}
.login-card button:hover { filter: brightness(1.05); }

.dropzone {
  border: 2px dashed rgba(232, 192, 125, 0.4); border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  padding: 52px 22px; text-align: center; cursor: pointer; transition: all 0.25s;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--gold); background: rgba(232, 192, 125, 0.07);
  box-shadow: 0 0 40px rgba(232, 192, 125, 0.12) inset;
}
.dropzone .dz-icon { font-size: 42px; filter: drop-shadow(0 0 12px rgba(232,192,125,0.4)); }
.dropzone h3 { margin: 12px 0 6px; font-size: 17px; letter-spacing: 1px; }
.dropzone p { color: var(--ink-dim); font-size: 13px; }
.upload-tip {
  margin-top: 15px; font-size: 13px; color: var(--ink-dim); line-height: 1.7;
  background: var(--glass); border: 1px solid rgba(255,255,255,0.07);
  padding: 12px 18px; border-radius: 14px;
}
.upload-tip b { color: var(--gold); font-weight: 600; }

.summary-bar {
  position: sticky; top: 64px; z-index: 80; margin: 20px 0 12px;
  background: rgba(20, 15, 38, 0.8); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px); border-radius: 15px; box-shadow: var(--shadow);
  padding: 13px 19px; font-size: 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.summary-bar b { color: var(--gold); }

.file-list { margin-top: 6px; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 15px;
  background: var(--glass); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 13px; margin-bottom: 8px; font-size: 13px;
}
.file-row .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fmeta { color: var(--ink-faint); font-size: 12px; flex: none; }
.file-row .fmeta.warn { color: #e8b04b; }
.summary-bar .warn-text { color: #e8b04b; font-size: 13px; }
.summary-bar .warn-text b { color: #f0c060; }
.fstatus {
  flex: none; font-size: 12px; padding: 3px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.07); color: var(--ink-dim);
}
.fstatus.ok { background: rgba(107, 194, 123, 0.15); color: #8fd69b; }
.fstatus.err { background: rgba(230, 110, 110, 0.15); color: #f0a3a3; }
.fstatus.busy { background: rgba(232, 192, 125, 0.15); color: var(--gold); }
.fstatus.dup { background: rgba(232, 192, 125, 0.18); color: #f0c060; }
.fstatus.dup-warn { background: rgba(232, 176, 75, 0.12); color: #e8b04b; }
.dupe-note {
  display: block; margin-top: 7px; font-size: 12px; color: #e8b04b;
}
.dupe-note:empty { display: none; }
.fprogress { width: 90px; height: 5px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; flex: none; }
.fprogress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--rose)); transition: width 0.15s; }
.retry-btn {
  border: 1px solid var(--glass-border); background: var(--glass); color: var(--ink-dim);
  border-radius: 9px; padding: 3px 11px; font-size: 12px; cursor: pointer; flex: none;
}
.retry-btn:hover { color: var(--gold); border-color: rgba(232,192,125,0.5); }

/* 管理照片 */
.mg-year { margin-bottom: 28px; }
.mg-year h3 {
  font-family: var(--serif); margin-bottom: 12px; font-size: 19px; letter-spacing: 1px;
  color: var(--ink); opacity: 0.9;
}
.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 11px; }
.mg-item {
  position: relative; border-radius: 13px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 8px 22px rgba(0,0,0,0.3);
  transition: all 0.2s;
}
.mg-item img { width: 100%; height: 112px; object-fit: cover; background: #1d1633; }
.mg-item:hover { border-color: rgba(232, 192, 125, 0.55); box-shadow: 0 12px 30px rgba(0,0,0,0.45), 0 0 22px rgba(232,192,125,0.15); }
.mg-item .mg-name {
  display: block; padding: 5px 8px 6px; font-size: 11px; line-height: 1.35;
  color: var(--ink-dim); background: rgba(0, 0, 0, 0.38);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 管理照片：搜索 + 年份筛选 */
.mg-tools {
  position: sticky; top: 58px; z-index: 70;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0 14px; margin-bottom: 6px;
  background: linear-gradient(rgba(13, 10, 26, 0.94), rgba(13, 10, 26, 0.74));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.mg-tools .search { flex: 1 1 220px; width: auto; max-width: 430px; }
.mg-year-sel {
  flex: none; padding: 8px 14px; font-size: 13px; color: var(--ink); cursor: pointer;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--glass-border);
  border-radius: 999px; outline: none; color-scheme: dark;
}
.mg-year-sel:focus { border-color: rgba(232, 192, 125, 0.6); }
.mg-flash { color: var(--gold); font-size: 13px; }
.mg-count { margin-left: auto; color: var(--ink-faint); font-size: 13px; }
.mg-empty { padding: 46px 0; text-align: center; color: var(--ink-dim); }
.mg-empty h2 { font-family: var(--serif); font-size: 20px; letter-spacing: 2px; margin-bottom: 8px; color: var(--ink); }

/* 管理照片：多选删除 */
.mg-item .mg-check {
  position: absolute; top: 7px; left: 7px; z-index: 3;
  width: 19px; height: 19px; margin: 0; cursor: pointer;
  accent-color: #e8c07d;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.65));
}
.mg-item.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(232, 192, 125, 0.55), 0 10px 26px rgba(0, 0, 0, 0.45);
}
.mg-item.selected .mg-name { color: var(--ink); }

.detail-panel {
  position: fixed; inset: 0; z-index: 160; background: rgba(7, 5, 15, 0.75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.detail-card {
  background: linear-gradient(160deg, #241b3f, #1a1230);
  border: 1px solid var(--glass-border); box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  border-radius: 22px; max-width: 460px; width: 100%;
  padding: 22px; max-height: 90vh; overflow: auto; animation: cardIn 0.35s cubic-bezier(0.2,0.9,0.3,1.15);
}
.detail-card img { width: 100%; border-radius: 13px; margin-bottom: 14px; }
.detail-card label { font-size: 12px; color: var(--ink-faint); display: block; margin: 12px 0 5px; letter-spacing: 1px; }
.detail-card input {
  width: 100%; padding: 10px 13px; font-size: 14px; outline: none;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--glass-border);
  border-radius: 11px; color: var(--ink); color-scheme: dark;
}
.detail-card input:focus { border-color: rgba(232, 192, 125, 0.65); }
.detail-btns { display: flex; gap: 10px; margin-top: 18px; }
.detail-btns button { flex: 1; padding: 11px; border-radius: 11px; border: 0; font-size: 14px; cursor: pointer; transition: filter 0.2s; }
.detail-btns button:hover { filter: brightness(1.12); }
.btn-save { background: linear-gradient(120deg, #f2d5a0, #e8c07d); color: #241505; }
.btn-del { background: rgba(230, 110, 110, 0.16); color: #f0a3a3; }
.btn-cancel { background: rgba(255,255,255,0.08); color: var(--ink-dim); flex: 0 0 84px !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .topbar-inner { padding: 9px 12px; gap: 8px; }
  .brand { font-size: 15px; letter-spacing: 1px; flex: none; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
  .tools { flex: 1; min-width: 0; gap: 7px; justify-content: flex-end; }
  .search { width: auto; flex: 1; min-width: 0; padding: 7px 12px; font-size: 12px; }
  .ghost-btn { padding: 7px 10px; font-size: 12px; flex: none; }
  .hero { padding: 52px 16px 40px; }
  .hero-cover { margin-top: 24px; }
  .hero-stats { font-size: 13px; line-height: 1.9; }
  .masonry { columns: 2 140px; column-gap: 11px; }
  .ph-card { margin-bottom: 13px; }
  .year-head h2 { font-size: 23px; }
  .lb-stage { padding: 16px 10px; }
  .lb-nav { display: none; }
  .lb-close { top: 12px; right: 14px; }
  main { padding: 6px 15px 40px; }
  .summary-bar { top: 56px; }
  .aurora i { filter: blur(60px); opacity: 0.4; }
  .admin-top-inner, .admin-wrap { padding-left: 15px; padding-right: 15px; }
  .admin-top-inner { gap: 8px; padding-top: 9px; padding-bottom: 9px; }
  .admin-brand { font-size: 13px; letter-spacing: 0; white-space: nowrap; }
  .tabs { margin-left: 0; gap: 4px; }
  .tab { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  .admin-actions a { font-size: 12px; margin-right: 6px; white-space: nowrap; }
  .admin-actions .ghost-btn { padding: 6px 9px; font-size: 12px; }
  .mg-tools { top: 54px; gap: 8px; padding: 8px 0 10px; }
  .mg-tools .search { flex: 1 1 100%; max-width: none; }
  .mg-year-sel { font-size: 12px; padding: 7px 12px; }
  .mg-count { margin-left: 0; font-size: 12px; }
  .mg-item img { height: 96px; }
}

/* 更窄的手机（iPhone SE 等）：顶栏再收一点 */
@media (max-width: 390px) {
  .brand { font-size: 14px; letter-spacing: 0; max-width: 40vw; }
  .ghost-btn { font-size: 11px; padding: 6px 8px; }
  .search { font-size: 11px; padding: 6px 10px; }
}

/* ---------- 动效减弱 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ph-card { opacity: 1; transform: none; }
}

/* ---------- 通用确认弹窗 / 轻提示（替代原生 confirm/alert） ---------- */
.ui-modal {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 4, 12, 0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ui-modal-card {
  width: 100%; max-width: 400px; padding: 22px 22px 18px;
  background: linear-gradient(160deg, #251c42, #191230);
  border: 1px solid var(--glass-border); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  animation: cardIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.ui-modal-card h3 {
  font-family: var(--serif); font-size: 18px; letter-spacing: 1px;
  color: var(--ink); margin-bottom: 8px;
}
.ui-modal-card p { color: var(--ink-dim); font-size: 13px; line-height: 1.75; white-space: pre-line; }
.ui-modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ui-modal-ok {
  border: 0; border-radius: 12px; padding: 9px 20px; font-size: 14px; cursor: pointer;
  color: #241505; background: linear-gradient(120deg, #f2d5a0, #e8c07d);
  box-shadow: 0 8px 22px rgba(232, 192, 125, 0.25);
}
.ui-modal-ok.danger { color: #fff; background: linear-gradient(120deg, #e06e6e, #c94f4f); box-shadow: 0 8px 22px rgba(200, 70, 70, 0.28); }
.ui-modal-ok:active { filter: brightness(0.95); }
.ui-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 210; max-width: 80vw; padding: 10px 18px;
  background: rgba(24, 17, 44, 0.94); border: 1px solid var(--glass-border);
  color: var(--ink); font-size: 13px; border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
