/* ============================================================
   自定义样式（Yneko-Reimu 复刻的补充层）
   1. 双人简介卡（Severin + Selene）
   2. 音乐播放器 Niconico 风格（大封面 + 元数据 + 底部控制条）
   加载顺序：在 reimu.css / reimu-player.css 之后
   ============================================================ */

/* ---------- 双人简介卡 ---------- */
.sidebar-author .profile-duo {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0 0;
  width: 100%;
}
.sidebar-author .profile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sidebar-author .profile-item img {
  display: block;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  box-shadow: 0 0 15px 5px var(--color-red-6-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.sidebar-author .profile-item img:hover {
  transform: scale(1.05);
}
.sidebar-author .profile-item .profile-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--red-2);
  margin: 0;
}
.sidebar-author .sidebar-description {
  padding: 14px 20px;
  text-align: center;
}

/* ---------- 音乐播放器：Niconico 风格 ---------- */
/* 容器基础 */
.sidebar-wrapper-container > meting-js .aplayer,
#sidebar > meting-js .aplayer {
  border-radius: 12px;
  overflow: hidden;
}
/* 主体：固定高度，封面绝对定位在左，信息区在右 */
.sidebar-wrapper-container > meting-js .aplayer-body,
#sidebar > meting-js .aplayer-body {
  display: block !important;
  position: relative;
  height: 160px !important;
}
.sidebar-wrapper-container > meting-js .aplayer-pic,
#sidebar > meting-js .aplayer-pic {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  float: none !important;
  width: 96px !important;
  height: auto !important;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 0 !important;
}
/* 封面上的圆形播放/暂停按钮：统一尺寸并居中在封面正中（原 right/bottom 定位偏到右下角） */
.sidebar-wrapper-container > meting-js .aplayer-pic .aplayer-button,
#sidebar > meting-js .aplayer-pic .aplayer-button {
  width: 46px !important;
  height: 46px !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}
/* 按钮内的播放/暂停图标 SVG 居中（APlayer 默认 top/left 会偏左上） */
.sidebar-wrapper-container > meting-js .aplayer-pic .aplayer-button svg,
#sidebar > meting-js .aplayer-pic .aplayer-button svg {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}
/* 信息区：标题+作者在上，控制条贴底 */
.sidebar-wrapper-container > meting-js .aplayer-info,
#sidebar > meting-js .aplayer-info {
  position: absolute !important;
  left: 96px !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: auto !important;
  margin-left: 0 !important;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 14px 14px 8px !important;
  box-sizing: border-box;
  border: none !important;
}
/* 歌名 + 作者都保留：音乐容器高度自适应，两行各给足行高，避免压扁发虚 */
.sidebar-wrapper-container > meting-js .aplayer-music,
#sidebar > meting-js .aplayer-music {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  height: auto !important;
  box-sizing: border-box;
  padding-right: 0;
  text-align: left;
  gap: 2px;
}
.sidebar-wrapper-container > meting-js .aplayer-title,
#sidebar > meting-js .aplayer-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 15px !important;
  font-weight: 700;
  line-height: 1.35;
}
.sidebar-wrapper-container > meting-js .aplayer-author,
#sidebar > meting-js .aplayer-author {
  display: block !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px !important;
  color: var(--grey-9) !important;
  line-height: 1.5;
}
/* ---------- 两行歌词（歌名/作者下方的那块空白）----------
   要点（改这块之前先读）：
   1) APlayer 内部按「16px/行」硬编码算滚动位移（translateY(16 * -index)），
      所以 p 的 height / line-height 必须锁死 16px —— 改了就会整体错位、看着像文字重叠；
   2) 容器高度 = 2 × 16px = 正好两行：当前行在上面、下一行在下面；
   3) 字号 12px 配 16px 行高，中文字形不会挤到相邻行；
   4) 关掉这几样「显得发虚」的东西：APlayer 上下的白色渐隐、非当前行默认 0.4 透明度、
      长行跑马灯的 translateX 动画（动的时候是 subpixel 位移，字会糊）。 */
.sidebar-wrapper-container > meting-js .aplayer-lrc,
#sidebar > meting-js .aplayer-lrc {
  display: block !important;
  height: 32px !important;
  margin: 6px 0 0 !important;
  overflow: hidden !important;
  pointer-events: none;
  text-align: left;
}
/* 去掉 APlayer 自带的上下两条白色渐隐（叠在 12px 小字上就是「糊」的来源之一） */
body .sidebar-wrapper-container > meting-js .aplayer-lrc::before,
body #sidebar > meting-js .aplayer-lrc::before,
body .sidebar-wrapper-container > meting-js .aplayer-lrc::after,
body #sidebar > meting-js .aplayer-lrc::after {
  display: none !important;
}
/* 单行样式：16px 行高 / 12px 字号 / 不模糊不透明不位移 */
body .sidebar-wrapper-container > meting-js .aplayer-lrc p,
body #sidebar > meting-js .aplayer-lrc p,
body .sidebar-wrapper-container > meting-js .aplayer-lrc p.aplayer-lrc-current,
body #sidebar > meting-js .aplayer-lrc p.aplayer-lrc-current {
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  line-height: 16px !important;
  font-size: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  color: var(--grey-7) !important;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: color 0.35s ease !important;
}
body .sidebar-wrapper-container > meting-js .aplayer-lrc p.aplayer-lrc-current,
body #sidebar > meting-js .aplayer-lrc p.aplayer-lrc-current {
  color: var(--red-1) !important;
}
/* 行内的 span：改成纯 inline + 关掉跑马灯动画（动画期间的 subpixel 位移会让字发虚），
   超长行统一用省略号收尾 */
body .sidebar-wrapper-container > meting-js .aplayer-lrc p span,
body #sidebar > meting-js .aplayer-lrc p span {
  display: inline !important;
  min-width: 0 !important;
  max-width: none !important;
  animation: none !important;
  will-change: auto !important;
  transform: none !important;
}
/* 滚动容器：APlayer 默认 transition: all .5s —— 那半秒里位移在「小数」上插值，字会发虚。
   改成只过渡 transform 且缩短到 0.24s：既有滑动感，糊的窗口也短到看不出来 */
