:root {
  /* 档案馆色系：温暖纸基 + 赭石强调 */
  --bg-page: #f7f5f2;
  --bg-card: #ffffff;
  --bg-muted: #fafaf9;
  --bg-hover: #f5f5f4;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text-primary: #292524;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --text-subtle: #a8a29e;
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-soft: #fff7ed;
  --accent-border: #fed7aa;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warning: #ca8a04;
  --warning-soft: #fefce8;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-card: 0 1px 2px rgba(41, 37, 36, 0.04), 0 1px 3px rgba(41, 37, 36, 0.03);
  --shadow-card-hover: 0 12px 32px rgba(41, 37, 36, 0.08);
  --font-display: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
}

/* 全局纸张纹理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(180, 83, 9, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(41, 37, 36, 0.02) 0%, transparent 40%);
}

/* 统一页面内容容器：默认 max-w-3xl，大屏扩展为 max-w-4xl */
.page-container {
  width: 100%;
  min-width: 320px;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 1024px) {
  .page-container {
    max-width: 896px;
  }
}

/* 统一页面头部：眉标 + 标题 + 副标题 + 操作 */
.page-header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-main {
  min-width: 0;
}

.page-header-eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-header-subtitle {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.page-header-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .page-header-title {
    font-size: 2.25rem;
  }
}

/* Site header */
.site-header {
  background: rgba(247, 245, 242, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.7);
}

.site-header-inner {
  position: relative;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.site-logo:hover {
  opacity: 0.75;
}

.site-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.site-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #78716c;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav-link:hover {
  color: #44403c;
  background-color: rgba(231, 229, 228, 0.5);
}

.site-nav-link.is-active {
  color: #292524;
  font-weight: 600;
}

.site-nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 0.125rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: var(--accent);
}

.site-header-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.site-header-btn:hover {
  background: var(--accent-hover);
}

.site-header-btn:active {
  transform: scale(0.97);
}

/* Mobile menu toggle */
.site-mobile-btn {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border-radius: 0.5rem;
  color: #57534e;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.site-mobile-btn:hover {
  background-color: rgba(231, 229, 228, 0.6);
}

.site-mobile-bar {
  display: block;
  width: 1.125rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.site-mobile-btn[aria-expanded="true"] .site-mobile-bar:nth-child(1) {
  transform: translateY(0.45rem) rotate(45deg);
}

.site-mobile-btn[aria-expanded="true"] .site-mobile-bar:nth-child(2) {
  opacity: 0;
}

.site-mobile-btn[aria-expanded="true"] .site-mobile-bar:nth-child(3) {
  transform: translateY(-0.45rem) rotate(-45deg);
}

/* Mobile menu panel */
.site-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(247, 245, 242, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.7);
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-mobile-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-mobile-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #57534e;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-mobile-link:hover {
  color: #292524;
  background-color: rgba(231, 229, 228, 0.5);
}

.site-mobile-link.is-active {
  color: #292524;
  font-weight: 600;
  background-color: rgba(231, 229, 228, 0.7);
}

/* QQ emoji */
.qq-emoji {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: text-bottom;
  font-size: 1.1em;
  line-height: 1;
  overflow: hidden;
}
img.qq-emoji {
  object-fit: contain;
}

/* QQ mention link */
.qq-mention {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.qq-mention:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Line clamp */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Timeline shell */
.timeline-shell {
  position: relative;
  padding-left: 3.5rem;
}

@media (min-width: 640px) {
  .timeline-shell {
    padding-left: 5rem;
  }
}

/* Timeline group */
.timeline-group {
  position: relative;
  margin-bottom: 3.5rem;
}

.timeline-group::before {
  content: '';
  position: absolute;
  top: 2rem;
  bottom: 1.25rem;
  left: -1rem;
  width: 1px;
  background: #d6d3cf;
  z-index: 1;
}

@media (min-width: 640px) {
  .timeline-group::before {
    top: 2.25rem;
    bottom: 1.5rem;
    left: -1.6875rem;
  }
}

.timeline-group-header {
  position: relative;
  z-index: 10;
  padding: 0.375rem 0 0.875rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(214, 211, 207, 0.75);
}

.timeline-group-header::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0.65rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background: var(--text-secondary);
  border: 2px solid #f7f5f2;
  box-shadow: 0 0 0 1px var(--text-secondary);
  z-index: 10;
}

@media (min-width: 640px) {
  .timeline-group-header::before {
    left: -2rem;
    top: 0.7rem;
    width: 0.75rem;
    height: 0.75rem;
  }
}

.timeline-group-header h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.timeline-group-header [data-count] {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 400;
}

.timeline-group.is-empty .timeline-children {
  padding: 1.25rem 0;
}

.timeline-empty-hint {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  text-align: center;
  padding: 1rem;
  background: rgba(250, 249, 247, 0.6);
  border-radius: 0.75rem;
  border: 1px dashed rgba(214, 211, 207, 0.8);
}

/* Timeline item */
.timeline-item {
  position: relative;
  padding-bottom: 1.25rem;
}

.timeline-node {
  position: absolute;
  left: -1.25rem;
  top: 1.625rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #d6d3cf;
  border: 2px solid #f7f5f2;
  box-shadow: 0 0 0 1px #d6d3cf;
  z-index: 10;
}

@media (min-width: 640px) {
  .timeline-node {
    left: -2rem;
    top: 1.75rem;
    width: 0.625rem;
    height: 0.625rem;
  }
}

.timeline-date {
  position: absolute;
  left: -3.5rem;
  top: 0.35rem;
  width: 2rem;
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.1;
  color: #78716c;
}

