/* ============================================================
   柒柒资源社区 SourceVault · 前台 / 后台样式（简约版）
   ------------------------------------------------------------
   设计原则：
     · 大留白、细描边、单一主色点缀、大字号标题
     · 不堆装饰层：没有渐变光晕、没有玻璃拟态、没有阴影森林
     · 卡片一律 1px 细边 + 12px 圆角，hover 只做轻微位移和描边加深
   主色由后台「站点设置 → 主色」注入到 --brand。
   ============================================================ */

/* ---------- 基础变量 ---------- */
:root {
  --brand: #2563eb;
  --brand-2: #7c5cff;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --line: #e6e8ec;
  --line-strong: #d3d7de;
  --text: #14181f;
  --text-2: #4a5158;
  --muted: #8b929c;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --gap: 22px;
  --max: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #12151b;
  --surface: #161a21;
  --surface-2: #1c2129;
  --line: #262c36;
  --line-strong: #333b47;
  --text: #e9ecf1;
  --text-2: #b6bdc7;
  --muted: #8b929c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
h1 { font-size: clamp(24px, 3.4vw, 34px); }
h2 { font-size: clamp(19px, 2.2vw, 23px); }
h3 { font-size: 16px; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

input, select, textarea, button { font: inherit; color: inherit; }

input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 90px; }
input[type="file"] { padding: 9px 0; border: 0; background: none; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.center { text-align: center; }
.wide { width: 100%; }
.inline { display: inline-block; }
.lg { font-size: 18px; }
.xl { width: 56px; height: 56px; font-size: 22px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary {
  /* 底色写死一份兜底：万一主题变量被清空/填错，按钮也不会变成「白底白字」而看不见 */
  background-color: #2563eb;
  background-color: var(--brand, #2563eb);
  color: #fff;
}
.btn-primary:hover { background-color: var(--brand, #2563eb); color: #fff; filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-glass { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-glass:hover { background: var(--surface); border-color: var(--line-strong); }
.btn-danger { background: transparent; border-color: var(--line); color: var(--bad); }
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn-xs { padding: 5px 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn svg, .btn .sv-ic { width: 16px; height: 16px; }

/* 立即购买：付费源码专用红按钮（比主色更抓眼） */
.btn-buy {
  background: linear-gradient(135deg, #ff4d4f 0%, #d91e2c 100%);
  border-color: #d91e2c;
  color: #fff;
  letter-spacing: .5px;
  box-shadow: 0 6px 18px rgba(217, 30, 44, .26);
}
.btn-buy:hover { background: linear-gradient(135deg, #ff5f61 0%, #e4242f 100%); color: #fff; filter: brightness(1.03); }
.btn-buy:active { transform: none; }
.btn-buy svg, .btn-buy .sv-ic { width: 18px; height: 18px; }

/* ---------- 顶栏 ---------- */
.sv-topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.sv-burger {
  display: inline-flex; flex-direction: column; gap: 4px;
  width: 38px; height: 34px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.sv-burger span { display: block; width: 16px; height: 1.6px; background: var(--text); border-radius: 2px; }
.sv-burger:hover { border-color: var(--line-strong); }

.sv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sv-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .5px;
}
.sv-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sv-brand-text strong { font-size: 15.5px; }
.sv-brand-text em { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

.sv-topsearch { display: flex; align-items: center; gap: 0; margin-left: auto; max-width: 420px; flex: 1; }
.sv-topsearch input { border-radius: var(--r-sm) 0 0 var(--r-sm); border-right: 0; }
.sv-topsearch button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 42px; border: 1px solid var(--line); border-left: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); cursor: pointer;
}

.sv-topact { display: flex; align-items: center; gap: 8px; }
.sv-theme-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; cursor: pointer; }
.sv-theme-btn .ico-sun { display: none; }
[data-theme="light"] .sv-theme-btn .ico-moon { display: none; }
[data-theme="light"] .sv-theme-btn .ico-sun { display: inline; }
.sv-userchip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: var(--r-pill); }
.sv-username { font-size: 13.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 13px;
}

/* ---------- 抽屉导航 ---------- */
.sv-scrim {
  position: fixed; inset: 0; background: rgba(10, 12, 16, .38); z-index: 70;
  opacity: 0; transition: opacity .22s ease;
}
.sv-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 80;
  width: 280px; padding: 18px 16px 24px;
  background: var(--surface); border-right: 1px solid var(--line);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .22s ease;
}
.sv-sidebar.open { transform: none; }
/* 兜底：脚本给 body 打了 nav-open，抽屉也一定能滑出来 */
body.nav-open { overflow: hidden; }
body.nav-open .sv-sidebar { transform: none; }
body.nav-open .sv-scrim:not([hidden]) { opacity: 1; }
.sv-side-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sv-side-head strong { font-size: 15px; }
.sv-side-head em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.sv-side-close { margin-left: auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; cursor: pointer; }
.sv-side-user { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sv-side-user strong { display: block; font-size: 14px; }
.sv-side-user em { font-style: normal; font-size: 12px; color: var(--muted); }
.sv-side-cta { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sv-side-cta p { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sv-side-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; }
.sv-side-nav.bottom { border-top: 1px solid var(--line); }
.sv-side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: 14.5px; color: var(--text-2);
}
.sv-side-link .ic { display: inline-flex; width: 18px; }
.sv-side-link:hover { background: var(--surface-2); color: var(--text); }
.sv-side-link.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.sv-side-link.active .ic { color: var(--brand); }
.sv-side-group { padding: 12px 0; border-top: 1px solid var(--line); }
.sv-side-group h4 { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 9px; }
.sv-side-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-side-tags a { padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 12.5px; color: var(--text-2); }
.sv-side-foot { padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- 主区域 ---------- */
.sv-main { max-width: var(--max); margin: 0 auto; padding: 26px 22px 60px; }
.sv-announce {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); font-size: 13.5px; color: var(--text-2);
}
.sv-announce .tag { flex: none; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12px; color: var(--muted); }
/* 公告跑马灯：从右往左匀速滚，鼠标移上去停住 */
.sv-announce .sv-announce-track { flex: 1 1 auto; position: relative; overflow: hidden; height: 20px; min-width: 0; }
.sv-announce .sv-announce-text {
  position: absolute; left: 0; top: 0; white-space: nowrap; padding-left: 100%;
  will-change: transform; animation: svAnnounceScroll 20s linear infinite;
}
.sv-announce:hover .sv-announce-text { animation-play-state: paused; }
@keyframes svAnnounceScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .sv-announce .sv-announce-text { animation: none; padding-left: 0; position: static; }
  .sv-announce .sv-announce-track { height: auto; overflow: visible; }
}
.sv-flash { padding: 11px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; background: var(--surface); }
.sv-flash.success { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); color: var(--ok); }
.sv-flash.error { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); color: var(--bad); }
.sv-flash.info { color: var(--text-2); }

.sv-glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- 首页横幅 ---------- */
.sv-hero {
  position: relative; overflow: hidden;
  padding: 48px 0 40px; margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.sv-hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sv-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .09; }
.sv-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 42%, transparent 100%);
}
.sv-hero > * { position: relative; z-index: 2; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: 40px; align-items: center;
}
.sv-pill {
  display: inline-block; padding: 4px 12px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--muted);
}
.hero-copy h1 { margin-bottom: 12px; }
.hero-copy p { color: var(--text-2); font-size: 16px; max-width: 560px; }
.sv-hero-act { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 16px; }
.hero-trust { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.hero-trust .sv-ic, .hero-trust svg { color: var(--brand); flex: none; }

.hero-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: transform .16s ease, border-color .16s ease;
}
.hero-stat:hover { transform: translateY(-2px); border-color: var(--line-strong); color: inherit; }
.hero-stat strong { font-size: 25px; letter-spacing: -.02em; }
.hero-stat span { font-size: 12.5px; color: var(--muted); }
.hero-side-foot { margin: 12px 2px 0; font-size: 12.5px; color: var(--muted); }

/* ---------- 首页三个入口卡 ---------- */
.zone-entry {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.zone-card {
  display: flex; flex-direction: column; gap: 7px;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: transform .16s ease, border-color .16s ease;
}
.zone-card:hover { transform: translateY(-3px); border-color: var(--line-strong); color: inherit; }
.zone-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 4px;
  border-radius: 10px; background: var(--surface-2); font-size: 19px;
}
.zone-card h3 { font-size: 17px; }
.zone-card p { font-size: 13px; color: var(--muted); }
.zone-num {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  font-size: 13px; font-weight: 600; color: var(--brand);
}
.zone-card.paid .zone-ic { background: rgba(217, 30, 44, .10); color: #d91e2c; }
.zone-card.free .zone-ic { background: rgba(22, 163, 74, .10); color: var(--ok); }
.zone-card.tut .zone-ic { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }

.sv-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 34px; }
.sv-cats-label { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.sv-cat-chip { padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 13.5px; color: var(--text-2); }
.sv-cat-chip:hover { border-color: var(--line-strong); color: var(--text); }
.sv-cat-chip.all { border-color: var(--brand); color: var(--brand); }

/* ---------- 区块 ---------- */
.sv-section { margin-bottom: 44px; }
.sv-sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.sv-sec-head h2 { display: flex; align-items: center; gap: 8px; }
.sv-sec-head .more { margin-left: auto; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.sv-sec-head .more:hover { color: var(--brand); }
.sv-sec-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.zone-count { font-size: 13px; font-weight: 500; color: var(--muted); }
.zone-more { margin-top: 18px; text-align: center; }
.sv-result-count { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }

.sv-page-head { margin-bottom: 24px; }
.sv-page-head h1 { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.sv-page-head p { color: var(--text-2); max-width: 720px; }
.sv-crumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 7px; }
.sv-crumb em { font-style: normal; color: var(--text-2); }

/* ---------- 分区切换 / 筛选 ---------- */
.zone-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.zone-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 14px; color: var(--text-2);
}
.zone-tab b { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.zone-tab:hover { border-color: var(--line-strong); color: var(--text); }
.zone-tab.active { border-color: var(--brand); color: var(--brand); }
.zone-tab.active b { color: var(--brand); }

.sv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.sv-search { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.sv-sorts { display: flex; flex-wrap: wrap; gap: 4px; }
.sv-sorts .sort { padding: 7px 12px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--muted); }
.sv-sorts .sort:hover { background: var(--surface-2); color: var(--text); }
.sv-sorts .sort.active { background: var(--surface-2); color: var(--text); font-weight: 600; }

.sv-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.chip { padding: 5px 13px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 13px; color: var(--text-2); }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { border-color: var(--brand); color: var(--brand); }
.sv-filter-sep { width: 1px; background: var(--line); }

/* ---------- 源码卡片 ---------- */
.pdd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pdd-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.pdd-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pdd-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.pdd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdd-free, .pdd-hot, .pdd-cat {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600;
  background: var(--brand); color: #fff;
}
.pdd-free { background: var(--ok); }
.pdd-hot { background: var(--warn); }
.pdd-cat { left: auto; right: 10px; background: rgba(20, 24, 31, .62); color: #fff; font-weight: 500; }
.pdd-body { display: flex; flex-direction: column; gap: 8px; padding: 13px 14px 14px; flex: 1; }
.pdd-title { font-size: 14.5px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdd-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pdd-tags i { font-style: normal; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 11.5px; color: var(--muted); }
.pdd-foot { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.pdd-price { font-size: 18px; font-weight: 700; color: var(--brand); }
.pdd-price em { font-style: normal; font-size: 12.5px; }
.pdd-price.free { color: var(--ok); font-size: 15px; }
.pdd-orig { font-size: 12.5px; color: var(--muted); }
.pdd-sold { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------- 教程卡片 ---------- */
.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.tut-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.tut-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tut-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.tut-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tut-type { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: var(--r-pill); background: rgba(20, 24, 31, .62); color: #fff; font-size: 11.5px; }
.tut-type.video { background: var(--brand); }
.tut-type.resource { background: var(--ok); }
.tut-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.tut-play svg { width: 42px; height: 42px; }
.tut-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tut-body h3 { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tut-body p { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tut-meta { display: flex; gap: 14px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.tut-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 分享卡片 ---------- */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.share-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.share-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.share-thumb { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.share-thumb img { width: 100%; height: 100%; object-fit: cover; }
.share-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.share-kind { align-self: flex-start; padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 11.5px; color: var(--muted); }
.share-body h3 { font-size: 15px; }
.share-body p { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-foot { display: flex; gap: 14px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.share-foot span { display: inline-flex; align-items: center; gap: 4px; }
.share-has { color: var(--ok); }

/* ---------- 分享详情 ---------- */
.share-detail { max-width: 820px; }
.share-head h1 { margin-bottom: 10px; }
.share-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.share-meta span { display: inline-flex; align-items: center; gap: 5px; }
.share-sum { color: var(--text-2); margin-top: 10px; }
.share-cover { margin: 20px 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.share-get { margin-top: 26px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.share-get h3 { margin-bottom: 14px; }
.share-link-raw { font-family: var(--mono); font-size: 12px; word-break: break-all; margin-top: 10px; }
.share-note { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }

/* ---------- 工单 ---------- */
.tk-list { display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; margin: 0; }
.tk-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-head strong { font-size: 15px; }
.tk-kind { padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 11.5px; color: var(--muted); }
.tk-status { margin-left: auto; font-size: 12.5px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.tk-status.open { color: var(--warn); }
.tk-status.replied { color: var(--ok); }
.tk-time { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; }
.tk-body { font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.tk-reply { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14px; }
.tk-reply b { display: block; font-size: 12.5px; color: var(--brand); margin-bottom: 6px; }
.tk-reply em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 6px; }
.tk-close { margin-top: 10px; }

/* ---------- 子代理页 ---------- */
.agent-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.agent-card { padding: 20px; }
.agent-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.agent-card p { font-size: 13.5px; color: var(--muted); }
.perm-list { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.perm-list li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; }
.perm-list li.on { color: var(--text); }
.perm-list li.off { color: var(--muted); }
.perm-list li.on svg { color: var(--ok); }
.agent-pick { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 面板 / 表单 ---------- */
.panel { padding: 22px; margin-bottom: 22px; }
.panel h2 { margin-bottom: 12px; }
.form-panel h2 { font-size: 17px; margin: 18px 0 12px; }
.form-panel h2:first-child { margin-top: 0; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.form-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
.form-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
.switch, .switch-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.switch input, .switch-row input { width: auto; }
.cur-img { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 8px; }
.sv-agree-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); }
.sv-agree-row input { width: auto; margin-top: 3px; }

/* ---------- 空状态 / 分页 ---------- */
.sv-empty { padding: 46px 20px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); }
.sv-empty .dot { display: inline-flex; margin-bottom: 10px; color: var(--muted); }
.sv-empty p { font-size: 15px; color: var(--text-2); margin-bottom: 4px; }
.sv-empty small { font-size: 13px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.pg-item { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; color: var(--text-2); }
.pg-item:hover { border-color: var(--line-strong); color: var(--text); }
.pg-item.active { border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ---------- 会员中心 ---------- */
.member-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; margin-bottom: 20px; }
.member-id h1 { font-size: 22px; margin-bottom: 4px; }
.member-stat { display: flex; gap: 28px; margin-left: auto; }
.member-stat div { display: flex; flex-direction: column; }
.member-stat strong { font-size: 20px; }
.member-stat span { font-size: 12.5px; color: var(--muted); }
.member-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.member-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 13.5px; color: var(--text-2); }
.member-tabs a:hover { border-color: var(--line-strong); color: var(--text); }
.member-tabs a.active { border-color: var(--brand); color: var(--brand); }

.order-list, .dl-list, .sub-list, .post-list, .mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.order-item { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); }
.order-item img { width: 62px; height: 44px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.oi-main { flex: 1; min-width: 180px; }
.oi-title { font-size: 14.5px; font-weight: 600; }
.oi-no { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.oi-price { font-weight: 700; }
.oi-status { font-size: 12.5px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.oi-status.paid { color: var(--ok); }
.oi-status.pending { color: var(--warn); }
.oi-act { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); }
.dl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.dl-head img { width: 72px; height: 50px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.dl-files { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; }
.dl-btn:hover { border-color: var(--brand); color: var(--brand); }
.dl-btn b { font-weight: 500; color: var(--muted); font-size: 12px; }
.sub-item { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.sub-kind { font-size: 12px; padding: 2px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.sub-main { flex: 1; min-width: 160px; }
.sub-main strong { font-size: 14.5px; }
.sub-main em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sub-status { font-size: 12.5px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.sub-status.ok { color: var(--ok); }
.sub-status.bad { color: var(--bad); }
.sub-status.wait { color: var(--warn); }
.post-list li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.post-list li:last-child { border-bottom: 0; }
.post-list em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--muted); }

/* ---------- 详情页 ---------- */
.detail-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.detail-card { padding: 24px; }
.detail-cover { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 20px; }
.detail-cover.wide img { width: 100%; }
.detail-info h1 { margin-bottom: 12px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-tags i { font-style: normal; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.detail-sum { color: var(--text-2); border-left: 3px solid var(--line); padding-left: 14px; margin-bottom: 18px; }
.detail-side { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.side-card h3 { margin-bottom: 6px; }
.buy-box { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.buy-price { display: flex; align-items: baseline; gap: 8px; }
.buy-price strong { font-size: 30px; font-weight: 800; }
.buy-price em { font-style: normal; color: var(--muted); font-size: 13px; }
.buy-price.free strong { color: var(--ok); }
.buy-price.free em { display: block; }
.buy-price s { font-size: 13px; color: var(--muted); }
.buy-admin { border-top: 1px dashed var(--line-strong); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.buy-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.buy-tip { font-size: 12.5px; color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; }
.file-list .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fs { font-size: 12px; color: var(--muted); }
.file-list .fcode { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 8px; }
.file-list .fl { font-size: 13px; color: var(--brand); display: inline-flex; align-items: center; gap: 5px; }
.file-list.locked .fl { color: var(--muted); }
.tut-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 18px; }
.tut-gallery .gal-item { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.author-box { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.cmt-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.cmt-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.cmt-form { margin-top: 18px; }
.video-box, .video-embed { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.video-box video, .video-embed iframe { width: 100%; display: block; aspect-ratio: 16 / 9; border: 0; }
.quote { border-left: 3px solid var(--line); padding-left: 14px; color: var(--text-2); }
.step-list { padding-left: 20px; color: var(--text-2); }
.step-list li { margin-bottom: 8px; }
.tagline { font-size: 13px; color: var(--muted); }

/* ---------- Markdown 正文 ---------- */
.md-body { font-size: 15.5px; line-height: 1.85; color: var(--text-2); }
.md-body h2, .md-body h3 { color: var(--text); margin: 22px 0 10px; }
.md-body p { margin: 0 0 12px; }
.md-body ul, .md-body ol { padding-left: 22px; margin: 0 0 12px; }
.md-body li { margin-bottom: 6px; }
.md-body code { font-family: var(--mono); font-size: 13.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.md-body pre { background: var(--surface-2); padding: 14px; border-radius: var(--r-sm); overflow-x: auto; }
.md-body pre code { background: none; padding: 0; }
.md-hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.md-quote { border-left: 3px solid var(--line); padding-left: 14px; color: var(--muted); margin: 0 0 12px; }
.md-body a { color: var(--brand); }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-foot { margin-top: 16px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---------- 注册方式切换 ---------- */
.reg-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--surface-2); border-radius: var(--r-sm);
}
.reg-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 6px; border: 0; border-radius: 6px; background: none;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.reg-tab:hover { color: var(--text); }
.reg-tab.active { background: var(--surface); color: var(--brand); }
.reg-pane[hidden] { display: none; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; }
.code-btn { flex: none; white-space: nowrap; }
.code-btn[disabled] { opacity: .6; cursor: default; }
.field-hint { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.reg-more { margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.reg-more > summary { cursor: pointer; padding: 6px 0; list-style: none; }
.reg-more > summary::-webkit-details-marker { display: none; }
.reg-more > summary::before { content: "+ "; color: var(--brand); font-weight: 700; }
.reg-more[open] > summary::before { content: "- "; }
.reg-more .form-row:first-of-type { margin-top: 10px; }

/* ---------- 底部 ---------- */
.sv-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 40px; }
.sv-footer-cols { max-width: var(--max); margin: 0 auto; padding: 34px 22px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.sv-footer-cols strong { font-size: 15px; }
.sv-footer-cols h4 { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sv-footer-cols a, .sv-footer-cols p { display: block; font-size: 13.5px; color: var(--text-2); margin-bottom: 7px; }
.sv-footer-cols a:hover { color: var(--brand); }
.sv-link-blue { color: var(--brand) !important; }
.sv-footer-bar { max-width: var(--max); margin: 0 auto; padding: 14px 22px 26px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sv-footer-legal { display: flex; gap: 14px; }

/* ---------- 首次进站弹窗 ---------- */
.sv-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sv-modal-mask { position: absolute; inset: 0; background: rgba(10, 12, 16, .5); }
.sv-modal-card { position: relative; width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.sv-modal-body h3 { font-size: 20px; margin-bottom: 12px; }
.sv-modal-text { font-size: 14.5px; color: var(--text-2); }
.sv-modal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.sv-capsule {
  display: inline-flex; align-items: center; padding: 9px 20px;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
}
.sv-capsule:hover { border-color: var(--brand); color: var(--brand); }
.sv-modal-foot .btn { margin-left: auto; }

/* ---------- 上传进度 / 灯箱 / 挑战页 ---------- */
.sv-progress { display: none; margin-top: 10px; }
.sv-progress.on { display: block; }
.sv-progress-bar { height: 6px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.sv-progress-bar > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.sv-progress-text { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sv-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10, 12, 16, .85); display: flex; align-items: center; justify-content: center; padding: 24px; }
.sv-lightbox img { max-width: 100%; max-height: 90vh; border-radius: var(--r-sm); }
.sv-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--r-sm); background: none; cursor: pointer; }
.sv-error-page { max-width: 560px; margin: 60px auto; text-align: center; }
.sv-error-card { padding: 30px; }
.sv-captcha { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface-2); }
.sv-captcha-label { font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.sv-cap-pic { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.sv-cap-img .sv-cap-pic { margin-bottom: 8px; }
.sv-cap-img, .sv-cap-custom { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.sv-cap-refresh { font-size: 13px; color: var(--brand); cursor: pointer; }
.sv-cap-token { display: none; }
.challenge { padding: 20px; border: 1px solid var(--line); border-radius: var(--r); }
.taunt { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); font-family: var(--mono); font-size: 13px; }

/* ---------- 图标 ---------- */
.sv-ic { width: 17px; height: 17px; flex: none; }
.ic { display: inline-flex; align-items: center; }
svg { fill: currentColor; }

/* ============================================================
   支付 / 订单页
   ============================================================ */
.pay-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.pay-card { padding: 24px; }
.pay-head { margin-bottom: 18px; }
.pay-prod { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.pay-prod img { width: 84px; height: 56px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.pay-amount { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }
.pay-amount strong { font-size: 30px; font-weight: 800; color: var(--brand); }
.pay-amount-line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.pay-method-area { margin: 18px 0; }
.paym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.paym-item { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; text-align: center; cursor: pointer; }
.paym-item:hover { border-color: var(--line-strong); }
.paym-item input { display: none; }
.paym-head { font-size: 13.5px; font-weight: 600; }
.paym-inner { font-size: 12.5px; color: var(--muted); }
.paym-qr { margin-top: 8px; border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.paym-qr-cur { font-size: 12px; color: var(--brand); }
.paym-tip, .paym-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.paym-account { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.paym-go { margin-top: 12px; }
.paym-empty { color: var(--muted); font-size: 13.5px; }
.paym-admin-list { display: flex; flex-direction: column; gap: 12px; }
.paym-admin-item { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.pay-form { margin-top: 16px; }
.pay-note-box { margin-top: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 13.5px; color: var(--text-2); }
.pay-side { display: flex; flex-direction: column; gap: 16px; }
.pay-info { font-size: 13.5px; color: var(--text-2); }
.pay-ok { color: var(--ok); font-weight: 600; }
.pay-submitted { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; }
.proof-link { color: var(--brand); font-size: 13px; }

/* ============================================================
   后台
   ============================================================ */
.ad-body { background: var(--bg-soft); font-size: 14.5px; }
.ad-topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.ad-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ad-topact { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ad-sidebar { top: 0; z-index: 80; }
.ad-sidebar.open { transform: none; }
.ad-badge { margin-left: auto; padding: 1px 7px; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: 11px; }
.ad-main { max-width: 1200px; margin: 0 auto; padding: 24px 22px 60px; }
.ad-head { margin-bottom: 20px; }
.ad-head h1 { font-size: 24px; }
.ad-h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.ad-h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 6px; }
.ad-panel { padding: 22px; margin-bottom: 22px; }
.ad-panel h2 { font-size: 17px; margin-bottom: 14px; }
.ad-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.ad-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-filter input, .ad-filter select { width: auto; min-width: 180px; }
.ad-form { margin: 0; }
.ad-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ad-table th, .ad-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ad-table th { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ad-table tr:hover td { background: var(--surface-2); }
.ad-warn { padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); border-radius: var(--r); color: var(--warn); font-size: 13.5px; margin-bottom: 14px; }
.ad-quick { display: flex; flex-wrap: wrap; gap: 10px; }
.ad-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.ad-card { padding: 18px; }
.ad-card strong { font-size: 22px; display: block; }
.ad-card span { font-size: 12.5px; color: var(--muted); }
.ad-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ad-thumb { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ad-switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 12px 0; }
.ad-switch-grid .switch-row { padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ad-switch-grid .switch-row span { display: flex; flex-direction: column; }
.ad-switch-grid .switch-row em { font-style: normal; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.ad-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.user-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.user-form input, .user-form select { width: auto; }
.ad-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg-soft); }
.ad-login-card { width: 100%; max-width: 400px; padding: 30px; }

/* 后台里的旧卡片（数据总览、体检面板之类） */
.card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.block-title { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.cnt { font-size: 22px; font-weight: 700; }
.mini-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.dc-wrap { display: grid; gap: 14px; }
.dc-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.dc-code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 10px; border-radius: var(--r-sm); overflow-x: auto; }
.dc-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.dc-tbl td, .dc-tbl th { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; }
.dc-good { color: var(--ok); }
.dc-bad { color: var(--bad); }
.dc-tip { font-size: 12.5px; color: var(--muted); }
.dc-loading { color: var(--muted); }
.dc-verdict { font-weight: 600; }
.badge { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 11.5px; color: var(--muted); }
.badge.ok { color: var(--ok); }
.badge.wait { color: var(--warn); }
.badge.bad { color: var(--bad); }
.badge.warn { color: var(--warn); }
.badge-admin { padding: 1px 8px; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: 11.5px; }
.review-card, .review-detail, .review-body, .review-head, .review-cover, .review-meta, .review-acts, .review-gallery { }
.review-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 14px; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.review-body { font-size: 13.5px; color: var(--text-2); }
.review-cover img, .review-gallery img { border-radius: var(--r-sm); }
.review-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.review-meta { font-size: 12.5px; color: var(--muted); }
.step-list, .mini-list { }
.upload-form { margin-top: 14px; }
.nm { font-size: 13.5px; }
.oi-act form { display: inline; }

/* ---------- 小屏 ---------- */
@media (max-width: 900px) {
  .detail-wrap, .pay-wrap { grid-template-columns: 1fr; }
  .detail-side, .pay-side { position: static; }
  .sv-footer-cols { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .sv-main { padding: 18px 16px 50px; }
  .ad-main { padding: 18px 14px 50px; }
  .sv-topsearch { display: none; }
  .sv-brand-text em { display: none; }
  .sv-regdesk { display: none; }
  .sv-hero { padding: 26px 0 22px; }
  .sv-hero::after { background: linear-gradient(180deg, transparent 0%, var(--bg) 78%); }
  .hero-stat-grid { grid-template-columns: 1fr 1fr; }
  .hero-stat { padding: 14px; }
  .hero-stat strong { font-size: 21px; }
  .hero-copy p { font-size: 14.5px; }
  .sv-hero-act { margin: 18px 0 14px; }
  .sv-hero-act .btn { flex: 1; }
  .zone-entry { grid-template-columns: 1fr; gap: 12px; }
  .zone-card { padding: 16px; }
  .pdd-grid, .tut-grid, .share-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .member-head { gap: 12px; }
  .member-stat { margin-left: 0; width: 100%; gap: 18px; }
  .ad-table { display: block; overflow-x: auto; white-space: nowrap; }
  .form-2col, .form-3col { grid-template-columns: 1fr; }
}

/* ============================================================
   补齐：历史页面里用到的零散类（安装向导 / 体检面板 / 表单细节）
   ============================================================ */
.sv-body { background: var(--bg); }
.sv-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  padding: 26px; margin-bottom: 40px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.sv-cta h2 { margin-bottom: 6px; }
.sv-cta p { color: var(--muted); font-size: 13.5px; }
.sv-cta-act { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.sv-agree { font-size: 13px; }
.sv-copy { color: var(--brand); cursor: pointer; font-size: 13px; }
.sv-adminentry { border-color: var(--line); }
.sv-captcha-demo { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 12px; color: var(--muted); font-size: 13px; }
.sv-fp-field, .sv-keys-field, .sv-mouse-field { display: none; }

.tut-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.tut-time, .tut-actions { font-size: 12.5px; color: var(--muted); }
.tut-actions { display: flex; gap: 10px; margin-top: 12px; }
.like-form { display: inline-flex; }
.like-form .lb { margin-left: 5px; }

.share-link { margin-bottom: 8px; }
.help-wrap { max-width: 860px; }
.note-form { margin-top: 16px; }
.like-file, .lb { font-size: 13px; }
.pc-body { display: flex; flex-direction: column; gap: 10px; }
.dc-btn { margin-top: 10px; }
.ds, .fi { display: inline-flex; align-items: center; color: var(--muted); }
.dl { display: inline-flex; align-items: center; gap: 5px; }
.dl-main { flex: 1; min-width: 0; }
.ok-ico { color: var(--ok); }
.orders .order-item { border-radius: var(--r); }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th, .log-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.wrap, .back { display: block; }
.head { display: flex; align-items: center; gap: 10px; }
.foot { margin-top: 14px; }
.box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.sm { font-size: 12.5px; }
.tg, .hot { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 11.5px; }
.hot { color: var(--warn); }
.disabled, [disabled] { opacity: .55; pointer-events: none; }
.form2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.cf-turnstile, .g-recaptcha, .h-captcha { margin: 10px 0; }

/* 安装向导 / 系统体检 */
.ins-wrap { max-width: 760px; margin: 40px auto; }
.ins-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ins-tip { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.ins-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ins-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13.5px; }
.ins-ok { color: var(--ok); }
.ins-err { color: var(--bad); }
.ins-chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ins-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ins-tbl td, .ins-tbl th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.ins-raw { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 10px; border-radius: var(--r-sm); }
.md-code { font-family: var(--mono); font-size: 13.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }

.detail-main { min-width: 0; }
.md-ul, .md-ol { padding-left: 22px; margin: 0 0 12px; }
.md-ul li, .md-ol li { margin-bottom: 6px; }
.g-item { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.warn { color: var(--warn); }

/* hidden 属性优先，别被 display:flex 顶掉 */
.sv-modal[hidden], .sv-scrim[hidden] { display: none !important; }

/* ============================================================
 * 本站滑块拼图验证（自带，零对接）
 * ------------------------------------------------------------
 * 结构：
 *   .sv-slide           整块
 *   .sv-slide-stage     背景图 + 拼图块
 *   .sv-slide-track     底部滑轨
 *   .sv-slide-knob      拖动按钮
 * 配色一律走主题变量，日夜模式自动跟随。
 * ============================================================ */
.sv-captcha .sv-slide {
  --sv-knob: 46px;
  margin-top: 10px;
  user-select: none;
  -webkit-user-select: none;
}
.sv-slide-stage {
  position: relative;
  width: 100%;
  max-width: 340px;
  /* 用 padding 撑高度、内部全部绝对定位 —— 比 aspect-ratio 兼容得多，
     手机自带浏览器、老版本 Chrome、微信内置浏览器都认。 */
  height: 0;
  padding-top: 50%;            /* 画布 320 × 160，比例固定 2:1 */
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  cursor: pointer;
}
.sv-slide-bg {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}
.sv-slide-piece {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: left;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
.sv-slide-track {
  position: relative;
  margin-top: 12px;
  width: 100%;
  max-width: 340px;
  height: var(--sv-knob);
  border-radius: var(--r-pill, 999px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.sv-slide-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sv-fill, 0%);
  background: color-mix(in srgb, var(--brand) 26%, transparent);
  transition: width .06s linear;
}
.sv-slide-knob {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--sv-knob);
  height: var(--sv-knob);
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong, var(--line));
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
  will-change: left;
  transition: background-color .18s, color .18s, border-color .18s;
}
.sv-slide-knob:active { cursor: grabbing; }
.sv-slide-knob.ok {
  background: var(--ok, #16a34a);
  border-color: var(--ok, #16a34a);
  color: #fff;
}
.sv-slide-knob.bad {
  background: var(--bad, #dc2626);
  border-color: var(--bad, #dc2626);
  color: #fff;
  animation: svSlideShake .32s ease;
}
@keyframes svSlideShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}
.sv-slide-arrow { position: relative; display: inline-block; width: 15px; height: 14px; }
.sv-slide-arrow::before,
.sv-slide-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.sv-slide-arrow::before { left: 0; }
.sv-slide-arrow::after  { left: 6px; }
.sv-slide-tip {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.sv-slide-tip.ok  { color: var(--ok, #16a34a); }
.sv-slide-tip.bad { color: var(--bad, #dc2626); }
.sv-slide-reset {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
}
.sv-slide-reset:hover { color: var(--brand); }
@media (max-width: 420px) {
  .sv-slide-stage, .sv-slide-track { max-width: 100%; }
}
