:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --border: #e5e9f2;
  --border-strong: #d5dbe8;
  --text: #182033;
  --muted: #6c7893;
  --primary: #2f5bea;
  --primary-dark: #2447c4;
  --primary-soft: #eef2ff;
  --success: #0f9d58;
  --success-soft: #e6f7ee;
  --warn: #b26a00;
  --warn-soft: #fdf3e2;
  --danger: #d92d20;
  --danger-soft: #fdeceb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 66, .04), 0 8px 24px rgba(20, 32, 66, .05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* 自适应容器：所有页面统一按视口伸缩，超大屏留白而不是拉满 */
  --page-max: 1760px;
  --page-pad: clamp(16px, 2.2vw, 40px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

code, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: clamp(232px, 16.5vw, 292px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 16px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 侧边栏滚动条：细一点，不抢视线 */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #d8deea; border-radius: 99px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #c2cbdd; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.brand-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2f5bea, #6d8bff);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  letter-spacing: .02em;
  box-shadow: 0 4px 12px rgba(47, 91, 234, .3);
  flex: 0 0 auto;
}

.brand > div:last-child { min-width: 0; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.nav { padding-top: 2px; }

.nav-group {
  margin: 18px 0 7px;
  padding-left: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #97a3bb;
  position: relative;
}
/* 分组标题左侧小竖条，视觉分组更清晰 */
.nav-group::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 11px;
  border-radius: 99px;
  background: #d5dbe8;
}
.nav-group:first-child { margin-top: 10px; }

.nav a,
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  color: #45526d;
  font-size: 13.5px;
  margin-bottom: 1px;
  text-decoration: none;
  position: relative;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

/* 图标 */
.nav-ico {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  color: #9aa5bd;
  transition: color .16s ease;
}
.nav-ico svg { width: 100%; height: 100%; display: block; }

.nav-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav a:hover,
.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.nav a:hover .nav-ico,
.nav-item:hover .nav-ico { color: #6b7896; }

/* 选中态：浅蓝底 + 左侧强调条 + 蓝图标 */
.nav a.active,
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(47, 91, 234, .1);
}
.nav a.active .nav-ico,
.nav-item.active .nav-ico { color: var(--primary); }
.nav a.active::before,
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 99px;
  background: var(--primary);
}

.nav a .count,
.nav-item .count { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ---------- 后台响应式侧边栏 ---------- */
/* 中等屏：侧边栏收窄一点，但图标 + 文字都保留 */
@media (max-width: 1180px) {
  .layout { grid-template-columns: clamp(210px, 20vw, 232px) minmax(0, 1fr); }
  .sidebar { padding: 18px 12px 24px; }
  .brand { padding: 6px 8px 16px; }
  .nav a,
.nav-item { padding: 7px 10px; font-size: 13px; }
  .nav-group { padding-left: 10px; }
}

/* 超宽屏：给导航更多呼吸空间 */
@media (min-width: 1700px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr); }
  .sidebar { padding: 24px 20px 32px; }
  .nav a,
.nav-item { padding: 9px 14px; font-size: 14px; }
  .nav-ico { width: 19px; height: 19px; }
  .nav-group { padding-left: 14px; font-size: 11.5px; }
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}

.topbar h1 { font-size: 17px; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }

.userbox { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 600; font-size: 13px;
}

.content {
  padding: clamp(16px, 1.7vw, 30px) var(--page-pad) 56px;
  max-width: none;
  width: 100%;
  /* 关键：不加 min-width:0，宽表格会把整页撑出横向滚动条 */
  min-width: 0;
}
/* 内容区里所有直接子容器（模板里常见的两列裸 div）都要能收缩，
   否则里面的宽表格会把 flex/grid 子项撑破，整页出现横向滚动条 */