@media (min-width: 640px) {
  .timeline-date {
    left: -5rem;
    width: 2.75rem;
  }
}

.timeline-date .day {
  display: block;
  font-size: 1.625rem;
  font-weight: 600;
  color: #44403c;
}

.timeline-date .time {
  display: block;
  font-size: 0.65rem;
  color: #a8a29e;
  margin-top: 0.125rem;
}

/* Cards */
.timeline-card {
  width: 100%;
  max-width: 560px;
  margin-left: 0.75rem;
  margin-right: auto;
  background: var(--bg-card);
  border: 1px solid rgba(231, 229, 228, 0.85);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.timeline-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .timeline-card {
    padding: 1.25rem;
    margin-left: 1rem;
  }
}

/* Detail card */
.detail-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(231, 229, 228, 0.85);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
@media (min-width: 640px) {
  .detail-card {
    padding: 2rem;
  }
}
.detail-card .detail-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
}
.detail-card .detail-tag {
  color: var(--accent);
  font-weight: 600;
}
.detail-card .detail-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.35;
}
@media (min-width: 640px) {
  .detail-card .detail-title {
    font-size: 1.875rem;
  }
}

/* Status badges */
.status-badge {
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
  cursor: pointer;
}
.status-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #bbf7d0;
}
.status-warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #fde68a;
}
.status-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #fecaca;
}

/* Detail comments */
.detail-section-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.detail-comments {
  display: flex;
  flex-direction: column;
}

.detail-comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.detail-comment:first-child {
  padding-top: 0;
}
.detail-comment:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.detail-comment-main {
  display: flex;
  gap: 0.875rem;
}

.detail-comment-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-hover), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.detail-comment-body {
  flex: 1;
  min-width: 0;
}

.detail-replies {
  margin-top: 0.75rem;
  padding-left: 3.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-reply {
  display: flex;
  gap: 0.625rem;
}

.detail-reply-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-hover), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.detail-reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-reply-body {
  flex: 1;
  min-width: 0;
}

.comment-textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-muted);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  resize: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.comment-textarea:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(180, 83, 9, 0.15);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* Moment content */
.moment-content {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.moment-content p {
  margin-bottom: 0.75em;
}
.moment-content br {
  display: block;
  content: '';
  margin-top: 0.3em;
}

.moment-content.is-folded {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.moment-toggle-text {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
}
.moment-toggle-text:hover {
  color: var(--accent-hover);
}

/* 动态编辑器：单框所见即所得（实时渲染） */
.moment-editor .editor-content {
  width: 100%;
  min-height: 20rem;
  max-height: 60rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-primary);
  overflow-y: auto;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.moment-editor .editor-content:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}

/* placeholder 在空内容时显示，不可选中但允许点击穿透进入编辑 */
.moment-editor .editor-content .editor-placeholder {
  color: var(--text-subtle);
  font-style: italic;
  pointer-events: none;
  user-select: none;
  margin-bottom: 0;
}

/* prose 样式 */
.moment-editor .editor-content p,
.moment-editor .editor-content h1,
.moment-editor .editor-content h2,
.moment-editor .editor-content h3,
.moment-editor .editor-content ul,
.moment-editor .editor-content ol,
.moment-editor .editor-content blockquote,
.moment-editor .editor-content pre {
  margin-bottom: 0.5em;
}

.moment-editor .editor-content h1 { font-size: 1.5em; font-weight: 700; }
.moment-editor .editor-content h2 { font-size: 1.25em; font-weight: 700; }
.moment-editor .editor-content h3 { font-size: 1.1em; font-weight: 600; }
.moment-editor .editor-content ul,
.moment-editor .editor-content ol { padding-left: 1.5em; }
.moment-editor .editor-content ul { list-style: disc; }
.moment-editor .editor-content ol { list-style: decimal; }
.moment-editor .editor-content blockquote {
  border-left: 3px solid var(--border-strong);
  padding-left: 0.75em;
  color: var(--text-muted);
}
.moment-editor .editor-content code {
  background: var(--bg-hover);
  padding: 0.1em 0.3em;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.9em;
}
.moment-editor .editor-content pre {
  background: var(--bg-hover);
  padding: 0.75em;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.moment-editor .editor-content pre code {
  background: transparent;
  padding: 0;
}
.moment-editor .editor-content a {
  color: var(--accent);
  text-decoration: underline;
}

/* 编辑模式：等宽字体，浅灰底 */
.moment-editor .editor-content.is-editing {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-muted);
}

/* 表情选择器 */
.emoji-picker {
  margin-top: 0.5rem;
}

.emoji-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}

.emoji-toggle:hover {
  color: var(--accent-hover);
}

.emoji-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
  gap: 0.25rem;
  max-height: 12rem;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.emoji-panel.hidden {
  display: none;
}

.emoji-btn {
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background-color 0.15s ease;
}

.emoji-btn:hover {
  background: var(--bg-hover);
}

