/* ===== 蛇蛇修仙传 · 简约水墨风 ===== */
:root {
  --bg: #f5f2ec;            /* 宣纸白 */
  --bg2: #efe9df;
  --ink: #15120e;           /* 浓墨（主文字·近黑） */
  --fg: #2a2520;            /* 正文墨色 */
  --muted: rgba(21, 18, 14, .55);  /* 淡墨（透明黑） */
  --accent: #b8923f;        /* 泥金（主装饰金） */
  --accent-deep: #9c7a2e;
  --border: rgba(168, 133, 63, .22);
  --card: rgba(255, 255, 255, .7);
  --card-solid: #fffdf9;
  --shadow: rgba(60, 45, 30, .1);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "KaiTi", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --brush: "Ma Shan Zheng", "Zhi Mang Xing", "STKaiti", "KaiTi", var(--serif);
}

* { box-sizing: border-box; }

/* 横向溢出兜底：避免个别边角导致整页横向滚动（不破坏 sticky 顶栏） */
html { overflow-x: hidden; }

/* ===== 基础背景（纯宣纸白，简约无装饰） ===== */
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background-color: var(--bg);
  min-height: 100vh;
  position: relative;
}

/* ===== 动态背景层（点击封面后变换为封面图，模糊浅化） ===== */
#bg-layer {
  position: fixed;
  inset: -80px;
  z-index: -4;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(60px) brightness(1.14) saturate(.7) contrast(.9);
  opacity: 0;
  transform: scale(1.06);
  transition: background-image 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: background-image, opacity;
}
#bg-layer.active { opacity: 0.4; }

/* ===== 顶部栏（白色半透，简约） ===== */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  /* 刘海屏安全区（无刘海设备 env() 返回 0，无副作用） */
  padding: 12px max(24px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(255, 253, 249, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  color: var(--ink);
}
/* 印章：混沌水墨色「蛇」字 + 流动动画 */
.topbar h1::before {
  content: "蛇";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 700;
  width: 30px;
  height: 30px;
  line-height: 1;
  margin-right: 10px;
  border-radius: 5px;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}
.topbar h1::after {
  content: "";
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-left: 12px;
  border-radius: 1px;
}

/* ===== 搜索框 + 下拉建议 ===== */
.search-wrap { position: relative; flex: 1; max-width: 460px; }
.topbar input[type="search"] {
  width: 100%;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
  font-size: 13px;
  font-family: var(--serif);
  letter-spacing: 1px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.topbar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 146, 63, .14);
}
.topbar input[type="search"]::placeholder { color: var(--muted); opacity: .7; }
.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(60, 45, 30, .18);
  z-index: 30;
  max-height: 300px;
  overflow: auto;
  padding: 6px;
}
.search-suggest.hidden { display: none; }
.suggest-item {
  padding: 9px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 1px;
  transition: all .15s ease;
}
.suggest-item:hover { background: rgba(184, 146, 63, .12); color: var(--ink); }
.suggest-empty { padding: 10px 13px; font-size: 12px; color: var(--muted); font-family: var(--serif); }

/* 音效开关 */
.sound-toggle {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: var(--ink);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.sound-toggle:hover { border-color: rgba(184, 146, 63, .6); background: rgba(255, 255, 255, .65); }
.sound-toggle:active { transform: scale(.92); }
.sound-toggle.muted { opacity: .5; }

main {
  padding: 28px 24px calc(80px + env(safe-area-inset-bottom));
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== 排序 + 筛选 ===== */
.sortbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
  font-family: var(--serif);
}
/* ===== 自定义水墨风下拉框 ===== */
.custom-select { position: relative; display: inline-block; }
/* 触发器：混沌水墨色流动动画（默认选中态） */
.cs-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
  padding: 5px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--serif);
  letter-spacing: 1px;
  cursor: pointer;
  transition: box-shadow .2s ease;
  white-space: nowrap;
}
.cs-trigger:hover { box-shadow: 0 4px 18px rgba(40, 30, 20, .36); }
.cs-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 146, 63, .14);
}
.cs-arrow {
  width: 10px; height: 6px;
  transition: transform .25s ease;
  color: rgba(255, 255, 255, .85);
}
.custom-select.open .cs-arrow { transform: rotate(180deg); }