body .sidebar-wrapper-container > meting-js .aplayer-lrc .aplayer-lrc-contents,
body #sidebar > meting-js .aplayer-lrc .aplayer-lrc-contents {
  transition: transform 0.24s ease-out !important;
  will-change: auto !important;
}
/* 控制条贴底 */
.sidebar-wrapper-container > meting-js .aplayer-controller,
#sidebar > meting-js .aplayer-controller {
  margin-top: auto;
  transform: none !important;
}

/* ---------- 语言切换器 ---------- */
.lang-switcher {
  position: relative;
}
/* 语言切换按钮：显示当前语言文字，垂直居中，与搜索/明暗按钮一致 */
#nav-language-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 15px !important;
  height: 54px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  color: var(--red-0) !important;
  opacity: 0.8 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}
#nav-language-btn::before {
  content: none !important;
}
#nav-language-btn:hover {
  opacity: 1 !important;
}
.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-wrap);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  min-width: 120px;
  z-index: 300;
  padding: 4px 0;
}
.lang-menu.open {
  display: block;
}
.lang-menu a {
  display: block;
  padding: 9px 15px;
  color: var(--color-default);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.lang-menu a:hover {
  background: var(--red-5);
  color: var(--red-1);
}

/* ---------- 搜索结果可读性：底图调淡 + 结果标题加深对比 ---------- */
.site-search .reimu-bg {
  opacity: 0.16 !important;
}
.site-search .reimu-hit-item-link {
  color: #d63031 !important;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.7);
}
[data-theme='dark'] .site-search .reimu-hit-item-link {
  color: #ff8a80 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.site-search #reimu-stats {
  color: var(--color-default) !important;
}

/* ---------- banner 文字可读性：白色标题/副标题在浅色底图上加强阴影 ---------- */
#logo {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 32px rgba(0, 0, 0, 0.55) !important;
}
#subtitle {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 22px rgba(0, 0, 0, 0.6) !important;
}
/* 手机端：站名较长（Severin.Zhao&Selene.Chen）时允许折行，避免撑宽页面/被裁切 */
@media screen and (width <= 767px) {
  #logo h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
  }
}
@media screen and (width <= 479px) {
  #logo {
    font-size: 26px !important;
  }
}

/* =================================================================
   首页搜索栏（Banner 下方居中胶囊；提交后打开站内搜索弹窗）
   ================================================================= */
.home-search {
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  max-width: 760px;
  margin: -46px auto 20px;
  padding: 0 16px;
}
.home-search form {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 8px 0 22px;
  background: var(--color-wrap);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
}
.home-search form:focus-within {
  box-shadow: var(--shadow-card-hover);
}
.home-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-default);
  font-family: inherit;
  font-size: 15px;
}
.home-search input::placeholder {
  color: var(--grey-9);
}
.home-search-submit {
  flex: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--red-5);
  color: var(--red-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
}
.home-search-submit:hover {
  background: var(--red-4);
  transform: scale(1.06);
}
.home-search-submit-icon:before {
  content: '\e631';
  font-family: iconfont;
  font-size: 16px;
}
/* 输入时弹出的实时匹配结果 */
.home-search-panel {
  margin-top: 10px;
  background: var(--color-wrap);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  max-height: 58vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.home-search-hits {
  display: flex;
  flex-direction: column;
}
.home-search-hit {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-h2-border);
  text-decoration: none;
  transition: background 0.2s;
}
.home-search-hit:last-child {
  border-bottom: 0;
}
.home-search-hit:hover {
  background: var(--red-5);
  text-decoration: none;
}
.home-search-hit-title {
  min-width: 0;
  color: var(--red-1);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-search-hit-date {
  flex: none;
  margin-left: auto;
  color: var(--grey-9);
  font-size: 12px;
}
.home-search-empty {
  padding: 14px 18px;
  color: var(--grey-9);
  font-size: 14px;
  text-align: center;
}
/* 聚焦搜索框时：背景大图虚化调暗，保证文字清晰 */
body.home-search-active #header img {
  filter: blur(9px) brightness(0.92);
}
[data-theme='dark'] body.home-search-active #header img {
  filter: blur(9px) brightness(0.7);
}
@media screen and (width <= 767px) {
  .home-search {
    margin: -32px auto 14px;
    padding: 0 14px;
  }
  .home-search form {
    height: 48px;
    padding-left: 16px;
  }
}

/* =================================================================
   文章页作者 chip（与日期 chip 同款，显示每篇文章的作者）
   ================================================================= */
/* 发布时间 chip 里的时区后缀（UTC+8），比时间本体小一号、淡一点 */
.article-date-tz {
  margin-left: 2px;
  font-size: 12px;
  opacity: 0.72;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
.article-author {
  display: flex;
}
.article-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 16px 0;
  padding: 10px 20px;
  color: var(--red-1);
  background: var(--red-5);
  box-shadow: var(--shadow-meta);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}
.article-author-chip:hover {
  box-shadow: var(--shadow-meta-hover);
}
.article-author-chip .icon {
  font-size: 14px;
}

/* =================================================================
   移动端抽屉导航：去掉双线框，改成与桌面端一致的圆角卡片
   ================================================================= */
#mobile-nav .sidebar-menu {
  margin: 14px 0 20px;
}
#mobile-nav .sidebar-menu-link-wrap {
  width: min(86%, 250px);
  margin: 10px auto;
  border: 0 none;
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  justify-content: flex-start;
  transition: box-shadow 0.3s, transform 0.3s, background 0.5s;
}
/* 每个按钮内部：图标 + 文字统一左侧对齐（图标成一条竖线） */
#mobile-nav .sidebar-menu-icon {
  padding: 10px 8px 10px 20px;
}
#mobile-nav .sidebar-menu-link {
  padding: 10px 14px 10px 2px;
  text-align: left;
}
#mobile-nav .sidebar-menu-link-wrap:hover {
  border: 0 none;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px) scale(1.015);
}
#mobile-nav .sidebar-menu-link-wrap.link-active {
  background: var(--red-5);
  border: 0 none;
  box-shadow: var(--shadow-meta);
  opacity: 1;
}
#mobile-nav .sidebar-menu-icon,
#mobile-nav .sidebar-menu-link {
  color: var(--red-1);
}
#mobile-nav .sidebar-menu-link-wrap.link-active .sidebar-menu-link,
#mobile-nav .sidebar-menu-link-wrap.link-active .sidebar-menu-icon {
  color: var(--red-1) !important;
  opacity: 1;
}

