/* 码上交付 · 简历编辑器界面
 * 布局：顶栏 + 左侧面板（内容 / 设计 / 网页 / 体检）+ 中间 A4 预览；<900px 时改为底部标签切换。
 * 所有类名以 rb- 开头；简历纸面样式在 paper.css（rs- 前缀），两者互不影响。
 */
:root {
  --rb-primary: #3B5BFD;
  --rb-primary-2: #2946E6;
  --rb-primary-soft: rgba(59, 91, 253, .09);
  --rb-accent: #F26A12;
  --rb-ink: #0F172A;
  --rb-ink-2: #475569;
  --rb-ink-3: #7A8699;
  --rb-line: #E2E8F0;
  --rb-line-2: #CBD5E1;
  --rb-bg: #F4F6FA;
  --rb-card: #FFFFFF;
  --rb-stage: #E6E9F0;
  --rb-danger: #DC2626;
  --rb-ok: #12A150;
  --rb-warn: #D97706;
  --rb-radius: 10px;
  --rb-shadow: 0 8px 28px rgba(15, 23, 42, .12);
  --rb-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --rb-top-h: 56px;
  --rb-panel-w: 408px;
}
.rb {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--rb-bg);
  color: var(--rb-ink);
  font: 14px/1.6 var(--rb-font);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root {
    --rb-primary: #7B91FF;
    --rb-primary-2: #93A5FF;
    --rb-primary-soft: rgba(123, 145, 255, .14);
    --rb-ink: #E6EAF2;
    --rb-ink-2: #A9B4C7;
    --rb-ink-3: #7C889C;
    --rb-line: #243149;
    --rb-line-2: #33415C;
    --rb-bg: #0B1120;
    --rb-card: #121A2C;
    --rb-stage: #070B14;
    --rb-shadow: 0 10px 32px rgba(0, 0, 0, .45);
  }
}
.rb *, .rb *::before, .rb *::after { box-sizing: border-box; }
.rb button { font: inherit; color: inherit; }
.rb input, .rb textarea, .rb select { font: inherit; color: inherit; }
.rb-ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.rb-ic svg { width: 100%; height: 100%; }
html.rb-modal-lock, html.rb-page { overflow: hidden; }
html.rb-dragging, html.rb-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.rb-boot { margin: auto; color: var(--rb-ink-3); font-size: 15px; }
.rb-noscript { margin: 40px auto; max-width: 480px; padding: 20px; border-radius: 12px; background: #fff; text-align: center; }

/* ---------------- 按钮 */
.rb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; background: none; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; text-decoration: none !important; }
.rb-btn:disabled { opacity: .45; cursor: not-allowed; }
.rb-btn .rb-ic { width: 17px; height: 17px; }
.rb-btn-primary { background: var(--rb-primary); color: #fff !important; box-shadow: 0 4px 12px rgba(59, 91, 253, .25); }
.rb-btn-primary:hover:not(:disabled) { background: var(--rb-primary-2); }
.rb-btn-accent { background: var(--rb-accent); color: #fff !important; }
.rb-btn-ghost { background: var(--rb-card); border-color: var(--rb-line); color: var(--rb-ink); }
.rb-btn-ghost:hover:not(:disabled) { border-color: var(--rb-primary); color: var(--rb-primary); }
.rb-btn-soft { background: var(--rb-primary-soft); color: var(--rb-primary); }
.rb-btn-soft:hover:not(:disabled) { background: rgba(59, 91, 253, .15); }
.rb-btn-danger { background: var(--rb-danger); color: #fff !important; }
.rb-btn-link { min-height: 0; padding: 0; color: var(--rb-primary); font-weight: 600; }
.rb-btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.rb-btn-block { display: flex; width: 100%; }
.rb-btn-dashed { width: 100%; min-height: 40px; border: 1.5px dashed var(--rb-line-2); background: transparent; color: var(--rb-ink-2); }
.rb-btn-dashed:hover { border-color: var(--rb-primary); color: var(--rb-primary); background: var(--rb-primary-soft); }
.rb-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--rb-ink-2); cursor: pointer; }
.rb-icon-btn:hover:not(:disabled) { background: var(--rb-primary-soft); color: var(--rb-primary); }
.rb-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.rb-icon-btn.is-danger:hover { background: rgba(220, 38, 38, .1); color: var(--rb-danger); }
.rb-icon-btn.is-on { color: var(--rb-primary); }
.rb :focus-visible { outline: 2px solid var(--rb-primary); outline-offset: 1px; }

/* ---------------- 顶栏 */
.rb-top { position: relative; z-index: 20; flex: none; display: flex; align-items: center; gap: 10px; height: var(--rb-top-h); padding: 0 12px; background: var(--rb-card); border-bottom: 1px solid var(--rb-line); }
.rb-brand { display: flex; align-items: center; gap: 8px; flex: none; color: var(--rb-ink); text-decoration: none; font-weight: 700; }
.rb-brand-mark { width: 30px; height: 30px; }
.rb-brand-text small { display: block; font-size: 11px; font-weight: 500; color: var(--rb-ink-3); line-height: 1.2; }
.rb-brand-text b { display: block; font-size: 14px; line-height: 1.2; }
.rb-doc-btn { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 240px; height: 34px; padding: 0 8px 0 10px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.rb-doc-btn:hover { border-color: var(--rb-line); background: var(--rb-bg); }
.rb-doc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rb-save { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--rb-ink-3); font-size: 12.5px; }
.rb-save.is-error { color: var(--rb-danger); }
.rb-save.is-ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rb-ok); }
.rb-top-spacer { flex: 1 1 auto; }
.rb-top-actions { display: flex; align-items: center; gap: 8px; }
.rb-top-sep { width: 1px; height: 22px; background: var(--rb-line); margin: 0 2px; }

