/* === 字体引入 === */
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/style.css');

/* === CSS Variables === */
:root {
  --color-bg: #FAF9F7;
  --color-surface: #FFFFFF;
  --color-surface-hover: #FDF8F4;
  --color-code-bg: #F0EBE3;
  --color-accent: #DA7756;
  --color-accent-hover: #C4684A;
  --color-text: #2D2B28;
  --color-text-secondary: #6B6560;
  --color-text-tertiary: #9B9490;
  --color-border: #E5E0D8;
  --color-border-light: #EEEAE4;
  --grid-color: rgba(218, 119, 86, 0.07);
  --grid-color-strong: rgba(218, 119, 86, 0.12);
  --grid-size: 24px;
  --content-width: 800px;
  --font-sans: 'LXGW WenKai GB', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'LXGW WenKai GB', 'Georgia', 'Times New Roman', serif;
  --font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  --radius: 8px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
  --color-header-bg: rgba(250, 249, 247, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1F1B17;
    --color-surface: #2B2520;
    --color-surface-hover: #332C26;
    --color-code-bg: #15110E;
    --color-accent: #E89576;
    --color-accent-hover: #F0A88B;
    --color-text: #EDE4D9;
    --color-text-secondary: #A8A099;
    --color-text-tertiary: #756E66;
    --color-border: #3A332C;
    --color-border-light: #2F2924;
    --grid-color: rgba(218, 119, 86, 0.045);
    --grid-color-strong: rgba(218, 119, 86, 0.08);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.25);
    --color-header-bg: rgba(31, 27, 23, 0.85);
  }
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* === Base === */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    linear-gradient(var(--grid-color-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color-strong) 1px, transparent 1px);
  background-size:
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    calc(var(--grid-size) * 4) calc(var(--grid-size) * 4),
    calc(var(--grid-size) * 4) calc(var(--grid-size) * 4);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent-hover); }
img { max-width: 100%; height: auto; }

/* === Container === */
.container { min-height: 100vh; display: flex; flex-direction: column; }

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0 1.5rem;
}

.site-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title a { color: var(--color-text); }
.site-title a:hover { color: var(--color-accent); }

.site-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.site-description { display: none; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 0;
  font-size: 0.9rem;
}

.site-nav a {
  font-weight: 500;
  color: var(--color-text-secondary);
  margin: 0;
  padding: 0;
}

.site-nav a:hover { color: var(--color-accent); }

/* === Search in nav === */
.header-search { margin-top: 0; margin-left: 1rem; }

.header-search input {
  width: 140px;
  padding: 5px 12px;
  border: 1px solid var(--color-border-light);
  border-radius: 15px;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
  text-align: center;
  transition: border-color 0.2s, width 0.2s;
}

.header-search input:focus {
  border-color: var(--color-accent);
  width: 180px;
}

.header-search input::placeholder { color: var(--color-text-tertiary); }

/* === Main === */
.site-main {
  flex: 1;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  min-height: auto;
}

/* === Profile Card (Homepage) === */
.profile-card {
  text-align: center;
  padding: 1.5rem 1.5rem 1rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.profile-bio {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* === Post List (Homepage) === */
.post-list { display: flex; flex-direction: column; gap: 1.25rem; }

/* === Post Card === */
.post {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-light);
  transition: box-shadow 0.25s, transform 0.25s;
}

.post:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.post h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.post h2 a { color: var(--color-text); }
.post h2 a:hover { color: var(--color-accent); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  margin-bottom: 0.75rem;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

/* === Page Nav === */
.page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

.page-nav a,
.page-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 4px;
  color: var(--color-text-secondary);
  transition: color 0.2s, background 0.2s;
}

.page-nav a:hover { color: var(--color-accent); background: var(--color-surface); }
.page-nav .current { color: #fff; background: var(--color-accent); font-weight: 600; }

/* === Article Detail === */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  margin-bottom: 0.75rem;
}

.breadcrumb a { color: var(--color-text-secondary); }
.breadcrumb a:hover { color: var(--color-accent); }

.post-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.post .post-meta {
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* === Post Content Typography === */
.post-content {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 1.85;
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  font-family: var(--font-serif);
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.post-content h1 { font-size: 1.75rem; }
.post-content h2 { font-size: 1.45rem; }
.post-content h3 { font-size: 1.2rem; }
.post-content h4 { font-size: 1.05rem; }

.post-content p { margin-bottom: 1.25em; }

.post-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(218, 119, 86, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.post-content a:hover { text-decoration-color: var(--color-accent); }

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5em 1.25em;
  margin: 1.5em 0;
  color: var(--color-text-secondary);
  background: rgba(218, 119, 86, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content ul, .post-content ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.post-content li { margin-bottom: 0.35em; }

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--color-text);
}

.post-content pre {
  background: var(--color-code-bg);
  border-radius: var(--radius);
  padding: 1.25em;
  margin: 1.5em 0;
  overflow-x: auto;
  line-height: 1.55;
  border: 1px solid var(--color-border-light);
}

.post-content pre code { background: none; padding: 0; font-size: 0.88rem; }

/* === Figure + Figcaption === */
.post-content figure {
  margin: 1.5em 0;
  text-align: center;
}

.post-content figure img {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 4px;
  background: var(--color-surface);
}

.post-content figcaption {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  margin-top: 0.5em;
}

/* === Tables === */
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.95rem; }
.post-content th, .post-content td { padding: 0.6em 1em; border: 1px solid var(--color-border); text-align: left; }
.post-content th { background: var(--color-code-bg); font-weight: 600; }

.post-content hr { border: none; height: 1px; background: var(--color-border); margin: 2em 0; }

/* === Tags === */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

.post-tags a {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  background: var(--color-surface);
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--color-border-light);
  transition: color 0.2s, border-color 0.2s;
}

.post-tags a:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* === Prev/Next Nav === */
.post-near {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

.post-near a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-near a:hover { color: var(--color-accent); }

/* === Archive === */
.archive-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--color-text);
}