/* =================================================================
   留言墙（评论区）：表单 + 留言列表
   ================================================================= */
.guestbook {
  margin: 26px 0 8px;
}
/* 提示横幅：覆盖在头图上、紧贴顶部导航下方（磨砂半透明底 + 自适应文字色，任何底图上都清晰） */
.gb-notice-wrap {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 8px 16px 9px;
  background: var(--color-header-background);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.gb-notice {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.gb-notice p {
  margin: 0 !important;
  color: var(--color-default);
  font-size: 13px;
  line-height: 2;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}
[data-theme='dark'] .gb-notice p {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.gb-notice b {
  color: var(--red-1);
}
.gb-notice-jump {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 12px;
  border-radius: 999px;
  background: var(--red-1);
  color: #fff !important;
  font-size: 12px;
  line-height: 1.9;
  text-decoration: none !important;
  transition: background 0.3s, transform 0.3s;
}
.gb-notice-jump:hover {
  background: var(--red-2);
  text-decoration: none !important;
}
/* 宽屏下让留言区整体更醒目（用 body 提权，避免被后面的同名基础规则覆盖） */
@media screen and (width >= 900px) {
  body .gb-form-title {
    font-size: 17px;
  }
  body .gb-field input,
  body .gb-content-field textarea {
    font-size: 15px;
  }
  body .gb-content-field textarea {
    min-height: 150px;
  }
  body .gb-text {
    font-size: 15px;
  }
  body .gb-tile {
    height: 196px;
  }
  body .gb-tile-text {
    font-size: 14px;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
  body .gb-detail-card .gb-text {
    font-size: 16px;
  }
}
.gb-form {
  background: var(--red-5-5);
  border-radius: 12px;
  box-shadow: var(--shadow-meta);
  padding: 18px 22px 16px;
  margin: 26px 0 10px;
}
.gb-form-title {
  color: var(--red-1);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.gb-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
/* ≥768px：三个字段用 subgrid 对齐（标签一行、输入框一行，横向完全对齐；#gb-form 提权） */
@media screen and (width >= 768px) {
  #gb-form .gb-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 6px;
  }
  #gb-form .gb-field {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
    row-gap: 6px;
    margin: 0 !important;
  }
  #gb-form .gb-field > label {
    align-self: end;
  }
}
.gb-field {
  flex: 1 1 180px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 !important;
  line-height: 1.5;
}
.gb-field label {
  color: var(--grey-9);
  font-size: 13px;
}
.gb-field input,
.gb-content-field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  color: var(--color-default);
  background: var(--color-wrap);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
}
.gb-field input:focus,
.gb-content-field textarea:focus {
  outline: none;
  border-color: var(--red-2);
  box-shadow: var(--shadow-meta);
}
.gb-content-field {
  margin: 12px 0 0 !important;
}
.gb-content-field textarea {
  resize: vertical;
  line-height: 1.6;
}
.gb-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
/* Turnstile 人机验证挂件（仅在构建时配置了 TURNSTILE_SITE_KEY 才渲染） */
.gb-turnstile {
  margin: 14px 0 4px;
}
.gb-turnstile .cf-turnstile {
  display: inline-block;
}
.gb-form-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.gb-counter {
  display: block;
  margin-top: 6px;
  color: var(--grey-9);
  font-size: 12px;
}
.gb-counter b {
  color: var(--color-default);
  font-weight: 700;
}
.gb-counter.gb-counter-warn,
.gb-counter.gb-counter-warn b {
  color: var(--red-1);
}
.gb-status {
  font-size: 13px;
  line-height: 1.5;
}
.gb-status.gb-ok {
  color: #1e9e5a;
}
.gb-status.gb-err {
  color: var(--red-1);
}
.gb-submit {
  cursor: pointer;
  margin-left: auto;
}
.gb-list-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 14px;
}
.gb-list-title {
  margin: 0 !important;
  font-size: 18px;
  line-height: 1.4;
}
.gb-count {
  color: var(--grey-9);
  font-size: 13px;
}
.gb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.gb-list > .gb-empty,
.gb-list > .gb-loading {
  grid-column: 1 / -1;
}
/* 留言方块卡片：每条一个方块，点击进详情页 */
.gb-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 186px;
  padding: 12px 14px;
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  text-decoration: none !important;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
.article-entry a.gb-tile {
  color: var(--color-default);
}
.article-entry a.gb-tile:after {
  content: none !important;
  margin: 0;
}
.gb-tile:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  text-decoration: none !important;
}
.gb-tile-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.gb-tile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gb-tile .gb-avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.gb-tile .gb-name {
  max-width: 9em;
  font-size: 14px;
}
.gb-tile .gb-time {
  font-size: 11px;
}
.gb-tile-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  overflow: hidden;
  color: var(--color-default);
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.gb-tile-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--grey-9);
  font-size: 12px;
}
.gb-tile-more {
  display: none;
  margin-left: auto;
  color: var(--red-1) !important;
  font-weight: 700;
}
/* 留言墙汇总全站评论：来源行（文章评论：《标题》），单行省略 */
.gb-tile-src {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gb-tile.gb-truncated .gb-tile-more {
  display: inline;
}
/* 留言详情页（/message/<id>/ → /message-detail/?id=） */
.gb-detail {
  margin: 26px 0 8px;
}
.gb-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--red-1) !important;
  font-size: 14px;
  text-decoration: none !important;
}
.gb-detail-back:hover {
  text-decoration: underline !important;
}
.article-entry a.gb-detail-back:after {
  content: none !important;
  margin: 0;
}
.gb-detail-card {
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
}
.gb-detail-card .gb-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.9;
}
.gb-detail-card .gb-avatar {
  width: 38px;
  height: 38px;
  font-size: 16px;
}
.gb-detail-card .gb-name {
  font-size: 16px;
}
.gb-detail-replies-title {
  margin: 20px 0 4px !important;
  font-size: 16px;
  line-height: 1.4;
}
.gb-detail-reply {
  margin-top: 12px;
  background: var(--red-6);
  border-radius: 12px;
  border-left: 3px solid var(--red-4);
  padding: 12px 14px;
}
.gb-detail-reply .gb-text {
  margin-top: 6px;
  font-size: 14px;
}
.gb-loading {
  color: var(--grey-9);
  text-align: center;
  padding: 12px 0;
}
.gb-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  -webkit-user-select: none;
  user-select: none;
}
.gb-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.gb-name {
  color: var(--red-1);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  max-width: 16em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.gb-name:hover {
  text-decoration: underline;
}
.article-entry a.gb-name:after {
  content: none !important;
  margin: 0;
}
.gb-badge {
  color: #fff;
  background: var(--red-2);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
}
.gb-time {
  color: var(--grey-9);
  font-size: 12px;
}
.gb-text {
  color: var(--color-default);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.gb-more-wrap {
  display: flex;
  justify-content: center;
  margin: 16px 0 4px;
}
.gb-more {
  border: 1px solid var(--color-h2-border);
  background: var(--color-wrap);
  color: var(--grey-7);
  border-radius: 8px;
  min-height: 34px;
  padding: 4px 16px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px #78787814;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.gb-more:hover {
  color: var(--red-1);
  border-color: var(--red-3);
  box-shadow: var(--shadow-meta);
}
.gb-empty {
  text-align: center;
  color: var(--grey-9);
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 22px 10px;
  font-size: 14px;
  line-height: 1.8;
}
.gb-empty-icon {
  font-size: 26px;
  color: var(--red-3);
  margin-bottom: 6px;
}
@media screen and (width <= 767px) {
  .gb-form {
    padding: 14px 14px 12px;
  }
  .gb-fields {
    flex-direction: column;
    gap: 10px;
  }
  .gb-form-foot {
    flex-wrap: wrap;
  }
  .gb-list {
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .gb-tile {
    height: 170px;
  }
}

/* =================================================================
   第三轮改造（2026-10-05）
   1. 顶部导航：五个主按钮在行内居中；搜索/白夜/语言三个小按钮靠最右且略小
   2. 全站内容整体上移（缩小 banner 高度与内容间距）
   3. 页面右侧新增「标签」侧边栏（左中右三栏）
   4. 移动端抽屉：太极图标与文字对齐到同一水平中线
   5. 文章页底部标签行 / 标签列表页
   ================================================================= */

/* ---------- 1. 顶部导航 ---------- */
/* #header-nav 本身 justify-content:center：主按钮自动整行居中；
   辅助导航（搜索/白夜/语言）脱离子流、贴最右侧（github 三角角标已删） */
#sub-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 8px;
  align-items: center;
  gap: 4px;
}
/* 三个小按钮统一：同宽同高、垂直居中、间距一致（图标字号经像素校准） */
#sub-nav #nav-search-btn,
#sub-nav #theme-toggle {
  width: 40px;
  height: 54px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#sub-nav #nav-search-btn {
  font-size: 14px;
  position: relative;
  top: -0.35px; /* 放大镜字形在行内偏高，微调对齐三者中线 */
}
#sub-nav #theme-toggle span {
  font-size: 13.7px;
}
#sub-nav #nav-language-btn {
  font-size: 14px !important;
  padding: 0 10px !important;
  position: relative;
  top: -0.45px; /* 中文字形略低于图标中线，微调对齐 */
}
/* 语言下拉：按钮已靠最右，菜单改右对齐锚定，避免弹出到屏幕外 */
#sub-nav .lang-menu {
  left: auto !important;
  right: 0 !important;
}
/* 中等宽度（768~1180px）：主按钮收紧，避免与右侧小按钮重叠 */
@media screen and (width >= 768px) and (width <= 1180px) {
  .main-nav-link-wrap {
    padding: 0 7px;
  }
  .main-nav-link {
    font-size: 13px;
    letter-spacing: 0;
  }
}
/* 手机端（≤767px）：导航链接隐藏后，汉堡按钮改贴最左侧——
   它原来随 #main-nav 居中，会和靠右的第四个小按钮（搜索🔍）叠在一起（安卓端"小标重合"） */