/* ---------------- 主体 */
.rb-body { position: relative; display: flex; flex: 1 1 0; min-height: 0; }
.rb-panel { position: relative; z-index: 10; display: flex; flex-direction: column; flex: none; width: var(--rb-panel-w); min-height: 0; background: var(--rb-card); border-right: 1px solid var(--rb-line); }
.rb-tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--rb-line); }
.rb-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; background: none; color: var(--rb-ink-2); font-weight: 600; cursor: pointer; }
.rb-tab .rb-ic { width: 16px; height: 16px; }
.rb-tab:hover { color: var(--rb-ink); }
.rb-tab.is-active { color: var(--rb-primary); }
.rb-tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--rb-primary); }
.rb-tab-badge { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--rb-primary-soft); color: var(--rb-primary); font-size: 11.5px; line-height: 18px; text-align: center; }
.rb-tab-badge.is-bad { background: rgba(220, 38, 38, .1); color: var(--rb-danger); }
.rb-tab-badge.is-mid { background: rgba(217, 119, 6, .12); color: var(--rb-warn); }
.rb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 80px; scrollbar-width: thin; }
.rb-pane[hidden] { display: none !important; }

/* 分组标题 */
.rb-group { margin-bottom: 18px; }
.rb-group-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--rb-ink); }
.rb-group-title small { font-weight: 500; color: var(--rb-ink-3); }
.rb-hint { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--rb-bg); color: var(--rb-ink-2); font-size: 12.5px; line-height: 1.6; }
.rb-hint .rb-ic { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; color: var(--rb-warn); }
.rb-muted { color: var(--rb-ink-3); }
.rb-small { font-size: 12.5px; }

