/* ================================================================
   网站 B · 移动端分类资源列表页
   视觉基线：参考站 app.kyzsapp.com
   浅灰底 #f0f2f5 / 白卡圆角 10px / 分类 tab 蓝色下划线
   ================================================================ */

:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --card-soft: #f6f7f9;
  --text: #1c1e21;
  --text-2: #5b6169;
  --text-3: #9399a3;
  --accent: #2a7fff;
  --accent-soft: rgba(42, 127, 255, .1);
  --line: #eceef1;
  --danger: #ff3b30;
  --shadow: 0 2px 10px rgba(16, 24, 40, .04);
  --radius: 10px;
  --press: rgba(0, 0, 0, .04);
  --mask: rgba(0, 0, 0, .45);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #14171a;
  --card: #21252b;
  --card-soft: #2a2f36;
  --text: #eef0f3;
  --text-2: #b0b6bf;
  --text-3: #7d858f;
  --accent: #5aa0ff;
  --accent-soft: rgba(90, 160, 255, .14);
  --line: #31363d;
  --danger: #ff6b60;
  --shadow: 0 2px 12px rgba(0, 0, 0, .3);
  --press: rgba(255, 255, 255, .05);
  --mask: rgba(0, 0, 0, .7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #14171a;
    --card: #21252b;
    --card-soft: #2a2f36;
    --text: #eef0f3;
    --text-2: #b0b6bf;
    --text-3: #7d858f;
    --accent: #5aa0ff;
    --accent-soft: rgba(90, 160, 255, .14);
    --line: #31363d;
    --danger: #ff6b60;
    --shadow: 0 2px 12px rgba(0, 0, 0, .3);
    --press: rgba(255, 255, 255, .05);
    --mask: rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: var(--bg); }

/* 移动端：关闭「双击放大」与双击缩放延迟
   manipulation = 允许单指滚动 + 双指缩放，只去掉双击缩放，
   避免手指连点卡片/空白处时页面被放大。 */
/* 移动端：关闭「双击放大」
   manipulation = 允许单指滚动 + 双指缩放，只去掉双击缩放，
   避免手指连点卡片/空白处时页面被放大。
   部分内核只读取「命中元素自身」的 touch-action，因此子元素再兜一层。 */