/* Category filter bar */
.archive-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.archive-cat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.9rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.archive-cat-item:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.archive-cat-item.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.archive-cat-count {
  font-size: 0.78rem;
  opacity: 0.8;
}

/* Year heading */
.archive-year-heading {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.archive-year-group {
  margin-bottom: 0.5rem;
}

.archive-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
}

.archive-date {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.archive-item a {
  font-size: 1rem;
  color: var(--color-text);
}

.archive-item a:hover { color: var(--color-accent); }

/* === Search Results === */
.search-box { margin-bottom: 1.5rem; display: flex; gap: 0.5rem; }

.search-box input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
}

.search-box input:focus { border-color: var(--color-accent); }

.search-box button {
  padding: 8px 18px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.search-box button:hover { background: var(--color-accent-hover); }

.search-result {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-light);
}

.search-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.search-title a { color: var(--color-text); }
.search-title a:hover { color: var(--color-accent); }
.search-excerpt { font-size: 0.9rem; color: var(--color-text-secondary); }

/* === Page (About) === */
.about-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.about-avatar {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}

.about-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.25rem; }
.about-bio { font-size: 0.9rem; color: var(--color-text-secondary); }
.about-contact { font-size: 0.85rem; color: var(--color-text-tertiary); margin-top: 0.25rem; }

/* === Comments === */
#comments { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border-light); }
#comments h3 { font-size: 1.1rem; margin-bottom: 1rem; }

.comment-list { list-style: none; padding: 0; }
.comment-list > .comment-body { margin-bottom: 0.75rem; }
.comment-body {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.comment-children { margin-left: 1.5rem; margin-top: 0.75rem; padding-left: 1rem; border-left: 2px solid var(--color-border); }
.comment-children .comment-list { padding: 0; }
.comment-children .comment-body { margin-bottom: 0.5rem; }

.comment-author { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.comment-author .avatar { width: 28px; height: 28px; border-radius: 50%; }
.comment-meta { font-size: 0.8rem; color: var(--color-text-tertiary); margin-top: 0.25rem; }
.comment-meta a { color: var(--color-text-tertiary); }
.comment-content { margin-top: 0.5rem; font-size: 0.95rem; }
.comment-reply { margin-top: 0.5rem; font-size: 0.85rem; }
.comment-reply a { color: var(--color-text-secondary); }
.comment-reply a:hover { color: var(--color-accent); }

.respond {
  margin-top: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.respond h3 { margin-bottom: 1rem; }
.respond p { margin-bottom: 0.75rem; }
.respond label { display: block; font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 0.25rem; }

.respond input[type="text"],
.respond input[type="email"],
.respond input[type="url"],
.respond textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  background: var(--color-bg);
  color: var(--color-text);
}

.respond input:focus, .respond textarea:focus { border-color: var(--color-accent); }
.respond textarea { resize: vertical; min-height: 120px; }

.cancel-comment-reply { font-size: 0.85rem; margin-left: 0.75rem; display: inline-block; }
.cancel-comment-reply a { color: var(--color-text-tertiary); }
.cancel-comment-reply a:hover { color: var(--color-accent); }

.respond input[type="submit"] {
  padding: 8px 24px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.respond input[type="submit"]:hover { background: var(--color-accent-hover); }

/* === Password Gate === */
.password-gate {
  text-align: center;
  padding: 3rem 1rem;
}

.password-gate-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.password-gate h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.password-gate p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.password-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.password-form input[type="password"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
}

.password-form input[type="password"]:focus {
  border-color: var(--color-accent);
}

.password-form button {
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.password-form button:hover {
  background: var(--color-accent-hover);
}

.password-error {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #e74c3c;
}

.love-diary-header {
  margin-bottom: 0.5rem;
}
.love-diary-header h2 {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.love-diary-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-tertiary);
}
.love-diary-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  vertical-align: middle;
}

/* === Footer === */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  border-top: 1px solid var(--color-border-light);
}

.site-footer div { margin: 0.25rem 0; }

/* === Responsive === */
@media (max-width: 768px) {
  body { font-size: 15px; }

  .site-header {
    height: 52px;
    padding: 0 1rem;
    flex-wrap: wrap;
  }

  .site-nav { gap: 1rem; font-size: 0.85rem; }

  .header-search input { width: 100px; }
  .header-search input:focus { width: 130px; }

  .site-main { padding: 1.5rem 1rem; }

  .post { padding: 1.25rem; }
  .post h2 { font-size: 1.15rem; }
  .post-title { font-size: 1.5rem; }
  .post-content { font-size: 1rem; }

  .post-near { flex-direction: column; }
  .post-near a { max-width: 100%; }

  .about-header { flex-direction: column; text-align: center; }

  .profile-avatar { width: 72px; height: 72px; }
  .profile-name { font-size: 1.2rem; }
}

/* ============================================================
   相册 — 恋爱日记
   ============================================================ */

/* --- Layout --- */
.love-diary-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

/* --- Album Sidebar --- */
.album-sidebar {
  width: 300px;
  min-width: 300px;
  margin-left: calc(-50vw + 50% + 1.5rem);
  margin-right: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem;
  position: sticky;
  top: 52px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}

.album-header {
  margin-bottom: 0.75rem;
}

.album-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.album-count {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
}

.album-toolbar {
  display: flex;
  align-items: center;
}

/* --- Manage Button --- */
.album-manage-btn {
  font-size: 0.78rem;
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}

.album-manage-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* --- Manage Actions --- */
.album-manage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.album-selected-info {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin-right: 2px;
}

.album-delete-btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  background: #fff;
  color: #e74c3c;
  cursor: pointer;
  font-family: inherit;
}

