/* ============ 排夯榜 RankPal 全站样式 ============ */
/* 视觉风格：方案A「墨韵鎏金」——米纸底 + 墨绿 + 鎏金 + 朱红印章 */
:root {
  /* 主色（墨绿） */
  --primary: #1e3d33;
  --primary-dark: #152e26;
  --gradient: linear-gradient(135deg, #2c5747 0%, #1e3d33 60%, #3f7a63 100%);

  /* 中国风点缀色（印章/强调/装饰） */
  --cinnabar: #b03a2e;      /* 朱红（印章） */
  --cinnabar-dark: #8e2f26;
  --gold: #b8892d;          /* 鎏金 */
  --gold-light: #d8b25c;
  --bamboo: #3f7a63;        /* 竹青 */
  --indigo-cn: #2a2620;     /* 墨黑 */
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;

  /* 中性（米纸暖调） */
  --bg: #f5efe3;
  --card: #fffdf7;
  --beige: #efe7d3;          /* 浅驼卡片底 */
  --hover-bg: #e9e0cc;
  --text: #2a2620;
  --muted: #6b6252;
  --text-3: #a89f92;
  --border: #e3d9c4;
  --separator: rgba(107, 98, 82, .16);
  /* 浮起表面/输入框用的强边框（比 --border 更实，深色下尤为重要） */
  --border-2: #d9ccb2;
  /* 高对比的弱化文字（比 --muted 更醒目，用于深色底上的次要文字） */
  --muted-strong: #5c5346;
  /* 激活态文字色（被选中页签 / 当前导航项）；浅色下即主色，深色下提亮为暖金 */
  --accent-text: #1e3d33;
  /* 骨架屏色块 */
  --skeleton: #e9e0cc;

  /* 语义色（保留功能色：赞同绿/不赞同红） */
  --agree: #5f8a3e;
  --agree-strong: #4c722f;
  --disagree: #c4665c;
  --warn: #d9a441;
  --info: #8b9faf;

  /* 圆角（国风折中：方正而不失柔和） */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* 阴影（墨色柔和投影） */
  --shadow-sm: 0 1px 3px rgba(42, 38, 32, .10);
  --shadow: 0 2px 12px rgba(42, 38, 32, .14);
  --shadow-md: 0 6px 20px rgba(42, 38, 32, .16);
  --shadow-lg: 0 12px 32px rgba(42, 38, 32, .18);

  /* 字体：微软雅黑优先 */
  --font: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", system-ui, sans-serif;

  /* ---- 设计令牌：字号刻度（避免全站散落字面量） ---- */
  --fs-11: 11px;   /* 极小标注 */
  --fs-12: 12px;   /* 次要信息 */
  --fs-13: 13px;   /* 正文小号 */
  --fs-15: 15px;   /* 正文（body 基准） */
  --fs-17: 17px;   /* 小标题 / 列表名 */
  --fs-20: 20px;   /* 区块标题 */
  --fs-26: 26px;   /* 页面主标题 */
  --fs-34: 34px;   /* Hero 展示字 */

  /* ---- 设计令牌：间距刻度 ---- */
  --sp-4: 4px; --sp-8: 8px; --sp-12: 12px; --sp-16: 16px;
  --sp-24: 24px; --sp-32: 32px; --sp-48: 48px;

  /* ---- 设计令牌：动效（统一缓动与时长，避免各写各的） ---- */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur-fast: .15s;
  --dur: .22s;
  --dur-slow: .38s;

  /* ---- 语义色（令牌化，深色主题只需覆盖这几个） ---- */
  --ok-bg: #ecfdf5;      --ok-fg: #065f46;      --ok-line: #a7f3d0;
  --err-bg: #fef2f2;     --err-fg: #991b1b;     --err-line: #fecaca;
  --warn-bg: #fffbeb;    --warn-fg: #92400e;    --warn-line: #fde68a;
  --info-bg: #eef2ff;    --info-fg: #3730a3;    --info-line: #c7d2fe;

  /* 鎏金细线：区块分隔的 1px 渐变线（浅色下为半透明金） */
  --gold-line: rgba(184, 137, 45, .30);
}
* { box-sizing: border-box; }
html { overflow-x: clip; }  /* 首页 Hero 通栏用 100vw，这里裁剪掉滚动条宽度造成的横向溢出 */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.main { min-height: calc(100vh - 170px); padding-top: 20px; padding-bottom: 48px; }
h1 { font-size: 26px; margin: 8px 0; }
h2 { font-size: 20px; margin: 8px 0; }
h3 { font-size: 16px; margin: 6px 0; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.inline { display: inline; }

/* ---- 顶栏 ---- */
.topbar { background: rgba(250, 246, 238, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 2px solid var(--gold); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(184, 137, 45, .12); }
.topbar-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
.brand-wrap { display: flex; align-items: center; gap: 10px; }
/* PC 主导航（方案C：标志 首页 排行榜 加号 消息 搜索 地区 用户） */
.nav-links { display: none; }
.nav-extra { display: none; }
.nav-links a {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
  font-family: var(--font-serif); letter-spacing: 1px;
}
.nav-links a:hover { color: var(--primary); background: var(--beige); text-decoration: none; }
.nav-links a.on { color: var(--gold); background: rgba(184, 137, 45, .12); }
.nav-fab-mini {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #a97e28, #caa04e); color: #fff !important;
  display: flex !important; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; padding: 0 !important;
  box-shadow: 0 3px 8px rgba(184, 137, 45, .35);
}
.nav-fab-mini:hover { transform: translateY(-1px); background: linear-gradient(135deg, #b8892d, #d8b25c); }
.nav-bell { position: relative; }
.nav-bell-dot {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--cinnabar); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
/* 子页面左上角返回键（带「返回」二字标识） */
.back-btn {
  height: 32px; padding: 0 12px 0 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--beige); color: var(--text);
  font-size: 13px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; gap: 2px;
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.back-btn:hover { background: var(--hover-bg); border-color: var(--primary); }
.back-btn:active { transform: scale(.96); }
.brand { font-size: 20px; font-weight: 800; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.nav { display: flex; align-items: center; gap: 12px; justify-self: end; flex-wrap: nowrap; }
.nav > a { color: var(--text); font-weight: 500; }
.nav > a:hover { color: var(--primary); text-decoration: none; }
.search { display: flex; align-items: center; justify-self: center; width: 100%; max-width: 560px; padding: 0 4px; }
.search input { flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: 14px; outline: none; background: var(--bg); min-width: 0; }
.search input:focus { border-color: var(--primary); background: #fff; }
.search button { border: none; background: transparent; margin-left: -36px; cursor: pointer; font-size: 14px; }
.user-chip { background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-size: 13px; white-space: nowrap; }

/* ---- 按钮（知味甜斋胶囊风格） ---- */
.btn { display: inline-block; border: none; border-radius: 30px; padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; transition: transform var(--dur-fast) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.btn:hover { text-decoration: none; filter: brightness(.97); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: linear-gradient(135deg, #a97e28, #caa04e); color: #fff; box-shadow: 0 4px 12px rgba(184, 137, 45, .32); }
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, #a97e28, #caa04e); }
.btn-outline { background: var(--card); color: var(--primary); border: 1px solid var(--primary); }
.btn-light { background: #fff; color: var(--primary); }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 20px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--cinnabar); color: #fff; box-shadow: 0 3px 10px rgba(180, 70, 60, .25); }
.btn-danger:hover { background: var(--cinnabar-dark); }
.btn-warn { background: var(--gold); color: #fff; box-shadow: 0 3px 10px rgba(180, 130, 50, .25); }
.btn-warn:hover { background: var(--gold-light); color: #2a2620; }
.linklike { border: none; background: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0; }
.linklike:hover { text-decoration: underline; }
.linklike.danger { color: var(--disagree); }
.linklike.liked { color: var(--agree); font-weight: 700; }

/* ---- 卡片（知味甜斋玻璃拟态：半透明白 + 毛玻璃 + 暖边） ---- */
.card { background: rgba(255,255,255,.72); border: 1px solid rgba(228,217,200,.85); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
a.card { color: var(--text); display: block; }
a.card:hover { text-decoration: none; border-color: var(--primary); }

/* ---- 提示消息 ---- */
.flashes { margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 14px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); }
.flash-error { background: var(--err-bg); color: var(--err-fg); border: 1px solid var(--err-line); }

/* ---- 区块（方案A 墨韵鎏金：标题两侧横线 + 宋体） ---- */
.section { margin: 26px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--font-serif); letter-spacing: 2px; font-size: 19px; }
.section-head h2::before, .section-head h2::after { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: .6; }
.more { font-size: 14px; }
.sub-h { font-size: 18px; margin: 4px 0 10px; font-family: var(--font-serif); letter-spacing: 2px; }
.sub-h::before { content: "❖ "; color: var(--gold); font-size: 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---- 徽章与标签 ---- */
.badge { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 10px; font-weight: 600; vertical-align: middle; }
.badge-official { background: #efe7d3; color: #1e3d33; }
.badge-custom { background: #fdf1e4; color: #a9713a; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tag-chip { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 500; }
.tag-chip i { font-style: normal; opacity: .75; margin-left: 2px; }
.tag-chip:hover { text-decoration: none; filter: brightness(.95); }
.c-school { background: #efe7d3; color: #1e3d33; }
.c-type { background: #eef4e8; color: #5f8a3e; }
.c-place { background: #fdf1e4; color: #a9713a; }
.c-city { background: #eaf2f4; color: #5f7d8a; }
/* CAT_ORDER 的九类必须都有各自配色 —— 此前只定义了 4 类，
   美食/美景/好物/避雷/冷知识/工具 全部落到 .c-other 灰底，看起来完全一样。 */
.c-food { background: #fbeee6; color: #b4572f; }
.c-view { background: #e9f2ee; color: #2f7a63; }
.c-good { background: #fbf2e0; color: #9a7715; }
.c-warn { background: #fbe9e5; color: #a83a2c; }
.c-fact { background: #eceaf6; color: #564f86; }
.c-tool { background: #eaeff5; color: #40597e; }
.c-other { background: #f3ede4; color: #776f63; }
.chip-mini { font-size: 12px; background: #f3ede4; color: #776f63; border-radius: 999px; padding: 2px 8px; }

/* ---- 排行榜卡片 / 列表 ---- */
.ranking-card h3 { margin: 6px 0 4px; }
.top-items { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--muted); }
.top-items li { margin: 2px 0; }
.ranking-list { display: flex; flex-direction: column; gap: 10px; }
.ranking-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.ranking-row-main { flex: 1; min-width: 0; }
.ranking-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ranking-row-title h3 { margin: 0; }
.ranking-row-side { text-align: right; font-size: 14px; white-space: nowrap; }

/* ---- 排行榜详情 ---- */
.ranking-head h1 { margin: 4px 0 6px; }
.ranking-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.sort-form select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; }
.explain { margin-top: 12px; }

/* ---- 排名列表（行式布局，无大卡片） ---- */
.rank-list { list-style: none; margin: 14px 0; padding: 0; }
.rank-list.compact { margin: 14px 0; }
.rank-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: .5px solid var(--separator);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.rank-row:hover { background: rgba(0, 0, 0, .02); }
.rank-row:last-child { border-bottom: none; }
.rank-num { width: 30px; height: 30px; border-radius: 50%; background: var(--beige); color: var(--muted); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 0 0 1px rgba(148,124,100,.18); }
.rank-num.top-1 { background: linear-gradient(135deg, #b8892d, #d8b25c); color: #fff; }
.rank-num.top-2 { background: linear-gradient(135deg, #d8cdbd, #b5a892); color: #fff; }
.rank-num.top-3 { background: linear-gradient(135deg, #d6a06a, #a9713a); color: #fff; }
.rank-main { flex: 1; min-width: 0; }
.rank-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rank-name { font-size: 17px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.rank-avatar { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex: none; box-shadow: var(--shadow-sm); }
.rank-meta-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.rank-tags-display { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.rank-tags-display .chip-mini { font-size: 11px; }
.rank-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 220px; }
.rank-meta { color: var(--muted); }
.approval { color: var(--agree); font-weight: 700; }

/* ---- 投票按钮 ---- */
.vote-group { display: flex; gap: 6px; }
.vote-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--text); font-weight: 600; white-space: nowrap; }
.vote-btn:hover { border-color: var(--primary); }
.vote-btn b { font-weight: 800; }
.vote-btn.agree.active { background: var(--agree); border-color: var(--agree); color: #fff; }
.vote-btn.disagree.active { background: var(--disagree); border-color: var(--disagree); color: #fff; }
.vote-big .vote-btn { font-size: 15px; padding: 8px 20px; }

@media (max-width: 720px) {
  .rank-row { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .rank-side { align-items: flex-start; min-width: 0; width: 100%; }
  .rank-row .vote-group { width: 100%; justify-content: flex-end; }
}

/* ---- 好评率条 ---- */
.bar { width: 160px; height: 6px; border-radius: 999px; background: #eee5cf; overflow: hidden; }
.bar.big { width: 100%; max-width: 420px; height: 10px; margin-top: 8px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #b8892d, #d8b25c); border-radius: 999px; }

/* ---- 条目页 ---- */
.item-head { display: flex; gap: 20px; flex-wrap: wrap; }   /* wrap：多图网格可独占一行 */
.item-image { width: 180px; height: 180px; object-fit: cover; object-position: center; border-radius: 12px; flex: none; background: var(--beige); }
.item-image.placeholder { display: flex; align-items: center; justify-content: center; font-size: 64px; background: linear-gradient(135deg, #eef2ff, #fdf2f8); }
.item-info { flex: 1; min-width: 0; }
.rank-link { display: inline-block; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; font-size: 13px; margin: 2px 4px 2px 0; }

/* ---- 点评 ---- */
.comment-form textarea, .reply-form textarea, .form-card textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px;
  font-size: 14px; font-family: inherit; resize: vertical; margin: 8px 0;
  background: #fff; transition: border-color var(--dur) var(--ease);
}
textarea:focus, input:focus, select:focus { outline: 2px solid #d8c9b4; }
.stance-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; align-items: center; }
.stance-row label { cursor: pointer; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.row-end select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; }
.comment-tree, .comment-children { list-style: none; margin: 0; padding: 0; }
.comment-tree { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.comment-children { margin: 10px 0 0 14px; padding-left: 14px; border-left: 3px solid #eef2ff; display: flex; flex-direction: column; gap: 10px; }
.comment-children .comment { padding: 10px 12px; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-author { font-size: 14px; }
.comment-content { margin: 6px 0; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.stance { font-size: 12px; border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.stance-agree { background: #ecfdf5; color: #047857; }
.stance-disagree { background: #fef2f2; color: #b91c1c; }
.stance-neutral { background: #f3f4f6; color: #4b5563; }
.reply-form { margin-top: 8px; }
.empty-comments { list-style: none; }
.login-hint code { background: #f3f4f6; padding: 2px 6px; border-radius: 6px; }

/* ---- 表单 ---- */
.form-card { max-width: 760px; }
.auth-card { max-width: 460px; margin: 30px auto; }
.auth-card h1 { text-align: center; }
.field { display: block; margin: 14px 0; font-size: 14px; font-weight: 600; }
.field input, .field textarea { display: block; width: 100%; margin-top: 6px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 400; font-family: inherit; background: #fff; transition: border-color var(--dur) var(--ease); }
fieldset.field { border: 1px solid var(--border); border-radius: 12px; }
fieldset.field legend { font-weight: 600; padding: 0 8px; }
.picker-cat { font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-block; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 500; }
.chip-check span i { font-style: normal; opacity: .6; margin-left: 4px; font-size: 12px; }
.chip-check input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-check input:checked + span i { opacity: .8; }

/* ---- 创建排行榜双栏 ---- */
.create-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.preview-panel { position: sticky; top: 76px; }
.preview-items { margin: 10px 0; max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.preview-item { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; }

/* ---- 工具条 / 标签广场 ---- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.tab { padding: 5px 14px; border-radius: 999px; font-size: 14px; color: var(--text); }
.tab.active { background: var(--primary); color: #fff; }
.tab:hover { text-decoration: none; }
.sort-links a { margin-left: 8px; color: var(--muted); }
.sort-links a.active { color: var(--primary); font-weight: 700; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tip-card { margin-top: 12px; background: #eef2ff; border-color: #c7d2fe; }
.empty-box { text-align: center; padding: 40px 20px; }
.page-head { margin-bottom: 14px; }
.page-head h1 { margin: 0 0 4px; position: relative; padding-left: 14px; }
.page-head h1::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 24px; border-radius: 3px; background: var(--primary); opacity: .7; }

/* ---- 页脚 ---- */
.footer { border-top: 1px solid var(--border); background: #fff; padding: 18px 0; color: var(--muted); font-size: 13px; }

/* ---- 审核 / 管理后台 ---- */
.badge-approved { background: #ecfdf5; color: #047857; }
.badge-pending { background: #fffbeb; color: #b45309; }
.badge-rejected { background: #fef2f2; color: #b91c1c; }
.banner { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.banner-pending { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.banner-rejected { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.chip-pending { border: 1px dashed #f59e0b; opacity: .8; }
.nav-admin { color: #a9713a; font-weight: 700; }
.admin-nav { margin: 10px 0 16px; }
.review-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: #fff; margin-bottom: 8px; }
.review-main { flex: 1; min-width: 240px; }
.review-reject { display: inline-flex; gap: 6px; align-items: center; }
.review-note-input { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; width: 170px; }
.my-note { font-size: 13px; color: #991b1b; background: #fef2f2; border-radius: 8px; padding: 4px 10px; display: inline-block; margin-top: 4px; }

/* ---- 排行榜页快捷点评 ---- */
.quick-comment { margin-top: 6px; }
.quick-comment summary { cursor: pointer; color: var(--primary); font-size: 13px; font-weight: 600; user-select: none; }
.quick-comment[open] summary { margin-bottom: 6px; }
.qc-body { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--bg); border-radius: 8px; }
.qc-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qc-form input[type="text"] { flex: 1; min-width: 200px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.qc-form select { border: 1px solid var(--border); border-radius: 8px; padding: 7px 6px; background: #fff; font-size: 13px; }
.qc-more { color: var(--muted); }

/* ---- 评论区操作按钮（更显眼） ---- */
.comment-actions { gap: 10px; }
.cbtn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 999px; padding: 5px 15px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; line-height: 1.5;
  transition: all var(--dur-fast) var(--ease);
}
.cbtn b { font-weight: 800; }
.cbtn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.cbtn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.cbtn-primary:hover { background: var(--primary-dark); color: #fff; }
.cbtn-liked { background: var(--agree); border-color: var(--agree); color: #fff; }
.cbtn-liked:hover { color: #fff; filter: brightness(1.05); }
.cbtn-danger:hover { border-color: var(--disagree); color: var(--disagree); }

/* ---- 顶栏铃铛 ---- */
.nav-bell { position: relative; font-size: 17px; padding: 4px 6px; }
.nav-bell:hover { text-decoration: none; }
.bell-dot {
  position: absolute; top: -4px; right: -6px;
  background: var(--disagree); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 6px; min-width: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.nav-me { font-weight: 600; }

/* ---- 消息通知页 ---- */
.notif-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-item { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.notif-item.notif-unread { background: #eef2ff; border-color: #c7d2fe; }
.notif-main { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; color: var(--text); }
.notif-main:hover { text-decoration: none; background: rgba(79,70,229,.04); }
.notif-icon { font-size: 20px; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.notif-unread .notif-icon { background: #fff; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { display: block; }
.notif-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.notif-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--disagree); margin-top: 6px; }

/* ---- 个人中心 ---- */
.me-profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.me-info { flex: 1; min-width: 0; }
.me-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.me-stats .stat b { font-size: 20px; }

/* ---- 管理后台 ---- */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.admin-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.admin-stat:hover { text-decoration: none; border-color: var(--primary); }
.admin-stat b { font-size: 26px; color: var(--primary); }
.admin-stat span { font-size: 13px; color: var(--muted); }
.review-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.review-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.review-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 10px 14px; background: var(--bg); color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid #f1f2f7; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbff; }

/* ---- 分页 ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 4px; flex-wrap: wrap; }
.pagination-info { font-size: 13px; color: var(--muted); }

/* ---- 榜单删除申请 ---- */
.delete-req { margin-top: 12px; }
.delete-req summary { cursor: pointer; color: var(--disagree); font-size: 13px; font-weight: 600; user-select: none; }
.delete-req[open] summary { margin-bottom: 6px; }
.delete-req-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.delete-req-form input { flex: 1; min-width: 220px; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }

/* ---- 排行榜封面图 ---- */
.ranking-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; border-radius: 10px; margin: 0 0 10px; background: var(--beige); }

/* ---- 移动优先：更大的触摸目标与舒适间距 ---- */
@media (max-width: 860px) {
  .admin-stats { grid-template-columns: 1fr; }
  .me-stats { gap: 16px; }
  .review-card { align-items: stretch; }
  .review-actions { justify-content: flex-end; }
  .vote-btn { padding: 8px 18px; font-size: 14px; }
  .cbtn { padding: 6px 14px; }
  .rank-row { gap: 10px; padding: 12px 14px; }
  .card { padding: 14px 14px; }
  .hero h1 { font-size: 24px; }
  .nav { gap: 8px; }
  .nav .btn { padding: 7px 12px; }
  .comment { padding: 10px 12px; }
  .topbar-inner { gap: 10px; }
  .pagination { gap: 8px; }
}

/* ---- 响应式 ---- */
@media (max-width: 860px) {
  .create-grid { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  /* 移动端顶栏：logo + 地区/用户 一行，搜索栏整行换到下一行 */
  .topbar-inner {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas:
      "brand nav"
      "search search";
    gap: 6px 10px;
  }
  .topbar-inner .brand-wrap { grid-area: brand; }
  .topbar-inner .nav { grid-area: nav; justify-self: end; flex-wrap: nowrap; min-width: 0; }
  .topbar-inner .search { grid-area: search; max-width: 100%; width: 100%; }
  .search { order: 3; }
  /* 移动端右上角只显示头像，不显示名字（防止与地区/站名重叠） */
  .nav-uname, .nav-user summary .bell-dot { display: none; }
  .nav-user summary { display: flex; align-items: center; }
  /* 移动端消息通知：四个 tab 纵向长条 */
  .notif-tabs { display: flex; flex-direction: column; gap: 8px; padding: 0; }
  .notif-tabs .tab {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--card); color: var(--text); text-decoration: none;
    font-size: 14px;
  }
  .notif-tabs .tab::after { content: "展开 ›"; font-size: 12px; color: var(--muted); }
  .notif-tabs .tab.active { border-color: var(--gold); background: rgba(184,137,45,.08); color: var(--gold); }
  /* 移动端个人中心：顶栏数据缩小同一水平线 */
  .me-profile { flex-wrap: wrap; }
  .me-stats { width: 100%; display: flex; justify-content: space-around; margin-top: 6px; }
  .me-stats .stat b { font-size: 15px; }
  .me-stats .stat span { font-size: 10px; }
  /* 移动端我的投票：标题与筛选居中 */
  .section-head .sort-links { margin: 0 auto; }
  .comment-children { margin-left: 8px; padding-left: 10px; }
  .item-head { flex-direction: column; }
  .item-image { width: 100%; height: 200px; }
  .rank-row { flex-wrap: wrap; }
  .rank-side { align-items: flex-start; }
  .ranking-row { flex-direction: column; align-items: flex-start; }
  .ranking-row-side { text-align: left; }
  .me-avatar { width: 52px; height: 52px; font-size: 22px; }
}

/* ============ 阶段5：视觉与动效 ============ */
.main { animation: pageIn .32s ease both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.btn, .vote-btn, .cbtn, .tab, .tag-chip, .linklike {
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
a.card { transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
a.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(42, 38, 32, .16); }
.rank-row, .comment, .review-card { transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.rank-row:hover, .comment:hover, .review-card:hover { border-color: #d8c9b4; }

.topbar { box-shadow: 0 1px 0 rgba(184, 137, 45, .10); }

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============ iOS + 中国风 组件 ============ */

/* 品牌印章 logo */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-seal {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: var(--cinnabar);
  color: #fff; font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35), 1.5px 1.5px 0 rgba(176, 58, 46, .25);
  transform: rotate(-4deg);
}
.brand-text { font-size: 18px; font-weight: 700; line-height: 1.15; font-family: var(--font-serif); letter-spacing: 3px; }
.brand-text small { display: block; font-size: 9px; color: var(--muted); font-weight: 500; letter-spacing: .22em; font-family: var(--font); }

/* 底部 Tab 栏：仅移动 / 平板显示（桌面端由文件末尾的 min-width:861px 分支隐藏）。
   基础块只负责「定位与外观」，显示与否交给断点控制，避免两套导航并存。 */
.tabbar {
  display: flex;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: #ffffff;                           /* Edge/国产浏览器兜底（不依赖 backdrop-filter） */
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--separator);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
  padding: 8px 24px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  height: 60px;
  align-items: center; justify-content: center;
  gap: 12px;                                    /* 功能键之间留空隙（桌面/移动一致） */
  /* Edge/旧 Chromium 兼容：固定层用 transform 触发独立合成层，避免 fixed 失效 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.main { padding-bottom: 80px; }
/* 底部固定导航栏高 60px，会盖住页脚最后两行（协议链接 + ICP），
   这里给页脚补等高的底部留白，滚动到底时全部可见 */
.footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

.tabbar-item {
  flex: 1 1 0; max-width: 160px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--muted); text-decoration: none;
  padding: 4px 6px; border-radius: 12px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.tabbar-item .ti-icon { font-size: 22px; line-height: 1; position: relative; }
.tabbar-item .ti-icon svg { width: 22px; height: 22px; display: block; }
.tabbar-item.active { color: var(--primary); font-weight: 600; }
.tabbar-item:hover { text-decoration: none; color: var(--primary); background: var(--hover-bg); }
.tabbar-item:active { background: rgba(42, 38, 32, .10); }
.ti-dot {
  position: absolute; top: -4px; right: -10px;
  background: var(--disagree); color: #fff; font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; box-shadow: 0 0 0 2px #fff;
}
.tabbar-fab {
  flex: 0 0 56px; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 44px; border-radius: 22px;
  background: var(--gradient); color: #fff; font-size: 26px; font-weight: 300; line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(184, 137, 45, .40);
  transition: transform var(--dur-fast) var(--ease);
}
.tabbar-fab svg { width: 24px; height: 24px; display: block; }
.tabbar-fab:hover { text-decoration: none; transform: scale(1.04); color: #fff; }
.tabbar-fab:active { transform: scale(.96); }

/* ---- 首页：Hero 单屏（墨韵鎏金：墨绿渐变 + 鎏金内框 + 远山 + 朱红印章） ---- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #26503f 0%, #1e3d33 58%, #3a6d59 100%);
  border-radius: 0 0 20px 20px;
  color: #f3ecd9;
  padding: 0;
  margin-bottom: 0;
  width: 100vw; margin-left: calc(50% - 50vw);   /* 通栏：突破 .container 的 1100px 上限 */
  box-shadow: 0 12px 28px rgba(30, 61, 51, .32);
  min-height: 180px;
}
.hero::before {  /* 鎏金内框（贴近方案稿的 14px 内描边） */
  content: ""; position: absolute; inset: 14px; z-index: 2;
  border: 1px solid rgba(216, 178, 92, .42); pointer-events: none; border-radius: 10px;
}
.hero-kicker {
  display: inline-block;
  font-size: 12.5px; letter-spacing: 2px; font-weight: 600;
  color: var(--gold-light);
  background: rgba(216, 178, 92, .08); border: 1px solid rgba(216, 178, 92, .5);
  padding: 4px 14px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);   /* 方案稿 38px 主标题，小屏自适应 */
  font-weight: 700; line-height: 1.28; margin: 0;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(10, 30, 22, .30);
}
.hero-sub { max-width: 420px; opacity: 1; margin: 0; line-height: 1.7; font-size: 14.5px; color: rgba(255,255,255,.82); }
.hero-btn-main {
  background: #fbf6ea; color: var(--primary); font-weight: 700;   /* 方案稿主按钮：浅色底 + 墨字，深绿上更醒目 */
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  padding: 9px 22px;
}
.hero-btn-main:hover { background: #fff; transform: translateY(-1px); color: var(--primary); }
.hero-btn-ghost {
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, .45);
  padding: 9px 22px;
}
.hero-btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* 首页 Hero 右上角朱红「夯」印章 */
.hero-seal {
  position: absolute; top: 30px; right: 40px; z-index: 3;
  width: 56px; height: 56px; border-radius: 11px;
  background: var(--cinnabar);
  color: #fff; font-family: var(--font-serif); font-size: 30px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4), 2px 2px 0 rgba(0,0,0,.25);
  transform: rotate(-4deg);
}

@media (max-width: 860px) {
  .hero { min-height: 240px; border-radius: 0 0 16px 16px; }
  .hero-kicker { font-size: 11px; letter-spacing: 1.5px; padding: 3px 11px; margin-bottom: 12px; }
  .hero-btns .btn { padding: 8px 16px; font-size: 13px; }
}

/* ---- 登录/注册页品牌头 ---- */
.auth-brand { text-align: center; margin: 24px 0 18px; }
.auth-brand .brand-seal { margin: 0 auto 12px; transform: rotate(-5deg); }
.auth-brand h1 { font-family: var(--font-serif); font-size: 24px; margin: 0 0 4px; letter-spacing: .04em; }

/* ---- 发布引导页 /publish ---- */
.publish-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0;
}
.publish-card {
  display: flex; flex-direction: column; gap: 8px; padding: 28px 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.publish-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(99, 102, 241, .4); }
.publish-card .pc-icon { font-size: 44px; line-height: 1; display: flex; align-items: center; color: var(--gold); }
.publish-card .pc-icon .ic { width: 40px; height: 40px; vertical-align: 0; }
.publish-card h2 { margin: 0; font-size: 19px; font-weight: 700; }
.publish-card p { margin: 0; line-height: 1.55; }
.publish-card .pc-arrow { margin-top: auto; font-size: 14px; color: var(--primary); font-weight: 600; }
.publish-tag { background: linear-gradient(135deg, #fdf6ed 0%, #ffffff 60%); }
.publish-ranking { background: linear-gradient(135deg, #f0eaff 0%, #ffffff 60%); }
@media (max-width: 640px) {
  .publish-grid { grid-template-columns: 1fr; }
  .publish-card { padding: 22px 20px; }
  .publish-card .pc-icon { font-size: 36px; }
}

/* ---- 排行榜列表卡片（参考图 2：左大缩略 + 右标题/标签/统计/进度条） ---- */
.ranking-list-cards { gap: 12px; }
.ranking-card {
  display: flex; align-items: stretch; gap: 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ranking-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: rgba(99, 102, 241, .35); }
.ranking-card .rc-thumb {
  width: 84px; height: 84px; flex: none;
  border-radius: 14px; overflow: hidden; position: relative;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: rgba(255, 255, 255, .95);
}
.ranking-card .rc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; position: absolute; inset: 0; }
.ranking-card .rc-thumb-emoji { position: relative; z-index: 1; }
.ranking-card .rc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ranking-card .rc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ranking-card .rc-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.ranking-card .rc-desc { margin: 0; line-height: 1.5; }
.ranking-card .rc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ranking-card .rc-stats { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 2px; }
.ranking-card .rc-stats b { color: var(--text); font-weight: 700; }
.ranking-card .rc-rate b { color: var(--agree); }
.ranking-card .rc-bar { margin-top: 4px; }
@media (max-width: 540px) {
  .ranking-card { padding: 14px; gap: 12px; }
  .ranking-card .rc-thumb { width: 64px; height: 64px; font-size: 28px; }
  .ranking-card .rc-title { font-size: 15px; }
  .ranking-card .rc-stats { font-size: 12px; gap: 10px; }
}

/* ---- 首页：热门榜横滑卡片 ---- */
.rank-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 8px; margin: 0 -4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.rank-scroll::-webkit-scrollbar { display: none; }
.rank-card {
  flex: 0 0 250px; scroll-snap-align: start;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.rank-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rc-thumb {
  /* position/overflow：为下面绝对定位的封面图与序号徽章提供定位基准并裁切溢出 */
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: rgba(255,255,255,.9);
}
/* 封面图：绝对定位铺满缩略图区域。
   绝对定位 → 不参与 flex 布局，因此「有图 / 无图」卡片高度完全一致；
   且 emoji 默认图只在无图时渲染，有图时被彻底替换。 */
.rc-thumb .rc-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.rc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.rc-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.rc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-tags .chip-mini { font-size: 11px; }
.rc-meta { font-size: 11px; color: var(--muted); }
.rc-rate { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.rc-rate b { font-size: 12px; color: var(--agree); font-weight: 700; }
.rc-rate .bar { flex: 1; height: 5px; }
.rc-rank {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  min-width: 26px; height: 26px; border-radius: 9px;
  background: rgba(255,255,255,.92); color: var(--text);
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
  box-shadow: var(--shadow-sm);
}
.rc-rank.r1 { background: var(--cinnabar); color: #fff; }
.rc-rank.r2 { background: #4a6a9e; color: #fff; }
.rc-rank.r3 { background: var(--bamboo); color: #fff; }

/* 首页热门榜：PC 4 列网格（方案A）/ 移动端 C 风格滑动卡片 */
@media (min-width: 861px) {
  .rank-scroll { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; }
  .rank-card { flex: none; scroll-snap-align: none; }
  .rc-thumb { font-size: 40px; }
  .rc-title { font-family: var(--font-serif); font-size: 16.5px; letter-spacing: .5px; font-weight: 700; }
  .rc-rate b { color: var(--gold); }
  .rc-rate .bar .bar-fill { background: linear-gradient(90deg, #b8892d, #d8b25c); }
  .rc-rate .bar { background: #eee5cf; }
  .rc-rank { border-radius: 50%; min-width: 30px; height: 30px; font-size: 14px; }
  /* PC 顶栏：标志|首页|排行榜|搜索|＋|🔔|地区|用户 */
  .topbar-inner { grid-template-columns: auto auto 1fr auto auto; }
  .nav-links { display: flex; align-items: center; gap: 4px; }
  .topbar-inner .search { max-width: 340px; justify-self: center; width: 100%; }
  .nav-extra { display: flex; align-items: center; gap: 10px; justify-self: end; }
  /* PC 不需要底部导航栏 */
  .tabbar { display: none !important; }
  .main { padding-bottom: 24px; }
  .footer { padding-bottom: 18px; }
  /* 主题设置：三块放宽间距，视觉更舒展 */
  .theme-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 640px; margin: 0 auto; }
  .theme-opt { width: auto; }
  .theme-swatch { width: 60px; height: 60px; }
  .theme-apply { width: auto; height: auto; padding: 18px 0; }
}
@media (max-width: 860px) {
  .rank-card { flex: 0 0 196px; position: relative; border-radius: 14px; }
  .rank-card::before {  /* C 风格顶部渐变条 */
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5px; z-index: 2;
    background: linear-gradient(90deg, #2c5747, #3f7a63);
  }
  .rc-thumb { font-size: 27px; }
  .rc-rank { top: 6px; left: 6px; min-width: 22px; height: 22px; font-size: 11px; border-radius: 7px; }
  .rc-body { padding: 10px 12px 12px; gap: 5px; }
  .rc-title { font-size: 14px; line-height: 1.4; }
  .rc-tags .chip-mini { background: var(--beige); border: 1px solid var(--border); color: var(--primary); }
  .rc-rate b { color: var(--gold); }
  .rc-rate .bar .bar-fill { background: linear-gradient(90deg, #b8892d, #d8b25c); }
  .rc-rate .bar { background: #eee5cf; }
}

/* ---- 首页：标签网格 ---- */
.tag-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.tag-cell {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tag-cell:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--primary); }
.tag-cell .tc-icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.tag-cell .tc-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.tag-cell .tc-count { font-size: 11px; color: var(--muted); }

/* 首页热门标签：方案A pill 云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud .tg {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid #d8c9a3; background: #fbf6e8; border-radius: 999px;
  padding: 7px 15px; font-size: 13px; color: #5c5140; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.tag-cloud .tg:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tag-cloud .tg-name::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--tg, #b8892d); margin-right: 7px; vertical-align: 1px;
}
.tag-cloud .tg b { font-family: Georgia, serif; color: var(--gold); font-size: 11px; }

/* ---- 首页：最新动态 ---- */
.activity-list { display: flex; flex-direction: column; gap: 2px; }
.activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: .5px solid var(--separator);
  color: var(--text);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { text-decoration: none; }
.act-body { flex: 1; min-width: 0; }
.act-line { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-line b { font-weight: 600; }
.act-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---- 客服中心 / 用户反馈 ---- */
.feedback-form { max-width: 720px; }
.feedback-item, .feedback-admin { margin-bottom: 12px; padding: 16px 18px; }
.feedback-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.feedback-subject { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.feedback-body { color: var(--text); white-space: pre-wrap; margin: 0 0 10px; }
.feedback-reply {
  background: #f5f3ff; border-left: 3px solid var(--primary);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 8px 0;
}
.feedback-reply p { margin: 4px 0 0; white-space: pre-wrap; }
.feedback-reply-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; font-family: inherit; resize: vertical;
  margin: 8px 0;
}
.fb-cat, .fb-status { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.fb-cat { background: #f0f0f5; color: var(--text); }
.fb-cat-bug { background: #fde8e8; color: #b91c1c; }
.fb-cat-feature { background: #e0f2fe; color: #075985; }
.fb-cat-question { background: #fef3c7; color: #92400e; }
.fb-cat-other { background: #f3f4f6; color: var(--muted); }
.fb-status-open { background: #fef3c7; color: #92400e; }
.fb-status-closed { background: #d1fae5; color: #065f46; }

/* ---- 折叠列表的展开按钮 ---- */
.expand-btn { display: block; margin: 12px auto 0; }

/* ---- 等级系统 ---- */
.lvl-badge {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 999px;
  background: var(--bg); color: var(--muted);
  border: 1px solid var(--border); white-space: nowrap;
  vertical-align: middle;
}
.lvl-badge.big { font-size: 16px; padding: 6px 12px; }
.lvl-0 { background: #f2f2f7; color: #8e8e93; }
.lvl-1 { background: #e8f5e9; color: #2e7d32; }
.lvl-2 { background: #e3f2fd; color: #1565c0; }
.lvl-3 { background: #e0f7fa; color: #00695c; }
.lvl-4 { background: #ede7f6; color: #4527a0; }
.lvl-5 { background: #fce4ec; color: #ad1457; }
.lvl-6 { background: #fff3e0; color: #e65100; }
.lvl-7 { background: #ffebee; color: #c62828; }
.lvl-8 { background: linear-gradient(135deg, #fff7e6, #ffe4b5); color: #b45309; border-color: #fcd34d; }
.lvl-9 { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border-color: #f59e0b; }
.lvl-10 { background: linear-gradient(135deg, #fde8d7, #f5d0a9); color: #7c2d12; border-color: #f59e0b; box-shadow: 0 0 0 1px rgba(245, 158, 11, .3); }
.honor-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; white-space: nowrap; vertical-align: middle;
  box-shadow: 0 1px 4px rgba(239, 68, 68, .35);
}
.comment-head .lvl-badge, .comment-head .honor-badge { margin-right: 2px; }
.me-level-line { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; }
.level-card { padding: 18px 20px; }
.level-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.level-now { display: flex; align-items: center; gap: 10px; }
.level-now b { display: block; font-size: 15px; }
.level-now span { display: block; }
.level-score { margin-left: auto; text-align: right; }
.level-score b { display: block; font-size: 22px; }
.level-score span { display: block; }
.level-strategy { margin-top: 12px; }
.level-strategy summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--primary); user-select: none; }
.level-strategy[open] summary { margin-bottom: 8px; }
.level-rules ul { margin: 6px 0 8px; padding-left: 20px; }
.level-rules li { margin: 4px 0; font-size: 14px; }
.level-rules li b { color: var(--agree); }
.level-wear { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .level-score { margin-left: 0; text-align: left; }
}

/* ---- 头像（emoji + 底色）---- */
.av-base, .me-avatar, .act-avatar, .comment-avatar, .nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex: none; line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35);
}
/* 图片头像：铺满圆形容器 */
.me-avatar.img, .act-avatar.img, .comment-avatar.img, .nav-avatar.img, .avatar-preview.img {
  overflow: hidden; padding: 0; background: var(--bg);
}
.me-avatar.img img, .act-avatar.img img, .comment-avatar.img img, .nav-avatar.img img, .avatar-preview.img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.me-avatar { width: 64px; height: 64px; font-size: 30px; color: #fff; }
.act-avatar { width: 36px; height: 36px; font-size: 18px; color: #fff; }
.comment-avatar { width: 32px; height: 32px; font-size: 16px; color: #fff; margin-right: 8px; }
.nav-avatar { width: 26px; height: 26px; font-size: 14px; color: #fff; }
.nav-user > summary { display: inline-flex; align-items: center; gap: 6px; }
.nav-uname { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 头像选择器 ---- */
.field-label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.avatar-preview {
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4), 0 2px 8px rgba(0,0,0,.15);
  transition: background var(--dur) var(--ease);
}
.avatar-upload { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar-preview.av-c1 { background: #6366f1; } .avatar-preview.av-c2 { background: #ec4899; }
.avatar-preview.av-c3 { background: #10b981; } .avatar-preview.av-c4 { background: #f59e0b; }
.avatar-preview.av-c5 { background: #ef4444; } .avatar-preview.av-c6 { background: #0ea5e9; }
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 10px; }
.avatar-opt {
  width: 44px; height: 44px; border-radius: 12px; font-size: 22px;
  border: 2px solid var(--border); background: var(--card); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.avatar-opt:hover { transform: scale(1.08); border-color: var(--primary); }
.avatar-opt.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .2); transform: scale(1.05); background: #eef0ff; }
.avatar-opt:disabled { opacity: .4; cursor: not-allowed; transform: none; }
/* 六底色选择行 */
.avatar-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-color {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--border);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.avatar-color:hover { transform: scale(1.12); }
.avatar-color.selected { box-shadow: 0 0 0 3px var(--primary), 0 0 0 5px #fff, 0 0 0 6px var(--primary); transform: scale(1.05); }
.avatar-color:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---- 商家入驻占位页 ---- */
.merchant-coming { text-align: center; padding: 60px 20px; }
.mc-seal {
  width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 18px;
  background: var(--primary); color: #fff;
  font-family: var(--font-serif); font-size: 42px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 8px 24px rgba(148,124,100,.35);
  transform: rotate(-5deg);
}
.merchant-coming h1 { margin: 0 0 10px; }

/* ---- 个人中心快捷操作 ---- */
.me-quicklinks { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 8px; }

/* ---- 顶栏：地区 + 用户菜单 ---- */
.nav-region {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px;
  font-size: 13px; color: var(--text); font-weight: 600;
  white-space: nowrap; max-width: 200px; overflow: hidden;
}
.nav-region:hover { border-color: var(--primary); text-decoration: none; }
.nav-region .region-text { overflow: hidden; text-overflow: ellipsis; }

.nav-user { position: relative; }
.nav-user > summary {
  list-style: none; cursor: pointer; padding: 6px 10px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border);
}
.nav-user > summary::-webkit-details-marker { display: none; }
.nav-user[open] > summary { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-user-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-md); border: 1px solid var(--separator);
  min-width: 200px; padding: 6px 0; z-index: 100;
}
.nav-user-menu a, .nav-user-menu button {
  display: block; width: 100%; text-align: left;
  padding: 8px 14px; font-size: 13px; color: var(--text); background: none; border: none;
  cursor: pointer; text-decoration: none;
}
.nav-user-menu a:hover, .nav-user-menu button:hover { background: var(--bg); text-decoration: none; }

@media (max-width: 720px) {
  .nav-region { max-width: 110px; padding: 5px 8px; font-size: 12px; }
  .nav-user > summary { padding: 5px 8px; font-size: 12px; }
  .nav-user-menu { right: -10px; }
}

/* ---- 地区选择页 ---- */
.region-current { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; }
.region-current .rc-name { font-size: 17px; font-weight: 700; color: var(--primary); }
.region-form select { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-family: inherit; background: #fff; margin-top: 6px; }

/* ============ 深色主题（html.theme-mono）============ */
/* 用户可在个人中心选择：浅色主题(彩色,默认) / 深色主题(黑白)

   写法约定（P2 令牌化收尾）：
   ① 新组件一律用令牌（--card/--beige/--border/--border-2/--muted-strong/--text…），
      深浅两套令牌同名同位，写一次即自动跟随主题，**不要再加 html.theme-mono 补丁**；
   ② 下面残留的 .xxx 补丁只用于「浅色底 + 深色字」这类反向场景（如 .btn-light），
      以及需要进一步提升对比度的激活态，色值全部走令牌，不写死颜色。
   ③ 例外：主题色卡缩略图（.theme-swatch-*）里的颜色是「被展示的色值本身」，
      属于数据而非样式，必须保持字面量。
   ④ 仍有少量一次性色值刻意保留字面量（找不到语义对应的令牌，硬凑反而更难维护）：
      .btn-light 的浅底深字、.avatar-opt.selected 的选中底、.tabbar-item 的未激活灰、
      .theme-check 的深墨勾、.attach-btn 的字色、mark 的深色高亮。
      新增组件时请优先用令牌，不要复制这些例外。 */
html.theme-mono {
  --primary: #e0b98a;
  --primary-dark: #f0d0a8;
  --gradient: linear-gradient(135deg, #4a3f35 0%, #3a3028 45%, #57493c 100%);
  --cinnabar: #d8b089; --cinnabar-dark: #e0c0a0;
  --gold: #d8b089; --gold-light: #e9d7ac;
  --bamboo: #8fb3a5; --indigo-cn: #c8b8a8;
  --bg: #1a1815;
  --card: #24211d;
  --beige: #2e2a25;
  --hover-bg: #38332c;
  --text: #e8e2d8;
  --muted: #9a9188;
  --text-3: #6d665f;
  --border: #3a342d;
  --separator: rgba(255,255,255,.10);
  --border-2: #4a4238;
  --muted-strong: #b8b0a6;
  --accent-text: #f5d9ad;
  --skeleton: #332e28;
  --agree: #7db26a; --disagree: #d0877d;
  --warn: #d9a441; --info: #8ba3b5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow: 0 2px 12px rgba(0,0,0,.45);
  --shadow-md: 0 6px 20px rgba(0,0,0,.5);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
  /* 语义色令牌（2.0 新增）：深色下同样走令牌，不需要再逐条打补丁 */
  --ok-bg: #24331f;   --ok-fg: #b8e0a8;   --ok-line: #3a5030;
  --err-bg: #4a2525;  --err-fg: #f0b8b0;  --err-line: #6a3535;
  --warn-bg: #463a1e; --warn-fg: #edcf94; --warn-line: #6a5730;
  --info-bg: #26313a; --info-fg: #b6cad8; --info-line: #3d4d59;
  --gold-line: rgba(216,178,137,.32);
}
/* 深色主题：深底浅字的组件兜底（覆盖硬编码浅色） */
html.theme-mono body { background: var(--bg); color: var(--text); }
html.theme-mono .topbar { background: rgba(36,33,29,.92); border-bottom-color: var(--border); }
html.theme-mono .tabbar { background: rgba(36,33,29,.96); border-top-color: var(--border); }
html.theme-mono .card { background: rgba(36,33,29,.85); border-color: var(--border); }
html.theme-mono .search input,
html.theme-mono .field input, html.theme-mono .field textarea,
html.theme-mono .comment-form textarea, html.theme-mono .reply-form textarea,
html.theme-mono .form-card textarea, html.theme-mono .region-form select {
  background: var(--beige); border-color: var(--border-2); color: var(--text);
}
html.theme-mono .btn-outline { background: transparent; }
html.theme-mono .btn-light { background: #f0e8dc; color: #3a3028; }
html.theme-mono .back-btn { background: var(--beige); color: var(--text); }
html.theme-mono .back-btn:hover { background: var(--hover-bg); }
html.theme-mono .vote-btn { background: var(--beige); border-color: var(--border-2); color: var(--text); }
html.theme-mono .avatar-opt { background: var(--beige); border-color: var(--border-2); }
html.theme-mono .avatar-opt.selected { background: #403a32; }
html.theme-mono .theme-opt { border-color: var(--border-2); }
html.theme-mono .theme-swatch-color { background: linear-gradient(135deg, #f5efe3, #1e3d33); }
html.theme-mono .theme-swatch-mono { background: linear-gradient(135deg, #2e2a25, #e8e2d8); }
html.theme-mono .hero { box-shadow: 0 14px 34px rgba(0,0,0,.5); }
/* 小徽标 / 状态标签 / 站内浮起小块：深色下统一压成「中性块」
   （标签分类色 .c-* 不在其中 —— 见下方「深色主题：九类标签分类配色」，
     深色下也保留各自的色相，否则十类标签长得一模一样，扫一眼分不出类别） */
html.theme-mono .lvl-badge, html.theme-mono .honor-badge,
html.theme-mono .badge-official, html.theme-mono .badge-custom,
html.theme-mono .badge-approved, html.theme-mono .badge-pending, html.theme-mono .badge-rejected,
html.theme-mono .stance-agree, html.theme-mono .stance-disagree,
html.theme-mono .chip-mini,
html.theme-mono .admin-stat, html.theme-mono .review-card, html.theme-mono .rank-row,
html.theme-mono .comment {
  background: var(--beige);
  color: var(--text);
  border-color: var(--border-2);
  background-image: none;
}

/* ---- 深色主题：九类标签分类配色 ----
   浅色版用「浅底 + 深字」，深色版反过来用「暗底 + 亮字」，色相一一对应不动，
   这样同一条标签在两种主题下是「同一个颜色」，只是明度翻转。 */
html.theme-mono .c-school { background: #2b3a33; color: #a9ccb9; }  /* 学校 · 墨绿 */
html.theme-mono .c-type   { background: #2c3527; color: #a9cb8a; }  /* 类型 · 草绿 */
html.theme-mono .c-place  { background: #382e24; color: #d9a877; }  /* 场所 · 棕橙 */
html.theme-mono .c-city   { background: #28323a; color: #a3bcc7; }  /* 城市 · 灰蓝 */
html.theme-mono .c-food   { background: #3a2a24; color: #e09e7f; }  /* 美食 · 橙红 */
html.theme-mono .c-view   { background: #233330; color: #8ccdb2; }  /* 美景 · 竹青 */
html.theme-mono .c-good   { background: #38311c; color: #ddc073; }  /* 好物 · 鎏金 */
html.theme-mono .c-warn   { background: #3a2724; color: #e3a094; }  /* 避雷 · 朱红 */
html.theme-mono .c-fact   { background: #2e2c3a; color: #b3abdd; }  /* 冷知识 · 紫 */
html.theme-mono .c-tool   { background: #262f3a; color: #a1bad6; }  /* 工具 · 蓝 */
html.theme-mono .c-other  { background: #302c26; color: #c6bcaa; }  /* 其他 · 中性 */
html.theme-mono .flash-error { background: var(--err-bg); color: var(--err-fg); border-color: var(--err-line); }
html.theme-mono .flash-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
html.theme-mono .tabs, html.theme-mono .sort-form select, html.theme-mono .row-end select,
html.theme-mono .rank-link, html.theme-mono .chip-check span,
html.theme-mono .stance-neutral, html.theme-mono .login-hint code {
  background: var(--beige); color: var(--text); border-color: var(--border-2);
}
html.theme-mono .tab { color: var(--muted); }
html.theme-mono .tab.active { background: var(--primary); color: #fff; }
html.theme-mono .search input:focus { background: var(--beige); border-color: var(--primary); }
html.theme-mono .tip-card { background: var(--beige); border-color: var(--border-2); }
html.theme-mono .lvl-badge.lvl-0, html.theme-mono .lvl-badge.lvl-1,
html.theme-mono .lvl-badge.lvl-2, html.theme-mono .lvl-badge.lvl-3,
html.theme-mono .lvl-badge.lvl-4, html.theme-mono .lvl-badge.lvl-5,
html.theme-mono .lvl-badge.lvl-6, html.theme-mono .lvl-badge.lvl-7,
html.theme-mono .lvl-badge.lvl-8, html.theme-mono .lvl-badge.lvl-9,
html.theme-mono .lvl-badge.lvl-10 {
  background: var(--beige); color: var(--text); border: 1px solid var(--border-2); box-shadow: none;
}

/* 主题选择卡片 */
.theme-switch { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.theme-opt {
  flex: none; width: 84px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  border: 2px solid var(--border); border-radius: 12px; padding: 10px 8px 8px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-opt:hover { border-color: var(--primary); transform: translateY(-2px); }
.theme-opt.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184,137,45,.25), 0 4px 12px rgba(42,38,32,.12);
  background: rgba(184,137,45,.06);
  transform: translateY(-2px);
}
.theme-opt input { display: none; }
.theme-opt .theme-check {
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; line-height: 1;
  opacity: 0; transform: scale(.4);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.theme-opt.selected .theme-check { opacity: 1; transform: scale(1); }
.theme-swatch { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 4px; }
.theme-swatch-color { background: linear-gradient(135deg, #f5efe3, #1e3d33); }
.theme-swatch-mono { background: linear-gradient(135deg, #2e2a25, #e8e2d8); }
.theme-opt b { font-size: 12.5px; color: var(--text); }
/* 应用主题 方形按钮 */
.theme-apply {
  flex: none; width: 84px; height: 84px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px solid var(--gold); border-radius: 12px;
  background: linear-gradient(135deg, #a97e28, #caa04e); color: #fff;
  font-size: 18px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(184,137,45,.3);
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}
.theme-apply:hover { transform: translateY(-2px); filter: brightness(1.06); cursor: pointer; }
.theme-apply span { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; }
/* 个人中心：等级徽章按钮 */
.me-lvl-btn { box-shadow: none; background: transparent; padding: 0; }
.me-lvl-btn:hover { filter: brightness(.94); }
/* 个人中心：注销按钮（危险色） */
.me-quicklinks .cbtn-danger { color: var(--disagree); border-color: var(--disagree); }
.me-quicklinks .cbtn-danger:hover { background: var(--disagree); color: #fff; }

/* ---- 悬浮窗（Modal）---- */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(30, 22, 15, .5);
  display: flex; align-items: flex-start; justify-content: center;
  /* 内容超高时遮罩层自身可滚动：否则长弹窗（如「等级与头衔」）会超出视口，
     叠加 body 滚动锁后表现为「弹窗打开后页面卡死、无法滑动」 */
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal-card {
  width: 100%; max-width: 400px;
  /* margin:auto 与 flex 配合：内容短时垂直居中，内容长时可从上到下完整滚动 */
  margin: auto;
  background: var(--bg, #fffbf6);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(60, 40, 20, .35);
  padding: 22px 24px 24px;
  animation: modal-in .22s ease;
}
@keyframes modal-in {
  from { transform: translateY(14px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(120, 90, 60, .12); color: #6b563f;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: rgba(120, 90, 60, .22); }
.modal-msg { margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; }
.modal-msg.ok { background: rgba(46, 125, 107, .12); color: #2e7d6b; }
.modal-msg.err { background: rgba(180, 70, 60, .12); color: #b4463c; }

/* 确保 hidden 属性真正隐藏悬浮窗（display:flex 会覆盖默认 hidden） */
.modal-mask[hidden] { display: none !important; }

/* 个人中心三大板块（我的投票/我发布的观点/我收藏的排行榜）：标题+筛选 整体居中，三块同一轴线 */
.me-votes-head { flex-direction: column; align-items: center; text-align: center; border-bottom: none; justify-content: center; }
.me-votes-head h2 { margin-bottom: 8px; }
.me-votes-head .sort-links { gap: 14px; }
@media (max-width: 860px) {
  .me-votes-head { flex-direction: column; }
}

/* 页脚备案信息（合规要求）：工信部 ICP + 公安联网备案 */
.footer-icp {
  margin: 6px 0 0; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
}
.footer-icp a { color: var(--muted); text-decoration: none; opacity: .85; }
.footer-icp a:hover { color: var(--gold); text-decoration: underline; }
.footer-icp .sep { margin: 0 2px; color: var(--border); }
/* 公安网备：警徽图标 + 备案号（需在站内底部展示，点击可查备案详情） */
.footer-icp .footer-police { display: inline-flex; align-items: center; gap: 4px; }
.footer-icp .footer-police img { width: 18px; height: 20px; flex: none; }
html.theme-mono .footer-icp .footer-police img { opacity: .92; }

/* ---- 管理端：条目调榜 ---- */
.move-picker { margin-bottom: 14px; }
.move-picker .field { max-width: 520px; }
.move-picker-row { display: flex; flex-wrap: wrap; gap: 12px; }
.move-picker-row .field { flex: 1 1 260px; max-width: 360px; margin: 0; }
.move-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); white-space: nowrap; padding-bottom: 8px; }
.move-check input { width: auto; }
.move-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 10px; }
.move-actions .field { flex: 1 1 320px; max-width: 520px; margin: 0; }
.move-form .data-table { margin-top: 4px; }
@media (max-width: 860px) {
  .move-actions { flex-direction: column; align-items: stretch; }
  .move-actions .field { max-width: 100%; }
}

/* ---- 管理端：标签分类管理 ---- */
.cat-add-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.cat-add-form .field { max-width: 320px; margin: 0; }
.cat-order-btns { display: inline-flex; gap: 4px; }
.cat-rename { display: flex; gap: 6px; align-items: center; }
.cat-rename input { max-width: 180px; }
.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ============================================================
   暗色主题：选中/激活态强化
   目的：深色底上「已选 / 未选」对比不明显，这里统一提升辨识度
   做法：未选项给可见的胶囊边界；选中项用「半透明亮金底 + 亮金描边 + 亮字加粗」
   ============================================================ */

/* ---- 排序筛选（全部 / 只看夯 / 只看拉）---- */
html.theme-mono .sort-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
html.theme-mono .sort-links a {
  margin-left: 0; padding: 3px 11px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--beige); color: var(--muted-strong);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
html.theme-mono .sort-links a:hover { border-color: var(--primary); color: var(--text); }
html.theme-mono .sort-links a.active {
  background: rgba(224, 185, 138, .22); color: var(--accent-text);
  border-color: var(--primary); font-weight: 700;
  box-shadow: 0 0 0 1px rgba(224, 185, 138, .35) inset, 0 0 10px rgba(224, 185, 138, .12);
}

/* ---- 顶部 Tab / 移动端通知长条 ---- */
html.theme-mono .tab { color: var(--muted-strong); }
html.theme-mono .tab:hover { background: var(--hover-bg); color: var(--text); }
html.theme-mono .tab.active {
  background: rgba(224, 185, 138, .22); color: var(--accent-text); font-weight: 700;
  box-shadow: 0 0 0 1px rgba(224, 185, 138, .35) inset;
}
html.theme-mono .notif-tabs .tab { background: var(--beige); border-color: var(--border-2); color: var(--muted-strong); }
html.theme-mono .notif-tabs .tab.active {
  background: rgba(224, 185, 138, .20); border-color: var(--primary); color: var(--accent-text);
}

/* ---- 标签选择（新建榜单/标签时的 chip）---- */
html.theme-mono .chip-check span {
  background: var(--beige); border-color: var(--border-2); color: var(--muted-strong);
}
html.theme-mono .chip-check input:checked + span {
  background: rgba(224, 185, 138, .24) !important;
  border-color: var(--primary) !important;
  color: var(--accent-text) !important;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(224, 185, 138, .4) inset;
}

/* ---- 投票按钮（夯 / 拉）---- */
html.theme-mono .vote-btn { background: var(--beige); border-color: var(--border-2); color: var(--muted-strong); }
html.theme-mono .vote-btn:hover { border-color: var(--primary); color: var(--text); }
html.theme-mono .vote-btn.agree.active {
  background: #3d6b30; border-color: #8fc47a; color: #fff;
  box-shadow: 0 0 0 2px rgba(143, 196, 122, .35);
}
html.theme-mono .vote-btn.disagree.active {
  background: #6e392f; border-color: #e0a196; color: #fff;
  box-shadow: 0 0 0 2px rgba(224, 161, 150, .35);
}

/* ---- 底部导航当前项 ---- */
html.theme-mono .tabbar-item { color: #8d857c; }
html.theme-mono .tabbar-item.active { color: var(--accent-text); font-weight: 700; }
html.theme-mono .tabbar-item.active .ti-icon {
  background: rgba(224, 185, 138, .18); border-radius: 10px;
}

/* ---- PC 顶栏当前页 ---- */
html.theme-mono .nav-links a { color: var(--muted-strong); }
html.theme-mono .nav-links a.on {
  background: rgba(224, 185, 138, .20); color: var(--accent-text); font-weight: 700;
  box-shadow: 0 0 0 1px rgba(224, 185, 138, .3) inset;
}

/* ---- 头像 emoji / 底色选择 ---- */
html.theme-mono .avatar-opt { background: var(--beige); border-color: var(--border-2); color: #cfc7bd; }
html.theme-mono .avatar-opt:hover { border-color: var(--primary); }
html.theme-mono .avatar-opt.selected {
  background: rgba(224, 185, 138, .24); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 0 2px rgba(224, 185, 138, .4);
}
html.theme-mono .avatar-color.selected {
  box-shadow: 0 0 0 3px var(--accent-text), 0 0 0 5px var(--bg), 0 0 0 6px var(--accent-text);
}

/* ---- 主题选择块 ---- */
html.theme-mono .theme-opt { border: 2px solid var(--border-2); }
html.theme-mono .theme-opt:hover { border-color: var(--primary); }
html.theme-mono .theme-opt.selected {
  border-color: var(--primary);
  background: rgba(224, 185, 138, .16);
  box-shadow: 0 0 0 3px rgba(224, 185, 138, .30);
}
html.theme-mono .theme-check { background: var(--primary); color: #241d14; }

/* ---- 输入框聚焦 ---- */
html.theme-mono .field input:focus, html.theme-mono .field textarea:focus,
html.theme-mono .field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 185, 138, .18);
}

/* ---- 通用按压反馈：点击瞬间缩小 + 变亮，明确「已点中」---- */
.btn:active, .cbtn:active, .tab:active, .sort-links a:active,
.vote-btn:active, .avatar-opt:active, .theme-opt:active,
.tabbar-item:active, .nav-links a:active, .tg:active, .tag-cell:active,
.rc-rate:active, .rank-name:active {
  transform: scale(.96) !important;
  transition: transform .06s ease;
}
html.theme-mono .btn:active, html.theme-mono .cbtn:active,
html.theme-mono .tab:active, html.theme-mono .rank-row:active {
  filter: brightness(1.18);
}

/* ---- 文件上传增强（提示 + 已选文件 + 取消）---- */
.upload-enh { margin-top: 6px; }
.upload-hint { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.upload-picked {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 10px; border-radius: 8px; font-size: 13px;
  background: var(--beige); border: 1px solid var(--border);
}
.upload-enh.has-file .upload-picked { border-color: var(--primary); }
.upload-enh .up-name { color: var(--text); word-break: break-all; }
.upload-enh .up-size { flex: none; }
.upload-cancel {
  flex: none; cursor: pointer; border: 1px solid var(--border);
  background: var(--card); color: var(--disagree);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; line-height: 1.5;
}
.upload-cancel:hover { border-color: var(--disagree); background: var(--disagree); color: #fff; }
html.theme-mono .upload-picked { background: var(--beige); border-color: var(--border-2); }
html.theme-mono .upload-cancel { background: var(--beige); border-color: var(--border-2); }

/* ---- 点评配图：表单里的「添加图片」入口 ---- */
.attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 2px; }
.attach-input { display: none; }
.attach-btn {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  border: 1px dashed var(--border); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; line-height: 1.5; transition: all var(--dur-fast) var(--ease);
}
.attach-btn:hover { border-color: var(--primary); color: var(--primary); }
.attach-btn-sm { padding: 4px 12px; font-size: 12.5px; }
/* 表单内的上传增强：去掉多余留白，隐藏冗长提示，只保留「已选择」回显 */
.attach-row .upload-enh, .row-end .upload-enh { margin: 0; flex: 1; min-width: 0; }
.attach-row .upload-hint, .row-end .upload-hint { display: none; }
.attach-row .upload-picked, .row-end .upload-picked { padding: 4px 10px; font-size: 12.5px; }
html.theme-mono .attach-btn { background: var(--beige); border-color: var(--border-2); color: #cfc6b8; }

/* ---- 点评配图：展示区（缩略图，点击放大）---- */
.comment-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.comment-imgs img {
  width: 104px; height: 104px; flex: none;
  object-fit: cover; object-position: center;
  border-radius: 10px; cursor: zoom-in;
  background: var(--beige); border: 1px solid var(--border);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.comment-imgs img:hover { transform: scale(1.03); box-shadow: var(--shadow-sm); }
.comment-children .comment-imgs img { width: 84px; height: 84px; }
html.theme-mono .comment-imgs img { background: var(--beige); border-color: var(--border-2); }
@media (max-width: 540px) {
  .comment-imgs img { width: 88px; height: 88px; }
  .comment-children .comment-imgs img { width: 72px; height: 72px; }
  .attach-btn { padding: 5px 12px; font-size: 12.5px; }
}

/* 图片完整性：contain 后留白处用主题底色填充，深色主题同步适配 */
html.theme-mono .item-image,
html.theme-mono .ranking-cover { background: var(--beige); }
html.theme-mono .ranking-card .rc-thumb img { background: rgba(255,255,255,.06); }

/* 条目主图：单图时放大展示，尽量完整呈现用户上传的图片 */
.item-image:only-of-type { width: 220px; height: 220px; }

/* 编辑页：当前图片预览（完整显示，不裁剪） */
.edit-preview {
  max-width: 320px; width: 100%; max-height: 220px;
  object-fit: contain; border-radius: 10px;
  background: var(--beige); border: 1px solid var(--border); display: block;
}
html.theme-mono .edit-preview { background: var(--beige); border-color: var(--border-2); }

/* 标签内联编辑（详情页/管理端） */
.tag-inline-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag-inline-edit input, .tag-inline-edit select { max-width: 160px; }

/* ============================================================
   加载骨架屏（图片占位 + 淡入）
   ============================================================ */
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
img.img-skeleton {
  background: linear-gradient(90deg,
    rgba(200, 188, 165, .35) 25%,
    rgba(232, 223, 203, .62) 37%,
    rgba(200, 188, 165, .35) 63%) !important;
  background-size: 400% 100% !important;
  animation: skeleton-shimmer 1.4s ease infinite;
}
html.theme-mono img.img-skeleton {
  background: linear-gradient(90deg,
    rgba(80, 74, 64, .45) 25%,
    rgba(120, 110, 95, .62) 37%,
    rgba(80, 74, 64, .45) 63%) !important;
  background-size: 400% 100% !important;
}
@keyframes img-fade-in { from { opacity: .15; } to { opacity: 1; } }
img.img-fade-in { animation: img-fade-in .4s ease; }

/* ============================================================
   页脚补全：链接行 + 内容悬浮窗
   ============================================================ */
.footer-links { margin: 4px 0 2px; font-size: 12.5px; }
.footer-links a { color: var(--muted); text-decoration: none; opacity: .9; }
.footer-links a:hover { color: var(--gold); text-decoration: underline; }
.footer-links .sep { margin: 0 6px; color: var(--border); }
.terms-list { margin: 0; padding-left: 20px; line-height: 1.85; font-size: 13.5px; }
.terms-list li { margin-bottom: 6px; }
.contact-wechat { font-size: 15px; margin: 10px 0 4px; }
.contact-wechat b { color: var(--gold); letter-spacing: .5px; }

/* 管理端：操作日志分页 */
.audit-pager { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }

/* 图形验证码输入行 */
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-img { height: 44px; width: auto; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; background: #f7f2e7; flex: none; }

/* ============================================================
   管理端：维护模式状态条 + tab 栏双端优化
   ============================================================ */
.maint-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; margin: 0 0 14px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.maint-bar.maint-on { border-color: #e8b93a; background: #fff8e6; }
.maint-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.maint-dot { width: 10px; height: 10px; border-radius: 50%; background: #34d399; flex: none; }
.maint-bar.maint-on .maint-dot { background: #e8a13a; box-shadow: 0 0 0 4px rgba(232, 161, 58, .22); }
.maint-info b { font-size: 15px; display: block; }
.maint-info .muted { display: block; margin-top: 1px; }
.maint-bar form { flex: none; }

/* 管理端 tab 栏：PC 端允许换行（12 个 tab 不再挤一行），移动端横向滑动 */
.admin-nav { flex-wrap: wrap; border-radius: 16px; }

@media (max-width: 860px) {
  .admin-nav {
    flex-wrap: nowrap; overflow-x: auto; border-radius: 14px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav .tab { flex: none; white-space: nowrap; }
  .maint-bar { flex-direction: column; align-items: stretch; }
  .maint-bar form { width: 100%; }
  .maint-bar .btn { width: 100%; }
}

/* ============================================================
   数据看板（管理端首页概览）
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 8px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-card b {
  display: block; font-size: 24px; line-height: 1.15; color: var(--primary);
  font-family: var(--font-serif);
}
.stat-card span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

.chart-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 8px 4px; box-shadow: var(--shadow-sm);
}
.trend-svg { width: 100%; height: auto; display: block; }
.grid-line { stroke: var(--separator); stroke-width: 1; }
.pv-area { fill: rgba(63, 122, 99, .16); stroke: none; }
.pv-line { fill: none; stroke: var(--bamboo); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pv-dot { fill: var(--card); stroke: var(--bamboo); stroke-width: 1.6; }
/* UV 折线：与 PV 同图对比（虚线 + 更浅的色，避免抢主线的视觉权重） */
.uv-line {
  fill: none; stroke: var(--gold); stroke-width: 1.6;
  stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round; opacity: .9;
}
.axis-label { fill: var(--text-3); font-size: 10px; text-anchor: middle; }

.bar-chart {
  display: flex; gap: 4px; align-items: flex-end;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 10px 6px; box-shadow: var(--shadow-sm);
}
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bars { display: flex; gap: 1px; align-items: flex-end; height: 96px; width: 100%; }
/* 注意：必须限定在 .bars 内。此前写作全局 `.bar`，其 border-radius 覆盖掉了
   272 行胶囊进度条的 999px 圆角，导致全站横向进度条底部变成直角。 */
.bars .bar { flex: 1; border-radius: 2px 2px 0 0; min-height: 0; }
.bar-rank { background: var(--gold); }
.bar-item { background: var(--bamboo); }
.bar-cmt  { background: var(--cinnabar); }
.bar-label { font-size: 9px; color: var(--text-3); margin-top: 5px; white-space: nowrap; }

.legend { display: flex; gap: 14px; margin: 8px 2px 0; font-size: 12px; color: var(--muted); }
.legend .lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.lg-rank { background: var(--gold); }
.lg-item { background: var(--bamboo); }
.lg-cmt  { background: var(--cinnabar); }
.lg-pv { background: var(--bamboo); }
.lg-uv { background: var(--gold); }

/* ---- 全站累计：内容构成环形图（纯 CSS conic-gradient） ---- */
.totals-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: center; }
.donut-box { display: flex; flex-direction: column; gap: 12px; }
.donut {
  position: relative; width: 168px; height: 168px; margin: 0 auto;
  border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px var(--separator), var(--shadow-sm);
}
.donut-hole {
  position: absolute; inset: 26px; border-radius: 50%;
  background: var(--card); display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--separator);
}
.donut-hole b { font-size: 24px; font-family: Georgia, serif; color: var(--text); line-height: 1.15; }
.donut-hole i { font-style: normal; font-size: var(--fs-11); color: var(--muted); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.donut-legend li {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-12); color: var(--muted);
}
.donut-legend li i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.donut-legend li b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.donut-legend li span { width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .totals-wrap { grid-template-columns: 1fr; }
}

.hot-list {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.hot-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.hot-name {
  flex: none; width: 96px; font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-bar { flex: 1; height: 8px; background: var(--beige); border-radius: 999px; overflow: hidden; }
.hot-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #b8892d, #d8b25c);
}
.hot-count { flex: none; width: 42px; text-align: right; font-size: 12.5px; color: var(--muted); }

@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card b { font-size: 20px; }
  .hot-name { width: 72px; }
  .bar-label { font-size: 8px; }
}

/* ============================================================
   条目行缩略图 + 图片放大查看器
   ============================================================ */
.rank-thumb {
  width: 56px; height: 56px; flex: none;
  border-radius: 10px; object-fit: cover; object-position: center;
  background: var(--beige); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); cursor: zoom-in;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.rank-thumb:hover { transform: scale(1.05); box-shadow: var(--shadow); }

.img-viewer {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(18, 14, 10, .90);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: iv-in .18s ease;
}
.img-viewer[hidden] { display: none !important; }
@keyframes iv-in { from { opacity: 0; } to { opacity: 1; } }
.img-viewer img {
  max-width: 92vw; max-height: 86vh;
  border-radius: 10px; cursor: default;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .25s ease;
}
.img-viewer img.iv-ready { opacity: 1; }
.img-viewer .iv-close {
  position: absolute; top: 18px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 26px; line-height: 38px; text-align: center;
  cursor: pointer; user-select: none; transition: background var(--dur-fast) var(--ease);
}
.img-viewer .iv-close:hover { background: rgba(255, 255, 255, .30); }
.img-viewer .iv-tip {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; color: rgba(255, 255, 255, .62); font-size: 12.5px;
  pointer-events: none;
}

@media (max-width: 540px) {
  .rank-thumb { width: 46px; height: 46px; border-radius: 9px; }
  .rank-row { gap: 10px; }
  .img-viewer { padding: 12px; }
  .img-viewer img { max-width: 96vw; max-height: 80vh; }
}


/* ============================================================
   多图支持（最多 9 张）：详情页网格 / 编辑页预览 / 审核缩略图
   ============================================================ */
.img-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  margin: 0 0 10px;
}
.item-gallery { flex: 1 0 100%; }          /* 条目详情：多图时独占一行 */
.img-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center;
  border-radius: 10px; cursor: zoom-in; background: var(--beige);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease);
}
.img-grid img:hover { transform: scale(1.02); }

.edit-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-previews .edit-preview {
  width: 96px; height: 96px; max-width: none; max-height: none;
  object-fit: cover; cursor: zoom-in;
}

.review-thumbs { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.review-thumbs img {
  width: 64px; height: 64px; object-fit: cover; object-position: center;
  border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in;
  background: var(--beige);
}

@media (max-width: 540px) {
  .img-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .edit-previews .edit-preview { width: 76px; height: 76px; }
  .review-thumbs img { width: 54px; height: 54px; }
}

/* ============================================================
   墨韵鎏金 2.0 · 页面重设计新增组件
   方向：做减法——收敛装饰，统一图标与令牌；层级靠留白与鎏金细线，
   而非阴影堆叠。全部新增样式均走令牌，深色主题无需逐条打补丁。
   ============================================================ */

/* ---- 图标（统一描边：1.6 线宽 / 圆头 / 24 网格） ---- */
.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.16em; }
.ic-lg { width: 20px; height: 20px; }
.ic-xl { width: 24px; height: 24px; }
.sec-h .ic { color: var(--gold); width: 19px; height: 19px; }
.page-head h1 .ic { color: var(--gold); }
.h2-ic { display: inline-flex; align-items: center; gap: 9px; }
/* sub-h 原有的 ❖ 前缀是纯装饰；带图标时改为 flex 排布并去掉 ❖，避免双重装饰 */
.sub-h.h2-ic { display: flex; align-items: center; gap: 9px; }
.sub-h.h2-ic::before { content: none; }
.sub-h .ic { color: var(--gold); }

/* ---- 区块标题（图标 + 标题 + 鎏金细线 + 右侧「更多」） ---- */
.sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sec-h h2 {
  margin: 0; display: flex; align-items: center; gap: 9px; white-space: nowrap;
  font-family: var(--font-serif); font-size: var(--fs-20); font-weight: 700; letter-spacing: .1em;
}
.sec-h .line { flex: 1; min-width: 20px; height: 1px; background: linear-gradient(90deg, var(--gold-line), transparent); }
.sec-h > a { flex: none; font-size: var(--fs-13); color: var(--muted); white-space: nowrap; }
.sec-h > a:hover { color: var(--gold); text-decoration: none; }

/* 荣誉头衔配色（原为模板内联硬编码色，收敛为语义类） */
.honor-guard { background: #2e7d6b; }
.item-image.placeholder .ic { width: 1em; height: 1em; opacity: .35; color: var(--bamboo); }

/* 个人中心：等级进度前置（不用点开弹窗即可看到「还差多少分」） */
.me-progress { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.me-progress .bar { width: 160px; height: 6px; flex: none; }
.me-progress span { font-size: var(--fs-12); }

/* 屏幕阅读器专用文本（整行链接的可访问名称） */.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- 列表整行语义链接：铺满式 <a>，键盘可达 / 可新窗口打开 ---- */
.rank-row { position: relative; }
.row-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.row-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rank-side, .rank-thumb, .quick-comment, .rank-num a, .tag-row { position: relative; z-index: 2; }

/* ---- 轻量工具类：替代模板里的一次性行内 style ---- */
.m0 { margin: 0; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mt-18 { margin-top: 18px; }
.mb-18 { margin-bottom: 18px; }
.text-center { text-align: center; }
.mv-4 { margin: 4px 0; }
.mv-2 { margin: 2px 0; }
.field-220 { max-width: 220px; }
.field-180 { max-width: 180px; }
/* 后台表格里的成组小控件 */
.flex-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-word { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; }
.word-del { padding: 1px 8px; font-size: var(--fs-11); }
.note-input { width: 120px; padding: 4px 8px; }
.col-40 { width: 40px; }
.col-90 { width: 90px; }
.col-110 { width: 110px; }
.hero-preview { margin: 6px 0; }
.hero-preview img { max-width: 240px; max-height: 120px; border-radius: 10px; object-fit: cover; }
/* 其余零散行内样式收敛 */
.mt-4 { margin-top: 4px; }
.mt-14 { margin-top: 14px; }
.modal-wide { max-width: 540px; }
.bthumb-wide { border-radius: 10px; aspect-ratio: 16 / 9; }
.vh-rate.is-empty { color: var(--muted); font-size: var(--fs-17); }
.brand-seal-lg { width: 52px; height: 52px; font-size: 30px; }
.ms-6 { margin-left: 6px; }
.ms-8 { margin-left: 8px; }
.me-lvl-btn { font-size: var(--fs-12); cursor: pointer; border: none; }
.form-hint { margin: 10px 0 0; }
.plain-list { margin: 0 0 8px; padding-left: 18px; }
.rules-block { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.modal-card.danger { border-top: 3px solid var(--disagree); }
.avatar-file { display: none; }
.link-plain { border: none; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
/* 空状态图标（替代原先塞在文案里的装饰 emoji） */
.empty-ico {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--beige); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-line);
}
.empty-ico .ic { width: 22px; height: 22px; }

/* ============================================================
   首页 · Hero（左文案自动轮播 + 右「今日 Top3」）
   ============================================================ */
.hero-in {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 4vw, 48px); align-items: center;
  padding: clamp(36px, 5vw, 56px) clamp(20px, 3vw, 40px) clamp(72px, 8vw, 104px);
  max-width: 1100px; margin: 0 auto; position: relative; z-index: 3;
}
.hero-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hero-copy h1 { margin: 0 0 14px; }
.hero-copy .hero-sub { margin: 0 0 26px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Hero 左列文案：多屏自动轮播（≥2 屏时由 main.js 驱动切换） ----
   所有屏叠在同一网格单元里（grid-area:1/1），容器高度取最高屏，
   切换只做透明度渐变，因此不会出现高度跳动或文字位移。 */
.hero-carousel { display: grid; width: 100%; }
.hero-slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-dots { display: flex; gap: 8px; margin-top: 20px; }
.hero-dot {
  width: 22px; height: 4px; padding: 0; border: 0; cursor: pointer;
  border-radius: 999px; background: rgba(255, 255, 255, .28);
  transition: background .25s var(--ease), width .25s var(--ease);
}
.hero-dot:hover { background: rgba(255, 255, 255, .52); }
.hero-dot.active { width: 34px; background: var(--gold-light); }

/* Hero 底部远山：整幅一道剪影，替代原先的云纹 / 飞鸟 / 水波 */
.hero-ridge {
  position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
  width: 100%; display: block; z-index: 1; pointer-events: none;
}
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
  width: 100%; display: block; z-index: 1; pointer-events: none;
}

/* ---- Hero 右侧：今日热榜 Top 3（真实数据，替换装饰性玻璃卡） ---- */
.top3 {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(216, 178, 92, .34);
  border-radius: 14px; padding: 18px 20px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  min-width: 0;
}
.top3-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 11px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(216, 178, 92, .28);
}
.top3-head b { font-family: var(--font-serif); font-size: 14.5px; letter-spacing: .12em; color: var(--gold-light); }
.top3-head i { font-style: normal; font-size: var(--fs-11); color: rgba(243, 236, 217, .5); }
.top3-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px dashed rgba(243, 236, 217, .14);
  color: #f3ecd9; text-decoration: none;
}
.top3-row:last-child { border-bottom: none; }
.top3-row:hover { text-decoration: none; background: rgba(255, 255, 255, .06); border-radius: 8px; }
.top3-n {
  font-family: var(--font-serif); font-size: 18px; width: 26px; flex: none;
  text-align: center; color: rgba(243, 236, 217, .45);
}
.top3-row:first-of-type .top3-n { color: var(--gold-light); }
.top3-body { flex: 1; min-width: 0; }
.top3-body b {
  display: block; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top3-body span { display: block; margin-top: 3px; font-size: var(--fs-11); color: rgba(243, 236, 217, .55); }
.top3-rate { flex: none; font-family: var(--font-serif); font-size: 15px; color: var(--gold-light); }

/* ---- 站点数据条（Hero 与内容之间的过渡带） ---- */
.stats-bar {
  display: flex; position: relative; z-index: 4;
  max-width: 1060px; margin: -44px auto 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden;
}
.stats-bar > div { flex: 1; min-width: 0; text-align: center; padding: 16px 6px; border-left: 1px solid var(--gold-line); }
.stats-bar > div:first-child { border-left: none; }
.stats-bar b { display: block; font-family: var(--font-serif); font-size: 24px; line-height: 1.15; color: var(--primary); }
.stats-bar span { display: block; margin-top: 3px; font-size: var(--fs-12); color: var(--muted); letter-spacing: .04em; }

/* ============================================================
   首页 · 热门排行榜（Bento 混排）
   形态沿用方案稿：4 列网格 + 大卡占左侧 2×2，右侧 4 张小卡自动补齐。
     row1  [ 大卡（col 1–2 · row 1–2）][ 小卡 2 ][ 小卡 3 ]
     row2  [        大卡（续）        ][ 小卡 4 ][ 小卡 5 ]
   小卡恒为「横排」：左侧 88×88 方形缩略图 + 右侧文字。
   「文字拥挤」只靠字号与留白解决，不改上面这套落位。
   ============================================================ */
.bento {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto; gap: 14px; align-items: stretch;
}
.bcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.bcard:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--shadow-md); }

/* 大卡：190px 封面 + 正文（标题 / 标签 / 前三条预览 / 统计 / 好评率条） */
.bcard.big { grid-column: 1 / 3; grid-row: 1 / 3; }
.bcard.big .bthumb { height: 190px; }
.bcard.big .bbody { padding: 18px 20px; gap: 10px; }
.bcard.big .btitle { font-size: 19px; }
.bcard.big .bbar { margin-top: 4px; }
.bcard.big .bthumb .bthumb-mono { font-size: 40px; }

/* 小卡：横排（左方形缩略图 + 右文字），文字不贴边、行距放宽 */
.bcard:not(.big) { flex-direction: row; align-items: stretch; }
.bcard:not(.big) .bthumb { width: 88px; height: 88px; flex: none; align-self: center; }
.bcard:not(.big) .bbody { justify-content: center; padding: 13px 15px; gap: 8px; }
.bcard:not(.big) .btitle { font-size: 14.5px; }
.bcard:not(.big) .bmeta { margin-top: 0; font-size: 11.5px; line-height: 1.65; }
.bcard:not(.big) .bthumb .bthumb-mono { font-size: 24px; letter-spacing: .14em; }

.bthumb {
  position: relative; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--beige), var(--card));
  display: flex; align-items: center; justify-content: center;
}
.bthumb .bthumb-mono {
  font-family: var(--font-serif); letter-spacing: .18em;
  color: var(--primary); opacity: .22; font-size: 26px;
}
.bthumb img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }

.brank {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  min-width: 28px; height: 28px; padding: 0 7px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  background: var(--bamboo); color: #fff; box-shadow: var(--shadow-sm);
}
.brank.r1 { background: linear-gradient(135deg, #b8892d, #d8b25c); }
.brank.r2 { background: #a9a49a; }
.brank.r3 { background: #b98a63; }

.bbody { padding: 15px 18px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.btitle {
  margin: 0; font-family: var(--font-serif); font-weight: 700; letter-spacing: .03em;
  color: var(--text); line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;   /* 方案稿：单行截断 */
}

.bchips { display: flex; flex-wrap: wrap; gap: 6px; }

.bprev { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bprev li {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--fs-13); color: var(--muted);
}
.bprev i { font-style: normal; flex: none; width: 16px; text-align: center; font-family: var(--font-serif); color: var(--text-3); }
.bprev li:first-child i { color: var(--gold); font-weight: 700; }
.bprev .bp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.bprev .bp-rate { flex: none; color: var(--agree); font-weight: 700; }

.bmeta { margin-top: auto; font-size: var(--fs-12); color: var(--muted); line-height: 1.6; }
.bmeta b { font-family: var(--font-serif); font-size: var(--fs-13); color: var(--text); font-weight: 700; }
.bbar { height: 6px; border-radius: 999px; background: var(--beige); overflow: hidden; margin-top: 2px; }
.bbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--bamboo), var(--gold)); }

/* ============================================================
   首页 · 标签广场（九分类卡片，替换原先的 pill 云）
   ============================================================ */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-16); }
.cat-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-top: 3px solid var(--bamboo); border-radius: var(--radius);
  padding: 15px 17px; color: var(--text); text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.cat-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cat-head b { font-family: var(--font-serif); font-size: var(--fs-17); letter-spacing: .1em; }
.cat-head i { font-style: normal; font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-card.k1 { border-top-color: var(--bamboo); }  .cat-card.k2 { border-top-color: var(--gold); }
.cat-card.k3 { border-top-color: var(--cinnabar); } .cat-card.k4 { border-top-color: #4a6f8a; }
.cat-card.k5 { border-top-color: #8a6f4a; }         .cat-card.k6 { border-top-color: #6f8a4a; }
.cat-card.k7 { border-top-color: #a05a4a; }         .cat-card.k8 { border-top-color: #5a6a8a; }
.cat-card.k9 { border-top-color: #7a5a8a; }

/* ============================================================
   首页 · 最新点评流（带缩略图与所属榜单）
   ============================================================ */
.feed { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feed-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--separator);
  color: var(--text); text-decoration: none;
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { text-decoration: none; background: var(--bg); }
.feed-av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; overflow: hidden;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35);
}
.feed-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-body { flex: 1; min-width: 0; }
.feed-line { font-size: var(--fs-13); line-height: 1.65; }
.feed-line b { font-weight: 600; }
.feed-line .toward { color: var(--primary); }
.feed-meta { margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-11); color: var(--text-3); }
.feed-thumb {
  width: 54px; height: 54px; flex: none; border-radius: 9px; overflow: hidden;
  background: var(--beige); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-3);
}
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   详情页 · 醒目投票操作条（核心动作不再被长文本淹没）
   ============================================================ */
.vote-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 14px 0 4px; padding: 14px 16px;
  background: var(--bg); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: var(--radius-sm);
}
.vote-hero .vote-big { margin: 0; }
.vote-hero .vote-btn { font-size: 15px; padding: 9px 22px; }
.vote-hero-info { flex: 1; min-width: 180px; }
.vote-hero-info .vh-rate { font-family: var(--font-serif); font-size: 22px; color: var(--agree); line-height: 1.2; }
.vote-hero-info .vh-sub { font-size: var(--fs-12); color: var(--muted); margin-top: 3px; }
.vote-hero .bar.big { max-width: 100%; }

/* ---- 详情页 · 同标签的其他条目 ---- */
.rel-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rel-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); text-decoration: none; min-width: 0;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.rel-item:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-2px); }
.rel-thumb { width: 44px; height: 44px; flex: none; border-radius: 9px; object-fit: cover; background: var(--beige); border: 1px solid var(--border); }
.rel-body { flex: 1; min-width: 0; }
.rel-name { font-size: var(--fs-13); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-meta { font-size: var(--fs-11); color: var(--muted); margin-top: 3px; }

/* ============================================================
   列表页 · 吸顶排序条（长列表滚动时排序始终可达）
   ============================================================ */
.sticky-sort {
  position: sticky; top: 62px; z-index: 10;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: 12px 0 4px;
  background: rgba(250, 246, 238, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.sticky-sort .sort-form { margin-left: auto; }
.sticky-sort label { font-size: var(--fs-12); color: var(--muted); }
html.theme-mono .sticky-sort { background: rgba(36, 33, 29, .94); }

/* ============================================================
   内容骨架屏（文本行占位；图片骨架屏沿用既有 img.img-skeleton）
   ============================================================ */
@keyframes sk-wave { 0% { opacity: .55; } 50% { opacity: 1; } 100% { opacity: .55; } }
.sk-line, .sk-block {
  background: var(--beige); border-radius: 6px;
  animation: sk-wave 1.3s var(--ease) infinite;
}
.sk-line { height: 12px; margin: 7px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-block { height: 96px; border-radius: var(--radius-sm); }
.sk-row { display: flex; gap: 14px; align-items: center; padding: 14px 4px; }
.sk-row .sk-block { width: 56px; height: 56px; flex: none; }
.sk-row .sk-body { flex: 1; min-width: 0; }
.skeleton-wrap { display: flex; flex-direction: column; }
.skeleton-wrap[hidden] { display: none !important; }
/* 局部刷新期间列表区不塌陷，避免骨架与结果切换时页面跳动 */
[data-partial][aria-busy="true"] { min-height: 240px; }

/* ============================================================
   错峰入场动效（卡片依次淡入，替代一次性整页弹入）
   注意 fill-mode 必须是 backwards，不能用 both：
   动画属性在层叠里优先级高于普通声明，若用 both，动画结束后的
   `transform: none` 会永久压住 .bcard:hover / .cat-card:hover 的上浮位移。
   backwards 只在延迟等待期显示首帧，动画结束后交还给普通样式。
   ============================================================ */
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: riseIn var(--dur-slow) var(--ease) backwards; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .10s; }
.stagger > *:nth-child(4) { animation-delay: .14s; }
.stagger > *:nth-child(5) { animation-delay: .18s; }
.stagger > *:nth-child(6) { animation-delay: .22s; }
.stagger > *:nth-child(7) { animation-delay: .26s; }
.stagger > *:nth-child(8) { animation-delay: .30s; }
.stagger > *:nth-child(9) { animation-delay: .34s; }
.stagger > *:nth-child(n + 10) { animation-delay: .38s; }
@media (prefers-reduced-motion: reduce) {
  /* 尊重系统「减少动态效果」：关掉所有入场/循环动画与过渡 */
  .stagger > * { animation: none; }
  .sk-line, .sk-block { animation: none; }
  img.img-skeleton { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ============================================================
   深色主题：新增组件兜底（其余靠令牌自动生效）
   ============================================================ */
html.theme-mono .stats-bar,
html.theme-mono .bcard,
html.theme-mono .cat-card,
html.theme-mono .feed,
html.theme-mono .rel-item,
html.theme-mono .vote-hero { background: var(--card); border-color: var(--border); }
html.theme-mono .vote-hero { background: var(--beige); }
html.theme-mono .bthumb { background: linear-gradient(135deg, var(--beige), var(--card)); }
html.theme-mono .bthumb img.cover { opacity: .92; }
html.theme-mono .top3 { background: rgba(255, 255, 255, .07); }
html.theme-mono .feed-item:hover { background: var(--beige); }
html.theme-mono .sk-line, html.theme-mono .sk-block { background: var(--skeleton); }

/* ============================================================
   数据驱动的行内样式：模板只传「值」，声明仍归 CSS
   ------------------------------------------------------------
   全站剩余的行内 style 都是「随数据变化」的值（进度条宽度、柱状高度、
   环形图渐变、圆点色、头像底色），静态类无法表达，因此保留 style 属性，
   但只写入自定义属性值，具体声明集中在下面这一处 —— 深色主题与设计
   令牌都能统一接管，改视觉不必再全站搜 style="。
   ============================================================ */
.bar-fill,
.bbar i,
.hot-bar i { width: var(--w, 0); }
.bar-chart .bars .bar { height: var(--h, 0); }
.donut { background: var(--donut, var(--beige)); }
.donut-legend li i { background: var(--dot, var(--muted)); }
.feed-av,
.me-avatar,
.act-avatar,
.comment-avatar,
.nav-avatar,
.avatar-color { background: var(--av, var(--beige)); }

/* ============================================================
   错误页（404 / 403 / 413 / 500）：品牌化，替代原来的「一行灰字 + 一个按钮」
   ============================================================ */
.err-page {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 54px 24px 58px; text-align: center;
  box-shadow: 0 6px 22px rgba(42, 38, 32, .08);
}
.err-seal {
  position: absolute; top: -30px; right: -22px;
  width: 160px; height: 160px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 104px; font-weight: 700;
  color: var(--cinnabar); opacity: .07; transform: rotate(-8deg);
  pointer-events: none; user-select: none;
}
.err-inner { position: relative; z-index: 1; max-width: 470px; margin: 0 auto; }
.err-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 17px; margin-bottom: 14px;
  background: var(--beige); color: var(--primary);
}
.err-code {
  font-family: var(--font-serif); font-size: 46px; font-weight: 700; line-height: 1;
  color: var(--gold); letter-spacing: 3px; margin-bottom: 10px;
}
.err-page h1 { font-family: var(--font-serif); font-size: 21px; margin: 0 0 10px; letter-spacing: 1px; }
.err-msg { color: var(--muted); font-size: var(--fs-13); margin: 0 0 6px; }
.err-hint { color: var(--muted); font-size: var(--fs-12); margin: 0; }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
html.theme-mono .err-ico { background: var(--beige); color: var(--gold-light); }

/* ---- 搜索命中高亮（由 hl 过滤器输出 <mark>）---- */
mark {
  background: rgba(184, 137, 45, .26); color: inherit;
  padding: 0 2px; border-radius: 3px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
html.theme-mono mark { background: rgba(245, 217, 173, .20); color: #f3ecd9; }

/* ---- 标签溢出计数（榜单头部：超过 4 个标签收成 +N）---- */
.chip-more {
  background: var(--beige); color: var(--muted); cursor: help;
  font-variant-numeric: tabular-nums;
}

/* ---- 长简介折叠（main.js 按 data-clamp 行数截断并挂「展开全文」）---- */
.rdesc.is-clamped {
  display: -webkit-box; -webkit-line-clamp: var(--clamp, 2);
  -webkit-box-orient: vertical; overflow: hidden;
}
.clamp-toggle {
  display: inline-block; margin: 2px 0 0; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-12); color: var(--primary);
  text-decoration: underline; text-underline-offset: 3px;
}
.clamp-toggle:hover { color: var(--gold); }

/* ---- 客服中心：反馈类型 4 宫格选择（radio 卡片）---- */
.fb-cats { border: 0; padding: 0; margin: 0 0 16px; }
.fb-cats .field-label { display: block; margin-bottom: 8px; }
.fb-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fb-cat-opt { position: relative; cursor: pointer; display: block; }
.fb-cat-opt input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
  pointer-events: none;   /* 视觉隐藏但仍可聚焦，键盘可用 */
}
.fb-cat-card {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); font-size: var(--fs-13); color: var(--text);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.fb-cat-opt:hover .fb-cat-card { border-color: var(--gold); }
.fb-cat-opt input:checked + .fb-cat-card {
  border-color: var(--primary); background: var(--beige);
  box-shadow: inset 0 0 0 1px var(--primary); font-weight: 600;
}
.fb-cat-opt input:focus-visible + .fb-cat-card { outline: 2px solid var(--primary); outline-offset: 2px; }
.fb-cat-ico { display: inline-flex; color: var(--primary); }
.fb-cat-opt input:checked + .fb-cat-card .fb-cat-ico { color: var(--gold); }

/* ============================================================
   个人中心：工作台导航（三块贡献带计数徽标、一键跳转 + 时间范围）
   ============================================================ */
.me-nav {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 14px 0 6px; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.me-nav-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: var(--fs-13); color: var(--text); background: var(--bg);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.me-nav-item:hover { background: var(--beige); color: var(--primary); text-decoration: none; }
.me-nav-item .ic { color: var(--primary); }
.me-nav-item b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.me-range { margin-left: auto; }
/* 锚点跳转时给吸顶头部留出空间，别把标题压在顶栏底下 */
#votes, #comments, #favorites, #theme { scroll-margin-top: 76px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============================================================
   响应式：新增组件
   ============================================================ */
@media (max-width: 860px) {
  /* Hero：小屏改为单列（文案在上、Top3 在下），首屏内即可看到数据条与第一张榜单卡 */
  .hero-in { grid-template-columns: 1fr; gap: 18px; padding: 24px 18px 64px; }
  .hero-copy h1 { font-size: 24px; letter-spacing: 1px; }
  .hero-copy .hero-sub { font-size: 13px; margin-bottom: 16px; }
  .hero-dots { margin-top: 15px; }
  .hero-dot { width: 18px; height: 3px; }
  .hero-dot.active { width: 26px; }
  .hero-seal { width: 40px; height: 40px; font-size: 22px; top: 20px; right: 20px; border-radius: 9px; }
  .hero-ridge, .hero-wave { height: 62px; }
  .top3 { padding: 13px 15px; }
  .top3-row { padding: 9px 2px; }
  .top3-body b { font-size: 13px; }
  .stats-bar { margin: -30px 12px 0; }
  .stats-bar > div { padding: 12px 4px; }
  .stats-bar b { font-size: 17px; }
  .stats-bar span { font-size: var(--fs-11); }

  /* Bento：小屏改为横滑卡片，大卡不再跨列，全部回到「封面在上、文字在下」的竖版 */
  .bento {
    display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  }
  .bento::-webkit-scrollbar { display: none; }
  .bcard, .bcard.big, .bcard:not(.big) {
    flex: 0 0 208px; grid-column: auto; grid-row: auto;
    flex-direction: column; align-items: stretch; min-height: 0; scroll-snap-align: start;
  }
  .bcard.big .bthumb, .bcard:not(.big) .bthumb {
    width: auto; height: auto; aspect-ratio: 16 / 9; align-self: stretch;
    border-radius: 0; margin: 0; box-shadow: none;
  }
  .bcard.big .bthumb .bthumb-mono { font-size: 28px; }
  .bcard:not(.big) .bthumb .bthumb-mono { font-size: 26px; letter-spacing: .18em; }
  .bcard.big .bbody, .bcard:not(.big) .bbody { padding: 12px 14px 14px; gap: 7px; }
  .bcard.big .btitle, .bcard:not(.big) .btitle { font-size: 15px; }
  .bcard:not(.big) .bmeta { margin-top: auto; font-size: var(--fs-12); }
  .bprev { display: none; }

  .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { padding: 13px 14px; gap: 8px; }
  .cat-head b { font-size: 15px; }

  .feed-item { padding: 12px 14px; gap: 10px; }
  .feed-av { width: 30px; height: 30px; font-size: 12px; }
  .feed-thumb { width: 46px; height: 46px; }

  .sticky-sort { top: 0; }
  .rel-items { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .stats-bar > div:nth-child(n + 3) { display: none; }  /* 小屏只留两个关键数字，避免挤成一排 */
  .hero-copy h1 { font-size: 21px; }
  /* 错误页：小屏三个出口竖排、整行可点，避免并排后挤成两行小字 */
  .err-page { padding: 38px 18px 42px; }
  .err-code { font-size: 38px; }
  .err-seal { width: 120px; height: 120px; font-size: 76px; }
  .err-actions { flex-direction: column; }
  .err-actions .btn { width: 100%; justify-content: center; }
  /* 详情页操作条：小屏收成图标按钮，避免多枚按钮换行挤成两排 */
  .ranking-actions .btn-txt { display: none; }
  /* 反馈类型：小屏 4 宫格改 2 列，触控目标更宽 */
  .fb-cat-grid { grid-template-columns: repeat(2, 1fr); }
  /* 工作台导航：小屏收窄，时间范围换行占满 */
  .me-nav { gap: 6px; padding: 9px 10px; }
  .me-nav-item { padding: 6px 10px; font-size: var(--fs-12); }
  .me-range { margin-left: 0; width: 100%; }
}