html,
body {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}
body * {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Avenir, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

[hidden] { display: none !important; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 12px 24px;
}

/* ---------------- 悬浮工具条 ---------------- */
.float-tools {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 50;
  display: flex;
  gap: 8px;
}
.ft-btn {
  width: 38px; height: 38px;
  border: none;
  border-radius: 19px;
  background: var(--card);
  color: var(--text-2);
  box-shadow: var(--shadow);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.ft-btn:active { transform: scale(.94); }

/* 手机端：工具条固定右下角竖排 */
@media (max-width: 599px) {
  .float-tools {
    top: auto;
    right: 13px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    flex-direction: column;
  }
}

/* ---------------- 顶部横幅 ---------------- */
.banner-wrap { margin-bottom: 12px; position: relative; }
.banner-dots { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); display: flex; gap: 5px; z-index: 2; padding: 4px 7px; border-radius: 99px; background: rgba(0,0,0,.3); }
.banner-dot { width: 6px; height: 6px; border: 0; padding: 0; border-radius: 99px; background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; transition: width .2s, background .2s; }
.banner-dot.is-active { width: 16px; background: #fff; }
.banner-link {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  background: linear-gradient(120deg, #6a4bff, #9b5cff 55%, #c46bff);
}
.banner-img { display: block; width: 100%; height: auto; }
.banner-fallback {
  padding: 26px 20px;
  min-height: 160px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(120deg, #5b3ce0, #8a4ff0 55%, #b256f5);
}
.bf-title { font-size: 21px; font-weight: 800; letter-spacing: .3px; line-height: 1.4; }
.bf-sub { font-size: 13px; opacity: .88; margin-top: 6px; }

/* ---------------- 分类 tab ---------------- */
.cat-tabs {
  display: flex;
  gap: 26px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 16px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: none;
  position: relative;
  padding: 13px 2px 12px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.cat-tab.active { color: var(--accent); font-weight: 600; }
.cat-tab::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 0; height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .2s ease;
}
.cat-tab.active::after { width: 22px; }

/* ---------------- 资源卡片列表 ---------------- */
.res-list { display: flex; flex-direction: column; gap: 10px; }

.res-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 14px;
  min-height: 84px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.res-card:active { transform: scale(.985); background-color: var(--card-soft); }

.res-icon {
  width: 50px; height: 50px;
  flex: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .12);
  align-self: center;
}
.res-icon img { width: 100%; height: 100%; object-fit: cover; }

.res-body { flex: 1; min-width: 0; }
.res-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.res-title.is-link { color: var(--accent); }
.res-title.is-danger { color: var(--danger); }
.res-tag {
  flex: none;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
}
.res-tag.is-pinned { background: rgba(88, 86, 214, .14); color: #5856D6; }
.res-tag.is-vip { background: rgba(255, 149, 0, .16); color: #c77800; }
.res-tag.is-lock { background: rgba(142, 150, 163, .18); color: #6b7480; }
.res-desc {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-sub {
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.res-date {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .2px;
  white-space: nowrap;
}
.res-meta { margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.res-ver {
  font-size: 11.5px;
  font-weight: 600;
  color: #ff8a00;
  letter-spacing: .2px;
}
html[data-theme="dark"] .res-ver { color: #ffb340; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .res-ver { color: #ffb340; }
}

.empty {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  padding: 48px 0;
}
.content-footer { text-align: center; color: var(--text-3); font-size: 11.5px; padding: 22px 4px 4px; }
.copyright { text-align: center; color: var(--text-3); font-size: 10.5px; padding: 4px 16px 24px; line-height: 1.7; }
.copyright a { color: var(--text-3); text-decoration: none; }

.to-top {
  position: fixed;
  right: 14px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: 38px; height: 38px;
  border: none; border-radius: 50%;
  background: var(--card); color: var(--text-2);
  box-shadow: var(--shadow);
  font-size: 17px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* 手机端：回到顶部按钮上移到悬浮工具条（右下角竖排）上方，避免重叠 */
@media (max-width: 599px) {
  .to-top { right: 13px; bottom: calc(106px + env(safe-area-inset-bottom)); }
}

/* ---------------- 密码弹窗 ---------------- */
.pwd-card {
  width: 100%; max-width: 320px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .12);
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
}
.pwd-card h3 { margin: 0; font-size: 18px; font-weight: 700; }
.pwd-card p { margin: 8px 0 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }

.pwd-input {
  width: 100%; height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-soft);
  color: var(--text);
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
  transition: border-color .15s ease;
}
.pwd-input:focus { border-color: var(--accent); }
.pwd-err { min-height: 16px; color: var(--danger); font-size: 11.5px; margin-top: 6px; text-align: center; }
.pwd-tip { font-size: 11px; color: var(--text-3); line-height: 1.6; margin-top: 14px; }
.pwd-tip-img {
  display: block;
  max-width: 100%;
  max-height: 160px;
  margin: 10px auto 0;
  border-radius: 10px;
  object-fit: contain;
}

.btn {
  border: none; border-radius: 11px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  padding: 0 16px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { filter: brightness(.92); }
.btn-ghost { background: var(--card-soft); color: var(--accent); border: 1px solid var(--line); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
.btn-block { width: 100%; }

.modal-mask {
  position: fixed; inset: 0; z-index: 150;
  background: var(--mask);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.pwd-modal {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 151;
  width: calc(100% - 48px); max-width: 320px;
}
.pwd-close {
  position: absolute; right: 10px; top: 10px;
  width: 28px; height: 28px;
  border: none; border-radius: 14px;
  background: var(--card-soft); color: var(--text-3);
  font-size: 13px; cursor: pointer;
}
/* -------- 密码弹窗：公众号引导版（资源点击密码） -------- */
.pwd-card-vip {
  max-width: 360px;
  padding: 26px 22px 18px;
}
.pwd-card-vip .pwd-lead {
  margin: 8px 0 14px;
  font-size: 12.5px; color: var(--text-3); line-height: 1.6; text-align: center;
}
.pwd-guide-img { margin-bottom: 14px; text-align: center; }
.pwd-guide-img img { width: 100%; height: auto; display: block; border-radius: 10px; }
.pwd-guide {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #07c160, #09b855);
  border-radius: 12px; padding: 12px;
  margin-bottom: 14px; text-align: left;
}
.pwd-qr {
  width: 84px; height: 84px; flex: none;
  background: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pwd-qr img { width: 100%; height: 100%; object-fit: cover; }
.pwd-qr-ph { font-size: 11px; color: #999; text-align: center; line-height: 1.5; }
.pwd-guide-right { flex: 1; min-width: 0; }
.pwd-guide-title { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 10px; text-shadow: 0 1px 2px rgba(0,0,0,.1); }
.pwd-search {
  background: #fff; border-radius: 8px; height: 34px;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  color: #333; font-size: 14px; font-weight: 600;
}
.pwd-search span { font-size: 14px; }
.pwd-lines { text-align: center; margin-bottom: 14px; }
.pwd-line { font-size: 13.5px; line-height: 1.9; color: var(--text); font-weight: 600; }
.pwd-line b { color: var(--text); }
.pwd-line em { color: #e02020; font-style: normal; font-weight: 800; }
.pwd-line-hl { font-size: 14.5px; font-weight: 800; }
.pwd-line-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }
.pwd-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn-gate-ok, .btn-gate-vip { flex: 1; height: 44px; border: none; font-size: 15px; font-weight: 700; color: #fff; border-radius: 11px; }
.btn-gate-ok { background: linear-gradient(135deg, #4f7cff, #6a5bff); }
.btn-gate-vip { background: linear-gradient(135deg, #ffb12e, #ff8a1f); }
.btn-gate-ok:active, .btn-gate-vip:active { filter: brightness(.94); }
.pwd-footnote { font-size: 11px; color: var(--text-3); text-align: center; margin-top: 12px; }
/* 详情页门禁卡片宽度对齐 */
.gate-card-page .pwd-card-vip { margin: 0 auto; }

.pwd-card.shake { animation: shake .35s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* ---------------- 打开公告弹窗 ---------------- */
.ann-card { text-align: left; max-width: 340px; }
.ann-card h3 { margin: 0 28px 12px 0; font-size: 17px; font-weight: 700; text-align: center; }
.ann-content {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
  max-height: 46vh;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--card-soft);
  border-radius: 10px;
}
.ann-content p { margin: 6px 0; }
.ann-content img { max-width: 100%; border-radius: 8px; }
.ann-content a { color: var(--accent); }
.ann-link {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  text-align: right;
}
.ann-link:active { opacity: .7; }
.ann-ok { margin-top: 14px; height: 42px; }

/* ---------------- 资源详情弹窗 ---------------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 160;
  background: var(--mask);
}
.detail-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 161;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-grab {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 14px;
}

.sheet-head { display: flex; align-items: center; gap: 12px; padding-right: 34px; position: relative; }
.sheet-icon {
  width: 52px; height: 52px; flex: none;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
  overflow: hidden;
}
.sheet-icon img { width: 100%; height: 100%; object-fit: cover; }
.sheet-head-main { flex: 1; min-width: 0; }
.sheet-title { font-size: 17px; font-weight: 700; line-height: 1.35; word-break: break-word; }
.sheet-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-close {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  border: none; border-radius: 15px;
  background: var(--card-soft); color: var(--text-3);
  font-size: 14px; cursor: pointer;
}
.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sheet-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.sheet-stats {
  display: flex; margin-top: 14px; padding: 12px 4px;
  background: var(--card-soft); border-radius: 11px;
}
.sheet-stat { flex: 1; text-align: center; }
.sheet-stat + .sheet-stat { border-left: 1px solid var(--line); }
.sheet-stat b { display: block; font-size: 13px; color: var(--text); }
.sheet-stat span { display: block; font-size: 10px; color: var(--text-3); margin-top: 2px; }

.sheet-content { margin-top: 16px; font-size: 14px; line-height: 1.75; color: var(--text-2); }
.sheet-content h1,.sheet-content h2,.sheet-content h3 { font-size: 15px; color: var(--text); margin: 14px 0 6px; }
.sheet-content p { margin: 8px 0; }
.sheet-content ul,.sheet-content ol { padding-left: 20px; margin: 8px 0; }
.sheet-content li { margin: 4px 0; }
.sheet-content a { color: var(--accent); }
.sheet-content img { max-width: 100%; border-radius: 8px; }
.sheet-content strong { color: var(--text); }
.sheet-empty { color: var(--text-3); }

.sheet-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.sheet-actions .btn { width: 100%; height: 44px; }
.sheet-lock {
  margin-top: 16px; padding: 16px;
  border-radius: 12px;
  background: var(--card-soft);
  border: 1px dashed var(--line);
  text-align: center;
}
.sheet-lock-emoji { font-size: 22px; }
.sheet-lock-text { font-size: 12px; color: var(--text-2); margin: 6px 0 12px; line-height: 1.6; }
.sheet-lock-row { display: flex; gap: 8px; }
.sheet-lock-row .pwd-input { flex: 1; text-align: left; letter-spacing: 0; font-size: 14px; height: 42px; }
.sheet-lock-btn { width: 88px; flex: none; height: 42px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 80px;
  transform: translate(-50%, 10px);
  z-index: 300;
  background: rgba(28, 30, 33, .92);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 桌面端 ---------------- */
@media (min-width: 600px) {
  .page { padding-top: 20px; }
  .detail-sheet {
    left: 50%; right: auto; bottom: 50%;
    width: 460px; max-width: calc(100% - 32px);
    transform: translate(-50%, 50%);
    border-radius: 18px;
    animation: modalPop .24s ease both;
  }
  @keyframes modalPop { from { opacity: 0; transform: translate(-50%, 48%) scale(.97); } to { opacity: 1; transform: translate(-50%, 50%) scale(1); } }
}

/* 在线安装（企业证书有效时显示） */
.res-tag.is-online, .sheet-tag.is-online {
  background: rgba(5, 150, 105, .14);
  color: #047857;
  font-weight: 700;
}
[data-theme="dark"] .res-tag.is-online, [data-theme="dark"] .sheet-tag.is-online {
  background: rgba(52, 211, 153, .16);
  color: #6ee7b7;
}
.btn-online { background: #059669 !important; border-color: #059669 !important; color: #fff !important; }
.btn-online:hover { background: #047857 !important; border-color: #047857 !important; }

/* 刷新按钮旋转动画 */
.ft-btn.spinning { animation: ftSpin .6s linear infinite; }
@keyframes ftSpin { to { transform: rotate(360deg); } }

/* ---------------- 会员资源卡片：皇冠标识 + 统一背景 ---------------- */
:root { --card-scrim: rgba(255, 255, 255, .80); }
html[data-theme="dark"] { --card-scrim: rgba(33, 37, 43, .82); }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] { --card-scrim: rgba(33, 37, 43, .82); }
}

/* 会员卡片底纹：右侧一枚淡色皇冠图案，作为「会员」标识本身，不用标签也不用标题前图标 */
:root {
  --vip-crown-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffa01f' fill-opacity='.13' d='M4 17 2.2 6.2 8.1 10.6 12 4l3.9 6.6 5.9-4.4L20 17z'/%3E%3Crect x='4' y='18.4' width='16' height='2.4' rx='1.2' fill='%23ffa01f' fill-opacity='.13'/%3E%3C/svg%3E");
  --vip-crown-glow: rgba(255, 170, 40, .085);
}
html[data-theme="dark"] {
  --vip-crown-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' fill-opacity='.11' d='M4 17 2.2 6.2 8.1 10.6 12 4l3.9 6.6 5.9-4.4L20 17z'/%3E%3Crect x='4' y='18.4' width='16' height='2.4' rx='1.2' fill='%23ffffff' fill-opacity='.11'/%3E%3C/svg%3E");
  --vip-crown-glow: rgba(255, 255, 255, .06);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --vip-crown-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' fill-opacity='.11' d='M4 17 2.2 6.2 8.1 10.6 12 4l3.9 6.6 5.9-4.4L20 17z'/%3E%3Crect x='4' y='18.4' width='16' height='2.4' rx='1.2' fill='%23ffffff' fill-opacity='.11'/%3E%3C/svg%3E");
    --vip-crown-glow: rgba(255, 255, 255, .06);
  }
}
.res-card.is-vip {
  position: relative;
  overflow: hidden;
}
.res-card.is-vip::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: 4px;
  width: 70px;
  height: 70px;
  transform: rotate(-5deg);
  background-image:
    radial-gradient(circle at 50% 52%, var(--vip-crown-glow) 0%, rgba(0, 0, 0, 0) 70%),
    var(--vip-crown-tex);
  background-repeat: no-repeat;
  background-position: center, center;
  background-size: 100% 100%, 62px 62px;
  pointer-events: none;
  z-index: 0;
}
/* 介绍与日期给图案留出空间，避免压在水印上互相干扰 */
.res-card.is-vip .res-body { padding-right: 62px; }
.res-card.is-vip > * { position: relative; z-index: 1; }
/* 已经有自定义/统一背景图时不再叠皇冠，避免两层图案互相干扰；此时靠金色描边区分会员 */
.res-card.is-vip.has-bg::after { display: none; }
.res-card.is-vip.has-bg .res-body { padding-right: 0; }

/* 会员卡片底色：极浅渐变，不与标题/图标抢视觉 */
.res-card.is-vip.tone-gold {
  background-image: linear-gradient(135deg, rgba(255, 176, 31, .16), rgba(255, 122, 0, .05));
  border: 1px solid rgba(255, 176, 31, .34);
}
.res-card.is-vip.tone-purple {
  background-image: linear-gradient(135deg, rgba(124, 92, 255, .16), rgba(90, 60, 220, .05));
  border: 1px solid rgba(124, 92, 255, .32);
}
.res-card.is-vip.tone-blue {
  background-image: linear-gradient(135deg, rgba(42, 127, 255, .14), rgba(64, 180, 255, .05));
  border: 1px solid rgba(42, 127, 255, .30);
}

/* 深色下压一档渐变浓度，避免卡片发闷发褐 */
html[data-theme="dark"] .res-card.is-vip.tone-gold {
  background-image: linear-gradient(135deg, rgba(255, 176, 31, .03), rgba(255, 122, 0, .008));
}
html[data-theme="dark"] .res-card.is-vip.tone-purple {
  background-image: linear-gradient(135deg, rgba(124, 92, 255, .045), rgba(90, 60, 220, .012));
}
html[data-theme="dark"] .res-card.is-vip.tone-blue {
  background-image: linear-gradient(135deg, rgba(42, 127, 255, .04), rgba(64, 180, 255, .012));
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .res-card.is-vip.tone-gold {
    background-image: linear-gradient(135deg, rgba(255, 176, 31, .03), rgba(255, 122, 0, .008));
  }
  html[data-theme="auto"] .res-card.is-vip.tone-purple {
    background-image: linear-gradient(135deg, rgba(124, 92, 255, .045), rgba(90, 60, 220, .012));
  }
  html[data-theme="auto"] .res-card.is-vip.tone-blue {
    background-image: linear-gradient(135deg, rgba(42, 127, 255, .04), rgba(64, 180, 255, .012));
  }
}

/* 自定义背景图：叠一层主题蒙版，保证文字始终清晰 */
.res-card.has-bg {
  background-image: linear-gradient(var(--card-scrim), var(--card-scrim)), var(--card-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
}
/* 会员卡片用背景图时，仍保留一圈金色描边，避免与普通卡片混在一起 */
.res-card.is-vip.has-bg { border-color: rgba(255, 176, 31, .38); }
