/* ============================================================
   Pluviophile 设计系统
   规则：所有矩形圆角 ≥ 16px；毛玻璃卡片；赛博滚动条
   ============================================================ */

:root {
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --glass: rgba(255, 255, 255, .88);
  --glass-strong: rgba(255, 255, 255, .96);
  --line: rgba(255, 255, 255, .62);
  --ink: #1f2329;
  --ink-2: #5b6068;
  --ink-3: #8a8f98;
  --accent: #5b8def;
  --shadow: 0 12px 34px -16px rgba(6, 20, 36, .45);
}

/* ---------- 全局 ---------- */
html { background: #16283d !important; font-size: 112.5%; }
body { background: linear-gradient(135deg, #243d54, #101a2a) fixed !important; }
body {
  color: var(--ink);
  font-size: 17.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
img { max-width: 100%; }

/* 静态背景同时作为视频未播放时的底图 */
#static-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
#static-bg img { display: block; width: 100%; height: 100%; object-fit: cover; }
#static-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(#10203450, #10203490);
}
html.has-video-bg #static-bg { visibility: hidden; }
html:not(.has-video-bg) #bg-video,
html:not(.has-video-bg) #bg-mask { visibility: hidden; }

/* 背景视频层（由 appearance.js 注入） */
#bg-video {
  position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
#bg-mask {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,20,34,.45), rgba(8,20,34,.18) 30%, rgba(8,20,34,.55));
}
html.has-video-bg body { background-image: none !important; background-color: #0a1420 !important; }

/* 特效画布 */
#fx-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
}

/* 内容层级 */
#page-header, #nav, #content-inner, #footer, #rightside, .layout { position: relative; z-index: 3; }

/* ---------- 顶部毛玻璃导航 ---------- */
#nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  height: 58px; padding: 0 22px; margin: 0 auto;
  background: rgba(10, 22, 36, .46);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
}
#nav #blog_name a {
  display: flex; align-items: center; gap: 9px;
  color: #fff; font-weight: 700; font-size: 17px; text-decoration: none;
}
#nav #nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55); object-fit: cover;
}
#nav #menus { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
#nav .nav-item {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 999px;
  color: rgba(255, 255, 255, .92); font-size: 16.5px; text-decoration: none;
  transition: background .18s, color .18s; white-space: nowrap;
}
#nav .nav-item:hover { background: rgba(255, 255, 255, .14); color: #fff; }
#nav .nav-icon-txt { font-size: 16px; }
#nav .nav-caret { font-size: 12px; opacity: .65; margin-left: 2px; }
#nav .nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 150px; padding: 8px; border-radius: var(--r-md);
  background: rgba(12, 24, 38, .92); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s;
}
#nav .nav-parent[open] .nav-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
#nav .nav-sub {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 10px;
  color: rgba(255, 255, 255, .86); font-size: 15px; text-decoration: none;
}
#nav .nav-sub:hover { background: rgba(255, 255, 255, .14); color: #fff; }
#nav #nav-right { display: flex; align-items: center; gap: 10px; }
#nav .nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; font-size: 16px; text-decoration: none;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .16);
  transition: background .18s, transform .18s;
}
#nav .nav-icon:hover { background: rgba(255, 255, 255, .24); transform: translateY(-1px); }

/* 隐藏主题原有的右侧栏/回到顶部等 */
#rightside, #sidebar, #toggle-menu, #nav #meihua-button, #nav .sun_moon { display: none !important; }

/* ---------- 布局 ---------- */
#content-inner, .layout { max-width: 1480px; margin: 0 auto; padding: 0 20px; }
#page { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0 40px; }
#page > #recent-posts { flex: 1 1 auto; min-width: 0; }
#aside-content { flex: 0 0 320px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- 三合一卡 ---------- */
#hero-card {
  position: relative; margin-bottom: 16px; padding: 14px;
  border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(10px); overflow: hidden;
}
#hero-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-item {
  display: block; overflow: hidden; border-radius: var(--r-lg); text-decoration: none;
  background: rgba(255, 255, 255, .6); transition: transform .25s ease, box-shadow .25s ease;
}
.hero-item:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -18px rgba(6, 20, 36, .5); }
.hero-cover {
  height: 168px; background-size: cover; background-position: center;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.hero-info { padding: 10px 12px 12px; }
.hero-date { font-size: 13.5px; color: var(--ink-3); }
.hero-title {
  margin: 6px 0 0; font-size: 17.5px; font-weight: 700; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-desc {
  margin: 6px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#hero-footer { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 0 4px; }
.hero-hint { font-size: 14px; color: var(--ink-3); }
#hero-dots { display: flex; gap: 6px; margin-left: auto; }
#hero-dots .hero-dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(31, 35, 41, .22);
  cursor: pointer; transition: background .2s, width .2s;
}
#hero-dots .hero-dot.on { width: 18px; border-radius: 4px; background: var(--accent); }
.hero-arrows { display: flex; gap: 6px; }
.hero-arrows button {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(31,35,41,.14);
  background: rgba(255,255,255,.8); color: var(--ink); cursor: pointer; line-height: 1;
}
.hero-arrows button:hover { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------- 今日语录 ---------- */
#quote-card {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding: 16px 20px;
  border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--ink-2); font-size: 16px; line-height: 1.7;
}
#quote-card .quote-mark { font-size: 36px; line-height: 1; color: var(--accent); opacity: .6; }
#quote-card #quote-text { flex: 1 1 auto; font-family: 'Songti SC', 'SimSun', serif; letter-spacing: .03em; color: var(--ink); font-size: 18px; line-height: 1.85; }
#quote-card #quote-from {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto; margin-inline-start: auto; padding: 4px 8px;
  border-radius: 10px; color: #465970; font-size: 15px; text-decoration: none;
}
#quote-card #quote-from:hover { background: rgba(91, 141, 239, .12); color: #285d9e; }

