:root {
  --bg: #e9e7e0;
  --bg-2: #e0ddd4;
  --surface: #f5f4f0;
  --surface-2: #ece9e2;
  --text: #2a2723;
  --muted: #837c70;
  --accent: #b23a2c;
  --accent-dark: #8e2c20;
  --accent-soft: #efdcd6;
  --border: #d3cec2;
  --ok: #4a7a56;
  --danger: #b3402f;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(42, 39, 35, 0.04), 0 4px 14px rgba(42, 39, 35, 0.06);
  --shadow-hover: 0 2px 4px rgba(42, 39, 35, 0.06), 0 10px 24px rgba(42, 39, 35, 0.10);
  --serif: "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "KaiTi", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background-color: var(--bg); }
body {
  margin: 0;
  font-family: var(--sans);
  background: transparent;
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== 头部 ===== */
.site-header {
  background: rgba(245, 244, 240, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-brand { display: flex; flex-direction: column; line-height: 1.25; }
.brand-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: 0.04em; }
.brand-tagline { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--muted); font-size: 15px; padding: 4px 0; position: relative; }
.site-nav a.active { color: var(--accent); }
.site-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); border-radius: 2px; }
.site-nav a:hover { color: var(--accent); }

/* ===== 页面骨架：页脚吸底 ===== */
/* overflow-x: clip —— 楼体可以伸出页右露出来，但不再把页面撑宽（不留横向滚动条） */
.page-main { flex: 1 0 auto; position: relative; min-height: 74vh; overflow-x: clip; }
.page-main > .container { padding-top: 28px; padding-bottom: 64px; position: relative; z-index: 1; }

/* ===== 背景布景 =====
   远景「城市楼群」固定在视口当整页底衬 —— 这样文章再长，远近景也不会被拉开；
   近景三栋楼仍贴在页面下缘、压在页脚线上，阅读区因此不会被楼体压住。
   —— 左下角的楼 */
.bg-building {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}
.bg-building img { display: block; height: 70vh; width: auto; }

/* 千禧年初的城市楼群：固定在视口顶部，作为整页的远景底衬 */
.bg-skyline {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
  opacity: 0.5;
}
.bg-skyline img { display: block; width: 100%; height: auto; }

/* 远景底部渐隐：城市融进雾色，而不是在画面中部切出一条硬边。
   这一层在整幅布景的最下面，它软下来，后面的近景楼群才像从雾里长出来。 */
.bg-skyline::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34vh;
  background: linear-gradient(to bottom, rgba(233, 231, 224, 0), var(--bg));
  pointer-events: none;
}

/* 彩蛋背景：十连点冰才会出现，背景面板里不提供入口（只能用别的选项换回来） */
.bg-egg { position: fixed; inset: 0; z-index: 0; display: none; line-height: 0; pointer-events: none; }
.bg-egg img { display: block; width: 100%; height: 100%; object-fit: cover; }
html[data-egg="1"] .bg-egg { display: block; }
html[data-egg="1"] .bg-skyline,
html[data-egg="1"] .bg-gate,
html[data-egg="1"] .bg-b6,
html[data-egg="1"] .bg-b5,
html[data-egg="1"] .bg-b1,
html[data-egg="1"] .bg-tower,
html[data-egg="1"] .bg-building { display: none; }

/* 远景选「留白」时收起远景层 */
html[data-sky="none"] .bg-skyline { display: none; }

/* 底部选「留白」时收起所有近景楼体，并撤掉阅读页为楼体预留的那段底距 */
html[data-bottom="none"] .bg-gate,
html[data-bottom="none"] .bg-b6,
html[data-bottom="none"] .bg-b5,
html[data-bottom="none"] .bg-b1,
html[data-bottom="none"] .bg-tower,
html[data-bottom="none"] .bg-building { display: none; }
html[data-bottom="none"] .page-main:has(.novel-content) > .container { padding-bottom: 64px; }

