/* ==========================================================
   清静居 · 中国风 / 道家风格主题
   ========================================================== */
:root {
  --paper: #f4f0e5;
  --paper-2: #ece6d6;
  --paper-3: #e2dbc8;
  --ink: #23211d;
  --ink-2: #4b463c;
  --ink-3: #7a7466;
  --qing: #3f5a52;      /* 青黛 */
  --qing-2: #5b7a6f;
  --seal: #a2352c;      /* 朱砂 */
  --gold: #b58f4e;      /* 鎏金 */
  --line: rgba(35, 33, 29, 0.16);
  --shadow: 0 6px 24px rgba(35, 33, 29, 0.10);
  --font-kai: "STKaiti", "KaiTi", "Kaiti SC", "楷体", "STSong", "SimSun", "Songti SC", serif;
  --font-song: "Songti SC", "SimSun", "STSong", "宋体", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(rgba(120, 110, 90, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(120, 110, 90, 0.05) 1px, transparent 1px);
  background-size: 22px 22px, 37px 37px;
  background-position: 0 0, 11px 11px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--qing); color: var(--paper); }

/* ---------- 通用装饰 ---------- */
.cloud-line {
  display: block; height: 26px; margin: 0 auto;
  background: url("/assets/img/cloud.svg") center / contain no-repeat;
  color: var(--ink-3); opacity: 0.55;
}

.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 2px solid var(--seal); border-radius: 6px;
  color: var(--seal); font-family: var(--font-kai); font-size: 20px; font-weight: 700;
  background: rgba(162, 53, 44, 0.06); letter-spacing: 0;
}

.btn-seal {
  display: inline-block; padding: 8px 22px; border-radius: 2px;
  background: var(--seal); color: #fdf8ee; font-family: var(--font-kai); font-size: 16px;
  letter-spacing: 4px; text-indent: 4px; border: 1px solid var(--seal);
  transition: .25s; cursor: pointer;
}
.btn-seal:hover { background: #8d2b23; box-shadow: 0 4px 14px rgba(162, 53, 44, 0.3); }

.btn-ink {
  display: inline-block; padding: 6px 18px; border: 1px solid var(--ink-2);
  color: var(--ink-2); font-family: var(--font-kai); font-size: 15px;
  background: transparent; border-radius: 2px; cursor: pointer; transition: .25s;
}
.btn-ink:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 启动遮罩 / 空状态 ---------- */
.boot-mask {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; color: var(--ink-3);
}
.boot-seal {
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--seal); color: var(--seal); border-radius: 8px;
  font-family: var(--font-kai); font-size: 42px; animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(1);} 50% { opacity: 1; transform: scale(1.04);} }

.empty { padding: 60px 0; text-align: center; color: var(--ink-3); }
.empty-seal {
  width: 62px; height: 62px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--ink-3); border-radius: 6px; font-family: var(--font-kai); font-size: 30px;
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 48px; transform: translate(-50%, 20px);
  background: rgba(35, 33, 29, 0.92); color: #f4f0e5; padding: 10px 26px; border-radius: 3px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .3s; z-index: 999;
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(162, 53, 44, 0.94); }
.toast.ok { background: rgba(63, 90, 82, 0.94); }

/* ==========================================================
   顶部
   ========================================================== */
.site-top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244, 240, 229, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-top::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--qing), var(--gold), transparent);
  opacity: .55;
}
.top-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--font-kai); font-size: 26px; letter-spacing: 4px; color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.brand-slogan { font-size: 12px; color: var(--ink-3); letter-spacing: 2px; margin-top: -6px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  font-family: var(--font-kai); font-size: 17px; letter-spacing: 2px; color: var(--ink);
  border-radius: 2px; transition: .2s; cursor: pointer;
}
.nav-link:hover, .nav-item.open > .nav-link { color: var(--seal); background: rgba(162, 53, 44, 0.06); }
.nav-link.active { color: var(--seal); }
.nav-link.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px; background: var(--seal); opacity: .7;
}
.nav-icon { font-size: 13px; color: var(--gold); }
.nav-arrow { font-size: 10px; color: var(--ink-3); transition: .2s; }
.nav-item.open .nav-arrow { transform: rotate(180deg); }