/* ---------- 文章卡片（三列） ---------- */
#recent-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px -20px rgba(6, 20, 36, .55); }
.post-card.is-pinned { border-color: rgba(240, 160, 48, .55); }
.post-cover {
  position: relative; display: block; height: 190px;
  background-size: cover; background-position: center;
}
.pin-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 2px 9px; border-radius: 999px; font-size: 13px;
  background: linear-gradient(120deg, #f0a030, #ef7b45); color: #fff;
}
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.post-title {
  color: var(--ink); font-size: 20px; font-weight: 700; text-decoration: none; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-title:hover { color: var(--accent); }
.post-desc {
  margin: 0; font-size: 16px; color: var(--ink-2); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.post-cat { padding: 0 7px; border-radius: 999px; background: rgba(91, 141, 239, .12); color: #3f6fc4; }
.post-tags { color: var(--ink-3); }

.post-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 22px 0; font-size: 15px; }
.post-pagination a { padding: 6px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.page-now { color: var(--ink-3); }

/* ---------- 右侧栏卡片 ---------- */
.side-card {
  padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.side-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.author-top { text-align: center; }
.author-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 8px 20px -10px rgba(6, 20, 36, .5);
}
.author-name { margin-top: 8px; font-size: 18px; font-weight: 700; }
.author-motto { margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.author-nums { display: flex; justify-content: space-around; margin: 14px 0 12px; text-align: center; }
.author-nums b { display: block; font-size: 19px; }
.author-nums span { font-size: 13.5px; color: var(--ink-3); }
.author-btn {
  display: block; text-align: center; padding: 8px; border-radius: 999px;
  background: rgba(91, 141, 239, .14); color: #3f6fc4; font-size: 15px; text-decoration: none;
}
.author-btn:hover { background: var(--accent); color: #fff; }

#calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 14px; text-align: center; }
#calendar-grid .cal-head { color: var(--ink-3); padding: 2px 0; }
#calendar-grid .cal-day {
  position: relative; padding: 5px 0; border-radius: 9px; color: var(--ink-2);
  background: rgba(127, 127, 127, .06);
}
#calendar-grid .cal-day.has-post {
  background: #c5dcff; color: #184f9f; font-weight: 700; text-decoration: none;
}
#calendar-grid .cal-day.has-post:hover { background: #b5d2ff; }
#calendar-grid .cal-day.today { color: #b4232c; font-weight: 700; }
#calendar-grid .cal-day.empty { background: transparent; }

.webinfo-list { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.webinfo-list li { display: flex; justify-content: space-between; padding: 6px 0; color: var(--ink-2); }
.webinfo-list li + li { border-top: 1px dashed rgba(127, 127, 127, .18); }
.webinfo-list b { color: var(--ink); font-weight: 600; }

/* ---------- 大屏 ---------- */
#page-header.full_page {
  position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center;
  background: transparent !important;
}
#page-header #site-info { text-align: center; color: #fff; }
#page-header #site-title { font-size: 46px; letter-spacing: .06em; text-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
#page-header #site-subtitle { margin-top: 10px; font-size: 17px; opacity: .85; }
#scroll-down { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: #fff; opacity: .7; animation: down 1.8s infinite; }
@keyframes down { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- 赛博滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(10, 22, 36, .35); border-radius: 999px; }
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, #2ee6d6, #5b8def 45%, #b45bff);
  box-shadow: 0 0 10px rgba(46, 230, 214, .75), inset 0 0 6px rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .25);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6bfff0, #7ba7ff 50%, #d08bff); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  #page { flex-direction: column; }
  #aside-content { flex: 1 1 auto; width: 100%; flex-direction: row; flex-wrap: wrap; }
  #aside-content .side-card { flex: 1 1 260px; }
  #recent-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #nav #menus { display: none; }
  #recent-posts { grid-template-columns: 1fr; }
  #hero-grid { grid-template-columns: 1fr; }
  #page-header #site-title { font-size: 32px; }
}

/* ============================================================
   布局修正 & 主题残留清理
   ============================================================ */

/* 主题背景层与加载层：隐藏（我们自己管背景与加载） */
#web_bg, #loading-box, #myscoll { display: none !important; }

/* 主题原有的内容区无布局规则，这里定义为 左内容 + 右侧栏 */
main#content-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 20px 48px;
  align-items: start;
}
main#content-inner > #hero-card { grid-column: 1; }
main#content-inner > #quote-card { grid-column: 1; }
main#content-inner > #recent-posts { grid-column: 1; }
main#content-inner > #aside-content { grid-column: 2; grid-row: 1 / span 3; }
main#content-inner.hide-aside { grid-template-columns: minmax(0, 1fr); }

/* 文章页/普通页：正文占满，侧栏右侧 */
#content-inner.layout { display: grid; }
#content-inner > article, #content-inner > #post, #content-inner > #page { grid-column: 1; }

#aside-content { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 14px; }

/* 大屏高度与标题 */
#page-header.full_page { min-height: 78vh; }
#page-header #site-info { padding: 0 20px; }

/* 页脚 */
#footer { color: rgba(255, 255, 255, .78); text-align: center; padding: 18px 20px 30px; font-size: 14.5px; }
#footer a { color: rgba(255, 255, 255, .9); }

/* 搜索弹层 */
#pv-search-mask {
  position: fixed; inset: 0; z-index: 99995; display: none;
  background: rgba(6, 14, 24, .55); backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center; padding-top: 12vh;
}
#pv-search-mask.open { display: flex; }
#pv-search-panel {
  width: min(680px, 92vw); border-radius: 22px; overflow: hidden;
  background: rgba(14, 26, 40, .96); border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