/* 背景选择器：访客可分别切换「远景层」与「底部层」，选择存在各自浏览器里 */
.bg-picker { position: fixed; left: 18px; bottom: 20px; z-index: 3; display: flex; align-items: center; gap: 6px; }
.bg-picker-ice {
  display: block; line-height: 0; padding: 0;
  background: none; border: 0; cursor: pointer;
  transition: transform .18s ease;
}
.bg-picker-ice img { display: block; height: 44px; width: auto; }
.bg-picker-ice:hover { transform: scale(1.06) rotate(-1.5deg); }
.bg-picker-ice:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.bg-picker-ice.playing { animation: ice-pop .42s ease; }
@keyframes ice-pop {
  0% { transform: scale(1) rotate(0); }
  35% { transform: scale(1.16) rotate(-3deg); }
  65% { transform: scale(.97) rotate(1.5deg); }
  100% { transform: scale(1) rotate(0); }
}
.bg-picker-toggle {
  font: inherit; font-size: 13px; letter-spacing: .1em;
  color: var(--text); background: var(--surface);
  border: 1px solid rgba(42, 39, 35, .14); border-radius: 999px;
  padding: 7px 16px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(42, 39, 35, .08);
  transition: color .2s ease, border-color .2s ease;
}
.bg-picker-toggle:hover { color: var(--accent); border-color: var(--accent); }
.bg-picker-panel {
  position: absolute; left: 0; bottom: 54px;
  min-width: 210px; padding: 12px 14px 14px;
  background: var(--surface); border: 1px solid rgba(42, 39, 35, .14);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(42, 39, 35, .16);
}
.bg-picker-panel[hidden] { display: none; }
.bg-picker-group + .bg-picker-group { margin-top: 12px; padding-top: 11px; border-top: 1px dashed rgba(42, 39, 35, .16); }
.bg-picker-label { margin: 0 0 7px; font-size: 12px; letter-spacing: .2em; color: rgba(42, 39, 35, .5); }
.bg-picker-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 64px; padding: 6px 4px; cursor: pointer;
  font: inherit; font-size: 11px; color: rgba(42, 39, 35, .68);
  background: transparent; border: 1px solid rgba(42, 39, 35, .12); border-radius: 8px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.bg-opt img { display: block; width: 52px; height: 34px; object-fit: cover; border-radius: 4px; }
.bg-opt-blank { display: block; width: 52px; height: 34px; border-radius: 4px; background: var(--bg); border: 1px dashed rgba(42, 39, 35, .22); }
.bg-opt:hover { color: var(--accent); border-color: var(--accent); }
.bg-opt.active { color: var(--accent); border-color: var(--accent); background: rgba(178, 58, 44, .07); }

/* 城门：夹在左楼与主楼之间的空档里 */
.bg-gate {
  position: absolute;
  left: 22%;
  bottom: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}
.bg-gate picture { display: block; }
.bg-gate img { display: block; width: 42vh; height: auto; }

/* 白楼（OIP 图，带旋梯）：紧贴正中主楼右缘 */
.bg-b6 {
  position: absolute;
  left: 57%;
  bottom: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}
.bg-b6 img { display: block; height: 34vh; width: auto; }

/* 5 号（橙色楼）：紧接白楼右边，两栋同高 34vh */
.bg-b5 {
  position: absolute;
  left: calc(57% + 33vh);
  bottom: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}
.bg-b5 img { display: block; height: 34vh; width: auto; }

/* 1 号（米黄办公楼）：接在橙楼右边，两截同高、看起来像一栋楼的两部分，并向页右延伸出去 */
.bg-b1 {
  position: absolute;
  left: calc(57% + 50vh);
  bottom: 0;
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}
.bg-b1 img {
  display: block;
  height: 34vh;
  width: auto;
  transform: rotate(-2.5deg);         /* 逆时针，和橙楼顶线的倾角一致 */
  transform-origin: bottom center;    /* 以底边为轴转，楼基不会跑 */
}

/* 备选：1 号直接贴在主楼右缘时的数值（想换回那种排法就启用这段、把上面那段注掉）
.bg-b1 { position: absolute; left: calc(50% + 20vh); bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-b1 img { display: block; height: 24vh; width: auto; }
*/

