/* ============================================================
   微芒工具箱 · 样式
   浅色为默认，<html data-theme="dark"> 切换深色
   ============================================================ */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --surface-3: #f2f6fb;
  --line: #e8eef6;
  --line-2: #dde6f2;
  --ink: #16233a;
  --ink-2: #57687f;
  --ink-3: #8b9cb3;
  --brand: #2b7fff;
  --brand-2: #1a6af0;
  --brand-soft: #eaf2ff;
  --brand-line: #cfe0ff;
  --ok: #12a065;
  --warn: #d98a0b;
  --danger: #e0483f;
  --shadow: 0 1px 2px rgba(22, 35, 58, .04), 0 8px 24px rgba(22, 35, 58, .05);
  --shadow-sm: 0 1px 2px rgba(22, 35, 58, .06);
  --r: 12px;
  --r-sm: 8px;
}

[data-theme="dark"] {
  --bg: #0f1420;
  --surface: #171d29;
  --surface-2: #1b222f;
  --surface-3: #1f2735;
  --line: #26313f;
  --line-2: #303c4d;
  --ink: #e9eff9;
  --ink-2: #9dabc1;
  --ink-3: #6d7c92;
  --brand: #4a9eff;
  --brand-2: #6fb2ff;
  --brand-soft: #182a44;
  --brand-line: #24405f;
  --ok: #34c98a;
  --warn: #e0a53a;
  --danger: #f0685e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .18s, color .18s;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

/* ---------------- 顶栏 ---------------- */
.tw-top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.tw-top-in {
  /* 与 .tw-main 同一套比例宽度，不设固定 max-width */
  width: 92%; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 14px;
  position: relative;
}

.tw-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 700; letter-spacing: -.2px; flex: 0 0 auto;
  color: var(--ink);
}
.tw-logo:hover { color: var(--ink); }

.tw-logo i {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #3b8cff 0%, #6a5cff 100%);
  color: #fff; position: relative; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 12px -3px rgba(59, 108, 255, .55);
}
.tw-logo span {
  background: linear-gradient(120deg, var(--ink) 30%, var(--ink-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}


/* ---------------- 顶栏中间：时间 · 地区 · 天气 ---------------- */
.tw-env {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
  pointer-events: none; user-select: none;
}

.tw-env [hidden] { display: none !important; }

.tw-env-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-2); flex: none;
}

.tw-env-c { color: var(--ink-2); }

.tw-env-w {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--ink-2);
}

.tw-env-w b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------- 顶部导航菜单 ---------------- */
.tw-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 18px; flex: 0 1 auto; min-width: 0;
}
.tw-nav-item {
  position: relative; display: inline-flex; align-items: center;
  height: 32px; padding: 0 12px; border-radius: 9px;
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: .15s;
}
.tw-nav-item:hover { color: var(--ink); background: var(--surface-3); }
.tw-nav-item.on { color: var(--brand); font-weight: 600; }

.tw-nav-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 12px; border-radius: 9px; border: 0;
  background: transparent; color: inherit; font-size: 13.5px; cursor: pointer;
  transition: .15s;
}
.tw-nav-drop:hover .tw-nav-toggle,
.tw-nav-drop.open .tw-nav-toggle { color: var(--brand); background: var(--surface-3); }
.tw-nav-toggle svg { transition: transform .18s; }
.tw-nav-drop.open .tw-nav-toggle svg { transform: rotate(180deg); }

.tw-nav-menu {
  position: absolute; left: 0; top: calc(100% + 8px);
  width: 560px; max-height: min(66vh, 560px); overflow-y: auto;
  padding: 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 50px -18px rgba(16, 24, 38, .28);
  display: none; z-index: 60;
}
.tw-nav-drop.open .tw-nav-menu { display: block; animation: twDrop .14s ease; }
@keyframes twDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.tw-nav-group { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tw-nav-group:last-child { border-bottom: 0; }
.tw-nav-cat {
  display: block; font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px; padding: 2px 4px;
}
.tw-nav-cat:hover { color: var(--brand); }
.tw-nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.tw-nav-link {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--ink-2); text-decoration: none; transition: .13s;
}
.tw-nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.tw-nav-link.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

@media (max-width: 720px) {
  .tw-nav { margin-left: 6px; }
  .tw-nav-item { padding: 0 8px; font-size: 13px; }
  .tw-nav-menu {
    position: fixed; left: 12px; right: 12px; top: 58px; width: auto;
    max-height: calc(100vh - 72px);
  }
}

.tw-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 右侧合并成一组：身份状态 + 反馈 + 注册 + 登录 */
.tw-userbar {
  display: flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 20px;
  background: var(--surface-3); border: 1px solid var(--line);
}

.tw-userbar .tw-status {
  height: 28px; padding: 0 9px;
  background: transparent; border: 0; border-radius: 14px;
  font-size: 12px;
}

.tw-userbar .tw-user { height: 28px; padding: 0 11px; border-radius: 14px; font-size: 12.5px; }

.tw-userbar .tw-user.ghost {
  background: transparent; border-color: transparent; color: var(--ink-2);
}

.tw-userbar .tw-user.ghost:hover {
  background: var(--surface); border-color: var(--line-2); color: var(--brand);
}

.tw-userbar .tw-user.is-in { background: var(--surface); }

.tw-icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: .15s; padding: 0;
}

.tw-icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.tw-status {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 17px;
  background: var(--surface-3); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}

.tw-status b { color: var(--brand); font-weight: 600; }

.tw-status.is-vip { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }

/* ---------------- 页面容器 ---------------- */
.tw-main { width: 92%; margin: 0 auto; padding: 0px 0 60px; min-height: calc(100vh - 230px); }

/* ---------------- 门面 hero（每页公共，_hero.php） ----------------
 * 尺寸走 clamp()：随视口宽度在「最小—理想—最大」区间内等比缩放。
 * 首页是完整档；内页加 .is-sub 整体约 0.75 倍，上下边距同步收窄。
 */
.tw-hero {
  text-align: center;
  padding: clamp(28px, 3.4vw, 44px) 0 clamp(22px, 2.6vw, 32px);
}

.tw-hero h1 {
  margin: 0; font-size: clamp(24px, 3.2vw, 40px); font-weight: 700;
  letter-spacing: -.7px; line-height: 1.3;
}

.tw-hero h1 em { font-style: normal; color: var(--brand); }

.tw-hero-sub { margin: clamp(8px, 1vw, 13px) 0 0; font-size: clamp(13px, 1vw, 14.5px); color: var(--ink-2); }

/* 数据行：N 个工具 / 免费使用 / 无需注册 */
.tw-hero-stats {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
  gap: 20px; margin-top: clamp(13px, 1.4vw, 19px);
  font-size: clamp(12px, .9vw, 12.5px); color: var(--ink-2);
}

.tw-hero-stats > span { display: inline-flex; align-items: center; gap: 6px; }

.tw-hero-stats svg { color: var(--ink-3); flex: none; }

.tw-hero-stats b { color: var(--ink); font-weight: 600; font-size: 13px; }

/* 居中大搜索框 */
.tw-hero-search { max-width: 620px; margin: clamp(17px, 1.9vw, 26px) auto 0; position: relative; }

.tw-hero-search input {
  width: 100%; height: 46px; border-radius: 23px;
  border: 1px solid var(--line-2); background: var(--surface);
  padding: 0 20px 0 46px; font-size: 14px; color: var(--ink);
  font-family: inherit; outline: none;
  box-shadow: 0 2px 10px rgba(22, 35, 58, .04);
  transition: .16s;
}

.tw-hero-search input::placeholder { color: var(--ink-3); }

.tw-hero-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}

.tw-hero-search svg {
  position: absolute; left: 17px; top: 15px; color: var(--ink-3); pointer-events: none;
}

/* 分类胶囊 */
.tw-hchips {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin-top: clamp(15px, 1.7vw, 22px);
}

.tw-hchip {
  height: 32px; padding: 0 15px; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: 13px;
  cursor: pointer; transition: .15s; white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center;
}

.tw-hchip:hover { border-color: var(--brand-line); color: var(--brand); }

.tw-hchip.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
  font-weight: 500; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 26%, transparent);
}

/* ---- 内页紧凑档：整块约 0.75 倍，边距同步等比收窄 ---- */
.tw-hero.is-sub { padding: clamp(20px, 2.2vw, 30px) 0 clamp(16px, 1.8vw, 22px); }

.tw-hero.is-sub h1 { font-size: clamp(19px, 2.2vw, 28px); letter-spacing: -.5px; }

.tw-hero.is-sub .tw-hero-sub { font-size: clamp(12.5px, .9vw, 13.5px); }

.tw-hero.is-sub .tw-hero-stats { margin-top: clamp(10px, 1.1vw, 14px); font-size: 12px; }

.tw-hero.is-sub .tw-hero-search { max-width: 520px; margin-top: clamp(13px, 1.4vw, 18px); }

.tw-hero.is-sub .tw-hero-search input { height: 40px; border-radius: 20px; font-size: 13px; padding-left: 42px; }

.tw-hero.is-sub .tw-hero-search svg { top: 12px; }

.tw-hero.is-sub .tw-hchips { margin-top: clamp(12px, 1.3vw, 16px); }

.tw-hero.is-sub .tw-hchip { height: 29px; padding: 0 13px; font-size: 12.5px; border-radius: 15px; }

.tw-empty {
  margin: 40px 0 0; text-align: center; font-size: 13.5px; color: var(--ink-3);
}

/* ---------------- 分类区块 ---------------- */
.tw-cat { margin-top: 26px; }

.tw-cat-h {
  display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px;
  padding-left: 2px;
}

.tw-cat-h h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }

.tw-cat-h span { font-size: 12px; color: var(--ink-3); }

.tw-cat-h .more { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

.tw-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}

/* 工具卡片 */
.tcard {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: .16s ease; position: relative; overflow: hidden;
}

.tcard:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow);  transform: translateY(-2px);
}

.tcard-ico {
  position: relative;
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
}

.tcard-b { min-width: 0; flex: 1; }