/* 编辑器图片预览与删除叉号 */
.new-image-previews,
#existing-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.new-image-preview-wrap,
.existing-image-wrap {
  position: relative;
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.existing-image-wrap.is-marked-delete {
  opacity: 0.5;
  box-shadow: 0 0 0 2px var(--danger);
}

.image-remove-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.image-remove-btn:hover {
  background: var(--danger);
}

/* Media grid */
.moment-grid {
  align-content: start;
  margin-top: 0.875rem;
}

.moment-thumb {
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
}

.moment-thumb img {
  transition: transform 0.35s ease;
}

.moment-thumb:hover img {
  transform: scale(1.04);
}

.moment-thumb .overflow-count {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 0.625rem;
}

.moment-thumb-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.375rem 0.5rem;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.6875rem;
  line-height: 1.35;
  text-align: left;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.moment-thumb.has-caption:hover .moment-thumb-caption {
  opacity: 1;
  transform: translateY(0);
}

.qq-album-cover-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.375rem 0.5rem;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.6875rem;
  line-height: 1.35;
  text-align: left;
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qq-album-cover-media.has-caption:hover .qq-album-cover-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Video */
.moment-video {
  margin-top: 0.875rem;
  width: 100%;
  max-width: 28rem;
  border-radius: 0.625rem;
  background: #1c1917;
  aspect-ratio: 16 / 9;
}

/* Footer actions */
.moment-footer {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--bg-hover);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.moment-footer time {
  color: var(--text-subtle);
}

.moment-footer .location {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.moment-actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.moment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-subtle);
  transition: color 0.15s ease;
  cursor: pointer;
  user-select: none;
}
.moment-action-btn:hover {
  color: var(--text-muted);
}
.moment-action-btn.is-active {
  color: var(--accent);
}

/* Likes & comments panels */
.moment-likes,
.moment-comments {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--bg-hover);
}

.likes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1rem;
  align-items: center;
}

.like-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.like-chip img {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(41, 37, 36, 0.06);
}

.like-chip .avatar-placeholder {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: var(--text-subtle);
  box-shadow: 0 0 0 1px rgba(41, 37, 36, 0.06);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* 时间线评论重新设计：清晰的头像、文字与图片 */
.timeline-item .comment-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item .comment-item:last-child {
  border-bottom: none;
}

.timeline-item .comment-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-hover), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.timeline-item .comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-item .comment-body {
  flex: 1;
  min-width: 0;
  padding-top: 0.125rem;
}

.timeline-item .comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  margin-bottom: 0.375rem;
}

.timeline-item .comment-meta .name {
  font-weight: 600;
  color: var(--text-primary);
}
.timeline-item .comment-meta .name.is-friend {
  color: var(--accent);
}
.timeline-item .comment-meta .name.is-author {
  color: var(--text-primary);
}

.timeline-item .comment-meta .badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.timeline-item .comment-meta .time {
  color: var(--text-subtle);
}

.timeline-item .comment-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  word-break: break-word;
}

.timeline-item .comment-images {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.625rem;
  flex-wrap: wrap;
}

.timeline-item .comment-images img {
  width: 6rem;
  height: 6rem;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  background: var(--bg-hover);
}

/* Bookmark card */
.bookmark-card .bookmark-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.18);
  border-color: var(--accent);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bookmark-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.bookmark-card p {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Lightbox */
#timeline-lightbox {
  transition: opacity 0.2s ease;
}

.lb-rotate-btn {
  position: absolute;
  top: 1rem;
  right: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lb-rotate-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.lb-rotate-btn-left {
  right: 7rem;
}

/* Floating nav buttons */
.float-nav-btn {
  transition: background 0.15s ease, transform 0.1s ease;
}
.float-nav-btn:hover {
  transform: scale(1.08);
}

/* Image grids in moments */
.moment-img {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Year nav */
.year-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.year-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}
.year-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.year-btn.is-active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* 年份筛选栏：滚动时吸附在头部下方（旧版，保留兼容） */
.year-nav-sticky {
  position: sticky;
  top: 3.5rem;
  z-index: 30;
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.7);
}

/* ===== 左侧年份侧边栏（网易云歌词风格） ===== */
.year-sidebar {
  position: fixed;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
}

@media (min-width: 1024px) {
  .year-sidebar {
    left: 2rem;
  }
}

/* 收起态触发按钮 */
.year-sidebar-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(41, 37, 36, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.15s ease;
}

.year-sidebar-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(41, 37, 36, 0.1);
  color: var(--accent);
}

.year-sidebar-trigger-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.year-sidebar-trigger-year {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

/* 展开后的面板：竖向年份列表 */
.year-sidebar-panel {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-0.5rem, -50%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 6rem;
  max-height: 70vh;
  padding: 1rem 0.625rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgba(41, 37, 36, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.year-sidebar-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

/* 年份列表容器：可滚动、隐藏滚动条 */
.year-sidebar-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 1.5rem 0;
  scroll-behavior: smooth;
}

.year-sidebar-list::-webkit-scrollbar {
  display: none;
}

/* 单个年份项：默认淡化，距离当前越远越淡 */
.year-sidebar-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.375rem 0.625rem;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.45;
  transform: scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, font-size 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.year-sidebar-item:hover {
  opacity: 0.85;
  color: var(--text-primary);
  transform: scale(0.95);
}

/* 相邻当前年份的项：次高亮 */
.year-sidebar-item.is-near {
  opacity: 0.7;
  transform: scale(0.95);
  color: var(--text-secondary);
}

/* 当前年份：高亮居中、字号最大 */
.year-sidebar-item.is-current {
  opacity: 1;
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 700;
  transform: scale(1.08);
}

.year-sidebar-item.is-current::before {
  content: '';
  position: absolute;
  left: -0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.1875rem;
  height: 1rem;
  border-radius: 9999px;
  background: var(--accent);
}

/* 年份之间的连线（伪元素竖线） */
.year-sidebar-list::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(214, 211, 207, 0.6) 15%, rgba(214, 211, 207, 0.6) 85%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.year-sidebar-item {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.92);
}

/* 关闭按钮 */
.year-sidebar-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.year-sidebar-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.year-sidebar-close svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* 移动端：侧边栏触发按钮更小，避免遮挡内容 */
@media (max-width: 639px) {
  .year-sidebar {
    left: 0.75rem;
  }
  .year-sidebar-trigger {
    width: 2.25rem;
    height: 2.25rem;
  }
  .year-sidebar-trigger-icon {
    width: 1rem;
    height: 1rem;
  }
  .year-sidebar-trigger-year {
    font-size: 0.5625rem;
  }
  .year-sidebar-panel {
    min-width: 5.5rem;
  }
}

/* Page title */
.page-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Stat cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(231, 229, 228, 0.8);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}
@media (min-width: 640px) {
  .stat-value {
    font-size: 1.875rem;
  }
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

/* Loading & end */
#loading,
#end {
  color: var(--text-subtle);
}