/* ---------------- 表单 */
.rb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rb-field { grid-column: span 4; min-width: 0; }
.rb-field.w-half { grid-column: span 2; }
.rb-field.w-quarter { grid-column: span 2; }
@media (min-width: 380px) { .rb-panel .rb-field.w-quarter { grid-column: span 2; } }
.rb-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; color: var(--rb-ink-2); font-size: 12.5px; font-weight: 600; }
.rb-input, .rb-textarea, .rb-select { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--rb-line); border-radius: 8px; background: var(--rb-card); color: var(--rb-ink); font-size: 14px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
.rb-textarea { min-height: 64px; resize: vertical; }
.rb-input:focus, .rb-textarea:focus, .rb-select:focus { outline: none; border-color: var(--rb-primary); box-shadow: 0 0 0 3px var(--rb-primary-soft); }
.rb-input::placeholder, .rb-textarea::placeholder { color: var(--rb-ink-3); opacity: .8; }
.rb-inline { display: flex; align-items: center; gap: 6px; }
.rb-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--rb-ink-2); user-select: none; }
.rb-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--rb-primary); }
.rb-present { font-weight: 500; font-size: 12px; }

/* 开关 */
.rb-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.rb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rb-switch-ui { position: relative; width: 36px; height: 20px; flex: none; border-radius: 99px; background: var(--rb-line-2); transition: background-color .2s; }
.rb-switch-ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.rb-switch input:checked + .rb-switch-ui { background: var(--rb-primary); }
.rb-switch input:checked + .rb-switch-ui::after { transform: translateX(16px); }
.rb-switch input:focus-visible + .rb-switch-ui { outline: 2px solid var(--rb-primary); outline-offset: 2px; }

/* 分段选择 */
.rb-seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--rb-bg); border: 1px solid var(--rb-line); }
.rb-seg button { min-height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--rb-ink-2); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.rb-seg button.is-on { background: var(--rb-card); color: var(--rb-primary); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.rb-seg.is-full { display: flex; }
.rb-seg.is-full button { flex: 1 1 0; }

/* 滑块 */
.rb-range-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 64px; align-items: center; gap: 10px; margin-bottom: 10px; }
.rb-range-row .rb-label { margin: 0; }
.rb-range { width: 100%; accent-color: var(--rb-primary); }
.rb-range-val { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; font-variant-numeric: tabular-nums; color: var(--rb-ink-2); font-size: 12.5px; }
.rb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.rb-row + .rb-row { border-top: 1px dashed var(--rb-line); }