.tcard-t {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
}

.tcard-t > span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tcard-d {
  font-size: 12px; color: var(--ink-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tcard-tag {
  flex: 0 0 auto; height: 15px; padding: 0 5px;
  border-radius: 4px; background: var(--brand-soft); color: var(--brand);
  font-size: 10px; line-height: 15px; font-style: normal; font-weight: 400;
}

.tcard-tag.is-out { background: var(--surface-3); color: var(--ink-3); }

.tcard.is-lock .tcard-ico { background: var(--surface-3); color: var(--ink-3); }

/* ---------------- 热门工具榜 ---------------- */
/*
 * 首页 hero 下方的 TOP6。
 * 单独做成一块「面板」：一点暖色渐变 + 大圆角，和下面青灰色的分类网格
 * 明确分层；卡片也从原来的紧凑条改成 3 列大卡，图标和标题都能看清。
 * 固定 3 列（6 个正好两行），不用 auto-fill —— 否则宽屏会排成 4+2 很难看。
 */
.tw-hot { margin-top: 30px; }

.tw-hot-panel {
  position: relative; overflow: hidden;
  padding: 16px 18px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 150, 60, .08), transparent 58%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.tw-hot-h {
  display: flex; align-items: baseline; gap: 9px;
  margin-bottom: 14px; flex-wrap: wrap;
}

.tw-hot-h h2 {
  margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.3px;
}

.tw-hot-sub { font-size: 12.5px; color: var(--ink-3); }

.tw-hot-tip {
  margin-left: auto; font-size: 11.5px; color: var(--ink-3);
}

.tw-hot-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hotcard {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 13px 13px 14px; min-height: 72px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); transition: .16s ease;
  position: relative; min-width: 0;
}

.hotcard:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow); transform: translateY(-2px);
}