.nav-sub {
  position: absolute; top: 100%; left: 8px; min-width: 168px;
  background: var(--paper); border: 1px solid var(--line); border-top: 2px solid var(--seal);
  box-shadow: var(--shadow); padding: 6px 0; display: none; z-index: 70;
  border-radius: 0 0 4px 4px;
}
.nav-item.open .nav-sub { display: block; animation: fadeDown .22s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: none;} }
.nav-sub a {
  display: block; padding: 7px 18px; font-size: 14px; color: var(--ink-2); transition: .2s;
  font-family: var(--font-kai); letter-spacing: 1px;
}
.nav-sub a:hover { background: rgba(63, 90, 82, 0.08); color: var(--qing); padding-left: 24px; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); padding: 6px 10px; border-radius: 3px; cursor: pointer; }

/* ==========================================================
   Banner 轮播
   ========================================================== */
.banner {
  position: relative; overflow: hidden; height: 460px;
  background: var(--paper-3);
}
.banner-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  background-size: cover; background-position: center;
}
.banner-slide.active { opacity: 1; }
.banner-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,18,16,.55), rgba(20,18,16,.12) 55%, rgba(20,18,16,.35));
}
.banner-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(244,240,229,.95), rgba(244,240,229,0) 12%),
    linear-gradient(to top, rgba(244,240,229,.95), rgba(244,240,229,0) 14%);
}
.banner-content {
  position: absolute; inset: 0; display: flex; align-items: center;
  padding: 0 8vw; pointer-events: none;
}
.banner-content.align-left { justify-content: flex-start; text-align: left; }
.banner-content.align-center { justify-content: center; text-align: center; }
.banner-content.align-right { justify-content: flex-end; text-align: right; }
.banner-text { max-width: 560px; color: #f7f3e8; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.banner-title {
  font-family: var(--font-kai); font-size: 52px; letter-spacing: 10px; margin: 0 0 10px;
  font-weight: 500;
}
.banner-sub {
  font-size: 17px; line-height: 2; opacity: .92; margin-bottom: 22px; letter-spacing: 1px;
}
.banner-text .btn-seal { pointer-events: auto; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(247,243,232,.6);
  background: rgba(35,33,29,.28); color: #f7f3e8; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .25s; z-index: 5;
}
.banner-arrow:hover { background: var(--seal); border-color: var(--seal); }
.banner-arrow.prev { left: 18px; }
.banner-arrow.next { right: 18px; }
.banner-dots {
  position: absolute; bottom: 26px; left: 0; right: 0; display: flex; gap: 10px; justify-content: center; z-index: 5;
}
.banner-dot {
  width: 30px; height: 4px; background: rgba(247,243,232,.45); border: none; cursor: pointer; padding: 0;
  transition: .25s;
}
.banner-dot.active { background: var(--seal); width: 46px; }

/* ==========================================================
   主体布局
   ========================================================== */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 54px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-title {
  font-family: var(--font-kai); font-size: 30px; letter-spacing: 6px; margin: 0 0 6px; color: var(--ink);
}
.section-sub { color: var(--ink-3); font-size: 13px; letter-spacing: 3px; }
.section-title-en { display: block; font-size: 11px; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; }

.quote-block {
  margin: 0 auto 40px; max-width: 720px; text-align: center; padding: 26px 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-family: var(--font-kai); font-size: 22px; letter-spacing: 3px; color: var(--qing);
  line-height: 2.2;
}
.quote-block small { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); letter-spacing: 2px; }

