/* ============================================================
   Qralio 活码 · Design System
   style: minimal-light / luxury-refined
   accent: fluorescent yellow-green (only one)
   ============================================================ */

:root {
  --ink: #14161a;
  --ink-2: #3a4048;
  --muted: #7a808a;
  --faint: #aab0b8;

  --accent: #d4ff3a;
  --accent-deep: #b8e62e;
  --accent-soft: rgba(212, 255, 58, 0.22);

  --line: rgba(20, 22, 26, 0.08);
  --line-strong: rgba(20, 22, 26, 0.14);

  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.04), 0 10px 30px rgba(20, 30, 40, 0.07);
  --shadow-lg: 0 2px 6px rgba(20, 30, 40, 0.06), 0 24px 60px rgba(20, 30, 40, 0.16);

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 24px;
  --r-xl: 32px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
          "Helvetica Neue", "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; outline: none; border: none; background: none; }
svg { display: block; }
::selection { background: var(--accent); color: var(--ink); }

/* ---------- 背景氛围 ---------- */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 16% 20%, #d5ede2 0%, transparent 44%),
    radial-gradient(ellipse at 84% 14%, #c9e6d8 0%, transparent 40%),
    radial-gradient(ellipse at 58% 88%, #e3e9e8 0%, transparent 50%),
    linear-gradient(160deg, #eef0f2 0%, #f0f3f0 58%, #dcece4 100%);
}
.bg-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>");
}

/* ---------- Shell ---------- */
.shell {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(247, 249, 247, 0.9), rgba(247, 249, 247, 0.55));
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}
.shell-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: 6px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600;
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; right: 5px; top: 5px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 7px; letter-spacing: 0.06em; }

.shell-nav {
  display: flex; gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
.shell-nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color 0.2s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.shell-nav a:hover { color: var(--ink); }
.shell-nav a.active { background: var(--ink); color: #fff; }
.shell-nav a.active svg { color: var(--accent); }

.shell-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.env-pill {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--muted);
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e2e8e2);
  border: 1px solid rgba(255, 255, 255, 0.9);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink-2); flex: none;
}