/* 名次：圆形徽章，前三名给金银铜，其余静默灰 */
.hotcard-n {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; line-height: 1;
  background: var(--surface-3); color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.hotcard-n.r1 { background: linear-gradient(135deg, #ffd77e, #e8a12a); color: #57390a; }
.hotcard-n.r2 { background: linear-gradient(135deg, #e3e9f2, #a9b6c8); color: #38465a; }
.hotcard-n.r3 { background: linear-gradient(135deg, #f0cfb4, #c08a5c); color: #4d2d12; }

.hotcard-ico {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; overflow: hidden;
}

.hotcard-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hotcard-b { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }

.hotcard-t {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hotcard-t > span, .hotcard-t { min-width: 0; }

.hotcard-badge {
  flex: 0 0 auto; height: 15px; padding: 0 5px; border-radius: 3px;
  background: #fff0e6; color: #e0642c;
  font-size: 10px; line-height: 15px; font-style: normal; font-weight: 400;
}

.hotcard-d {
  font-size: 11.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 右侧竖排：热度条 + 所属分类，分类给小字，起「这工具是干嘛的」提示作用 */
.hotcard-side {
  flex: 0 0 auto; display: flex; flex-direction: column;
  align-items: flex-end; gap: 5px; max-width: 74px;
}

.hotcard-cat {
  display: none;
  font-size: 10.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 74px;
}

/* 热度：三根柱条，亮起根数 = 等级。纯 CSS，不依赖 emoji 字体 */
.hotcard-heat {
  flex: 0 0 auto; display: flex; align-items: flex-end; gap: 2px;
  height: 15px; padding-bottom: 1px;
}

.hotcard-heat i {
  display: block; width: 4px; border-radius: 2px;
  background: var(--surface-3);
  transition: background .15s;
}

.hotcard-heat i:nth-child(1) { height: 7px; }
.hotcard-heat i:nth-child(2) { height: 11px; }
.hotcard-heat i:nth-child(3) { height: 15px; }

.hotcard-heat.h1 i:nth-child(1),
.hotcard-heat.h2 i:nth-child(-n+2),
.hotcard-heat.h3 i {
  background: linear-gradient(180deg, #ffb648, #ff7a45);
}

/* 深色主题下徽章和名次稍微提亮，避免糊在深底上 */
html[data-theme="dark"] .tw-hot-panel {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 150, 60, .07), transparent 58%),
    var(--surface);
}
html[data-theme="dark"] .hotcard { background: var(--surface-2); }
html[data-theme="dark"] .hotcard-badge { background: rgba(255,138,76,.16); color: #ff9d63; }
html[data-theme="dark"] .hotcard-n.r1 { background: linear-gradient(135deg, #f0b95a, #c98a1f); color: #2a1a03; }
html[data-theme="dark"] .hotcard-n.r2 { background: linear-gradient(135deg, #b9c6d8, #7d8b9e); color: #1a2230; }
html[data-theme="dark"] .hotcard-n.r3 { background: linear-gradient(135deg, #d8a97f, #a4703f); color: #2a1708; }

/* 一行六张只有 200px 出头，名次缩成小数字、热度条让位给文字，
   保证工具名和副标题不被截得太狠；宽屏下名次本身就是热度信号 */
@media (min-width: 1181px) {
  .hotcard-n {
    width: 17px; height: 17px; font-size: 10px;
    background: transparent;
  }
  .hotcard-n.r1, .hotcard-n.r2, .hotcard-n.r3 { background: transparent; }
  .hotcard-n.r1 { color: #d99320; }
  .hotcard-n.r2 { color: #8496ad; }
  .hotcard-n.r3 { color: #b97a4b; }
  .hotcard-side { display: none; }
  .hotcard-ico { width: 36px; height: 36px; font-size: 17px; }
  .hotcard { padding: 12px 12px 12px 13px; gap: 9px; min-height: 68px; }
  .hotcard-t { font-size: 13.5px; }
}

/* 六列排不下时（小桌面/平板）退回三列两行，这时卡片有余量，把分类也显示出来 */
@media (max-width: 1180px) {
  .tw-hot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hotcard-n { width: 21px; height: 21px; font-size: 11.5px; background: var(--surface-3); }
  .hotcard { padding: 14px 15px; gap: 11px; min-height: 78px; }
  .hotcard-ico { width: 42px; height: 42px; font-size: 20px; }
  .hotcard-t { font-size: 14.5px; }
  .hotcard-d { font-size: 12.5px; }
  .hotcard-cat { display: block; }
}

@media (max-width: 980px) {
  .tw-hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hotcard { padding: 12px 13px; gap: 10px; }
  .hotcard-ico { width: 38px; height: 38px; font-size: 18px; }
  .hotcard-t { font-size: 13.5px; }
  .hotcard-tip { display: none; }
  .hotcard-side { max-width: 60px; }
  .hotcard-cat { display: none; }
}

@media (max-width: 640px) {
  .tw-hot { margin-top: 22px; }
  .tw-hot-panel { padding: 12px 12px 14px; border-radius: 14px; }
  .tw-hot-h h2 { font-size: 15.5px; }
  .tw-hot-grid { gap: 9px; }
  .hotcard { padding: 10px 10px; gap: 8px; }
  .hotcard-d, .hotcard-cat { display: none; }
  .hotcard-n { width: 19px; height: 19px; font-size: 11px; }
  .hotcard-ico { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
  .hotcard-t { font-size: 13px; }
}


/* ---------------- 内页 ---------------- */
.tw-crumb {
  font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

/* 面包屑每一层都可点：链接用主色可辨，末层当前位置加重不加色 */
.tw-crumb a { color: var(--ink-2); text-decoration: none; transition: color .15s; }
.tw-crumb a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.tw-crumb span { color: var(--ink); font-weight: 500; }

.tw-crumb i { font-style: normal; opacity: .5; }

/* 栏目的「简介」：和副标题不同时在下面补一行 */
.tw-head-desc {
  margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
  max-width: 760px;
}

.tw-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }

.tw-head-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}

/* 栏目的缩略图当图标用：建议 64×64 透明 PNG，这里限制在容器内等比显示 */
.tcard-ico img, .tw-head-ico img {
  width: 100%; height: 100%; object-fit: contain; border-radius: inherit;
}
.tcard-ico img { padding: 5px; }
.tw-head-ico img { padding: 5px; }

.tw-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }

.tw-head p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }

/* 分类切换条 */
.tw-tabs {
  display: flex; gap: 8px; margin: 18px 0 16px;
  overflow-x: auto; padding-bottom: 2px; scrollbar-width: none;
}

.tw-tabs::-webkit-scrollbar { display: none; }

.tw-tab {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: .15s;
  font-family: inherit;
}

.tw-tab:hover { border-color: var(--brand); color: var(--brand); }

.tw-tab.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* 其他工具抽屉 */
.tw-more {
  display: none; margin: -6px 0 16px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}

.tw-more.on { display: block; }

.tw-more-g { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.tw-more-g:last-child { margin-bottom: 0; }

.tw-more-g b {
  flex: 0 0 100%; font-size: 11.5px; font-weight: 500;
  color: var(--ink-3); margin-bottom: 2px;
}

/* 「全部工具」分层视图：一层一个分类 */
.tw-more-layer { margin-bottom: 14px; }
.tw-more-layer:last-child { margin-bottom: 0; }

.tw-more-cat {
  display: flex; align-items: baseline; gap: 7px; margin-bottom: 8px;
  padding-bottom: 5px; border-bottom: 1px dashed var(--line);
}
.tw-more-cat b {
  font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .2px;
}
.tw-more-cat span { font-size: 11px; color: var(--ink-3); }

.tw-more-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.tw-chip {
  font-size: 12.5px; padding: 4px 10px; border-radius: 13px;
  background: var(--surface-3); color: var(--ink-2); transition: .15s;
}

.tw-chip:hover { background: var(--brand-soft); color: var(--brand); }

/* 当前功能：主色文字 + 浅色底，比上面的分类名浅一档，主次分明 */
.tw-chip.on {
  background: var(--brand-soft); color: var(--brand);
  font-weight: 500; box-shadow: inset 0 0 0 1px var(--brand-line);
}

/* ---------------- 面板容器 ---------------- */
.panel-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px 24px 26px; box-shadow: var(--shadow-sm);
  position: relative;
}

.panel-box h2 {
  margin: 0 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -.2px;
}

/* 旧面板原有元素重绘 */
.hint { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 16px; line-height: 1.65; }

.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: var(--r);
  background: var(--surface-2); padding: 26px 20px;
  text-align: center; cursor: pointer; transition: .16s;
  margin-bottom: 16px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand); background: var(--brand-soft);
}

.dropzone .dz-ico { font-size: 26px; line-height: 1; margin-bottom: 8px; }

.dropzone p { margin: 0; font-size: 13px; color: var(--ink-2); }

.options {
  display: flex; flex-wrap: wrap; gap: 14px 18px; margin-bottom: 16px;
}

.options label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12.5px; color: var(--ink-2);
}

.options select, .options input[type=text], .options input[type=number],
.options input[type=date], .options textarea {
  height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-size: 13px; font-family: inherit; outline: none;
  min-width: 120px;
}

.options textarea { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; }

.options select:focus, .options input:focus, .options textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.options input[type=range] { width: 140px; accent-color: var(--brand); }

.options .check { flex-direction: row; align-items: center; gap: 7px; }

.row-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  height: 36px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); font-size: 13px; font-family: inherit;
  cursor: pointer; transition: .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}

.btn:hover { border-color: var(--brand); color: var(--brand); }

.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }

.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }

.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

.progress {
  height: 4px; border-radius: 2px; background: var(--surface-3);
  overflow: hidden; margin: 14px 0; display: none;
}

.progress.on { display: block; }

.progress span {
  display: block; height: 100%; width: 0;
  background: var(--brand); transition: width .25s;
}

.result { font-size: 13px; color: var(--ink-2); line-height: 1.7; }

.result:empty { display: none; }

.result .val { color: var(--ink); font-weight: 500; }

.result a { color: var(--brand); }

/* 子标签 */
.sub-tabs { display: flex; gap: 4px; margin-bottom: 16px; background: var(--surface-3); padding: 4px; border-radius: 9px; width: fit-content; }

.sub-tab {
  height: 30px; padding: 0 14px; border-radius: 6px; border: 0;
  background: transparent; color: var(--ink-2); font-size: 12.5px;
  cursor: pointer; font-family: inherit; transition: .15s;
}

.sub-tab.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); font-weight: 500; }

.sub-panel { display: none; }

.sub-panel.on { display: block; }

/* 组织架构图等专用 */
.org-io { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.org-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-3); }

.org-chart { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: var(--surface-2); }

.org-chart img { display: block; margin: 0 auto; max-width: none; }

.org-input-col textarea { width: 100%; min-height: 300px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7; outline: none; }

.org-tip { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

.canvas-wrap { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; background: var(--surface-2); text-align: center; }

.iw-preview canvas { max-width: 100%; }

/* 次数锁定层 */
.tw-lock {
  position: absolute; inset: 0; z-index: 5;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(3px);
  border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 30px;
}

.tw-lock.static {
  position: static; inset: auto; background: none; backdrop-filter: none;
  padding: 46px 24px 50px; border-radius: 14px;
}

.tw-lock .ico { font-size: 26px; }

.tw-lock h3 { margin: 0; font-size: 15px; font-weight: 600; }

.tw-lock p { margin: 0; font-size: 13px; color: var(--ink-2); max-width: 340px; }

.tw-lock .ops { display: flex; gap: 10px; margin-top: 6px; }

/* ---------------- 页脚 ---------------- */
.tw-foot {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 22px 20px 30px; text-align: center;
  font-size: 12px; color: var(--ink-3); line-height: 1.8;
}
.tw-legal {
  max-width: 880px; margin: 16px auto 0; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2, #fafbfc);
  text-align: left; font-size: 11.5px; line-height: 1.85; color: var(--ink-3);
}
.tw-legal p { margin: 0 0 6px; }
.tw-legal p:last-child { margin-bottom: 0; }
.tw-legal b { color: var(--ink-2); font-weight: 600; }
.tw-legal p:first-child b:first-child {
  display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 5px;
  background: #fff3d6; color: #8a6414; font-size: 11px;
}
[data-theme="dark"] .tw-legal { background: rgba(255,255,255,.03); }
[data-theme="dark"] .tw-legal p:first-child b:first-child { background: rgba(224,185,104,.16); color: #e0b968; }

/* ---------------- 提示条 ---------------- */
.tw-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: var(--bg); font-size: 13px;
  padding: 9px 18px; border-radius: 20px; opacity: 0; pointer-events: none;
  transition: .2s; z-index: 999; max-width: 82vw; text-align: center;
}

.tw-toast.on { opacity: .96; transform: translateX(-50%) translateY(0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .tw-top-in, .tw-main { width: 100%; }
  .tw-top-in { height: 54px; padding: 0 14px; gap: 10px; }
  .tw-logo span { display: none; }
  .tw-search { max-width: none; }
  .tw-status { display: none; }
  .tw-main { padding: 18px 14px 50px; }
  .tw-hero { padding: 16px 0 20px; }
  .tw-hero h1 { font-size: 21px; }
  .tw-hero.is-sub { padding: 13px 0 16px; }
  .tw-hero.is-sub h1 { font-size: 18.5px; }
  .tw-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .tcard { padding: 11px 12px; gap: 9px; }
  .tcard-ico { width: 30px; height: 30px; font-size: 14px; }
  .tcard-t { font-size: 13px; }
  .tcard-d { font-size: 11.5px; }
  .panel-box { padding: 16px 14px 20px; border-radius: var(--r); }
  .org-io { grid-template-columns: 1fr; }
  .options { gap: 10px 12px; }
  .options label { width: 100%; }
  .options select, .options input[type=text], .options input[type=number] { width: 100%; }
}

/* 小屏手机：两列排布时标题可用两行，避免"PDF 转…"这种截断 */
@media (max-width: 480px) {
  .tw-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tcard { padding: 10px; gap: 8px; align-items: flex-start; }
  .tcard-t { align-items: flex-start; }
  .tcard-t > span {
    white-space: normal; overflow: visible; text-overflow: clip;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.28; word-break: break-word;
  }
  .tcard-tag { margin-top: 1px; }
}

/* 兼容旧组件的 toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: var(--bg); font-size: 13px;
  padding: 9px 18px; border-radius: 20px; opacity: 0; pointer-events: none;
  transition: .2s; z-index: 9999; max-width: 82vw; text-align: center;
}
.toast.on { opacity: .96; transform: translateX(-50%) translateY(0); }

/* ============================================================
   宽度自适应：不用固定 max-width，按视口比例收放
   超宽屏 88% / 常规 92% / 窄屏 94% / 手机 100%
   ============================================================ */
@media (min-width: 1600px) {
  .tw-top-in, .tw-main { width: 88%; }
  .tw-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

@media (max-width: 1200px) {
  .tw-top-in, .tw-main { width: 94%; }
}

@media (max-width: 900px) {
  .tw-top-in, .tw-main { width: 96%; }
  .tw-search { max-width: 260px; }
  /* 顶栏变窄：只留时间，地区天气收起来 */
  .tw-env-c, .tw-env-w, .tw-env-dot { display: none !important; }
}

@media (max-width: 1024px) {
  .tw-env-w { display: none !important; }
}

@media (max-width: 720px) {
  /* 手机屏：顶栏只保留 logo 与账号按钮；注册入口在登录弹层里 */
  .tw-env { display: none; }
  #tw-reg { display: none !important; }
  .tw-hero { padding: 24px 0 20px; }
  .tw-hero h1 { font-size: 23px; }
  .tw-hero.is-sub { padding: 17px 0 15px; }
  .tw-hero.is-sub h1 { font-size: 19px; }
  .tw-hero-sub { font-size: 13px; }
  .tw-hero-stats { gap: 14px; margin-top: 14px; font-size: 12px; }
  .tw-hero-search { margin-top: 18px; }
  .tw-hero-search input { height: 42px; border-radius: 21px; font-size: 13.5px; padding-left: 42px; }
  .tw-hero-search svg { top: 13px; left: 15px; }
  .tw-hchips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .tw-hchip { flex: 0 0 auto; }
  .tw-userbar { padding: 2px; }
}

/* ============================================================
   账号：顶栏按钮 / 登录弹层 / 我的面板
   ============================================================ */

.tw-user {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 17px;
  border: 1px solid var(--brand-line); background: var(--brand);
  color: #fff; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: .16s; white-space: nowrap;
}
.tw-user:hover { background: var(--brand-2); }
.tw-user.is-in {
  background: var(--surface); color: var(--ink); border-color: var(--line-2); font-weight: 400;
}
.tw-user.is-in:hover { border-color: var(--brand-line); color: var(--brand); }
.tw-user .ava {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
}
.tw-user .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none;
}

/* ---------------- 弹层 ---------------- */
.tw-modal { position: fixed; inset: 0; z-index: 9998; display: none; }
.tw-modal.on { display: block; }
.tw-modal-mask {
  position: absolute; inset: 0; background: rgba(16, 24, 38, .38);
  backdrop-filter: blur(2px); animation: twFade .16s ease;
}
@keyframes twFade { from { opacity: 0; } to { opacity: 1; } }

.tw-modal-box {
  position: relative; width: 380px; max-width: calc(100vw - 28px);
  margin: 9vh auto 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(16, 24, 38, .22);
  padding: 22px 22px 20px; animation: twUp .18s ease;
  max-height: 84vh; overflow-y: auto;
}
@keyframes twUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tw-modal-x {
  position: absolute; top: 12px; right: 12px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; background: var(--surface-3); color: var(--ink-3);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.tw-modal-x:hover { background: var(--line); color: var(--ink); }

.tw-mh { margin: 0 0 4px; font-size: 17px; font-weight: 600; text-align: center; }
.tw-mp { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-3); text-align: center; }


/* 表单 */
.tw-field { margin-bottom: 11px; }
.tw-field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.tw-field input {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface-2); color: var(--ink); font-size: 13.5px; outline: none;
  transition: .14s;
}
.tw-field input:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.tw-field input::placeholder { color: var(--ink-3); }

.tw-submit {
  width: 100%; height: 40px; margin-top: 4px; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: .16s;
}
.tw-submit:hover { background: var(--brand-2); }
.tw-submit:disabled { opacity: .6; cursor: default; }

.tw-msg { min-height: 17px; margin: 9px 0 0; font-size: 12.5px; color: var(--danger); text-align: center; }
.tw-msg.ok { color: var(--ok); }

.tw-alt { margin-top: 13px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.tw-alt a { color: var(--brand); cursor: pointer; text-decoration: none; }
.tw-alt a:hover { text-decoration: underline; }

/* 我的面板 */
.tw-acc {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 12px; background: var(--surface-3); margin-bottom: 14px;
}
.tw-acc .big {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600;
}
.tw-acc h4 { margin: 0 0 2px; font-size: 14.5px; font-weight: 600; }
.tw-acc span { font-size: 12px; color: var(--ink-2); }

.tw-vipbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 13px; border-radius: 10px; margin-bottom: 14px;
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  font-size: 12.5px; color: var(--brand);
}
.tw-vipbar b { font-weight: 600; }
.tw-vipbar.is-free { background: var(--surface-3); border-color: var(--line); color: var(--ink-2); }


.tw-note {
  font-size: 11.5px; color: var(--ink-3); line-height: 1.65;
  margin: 12px 0 0; text-align: center;
}

.tw-linkbtn {
  width: 100%; height: 34px; margin-top: 6px; border: 1px solid var(--line-2);
  border-radius: 9px; background: transparent; color: var(--ink-2);
  font-size: 12.5px; cursor: pointer;
}
.tw-linkbtn:hover { border-color: var(--danger); color: var(--danger); }

@media (max-width: 640px) {
  /* 未登录时两个按钮都要看得见文字，只压缩内边距 */
  .tw-user { padding: 0 11px; font-size: 12.5px; height: 32px; }
  /* 已登录后昵称太长会挤爆顶栏，只留头像 + 在线点 */
  .tw-user.is-in .txt { display: none; }
  .tw-user.is-in { padding: 0 9px; }
  .tw-user .ava { width: 20px; height: 20px; font-size: 11px; }
  .tw-modal-box { margin-top: 6vh; padding: 18px 16px 16px; }
}


/* ---------------- 注册 / 改密：验证码行 ---------------- */
.tw-inline { display: flex; gap: 8px; }
.tw-inline input { flex: 1; min-width: 0; }
.tw-codebtn {
  flex: 0 0 auto; height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand);
  font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: .14s;
}
.tw-codebtn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.tw-codebtn:disabled { opacity: .6; cursor: default; background: var(--surface-3); color: var(--ink-3); border-color: var(--line-2); }

.tw-row2 { display: flex; gap: 8px; margin-top: 6px; }
.tw-row2 .tw-linkbtn { margin-top: 0; }

/* 我的账号：三个快捷入口 */
.tw-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.tw-quick a {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 11px 4px; border-radius: 10px; text-decoration: none;
  background: var(--surface-3); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 12px; transition: .14s;
}
.tw-quick a:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); }
.tw-quick i { font-style: normal; font-size: 17px; line-height: 1; }
.tw-quick span { white-space: nowrap; }

.tw-linkbtn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* 顶栏次要按钮（注册） */
.tw-user.ghost {
  background: var(--surface); color: var(--ink-2); border-color: var(--line-2); font-weight: 400;
}
.tw-user.ghost:hover { border-color: var(--brand-line); color: var(--brand); }

/* 顶栏 a 标签按钮（需求反馈） */
a.tw-user { text-decoration: none; }

/* ---------------- 需求反馈页 ---------------- */
.fb-form { display: flex; flex-direction: column; gap: 15px; max-width: 720px; }
.fb-row { display: flex; flex-direction: column; gap: 7px; }
.fb-row > span { font-size: 12.5px; color: var(--ink-2); }
.fb-row input, .fb-row textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13.5px;
  padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); outline: none; transition: .15s;
}
.fb-row textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.fb-row input:focus, .fb-row textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.fb-cap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-cap .q {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: var(--surface-2); border: 1px dashed var(--line-2);
  border-radius: var(--r-sm); padding: 7px 13px; font-size: 14px; letter-spacing: 2px;
  color: var(--ink); font-weight: 600;
}
.fb-cap input { width: 120px; }
.fb-tip { font-size: 12.5px; color: var(--ink-3); }
.fb-err {
  background: #fff1f0; border: 1px solid #ffccc7; color: #cf1322;
  border-radius: var(--r-sm); padding: 9px 12px; font-size: 13px;
}
.fb-ok {
  background: #f0f9f4; border: 1px solid #b7e4c9; color: #18a058;
  border-radius: var(--r-sm); padding: 9px 12px; font-size: 13px;
}

/* ============================================================
   会员 / 充值 / 定价（P0 商业闭环）
   ============================================================ */

.btn.wide { width: 100%; justify-content: center; }

/* 提示条 */
.vip-toast {
  margin: 0 0 16px; padding: 11px 15px; border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.7;
}
.vip-toast.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent); color: var(--ok); }
.vip-toast.err { background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent); color: var(--danger); }