/* 颜色 */
.rb-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rb-swatch { position: relative; aspect-ratio: 1; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; cursor: pointer; overflow: hidden; }
.rb-swatch i { position: absolute; inset: 0; }
.rb-swatch i + i { inset: auto 0 0 auto; width: 45%; height: 45%; border-top-left-radius: 8px; }
.rb-swatch.is-on { border-color: var(--rb-ink); box-shadow: 0 0 0 2px var(--rb-card) inset; }
.rb-color-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rb-color { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--rb-line); border-radius: 8px; cursor: pointer; font-size: 13px; }
.rb-color input { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.rb-color input::-webkit-color-swatch-wrapper { padding: 0; }
.rb-color input::-webkit-color-swatch { border: 0; border-radius: 6px; }

/* 模板选择 */
.rb-tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rb-tpl { position: relative; display: block; padding: 0; border: 2px solid var(--rb-line); border-radius: 10px; background: var(--rb-card); cursor: pointer; overflow: hidden; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rb-tpl:hover { border-color: var(--rb-primary); transform: translateY(-1px); box-shadow: var(--rb-shadow); }
.rb-tpl.is-on { border-color: var(--rb-primary); box-shadow: 0 0 0 3px var(--rb-primary-soft); }
.rb-tpl-thumb { position: relative; aspect-ratio: 210 / 297; overflow: hidden; background: #fff; border-bottom: 1px solid var(--rb-line); }
.rb-tpl-thumb > .rs-doc { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.rb-tpl-meta { padding: 5px 7px 6px; }
.rb-tpl-name { display: block; font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-tpl-tags { display: block; color: var(--rb-ink-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-tpl-check { position: absolute; right: 6px; top: 6px; display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rb-primary); color: #fff; }
.rb-tpl.is-on .rb-tpl-check { display: grid; }
.rb-tpl-check .rb-ic { width: 14px; height: 14px; }

/* ---------------- 内容：基本信息卡 */
.rb-card { margin-bottom: 12px; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); background: var(--rb-card); }
.rb-card-pad { padding: 12px; }
.rb-profile-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.rb-avatar { position: relative; flex: none; width: 72px; height: 96px; border: 1.5px dashed var(--rb-line-2); border-radius: 8px; background: var(--rb-bg) center / cover no-repeat; display: grid; place-items: center; color: var(--rb-ink-3); cursor: pointer; overflow: hidden; padding: 0; }
.rb-avatar:hover { border-color: var(--rb-primary); color: var(--rb-primary); }
.rb-avatar.has-img { border-style: solid; }
.rb-avatar .rb-ic { width: 22px; height: 22px; }
.rb-avatar-tip { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; background: rgba(15, 23, 42, .6); color: #fff; font-size: 11px; text-align: center; }
.rb-profile-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }

/* 信息项（可拖动） */
.rb-facts { display: grid; gap: 6px; margin: 8px 0 4px; }
.rb-fact { display: grid; grid-template-columns: 20px 96px minmax(0, 1fr) 28px; align-items: center; gap: 6px; }
.rb-fact .rb-input { min-height: 32px; padding: 4px 8px; font-size: 13.5px; }
.rb-drag { display: inline-grid; place-items: center; width: 20px; height: 28px; border: 0; background: none; color: var(--rb-ink-3); cursor: grab; touch-action: none; padding: 0; border-radius: 5px; }
.rb-drag:hover { color: var(--rb-primary); background: var(--rb-primary-soft); }
.rb-drag .rb-ic { width: 16px; height: 16px; }
.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rb-chip { min-height: 26px; padding: 0 10px; border: 1px dashed var(--rb-line-2); border-radius: 99px; background: none; color: var(--rb-ink-2); font-size: 12.5px; cursor: pointer; }
.rb-chip:hover { border-color: var(--rb-primary); color: var(--rb-primary); }

/* ---------------- 模块卡 */
.rb-secs { display: grid; gap: 10px; }
.rb-col-title { display: flex; align-items: center; gap: 6px; margin: 4px 0 -2px; color: var(--rb-ink-3); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.rb-sec { border: 1px solid var(--rb-line); border-radius: var(--rb-radius); background: var(--rb-card); transition: box-shadow .15s, border-color .15s; }
.rb-sec.is-open { border-color: var(--rb-primary); box-shadow: 0 0 0 3px var(--rb-primary-soft); }
.rb-sec.is-hidden .rb-sec-name, .rb-sec.is-hidden .rb-sec-type { opacity: .45; }
.rb-sec.is-flash { animation: rb-flash 1s ease; }
@keyframes rb-flash { 0%, 100% { box-shadow: 0 0 0 3px var(--rb-primary-soft); } 30% { box-shadow: 0 0 0 6px rgba(59, 91, 253, .35); } }
.rb-sec-head { display: flex; align-items: center; gap: 4px; min-height: 46px; padding: 6px 6px 6px 4px; cursor: pointer; }
.rb-sec-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--rb-primary-soft); color: var(--rb-primary); }
.rb-sec-icon .rb-ic { width: 16px; height: 16px; }
.rb-sec-text { flex: 1 1 auto; min-width: 0; margin-left: 4px; }
.rb-sec-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14px; }
.rb-sec-type { display: block; color: var(--rb-ink-3); font-size: 12px; line-height: 1.3; }
.rb-sec-chev { transition: transform .2s; }
.rb-sec.is-open .rb-sec-chev { transform: rotate(180deg); }
.rb-sec-body { padding: 0 12px 12px; }
.rb-sec-body[hidden] { display: none; }
.rb-sec-title-input { margin-bottom: 10px; }
.rb-items { display: grid; gap: 10px; }
.rb-item { border: 1px solid var(--rb-line); border-radius: 9px; background: var(--rb-bg); }
.rb-item-head { display: flex; align-items: center; gap: 2px; min-height: 38px; padding: 4px 4px 4px 2px; cursor: pointer; }
.rb-item-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.rb-item-title.is-ph { color: var(--rb-ink-3); font-weight: 500; }
.rb-item-body { padding: 4px 10px 10px; }
.rb-item-body[hidden] { display: none; }
.rb-item.is-open { background: var(--rb-card); border-color: var(--rb-line-2); }
.rb-sec-foot { display: flex; gap: 8px; margin-top: 10px; }
.rb-drag-ghost { opacity: .95; box-shadow: 0 16px 40px rgba(15, 23, 42, .25); border-radius: 10px; background: var(--rb-card); }
.rb-drag-src { opacity: .35; }
.rb-drop-zone { min-height: 44px; border: 1.5px dashed var(--rb-line-2); border-radius: var(--rb-radius); display: grid; place-items: center; color: var(--rb-ink-3); font-size: 12.5px; }

/* 富文本 */
.rb-rte { border: 1px solid var(--rb-line); border-radius: 8px; background: var(--rb-card); transition: border-color .15s, box-shadow .15s; }
.rb-rte:focus-within { border-color: var(--rb-primary); box-shadow: 0 0 0 3px var(--rb-primary-soft); }
.rb-rte-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding: 3px 4px; border-bottom: 1px solid var(--rb-line); }
.rb-rte-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--rb-ink-2); cursor: pointer; }
.rb-rte-btn:hover { background: var(--rb-primary-soft); color: var(--rb-primary); }
.rb-rte-btn .rb-ic { width: 16px; height: 16px; }
.rb-rte-sep { width: 1px; height: 16px; margin: 0 3px; background: var(--rb-line); }
.rb-rte-example { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: rgba(217, 119, 6, .1); color: var(--rb-warn); font-size: 12px; font-weight: 600; cursor: pointer; }
.rb-rte-example .rb-ic { width: 14px; height: 14px; }
.rb-rte-area { padding: 8px 10px; outline: none; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.rb-rte-area.is-empty::before { content: attr(data-ph); color: var(--rb-ink-3); opacity: .85; pointer-events: none; position: absolute; }
.rb-rte-area.is-empty { position: relative; }
.rb-rte-area p { margin: 0; }
.rb-rte-area ul, .rb-rte-area ol { margin: 0; padding-left: 1.4em; }
.rb-rte-area li + li { margin-top: 2px; }
.rb-rte-area a { color: var(--rb-primary); }

/* 引流卡片 */
.rb-promo { margin-top: 16px; padding: 14px; border-radius: var(--rb-radius); background: linear-gradient(135deg, rgba(59, 91, 253, .08), rgba(0, 184, 169, .09)); border: 1px solid rgba(59, 91, 253, .18); }
.rb-promo h3 { margin: 0 0 4px; font-size: 14px; }
.rb-promo p { margin: 0 0 10px; color: var(--rb-ink-2); font-size: 12.5px; }
.rb-promo-list { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.rb-promo-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--rb-card); color: var(--rb-ink); text-decoration: none; font-size: 13px; border: 1px solid var(--rb-line); }
.rb-promo-list a:hover { border-color: var(--rb-primary); }
.rb-promo-list b { color: var(--rb-accent); font-size: 13px; white-space: nowrap; }

/* 体检 */
.rb-score { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px; border-radius: var(--rb-radius); background: var(--rb-bg); }
.rb-score-ring { --p: 80; --c: var(--rb-ok); position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--rb-line) 0); }
.rb-score-ring::after { content: attr(data-score); position: absolute; inset: 6px; display: grid; place-items: center; border-radius: 50%; background: var(--rb-bg); font-size: 20px; font-weight: 800; color: var(--rb-ink); }
.rb-issues { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rb-issue { display: flex; gap: 8px; padding: 10px; border-radius: 9px; border: 1px solid var(--rb-line); background: var(--rb-card); font-size: 13px; line-height: 1.6; }
.rb-issue .rb-ic { width: 16px; height: 16px; margin-top: 2px; }
.rb-issue.is-error .rb-ic { color: var(--rb-danger); }
.rb-issue.is-warn .rb-ic { color: var(--rb-warn); }
.rb-issue.is-tip .rb-ic { color: var(--rb-primary); }
.rb-issue-go { flex: none; align-self: center; }
.rb-empty-ok { padding: 20px; text-align: center; color: var(--rb-ok); font-weight: 600; }

/* 网页主题卡 */
.rb-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rb-theme { padding: 0; border: 2px solid var(--rb-line); border-radius: 10px; background: var(--rb-card); cursor: pointer; text-align: left; overflow: hidden; }
.rb-theme.is-on { border-color: var(--rb-primary); box-shadow: 0 0 0 3px var(--rb-primary-soft); }
.rb-theme-prev { position: relative; height: 70px; }
.rb-theme-meta { padding: 6px 8px 8px; }
.rb-theme-meta b { display: block; font-size: 13px; }
.rb-theme-meta span { display: block; color: var(--rb-ink-3); font-size: 11.5px; line-height: 1.45; }
.rb-pub-box { padding: 12px; border-radius: var(--rb-radius); border: 1px solid var(--rb-line); background: var(--rb-bg); }
/* 红字加粗提醒：保存链接和编辑码、打印开关 */
.rb-warn-red { margin: 0 0 8px; color: var(--rb-danger); font-weight: 700; font-size: 13px; line-height: 1.65; }
.rb-cred { display: grid; gap: 6px; margin: 0 0 10px; padding: 10px; border-radius: 8px; border: 1.5px dashed var(--rb-danger); background: rgba(220, 38, 38, .05); }
.rb-cred-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rb-cred-row b { flex: none; min-width: 4.5em; font-size: 12.5px; color: var(--rb-ink-2); }
.rb-cred-row code { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; letter-spacing: .04em; word-break: break-all; -webkit-user-select: all; user-select: all; }
.rb-cred .rb-btn { justify-self: start; }
.rb-pub-url { display: flex; gap: 6px; margin: 8px 0; }
.rb-pub-url input { flex: 1 1 auto; }
.rb-pub-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-pub-qr { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.rb-pub-qr img { width: 96px; height: 96px; border-radius: 6px; background: #fff; padding: 4px; }
.rb-file { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px dashed var(--rb-line-2); border-radius: 9px; }
.rb-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* ---------------- 预览区 */
.rb-stage { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; background: var(--rb-stage); }
.rb-stage-bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-bottom: 1px solid var(--rb-line); background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (prefers-color-scheme: dark) { .rb-stage-bar { background: rgba(18, 26, 44, .8); } }
.rb-zoom-val { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--rb-ink-2); }
.rb-pages-info { color: var(--rb-ink-2); font-size: 13px; }
.rb-pages-info.is-warn { color: var(--rb-warn); font-weight: 600; }
.rb-stage-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.rb-pages-wrap { position: relative; display: flex; justify-content: center; padding: 28px 24px 120px; min-width: max-content; }
.rb-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.rb-pages .rs-page { box-shadow: 0 2px 6px rgba(15, 23, 42, .08), 0 14px 40px rgba(15, 23, 42, .12); }
.rb-pages .rs-page::after { content: attr(data-page); position: absolute; right: -32px; bottom: 0; z-index: 3; width: 24px; color: var(--rb-ink-3); font: 600 12px/1 var(--rb-font); text-align: center; }
.rb-pages .rs-sec, .rb-pages .rs-head { cursor: pointer; border-radius: 1mm; transition: outline-color .12s, background-color .12s; outline: 1.5px dashed transparent; outline-offset: 1.2mm; }
.rb-pages .rs-sec:hover, .rb-pages .rs-head:hover, .rb-pages .rs-sec.is-target { outline-color: rgba(59, 91, 253, .6); }
.rb-pages .rs-sec.is-moving { opacity: .4; }
.rb-hover { position: absolute; z-index: 5; display: none; align-items: center; gap: 1px; padding: 2px; border-radius: 8px; background: var(--rb-ink); color: #fff; box-shadow: var(--rb-shadow); }
@media (prefers-color-scheme: dark) { .rb-hover { background: #2B3753; } }
.rb-hover.is-show { display: flex; }
.rb-hover .rb-icon-btn { width: 28px; height: 28px; color: #fff; border-radius: 6px; }
.rb-hover .rb-icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.rb-hover .rb-icon-btn .rb-ic { width: 15px; height: 15px; }
.rb-hover-name { padding: 0 6px 0 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.rb-hover .rb-drag { color: #fff; width: 26px; height: 28px; }
.rb-hover .rb-drag:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.rb-drop-line { position: absolute; z-index: 6; display: none; height: 3px; border-radius: 3px; background: var(--rb-primary); box-shadow: 0 0 0 3px rgba(59, 91, 253, .2); pointer-events: none; }
.rb-drop-line.is-show { display: block; }
.rb-drag-chip { position: fixed; z-index: 9999; padding: 6px 12px; border-radius: 8px; background: var(--rb-primary); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; box-shadow: var(--rb-shadow); }
.rb-col-handle { position: absolute; z-index: 4; display: none; width: 12px; margin-left: -6px; cursor: col-resize; touch-action: none; }
.rb-col-handle::after { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: transparent; transition: background-color .15s; }
.rb-stage-scroll:hover .rb-col-handle::after { background: rgba(59, 91, 253, .22); }
.rb-col-handle.is-show { display: block; }
.rb-col-handle:hover::after, .rb-col-handle.is-active::after { background: var(--rb-primary); width: 3px; }
.rb-web-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.rb-measure { position: absolute; left: -100000px; top: 0; width: 210mm; visibility: hidden; pointer-events: none; contain: layout style; }
.rb-float-tip { position: absolute; left: 50%; bottom: 18px; z-index: 6; transform: translateX(-50%); display: none; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 99px; background: var(--rb-card); box-shadow: var(--rb-shadow); font-size: 13px; white-space: nowrap; }
.rb-float-tip.is-show { display: flex; }

/* ---------------- 菜单 / 弹窗 / 提示 */
.rb-menu { position: fixed; z-index: 1000; min-width: 200px; max-width: 320px; max-height: 70vh; overflow: auto; padding: 6px; border: 1px solid var(--rb-line); border-radius: 10px; background: var(--rb-card); color: var(--rb-ink); box-shadow: 0 16px 44px rgba(15, 23, 42, .18); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.rb-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 7px; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.rb-menu-item:hover:not(:disabled) { background: var(--rb-primary-soft); color: var(--rb-primary); }
.rb-menu-item:disabled { opacity: .4; cursor: not-allowed; }
.rb-menu-item.is-danger:hover { background: rgba(220, 38, 38, .08); color: #DC2626; }
.rb-menu-item.is-active { color: var(--rb-primary); font-weight: 600; }
.rb-menu-item .rb-ic { width: 16px; height: 16px; }
.rb-menu-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-menu-hint { color: var(--rb-ink-3); font-size: 12px; white-space: nowrap; }
.rb-menu-sep { height: 1px; margin: 4px 6px; background: var(--rb-line); }
.rb-menu-title { padding: 6px 10px 2px; color: var(--rb-ink-3); font-size: 12px; font-weight: 600; }
.rb-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .18s; font: 14px/1.6 var(--rb-font); color: var(--rb-ink); }
.rb-modal.is-open { opacity: 1; }
.rb-modal-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 24, .55); }
.rb-modal-panel { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); border-radius: 14px; background: var(--rb-card); box-shadow: 0 24px 64px rgba(0, 0, 0, .3); transform: translateY(12px); transition: transform .18s; overflow: hidden; }
.rb-modal.is-open .rb-modal-panel { transform: none; }
.rb-modal-panel.is-sm { max-width: 400px; }
.rb-modal-panel.is-lg { max-width: 760px; }
.rb-modal-panel.is-xl { max-width: 1180px; height: calc(100vh - 32px); }
.rb-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px 20px; }
.rb-modal-title { margin: 0; font-size: 17px; font-weight: 700; }
.rb-modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 20px 16px; }
.rb-modal-text { margin: 0; color: var(--rb-ink-2); }
.rb-modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--rb-line); }
.rb-modal .rb-icon-btn { color: var(--rb-ink-2); }
.rb-steps { margin: 0; padding-left: 20px; color: var(--rb-ink-2); }
.rb-steps li + li { margin-top: 6px; }
.rb-steps b { color: var(--rb-ink); }
.rb-kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--rb-line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--rb-bg); font-size: 12px; line-height: 1.6; }
.rb-modal .rb-card { background: var(--rb-card); }
.rb-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 1100; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 10px; background: rgba(15, 23, 42, .94); color: #fff; font: 14px/1.5 var(--rb-font); text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.rb-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.rb-toast.is-error { background: #B91C1C; }
.rb-toast.is-ok { background: #15803D; }
.rb-device { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 10px; }
.rb-web-prev { display: flex; justify-content: center; height: calc(100% - 44px); background: var(--rb-stage); border-radius: 10px; overflow: hidden; }
.rb-web-prev iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .25s; }
.rb-web-prev.is-tablet iframe { width: 768px; }
.rb-web-prev.is-phone iframe { width: 390px; }
.rb-banner { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(245, 158, 11, .12); color: var(--rb-ink); font-size: 13px; border-bottom: 1px solid rgba(245, 158, 11, .35); }
.rb-banner > .rb-ic { color: var(--rb-warn); }
.rb-banner .rb-btn { margin-left: auto; }

