/* cardsign-site · 全站样式
   ------------------------------------------------------------------
   设计语言：**署名卡馆（Signed Card Archive）**
   · 暖纸底色 + 衬线标题 + 深绿「验真」色 + 朱红强调色，像一个认真做内容的卡馆；
   · 目录页仍是**票券式**：每张卡是一张带缺口、撕线与存根的票根，圆邮戳 = 署名徽章
     （green 实线 = 已署名，灰虚线 = 未署名）。这是全站最该显眼的结论；
   · 导航分两层：主导航只放「品牌 / 搜索 / 发布 / 用户」，工具与后台下沉到页脚；
   · 移动优先：窄屏单列、搜索独占一行；≥640 两列票根；≥960 顶栏横排 + 双栏页面；≥1200 三列票根。
   · 颜色/字体/圆角只在 :root 定义一次；页面里不写死颜色（页面 <style> 只写布局特例）。
   ------------------------------------------------------------------ */

:root {
  --bg: #eef2f6;
  --bg-deep: #f1f5f9;
  --ticket: #ffffff;
  --surface: #ffffff;
  --text: #1b2233;
  --muted: #66718a;
  --faint: #93a0b8;
  --border: #dce3ed;
  --line-soft: #e8edf5;
  --accent: #e4572e;
  --accent-hover: #c94922;
  --accent-soft: #fdece6;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --green-bg: #ecfdf3;
  --green-border: #bbf7d0;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --amber: #92400e;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --radius: 16px;
  /* 外壳宽度：页头 / 板块条 / 页脚 / 内容区共用同一条中线，页面不再各自决定 */
  --shell: 1180px;
  --shadow-sm: 0 1px 2px rgba(27, 34, 51, 0.04);
  --shadow-md: 0 18px 30px -26px rgba(27, 34, 51, 0.45);
  --shadow-lg: 0 20px 40px -24px rgba(27, 34, 51, 0.5);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* 中容器页面：导航 / 页脚跟着内容一起收窄，左边缘对齐 */
body[data-page="forum"],
body[data-page="profile"],
body[data-page="publish"],
body[data-page="card"],
body[data-page="notifications"],
body[data-page="verify"],
body[data-page="review"],
body[data-page="author"] {
  --shell: 1040px;
}

/* 窄容器说明页 */
body[data-page="guide"],
body[data-page="about"] {
  --shell: 820px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
svg { display: block; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; color: var(--text); }
h1 { margin: 0 0 6px; font-size: 2rem; line-height: 1.2; letter-spacing: 0.01em; }
h2 { margin: 0 0 10px; font-size: 1.15rem; line-height: 1.35; }
h3 { margin: 0 0 8px; font-size: 1rem; }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 26px 18px 84px;
}
.wrap--wide {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px 84px;
}
.wrap--mid {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 18px 84px;
}

/* ============================================================
   全站外壳：吸顶主导航
   信息架构在 site-chrome.js：brand / 搜索 / 发布 / 用户菜单（4 个入口）
   ============================================================ */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(238, 242, 246, 0.9);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.head-row {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 10px;
}
.brand {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}
.brand:hover { color: var(--text); }
.brand-mark {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  filter: drop-shadow(0 6px 12px rgba(228, 87, 46, 0.28));
}
.brand-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name {
  font-family: var(--sans);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-tag {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 搜索：目录页的唯一检索入口（搜索逻辑在 dir.js） */
.head-search { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search:focus-within {
  border-color: #c6d0de;
  box-shadow: 0 0 0 4px rgba(228, 87, 46, 0.08);
}
.search-icon {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--faint);
}
.search-icon svg { width: 16px; height: 16px; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; }

/* 发布卡：全站主 CTA */
.publish {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 20px -14px rgba(228, 87, 46, 0.95);
  transition: background-color .15s ease, transform .15s ease;
}
.publish:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.publish-icon { display: grid; place-items: center; margin-right: 7px; }
.publish svg { width: 14px; height: 14px; }
.head-publish { grid-column: 2; justify-self: end; }
/* 主导航右侧只留发布主按钮（帖子入口已收进第二行板块条） */
.head-nav { grid-column: 2; justify-self: end; display: inline-flex; align-items: center; gap: 4px; }
.publish-suffix { display: none; }
/* 非卡库页没有搜索框：品牌自己吃掉左边空间，发布与用户菜单靠右 */
.site-head--plain .brand { margin-right: auto; }

/* 用户菜单：未登录 = 登录；已登录 = 头像 + 昵称 + 下拉 */
.user-menu { position: relative; grid-column: 3; justify-self: end; }
.user-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.user-login:hover { color: var(--text); border-color: #c6d0de; background: #eef2f6; }
.user-btn {
  margin-top: 0;
  max-width: 42vw;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}
.user-btn:hover { background: #eef2f6; border-color: #c6d0de; }
.user-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef2f7;
  color: #4c5a76;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.user-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 230px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.user-head { padding: 7px 10px 11px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.user-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-head .user-avatar { width: 24px; height: 24px; font-size: 0.64rem; }
.user-head .user-name { font-size: 0.82rem; font-weight: 600; }
.user-fp { margin-top: 3px; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); word-break: break-all; }
/* 指纹是指向身份弹窗的入口（导入 / 导出私钥），不是独立页面 */
a.user-fp { display: block; text-decoration: none; }
a.user-fp::after { content: " ›"; color: var(--faint); }
a.user-fp:hover { color: var(--accent); text-decoration: underline; }
a.user-fp--empty { font-style: italic; }
.user-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}
.user-item:hover { background: #f2f6fb; }
.user-item--action { color: var(--red); }
.user-item--action:hover { background: var(--red-bg); }

/* ============================================================
   页脚：品牌 + 工具链接 + 小字
   ============================================================ */
.site-foot {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}
.foot-main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 30px 18px 42px;
  display: grid;
  gap: 20px 40px;
}
.foot-brand { display: flex; flex-direction: column; gap: 6px; max-width: 34em; }
.foot-brand-row { display: inline-flex; align-items: center; gap: 9px; }
.foot-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
}
.foot-mark img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.foot-name { font-family: var(--sans); font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em; }
.foot-tag { color: var(--muted); font-size: 0.78rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-start; }
.foot-link { color: var(--muted); font-size: 0.8rem; }
.foot-link:hover { color: var(--accent); }
.foot-link--admin { color: var(--accent); font-weight: 600; }
.foot-meta {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}
@media (min-width: 780px) {
  .foot-main { grid-template-columns: minmax(0, 1.4fr) auto; align-items: start; }
}

/* ============================================================
   通用：页面头 / 面板 / 表单 / 按钮 / 状态
   ============================================================ */
.page-head { padding: 34px 0 8px; display: grid; gap: 10px; max-width: 46em; }
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.page-head h1 { font-size: 2.05rem; line-height: 1.18; margin: 0; }
.page-lede { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.8; }
.subtitle { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

.panel,
.input,
.result,
.explain {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.panel-step { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--accent); }

.explain h2 { font-size: 1.05rem; margin: 0 0 10px; }
.explain ol { margin: 0 0 10px; padding-left: 20px; color: var(--muted); }
.explain li { margin: 5px 0; }
.explain code,
code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #66718a;
  font-family: var(--mono);
  font-size: 0.88em;
}
.hint { color: var(--muted); font-size: 0.82rem; margin: 0; line-height: 1.7; }

/* 表单 */
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"] { margin-bottom: 16px; }
textarea {
  min-height: 190px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
}
textarea.summary { min-height: 96px; font-family: var(--sans); font-size: 0.93rem; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.1);
}
input::placeholder,
textarea::placeholder { color: var(--faint); }

/* 按钮 */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
button:hover { background: var(--accent-hover); }
button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.secondary {
  background: #f1f5f9;
  color: var(--text);
  border-color: var(--border);
}
button.secondary:hover { background: #eef2f6; border-color: #cbd5e1; }
button.danger {
  background: #fff;
  color: var(--red);
  border-color: var(--red-border);
}
button.danger:hover { background: var(--red-bg); }

/* 状态条 */
.status {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}
.status.ok { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.status.error { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.error-text { color: var(--red); }
[hidden] { display: none !important; }

/* ============================================================
   首页：公告 / 活动横幅（票券式，先空态）
   目录页：筛选工具条 / 登录墙 / 空态
   ============================================================ */
.site-banner {
  display: flex;
  align-items: stretch;
  margin-top: 26px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, var(--accent-soft) 0, transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.banner-main { flex: 1 1 auto; min-width: 0; padding: 15px 18px 16px; }
.banner-kicker {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.banner-text { margin: 5px 0 0; font-size: 0.92rem; font-weight: 600; }
.banner-hint { margin: 3px 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.6; }
/* 右侧存根：虚线撕线 + 暖色底，像一张待发布的票券 */
.banner-stub {
  flex: none;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border-left: 1px dashed var(--border);
  background: var(--amber-bg);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}
@media (max-width: 639px) {
  .banner-stub { padding: 8px 10px; writing-mode: vertical-rl; letter-spacing: 0.2em; }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}
.btn-ghost:hover { color: var(--text); border-color: #c6d0de; background: #eef2f6; }

/* 登录墙：没会话时的整块占位 */
.login-wall {
  margin-top: 26px;
  padding: 30px 24px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-wall h2 { margin: 0; font-size: 1.3rem; }
.login-wall .hint { margin: 10px auto 0; max-width: 34em; }
.login-wall .login-row { justify-content: center; }
.login-wall .login-row button { margin-top: 0; }
.login-wall .login-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px auto 0;
  max-width: 42em;
}
.login-wall .login-features span {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.72rem;
  color: var(--muted);
}
.login-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 16px; }
.login-row button { padding: 11px 22px; font-size: 0.9rem; }

/* 浏览工具条：筛选都在一块，不再散落在空页面上 */
.browse-toolbar {
  margin-top: 26px;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.toolbar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.toolbar-head h2 { margin: 0; font-size: 1rem; letter-spacing: 0.02em; }
.toolbar-head .count {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.controls { padding-top: 14px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.79rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, color .15s ease;
}
.switch:hover { border-color: #c6d0de; color: var(--text); }
.switch input { position: absolute; width: 0; height: 0; opacity: 0; }
.track {
  position: relative;
  flex: none;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #d9d0c0;
  transition: background-color .18s ease;
}
.track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(27, 34, 51, 0.25);
  transition: transform .18s ease;
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.16); }

.sort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.74rem;
  color: var(--faint);
  cursor: pointer;
}
/* 「排序」两个字不许被挤成竖排（flex 里默认可以缩到 1 个字宽） */
.sort > span { flex: none; white-space: nowrap; }
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  padding: 0 17px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.select-wrap select:focus { outline: none; box-shadow: none; }
.select-wrap .chev {
  position: absolute;
  right: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chips:empty { display: none; }
.chip {
  margin-top: 0;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #e2e9f2;
  color: #4c5a76;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { background: var(--accent-soft); color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ============================================================
   票根（目录页的卡）
   ============================================================ */
.tickets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--ticket);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(27, 34, 51, 0.04), 0 18px 30px -26px rgba(27, 34, 51, 0.45);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* 票根两侧的**缺口**：两个和页面同色的圆，骑在撕线上，被 overflow:hidden 裁成半圆 */
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  bottom: 35px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  pointer-events: none;
}
.ticket::before { left: -10px; }
.ticket::after { right: -10px; }
.ticket:hover {
  transform: translateY(-3px);
  border-color: #c8d2e1;
  box-shadow: 0 2px 4px rgba(27, 34, 51, 0.05), 0 24px 40px -26px rgba(27, 34, 51, 0.5);
}

/* 票面（封面区） */
.ticket-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: linear-gradient(140deg, #e7edf9, #d8e1f4);
}
/* 票面上的虚线内框 */
.ticket-cover::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(27, 34, 51, 0.14);
  border-radius: 8px;
  pointer-events: none;
}
/* 六种票面色，按卡 id 稳定取一个（见 dir.js 的 coverToneOf） */
.cover--a { background: linear-gradient(140deg, #e7edf9, #d8e1f4); }
.cover--b { background: linear-gradient(140deg, #f1e9e1, #e5d5c6); }
.cover--c { background: linear-gradient(140deg, #e4eff0, #cfe4e6); }
.cover--d { background: linear-gradient(140deg, #ebe8f8, #d9d2f1); }
.cover--e { background: linear-gradient(140deg, #e9edf0, #d3dce5); }
.cover--f { background: linear-gradient(140deg, #e6f0e7, #d1e4d5); }
.ticket-cover--img { background: #dfe7f1; }
.ticket-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-glyph {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: rgba(27, 34, 51, 0.2);
  user-select: none;
}
.cover-kind {
  position: absolute;
  z-index: 1;
  left: 14px;
  bottom: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #46536b;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}
.cover-serial {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(27, 34, 51, 0.42);
}

/* 票面正文 */
.ticket-main { flex: 1; padding: 14px 18px 16px; }
.ticket-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ticket-tag,
.ticket-time {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.ticket-title { margin: 6px 0 0; font-size: 1.14rem; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; }
.ticket-title a { color: var(--text); }
.ticket-title a:hover { color: var(--accent); }
.ticket-summary {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(0.84rem * 1.65 * 2);
}

.ticket-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-label { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em; color: var(--faint); }
.who-name { font-size: 0.86rem; font-weight: 600; }
/* 作者名 = 去个人主页的链接（有指纹才有）。链接不该长得像"另一种文字"：
   颜色跟正文一致、平时不画下划线，鼠标上去才给提示。 */
.author-name--link { color: inherit; text-decoration: none; }
.author-name--link:hover { color: var(--accent); text-decoration: underline; }
.who-fp {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--faint);
  word-break: break-all;
}
.who-fp:hover { color: var(--accent); }

/* 圆邮戳 = 署名徽章：绿实线 = 已署名，灰虚线 = 未署名 */
.stamp {
  flex: none;
  width: 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  transform: rotate(-8deg);
  transition: transform .25s ease;
}
.stamp-mark { font-size: 0.72rem; line-height: 1; }
.stamp--none {
  border: 2px dashed #b9c4d4;
  background: transparent;
  color: #7d879c;
  font-weight: 600;
}
.ticket:hover .stamp { transform: rotate(0deg); }

/* 存根：撕线 + 下载次数 + 箭头 */
.ticket-stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border-top: 1.5px dashed #cfd8e4;
  background: #f7fafd;
  color: var(--muted);
  transition: background-color .15s ease;
}
.ticket-stub:hover { background: #eef4fb; }
.stub-k { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--faint); }
.stub-dl {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #46536b;
  font-variant-numeric: tabular-nums;
}
.stub-go { font-size: 0.85rem; color: var(--accent); }
.stub-like {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---- 收藏 / 点赞（详情页那条互动栏）---- */
.social-panel { padding: 16px 18px; }
.social-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--ticket);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.social-btn:hover { border-color: #c6d0de; }
.social-btn:disabled { opacity: 0.55; cursor: progress; }
.social-count { font-family: var(--mono); font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--muted); }
/* 点赞态 / 收藏态：一眼能看出来（印泥橙实心） */
.social-btn.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.social-btn.is-on .social-count { color: var(--accent); }

/* 视图说明行（我的收藏 / 关注流） */
.view-note {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* 视图切换条：全部卡 / 我的收藏 / 关注流（同一页，只换数据源） */
.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--line-soft);
  margin-top: 12px;
}
.view-switch-link {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.view-switch-link:hover { color: var(--text); border-color: #c6d0de; background: #eef2f6; }
.view-switch-link.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- 空态 ---- */
.empty {
  padding: 44px 22px;
  border: 1.5px dashed #c9d3e2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
  color: var(--muted);
}
.empty-stamp {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px dashed #b9c4d4;
  border-radius: 50%;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  transform: rotate(-8deg);
}
.empty h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #2a3448; }
.empty p { margin: 7px 0 0; color: var(--muted); font-size: 0.85rem; }

.empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

/* ============================================================
   登录 / 身份弹窗 & 三个表单
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px 16px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 34, 51, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px 26px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 32px 64px -30px rgba(27, 34, 51, 0.65);
}
.modal-card h2 { margin: 0; font-size: 1.35rem; }
.modal-card .hint { margin-top: 8px; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: #f1f5f9; color: var(--text); }

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 16px;
  padding: 4px;
  border-radius: 12px;
  background: #f1f5f9;
}
.auth-tab {
  margin: 0;
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-tab:hover { background: transparent; color: var(--text); }
.auth-tab.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(27, 34, 51, 0.14); }

.auth-form { display: block; }
.auth-form[hidden] { display: none; }
.auth-form input {
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}
.auth-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.1); }
.auth-label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; }
.auth-form > button:not(.secondary) { width: 100%; margin-top: 4px; }
.code-row { display: flex; gap: 8px; margin-bottom: 12px; }
.code-row input { margin-bottom: 0; flex: 1; min-width: 0; letter-spacing: 0.18em; font-family: var(--mono); }
.code-row button { margin-top: 0; flex: none; padding: 0 14px; font-size: 0.82rem; }
.auth-alt { margin: 10px 0 0; font-size: 0.8rem; text-align: right; }
.auth-alt a { color: var(--muted); }
.auth-alt a:hover { color: var(--accent); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--faint);
  font-size: 0.72rem;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
#author-login-btn { width: 100%; border-radius: 8px; margin-top: 0; }
.auth-hint { margin: 8px 0 0; font-size: 0.74rem; text-align: center; }
.auth-hint a { color: var(--accent); }

.identity-fp {
  margin: 16px 0 14px;
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green);
  word-break: break-all;
}
.identity-label { font-size: 0.78rem; color: var(--muted); margin: 0 0 6px; font-weight: 600; display: block; }
.identity-key-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 12px; }
.identity-key {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 120px;
  overflow: auto;
}
.identity-key-row button { margin-top: 0; flex: none; padding: 9px 14px; font-size: 0.82rem; }
.identity-warn {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  border-radius: 8px;
  background: var(--red-bg);
  color: #b91c1c;
  font-size: 0.82rem;
  line-height: 1.6;
}
.modal-card > button:not(.modal-close):not(.secondary) { width: 100%; }

/* 陌生设备 / 身份管理弹窗：粘贴身份 JSON、按钮行 */
.identity-key-input {
  width: 100%;
  min-height: 84px;
  max-height: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  word-break: break-all;
  resize: vertical;
}
#device-pass { width: 100%; margin-bottom: 12px; }
.device-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.device-row button { flex: 1 1 auto; margin-top: 0; padding: 9px 14px; font-size: 0.82rem; }
#device-import > .hint { margin: 0 0 12px; }
#device-manage > .hint { margin: 0 0 12px; }
#device-skip { width: 100%; margin-top: 0; }

/* 发布页的身份门：没激活身份时的一句人话 + 去处 */
.activation-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 0.82rem;
  line-height: 1.6;
}
.activation-notice[hidden] { display: none; }
.activation-notice a { color: inherit; font-weight: 600; margin-left: 4px; }

/* 发布页「已读入的卡」回执（t91）：不再有手填 JSON 的文本框，改成读进来 + 说清里面有什么 */
.card-import {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-deep);
}
.card-import-name { margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.card-import-meta { margin: 0 0 8px; font-size: 0.82rem; line-height: 1.7; color: var(--muted); }
.card-import-sign { margin: 0 0 10px; font-size: 0.82rem; line-height: 1.7; color: var(--green); }
/* 这次不会署名（没身份 / 没激活）：说清楚但不当成错误 —— 没身份也能发 */
.card-import-sign.is-warn { color: var(--amber); }
.card-import-note { margin: -4px 0 10px; font-size: 0.82rem; }
.card-import-note a { color: var(--accent); font-weight: 600; }
.card-import button.secondary { margin-top: 2px; }

/* ============================================================
   通用内容块：验真结果 / 事实表 / JSON / 卡片列表
   ============================================================ */
.verdict {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.verdict.allow { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.verdict.block { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.verdict.error { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.rule-line { color: var(--muted); font-size: 0.88rem; margin: 0 0 10px; }
.rule-line b { color: var(--text); font-weight: 600; }
.conclusion { margin: 0 0 12px; }
.conclusion .label { font-weight: 600; }
.conclusion .reason { margin: 2px 0 4px; }
.conclusion .message { color: var(--muted); font-size: 0.88rem; margin: 0; }
.facts { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  background: #f7f9fc;
  border-radius: 8px;
}
.fact .k { color: var(--muted); flex-shrink: 0; }
.fact .v { font-weight: 500; text-align: right; word-break: break-all; }
.findings { border-top: 1px solid var(--border); padding-top: 12px; }
.findings h3 { font-size: 0.95rem; margin: 0 0 8px; }
.findings ul { margin: 0; padding-left: 20px; }
.findings li { margin: 4px 0; }
.findings li[data-level="block"] { color: var(--red); }
.findings li[data-level="warn"] { color: var(--amber); }
.findings li[data-level="info"] { color: var(--muted); }

.section h2 { font-size: 1.02rem; margin: 0 0 8px; }
.card-detail .section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* 卡片列表（作者主页 / 审核后台） */
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  display: block;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color .12s ease, box-shadow .12s ease, transform .15s ease;
}
.card:hover { border-color: #c8d2e1; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-title { margin: 0 0 8px; font-size: 1.02rem; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-author { font-weight: 600; color: var(--text); }
.card-time { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.card-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #f1f5f9;
}
.card-summary { margin: 0; color: var(--muted); font-size: 0.86rem; }
.badge {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  background: var(--surface);
  color: var(--muted);
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  font-size: 0.78rem;
  color: var(--faint);
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.list-hint { margin-top: 12px; }
#cards:not(:empty) ~ .list-hint { display: none; }

/* 详情页 */
.card-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px 28px;
  margin-top: 12px;
  box-shadow: var(--shadow-md);
}
.card-detail header { position: relative; padding-right: 84px; }
.card-detail header .stamp { position: absolute; right: 0; top: 0; }
.card-detail header h1 { font-size: 2rem; margin-bottom: 0; }
.card-detail .subtitle { margin-top: 6px; }
.card-detail .facts { margin-top: 16px; }
.card-detail .card-cover { border-radius: 12px; }

/* 作者主页 */
.profile-head { display: grid; gap: 8px; padding: 34px 0 6px; }
.profile-title-row { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--green-border);
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 700;
}
.profile-title-row .page-lede { margin-top: 4px; }
.profile-title-row h1 { font-size: 1.9rem; }
.author-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 8;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.author-cover .cover-glyph { font-size: 2.2rem; }
.badge--signed {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
  font-weight: 600;
}
.badge--none {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
}
.profile-fp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  word-break: break-all;
}
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.count { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; color: var(--faint); }

/* ============================================================
   页面：发布卡 / 验真 / 作者身份 / 审核 / 使用说明 / 关于
   ============================================================ */
.page-grid { display: grid; gap: 20px; margin-top: 22px; }
.page-main { min-width: 0; }
.page-aside { min-width: 0; }
@media (min-width: 960px) {
  .page-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.8fr); align-items: start; }
  .page-aside { position: sticky; top: 92px; }
}
.aside-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.aside-card h2 { font-size: 0.98rem; margin-bottom: 8px; }
.aside-card p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.7; }
.aside-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.82rem; line-height: 1.8; }
.aside-card li { margin: 3px 0; }
.aside-card a { font-weight: 600; }

.upload-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.upload-row .status { margin-top: 0; }
.upload-row button { margin-top: 0; }
.cover-preview { margin-bottom: 12px; }
.cover-preview img {
  max-width: 100%;
  max-height: 240px;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f1f5f9;
}

/* 授权声明（发布页）：两组单选/开关，用 fieldset 只为拿到 legend（浏览器默认边框全抹掉） */
.lic-group { border: 0; margin: 0 0 16px; padding: 0; }
.lic-group:last-child { margin-bottom: 0; }
.lic-group legend { padding: 0; margin: 0 0 8px; font-size: 0.82rem; font-weight: 600; color: var(--text); }
.publish-panel .hint + .lic-group { margin-top: 14px; }

/* 审核后台 */
#status-filter { display: block; width: 100%; margin-bottom: 16px; }
.review-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.review-list .card-detail {
  margin-top: 10px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px dashed var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.card-actions button { margin-top: 0; padding: 7px 16px; font-size: 0.82rem; }
.reader-btn { background: #eef2f6; color: var(--text); }
.reader-btn:hover { background: #e2e8f0; }

/* 审核预览图：列表优先缩略图，没有就给虚线占位 */
.review-cover {
  margin: 2px 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
}
.review-cover img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.review-cover--empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  border-style: dashed;
  color: var(--faint);
  font-size: 0.8rem;
}

/* 程序预筛：命中敏感词用琥珀条，没命中用低饱和绿条；它只是提示，不是审核结论 */
.review-mod {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
}
.review-mod--hit { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber); }
.review-mod--pass { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green); }
.review-mod-label { font-weight: 700; }
.review-mod-hits { font-family: var(--mono); font-size: 0.7rem; opacity: 0.9; word-break: break-word; }

/* 放大阅读：大字号 + 正文自己滚动，长卡文不用挤在小卡片里 */
.review-reader-card {
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 24px 18px;
}
.review-reader-card h2 { padding-right: 36px; }
.review-reader-body {
  margin-top: 14px;
  overflow: auto;
  min-height: 120px;
  padding: 2px 6px 4px 0;
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--text);
  outline: none;
}
.review-reader-body:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.reader-block + .reader-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.reader-block h3 {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.reader-block p { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 560px) {
  .review-reader-card { width: calc(100vw - 24px); max-height: 90vh; padding: 20px 16px 14px; }
  .review-reader-body { font-size: 0.94rem; }
  .review-cover img { max-height: 220px; }
}
.approve-btn { background: var(--green); }
.approve-btn:hover { background: #17553d; }
.reject-btn { background: #b45309; }
.reject-btn:hover { background: #92400e; }
.delete-btn { background: var(--red); }
.delete-btn:hover { background: #b91c1c; }
.view-btn { background: #4f46e5; }
.view-btn:hover { background: #4338ca; }
.badge-pending { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.badge-rejected { background: var(--red-bg); color: #b91c1c; border-color: var(--red-border); }
.badge-published { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.reject-info {
  margin-top: 10px;
  padding: 11px 13px;
  border-left: 3px solid #b91c1c;
  background: var(--red-bg);
  border-radius: 8px;
}
.reject-label { font-size: 0.76rem; font-weight: 600; color: #b91c1c; margin-bottom: 2px; }
.reject-reason { margin: 0; font-size: 0.86rem; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.reject-time { margin-top: 6px; font-size: 0.76rem; color: var(--muted); }
.detail-field { margin-bottom: 12px; }
.detail-key { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.detail-value {
  font-size: 0.84rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.detail-empty { color: var(--muted); font-size: 0.84rem; margin: 0; }

/* 评论审核：整段正文按原文换行，长串（链接 / 连续字符）也不撑破卡片 */
#pending-comments { grid-template-columns: 1fr; }
.comment-card-link { color: inherit; text-decoration: none; }
.comment-card-link:hover { color: var(--accent); text-decoration: underline; }
.comment-review-body {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--line-soft);
  border-radius: 0 8px 8px 0;
  background: #f7f9fc;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* 审核卡：署名 / 授权 / AI 声明（只读展示，不做任何判定） */
.review-author {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfcfe;
}
.review-author h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.review-author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 14px;
}
.review-author-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.review-k { font-size: 0.7rem; color: var(--muted); }
.review-v { font-size: 0.82rem; font-weight: 600; word-break: break-word; }
.review-v--mono { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; overflow-wrap: anywhere; }
.review-v--ok { color: var(--green); }
.review-v--warn { color: var(--amber); }
.review-license { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.review-license .review-k { margin-right: 2px; }
.review-chip {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.68rem;
  color: var(--muted);
}
.review-chip--ok { color: var(--green); border-color: var(--green-border); background: var(--green-bg); }
.review-chip--no { color: #b91c1c; border-color: var(--red-border); background: var(--red-bg); }
.review-chip--warn { color: var(--amber); border-color: var(--amber-border); background: var(--amber-bg); }
.review-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }

select { margin-bottom: 10px; }

/* 使用说明 / 关于：正文页 */
.prose { margin-top: 22px; display: grid; gap: 16px; }
.prose .explain { margin-bottom: 0; }
.prose .explain h2 { display: flex; align-items: center; gap: 8px; }
.prose .explain h2::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.prose .explain p { margin: 0 0 8px; color: var(--muted); font-size: 0.88rem; }
.prose .explain p:last-child { margin-bottom: 0; }
.prose .explain ul { color: var(--muted); font-size: 0.88rem; line-height: 1.8; }
.toc {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.toc h2 { font-size: 0.98rem; }
.toc ol { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.84rem; line-height: 1.9; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--accent); }

/* ============================================================
   响应式：移动优先 → 640 两列票根 → 960 顶栏 + 双栏 → 1200 三列
   ============================================================ */
@media (min-width: 640px) {
  .wrap, .wrap--mid { padding-left: 24px; padding-right: 24px; }
  .wrap--wide { padding-left: 24px; padding-right: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .page-head h1 { font-size: 2.3rem; }
  .login-wall { padding: 38px 32px; }
}

@media (min-width: 780px) {
  .head-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 24px;
  }
  .brand { order: 1; flex: none; }
  .head-search { order: 2; flex: 1 1 auto; max-width: 560px; margin: 0 auto; }
  .head-nav { order: 3; flex: none; }
  .user-menu { order: 4; flex: none; }
  .publish-suffix { display: inline; }
  .brand-tag { display: block; }
}

@media (max-width: 779px) {
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-name { font-size: 0.96rem; letter-spacing: 0.02em; }
  .brand-tag { display: none; }
  .head-publish { padding: 8px 11px; font-size: 0.8rem; }
  .user-login { padding: 8px 12px; }
  /* 登录后的账号按钮在窄屏收成头像圆钮；昵称与身份码在下拉里看 */
  .user-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    display: grid;
    place-items: center;
    max-width: none;
  }
  /* 有头像显示头像；没头像时 user-avatar 自己用昵称首字占位 */
  .user-name { display: none; }
  .user-avatar { width: 34px; height: 34px; font-size: 0.8rem; }

  /* 手机触控与表单：输入框 16px 防 iOS 自动放大，主要点击目标至少 36px */
  input, select, textarea { font-size: 16px; }
  textarea.summary { font-size: 16px; }
  input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px; }
  .search { padding: 4px 12px; }
  .search input { min-height: 40px; }
  .foot-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; }
  .toc a { display: inline-block; padding: 5px 0; }
  .side-block--links a { display: inline-flex; align-items: center; min-height: 36px; }
  .link-btn { min-height: 32px; padding: 4px 8px; }
  .prose a, .compose-login a, .activation-notice a { display: inline-flex; align-items: center; min-height: 32px; }
  .status a, .hint a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 2px;
  }
}

@media (min-width: 960px) {
  .wrap--wide { padding-left: 32px; padding-right: 32px; }
  .wrap, .wrap--mid { padding-left: 32px; padding-right: 32px; }
  .page-head { padding-top: 40px; }
  .browse-toolbar { margin-top: 30px; padding: 18px 22px 20px; }
  .controls { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
  .chips { flex: 1 1 100%; }
  .tickets { gap: 22px; margin-top: 20px; }
  .empty { padding: 52px 30px; }
}

@media (min-width: 1200px) {
  .tickets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   帖子板块（讨论区）：列表 / 详情 / 回复 / 举报
   ============================================================ */
.posts { display: grid; gap: 12px; margin-top: 18px; }
.post-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.post-row:hover { border-color: #c8d2e1; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.post-row--mine { border-left: 3px solid var(--accent); }
.post-row-link { display: block; padding: 14px 18px 15px; color: var(--text); }
.post-row-link:hover { color: var(--text); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--faint); }
.post-time { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; }
.post-author { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.post-flag { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.post-row-title { margin: 8px 0 0; font-size: 1.06rem; font-weight: 700; line-height: 1.45; }
.post-row:hover .post-row-title { color: var(--accent); }
.post-excerpt { margin: 6px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.6; }
.post-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--faint); }
.post-go { color: var(--accent); font-weight: 600; }
.empty-note { margin: 16px 0 0; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 0.86rem; text-align: center; }
.empty-note[hidden] { display: none; }

/* 发帖块：放在列表下面（先看帖子，想说话再往下拉，别让表单占掉第一屏） */
.compose-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.compose-row button { margin-top: 0; }
.compose-row .status { margin-top: 0; }

/* 详情页把页面大标题收起来（作者元素上写了 display:grid，要用 [hidden] 兜住 UA 的 display:none） */
.page-head[hidden] { display: none; }

/* 详情 */
.post-detail { display: grid; gap: 14px; margin-top: 22px; }
.back-link { display: inline-block; margin: 22px 0 14px; font-size: 0.82rem; color: var(--muted); }
.back-link:hover { color: var(--accent); }
.post-card {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.post-title { margin: 10px 0 0; font-size: 1.5rem; line-height: 1.3; letter-spacing: -0.01em; }
/* 正文照原样显示换行（内容永远是文本节点，绝不当 HTML 解析） */
.post-body { margin: 12px 0 0; font-size: 0.95rem; line-height: 1.8; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.post-actions button { margin-top: 0; }

/* 贴吧式楼层：一层一条；楼主与回复共用同一套骨架（头像 / 昵称 / 称号 / 楼层号 / 时间） */
.floor {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 18px 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.floor--op { border-left: 3px solid var(--accent); }
.floor-side { min-width: 0; }
.floor-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef2f7;
  color: #4c5a76;
  font-size: 0.9rem;
  font-weight: 700;
}
.floor-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.floor-main { min-width: 0; }
.floor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.floor-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.floor-name { font-family: var(--mono); font-size: 0.76rem; font-weight: 700; color: var(--text); }
.floor-title {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}
.floor-meta { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 2px; }
.floor-no { font-family: var(--mono); font-size: 0.62rem; color: var(--faint); }
.floor .post-actions { margin-top: 14px; }
.floor-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line-soft); }

/* 回复 */
.replies-panel { margin-top: 0; }
.replies-head { padding: 2px 2px 0; }
.replies-head h2 { font-size: 1rem; }
.replies { display: grid; gap: 10px; }
.reply { background: #fbfcfe; }
.reply--mine { border-color: #f3d3c7; background: #fffaf7; }
.reply-head { font-size: 0.72rem; color: var(--faint); }
.reply-author { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.reply-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.reply-body { margin-top: 6px; font-size: 0.9rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.reply-compose { margin-top: 4px; }
.link-btn {
  margin: 0;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.link-btn:hover { background: var(--accent-soft); color: var(--accent); }
.link-btn--danger:hover { background: var(--red-bg); color: var(--red); }
.report-panel { margin-top: 18px; border-left: 3px solid var(--amber); }
.report-panel[hidden] { display: none; }
#reply-form .field { margin-bottom: 0; }
#reply-login[hidden] { display: none; }

@media (min-width: 960px) {
  .post-row-link { padding: 16px 22px 17px; }
  .floor { padding: 20px 22px 18px; }
  .post-title { font-size: 1.7rem; }
}

@media (max-width: 560px) {
  .floor { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 13px 12px 12px; }
  .floor-avatar { width: 34px; height: 34px; font-size: 0.76rem; }
  .floor-title { padding: 1px 6px; font-size: 0.58rem; }
  .floor-no { font-size: 0.58rem; }
  .post-title { font-size: 1.3rem; }
  .page-head h1 { font-size: 1.8rem; }
}


/* ============================================================
   t37 · 社交平台：板块条 / 首页排行榜与动态 / 个人主页 / 讨论区侧栏
   ------------------------------------------------------------
   只加新块，不动票券（.ticket / .stamp）的既有规则：
   排行榜、动态、个人主页上的署名徽章用 .stamp--mini 这一个修饰类。
   ============================================================ */

/* ---- 板块条（主导航第二行：首页 / 卡目录 / 讨论区 / 我的主页） ---- */
.site-tabs {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 18px 9px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-tabs::-webkit-scrollbar { display: none; }
.site-tab {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.site-tab:hover { color: var(--text); background: #e9eef5; }
.site-tab.is-active {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* 卡目录锚点：别被吸顶导航盖住 */
#browse { scroll-margin-top: 118px; padding-top: 10px; }

/* ---- 首页：排行榜 + 动态流 ---- */
.home-social { margin-top: 30px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home-board,
.home-feed {
  min-width: 0;
  padding: 16px 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-bottom: 10px;
}
.board-head h2 { margin: 0; font-size: 1.08rem; }
.board-note { margin-left: auto; color: var(--faint); font-size: 0.7rem; }
.leader-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.leader-col h3 {
  margin: 0 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.84rem;
  color: var(--text);
}
.leader-col h3 small { font-weight: 400; color: var(--faint); font-size: 0.66rem; }
.leader-list { list-style: none; margin: 0; padding: 0; }
.leader-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.leader-item:last-child { border-bottom: 0; }
.leader-rank {
  flex: none;
  width: 22px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.leader-link { flex: 1; min-width: 0; display: grid; gap: 1px; color: var(--text); }
.leader-link:hover { color: var(--accent); }
.leader-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
}
.leader-meta { color: var(--muted); font-size: 0.68rem; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-item { border-bottom: 1px dashed var(--line-soft); }
.feed-item:last-child { border-bottom: 0; }
.feed-link { display: block; padding: 10px 0 9px; color: var(--text); }
.feed-link:hover { color: var(--text); }
.feed-link:hover .feed-title { color: var(--accent); }
.feed-meta { display: flex; align-items: center; gap: 7px; font-size: 0.66rem; color: var(--faint); }
.feed-kind {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.feed-item--card .feed-kind { background: #e8f1ff; color: #245ea8; }
.feed-time { margin-left: auto; font-variant-numeric: tabular-nums; }
.feed-title { margin: 5px 0 1px; font-size: 0.96rem; line-height: 1.4; }
.feed-excerpt {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}
.feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 0.68rem;
}
.feed-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
}

/* 迷你署名徽章：榜单 / 动态 / 个人主页共用（票根上的大邮戳不动） */
.stamp--mini {
  flex: none;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 2px 8px;
  border-width: 1px;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 0.62rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  transform: none;
  transition: none;
}
.stamp--mini.stamp--none { border-width: 1px; }
.feed-meta .stamp--mini { padding: 1px 6px; font-size: 0.58rem; }
.leader-item .stamp--mini { padding: 1px 6px; font-size: 0.58rem; }

/* ---- 个人主页 ---- */
.profile-hero { margin-top: 26px; }
.profile-hero .profile-title-row { align-items: flex-start; flex-wrap: wrap; }
.profile-copy { min-width: 0; flex: 1 1 260px; }
.profile-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.profile-edit { flex: none; }
/* 关注 / 已关注：已关注是"低调的已选态"（不抢眼，但一眼能看出状态） */
.profile-follow {
  flex: none;
  margin-top: 0;
  padding: 8px 16px;
  font-size: 0.82rem;
}
.profile-follow.is-following {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.profile-followers {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  white-space: nowrap;
}
.profile-bio { margin: 4px 0 0; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.profile-stat {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfcfe;
}
.profile-stat b {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.profile-stat span { color: var(--muted); font-size: 0.72rem; }
.profile-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}
.profile-edit-panel { margin-top: 18px; }
.profile-tabs {
  display: flex;
  gap: 2px;
  margin: 22px 0 14px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  flex: none;
  margin: 0;
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.profile-tab:hover { color: var(--text); background: #eef2f7; }
.profile-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }
.profile-tab span {
  margin-left: 3px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
}
.profile-panel .cards { grid-template-columns: minmax(0, 1fr); }
.profile-panel .card .stamp--mini { margin-top: 10px; }
.profile-panel .posts { display: grid; gap: 10px; }
.profile-panel .empty-note { margin: 16px 0 0; }

/* ---- 讨论区：桌面左栏版块说明，手机折到列表上方 ---- */
.forum-side { display: grid; gap: 12px; margin: 18px 0 4px; }
.side-block {
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.side-block h2 { margin: 0 0 8px; font-size: 0.92rem; }
.side-rules { margin: 0; padding: 0; list-style: none; }
.side-rules { counter-reset: rule; }
.side-rules li {
  position: relative;
  padding: 5px 0 5px 22px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
  counter-increment: rule;
}
.side-rules li::before {
  content: counter(rule);
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
}
.side-block--links { display: grid; gap: 6px; font-size: 0.78rem; }
.side-block--links a { font-weight: 600; }

@media (min-width: 640px) {
  .leader-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .profile-panel .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .site-head { position: sticky; }
  .home-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
  .forum-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .forum-page #forum-head { grid-column: 1 / -1; grid-row: 1; }
  .forum-page #forum-side { grid-column: 1; grid-row: 2 / span 5; position: sticky; top: 122px; margin-top: 0; }
  .forum-page #forum-toolbar { grid-column: 2; grid-row: 2; }
  /* 公告是显式排行的：不写这一条，浏览器会把它丢到隐式行里去（会跑到列表后面） */
  .forum-page #announcement-zone { grid-column: 2; grid-row: 3; }
  .forum-page #post-list-wrap { grid-column: 2; grid-row: 4; }
  .forum-page #compose-panel { grid-column: 2; grid-row: 5; }
  .forum-page #post-detail { grid-column: 2; grid-row: 6; }
  .profile-panel .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #browse { scroll-margin-top: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-tab,
  .feed-title,
  .leader-link { transition: none; }
}

/* 卡目录：分页「加载更多」+ 空态操作 */
.load-more-row { display: flex; justify-content: center; margin-top: 18px; }
.load-more { margin-top: 0; padding: 9px 22px; border-radius: 999px; font-size: 0.84rem; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty-actions button { margin-top: 0; }

/* 帖子列表 / 首页动态的「新 / 热」角标 */
.post-badge {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.post-badge--new { background: var(--accent-soft); color: var(--accent); }
.post-badge--hot { background: var(--amber-bg); color: var(--amber); }

/* ============================================================
   t47 · 详情分享 / 相关推荐 / 搜索建议 / 首屏骨架
   ============================================================ */
.search { position: relative; }
.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 45;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow: auto;
}
.suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}
.suggest-clear {
  margin: 0;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}
.suggest-clear:hover { background: var(--accent-soft); color: var(--accent); }
.suggest-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}
.suggest-item:hover { background: #eef2f7; color: var(--accent); }
.suggest-foot { margin: 6px 8px 2px; color: var(--faint); font-size: 0.64rem; }

/* 下载这张卡：和「发布一张卡」同级的主 CTA（下载是详情页唯一能带走东西的动作） */
.download-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.download-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}
.download-btn:hover { background: var(--accent-hover); color: #fff; }
.download-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.download-note { color: var(--faint); font-size: 0.72rem; }

/* 发布成功后的回执块（它顶掉表单，所以给个轻底色，让人一眼看出「这页换了状态」） */
.receipt { border-color: var(--green); background: linear-gradient(180deg, #f4fbf6, var(--surface) 60%); }
.receipt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.receipt-actions button { margin-top: 0; }
.receipt-link { color: var(--accent); font-size: 0.84rem; font-weight: 600; text-decoration: none; }
.receipt-link:hover { text-decoration: underline; }

.related-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.related-heading { margin: 12px 0 8px; font-size: 0.82rem; color: var(--muted); }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.related-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.related-card:hover { border-color: #c8d2e1; color: var(--accent); }
.related-card-title { font-size: 0.88rem; font-weight: 600; line-height: 1.4; }
.related-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--faint);
  font-size: 0.7rem;
}
.related-card-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-card .stamp--mini { padding: 1px 6px; font-size: 0.58rem; }

.skeleton-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
.skeleton-ticket {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.skeleton-cover { aspect-ratio: 16 / 8; background: #e7edf4; }
.skeleton-body { padding: 14px 18px 16px; }
.skeleton-line { height: 10px; margin-top: 9px; border-radius: 999px; background: #e7edf4; }
.skeleton-line--title { height: 15px; width: 68%; margin-top: 0; }
.skeleton-line--short { width: 38%; }
.skeleton-feed { padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.skeleton-feed .skeleton-line { margin-top: 8px; }
.skeleton-feed .skeleton-line:first-child { margin-top: 0; }

/* 骨架的 shimmer：只改透明背景，不做位移；减少动态效果时完全停掉 */
.skeleton-cover,
.skeleton-line {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.7) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

/* 论坛列表 / 通知列表的帖子行骨架、个人主页与相关推荐的卡片格骨架（skeleton.js 用） */
.skeleton-post { padding: 14px 0; border-bottom: 1px dashed var(--line-soft); }
.skeleton-post .skeleton-line { margin-top: 9px; }
.skeleton-post .skeleton-line:first-child { width: 22%; margin-top: 0; }
.skeleton-detail-row { padding: 8px 0; }
.skeleton-detail-row .skeleton-line { margin-top: 10px; }
.skeleton-detail-row .skeleton-line:first-child { margin-top: 0; }
.skeleton-tile {
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.skeleton-tile .skeleton-line { margin-top: 9px; }
.skeleton-tile .skeleton-line:first-child { margin-top: 0; }
@keyframes skeleton-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -60% 0; }
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-cover,
  .skeleton-line { animation: none; background-image: none; }
}

/* ============================================================
   按钮「正在处理」态（ui-kit.busyOn）
   ============================================================ */

/* 点了立刻有反应：禁用 + 变灰 + 转圈。转圈只是"我在干活"的信号，不做花活。 */
.is-busy { opacity: 0.9; cursor: progress; }
.is-busy::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 8px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  /* 不转圈：留一个小空心点，照样看得出"在等"（文案与禁用态还在） */
  .is-busy::after { animation: none; border-right-color: currentColor; opacity: 0.45; }
}

/* ============================================================
   通知中心（用户菜单的红点 / 徽章 + 通知列表）
   ============================================================ */
/* 用户菜单按钮上的小红点：不打开菜单也知道"有事" */
.user-btn.has-unread { position: relative; }
.user-dot {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}
/* 菜单项上的未读数字 */
.user-item--unread { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-badge {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

/* 通知列表：一行 = 类型徽章 + 一句人话 + 时间，整行是链接 */
.notif-panel { margin-top: 18px; }
.notif-unread {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}
.notif-list { display: grid; gap: 8px; margin-top: 14px; }
.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .12s ease, background-color .12s ease;
}
.notif-row:hover { border-color: #c8d2e1; background: #f8fafc; }
.notif-row.is-unread { border-left: 3px solid var(--accent); background: #fffaf7; }
.notif-kind {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e2e9f2;
  color: #4c5a76;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.notif-kind--reply { background: #e6f0fb; color: #2c5c92; }
.notif-kind--follow { background: var(--green-bg); color: var(--green); }
.notif-kind--like { background: var(--accent-soft); color: var(--accent); }
/* t81：你关注的人有新帖 / 上新卡（这两类的收件人是关注者，配色比"别人动我"轻一档） */
.notif-kind--new_post { background: #eef2ff; color: #4338ca; }
.notif-kind--new_card { background: #fdf2f8; color: #be185d; }
/* t87：审核结果（收件人是作者本人）—— 过审用绿、打回用琥珀、删除用红，一眼能分轻重 */
.notif-kind--card_approved { background: var(--green-bg); color: var(--green); }
.notif-kind--card_rejected { background: var(--amber-bg); color: #92400e; }
.notif-kind--card_removed { background: var(--red-bg); color: var(--red); }
.notif-body { min-width: 0; flex: 1; }
.notif-text { margin: 0; font-size: 0.9rem; line-height: 1.6; word-break: break-word; }
.notif-meta { margin: 4px 0 0; font-family: var(--mono); font-size: 0.64rem; color: var(--faint); }
.notif-dot {
  flex: none;
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
/* 帖子上的互动栏（点赞 / 收藏）：卡片 / 列表共用，和卡详情那条同一套按钮 */
.post-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.post-social .status { margin: 0; flex: 1 1 100%; }
.post-row-social {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
}
.post-row-social .social-btn { margin-top: 0; font-size: 0.76rem; padding: 5px 11px; }
.post-row-social .status { margin: 0; font-size: 0.72rem; }
/* ============================================================
   t56 · UX 打磨：动效 / 焦点 / 触控 / 状态 / 滚动
   ------------------------------------------------------------
   目标：每个动作都有“被接住了”的反馈，但不花哨；reduced-motion 下全部退化为静态。
   ============================================================ */

:root {
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 0.18s;
  --touch: 44px;
}

/* 全站平滑滚动 + 吸顶导航的偏移（锚点不钻到导航底下） */
html { scroll-behavior: smooth; scroll-padding-top: 124px; }

/* 页面进入：只做 4px + 淡入，避免“白闪一下” */
main { animation: page-enter var(--dur-1) var(--ease-out); }
@keyframes page-enter {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 吸顶导航：滚动后才加阴影，避免一进页面就压着内容 */
.site-head { transition: box-shadow var(--dur-1) var(--ease-out), background-color var(--dur-1) ease; }
.site-head.is-scrolled {
  box-shadow: 0 10px 28px -24px rgba(27, 34, 51, 0.55);
  background: rgba(238, 242, 246, 0.96);
}

/* 弹窗：淡入 + 轻微上浮；关闭仍然即时（hidden 不做退出动画，避免“关不掉”的错觉） */
.modal:not([hidden]) .modal-backdrop { animation: backdrop-in var(--dur-1) ease-out; }
.modal:not([hidden]) .modal-card { animation: modal-in 0.2s var(--ease-out); }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 按钮点击反馈：只在按下的瞬间，1px 下沉；不改变布局 */
button:not(:disabled):active,
.publish:active,
.btn-ghost:active,
.download-btn:active,
.social-btn:active,
.site-tab:active,
.chip:active,
.user-item:active,
.related-card:active,
.notif-row:active { transform: translateY(1px); }

/* 统一焦点环：键盘用户每一站都看得见（鼠标点击不触发 :focus-visible） */
a:focus-visible,
button:focus-visible,
.site-tab:focus-visible,
.chip:focus-visible,
.ticket-cover:focus-visible,
.ticket-title a:focus-visible,
.ticket-stub:focus-visible,
.post-row-link:focus-visible,
.related-card:focus-visible,
.notif-row:focus-visible,
.suggest-item:focus-visible,
.user-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 关闭按钮：32 → 36，不改变视觉中心，只把可点区域放大一点 */
.modal-close { width: 36px; height: 36px; }
.modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 错误 / 成功状态：加深左侧语义边，扫一眼能分清 */
.status.ok,
.status.error { border-left-width: 3px; }
.error-text {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  border-radius: 8px;
  background: var(--red-bg);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* 选区也用印泥橙，复制文本时有站点自己的颜色 */
::selection { background: var(--accent-soft); color: var(--text); }

/* 触控设备：主操作保持 44px 命中区；链接卡片本身已经够大，不再放大 */
@media (pointer: coarse) {
  button,
  .btn-ghost,
  .publish,
  .download-btn,
  .social-btn,
  .site-tab,
  .chip,
  .user-btn,
  .user-login,
  .modal-close { min-height: var(--touch); }
  .site-tab { padding-top: 8px; padding-bottom: 8px; }
  .chip { padding-top: 8px; padding-bottom: 8px; }
  .modal-close { width: 44px; height: 44px; }
}

/* reduced-motion：平滑滚动、进入动画、按下位移全部退回静态 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main,
  .modal:not([hidden]) .modal-backdrop,
  .modal:not([hidden]) .modal-card { animation: none; }
  button:not(:disabled):active,
  .publish:active,
  .btn-ghost:active,
  .download-btn:active,
  .social-btn:active,
  .site-tab:active,
  .chip:active,
  .user-item:active,
  .related-card:active,
  .notif-row:active { transform: none; }
}

/* 跳主内容：平时移出屏幕，Tab 到它才出现 */
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 80;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  transition: top var(--dur-1) var(--ease-out);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---- 帖子：发帖按钮 + 弹窗 + 配图（t63）----
   发帖从"页面底部一整块表单"改成"工具栏一个按钮 + 一层 modal"：
   列表不该被一块永远在编辑中的草稿顶下去，弹窗也能顺便把「带图要人工审」说清楚。 */
.compose-open {
  margin: 0 0 0 auto;
  padding: 7px 16px;
  font-size: 0.82rem;
  border-radius: 999px;
}
.compose-login { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.7; }
.compose-login a { font-weight: 600; }
.toolbar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 弹窗里的按钮行：发布是主按钮，取消是次要的（不占满整行） */
.modal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.modal-actions button { margin-top: 0; width: auto; }
.modal-actions .status { margin-top: 0; }

/* 配图（详情页）：一行能放几张就放几张，点开看原图 */
.post-images { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.post-image { display: block; width: 120px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #f1f5f9; }
.post-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 配图（发帖弹窗里）：缩略图 + 右上角删除 */
.post-image-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.post-image-item { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #f1f5f9; }
.post-image-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-image-del {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; margin: 0;
  border-radius: 50%; background: rgba(27, 34, 51, 0.72); color: #fff; font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.post-image-del:hover { background: var(--red); }

/* 「图 N」角标 + 审核状态角标 */
.post-badge--image { background: #eef2f7; color: #4c5a76; border-color: #dbe3ec; }
.post-flag--review { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.status--review { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); font-size: 0.84rem; line-height: 1.6; }
.status--review[hidden] { display: none; }

/* 侧栏那段「审核说明」 */
.side-note { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.75; }

/* 审核后台：待审帖子的配图（审的就是图，得能看见） */
.review-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-image { display: block; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #f1f5f9; }
.review-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 卡详情页的标签（作者自己写的，目录票根上是同一组） */
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f6f8fb;
  color: #4c5a76;
  font-size: 0.78rem;
}

/* ---- 头像（账号资料，不是签名）----
   大头像在个人主页（可点击换图），小头像出现在帖子行与回复里。 */
.profile-avatar-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.profile-avatar { overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-edit {
  padding: 4px 10px;
  margin: 0;
  font-size: 0.72rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}
.profile-avatar-edit:hover { border-color: var(--accent); color: var(--accent); }
/* 列表里的小头像：一个字 / 一张缩略图，和作者名同一行 */
.avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef2f7;
  color: #4c5a76;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 作者头像当链接用（t80）：帖子行 / 楼层 / 卡库票根 三处共用 ----
   头像本身不改变排版，只是外面多一层 <a>；悬停给一圈描边，让人知道它能点进主页。 */
.avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: inherit;
  text-decoration: none;
  border-radius: 50%;
}
.avatar-link:hover,
.avatar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 卡库票根上的作者头像（票根里空间紧，22px 够看清是谁） */
.who-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
}
.who-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- AI 生成内容声明（合规标注）----
   卡详情页事实表里两个小徽章：文字声明（三档）+ 封面声明（是 / 否 / 未声明）。
   颜色只做区分，不做价值判断：none 用中性灰、partial 用琥珀、full 用蓝、未声明用虚线灰。 */
.ai-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f6f8fb;
  color: #4c5a76;
  font-size: 0.76rem;
  line-height: 1.6;
}
.ai-badge--none { background: #f1f5f9; color: #475569; }
.ai-badge--partial { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.ai-badge--full { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.ai-badge--undeclared { background: transparent; border-style: dashed; color: var(--faint); }
/* 发布页封面那个 AI 开关单独一行，别和上传按钮挤在一起 */
.cover-ai-switch { margin: 4px 0 10px; }

/* ---- 称号（荣誉标签，不是权限）----
   个人主页资料头里一排小徽章；「管理员」用深色区分一下，其余同一套浅色。 */
.profile-titles { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.title-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f6f8fb;
  color: #4c5a76;
  font-size: 0.74rem;
  line-height: 1.7;
}
.title-chip--admin { background: #1f2937; border-color: #1f2937; color: #f8fafc; }

/* ---- 称号佩戴（本人能换一个戴 / 不戴；别人只看得到佩戴的那个）---- */
.profile-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-title-row .profile-titles { margin: 6px 0 4px; }
.title-edit { font-size: 0.74rem; }
.title-picker {
  margin: 6px 0 4px;
  padding: 12px 14px;
  border: 1px dashed var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
}
.title-picker[hidden] { display: none; }
.title-picker-hint { margin: 0 0 10px; color: var(--muted); font-size: 0.74rem; line-height: 1.6; }
.title-options { display: flex; flex-wrap: wrap; gap: 8px; }
.title-option {
  margin: 0;
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: #4c5a76;
  font-size: 0.76rem;
  line-height: 1.7;
  cursor: pointer;
}
.title-option:hover { border-color: var(--accent); color: var(--accent); }
.title-option.is-worn { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.title-option[data-title="admin"] { background: #1f2937; border-color: #1f2937; color: #f8fafc; }
.title-option[data-title="admin"].is-worn { background: #1f2937; border-color: var(--accent); }
.title-option:disabled { opacity: 0.55; cursor: default; }

/* ---- 置顶公告（帖子板块顶部，跟帖子不是一类东西）---- */
.announcement-zone { margin-bottom: 14px; }
.announcement-zone .panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.announcement-new { margin-left: auto; padding: 5px 14px; font-size: 0.78rem; }
.announcement-list { display: grid; gap: 12px; }
.announcement { padding: 12px 2px 2px; border-top: 1px dashed var(--line-soft); }
.announcement:first-child { border-top: 0; padding-top: 0; }
.announcement-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.announcement-badge {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
}
.announcement-title { margin: 0; font-size: 1rem; }
.announcement-body { margin: 6px 0 0; color: var(--text); font-size: 0.88rem; line-height: 1.75; white-space: pre-wrap; }
.announcement-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--faint); font-size: 0.72rem; }
.announcement-time { font-family: var(--mono); }

/* ---- 卡详情：管理员的下架行 ---- */
.card-admin-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.card-admin-row button { margin-top: 0; }
.card-admin-row .status { margin-top: 0; }

/* 首页横幅里「去帖子板块看全部公告」那一行 */
.banner-more { margin: 6px 0 0; font-size: 0.82rem; }
.banner-more a { font-weight: 600; }