/* 当前状态卡 */
.vip-status {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--brand-soft), var(--surface));
  border: 1px solid var(--brand-line);
}
.vip-status-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.vip-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--brand-line);
  font-size: 18px; color: var(--brand); font-weight: 600;
}
.vip-status-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vip-status-txt b { font-size: 15.5px; color: var(--ink); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.vip-status-txt span { font-size: 12.5px; color: var(--ink-2); }
.vip-badge {
  font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 4px; color: #fff;
  background: linear-gradient(135deg, #ffb020, #ff7a00);
}
.vip-status-side { display: flex; align-items: center; gap: 14px; flex: none; }
.vip-pt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.vip-pt em { font-style: normal; font-size: 22px; font-weight: 700; color: var(--brand); }
.vip-pt span { font-size: 11.5px; color: var(--ink-3); }

/* 区块标题 */
.vip-h2 { margin: 30px 0 4px; font-size: 17px; font-weight: 650; color: var(--ink); }
.vip-h2sub { margin: 0 0 15px; font-size: 12.5px; color: var(--ink-3); }
.vip-tip { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
.vip-tip a { color: var(--brand); }

/* 充值页套餐角标（复用在 .pt-card 上） */
.plan-badge {
  position: absolute; top: -9px; left: 16px;
  padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 500;
  color: #fff; background: linear-gradient(135deg, #ff8a3d, #ff5a2b);
}


/* 对比表 */
.cmp-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.cmp th, .cmp td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.cmp th { background: var(--surface-3); font-weight: 500; color: var(--ink-2); font-size: 12.5px; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td { color: var(--ink-2); }
.cmp .vip-col { background: color-mix(in srgb, var(--brand) 5%, transparent); color: var(--ink); }
.cmp .vip-col b { color: var(--brand); }

/* 订单 */
.vip-orders { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.vip-order {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 15px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.vip-order:last-child { border-bottom: 0; }
.vip-order b { font-weight: 550; color: var(--ink); margin-right: 8px; }
.vip-order .muted { color: var(--ink-3); font-size: 12px; }
.vip-order-r { display: flex; align-items: center; gap: 10px; flex: none; font-size: 12.5px; color: var(--ink-2); }
.ost { font-style: normal; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; }
.ost.st0 { background: var(--surface-3); color: var(--ink-3); }
.ost.st1 { background: color-mix(in srgb, var(--warn) 13%, transparent); color: var(--warn); }
.ost.st2 { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.ost.st3 { background: var(--surface-3); color: var(--ink-3); }
.ost.st4 { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }

/* 支付面板 */
.pay-panel {
  margin: 18px 0 4px; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.pay-panel h3 { margin: 0 0 16px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.pay-amount {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface-3);
}
.pay-amount span { font-size: 12.5px; color: var(--ink-3); }
.pay-amount em { font-style: normal; font-size: 26px; font-weight: 700; color: var(--danger); }
.pay-amount i { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.pay-mark {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; font-size: 13px;
}
.pay-mark span { color: var(--ink-3); font-size: 12.5px; }
.pay-mark b {
  font-family: Consolas, monospace; font-size: 17px; letter-spacing: 2px;
  padding: 3px 10px; border-radius: 6px; color: var(--brand);
  background: var(--brand-soft); border: 1px dashed var(--brand-line);
}
.pay-mark small { color: var(--ink-3); font-size: 11.5px; }
.pay-qrs { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.pay-qr { text-align: center; }
.pay-qr h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.pay-qr img {
  width: 168px; height: 168px; object-fit: contain;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff; padding: 6px;
}
.pay-noqr {
  width: 168px; height: 168px; border-radius: var(--r-sm);
  border: 1px dashed var(--line-2); background: var(--surface-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--ink-3); line-height: 1.7;
}
.pay-note { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); }
.pay-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pay-link { color: var(--brand); font-size: 12.5px; }

/* 积分包 */
.pt-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.pt-card {
  position: relative; padding: 18px 16px 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
}
.pt-card.hot { border-color: var(--brand-line); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 60%); }
.pt-amount { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.5px; }
.pt-points { margin-top: 5px; font-size: 12.5px; color: var(--ink-2); }
.pt-points b { font-size: 17px; color: var(--brand); margin-right: 3px; }
.pt-give { margin: 6px 0 14px; font-size: 11.5px; color: var(--warn); min-height: 16px; }
.pt-give.muted { color: var(--ink-3); }

@media (max-width: 720px) {
  .vip-status { flex-direction: column; align-items: flex-start; gap: 12px; }
  .vip-status-side { width: 100%; justify-content: space-between; }
  .vip-order { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pay-panel { padding: 16px 14px; }
  .pay-qrs { gap: 12px; }
  .pay-qr img, .pay-noqr { width: 140px; height: 140px; }
}


/* 工具页额度提示条 */
.tool-quota {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px 0 0; padding: 9px 14px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap;
}
.tool-quota.is-unlim { background: color-mix(in srgb, var(--ok) 7%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.tq-l { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tq-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.tq-dot.ok { background: var(--ok); }
.tool-quota b { color: var(--brand); font-weight: 600; font-size: 13.5px; }
.tq-link { color: var(--brand); text-decoration: none; border-bottom: 1px dashed var(--brand-line); }
.tq-link:hover { border-bottom-style: solid; }
.tq-r { color: var(--ink-3); font-size: 11.5px; }

@media (max-width: 720px) {
  .tool-quota { font-size: 12px; padding: 8px 11px; }
  .tq-r { display: none; }
}

/* ============ 三档会员（黄金 / 钻石 / 黑金） ============ */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 8px;
}
.tier-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
}
.tier-card.mine { border-color: var(--brand); box-shadow: 0 6px 22px color-mix(in srgb, var(--brand) 12%, transparent); }
.tier-head { padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.tier-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 2px; }
.tier-head h3 { display: inline; margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.tier-mine {
  float: right; font-style: normal; font-size: 11px; line-height: 18px;
  padding: 0 7px; border-radius: 9px; color: #fff; background: var(--brand);
}
.tier-head p { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.55; }

.tier-plans { list-style: none; margin: 6px 0 0; padding: 0; }
.tier-plans li {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.tier-plans li:last-child { border-bottom: 0; }
.tp-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tp-l b { font-size: 13px; font-weight: 500; color: var(--ink); }
.tp-l span { font-size: 11px; color: var(--ink-3); }
.tp-m { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.tp-m em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--brand); }
.tp-m span { font-size: 11px; color: var(--ink-3); }
.tp-a { display: flex; gap: 6px; }
.tp-a form { margin: 0; }

@media (max-width: 980px) {
  .tier-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   积分商城 /shop/
   ============================================================ */

/* 分类筛选 */
.shop-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 16px; }
.shop-tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13px; color: var(--ink-2); text-decoration: none;
}
.shop-tab i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.shop-tab:hover { border-color: var(--brand-line); color: var(--brand); }
.shop-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.shop-tab.on i { color: rgba(255, 255, 255, .75); }

/* 商品网格 */
.shop-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
}
.shop-card {
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.shop-card:hover { border-color: var(--brand-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.shop-card.soldout { opacity: .62; }
.shop-card-cover {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 132px; background: var(--surface-3); overflow: hidden;
  text-decoration: none;
}
.shop-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-card-cover.plain span {
  font-size: 40px; font-weight: 700; color: var(--brand);
  opacity: .35; letter-spacing: 2px;
}
.shop-flag {
  position: absolute; top: 8px; right: 8px;
  font-style: normal; font-size: 11px; line-height: 18px; padding: 0 7px;
  border-radius: 4px; background: #3b3f47; color: #fff; opacity: .88;
}
.shop-flag.lv { background: var(--brand); opacity: 1; }
.shop-card-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-card-name {
  font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none;
  line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-name:hover { color: var(--brand); }
.shop-card-intro {
  margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 6px; }
.shop-card-price { display: flex; align-items: baseline; gap: 4px; }
.shop-card-price em { font-style: normal; font-size: 17px; font-weight: 700; color: var(--brand); }
.shop-card-price i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.shop-card-price del { font-size: 11.5px; color: var(--ink-3); }
.shop-card-type { font-size: 11px; color: var(--ink-3); background: var(--surface-3); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }

/* 空态 */
.shop-empty {
  margin: 22px 0; padding: 44px 20px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r);
}
.shop-empty > div { font-size: 36px; line-height: 1; margin-bottom: 10px; }
.shop-empty p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.9; }

/* 详情 */
.shop-detail {
  display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 22px;
  margin-top: 20px; align-items: start;
}
.shop-detail-l { min-width: 0; }
.shop-cover {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 260px; border-radius: var(--r); overflow: hidden;
  background: var(--surface-3); border: 1px solid var(--line);
}
.shop-cover img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.shop-cover.plain span { font-size: 64px; font-weight: 700; color: var(--brand); opacity: .45; line-height: 1; }
.shop-cover.plain em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.shop-body { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); line-height: 2; }
.shop-body p { margin: 0 0 6px; }
.shop-body p:empty { display: none; }

/* 无富文本详情时的「购买须知」 */
.shop-brief {
  padding: 18px 20px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line-2);
}
.shop-brief h2 { margin: 0 0 10px; font-size: 14.5px; color: var(--ink); }
.shop-brief ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.shop-brief li { display: flex; gap: 12px; line-height: 1.75; }
.shop-brief li b {
  flex: 0 0 72px; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.shop-brief li span { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .shop-brief li { flex-direction: column; gap: 2px; }
  .shop-brief li b { flex: none; }
}

.shop-detail-r {
  position: sticky; top: 16px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 20px 18px; box-shadow: var(--shadow-sm);
}
.shop-name { margin: 0 0 6px; font-size: 17px; font-weight: 650; color: var(--ink); line-height: 1.45; }
.shop-intro { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.shop-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.shop-price em { font-style: normal; font-size: 28px; font-weight: 700; color: var(--brand); line-height: 1; }
.shop-price i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.shop-price del { font-size: 12.5px; color: var(--ink-3); }
.shop-off { font-size: 11px; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-radius: 4px; padding: 2px 6px; }

.shop-meta { list-style: none; margin: 14px 0 16px; padding: 0; }
.shop-meta li { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 5px 0; }
.shop-meta span { color: var(--ink-3); }
.shop-meta b { color: var(--ink); font-weight: 500; }

.shop-hint { font-size: 12.5px; line-height: 1.7; padding: 10px 12px; border-radius: var(--r-sm); margin-bottom: 12px; }
.shop-hint.ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); color: var(--ok); }
.shop-hint.warn { background: color-mix(in srgb, var(--warn) 11%, var(--surface)); color: var(--warn); }
.shop-hint a { color: inherit; text-decoration: underline; }
.shop-fine { margin: 16px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.8; }

/* 购买结果 */
.shop-done {
  margin: 18px 0 4px; border-radius: var(--r); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
}
.shop-done-t { padding: 12px 18px; font-size: 14px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.shop-done-body { padding: 14px 18px 18px; font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.shop-done-body p { margin: 0; }
.shop-done-body .muted { color: var(--ink-3); font-size: 12px; }
.shop-code {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px dashed var(--line-2);
  display: flex; flex-direction: column; gap: 6px;
}
.shop-code span { font-size: 11.5px; color: var(--ink-3); }
.shop-code b {
  font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: 1px;
  line-height: 1.55;
  /* 卡密按连字符换行，别在字符中间断开 */
  word-break: normal; overflow-wrap: anywhere;
}
.shop-code .uc-copy { align-self: flex-start; margin-left: 0; }
.shop-code small { font-size: 11.5px; color: var(--warn); }

/* 三步说明 */
.shop-steps { margin-top: 34px; }
.shop-step-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.shop-step {
  position: relative; padding: 16px 16px 16px 52px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.shop-step b {
  position: absolute; left: 16px; top: 16px;
  width: 24px; height: 24px; line-height: 24px; text-align: center;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600;
}
.shop-step h4 { margin: 0 0 5px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.shop-step p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.75; }

@media (max-width: 980px) {
  .shop-detail { grid-template-columns: 1fr; }
  .shop-detail-r { position: static; }
  .shop-cover { height: 200px; }
}

/* 工具卡角标：完全免费 / 新功能 */
.tcard-flag {
  position: absolute; top: 0; right: 0;
  font-style: normal; font-size: 10.5px; line-height: 16px;
  padding: 0 7px; border-bottom-left-radius: 8px; letter-spacing: .2px;
}
.tcard-flag.free { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.tcard-flag.new { background: var(--brand-soft); color: var(--brand); }

/* 额度条上的「新功能」小标签 */
.tq-flag {
  font-style: normal; font-size: 10.5px; line-height: 16px;
  padding: 0 6px; border-radius: 4px; margin-left: 2px;
  background: var(--brand-soft); color: var(--brand);
}

/* ============================================================
   彩色页面横幅（商城 / 会员中心 / 反馈）
   ============================================================ */
.pg-band {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: 18px 0 16px; padding: 30px 34px; border-radius: 18px;
  background: linear-gradient(120deg, var(--g1, #4f46e5), var(--g2, #a855f7));
  color: #fff; box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--g1, #4f46e5) 70%, transparent);
}
.pg-band::after {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .28), transparent 68%);
  pointer-events: none;
}
.pg-band-txt { position: relative; z-index: 1; min-width: 0; }
.pg-band h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: .3px; color: #fff; }
.pg-band-sub { margin: 0 0 6px; font-size: 13.5px; color: rgba(255, 255, 255, .92); }
.pg-band-desc { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .76); line-height: 1.8; }
.pg-band-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pg-band-chips span {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .9);
  backdrop-filter: blur(4px);
}
.pg-band-chips b { font-size: 15px; font-weight: 700; color: #fff; }
.pg-band-ico {
  position: relative; z-index: 1; flex: none;
  font-size: 64px; line-height: 1; opacity: .92;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .18));
}
@media (max-width: 720px) {
  .pg-band { padding: 22px 20px; border-radius: 14px; }
  .pg-band h1 { font-size: 21px; }
  .pg-band-ico { font-size: 44px; }
}

/* ---------- 商城：积分条 ---------- */
.shop-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; margin-bottom: 4px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.shop-bar-l { display: flex; align-items: center; gap: 12px; }
.shop-bar-ico {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: linear-gradient(135deg, #eef4ff, #f6efff); border: 1px solid var(--line);
}
.shop-bar-l b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.shop-bar-l b em { font-style: normal; font-size: 19px; color: #f0407a; margin-left: 4px; }
.shop-bar-l span { font-size: 12px; color: var(--ink-3); }
.shop-bar-r { display: flex; gap: 8px; }

/* ---------- 商城：分类胶囊（带渐变） ---------- */
.shop-tab { height: 34px; padding: 0 16px; font-size: 13px; border-radius: 999px; }
.shop-tab.on {
  background: linear-gradient(120deg, var(--g1, #4f46e5), var(--g2, #a855f7));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--g1, #4f46e5) 80%, transparent);
}
.shop-tab:not(.on):hover { background: var(--brand-soft); }

/* ---------- 商城：排序条 ---------- */
.shop-sort {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 0 12px; flex-wrap: wrap;
}
.shop-sort-l { display: flex; gap: 6px; flex-wrap: wrap; }
.shop-sort-a {
  font-size: 12.5px; color: var(--ink-2); padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
}
.shop-sort-a:hover { color: var(--brand); border-color: var(--brand-line); }
.shop-sort-a.on { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); font-weight: 600; }
.shop-sort-n { font-size: 12px; color: var(--ink-3); }

/* ---------- 商城：卡片封面改成彩色块 ---------- */
.shop-card { border-radius: 14px; }
.shop-card-cover {
  height: 128px; padding: 14px 16px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 3px;
  background: linear-gradient(135deg, var(--g1, #4f46e5), var(--g2, #a855f7));
  position: relative;
}
.shop-card-cover.plain b {
  font-size: 15px; font-weight: 700; color: #fff; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .18);
}
.shop-card-cover.plain span { font-size: 11.5px; color: rgba(255, 255, 255, .82); }
.shop-card-cover.plain::after {
  content: ""; position: absolute; right: -18px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .35), transparent 70%);
}
.shop-card-cover img { height: 100%; width: 100%; object-fit: cover; border-radius: 8px; }
.shop-card-name { font-size: 13.5px; }
.shop-card-price em { color: #f0407a; }
.shop-card-disc {
  font-style: normal; font-size: 11px; line-height: 18px; padding: 0 7px;
  border-radius: 4px; color: #e0407a;
  background: color-mix(in srgb, #e0407a 10%, var(--surface));
}
.shop-card:hover { transform: translateY(-3px); }

/* 封面里的长标题：限宽换行，避免 flex-start 下宽度按 max-content 撑出后被裁掉半行 */
.shop-card-cover { overflow: hidden; }
.shop-card-cover.plain b { width: 100%; max-width: 100%; }
.shop-card-cover.plain span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 详情页彩色封面 */
.shop-cover.plain {
  background: linear-gradient(135deg, var(--g1, #4f46e5), var(--g2, #a855f7));
  border: 0;
  position: relative;
}
.shop-cover.plain span { color: rgba(255, 255, 255, .9); opacity: 1; font-size: 64px; }
.shop-cover.plain em { color: rgba(255, 255, 255, .8); font-size: 13px; }
/* 无封面时的信息角标，避免大色块太空 */
.shop-cover-pts {
  position: absolute; top: 14px; left: 14px;
  font-size: 12px; font-weight: 600; line-height: 26px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .92); color: #4f46e5;
}
.shop-cover-tag {
  position: absolute; bottom: 14px; right: 14px;
  font-style: normal; font-size: 11.5px; line-height: 24px; padding: 0 11px;
  border-radius: 999px; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35); color: #fff;
}

/* 详情正文（现在是编辑器里的 HTML） */
.shop-rich { font-size: 13.5px; line-height: 1.95; color: var(--ink-2); }
.shop-rich p { margin: 0 0 8px; }
.shop-rich img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.shop-rich ul, .shop-rich ol { margin: 0 0 8px; padding-left: 20px; }

/* ============================================================
   会员开通 /vip/ 视觉升级（金色 / 蓝钻 / 黑金）
   ============================================================ */
.vip-sec-h { margin: 34px 0 12px; text-align: center; }
.vip-sec-h .vip-h2 { margin-bottom: 4px; }
.vip-sec-h .vip-h2sub a { color: var(--brand); }

.tier-card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 0 0 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tier-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--t1) 35%, var(--line-2)); }
.tier-card.mine { border-color: var(--t1); box-shadow: 0 10px 30px -16px color-mix(in srgb, var(--t1) 70%, transparent); }

.tier-head {
  padding: 18px 16px 14px;
  border-bottom: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--t1) 12%, var(--surface)), color-mix(in srgb, var(--t2) 16%, var(--surface)));
  border-top: 3px solid var(--t1);
}
.tier-headtop { display: flex; align-items: center; gap: 8px; }
.tier-ico { font-size: 20px; line-height: 1; }
.tier-head h3 { display: inline; margin: 0; font-size: 16px; font-weight: 700; color: color-mix(in srgb, var(--t1) 78%, #10203a); }
.tier-card.tier-black .tier-head h3 { color: #2b2b33; }
.tier-mine {
  float: none; margin-left: auto; font-style: normal; font-size: 11px; line-height: 19px;
  padding: 0 9px; border-radius: 10px; color: #fff;
  background: var(--t1);
}
.tier-head p { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.tier-rights { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tier-rights li {
  font-size: 11.5px; line-height: 20px; padding: 0 8px; border-radius: 4px;
  color: color-mix(in srgb, var(--t1) 80%, #1a2434);
  background: color-mix(in srgb, var(--t1) 9%, var(--surface));
}

.tier-card .tier-plans { margin: 6px 12px 0; }
.tier-card .tier-plans li { padding: 11px 4px; }
.tier-card .tp-m em { color: color-mix(in srgb, var(--t1) 82%, #16233a); }

/* 开通 CTA */
.vip-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 26px 0 6px; padding: 26px 30px; border-radius: 16px;
  background: linear-gradient(120deg, #1e2a4a, #33436e 65%, #4a3a6e);
  color: #fff; box-shadow: 0 16px 36px -22px rgba(30, 42, 74, .9);
  flex-wrap: wrap;
}
.vip-cta-txt b { display: block; font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.vip-cta-txt span { font-size: 12.5px; color: rgba(255, 255, 255, .72); line-height: 1.7; }
.vip-cta-act { display: flex; gap: 10px; }
.vip-cta .btn.primary { background: #ffb020; border-color: #ffb020; color: #2a1c00; font-weight: 600; }
.vip-cta .btn.primary:hover { background: #ffc04d; border-color: #ffc04d; }
.vip-cta .btn.ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .26); color: #fff; }

/* 权益卡片 */
.benefit-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}
.benefit {
  position: relative; padding: 16px 16px 15px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, border-color .16s;
}
.benefit:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 40%, var(--line-2)); }
.benefit-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; font-size: 17px; margin-bottom: 9px;
  background: color-mix(in srgb, var(--c) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}
.benefit b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.benefit p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.7; }

.vip-avatar.lv-gold { background: linear-gradient(135deg, #f6d074, #d9a223); color: #59400a; }
.vip-avatar.lv-diamond { background: linear-gradient(135deg, #dfe6ef, #8b98a8); color: #2c3b4a; }
.vip-avatar.lv-black { background: linear-gradient(135deg, #4a4a55, #23232b); color: #f0d49a; }

/* ============================================================
   会员中心 /account/
   ============================================================ */
.acc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 4px 0 8px; }
.acc-card {
  position: relative; overflow: hidden; display: block;
  padding: 22px 20px 18px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 14px 30px -20px color-mix(in srgb, var(--g1) 80%, transparent);
  transition: transform .16s, box-shadow .16s;
}
.acc-card::after {
  content: ""; position: absolute; right: -26px; bottom: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .3), transparent 70%);
}
.acc-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -20px color-mix(in srgb, var(--g1) 90%, transparent); }
.acc-ico { font-size: 26px; line-height: 1; display: block; margin-bottom: 10px; }
.acc-card b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.acc-card p { margin: 0; font-size: 12px; color: rgba(255, 255, 255, .82); line-height: 1.6; min-height: 38px; }
.acc-go { display: inline-block; margin-top: 10px; font-size: 12px; color: rgba(255, 255, 255, .92); }

.acc-login {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 18px 0; padding: 20px 24px; border-radius: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px dashed var(--line-2);
}
.acc-login b { display: block; font-size: 14px; margin-bottom: 4px; }
.acc-login span { font-size: 12.5px; color: var(--ink-3); }

.acc-sec { margin-top: 26px; }
.acc-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.acc-sec-h h2 { margin: 0; font-size: 16px; font-weight: 650; color: var(--ink); }
.acc-sec-h a { font-size: 12.5px; color: var(--brand); }

.acc-assets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.acc-asset {
  padding: 15px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
}
.acc-asset span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.acc-asset em { display: block; font-style: normal; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.acc-asset a { font-size: 12px; color: var(--brand); }
.c-pink { color: #f0407a; }
.c-ink { color: var(--ink); }
.c-gold { color: #c08b13; }
.c-diamond { color: #5a6b7d; }
.c-black { color: #2b2b33; }
.c-free { color: var(--ink-2); font-size: 16px; }

.acc-orders { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.acc-row:last-child { border-bottom: 0; }
.acc-row-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc-dot { flex: none; font-size: 11px; line-height: 20px; padding: 0 8px; border-radius: 10px; }
.acc-dot.vip { background: color-mix(in srgb, #7c3aed 12%, var(--surface)); color: #6d28d9; }
.acc-dot.goods { background: color-mix(in srgb, #0ea5a4 12%, var(--surface)); color: #0d8b8a; }
.acc-row-l b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.acc-row-l i { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.acc-row-r { text-align: right; flex: none; }
.acc-row-r b { display: block; font-size: 13px; color: var(--ink); }
.acc-empty { padding: 26px 16px; text-align: center; font-size: 13px; color: var(--ink-3); }
.acc-empty a { color: var(--brand); }

.acc-rights { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-right {
  font-size: 12.5px; line-height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
}

/* 等级对比 */
.acc-tiers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.acc-tier {
  position: relative; padding: 16px 16px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm); border-top: 3px solid var(--tc);
  display: flex; flex-direction: column;
}
.acc-tier.is-on { box-shadow: 0 6px 22px rgba(60, 90, 200, .14); }
.acc-tier-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.acc-tier-h b { font-size: 14px; font-weight: 650; color: var(--tc); }
.acc-tier-h em {
  font-style: normal; font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 5px;
  background: var(--tc); color: #fff;
}
.acc-tier p { margin: 0 0 9px; font-size: 12px; line-height: 1.65; color: var(--ink-3); }
.acc-tier ul { margin: 0 0 10px; padding: 0; list-style: none; }
.acc-tier li {
  position: relative; padding-left: 15px; font-size: 12px; line-height: 1.9; color: var(--ink-2);
}
.acc-tier li::before {
  content: '✓'; position: absolute; left: 0; top: 0; font-size: 11px; color: var(--tc); opacity: .85;
}
.acc-tier-meta {
  margin-top: auto; padding-top: 9px; border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--ink-3);
}

@media (max-width: 720px) {
  .acc-card p { min-height: 0; }
}

/* ============================================================
   需求反馈 /feedback/ 双栏
   ============================================================ */
.fb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.fb-left { min-width: 0; }
.fb-left .panel-box { margin: 0; }
.fb-head { margin-bottom: 16px; }
.fb-head h2 { margin: 0 0 5px; font-size: 17px; font-weight: 650; color: var(--ink); }
.fb-head p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

.fb-right { display: flex; flex-direction: column; gap: 12px; }
.fb-side-card {
  padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
}
.fb-side-card h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.fb-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fb-steps li { display: flex; gap: 10px; }
.fb-steps b {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
  background: color-mix(in srgb, #f0742e 12%, var(--surface)); color: #d4601a;
}
.fb-steps em { display: block; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.fb-steps span { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; margin-top: 2px; }

.fb-list { margin: 0; padding-left: 17px; }
.fb-list li { font-size: 12.5px; color: var(--ink-2); line-height: 1.85; }

.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chips span {
  font-size: 11.5px; line-height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line);
}
.fb-side-tip { margin: 10px 0 0; font-size: 11.5px; color: var(--ink-3); }

.fb-side-cta { background: linear-gradient(135deg, #fff7f0, #fef2f8); border-color: #f7e2d2; }
.fb-side-cta b { display: block; font-size: 13.5px; color: #9a4b12; margin-bottom: 5px; }
.fb-side-cta p { margin: 0 0 12px; font-size: 12px; color: #a4602f; line-height: 1.7; }
.fb-side-btns { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 980px) {
  .fb-wrap { grid-template-columns: 1fr; }
  .fb-right { flex-direction: row; flex-wrap: wrap; }
  .fb-side-card { flex: 1 1 280px; }
}

/* ============================================================
   个人中心 /member/ucenter
   ============================================================ */
.uc-wrap { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 18px; align-items: start; }

.uc-side {
  position: sticky; top: 76px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 18px 16px; box-shadow: var(--shadow-sm);
}
.uc-me { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.uc-avatar {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #8fa8c8, #6d829e);
}
.uc-avatar.lv-gold { background: linear-gradient(135deg, #f6d074, #d9a223); color: #59400a; }
.uc-avatar.lv-diamond { background: linear-gradient(135deg, #dfe6ef, #8b98a8); color: #2c3b4a; }
.uc-avatar.lv-black { background: linear-gradient(135deg, #4a4a55, #23232b); color: #f0d49a; }
.uc-me-txt { min-width: 0; }
.uc-me-txt b { display: block; font-size: 14px; font-weight: 650; color: var(--ink); }
.uc-me-txt em { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.uc-lv {
  display: inline-block; font-size: 11px; line-height: 18px; padding: 0 7px;
  border-radius: 9px; margin-top: 3px;
  background: var(--surface-3); color: var(--ink-2);
}
.uc-lv.lv-gold { background: #fff5e0; color: #a5751a; }
.uc-lv.lv-diamond { background: #eef2f7; color: #465768; }
.uc-lv.lv-black { background: #2b2b33; color: #f0d49a; }

.uc-vipbox {
  margin: 14px 0 12px; padding: 13px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #fff6e6, #fdf0f8); border: 1px solid #f6e3cd;
}
.uc-vipbox.is-free { background: linear-gradient(135deg, #f4f7fc, #f7f4ff); border-color: var(--line-2); }
.uc-vipbox span { display: block; font-size: 11.5px; color: var(--ink-3); }
.uc-vipbox b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin: 2px 0; }
.uc-vipbox em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-bottom: 9px; }
.uc-vipbox .btn { width: 100%; }

.uc-nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.uc-nav a {
  font-size: 13px; line-height: 34px; padding: 0 11px; border-radius: 8px; color: var(--ink-2);
}
.uc-nav a:hover { background: var(--surface-3); color: var(--ink); }
.uc-nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.uc-side-ops { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: 1px dashed var(--line); }

.uc-main { min-width: 0; }
.uc-sec { margin-bottom: 18px; scroll-margin-top: 80px; }
.uc-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.uc-sec-h h2 { margin: 0; font-size: 15.5px; font-weight: 650; color: var(--ink); }
.uc-sec-h a { font-size: 12.5px; color: var(--brand); }
.uc-link { background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--brand); cursor: pointer; }

.uc-assets { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.uc-asset {
  padding: 15px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--line-2);
}
.uc-asset span { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.uc-asset em { display: block; font-style: normal; font-size: 19px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.uc-asset a { font-size: 12px; color: var(--brand); }
.uc-asset.a-pink { border-top-color: #f0407a; } .uc-asset.a-pink em { color: #f0407a; }
.uc-asset.a-gold { border-top-color: #d9a223; } .uc-asset.a-gold em { color: #a5751a; }
.uc-asset.a-diamond { border-top-color: #8b98a8; } .uc-asset.a-diamond em { color: #465768; }
.uc-asset.a-black { border-top-color: #2b2b33; } .uc-asset.a-black em { color: #2b2b33; }
.uc-asset.a-free { border-top-color: #94a3b8; }
.uc-asset.a-blue { border-top-color: #3b82f6; } .uc-asset.a-blue em { color: #1d4ed8; }
.uc-asset.a-teal { border-top-color: #0ea5a4; } .uc-asset.a-teal em { color: #0d8b8a; }

.uc-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(120deg, #eef4ff, #f6f0ff); border: 1px solid var(--brand-line);
}
.uc-cta b { display: block; font-size: 13.5px; color: #1e3a8a; margin-bottom: 3px; }
.uc-cta span { font-size: 12px; color: #4b5f86; }

.uc-tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 3px; border-radius: 9px; }
.uc-tab {
  border: 0; background: none; cursor: pointer;
  font-size: 12.5px; line-height: 26px; padding: 0 12px; border-radius: 7px; color: var(--ink-2);
}
.uc-tab.on { background: var(--surface); color: var(--brand); font-weight: 600; box-shadow: var(--shadow-sm); }

.uc-pane { display: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.uc-pane.on { display: block; }
.uc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.uc-row:last-child { border-bottom: 0; }
.uc-row-l { min-width: 0; }
.uc-row-l b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.uc-row-l em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.uc-row-r { flex: none; text-align: right; }
.uc-row-r b { display: block; font-size: 13px; color: var(--ink); }
.uc-row-r b.up { color: var(--ok); }
.uc-row-r b.down { color: var(--danger); }
.uc-row-r em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.uc-empty { padding: 26px 16px; text-align: center; font-size: 13px; color: var(--ink-3); }
.uc-empty a { color: var(--brand); }
.uc-deliver {
  font-style: normal; font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 4px;
  background: var(--surface-3); color: var(--ink-2); margin-left: 6px; vertical-align: 1px;
}
.uc-code {
  display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 6px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; letter-spacing: .4px;
  background: var(--surface-3); border: 1px dashed var(--line-2); color: var(--ink);
}
.uc-text {
  display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px;
  font-size: 12px; line-height: 1.7; color: var(--ink-2); background: var(--surface-3);
  word-break: break-all;
}
.uc-dl { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--brand); }
.ost.st2 { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); color: var(--ok); }

/* 订单 tab 上的数量角标 */
.uc-tab em {
  font-style: normal; display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  margin-left: 5px; padding: 0 4px; border-radius: 9px; font-size: 10.5px; text-align: center;
  background: var(--line-2); color: var(--ink-2);
}
.uc-tab.on em { background: var(--brand-soft); color: var(--brand); }

/* 复制卡密 / 交付内容 */
.uc-copy {
  margin-left: 8px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
  font-size: 11.5px; line-height: 18px; vertical-align: 1px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
  transition: .14s;
}
.uc-copy:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }

/* 资产卡新增两色 */
.uc-asset.a-ord { border-top-color: #7c5cff; } .uc-asset.a-ord em { color: #5b3fd6; }
.uc-asset.a-spent { border-top-color: #f0932b; } .uc-asset.a-spent em { color: #c96f0a; }

@media (max-width: 980px) {
  .uc-wrap { grid-template-columns: 1fr; }
  .uc-side { position: static; }
  .uc-nav { flex-direction: row; flex-wrap: wrap; }
  .uc-nav a { padding: 0 10px; }
  .uc-assets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .uc-assets { grid-template-columns: 1fr; }
  .uc-row { flex-wrap: wrap; }
  .uc-row-r { text-align: left; }
}

/* 会员中心配色沿用 */
.vip-avatar { color: #fff; }

/* ============================================================
   应用型工具外壳（热榜 / 音乐 / 壁纸 / AI 导航）
   整站搬进来的独立应用，只在外层统一样式，不做内部改造
   ============================================================ */
/* 应用型工具外壳（无缝嵌入版）：内容直接铺满，不留标题栏/面包屑/说明 */
.app-main { padding-bottom: 0; }
.app-seamless { width: 100%; padding: 0; min-height: calc(100vh - 60px); }

.app-frame {
  position: relative; height: calc(100vh - 60px); min-height: var(--app-min-h, 560px);
  border: 0; border-radius: 0; overflow: hidden; background: #fff;
}
.app-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

/* 移动端：顶栏更高，iframe 相应缩短 */
@media (max-width: 720px) {
  .app-frame { height: calc(100vh - 54px); min-height: 480px; }
}

/* ---------------- 单页文档（关于 / 联系反馈 / 法律声明，page.html） ---------------- */
/* 顶栏是 sticky 的，主区域默认 padding-top:0，内容会贴着导航条，这里单独给间距 */
.docwrap { padding-top: 34px; }

.doc-hero { padding: 0 2px 26px; }
.doc-eyebrow {
  display: inline-flex; align-items: center; height: 24px; padding: 0 11px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 500; letter-spacing: .4px;
}
.doc-h1 {
  margin: 14px 0 8px; font-size: 28px; line-height: 1.35; font-weight: 700;
  letter-spacing: -.6px; color: var(--ink);
}
.doc-lead { margin: 0; font-size: 14px; color: var(--ink-3); }

.doc-grid {
  display: grid; grid-template-columns: 208px minmax(0, 1fr);
  gap: 22px; align-items: start;
}

.doc-side { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 12px; }

.doc-nav {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; box-shadow: var(--shadow-sm);
}
.doc-nav-a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.doc-nav-a:hover { background: var(--surface-3); color: var(--ink); }
.doc-nav-a.is-on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.doc-nav-home { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; color: var(--ink-3); }
.doc-nav-home svg { opacity: .7; }

/* 侧栏底部：直接进反馈表单，比再点一层页面快 */
.doc-cta {
  display: block; padding: 14px 15px 13px; border-radius: 14px;
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 78%);
  border: 1px solid var(--brand-line); transition: transform .15s, box-shadow .15s;
}
.doc-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.doc-cta b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.doc-cta span { display: block; margin: 5px 0 9px; font-size: 12px; line-height: 1.65; color: var(--ink-3); }
.doc-cta i { font-style: normal; font-size: 12.5px; font-weight: 500; color: var(--brand); }

.doc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 38px 38px; box-shadow: var(--shadow-sm); min-height: 380px;
}

/* 富文本正文：行高与段距按长文阅读调，别再靠 <br> 撑 */
.doc-body { font-size: 14px; line-height: 1.95; color: var(--ink-2); max-width: 78ch; }
.doc-body p { margin: 0 0 13px; }
.doc-body p:empty { display: none; }
.doc-body img { max-width: 100%; height: auto; border-radius: 10px; }
.doc-body h2 {
  margin: 32px 0 12px; font-size: 16.5px; line-height: 1.5; font-weight: 600; color: var(--ink);
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.doc-body h3 { margin: 22px 0 8px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.doc-body h2:first-child, .doc-body h3:first-child { margin-top: 0; }
.doc-body strong, .doc-body b { color: var(--ink); font-weight: 600; }
.doc-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-body a:hover { color: var(--brand-2); }
.doc-body ul, .doc-body ol { padding-left: 20px; margin: 0 0 14px; }
.doc-body li { margin: 0 0 7px; }
.doc-body li::marker { color: var(--ink-3); }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

/* 正文里的提示块与按钮：后台直接粘贴 HTML 就能用 */
.doc-body .tip {
  margin: 16px 0 18px; padding: 12px 15px; border-radius: 10px;
  background: var(--surface-3); border-left: 3px solid var(--brand);
  font-size: 13px; line-height: 1.85; color: var(--ink-2);
}
.doc-body .tip.warn { background: color-mix(in srgb, var(--warn) 8%, var(--surface)); border-left-color: var(--warn); }
.doc-body .doc-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px;
  margin: 2px 8px 2px 0; border-radius: 9px; background: var(--brand); color: #fff;
  font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background .15s;
}
.doc-body .doc-btn:hover { background: var(--brand-2); color: #fff; }
.doc-body .doc-btn.ghost { background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-2); }
.doc-body .doc-btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.doc-body table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 13px; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.doc-body th { background: var(--surface-3); color: var(--ink); font-weight: 600; }
.doc-body code {
  padding: 1px 6px; border-radius: 5px; background: var(--surface-3);
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  .docwrap { padding-top: 20px; }
  .doc-grid { grid-template-columns: 1fr; gap: 14px; }
  .doc-side { position: static; }
  .doc-nav { display: flex; gap: 6px; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .doc-nav::-webkit-scrollbar { display: none; }
  .doc-nav-a { white-space: nowrap; padding: 8px 12px; }
  .doc-nav-home { margin: 0; border-top: 0; border-radius: 9px; }
  .doc-cta { display: none; }
  .doc-hero { padding-bottom: 16px; }
  .doc-h1 { font-size: 23px; margin: 12px 0 6px; }
  .doc-lead { font-size: 13px; }
  .doc-card { padding: 22px 18px 26px; border-radius: 14px; min-height: 0; }
  .doc-body { font-size: 13.5px; line-height: 1.9; }
  .doc-body h2 { margin-top: 26px; font-size: 15.5px; }
}

/* ==================== 工具页新排版（参考：顶部提示+选项卡 / 左操作右预览 / 底部指南） ==================== */

/* 顶部免费提示条 */
.tp-free {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ok) 22%, transparent);
  border-radius: 10px; font-size: 12.5px; color: var(--ok);
}
.tp-free .tf-ico { font-size: 15px; line-height: 1; }

/* 左右分栏骨架 */
.tp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tp-col { min-width: 0; }

/* 操作面板 / 预览窗口 共用卡片 */
.tp-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 18px 20px; box-shadow: var(--shadow-sm);
  min-height: 100%;
}
.tp-card .tp-card-h {
  margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 7px; letter-spacing: .2px;
}
.tp-card .tp-card-h::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--brand); display: inline-block;
}

/* 预览窗口 */
.tp-preview { display: flex; align-items: center; justify-content: center; min-height: 260px; }
.tp-preview .canvas-wrap { width: 100%; }

/* 快速使用指南 */
.tp-guide { margin-top: 16px; }
.tp-guide .tp-guide-h {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink); padding: 4px 0;
  user-select: none;
}
.tp-guide .tp-guide-h .arr { margin-left: auto; transition: .2s; color: var(--ink-3); font-size: 12px; }
.tp-guide.collapsed .arr { transform: rotate(-90deg); }
.tp-guide ol { list-style: none; counter-reset: step; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.tp-guide ol li {
  counter-increment: step; position: relative; padding-left: 34px;
  font-size: 13px; color: var(--ink-2); line-height: 1.7;
}
.tp-guide ol li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.tp-guide.collapsed ol { display: none; }

@media (max-width: 900px) {
  .tp-grid { grid-template-columns: 1fr; }
}

/* 新排版里，面板内自带的 <h2> 大标题与页面标题重复，隐藏掉 */
.tp-card > h2,
.tp-card .sub-tabs + .sub-panel > h2 {
  display: none;
}
/* ============================================================
   前台公告弹窗（后台：工具运营 → 公告弹窗）
   ============================================================ */
.vm-nt {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 18px;
}
.vm-nt[hidden] { display: none !important; }

.vm-nt-mask {
  position: absolute; inset: 0;
  background: rgba(12, 19, 32, .48);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .2s ease;
}
[data-theme="dark"] .vm-nt-mask { background: rgba(0, 0, 0, .62); }

.vm-nt-box {
  position: relative; z-index: 1;
  width: min(560px, 100%); max-height: min(82vh, 720px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(12, 22, 40, .22);
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .22s ease, transform .22s cubic-bezier(.2, .8, .3, 1);
  overflow: hidden;
}
.vm-nt.is-in .vm-nt-mask { opacity: 1; }
.vm-nt.is-in .vm-nt-box { opacity: 1; transform: none; }

.vm-nt-x {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--surface-3); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, color .15s;
}
.vm-nt-x:hover { background: var(--line); color: var(--ink); }

.vm-nt-h { padding: 24px 56px 0 24px; }
.vm-nt-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; font-weight: 600; letter-spacing: .5px;
}
.vm-nt-h h3 {
  margin: 10px 0 0; font-size: 18px; line-height: 1.45; font-weight: 700;
  color: var(--ink); letter-spacing: -.2px;
}

.vm-nt-body {
  padding: 14px 24px 6px; overflow-y: auto; flex: 1 1 auto;
  font-size: 13.5px; line-height: 1.9; color: var(--ink-2);
  overscroll-behavior: contain;
}
.vm-nt-body > :first-child { margin-top: 0; }
.vm-nt-body > :last-child { margin-bottom: 0; }
.vm-nt-body p { margin: 0 0 10px; }
.vm-nt-body h2, .vm-nt-body h3, .vm-nt-body h4 {
  margin: 16px 0 8px; font-size: 14.5px; font-weight: 600; color: var(--ink);
}
.vm-nt-body img { max-width: 100%; height: auto; border-radius: 8px; }
.vm-nt-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.vm-nt-body ul, .vm-nt-body ol { padding-left: 20px; margin: 0 0 10px; }
.vm-nt-body li { margin: 0 0 5px; }
.vm-nt-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.vm-nt-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 10px 0; }
.vm-nt-body th, .vm-nt-body td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.vm-nt-body th { background: var(--surface-3); color: var(--ink); }
.vm-nt-body blockquote {
  margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--brand-line);
  background: var(--surface-2); color: var(--ink-2); border-radius: 0 8px 8px 0;
}
.vm-nt-body code {
  padding: 1px 5px; border-radius: 4px; background: var(--surface-3);
  font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.vm-nt-f {
  padding: 12px 24px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  border-top: 0;
}
.vm-nt-ok {
  height: 36px; padding: 0 22px; border: 0; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: background .15s, transform .1s;
}
.vm-nt-ok:hover { background: var(--brand-2); }
.vm-nt-ok:active { transform: translateY(1px); }

body.nt-open { overflow: hidden; }

@media (max-width: 640px) {
  .vm-nt { padding: 0; align-items: flex-end; }
  .vm-nt-box {
    width: 100%; max-height: 84vh; border-radius: 16px 16px 0 0;
    transform: translateY(28px);
  }
  .vm-nt-h { padding: 20px 52px 0 18px; }
  .vm-nt-h h3 { font-size: 16.5px; }
  .vm-nt-body { padding: 12px 18px 4px; font-size: 13px; }
  .vm-nt-f { padding: 10px 18px 18px; }
  .vm-nt-ok { width: 100%; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .vm-nt-mask, .vm-nt-box { transition: none; }
  .vm-nt-box { transform: none; }
}
