/* Chaplain Phoenix · 暖色极简风 */
:root {
  --bg: #faf7f1;
  --bg-soft: #f3eee4;
  --ink: #3d3831;
  --ink-soft: #7a7166;
  --accent: #b08d57;
  --accent-dark: #96733f;
  --card: #ffffff;
  --line: #e8e0d2;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(61, 56, 49, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem; letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none;
}
.nav nav a {
  margin-left: 22px; color: var(--ink-soft); text-decoration: none; font-size: 0.95rem;
}
.nav nav a:hover { color: var(--accent-dark); }

/* 首屏 */
.hero {
  min-height: 68vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #5a5148 0%, #3a342c 60%, #2c2620 100%);
  /* 首屏照片由 app.js 用 data/photos/01.json 的图动态设置 */
  color: #fffdf8;
  padding: 60px 20px;
}
.hero-kicker { letter-spacing: 0.5em; font-size: 0.85rem; opacity: 0.85; margin-bottom: 14px; }
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.05em; margin-bottom: 12px; font-weight: 500;
}
.hero-sub { opacity: 0.9; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; }
.btn {
  display: inline-block; padding: 11px 30px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; font-size: 0.95rem;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.15); }

/* 章节 */
.section { max-width: 1080px; margin: 0 auto; padding: 72px 24px 8px; }
.section h2 {
  font-size: 1.7rem; font-weight: 600; letter-spacing: 0.12em; text-align: center;
  margin-bottom: 6px;
}
.section-sub { text-align: center; color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 34px; }

/* 照片墙 */
.gallery { columns: 3; column-gap: 18px; }
@media (max-width: 800px) { .gallery { columns: 2; } }
@media (max-width: 520px) { .gallery { columns: 1; } }
.photo-card {
  break-inside: avoid; margin-bottom: 18px; border-radius: var(--radius);
  overflow: hidden; background: var(--card); box-shadow: var(--shadow);
  cursor: zoom-in; transition: transform 0.2s;
}
.photo-card:hover { transform: translateY(-3px); }
.photo-card img { width: 100%; display: block; }

/* 水印：全站统一，右下角，淡色大字，缩略图和大图一样 */
.ph-wrap { position: relative; overflow: hidden; }
.ph-wrap img { width: 100%; display: block; }
.ph-wm {
  position: absolute; right: 12px; bottom: 10px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 19px; font-weight: 600; letter-spacing: 0.14em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.lb-wm {
  position: absolute; right: 30px; bottom: 26px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 27px; font-weight: 600; letter-spacing: 0.14em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.photo-card figcaption { padding: 12px 16px; font-size: 0.88rem; color: var(--ink-soft); }

/* 日记 */
.diary-list { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.diary-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow);
}
.diary-date {
  font-size: 0.82rem; color: var(--accent-dark); letter-spacing: 0.2em; margin-bottom: 8px;
}
.diary-card h3 { font-size: 1.25rem; margin-bottom: 10px; font-weight: 600; }
.diary-card p { color: var(--ink); font-size: 0.97rem; white-space: pre-line; }

/* 关于 */
.about-card {
  max-width: 760px; margin: 0 auto; background: var(--bg-soft);
  border-radius: var(--radius); padding: 36px 34px; border: 1px solid var(--line);
}
.about-card p { margin-bottom: 12px; }
.about-card p:last-child { margin-bottom: 0; }
.about-tagline { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; }
.about-list { margin: 4px 0 14px 1.2em; line-height: 1.9; }
.about-list li::marker { content: "✦ "; color: var(--accent); }

/* 点赞 */
.like-row { padding: 4px 16px 16px; }
.like-btn {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 16px; cursor: pointer; font-size: 0.9rem; color: var(--ink-soft);
  transition: border-color 0.2s, color 0.2s;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.like-btn.liked { border-color: var(--accent); color: var(--accent-dark); }
.like-btn:disabled { opacity: 0.6; cursor: default; }

/* 留言板 */
.comments-wrap { max-width: 760px; margin: 0 auto; }
#comment-form { display: grid; gap: 12px; margin-bottom: 8px; }
#comment-form input,
#comment-form textarea {
  font: inherit; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--ink); resize: vertical;
}
#comment-form input:focus,
#comment-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
#comment-form .btn { justify-self: start; border: none; cursor: pointer; }
.comment-status { color: var(--ink-soft); font-size: 0.9rem; margin: 10px 0; min-height: 1.2em; }
.comment-list { display: grid; gap: 14px; margin-top: 18px; }
.comment {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.comment-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-head strong { color: var(--accent-dark); }
.comment-head span { color: var(--ink-soft); font-size: 0.82rem; }
.comment p { font-size: 0.95rem; white-space: pre-line; }
.comment-empty { color: var(--ink-soft); text-align: center; padding: 20px; }

/* 页脚 */
footer {
  text-align: center; padding: 56px 20px 40px; color: var(--ink-soft); font-size: 0.88rem;
}

/* 大图灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 20, 15, 0.92);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 80vh; border-radius: 8px; }
.lightbox-caption { color: #f3eee4; margin-top: 14px; font-size: 0.95rem; }
.lightbox-close {
  position: absolute; top: 18px; right: 26px;
  background: none; border: none; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1;
}