/* ---------- 文章卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.post-card {
  background: rgba(255, 253, 246, 0.72); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: .3s; position: relative;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(162,53,44,.35); }
.post-cover { height: 180px; background: var(--paper-2) center/cover no-repeat; position: relative; }
.post-cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(35,33,29,.35), transparent 60%);
}
.post-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.post-title {
  font-family: var(--font-kai); font-size: 21px; letter-spacing: 2px; margin: 0 0 8px; line-height: 1.6;
}
.post-title a:hover { color: var(--seal); }
.post-summary { color: var(--ink-2); font-size: 14px; line-height: 1.9; flex: 1; }
.post-meta { margin-top: 14px; font-size: 12px; color: var(--ink-3); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.tag {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 2px;
  font-size: 12px; color: var(--qing); background: rgba(63,90,82,.06);
}
.badge-top { color: var(--seal); border: 1px solid var(--seal); border-radius: 2px; padding: 0 6px; font-size: 11px; }

/* ---------- 文章详情 ---------- */
.article-page { max-width: 820px; margin: 0 auto; padding: 46px 20px 60px; }
.article-head { text-align: center; margin-bottom: 30px; }
.article-title { font-family: var(--font-kai); font-size: 34px; letter-spacing: 4px; margin: 0 0 12px; line-height: 1.5; }
.article-meta { color: var(--ink-3); font-size: 13px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.article-content {
  font-family: var(--font-song); font-size: 17px; line-height: 2.1; color: #2b2823;
  padding: 30px 0; border-top: 1px solid var(--line);
}
.article-content p { margin: 0 0 18px; text-align: justify; }
.article-content img { border-radius: 3px; margin: 12px 0; }
.article-content h2, .article-content h3 { font-family: var(--font-kai); letter-spacing: 2px; margin: 28px 0 12px; }
.article-content blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--gold);
  background: rgba(181,143,78,.08); color: var(--ink-2); font-family: var(--font-kai);
}
.article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 14px; color: var(--ink-3); }

/* ---------- 相册 ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.album-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
.album-cover { height: 220px; background-size: cover; background-position: center; transition: .5s; }
.album-card:hover .album-cover { transform: scale(1.06); }
.album-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; color: #f7f3e8;
  background: linear-gradient(to top, rgba(20,18,16,.82), transparent); }
.album-name { font-family: var(--font-kai); font-size: 22px; letter-spacing: 3px; }
.album-desc { font-size: 13px; opacity: .85; }

.photo-grid { columns: 3 260px; column-gap: 18px; }
.photo-item { break-inside: avoid; margin-bottom: 18px; border: 1px solid var(--line); background: #fffdf6; padding: 6px; border-radius: 2px; cursor: zoom-in; transition: .3s; }
.photo-item:hover { box-shadow: var(--shadow); }
.photo-title { font-family: var(--font-kai); font-size: 14px; padding: 6px 4px 2px; color: var(--ink-2); }

.lightbox { position: fixed; inset: 0; background: rgba(20,18,16,.92); display: flex; align-items: center; justify-content: center; z-index: 200; }
.lightbox img { max-width: 92vw; max-height: 88vh; border: 4px solid var(--paper); }

/* ---------- 视频 ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.video-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fffdf6; cursor: pointer; transition: .3s; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-cover { position: relative; height: 190px; background: var(--paper-2) center/cover no-repeat; }
.video-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(35,33,29,.28); color: #f7f3e8; font-size: 34px;
}
.video-play span {
  width: 56px; height: 56px; border: 2px solid #f7f3e8; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px);
}
.video-info { padding: 14px 18px 18px; }
.video-title { font-family: var(--font-kai); font-size: 19px; letter-spacing: 2px; }
.video-desc { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.video-modal { position: fixed; inset: 0; background: rgba(20,18,16,.9); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.video-modal video { width: min(920px, 92vw); max-height: 80vh; background: #000; }
.video-modal iframe { width: min(920px, 92vw); height: min(520px, 60vh); border: 0; }

/* ---------- 留言 ---------- */
.msg-form { max-width: 640px; margin: 0 auto 40px; padding: 26px; border: 1px solid var(--line); background: rgba(255,253,246,.8); border-radius: var(--radius); }
.msg-list { max-width: 780px; margin: 0 auto; }
.msg-item { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.msg-head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-3); }
.msg-name { font-family: var(--font-kai); font-size: 17px; color: var(--ink); letter-spacing: 2px; }
.msg-content { margin: 8px 0; line-height: 1.95; }
.msg-reply { margin: 10px 0 0; padding: 12px 16px; background: rgba(63,90,82,.07); border-left: 3px solid var(--qing); font-size: 14px; }
.msg-reply b { font-family: var(--font-kai); color: var(--qing); letter-spacing: 2px; }

