/* ============================================================
   文坛 · 仿APP 主站样式（独立于旧 style.css，新页面专用）
   移动优先；桌面端居中单列（手机观感）
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --ink: #243039;          /* 黛青 */
  --ink-2: #4a5560;
  --ink-3: #8a929b;
  --red: #b8332a;         /* 朱砂 */
  --red-deep: #96251e;
  --gold: #b8912f;         /* 描金 */
  --gold-deep: #96742a;
  --paper: #f5f2e9;        /* 宣纸底 */
  --card: #ffffff;
  --line: #ece7da;
  --jade: #3e7d5a;
}

html { -webkit-text-size-adjust: 100%; }
body.app-body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #e8e4d6;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
.app-shell {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.12);
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- 顶栏 ---------- */
.app-topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(135deg, #243039 0%, #2e3c46 60%, #35434e 100%);
  color: #f3ecd8;
  border-bottom: 2px solid rgba(184,145,47,.5);
}
.atb-back {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #f3ecd8; background: rgba(255,255,255,.12);
  margin-left: -4px;
}
.atb-brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.atb-seal {
  width: 30px; height: 30px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: "KaiTi", "STKaiti", serif; font-size: 17px; font-weight: 700;
  color: #f3ecd8; background: var(--red);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35);
}
.atb-name {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 19px; font-weight: 700; letter-spacing: 3px;
}
.atb-side { display: flex; align-items: center; }
.atb-user { font-size: 13px; color: #e8ddbb; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atb-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5f52; margin-left: 3px; }

/* ---------- 主体区块 ---------- */
.wx-page { padding: 14px; }
.wx-hero {
  background: linear-gradient(150deg, #2c3a45 0%, #38485455 140%), linear-gradient(0deg, #35434e, #2c3a45);
  color: #f3ecd8;
  padding: 26px 20px 30px;
  position: relative;
  overflow: hidden;
}
.wx-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,145,47,.22), transparent 70%);
}
.wx-hero h1 {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 30px; letter-spacing: 8px; font-weight: 700;
}
.wx-hero .wx-slogan { font-size: 13px; color: #cfc4a0; letter-spacing: 2px; margin-top: 8px; }
.wx-hero .wx-sub { margin-top: 14px; font-size: 12.5px; color: #d8cfb0; line-height: 1.9; }
.wx-hero .wx-stats { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.wx-hero .wx-stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(184,145,47,.35);
  border-radius: 10px; padding: 6px 12px; font-size: 12px; color: #e8ddbb;
}
.wx-hero .wx-stat b { color: #e9cf8e; font-size: 14px; }

/* ---------- 金刚区 ---------- */
.wx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wx-gitem {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line); text-align: center;
  transition: transform .12s ease;
}
.wx-gitem:active { transform: scale(.95); }
.wx-gitem .gi-ico {
  width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(150deg, #f7f3e6, #efe8d3);
  border: 1px solid #e5dcc2;
}
.wx-gitem .gi-txt { font-size: 12.5px; color: var(--ink); }
.wx-gitem .gi-sub { font-size: 10.5px; color: var(--ink-3); margin-top: -4px; }

/* ---------- 卡片 ---------- */
.wx-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; margin-top: 14px;
  box-shadow: 0 1px 4px rgba(36,48,57,.04);
}
.wx-card-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.wx-card-h h3 {
  font-size: 16px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 6px;
}
.wx-card-h h3::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(var(--red), var(--gold)); display: inline-block;
}
.wx-card-h .more { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 通用元件 ---------- */
.wx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 12px; padding: 10px 20px; font-size: 14.5px; font-weight: 600;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #c23a2f, #96251e); color: #fff;
  box-shadow: 0 3px 10px rgba(150,37,30,.28);
  transition: transform .12s ease;
}
.wx-btn:active { transform: scale(.96); }
.wx-btn[disabled] { opacity: .5; pointer-events: none; }
.wx-btn-line {
  background: transparent; color: var(--red); border: 1.5px solid rgba(184,51,42,.5);
  box-shadow: none;
}
.wx-btn-gold { background: linear-gradient(135deg, #c59a35, #96742a); box-shadow: 0 3px 10px rgba(150,116,42,.28); }
.wx-btn-block { display: flex; width: 100%; }
.wx-btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 9px; }

.wx-tag {
  display: inline-flex; align-items: center;
  font-size: 11.5px; border-radius: 6px; padding: 1px 8px;
  background: #f4eeda; color: var(--gold-deep); border: 1px solid rgba(184,145,47,.4);
}
.wx-tag-red { background: #faeae8; color: var(--red); border-color: rgba(184,51,42,.35); }
.wx-tag-ink { background: #eceff2; color: var(--ink-2); border-color: #d5dae0; }
.wx-tag-jade { background: #e9f3ee; color: var(--jade); border-color: rgba(62,125,90,.4); }

.wx-price { color: var(--red); font-weight: 800; }
.wx-price small { font-size: 12px; font-weight: 600; }

.wx-empty { text-align: center; padding: 30px 14px; color: var(--ink-3); font-size: 13.5px; }
.wx-empty .e-ico { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---------- 资讯 / 公告 · 列表与详情（兰台壳增强 v9.1）---------- */
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-row .wx-tag { cursor: pointer; padding: 5px 13px; font-size: 12.5px; }

.news-row {
  display: flex; align-items: stretch; gap: 12px;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.news-row:last-child { border-bottom: none; }
.news-row:active { background: var(--bg); }
.news-row .news-row-main { flex: 1; min-width: 0; }
.news-row .news-cat-tag { margin-bottom: 5px; font-size: 11px; padding: 1px 9px; }
.news-row .news-row-title {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15.5px; font-weight: 700; color: var(--ink);
  line-height: 1.5; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-row .news-row-desc {
  font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
  margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-row .news-row-meta { font-size: 11.5px; color: var(--ink-3); }
.news-row .news-row-meta span { margin-right: 4px; }
.news-row .news-row-arrow {
  align-self: center; font-size: 22px; color: var(--ink-3);
  font-weight: 300; padding-left: 6px;
}

.wx-back-link {
  display: inline-block; font-size: 12.5px; color: var(--ink-3);
  margin-bottom: 6px;
}
.wx-back-link:active { color: var(--red); }

.news-article-title {
  font-family: "KaiTi", "STKaiti", "STSong", serif;
  font-size: 22px; font-weight: 700; color: var(--ink);
  margin: 10px 0; line-height: 1.45; letter-spacing: 1px;
}
.news-article-meta {
  font-size: 12px; color: var(--ink-3);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.news-article-meta span { margin-right: 8px; }
.news-article-body {
  font-size: 15px; line-height: 1.95; color: var(--ink);
  word-wrap: break-word;
}
.news-article-body p { margin: 12px 0; }
.news-article-body h2, .news-article-body h3 {
  font-family: "KaiTi", "STKaiti", serif;
  color: var(--red); margin: 20px 0 10px; font-weight: 700;
}
.news-article-body h2 { font-size: 18px; }
.news-article-body h3 { font-size: 16px; }
.news-article-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 10px 0; }
.news-article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 6px 12px; margin: 12px 0;
  background: var(--bg-soft); color: var(--ink-2);
  border-radius: 0 6px 6px 0;
}
.news-article-foot {
  margin-top: 20px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--ink-3); text-align: center;
  letter-spacing: 1px;
}

.news-prevnext {
  display: block; padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  transition: background .2s;
}
.news-prevnext:last-child { border-bottom: none; }
.news-prevnext:active { background: var(--bg); }
.news-prevnext .pn-lbl {
  display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px;
  letter-spacing: 1px;
}
.news-prevnext .pn-txt {
  display: block; font-size: 13.5px; color: var(--ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.annc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.annc-row:last-child { border-bottom: none; }
.annc-row:active { background: var(--bg); }
.annc-row .annc-dot {
  width: 24px; text-align: center;
  color: var(--ink-3); font-size: 18px; flex-shrink: 0;
}
.annc-row .annc-top-tag {
  background: var(--red); color: #fff; border-color: var(--red);
  font-size: 10.5px; padding: 1px 8px; flex-shrink: 0;
}
.annc-row .annc-row-main { flex: 1; min-width: 0; }
.annc-row .annc-row-title {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 3px;
}
.annc-row .annc-row-meta {
  font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.annc-row .annc-row-date {
  font-size: 11.5px; color: var(--ink-3); flex-shrink: 0;
  font-family: Georgia, serif;
}

.wx-back-link {
  display: inline-block; font-size: 12.5px; color: var(--ink-3);
  margin-bottom: 6px;
}
.wx-back-link:active { color: var(--red); }

.wx-muted { color: var(--ink-3); font-size: 12.5px; }
.wx-small { font-size: 12px; }
.wx-gap { height: 10px; }

/* 列表行 */
.wx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.wx-row:last-child { border-bottom: none; }
.wx-row .r-main { flex: 1; min-width: 0; }
.wx-row .r-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.wx-row .r-desc { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-row .r-side { text-align: right; font-size: 12px; color: var(--ink-3); flex-shrink: 0; }

/* 头像 */
.wx-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(150deg, #efe8d3, #e0d5b4);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--gold-deep); font-weight: 700; overflow: hidden;
  border: 1.5px solid rgba(184,145,47,.5);
}
.wx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wx-avatar.lg { width: 56px; height: 56px; font-size: 22px; }

/* 榜单条目 */
.wx-rank { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--line); }
.wx-rank:last-child { border-bottom: none; }
.wx-rank .rk-no {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; color: #fff;
  background: #c3cbd3;
}
.wx-rank:nth-child(1) .rk-no { background: linear-gradient(150deg, #d4a53c, #a3781f); }
.wx-rank:nth-child(2) .rk-no { background: linear-gradient(150deg, #aab4bd, #8a959f); }
.wx-rank:nth-child(3) .rk-no { background: linear-gradient(150deg, #c78d5e, #a5673a); }
.wx-rank .rk-name { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-rank .rk-score { font-size: 13px; color: var(--red); font-weight: 700; }
.wx-rank .rk-badge { font-size: 11px; color: var(--ink-3); }

/* 九班卡片 */
.ac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ac-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 14px 8px; text-align: center;
  transition: transform .12s ease; position: relative;
}
.ac-card:active { transform: scale(.95); }
.ac-card .ac-ico { font-size: 26px; }
.ac-card .ac-name { font-family: "KaiTi", "STKaiti", serif; font-size: 16.5px; font-weight: 700; margin-top: 4px; letter-spacing: 1px; }
.ac-card .ac-head { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* 档位选择 */
.tier-list { display: flex; flex-direction: column; gap: 9px; }
.tier-item {
  display: flex; align-items: center; gap: 10px;
  background: #fbf9f2; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 12px 14px;
}
.tier-item.on { border-color: var(--red); background: #fdf6f0; }
.tier-item .t-name { font-family: "KaiTi", "STKaiti", serif; font-size: 17px; font-weight: 700; width: 64px; }
.tier-item .t-desc { flex: 1; font-size: 12px; color: var(--ink-3); }

/* 考试进度点 */
.wx-progress { display: flex; gap: 5px; justify-content: center; margin: 10px 0; }
.wx-progress i { width: 100%; max-width: 26px; height: 5px; border-radius: 3px; background: #e5ddc8; }
.wx-progress i.done { background: var(--jade); }
.wx-progress i.now { background: var(--red); }

/* 答题选项 */
.wx-opt {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-top: 10px; cursor: pointer;
  background: #fff; font-size: 14.5px;
}
.wx-opt:active { background: #faf6ec; }
.wx-opt input { width: 18px; height: 18px; accent-color: var(--red); }
.wx-opt b { color: var(--gold-deep); }

/* 公告/提示条 */
.wx-notice {
  display: flex; gap: 8px; align-items: flex-start;
  background: #fdf8ec; border: 1px solid rgba(184,145,47,.35);
  border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: #7a6425;
  margin-top: 14px; line-height: 1.7;
}

/* 表单 */
.wx-input, textarea.wx-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 13px; font-size: 14.5px; background: #fff; color: var(--ink);
  font-family: inherit; outline: none; resize: vertical;
}
.wx-input:focus { border-color: var(--gold); }

/* 兰台登录 / 注册页 */
.wx-auth-box { max-width: 460px; margin: 0 auto; padding: 18px; }
.wx-auth-hero {
  margin: -18px -18px 22px; padding: 34px 18px 28px;
  background: linear-gradient(160deg, #2c3a45, #243039);
  color: #f3ecd8; text-align: center;
  border-radius: 0 0 22px 22px;
}
.wx-auth-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: 3px; margin-bottom: 6px; }
.wx-auth-hero p { font-size: 13px; color: #c8b988; letter-spacing: 1px; }
.wx-field { margin-bottom: 14px; }
.wx-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.wx-select-row { display: flex; gap: 10px; align-items: center; }
.wx-select { flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 10px; font-size: 14.5px; background: #fff; color: var(--ink); outline: none; }
.wx-select:focus { border-color: var(--gold); }
.wx-hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
.wx-auth-card { background: #fffdf7; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }

/* 用户列表（关注 / 粉丝 / 推荐） */
.wx-user-list { display: flex; flex-direction: column; gap: 10px; }
.wx-user-item {
  display: flex; align-items: center; gap: 12px;
  background: #fffdf7; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px;
}
.wx-user-item .wx-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: var(--gold-soft); border: 1px solid var(--line);
}
.wx-user-item .wx-avatar-fallback {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #c23a2f, #96251e); color: #fff;
  font-size: 17px; font-weight: 700;
}
.wx-user-item .wx-user-main { flex: 1; min-width: 0; }
.wx-user-item .wx-user-name { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-user-item .wx-user-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* 底部 Tab */
.app-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 60;
  display: flex;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.atb-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 6px; color: var(--ink-3); font-size: 10.5px;
}
.atb-item .atb-ico { font-size: 21px; line-height: 1.2; }
.atb-item.on { color: var(--red); font-weight: 700; }

/* flash 提示（旧骨架 flash_html 输出的 toast 类名，这里独立实现同观感） */
.toast {
  margin: 10px 14px 0; border-radius: 12px; padding: 10px 14px; font-size: 13.5px;
  background: #ecf6f0; color: var(--jade); border: 1px solid rgba(62,125,90,.4);
}
.toast-err, .toast.err { background: #faecea; color: var(--red); border-color: rgba(184,51,42,.4); }
.toast-ok, .toast.ok { background: #ecf6f0; color: var(--jade); border-color: rgba(62,125,90,.4); }

/* 打印隐藏 */
.no-print { display: revert; }
@media print { .no-print, .app-tabbar { display: none !important; } }

/* 桌面端微调 */
@media (min-width: 560px) {
  .app-shell { border-radius: 0; }
}

/* ============================================================
   v8.5 · 证书卡重做（卷轴金边 + 浮雕印章 + 米黄羊皮纸）+ 二期作品模块 + 首页新组件
   ============================================================ */

/* ---------- 横滑容器 ---------- */
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { height: 4px; }
.hscroll::-webkit-scrollbar-thumb { background: #d8d0b8; border-radius: 2px; }
.hscroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ---------- 证书卡片（全局通用 · v9.0 内页比例纵式证书）----------
   设计思路：把 cert_view.php 内页证书等比缩放到卡片尺寸，
   让用户在列表里看到的就是“证书本身”。
   ---------- */
.cert-card {
  position: relative;
  width: 190px; height: 256px;
  padding: 0;
  border-radius: 10px;
  background:
    /*  faint 品牌水印 */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='60' y='82' font-family='KaiTi,STKaiti,serif' font-size='42' fill='rgba(184,145,47,.04)' text-anchor='middle'%3E兰%3C/text%3E%3C/svg%3E"),
    /* 羊皮纸纹理 */
    radial-gradient(circle at 12% 18%, rgba(160,120,40,.05) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 32%, rgba(160,120,40,.04) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 78%, rgba(160,120,40,.04) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 88%, rgba(160,120,40,.05) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 45%, rgba(255,247,228,.7) 0 30%, transparent 70%),
    linear-gradient(160deg, #fffdf4 0%, #f9f0d8 40%, #f3e4bc 100%);
  background-position: 50% 55%, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-size: 100px 100px, 24px 24px, 30px 30px, 32px 32px, 26px 26px, auto, auto;
  box-shadow:
    /* 双层金边 */
    inset 0 0 0 1px #c9a557,
    inset 0 0 0 3px #fff8e8,
    inset 0 0 0 5px #b8912f,
    0 8px 22px rgba(120,80,20,.28),
    0 3px 8px rgba(120,80,20,.14);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease;
}
.cert-card:hover, .cert-card:active {
  transform: translateY(-5px) scale(1.03);
  box-shadow:
    inset 0 0 0 1px #c9a557,
    inset 0 0 0 3px #fff8e8,
    inset 0 0 0 5px #b8912f,
    0 16px 34px rgba(120,80,20,.38),
    0 5px 12px rgba(120,80,20,.18);
}
/* 顶部装饰线（替代厚重卷轴盖，更贴近内页） */
.cert-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, transparent 0%, #c9a557 20%, #e6cd83 50%, #c9a557 80%, transparent 100%);
  opacity: .8;
}
/* 内页四角花饰 */
.cert-card::after {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid rgba(184,145,47,.35);
  border-radius: 6px;
  pointer-events: none;
}
.cert-card > * { position: relative; z-index: 1; }
/* 编号：顶部铭牌 */
.cert-card .c-no {
  font-family: Georgia, "Times New Roman", "KaiTi", "STKaiti", serif;
  font-size: 9px; color: #8a7340; letter-spacing: 1px;
  text-align: center;
  margin: 20px 14px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(184,145,47,.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cert-card .c-no::before, .cert-card .c-no::after {
  content: "❖"; color: #b8912f; font-size: 7px; margin: 0 5px; opacity: .7;
}
/* 品牌小字 */
.cert-card .c-brand {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 9.5px; color: #9a8448; letter-spacing: 2px;
  text-align: center; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 标题：居中、醒目、最多 3 行 */
.cert-card .c-title {
  font-family: "KaiTi", "STKaiti", "STSong", serif;
  font-size: 17px; font-weight: 900; color: #8b1e1e;
  margin: 18px 18px 0; letter-spacing: 2px; line-height: 1.45;
  text-align: center;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 0 rgba(255,247,228,.8);
}
/* 获奖者：朱砂大字 */
.cert-card .c-name {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 15px; font-weight: 700; color: #b8332a;
  margin: 10px 18px 0;
  text-align: center; letter-spacing: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 底部信息栏 */
.cert-card .c-foot {
  margin: auto 14px 14px;
  padding-top: 8px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 10px; color: #8a7340; letter-spacing: .5px;
  border-top: 1px dashed rgba(184,145,47,.45);
}
.cert-card .c-foot .c-date {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 0;
}
.cert-card .c-foot .c-date strong { font-weight: 700; font-size: 11px; color: #6a5728; }
.cert-card .c-foot .c-date small { font-size: 9px; color: #9a8448; opacity: .9; }
/* 兼容预览 HTML 中的纯 span 日期 */
.cert-card .c-foot > span:not(.c-seal) {
  font-size: 10px; color: #6a5728; font-weight: 700;
}
/* 右下角朱砂印章 */
.cert-card .c-seal {
  position: relative;
  flex-shrink: 0;
  transform: rotate(-8deg);
  width: 46px; height: 46px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, #f06a55 0%, #d22f1e 40%, #8b1e1e 75%, #4a1010 100%);
  color: #fff7e8;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 11px; font-weight: 700; line-height: 1.05;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    inset 0 0 0 1.5px rgba(255,247,232,.7),
    inset 0 0 0 2.5px rgba(139,30,30,.85),
    inset 0 2px 4px rgba(255,180,160,.5),
    0 3px 6px rgba(120,30,30,.55),
    0 0 0 2px rgba(255,247,232,.85),
    0 0 0 3px rgba(184,145,47,.6);
  letter-spacing: 0; text-align: center; z-index: 3;
}
.cert-card .c-seal::before {
  content: "★"; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  font-size: 7px; color: rgba(255,247,232,.9);
}
/* 现代线（md_ 名人堂证书 · 暗金绸面） */
.cert-card.is-md {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='60' y='82' font-family='KaiTi,STKaiti,serif' font-size='36' fill='rgba(201,165,87,.07)' text-anchor='middle'%3ELTH%3C/text%3E%3C/svg%3E"),
    radial-gradient(circle at 50% -10%, rgba(201,165,87,.22), rgba(201,165,87,0) 65%),
    repeating-linear-gradient(135deg, rgba(255,247,232,.04) 0 2px, transparent 2px 6px),
    linear-gradient(170deg, #2c3a45 0%, #243039 55%, #1a2329 100%);
  background-position: 50% 55%, 0 0, 0 0, 0 0;
  background-size: 100px 100px, auto, auto, auto;
  box-shadow:
    inset 0 0 0 1px #c9a557,
    inset 0 0 0 3px #1a2329,
    inset 0 0 0 5px #c9a557,
    0 6px 18px rgba(0,0,0,.45),
    0 2px 6px rgba(0,0,0,.25);
}
.cert-card.is-md:hover, .cert-card.is-md:active {
  box-shadow:
    inset 0 0 0 1px #c9a557,
    inset 0 0 0 3px #1a2329,
    inset 0 0 0 5px #c9a557,
    0 14px 28px rgba(0,0,0,.55),
    0 4px 10px rgba(0,0,0,.35);
}
.cert-card.is-md::before {
  background: linear-gradient(90deg, transparent 0%, #e6cd83 20%, #c9a557 50%, #e6cd83 80%, transparent 100%);
}
.cert-card.is-md::after {
  border-color: rgba(201,165,87,.45);
}
.cert-card.is-md .c-no { color: #c9a557; border-bottom-color: rgba(201,165,87,.5); }
.cert-card.is-md .c-no::before, .cert-card.is-md .c-no::after { color: #c9a557; }
.cert-card.is-md .c-brand { color: #b8a05c; }
.cert-card.is-md .c-title {
  color: #f1d99e;
  text-shadow: 0 1px 0 rgba(0,0,0,.5), 0 0 .5px rgba(233,207,142,.4);
}
.cert-card.is-md .c-name { color: #e8a89d; }
.cert-card.is-md .c-foot { color: #a8b3bd; border-top-color: rgba(201,165,87,.5); }
.cert-card.is-md .c-foot .c-date strong { color: #f1d99e; }
.cert-card.is-md .c-foot .c-date small { color: #a8b3bd; }
.cert-card.is-md .c-foot > span:not(.c-seal) { color: #f1d99e; }
.cert-card.is-md .c-seal {
  background:
    radial-gradient(circle at 30% 28%, #f06a55 0%, #d22f1e 40%, #8b1e1e 75%, #4a1010 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,247,232,.55),
    inset 0 0 0 2.5px rgba(139,30,30,.75),
    inset 0 2px 4px rgba(255,180,160,.4),
    0 2px 4px rgba(0,0,0,.6),
    0 0 0 2px rgba(201,165,87,.55);
}
/* 失效 / 历史态（仍可读但不强光） */
.cert-card.is-old {
  background: linear-gradient(170deg, #ece4cb, #d6c9a4);
  filter: grayscale(.35) opacity(.82);
  box-shadow:
    inset 0 0 0 1px #8a7340,
    inset 0 0 0 3px #fff8e8,
    inset 0 0 0 5px #b8912f,
    0 2px 8px rgba(80,60,20,.18);
}
.cert-card.is-old::before {
  background: linear-gradient(90deg, transparent 0%, #a88a55 20%, #8a7340 50%, #a88a55 80%, transparent 100%);
}
.cert-card.is-old::after { border-color: rgba(120,100,60,.35); }
.cert-card.is-old .c-seal { background: radial-gradient(circle at 30% 28%, #b88860, #6a4520 100%); }
.cert-cvt { text-align: center; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.cert-cvt a { color: var(--red); font-weight: 700; }

/* ---------- 作品卡（首页 / 作品流） ---------- */
.work-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: #fffdf7; display: block; }
.work-card + .work-card { margin-top: 10px; }
.work-card .w-top { display: flex; align-items: center; gap: 6px; }
.work-card .w-title {
  font-family: "KaiTi", "STKaiti", serif; font-size: 16px; font-weight: 700; letter-spacing: .5px;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.work-card .w-excerpt {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin-top: 7px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.work-card .w-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 12px; color: var(--ink-3); }
.work-card .w-author { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.work-card .w-author .wx-avatar { width: 22px; height: 22px; font-size: 11px; border-width: 1px; }
.work-card .w-flowers { color: var(--red); font-weight: 700; flex-shrink: 0; }

/* ---------- 文士风采卡（首页横滑） ---------- */
.master-card {
  width: 92px; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 4px 10px; border-radius: 13px; background: #fffdf7; border: 1px solid var(--line);
}
.master-card .wx-avatar { width: 50px; height: 50px; font-size: 20px; }
.master-card .m-name { font-size: 13px; font-weight: 700; margin-top: 7px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.master-card .m-title { font-size: 10.5px; color: var(--red); margin-top: 2px; }
.master-card .m-quote {
  font-family: "KaiTi", "STKaiti", serif; font-size: 10.5px; color: var(--ink-3);
  margin-top: 5px; line-height: 1.5; height: 32px; overflow: hidden; max-width: 84px;
}

/* ---------- 作品流页（works.php） ---------- */
.wk-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.wk-tab {
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  padding: 5px 15px; font-size: 13px; color: var(--ink-2); flex-shrink: 0;
}
.wk-tab.on { border-color: var(--red); color: var(--red); background: #fdf3f1; font-weight: 700; }
.wk-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 4px; }
.wk-chips::-webkit-scrollbar { display: none; }
.wk-chip {
  border-radius: 8px; border: 1px solid var(--line); background: #fbf9f2;
  padding: 3px 11px; font-size: 12px; color: var(--ink-2); flex-shrink: 0;
}
.wk-chip.on { border-color: var(--gold); color: var(--gold-deep); background: #fdf8ec; font-weight: 700; }
.wk-pager { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* ---------- 作品详情页（works_view.php） ---------- */
.wv-head { padding: 18px 16px 14px; }
.wv-title { font-family: "KaiTi", "STKaiti", serif; font-size: 22px; font-weight: 700; letter-spacing: 1px; line-height: 1.5; }
.wv-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.wv-meta .wx-avatar { width: 34px; height: 34px; font-size: 14px; }
.wv-content {
  font-family: "KaiTi", "STKaiti", serif; font-size: 17px; line-height: 2.1; letter-spacing: .5px;
  color: var(--ink); padding: 6px 18px 18px; white-space: pre-wrap; word-break: break-word;
}
.wv-actions { display: flex; gap: 10px; padding: 0 14px 14px; }
.wv-actions .wx-btn { flex: 1; }

/* ===== v8.3 · 四期闭环：献花亭礼物卡（wx_send.php） ===== */
.wx-gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wx-gift-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 6px 12px; border-radius: 12px; cursor: pointer; user-select: none;
  background: rgba(255, 253, 247, .07); border: 1px solid rgba(230, 207, 143, .35);
}
.wx-gift-card:active { transform: scale(.96); }
.wx-gift-card .g-name { font-size: 12.5px; font-weight: 700; color: #f3ecd8; }
.wx-gift-card .g-meta { font-size: 11px; color: #d4c89b; }
.wx-gift-card .p-badge {
  position: absolute; top: -7px; right: -5px; font-size: 9.5px; padding: 2px 7px;
  border-radius: 20px; color: #fff; background: linear-gradient(135deg, #c33d2e, #8e1f14);
}