/* ---------- 通用布局 ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 28px 24px 64px; }

.pagehead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 24px;
}
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.pagehead h1 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 500; letter-spacing: -0.025em; line-height: 1.1;
}
.pagehead .sub { margin-top: 8px; font-size: 14px; color: var(--muted); max-width: 560px; }
.pagehead-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); transform: translateY(-1px); }
.btn-line { background: rgba(255, 255, 255, 0.5); border: 1px solid var(--line-strong); color: var(--ink-2); }
.btn-line:hover { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-accent { background: var(--accent); border: 1px solid var(--accent-deep); color: var(--ink); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; gap: 5px; }
.btn-lg { padding: 13px 24px; font-size: 14.5px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 999px;
  display: inline-grid; place-items: center;
  color: var(--muted); flex: none;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.icon-btn:hover { background: rgba(20, 22, 26, 0.06); color: var(--ink); }
.icon-btn.danger:hover { background: rgba(214, 69, 69, 0.1); color: #c33; }

/* ---------- 面板 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-l);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  box-shadow: var(--shadow);
}
.pad { padding: 20px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.panel-head h3 { font-size: 14px; font-weight: 600; letter-spacing: 0.01em; }
.panel-head .muted { font-size: 12px; color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-m);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: rise 0.6s var(--ease) both;
}
.kpi:nth-child(2) { animation-delay: 0.05s; }
.kpi:nth-child(3) { animation-delay: 0.1s; }
.kpi:nth-child(4) { animation-delay: 0.15s; }
.kpi-label { font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.kpi-value {
  margin-top: 6px; font-size: 26px; font-weight: 500;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi-foot { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi-foot .up { color: #5d8a1f; font-weight: 600; }
.kpi-foot .down { color: #c05555; font-weight: 600; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 筛选 ---------- */
.filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; min-width: 260px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--muted);
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.search:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--accent-soft); }
.search input { flex: 1; font-size: 13.5px; color: var(--ink); }
.search input::placeholder { color: var(--faint); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.18s var(--ease);
}
.chip:hover { color: var(--ink); background: #fff; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .cnt { opacity: 0.55; margin-left: 5px; font-size: 11px; }

.select {
  margin-left: auto;
  padding: 9px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

/* ---------- 活码卡片 ---------- */
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.ccard {
  display: flex; flex-direction: column;
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--r-l);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 0.22s var(--ease), box-shadow 0.25s var(--ease);
  animation: rise 0.55s var(--ease) both;
}
.ccard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ccard-top { display: flex; align-items: flex-start; gap: 13px; }
.ccard-qr {
  width: 52px; height: 52px; flex: none;
  border-radius: 12px; background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
}
.ccard-qr svg { width: 42px; height: 42px; }
.ccard-id { flex: 1; min-width: 0; }
.ccard-name {
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ccard-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #4fbf6a; flex: none; }
.dot.paused { background: var(--faint); }
.status-txt { font-size: 11.5px; color: var(--muted); }

.tag {
  display: inline-block;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  background: rgba(20, 22, 26, 0.06); color: var(--ink-2);
}
.tag.product { background: var(--accent-soft); color: #55751a; }
.tag.manual { background: rgba(90, 140, 190, 0.14); color: #3c6488; }
.tag.store { background: rgba(200, 130, 90, 0.15); color: #8a5732; }
.tag.catalog { background: rgba(140, 110, 190, 0.14); color: #5b4380; }
.tag.event { background: rgba(200, 90, 120, 0.13); color: #8a3a52; }

.ccard-stats {
  display: flex; align-items: flex-end; gap: 18px;
  margin: 16px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 22, 26, 0.035);
}
.ccard-stats > div > span { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }
.ccard-stats > div > b { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ccard-stats .spark { margin-left: auto; align-self: center; }
.ccard-stats .spark svg { width: 84px; height: 26px; }
.ccard-real { margin-left: auto; align-self: center; color: var(--muted); font-size: 10px; white-space: nowrap; }
.analytics-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 12px; border: 1px dashed var(--line); border-radius: 10px; background: rgba(20, 22, 26, 0.02); }

.ccard-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.ccard-foot .spacer { flex: 1; }
.ccard-preview { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ccard-preview[hidden] { display: none; }
.ccard-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.ccard-preview-head small { color: var(--muted); font-size: 10.5px; font-weight: 400; }
.ccard-preview-frame { display: block; width: 100%; height: 620px; border: 1px solid var(--line); border-radius: 12px; background: #f5f6f3; }
.ccard.previewing { border-color: var(--line-strong); }

.switch {
  position: relative; width: 38px; height: 22px; flex: none;
  border-radius: 999px; background: rgba(20, 22, 26, 0.14);
  transition: background 0.25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s var(--ease), background 0.2s;
}
.switch[aria-checked="true"] { background: var(--accent-deep); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--ink); }

/* ---------- 批量管理 ---------- */
.bulk-bar { display: flex; align-items: center; gap: 14px; margin: -4px 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bulk-bar[hidden] { display: none; }
.bulk-all { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.bulk-all input, .ccard-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.bulk-count { color: var(--muted); font-size: 12px; }
.bulk-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.bulk-danger { color: #b42318; }
.ccard-select { display: grid; place-items: center; flex: none; padding-top: 2px; cursor: pointer; }
.ccard.bulk-mode:hover { transform: none; }
.ccard.selected { border-color: var(--accent-deep); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
#manageBatchBtn.active { color: var(--ink); border-color: var(--ink-2); background: #fff; }
@media (max-width: 700px) {
  .bulk-bar { flex-wrap: wrap; gap: 10px; }
  .bulk-actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
}

/* ---------- 空状态 ---------- */
.empty {
  padding: 56px 24px; text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-l);
  color: var(--muted); font-size: 13.5px;
}
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; font-weight: 600; }
.col-empty { padding: 20px 8px; color: var(--faint); font-size: 11.5px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-m); }
.tbl { width: 100%; border-collapse: collapse; min-width: 720px; }
.tbl th {
  text-align: left; padding: 8px 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 12px; font-size: 13.5px; color: var(--ink-2);
  border-bottom: 1px solid rgba(20, 22, 26, 0.05);
  white-space: nowrap;
}
.tbl tbody tr { transition: background 0.18s var(--ease); }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.55); }
.tbl td b { color: var(--ink); font-weight: 600; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .right { text-align: right; }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- 弹窗 ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(20, 26, 30, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade 0.24s var(--ease) both;
}
.modal {
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.32s var(--ease) both;
}
.modal.wide { max-width: 720px; }
.html-modal { max-width: 1120px; }
.html-studio-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 14px; }
.html-source { width: 100%; min-height: 430px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #15221a; color: #e6f0e9; font: 12px/1.65 Consolas, monospace; tab-size: 2; }
.html-preview { width: 100%; height: 430px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.asset-toolbar { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.asset-toolbar .muted { font-size: 11px; }
.asset-list { display: flex; flex-direction: column; gap: 7px; max-height: 150px; overflow: auto; }
.asset-item { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 11px; }
.asset-item > div { min-width: 0; flex: 1; }
.asset-item b, .asset-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-item span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.html-page-shell { width: min(100%, 980px); margin: 0 auto 16px; }
.html-page-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: rgba(255,255,255,.9); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; }
.html-page-toolbar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.html-page-frame { display: block; width: 100%; min-height: 680px; height: 72vh; border: 1px solid var(--line); border-radius: 0 0 16px 16px; background: #fff; }
.html-result-qr { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: center; }
.html-result-qr svg { width: 180px; height: 180px; }
@media (max-width: 850px) { .html-studio-grid { grid-template-columns: 1fr; } .html-source, .html-preview { min-height: 340px; height: 340px; } }
@media (max-width: 560px) { .html-page-toolbar { flex-wrap: wrap; } .html-page-frame { min-height: 540px; } .asset-item { flex-wrap: wrap; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

/* 模板选择 */
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl {
  text-align: left; padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px; background: #fff;
  transition: all 0.18s var(--ease);
}
.tpl:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 1); }
.tpl.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.tpl b { display: block; font-size: 13.5px; font-weight: 600; }
.tpl span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* 模板库：场景分类 + 可直接使用的完整样板 */
.tpl-scenes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tpl-scene {
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  color: var(--muted); font-size: 12.5px; font-weight: 500;
  transition: all 0.18s var(--ease);
}
.tpl-scene:hover { color: var(--ink); border-color: var(--line-strong); }
.tpl-scene.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tpl-samples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 330px; overflow-y: auto; padding: 2px; }
.tpl-sample.tpl-blank { grid-column: 1 / -1; border-style: dashed; }
.tpl-sample {
  text-align: left; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  transition: all 0.18s var(--ease);
}
.tpl-sample:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(20, 30, 40, 0.05); }
.tpl-sample.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.tpl-sample b { display: block; font-size: 13.5px; font-weight: 600; }
.tpl-sample > span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.tpl-tag {
  font-style: normal; font-size: 10px; line-height: 1.6;
  padding: 1px 7px; border-radius: 999px;
  background: rgba(20, 22, 26, 0.055); color: var(--muted);
}

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: 30px; z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 999px;
  background: rgba(16, 18, 20, 0.92); color: #fff;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  animation: toastIn 0.3s var(--ease) both;
}
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.toast.out { animation: toastOut 0.28s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 字段 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--muted); }
.input, .textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(20, 22, 26, 0.035);
  border: 1px solid transparent;
  font-size: 13.5px; color: var(--ink);
  transition: background 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.input:focus, .textarea:focus, .field select:focus {
  background: #fff; box-shadow: 0 0 0 2px var(--accent-soft);
  border-color: rgba(184, 230, 46, 0.6);
}
.textarea { resize: vertical; min-height: 72px; line-height: 1.6; }
.field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a808a' stroke-width='2.4' stroke-linecap='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ---------- 编辑器 ---------- */
.editor-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.18s; }
.back-link:hover { color: var(--ink); }
.editor-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 20px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.editor-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 14px; }

.form-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.form-row.two { grid-template-columns: 1fr 1fr; }

.blk-list { display: flex; flex-direction: column; }
.blk {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s, opacity 0.2s;
}
.blk:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(20, 30, 40, 0.06); }
.blk.disabled { opacity: 0.55; }
.blk.dragging { opacity: 0.4; }
.blk.drop-target { border-color: var(--accent-deep); box-shadow: 0 0 0 2px var(--accent-soft); }
.blk-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.blk-grip { color: var(--faint); cursor: grab; display: grid; place-items: center; }
.blk-grip:active { cursor: grabbing; }
.blk-ico { width: 28px; height: 28px; border-radius: 9px; background: rgba(20, 22, 26, 0.05); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.blk-name { font-size: 13.5px; font-weight: 600; }
.blk-type { font-size: 11px; color: var(--muted); margin-left: 6px; }
.blk-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.blk-body { padding: 0 14px 14px; display: grid; gap: 10px; }
.blk.collapsed .blk-body { display: none; }

.item-rows { display: flex; flex-direction: column; gap: 8px; }
.item-row { display: grid; grid-template-columns: 1fr 1fr 28px; gap: 8px; align-items: center; }
.mini-btn {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; color: var(--faint);
  transition: background 0.16s, color 0.16s;
}
.mini-btn:hover { background: rgba(214, 69, 69, 0.1); color: #c33; }
.add-inline {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  border: 1px dashed var(--line-strong);
  transition: all 0.16s var(--ease);
}
.add-inline:hover { color: var(--ink); border-color: var(--ink); background: #fff; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 0;
  border-bottom: 1px solid rgba(20, 22, 26, 0.05);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row .sr-main b { display: block; font-size: 13.5px; font-weight: 600; }
.switch-row .sr-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 二维码卡 */
.qr-card { display: flex; flex-direction: column; gap: 14px; }
.qr-box { display: flex; gap: 16px; align-items: center; }
.qr-frame { width: 104px; height: 104px; flex: none; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; }
.qr-frame svg { width: 88px; height: 88px; }
.qr-error { display: grid; place-items: center; max-width: 180px; min-height: 88px; padding: 12px; color: #b3261e; background: #fff; font-size: 12px; line-height: 1.6; text-align: center; }
.qr-meta { min-width: 0; }
.qr-meta .mono { font-size: 13px; color: var(--ink); letter-spacing: 0.14em; font-weight: 600; }
.qr-meta p { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* 手机预览 */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 360px; height: 720px;
  background: #0d0f11; border-radius: 46px;
  padding: 9px; position: relative; flex: none;
  box-shadow: 0 30px 70px rgba(20, 30, 40, 0.26), 0 2px 8px rgba(20, 30, 40, 0.12);
}
.phone::before {
  content: ""; position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  width: 86px; height: 6px; border-radius: 999px; background: #1b1e21; z-index: 3;
}
.phone-screen {
  height: 100%; border-radius: 38px; overflow-y: auto;
  background: linear-gradient(165deg, #e9f3ee 0%, #dceee5 48%, #eef2f0 100%);
  padding: 24px 12px 26px;
}
.phone-screen::-webkit-scrollbar { width: 0; }
.pv-hero { padding: 10px 4px 14px; }
.pv-hero .pv-eyebrow { font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.pv-hero h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-top: 5px; line-height: 1.35; }
.pv-hero .mono { font-size: 10px; margin-top: 5px; }

/* ---------- 内容块（共享：预览 + 落地页） ---------- */
.view-wrap { font-size: 15px; }
.cblock {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(20, 22, 26, 0.05);
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 11px;
  box-shadow: 0 1px 2px rgba(20, 30, 40, 0.03);
}
.cb-kicker {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 5px;
}
.cb-title { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); margin-bottom: 8px; line-height: 1.4; }
.cb-body { font-size: 13px; line-height: 1.72; color: var(--ink-2); }

.view-wrap .cblock { padding: 18px; border-radius: 22px; margin-bottom: 12px; }
.view-wrap .cb-kicker { font-size: 10px; }
.view-wrap .cb-title { font-size: 15.5px; }
.view-wrap .cb-body { font-size: 14.5px; }

/* 音频 */
.cb-audio { display: flex; align-items: center; gap: 12px; }
.play-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  transition: background 0.2s, transform 0.2s;
}
.play-btn:hover { background: #000; transform: scale(1.04); }
.cb-audio.playing .play-btn { background: var(--accent); color: var(--ink); }
.wave { display: flex; align-items: center; gap: 2.5px; height: 26px; flex: 1; overflow: hidden; }
.wave span { width: 3px; border-radius: 2px; background: rgba(20, 22, 26, 0.16); transform-origin: center; }
.cb-audio.playing .wave span { background: var(--ink); animation: wv 0.9s ease-in-out infinite alternate; }
@keyframes wv { from { transform: scaleY(0.5); } to { transform: scaleY(1.15); } }
.dur { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; }

/* 视频 */
.cb-video { position: relative; border-radius: 15px; overflow: hidden; aspect-ratio: 16 / 10; background: radial-gradient(120% 120% at 18% 0%, #e2f1e7 0%, #bcd9c9 46%, #6d8b7d 100%); display: grid; place-items: center; }
.vid-play { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); display: grid; place-items: center; color: var(--ink); transition: transform 0.2s var(--ease); }
.vid-play:hover { transform: scale(1.06); }
.vid-dur { position: absolute; right: 10px; bottom: 9px; font-family: var(--mono); font-size: 10px; color: #fff; background: rgba(10, 12, 14, 0.55); padding: 2px 6px; border-radius: 6px; }

/* 表格 */
.cb-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cb-table th { text-align: left; padding: 5px 0; font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.cb-table td { padding: 7px 0; border-bottom: 1px solid rgba(20, 22, 26, 0.045); color: var(--ink-2); }
.cb-table td:first-child { color: var(--muted); width: 42%; }
.cb-table td:last-child { font-weight: 500; color: var(--ink); }
.cb-table tr:last-child td { border-bottom: 0; }
.view-wrap .cb-table { font-size: 13.5px; }
.view-wrap .cb-table td { padding: 9px 0; }

/* 行入口 */
.cb-rows { display: flex; flex-direction: column; gap: 7px; }
.cb-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 13px;
  background: rgba(20, 22, 26, 0.035);
  text-decoration: none; color: inherit;
  transition: background 0.16s var(--ease), transform 0.16s var(--ease);
  cursor: pointer; text-align: left; width: 100%;
}
.cb-row:hover { background: rgba(20, 22, 26, 0.065); transform: translateX(2px); }
.cb-row .ri { width: 28px; height: 28px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; color: var(--ink); box-shadow: 0 1px 2px rgba(20, 30, 40, 0.06); }
.cb-row .rm { flex: 1; min-width: 0; }
.cb-row b { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; }
.cb-row .rm span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.cb-row .go { color: var(--faint); flex: none; }
.cb-row.accent { background: var(--accent); border: 1px solid var(--accent-deep); box-shadow: 0 6px 16px rgba(212, 255, 58, 0.3); }
.cb-row.accent:hover { background: var(--accent-deep); }
.cb-row.accent .ri { background: rgba(255, 255, 255, 0.6); box-shadow: none; }
.cb-row.accent .rm span { color: rgba(20, 22, 26, 0.62); }
.view-wrap .cb-row { padding: 13px 14px; border-radius: 15px; }
.view-wrap .cb-row b { font-size: 14px; }
.view-wrap .cb-row .rm span { font-size: 11.5px; }

/* 防伪 */
.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.verify-grid > div { background: rgba(20, 22, 26, 0.035); border-radius: 11px; padding: 8px 10px; }
.verify-grid span { display: block; font-size: 9.5px; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 2px; }
.verify-grid b { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.verify-grid .wide { grid-column: 1 / -1; }
.verify-form { display: flex; gap: 6px; }
.verify-form input { flex: 1; min-width: 0; padding: 8px 11px; border-radius: 10px; background: rgba(20, 22, 26, 0.04); font-size: 12px; }
.verify-form button { padding: 8px 13px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.verify-ok { margin-top: 8px; font-size: 11.5px; color: #4f7a17; background: var(--accent-soft); padding: 7px 10px; border-radius: 9px; font-weight: 600; }

/* 目录 */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cat-item { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: #fff; transition: transform 0.16s var(--ease), box-shadow 0.16s; }
.cat-item:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(20, 30, 40, 0.07); }
.cat-item b { display: block; font-size: 12px; font-weight: 600; }
.cat-item span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* VR */
.cb-vr { position: relative; border-radius: 15px; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #0f1214 0%, #2e3d37 55%, #6f9181 100%); display: grid; place-items: center; color: #fff; }
.cb-vr .vr-play { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; backdrop-filter: blur(6px); }
.cb-vr .vr-hint { position: absolute; left: 10px; bottom: 9px; font-size: 10px; color: rgba(255, 255, 255, 0.72); letter-spacing: 0.05em; }

/* AI 块 */
.cb-ai { background: linear-gradient(135deg, rgba(212, 255, 58, 0.22), rgba(255, 255, 255, 0.7)); border-color: rgba(184, 230, 46, 0.55); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-chip { padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(20, 22, 26, 0.07); font-size: 11px; font-weight: 500; color: var(--ink-2); transition: all 0.16s; }
.ai-chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 数据看板 ---------- */
.an-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.an-grid .span-2 { grid-column: 1 / -1; }
.an-sub { font-size: 12px; color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend div { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

.reg-list { display: flex; flex-direction: column; gap: 10px; }
.reg-row { display: grid; grid-template-columns: 56px 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.reg-row .rg-name { color: var(--ink-2); font-weight: 500; }
.reg-track { height: 6px; border-radius: 999px; background: rgba(20, 22, 26, 0.07); overflow: hidden; }
.reg-fill { height: 100%; border-radius: 999px; background: var(--ink); transition: width 0.7s var(--ease); }
.reg-fill.hot { background: var(--accent-deep); }
.reg-row .rg-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11.5px; }

.funnel { display: flex; flex-direction: column; gap: 9px; }
.fn-row .fn-top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; }
.fn-row .fn-top b { font-weight: 600; }
.fn-row .fn-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.fn-bar { height: 24px; border-radius: 8px; background: rgba(20, 22, 26, 0.06); overflow: hidden; }
.fn-bar div { height: 100%; border-radius: 8px; background: var(--ink); transition: width 0.7s var(--ease); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 10px; color: #fff; font-weight: 600; }
.fn-bar div.hot { background: var(--accent-deep); color: var(--ink); }

.top-list { display: flex; flex-direction: column; }
.top-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(20, 22, 26, 0.05); font-size: 12.5px; }
.top-item:last-child { border-bottom: 0; }
.top-item .rank { width: 18px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.top-item .ti-name { flex: 1; color: var(--ink-2); }
.top-item .ti-val { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11.5px; }
.top-item .ti-bar { width: 54px; height: 4px; border-radius: 4px; background: rgba(20, 22, 26, 0.07); }
.top-item .ti-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink); }

/* ---------- 分销 ---------- */
.dist-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.rule-card { display: flex; flex-direction: column; gap: 12px; }
.rule-step { display: flex; gap: 12px; }
.rule-step .rs-num { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
.rule-step b { display: block; font-size: 12.5px; font-weight: 600; }
.rule-step span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.comm-tag { font-family: var(--mono); font-size: 12px; font-weight: 600; color: #55751a; background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; }

/* ---------- 落地页 ---------- */
body[data-page="view"] {
  background:
    radial-gradient(ellipse at 20% 0%, #d9efe4 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, #cfe9db 0%, transparent 45%),
    linear-gradient(165deg, #eaf3ee 0%, #dcede6 50%, #eff2f0 100%);
  background-attachment: fixed;
}
.view-wrap { max-width: 460px; margin: 0 auto; padding: 18px 16px 150px; }
.view-brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.view-brand .lang-switch:only-child { margin-left: auto; }
.vb-left { display: flex; align-items: center; gap: 8px; }
.vb-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; position: relative; }
.vb-mark::after { content: ""; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.vb-name { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.9); }
.lang-switch button { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); transition: all 0.18s; }
.lang-switch button.on { background: var(--ink); color: #fff; }

.view-hero {
  position: relative; overflow: hidden;
  padding: 22px 20px;
  border-radius: 26px;
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.78) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(20, 30, 40, 0.04), 0 16px 40px rgba(20, 30, 40, 0.09);
  margin-bottom: 14px;
}
.view-hero::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 255, 58, 0.5), transparent 70%);
  pointer-events: none;
}
.vh-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.vh-title { font-size: 25px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.22; margin-top: 8px; }
.vh-sub { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.vh-badges { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.vh-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: rgba(20, 22, 26, 0.05); font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.vh-badge.ok { background: var(--accent-soft); color: #55751a; }
.vh-code { margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.vh-code .mono { font-size: 12px; color: var(--muted); letter-spacing: 0.16em; }
.vh-code .icon-btn { width: 26px; height: 26px; }

.view-foot { text-align: center; font-size: 10.5px; color: var(--faint); margin-top: 18px; line-height: 1.7; }
.view-foot b { color: var(--muted); font-weight: 600; }

.view-alert {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 14px;
  background: rgba(214, 69, 69, 0.08); color: #a33;
  font-size: 12.5px; font-weight: 500; margin-bottom: 12px;
}

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  max-width: 460px; margin: 0 auto;
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  display: flex; gap: 9px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(20, 30, 40, 0.08);
}
.svc-btn {
  width: 46px; height: 46px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  background: rgba(20, 22, 26, 0.05); color: var(--ink);
  transition: background 0.18s;
}
.svc-btn:hover { background: rgba(20, 22, 26, 0.1); }
.bar-cta {
  flex: 1; height: 46px; border-radius: 15px;
  background: var(--accent); border: 1px solid var(--accent-deep);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: background 0.18s, transform 0.16s;
}
.bar-cta:hover { background: var(--accent-deep); }
.bar-cta:active { transform: scale(0.99); }
.bar-cta small { font-weight: 500; font-size: 11px; opacity: 0.65; }

/* AI 面板 */
.ai-fab {
  position: fixed; z-index: 90;
  right: max(16px, calc(50vw - 214px));
  bottom: 86px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(10, 12, 14, 0.28);
  transition: transform 0.2s var(--ease);
}
.ai-fab:hover { transform: translateY(-2px) scale(1.04); }
.ai-fab .pulse { position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid rgba(212, 255, 58, 0.5); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }

.ai-sheet {
  position: fixed; z-index: 100;
  left: 0; right: 0; bottom: 0;
  max-width: 460px; margin: 0 auto;
  height: min(72vh, 620px);
  display: flex; flex-direction: column;
  background: #fbfcfa;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(20, 30, 40, 0.22);
  transform: translateY(104%);
  transition: transform 0.38s var(--ease);
  overflow: hidden;
}
.ai-sheet.open { transform: translateY(0); }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex: none; }
.ai-head .ai-ava { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--accent); display: grid; place-items: center; }
.ai-head b { display: block; font-size: 13.5px; font-weight: 600; }
.ai-head span { display: block; font-size: 11px; color: var(--muted); }
.ai-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 15px; font-size: 13px; line-height: 1.6; }
.msg.ai { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink-2); align-self: flex-start; }
.msg.me { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg .typing { display: flex; gap: 4px; padding: 2px 0; }
.msg .typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.msg .typing i:nth-child(2) { animation-delay: 0.2s; }
.msg .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
.ai-quick { display: flex; gap: 6px; padding: 0 16px 10px; flex-wrap: wrap; flex: none; }
.ai-input { display: flex; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.ai-input input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; background: rgba(20, 22, 26, 0.05); font-size: 13px; }
.ai-send { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; flex: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .editor-side .qr-card { flex: 1; min-width: 280px; }
  .an-grid, .dist-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .shell-nav a span.nav-txt { display: none; }
  .shell-nav a { padding: 7px 11px; }
  .env-pill { display: none; }
}
@media (max-width: 680px) {
  .wrap { padding: 20px 14px 56px; }
  .shell { padding: 10px 12px; }
  .shell-inner { gap: 10px; }
  .brand-name em { display: none; }
  .pagehead { align-items: flex-start; }
  .pagehead-actions { width: 100%; }
  .pagehead-actions .btn { flex: 1; }
  .code-grid { grid-template-columns: 1fr; }
  .search { min-width: 0; flex: 1; }
  .filters .select { margin-left: 0; }
  .form-row, .form-row.two { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr; }
  .tpl-samples { grid-template-columns: 1fr; max-height: 360px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 22px; }
  .ccard-stats { gap: 12px; }
  .ccard-stats .spark { display: none; }
  .phone { width: 320px; height: 640px; }
  .phone-wrap { margin: 0 auto; }
  .shell-right .btn-line { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   追加：工作台看板 / 天气激励 / 角色 / 审核 / 成员 / H5 / 小程序
   ============================================================ */

/* ---------- 顶部信息带（问候 + 天气 + 每日一句） ---------- */
.topinfo { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; margin-bottom: 18px; }
.greet { flex: 1 1 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 26px; backdrop-filter: blur(10px); }
.greet .eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.greet h1 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; }
.greet p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.weather-card { min-width: 220px; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%); color: var(--ink); border-radius: var(--r-l); padding: 20px 24px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.weather-card .w-top { display: flex; align-items: center; gap: 12px; }
.weather-card .w-top svg { width: 34px; height: 34px; }
.weather-card .w-name { font-size: 22px; font-weight: 700; }
.weather-card .w-temp { font-size: 13px; font-weight: 600; opacity: .85; }
.weather-card .w-tip { font-size: 12.5px; opacity: .85; margin-top: 8px; }
.quote-bar { flex-basis: 100%; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 20px; }
.quote-bar svg { width: 22px; height: 22px; color: var(--accent-deep); flex: none; }
.quote-bar .q-text { font-size: 15px; color: var(--ink-2); }
.quote-bar .q-text b { color: var(--ink); }

/* ---------- 看板 ---------- */
.board-head { display: flex; align-items: flex-end; gap: 28px; margin-bottom: 20px; flex-wrap: wrap; }
.progress-number { font-size: 86px; font-weight: 200; line-height: .9; letter-spacing: -.03em; color: var(--ink); }
.progress-number small { font-size: 24px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.progress-seg { display: flex; gap: 6px; margin-top: 10px; }
.progress-seg .seg { height: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: 1; min-width: 26px; overflow: hidden; }
.progress-seg .seg.on { background: var(--accent); border-color: transparent; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.column { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; backdrop-filter: blur(10px); min-height: 420px; transition: background .25s var(--ease); }
.column.drag-over { background: var(--surface-strong); }
.col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.col-head h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.col-head.doing .dot { background: var(--accent-deep); }
.col-head.done .dot { background: #9bb8a6; }
.col-count { font-size: 12px; color: var(--muted); background: var(--surface-strong); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.tcard { background: var(--surface-strong); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; margin-bottom: 10px; cursor: grab; transition: transform .28s var(--ease), box-shadow .28s var(--ease), opacity .28s; }
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tcard.dragging { opacity: .4; }
.tcard.doing { background: var(--accent); border-color: transparent; box-shadow: 0 6px 20px rgba(184, 230, 46, .35); }
.tcard.done { opacity: .6; }
.tcard.done .tcard-text { text-decoration: line-through; }
.tcard-text { font-size: 14px; font-weight: 500; line-height: 1.45; }
.tcard-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tcard-time { font-size: 11.5px; color: var(--muted); }
.tcard.doing .tcard-time { color: rgba(20, 22, 26, .6); }
.tcard-tools { display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.tcard:hover .tcard-tools { opacity: 1; }
.add-task { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 10px 4px; margin-top: 4px; border-radius: var(--r-s); transition: background .2s; }
.add-task:hover { background: var(--surface-strong); color: var(--ink); }

/* ---------- 角色 / 权限 ---------- */
.role-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface-strong); transition: transform .15s; }
.role-pill:hover { transform: translateY(-1px); }
.role-pill.admin { background: var(--ink); color: #fff; border-color: var(--ink); }
.role-pill.ok { background: var(--accent-soft); border-color: transparent; }
.role-pill.bad { background: #ffe9e9; color: #b3261e; border-color: #f3c2c2; }
.role-pill svg { width: 13px; height: 13px; }
.perm-gate { background: #fff6e0; border: 1px dashed #e0b85a; border-radius: var(--r-m); padding: 14px 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.perm-gate svg { width: 20px; height: 20px; color: #c98a00; flex: none; }
.perm-gate .pg-txt { flex: 1; font-size: 13.5px; }
.perm-gate .pg-txt b { color: var(--ink); }

/* ---------- 成员独立域名与专属访问 ---------- */
.domain-item { padding: 14px 0; border-top: 1px solid var(--line); }
.domain-item:first-child { border-top: 0; padding-top: 2px; }
.domain-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.domain-head b { font-size: 13.5px; }
.domain-head .muted { font-size: 11.5px; }
.domain-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.domain-controls .input { flex: 1; min-width: 200px; font-size: 13px; }
.domain-link { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(20, 22, 26, 0.035); word-break: break-all; }
.domain-link .mono { font-size: 11px; color: var(--ink-2); }
.domain-hint { margin: 7px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
@media (max-width: 700px) {
  .domain-controls .input { min-width: 0; flex: 1 1 100%; }
}

/* ---------- 域名解析配置说明 ---------- */
.domain-guide { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.domain-guide summary {
  cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 6px; user-select: none;
}
.domain-guide summary::-webkit-details-marker { display: none; }
.domain-guide summary::before {
  content: "›"; display: inline-block; transition: transform .18s ease; color: var(--muted); font-size: 15px; line-height: 1;
}
.domain-guide[open] summary::before { transform: rotate(90deg); }
.dg-body { padding: 10px 0 2px 16px; }
.dg-body ol { margin: 0 0 8px; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; line-height: 1.9; }
.dg-body li { margin-bottom: 2px; }
.dg-body code {
  font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px;
  background: rgba(20, 22, 26, 0.06); border-radius: 4px; padding: 1px 5px; color: var(--ink);
}
.dg-note { margin: 0 0 10px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.dg-actions { display: flex; gap: 8px; }

/* ---------- 审核徽章与横幅 ---------- */
.audit-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.audit-badge.ok { background: rgba(40, 167, 69, .13); color: #1f7a3a; }
.audit-badge.warn { background: rgba(240, 173, 78, .2); color: #8a5a00; }
.audit-badge.bad { background: rgba(220, 53, 69, .14); color: #b3261e; }
.audit-badge.idle { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.audit-banner { margin: 14px 0; padding: 12px 16px; border-radius: var(--r-m); display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.audit-banner svg { width: 18px; height: 18px; flex: none; }
.audit-banner.pass { background: rgba(40, 167, 69, .1); color: #1f7a3a; border: 1px solid #bfe5c8; }
.audit-banner.warn { background: #fff6e0; color: #8a5a00; border: 1px solid #f1d9a8; }
.audit-banner.fail { background: #ffe9e9; color: #b3261e; border: 1px solid #f3c2c2; }

/* ---------- 审核工作台 ---------- */
.audit-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.audit-summary { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.score-block { display: flex; align-items: center; gap: 18px; }
.score-ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 700; background: conic-gradient(var(--accent) var(--p, 80%), var(--line) 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 7px; background: var(--surface-strong); border-radius: 50%; }
.score-ring b { position: relative; z-index: 1; font-size: 22px; }
.findings .finding { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; margin-bottom: 10px; background: var(--surface-strong); }
.finding .f-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.finding .f-rule { font-weight: 700; font-size: 13px; }
.finding .f-title { font-size: 14px; font-weight: 600; }
.finding .f-snippet { background: #fff3cd; border-radius: 6px; padding: 2px 7px; font-family: var(--mono); font-size: 12px; }
.finding .f-basis { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.finding .f-sug { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.finding.high { border-left: 3px solid #b3261e; }
.finding.medium { border-left: 3px solid #e0a800; }
.rule-card { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; margin-bottom: 10px; background: var(--surface-strong); }
.rule-card h4 { font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.rule-card p { font-size: 12.5px; color: var(--muted); }

/* ---------- 成员与付费 ---------- */
.mgrid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mrow:last-child { border-bottom: none; }
.mavatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.minfo { flex: 1; min-width: 0; }
.minfo b { font-size: 14px; display: block; }
.minfo span { font-size: 12px; color: var(--muted); }
.mstatus { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.mstatus.active { background: rgba(40, 167, 69, .13); color: #1f7a3a; }
.mstatus.inactive { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.mstatus.expired { background: rgba(220, 53, 69, .14); color: #b3261e; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.plan-card { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; text-align: center; background: var(--surface-strong); cursor: pointer; transition: border-color .2s, transform .2s; }
.plan-card:hover { border-color: var(--accent-deep); transform: translateY(-2px); }
.plan-card .pc-price { font-size: 24px; font-weight: 700; }
.plan-card .pc-name { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pay-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.pay-row .pa-time { color: var(--muted); font-size: 12px; }
.pay-row .pa-amt { margin-left: auto; font-weight: 700; }

/* ---------- H5 端 ---------- */
body.h5 { background: #f4f6f5; padding-bottom: 20px; }
.h5-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface-strong); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.h5-top .brand { font-weight: 700; font-size: 16px; }
.h5-top .role-pill { margin-left: auto; }
.h5-list { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.h5-card { background: #fff; border-radius: 18px; padding: 14px; display: flex; gap: 12px; box-shadow: var(--shadow); }
.h5-card .h5-qr { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; }
.h5-card .h5-info { flex: 1; min-width: 0; }
.h5-card .h5-info b { font-size: 14.5px; display: block; }
.h5-card .h5-info span { font-size: 12px; color: var(--muted); }
.h5-empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---------- 小程序端原型 ---------- */
.ma-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #e9ecee, #dde9e2); }
.ma-frame { width: 100%; max-width: 390px; height: 760px; background: #fff; border-radius: 40px; overflow: hidden; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; position: relative; }
.ma-status { height: 38px; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; font-size: 13px; font-weight: 600; }
.ma-capsule { display: flex; align-items: center; gap: 10px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .8); }
.ma-capsule span { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 10px; }
.ma-page { flex: 1; overflow-y: auto; padding: 14px 16px 80px; }
.ma-hero { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-radius: 20px; padding: 18px; color: var(--ink); margin-bottom: 14px; }
.ma-hero h2 { font-size: 20px; }
.ma-hero p { font-size: 13px; opacity: .85; margin-top: 4px; }
.ma-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ma-quick div { background: var(--surface); border-radius: 14px; padding: 12px 4px; text-align: center; font-size: 11px; color: var(--ink-2); }
.ma-quick svg { width: 22px; height: 22px; margin: 0 auto 5px; color: var(--accent-deep); }
.ma-tabbar { display: flex; border-top: 1px solid var(--line); background: #fff; padding: 6px 0 10px; }
.ma-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 4px 0; }
.ma-tab svg { width: 21px; height: 21px; }
.ma-tab.on { color: var(--ink); }
.ma-tab.on svg { color: #7fb300; }
.ma-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; display: flex; gap: 10px; }
.ma-me-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.ma-me-row .mavatar { width: 44px; height: 44px; font-size: 17px; }

/* ---------- 响应式补充 ---------- */
@media (max-width: 900px) {
  .audit-layout, .mgrid { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .progress-number { font-size: 64px; }
}

/* ---------- 编辑器：二维码参数 / 版本日志 ---------- */
.qr-divider { height: 1px; background: var(--line); margin: 16px 0 14px; }
.qr-param .qp-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.qr-param .qp-label::before { content: ""; width: 3px; height: 12px; background: var(--accent); border-radius: 2px; }
.qr-param .qp-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.qr-param .field label { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.qr-param .input { font-size: 12.5px; padding: 8px 9px; }
@media (max-width: 480px) { .qr-param .qp-row { grid-template-columns: 1fr 1fr; } }

.ver-log { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.ver-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.ver-item .ver-ico { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-deep); flex: none; margin-top: 1px; }
.ver-item .ver-ico svg { width: 12px; height: 12px; }
.ver-item .ver-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ver-item .ver-main b { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.ver-item .ver-main span { font-size: 11px; }

/* ---------- 审核工作台：统计 / 列表 ---------- */
.a-stat { display: flex; align-items: center; gap: 12px; background: var(--surface-strong); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 18px; min-width: 150px; }
.a-stat-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-deep); flex: none; }
.a-stat b { font-size: 24px; display: block; line-height: 1; }
.a-stat span { font-size: 12px; color: var(--muted); }

.al-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.al-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-strong); cursor: pointer; transition: all .15s; }
.al-row:hover { border-color: var(--accent-deep); transform: translateY(-1px); }
.al-row.active { border-color: var(--accent-deep); background: var(--accent-soft); }
.al-score { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) var(--p, 80%), var(--line) 0); position: relative; flex: none; }
.al-score::after { content: ""; position: absolute; inset: 4px; background: var(--surface-strong); border-radius: 50%; }
.al-score b { position: relative; z-index: 1; font-size: 13px; font-weight: 700; }
.al-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-main b { font-size: 13.5px; }
.al-main span { font-size: 11px; color: var(--muted); }
.al-time { font-size: 11px; color: var(--muted); flex: none; }
.audit-empty { text-align: center; padding: 36px 20px; color: var(--muted); font-size: 13px; }

/* ---------- 连接状态 / 异步更新 ---------- */
.conn-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: var(--muted); font-size: 11.5px; border: 1px solid var(--line); background: rgba(255,255,255,.45); white-space: nowrap; }
.conn-pill i { width: 7px; height: 7px; border-radius: 50%; background: #a6adb2; box-shadow: 0 0 0 3px rgba(166,173,178,.12); }
.conn-pill.online { color: #28663c; }
.conn-pill.online i { background: #42a66a; box-shadow: 0 0 0 3px rgba(66,166,106,.13); }
.update-bar { position: fixed; z-index: 180; top: 76px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 18px; border-radius: 999px; background: rgba(255,255,255,.96); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); font-size: 12.5px; cursor: pointer; }
.empty .btn { margin-top: 14px; }

/* ---------- 高级可视化编辑器 ---------- */
.editor-tabs { display: inline-flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.editor-tabs button { position: relative; padding: 7px 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.editor-tabs button:hover { color: var(--ink); }
.editor-tabs button.active { color: var(--ink); }
.editor-tabs button.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.advanced-wrap { margin-top: 4px; }
.editor-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr) 304px; gap: 14px; align-items: start; }
.editor-rail, .editor-inspector {
  position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow-y: auto;
  padding: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rail-head h3 { margin: 0; font-size: 12.5px; font-weight: 700; }
.rail-head span { color: var(--muted); font-size: 10.5px; }
.rail-head-sub { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.editor-stage { min-width: 0; display: flex; flex-direction: column; align-items: center; padding-bottom: 40px; }
.stage-bar { display: flex; align-items: center; gap: 8px; width: min(100%, 390px); margin-bottom: 10px; }
.stage-bar-title { margin-right: auto; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.stage-add { padding: 6px 11px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.stage-add:hover { background: #000; }
.stage-hint { margin-top: 12px; color: var(--muted); font-size: 11px; }
.advanced-grid { display: grid; grid-template-columns: 330px minmax(380px,1fr) 280px; gap: 16px; align-items: start; }
.adv-panel { position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow-y: auto; }
.adv-section + .adv-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.adv-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 12.5px; font-weight: 700; }
.adv-title span { color: var(--muted); font-size: 10.5px; font-weight: 500; }
.adv-palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.adv-component { display: flex; flex-direction: row; align-items: center; gap: 7px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 12px; text-align: left; transition: border-color .15s, background .15s; }
.adv-component:hover { border-color: var(--ink-2); background: #fafaf8; }
.adv-component svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.adv-layers { display: flex; flex-direction: column; gap: 3px; }
.adv-layer { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--ink-2); background: transparent; text-align: left; font-size: 12px; cursor: grab; }
.adv-layer:hover { background: #f6f6f3; }
.adv-layer.active { background: #f1f4ea; color: var(--ink); box-shadow: inset 2px 0 0 var(--accent-deep); }
.adv-layer.off { opacity: .48; }
.adv-layer.dragging { opacity: .35; }
.adv-layer.drop-target { border-color: var(--accent-deep); box-shadow: 0 0 0 2px var(--accent-soft); }
.adv-layer .layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-layer .layer-grip { color: var(--faint); }
.adv-stage { position: sticky; top: 86px; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.adv-stage-note { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--muted); font-size: 11.5px; }
.adv-stage .phone { width: 360px; height: 700px; }
.adv-stage .phone-screen { position: relative; }
.adv-stage .cblock { cursor: pointer; transition: box-shadow .16s, outline .16s; }
.adv-stage .cblock.selected { outline: 2px solid var(--code-accent,var(--accent-deep)); outline-offset: 2px; }
.adv-stage .cblock:hover { box-shadow: 0 5px 18px rgba(20,30,40,.1); }
.adv-empty { margin: 30px 5px; padding: 30px 12px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); font-size: 12px; text-align: center; }
.adv-props:empty::before { content: "点击正文模块后，可在这里精确调整字段"; display: block; padding: 16px 6px; color: var(--muted); font-size: 11.5px; text-align: center; }
.adv-props .blk { margin: 0; }
.adv-theme .field { margin-bottom: 12px; }
.adv-theme .form-row { grid-template-columns: 1fr 1fr; }
.adv-color { display: grid; grid-template-columns: 42px 1fr; gap: 8px; align-items: center; }
.adv-color input[type="color"] { width: 42px; height: 36px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.theme-preview { height: 54px; border-radius: 13px; background: var(--code-bg,#eaf3ee); border: 1px solid var(--line); position: relative; overflow: hidden; margin-bottom: 14px; }
.theme-preview::after { content: ""; position: absolute; width: 74px; height: 24px; right: 12px; top: 14px; border-radius: 999px; background: var(--code-accent,var(--accent)); }
.rich-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 10px 10px 0 0; background: rgba(20,22,26,.035); }
.rich-toolbar button { min-width: 28px; height: 27px; padding: 0 7px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.rich-toolbar button:hover { background: #fff; }
.rich-toolbar input[type="color"] { width: 28px; height: 27px; padding: 2px; border: 0; background: transparent; cursor: pointer; }
.rich-editor { min-height: 130px; padding: 11px 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: #fff; font-size: 13px; line-height: 1.65; outline: none; }
.rich-editor:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.rich-editor a { color: inherit; }
.upload-control { display: flex; gap: 7px; align-items: center; }
.upload-control .input { flex: 1; min-width: 0; }
.upload-control input[type="file"] { display: none; }
.uploading { opacity: .55; pointer-events: none; }

/* ---------- 高级内容块与主题变量 ---------- */
.phone-screen { background: var(--code-bg,linear-gradient(165deg,#e9f3ee 0%,#dceee5 48%,#eef2f0 100%)); }
.cblock { border-radius: var(--code-radius,20px); }
.view-wrap { font-size: var(--code-font,15px); }
.view-wrap .cblock { border-radius: var(--code-radius,22px); }
.view-wrap .cb-body { font-size: var(--code-font,14.5px); }
.cb-row.accent,.bar-cta { background: var(--code-accent,var(--accent)); border-color: var(--code-accent,var(--accent-deep)); }
.vh-badge.ok,.verify-ok { background: color-mix(in srgb,var(--code-accent,var(--accent)) 24%,transparent); }
.vb-mark::after { background: var(--code-accent,var(--accent)); }
.cb-rich,.cb-custom { color: var(--ink-2); font-size: 13px; line-height: 1.72; overflow-wrap: anywhere; }
.cb-rich p,.cb-custom p { margin: 0 0 8px; }
.cb-rich p:last-child,.cb-custom p:last-child { margin-bottom: 0; }
.cb-rich img,.cb-custom img { max-width: 100%; height: auto; border-radius: 10px; }
.cb-rich a,.cb-custom a { text-decoration: underline; text-underline-offset: 2px; }
.cb-image { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; }
.cb-image-empty { display: grid; place-items: center; min-height: 120px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--faint); font-size: 12px; background: rgba(20,22,26,.025); }
.view-logo { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; background: #fff; }
.view-hero.has-cover { padding-top: 150px; }
.view-cover { position: absolute; inset: 0 0 auto; height: 132px; width: 100%; object-fit: cover; }
.view-hero.has-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.96) 44%); pointer-events: none; }
.view-hero.has-cover > *:not(.view-cover) { position: relative; z-index: 1; }

/* ---------- 数据维护 ---------- */
.backup-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.backup-row .field { flex: 1; min-width: 220px; }
.maintenance-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.maintenance-hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 10px; }

/* ---------- 可视化编辑 ---------- */
.mode-hint { font-size: 11.5px; color: var(--muted); max-width: 320px; line-height: 1.5; }
.word-format { position: relative; }
.word-format summary, .adv-disclosure > summary { list-style: none; cursor: pointer; }
.word-format summary::-webkit-details-marker, .adv-disclosure > summary::-webkit-details-marker { display: none; }
.word-format > summary { padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); background: #fff; font-size: 12px; font-weight: 600; }
.word-format[open] > summary { border-color: var(--ink-2); }
.word-format-panel { position: absolute; z-index: 70; top: calc(100% + 8px); right: 0; display: flex; flex-wrap: wrap; gap: 6px; width: min(640px, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgba(20, 30, 40, 0.14); }
.ribbon-group { display: flex; align-items: center; gap: 3px; padding: 0 8px; border-right: 1px solid var(--line); }
.ribbon-group:first-child { padding-left: 0; }
.ribbon-group:last-child { border-right: 0; }
.ribbon-btn {
  height: 28px; padding: 0 9px; border-radius: 6px;
  color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.ribbon-btn:hover { background: rgba(20, 22, 26, 0.06); color: var(--ink); }
.ribbon-color {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.ribbon-color:hover { background: rgba(20, 22, 26, 0.06); }
.ribbon-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.adv-disclosure > summary { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.adv-disclosure > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 15px; font-weight: 400; }
.adv-disclosure[open] > summary::after { content: "−"; }
.adv-disclosure[open] > summary { margin-bottom: 13px; }

.word-page {
  width: min(100%, 390px); min-height: 800px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(20, 30, 40, 0.05);
  padding-bottom: 28px;
}
.mobile-chrome { display: flex; align-items: center; gap: 5px; padding: 10px 14px; background: #f2f3f0; border-bottom: 1px solid var(--line); }
.mobile-chrome > span { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #d3d6d0; }
.mobile-tab { flex: 1; min-width: 0; margin-left: 8px; padding: 6px 11px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.mobile-tab small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 8px; line-height: 1.2; }
.mobile-tab strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; line-height: 1.45; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mobile-tab strong:focus { text-overflow: clip; white-space: normal; }
.pv-browser { margin: -12px -12px 14px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.75); }
.pv-browser small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 8px; }
.pv-browser b { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-hero { padding: 30px 26px 24px; background: linear-gradient(180deg, #fff, #fafbf7); border-bottom: 1px solid var(--line); }
.mobile-eyebrow { margin-bottom: 10px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mobile-title { margin: 0 0 10px; font-size: 27px; line-height: 1.3; letter-spacing: -0.03em; font-weight: 600; }
.mobile-sub { font-size: 11.5px; color: var(--muted); }
.mobile-body { padding: 22px 26px 8px; }
.mobile-foot { margin-top: 12px; padding: 18px 26px 0; border-top: 1px solid var(--line); color: var(--faint); font-size: 10.5px; letter-spacing: 0.08em; }

.word-block { position: relative; margin: 0 0 22px; padding: 12px; border: 1px solid transparent; border-radius: 12px; transition: background 0.16s, border-color 0.16s, box-shadow 0.16s; }
.word-block:hover { background: #fbfcf8; border-color: rgba(20, 22, 26, 0.08); }
.word-block.selected { background: #fff; border-color: var(--accent-deep); box-shadow: 0 0 0 2px var(--accent-soft); }
.word-block.disabled { opacity: 0.45; }
.word-block-tools { display: none; position: absolute; top: -13px; right: 8px; z-index: 3; align-items: center; gap: 2px; padding: 3px 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.word-block:hover .word-block-tools, .word-block.selected .word-block-tools { display: flex; }
.word-block-name { padding: 0 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.word-block-tools button { padding: 3px 7px; border-radius: 999px; color: var(--ink-2); font-size: 10.5px; white-space: nowrap; }
.word-block-tools button:hover { background: rgba(20, 22, 26, 0.06); }
.word-block-tools button.danger:hover { background: rgba(214, 69, 69, 0.1); color: #c33; }
.word-page [contenteditable="true"] { outline: none; border-radius: 5px; }
.word-page [contenteditable="true"]:focus { background: rgba(212, 255, 58, 0.12); box-shadow: 0 0 0 2px var(--accent-soft); }
.word-title { margin: 0 0 8px; font-size: 18px; line-height: 1.45; letter-spacing: -0.01em; font-weight: 650; }
.word-p, .word-rich { margin: 0; font-size: 14px; line-height: 1.9; color: #333; }
.word-p { white-space: pre-wrap; }
.word-rich p { margin: 0 0 10px; }
.word-rich h1, .word-rich h2, .word-rich h3 { margin: 14px 0 8px; line-height: 1.4; }
.word-rich h1 { font-size: 22px; } .word-rich h2 { font-size: 18px; } .word-rich h3 { font-size: 16px; }
.word-rich ul, .word-rich ol { margin: 0 0 10px; padding-left: 20px; }
.word-rich blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--accent-deep); background: #fbfcf6; color: var(--ink-2); }
.word-items { display: flex; flex-direction: column; gap: 2px; }
.word-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.word-item:last-child { border-bottom: 0; }
.word-item-dot { flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--accent); border: 1px solid var(--accent-deep); }
.word-item-main { flex: 1; min-width: 0; }
.word-item-main b { display: block; font-size: 13.5px; line-height: 1.5; }
.word-item-main span { display: block; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.word-mini { flex: none; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); font-size: 14px; line-height: 1; }
.word-mini:hover { background: rgba(214, 69, 69, 0.1); color: #c33; }
.word-add-line { margin-top: 8px; padding: 4px 0; color: var(--muted); font-size: 11.5px; }
.word-add-line:hover { color: var(--ink); }
.word-table-wrap { overflow-x: auto; }
.word-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.word-table th, .word-table td { padding: 7px 8px; border: 1px solid var(--line-strong); text-align: left; vertical-align: top; }
.word-table th { background: #f7f8f4; font-weight: 600; }
.word-table-op { width: 28px; text-align: center; }
.word-table-actions { display: flex; gap: 12px; }
.word-figure { margin: 0; }
.word-figure img { display: block; width: 100%; border-radius: 10px; }
.word-img-empty { padding: 40px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.word-figure figcaption { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.word-upload { margin-top: 8px; }
.word-file { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf8; }
.word-file-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 9px; }
.word-file-main { flex: 1; min-width: 0; }
.word-file-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.word-file-main span { font-size: 10.5px; color: var(--muted); }
.word-file-act { font-size: 11px; color: var(--ink-2); }
.word-media { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf8; }
.word-media-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); font-size: 12px; }
.word-media b { display: block; font-size: 12.5px; }
.word-media span { font-size: 10.5px; color: var(--muted); }
.word-verify { display: flex; flex-direction: column; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf8; }
.word-verify div { display: flex; gap: 10px; font-size: 12px; }
.word-verify span { flex: none; width: 42px; color: var(--muted); }
.word-verify b { font-weight: 500; }
.word-sugs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.word-sug { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fbfcf8; color: var(--ink-2); font-size: 10.5px; }
.word-qr { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.word-qr svg { width: 132px; height: 132px; }
.word-qr-actions { display: flex; gap: 8px; margin-top: 10px; }
.word-qr-actions .btn { flex: 1; }
.word-empty { padding: 40px 10px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 1280px) {
  .editor-layout { grid-template-columns: 216px minmax(0, 1fr) 284px; }
}
@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 196px minmax(0, 1fr) 260px; gap: 12px; }
  .mode-hint { display: none; }
  .adv-palette { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-rail, .editor-inspector { position: static; max-height: none; }
  .editor-stage { order: 1; }
  .editor-rail { order: 2; }
  .editor-inspector { order: 3; }
  .adv-palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .word-format-panel { width: min(560px, calc(100vw - 48px)); max-height: 65vh; overflow-y: auto; }
  .ribbon-group { flex: none; }
  .word-page { min-height: 640px; }
}
@media (max-width: 480px) {
  .conn-pill span { display: none; }
  .update-bar { border-radius: 16px; width: calc(100vw - 28px); justify-content: space-between; }
}

