/* ============================================================
   Lumina 流光 · Typecho 无限流瀑布相册主题
   暗色优先 / 玻璃拟态 / 渐变 Hero / Lightbox
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #07080d;
  --bg-soft: #0e1018;
  --header-bg: rgba(7, 8, 13, 0.72);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef0f6;
  --muted: #8f93ab;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --grad: linear-gradient(120deg, #22d3ee, #8b5cf6 48%, #f472b6);
  --grad-soft: linear-gradient(120deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.16));
  --shadow-card: 0 16px 36px -18px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 26px 56px -18px rgba(139, 92, 246, 0.42);
  --noise-opacity: 0.05;
  --gap: 22px;
  --radius: 20px;
  --font-display: 'Syne', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Syne', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2efe7;
  --bg-soft: #faf8f1;
  --header-bg: rgba(242, 239, 231, 0.78);
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --border: rgba(32, 30, 40, 0.12);
  --text: #1a1c25;
  --muted: #6d7083;
  --shadow-card: 0 16px 34px -18px rgba(60, 50, 30, 0.3);
  --shadow-glow: 0 26px 52px -18px rgba(139, 92, 246, 0.35);
  --noise-opacity: 0.035;
  color-scheme: light;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

/* 氛围背景：彩色径向光晕 + 噪点 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(62rem 42rem at 85% -12%, rgba(139, 92, 246, 0.17), transparent 62%),
    radial-gradient(52rem 36rem at -12% 28%, rgba(34, 211, 238, 0.11), transparent 62%),
    radial-gradient(44rem 44rem at 50% 112%, rgba(244, 114, 182, 0.09), transparent 62%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: var(--noise-opacity);
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.55'/></svg>");
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

::selection { background: rgba(139, 92, 246, 0.35); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.4), rgba(139, 92, 246, 0.45));
  border-radius: 99px;
  border: 2px solid var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
  min-height: 44px;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.8);
  animation: logoPulse 3.2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(139, 92, 246, 0.6); }
  50% { transform: scale(1.18); box-shadow: 0 0 22px rgba(34, 211, 238, 0.85); }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14.5px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--surface-strong);
}

.header-actions { display: flex; align-items: center; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background 0.3s ease, box-shadow 0.3s ease;
}

.icon-btn:hover {
  transform: translateY(-2px) rotate(12deg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-glow);
}

:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 24px 6rem;
  overflow: hidden;
}

.hero-compact { min-height: 46vh; padding: 9rem 24px 3rem; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
  pointer-events: none;
  transition: transform 1.4s var(--ease-out);
}

.orb-a {
  width: 34rem;
  height: 34rem;
  top: -12%;
  right: -8%;
  background: radial-gradient(circle at 32% 32%, rgba(139, 92, 246, 0.55), transparent 70%);
}

.orb-b {
  width: 28rem;
  height: 28rem;
  bottom: -14%;
  left: -6%;
  background: radial-gradient(circle at 60% 40%, rgba(34, 211, 238, 0.4), transparent 70%);
}

:root[data-theme="light"] .orb { opacity: 0.32; }

.hero-inner { position: relative; max-width: 60rem; }

.hero-inner > * { animation: riseIn 0.9s var(--ease-out) backwards; }
.hero-eyebrow { animation-delay: 0.08s; }
.hero-title { animation-delay: 0.2s; }
.hero-sub { animation-delay: 0.34s; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-line {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.eyebrow-line:last-child {
  background: linear-gradient(90deg, var(--accent-3), transparent);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.9rem, 9vw, 6.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  background: linear-gradient(110deg, #22d3ee 0%, #8b5cf6 32%, #f472b6 58%, #22d3ee 88%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: riseIn 0.9s var(--ease-out) 0.2s backwards, gradShift 9s ease-in-out infinite;
}

.hero-title-sm { font-size: clamp(2rem, 5vw, 3.4rem); }

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  margin: 26px auto 0;
  max-width: 34em;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
}

.hero-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
}

.hero-hint-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4em;
}

.hero-hint-track {
  width: 1px;
  height: 52px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.hero-hint-dot {
  position: absolute;
  top: -45%;
  left: 0;
  width: 100%;
  height: 42%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation: hintDrop 2.2s var(--ease-out) infinite;
}

@keyframes hintDrop {
  0% { top: -45%; }
  65%, 100% { top: 115%; }
}

/* ---------- 照片墙 ---------- */
.gallery {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px 7rem;
  width: 100%;
  scroll-margin-top: 90px;
}

.masonry { position: relative; width: 100%; }

/* 无 JS 时的优雅降级：CSS 多列瀑布流 */
.masonry:not(.masonry-js) {
  column-count: 4;
  column-gap: var(--gap);
}
.masonry-js .masonry-item {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}
.masonry:not(.masonry-js) .masonry-item {
  position: static;
  margin-bottom: var(--gap);
  break-inside: avoid;
  display: block;
  width: auto;
}