/* QQ Zone style moment header */
.moment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bg-hover);
}

.moment-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.moment-time {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.moment-source {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.moment-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--bg-hover);
  transition: all 0.15s ease;
  cursor: pointer;
}

.action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.action-btn.is-liked {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--accent-border);
}

.action-btn.is-liked svg {
  fill: currentColor;
}

.more-wrapper {
  position: relative;
}

.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  z-index: 50;
  overflow: hidden;
  padding: 0.25rem;
}

.more-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.more-menu-item:hover {
  background: var(--bg-hover);
}
.more-menu-item.is-delete:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Interaction box */
.interaction-box {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.moment-like-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e7e5e4;
  margin-bottom: 0.5rem;
}

.moment-like-bar:only-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.like-thumb {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
}

.like-thumb svg {
  fill: currentColor;
}

.like-list {
  min-width: 0;
}

.like-faces {
  display: flex;
  gap: 0.125rem;
  margin-bottom: 0.125rem;
}

.like-faces img,
.like-faces span {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  object-fit: cover;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.like-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Comments in timeline */
.moment-comments {
  margin-top: 0.5rem;
}

.moment-comments:first-child {
  margin-top: 0;
}

.comment-item {
  display: flex;
  gap: 0.625rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--border);
  flex-shrink: 0;
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.125rem;
  flex-wrap: wrap;
}

.comment-meta .name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.comment-meta .name.is-friend {
  color: var(--accent);
}
.comment-meta .name.is-author {
  color: var(--text-primary);
}

.comment-meta .badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.comment-meta .time {
  font-size: 0.6875rem;
  color: var(--text-subtle);
}

.comment-meta .reply-target {
  font-size: 0.6875rem;
  color: var(--text-subtle);
}

.comment-actions .time {
  font-size: 0.6875rem;
  color: var(--text-subtle);
}

.comment-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0;
  margin-top: -0.125rem;
  margin-bottom: -0.375rem;
}

.comment-action {
  font-size: 0.6875rem;
  color: #3b82f6;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
  margin: -0.25rem 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.comment-action:hover {
  color: #2563eb;
}

.comment-action.is-delete {
  visibility: hidden;
}

.comment-actions:hover .comment-action.is-delete {
  visibility: visible;
}

.comment-action.is-delete:hover {
  color: #dc2626;
}

.comment-more {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
.comment-more:hover {
  color: var(--accent-hover);
}

/* Comment form */
.moment-comment-form {
  margin-top: 0.5rem;
}

.comment-form-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--bg-muted);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.comment-input:focus {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.1);
}

.comment-submit {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.comment-submit:hover {
  background: var(--accent-hover);
}

.comment-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.reply-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  padding: 0 0.25rem;
}

.reply-cancel {
  font-size: 0.75rem;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
}
.reply-cancel:hover {
  color: var(--accent-hover);
}

/* Adjust timeline card padding */
.timeline-card {
  padding: 1rem;
}

.moment-footer {
  margin-top: 0.75rem;
}

/* QQ 空间风格说说卡片 */
.qq-moment-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  position: relative;
}

.timeline-card.qq-moment-card:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ── 置顶标识 ── */
.qq-moment-pin-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: #d97706;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  z-index: 10;
}
.qq-moment-pin-badge svg {
  width: 12px;
  height: 12px;
}

/* 置顶区容器 */
.timeline-pinned {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.timeline-pinned::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 1.25rem;
  left: -1rem;
  width: 1px;
  background: #d6d3cf;
  z-index: 1;
}

@media (min-width: 640px) {
  .timeline-pinned::before {
    bottom: 1.5rem;
    left: -1.6875rem;
  }
}

/* ── 隐藏动态斜纹遮罩 ── */
.qq-moment-card.is-hidden::before,
.detail-card.is-hidden::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(
    -45deg,
    #d1d5db,
    #d1d5db 4px,
    #f9fafb 4px,
    #f9fafb 8px
  );
  border-radius: 0.75rem 0.75rem 0 0;
}

/* ── 隐藏动态锁定图标 ── */
.qq-moment-lock-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 0.375rem;
  vertical-align: middle;
}
.qq-moment-lock-icon svg {
  width: 14px;
  height: 14px;
  color: #ea580c;
}

/* 头部 */
.qq-moment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.qq-moment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.qq-moment-avatar {
  flex-shrink: 0;
}

.qq-moment-author-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.qq-moment-author-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.25;
}

.qq-moment-time {
  font-size: 0.75rem;
  color: #999999;
  line-height: 1.25;
}

.qq-moment-more-wrapper {
  position: relative;
  flex-shrink: 0;
}

.qq-moment-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #999999;
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.qq-moment-more:hover {
  background: #f2f2f2;
  color: #666666;
}

.qq-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 7.5rem;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
  overflow: hidden;
  padding: 0.25rem;
}

.qq-more-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #333333;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.qq-more-menu-item:hover {
  background: #f5f5f5;
}