@media screen and (width <= 767px) {
  /* 汉堡改为绝对定位后，导航条内没有在流子元素了，高度会塌成 0 → 给它兜底高度 */
  #header-nav {
    min-height: 54px;
  }
  #main-nav-toggle {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    width: 40px;
    height: 54px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
/* 平板竖屏档（768~959px）：主按钮行隐藏装饰小菱形（只留文字），
   否则加宽后的右侧小按钮区会把居中的按钮行右端顶到小按钮上互相压住 */
@media screen and (width >= 768px) and (width <= 959px) {
  .main-nav-link-wrap {
    padding: 0 5px;
  }
}

/* ---------- 2. 全站内容上移一点点（banner 矮一点、间距收紧） ---------- */
#header {
  height: 33vh;
  min-height: 350px;
}
.home-search {
  margin: -56px auto 20px;
}
#content {
  padding-top: 4px;
}
@media screen and (width <= 767px) {
  .home-search {
    margin: -40px auto 14px;
  }
}

/* 侧栏：简介卡/目录 与 音乐播放器之间留出间距（否则两块贴在一起） */
.sidebar-wrapper-container > meting-js {
  display: block;
  margin-top: 16px;
}
/* PJAX 换页时播放器可能被主题直接挂到容器下（不套 meting-js）；
   aplayer.min.css 里有 `.aplayer{margin-top:0!important}`，必须同权重压过去 */
.sidebar-wrapper-container > .aplayer {
  margin-top: 16px !important;
}
/* 侧栏「跟随滚动」：文章页由主题自带（isPost 时 .sidebar-wrapper-container.sticky，top:20px）
   已经生效；这里给首页等其它页面补齐同样效果——整栏（含音乐播放器）随滚动一直可见，
   滚到侧栏尽头自然收住 */
@media screen and (width >= 960px) {
  #sidebar .sidebar-wrapper-container:not(.sticky) {
    position: sticky;
    top: 20px;
  }
}

/* ---------- 3. 右侧「标签」侧边栏（≥960px 显示，窄屏自动隐藏） ----------
   2026-10-16：从「仅 ≥1200px」放宽到 ≥960px —— 安卓「桌面版」等 960~1199px
   宽度之前看不到右栏；960~1199 档用 200px 宽度防止中列被挤扁 */