/* ---------------- 手机 / 平板 */
.rb-mtabs { display: none; }
@media (max-width: 1180px) {
  .rb { --rb-panel-w: 380px; }
  .rb-brand-text small, .rb-hide-md { display: none !important; }
}
@media (max-width: 899px) {
  .rb { --rb-top-h: 52px; }
  .rb-top { gap: 6px; padding: 0 8px; }
  .rb-brand-text, .rb-save, .rb-hide-sm, .rb-top-sep { display: none !important; }
  .rb-doc-btn { max-width: 42vw; }
  .rb-panel { width: 100%; border-right: 0; }
  .rb-body[data-view="preview"] .rb-panel, .rb-body:not([data-view="preview"]) .rb-stage { display: none; }
  .rb-tabs { display: none; }
  .rb-scroll { padding-bottom: 90px; }
  .rb-mtabs { position: relative; z-index: 30; flex: none; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--rb-card); border-top: 1px solid var(--rb-line); }
  .rb-mtab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--rb-ink-3); font-size: 11.5px; font-weight: 600; cursor: pointer; }
  .rb-mtab .rb-ic { width: 20px; height: 20px; }
  .rb-mtab.is-active { color: var(--rb-primary); }
  .rb-pages-wrap { padding: 16px 8px 100px; }
  .rb-pages .rs-page::after { display: none; }
  .rb-stage-bar { padding: 0 8px; }
  .rb-fact { grid-template-columns: 20px 84px minmax(0, 1fr) 28px; }
}

/* ---------------- 打印：只打印 #rb-print 里的 A4 页面 */
.rb-print { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html.rb-printing, html.rb-printing body { margin: 0 !important; padding: 0 !important; background: #FFFFFF !important; overflow: visible !important; height: auto !important; }
  html.rb-printing body > *:not(#rb-print-root) { display: none !important; }
  html.rb-printing #rb-print-root { display: block !important; }
  html.rb-printing #rb-print-root .rs-page { box-shadow: none !important; margin: 0 !important; }
}