.qq-more-menu-item.is-delete:hover {
  color: #dc2626;
  background: #fef2f2;
}

/* 底部操作栏“更多”下拉 */
.qq-moment-more-wrapper--bottom {
  flex: 1;
  display: flex;
  position: relative;
}

.qq-action-btn--more {
  flex: 1;
  border-left: 1px solid #f0f0f0;
  border-right: none;
}

/* hover 桥接条：填充按钮与菜单之间的间隙，避免鼠标移入菜单时意外关闭 */
.qq-moment-more-wrapper--bottom::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.25rem;
}

.qq-moment-more-wrapper--bottom .qq-more-menu {
  top: calc(100% + 0.25rem);
  bottom: auto;
  right: 0;
}

/* 详情页内容右侧“更多” */
.detail-more-wrapper {
  position: absolute;
  top: -0.375rem;
  right: -0.375rem;
  z-index: 100;
  padding: 0.375rem;
}

.detail-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #999999;
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.detail-more-btn:hover {
  background: #f2f2f2;
  color: #666666;
}

/* hover 桥接条：鼠标从按钮移到菜单时不断开 */
.detail-more-wrapper::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.25rem;
}

.detail-more-wrapper .qq-more-menu {
  top: calc(100% + 0.25rem);
  bottom: auto;
  right: 0;
}

/* 正文 */
.qq-moment-body {
  margin-bottom: 0.75rem;
}

.qq-moment-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.qq-moment-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #333333;
  word-break: break-word;
  margin-bottom: 0.75rem;
}

.qq-moment-content.is-folded {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qq-content-toggle {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #4a90e2;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.qq-content-toggle:hover {
  text-decoration: underline;
}

.qq-moment-content .qq-emoji {
  font-size: 1.1em;
}

/* 图片网格 */
.qq-moment-card .moment-grid {
  margin-top: 0.75rem;
  gap: 0.375rem;
}

.qq-moment-card .moment-thumb {
  border-radius: 0.5rem;
}

/* 设备与浏览信息 */
.qq-moment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: #999999;
}

.qq-moment-date {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.qq-moment-updated {
  color: var(--text-subtle);
  margin-left: 0.25rem;
}

.qq-moment-device {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.qq-moment-views {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.qq-moment-lock-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
}

/* 操作栏 */
.qq-moment-actions {
  display: flex;
  align-items: center;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0.75rem;
}

.qq-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0;
  font-size: 0.8125rem;
  color: #666666;
  background: transparent;
  border: none;
  border-right: 1px solid #f0f0f0;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.qq-action-btn:last-child {
  border-right: none;
}

.qq-action-btn:hover {
  background: #fafafa;
  color: #333333;
}

.qq-action-btn.is-liked {
  color: #ff6b6b;
}

.qq-action-btn svg {
  stroke-width: 2;
}

/* 互动区 */
.qq-interaction-box {
  background: #f8f8f8;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

/* 点赞列表 */
.qq-like-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid #eeeeee;
  margin-bottom: 0.625rem;
}

.qq-like-bar:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.qq-like-faces {
  display: flex;
  gap: 0.125rem;
  flex-shrink: 0;
}

.qq-like-faces img,
.qq-like-faces span {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  object-fit: cover;
  background: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: #888888;
}

.qq-like-text {
  font-size: 0.8125rem;
  color: #4a90e2;
  line-height: 1.4;
}

/* 评论区 */
.qq-comments {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.qq-comment-node {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.qq-comment-node.is-reply {
  margin-left: 0;
  padding-left: 0;
}

.qq-comment-avatar {
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-hover), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.qq-comment-avatar .fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qq-comment-avatar img + .fallback {
  display: none;
}

.qq-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-comment-main {
  flex: 1;
  min-width: 0;
}

.qq-comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.qq-comment-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4a90e2;
}

.qq-comment-name.is-author {
  color: #111111;
}

.qq-comment-time {
  font-size: 0.6875rem;
  color: #999999;
}

.qq-comment-reply-target {
  font-size: 0.6875rem;
  color: #999999;
}

.qq-comment-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #333333;
  word-break: break-word;
}

.qq-comment-text .qq-emoji {
  font-size: 1.1em;
}

.qq-comment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0;
  margin-top: -0.125rem;
  margin-bottom: -0.375rem;
}

.qq-comment-reply,
.qq-comment-delete {
  font-size: 0.6875rem;
  color: #3b82f6;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
  margin: -0.25rem 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.qq-comment-reply:hover,
.qq-comment-delete:hover {
  color: #2563eb;
}

.qq-comment-delete {
  visibility: hidden;
}

.qq-comment-actions:hover .qq-comment-delete {
  visibility: visible;
}

.qq-comment-delete:hover {
  color: #dc2626;
}

.qq-comment-replies {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qq-reply-faces {
  display: flex;
  gap: 0.125rem;
}

.qq-comment-more {
  display: block;
  font-size: 0.75rem;
  color: #4a90e2;
  text-decoration: none;
  margin-top: 0.25rem;
}

.qq-comment-more:hover {
  text-decoration: underline;
}

/* 底部输入栏 */
.qq-comment-form {
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

.qq-reply-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #999999;
  margin-bottom: 0.375rem;
}

.qq-reply-cancel {
  font-size: 0.75rem;
  color: #4a90e2;
  background: transparent;
  border: none;
  cursor: pointer;
}

.qq-reply-cancel:hover {
  text-decoration: underline;
}

.qq-comment-form-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qq-comment-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.875rem;
  border: 1px solid #e5e5e5;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #333333;
  background: #f8f8f8;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.qq-comment-input::placeholder {
  color: #bbbbbb;
}

.qq-comment-input:focus {
  background: #ffffff;
  border-color: #4a90e2;
}

.qq-comment-camera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #999999;
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
}