/* ---------- 关于 ---------- */
.about-page { max-width: 820px; margin: 0 auto; padding: 46px 20px; }
.about-hero { display: flex; gap: 28px; align-items: center; margin-bottom: 30px; }
.about-avatar { width: 128px; height: 128px; border-radius: 50%; border: 3px solid var(--gold); object-fit: cover; background: var(--paper-2); }
.about-name { font-family: var(--font-kai); font-size: 30px; letter-spacing: 4px; }
.about-body { font-family: var(--font-song); font-size: 17px; line-height: 2.1; }
.about-body p { margin: 0 0 16px; }
.info-list { margin-top: 30px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.info-list span { color: var(--ink-3); }

/* ---------- 归档 ---------- */
.archive-year { font-family: var(--font-kai); font-size: 26px; letter-spacing: 4px; margin: 30px 0 10px; color: var(--seal); }
.archive-month { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.archive-chip { padding: 4px 14px; border: 1px solid var(--line); border-radius: 2px; font-size: 14px; background: rgba(255,253,246,.7); }
.archive-chip:hover { border-color: var(--seal); color: var(--seal); }

/* ---------- 侧栏卡片 ---------- */
.side-card { border: 1px solid var(--line); padding: 18px 20px; background: rgba(255,253,246,.72); border-radius: var(--radius); margin-bottom: 20px; }
.side-title { font-family: var(--font-kai); font-size: 18px; letter-spacing: 3px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.side-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.side-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.side-list li:last-child { border-bottom: none; }
.side-list a:hover { color: var(--seal); }

.two-col { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: start; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 36px 0 0; flex-wrap: wrap; }
.page-num { padding: 5px 13px; border: 1px solid var(--line); font-size: 14px; border-radius: 2px; background: rgba(255,253,246,.8); }
.page-num:hover { border-color: var(--seal); color: var(--seal); }
.page-num.active { background: var(--seal); color: #fdf8ee; border-color: var(--seal); }
.page-total { font-size: 13px; color: var(--ink-3); margin-left: 8px; }

/* ==========================================================
   页脚
   ========================================================== */
.site-foot {
  margin-top: 60px; padding: 40px 20px 30px; border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(226,219,200,.5), rgba(226,219,200,.9));
  text-align: center; color: var(--ink-2); font-size: 13px;
}
.foot-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.foot-links a { color: var(--qing); }
.foot-links a:hover { color: var(--seal); text-decoration: underline; }
.foot-icp a { color: var(--ink-2); }
.foot-icp a:hover { color: var(--seal); }
.foot-copy { color: var(--ink-3); margin-top: 6px; }

/* ---------- 前台表单 ---------- */
.field-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.field-row > label { width: 96px; flex: 0 0 96px; text-align: right; line-height: 34px; font-size: 14px; color: var(--ink-2); }
.field-row input, .field-row textarea {
  flex: 1; min-width: 0; padding: 7px 11px; border: 1px solid var(--line); border-radius: 3px;
  background: #fffef9; font-family: inherit; font-size: 14px; color: var(--ink); outline: none; transition: .2s;
}
.field-row input:focus, .field-row textarea:focus { border-color: var(--seal); box-shadow: 0 0 0 3px rgba(162,53,44,.08); }
.field-row textarea { resize: vertical; line-height: 1.8; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 10px 0 0; }
  .nav.open { display: flex; }
  .nav-sub { position: static; box-shadow: none; border-top: none; border-left: 2px solid var(--seal); display: none; }
  .nav-item.open .nav-sub { display: block; }
  .banner { height: 340px; }
  .banner-title { font-size: 34px; letter-spacing: 6px; }
  .photo-grid { columns: 2 160px; }
  .article-title { font-size: 26px; }
}
@media (max-width: 560px) {
  .top-inner { flex-wrap: wrap; }
  .banner { height: 300px; }
  .banner-title { font-size: 28px; }
  .banner-sub { font-size: 14px; }
  .photo-grid { columns: 1; }
}