/* 下拉菜单 */
.cs-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: linear-gradient(180deg, #fffdf9, #f8f3e8);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(60, 45, 30, .18);
  padding: 6px;
  z-index: 30;
  animation: dropIn .2s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cs-menu.hidden { display: none; }
/* 下拉选项 */
.cs-opt {
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--serif);
  letter-spacing: 2px;
  color: var(--fg);
  transition: all .15s ease;
}
.cs-opt:hover {
  background: rgba(184, 146, 63, .14);
  color: var(--ink);
}
/* 选中态：混沌水墨色流动动画 */
.cs-opt.active {
  position: relative;
  color: #fff;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  font-weight: 600;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168, 133, 63, .14);
}
.orient-filters { border-bottom: none; margin-bottom: 22px; }
.flabel {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--serif);
  letter-spacing: 2px;
  margin-right: 2px;
}
.chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--serif);
  letter-spacing: 2px;
  transition: all .25s ease;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
/* 选中：半透明混沌水墨色 + 流动动画 */
.chip.active {
  position: relative;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}
@keyframes inkFlow {
  from { background-position: 0 0; }
  to { background-position: 220% 0; }
}
.chip.active:hover { color: #fff; }

/* ===== 区块标题（无编号） ===== */
section { margin-bottom: 46px; }
h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  gap: 12px;
}
h2::before {
  content: "";
  width: 3px;
  height: 17px;
  background: linear-gradient(180deg, var(--accent), rgba(184, 146, 63, .3));
  border-radius: 2px;
}
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(184, 146, 63, .2), transparent);
  margin-left: 4px;
}

/* ===== 网格（竖/横各自一致排版） ===== */
.grid { display: grid; gap: 22px; }
.grid.portrait-grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
.grid.landscape-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 26px; }

.cell {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .4s ease, transform .35s cubic-bezier(0.2, 0, 0, 1);
}
.cell:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 34px var(--shadow);
}

/* 卡片图片（按横竖定向比例） */
.cell img {
  width: 100%;
  display: block;
  background: #e9e3d8;
  object-fit: cover;
}
.cell.cover.portrait img { aspect-ratio: 9 / 16; height: auto; }
.cell.cover.landscape img { aspect-ratio: 16 / 9; height: auto; }
.cell.cover img { transition: transform .6s cubic-bezier(0.2, 0, 0, 1); }
.cell.cover:hover img { transform: scale(1.04); }
/* 图片加载失败：隐藏 alt 文本并显示统一占位，避免与角色名重叠 */
.cover-img.img-broken img { color: transparent; font-size: 0; }
.cover-img.img-broken::after {
  content: "图片加载失败";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(60, 45, 30, .35); font-size: 13px; font-family: var(--serif);
  letter-spacing: 1px; pointer-events: none;
}

/* ===== 图片防保存：禁止拖拽 / 选中 / 长按保存 ===== */
.cell.cover img,
.viewer-frame img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

/* ===== 封面卡片：简约细边框（无条纹/无云纹） ===== */
.cell.cover {
  cursor: pointer;
  position: relative;
  background: var(--card-solid);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(60, 45, 30, .08);
  overflow: hidden;
}
.cell.cover:hover {
  border-color: rgba(184, 146, 63, .5);
  box-shadow: 0 10px 30px rgba(60, 45, 30, .14);
}

/* 角色名（艺术字体） */
.cover-name {
  font-family: var(--brush);
  color: var(--ink);
  z-index: 3;
  pointer-events: none;
}
/* 竖图：左上角竖向排版 */
.cover-name.portrait {
  position: absolute;
  top: 14px;
  left: 13px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 23px;
  letter-spacing: 4px;
  line-height: 1.1;
  max-height: 72%;
  text-shadow: 0 1px 8px rgba(255, 255, 255, .75), 0 0 2px rgba(255, 255, 255, .9);
}
/* 横图：图上方居中横向排版 */
.cover-name.landscape {
  position: static;
  display: block;
  text-align: center;
  font-size: 21px;
  letter-spacing: 3px;
  padding: 10px 6px 4px;
}