/* 主楼右侧的三栋实拍楼（1 → 5 → 4）：暂时撤下，样式见下方注释区 */

/* 已撤下的实拍图层（想恢复：在 footer.ejs 里把对应 div 放回，再解开这段注释）
.bg-rightblock { position: absolute; left: 58%; bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-rightblock img { display: block; height: 34vh; width: auto; }
.bg-photo478 { position: absolute; left: 57%; bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-photo478 img { display: block; height: 47vh; width: auto; }
.bg-oldblock { position: absolute; left: 55%; bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-oldblock img { display: block; height: 26vh; width: auto; }
.bg-farright { position: absolute; right: 0; bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-farright img { display: block; height: 36vh; width: auto; }
.bg-b1 { position: absolute; left: 57%; bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-b1 img { display: block; height: 17vh; width: auto; }
.bg-b5 { position: absolute; left: calc(57% + 37vh); bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-b5 img { display: block; height: 17vh; width: auto; }
.bg-b4 { position: absolute; left: calc(57% + 51vh); bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.bg-b4 img { display: block; height: 17vh; width: auto; }
*/

/* 正中主楼（兰州大厦）：底边落在页脚线上 */
.bg-tower {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 0;
  line-height: 0;
  pointer-events: none;
}
.bg-tower img { display: block; height: 53vh; width: auto; }

/* ===== 首页 ===== */
.hero { text-align: center; padding: 44px 0 10px; }
.hero-title { font-family: var(--serif); font-size: 36px; margin: 0 0 10px; letter-spacing: 0.06em; }
.hero-tagline { color: var(--muted); margin: 0; letter-spacing: 0.14em; font-size: 14px; }
.hero::after { content: ''; display: block; width: 34px; height: 4px; margin: 20px auto 0; background: var(--accent); border-radius: 2px; }

.category-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0 26px; }
.category-nav a {
  padding: 5px 16px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); background: var(--surface); font-size: 14px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.category-nav a:hover { border-color: var(--accent); color: var(--accent); }
.category-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.novel-list { display: grid; gap: 16px; }
.novel-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.novel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.novel-card-title { font-family: var(--serif); font-size: 22px; margin: 10px 0 8px; }
.novel-card-title a { color: var(--text); }
.novel-card-title a:hover { color: var(--accent); }
.novel-card-summary { color: var(--muted); margin: 0 0 12px; }
.novel-card-foot { display: flex; justify-content: space-between; align-items: center; }
.novel-card-date { font-size: 13px; color: var(--muted); }
.read-more { font-size: 14px; }

/* ===== 详情页 ===== */
.novel-header { margin-bottom: 20px; }
.novel-title { font-family: var(--serif); font-size: 30px; margin: 12px 0 8px; line-height: 1.35; }
.novel-date { color: var(--muted); font-size: 14px; }
.novel-summary { color: var(--muted); border-left: 3px solid var(--accent); padding-left: 14px; margin: 0 0 24px; }

.novel-content { font-family: var(--serif); font-size: 17px; line-height: 1.9; }
.novel-content p { margin: 0 0 1.1em; }

/* ===== 评论 ===== */
.comments { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 28px; }
.comments-title { font-family: var(--serif); font-size: 20px; margin: 0 0 20px; }

.notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.notice-ok { background: #e4efe6; color: var(--ok); }
.notice-error { background: var(--accent-soft); color: var(--danger); }

.comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; box-shadow: var(--shadow); }
.honey { display: none; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input[type="text"], .field input[type="password"], .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 15px; background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(178, 58, 44, 0.12); }
.field-check label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
.comment-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.comment-meta { display: flex; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
.comment-author { font-weight: 600; }
.comment-time { font-size: 13px; color: var(--muted); }
.comment-body { font-size: 15px; }
.comment-body p { margin: 0; }

/* ===== 按钮 / 徽章 ===== */
.btn {
  display: inline-block; padding: 9px 18px; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; font-family: var(--sans); line-height: 1.4;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }

.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); }
.badge-ok { background: #e4efe6; color: var(--ok); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-pin { background: var(--accent-soft); color: var(--accent-dark); }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ===== 登录 ===== */
.login-wrap { display: flex; justify-content: center; padding: 48px 0; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; width: 100%; max-width: 360px; box-shadow: var(--shadow); }
.login-card h1 { font-family: var(--serif); font-size: 22px; margin: 0 0 20px; }

/* ===== 后台 ===== */
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.admin-head h1 { font-family: var(--serif); font-size: 26px; margin: 0; }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat-num { display: block; font-size: 26px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--muted); }