@media (max-width: 1100px) { .masonry:not(.masonry-js) { column-count: 3; } }
@media (max-width: 760px)  { .masonry:not(.masonry-js) { column-count: 2; } }
@media (max-width: 480px)  { .masonry:not(.masonry-js) { column-count: 1; } }

/* ---------- 照片卡片 ---------- */
.photo-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s var(--ease-out),
    box-shadow 0.5s ease,
    border-color 0.4s ease;
}

.photo-card.is-visible { opacity: 1; transform: none; }

.photo-card:hover,
.photo-card:focus-visible {
  transform: translateY(-7px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow-glow);
}

.photo-frame {
  margin: 0;
  display: block;
  min-height: 90px;
  background: linear-gradient(135deg, var(--grad-soft)), var(--bg-soft);
}

.photo-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.75s ease, transform 0.85s var(--ease-out);
}

.photo-card.is-loaded .photo-img { opacity: 1; transform: none; }
.photo-card:hover .photo-img,
.photo-card:focus-visible .photo-img { transform: scale(1.06); }

/* 无 JS 降级：图片直接可见 */
.masonry:not(.masonry-js) .photo-card { opacity: 1; transform: none; }
.masonry:not(.masonry-js) .photo-img { opacity: 1; transform: none; }

/* 图片加载失败态 */
.photo-card.is-broken .photo-frame {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(139, 92, 246, 0.06) 0 14px, rgba(34, 211, 238, 0.05) 14px 28px),
    var(--bg-soft);
}
.photo-card.is-broken .photo-img { display: none; }
.photo-card.is-broken .photo-frame::after {
  content: '图片走丢了';
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.2em;
}

.photo-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3rem 1.15rem 1.05rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to top, rgba(4, 5, 10, 0.88), rgba(4, 5, 10, 0.35) 62%, transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
  pointer-events: none;
}

.photo-card:hover .photo-overlay,
.photo-card:focus-visible .photo-overlay { opacity: 1; transform: none; }

.photo-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-date {
  flex-shrink: 0;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

/* 触屏设备常显标题 */
@media (hover: none) {
  .photo-overlay {
    opacity: 1;
    transform: none;
    background: linear-gradient(to top, rgba(4, 5, 10, 0.82), transparent 78%);
  }
}

/* ---------- 分页 / 无限流状态 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  padding: 3.2rem 0 0.6rem;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 34px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.pagination a:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }

.load-status {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 64px;
  padding-top: 1.6rem;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.loader {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.loader-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--surface-strong);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.end-mark {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.end-mark::before,
.end-mark::after {
  content: '';
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border));
}
.end-mark::after { background: linear-gradient(90deg, var(--border), transparent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 32px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.btn-grad {
  background: var(--grad);
  color: #fff;
  letter-spacing: 0.05em;
}
.btn-grad:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.btn-grad:active { transform: translateY(0); }

.btn-ghost {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border);
}

.sentinel { height: 1px; margin-top: 10px; }

/* ---------- 空状态 / 404 ---------- */
.empty-state,
.error-page {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 20px;
}

.empty-mark {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px var(--muted);
}

.empty-tip { margin: 0; color: var(--muted); max-width: 30em; }

.error-code {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 13rem);
  font-weight: 800;
  line-height: 1;
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 7s ease-in-out infinite;
}

.error-title {
  margin: 0.4em 0 0.5em;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.error-sub { margin: 0 0 2rem; color: var(--muted); }

/* ---------- 文章详情页 ---------- */
.photo-post {
  max-width: 860px;
  margin: 0 auto;
  padding: 8.5rem 24px 4rem;
}

.post-head { margin-bottom: 2.4rem; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

.post-meta a { color: var(--accent-2); text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }

.post-meta-sep { opacity: 0.5; }

.post-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.post-hero {
  margin: 0 0 2.6rem;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.post-hero img { display: block; width: 100%; }

.post-content { font-size: 1.06rem; }

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  margin: 2.2em 0 0.8em;
}

.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }

.post-content a {
  color: var(--accent-2);
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--accent-2), var(--accent));
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  background-position: 0 96%;
}
.post-content a:hover { color: var(--accent); }

.post-content img { border-radius: 16px; }

.post-content blockquote {
  margin: 1.8em 0;
  padding: 0.9em 1.4em;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--surface);
  color: var(--muted);
}

.post-content code {
  padding: 0.15em 0.5em;
  border-radius: 6px;
  background: var(--surface-strong);
  font-size: 0.9em;
}

.post-content pre {
  padding: 1.1em 1.3em;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow-x: auto;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; }

.post-tags { margin: 2.6rem 0 0; display: flex; flex-wrap: wrap; gap: 10px; }