/* 封面图片容器（相对定位，承载右下角浏览量） */
/* 金色渐变细框 + 四角内凹 + 渐变描边 */
.cover-img {
  position: relative; display: block;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg,
    #f0d68a 0%, #c9a84c 30%, #8b6914 60%, #d4a843 100%
  ) 1;
  clip-path: polygon(
    6px 0%, calc(100% - 6px) 0%,
    100% 6px, 100% calc(100% - 6px),
    calc(100% - 6px) 100%, 6px 100%,
    0% calc(100% - 6px), 0% 6px
  );
}
.cell.cover:hover .cover-img {
  border-image: linear-gradient(135deg,
    #f5e6a3 0%, #d4b85c 30%, #a07820 60%, #e0c060 100%
  ) 1;
}
/* 浏览量：图片内右下角，半透明 */
.cover-views {
  position: absolute;
  right: 8px; bottom: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, .9);
  background: rgba(20, 16, 12, .32);
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--serif);
  letter-spacing: 1px;
  backdrop-filter: blur(2px);
  pointer-events: none;
}
/* 封面下方：点赞居中，收藏按钮绝对定位靠右 */
.cover-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  position: relative;
  z-index: 2;
}
.like-btn {
  background: rgba(184, 146, 63, .08);
  border: 1px solid var(--border);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 4px 14px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--serif);
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(184, 146, 63, .12);
  transition: all .2s ease;
  position: relative;
  overflow: visible;
}
.like-btn:hover { background: rgba(184, 146, 63, .16); border-color: var(--accent); transform: translateY(-1px); }
.like-btn:active { transform: scale(.95); }
.like-btn.liked {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}
/* 点赞成功：按钮弹跳 + 上浮爱心 */
.like-btn.like-pop { animation: likePop .45s cubic-bezier(0.2, 0, 0, 1); }
@keyframes likePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); }
  60% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.like-heart {
  position: absolute;
  left: 50%; top: 0;
  transform: translate(-50%, -10%);
  color: var(--accent-deep);
  font-size: 16px;
  pointer-events: none;
  animation: heartFloat .8s ease-out forwards;
}
@keyframes heartFloat {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1.2); }
}

/* ===== 链接列表 ===== */
.linklist { display: flex; flex-direction: column; gap: 10px; }
.linkitem {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 14px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.linkitem:hover { border-color: var(--accent); box-shadow: 0 4px 16px var(--shadow); }
.linkitem .lt { font-weight: 600; font-family: var(--serif); letter-spacing: 2px; color: var(--ink); }
.linkitem .lc {
  font-size: 11px; color: var(--accent-deep);
  background: rgba(184, 146, 63, .1); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 999px; letter-spacing: 1px;
}
.linkitem a { color: var(--accent); word-break: break-all; text-decoration: none; font-size: 13px; transition: color .2s; }
.linkitem a:hover { color: var(--accent-deep); }

.empty {
  color: var(--muted); font-size: 14px; font-family: var(--serif);
  letter-spacing: 1px; padding: 40px 0; text-align: center;
}

/* ===== 分组标题（无编号） ===== */
.group { margin-bottom: 38px; }
.group-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--ink);
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}
.group-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(184, 146, 63, .16), transparent);
}