.content > div { min-width: 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
  /* flex/grid 子项默认 min-width:auto，不加这行卡片会被宽表格撑破导致整页横向滚动 */
  min-width: 0;
}

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.card-head h2 { font-size: 14px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; }
.stat .value small { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat.accent { background: linear-gradient(135deg, #2f5bea, #5b7cff); border-color: transparent; color: #fff; }
.stat.accent .label, .stat.accent .value small { color: rgba(255,255,255,.78); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; }

/* 仪表盘两列布局：小屏自动折叠为单列 */
.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.dash-grid > div { min-width: 0; }
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th, table.table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
table.table th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .02em; }
table.table tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: #fbfcff; }
table.table td.wrap { white-space: normal; min-width: 220px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
}
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.muted { background: #eef1f7; color: var(--muted); }
.badge.info { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px; font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(47,91,234,.22); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }

.field label { display: block; font-size: 12.5px; font-weight: 600; color: #3b475f; margin-bottom: 5px; }
.field .req { color: var(--danger); margin-left: 2px; }

input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel],
input[type=url], input[type=search], input[type=datetime-local], input[type=date],
input[type=month], input[type=week], input[type=time], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 91, 234, .12);
}
input[readonly], textarea[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; min-height: 72px; }

.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error-text { font-size: 12px; color: var(--danger); margin-top: 4px; }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- 提示 ---------- */
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid transparent;
}
.flash.success { background: var(--success-soft); color: #0b7a45; border-color: #bfe8d1; }
.flash.error { background: var(--danger-soft); color: #a12117; border-color: #f5c6c2; }
.flash.info { background: var(--primary-soft); color: var(--primary-dark); border-color: #cfdaff; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 18px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pager .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager .disabled { color: #b6bfd2; }
.pager .total { border: none; color: var(--muted); font-size: 12.5px; margin-left: auto; }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text] { width: 220px; }
.toolbar select { width: auto; min-width: 120px; }

/* ---------- 登录 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 500px at 12% 8%, #e8eeff 0%, rgba(232,238,255,0) 60%),
    radial-gradient(800px 480px at 88% 92%, #e6f6f0 0%, rgba(230,246,240,0) 55%),
    var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(20, 32, 66, .10);
  padding: 30px 28px;
}
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ---------- 详情 ---------- */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

.section-title { font-size: 13px; font-weight: 650; color: #3b475f; margin: 22px 0 10px; }

pre.code-block {
  background: #0f1729;
  color: #d6e2ff;
  padding: 14px 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
}
pre.code-block .k { color: #7dd3fc; }
pre.code-block .s { color: #a7f3d0; }
pre.code-block .c { color: #7c8bab; }

.secret { letter-spacing: .5px; }

/* ---------- 前台 ---------- */
.public-wrap { min-height: 100vh; background: var(--bg); }
.public-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.public-body { max-width: var(--page-max); margin: 0 auto; padding: 38px var(--page-pad) 64px; }
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { color: var(--muted); margin: 0 0 26px; }
.result-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.result-row:last-child { border-bottom: none; }
.result-row .k { color: var(--muted); }

/* ---------- 安装 ---------- */
.install-card { max-width: 720px; margin: 40px auto; }
.check-list { list-style: none; padding: 0; margin: 0 0 20px; }
.check-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 14px 16px 16px;
  }
  .brand { justify-content: flex-start; padding: 2px 0 14px; margin-bottom: 10px; }
  .nav { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 0; }
  .nav a,
.nav-item {
    padding: 7px 12px;
    margin-bottom: 0;
    font-size: 13px;
    background: var(--surface-2);
    border: 1px solid var(--border);
  }
  .nav a.active,
.nav-item.active { background: var(--primary-soft); border-color: rgba(47, 91, 234, .25); }
  .nav a.active::before,
.nav-item.active::before { display: none; }
  .nav-group {
    width: 100%;
    margin: 12px 0 2px;
    padding-left: 0;
  }
  .nav-group::before { display: none; }
  .nav-group:first-child { margin-top: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 14px 16px; }
}

/* ---------- v1.1 新增: 统计卡片 / 时长选择 / 键值展示 / 公告 / 广告 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -.3px; }
.stat.ok .stat-value { color: var(--success); }
.stat.warn .stat-value { color: var(--warn); }
.stat.danger .stat-value { color: var(--danger); }

.duration-row { display: flex; gap: 8px; align-items: center; }
.duration-row select { flex: 0 0 132px; }
.duration-row input { flex: 1 1 auto; min-width: 0; }
.duration-preview { color: var(--muted); font-size: 12px; white-space: nowrap; }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 22px; }
.kv-grid > div { border-left: 3px solid var(--primary-soft); padding-left: 12px; }
.kv-grid span { display: block; color: var(--muted); font-size: 12px; }
.kv-grid strong { font-size: 15px; }

.notice-list { display: flex; flex-direction: column; }
.notice-item {
  display: block; padding: 12px 2px; border-bottom: 1px dashed var(--border);
  color: var(--text); text-decoration: none;
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { text-decoration: none; background: var(--surface-2); }
.notice-item.lv2 .notice-title { color: var(--warn); font-weight: 600; }
.notice-item.lv3 .notice-title { color: var(--danger); font-weight: 700; }
.notice-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.notice-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.notice-content { font-size: 14px; line-height: 1.9; white-space: pre-wrap; }

.public-nav { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.public-nav a { color: var(--muted); }
.public-nav a:hover { color: var(--primary); text-decoration: none; }

.ad-strip { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }
.ad-item {
  display: block; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px;
  border: 1px solid var(--border); background: var(--surface);
}
.ad-item img { display: block; width: 100%; height: auto; }
.ad-text { display: block; padding: 10px 14px; font-size: 13px; color: var(--muted); }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1 1 200px; min-width: 0; }
.auth-card { max-width: 460px; margin: 0 auto; }

/* ============================================================
   v1.2 前台商城
   ============================================================ */

.public-head {
  padding: 12px var(--page-pad);
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.public-head-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
}
.public-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.public-brand:hover { text-decoration: none; }
.public-nav { flex: 1 1 auto; justify-content: center; flex-wrap: wrap; gap: 4px; }
.public-nav a { padding: 6px 10px; border-radius: 8px; }
.public-nav a.on { color: var(--primary-dark); background: var(--primary-soft); font-weight: 600; }
.public-actions { display: flex; align-items: center; gap: 8px; }

.public-body.wide { max-width: var(--page-max); padding-top: 26px; }
.public-body > .flash { max-width: none; }

/* ---------- 页脚 ---------- */
.public-foot {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 34px var(--page-pad) 40px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand .brand-sub { margin-top: 2px; }
.foot-note { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; max-width: 340px; line-height: 1.8; }
.foot-title { font-size: 12px; font-weight: 650; color: #3b475f; letter-spacing: .04em; margin-bottom: 10px; }
.foot-grid a, .foot-static { display: block; color: var(--muted); font-size: 13px; padding: 4px 0; }
.foot-grid a:hover { color: var(--primary); text-decoration: none; }
.foot-bottom { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- 首页 Hero ---------- */
.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
}
.hero-main {
  background:
    radial-gradient(700px 320px at 8% 0%, #e9efff 0%, rgba(233, 239, 255, 0) 62%),
    radial-gradient(560px 300px at 96% 100%, #e7f6ef 0%, rgba(231, 246, 239, 0) 58%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 34px 30px;
  box-shadow: var(--shadow);
}
.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #cfdaff;
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}
.hero-main h1 { font-size: 34px; line-height: 1.3; letter-spacing: -.02em; }
.hero-sub { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 14px 0 22px; max-width: 620px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border); }
.type-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: all .15s;
}
.type-chip:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.type-chip b {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-size: 12px;
}
.chip-count { color: var(--muted); font-size: 12px; }

.hero-side { display: flex; flex-direction: column; gap: 14px; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.side-card:first-child { flex: 1 1 auto; }
.side-title { font-size: 13.5px; font-weight: 650; margin-bottom: 8px; }
.side-desc { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; line-height: 1.7; }
.side-card input[type=text] { margin-bottom: 10px; }
.side-links { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
.side-links a { color: var(--primary); }
.side-links em { margin: 0 6px; font-style: normal; }
.stock-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; color: var(--muted); }
.stock-row:last-of-type { border-bottom: none; }
.stock-row strong { color: var(--text); font-size: 14px; }

/* ---------- 统计条 ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.stat-num small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- 区块 ---------- */
.block { margin-bottom: 26px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.block-head h2 { font-size: 19px; letter-spacing: -.01em; }
.block-head p { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.two-col > .card { margin-bottom: 0; }

.empty-card {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-card p { margin: 0 0 12px; font-size: 13.5px; }

/* ---------- 资源卡片 ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.prod-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.prod-card:hover { text-decoration: none; transform: translateY(-2px); border-color: #c9d5f5; box-shadow: 0 12px 28px rgba(20, 32, 66, .10); }
.prod-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.type-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #2f5bea, #6d8bff);
  color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.type-mark.lg { width: 46px; height: 46px; border-radius: 13px; font-size: 19px; }
.type-label { font-size: 12px; font-weight: 600; color: var(--primary-dark); background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; }
.type-ver { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.prod-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.prod-desc { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 0 0 12px; min-height: 42px; }
.prod-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 11.5px; color: #3b475f; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.tag.muted { color: var(--muted); }
.prod-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); }
.prod-more { font-size: 12.5px; color: var(--primary); }
.price { font-size: 20px; font-weight: 700; color: var(--danger); letter-spacing: -.02em; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.price.muted { color: var(--muted); font-size: 15px; }
.price.xl { font-size: 30px; }
.text-danger { color: var(--danger); }

/* ---------- 套餐卡片 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.plan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.plan-prod { font-size: 11.5px; color: var(--muted); }
.plan-name { font-size: 14.5px; font-weight: 650; }
.plan-price { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.plan-price b { font-size: 28px; color: var(--danger); letter-spacing: -.02em; margin: 0 4px 0 2px; }
.plan-spec { list-style: none; padding: 0; margin: 0 0 16px; }
.plan-spec li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--border); color: var(--muted); }
.plan-spec li:last-child { border-bottom: none; }
.plan-spec b { color: var(--text); font-weight: 600; }
.plan-card .btn { margin-top: auto; }

/* ---------- 会员等级 ---------- */
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.level-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.level-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.level-name { font-size: 16px; font-weight: 650; }
.level-discount { font-size: 12px; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 3px 9px; margin-bottom: 12px; display: inline-block; }
.level-card .btn { margin-top: auto; }

/* ---------- 服务入口 ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 14px; }
.entry-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .16s, transform .16s;
}
.entry-card:hover { text-decoration: none; border-color: #c9d5f5; transform: translateY(-2px); }
.entry-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.entry-card h3 { font-size: 14.5px; margin-bottom: 4px; }
.entry-card p { color: var(--muted); font-size: 12.5px; margin: 0; line-height: 1.7; }
.entry-go { margin-left: auto; color: var(--muted); align-self: center; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px dashed var(--border); padding: 10px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; font-size: 13.5px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); font-size: 13px; line-height: 1.85; margin: 8px 0 0; }

/* ---------- 页面标题 / 面包屑 ---------- */
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 24px; letter-spacing: -.01em; }
.page-head p { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--primary); text-decoration: none; }
.crumb em { font-style: normal; color: var(--text); }

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
  text-decoration: none;
}
.filter-chip b { font-weight: 600; font-size: 11.5px; color: #9aa5bd; }
.filter-chip:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.filter-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.filter-chip.on b { color: rgba(255, 255, 255, .8); }
.filter-search { display: flex; gap: 8px; align-items: center; }
.filter-search input[type=text] { width: 220px; }

/* ---------- 资源详情 ---------- */
.prod-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background:
    radial-gradient(600px 260px at 0% 0%, #eaf0ff 0%, rgba(234, 240, 255, 0) 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.prod-hero-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.prod-hero-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.prod-hero h1 { font-size: 24px; margin-bottom: 8px; }
.prod-hero-desc { color: var(--muted); font-size: 13.5px; line-height: 1.85; margin: 0; max-width: 660px; }
.prod-hero-side { text-align: right; min-width: 180px; }
.prod-hero-side .btn { margin-top: 10px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 358px; gap: 16px; align-items: start; }
.detail-side .card { margin-bottom: 0; }
.rich-text { font-size: 13.5px; line-height: 1.95; color: #2c3853; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.spec-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
}
.spec-item b { color: var(--success); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 38px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
}
.steps li::after {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 4px;
  width: 1px; background: var(--border);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: 12.5px; line-height: 1.75; }

.buy-list { display: flex; flex-direction: column; }
.buy-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.buy-item:last-child { border-bottom: none; }
.buy-name { font-size: 13.5px; font-weight: 600; }
.buy-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.buy-side { text-align: right; flex: 0 0 auto; }
.buy-side .price { font-size: 16px; margin-bottom: 4px; }

/* ---------- 价格表 ---------- */
.price-table td { vertical-align: top; }
.price-table td[colspan], .price-table td[rowspan] { border-right: 1px solid var(--border); }
.price-cell { font-weight: 700; color: var(--danger); }

/* ---------- 会员权益 / 充值 / 兑换 ---------- */
.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li { position: relative; padding: 7px 0 7px 24px; font-size: 13px; color: #3b475f; border-bottom: 1px dashed var(--border); }
.tick-list li:last-child { border-bottom: none; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: 7px; color: var(--success); font-weight: 700; }

.channel-list { display: flex; flex-wrap: wrap; gap: 10px; }
.channel-item {
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 14px; background: var(--surface-2);
  font-size: 13px;
}
.channel-item .help { margin: 0; }

.login-hint { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.login-hint h2 { font-size: 16px; margin-bottom: 4px; }
.login-hint .help { margin: 0; }

.amount-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.amount-chip { position: relative; cursor: pointer; }
.amount-chip input { position: absolute; opacity: 0; pointer-events: none; }
.amount-chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 82px; padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  background: var(--surface);
  transition: all .15s;
}
.amount-chip input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12); }

.status-list { display: flex; flex-direction: column; gap: 10px; }
.status-list > div { display: flex; align-items: flex-start; gap: 10px; }
.status-list p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 授权结果 / 授权码 ---------- */
.license-box {
  border: 1px solid #cfdaff;
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 16px;
}
.license-key { margin-bottom: 12px; }
.license-key code { font-size: 17px; font-weight: 700; letter-spacing: .04em; color: var(--primary-dark); }
.license-box .kv-grid > div { border-left-color: #b9c8f7; }
.license-box .kv-grid span { color: #5a6b96; }

.btn-lg { padding: 11px 20px; font-size: 14px; border-radius: 10px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .store-hero { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .side-card { flex: 1 1 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .public-head { padding: 12px 14px; gap: 10px; }
  .public-nav { order: 3; width: 100%; justify-content: flex-start; }
  .public-nav a { padding: 5px 8px; font-size: 12.5px; }
  .public-body.wide { padding: 18px 14px 40px; }
  .hero-main { padding: 24px 20px; }
  .hero-main h1 { font-size: 25px; }
  .hero-side { flex-direction: column; }
  .prod-hero { padding: 20px; }
  .prod-hero-side { text-align: left; }
  .prod-grid, .plan-grid, .level-grid, .entry-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 18px; }
  .public-foot { padding: 24px 16px 32px; }
  .filter-search { width: 100%; }
  .filter-search input[type=text] { flex: 1 1 auto; width: auto; }
}

/* ---------- 补全 ---------- */
.buy-main { min-width: 0; }
.chip-label { white-space: nowrap; }

/* ============================================================
   v1.3 支付系统：支付方式卡片 / 二维码 / 跳转 / 人工确认
   ============================================================ */
.pay-amount { font-size: 13px; color: var(--muted); }
.pay-amount b { color: var(--danger); font-size: 18px; font-weight: 700; }

.pay-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pay-tab-form { margin: 0; }

.pay-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pay-tab:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pay-tab.is-on,
.pay-tabs-radio .pay-tab:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(47, 91, 234, .1);
}
.pay-tabs-radio .pay-tab input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.pay-tab-name { font-weight: 600; white-space: nowrap; }
.pay-tab-mode {
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}
.pay-tab.is-on .pay-tab-mode,
.pay-tabs-radio .pay-tab:has(input:checked) .pay-tab-mode {
  background: #fff;
  color: var(--primary-dark);
  border-color: #c3d0f9;
}

.pay-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
  background: var(--muted);
  letter-spacing: 0;
}
.pay-mark-alipay   { background: #1677ff; }
.pay-mark-wxpay    { background: #07c160; }
.pay-mark-qqpay    { background: #12b7f5; }
.pay-mark-unionpay { background: #d6001c; }
.pay-mark-usdt     { background: #26a17b; }
.pay-mark-paypal   { background: #003087; }
.pay-mark-manual   { background: #6c7893; }
.pay-mark-other    { background: #7a5af8; }

/* 订单支付页布局 */
.pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.pay-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pay-side { display: flex; flex-direction: column; gap: 18px; }
.pay-card .card-body { padding-top: 18px; }

/* 二维码收款 */
.qr-stage {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.qr-box {
  flex: 0 0 auto;
  width: 208px;
  height: 208px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-side { flex: 1 1 auto; min-width: 0; }
.qr-brand { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.qr-price {
  font-size: 34px;
  font-weight: 700;
  color: var(--danger);
  line-height: 1.2;
  margin: 8px 0 10px;
  letter-spacing: -.02em;
}
.qr-price small { font-size: 18px; margin-right: 2px; }
.qr-tip { margin: 0 0 8px; color: var(--text); }

/* 跳转支付 */
.pay-link-stage {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}
.pay-link-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.pay-link-head .help { margin: 2px 0 0; }

/* 人工确认 */
.pay-manual {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.pay-manual > div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
}
.pay-manual span { display: block; font-size: 12px; color: var(--muted); }
.pay-manual strong { display: block; font-size: 14px; word-break: break-all; }
.copyable { border-bottom: 1px dashed var(--border-strong); }

/* 提示条 */
.pay-notice {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.pay-notice.warn   { background: var(--warn-soft); border-color: #f0d9b5; color: var(--warn); }
.pay-notice.info   { background: var(--primary-soft); border-color: #cdd8fa; color: var(--primary-dark); }
.pay-notice.ok     { background: var(--success-soft); border-color: #bfe6d0; color: #0b7a44; }

.pay-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.pay-foot .help { margin: 0; }

/* 余额支付 */
.balance-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.balance-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }

.kv-stack { display: flex; flex-direction: column; gap: 10px; }
.kv-stack > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.kv-stack span { font-size: 12.5px; color: var(--muted); flex: 0 0 auto; }
.kv-stack strong { font-size: 13px; text-align: right; word-break: break-all; }

.steps.compact { margin: 0; padding-left: 18px; }
.steps.compact li { margin-bottom: 10px; }
.steps.compact li b { display: block; font-size: 13px; }
.steps.compact li span { font-size: 12.5px; color: var(--muted); }

/* 后台：二维码缩略图与小图标 */
.qr-thumb {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  padding: 2px;
  display: block;
}
.pay-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  vertical-align: middle;
  background: var(--muted);
}
.pay-mini-alipay   { background: #1677ff; }
.pay-mini-wxpay    { background: #07c160; }
.pay-mini-qqpay    { background: #12b7f5; }
.pay-mini-unionpay { background: #d6001c; }
.pay-mini-usdt     { background: #26a17b; }
.pay-mini-paypal   { background: #003087; }
.pay-mini-manual   { background: #6c7893; }
.pay-mini-other    { background: #7a5af8; }

/* 后台：图片字段 */
.image-field { display: flex; gap: 16px; align-items: flex-start; }
.image-preview {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.image-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.image-empty { font-size: 12px; color: var(--muted); }
.image-inputs { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.image-inputs input[type=text] { width: 100%; }
.image-inputs input[type=file] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--muted);
}
.image-inputs .help { margin: 0; }

@media (max-width: 960px) {
  .pay-layout { grid-template-columns: 1fr; }
  .pay-side { order: 2; }
}

@media (max-width: 640px) {
  .pay-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .pay-tab { justify-content: flex-start; }
  .pay-tab-form { display: block; }
  .pay-tab-form .pay-tab { width: 100%; }
  .qr-stage { flex-direction: column; align-items: center; text-align: center; padding: 16px; }
  .qr-box { width: 180px; height: 180px; }
  .qr-brand { justify-content: center; }
  .qr-price { font-size: 28px; }
  .image-field { flex-direction: column; }
  .image-preview { width: 100%; height: 140px; }
}

/* ---------- 会员钱包 ---------- */
.wallet-card .stat-strip { margin-bottom: 0; }
.wallet-card .stat-cell {
  box-shadow: none;
  background: var(--surface-2);
  border-color: var(--border);
}
.wallet-card .stat-num { font-size: 24px; }
.wallet-card .stat-num small { font-size: 12px; }

/* ============================================================
   v1.5 自适应宽度 · 视觉升级 · 内容社区 · 编辑器 · 广告位 · 邮件
   ============================================================ */

/* ---------- 通用视觉升级 ---------- */
.card {
  border-radius: 16px;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: 0 2px 4px rgba(20,32,66,.05), 0 14px 34px rgba(20,32,66,.08); }
.card-head h2 { letter-spacing: -.015em; }
.btn { border-radius: 10px; font-weight: 550; transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { box-shadow: 0 4px 12px rgba(47,91,234,.22); }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(47,91,234,.3); }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.stat-num.ok { color: var(--success); }
.stat-num.warn { color: var(--warn); }
.stat-num.danger { color: var(--danger); }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 13.5px; }

/* ---------- 广告位容器 ---------- */
.ad-slot { max-width: var(--page-max); margin: 0 auto 14px; padding: 0 var(--page-pad); display: grid; gap: 10px; }
.ad-slot .ad-item { margin-bottom: 0; }
.ad-slot-sidebar, .ad-slot-checkout_side { max-width: none; padding: 0; margin: 18px 0; }
.ad-slot video { display: block; width: 100%; height: auto; }

/* ---------- 内容社区：列表 ---------- */
.post-search { flex: 0 0 auto; }
.post-search input { min-width: 220px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--border); color: #445069;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.cat-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.cat-icon { font-size: 13px; }

.featured-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.featured-card {
  display: flex; gap: 14px; padding: 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); text-decoration: none; }
.featured-cover {
  flex: 0 0 92px; height: 92px; border-radius: 12px; background-size: cover; background-position: center;
}
.featured-cover-plain {
  display: grid; place-items: center; font-size: 30px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2f5bea, #7c9bff);
}
.featured-body { min-width: 0; }
.featured-body h3 { font-size: 15px; margin: 6px 0 4px; line-height: 1.5; }
.featured-body p { color: var(--muted); font-size: 12.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 18px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(20,32,66,.09); border-color: var(--border-strong); text-decoration: none; }
.post-cover { height: 158px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.post-cover-plain { display: grid; place-items: center; background: linear-gradient(135deg, #eef2ff, #dfe7ff); }
.post-cover-plain span { font-size: 44px; font-weight: 800; color: #9fb0e6; }
.post-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.post-title { font-size: 15.5px; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-summary { color: var(--muted); font-size: 13px; line-height: 1.75; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.post-tags em { font-style: normal; color: var(--primary); margin-left: 6px; }

.empty-state { text-align: center; padding: 54px 20px; }
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state h2 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- 内容社区：详情 ---------- */
.article {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: clamp(20px, 2.4vw, 42px); box-shadow: var(--shadow); margin-bottom: 22px;
}
.article-head h1 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; margin: 10px 0 12px; letter-spacing: -.02em; }
.article-summary { color: var(--muted); font-size: 14px; line-height: 1.85; margin: 0 0 8px; }
.article-cover { margin: 18px 0; border-radius: 14px; overflow: hidden; }
.article-cover img { display: block; width: 100%; height: auto; }
.article-body { font-size: 15px; line-height: 1.95; color: #26324a; margin-top: 14px; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { font-size: 20px; margin: 30px 0 12px; padding-left: 12px; border-left: 3px solid var(--primary); }
.article-body h3 { font-size: 17px; margin: 24px 0 10px; }
.article-body h4 { font-size: 15px; margin: 20px 0 8px; }
.article-body p { margin: 0 0 14px; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 12px 0; display: block; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 14px; }
.article-body li { margin: 5px 0; }
.article-body blockquote {
  margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 10px 10px 0; color: #33406b;
}
.article-body pre {
  background: #1b2233; color: #e8edf9; padding: 16px 18px; border-radius: 12px;
  overflow-x: auto; font-family: var(--mono); font-size: 12.8px; line-height: 1.7; margin: 16px 0;
}
.article-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-family: var(--mono); font-size: 12.8px; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.article-body th { background: var(--surface-2); font-weight: 600; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 26px 0; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tag-chip { font-size: 12.5px; color: var(--primary-dark); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; }

.article-attachments { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.article-attachments h2 { font-size: 16px; margin-bottom: 12px; }
.attach-cards { display: grid; gap: 10px; }
.attach-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  color: inherit; text-decoration: none; transition: border-color .15s, background .15s;
}
.attach-card:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.attach-card-icon { font-size: 20px; }
.attach-card-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.attach-card-name { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-card-meta { font-size: 12px; color: var(--muted); }
.attach-card-action { font-size: 12.5px; color: var(--primary); font-weight: 600; }

.related-list { display: grid; gap: 8px; }
.related-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); color: inherit; text-decoration: none;
}
.related-item:hover { border-color: var(--primary); text-decoration: none; }
.related-title { font-size: 13.5px; font-weight: 550; }
.related-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- 富文本编辑器 ---------- */
.editor { border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,91,234,.1); }
.editor-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2;
}
.et-group { display: flex; gap: 2px; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--border); }
.et-group:last-of-type { border-right: none; }
.editor-toolbar button {
  border: none; background: transparent; color: #3d4a63; font-size: 12.5px;
  padding: 5px 9px; border-radius: 7px; cursor: pointer; line-height: 1.4;
}
.editor-toolbar button:hover { background: #e8edfb; color: var(--primary-dark); }
.editor-toolbar button b, .editor-toolbar button i, .editor-toolbar button u, .editor-toolbar button s { pointer-events: none; }
.et-hint { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.et-hint.ok { color: var(--success); }
.et-hint.err { color: var(--danger); }
.editor-area {
  min-height: 320px; max-height: 640px; overflow-y: auto;
  padding: 18px 20px; font-size: 14.5px; line-height: 1.9; outline: none;
}
.editor-area:empty::before { content: '开始写点什么…'; color: #a9b3c8; }
.editor-area h2 { font-size: 19px; margin: 18px 0 8px; }
.editor-area h3 { font-size: 16px; margin: 14px 0 6px; }
.editor-area img { max-width: 100%; border-radius: 10px; margin: 8px 0; }
.editor-area blockquote { border-left: 3px solid var(--primary); background: var(--primary-soft); margin: 12px 0; padding: 8px 14px; }
.editor-area pre { background: #1b2233; color: #e8edf9; padding: 14px; border-radius: 10px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; }
.editor-area a { color: var(--primary); text-decoration: underline; }
.editor-source {
  width: 100%; min-height: 320px; border: none; outline: none; resize: vertical;
  padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.8; color: #26324a;
}

/* ---------- 附件管理（后台） ---------- */
.attach-box { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.attach-list { display: grid; gap: 8px; margin-bottom: 10px; }
.attach-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 13px;
}
.attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-size { color: var(--muted); font-size: 12px; }
.attach-link { color: var(--primary); font-size: 12.5px; }
.attach-del {
  border: none; background: transparent; color: var(--muted); font-size: 17px;
  cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.attach-del:hover { background: var(--danger-soft); color: var(--danger); }
.attach-add { display: inline-flex; align-items: center; gap: 8px; }
.attach-add input[type=file] { display: none; }
.attach-add span {
  display: inline-block; padding: 7px 14px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px dashed var(--border-strong); font-size: 13px; color: #445069;
}
.attach-add span:hover { border-color: var(--primary); color: var(--primary-dark); }
.attach-empty { color: var(--muted); font-size: 12.5px; padding: 6px 2px; }

/* ---------- 迷你列表（邮件模板等） ---------- */
.mini-list { display: grid; gap: 6px; }
.mini-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none; font-size: 13px;
}
.mini-row:hover { border-color: var(--primary); text-decoration: none; }
.mini-name { flex: 1; font-weight: 550; }
.mini-empty { color: var(--muted); font-size: 12.5px; }

@media (max-width: 900px) {
  .article { padding: 18px; }
  .post-grid { grid-template-columns: 1fr; }
  .featured-row { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .post-search { width: 100%; }
  .post-search input { flex: 1 1 auto; min-width: 0; }
  .et-hint { display: none; }
}

/* ============================================================
   v1.5.1  文章页双栏阅读布局（正文 + 侧栏）
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(268px, 21vw, 336px);
  gap: clamp(16px, 1.5vw, 26px);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}

.article-layout .article { padding: clamp(22px, 2.2vw, 40px); }

.as-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 84px;
}

.as-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e9f2);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 1px 2px rgba(16, 32, 64, .04);
}

.as-card h3 {
  font-size: 13.5px;
  font-weight: 650;
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border, #e5e9f2);
  color: var(--text, #1b2437);
}

.as-cats { display: flex; flex-direction: column; gap: 2px; }

.as-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text, #1b2437);
  transition: background .15s ease, color .15s ease;
}
.as-cat:hover { background: var(--hover, #f3f6fc); color: var(--primary, #2563eb); }
.as-cat.is-active { background: var(--primary-soft, #eaf1ff); color: var(--primary, #2563eb); font-weight: 600; }
.as-cat em { font-style: normal; font-size: 11.5px; color: var(--muted, #8a94a8); }

.as-cta { background: linear-gradient(160deg, #eef4ff, #f7f9ff); }
.as-cta p { font-size: 12.5px; line-height: 1.75; color: var(--muted, #8a94a8); margin: 0 0 12px; }
.as-cta .btn { width: 100%; justify-content: center; }

@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .as-side { position: static; }
}

/* ============================================================
   v1.6  四角导航 / 多位置通知 / 无限广告位 / 多功能广告
   ============================================================ */

/* ---------- 顶部三段式通知条 ---------- */
.top-bar {
  background: linear-gradient(90deg, #101a2e, #1a2740);
  color: #dbe5f8;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.top-bar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 7px var(--page-pad);
  display: flex;
  align-items: center;
  gap: 16px;
}
.tb-zone { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tb-left { flex: 0 0 auto; }
.tb-center { flex: 1 1 auto; justify-content: center; }
.tb-right { flex: 0 0 auto; margin-left: auto; }
.tb-zone:empty { display: none; }
.top-bar .notice-slot { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
@media (max-width: 900px) {
  .top-bar-inner { flex-wrap: wrap; gap: 6px 12px; }
  .tb-center { justify-content: flex-start; order: 3; flex-basis: 100%; }
}

/* ---------- 通知卡片 ---------- */
.notice-slot { display: grid; gap: 10px; margin: 0 0 16px; }
.notice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.7;
}
.notice-icon { flex: 0 0 auto; font-size: 14px; line-height: 1.6; }
.notice-body { flex: 1 1 auto; min-width: 0; }
.notice-title { font-weight: 650; margin-bottom: 2px; }
.notice-text { color: var(--muted); }
.notice-line { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.notice-line b { font-weight: 650; }
.notice-link {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.notice-close {
  flex: 0 0 auto;
  align-self: center;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .45;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.notice-close:hover { opacity: 1; }

.notice-info    { border-color: #cfdcff; background: #f3f7ff; }
.notice-success { border-color: #c2e9d2; background: #f1fbf5; }
.notice-warn    { border-color: #f2dfbc; background: #fffbf1; }
.notice-danger  { border-color: #f6cbc7; background: #fff6f5; }
.notice-promo   { border-color: #e5d4ff; background: linear-gradient(100deg, #f7f1ff, #fdf8ff); }

/* 顶部条里的紧凑通知：透明底、浅色字 */
.notice.notice-compact {
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12.5px;
  color: #dbe5f8;
}
.notice-compact .notice-text { color: inherit; opacity: .8; }
.notice-compact .notice-line { flex-wrap: nowrap; white-space: nowrap; }
.notice-compact .notice-text { overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.notice-compact .notice-icon { font-size: 13px; }
.notice-compact .notice-link { color: #9dc0ff; font-size: 12px; }

/* ---------- 公告条 ---------- */
.ann-top-bar {
  background: linear-gradient(90deg, #1a2740, #243352);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ann-top-bar .ann-slot { display: flex; flex-wrap: nowrap; gap: 0; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad); }
.ann-bar .ann-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12.5px;
  color: #dbe5f8;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}
.ann-bar .ann-icon { flex: 0 0 auto; font-size: 14px; }
.ann-bar .ann-label {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(47,91,234,.3);
  color: #9dc0ff;
}
.ann-bar .ann-title { flex: 0 0 auto; font-weight: 600; color: #fff; }
.ann-bar .ann-text { flex: 1 1 auto; min-width: 0; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-bar .ann-link { flex: 0 0 auto; color: #9dc0ff; font-size: 12px; text-decoration: underline; }
.ann-bar .ann-link:hover { color: #bedaff; }
.ann-bar .ann-close {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: #8ba0c4;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ann-bar .ann-close:hover { color: #fff; }

/* 导航下方 / 首页横幅 / 侧栏：卡片式公告 */
.ann-card { display: grid; gap: 10px; margin: 0 0 16px; }
.ann-card .ann-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.ann-card .ann-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-card .ann-icon { font-size: 16px; }
.ann-card .ann-label {
  padding: 2px 10px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
}
.ann-label-notice      { background: #e3ecff; color: #2f5bea; }
.ann-label-update      { background: #e6f7ed; color: #1a8a4e; }
.ann-label-maintenance { background: #fff3e0; color: #c87800; }
.ann-label-activity    { background: #fce4ec; color: #c1407a; }
.ann-label-warning     { background: #fff3e0; color: #b85c00; }
.ann-card .ann-pin { padding: 1px 6px; border-radius: 4px; font-size: 11px; background: #fff3cd; color: #856404; }
.ann-card .ann-title { font-weight: 650; font-size: 14px; }
.ann-card .ann-content { font-size: 13px; line-height: 1.7; color: var(--muted); }
.ann-card .ann-link {
  align-self: flex-start;
  padding: 4px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.ann-card .ann-link:hover { opacity: .88; }

/* 级别边框色 */
.ann-level-1 { border-left: 3px solid var(--primary); }
.ann-level-2 { border-left: 3px solid #f0ad4e; }
.ann-level-3 { border-left: 3px solid #d9534f; }
.ann-pinned { box-shadow: 0 0 0 1px rgba(47,91,234,.15); }

@media (max-width: 700px) {
  .ann-bar .ann-text { display: none; }
  .ann-bar .ann-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- 四角导航 ---------- */
.corner-nav {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.corner-nav > * { pointer-events: auto; }
/* 顶部两个角默认让开「通知条 + 站点页头」，避免压住 Logo 与登录按钮 */
.corner-tl { top: var(--cn-top, 104px); left: 12px; align-items: flex-start; }
.corner-tr { top: var(--cn-top, 104px); right: 12px; align-items: flex-end; }

/* 顶部角标安全带：页头之下预留一条空带，角标落在带内，正文从带下开始，
   这样通知条 / 页面标题 / 首屏广告都不会被压住（≤900px 时角标隐藏，无需留白）。 */
body.has-top-corners .public-head { margin-bottom: 70px; }
@media (max-width: 900px) {
  body.has-top-corners .public-head { margin-bottom: 0; }
}
.corner-bl { bottom: 14px; left: 12px; align-items: flex-start; }
.corner-br { bottom: 14px; right: 12px; align-items: flex-end; }

.cn-block {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(16, 32, 64, .12);
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 124px;
  max-width: 208px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.cn-block:hover { box-shadow: 0 12px 34px rgba(16, 32, 64, .18); }
.cn-title {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  padding: 3px 9px 6px;
  letter-spacing: .02em;
}
.cn-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text);
  transition: background .15s ease, color .15s ease;
}
.cn-link:hover { background: var(--primary-soft); color: var(--primary); }
.cn-icon { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.cn-label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 1.6;
  padding: 0 5px;
  border-radius: 999px;
}

/* 胶囊样式 */
.cn-pill .cn-link { border-radius: 999px; }
/* 横向条样式 */
.cn-bar { flex-direction: row; flex-wrap: wrap; max-width: 420px; }
.cn-bar .cn-link { padding: 6px 12px; }
/* 圆形悬浮球 */
.cn-fab { flex-direction: row; gap: 8px; border-radius: 999px; padding: 7px; min-width: 0; max-width: none; }
.cn-fab .cn-link {
  position: relative;
  width: 42px;
  height: 42px;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}
.cn-fab .cn-link:hover { background: var(--primary); color: #fff; }
.cn-fab .cn-icon { font-size: 16px; }
.cn-fab-tip {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: #16223a;
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.corner-tl .cn-fab-tip, .corner-bl .cn-fab-tip { right: auto; left: 50px; }
.cn-fab .cn-link:hover .cn-fab-tip { opacity: 1; }

@media (max-width: 900px) {
  .cn-block { min-width: 0; padding: 6px; border-radius: 12px; }
  .cn-title { display: none; }
  .cn-label { display: none; }
  .cn-link { padding: 8px; }
  .cn-fab .cn-link { width: 38px; height: 38px; }
  .corner-tl, .corner-tr { top: 8px; }
  .corner-bl, .corner-br { bottom: 8px; }
}

/* ---------- 左右侧栏（有广告才出现） ---------- */
.page-rails { display: flex; gap: clamp(12px, 1.2vw, 22px); align-items: flex-start; }
.page-rails-main { flex: 1 1 auto; min-width: 0; }
.rail { flex: 0 0 auto; position: sticky; top: 84px; }
.rail-left { width: clamp(120px, 9vw, 168px); }
.rail-right { width: clamp(220px, 17vw, 312px); }
.rail .ad-slot { max-width: none; padding: 0; margin: 0 0 12px; }
.rail .ad-item { margin-bottom: 12px; }
.rail .ad-item:last-child { margin-bottom: 0; }
.rail .notice-slot { margin: 0 0 12px; gap: 8px; }
.rail .notice { padding: 10px 12px; font-size: 12.5px; border-radius: 10px; }
.rail .notice-slot:last-child { margin-bottom: 0; }
@media (max-width: 1400px) { .rail-left { display: none; } }
@media (max-width: 1100px) { .rail-right { display: none; } }

/* 列表流内嵌广告占满整行 */
.post-grid-ad { grid-column: 1 / -1; }
.post-grid-ad .ad-slot { padding: 0; margin: 0; max-width: none; }

/* ---------- 多功能广告形态 ---------- */
.ad-item { position: relative; }
.ad-banner > a, .ad-banner > span { display: block; }

.ad-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(16, 24, 40, .55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ad-close:hover { background: rgba(16, 24, 40, .82); }

.ad-card, .ad-float {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 32, 64, .04);
}
.ad-card-media img, .ad-card-media video { display: block; width: 100%; height: auto; }
.ad-card-body { padding: 12px 14px 14px; }
.ad-card-title { display: block; font-size: 14px; font-weight: 650; color: var(--text); line-height: 1.5; }
a.ad-card-title:hover { color: var(--primary); }
.ad-card-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.ad-card-text { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.ad-card-btn { margin-top: 10px; }

.ad-float {
  position: fixed;
  right: 18px;
  bottom: 96px;
  width: min(320px, calc(100vw - 36px));
  z-index: 70;
  box-shadow: 0 16px 44px rgba(16, 32, 64, .2);
}
@media (max-width: 640px) {
  .ad-float { right: 10px; bottom: 78px; width: min(260px, calc(100vw - 20px)); }
}

.ad-sticky { position: sticky; top: 84px; }

.ad-marquee {
  overflow: hidden;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid #f4e2bb;
}
.ad-marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ad-marquee-scroll 20s linear infinite;
  will-change: transform;
}
.ad-marquee-track.is-static { animation: none; }
.ad-marquee-item { display: inline-flex; padding: 9px 22px 9px 16px; }
.ad-marquee-item a { color: #8a5a00; }
@keyframes ad-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ad-marquee-track { animation: none; }
}

/* ---------- 登录 / 注册页双栏 ---------- */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
.auth-main { min-width: 0; }
.auth-main .card { margin-bottom: 14px; }
.auth-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-side .ad-slot { padding: 0; margin: 0; max-width: none; }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; max-width: 480px; }
}

/* ---------- 后台：链接重复器 ---------- */
.links-box {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-2);
}
.links-list { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1.7fr) 62px 74px 90px;
  gap: 8px;
  align-items: center;
}
.link-row input[type=text] { padding: 8px 10px; font-size: 13px; }
.lr-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.lr-ops { display: flex; gap: 4px; justify-content: flex-end; }
.lr-ops button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: var(--text);
}
.lr-ops button:hover { border-color: var(--primary); color: var(--primary); }
.lr-ops button.danger { color: var(--danger); border-color: #f3cbc7; }
.links-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
@media (max-width: 900px) {
  .link-row { grid-template-columns: 1fr 1fr; }
  .lr-ops { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- 顶部两个角：默认收成图标，悬停展开文字 ----------
   顶部区域有通知条、页头与首屏广告，常驻文字块会遮挡内容；
   收起后只占一个图标宽度，鼠标移上去再展开，兼顾可见性与整洁。 */
.corner-tl .cn-block,
.corner-tr .cn-block {
  min-width: 0;
  padding: 6px;
  border-radius: 999px;
}
.corner-tl .cn-block .cn-title,
.corner-tr .cn-block .cn-title,
.corner-tl .cn-block .cn-label,
.corner-tr .cn-block .cn-label { display: none; }
.corner-tl .cn-link,
.corner-tr .cn-link { justify-content: center; padding: 7px 9px; }
.corner-tl .cn-block:hover,
.corner-tr .cn-block:hover { min-width: 132px; border-radius: 14px; }
.corner-tl .cn-block:hover .cn-title,
.corner-tr .cn-block:hover .cn-title,
.corner-tl .cn-block:hover .cn-label,
.corner-tr .cn-block:hover .cn-label { display: block; }
.corner-tl .cn-block:hover .cn-link,
.corner-tr .cn-block:hover .cn-link { justify-content: flex-start; }
.corner-tl .cn-bar,
.corner-tr .cn-bar { max-width: none; }

/* ---------- 四角导航：统一「图标常驻 + 悬停展开文字」 ----------
   四角都是悬浮层，常驻文字块必然压住正文（商品卡、文章、表单）。
   收起后只占一个图标的宽度，悬停再展开完整文字，鼠标移开自动收回。 */
.corner-nav .cn-block {
  min-width: 0;
  padding: 6px;
  border-radius: 999px;
}
.corner-nav .cn-block .cn-title,
.corner-nav .cn-block .cn-label { display: none; }
.corner-nav .cn-link { justify-content: center; padding: 7px 9px; }
.corner-nav .cn-block:hover {
  min-width: 132px;
  border-radius: 14px;
  padding: 7px;
}
.corner-nav .cn-block:hover .cn-title,
.corner-nav .cn-block:hover .cn-label { display: block; }
.corner-nav .cn-block:hover .cn-link { justify-content: flex-start; padding: 7px 9px; }
.corner-nav .cn-bar { max-width: none; }

/* 圆形悬浮球保持自身尺寸，不被上面的通用规则影响 */
.corner-nav .cn-fab { padding: 7px; border-radius: 999px; }
.corner-nav .cn-fab .cn-link { padding: 0; justify-content: center; }
.corner-nav .cn-fab:hover { min-width: 0; border-radius: 999px; }
.corner-nav .cn-fab:hover .cn-label { display: none; }

/* ---------- 手机端：顶部两角自动隐藏 ----------
   小屏上通知条会折成 2-3 行、页头也更高，顶部两角无论怎么放都会压住内容；
   底部两角保留（更常用），并把尺寸再收一档。 */
@media (max-width: 900px) {
  .corner-tl, .corner-tr { display: none; }
  .corner-nav .cn-block { padding: 5px; }
  .corner-nav .cn-link { padding: 6px; }
  .corner-nav .cn-icon { font-size: 15px; }
  .corner-bl { bottom: 10px; left: 8px; }
  .corner-br { bottom: 10px; right: 8px; }
}

/* ---------- 广告标识（v1.7）----------
   每个广告位都带一个「广告」角标，演示素材再加「演示」标签，
   避免访客把广告误当成站内内容。 */
.ad-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  gap: 4px;
  pointer-events: none;
}
.ad-badge {
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(17, 24, 39, .62);
  color: #fff;
  letter-spacing: .06em;
  white-space: nowrap;
}
.ad-badge-demo { background: rgba(47, 91, 234, .85); }
.ad-marquee .ad-badges { top: 4px; right: 6px; }
.ad-sticky .ad-badges { top: 6px; right: 6px; }

/* ---------- 广告 / 通知 富文本排版（v1.7） ---------- */
.ad-rich { font-size: 13px; line-height: 1.7; }
.ad-rich > :first-child { margin-top: 0; }
.ad-rich > :last-child { margin-bottom: 0; }
.ad-rich p { margin: 0 0 6px; }
.ad-rich ul, .ad-rich ol { margin: 4px 0 6px; padding-left: 20px; }
.ad-rich h2, .ad-rich h3 { font-size: 15px; margin: 6px 0; }
.ad-rich a { color: var(--primary); }
.ad-rich code {
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.ad-rich img { max-width: 100%; height: auto; border-radius: 8px; }
.ad-rich blockquote {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
.ad-card-text .ad-rich { font-size: 12.5px; color: var(--muted); }
.ad-sticky .ad-rich { font-size: 12.5px; line-height: 1.6; }
.ad-sticky .ad-rich p { margin: 0 0 5px; }
.ad-banner .ad-rich { padding: 14px 16px; }

.notice-rich { color: var(--text); }
.notice-rich > :first-child { margin-top: 0; }
.notice-rich > :last-child { margin-bottom: 0; }
.notice-rich p { margin: 0 0 4px; }
.notice-rich ul, .notice-rich ol { margin: 4px 0; padding-left: 18px; }
.notice-rich a { color: var(--primary); }
.notice-rich img { max-width: 100%; height: auto; border-radius: 8px; }
.notice-rich code {
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

/* ---------- 注册页：奖励提示 / 分组标题 / 自定义字段（v1.7） ---------- */
.reg-bonus {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.reg-bonus-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  background: linear-gradient(135deg, rgba(47, 91, 234, .10), rgba(47, 91, 234, .04));
  border: 1px solid rgba(47, 91, 234, .22);
  color: var(--text);
}
.reg-bonus-item b { color: var(--primary); }

.form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}
.form-divider span { flex: 0 0 auto; }

.cf-choices { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0; }
.cf-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.cf-choice input { width: auto; margin: 0; }

.help.ok { color: var(--primary); }

/* ---------- 会员中心：邀请卡片（v1.7） ---------- */
.invite-card { display: grid; gap: 14px; }
.invite-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  color: var(--text);
}
.invite-link {
  flex: 1 1 260px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invite-stats { display: flex; flex-wrap: wrap; gap: 24px; }
.invite-stat { min-width: 96px; }
.invite-stat b { display: block; font-size: 20px; line-height: 1.3; }
.invite-stat span { font-size: 12px; color: var(--muted); }