.tags-sidebar {
  display: none;
}
@media screen and (width >= 960px) {
  #content.with-tags .tags-sidebar {
    display: block;
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    margin: 0 16px;
    align-self: flex-start;
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 90px);
    overflow: auto;
  }
}
@media screen and (width >= 1200px) {
  #content.with-tags .tags-sidebar {
    flex: 0 0 230px;
    width: 230px;
    min-width: 230px;
  }
}
/* with-tags 时中列允许收缩：不加这条时中列被自身内容宽度撑住，三栏合计超出视口 →
   右侧标签栏被挤出屏幕出现横向滚动条（960~1199 档实测溢出约 200px） */
@media screen and (width >= 960px) {
  #content.with-tags #main {
    min-width: 0;
  }
}
.tags-card {
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 16px 16px 12px;
  /* 与中间列第一篇文章卡片等高（232px），标签少也不显空 */
  box-sizing: border-box;
  min-height: 232px;
}
.tags-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--red-1);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.icon-tag-glyph:before {
  content: '\e622';
  font-family: iconfont;
  font-size: 15px;
}
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags-item {
  margin: 0;
}
.tags-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--red-5);
  color: var(--red-1);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none !important;
  transition: background 0.2s, box-shadow 0.2s;
}
.tags-link:hover {
  background: var(--red-4);
  box-shadow: var(--shadow-meta);
}
.tags-count {
  color: var(--grey-9);
  font-size: 11px;
}
.tags-link:hover .tags-count {
  color: var(--red-1);
}
.tags-empty {
  color: var(--grey-9);
  font-size: 13px;
  margin: 0;
}
.tags-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--red-1);
  font-size: 13px;
  text-decoration: none !important;
}
.tags-more:hover {
  text-decoration: underline !important;
}

/* 标签列表页（/tags/ 与 /tags/<标签>/） */
.tags-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 18px;
  padding: 14px 18px;
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  color: var(--color-default);
  font-size: 15px;
}
.tags-head b {
  color: var(--red-1);
  font-size: 17px;
}
.tags-head-count {
  color: var(--grey-9);
  font-size: 13px;
}
.tags-head .tags-head-back {
  margin-left: auto;
  color: var(--red-1);
  font-size: 13px;
  text-decoration: none !important;
}
.tags-head .tags-head-back:hover {
  text-decoration: underline !important;
}
.tags-page-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 4px;
}
.tags-page-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--red-5);
  color: var(--red-1) !important;
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none !important;
  box-shadow: var(--shadow-meta);
  transition: box-shadow 0.2s, background 0.2s;
}
.tags-page-link:hover {
  box-shadow: var(--shadow-meta-hover);
  background: var(--red-4);
}
/* 去掉主题给 article-entry 内链接加的装饰后缀（标签胶囊用不到） */
.article-entry a.tags-page-link:after,
.article-entry a.tags-link:after {
  content: none !important;
  margin: 0;
}

/* ---------- 4. 移动端抽屉：图标与文字对齐到同一水平中线 ---------- */
/* iconfont 的太极字形在其行盒里偏低约 5.5px；文字字形在行盒里略偏上约 4px：
   两边各自向中线收拢（数值经像素级校验，两者字形中线落在卡片垂直中心） */
#mobile-nav .sidebar-menu-icon {
  position: relative;
  top: -5.5px;
}
#mobile-nav .sidebar-menu-link {
  position: relative;
  top: 4px;
}

/* ---------- 5. 文章页底部标签行 + 留言墙邮箱提示 ---------- */
.article-footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  margin: 20px 36px 0;
  box-sizing: border-box;
}
.article-tags-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--grey-9);
  font-size: 13px;
}
.article-footer .article-tag-list {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
/* 文章底部「最近更新」胶囊（与「阅读量」同款样式） */
.article-footer .article-updated-link {
  box-sizing: border-box;
  background: var(--red-5);
  color: var(--red-1);
  white-space: nowrap;
  box-shadow: var(--shadow-meta);
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  min-height: 30px !important;
  padding: 0 14px !important;
  line-height: 30px !important;
  display: inline-flex !important;
}
.article-footer .article-updated-link time {
  font: inherit;
}
@media screen and (width <= 767px) {
  .article-footer .article-updated-link {
    font-size: 13px;
    min-height: 28px !important;
    padding: 0 10px !important;
    line-height: 28px !important;
  }
}

/* ---------- 留言表单底部提示行 ---------- */
.gb-form-mail {
  margin: 14px 0 0 !important;
  color: var(--grey-9);
  font-size: 13px;
  line-height: 1.7;
}
.gb-form-mail a {
  color: var(--red-1);
  font-weight: 700;
  text-decoration: none;
  margin: 0 4px; /* Astro 构建会压缩元素间空白，用外边距补出间隔 */
}
.gb-form-mail a:after {
  content: none !important; /* 去掉主题给正文链接加的装饰后缀 */
  margin: 0 !important;
}
.gb-form-mail a:hover {
  text-decoration: underline;
}

/* 移动端抽屉里的「标签」区（窄屏访问标签的入口） */
#mobile-nav .sidebar-tags {
  margin: 10px 20px 24px;
}
#mobile-nav .sidebar-tags .tags-title {
  justify-content: center;
}
#mobile-nav .sidebar-tags .tags-list {
  justify-content: center;
}
#mobile-nav .sidebar-tags .tags-more {
  display: block;
  text-align: center;
}