/* ===== 弹窗（白底画卷，按竖/横整体变形） ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(40, 34, 28, .4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 100;
  animation: modalIn .3s ease;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 94vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #fffdf9, #fbf6ec);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 880px;
  padding: 16px;
  box-shadow: 0 24px 64px rgba(40, 30, 20, .3);
  animation: boxIn .35s cubic-bezier(0.2, 0, 0, 1);
}
/* 竖图弹窗：竖向比例，容纳完整 9:16 */
.modal-box.portrait { max-width: 450px; }
/* 横图弹窗：横向比例，容纳完整 16:9 */
.modal-box.landscape { max-width: 960px; }
@keyframes boxIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 关闭按钮（绝对定位右上角，不显示任何文字） */
.modal .close {
  position: sticky;
  top: 8px;
  align-self: flex-end;
  z-index: 5;
  background: rgba(255, 253, 249, .85);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 24px; line-height: 1;
  cursor: pointer; width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal .close:hover { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: transparent; }

/* 子图舞台：按封面横竖定向比例整体变形 */
.viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.viewer-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.viewer-frame.portrait { height: 80vh; width: auto; aspect-ratio: 9 / 16; }
.viewer-frame.landscape { width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; }
.viewer-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  background: #efe9df;
  box-shadow: 0 10px 36px rgba(40, 30, 20, .25);
}

/* 翻页按钮（金色透明） */
.nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255, 253, 249, .82); backdrop-filter: blur(4px);
  color: var(--accent); font-size: 24px; line-height: 1; cursor: pointer; z-index: 2;
  transition: all .2s ease; display: flex; align-items: center; justify-content: center;
}
.nav:hover { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border-color: transparent; }
.nav.prev { left: 8px; }
.nav.next { right: 8px; }
/* 下载按钮：底部居中胶囊，泥金主题 */
.nav.download {
  top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: auto; height: auto; padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-family: var(--serif); letter-spacing: 2px;
  gap: 6px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(156, 122, 46, .35);
}
.nav.download svg { width: 16px; height: 16px; display: block; }
.nav.download:hover { filter: brightness(1.08); transform: translateX(-50%) translateY(-1px); box-shadow: 0 6px 20px rgba(156, 122, 46, .45); }
.nav.download:active { transform: translateX(-50%) translateY(0); }

/* 下载免责提示：自有/授权内容 + 自由下载请勿商用 */
.dl-note {
  margin: 6px 0 2px;
  text-align: center;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  opacity: .85;
}
.dl-note::before { content: '⚠ '; color: var(--accent); }

/* 协议弹窗与勾选 */
.ua-agree { display: flex; align-items: center; gap: 6px; margin: 10px 2px 2px; font-size: 12px; color: var(--muted); font-family: var(--serif); cursor: pointer; line-height: 1.5; }
.ua-agree a { color: var(--accent); text-decoration: none; }
.ua-agree a:hover { color: var(--accent-deep); }
.ua-agree input { width: 15px; height: 15px; flex: 0 0 auto; accent-color: var(--accent); }
.agreement-box { max-width: 560px; }
.agreement-title { font-family: var(--serif); color: var(--ink); text-align: center; margin: 4px 0 12px; letter-spacing: 2px; }
.agreement-body { max-height: 56vh; overflow-y: auto; padding-right: 6px; font-family: var(--serif); font-size: 13px; line-height: 1.7; }
.agreement-body h4 { color: var(--accent-deep); margin: 14px 0 6px; font-size: 14px; letter-spacing: 1px; }
.agreement-body p { margin: 0 0 8px; color: var(--muted); }
.ua-agree-modal { justify-content: center; margin: 12px 0 4px; font-size: 13px; }
.ua-agree-link { font-size: 12px; margin: 12px 0 0; }

/* 封面浏览量样式见 .cover-views（与点赞同行右下角） */

/* 封面说明块（条数/内容按后台配置，与图片分块展示） */
.cover-notes {
  margin: 0 12px 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(168, 133, 63, .16);
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: .62;
  transition: opacity .25s ease;
}
.cover-notes:hover { opacity: 1; }
.cn-item {
  position: relative;
  font-size: 12px;
  color: var(--accent-deep);
  font-family: var(--serif);
  line-height: 1.5;
  text-decoration: none;
  word-break: break-all;
  padding-left: 11px;
  transition: color .2s;
}
.cn-item::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
a.cn-item:hover { color: var(--accent-deep); }