.post-tags a {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.post-tags a:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: var(--shadow-glow);
}

/* ---------- 评论 ---------- */
.comments-area {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 24px 5rem;
}

.comments-head { margin-bottom: 1.6rem; }

.comments-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.comments-title-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.7);
}

.comment-list,
.comment-list ol { list-style: none; margin: 0; padding: 0; }

.comment-body { margin-bottom: 20px; }

.comment-main {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.comment-avatar img { border-radius: 50%; }

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

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.comment-author { font-weight: 600; font-size: 15px; }
.comment-author a { text-decoration: none; }

.comment-time { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }

.comment-text { font-size: 15px; color: var(--text); }
.comment-text p { margin: 0.4em 0; }

.comment-actions { margin-top: 8px; }
.comment-actions a {
  font-size: 13px;
  color: var(--accent-2);
  text-decoration: none;
}
.comment-actions a:hover { text-decoration: underline; }

.comment-children {
  margin: 20px 0 0 18px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.comment-by-author > .comment-main {
  border-color: rgba(139, 92, 246, 0.4);
  background: linear-gradient(120deg, rgba(139, 92, 246, 0.07), transparent 55%), var(--surface);
}

/* 评论分页 */
.comments-area .page-navigator {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 1.6rem 0;
}
.comments-area .page-navigator li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.comments-area .page-navigator li.current a {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

/* 评论表单 */
.comment-form {
  margin-top: 2.4rem;
  padding: 26px 26px 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.comment-form-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.comment-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.field-label em {
  font-style: normal;
  color: var(--accent-3);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

.field textarea { resize: vertical; min-height: 120px; }

.field-full { margin-top: 16px; }

.comment-form .btn { margin-top: 20px; }

.comments-closed {
  color: var(--muted);
  padding: 14px 20px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.4rem 28px 3rem;
  text-align: center;
}

.footer-brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.footer-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-meta a { color: var(--muted); text-decoration: none; }
.footer-meta a:hover { color: var(--text); }

.footer-meta .sep { margin: 0 8px; opacity: 0.5; }

.footer-theme {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out), visibility 0.35s, box-shadow 0.3s ease;
}

.back-top.is-show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { box-shadow: var(--shadow-glow); }

/* ---------- Lightbox 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 10, 0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.lb-figure {
  position: relative;
  margin: 0;
  max-width: min(92vw, 1400px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 40px 90px -22px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: scale(0.975);
  transition: opacity 0.32s ease, transform 0.32s var(--ease-out);
}

.lightbox.is-loaded .lb-img { opacity: 1; transform: none; }

.lb-spinner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent-2);
  animation: spin 0.9s linear infinite;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox:not(.is-loaded) .lb-spinner { opacity: 1; }

.lb-caption {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(92vw, 640px);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 16, 24, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 14px;
}

.lb-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.lb-permalink {
  flex-shrink: 0;
  color: #22d3ee;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 4px 14px;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.lb-permalink:hover {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.8);
}

.lb-counter {
  position: fixed;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 16, 24, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.lb-btn {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 16, 24, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background 0.3s ease, box-shadow 0.3s ease;
}

.lb-btn:hover {
  background: rgba(139, 92, 246, 0.4);
  transform: scale(1.08);
  box-shadow: var(--shadow-glow);
}

.lb-close { top: 1.3rem; right: 1.4rem; }
.lb-prev { left: 1.2rem; top: 50%; margin-top: -24px; }
.lb-next { right: 1.2rem; top: 50%; margin-top: -24px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .comment-fields { grid-template-columns: 1fr; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-btn { width: 42px; height: 42px; }
}

@media (max-width: 640px) {
  .header-inner { padding: 10px 16px; gap: 10px; }
  .logo-text { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-nav a { padding: 6px 10px; font-size: 13.5px; }
  .gallery { padding: 0 16px 5rem; }
  .hero { padding: 7rem 18px 5rem; min-height: 78vh; }
  .hero-eyebrow { letter-spacing: 0.28em; font-size: 12px; }
  .hero-hint { bottom: 1.4rem; }
  .photo-post { padding: 7rem 18px 3rem; }
  .comments-area { padding: 2rem 16px 4rem; }
  .comment-form { padding: 20px 18px 22px; }
  .comment-main { padding: 14px; gap: 12px; }
  .back-top { right: 16px; bottom: 16px; }
  .lb-caption { flex-direction: column; gap: 8px; padding: 10px 16px; border-radius: 18px; }
  .lb-title { white-space: normal; text-align: center; }
}

/* ---------- 动效弱化 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .photo-card,
  .photo-card.is-visible { opacity: 1; transform: none; }
  .photo-img,
  .photo-card.is-loaded .photo-img { opacity: 1; transform: none; }
}