/* ---------- 文章页评论（Comments.astro 的 list 版）与相关文章 ---------- */
.post-comments {
  margin: 34px 0 0;
}
.pc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pc-item {
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
}
.pc-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.pc-head .gb-avatar {
  width: 32px;
  height: 32px;
  font-size: 14px;
}
.pc-head .gb-name {
  font-size: 14.5px;
}
.pc-head .gb-time {
  margin-left: auto;
  flex: none;
}
.pc-head-reply .gb-avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.pc-head-reply .gb-name {
  font-size: 13.5px;
}
.pc-text {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.85;
}
.pc-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.pc-reply {
  background: var(--red-6);
  border-left: 3px solid var(--red-4);
  border-radius: 10px;
  padding: 10px 12px;
}
.pc-reply .pc-text {
  margin-top: 5px;
  font-size: 14px;
}
.pc-hint {
  margin: 12px 0 0 !important;
  color: var(--grey-9);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------- 相关文章（文章页底部） ---------- */
.related-posts {
  margin: 34px 0 0;
}
.related-posts-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px !important;
  font-size: 18px;
  line-height: 1.4;
}
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.related-item {
  display: block;
  box-sizing: border-box;
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  text-decoration: none !important;
  transition: box-shadow 0.3s, transform 0.3s;
}
.related-item:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.related-item-title {
  margin: 0 !important;
  color: var(--color-default);
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.related-item:hover .related-item-title {
  color: var(--red-1);
}
.related-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--grey-9);
  font-size: 12px;
}
.related-item-tags {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media screen and (width <= 767px) {
  .pc-item {
    padding: 12px 13px;
  }
  .related-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 订阅按钮（#sub-nav 里的第四个小按钮）+ 订阅弹层 ---------- */
#sub-nav .subscribe-wrap {
  position: relative;
}
#sub-nav #nav-subscribe-btn {
  width: 40px;
  height: 54px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
#sub-nav #nav-subscribe-btn .icon-email {
  font-size: 14px;
  line-height: 1;
  color: inherit;
}
#sub-nav .subscribe-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--color-wrap);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  z-index: 300;
  padding: 14px 16px 12px;
  text-align: left;
}
#sub-nav .subscribe-menu.open {
  display: block;
}
.subscribe-title {
  color: var(--red-1);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.subscribe-desc {
  color: var(--grey-7);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0 0 10px;
}
#subscribe-form input#subscribe-email {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  color: var(--color-default);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
}
.subscribe-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.subscribe-turnstile {
  margin: 10px 0 2px;
}
.subscribe-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.subscribe-submit {
  color: #fff;
  background: var(--red-1);
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  flex: none;
  cursor: var(--cursor-pointer) !important;
}
.subscribe-submit:hover {
  background: var(--red-0);
}
.subscribe-submit[disabled] {
  opacity: 0.6;
}
.subscribe-status {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--grey-9);
  min-width: 0;
}
.subscribe-status.sub-ok {
  color: #1a9e5c;
}
.subscribe-status.sub-err {
  color: var(--red-1);
}
.subscribe-privacy {
  color: var(--grey-9);
  font-size: 12px;
  margin: 8px 0 0;
}
.subscribe-privacy a {
  margin-left: 6px;
  color: inherit;
  text-decoration: underline;
}
.privacy-consent {
  margin: 10px 0 0;
  color: var(--grey-9);
  font-size: 12.5px;
  line-height: 1.7;
}
.privacy-consent a {
  color: inherit;
  text-decoration: underline;
}
/* 手机端（≤767px）：弹层从「锚在信封按钮右侧的 300px 下拉」改为「贴导航条下方的全宽面板」。
   原因：按钮在窄屏上位于屏幕中左，right:0 锚定会把整块弹层往左推出屏幕——
   安卓 360px 宽实测溢出左边缘 86px，被裁掉的部分既看不到也点不到。
   面板在高 54px 的固定导航条正下方，左右各留 8px（与汉堡按钮的 left:8px 对齐）。 */
@media screen and (width <= 767px) {
  #sub-nav .subscribe-menu {
    position: fixed;
    top: 54px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
  }
}
[data-theme='dark'] .subscribe-status.sub-ok {
  color: #4ade80;
}

/* =================================================================
   2026-10-17：导航去太极图标 + 「本站已运行」搬到左上角 + 文章列表页
   1. 主导航按钮前的太极符号已删（模板 div.main-nav-icon），内边距一并收窄
   2. 「本站已运行」从页脚搬到导航条左上角（≥960px）；窄屏空间不够，仍由页脚显示
   3. /posts/ 文章列表页：按系列分组的方块卡片（观感对齐留言墙 .gb-tile）
   ================================================================= */

/* ---------- 1. 主导航（无太极图标）---------- */
#main-nav .main-nav-link-wrap {
  padding: 0 6px;
}
#main-nav .main-nav-link {
  padding: 20px 9px;
  letter-spacing: 0.5px;
}

/* ---------- 2. 导航条左对齐：主链按钮贴左侧、垂直居中 ---------- */
/* 原来 #header-nav 是 justify-content:center（整行居中），
   英文界面下主链变长后会顶到右侧的咨询按钮/小图标上；
   改为靠左排布，右侧留给 CTA 与图标。 */
#header-nav {
  justify-content: flex-start;
  padding-left: 16px;
}
#main-nav {
  margin-left: 0;
}
@media screen and (width <= 767px) {
  /* 手机端只剩汉堡按钮（绝对定位 left:8px），不要再叠加内边距 */
  #header-nav {
    padding-left: 0;
  }
}
/* 768~959：六个导航按钮和右侧小按钮挤在一行，内边距必须再收紧，
   否则「友链」会压到放大镜上（去图标后仍有约 9px 重叠）*/
@media screen and (width >= 768px) and (width <= 959px) {
  #main-nav .main-nav-link-wrap {
    padding: 0 3px;
  }
  #main-nav .main-nav-link {
    padding: 20px 5px;
  }
}
@media screen and (width >= 960px) {
  #footer-info .footer-uptime-row {
    /* 与其余页脚行一致：#footer-info div 默认 display:flex + 居中；
       这里不要再覆盖成 block，否则运行时间会贴左边 */
    display: flex;
  }
}
/* 页脚第一行：年份 + 作者 + GitHub。
   原来作者名出现两次（版权一处、GitHub 链接文字一处），390px 手机上两项
   合计超出容器，flex 又不换行 → 名字被挤成两行并右溢出屏幕。现在链接文字
   固定为 GitHub，整行允许整段换行，作者名不拆开。 */
#footer-info .footer-copy {
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
}
#footer-info .footer-copy .footer-copy-author {
  white-space: nowrap;
}
#footer-info .footer-copy .icon-github {
  margin-right: 6px;
}

