/* ==========================================================================
   产品设计中心 · 三栏横向浏览
   ========================================================================== */

:root {
  --topbar-h: 60px;
  --bg: #eef0f7;
  --panel: #ffffff;
  --ink: #151830;
  --ink-2: #464d69;
  --ink-3: #8b91aa;
  --line: #e6e9f2;
  --line-soft: #f0f2f8;
  --brand: #5b5bd6;
  --brand-2: #8b5cf6;
  --accent: #14b8a6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(23, 28, 63, 0.08), 0 2px 6px rgba(23, 28, 63, 0.04);
  --shadow-lg: 0 26px 60px rgba(23, 28, 63, 0.22);
  --ring: 0 0 0 3px rgba(91, 91, 214, 0.16);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background:
    radial-gradient(1100px 620px at 4% -12%, #e4e6ff 0%, rgba(228, 230, 255, 0) 62%),
    radial-gradient(900px 520px at 102% -6%, #e2f6f2 0%, rgba(226, 246, 242, 0) 58%),
    linear-gradient(180deg, #f3f5fb 0%, var(--bg) 46%, #e9ecf5 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid #7c7cf0; outline-offset: 2px; border-radius: 6px; }

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid #dfe3ef;
  background: #f7f8fc;
  box-shadow: 0 1px 0 #e4e7f1;
  color: #6b7190;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- 滚动条 ---------- */
.scroller::-webkit-scrollbar,
.pane-body::-webkit-scrollbar,
.outline::-webkit-scrollbar,
.sw-body::-webkit-scrollbar { width: 10px; height: 10px; }

.scroller::-webkit-scrollbar-track,
.pane-body::-webkit-scrollbar-track,
.outline::-webkit-scrollbar-track,
.sw-body::-webkit-scrollbar-track { background: transparent; }

.scroller::-webkit-scrollbar-thumb,
.pane-body::-webkit-scrollbar-thumb,
.outline::-webkit-scrollbar-thumb,
.sw-body::-webkit-scrollbar-thumb {
  background: #cbd1e2;
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.scroller::-webkit-scrollbar-thumb:hover,
.pane-body::-webkit-scrollbar-thumb:hover { background: #aeb6cf; border: 3px solid transparent; background-clip: padding-box; }

/* ==========================================================================
   左上角悬浮按钮
   ========================================================================== */
.fab {
  position: fixed;
  left: 16px;
  top: 8px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px 0 8px;
  border-radius: 14px;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, #4f46e5 0%, #6d45e8 52%, #8b3fe0 100%);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.34), 0 2px 6px rgba(79, 70, 229, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fab:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(79, 70, 229, 0.42), 0 2px 6px rgba(79, 70, 229, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.fab:active { transform: translateY(0); }
.fab[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 14px 30px rgba(79, 70, 229, 0.42); }

.fab-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.fab-copy { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: 148px; }
.fab-copy em { font-style: normal; font-size: 9px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.72); }
.fab-copy strong { max-width: 148px; overflow: hidden; font-size: 13px; font-weight: 700; letter-spacing: 0.01em; text-overflow: ellipsis; white-space: nowrap; }

.fab-chev { flex: 0 0 auto; width: 14px; height: 14px; opacity: 0.78; transition: transform 0.2s ease; }
.fab[aria-expanded="true"] .fab-chev { transform: rotate(180deg); }

/* ==========================================================================
   顶栏
   ========================================================================== */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
  padding: 0 18px 0 246px;
  border-bottom: 1px solid rgba(21, 24, 48, 0.07);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb-proj {
  flex: 0 0 auto;
  max-width: 260px;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  color: #3b3f63;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 7px;
  padding: 2px 6px;
  margin-left: -6px;
  transition: background 0.16s ease, color 0.16s ease;
}
.crumb-proj:hover { background: #f2f1ff; color: var(--brand); }
.crumb-sep { color: #c3c8da; font-size: 13px; }
.crumb-page { min-width: 0; max-width: 280px; overflow: hidden; font-size: 13.5px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }

.chip {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e5e4fb;
  background: #f6f5ff;
  color: #6a63c9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.seg,
.mini-seg {
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #e6e9f2;
  background: #f6f7fc;
}

.seg button,
.mini-seg button {
  padding: 4px 11px;
  border-radius: 7px;
  color: #6d7390;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.seg button:hover,
.mini-seg button:hover { color: var(--ink); }

.seg button.on,
.mini-seg button.on {
  color: #4338ca;
  background: #fff;
  box-shadow: 0 2px 6px rgba(23, 28, 63, 0.1), 0 0 0 1px rgba(91, 91, 214, 0.1);
}

.pager { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid #e6e9f2; background: #f6f7fc; }
.pager-btn { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #6d7390; transition: background 0.16s ease, color 0.16s ease; }
.pager-btn svg { width: 15px; height: 15px; }
.pager-btn:hover:not(:disabled) { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(23, 28, 63, 0.1); }
.pager-btn:disabled { opacity: 0.32; }
.pager-idx { min-width: 44px; color: #5b6180; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; text-align: center; }

.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: #626887;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.ico svg { width: 16px; height: 16px; }
.ico:hover { background: #f4f5fb; border-color: #e6e9f2; color: var(--brand); }
.ico.sm { width: 28px; height: 28px; }
.ico.sm svg { width: 14px; height: 14px; }
.ico.wide { width: auto; padding: 0 8px; font-size: 11.5px; font-weight: 600; }

/* ==========================================================================
   主体 / 横向轨道
   ========================================================================== */
.stage {
  position: relative;
  height: calc(100vh - var(--topbar-h));
  margin-top: var(--topbar-h);
}

.scroller {
  height: 100%;
  padding: 14px 0 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-left: 22px;
  overscroll-behavior-x: contain;
}

.track {
  display: flex;
  align-items: stretch;
  gap: 16px;
  height: 100%;
  padding: 0 22px;
}

.pane {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(21, 24, 48, 0.06);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.pane-proto { width: clamp(980px, 52vw, 1280px); }
.pane-ui { width: clamp(720px, 40vw, 1060px); }
.pane-doc { width: clamp(560px, 32vw, 740px); }

.pane::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7 50%, #22d3ee);
  opacity: 0.9;
  z-index: 2;
  pointer-events: none;
}

.pane-head {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  cursor: grab;
  user-select: none;
}

.pane-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #5b5bd6, #8b5cf6);
  box-shadow: 0 4px 10px rgba(91, 91, 214, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pane-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pane-titles h2 { font-size: 13.5px; font-weight: 700; letter-spacing: 0.01em; }
.pane-titles p { overflow: hidden; color: var(--ink-3); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }

.pane-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.pane-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
}

/* ---------- 01 原型画布 ---------- */
.pane-body.proto {
  padding: 18px;
  background-color: #f2f4fa;
  background-image: radial-gradient(circle at 1px 1px, #dbe1ef 1px, rgba(0, 0, 0, 0) 0);
  background-size: 22px 22px;
  cursor: grab;
  user-select: none;
}
.pane-body.proto.is-fit { overflow-x: hidden; }

.device {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #d8ddec;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 23, 43, 0.13), 0 2px 6px rgba(20, 23, 43, 0.06);
}

.device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #e8ebf4;
  background: linear-gradient(180deg, #f9fafd, #f3f5fb);
}

.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.r { background: #ff6b6b; }
.dot.y { background: #ffc107; }
.dot.g { background: #3ddc97; }

.device-url {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 8px;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid #e6e9f2;
  border-radius: 6px;
  background: #fff;
  color: #8b91aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-size {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eef0f8;
  color: #8b91aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.device-screen { position: relative; overflow: hidden; background: #fff; }
.device-screen iframe { display: block; width: 1440px; height: 900px; border: 0; transform-origin: top left; background: #fff; }

/* 手机形态 */
.device.is-mobile {
  overflow: hidden;
  border: 7px solid #14172a;
  border-radius: 34px;
  background: #14172a;
  box-shadow: 0 28px 64px rgba(12, 15, 30, 0.34), 0 4px 14px rgba(12, 15, 30, 0.2);
}
.device.is-mobile .device-bar { display: none; }
.device.is-mobile .device-screen { border-radius: 24px; }
.device.is-mobile .device-screen iframe { width: 390px; height: 844px; }

.phone-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px 5px;
  background: #14172a;
  color: #fff;
  font-size: 10px;
}
.device.is-mobile .phone-bar { display: flex; }
.phone-time { font-weight: 600; letter-spacing: 0.2px; }
.phone-notch { width: 66px; height: 14px; border-radius: 8px; background: #000; }
.phone-status { display: flex; align-items: flex-end; gap: 3px; }
.phone-status i { display: block; width: 3px; border-radius: 1px; background: #fff; }
.phone-status i:nth-child(1) { height: 4px; }
.phone-status i:nth-child(2) { height: 7px; }
.phone-status i:nth-child(3) { height: 10px; }

.phone-home { display: none; }
.device.is-mobile .phone-home {
  display: block;
  width: 96px;
  height: 4px;
  margin: 7px auto 9px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.85);
}

.pane-body.proto.is-mobile { display: flex; justify-content: center; align-items: flex-start; }

.proto-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px dashed #d5dbea;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #7c829c;
  font-size: 11.5px;
  line-height: 1.55;
}
.proto-tip svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; color: #8a90ab; }

/* ---------- 02 UI 画布 ---------- */
.pane-body.ui {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background:
    linear-gradient(180deg, #f7f8fd 0%, #eef1f9 100%);
  cursor: grab;
  user-select: none;
}

.ui-empty { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 12px; }
.ui-empty-card {
  width: min(360px, 100%);
  padding: 26px 24px;
  border: 1px dashed #dfe4f1;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}
.ui-empty-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #f2f4fb;
  color: #9aa0b8;
}
.ui-empty-ico svg { width: 20px; height: 20px; }
.ui-empty-card b { color: #4b5270; font-size: 13.5px; }
.ui-empty-card p { margin: 6px 0 14px; color: #9aa0b8; font-size: 11.5px; line-height: 1.7; }

.ui-shot {
  position: relative;
  flex: 1 1 0;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #dfe4f1;
  background:
    linear-gradient(45deg, #f7f8fc 25%, transparent 25%, transparent 75%, #f7f8fc 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, #f7f8fc 25%, #ffffff 25%, #ffffff 75%, #f7f8fc 75%) 8px 8px / 16px 16px;
  box-shadow: 0 18px 40px rgba(20, 23, 43, 0.13), 0 2px 6px rgba(20, 23, 43, 0.05);
  cursor: default;
  touch-action: none;
}
.ui-shot.is-zoomed { cursor: grab; }
.ui-shot.is-drag { cursor: grabbing; }
.ui-shot img {
  flex: 0 0 auto;
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  will-change: transform;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(20, 23, 43, 0.16);
  opacity: 0;
  transition: opacity 0.18s ease;
  -webkit-user-drag: none;
  user-select: none;
}
.ui-shot.is-ready img { opacity: 1; }

.ui-zoombar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 8px;
  border: 1px solid #e7eaf4;
  border-radius: 10px;
  background: #fff;
}
.ui-zoombar[hidden] { display: none; }
.ui-zbtn {
  flex: 0 0 auto;
  min-width: 26px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid #e3e7f1;
  border-radius: 6px;
  background: #fff;
  color: #5a6080;
  font-size: 13px;
  line-height: 1;
}
.ui-zbtn:hover { background: #f5f6fb; }
.ui-zbtn.wide { padding: 0 9px; font-size: 10.5px; }
.ui-zrange {
  flex: 1 1 auto;
  min-width: 60px;
  height: 4px;
  accent-color: #6366f1;
  cursor: pointer;
}
.ui-zpct {
  flex: 0 0 auto;
  min-width: 38px;
  color: #8b91aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  text-align: right;
}

/* 多张 UI 图：缩略图切换 */
.ui-thumbs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 2px 2px 4px;
  overflow-x: auto;
}
.ui-thumbs[hidden] { display: none; }
.ui-thumb {
  flex: 0 0 auto;
  width: 94px;
  height: 59px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe4f1;
  border-radius: 8px;
  background: #fff;
  opacity: 0.68;
  transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ui-thumb:hover { opacity: 1; }
.ui-thumb.on {
  opacity: 1;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
}
.ui-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }

.ui-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; padding: 0 4px; color: #7c829c; font-size: 11.5px; }
.ui-notes {
  display: grid;
  gap: 7px;
  margin: 14px 4px 0;
  padding: 12px 14px;
  border: 1px dashed #dfe4f1;
  border-radius: 12px;
  background: #fff;
  list-style: none;
}
.ui-notes li { display: flex; gap: 10px; color: #6f7593; font-size: 11.5px; line-height: 1.55; }
.ui-notes b { flex: 0 0 34px; color: #3b4160; font-weight: 700; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg.dim { color: #9aa0b8; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }

/* ---------- 03 文档 ---------- */
.pane-body.doc { padding: 0; background: #fff; }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 22px 0;
}
.doc-meta:empty { display: none; }
.doc-meta .mchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid #ebedf5;
  background: #f8f9fd;
  color: #767c99;
  font-size: 10.5px;
}
.doc-meta .mchip b { color: #4b5270; font-weight: 600; }
.doc-meta .mchip.brand { border-color: #e6e4ff; background: #f7f6ff; color: #6a63c9; }

/* 文档接口的加载 / 失败态 */
.doc-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 24px;
  padding: 16px 18px;
  border: 1px dashed #dfe4f1;
  border-radius: 10px;
  background: #fbfcff;
  color: #7c829c;
  font-size: 12.5px;
}
.doc-loading .spin {
  width: 14px;
  height: 14px;
  border: 2px solid #dcdef0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: doc-spin 0.8s linear infinite;
}
@keyframes doc-spin { to { transform: rotate(360deg); } }

.doc-error {
  margin: 18px 24px;
  padding: 16px 18px;
  border: 1px dashed #efc6c1;
  border-radius: 10px;
  background: #fff8f7;
  color: #a34a42;
  font-size: 12.5px;
  line-height: 1.7;
}
.doc-error b { display: block; margin-bottom: 4px; color: #8f3a32; font-size: 13px; }
.doc-error p { margin: 0 0 10px; color: #a86760; }
.doc-retry {
  padding: 5px 13px;
  border: 1px solid #e8b7b1;
  border-radius: 7px;
  background: #fff;
  color: #b04b42;
  font-size: 12px;
  font-weight: 600;
}
.doc-retry:hover { background: #fff1ef; }

/* 文档空状态 */
.doc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 54vh;
  padding: 32px 24px;
  text-align: center;
}
.doc-empty-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 13px;
  background: #f4f5fb;
  color: #a6acc0;
}
.doc-empty-ico svg { width: 22px; height: 22px; }
.doc-empty b { color: #4b5270; font-size: 14px; }
.doc-empty p { margin: 6px 0 16px; color: #9aa0b8; font-size: 12px; }
.doc-empty .btn-ghost { height: 32px; padding: 0 14px; font-size: 11.5px; }

.prose { padding: 16px 24px 56px; color: #333a55; font-size: 13px; line-height: 1.85; }
.prose > :first-child { margin-top: 4px; }
.prose h1 {
  margin: 4px 0 4px;
  color: #161a33;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.prose h1 + p { margin-top: 6px; }
.prose h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--brand);
  color: #1b2040;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
}
.prose h3 { margin: 18px 0 8px; color: #2a3050; font-size: 13.5px; font-weight: 700; }
.prose h4 { margin: 14px 0 6px; color: #3b4162; font-size: 12.5px; font-weight: 700; }
.prose p { margin: 8px 0; }
.prose strong { color: #1d2240; font-weight: 700; }
.prose a { color: #4f46e5; text-decoration: none; border-bottom: 1px dashed rgba(79, 70, 229, 0.4); }
.prose a:hover { border-bottom-style: solid; }
.prose ul, .prose ol { margin: 8px 0; padding-left: 20px; }
.prose li { margin: 3px 0; }
.prose li::marker { color: #a5abc6; }
.prose li > ul, .prose li > ol { margin: 3px 0; }
.prose hr { height: 1px; margin: 22px 0; border: 0; background: linear-gradient(90deg, #e6e9f2, rgba(230, 233, 242, 0)); }
.prose blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  border-left: 3px solid #a5b4fc;
  background: #f7f8ff;
  color: #4b5270;
  font-size: 12.5px;
}
.prose blockquote p { margin: 0; }
.prose code {
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid #eceef6;
  background: #f6f7fc;
  color: #5b4fd0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.prose pre {
  margin: 10px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 10px;
  background: #1d2138;
  color: #dfe3ff;
  font-size: 11.5px;
  line-height: 1.7;
}
.prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }

/* 表格 */
.prose .tbl-wrap { margin: 10px 0 14px; overflow-x: auto; border: 1px solid #e8eaf3; border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.6; }
.prose thead th {
  padding: 8px 10px;
  border-bottom: 1px solid #e8eaf3;
  background: #f7f8fc;
  color: #4b5270;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.prose tbody td { padding: 8px 10px; border-bottom: 1px solid #f1f3f9; vertical-align: top; color: #3d4361; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: #fcfcfe; }
.prose tbody tr:hover { background: #f8f8ff; }
.prose th[data-align="center"], .prose td[data-align="center"] { text-align: center; }
.prose th[data-align="right"], .prose td[data-align="right"] { text-align: right; }

/* 优先级徽标 */
.pill {
  display: inline-block;
  min-width: 30px;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}
.pill.p0 { background: #fee2e2; color: #b91c1c; }
.pill.p1 { background: #ffedd5; color: #c2410c; }
.pill.p2 { background: #e0e7ff; color: #4338ca; }
.pill.p3 { background: #dcfce7; color: #15803d; }

/* 验收清单 */
.prose .task-item { display: flex; align-items: flex-start; gap: 8px; margin: 5px 0; padding-left: 2px; list-style: none; }
.prose .task-item .box {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border: 1.5px solid #cfd5e6;
  border-radius: 4px;
  background: #fff;
}
.prose .task-item .box.on { border-color: #5b5bd6; background: #5b5bd6; }
.prose .task-item .box.on::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}

/* 本页目录 */
.outline {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 6;
  width: 268px;
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 8px;
  border-radius: 13px;
  border: 1px solid rgba(21, 24, 48, 0.08);
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.outline[hidden] { display: none; }
.outline a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: #4b5270;
  font-size: 12px;
  text-decoration: none;
  line-height: 1.5;
}
.outline a:hover { background: #f4f5fd; color: var(--brand); }
.outline a.sub { padding-left: 22px; color: #7c829c; font-size: 11.5px; }
.outline .ol-title { padding: 4px 10px 6px; color: #9aa0b8; font-size: 10px; letter-spacing: 0.12em; }

/* ==========================================================================
   滚动提示 / 进度
   ========================================================================== */
.xbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: 3px;
  background: rgba(21, 24, 48, 0.05);
  pointer-events: none;
}
.xbar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #6366f1, #a855f7 60%, #22d3ee);
  transition: width 0.12s linear;
}

.hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 34;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(22, 25, 48, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(16, 18, 38, 0.24);
  color: #eef0ff;
  font-size: 11.5px;
  letter-spacing: 0.01em;
  transform: translate(-50%, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.hint span { color: #a9b1ff; font-weight: 700; }
.hint svg { flex: 0 0 auto; width: 14px; height: 14px; color: #a9b1ff; }
.hint.is-hidden { opacity: 0; transform: translate(-50%, 10px); }

/* ==========================================================================
   切换面板
   ========================================================================== */
.sw-mask {
  position: fixed;
  inset: 0;
  z-index: 64;
  background: rgba(17, 20, 40, 0.22);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.sw-mask.is-open { opacity: 1; visibility: visible; }

.switcher {
  position: fixed;
  left: 16px;
  top: 62px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 396px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 82px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(21, 24, 48, 0.07);
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.985);
  transform-origin: 24px 0;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.switcher.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.sw-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.sw-heading { display: flex; flex-direction: column; line-height: 1.3; }
.sw-heading strong { font-size: 14px; font-weight: 700; }
.sw-heading span { color: var(--ink-3); font-size: 10.5px; }
.sw-head .ico { margin-left: auto; }

.sw-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #e6e9f2;
  background: #f8f9fc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.sw-search:focus-within { border-color: #b9b7f2; background: #fff; box-shadow: var(--ring); }
.sw-search svg { flex: 0 0 auto; width: 15px; height: 15px; color: #9aa0b8; }
.sw-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
}
.sw-search input::placeholder { color: #a6acc2; }
.sw-search input::-webkit-search-cancel-button { display: none; }
.sw-search kbd { margin-right: 2px; }

.sw-tabs { display: flex; gap: 4px; padding: 0 16px 10px; border-bottom: 1px solid var(--line-soft); }
.sw-tabs button {
  flex: 1 1 0;
  padding: 6px 8px;
  border-radius: 8px;
  color: #737995;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease;
}
.sw-tabs button:hover { background: #f4f5fb; color: var(--ink); }
.sw-tabs button.on { background: #efeffd; color: #4f46e5; }

.sw-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 12px 6px; }

.sw-project {
  position: relative;
  margin: 0 4px 12px;
  padding: 12px 13px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e9e8fd;
  background: linear-gradient(135deg, #f7f6ff 0%, #f2f8ff 100%);
}
.sw-project::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -42px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0));
  pointer-events: none;
}
.sw-project .pj-top { display: flex; align-items: baseline; gap: 8px; }
.sw-project .pj-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  font-weight: 700;
  color: #24284a;
  line-height: 1.45;
}
.sw-project .pj-code { color: #7a73cf; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px; }
.sw-project .pj-desc { margin-top: 5px; color: #5f6683; font-size: 11.5px; line-height: 1.6; }
.sw-project .pj-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 9px; color: #7c829c; font-size: 10.5px; }
.sw-project .pj-meta b { color: #4b5270; font-weight: 600; }
.sw-project .pj-status {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 7px;
  border-radius: 5px;
  background: #e8fbf5;
  color: #0f9b7f;
  font-size: 10px;
  font-weight: 600;
}

.sw-list { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }

.sw-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  text-align: left;
  transition: background 0.15s ease;
}
.sw-item:hover { background: #f5f6fc; }
.sw-item.on { background: #f1f0ff; box-shadow: inset 0 0 0 1px #e3e0ff; }
.sw-item.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #6366f1, #a855f7);
}

.sw-idx {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 1px solid #e6e9f2;
  background: #fff;
  color: #7c829c;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
}
.sw-item.on .sw-idx { border-color: #d7d3fb; background: #fff; color: #5b53d6; }

.sw-text { flex: 1 1 auto; min-width: 0; }
.sw-text .sw-name {
  display: block;
  overflow: hidden;
  color: #2b3050;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw-text .sw-name .dot-on { display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: #6366f1; vertical-align: middle; }
.sw-text .sw-desc {
  display: block;
  max-width: 100%;
  margin-top: 1px;
  overflow: hidden;
  color: #8b91aa;
  font-size: 10.5px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sw-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sw-tag { padding: 0 5px; border-radius: 4px; background: #f2f4fa; color: #7c829c; font-size: 9.5px; line-height: 1.6; }
.sw-item.on .sw-tag { background: #e9e7ff; color: #6a63c9; }

.sw-mark { flex: 0 0 auto; margin-top: 3px; color: #cfd5e6; font-size: 10px; }
.sw-item.on .sw-mark { color: #7a73cf; }

.sw-proj-item { align-items: center; padding: 11px; }
.sw-proj-item .pj-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sw-empty { padding: 34px 16px; color: #9aa0b8; font-size: 12px; text-align: center; }

.sw-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  border-top: 1px solid var(--line-soft);
  background: #fbfbfe;
  color: #9aa0b8;
  font-size: 10.5px;
}
.sw-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ==========================================================================
   大图预览
   ========================================================================== */
.lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: rgba(10, 12, 28, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lb[hidden] { display: none; }

.lb-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}
.lb-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lb-title strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.lb-title span { flex: 0 0 auto; color: rgba(255, 255, 255, 0.45); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; }
.lb-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lb .ico { color: rgba(255, 255, 255, 0.82); }
.lb .ico:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.13); color: #fff; }
.lb-zoom {
  min-width: 52px;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.82);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  text-align: center;
}

.lb-stage {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.lb-stage.is-drag { cursor: grabbing; }
.lb-stage img {
  flex: 0 0 auto;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  will-change: transform;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  user-select: none;
  -webkit-user-drag: none;
}

.lb-tip {
  padding: 8px 16px 12px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10.5px;
  text-align: center;
}

/* ==========================================================================
   接口异常提示
   ========================================================================== */
.net-banner {
  position: fixed;
  top: 68px;
  left: 50%;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 40px);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #f3d9a4;
  background: #fffaeb;
  box-shadow: 0 10px 24px rgba(120, 80, 10, 0.12);
  color: #8a5a08;
  font-size: 11.5px;
  transform: translateX(-50%);
}
.net-banner[hidden] { display: none; }
.net-banner svg { flex: 0 0 auto; width: 15px; height: 15px; }
.net-banner .net-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-banner button {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid #eccf96;
  background: #fff;
  color: #8a5a08;
  font-size: 11px;
  font-weight: 600;
}
.net-banner button:hover { background: #fff6df; }
.net-banner .net-close {
  padding: 2px 7px;
  border-color: transparent;
  background: transparent;
  color: #b08a4a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

/* ==========================================================================
   提示条
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 74px;
  z-index: 100;
  padding: 9px 16px;
  border-radius: 10px;
  background: rgba(22, 25, 48, 0.92);
  box-shadow: 0 12px 30px rgba(16, 18, 38, 0.3);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: #fff;
  color: #333;
  font-size: 14px;
}

/* ==========================================================================
   新建 / 编辑
   ========================================================================== */
.sw-actions { padding: 0 16px 10px; }
.sw-actions:empty { display: none; }
.sw-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  border-radius: 9px;
  border: 1px dashed #cfd3ea;
  background: #f8f8ff;
  color: #5b4fd6;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sw-create:hover { background: #f1f0ff; border-color: #b9b4f5; }
.sw-create-plus { font-size: 14px; line-height: 1; }

.pj-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #e4e1fa;
}
.pj-act {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #e3dffa;
  background: #fff;
  color: #6a63c9;
  font-size: 10.5px;
  font-weight: 600;
}
.pj-act:hover { background: #f6f5ff; }
.pj-act.danger { color: #c2473f; border-color: #f0cdc9; }
.pj-act.danger:hover { background: #fff5f4; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 32, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(21, 24, 48, 0.08);
  background: #fff;
  box-shadow: 0 30px 80px rgba(10, 12, 30, 0.4);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 15px; font-weight: 700; }
.modal-head .ico { margin-left: auto; }
.modal-body { flex: 1 1 auto; overflow: auto; padding: 18px 20px 6px; }
.modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fbfbfe;
}
.editor-error { flex: 1 1 auto; min-width: 0; color: #c2473f; font-size: 11.5px; }

.btn-primary,
.btn-ghost,
.btn-danger {
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #5b5bd6, #7c4ce0);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.24);
}
.btn-primary:disabled { opacity: 0.6; }
.btn-ghost { border: 1px solid #dfe3ee; background: #fff; color: #4b5270; }
.btn-ghost:hover { background: #f7f8fc; }
.btn-danger { border: 1px solid #f0cdc9; background: #fff; color: #c2473f; }
.btn-danger:hover { background: #fff5f4; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row > span { color: #4b5270; font-size: 12px; font-weight: 600; }
.form-row > span i { color: #e2554f; font-style: normal; }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dfe3ee;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: #1d2240;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.65;
}
.form-row textarea { resize: vertical; min-height: 60px; }
.form-row textarea.code {
  background: #fbfcff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.form-row input:focus,
.form-row textarea:focus { border-color: #a99cf9; box-shadow: 0 0 0 3px rgba(109, 94, 248, 0.12); }
.form-row em { color: #9aa0b8; font-size: 10.5px; font-style: normal; }

/* 图片上传 */
.uploader { padding: 10px; border: 1px solid #eef0f7; border-radius: 12px; background: #fcfcff; }
.up-list { display: flex; flex-wrap: wrap; gap: 8px; }
.up-empty { padding: 8px 2px; color: #a6acc0; font-size: 11px; }
.up-thumb {
  position: relative;
  width: 104px;
  height: 66px;
  overflow: hidden;
  border: 1px solid #e1e5f0;
  border-radius: 8px;
  background: #f7f8fc;
}
.up-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.up-del {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(17, 20, 40, 0.66);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.up-del:hover { background: rgba(17, 20, 40, 0.85); }
.up-main {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(91, 91, 214, 0.92);
  color: #fff;
  font-size: 9px;
}
.up-main-btn {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border: 0;
  border-radius: 4px;
  background: rgba(17, 20, 40, 0.6);
  color: #fff;
  font-size: 9px;
}
.up-main-btn:hover { background: rgba(17, 20, 40, 0.82); }
.up-progress { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #7c829c; font-size: 10.5px; }
.up-progress[hidden] { display: none; }
.up-bar { flex: 1 1 auto; height: 4px; overflow: hidden; border-radius: 2px; background: #eef0f7; }
.up-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  transition: width 0.15s linear;
}
.up-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  padding: 14px 10px;
  border: 1px dashed #cfd5e6;
  border-radius: 10px;
  background: #fff;
  color: #6b7190;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.up-drop:hover,
.up-drop.dragover { border-color: #a99cf9; background: #f7f6ff; }
.up-plus { font-size: 18px; line-height: 1; color: #7c6cf8; }
.up-drop b { font-size: 12px; }
.up-drop em { font-style: normal; font-size: 10.5px; color: #9aa0b8; }
.up-manual { display: flex; gap: 8px; margin-top: 8px; }
.up-manual input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dfe3ee;
  border-radius: 8px;
  outline: none;
  font: inherit;
  font-size: 11.5px;
}
.up-manual input:focus { border-color: #a99cf9; box-shadow: 0 0 0 3px rgba(109, 94, 248, 0.12); }
.up-manual .btn-ghost { height: 32px; padding: 0 12px; font-size: 11.5px; }

.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty-actions .doc-retry { margin-top: 0; }
.doc-retry.ghost { border-color: #dfe3ee; color: #6b7190; }
.doc-retry.ghost:hover { background: #f7f8fc; }

.empty-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(247, 248, 252, 0.74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.empty-card {
  width: min(430px, 100%);
  padding: 30px 28px 26px;
  border-radius: 18px;
  border: 1px solid rgba(21, 24, 48, 0.07);
  background: #fff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.empty-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 14px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #4f46e5, #8b3fe0);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
}
.empty-card h2 { font-size: 17px; font-weight: 700; color: #1b2040; }
.empty-card p { margin: 8px 0 18px; color: #8b91aa; font-size: 12.5px; line-height: 1.75; }
.empty-card .empty-actions { justify-content: center; margin-top: 0; }

@media (max-width: 820px) {
  .modal { padding: 12px; }
  .modal-card { max-height: 92vh; }
  .modal-body { padding: 14px 14px 4px; }
  .modal-foot { padding: 10px 14px; flex-wrap: wrap; }
}

/* ==========================================================================
   拖动平移状态
   ========================================================================== */
body.is-panning,
body.is-panning * { cursor: grabbing !important; }
body.is-panning { user-select: none !important; }
body.is-panning .prose { user-select: none !important; }

.stage.is-grab,
.stage.is-grab .pane-head,
.stage.is-grab .pane-body,
.stage.is-grab .prose { cursor: grab; }
.stage.is-grab .prose { user-select: none; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1360px) {
  .topbar { padding-left: 224px; }
  .fab-copy { max-width: 120px; }
  .fab-copy strong { max-width: 120px; }
}

@media (max-width: 1180px) {
  .chip { display: none; }
  .seg button { padding: 4px 9px; }
}

@media (max-width: 960px) {
  .topbar { padding-left: 210px; gap: 10px; }
  .fab { padding-right: 8px; }
  .fab-copy { display: none; }
  .pane-proto { width: min(88vw, 900px); }
  .pane-ui { width: min(80vw, 780px); }
  .pane-doc { width: min(78vw, 700px); }
}

@media (max-width: 820px) {
  :root { --topbar-h: 56px; }
  .topbar { padding: 0 12px 0 68px; }
  .fab { top: 6px; left: 10px; height: 44px; width: 44px; padding: 0; justify-content: center; border-radius: 13px; }
  .fab-mark { width: 28px; height: 28px; border: 0; background: transparent; }
  .fab-chev { display: none; }
  .seg { display: none; }
  .crumb-proj { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pager-idx { min-width: 38px; }
  .stage { height: calc(100vh - var(--topbar-h)); }
  .scroller { overflow: auto; padding: 10px 0 24px; }
  .track {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 12px;
    padding: 0 12px;
  }
  .pane { width: 100% !important; height: auto; }
  .pane-body { overflow: visible; }
  .pane-proto .pane-body.proto { padding: 12px; }
  .pane-doc .pane-body.doc { overflow: visible; }
  .pane-body.ui { padding: 12px; }
  .xbar { display: none; }
  .hint { bottom: 14px; font-size: 10.5px; padding: 7px 12px; }
  .switcher { left: 10px; right: 10px; top: 58px; width: auto; max-height: calc(100vh - 74px); }
  .prose { padding: 14px 16px 40px; }
  .doc-meta { padding: 12px 16px 0; }
  .lb-title span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .scroller { scroll-behavior: auto; }
}