#pv-search-panel .pv-search-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
#pv-search-input {
  flex: 1 1 auto; border: 0; outline: 0; background: transparent; color: #fff; font-size: 17px;
  font-family: inherit; padding: 6px 4px;
}
#pv-search-close { border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
#pv-search-list { max-height: 58vh; overflow: auto; padding: 8px; }
.pv-search-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.pv-search-item:hover { background: rgba(255, 255, 255, .1); }
.pv-search-item b { color: #fff; font-size: 15.5px; }
.pv-search-item span { color: rgba(255, 255, 255, .62); font-size: 14px; }
.pv-search-empty { color: rgba(255, 255, 255, .6); font-size: 15px; text-align: center; padding: 18px; }

@media (max-width: 1080px) {
  main#content-inner { grid-template-columns: minmax(0, 1fr); }
  main#content-inner > #aside-content { grid-column: 1; grid-row: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  main#content-inner > #aside-content .side-card { flex: 1 1 240px; }
}

/* ============================================================
   强制层：压过主题 CSS（主题样式表先加载，我们后加载，同权重后胜；
   这里再加 !important 消除 flex/宽度等历史规则的影响）
   ============================================================ */
main#content-inner, #content-inner.layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px !important;
  gap: 18px !important;
  max-width: 1480px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 18px 20px 48px !important;
  float: none !important;
}
#content-inner > #hero-card,
#content-inner > #quote-card,
#content-inner > #recent-posts { grid-column: 1 !important; width: 100% !important; float: none !important; }
#content-inner > #aside-content { grid-column: 2 !important; grid-row: 1 / span 3 !important; width: 320px !important; float: none !important; }
#recent-posts {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}
#hero-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; }
#nav {
  position: sticky !important; top: 0 !important; left: 0 !important; right: 0 !important;
  width: 100% !important; height: 58px !important; margin: 0 !important;
  display: flex !important; align-items: center !important; gap: 18px !important;
  background: rgba(10, 22, 36, .46) !important;
  backdrop-filter: blur(16px) saturate(150%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
}
#nav .nav-item, #nav #blog_name a { text-decoration: none !important; }
#page-header { background-image: none !important; }
#page-header.full_page { min-height: 76vh !important; }
#rightside, #sidebar, #sidebar-menus, #menu-mask, #toggle-menu { display: none !important; }
#nav #menus { display: flex !important; }

@media (max-width: 1080px) {
  main#content-inner, #content-inner.layout { grid-template-columns: minmax(0, 1fr) !important; }
  #content-inner > #aside-content { grid-column: 1 !important; grid-row: auto !important; width: 100% !important; }
  #recent-posts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  #recent-posts { grid-template-columns: 1fr !important; }
  #hero-grid { grid-template-columns: 1fr !important; }
  #nav #menus { display: none !important; }
}

/* 背景 / 特效 / 字体 / 音乐 / 猫咪 —— 共用样式 */
#ui-panel {
  position: fixed; top: 76px; right: 24px; z-index: 99990; width: 340px;
  padding: 14px 16px 16px; border-radius: 22px; color: #fff;
  background: rgba(12, 24, 38, .93); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); display: none;
}
#ui-panel.open { display: block; }
#ui-panel .ui-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .16);
  font-size: 16px; font-weight: 700; cursor: move;
}
#ui-panel .ui-close { cursor: pointer; opacity: .6; font-style: normal; font-size: 15px; }
#ui-panel .ui-close:hover { opacity: 1; }
#ui-panel .ui-sec { margin-bottom: 12px; }
#ui-panel .ui-sec:last-child { margin-bottom: 0; }
#ui-panel .ui-label { font-size: 13.5px; color: rgba(255, 255, 255, .55); margin-bottom: 6px; }
#ui-panel .ui-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#ui-panel .ui-chips button {
  appearance: none; font-family: inherit; font-size: 14px; cursor: pointer;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .88);
  transition: background .18s, color .18s;
}
#ui-panel .ui-chips button:hover { background: rgba(255, 255, 255, .18); }
#ui-panel .ui-chips button.on { background: #fff; color: #16243a; border-color: #fff; font-weight: 700; }