/* ---------- 3. 文章列表页（/posts/）---------- */
.series-page .article-entry {
  padding-bottom: 26px;
}
.series-intro {
  margin: 20px 0 4px !important;
  color: var(--grey-9);
  font-size: 14px;
  line-height: 1.8;
}
.series-group {
  margin-top: 24px;
}
.series-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 13px;
  padding-left: 10px;
  border-left: 4px solid var(--red-3);
}
.article-entry .series-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--red-1);
}
.article-entry .series-title:before,
.article-entry .series-title:after {
  content: none !important;
}
.series-count {
  color: var(--grey-9);
  font-size: 13px;
}
/* 方块网格：一条留言 = 一个方块 → 这里一篇文章 = 一个方块 */
.series-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.series-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 186px;
  padding: 14px 16px;
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none !important;
}
.article-entry a.series-tile {
  color: var(--color-default);
}
/* 主题会给 .article-entry 里的链接尾部加小图标，方块卡不要 */
.article-entry a.series-tile:after {
  content: none !important;
  margin: 0;
}
.series-tile:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  text-decoration: none !important;
}
.series-tile-title {
  flex: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--red-1);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}
.series-tile-desc {
  flex: 1;
  min-height: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin-top: 8px;
  color: var(--color-default);
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}
.series-tile-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--grey-9);
  font-size: 12px;
}
.series-tile-read {
  margin-left: auto;
  white-space: nowrap;
}
@media screen and (width <= 767px) {
  .series-intro {
    margin-top: 16px !important;
  }
  .series-tiles {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .series-tile {
    height: 170px;
    padding: 12px 14px;
  }
  .series-tile-title {
    font-size: 14px;
  }
  .series-tile-desc {
    font-size: 12.5px;
  }
}
@media screen and (width >= 900px) {
  .series-tiles {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  .series-tile {
    height: 196px;
  }
  .series-tile-desc {
    font-size: 13.5px;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

/* =================================================================
   2026-10-20：付费咨询（导航右上角 CTA + /consult/ 页）
   1. #sub-nav 最左侧加一枚实心红 pill 按钮（比图标显眼，但不抢主链）
   2. /consult/ 单栏窄版式：方案卡 / 付款区 / 流程 / FAQ
   ================================================================= */

/* ---------- 1. 导航 CTA ---------- */
#sub-nav #nav-consult-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 26px;
  margin-right: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--red-1);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: 0 2px 8px var(--color-red-6-shadow);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
#sub-nav #nav-consult-btn:hover {
  background: var(--red-0);
  box-shadow: 0 4px 12px var(--color-red-6-shadow);
  transform: translateY(-1px);
}
.nav-consult-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
}
/* 窄屏：导航条上只剩汉堡 + 四个小图标，CTA 收窄成矮 pill，避免在 320px 屏上压到汉堡 */
@media screen and (width <= 767px) {
  #sub-nav #nav-consult-btn {
    height: 24px;
    margin-right: 2px;
    padding: 0 9px;
    font-size: 11.5px;
    letter-spacing: 0;
  }
  .nav-consult-dot {
    display: none;
  }
}

/* 移动端抽屉里的那一项：标红加粗，和普通导航项区分 */
#mobile-nav .sidebar-menu-consult .sidebar-menu-link {
  color: var(--red-1);
  font-weight: 700;
}

/* ---------- 2. /consult/ 页面 ---------- */
.consult-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}
.consult-card {
  background: var(--color-wrap);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 30px 34px 34px;
}
@media screen and (width <= 767px) {
  .consult-card {
    padding: 20px 16px 24px;
  }
}
.consult-head h1 {
  color: var(--red-1);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
}
.consult-lead {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--color-default);
}
.consult-points {
  margin: 12px 0 0;
  padding-left: 20px;
  list-style: disc;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--grey-7);
}
.consult-points li::marker {
  color: var(--red-1);
}

.consult-h2 {
  margin: 32px 0 14px;
  padding-left: 11px;
  border-left: 4px solid var(--red-1);
  color: var(--color-default);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

/* 方案卡 */
.consult-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.consult-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 20px 18px 18px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: box-shadow 0.3s;
}
.consult-plan:hover {
  box-shadow: var(--shadow-meta);
}
.consult-plan.is-featured {
  border-color: var(--red-1);
}
.consult-plan-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--red-1);
  color: #fff;
  font-size: 11px;
  line-height: 1.6;
}
.consult-plan h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-default);
  line-height: 1.5;
}
.consult-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 8px;
}
.consult-price strong {
  color: var(--red-1);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.consult-price span {
  color: var(--grey-9);
  font-size: 12px;
}
.consult-plan-desc {
  margin: 0 0 10px;
  color: var(--grey-7);
  font-size: 13px;
  line-height: 1.75;
}
.consult-plan-items {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.8;
  color: var(--grey-7);
}
.consult-plan-items li {
  position: relative;
  padding-left: 17px;
  margin-bottom: 2px;
}
.consult-plan-items li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--red-2);
  font-size: 12px;
}

.consult-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 38px;
  margin-top: auto;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--red-1);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s;
  cursor: var(--cursor-pointer) !important;
}
.consult-btn:hover {
  background: var(--red-0);
  transform: translateY(-1px);
}

/* 付款区 */
.consult-pay {
  padding: 16px 18px;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--grey-7);
}
.consult-pay > p {
  margin: 0 0 8px;
}
.consult-pay > p:last-child {
  margin-bottom: 0;
}
.consult-pay a {
  color: var(--red-1);
  text-decoration: underline;
}
.consult-note {
  color: var(--grey-9);
  font-size: 12.5px;
}
.consult-qrs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 6px 0 14px;
}
.consult-qrs figure {
  margin: 0;
  text-align: center;
}
.consult-qrs img {
  display: block;
  width: 168px;
  max-width: 60vw;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}
.consult-qrs figcaption {
  margin-top: 6px;
  color: var(--grey-9);
  font-size: 12px;
}

/* 流程 */
.consult-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: consult-step;
}
.consult-steps li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 30px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--grey-7);
  counter-increment: consult-step;
}
.consult-steps li::before {
  content: counter(consult-step);
  position: absolute;
  top: 2px;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red-5);
  color: var(--red-1);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

/* FAQ */
.consult-faq {
  margin: 0;
}
.consult-faq dt {
  margin-top: 12px;
  color: var(--color-default);
  font-size: 14px;
  font-weight: 700;
}
.consult-faq dt:first-child {
  margin-top: 0;
}
.consult-faq dd {
  margin: 4px 0 0;
  color: var(--grey-7);
  font-size: 13px;
  line-height: 1.8;
}

