:root {
  --bg: #f8fafc;
  --surface-2: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.16);
  /* 官网前台预览动态令牌 */
  --site-primary: #1d4ed8;
  --site-accent: #0ea5e9;
  --site-radius: 12px;
  --site-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", sans-serif;
}

html, body { height: 100%; }
body { font-size: 14px; line-height: 1.55; }

/* ===== 顶部演示与身份切换栏 ===== */
.demo-topbar {
  height: 46px; background: #0b1120; color: #e2e8f0; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: 0; z-index: 70; border-bottom: 1px solid #1e293b; font-size: 12.5px;
}
.demo-left, .demo-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; }
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.25); }
.seg-dark { display: inline-flex; background: #1e293b; padding: 3px; border-radius: 8px; gap: 2px; border: 1px solid #334155; }
.seg-dark button {
  border: none; background: transparent; color: #94a3b8; font-size: 12px; font-weight: 500;
  padding: 4px 11px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: 0.15s;
}
.seg-dark button:hover { color: #fff; }
.seg-dark button.active { background: #2563eb; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.dark-select {
  background: #1e293b; color: #f8fafc; border: 1px solid #334155; border-radius: 7px;
  padding: 4px 10px; font-size: 12px; font-weight: 500; cursor: pointer; outline: none;
}
.admin-jump {
  display: inline-flex; align-items: center; gap: 5px; color: #fde68a; background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3); padding: 4px 11px; border-radius: 7px; text-decoration: none;
  font-size: 12px; font-weight: 600; transition: 0.15s;
}
.admin-jump:hover { background: rgba(245,158,11,0.22); }

/* ===== 客户端工作台控件尺寸覆写 ===== */
.btn { gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.btn-primary { box-shadow: 0 1px 2px rgba(37,99,235,0.25); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px; }
.btn-lg { padding: 11px 20px; font-size: 14px; font-weight: 600; border-radius: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.blue { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); }
.badge.green { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.badge.red { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge.ai { background: var(--ai-soft); color: var(--ai); border-color: var(--ai-border); }

.input, .textarea, .select { width: 100%; padding: 8px 12px; font-size: 13.5px; }
.field { margin-bottom: 14px; }
.field label { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field-hint { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 4px; }

.card { padding: 20px; margin-bottom: 16px; }
.card-tight { padding: 14px 16px; }
.card-head { margin-bottom: 14px; gap: 12px; }
.card-title { font-size: 15px; }

.tabs { border-radius: 9px; }
.tab-btn {
  padding: 6px 13px; border-radius: 7px; border: none; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-xs); }

.grid-2, .grid-3 { gap: 16px; }
.grid-4 { gap: 14px; }

.switch {
  width: 40px; height: 22px; background: #cbd5e1; border-radius: 99px; position: relative;
  cursor: pointer; transition: 0.2s; display: inline-block; flex-shrink: 0; border: none;
}
.switch.on { background: var(--success); }
.switch::after {
  content: ""; width: 16px; height: 16px; background: #fff; border-radius: 50%;
  position: absolute; top: 3px; left: 3px; transition: 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch.on::after { left: 21px; }

table { font-size: 13px; }
th { padding: 9px 12px; font-size: 12px; background: var(--bg); }
td { padding: 11px 12px; }

/* ===== 模式 A：3 步首次建站向导 ===== */
.wizard-shell {
  min-height: calc(100vh - 46px); padding: 32px 20px 64px;
  display: none; flex-direction: column; align-items: center;
  background: radial-gradient(circle at top center, #eff6ff 0%, #f8fafc 48%);
}
.wizard-shell.active { display: flex; }
.wiz-stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; justify-content: center; }
.wiz-step-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px;
  font-size: 13px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: 0.15s;
}
.wiz-step-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.wiz-step-pill.done { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.wiz-card {
  width: 100%; max-width: 860px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 34px 38px; box-shadow: var(--shadow-md);
}
.wiz-title { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px; text-align: center; }
.wiz-sub { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 26px; }
.pick-card {
  border: 1.5px solid var(--border); border-radius: 14px; padding: 18px; cursor: pointer;
  transition: all 0.15s; background: var(--surface); position: relative;
}
.pick-card:hover { border-color: #93c5fd; background: #fafcff; }
.pick-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.entity-row {
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; margin-bottom: 9px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface);
}
.entity-row.secret { background: var(--danger-soft); border-color: var(--danger-border); }
.entity-row.pending { background: #fffdf5; border-color: var(--warn-border); }

/* ===== 模式 B：日常运营工作台主壳 ===== */
.app-shell { display: none; min-height: calc(100vh - 46px); }
.app-shell.active { display: flex; }

.sidebar {
  width: 256px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px; position: sticky; top: 46px;
  height: calc(100vh - 46px); flex-shrink: 0; overflow-y: auto;
}
.site-switcher {
  border: 1px solid var(--border); border-radius: 11px; padding: 10px 11px; margin-bottom: 14px;
  background: var(--bg); cursor: pointer; transition: 0.15s; position: relative;
}
.site-switcher:hover { border-color: #cbd5e1; background: #fff; }
.site-avatar {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex-shrink: 0;
}
.site-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-md);
  padding: 6px; z-index: 40; display: none;
}
.site-dropdown.open { display: block; }
.site-opt {
  padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-size: 12.5px;
}
.site-opt:hover { background: var(--surface-2); }
.site-opt.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.nav-section-label { font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; letter-spacing: 0.4px; }
.nav-group { margin-top: 8px; }
.nav-group-title { font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 10px 4px; letter-spacing: 0.4px; text-transform: none; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; border-radius: 9px; margin-bottom: 2px; cursor: pointer;
  color: var(--text-2); font-size: 13.5px; font-weight: 500; transition: 0.15s;
}
.nav-item .nav-left { display: inline-flex; align-items: center; gap: 9px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-badge { font-size: 11px; padding: 1px 7px; border-radius: 99px; font-weight: 600; }
.nav-badge.red { background: var(--danger-soft); color: var(--danger); }
.nav-badge.green { background: var(--success-soft); color: var(--success); }
.nav-badge.blue { background: var(--primary-soft); color: var(--primary); }

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.credit-box {
  background: linear-gradient(135deg, #f8fafc, #eff6ff); border: 1px solid var(--primary-border);
  border-radius: 11px; padding: 12px; cursor: pointer; transition: 0.15s;
}
.credit-box:hover { border-color: var(--primary); }

.main { flex: 1; padding: 24px 28px 72px; min-width: 0; max-width: 1380px; margin: 0 auto; width: 100%; }
.view { display: none; }
.view.active { display: block; animation: fadeSlide 0.18s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; display: flex; align-items: center; gap: 9px; }
.page-desc { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

/* ===== 首页：健康分与待办卡 ===== */
.health-banner {
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid var(--primary-border); border-radius: var(--radius-lg);
  padding: 22px 26px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.ring-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.ring-wrap svg { transform: rotate(-90deg); width: 84px; height: 84px; }
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-center strong { font-size: 23px; font-weight: 800; color: var(--primary); line-height: 1; }
.ring-center span { font-size: 11px; color: var(--muted); margin-top: 2px; }

.todo-item {
  border: 1px solid var(--border); border-radius: 13px; padding: 16px 20px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface);
  transition: 0.15s; flex-wrap: wrap;
}
.todo-item:hover { box-shadow: var(--shadow-sm); }
.todo-item.urgent { border-left: 4px solid var(--danger); background: linear-gradient(90deg, #fffafa, #ffffff 35%); }
.todo-item.normal { border-left: 4px solid var(--primary); }

.kpi-card { cursor: pointer; transition: 0.15s; margin-bottom: 0; }
.kpi-card:hover { border-color: var(--primary-border); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.kpi-val { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 4px; }

/* ===== 我的官网：Site Studio ===== */
.studio-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 14px; box-shadow: var(--shadow-xs);
}
.studio-workspace { display: flex; gap: 16px; align-items: flex-start; }
.block-drawer {
  width: 276px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; flex-shrink: 0; display: none; box-shadow: var(--shadow-xs);
}
.block-drawer.open { display: block; }
.block-ctrl-row {
  border: 1px solid var(--border-subtle); border-radius: 9px; padding: 9px 10px; margin-bottom: 8px;
  background: var(--bg);
}
.preview-stage { flex: 1; min-width: 0; display: flex; justify-content: center; }
.browser-frame {
  width: 100%; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-md); transition: max-width 0.25s ease;
}
.browser-frame.mobile-mode { max-width: 400px; border: 8px solid #1e293b; border-radius: 34px; }
.browser-chrome {
  background: #f1f5f9; border-bottom: 1px solid var(--border); padding: 8px 14px;
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted);
}
.chrome-dots { display: flex; gap: 5px; }
.chrome-dots span { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.chrome-url {
  flex: 1; background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 10px; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
}

.editable { position: relative; cursor: pointer; border-radius: 6px; transition: outline 0.12s, background 0.12s; }
.edit-mode-on .editable:hover { outline: 2px dashed var(--primary); outline-offset: 4px; }
.edit-mode-on .editable:hover::after {
  content: "点击直接修改"; position: absolute; top: -25px; left: 0; z-index: 5;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 5px; white-space: nowrap; box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
.edit-mode-on .editable-card { position: relative; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.edit-mode-on .editable-card:hover { border-color: var(--primary) !important; box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.edit-mode-on .editable-card:hover::after {
  content: "点击修改"; position: absolute; top: 8px; right: 8px; z-index: 4;
  background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 5px; box-shadow: 0 2px 6px rgba(37,99,235,0.28);
}
.edit-mode-off .editable, .edit-mode-off .editable-card { cursor: default; }

/* 官网前台内部样式（支持 3 套 Payload 真布局模板差异化皮肤与结构） */
.ws-topbar-ind {
  background: #0f172a; color: #cbd5e1; padding: 6px 26px; font-size: 11.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-bottom: 2px solid var(--site-accent);
}
.ws-nav {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 26px;
  border-bottom: 1px solid var(--border-subtle); background: #fff; gap: 12px; flex-wrap: wrap;
}
.ws-nav.tpl-saas {
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
  padding: 13px 26px; border-bottom: 1px solid rgba(99, 102, 241, 0.14);
}
.ws-nav.tpl-editorial {
  background: #fafaf9; border-bottom: 1.5px solid #e2e8f0; padding: 16px 28px;
}
.ws-nav-links { display: flex; gap: 14px; font-size: 13px; flex-wrap: wrap; }
.ws-nav-links button {
  border: none; background: transparent; color: #475569; cursor: pointer; font-weight: 500; white-space: nowrap;
  padding: 4px 2px; border-bottom: 2px solid transparent; transition: 0.15s; font-family: inherit;
}
.ws-nav-links button:hover { color: var(--site-primary); }
.ws-nav-links button.active { color: var(--site-primary); font-weight: 700; border-bottom-color: var(--site-primary); }

.ws-section { padding: 30px 28px; border-bottom: 1px solid var(--border-subtle); }
.mobile-mode .ws-section { padding: 20px 16px; }
.mobile-mode .ws-hero-grid, .mobile-mode .ws-grid-2, .mobile-mode .ws-grid-3, .mobile-mode .ws-grid-4 { grid-template-columns: 1fr !important; }
.ws-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.ws-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ws-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ws-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ws-cta-btn {
  background: var(--site-primary); color: #fff; border: none; padding: 9px 16px;
  border-radius: var(--site-radius); font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.tpl-saas .ws-cta-btn { border-radius: 99px; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28); }
.ws-hero-saas {
  background: radial-gradient(circle at top center, #312e81 0%, #0f172a 72%);
  color: #f8fafc; text-align: center;
}
.ws-hero-editorial {
  background: linear-gradient(180deg, #fafaf9 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--site-primary);
}
.ws-timeline { position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 12px; }
.ws-timeline::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--site-primary); opacity: 0.25;
}
.ws-timeline-item {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--site-radius); padding: 13px 16px;
}
.ws-timeline-dot {
  position: absolute; left: -23px; top: 16px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--site-primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--site-primary);
}
.ws-breadcrumb {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  margin-bottom: 12px; flex-wrap: wrap;
}
.ws-breadcrumb button {
  border: none; background: transparent; color: var(--site-primary); cursor: pointer; padding: 0; font-size: 12px; font-family: inherit;
}
.ws-breadcrumb button:hover { text-decoration: underline; }
.ws-faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; overflow: hidden; background: #fff; }
.ws-faq-q {
  width: 100%; text-align: left; padding: 12px 16px; background: #fff; border: none;
  font-weight: 600; font-size: 13.5px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: inherit; color: var(--text);
}
.ws-faq-q:hover { background: var(--bg); }
.ws-faq-a { padding: 10px 16px 13px; font-size: 13px; color: #475569; line-height: 1.65; border-top: 1px solid var(--border-subtle); }
.ws-faq-item.collapsed .ws-faq-a { display: none; }
.ws-faq-arrow { transition: transform 0.18s; color: var(--muted); flex-shrink: 0; }
.ws-faq-item:not(.collapsed) .ws-faq-arrow { transform: rotate(180deg); }

/* 移动端顶部快捷栏 & 底部 Tab Bar */
.mobile-header, .mobile-bottom-nav { display: none; }
@media (max-width: 820px) {
  .demo-topbar { height: auto; padding: 7px 12px; gap: 6px; }
  .mobile-header {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 9px 14px; position: sticky; top: 0; z-index: 55;
  }
  .mobile-bottom-nav {
    display: grid; grid-template-columns: repeat(6, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(15,23,42,0.06); z-index: 65;
  }
  .mob-nav-btn {
    border: none; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; font-weight: 500; cursor: pointer; position: relative; font-family: inherit;
  }
  .mob-nav-btn.active { color: var(--primary); font-weight: 700; }
  .mob-nav-dot {
    position: absolute; top: 6px; right: calc(50% - 16px);
    min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px;
    background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .mob-nav-dot.green { background: var(--success); }
  .app-shell.active { flex-direction: column; }
}

/* AI 对话模拟气泡 */
.ai-chat-panel { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.chat-user {
  background: var(--primary); color: #fff; padding: 11px 15px; border-radius: 14px 14px 4px 14px;
  max-width: 86%; margin-left: auto; font-size: 13.5px; margin-bottom: 14px;
}
.chat-ai {
  background: #fff; border: 1px solid var(--border); border-radius: 4px 14px 14px 14px;
  padding: 16px 18px; font-size: 13.5px; line-height: 1.75; box-shadow: var(--shadow-xs);
}
.cite-tag {
  display: inline-flex; align-items: center; gap: 3px; background: var(--success-soft); color: var(--success);
  border: 1px solid var(--success-border); padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; margin: 0 2px;
}

details.tech-drawer {
  margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface);
}
details.tech-drawer summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
pre.code-view {
  margin-top: 10px; background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 9px;
  font-size: 11.5px; overflow-x: auto; line-height: 1.55; max-height: 300px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ===== 编辑器与富文本工具条 ===== */
.editor-toolbar {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border); border-bottom: none;
  border-radius: 9px 9px 0 0;
}
.editor-textarea {
  border-radius: 0 0 9px 9px !important; min-height: 220px; line-height: 1.75; font-size: 14px;
}

/* ===== 弹窗 / 抽屉 / 企微推送卡片 / Toast 覆写 ===== */
.modal { border-radius: 16px; max-width: 640px; }
.modal.wide { max-width: 960px; }
.modal.narrow { max-width: 460px; }
.modal-head { padding: 16px 20px; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 13px 20px; background: var(--bg); }
.drawer { width: 620px; max-width: 95vw; }

.wecom-popup {
  position: fixed; top: 60px; right: 20px; width: 360px; max-width: calc(100vw - 32px);
  background: #ffffff; border: 1px solid #a7f3d0; border-left: 4px solid #059669;
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(15,23,42,0.18);
  z-index: 120; display: none; animation: slideInRight 0.25s ease;
}
.wecom-popup.show { display: block; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

.toast {
  bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 99px; font-size: 13px; font-weight: 500; max-width: 90vw;
}
.toast.show { animation: fadeSlide 0.2s; }

.progress-bar { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.3s ease; }
.empty-state { padding: 40px 20px; border-radius: 12px; background: var(--bg); }
.perm-banner {
  background: var(--warn-soft); border: 1px solid var(--warn-border); color: #92400e;
  padding: 10px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ===== 官网右侧配置面板 / 媒体素材库 / 额度套餐 ===== */
.site-inline-panel {
  width: 340px; background: var(--surface); border: 1px solid var(--primary-border); border-radius: 14px;
  padding: 16px; flex-shrink: 0; box-shadow: var(--shadow-sm); position: sticky; top: 64px;
}
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.media-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); transition: 0.15s; }
.media-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-sm); }
.media-thumb { height: 112px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; font-size: 12px; }
.pkg-card {
  border: 1.5px solid var(--border); border-radius: 14px; padding: 18px; background: var(--surface);
  cursor: pointer; transition: 0.15s; display: flex; flex-direction: column; justify-content: space-between;
}
.pkg-card:hover { border-color: #93c5fd; background: #fafcff; }
.pkg-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.inline-panel-card {
  background: #f8fafc; border: 1.5px solid var(--primary-border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 16px;
}

@media (max-width: 1040px) {
  .grid-3, .grid-4, .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-workspace { flex-direction: column; }
  .block-drawer, .site-inline-panel { width: 100%; position: static; }
}
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4, .ws-hero-grid, .media-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 14px 14px 82px; }
}