.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.admin-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-section-head h2 { font-family: var(--serif); font-size: 20px; margin: 0; flex: 1; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.admin-table a { color: var(--text); }
.admin-table a:hover { color: var(--accent); }
.row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.row-actions form { display: inline; margin: 0; }
.link-danger, .link-ok { background: none; border: none; padding: 0; font-size: 14px; cursor: pointer; font-family: var(--sans); }
.link-danger { color: var(--danger); }
.link-ok { color: var(--ok); }
.comment-cell { max-width: 320px; word-break: break-word; white-space: pre-wrap; }

.admin-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-actions { display: flex; gap: 12px; align-items: center; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-family: var(--serif); font-size: 64px; margin: 0 0 10px; color: var(--muted); }
.error-page p { color: var(--muted); margin: 0 0 24px; }

/* ===== 页脚 ===== */
/* position/z-index 是为了压在固定的背景布景之上 */
.site-footer { flex: none; position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ===== 章节计数（首页卡片） ===== */
.chapter-count { font-size: 13px; color: var(--accent); margin-right: 10px; }

/* ===== 目录 ===== */
.chapter-toc { margin-top: 8px; }
.toc-title { font-family: var(--serif); font-size: 20px; margin: 0 0 16px; }
.chapter-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.chapter-item { border-bottom: 1px solid var(--border); }
.chapter-item:last-child { border-bottom: none; }
.chapter-item a { display: flex; align-items: center; gap: 14px; padding: 13px 16px; color: var(--text); transition: color .15s ease, background .15s ease; }
.chapter-item a:hover { color: var(--accent); background: var(--surface-2); }
.chapter-no {
  flex: none; width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.chapter-name { font-family: var(--serif); font-size: 16px; }

/* ===== 章节阅读 ===== */
.chapter-header { margin-bottom: 24px; }
.chapter-back { font-size: 14px; color: var(--muted); }
.chapter-back:hover { color: var(--accent); }
.chapter-title { font-family: var(--serif); font-size: 28px; margin: 14px 0 4px; line-height: 1.35; }
.chapter-meta { color: var(--muted); font-size: 13px; margin: 0; }

.chapter-nav {
  display: flex; justify-content: space-between; align-items: stretch; gap: 12px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border);
}
.chapter-nav-link {
  flex: 1; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-align: center; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.chapter-nav-link:hover { border-color: var(--accent); color: var(--accent); }
.chapter-nav-link.toc { flex: none; min-width: 72px; }
.chapter-nav-link.prev { text-align: left; }
.chapter-nav-link.next { text-align: right; }
.chapter-nav-link.disabled { color: var(--muted); background: var(--surface-2); border-color: var(--border); cursor: default; }
.chapter-nav-link.disabled:hover { color: var(--muted); border-color: var(--border); }

@media (max-width: 640px) {
  .bg-building img { height: 46vh; }
  .chapter-nav { flex-direction: column; }
  .chapter-nav-link.prev, .chapter-nav-link.next { text-align: center; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 28px; }
  .novel-title { font-size: 25px; }
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 8px 6px; }
}

/* ===== 类型选择（后台） ===== */
.type-options { display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.radio input { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* ===== 说说 ===== */
.moment-feed { display: grid; gap: 14px; }
.moment-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.moment-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.moment-body { font-size: 16px; line-height: 1.8; margin-bottom: 12px; }
.moment-body p { margin: 0; }
.moment-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.moment-time { color: var(--muted); }
.moment-comments { color: var(--accent); }

.moment-detail { margin-bottom: 30px; }
.moment-detail .moment-body { font-size: 17px; line-height: 1.9; margin: 18px 0 12px; }
.moment-detail .moment-body p { margin: 0 0 1em; }
.moment-detail .moment-time { font-size: 13px; color: var(--muted); }

/* ===== 关于页 ===== */
.about-title { font-family: var(--serif); font-size: 26px; margin: 8px 0 20px; }

/* ===== 折叠开关：收起正文与评论区，好完整观看背景布景 ===== */
.fold-toggle {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 112px;
  text-align: center;
  z-index: 5;
  padding: 8px 0;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity .15s ease, color .15s ease, border-color .15s ease;
}
.fold-toggle:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
.fold-toggle .fold-open { display: none; }
html.folded .fold-toggle .fold-shut { display: none; }
html.folded .fold-toggle .fold-open { display: inline; }

/* 提示贴图：摆在按钮左边轻轻晃动；折起后、以及用过一次之后都自动退场 */
.fold-hint {
  position: fixed;
  right: 134px;
  bottom: 16px;
  z-index: 5;
  pointer-events: none;
  transform-origin: 50% 80%;
  animation: fold-hint-bob 1.8s ease-in-out infinite;
}
.fold-hint img { display: block; width: 104px; height: auto; }
@keyframes fold-hint-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
/* 常驻：折起时也留着，作为页尾的「整活」视觉元素 */

/* 三支「雷霆红箭头」：绕着收起按钮，一闪一闪指着它 */
/* 霓虹灯箭头：不给大片黑底，只让深色底板贴着箭头各长出一小圈，点上圆点灯 */
.thunder-group {
  position: fixed;
  right: 18px;
  bottom: 58px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  pointer-events: none;
}
.thunder {
  height: 58px;
  width: auto;
  animation: neon-flicker 4.2s ease-in-out infinite;
}
/* 黑底照着箭头轮廓绕一圈：同形状的粗黑描边垫在灯管下面 */
.thunder .back path,
.thunder .back polygon {
  fill: #0e0b0b;
  stroke: #0e0b0b;
  stroke-width: 16;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.thunder .lit {
  filter:
    drop-shadow(0 0 1.5px #fff)
    drop-shadow(0 0 4px var(--neon))
    drop-shadow(0 0 8px var(--neon));
}
.thunder .shaft-glow,
.thunder .shaft-core { fill: none; stroke-linecap: round; }
.thunder .shaft-glow { stroke: var(--neon); stroke-width: 5; }
.thunder .shaft-core { stroke: #fff; stroke-width: 1.7; opacity: .95; }
.thunder .head-glow { fill: var(--neon); }
.thunder .head-core { fill: #fff; opacity: .95; }
.thunder .dots {
  fill: var(--neon);
  filter: drop-shadow(0 0 3px var(--neon)) drop-shadow(0 0 8px var(--neon));
}
.thunder.t1 { --neon: #ff2d55; animation-delay: 0s; }
.thunder.t2 { --neon: #00e5ff; animation-delay: .5s; }
.thunder.t3 { --neon: #6cff3d; animation-delay: 1s; }
@keyframes neon-flicker {
  0%, 17%, 21%, 24%, 52%, 57%, 100% { opacity: 1; }
  19%, 23%, 55% { opacity: .32; }
  90% { opacity: .62; }
  93% { opacity: 1; }
}
@media (max-width: 640px) {
  .thunder-group { right: 12px; bottom: 52px; gap: 3px; padding: 6px 8px 5px; }
  .thunder { width: 15px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .thunder { animation: none; }
}
@media (max-width: 640px) {
  .fold-hint { right: 100px; bottom: 12px; }
  .fold-hint img { width: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .fold-hint { animation: none; }
}

/* ===== 折叠收放：用网格行高做过渡（grid-template-rows 可动画，display 不行） =====
   高度与透明度必须同长：透明度若提前结束，收起会显得比展开快。
   想整体再快/再慢，改下面这两个 1s（以及底部 padding 那处）。 */
.fold-body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 1s cubic-bezier(.4, 0, .2, 1), opacity 1s ease;
}
.fold-inner { min-height: 0; overflow: hidden; }
html.folded .fold-body { grid-template-rows: 0fr; opacity: 0; }

/* 折起时不留布景空档，好让三栋楼完整露出来 */
html.folded .page-main:has(.novel-content) > .container { padding-bottom: 64px; }

/* ===== 正文不压楼 =====
   有长正文的页面（章节 / 单篇 / 关于），在正文下方留出一屏布景的高度，
   于文字永远落在雾气般的远景上，三栋近景楼永远在文字之下，互不干扰。 */
.page-main:has(.novel-content) > .container {
  padding-bottom: calc(74vh + 20px);
  transition: padding-bottom 1s cubic-bezier(.4, 0, .2, 1);
}

/* ===== 窄屏（手机）适配 =====
   桌面那套是「按屏高 vh 排楼体 + 底部左右各摆装饰」，到手机上两处都会出问题：
   一栋楼能宽过整屏；底部五样装饰挤成一排、还压住正文。下面逐一收拾。 */
@media (max-width: 640px) {
  /* 手机端不做重新排版，只把整幅布景「等比缩小」——与电脑端构图完全一致。
     电脑端的定位用 %（跟屏宽走）、尺寸用 vh（跟屏高走）；这里把 vh 按 1vh ≈ 0.5vw 折算成 vw，
     位置 % 原样不动。于是圆楼压着城门、主楼压着城门、1号 压着橙楼、奔出屏右……这些关系全都保留。 */
  .bg-building img { height: 35vw; }
  .bg-gate img { width: 21vw; }
  .bg-tower img { height: 26.5vw; }
  .bg-b6 img { height: 17vw; }
  .bg-b5 { left: calc(57% + 16.5vw); }
  .bg-b5 img { height: 17vw; }
  .bg-b1 { left: calc(57% + 25vw); }
  .bg-b1 img { height: 17vw; }

  /* 右侧三栋照旧参与排布（早先那版把它们整排收起，现已解除；只留 1号 让位） */

  /* 阅读页给楼体留的底距：与楼体同步，按 74vh ≈ 37vw 折算 */
  .page-main:has(.novel-content) > .container { padding-bottom: calc(37vw + 20px); }
  html.folded .page-main:has(.novel-content) > .container { padding-bottom: 60px; }

  /* 其余页面在底部留出空间，好让内容能滚过底部那一排装饰 */
  .page-main > .container { padding-bottom: 88px; }

  /* 左下角：背景按钮 + 三块冰，整体收小 */
  .bg-picker { left: 10px; bottom: 12px; gap: 4px; }
  .bg-picker-toggle { font-size: 12px; padding: 5px 11px; }
  .bg-picker-ice img { height: 26px; }
  .bg-picker-panel { min-width: 168px; padding: 10px 12px 12px; bottom: 40px; }
  .bg-opt { width: 54px; font-size: 10px; }
  .bg-opt img, .bg-opt-blank { width: 42px; height: 27px; }

  /* 右下角：折叠按钮、贴纸、霓虹箭头，一起收小并左右错开，互不重叠 */
  .fold-toggle { right: 10px; bottom: 12px; width: 88px; font-size: 12px; padding: 5px 0; }
  .fold-hint { right: 102px; bottom: 6px; }
  .fold-hint img { width: 54px; }
  .thunder-group { right: 10px; bottom: 44px; gap: 3px; }
  .thunder { height: 38px; }

  /* 底部那排装饰会压住页脚文字：页脚改成上下排列，并留足高度让文字完全浮在上面 */
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 100px;
  }

  /* 手机端改用竖版彩蛋（egg-portrait，比例 0.46）：它本就是照着手机形状做的，
     铺满即完整，不必再裁，所以这里不再需要 object-position 那套权宜之计。 */

  /* 页头在窄屏上要收一档：站名与导航挨太宽的话，「关于」会被挤出屏外 */
  .header-inner { height: 54px; }
  .brand-title { font-size: 17px; }
  .brand-tagline { font-size: 10px; letter-spacing: .05em; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 14px; }
}