.consult-cta-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--color-h2-border);
  color: var(--grey-9);
  font-size: 13px;
  line-height: 1.7;
}
.consult-cta-foot a {
  color: var(--red-1);
}

/* 支付联调警示条（CONSULT.testMode）：橙色，压在页首，先于一切内容被读到 */
.consult-alert {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid #f0b429;
  border-left: 5px solid #f08c00;
  border-radius: 10px;
  background: #fff8e6;
  color: #7a4b00;
  font-size: 13.5px;
  line-height: 1.8;
}
.consult-alert strong {
  display: block;
  margin-bottom: 4px;
  color: #a85600;
  font-size: 15px;
  font-weight: 700;
}
.consult-alert p {
  margin: 0;
}
.consult-alert a {
  color: #a85600;
  text-decoration: underline;
}
[data-theme='dark'] .consult-alert {
  border-color: #6b5220;
  border-left-color: #c98a00;
  background: #2a2213;
  color: #e8c98a;
}
[data-theme='dark'] .consult-alert strong,
[data-theme='dark'] .consult-alert a {
  color: #ffc65c;
}
/* 退款入口：比正文更显眼 */
.consult-refund {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--red-5);
  color: var(--red-1);
  font-weight: 700;
}
.consult-refund a {
  color: var(--red-1);
}

/* 收银台（/pay/）：订单摘要 + 支付方式卡 */
.pay-order {
  margin: 0 0 26px;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--red-5-5);
}
.pay-order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
}
.pay-order-row + .pay-order-row {
  border-top: 1px dashed var(--color-border);
  margin-top: 6px;
  padding-top: 12px;
}
.pay-order-label {
  min-width: 52px;
  color: var(--grey-7);
  font-size: 13px;
}
.pay-order-amount {
  color: var(--red-1);
  font-size: 26px;
  line-height: 1.2;
}
.pay-order-note {
  color: var(--grey-7);
  font-size: 12.5px;
}
.pay-order-tip {
  margin: 10px 0 0;
  color: var(--grey-7);
  font-size: 12.5px;
}
.pay-methods {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 8px;
}
.pay-method {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--red-5-5);
}
.pay-method.is-featured {
  border-color: var(--red-1);
  box-shadow: 0 3px 12px var(--color-red-6-shadow);
}
.pay-method.is-pending {
  opacity: 0.62;
}
.pay-method-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pay-method-head strong {
  font-size: 15.5px;
}
.pay-method-badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--red-1);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
}
.pay-method-badge.is-grey {
  background: var(--red-3);
  color: #fff;
}
.pay-method-note {
  margin: 0;
  color: var(--grey-7);
  font-size: 12.5px;
  line-height: 1.7;
}
.pay-method .consult-btn {
  align-self: flex-start;
  margin-top: auto;
}
.pay-method-qr {
  margin: 4px 0 0;
}
.pay-method-qr img {
  width: 180px;
  height: 180px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}
.pay-method-pending {
  align-self: flex-start;
  margin-top: auto;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--color-border);
  color: var(--grey-7);
  font-size: 12.5px;
}
.pay-fallback {
  margin: 10px 0 0;
}
@media (max-width: 560px) {
  .pay-order {
    padding: 14px;
  }
  .pay-order-amount {
    font-size: 22px;
  }
  .pay-methods {
    grid-template-columns: 1fr;
  }
}

/* ---------- 3. /shop/ 商品页 + /terms/ 条款页 ---------- */
.shop-crumb {
  margin: 0 0 14px;
  color: var(--grey-9);
  font-size: 12.5px;
}
.shop-crumb a {
  color: var(--red-1);
  text-decoration: none;
}
.shop-crumb a:hover {
  text-decoration: underline;
}
.shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.shop-meta span {
  padding: 2px 9px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--grey-7);
  font-size: 11.5px;
  line-height: 1.7;
}
.shop-best {
  margin: 0 0 14px;
  color: var(--grey-9);
  font-size: 12.5px;
  line-height: 1.7;
}
.shop-detail-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--red-1);
  font-size: 12.5px;
  text-decoration: none;
}
.shop-detail-link:hover {
  text-decoration: underline;
}
.shop-items {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.8;
  color: var(--grey-7);
}
.shop-items li {
  position: relative;
  padding-left: 17px;
  margin-bottom: 3px;
}
.shop-items li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--red-2);
  font-size: 12px;
}
.shop-others {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}
.shop-others li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--color-border);
}
.shop-others li:last-child {
  border-bottom: 0;
}
.shop-others a {
  color: var(--red-1);
  text-decoration: none;
}
.shop-others a:hover {
  text-decoration: underline;
}
.shop-others span {
  color: var(--grey-9);
  font-size: 12.5px;
}
.shop-en {
  font-size: 12.5px;
  line-height: 1.8;
}
/* 条款页里的列表：与 .shop-items 同款勾选样式 */
.consult-pay .shop-items {
  margin: 4px 0 10px;
}

/* ── 歌单筛选条（public/js/player-guard.js 注入，2026-11-15） ──
   每天 400 首，滚轮翻太慢：顶部固定一行「搜索 + 三语切换 + 随机」。
   滚动容器是 .aplayer-list 本身，所以用 sticky 顶住；li 的隐藏要显式写死，
   否则 APlayer 自己的 display 会盖掉 [hidden] 的 UA 规则。 */
.aplayer-list ol li[hidden] {
  display: none !important;
}
.rpf {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 8px;
  background: var(--color-wrap);
  border-bottom: 1px solid var(--color-border);
}
.rpf-top,
.rpf-bottom {
  display: flex;
  gap: 6px;
  align-items: center;
}
.rpf-q {
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--color-default);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
}
.rpf-q:focus {
  border-color: var(--color-link);
}
.rpf-q::placeholder {
  color: var(--color-default);
  opacity: 0.45;
}
.rpf-tabs {
  display: flex;
  gap: 4px;
}
.rpf-tab,
.rpf-dice {
  height: 26px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 24px;
  color: var(--color-default);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}
.rpf-tab.is-on {
  color: #fff;
  background: var(--color-link);
  border-color: var(--color-link);
}
.rpf-dice {
  margin-left: auto;
}
.rpf-count {
  font-size: 11px;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