/* ===== 后台卡片 ===== */
.panel { max-width: 1040px; margin: 0 auto; padding: 26px 20px 80px; }
.card {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 14px rgba(60, 45, 30, .05);
}
.card.center { max-width: 360px; margin: 80px auto; text-align: center; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-family: var(--serif); letter-spacing: 2px; color: var(--ink); }
.card input[type="text"],
.card input[type="password"],
.card textarea {
  display: block; width: 100%; margin-bottom: 10px; padding: 10px 14px;
  border-radius: 6px; border: 1px solid var(--border); background: rgba(255, 255, 255, .8);
  color: var(--ink); font-family: var(--sans); resize: vertical; transition: border-color .2s;
}
.card input:focus, .card textarea:focus { outline: none; border-color: var(--accent); }
.card textarea { font-size: 13px; }
.card button {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border: none; padding: 10px 20px; border-radius: 6px;
  cursor: pointer; font-size: 14px; font-family: var(--serif); letter-spacing: 2px; transition: filter .2s;
}
.card button:hover { filter: brightness(1.06); }

.cell button, .linkitem button {
  background: transparent; border: 1px solid var(--border); color: var(--accent);
  padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 12px;
  font-family: var(--serif); letter-spacing: 1px; transition: all .2s;
}
.cell button:hover, .linkitem button:hover { border-color: var(--accent-deep); background: rgba(184, 146, 63, .1); }

button.ghost {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 7px 16px; border-radius: 6px; cursor: pointer; font-family: var(--serif); letter-spacing: 2px;
  transition: all .2s;
}
button.ghost:hover { border-color: var(--accent); color: var(--accent); }

.lbl { font-size: 12px; color: var(--muted); margin: 8px 0 4px; display: block; letter-spacing: 1px; font-family: var(--serif); }
.hint { font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.8; font-family: var(--serif); letter-spacing: 1px; }
.msg { color: var(--accent-deep); font-size: 13px; min-height: 18px; }

/* ===== 后台真实数据统计表 ===== */
.stat-wrap { overflow-x: auto; }
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--serif);
  letter-spacing: 1px;
}
.stat-table th, .stat-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(168, 133, 63, .14);
  white-space: nowrap;
}
.stat-table th {
  color: var(--muted);
  font-weight: 600;
}
.stat-table td { color: var(--fg); }
.stat-table tbody tr:hover { background: rgba(184, 146, 63, .06); }
.stat-table td.num { font-variant-numeric: tabular-nums; color: var(--accent-deep); }

.hidden { display: none !important; }

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .topbar h1 { font-size: 16px; letter-spacing: 1px; }
  .topbar h1::before { width: 26px; height: 26px; font-size: 12px; }
  /* 窄屏隐藏长副标题，顶栏只留主名，按钮更易排成一行 */
  .topbar h1 .h1-sub { display: none; }
  .search-wrap { order: 3; width: 100%; max-width: none; }
  main { padding: 16px 14px 80px; }
  .grid.portrait-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .grid.landscape-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .modal { padding: 16px 8px; }
  .modal-box { padding: 14px 16px 20px; }
  .nav { width: 36px; height: 36px; font-size: 20px; }
  .viewer-frame.portrait { height: 70vh; }
  .viewer-frame.landscape { max-height: 60vh; }
  h2 { font-size: 16px; letter-spacing: 2px; }
  .dl-note { font-size: 11px; }
  .agreement-body { font-size: 12px; max-height: 60vh; }
}

/* 超窄屏（≤360px）：进一步压缩按钮间距，避免顶栏换行过多 */
@media (max-width: 360px) {
  .topbar { gap: 8px; padding: 8px 12px; }
  .user-toggle { padding: 0 6px; }
}