/* 音乐迷你播放器 */
#music-box {
  position: fixed; left: 18px; bottom: 18px; z-index: 99980;
  display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 999px;
  background: rgba(10, 22, 36, .58); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .9);
  font-size: 14.5px; max-width: 280px;
}
#music-box .mb-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 13px;
}
#music-box .mb-btn:hover { background: rgba(91, 141, 239, .85); }
#music-box .mb-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 猫咪 */
.pv-cat {
  position: fixed; left: 0; top: 0; width: 88px; height: 88px; z-index: 99970;
  cursor: grab; will-change: transform; transform-origin: 50% 90%;
  transition: filter .2s ease;
}
.pv-cat.grabbed { cursor: grabbing; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .45)); }
.pv-cat .cat-body {
  position: absolute; left: 12px; bottom: 6px; width: 64px; height: 46px;
  border-radius: 50% 50% 46% 46%; background: var(--cat-color, #f4a259);
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .06);
}
.pv-cat .cat-head {
  position: absolute; left: 18px; top: 12px; width: 52px; height: 46px;
  border-radius: 50%; background: var(--cat-color, #f4a259);
}
.pv-cat .cat-ear {
  position: absolute; top: 2px; width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 14px solid var(--cat-color, #f4a259);
}
.pv-cat .cat-ear.left { left: 20px; transform: rotate(-14deg); }
.pv-cat .cat-ear.right { right: 20px; transform: rotate(14deg); }
.pv-cat .cat-eye {
  position: absolute; top: 30px; width: 7px; height: 9px; border-radius: 50%;
  background: #2b2f36;
}
.pv-cat .cat-eye.left { left: 30px; }
.pv-cat .cat-eye.right { right: 30px; }
.pv-cat .cat-nose {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 4px; border-radius: 0 0 4px 4px; background: #e07a8b;
}
.pv-cat .cat-tail {
  position: absolute; right: 2px; bottom: 16px; width: 22px; height: 10px;
  border-radius: 999px; background: var(--cat-color, #f4a259);
  transform-origin: right center; animation: cat-tail 2.4s ease-in-out infinite;
}
@keyframes cat-tail { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); } }
.pv-cat.walking .cat-body { animation: cat-walk .5s ease-in-out infinite; }
@keyframes cat-walk { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* 八宝箱 / 页面样式：统一圆角 + 各自风格 */
#pv-page { max-width: 1480px; margin: 0 auto; padding: 24px 20px 60px; }
#pv-root { display: flex; flex-direction: column; gap: 16px; }
.pv-head h1 { margin: 0; font-size: 28px; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.pv-head p { margin: 6px 0 0; font-size: 15px; color: rgba(255,255,255,.78); }
.pv-loading { color: rgba(255,255,255,.8); font-size: 16px; }
.pv-card, .pv-paper, .pv-arcade, .pv-guestbook {
  padding: 18px 20px; border-radius: 22px;
  background: var(--glass, rgba(255,255,255,.88)); border: 1px solid var(--line, rgba(255,255,255,.62));
  box-shadow: var(--shadow, 0 12px 34px -16px rgba(6,20,36,.45));
}
.pv-card h2 { margin: 0 0 12px; font-size: 17px; color: var(--ink, #1f2329); }
.pv-btn {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 15px;
  padding: 7px 16px; border-radius: 999px; border: 0; color: #fff;
  background: linear-gradient(120deg, #5b8def, #7c5ce0);
}

/* 分类 */
.pv-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pv-cat-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  border-radius: 20px; text-decoration: none; color: #fff;
  background: linear-gradient(140deg, var(--c, #5b8def), rgba(12,24,38,.85));
  box-shadow: 0 14px 30px -18px rgba(6,20,36,.7);
  transition: transform .2s ease;
}
.pv-cat-card:hover { transform: translateY(-3px); }
.pv-cat-card b { font-size: 19px; }
.pv-cat-card span { font-size: 14px; opacity: .82; }

/* 统计 */
.pv-heat-grid { display: grid; grid-template-rows: repeat(7, 10px); grid-auto-flow: column; gap: 3px; }
.pv-heat-cell { width: 10px; height: 10px; border-radius: 3px; display: block; }
.pv-rose, .pv-cloud { display: block; max-width: 100%; }

/* 书斋（古风）*/
.pv-paper {
  background: linear-gradient(#fbf6ea, #f6efdd); border: 1px solid #e2d6b8;
  box-shadow: inset 0 0 40px rgba(190,160,110,.12);
}
#pv-page[data-kind="study"] .pv-head h1 { color: #f3e7c9; font-family: 'Songti SC', 'SimSun', serif; letter-spacing: .2em; }
.pv-quote { display: flex; gap: 14px; padding: 12px 6px; border-bottom: 1px dashed rgba(150,120,70,.28); font-family: 'Songti SC', 'SimSun', serif; }
.pv-quote:last-child { border-bottom: 0; }
.pv-quote-idx { flex: 0 0 auto; color: #a8865a; font-size: 15px; }
.pv-quote-text { color: #4a3a26; font-size: 17.5px; line-height: 1.9; letter-spacing: .04em; }

/* 乐坊 */
.pv-music-list { display: grid; gap: 12px; }
.pv-music {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-radius: 18px; background: var(--glass, rgba(255,255,255,.88));
  border: 1px solid var(--line, rgba(255,255,255,.62)); box-shadow: var(--shadow, 0 12px 34px -16px rgba(6,20,36,.45));
}
.pv-disc {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 50% 50%, #222 0 22%, #3a3f47 22% 60%, #1b1e23 60% 100%);
  border: 2px solid rgba(255,255,255,.35);
}
.pv-music.playing .pv-disc { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pv-music-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.pv-music-info b { font-size: 16px; color: var(--ink, #1f2329); }
.pv-music-info span { font-size: 14px; color: var(--ink-3, #8a8f98); }
.pv-play {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(91,141,239,.16); color: #3f6fc4; font-size: 14px;
}
.pv-music.playing .pv-play { background: #5b8def; color: #fff; }

/* 画廊 */
.pv-gallery { columns: 3 220px; column-gap: 14px; }
.pv-photo { display: block; margin-bottom: 14px; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 28px -18px rgba(6,20,36,.6); }
.pv-photo img { display: block; width: 100%; transition: transform .3s ease; }
.pv-photo:hover img { transform: scale(1.04); }

/* 街机厅（像素）*/
#pv-page[data-kind="arcade"] .pv-head h1 { font-family: 'Courier New', monospace; letter-spacing: .1em; color: #7bffef; text-shadow: 0 0 12px rgba(46,230,214,.8); }
.pv-arcade {
  background: #0d1117; border: 2px solid #2ee6d6; box-shadow: 0 0 0 2px rgba(46,230,214,.25), 0 0 30px rgba(46,230,214,.35);
  image-rendering: pixelated;
}
.pv-snake { display: block; width: 100%; max-width: 480px; border-radius: 12px; background: #0d1117; }
.pv-arcade-hud { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: #7bffef; font-family: 'Courier New', monospace; font-size: 15px; }

/* 网址导航 / 友人帐 */
.pv-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pv-link {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  border-radius: 18px; text-decoration: none; color: var(--ink, #1f2329);
  background: var(--glass, rgba(255,255,255,.88)); border: 1px solid var(--line, rgba(255,255,255,.62));
  box-shadow: var(--shadow, 0 12px 34px -16px rgba(6,20,36,.45)); transition: transform .2s ease;
}
.pv-link:hover { transform: translateY(-3px); }
.pv-link b { font-size: 16px; }
.pv-link span { font-size: 14px; color: var(--ink-3, #8a8f98); word-break: break-all; }

/* 留言板 */
.pv-guestbook { display: flex; flex-direction: column; gap: 10px; }
.pv-guestbook textarea {
  min-height: 88px; padding: 12px; border-radius: 14px; font-family: inherit; font-size: 15.5px;
  border: 1px solid rgba(127,127,127,.25); background: rgba(255,255,255,.7); resize: vertical;
}
.pv-guestbook .pv-btn { align-self: flex-end; }
.pv-notes { display: flex; flex-direction: column; gap: 10px; }
.pv-note {
  padding: 12px 16px; border-radius: 16px; background: var(--glass, rgba(255,255,255,.88));
  border: 1px solid var(--line, rgba(255,255,255,.62)); box-shadow: var(--shadow, 0 12px 34px -16px rgba(6,20,36,.45));
}
.pv-note-time { font-size: 13.5px; color: var(--ink-3, #8a8f98); }
.pv-note p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.7; color: var(--ink, #1f2329); }

/* ============================================================
   文档页（文章 / 页面）
   ============================================================ */
#pv-doc {
  grid-column: 1;
  padding: 30px 38px 40px; border-radius: var(--r-xl);
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
  min-width: 0;
}
.pv-doc-title { margin: 0 0 8px; font-size: 31px; color: var(--ink); line-height: 1.4; }
.pv-post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15.5px; color: var(--ink-3); margin-bottom: 18px; }
.pv-dot { opacity: .5; }
.pv-doc-body { font-size: 19px; line-height: 2.05; color: #2b3038; }
.pv-doc-body h1, .pv-doc-body h2, .pv-doc-body h3 { margin: 26px 0 12px; color: var(--ink); line-height: 1.5; }
.pv-doc-body h2 { font-size: 25px; }
.pv-doc-body h3 { font-size: 21px; }
.pv-doc-body p { margin: 0.5em 0; }
.pv-doc-body a { color: #3f6fc4; text-decoration: none; border-bottom: 1px dashed rgba(63,111,196,.45); }
.pv-doc-body img { border-radius: 16px; margin: 10px 0; }
.pv-doc-body blockquote {
  margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--accent);
  border-radius: 12px; background: rgba(91,141,239,.08); color: var(--ink-2);
}
.pv-doc-body code { padding: 2px 6px; border-radius: 6px; background: rgba(127,127,127,.12); font-size: 15px; }
.pv-doc-body pre {
  margin: 16px 0; padding: 16px 18px; border-radius: 16px; overflow: auto;
  background: #10161f; color: #d7e2f0; font-size: 15px; line-height: 1.7;
}
.pv-doc-body pre code { background: transparent; padding: 0; color: inherit; }
.pv-doc-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15.5px; }
.pv-doc-body th, .pv-doc-body td { padding: 8px 12px; border-bottom: 1px solid rgba(127,127,127,.16); text-align: left; }
.pv-doc-body ul, .pv-doc-body ol { padding-left: 22px; }
.pv-doc-body li { margin: 6px 0; }

.pv-post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 16px; border-top: 1px dashed rgba(127,127,127,.2); font-size: 15px; }
.pv-post-nav a { color: #3f6fc4; text-decoration: none; max-width: 46%; }

/* 归档 / 分类 / 标签列表 */
#pv-list { grid-column: 1; padding: 24px 26px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pv-year { margin: 18px 0 8px; font-size: 17px; color: var(--ink-3); }
.pv-list-item { display: flex; gap: 12px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.pv-list-item:hover { background: rgba(91,141,239,.1); }
.pv-list-date { flex: 0 0 84px; color: var(--ink-3); font-size: 14.5px; }
.pv-list-title { flex: 1 1 auto; }

/* 页脚 */
#footer { padding: 22px 20px 40px; text-align: center; color: rgba(255,255,255,.75); font-size: 14.5px; }
#footer p { margin: 4px 0; }
#footer .divider { margin: 0 8px; opacity: .5; }
#footer a { color: rgba(255,255,255,.9); text-decoration: none; }
/* ============================================================
   最终覆盖：固定导航 + 大屏居中 + 自适应卡片网格
   ============================================================ */
#nav {
  position: fixed !important; top: 0; left: 0; right: 0;
  z-index: 60 !important; height: 56px !important;
  margin: 0 !important; border-radius: 0 !important;
}
#body-wrap { padding-top: 56px; }
#page-header.full_page {
  min-height: calc(100vh - 56px) !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  background: transparent !important; position: relative;
}
#page-header #site-info { text-align: center !important; color: #fff; width: 100%; }
#page-header #site-title {
  font-size: 48px; font-weight: 700; letter-spacing: .05em; margin: 0;
  text-shadow: 0 6px 28px rgba(0, 0, 0, .5);
}
#page-header #site-subtitle { margin-top: 12px; font-size: 17px; opacity: .86; letter-spacing: .08em; }
#page-header #scroll-down { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: #fff; opacity: .75; font-size: 20px; }

#hero-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }
#hero-card { min-height: 210px; }

@media (max-width: 720px) {
  #page-header #site-title { font-size: 32px; }
  #page-header.full_page { min-height: calc(92vh - 56px) !important; }
}

/* ============================================================
   本地字体（woff2 子集，覆盖 GB2312 6763 字）
   ============================================================ */
@font-face { font-family: 'LXGW WenKai'; src: url('/fonts/lxgw-wenkai.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'LXGW WenKai'; src: url('/fonts/lxgw-wenkai-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Qiuhong Kai'; src: url('/fonts/qiuhong-kai.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Kuiben Kai'; src: url('/fonts/kuiben-kai.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Wending Kai'; src: url('/fonts/wending-kai.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'TW Sung'; src: url('/fonts/tw-sung.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Black Matrix'; src: url('/fonts/black-matrix.woff2') format('woff2'); font-display: swap; }

/* 点击展开的下拉菜单（替代 hover-only） */
#ui-panel .ui-vol { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#ui-panel .ui-vol input[type=range] { flex: 1 1 auto; accent-color: #5b8def; }
#ui-panel .ui-vol span { font-size: 13.5px; color: rgba(255,255,255,.6); min-width: 34px; text-align: right; }

/* ============================================================
   阅读体验：正文更大、页脚贴底、文章页不留半空
   ============================================================ */
#body-wrap { display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
#content-inner { flex: 1 1 auto; }
.pv-doc-body { font-size: 20px !important; line-height: 2.05 !important; }
.pv-doc-body p { font-size: 20px; margin: 0.5em 0; }
.pv-doc-body li { font-size: 20px; }
.pv-doc-body h2 { font-size: 27px !important; margin: 30px 0 14px !important; }
.pv-doc-body h3 { font-size: 22px !important; margin: 24px 0 12px !important; }
.pv-doc-body blockquote { font-size: 19.5px; }
.pv-doc-body code { font-size: 17px; }
.pv-doc-body pre { font-size: 16.5px; line-height: 1.8; }
.pv-doc-body table { font-size: 17.5px; }
.pv-doc-body table th, .pv-doc-body table td { padding: 10px 14px; }
#pv-doc { align-self: start; }
.pv-post-meta { font-size: 16px; margin-bottom: 20px; }

/* 文章页标题（大屏）字号 */
#page-header.not-home-page #site-title { font-size: 42px; }

/* pv 页面：占满内容列，卡片自适应宽度 */
#pv-page {
  grid-column: 1;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 0 40px !important;
}
#pv-root { display: flex; flex-direction: column; gap: 18px; width: 100%; align-items: stretch; }
#pv-page .pv-head h1 { font-size: 32px; }
#pv-page .pv-head p { font-size: 16px; }
.pv-paper { width: 100%; }
#pv-page .pv-card, #pv-page .pv-paper, #pv-page .pv-gallery, #pv-page .pv-links { width: 100%; }
#page-header.not-home-page { min-height: 56px; display: block; }
#page-header #site-info { padding: 28px 20px 10px; }


/* 空站状态卡 */
#pv-empty { grid-column: 1; padding: 40px 30px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
#pv-empty h2 { margin: 0 0 10px; font-size: 24px; color: var(--ink); }
#pv-empty p { margin: 0; font-size: 16.5px; color: var(--ink-2); line-height: 1.8; }
#pv-empty { grid-row: 1 / span 2; }


/* 视频封面 */
.cover-video, .hero-cover .cover-video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.post-cover.has-video { background: #0d1117; }

/* 中文排版：每段首行缩进 2 字符 */
.pv-doc-body p { text-indent: 2em; }
.pv-doc-body li { text-indent: 0; }
.pv-doc-body blockquote p { text-indent: 2em; }


/* 导航对齐：emoji 图标与文字统一基线 */
#nav .nav-item, #nav .nav-label, #nav .nav-sub { line-height: 1; }
#nav .nav-icon-txt {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25em; height: 1.25em; font-size: 17px; line-height: 1;
  vertical-align: middle;
}
#nav .nav-label { display: inline-flex; align-items: center; gap: 5px; font: inherit; }
#nav #menus > .nav-item { min-height: 36px; }
#nav #menus .nav-text { line-height: 1; }
#nav .nav-caret { margin-left: 3px; }

/* 阅读入口与可访问的原生控件 */
.pv-skip { position: fixed; left: 12px; top: 8px; z-index: 120; padding: 8px 14px; background: #fff; color: #18324b; transform: translateY(-150%); }
.pv-skip:focus { transform: none; }
:focus-visible { outline: 2px solid #4e95eb; outline-offset: 3px; }
#content-inner { scroll-margin-top: 68px; }
#nav summary { cursor: pointer; list-style: none; }
#nav summary::-webkit-details-marker { display: none; }
#nav button.nav-icon { cursor: pointer; padding: 0; min-width: 36px; }
#mobile-nav { display: none; }
#page-header.full_page { min-height: clamp(250px, 55svh, 540px) !important; }
#page-header #scroll-down { animation: none; border-radius: 999px; padding: 7px 15px; background: #132b44e6; text-decoration: none; opacity: 1; font-size: 16px; bottom: 18px; }
#recent-title { grid-column: 1 / -1; margin: 0; color: #fff; font-size: 24px; }
.post-card h3 { margin: 0; }
.post-card .post-cover img { height: 100%; object-fit: cover; }
.post-meta a, .pv-post-meta a, .stat-tag { color: #285d9e; }
.pv-post-meta { color: #4f5c6a; }
#pv-doc .pv-doc-body { max-width: 42em; margin-inline: auto; overflow-wrap: anywhere; }
.pv-doc-body table { display: block; max-width: 100%; overflow-x: auto; }
.pv-doc-body li p { text-indent: 0; }
.pv-cat-card:where(div) { opacity: .72; }
.arcade-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }

#pv-search-panel, #ui-panel {
  position: fixed; inset: 0; margin: auto; color: #f3f7ff;
  background: #102034; max-width: calc(100% - 24px); max-height: calc(100% - 24px);
}
#pv-search-panel { padding: 0; }
#pv-search-panel::backdrop, #ui-panel::backdrop { background: #07101caa; }
#pv-search-panel:not([open]), #ui-panel:not([open]), #music-box[hidden] { display: none; }
#ui-panel[open] { display: block; height: fit-content; overflow: auto; }
#ui-panel .ui-close { background: transparent; border: 0; color: inherit; opacity: 1; }
#pv-search-list { min-height: 44px; padding: 12px; }

@media (max-width: 720px) {
  #nav { padding: 0 12px; gap: 8px; }
  #nav #nav-right { margin-left: auto; gap: 8px; }
  #mobile-nav { display: block; margin-left: auto; }
  #mobile-nav + #menus + #nav-right { margin-left: 0; }
  .mobile-nav-content {
    position: absolute; top: 56px; right: 10px; width: min(300px, calc(100vw - 20px));
    max-height: calc(100dvh - 72px); overflow: auto; padding: 8px;
    background: #13253b; border-radius: 0 0 16px 16px;
    border: 1px solid #ffffff40;
  }
  #mobile-nav .mobile-nav-content summary, #mobile-nav .nav-sub { padding: 10px 12px; }
  #mobile-nav .mobile-nav-content summary::after { content: ' ▾'; }
  #mobile-nav details .nav-sub { padding-left: 24px; }
  #page-header.not-home-page #site-title { font-size: clamp(27px, calc(8vw + 2px), 36px); }
  .pv-doc-body, .pv-doc-body p, .pv-doc-body li { font-size: 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* 进站大屏、文章预览与瀑布流 */
#page-header.full_page {
  min-height: calc(100vh - 56px) !important;
  min-height: calc(100svh - 56px) !important;
  isolation: isolate;
}
#nav { border-radius: 16px !important; }
#nav #nav-right { margin-inline-start: auto; }
#nav #menus { position: absolute; left: 50%; transform: translateX(-50%); }
#nav .nav-icon { min-height: 36px; }
#hero-card { min-width: 0; min-height: 0; padding: 16px; align-self: start; }
.hero-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hero-heading h2 { margin: 0; font-size: 1.16rem; }
.hero-arrows { align-items: center; }
#hero-position { font-size: .82rem; color: #4f5c6a; font-variant-numeric: tabular-nums; }
.hero-arrows button:disabled { opacity: .45; cursor: default; }
#hero-track { border-radius: 16px; }
#hero-track.has-slides {
  max-height: 212px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-gutter: stable;
}
.hero-slide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  scroll-snap-align: start;
}
.has-slides .hero-slide { height: 212px; padding-block-end: 8px; }
.hero-slide .hero-item { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; border-radius: 16px; color: var(--ink); }
.hero-slide .hero-item:only-child { grid-column: 1 / -1; grid-template-columns: minmax(100px, 28%) minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
.hero-slide .hero-item:focus-visible { outline-offset: -3px; }
.hero-slide .hero-cover { display: block; width: 100%; height: 106px; object-fit: cover; border-radius: 14px 14px 9px 9px; }
.hero-slide .hero-info { min-width: 0; padding: 8px 10px; }
.hero-slide .hero-title { margin: 2px 0 4px; }
.hero-slide .hero-desc { margin: 0; }
.hero-slide .hero-date { color: #465970; }
#content-inner > #quote-card { width: 100% !important; max-width: 100%; justify-self: stretch; align-self: start; }
.quote-body { display: grid; gap: 2px; min-width: 0; }
.quote-label { color: #465970; font-size: .75rem; font-weight: 700; }
#quote-from { white-space: nowrap; }
#recent-section { grid-column: 1; min-width: 0; }
#recent-title { margin-bottom: 14px; }
#recent-posts.has-masonry { grid-auto-rows: 4px; row-gap: 0 !important; align-items: start; }
.post-card-inner { display: flow-root; }
.post-card .post-cover { border-radius: 15px 15px 10px 10px; }
.pv-archive-link { color: #eff6ff; }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #9d81f2 #18283e; }
}

/* 各栏目在同一套圆角中保留独立的配色和材质 */
body[data-pv-kind="study"] { background: radial-gradient(ellipse at top, #503620, #21172a 78%) fixed !important; }
body[data-pv-kind="music"] { background: radial-gradient(ellipse at top, #4c305c, #181934 78%) fixed !important; }
body[data-pv-kind="gallery"] { background: radial-gradient(ellipse at top, #37544e, #101e26 78%) fixed !important; }
body[data-pv-kind="arcade"] { background: radial-gradient(ellipse at top, #192949, #131624 78%) fixed !important; }
body[data-pv-kind="nav"] { background: radial-gradient(ellipse at top, #2a5274, #19253c 78%) fixed !important; }
body[data-pv-kind="friends"] { background: radial-gradient(ellipse at top, #694a54, #211c32 78%) fixed !important; }
body[data-pv-kind="guestbook"] { background: radial-gradient(ellipse at top, #465c72, #222b3e 78%) fixed !important; }
body[data-pv-kind="arcade"] #pv-root > p,
body[data-pv-kind="guestbook"] #pv-root > p { color: #eef5ff; }
#pv-page[data-kind="music"] .pv-card { background: #f2eaf7f5; }
#pv-page[data-kind="gallery"] .pv-card { background: #e8f3edf5; }
#pv-page[data-kind="friends"] .pv-card { background: #faeef2f5; }
#pv-page[data-kind="guestbook"] .pv-card { background: #edf6fcf5; }
#pv-page[data-kind="arcade"] .arcade-controls button { font-family: 'Courier New', monospace; background: #202947; color: #8bffed; }
.mobile-nav-content { border-radius: 16px; }
#ui-panel .ui-vol { margin-top: 12px; gap: 8px; color: #edf5ff; }
#ui-panel .ui-vol span { min-width: auto; text-align: start; color: inherit; }
#ui-panel .ui-vol output { min-width: 3.4em; text-align: end; font-variant-numeric: tabular-nums; }

/* 文章统计 */
.stats-controls, .stats-modes, .stats-picker, .stats-category-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.stats-modes button, .stats-picker input, .stats-picker select {
  border: 1px solid #b4c5dc; border-radius: 12px; padding: 6px 10px;
  color: #24364d; background: #f5f8fd; font: inherit;
}
.stats-modes button { cursor: pointer; min-width: 42px; }
.stats-modes button[aria-pressed="true"] { background: #375da8; color: #fff; border-color: #375da8; }
.stats-period { color: #405470; font-weight: 600; }
.stats-heat-scroll { max-width: 100%; overflow-x: auto; border-radius: 12px; }
.stats-heat { display: grid; gap: 4px; padding: 5px; }
.stats-heat.year { width: max-content; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); grid-auto-columns: 12px; }
.stats-heat.month { max-width: 370px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.stats-heat.day { max-width: 66px; }
.stats-heat-cell {
  border: none; border-radius: 4px; display: grid; place-items: center; min-width: 0;
  background: #dfe7f2; color: #263850; padding: 0; font: inherit;
}
.stats-heat.month .stats-heat-cell, .stats-heat.day .stats-heat-cell { min-height: 30px; border-radius: 8px; }
button.stats-heat-cell { cursor: pointer; }
.stats-heat-cell[data-level="1"] { background: #a3bff2; }
.stats-heat-cell[data-level="2"] { background: #7398dd; color: #142548; }
.stats-heat-cell[data-level="3"] { background: #436eba; color: white; }
.stats-heat-cell[data-level="4"] { background: #2b4c91; color: white; }
.stats-breakdown { margin-top: 14px; }
.stats-breakdown summary { cursor: pointer; }
.stats-bars, .stats-category-legend { list-style: none; padding: 0; }
.stats-bar { display: grid; align-items: center; grid-template-columns: 3.4em minmax(0, 1fr) 4em; gap: 10px; margin-block: 6px; }
.stats-bar-track, .stats-bar-fill { display: block; height: 12px; border-radius: 999px; }
.stats-bar-track { background: #dfe7f2; }
.stats-bar-fill { background: linear-gradient(90deg, #526fd1, #826bc8); }
.stats-category-legend { justify-content: center; }
.stats-category-legend li { display: inline-flex; align-items: center; gap: 5px; }
.stats-swatch { inline-size: 12px; block-size: 12px; border-radius: 4px; }
.pv-rose { border-radius: 16px; }
.stats-cloud { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; padding: 14px; }
.stats-cloud a { font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.stats-cloud a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  #nav { gap: 8px !important; }
  #nav #mobile-nav { margin-inline-start: auto; }
  #nav #nav-right { margin-inline-start: 0; }
  .hero-slide { grid-template-columns: 1fr; gap: 8px; }
  #hero-track.has-slides { max-height: 246px; }
  .has-slides .hero-slide { height: 246px; grid-template-rows: repeat(3, 1fr); }
  .hero-slide .hero-item { grid-template-columns: minmax(68px, 30%) minmax(0, 1fr); grid-template-rows: auto; }
  .hero-slide .hero-cover { height: 100%; min-height: 64px; max-height: 80px; border-radius: 12px; }
  .hero-slide .hero-desc { -webkit-line-clamp: 1; }
  #quote-card { gap: 8px; padding-inline: 12px; }
}

@media (max-width: 360px) {
  #nav { padding-inline: 8px; gap: 5px !important; }
  #nav #nav-right { gap: 5px; }
  #nav #nav-avatar { width: 26px; height: 26px; }
  #nav #blog_name a { gap: 5px; font-size: 15px; }
  #nav .nav-icon { width: 32px; min-width: 32px; }
}

/* 文章返回与评论 */
.pv-post-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.pv-post-actions a { text-decoration: none; }
.pv-post-comments-link { color: #285d9e; }
#article-comments {
  margin: 30px auto 0; padding-top: 20px; max-width: 42em;
  border-top: 1px solid #9caec37a; scroll-margin-top: 76px;
}
#article-comments h2 { margin: 0 0 12px; }
#article-comments-list { display: grid; gap: 10px; padding: 0; list-style: none; }
#article-comments-list li { padding: 12px 14px; background: #f2f6fbd9; border-radius: 16px; }
.article-comment-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.article-comment-meta time { color: #526579; font-size: .84rem; }
#article-comments-list p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#article-comment-form { margin-top: 18px; }
#article-comment-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
#article-comment-form :is(input, textarea) {
  width: 100%; font: inherit; color: #1e2937; background: #ffffffd9;
  padding: 9px 12px; border: 1px solid #adc0d6; border-radius: 14px;
}
#article-comment-form textarea { resize: vertical; }
#article-comment-form button { justify-self: start; }
#article-comments :is(#article-comment-status, #article-comments-list-status):empty { display: none; }

#page-header #site-subtitle { line-height: 1.55; min-block-size: 1.55em; }
.site-subtitle-readable {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#subtitle.is-typing::after {
  content: ''; display: inline-block; height: 1em; margin-inline-start: .16em;
  border-inline-start: 2px solid currentColor; vertical-align: -.13em;
  animation: subtitle-caret 1s step-end infinite;
}
@keyframes subtitle-caret { 50% { opacity: 0; } }