.qq-comment-camera:hover {
  color: #666666;
  background: #f2f2f2;
}

.qq-comment-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qq-comment-preview-img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.qq-comment-preview-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
}

.qq-comment-preview-remove:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ---------- 用户头像与下拉菜单 ---------- */
.user-menu-wrapper {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: var(--radius-md);
  transition: background-color 0.2s;
}

.user-menu-trigger:hover {
  background-color: var(--bg-hover);
}

.user-avatar,
.profile-avatar {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-hover), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.user-avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-fallback,
.profile-avatar-fallback {
  font-size: 0.875rem;
}

.user-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 10rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 0.375rem;
  z-index: 100;
}

.user-menu::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  right: 0.75rem;
  width: 0.75rem;
  height: 0.75rem;
  background: white;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: background-color 0.15s;
}

.user-menu-item:hover {
  background-color: var(--bg-hover);
}

.user-menu-badge {
  margin-left: auto;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 个人中心页面 ---------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.profile-avatar-wrap {
  position: relative;
}

.profile-avatar {
  width: 5rem;
  height: 5rem;
  font-size: 1.5rem;
}

.profile-avatar-edit {
  position: absolute;
  bottom: -0.25rem;
  right: -0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-avatar-edit:hover {
  background: #92400e;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-username,
.profile-created {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.profile-tabs {
  display: flex;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.375rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.profile-tab {
  flex: 1;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.profile-tab:hover {
  background: var(--bg-hover);
}

.profile-tab.active {
  background: var(--accent);
  color: white;
  font-weight: 500;
}

.profile-panels {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.profile-split-main {
  display: flex;
  gap: 1.25rem;
  min-width: 0;
  flex: 1;
}

.profile-content {
  flex: 1;
  min-width: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.profile-panel {
  display: none;
}

.profile-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.profile-intro {
  width: 16rem;
  flex-shrink: 0;
}

.intro-card {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.intro-card.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.intro-card-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.intro-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.intro-card-text {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.profile-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.profile-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.profile-page-btn:hover:not(.disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.profile-page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.profile-page-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .profile-split-main {
    flex-direction: column;
  }
  .profile-intro {
    width: 100%;
    order: 2;
  }
  .profile-content {
    order: 1;
  }
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.profile-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.profile-action-btn:hover {
  background: var(--bg-hover);
  color: #92400e;
}

.profile-action-btn.is-danger {
  color: var(--danger);
}

.profile-action-btn.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger-dark);
}

.profile-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* 通知列表 */
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: var(--radius-lg);
  transition: background-color 0.15s;
}

.notification-item:hover {
  background-color: var(--bg-hover);
}

.notification-item.is-unread {
  background-color: #fafaf9;
}

.notification-dot {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.375rem;
  border-radius: 9999px;
  background: #d6d3d1;
  flex-shrink: 0;
}

.notification-dot.unread {
  background: var(--accent);
}

.notification-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.notification-content {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* 收藏卡片 */
.profile-favorite-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.15s;
}

.profile-favorite-card:hover {
  box-shadow: var(--shadow-sm);
}

.profile-favorite-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.profile-favorite-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.profile-favorite-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 表单 */
.profile-form {
  max-width: none;
}

.profile-form > h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-field {
  margin-bottom: 1rem;
}

.profile-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.profile-field input,
.profile-field textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-field textarea {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.5;
}

.profile-field input:focus,
.profile-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.profile-submit-btn {
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s;
}

.profile-submit-btn:hover {
  background: #92400e;
}

@media (max-width: 640px) {
  .profile-tabs {
    flex-wrap: wrap;
  }
  .profile-tab {
    flex: 1 1 45%;
  }
}

/* ---------- 个人中心 — 档案馆索引卡 ---------- */
.profile-archive-layout {
  display: grid;
  grid-template-columns: 18rem 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.library-card {
  position: sticky;
  top: 5rem;
  align-self: start;
  background: #fffcf7;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.library-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.library-card .profile-avatar {
  width: 5rem;
  height: 5rem;
  font-size: 1.5rem;
}

.library-card-meta {
  flex: 1;
  min-width: 0;
}

.library-card-name {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'Songti SC', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.library-card-username {
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.library-card-stamp {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transform: rotate(-2deg);
  opacity: 0.85;
}

.library-card-stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.stat-cell:hover {
  background: var(--bg-hover);
}

.stat-cell.active {
  background: var(--accent-soft);
}

.stat-num {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'Songti SC', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-cell.active .stat-num {
  color: var(--accent);
}

.library-card-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-anchor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background-color 0.15s, color 0.15s;
}

.nav-anchor:hover {
  background: var(--bg-hover);
}

.nav-anchor.active {
  background: var(--accent);
  color: white;
}

.index-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.index-card {
  background: #fffcf7;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.index-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.index-card-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.index-card-title {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'Songti SC', serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .profile-archive-layout {
    grid-template-columns: 1fr;
  }
  .library-card {
    position: static;
  }
  .library-card-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .nav-anchor {
    flex: 1 1 45%;
  }
}

/* ---------- 媒体库 ---------- */
.media-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.media-folder-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}

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

/* 拖拽排序左右插入提示线 */
.media-folder-card.is-drop-before::before,
.media-folder-card.is-drop-after::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-500, #0ea5e9);
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
  pointer-events: none;
  z-index: 10;
}
.media-folder-card.is-drop-before::before {
  left: 0;
}
.media-folder-card.is-drop-after::after {
  right: 0;
}
.media-folder-card.is-dragging {
  opacity: 0.4;
}

.media-folder-card-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.media-folder-cover {
  aspect-ratio: 16 / 10;
  background: var(--bg-hover);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-folder-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-folder-cover-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.media-folder-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.media-folder-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.media-folder-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  min-height: 1.5em;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-folder-desc p {
  margin-bottom: 0;
}

.media-folder-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
}

.media-folder-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
}

.media-folder-action-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  backdrop-filter: blur(4px);
}

.media-folder-action-toggle:hover,
.media-folder-action-toggle.is-active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.media-folder-action-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  min-width: 7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  padding: 0.375rem 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.media-folder-menu-item {
  padding: 0.5rem 0.875rem;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.media-folder-menu-item:hover {
  background: var(--bg-hover);
}

.media-folder-menu-item.is-danger {
  color: #dc2626;
}

.media-folder-menu-item.is-danger:hover {
  background: #fef2f2;
}

.media-folder-drag-handle {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  cursor: grab;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  backdrop-filter: blur(4px);
}

.media-folder-card:hover .media-folder-drag-handle,
.media-folder-drag-handle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.media-folder-card.is-dragging .media-folder-drag-handle {
  cursor: grabbing;
}

.media-folder-card.is-dragging {
  opacity: 0.6;
}

.media-folder-card.is-drop-target {
  outline: 2px dashed var(--brand-400);
  outline-offset: 2px;
}

/* ── 动漫页浮动控制 ── */

.anime-floatbar {
  position: relative;
  height: 0;
  z-index: 30;
}

.anime-floatbar-pills {
  position: absolute;
  right: 0;
  top: -2.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* fixed 态 */
.anime-floatbar.is-fixed .anime-floatbar-pills {
  position: fixed;
  top: 72px;
  right: 0;
  z-index: 40;
}

/* 配合 max-w-6xl 居中 */
@media (min-width: 1152px) {
  .anime-floatbar.is-fixed .anime-floatbar-pills {
    right: calc((100vw - 72rem) / 2 + 1rem);
  }
}

/* ── 药丸按钮 ── */

.anime-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 2rem;
  padding: 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #57534e;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1;
}

.anime-pill:hover {
  border-color: #d6d3d1;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.anime-pill-label {
  color: #a8a29e;
  font-weight: 400;
}

.anime-pill-text {
  color: #44403c;
  font-weight: 500;
}

.anime-pill-arrow {
  color: #a8a29e;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.anime-pill-dropdown:hover .anime-pill-arrow {
  transform: rotate(180deg);
}

/* 管理按钮 */
.anime-pill-action {
  color: #0ea5e9;
  border-color: #bae6fd;
}

.anime-pill-action:hover {
  background: #f0f9ff;
  border-color: #0ea5e9;
}

/* 打开应用按钮 */
.anime-pill-app {
  color: #10b981;
  border-color: #a7f3d0;
}

.anime-pill-app:hover {
  background: #ecfdf5;
  border-color: #10b981;
}

.anime-pill-icon {
  padding: 0 0.5rem;
  color: #a8a29e;
}

.anime-pill-icon:hover {
  color: #57534e;
  background: #f5f3f0;
  border-color: #d6d3d1;
}

/* ── 下拉菜单 ── */

.anime-pill-dropdown {
  position: relative;
}

.anime-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 7.5rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.625rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.06);
  padding: 0.25rem;
  z-index: 50;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.12s, transform 0.12s;
  pointer-events: none;
}

.anime-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.anime-menu-item {
  display: block;
  width: 100%;
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  color: #57534e;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.anime-menu-item:hover {
  background: #f5f5f4;
}

.anime-menu-item.active {
  color: #0ea5e9;
  font-weight: 500;
  background: #f0f9ff;
}

/* ── 动漫卡片操作菜单 ── */

.anime-card-menu {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 20;
}

.anime-card-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.anime-card:hover .anime-card-menu-btn,
.anime-card-menu-btn:hover,
.anime-card-menu-dropdown:not(.hidden) ~ .anime-card-menu-btn {
  opacity: 1;
}

.anime-card-menu-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

.anime-card-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  min-width: 6.5rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.625rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
  padding: 0.25rem;
  z-index: 30;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.12s, transform 0.12s;
  pointer-events: none;
}

.anime-card-menu-dropdown:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.anime-card-menu-item {
  display: block;
  width: 100%;
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  color: #57534e;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.anime-card-menu-item:hover {
  background: #f5f5f4;
}

/* 个人中心媒体库 Tab 文件夹列表 */
.media-folder-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.media-folder-row-main {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.media-folder-row-cover {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

.media-folder-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-folder-row-info {
  flex: 1;
  min-width: 0;
}

.media-folder-row-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.media-folder-row-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.media-folder-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.media-folder-upload-label {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.media-folder-upload-label:hover {
  background: var(--accent-soft);
}

.media-folder-delete {
  font-size: 0.75rem;
  color: var(--danger);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.media-folder-delete:hover {
  background: var(--danger-soft);
}

/* 文件夹内媒体网格 */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.media-grid-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.media-grid-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.media-grid-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-grid-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.media-grid-item-wrap {
  position: relative;
}

.media-grid-item-wrap:hover .media-grid-item-actions {
  opacity: 1;
}

.media-grid-item-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 0.5rem 0.375rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 60%, transparent 100%);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: left;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.media-grid-item-wrap:hover .media-grid-item-caption {
  opacity: 1;
  transform: translateY(0);
}

.media-grid-item-actions {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.media-grid-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.media-grid-action-btn:hover,
.media-grid-action-btn.is-active {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}

.media-grid-action-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  min-width: 7rem;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-grid-menu-item {
  padding: 0.5rem 0.875rem;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.media-grid-menu-item:hover {
  background: var(--bg-muted);
}

.media-grid-menu-item.is-danger {
  color: var(--danger);
}

.media-grid-menu-item.is-danger:hover {
  background: #fef2f2;
}

.media-sort-handle {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1;
  cursor: grab;
  user-select: none;
  transition: background 0.15s ease;
}

.media-sort-handle:hover {
  background: rgba(0, 0, 0, 0.7);
}

.media-grid-item-wrap.is-dragging .media-sort-handle {
  cursor: grabbing;
}

.media-grid-item-wrap.is-dragging {
  opacity: 0.5;
}

.media-grid-item-wrap.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius-md);
}

.media-sort-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* 媒体库灯箱 */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-lightbox.hidden {
  display: none;
}

.media-lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
}

.media-lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.media-lightbox-video {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-sm);
}

.media-lightbox-close,
.media-lightbox-prev,
.media-lightbox-next,
.media-lightbox-rotate-right,
.media-lightbox-rotate-left {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.15s ease;
}

.media-lightbox-close:hover,
.media-lightbox-prev:hover,
.media-lightbox-next:hover,
.media-lightbox-rotate-right:hover,
.media-lightbox-rotate-left:hover {
  background: rgba(255, 255, 255, 0.25);
}

.media-lightbox-close {
  top: 1rem;
  right: 1rem;
}

.media-lightbox-rotate-right {
  top: 1rem;
  right: 4rem;
}

.media-lightbox-rotate-left {
  top: 1rem;
  right: 7rem;
}

.media-lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.media-lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .media-lightbox-prev,
  .media-lightbox-next {
    display: none;
  }
}

/* 通用弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.profile-field.checkbox-field input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  box-shadow: none;
}

.checkbox-field label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: 0;
}

/* 时间线中的相册型说说 */
.qq-moment-content--album {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease;
}

.qq-moment-content--album:hover {
  background-color: #fafafa;
}

.qq-album-cover {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.qq-album-cover:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-card);
}

.qq-album-cover-media {
  position: relative;
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qq-album-cover-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qq-album-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.qq-album-cover-media:hover .qq-album-cover-overlay,
.qq-album-cover:hover .qq-album-cover-overlay {
  opacity: 1;
}

.qq-album-cover-text {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #ffffff;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qq-album-cover-placeholder {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

.qq-album-cover-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.qq-album-cover-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.qq-album-cover-action {
  font-size: 0.8125rem;
  color: var(--accent);
}

/* 账号设置行 */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.settings-row:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}

.settings-row-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-row-body {
  flex: 1;
  min-width: 0;
}

.settings-row-body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.settings-row-body p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.settings-row-action {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.settings-row:hover .settings-row-action {
  color: var(--accent);
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  margin-left: auto;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.nav-anchor.active .nav-count {
  background: var(--accent);
  color: #fff;
}

/* 个人中心文件夹拖动排序 */
.media-folder-row-drag-handle {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.media-folder-row-drag-handle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.media-folder-row.is-dragging {
  opacity: 0.6;
  box-shadow: var(--shadow-card-hover);
}

.media-folder-row.is-dragging .media-folder-row-drag-handle {
  cursor: grabbing;
}

.media-folder-row.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}

/* 动漫源管理拖拽 */
.domain-card {
  position: relative;
}

.domain-drag-handle {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e7e5e4;
  color: #a8a29e;
  font-size: 0.875rem;
  cursor: grab;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  backdrop-filter: blur(4px);
}

.domain-card:hover .domain-drag-handle {
  background: #fff;
  color: #57534e;
  border-color: #a8a29e;
}

.domain-card.is-dragging {
  opacity: 0.4;
}

.domain-card.is-dragging .domain-drag-handle {
  cursor: grabbing;
}

/* 上下插入提示线 */
.domain-card.is-drop-before::before,
.domain-card.is-drop-after::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  height: 3px;
  background: #0ea5e9;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
  pointer-events: none;
  z-index: 10;
}

.domain-card.is-drop-before::before {
  top: -2px;
}

.domain-card.is-drop-after::after {
  bottom: -2px;
}

/* 动漫搜索模态框 */
.anime-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}

.anime-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

.anime-search-dialog {
  position: relative;
  width: 90%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: animeSearchIn 0.2s ease-out;
}

@keyframes animeSearchIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.anime-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0ede8;
}

.anime-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #2d2a26;
  background: transparent;
  line-height: 1.5;
}

.anime-search-input::placeholder {
  color: #a8a29e;
}

.anime-search-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8a29e;
  transition: background 0.15s, color 0.15s;
}

.anime-search-close:hover {
  background: #f5f3f0;
  color: #57534e;
}

.anime-search-hint {
  padding: 10px 20px;
  font-size: 0.8rem;
  color: #a8a29e;
}

.anime-search-hint span {
  color: #57534e;
  font-weight: 500;
}

/* ===== 匿名访客逐卡锁定态：保留卡片框架，仅锁定正文 ===== */
.moment-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: var(--bg-muted);
}

.moment-lock-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.moment-lock-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.moment-lock-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.moment-lock-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.moment-lock-btn {
  margin-top: 0.5rem;
}

.timeline-item.is-locked .timeline-card,
.timeline-card.moment-locked-card {
  background: var(--bg-muted);
}

@media (max-width: 639px) {
  .moment-lock {
    padding: 1.25rem 1rem;
  }
}