/* ===== 用户功能：收藏 / 历史（顶栏入口 + 面板） ===== */
.user-toggle {
  flex: 0 0 auto;
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: var(--ink);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.user-toggle:hover {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}
.user-toggle:active { transform: scale(.92); }
/* 面板打开态：混沌水墨流动动画（与排序/筛选选中态同源） */
.user-toggle.is-open {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}
/* 顶栏图标：泥金描边线性图标，hover/打开时转亮金，显高贵 */
.user-toggle .ut-ico {
  width: 18px; height: 18px;
  display: block;
  color: var(--accent);
  filter: drop-shadow(0 1px 1px rgba(120, 90, 30, .25));
  transition: color .2s ease, filter .2s ease;
}
.user-toggle:hover .ut-ico,
.user-toggle.is-open .ut-ico {
  color: #f3d98c;
  filter: drop-shadow(0 1px 2px rgba(243, 217, 140, .35));
}
.user-toggle .badge {
  font-size: 11px; line-height: 1;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-family: var(--sans);
}

/* 封面卡片收藏按钮（与服务端点赞区分：本地星标） */
.fav-btn {
  background: rgba(184, 146, 63, .08);
  border: 1px solid var(--border);
  color: var(--accent-deep);
  border-radius: 999px;
  width: 34px; height: 30px;
  cursor: pointer;
  font-size: 15px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s ease;
  /* 绝对定位到封面操作栏右侧，使点赞保持居中 */
  position: absolute;
  right: 12px;
  top: 0; bottom: 0;
  margin: auto 0;
}
.fav-btn:hover { background: rgba(184, 146, 63, .16); border-color: var(--accent); transform: translateY(-1px); }
.fav-btn:active { transform: scale(.95); }
/* 收藏选中态：混沌水墨流动动画（与点赞选中态同源） */
.fav-btn.faved {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 12px rgba(40, 30, 20, .28);
}

/* 用户面板（收藏 / 历史） */
.user-panel-box { max-width: 460px; }
.user-panel-tabs { display: flex; gap: 8px; margin-bottom: 14px; padding: 0 4px; }
.up-tab {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: var(--muted);
  font-family: var(--serif);
  letter-spacing: 1px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.up-tab:hover { border-color: var(--accent); color: var(--accent-deep); }
/* 面板标签选中态：混沌水墨流动动画 */
.up-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}

.user-panel-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 64vh; overflow-y: auto; padding: 2px;
}
.up-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: all .2s ease;
}
.up-item:hover { border-color: var(--accent); background: rgba(255, 255, 255, .8); transform: translateY(-1px); }
.up-item img { width: 52px; height: 70px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; background: var(--bg2); }
.up-item.landscape img { width: 84px; height: 52px; }
.up-meta { flex: 1; min-width: 0; }
.up-name { font-family: var(--serif); font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 收藏面板内「移除」按钮：混沌水墨流动 + 朱红警示 */
.up-del {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: 12px; cursor: pointer;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
  transition: filter .2s ease, transform .15s ease;
}
.up-del:hover { filter: brightness(1.08); background: linear-gradient(135deg, #b04a3a, #8a3326); animation: none; }
.up-del:active { transform: scale(.95); }

@media (max-width: 600px) {
  .user-panel-box { max-width: none; }
  .user-toggle { padding: 0 8px; }
}

/* 同步码区（云端同步身份） */
.sync-bar {
  margin-top: 6px;
  padding: 12px 10px 4px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.sync-code { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sync-code code {
  font-family: var(--sans);
  letter-spacing: 2px;
  color: var(--accent-deep);
  background: rgba(184, 146, 63, .12);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.sync-use { display: flex; gap: 8px; }
.sync-input {
  flex: 1; min-width: 0;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase;
  outline: none;
}
.sync-input:focus { border-color: var(--accent); }
.sync-actions { display: flex; gap: 8px; margin-top: 2px; }
.sync-actions .up-del { flex: 1; text-align: center; }

/* ===== 同步码按钮：黑金水墨混沌流动主题 ===== */
/* 主操作（复制 / 同步 / 开启同步）：混沌水墨流动 + 金光晕 */
.sync-btn {
  flex: 1;
  text-align: center;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-family: var(--serif);
  letter-spacing: 1px;
  cursor: pointer;
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
  transition: filter .2s ease, transform .15s ease;
}
.sync-btn:hover { filter: brightness(1.12); }
.sync-btn:active { transform: scale(.95); }
/* 行内复制按钮：不拉伸 */
.sync-code .sync-btn { flex: 0 0 auto; }
/* 危险操作（退出 / 重置）：混沌水墨流动 + 朱红描边警示 */
.sync-btn.danger {
  background: linear-gradient(120deg,
    rgba(34, 28, 22, .82),
    rgba(96, 86, 74, .66),
    rgba(52, 44, 36, .78),
    rgba(120, 108, 92, .6),
    rgba(34, 28, 22, .82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  border-color: rgba(176, 74, 58, .5);
  box-shadow: 0 2px 14px rgba(138, 51, 38, .32);
}
.sync-btn.danger:hover { filter: brightness(1.06); background: linear-gradient(135deg, #b04a3a, #8a3326); animation: none; }

/* ===== 账号区（注册 / 登录 / 修改信息） ===== */
.user-account { padding: 4px 0; }
/* 后端降级提示（腾讯云等未开放账号系统时） */
.ua-degrade { padding: 6px 2px; }
.ua-degrade-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--accent-deep); }
.ua-degrade-text { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.ua-form, .ua-on { display: flex; flex-direction: column; gap: 8px; }
.ua-sub { font-size: 12px; color: var(--accent-deep); letter-spacing: 1px; opacity: .88; margin-top: 2px; }
.ua-sub:not(:first-child) { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.ua-row { display: flex; }
.ua-row .sync-input { width: 100%; }
.ua-actions { display: flex; gap: 8px; }
.ua-actions .sync-btn { flex: 1; }
.ua-id { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ua-id code { color: var(--accent-deep); background: rgba(184, 146, 63, .12); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; letter-spacing: 2px; }
.ua-id .sync-btn { flex: 0 0 auto; padding: 4px 12px; }
.ua-tip { margin: 2px 0 0; font-size: 12px; color: var(--accent-deep); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.ua-tip.show { opacity: 1; }
/* 注册 / 登录 二选一 chooser */
.ua-chooser { display: flex; gap: 8px; margin-bottom: 14px; }
.ua-tab {
  flex: 1; padding: 9px 0; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--ink); font-size: 14px; cursor: pointer; transition: all .2s ease;
}
.ua-tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.ua-tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(120deg, rgba(34, 28, 22, .85), rgba(96, 86, 74, .7), rgba(52, 44, 36, .82));
  background-size: 200% 200%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 2px 14px rgba(40, 30, 20, .28);
}
/* 账号栏：注册/登录后展示系统生成的账号（只读，可复制） */
.ua-label { font-size: 12px; color: var(--accent-deep); opacity: .92; margin-bottom: 2px; }
.ua-account-row { display: flex; gap: 8px; align-items: stretch; }
.ua-account-row .sync-input { background: rgba(184, 146, 63, .12); color: var(--accent-deep); font-weight: 600; letter-spacing: 3px; }
.ua-account-row .sync-input:focus { border-color: var(--accent); }
.ua-account-row .sync-btn { flex: 0 0 auto; padding: 7px 16px; }

/* ===== 评论区：黑金水墨 ===== */
.comments {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* 封面内独立评论区（每个封面各自展示自己的评论） */
.cover-comments {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* 子图弹窗：评论仅以一个小图标入口呈现（含评论数徽标），不展示多余内容 */
.cover-cmt-icon {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  margin: 12px auto 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--accent-deep);
  cursor: pointer;
  transition: all .2s ease;
}
.cover-cmt-icon:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.cover-cmt-icon svg { width: 20px; height: 20px; }
.cover-cmt-icon .cmt-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-deep); color: #fff;
  font-size: 11px; line-height: 16px; text-align: center;
  font-family: var(--serif);
}
/* 留言板：昵称选填输入框 */
.message-name {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-solid);
  color: var(--text);
  font-size: 13px;
  font-family: var(--serif);
  outline: none;
  transition: border-color .2s;
}
.message-name:focus { border-color: var(--accent); }
.comments-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 15px; letter-spacing: 2px;
  color: var(--ink);
}
/* 标题前的小印章「评」 */
.ink-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  font-size: 12px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(120, 90, 30, .3);
}
.comments-count {
  font-size: 12px; color: var(--accent-deep);
  background: rgba(184, 146, 63, .12);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}
.comments-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 220px; overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 2px;
}
.comments-list .empty { color: var(--muted); font-size: 13px; text-align: center; padding: 14px 0; }
.comment-item {
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}
.comment-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.comment-item .comment-name { color: var(--accent-deep); font-weight: 600; font-size: 13px; }
.comment-time { color: var(--muted); font-size: 11px; }
.comment-body {
  margin-top: 4px;
  color: var(--ink); line-height: 1.6; font-size: 13px;
  white-space: pre-wrap; word-break: break-word;
}
/* 评论表单 */
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-form .comment-name {
  width: 180px; max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-family: var(--serif); font-size: 13px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.comment-text {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .7);
  font-family: var(--serif); font-size: 13px; color: var(--ink);
  resize: vertical; line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
}
.comment-form .comment-name:focus, .comment-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 146, 63, .15);
}
.comment-input-row { display: flex; gap: 8px; align-items: flex-end; }
.comment-input-row .comment-text { flex: 1; }
.comment-submit { flex: 0 0 auto; padding: 8px 18px; }
/* 评论提交后的审核提示（淡入淡出） */
.comment-tip {
  margin: 2px 0 0;
  font-size: 12px; letter-spacing: 1px;
  color: var(--accent-deep);
  opacity: 0; transform: translateY(-2px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.comment-tip.show { opacity: 1; transform: translateY(0); }

/* 独立「全部评论」页 */
.comment-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 52vh; overflow-y: auto;
  margin: 6px 0 12px; padding-right: 2px;
  border-top: 1px solid var(--border); padding-top: 12px;
}
.comment-list .empty { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 0; }
.comment-item { transition: border-color .2s, box-shadow .2s; }
.comment-item[data-jump]:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184, 146, 63, .12); }
.comment-cover { color: var(--accent-deep); font-size: 11px; opacity: .85; margin-left: 2px; }
.comment-form-box { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-as { font-size: 12px; color: var(--accent-deep); }
.comment-login { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.comment-login .sync-btn { flex: 0 0 auto; padding: 7px 16px; }

/* ===== 后台评论审核 ===== */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 7px;
  font-size: 12px; font-weight: 600; line-height: 1;
  color: #fff; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 1px 6px rgba(120, 90, 30, .3);
  vertical-align: middle;
}
.mod-comments { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mod-comment {
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .55);
  padding: 10px 12px;
}
.mc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.mc-cover {
  font-size: 12px; color: var(--accent-deep);
  background: rgba(184, 146, 63, .12);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 8px;
}
.mc-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.mc-time { color: var(--muted); font-size: 11px; }
.mc-body {
  margin-top: 6px; color: var(--ink); line-height: 1.6; font-size: 13px;
  white-space: pre-wrap; word-break: break-word;
}
.mc-actions { display: flex; gap: 8px; margin-top: 10px; }
.mc-actions button {
  font-family: var(--serif); font-size: 13px; letter-spacing: 1px;
  padding: 6px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: filter .2s, transform .1s;
}
.mc-actions button:active { transform: translateY(1px); }
.mc-actions .ok {
  color: #f3d98c; border-color: var(--border);
  background: linear-gradient(120deg, rgba(34,28,22,.82), rgba(96,86,74,.66), rgba(52,44,36,.78), rgba(120,108,92,.6), rgba(34,28,22,.82));
  background-size: 220% 100%;
  animation: inkFlow 3.4s linear infinite;
  box-shadow: 0 0 12px rgba(184, 146, 63, .25);
}
.mc-actions .ok:hover { filter: brightness(1.15); }
.mc-actions .no {
  color: #f3d2c4; border: 1px solid rgba(176, 74, 58, .6);
  background: linear-gradient(135deg, rgba(138,51,38,.5), rgba(176,74,58,.4));
}
.mc-actions .no:hover { background: linear-gradient(135deg, #b04a3a, #8a3326); color: #fff; }
