:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --border: #e3e8ef;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-d: #1d4ed8;
  --accent: #0ea5e9;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --orange: #ea580c;
  --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.btn {
  background: var(--primary); color: #fff; border: none; padding: 8px 14px; border-radius: 8px; font-size: 13px;
  transition: background .15s;
}
.btn:hover { background: var(--primary-d); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #f0f3f8; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f3c9c9; }
.btn.danger:hover { background: #fef2f2; }
.btn.filter { background: transparent; color: var(--orange); border: 1px solid #ffedd5; }
.btn.filter:hover { background: #fff7ed; }
.btn.filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.sm { padding: 3px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; background:#fff; color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); }
label { display:block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }

/* ---- auth ---- */
.auth-wrap { min-height: 100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:
    radial-gradient(900px 520px at 86% -8%, rgba(200,161,74,.22), transparent 55%),
    radial-gradient(720px 520px at -6% 112%, rgba(67,97,238,.28), transparent 55%),
    linear-gradient(135deg,#0f1d4d 0%, #1e3a8a 58%, #2563eb 100%);
}
.auth-card { width: 380px; background:#fff; border-radius:18px; padding: 38px 34px; box-shadow: 0 24px 70px rgba(8,15,40,.32); }
.auth-brand { display:flex; align-items:center; gap:14px; margin-bottom:22px; }
.auth-mark { width:46px; height:46px; border-radius:13px; display:grid; place-items:center; color:#fff; font-weight:800; font-size:18px; letter-spacing:.5px; background:linear-gradient(135deg,#c8a14a,#e3c372); box-shadow:0 8px 20px rgba(200,161,74,.4); flex:0 0 auto; }
.auth-brand-txt h1 { margin:0; font-size:22px; font-weight:800; color:var(--text); letter-spacing:.3px; }
.auth-brand-txt .sub { color:var(--muted); margin:3px 0 0; font-size:12.5px; }
.auth-card button.btn { border:1.5px solid #c8a14a; box-shadow:0 6px 18px rgba(200,161,74,.28); }
.auth-card button.btn:hover { border-color:#e3c372; box-shadow:0 8px 22px rgba(200,161,74,.42); }
.auth-foot { margin:18px 0 0; padding-top:14px; border-top:1px solid var(--border); text-align:center; font-size:12px; color:var(--muted); line-height:1.6; }
.auth-foot b { color:#c8a14a; font-weight:700; }
.auth-tabs { display:flex; gap: 8px; margin-bottom: 16px; }
.auth-tabs .t { flex:1; text-align:center; padding: 8px; border-radius: 8px; background:#f1f5f9; color: var(--muted); cursor:pointer; font-size:13px; }
.auth-tabs .t.active { background: var(--primary); color:#fff; }
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.err { color: var(--red); font-size: 12px; min-height: 16px; margin-top: 8px; }

/* ---- app shell ---- */
.topbar { height: 56px; background:#fff; border-bottom: 1px solid var(--border); display:flex; align-items:center; padding: 0 20px; position: sticky; top:0; z-index: 20; }
.topbar .brand { font-weight: 700; font-size: 16px; color: var(--primary); }
.topbar .spacer { flex:1; }
.topbar .pts { background:#eef4ff; color: var(--primary-d); padding: 5px 12px; border-radius: 20px; font-weight:600; margin-right: 14px; font-size: 13px; }
.topbar .who { color: var(--muted); margin-right: 14px; font-size: 13px; }
.layout { display:flex; min-height: calc(100vh - 56px); }
.sidebar { width: 190px; background:#fff; border-right: 1px solid var(--border); padding: 14px 10px; }
.sidebar .nav { display:block; width:100%; text-align:left; background:none; border:none; padding: 11px 14px; border-radius: 8px; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.sidebar .nav:hover { background:#f1f5f9; }
.sidebar .nav.active { background: #eef4ff; color: var(--primary-d); font-weight:600; }
.sidebar .nav-ico { display: none; } /* 桌面端只显示文字，图标仅供移动端底部导航 */
.content { flex:1; padding: 22px 28px; }
.page-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }

/* ---- cards / grid ---- */
.grid { display:grid; gap: 14px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.chk-group { display:flex; flex-wrap:wrap; gap:8px 16px; padding:8px 0; }
.chk-group .chk { display:flex; align-items:center; gap:4px; font-size:13px; color:var(--text); }

/* ---- 充值中心套餐 ---- */
.recharge-packages { display:flex; flex-wrap:wrap; gap:10px; }
.recharge-packages .pkg-btn { min-width:120px; }

/* ---- 管理后台页签 ---- */
.admin-tabs { display:flex; gap:8px; margin-bottom:16px; border-bottom: 1px solid var(--border); }
.admin-tab { background:none; border:none; padding: 10px 18px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--primary-d); font-weight: 600; border-bottom-color: var(--primary); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card .meta { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.badge { display:inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge.level { background:#f1f5f9; color:#475569; }
.badge.risk-low { background:#dcfce7; color:#166534; }
.badge.risk-mid { background:#fef9c3; color:#854d0e; }
.badge.risk-high { background:#fee2e2; color:#991b1b; }
.badge.read { background:#dbeafe; color:#1e40af; }
.badge.cat { background:#ede9fe; color:#6d28d9; }
/* 商学院课程卡 / 详情页 */
.course-card { transition: box-shadow .15s, transform .15s; }
.course-card:hover { box-shadow: 0 6px 22px rgba(30,58,138,.12); transform: translateY(-2px); }
.course-detail-card { max-width: 760px; margin: 0 auto; padding: 28px; }
.course-detail-card .cd-title { margin: 0; font-size: 22px; }
.course-detail-card .cd-meta { margin: 10px 0 16px; }
.course-detail-card .cd-summary { font-size: 14px; line-height: 1.75; margin: 0 0 20px; }
.course-detail-card .cd-cost { font-size: 30px; font-weight: 800; color: var(--primary); margin-bottom: 18px; }
.course-detail-card .cd-cost small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.course-detail-card .cd-learn { font-size: 15px; padding: 12px 22px; }
/* 课程目录/章节 */
.course-toc-wrap { margin: 6px 0 22px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: linear-gradient(180deg, rgba(200,161,74,.06), rgba(255,255,255,0)); }
.toc-title { font-weight: 700; font-size: 14px; color: var(--gold, #c8a14a); margin-bottom: 8px; letter-spacing: .5px; }
.course-toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.course-toc li { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; transition: background .14s; font-size: 14px; }
.course-toc li:hover { background: rgba(37,99,235,.08); }
.toc-idx { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.toc-name { flex: 1 1 auto; color: var(--text); }
.toc-time { flex: 0 0 auto; font-size: 12px; color: var(--muted); background: #f1f5f9; padding: 2px 8px; border-radius: 10px; }
/* 正文标题锚点（章节跳转目标） */
.content-md h2 { scroll-margin-top: 16px; margin-top: 22px; padding-top: 6px; border-top: 1px dashed var(--border); }
.content-md h3 { scroll-margin-top: 16px; }
/* 金融SKILL 栏目 */
.skill-cats { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.chip { padding:5px 14px; border-radius:20px; border:1px solid var(--border); background:var(--panel); color:var(--muted); font-size:13px; cursor:pointer; transition:all .15s; }
.chip:hover { border-color:var(--primary); color:var(--primary); }
.chip.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.skill-card { display:flex; flex-direction:column; }
.skill-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.skill-tags .tag { font-size:11px; color:var(--muted); background:#f1f5f9; padding:2px 8px; border-radius:6px; }
.skill-meta-row { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin-bottom:8px; }
.badge.sub { background:#dcfce7; color:#166534; }
.badge.status-active { background:#dcfce7; color:#166534; }
.badge.status-expired, .badge.status-cancelled { background:#f1f5f9; color:#64748b; }
.badge.badge-warn { background:#ffedd5; color:#c2410c; }
.stat { text-align:center; }
.stat .n { font-size: 26px; font-weight: 700; color: var(--primary-d); }
.stat .l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row { display:flex; gap: 12px; align-items:flex-end; }
.row > div { flex:1; }
.section { margin-bottom: 26px; }
.section h2 { font-size: 15px; margin: 0 0 12px; }
.admin-h2-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h2-btn-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.h2-btn-group .btn { margin-left: 0; }

/* ---- table ---- */
table { width:100%; border-collapse: collapse; background:#fff; border:1px solid var(--border); border-radius:10px; overflow:hidden; }
th, td { text-align:left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
th { background:#f8fafc; color: var(--muted); font-weight:600; }
tr:last-child td { border-bottom: none; }

/* ---- modal ---- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; z-index: 50; padding: 20px; }
.modal { background:#fff; border-radius: 14px; width: 640px; max-width: 100%; max-height: 86vh; overflow:auto; padding: 22px; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 6px; }
.modal .content-md { white-space: pre-wrap; line-height: 1.7; font-size: 13.5px; color:#334155; }
.modal-actions { display:flex; justify-content:flex-end; gap: 10px; margin-top: 18px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background:#1f2937; color:#fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 100; opacity:0; transition: opacity .2s; pointer-events:none; }
.toast.show { opacity: 1; }
.toast.err { background:#b91c1c; }
.hidden { display:none !important; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6; border: 1px solid transparent; }
.alert.warn { background:#ffedd5; border-color:#fed7aa; color:#9a3412; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.muted { color: var(--muted); }
.mt { margin-top: 12px; }
small.cost { color: var(--amber); font-weight:600; }

/* ---- toggle switch ---- */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #d1d5db; border-radius: 26px; transition: .2s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }

/* ---- 服务器状态条（策略广场） ---- */
.server-status-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #bbf7d0; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 14px;
}
.server-status-icon { font-size: 18px; }
.server-status-text { font-size: 14px; color: #14532d; }
.server-status-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: #fff; border: 1px solid #d1fae5; border-radius: 20px;
  padding: 3px 10px; font-size: 12px; color: #166534; font-weight: 500;
}

/* ---- 服务器详情网格（我的服务） ---- */
.server-detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px;
}
.server-detail-item {
  display: flex; align-items: center; gap: 6px;
  background: #f8fafc; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #475569;
}
.sd-icon { font-size: 16px; }

/* ---- 移动端底部导航（默认隐藏） ---- */
#btn-menu { display: none; }
#nav-mask { display: none; }

/* ---- 响应式：手机端优化 ---- */
@media (max-width: 820px) {
  .topbar { padding: 0 12px; gap: 6px; height: 52px; }
  .topbar .brand { font-size: 14px; }
  .topbar .pts { margin-right: 8px; padding: 4px 10px; font-size: 12px; }
  .topbar .who { display: none; }
  .layout { display: block; padding-bottom: 64px; } /* 为底部导航栏留出空间 */
  /* 侧边栏改为底部固定导航栏 */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: 60px; z-index: 30;
    display: flex; padding: 0; border-right: none; border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(15,23,42,.06); background: #fff;
  }
  .sidebar .nav {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; margin: 0; padding: 6px 0 8px; border-radius: 0; font-size: 11px; color: var(--muted);
  }
  .sidebar .nav-ico { display: block; font-size: 20px; line-height: 1.2; }
  .sidebar .nav-txt { line-height: 1; }
  .sidebar .nav.active { background: none; color: var(--primary-d); font-weight: 600; }
  .sidebar .nav:active { background: #f8fafc; }
  .content { padding: 14px 12px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: 1fr; }
  .server-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 14px; }
  .row { flex-direction: column; align-items: stretch; gap: 0; }
  .row > div { width: 100%; }
  .row label { margin-top: 10px; }
  .btn { padding: 8px 12px; font-size: 12px; min-height: 36px; }
  input, textarea, select { padding: 11px 12px; font-size: 14px; }
  table { display: block; overflow-x: auto; white-space: nowrap; font-size: 12px; -webkit-overflow-scrolling: touch; }
  th, td { padding: 8px 10px; }
  .auth-wrap { padding: 16px; align-items: flex-start; }
  .auth-card { width: 100%; max-width: 420px; margin: 0 auto; padding: 22px; }
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: 100%; max-height: 92vh; height: auto; border-radius: 14px 14px 0 0; padding: 18px; }
  .toast { width: calc(100% - 32px); text-align: center; bottom: 76px; } /* 抬高到底部导航上方 */
  .section h2 { font-size: 14px; }
  .page-title { font-size: 16px; }
  .page-sub { font-size: 12px; margin-bottom: 14px; }
  .stat .n { font-size: 22px; }
  .section { margin-bottom: 20px; }
  /* 管理后台页签横向滚动 */
  .admin-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 4px; }
  .admin-tab { flex-shrink: 0; padding: 8px 14px; font-size: 13px; white-space: nowrap; }
  /* h2 按钮组在小屏换行 */
  .admin-h2-btns { flex-direction: column; align-items: flex-start; gap: 6px; }
  .h2-btn-group { gap: 4px; }
  .h2-btn-group .btn { font-size: 12px; padding: 6px 10px; min-height: 32px; }
  /* h2 内按钮在小屏换行 */
  .section h2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .section h2 .btn { margin-left: 0 !important; font-size: 12px; padding: 6px 10px; min-height: 32px; }
  .section h2 .route-toggle { margin-left: 0; }
  /* 卡片网格单列 */
  .grid { gap: 10px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: 1fr; }
  /* 统计卡片 2 列 */
  #admin-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  #admin-stats .stat .n { font-size: 18px; }
  #admin-stats .stat .l { font-size: 11px; }
  /* 策略卡片内 flex-between 换行 */
  .card .flex-between { flex-wrap: wrap; gap: 6px; }
  /* 充值按钮区域：手机端改为 2 列网格，按钮全宽 */
  .recharge-packages { display:grid; grid-template-columns:repeat(2, 1fr); gap:10px; }
  .recharge-packages .pkg-btn { width:100%; padding:12px 10px; min-height:44px; }
  /* 管理后台表格按钮缩小 */
  .btn.sm { padding: 4px 8px; font-size: 11px; min-height: auto; }
  /* stat 卡片间距 */
  .stat { padding: 4px 0; }
}
@media (max-width: 420px) {
  .topbar .brand { display: none; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
  .topbar .pts { font-size: 11px; padding: 3px 8px; }
  .content { padding: 10px 10px; }
  .card { padding: 12px; }
  .btn { padding: 7px 10px; font-size: 12px; min-height: 34px; }
  .section h2 .btn { font-size: 11px; padding: 5px 8px; min-height: 30px; }
  .stat .n { font-size: 20px; }
  /* 搜索框全宽 */
  #au-search { width: 100% !important; }
  /* 服务器详情网格手机端 2 列 */
  .server-detail-grid { grid-template-columns: repeat(2, 1fr); }
  /* 服务器状态条手机端紧凑 */
  .server-status-chip { font-size: 11px; padding: 2px 8px; }
  /* 超小屏充值套餐单列 */
  .recharge-packages { grid-template-columns: 1fr; }
}

/* 平板尺寸：2 列网格 */
@media (min-width: 521px) and (max-width: 820px) {
  .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: repeat(2, 1fr); }
  #admin-stats { grid-template-columns: repeat(4, 1fr) !important; }
}

/* 分流路由开关 */
.route-toggle {
  display: inline-flex; align-items: center; cursor: pointer;
  vertical-align: middle; margin-left: 6px; user-select: none;
}
.route-toggle .rt-track {
  width: 36px; height: 20px; border-radius: 10px;
  background: #cbd5e1; transition: background .2s; position: relative;
}
.route-toggle .rt-knob {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.route-toggle.on .rt-track { background: var(--green, #22c55e); }
.route-toggle.on .rt-knob { transform: translateX(16px); }
.route-toggle .rt-label {
  font-size: 12px; font-weight: 600; margin-left: 4px; color: var(--muted);
}
.route-toggle.on .rt-label { color: var(--green, #22c55e); }

/* 折叠列表 */
.collapsible-toggle {
  cursor: pointer; font-size: 12px; color: var(--blue, #3b82f6);
  padding: 2px 8px; border-radius: 6px; background: var(--bg2, #f1f5f9);
  display: inline-block; margin-bottom: 6px;
}
.collapsible-toggle:hover { text-decoration: underline; }

/* Quill 富文本编辑器 */
.ql-editor-box {
  min-height: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}
.ql-editor-box .ql-toolbar {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}
.ql-editor-box .ql-container {
  border: none;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
}
.ql-editor-box .ql-editor {
  min-height: 120px;
}
.modal .ql-editor-box {
  margin-top: 6px;
}

/* 富文本内容展示 */
.content-md, .desc-md {
  line-height: 1.7;
}
.content-md p, .desc-md p { margin: 0 0 10px; }
.content-md img, .desc-md img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 10px 0;
}
.content-md h1, .content-md h2, .content-md h3,
.desc-md h1, .desc-md h2, .desc-md h3 {
  margin: 16px 0 8px;
  font-weight: 600;
}
.content-md ul, .content-md ol,
.desc-md ul, .desc-md ol {
  padding-left: 22px;
  margin: 8px 0;
}
.content-md blockquote,
.desc-md blockquote {
  border-left: 3px solid var(--border);
  margin: 10px 0;
  padding: 4px 12px;
  color: var(--muted);
  background: #f8fafc;
}
.content-md pre,
.desc-md pre {
  background: #f1f5f9;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}

/* 策略卡片可点击与描述预览 */
.strategy-card {
  transition: box-shadow .15s, transform .15s;
}
.strategy-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.strategy-card .btn {
  position: relative;
  z-index: 1;
}
.desc-preview {
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .ql-editor-box { min-height: 140px; }
  .ql-editor-box .ql-toolbar { white-space: normal; }
}

/* ---- 顶部栏在线客服入口 ---- */
.topbar-cs {
  margin-left: 12px;
  padding: 5px 12px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s;
}
.topbar-cs:hover { background: var(--primary-d); }
@media (max-width: 820px) {
  .topbar-cs {
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 11px;
  }
}