.album-delete-btn:hover {
  background: #e74c3c;
  color: #fff;
}

.album-upload-btn-manage {
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  background: #fff;
  color: var(--color-accent);
  cursor: pointer;
  font-family: inherit;
}

.album-upload-btn-manage:hover {
  background: var(--color-accent);
  color: #fff;
}

.album-done-btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: inherit;
}

/* --- Album Grid --- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.album-photo {
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--color-code-bg);
}

.album-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.album-photo:hover img {
  transform: scale(1.05);
}

/* --- Album Checkbox (manage mode) --- */
.album-photo.manage img {
  opacity: 0.7;
}

.album-checkbox {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255,255,255,0.9);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  pointer-events: none;
}

.album-checkbox.checked {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

/* --- Upload Hint --- */
.album-upload-hint {
  margin-top: 8px;
}

.album-upload-label {
  display: block;
  text-align: center;
  padding: 8px;
  border: 2px dashed var(--color-border);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.album-upload-label:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* --- Diary Main (right side) --- */
.diary-main {
  flex: 1;
  min-width: 0;
}

.diary-main .post-list {
  gap: 1rem;
}

.diary-main .post {
  padding: 1.25rem 1.5rem;
}

.diary-main .post h2 {
  font-size: 1.15rem;
}

/* ============================================================
   灯箱
   ============================================================ */

.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(245,245,250,0.82);
  backdrop-filter: saturate(180%) blur(34px);
  -webkit-backdrop-filter: saturate(180%) blur(34px);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.show {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  color: #334155;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 8px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 0.8;
}

.lightbox-counter {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(51,65,85,0.6);
  font-size: 0.85rem;
  z-index: 10;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  color: #334155;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: rgba(0,0,0,0.12);
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 85vw;
  max-height: 65vh;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.lightbox-img-wrap.zoom-prep {
  transform: scale(0.35); opacity: 0;
}
.lightbox-overlay.show .lightbox-img-wrap.zoom-prep {
  transform: scale(1); opacity: 1;
}

.lightbox-img-wrap img {
  max-width: 85vw;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  overflow-x: auto;
  max-width: 90vw;
  padding: 0 8px;
}

.lightbox-thumbs img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}

.lightbox-thumbs img.active {
  border-color: #334155;
  opacity: 1;
}

/* ============================================================
   删除确认弹窗
   ============================================================ */

.confirm-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.confirm-box {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.confirm-box p {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.confirm-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-cancel {
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}

.confirm-cancel:hover {
  background: var(--color-border-light);
}

.confirm-ok {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius);
  background: #e74c3c;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}

.confirm-ok:hover {
  background: #c0392b;
}

/* ============================================================
   暗色模式 — 相册
   ============================================================ */

@media (prefers-color-scheme: dark) {
  .album-delete-btn {
    background: transparent;
  }

  .album-upload-btn-manage {
    background: transparent;
  }

  .album-checkbox {
    background: rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.3);
  }

  .album-checkbox.checked {
    background: #e74c3c;
    border-color: #e74c3c;
  }
}

/* ============================================================
   响应式 — 移动端
   ============================================================ */

@media (max-width: 768px) {
  .love-diary-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .album-sidebar {
    width: 100%;
    min-width: 0;
    margin-left: 0 !important;
    margin-right: 0;
    border-left: 1px solid var(--color-border-light);
    border-radius: var(--radius);
    position: static;
    padding: 0.75rem;
    max-height: none;
    overflow-y: visible;
  }

  .album-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }

  .album-header h3 {
    margin-bottom: 0;
    font-size: 0.9rem;
  }

  .album-toolbar {
    flex-shrink: 0;
  }

  .album-grid {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .album-photo {
    width: 90px;
    min-width: 90px;
    height: 90px;
    aspect-ratio: auto;
  }

  .album-photo img {
    pointer-events: auto;
  }

  .album-photo:hover img {
    transform: none;
  }

  .album-checkbox {
    width: 22px;
    height: 22px;
    top: 3px;
    left: 3px;
  }

  .album-upload-hint {
    margin-top: 6px;
  }

  .album-upload-label {
    padding: 6px;
    font-size: 0.78rem;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }

  .lightbox-img-wrap {
    max-width: 95vw;
    max-height: 55vh;
  }

  .lightbox-img-wrap img {
    max-width: 95vw;
    max-height: 55vh;
  }

  .lightbox-thumbs img {
    width: 36px;
    height: 36px;
  }

  .diary-main .post {
    padding: 1rem;
  }

  .diary-main .post h2 {
    font-size: 1.05rem;
  }
}

/* ============================================================
   恋爱日记 v2 — loveli 风格设计系统
   ============================================================ */

/* --- 突破主题容器宽度限制 --- */
body:has(.ld-bg) {
  background: #ffffff;
}
.site-main:has(.ld-bg) {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* --- 背景：点阵 + 渐隐 --- */
.ld-bg {
  background-color: #ffffff;
  background-image: radial-gradient(#f2f2f2 1px, transparent 1px);
  background-size: 10px 10px;
  position: relative;
  min-height: 100vh;
  /* CSS 令牌 */
  --ld-font-serif: 'Noto Serif SC', 'LXGW WenKai GB', serif;
  --ld-font-sans: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
  --ld-font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --ld-font-nums: 'Inter', 'SF Mono', monospace;
  --ld-rose: #e11d48;
  --ld-rose-soft: #fff1f2;
  --ld-glass-bg: rgba(255,255,255,0.65);
  --ld-glass-blur: saturate(180%) blur(20px);
  --ld-glass-border: 1px solid rgba(227,227,227,0.6);
  --ld-shadow-card: 0 24px 48px -12px rgba(135,146,161,0.08);
  --ld-shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
  --ld-ease-smooth: cubic-bezier(0.25,0.8,0.25,1);
  --ld-ease-spring: cubic-bezier(0.34,1.56,0.64,1);
  --ld-ease-fade-up: cubic-bezier(0.16,1,0.3,1);
}
.ld-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, #fff 80%);
  pointer-events: none;
  z-index: 0;
}

.ld-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Fusion Card — 融合倒计时卡片
   ============================================================ */
.fusion-card {
  position: relative;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  border: 1px solid rgb(227 227 227 / 60%);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.05), 0 10px 20px -10px rgba(0,0,0,0.02);
  padding: 2rem 1.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.fusion-card__glow {
  position: absolute;
  bottom: -120px; right: -80px;
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(255,182,193,0.35) 0%, rgba(230,230,250,0.2) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.fusion-card__mac-dots {
  position: absolute;
  top: 1.25rem; left: 1.25rem;
  display: flex; gap: 8px;
  z-index: 10;
}
.fusion-card__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.fusion-card__dot--r { background: #FF5F57; }
.fusion-card__dot--y { background: #FFBD2E; }
.fusion-card__dot--g { background: #28C840; }

.fusion-card__left {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
}
.fusion-card__poetic {
  font-family: var(--ld-font-serif);
  font-size: 1.4rem; font-weight: 700;
  color: #1a202c; line-height: 1.6; letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.fusion-card__since-capsule {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 5px 12px 5px 5px;
  border-radius: 50px; gap: 10px;
  transition: all 0.3s ease;
}
.fusion-card__since-capsule:hover {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.fusion-card__heart-circle {
  width: 28px; height: 28px;
  background: #E53E3E; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(229,62,62,0.3);
}
.fusion-card__heart-circle i {
  animation: ld-heartbeat 2s infinite ease-in-out;
}
.fusion-card__since-text {
  display: flex; flex-direction: column; text-align: left;
}
.fusion-card__since-label {
  font-family: var(--ld-font-ui);
  font-size: 0.55rem; color: #94a3b8;
  text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.fusion-card__since-date {
  font-family: var(--ld-font-nums);
  font-size: 0.85rem; font-weight: 600; color: #64748b;
}

.fusion-card__right {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
}
.fusion-card__days-num {
  font-family: var(--ld-font-nums); font-variant-numeric: tabular-nums;
  font-size: 5.5rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(135deg, #1A202C 0%, #4A5568 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.fusion-card__days-divider {
  width: 36px; height: 3px;
  background: #E53E3E; border-radius: 2px;
  margin: 6px auto 8px;
}
.fusion-card__days-label {
  font-family: var(--ld-font-ui);
  font-size: 1rem; font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.35em;
  margin-bottom: 1.5rem;
}
.fusion-card__timer { display: flex; gap: 1.5rem; justify-content: center; }
.fusion-card__timer-block { text-align: center; }
.fusion-card__timer-val {
  font-family: var(--ld-font-nums); font-variant-numeric: tabular-nums;
  font-size: 1.6rem; font-weight: 500; color: #1a1a1a; line-height: 1;
}
.fusion-card__timer-val.anim-digit {
  animation: ld-silky-reveal 0.5s cubic-bezier(0.2,0.8,0.2,1) forwards;
}
.fusion-card__timer-label {
  margin-top: 4px;
  font-family: var(--ld-font-ui);
  font-size: 0.6rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
}

@media (min-width: 640px) {
  .fusion-card {
    flex-direction: row; text-align: left;
    padding: 2.5rem 3rem; gap: 3rem;
  }
  .fusion-card__left { align-items: flex-start; }
  .fusion-card__right { align-items: flex-end; }
  .fusion-card__poetic { font-size: 2rem; }
  .fusion-card__days-num { font-size: 7rem; }
  .fusion-card__timer { gap: 2rem; }
  .fusion-card__timer-val { font-size: 1.8rem; }
}

/* ============================================================
   Section Header
   ============================================================ */
.ld-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  margin-top: 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: relative;
}
.ld-section-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 60px; height: 3px;
  border-radius: 2px;
}
.ld-section-header--rose::after { background: linear-gradient(90deg, #f43f5e, transparent); }
.ld-section-header--purple::after { background: linear-gradient(90deg, #a855f7, transparent); }
.ld-section-header--teal::after { background: linear-gradient(90deg, #14b8a6, transparent); }

.ld-section-header__left {
  display: flex; align-items: center; gap: 0.75rem;
}
.ld-section-header__right {
  display: flex; align-items: center; gap: 8px;
}
.ld-section-header__icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ld-section-header__icon--rose {
  background: linear-gradient(135deg, #f472b6, #db2777);
  box-shadow: 0 4px 14px rgba(225,29,72,0.3);
}
.ld-section-header__icon--purple {
  background: linear-gradient(135deg, #c084fc, #a855f7);
  box-shadow: 0 4px 14px rgba(168,85,247,0.3);
}
.ld-section-header__icon--teal {
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  box-shadow: 0 4px 14px rgba(20,184,166,0.3);
}

.ld-section-header__title {
  font-family: var(--ld-font-serif);
  font-size: 1.15rem; font-weight: 700;
}
.ld-section-header__sub {
  font-family: var(--ld-font-ui);
  font-size: 0.8rem; color: #94a3b8; font-weight: 500;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 15px;
  border-radius: 9999px;
  font-family: var(--ld-font-ui);
  font-size: 0.78rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.25s ease; outline: none;
  text-decoration: none;
}
.btn--ghost {
  background: rgba(0,0,0,0.04); color: #64748b;
}
.btn--ghost:hover {
  background: rgba(0,0,0,0.08); color: #1a1a1a;
}
.btn--primary {
  background: linear-gradient(135deg, #f472b6, #e11d48);
  color: #fff;
  box-shadow: 0 2px 10px rgba(225,29,72,0.25);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(225,29,72,0.35);
}
.btn--sm { padding: 5px 12px; font-size: 0.73rem; }

/* 管理按钮 — 柔和卡片风格，hover 呼应紫色主题 */
.btn--mgr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: #fafaf9;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  font-size: 0.78rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.4;
}
.btn--mgr:hover {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #e9e3f8;
  box-shadow: 0 2px 10px rgba(139,92,246,0.12);
}
.btn--mgr i {
  font-size: 1rem;
}

/* --- 相册管理按钮容器 --- */
.album-manage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.album-selected-info {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-right: 2px;
  font-family: var(--ld-font-ui);
}

/* ============================================================
   Option A: 毛玻璃时间轴
   ============================================================ */
.tl-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 0.5rem;
}
.tl-scroll::-webkit-scrollbar { width: 5px; }
.tl-scroll::-webkit-scrollbar-track { background: transparent; }
.tl-scroll::-webkit-scrollbar-thumb { background: #d8c4b0; border-radius: 3px; }

.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(180,160,150,0.15) 0%,
    rgba(180,150,140,0.45) 30%,
    rgba(170,130,120,0.45) 70%,
    rgba(180,160,150,0.15) 100%);
  border-radius: 1px;
}

.tl-ev {
  position: relative;
  margin-bottom: 10px;
  background: var(--ld-glass-bg);
  backdrop-filter: var(--ld-glass-blur);
  -webkit-backdrop-filter: var(--ld-glass-blur);
  border: var(--ld-glass-border);
  border-radius: 1rem;
  cursor: pointer;
  isolation: isolate;
  backface-visibility: hidden;
  box-shadow: var(--ld-shadow-card);
  transition: transform 0.3s var(--ld-ease-smooth),
              box-shadow 0.3s var(--ld-ease-smooth);
}
.tl-ev:hover {
  transform: translateX(3px);
  box-shadow: var(--ld-shadow-hover);
}
.tl-ev::before {
  content: '';
  position: absolute; left: -23px; top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #c09078;
  box-shadow: 0 0 0 4px rgba(190,140,110,0.12);
  transition: box-shadow 0.3s;
}
.tl-ev.open::before {
  box-shadow: 0 0 0 6px rgba(190,140,110,0.22);
}

.tl-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  user-select: none;
}
.tl-icon { font-size: 1.4rem; flex-shrink: 0; }
.tl-info { flex: 1; min-width: 0; }
.tl-name {
  font-family: var(--ld-font-serif);
  font-size: 0.9rem; font-weight: 600;
  color: #1a1a1a;
}
.tl-date-text {
  font-size: 0.72rem; color: #94a3b8; margin-top: 2px;
}
.tl-counter { text-align: right; flex-shrink: 0; }
.tl-counter .days {
  font-family: var(--ld-font-nums);
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #b87860, #986048);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tl-counter .unit {
  font-size: 0.68rem; color: #94a3b8;
}
.tl-arr {
  font-size: 0.7rem; color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.3s;
  margin-left: 4px;
}
.tl-ev.open .tl-arr { transform: rotate(180deg); }

.tl-body {
  display: none;
  padding: 0 18px 16px 52px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.tl-ev.open .tl-body { display: block; }
.tl-desc {
  font-size: 0.82rem; color: #64748b; line-height: 1.7;
  padding-top: 12px; white-space: pre-wrap;
}
.tl-edit-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px;
  font-size: 0.72rem; color: #b87860;
  cursor: pointer;
  padding: 4px 12px; border-radius: 9999px;
  background: rgba(180,120,100,0.08);
  font-family: var(--ld-font-ui); font-weight: 500;
  transition: background 0.2s; border: none;
}
.tl-edit-btn:hover { background: rgba(180,120,100,0.16); }

.tl-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px;
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 1rem;
  cursor: pointer;
  color: #94a3b8;
  font-family: var(--ld-font-ui);
  font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s;
  margin-top: 4px;
}
.tl-add:hover {
  border-color: rgba(0,0,0,0.2);
  color: #64748b;
  background: rgba(255,255,255,0.5);
}

/* ============================================================
   Album Grid v2
   ============================================================ */
.album-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
.album-photo-v2 {
  position: relative;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  backface-visibility: hidden;
  background: #f3f4f6;
  transition: transform 0.3s var(--ld-ease-smooth),
              box-shadow 0.3s var(--ld-ease-smooth);
}
.album-photo-v2:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--ld-shadow-hover);
  z-index: 2;
}
.album-photo-v2 img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.33,1,0.68,1);
}
.album-photo-v2:hover img { transform: scale(1.1); }
.album-photo-v2__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex; align-items: flex-end; padding: 0.75rem;
}
.album-photo-v2:hover .album-photo-v2__overlay { opacity: 1; }
.album-photo-v2__date {
  color: #fff;
  font-family: var(--ld-font-nums);
  font-size: 0.7rem; font-weight: 500;
}

/* manage mode */
.album-photo-v2.manage img { opacity: 0.7; }
.album-checkbox-v2 {
  position: absolute;
  top: 6px; left: 6px;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(0,0,0,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: transparent;
  pointer-events: none;
}
.album-checkbox-v2.checked {
  background: #e74c3c; border-color: #e74c3c; color: #fff;
}

.album-upload-hint-v2 { margin-top: 0.75rem; margin-bottom: 1.5rem; }
.album-upload-label-v2 {
  display: block; text-align: center;
  padding: 10px;
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 0.75rem;
  font-size: 0.82rem; font-family: var(--ld-font-ui);
  color: #94a3b8; cursor: pointer;
  transition: all 0.2s;
}
.album-upload-label-v2:hover {
  border-color: rgba(0,0,0,0.2); color: #64748b;
}

/* ============================================================
   Album Category Grid v2 — 分类九宫格总览
   ============================================================ */
.album-cat-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.album-cat-card {
  cursor: pointer;
  transition: transform 0.3s var(--ld-ease-smooth),
              box-shadow 0.3s var(--ld-ease-smooth);
}
.album-cat-card:hover {
  transform: translateY(-2px);
}

.album-cat-card__title {
  text-align: center;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--ld-font-sans);
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.album-cat-card__count {
  font-size: 0.75rem;
  font-weight: 400;
  color: #94a3b8;
}
.album-cat-card__del {
  font-size: 0.85rem;
  color: #ef4444;
  cursor: pointer;
  margin-left: 4px;
  transition: transform 0.15s;
}
.album-cat-card__del:hover {
  transform: scale(1.2);
}

.album-cat-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 6px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.album-cat-card--new .album-cat-card__grid {
  border: 2px dashed #e2e8f0;
  box-shadow: none;
  background: #fff;
}

.album-cat-card__cell {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}
.album-cat-card__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album-cat-card__cell--empty {
  background: #f8fafc;
}

/* +N 毛玻璃遮罩 */
.album-cat-plus {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.album-cat-plus span {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
  font-weight: 700;
  color: #475569;
  font-family: var(--ld-font-nums);
}

/* 分类管理弹窗 - 列表项 */
.cat-mgr-item:hover {
  background: #f1f5f9 !important;
}
.cat-mgr-item span:hover {
  background: rgba(0,0,0,0.04);
}

/* ============================================================
   Album Detail Masonry — 分类详情瀑布流
   ============================================================ */
.album-detail-masonry {
  columns: 3;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.album-detail-photo {
  break-inside: avoid;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  isolation: isolate;
  backface-visibility: hidden;
  background: #f3f4f6;
  transition: transform 0.3s var(--ld-ease-smooth),
              box-shadow 0.3s var(--ld-ease-smooth);
}
.album-detail-photo:hover {
  transform: translateY(-3px);
  box-shadow: var(--ld-shadow-hover);
}
.album-detail-photo img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.33,1,0.68,1);
}
.album-detail-photo:hover img {
  transform: scale(1.05);
}
.album-detail-photo__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.album-detail-photo:hover .album-detail-photo__overlay {
  opacity: 1;
}
.album-detail-photo__date {
  color: #fff;
  font-family: var(--ld-font-nums);
  font-size: 0.7rem;
  font-weight: 500;
}

/* 管理模式 — 详情页勾选框 */
.album-detail-photo.manage img {
  opacity: 0.7;
}
.album-detail-photo__check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  pointer-events: none;
}
.album-detail-photo__check.checked {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* 响应式 */
@media (max-width: 767px) {
  .album-cat-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .album-detail-masonry {
    columns: 2;
  }
}
@media (max-width: 480px) {
  .album-detail-masonry {
    columns: 1;
  }
}

/* ============================================================
   Diary Grid v2 — 毛玻璃日记卡片
   ============================================================ */
.diary-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.diary-card {
  background: var(--ld-glass-bg);
  backdrop-filter: var(--ld-glass-blur);
  -webkit-backdrop-filter: var(--ld-glass-blur);
  border: var(--ld-glass-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  cursor: pointer;
  isolation: isolate;
  backface-visibility: hidden;
  box-shadow: var(--ld-shadow-card);
  transition: transform 0.3s var(--ld-ease-smooth),
              box-shadow 0.3s var(--ld-ease-smooth),
              border-color 0.3s var(--ld-ease-smooth);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: inherit;
}
.diary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ld-shadow-hover);
  border-color: transparent;
}
.diary-card__date {
  font-family: var(--ld-font-nums);
  font-size: 0.75rem; color: #94a3b8; font-weight: 500;
  letter-spacing: 1px; margin-bottom: 0.5rem;
}
.diary-card__title {
  font-family: var(--ld-font-serif);
  font-size: 1.05rem; font-weight: 700;
  line-height: 1.4; margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.diary-card__excerpt {
  font-size: 0.85rem; color: #64748b; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.diary-card__arrow {
  position: absolute; right: 1.25rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem; color: #94a3b8;
  opacity: 0;
  transition: all 0.3s var(--ld-ease-smooth);
}
.diary-card:hover .diary-card__arrow {
  opacity: 1; right: 1rem;
}

/* ============================================================
   Modal — 纪念日编辑弹窗
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-box {
  background: #fff; border-radius: 16px;
  padding: 2rem; width: 90%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s var(--ld-ease-spring);
}
.modal-overlay.show .modal-box { transform: translateY(0) scale(1); }

.modal-box h3 {
  font-family: var(--ld-font-serif); font-size: 1.2rem;
  margin-bottom: 1.25rem; color: #1a1a1a;
}

.modal-field { margin-bottom: 1rem; }
.modal-field label {
  display: block; font-size: 0.8rem; font-weight: 600;
  color: #64748b; margin-bottom: 0.4rem;
  font-family: var(--ld-font-ui);
}
.modal-field input, .modal-field textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.1); border-radius: 8px;
  font-size: 0.9rem; font-family: var(--ld-font-sans);
  transition: border-color 0.2s; outline: none; background: #fafaf9;
  color: #1a1a1a;
}
.modal-field input:focus, .modal-field textarea:focus {
  border-color: var(--ld-rose);
  box-shadow: 0 0 0 3px rgba(225,29,72,0.08);
}
.modal-field textarea { resize: vertical; min-height: 80px; }

.emoji-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.3rem; }
.emoji-dot {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer; border: 2px solid transparent;
  background: #f5f5f4; transition: all 0.2s ease;
}
.emoji-dot:hover { background: #e8e5e0; transform: scale(1.1); }
.emoji-dot.sel {
  border-color: var(--ld-rose);
  background: var(--ld-rose-soft);
}

.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ============================================================
   Lightbox — 毛玻璃影院模式
   ============================================================ */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(245,245,250,0.82);
  backdrop-filter: saturate(180%) blur(34px);
  -webkit-backdrop-filter: saturate(180%) blur(34px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.lightbox-overlay.show { opacity: 1; visibility: visible; }

.lightbox-img-wrap { max-width: 85vw; max-height: 75vh; }
.lightbox-img-wrap img {
  max-width: 85vw; max-height: 75vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  color: #334155; font-size: 2rem; cursor: pointer;
  z-index: 9010; background: none; border: none;
  opacity: 0.5; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 0.8; }

.lightbox-counter {
  position: absolute; top: 1.5rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(51,65,85,0.6); font-size: 0.9rem;
  font-family: var(--ld-font-ui);
}

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #334155; font-size: 2rem; cursor: pointer;
  z-index: 9010; background: none; border: none;
  opacity: 0.4; transition: opacity 0.2s;
  padding: 1rem; user-select: none;
}
.lightbox-nav:hover { opacity: 0.75; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-thumbs {
  position: absolute; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%); display: flex;
  gap: 0.5rem; align-items: center;
}
.lightbox-thumbs img {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: 6px; cursor: pointer;
  opacity: 0.5; transition: opacity 0.2s;
  border: 2px solid transparent;
}
.lightbox-thumbs img.active, .lightbox-thumbs img:hover {
  opacity: 1; border-color: #334155;
}

/* ============================================================
   Confirm Dialog
   ============================================================ */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 9600;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
}
.confirm-box {
  background: #fff; border-radius: 12px;
  padding: 1.5rem; width: 90%; max-width: 360px;
  text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}
.confirm-box p { font-size: 0.95rem; margin-bottom: 1rem; color: #1a1a1a; }
.confirm-buttons { display: flex; gap: 0.5rem; justify-content: center; }
.confirm-cancel, .confirm-ok {
  padding: 8px 24px; border-radius: 8px; font-size: 0.9rem;
  cursor: pointer; border: none; font-family: var(--ld-font-ui);
}
.confirm-cancel { background: #f1f5f9; color: #475569; }
.confirm-ok { background: #ef4444; color: #fff; }

/* ============================================================
   Memorial Image Upload
   ============================================================ */
.mem-image-upload {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mem-image-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #fafaf9;
  color: #64748b;
  font-size: 0.82rem;
  font-family: var(--ld-font-ui);
  cursor: pointer;
  transition: all 0.2s;
}

.mem-image-upload-btn:hover {
  border-color: var(--ld-rose);
  color: var(--ld-rose);
}

.mem-image-preview {
  position: relative;
  display: inline-block;
  margin-top: 0.5rem;
}

.mem-image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
}

.mem-image-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  border: none;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}

.mem-image-remove:hover {
  transform: scale(1.15);
}

/* ============================================================
   Timeline Image (with skeleton shimmer)
   ============================================================ */
.tl-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-top: 12px;
  max-width: 320px;
  background: #e2e8f0;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tl-img-wrap:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.tl-img-wrap .tl-shimmer {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: tl-shimmer 1.8s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
.tl-img-wrap .tl-shimmer.done { opacity: 0; }

@keyframes tl-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tl-img-wrap img {
  display: block; width: 100%;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.tl-img-wrap img.loaded { opacity: 1; }

/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes ld-heartbeat {
  0%,100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}
@keyframes ld-silky-reveal {
  0% { opacity: 0; transform: translateY(8px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Responsive — 恋爱日记 v2
   ============================================================ */
@media (max-width: 767px) {
  .ld-container { padding: 1rem; }
  .fusion-card { padding: 2rem 1.25rem; }
  .fusion-card__days-num { font-size: 18vw; }
  .fusion-card__timer { gap: 1.2rem; }
  .fusion-card__timer-val { font-size: 1.4rem; }
  .fusion-card__poetic { font-size: 1.2rem; }

  .album-grid-v2 {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .diary-grid-v2 { grid-template-columns: 1fr; }

  .tl-scroll { max-height: 420px; }
}

@media (min-width: 1024px) {
  .album-grid-v2 { grid-template-columns: repeat(4, 1fr); }
}
