:root {
  --primary: #C4392C;
  --primary-deep: #8E2A20;
  --primary-soft: #F0E0E4;
  --accent: #A5647A;
  --bg: #F2ECE1;
  --card: #FDFBF6;
  --text: #201A14;
  --muted: #8A7C68;
  --border: #E3D8C2;
  --danger: #B03A2A;
  --ok: #5B7A3E;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(32, 26, 20, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
::selection { background: #E8CDD4; }

.boot-loading { display: flex; align-items: center; justify-content: center; height: 100vh; color: var(--muted); font-size: 15px; }

/* 启动失败/超时面板：绝不无限卡在「加载中」 */
.boot-error { flex-direction: column; gap: 14px; padding: 24px; text-align: center; }
.boot-err-title { font-size: 17px; font-weight: 600; color: var(--text); }
.boot-err-detail { font-size: 13px; color: var(--danger); max-width: 460px; line-height: 1.7; }
.boot-actions { display: flex; gap: 10px; }
.boot-actions .btn { min-width: 96px; }
.boot-actions .btn-primary { background: linear-gradient(135deg, #B0402E, #C4392C); color: #FDFBF6; box-shadow: 0 3px 12px rgba(196, 57, 44, 0.28); border: none; border-radius: 10px; padding: 9px 18px; font-size: 14px; cursor: pointer; }
.boot-actions .boot-refresh { background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 18px; font-size: 14px; cursor: pointer; }
.boot-actions .boot-refresh:hover { border-color: var(--primary); color: var(--primary); }
.boot-tip { font-size: 12px; color: var(--muted); max-width: 480px; line-height: 1.7; }

/* ===== 通用组件 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 9px 18px; font-size: 14px; font-weight: 500;
  transition: all .18s ease; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, #B0402E, #C4392C); color: #FDFBF6; box-shadow: 0 3px 12px rgba(196, 57, 44, 0.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(196, 57, 44, 0.34); }
.btn-primary:disabled { opacity: .55; transform: none; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #F6E4E0; color: var(--danger); border-color: #E5BFB6; }
.btn-danger:hover { background: #F6E4E0; }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-link { background: none; border: none; color: var(--primary); padding: 4px 6px; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }

.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: #FDFBF6; color: var(--text);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196, 57, 44, 0.12); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.7; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .err { font-size: 12px; color: var(--danger); margin-top: 4px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* toast */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #332B21; color: #FDFBF6; border-radius: 10px; padding: 10px 20px;
  font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  animation: toastIn .25s ease; max-width: 90vw;
}
.toast.toast-err { background: #A8392B; }
.toast.toast-ok { background: #4A6B34; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* modal */
#modal-root { position: fixed; inset: 0; z-index: 1000; display: none; }
#modal-root.open { display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(40, 32, 20, 0.45); backdrop-filter: blur(2px); }
.modal-box { position: relative; background: #FDFBF6; border-radius: 16px; padding: 24px 26px; width: min(560px, 92vw); max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: modalIn .22s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
/* 抽屉模式（右侧拉出） */
#modal-root.drawer.open { align-items: stretch; justify-content: flex-end; }
#modal-root.drawer .modal-mask { background: rgba(40, 32, 20, .32); }
#modal-root.drawer .modal-box.modal-drawer { width: min(420px, 92vw); height: 100vh; max-height: none; border-radius: 0; padding: 22px 24px 28px; box-shadow: -16px 0 48px rgba(0, 0, 0, .22); animation: drawerIn .28s cubic-bezier(.22, .8, .36, 1); }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
.modal-box h3 { font-size: 17px; margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .e-icon { font-size: 40px; margin-bottom: 10px; }

/* ===== 落地页 ===== */
.landing { min-height: 100vh; }
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6vw; background: rgba(253, 251, 246, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; color: var(--text); }
.brand .logo { font-size: 22px; }
.brand .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.nav-right { display: flex; gap: 12px; align-items: center; }

.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 90px 6vw 80px;
  background:
    url('/plum.svg') left bottom / auto 260px no-repeat,
    radial-gradient(1100px 480px at 82% -8%, rgba(201,138,158,.10), transparent 60%),
    radial-gradient(900px 420px at 12% 0%, rgba(196,57,44,.05), transparent 55%),
    linear-gradient(180deg, #F6F0E3 0%, var(--bg) 100%);
}
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; letter-spacing: 2px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--primary-deep), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.tag { margin: 14px auto 0; font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 640px; }
.hero .cta { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero { padding: 13px 34px; font-size: 16px; border-radius: 12px; }
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FDFBF6; opacity: .9; box-shadow: 0 0 6px 2px rgba(240, 220, 180, 0.55); animation: twinkle 3s infinite ease-in-out; }
.stars i:nth-child(1) { top: 12%; left: 16%; }
.stars i:nth-child(2) { top: 24%; left: 78%; animation-delay: .8s; }
.stars i:nth-child(3) { top: 62%; left: 8%; animation-delay: 1.6s; width: 2px; height: 2px; }
.stars i:nth-child(4) { top: 40%; left: 55%; animation-delay: .4s; width: 2px; height: 2px; }
.stars i:nth-child(5) { top: 15%; left: 38%; animation-delay: 2.2s; }
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

.stats { max-width: 980px; margin: -36px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 6vw; position: relative; z-index: 5; }
.stat { background: #FDFBF6; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 12px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; background: linear-gradient(120deg, var(--primary-deep), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--muted); }

.section { max-width: 1080px; margin: 0 auto; padding: 72px 6vw 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 8px; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.feature-card { padding: 24px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: #FDFBF6; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(110, 85, 45, 0.14); }
.feature-card .f-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 23px; background: var(--primary-soft); margin-bottom: 14px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; color: var(--muted); }

.style-tags { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.style-tag { padding: 8px 20px; border-radius: 999px; background: #FDFBF6; border: 1px solid var(--border); font-size: 14px; color: var(--text); box-shadow: var(--shadow); transition: all .18s; }
.style-tag:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.prompt-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.prompt-chip { padding: 6px 16px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); font-size: 13px; font-weight: 500; }

.footer { margin-top: 90px; border-top: 1px solid var(--border); padding: 28px 6vw; text-align: center; color: var(--muted); font-size: 13px; background: #FDFBF6; }

/* ===== 登录页 ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background:
  radial-gradient(900px 420px at 75% -10%, rgba(201, 138, 158, 0.14), transparent 60%),
  radial-gradient(700px 350px at 15% 10%, rgba(196, 57, 44, 0.10), transparent 55%), var(--bg); padding: 24px; }
.auth-card { width: min(420px, 94vw); padding: 34px 32px; border-radius: 20px; }
.auth-card .brand { justify-content: center; margin-bottom: 6px; }
.auth-card .auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-tabs { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: none; background: none; padding: 10px; font-size: 14px; color: var(--muted); }
.auth-tabs button.active { background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.otp-row { display: flex; gap: 10px; }
.otp-row .input { flex: 1; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.wechat-btn { width: 100%; background: #A8802E; color: #FDFBF6; border: none; }
.wechat-btn:hover { background: #8C691F; }
.back-home { text-align: center; margin-top: 14px; font-size: 13px; }

/* ===== 工作台框架 ===== */
.workspace { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: #FDFBF6; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 20px 18px 14px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 0 18px 16px; border-bottom: 1px solid var(--border); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #B0402E, #C98A9E); color: #FDFBF6;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
}
.side-user .u-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .u-sub { font-size: 11px; color: var(--muted); }
.side-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
  color: var(--text); font-size: 14px; margin-bottom: 4px; transition: background .15s;
}
.side-nav a:hover { background: var(--primary-soft); }
.side-nav a.active { background: linear-gradient(135deg, #B0402E, #C98A9E); color: #FDFBF6; font-weight: 600; box-shadow: 0 4px 12px rgba(196, 57, 44, 0.3); }
.side-nav .nav-sec { font-size: 11px; color: var(--muted); padding: 12px 14px 4px; text-transform: uppercase; letter-spacing: 1px; }
.side-foot { padding: 14px 18px; border-top: 1px solid var(--border); }

.main { flex: 1; padding: 26px 30px; min-width: 0; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.main-head h2 { font-size: 21px; }
.main-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* 书籍卡片 */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.book-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: #FDFBF6; box-shadow: var(--shadow); cursor: pointer; transition: transform .18s, box-shadow .18s; position: relative; }
.book-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(110, 85, 45, 0.15); }
.book-card .genre { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); margin-bottom: 10px; }
.book-card h3 { font-size: 16px; margin-bottom: 6px; }
.book-card p { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.book-card .b-meta { display: flex; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.book-card .b-act { position: absolute; top: 12px; right: 12px; display: none; gap: 6px; }
.book-card:hover .b-act { display: flex; }

/* 书籍工作区 */
.book-ws-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.book-ws-head h2 { font-size: 20px; }
.book-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.book-tabs button { border: none; background: none; padding: 9px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.book-tabs button.active { color: var(--primary-deep); font-weight: 600; border-color: var(--primary); }

.editor-layout { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.ch-list { background: #FDFBF6; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ch-list .ch-head { padding: 13px 15px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.ch-items { max-height: 62vh; overflow-y: auto; }
.ch-item { padding: 10px 14px; border-bottom: 1px solid #F4EEE2; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ch-item:hover { background: var(--primary-soft); }
.ch-item.active { background: var(--primary-soft); }
.ch-item .t { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-item .w { font-size: 11px; color: var(--muted); flex-shrink: 0; }

.editor-panel { background: #FDFBF6; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.editor-panel .ch-title-input { font-size: 17px; font-weight: 700; border: none; outline: none; border-bottom: 1px dashed var(--border); padding: 4px 0 8px; margin-bottom: 12px; width: 100%; background: none; }
.editor-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.save-state { font-size: 12px; color: var(--muted); margin-left: auto; }
.editor-area { width: 100%; min-height: 46vh; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; line-height: 1.9; font-size: 15px; outline: none; resize: vertical; }
.editor-area:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196, 57, 44, 0.1); }

/* AI 输出面板 */
.ai-result { margin-top: 16px; border: 1px solid #E8CDD4; background: #FCFAF3; border-radius: 12px; padding: 16px 18px; }
.ai-result .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--primary-deep); }
.ai-result .ai-out { white-space: pre-wrap; font-size: 14.5px; line-height: 1.9; max-height: 44vh; overflow-y: auto; }
.ai-result .ai-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* 工具箱 */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.tool-card { padding: 18px; background: #FDFBF6; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all .18s; box-shadow: var(--shadow); }
.tool-card:hover { transform: translateY(-3px); border-color: #D9A8B8; box-shadow: 0 10px 26px rgba(110, 85, 45, 0.15); }
.tool-card .t-icon { font-size: 26px; margin-bottom: 10px; }
.tool-card h3 { font-size: 15px; margin-bottom: 5px; }
.tool-card p { font-size: 12.5px; color: var(--muted); }

.tool-runner { max-width: 860px; }
.tool-runner .back { margin-bottom: 12px; }
.tool-form { padding: 22px; }
.tool-form h3 { font-size: 18px; margin-bottom: 4px; }
.tool-form .t-desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.tool-actions { display: flex; gap: 10px; align-items: center; }
.stream-out {
  margin-top: 16px; border: 1px solid #E8CDD4; background: #FCFAF3; border-radius: 12px;
  padding: 16px 18px; white-space: pre-wrap; line-height: 1.9; font-size: 14.5px; max-height: 50vh; overflow-y: auto;
}

/* 拆书 */
.chai-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.chai-pane { padding: 20px; }
.chai-pane h3 { font-size: 15px; margin-bottom: 12px; }
.chai-out { white-space: pre-wrap; line-height: 1.8; font-size: 14px; max-height: 60vh; overflow-y: auto; }

/* 提示词库 */
.pfilter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pfilter button { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 5px 14px; font-size: 12.5px; color: var(--muted); }
.pfilter button.active { background: var(--primary); color: #FDFBF6; border-color: var(--primary); }
/* 20.11.0 星月式第一排：写作类型分类 */
.pfilter-type { margin-bottom: 10px; }
.pfilter-type button { background: #F6F1E6; border-color: #E8DCC6; color: #6B5D4A; }
.pfilter-type button.active { background: var(--primary); border-color: var(--primary); color: #FDFBF6; }
/* 20.11.0 星月式第二排：标签页（我的/最热/月榜/精选/最新/搜索/已收藏） */
.ptabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.ptabs button { border: none; background: transparent; padding: 8px 14px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; border-radius: 0; }
.ptabs button:hover { color: var(--primary-deep); }
.ptabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ptab-search { flex: 1; min-width: 160px; margin: 6px 0 6px 10px; padding: 6px 12px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 999px; background: #FDFBF6; color: var(--primary-deep); outline: none; }
.ptab-search:focus { border-color: var(--primary); }
.prompt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.prompt-card { padding: 18px 20px; background: #FDFBF6; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.prompt-card .p-tags { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.prompt-card .p-tag { font-size: 11px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); }
.prompt-card .p-tag.shared { background: #EAEFD9; color: var(--ok); }
/* 写作环节标签（次要维度，与写作类型标签区分） */
.prompt-card .p-tag.plain { background: #F1EDE4; color: #8A7C68; }
/* 20.11.0 卡片右上角星标收藏 */
.prompt-card .p-fav { position: absolute; top: 9px; right: 11px; z-index: 3; border: none; background: transparent; font-size: 19px; line-height: 1; color: #C9BCA6; cursor: pointer; padding: 2px 4px; border-radius: 6px; transition: color .15s, background .15s; }
.prompt-card .p-fav:hover { color: #E8A33D; background: #FBF3E2; }
.prompt-card .p-fav.on { color: #E8A33D; }
.prompt-card .p-check { top: 10px; left: 10px; }
.prompt-card .p-tags { padding-left: 22px; padding-right: 26px; }
.prompt-card h4 { font-size: 15px; margin-bottom: 6px; }
.prompt-card .p-body { font-size: 13px; color: var(--muted); white-space: pre-wrap; max-height: 120px; overflow: hidden; position: relative; }
.prompt-card .p-act { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
/* 20.3.0 他人公开卡片：作者行 + 推荐语 + 隐藏提示 */
.prompt-card .p-author { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; background: #F6F1E6; border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 12px; color: var(--muted); }
.prompt-card .p-author .p-author-ava { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #B0402E, #C98A9E); color: #FDFBF6; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.prompt-card .p-author .p-author-name { font-weight: 600; color: #201A14; }
.prompt-card .p-author .p-author-sub { color: #A79A83; font-size: 11.5px; }
.prompt-card .p-body.p-intro { color: #6B5D4A; background: #FBF8F1; border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.prompt-card .p-hidden-tip { margin-top: 8px; font-size: 11.5px; color: #A79A83; background: #F6F1E6; border-radius: 6px; padding: 5px 10px; line-height: 1.6; }
/* 顶栏头像：用户上传的图片头像（20.3.0） */
.tbar-ava img { display: block; }
.tbar-ava.is-img { background: none; border: 1px solid var(--border); padding: 0; overflow: hidden; }
.p-lib-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.p-lib-head h3 { font-size: 17px; }

/* 设置 */
.settings-wrap { max-width: 720px; }
.set-card { padding: 22px 24px; margin-bottom: 16px; }
.set-card h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.radio-pill { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 16px; cursor: pointer; font-size: 14px; transition: all .15s; }
.radio-pill.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--primary); }
.range-row .rv { width: 40px; text-align: right; font-variant-numeric: tabular-nums; color: var(--primary-deep); font-weight: 600; }

/* 角色设定 */
.chara-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.chara-card { padding: 18px; background: #FDFBF6; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.chara-card .c-name { font-size: 16px; font-weight: 700; }
.chara-card .c-role { font-size: 12px; color: var(--primary-deep); background: var(--primary-soft); display: inline-block; padding: 2px 10px; border-radius: 999px; margin: 6px 0; }
.chara-card .c-desc { font-size: 13px; color: var(--muted); white-space: pre-wrap; max-height: 130px; overflow: hidden; }
.chara-card .c-act { display: flex; gap: 8px; margin-top: 10px; }

.loading-inline { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .workspace { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .side-nav { display: flex; overflow-x: auto; padding: 8px 12px; }
  .side-nav a { white-space: nowrap; margin-bottom: 0; }
  .side-nav .nav-sec { display: none; }
  .editor-layout { grid-template-columns: 1fr; }
  .chai-layout { grid-template-columns: 1fr; }
}

/* ===== 生成器工作台（弹窗） ===== */
.modal-box.modal-wide { padding: 0; width: auto; max-height: none; overflow: visible; }
.gen-modal { display: flex; flex-direction: column; height: min(84vh, 880px); width: min(1080px, 94vw); }
.gen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.gen-title { font-size: 17px; font-weight: 700; }
.gen-head-right { display: flex; align-items: center; gap: 8px; }
.gen-model-label { font-size: 12px; color: var(--muted); }
.gen-model { border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; background: #FDFBF6; max-width: 260px; color: var(--text); }
.gen-x { border: none; background: none; font-size: 15px; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.gen-x:hover { background: var(--primary-soft); color: var(--primary-deep); }
.gen-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex: 1; min-height: 0; }
.gen-left { overflow-y: auto; padding: 16px 20px 24px; border-right: 1px solid var(--border); }
.gen-right { display: flex; flex-direction: column; min-height: 0; padding: 16px 20px; background: #FCFAF3; }
.gen-sec { margin-bottom: 20px; }
.gen-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gen-label { font-size: 13px; font-weight: 700; }
.gen-sub { font-size: 11px; color: var(--muted); }
.seg { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #FDFBF6; padding: 5px 13px; font-size: 12.5px; color: var(--muted); }
.seg button.active { background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.variant-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.variant-pill { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--text); }
.variant-pill.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.variant-hint { font-size: 12px; color: #7A4E10; background: #fff8e8; border: 1px solid #f2e2c0; border-radius: 8px; padding: 8px 10px; line-height: 1.6; margin-top: 6px; }
.gf { margin-bottom: 14px; position: relative; }
.gf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gf-label { font-size: 13px; font-weight: 600; }
.tag-req { font-style: normal; font-size: 10px; color: #A8392B; background: #F6E4E0; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.tag-opt { font-style: normal; font-size: 10px; color: var(--muted); background: #F4EEE2; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.gf-quick { border: none; background: none; font-size: 11.5px; color: var(--primary); padding: 2px 4px; }
.gf-quick-menu { position: absolute; right: 0; top: 26px; z-index: 8; background: #FDFBF6; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.gf-quick-menu button { border: none; background: none; text-align: left; padding: 6px 10px; font-size: 12.5px; border-radius: 6px; color: var(--text); }
.gf-quick-menu button:hover { background: var(--primary-soft); }
.gf-count { text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; }
.gf-custom { min-height: 110px; }
.gen-book { margin-bottom: 12px; }
.kb-empty { font-size: 12.5px; color: var(--muted); background: #F6F1E6; border: 1px dashed var(--border); border-radius: 10px; padding: 12px; line-height: 1.7; }
.kb-loading { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; padding: 10px; }
.kb-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.kb-stat { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.kb-desc { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.kb-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: #FDFBF6; font-size: 13px; }
.kb-check { display: flex; align-items: center; gap: 6px; }
.kb-n { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.kb-ch-list { border: 1px solid var(--border); border-radius: 10px; max-height: 180px; overflow-y: auto; margin-bottom: 10px; background: #FDFBF6; }
.kb-ch-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12.5px; border-bottom: 1px solid #F4EEE2; cursor: pointer; }
.kb-ch-item:last-child { border-bottom: none; }
.kb-ch-item em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; }
.kb-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--muted); }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.gen-right-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.gen-count { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.gen-out { flex: 1; min-height: 0; overflow-y: auto; white-space: pre-wrap; font-size: 14px; line-height: 1.9; background: #FDFBF6; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.gen-empty { color: var(--muted); font-size: 13px; text-align: center; padding-top: 32%; line-height: 2; }
.gen-empty span { font-size: 11.5px; }
.gen-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gen-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: #FDFBF6; }
.gen-foot-hint { font-size: 11.5px; color: var(--muted); }
.lib-head { margin-bottom: 8px; }
.lib-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: #FDFBF6; }
.lib-item { padding: 8px 12px; border-bottom: 1px solid #F4EEE2; cursor: pointer; }
.lib-item:last-child { border-bottom: none; }
.lib-item:hover { background: var(--primary-soft); }
.lib-item-top { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.lib-cat { font-size: 10.5px; color: var(--primary-deep); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; }
.lib-body { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .gen-body { grid-template-columns: 1fr; }
  .gen-left { border-right: none; border-bottom: 1px solid var(--border); }
  .gen-modal { height: 88vh; }
}

/* ===== 生成器工作台 v2（对齐原站内部结构） ===== */
.gen-modal { display: flex; flex-direction: column; height: min(88vh, 900px); width: min(1160px, 96vw); position: relative; padding: 0; }
.gen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); flex: none; }
.gen-title { font-size: 15px; font-weight: 600; }
.gen-head-right { display: flex; align-items: center; gap: 14px; }
.gen-tutor { font-size: 12.5px; color: #443B2E; cursor: pointer; }
.gen-tutor:hover { color: var(--primary); }
.gen-x { border: none; background: none; font-size: 15px; color: #8A7C68; padding: 2px 6px; border-radius: 6px; cursor: pointer; }
.gen-x:hover { background: #F4EEE2; color: #332B21; }
.gen-body2 { display: flex; flex: 1; min-height: 0; }

/* 左：提示词列表 */
.gp-side { width: 424px; flex: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 14px 14px 10px; min-height: 0; background: #FDFBF6; }
.gp-search { display: flex; border: 1px solid #E3DACA; border-radius: 8px; overflow: hidden; flex: none; }
.gp-search input { flex: 1; border: none; outline: none; padding: 9px 12px; font-size: 13px; color: var(--text); background: #FDFBF6; min-width: 0; }
.gp-search input::placeholder { color: #B3A48C; }
.gp-search button { border: none; background: #C4392C; color: #FDFBF6; padding: 0 18px; font-size: 13px; cursor: pointer; flex: none; }
.gp-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 9px 0; flex: none; }
.gp-tools span { font-size: 11.5px; color: #8A7C68; line-height: 1.4; }
.gp-fav { border: 1px solid #EFDDE2; background: #F0E0E4; color: #A23126; border-radius: 6px; padding: 4px 9px; font-size: 11.5px; cursor: pointer; flex: none; }
.gp-fav:hover { background: #F0E0E4; }
.gp-list { flex: 1; overflow-y: auto; border: 1px solid #E3DACA; border-radius: 8px; min-height: 0; }
.gp-item { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-bottom: 1px solid #F4EEE2; font-size: 13px; line-height: 1.5; cursor: pointer; color: #332B21; }
.gp-item:last-child { border-bottom: none; }
.gp-item:hover { background: #F6F1E6; }
.gp-item.sel { background: #EAEFD9; }
.gp-ico { font-size: 11px; opacity: .55; width: 12px; flex: none; }
.gp-pin { font-size: 10px; width: 12px; flex: none; cursor: pointer; opacity: .8; }
.gp-ava { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; color: #FDFBF6; flex: none; font-weight: 600; }
.gp-tt { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gp-check { color: #5B7A3E; font-weight: 700; flex: none; }
.gp-more { margin-top: 10px; width: 100%; border: none; background: #C4392C; color: #FDFBF6; border-radius: 6px; padding: 9px; font-size: 13px; cursor: pointer; flex: none; }
.gp-more:hover { background: #A23126; }
.gp-note { font-size: 11px; color: #B3A48C; text-align: left; margin-top: 8px; flex: none; }

/* 右：表单 */
.gen-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.gen-scroll { flex: 1; overflow-y: auto; padding: 16px 22px 26px; }
.gm-label { font-size: 13px; font-weight: 600; color: #26211A; margin: 0 0 7px; }
.gm-opt { font-weight: 400; color: #8A7C68; font-size: 12.5px; }
.gm-select { width: 100%; border: 1px solid #E3DACA; border-radius: 6px; padding: 9px 11px; font-size: 13px; background: #FDFBF6; color: var(--text); margin-bottom: 16px; cursor: pointer; }
.gm-tabs { display: inline-flex; border: 1px solid #E3DACA; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.gm-tabs button { border: none; background: #FDFBF6; padding: 5px 15px; font-size: 12.5px; color: #574C3E; cursor: pointer; }
.gm-tabs button + button { border-left: 1px solid #E3DACA; }
.gm-tabs button.active { background: #F6F1E6; color: #A23126; font-weight: 600; box-shadow: inset 0 0 0 1px #C4392C; }
.gm-hint { font-size: 12.5px; color: #e08a1e; line-height: 1.75; margin: 4px 0 14px; }
.gm-hint a { color: #e08a1e; text-decoration: underline; cursor: pointer; }
.gf2 { margin-bottom: 14px; }
.gf-kind { display: block; font-size: 12px; color: #e08a1e; line-height: 1.4; margin-bottom: 2px; }
.gf-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gf-label { font-size: 13.5px; color: #26211A; }
.gf-q { margin-left: auto; border: none; background: none; font-size: 12.5px; color: #574C3E; cursor: pointer; padding: 2px 4px; }
.gf-q:hover { color: var(--primary); }
.gf-q .caret { font-size: 10px; }
.gf-ctrl { width: 100%; border: 1px solid #E3DACA; border-radius: 6px; padding: 9px 11px; font-size: 13.5px; background: #FDFBF6; color: #201A14; outline: none; font-family: inherit; box-sizing: border-box; }
.gf-ctrl:focus { border-color: #C4392C; }
textarea.gf-ctrl { min-height: 62px; resize: vertical; line-height: 1.7; }
.gf-n { text-align: right; font-size: 11px; color: #B3A48C; margin-top: 4px; }
.gf-fhint { font-size: 11.5px; color: #e08a1e; margin-top: 4px; line-height: 1.65; }
.gf-quick-menu { top: 26px; right: 0; position: absolute; z-index: 12; background: #FDFBF6; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(32, 26, 20, 0.14); padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 160px; }
.gf-quick-menu button { border: none; background: none; text-align: left; padding: 6px 10px; font-size: 12.5px; border-radius: 6px; color: #332B21; cursor: pointer; }
.gf-quick-menu button:hover { background: #F6F1E6; }
.gf2 { position: relative; }

/* 底部生成栏 */
.gen-bar { flex: none; display: flex; align-items: center; gap: 12px; justify-content: flex-end; padding: 10px 22px; border-top: 1px solid var(--border); background: #FDFBF6; }
.gen-count2 { margin-right: auto; font-size: 11.5px; color: #8A7C68; }
.gen-go { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #E3DACA; background: #FDFBF6; border-radius: 999px; padding: 9px 30px; font-size: 14px; color: #201A14; cursor: pointer; }
.gen-go:hover { border-color: #C4392C; color: #A23126; }
.gen-go:disabled { opacity: .55; cursor: default; }

/* 知识库 */
.kb2-head { font-size: 15px; font-weight: 600; margin: 18px 0 6px; color: #201A14; }
.kb2-head-sub { font-size: 12px; font-weight: 400; color: #8A7C68; }
.kb2-desc { font-size: 11.5px; color: #8A7C68; line-height: 1.75; margin-bottom: 10px; }
.kb2-banner { display: flex; gap: 8px; align-items: flex-start; background: #EAEFD9; border: 1px solid #EAEFD9; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.kb2-ok { width: 16px; height: 16px; border-radius: 50%; background: #5B7A3E; color: #FDFBF6; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; margin-top: 2px; }
.kb2-banner b { font-size: 13px; color: #4A6B34; font-weight: 600; }
.kb2-banner p { margin: 3px 0 0; font-size: 12px; color: #5B7A3E; line-height: 1.7; }
.kb2-x { margin-left: auto; border: none; background: none; color: #A09A80; cursor: pointer; font-size: 12px; flex: none; }
.kb2-row { display: flex; align-items: center; gap: 8px; border: 1px solid #E3DACA; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; background: #FDFBF6; font-size: 13px; color: #332B21; }
.kb2-cnt { font-style: normal; font-size: 12px; color: #A23126; background: #F0E0E4; border-radius: 4px; padding: 1px 7px; }
.kb2-tag { font-size: 11px; color: #A06B12; background: #fff6e5; border-radius: 4px; padding: 1px 7px; }
.kb2-sw { margin-left: auto; width: 34px; height: 19px; border-radius: 999px; background: #E3DACA; position: relative; cursor: pointer; flex: none; transition: background .18s; }
.kb2-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #FDFBF6; transition: left .18s; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.kb2-sw.on { background: #5B7A3E; }
.kb2-sw.on::after { left: 17px; }
.kb2-cv { font-size: 12px; color: #8A7C68; cursor: pointer; flex: none; }
.kb2-panel { border: 1px solid #E3DACA; border-radius: 6px; padding: 6px; margin: -4px 0 8px; max-height: 170px; overflow-y: auto; background: #FDFBF6; }
.kb-ch-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12.5px; border-radius: 4px; cursor: pointer; color: #332B21; }
.kb-ch-item:hover { background: #F6F1E6; }
.kb-ch-item em { margin-left: auto; font-style: normal; font-size: 11px; color: #8A7C68; }
.kb2-sub { font-size: 13.5px; color: #26211A; margin: 16px 0 8px; }
.ca-empty { border: 1px dashed #E3DACA; border-radius: 8px; padding: 20px; text-align: center; background: #FCFAF3; }
.ca-ph { width: 44px; height: 44px; border-radius: 50%; background: #F6F1E6; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 19px; color: #B3A48C; }
.ca-empty-t { font-size: 12.5px; color: #8A7C68; }
.ca-empty-s { font-size: 11.5px; color: #B3A48C; margin-top: 6px; line-height: 1.7; }
.ca-pills { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.ca-pill { border: none; border-radius: 999px; padding: 7px 18px; font-size: 12.5px; background: #F0E0E4; color: #A23126; cursor: pointer; }
.ca-pill.alt { background: #F6F1E6; color: #574C3E; }
.kb-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip.on { border-color: #C4392C; background: #F0E0E4; color: #A23126; font-weight: 600; }

/* 结果浮层 */
.gen-result { position: absolute; inset: 0; background: #FDFBF6; display: flex; flex-direction: column; z-index: 30; border-radius: inherit; }
.gr-head { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-bottom: 1px solid var(--border); flex: none; }
.gr-head b { font-size: 14px; }
.gr-count { font-size: 11.5px; color: #8A7C68; }
.gr-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; white-space: pre-wrap; font-size: 14px; line-height: 1.95; color: #201A14; }
.gr-foot { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; flex: none; }

/* 收藏管理 */
.fav-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.fav-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid #F4EEE2; cursor: pointer; }
.fav-item:last-child { border-bottom: none; }

@media (max-width: 920px) {
  .gen-modal { height: 92vh; }
  .gen-body2 { flex-direction: column; }
  .gp-side { width: 100%; flex: none; max-height: 42%; border-right: none; border-bottom: 1px solid var(--border); }
}

/* 生成器内部子弹层 */
.gen-sheet { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.gen-sheet-mask { position: absolute; inset: 0; background: rgba(32, 26, 20, 0.34); }
.gen-sheet-box { position: relative; background: #FDFBF6; border-radius: 14px; padding: 22px 24px; width: min(560px, 90%); max-height: 82%; overflow-y: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.gen-sheet-box h3 { font-size: 16px; margin-bottom: 12px; }

/* ===== 提示词管理 ===== */
.gp-tools-btns { display: flex; gap: 6px; flex: none; }
.gp-new { border: none; background: #C4392C; color: #FDFBF6; border-radius: 6px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.gp-new:hover { background: #A23126; }
.gp-tag { font-size: 10.5px; border-radius: 4px; padding: 1px 6px; background: #F6F1E6; color: #574C3E; flex: none; }
.gp-tag.pub { background: #EAEFD9; color: #5B7A3E; }
.gp-tag.gr { background: #fff4e5; color: #A06B12; }
.gp-more-btn { border: none; background: none; color: #B3A48C; font-size: 15px; line-height: 1; padding: 0 2px; cursor: pointer; flex: none; }
.gp-more-btn:hover { color: #C4392C; }
.gp-empty { padding: 30px 18px; text-align: center; font-size: 13px; color: #8A7C68; line-height: 1.9; }
.gp-empty-s { font-size: 11.5px; color: #B3A48C; margin-top: 6px; }
.gm-sel-note { font-size: 12px; color: #A23126; background: #F0E0E4; border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; }
.pm-list { display: flex; flex-direction: column; gap: 4px; }
.pm-item { border: 1px solid #E3DACA; background: #FDFBF6; text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; color: #332B21; }
.pm-item:hover { background: #F6F1E6; border-color: #EBD5DA; }
.pm-item.danger { color: #A8392B; }
.pm-item.danger:hover { background: #F6E4E0; }
.code-box { margin: 10px 0; padding: 14px; text-align: center; font-size: 22px; letter-spacing: 6px; font-weight: 700; color: #A23126; background: #F6F1E6; border: 1px dashed #b9d0f2; border-radius: 10px; font-family: ui-monospace, monospace; }
.fav-del { border: none; background: none; cursor: pointer; font-size: 13px; color: #A8392B; padding: 2px 6px; border-radius: 4px; }
.fav-del:hover { background: #F6E4E0; }
.p-check { position: absolute; top: 10px; left: 10px; z-index: 2; }
.prompt-card { position: relative; }
.prompt-card.picked { box-shadow: inset 0 0 0 2px #C4392C; }
.prompt-card .p-tags { padding-left: 22px; padding-right: 26px; }
.batch-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; background: #FDFBF6; border: 1px solid #F0E4E7; box-shadow: 0 6px 18px rgba(110, 85, 45, 0.08); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 12.5px; color: #A23126; }
.p-lib-tip { font-size: 11.5px; color: #8A7C68; margin-left: 8px; }
.p-lib-head { display: flex; align-items: baseline; }

/* ===== 提示词编辑器（复刻「创建脑洞生成器」） ===== */
.pc-overlay { position: fixed; inset: 0; z-index: 9998; background: #F6F1E6; display: flex; justify-content: center; overflow-y: auto; }
body.pc-lock { overflow: hidden; }
.pc-shell { width: min(1180px, 100%); min-height: 100%; display: flex; flex-direction: column; background: #F6F1E6; }
.pc-head { display: flex; align-items: center; gap: 10px; padding: 16px 26px; background: #FDFBF6; border-bottom: 1px solid #EFE8DA; position: sticky; top: 0; z-index: 3; }
.pc-head-ico { width: 30px; height: 30px; border-radius: 8px; background: #F0E0E4; color: #B04A36; display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.pc-head-txt { flex: 1; min-width: 0; }
.pc-head-t { font-size: 15.5px; font-weight: 700; color: #201A14; line-height: 1.3; }
.pc-head-s { font-size: 11.5px; color: #8A7C68; margin-top: 1px; }
.pc-head-right { display: flex; align-items: center; gap: 10px; }
.pc-tutor { border: 1px solid #E3DACA; background: #FDFBF6; border-radius: 6px; padding: 5px 11px; font-size: 12.5px; color: #574C3E; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.pc-tutor:hover { border-color: #E5CDD3; color: #C4392C; }
.pc-tutor-ico { font-size: 11px; opacity: .7; }
.pc-x { border: none; background: none; font-size: 17px; color: #8A7C68; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.pc-x:hover { background: #F6F1E6; color: #332B21; }
.pc-body { flex: 0 0 auto; padding: 18px 26px 8px; }
.pc-card { background: #FDFBF6; border: 1px solid #EFE8DA; border-radius: 10px; padding: 16px 20px 18px; margin-bottom: 14px; }
.pc-card-h { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: #201A14; }
.pc-bar { width: 3px; height: 14px; border-radius: 2px; background: #C4392C; flex: none; display: inline-block; }
.pc-req { width: 6px; height: 6px; border-radius: 50%; background: #C04A38; margin-left: 2px; display: inline-block; }
.pc-opt-max { margin-left: auto; font-size: 11px; font-weight: 400; color: #8A7C68; }
.pc-card-d { font-size: 11.5px; color: #8A7C68; margin: 4px 0 10px; line-height: 1.6; }
.pc-input-wrap { position: relative; display: block; }
.pc-input { width: 100%; box-sizing: border-box; border: 1px solid #E3DACA; border-radius: 6px; padding: 9px 70px 9px 12px; font-size: 13.5px; color: #201A14; background: #FDFBF6; outline: none; font-family: inherit; }
.pc-input:focus { border-color: #C4392C; box-shadow: 0 0 0 3px rgba(196, 57, 44, 0.08); }
.pc-input::placeholder { color: #B3A48C; }
.pc-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #B3A48C; pointer-events: none; }
.pc-count-area { right: 16px; }
.pc-wrap-area { display: block; }
.pc-area { min-height: 250px; padding: 12px 16px 36px; line-height: 1.85; resize: none; font-size: 13.5px; }
.pc-count-area { top: auto; bottom: 12px; right: 24px; transform: none; background: #FDFBF6; padding-left: 6px; line-height: 1; }
.pc-tip { font-size: 11.5px; color: #8A7C68; line-height: 1.75; margin-top: 8px; }
.pc-tip code { background: #F6F1E6; border: 1px solid #E3DACA; border-radius: 4px; padding: 0 4px; font-size: 11px; color: #C4392C; }

/* 预制输入选项 */
.pc-opt { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.pc-opt-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-opt-fields .pc-input { padding-right: 66px; }
.pc-opt-ops { display: flex; gap: 6px; flex: none; }
.pc-opt-btn { width: 30px; height: 34px; border: 1px solid #E3DACA; background: #FDFBF6; border-radius: 6px; font-size: 14px; color: #574C3E; cursor: pointer; line-height: 1; }
.pc-opt-btn:hover { border-color: #E5CDD3; color: #C4392C; background: #F6F1E6; }
.pc-add { width: 100%; border: 1px dashed #E3DACA; border-radius: 6px; background: #FDFBF6; color: #574C3E; font-size: 12.5px; padding: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; }
.pc-add:hover { border-color: #C9909C; color: #C4392C; background: #F6F1E6; }
.pc-add-ico { font-size: 12px; color: #8A7C68; }

/* 富文本 / Markdown 编辑区 */
.pc-editor { border: 1px solid #E3DACA; border-radius: 8px; overflow: hidden; background: #FDFBF6; }
.pc-tool { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 7px 8px; border-bottom: 1px solid #F6F1E6; background: #FCFAF3; }
.pc-tool button { border: none; background: none; min-width: 24px; height: 24px; border-radius: 4px; font-size: 12.5px; color: #574C3E; cursor: pointer; padding: 0 5px; }
.pc-tool button:hover { background: #F0E0E4; color: #C4392C; }
.pc-tool-sep { width: 1px; height: 14px; background: #E3DACA; margin: 0 4px; }
.pc-tool-gap { flex: 1; }
.pc-md { width: 100%; box-sizing: border-box; border: none; outline: none; min-height: 190px; padding: 12px 14px; font-size: 13.5px; line-height: 1.9; resize: vertical; font-family: inherit; color: #201A14; }
.pc-md-preview { min-height: 190px; padding: 12px 14px; font-size: 13.5px; line-height: 1.9; color: #201A14; }
.pc-md-preview h2, .pc-md-preview h3, .pc-md-preview h4 { margin: 10px 0 6px; font-size: 15px; }
.pc-md-preview p { margin: 0 0 8px; }
.pc-md-preview ul { margin: 6px 0 8px; padding-left: 20px; }
.pc-md-preview blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid #EFE6E9; color: #574C3E; background: #F6F1E6; }
.pc-md-preview code { background: #F6F1E6; border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.pc-pre { background: #F6F1E6; border: 1px solid #F6F1E6; border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 12px; line-height: 1.7; }
.pc-editor-foot { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; border-top: 1px solid #F6F1E6; font-size: 11px; color: #B3A48C; background: #FCFAF3; }
.pc-count-inline b { font-weight: 400; color: #8A7C68; }
.pc-card-full .pc-md { min-height: 60vh; }

/* 分类与权限 */
.pc-card-slim { padding: 14px 20px; }
.pc-slim-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pc-slim-field { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; }
.pc-slim-label { font-size: 12.5px; color: #574C3E; flex: none; }
.pc-input-slim { padding: 7px 10px; font-size: 12.5px; }
.pc-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #574C3E; cursor: pointer; flex: none; }
.pc-switch input { display: none; }
.pc-switch-ui { width: 34px; height: 19px; border-radius: 999px; background: #E3DACA; position: relative; transition: background .18s; }
.pc-switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #FDFBF6; box-shadow: 0 1px 2px rgba(0,0,0,.12); transition: left .18s; }
.pc-switch input:checked + .pc-switch-ui { background: #C4392C; }
.pc-switch input:checked + .pc-switch-ui::after { left: 17px; }

/* 底部提示与操作 */
.pc-note { display: flex; align-items: center; gap: 7px; margin: 4px 26px 12px; padding: 8px 12px; border: 1px solid #F2E7EA; background: #F6F1E6; border-radius: 8px; font-size: 12px; color: #8A7C68; }
.pc-note-ico { width: 14px; height: 14px; border-radius: 50%; background: #EDD9DC; color: #C4392C; font-size: 10px; font-style: italic; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pc-foot { display: flex; align-items: center; gap: 10px; padding: 12px 26px 20px; background: #F6F1E6; position: sticky; bottom: 0; }
.pc-save { display: inline-flex; align-items: center; gap: 7px; border: none; border-radius: 6px; background: #B04A36; color: #FDFBF6; font-size: 13px; padding: 9px 24px; cursor: pointer; }
.pc-save:hover { background: #A23126; }
.pc-save:disabled { opacity: .65; cursor: default; }
.pc-del { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #DCAFA4; color: #B03A2A; background: #FDFBF6; border-radius: 6px; font-size: 13px; padding: 9px 22px; cursor: pointer; }
.pc-del:hover { background: #F6E4E0; border-color: #DCAFA4; }
.pc-foot-hint { margin-left: auto; font-size: 11.5px; color: #B3A48C; }

/* 编辑器内小弹层 */
.pc-sheet { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.pc-sheet-mask { position: absolute; inset: 0; background: rgba(32, 26, 20, 0.34); }
.pc-sheet-box { position: relative; background: #FDFBF6; border-radius: 12px; width: min(600px, 92%); max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.pc-sheet-box h3 { font-size: 15.5px; padding: 16px 20px; border-bottom: 1px solid #F6F1E6; }
.pc-sheet-body { padding: 16px 20px; overflow-y: auto; }
.pc-sheet-foot { padding: 12px 20px; border-top: 1px solid #F6F1E6; display: flex; justify-content: flex-end; }

@media (max-width: 720px) {
  .pc-body { padding: 12px 12px 6px; }
  .pc-head { padding: 12px 14px; }
  .pc-note { margin: 4px 12px 10px; }
  .pc-foot { padding: 10px 14px 14px; }
  .pc-opt { flex-direction: column; }
  .pc-opt-ops { align-self: flex-end; }
}

/* 生成器填空参数来源提示 */
.gf-src { font-size: 11.5px; color: #8A7C68; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px dashed #EFE8DA; }
.gf-empty-note { font-size: 12px; color: #8A7C68; background: #F6F1E6; border: 1px dashed #EFE6E9; border-radius: 8px; padding: 12px 14px; line-height: 1.85; }
.gf-empty-note code { background: #F0E0E4; border-radius: 4px; padding: 0 4px; color: #C4392C; }

/* 提示词卡片上的填空信息 */
.p-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.p-meta-item { font-size: 10.5px; color: #C4392C; background: #F0E0E4; border-radius: 4px; padding: 1px 6px; }
.p-meta-hint { font-size: 10.5px; color: #8A7C68; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ============================================================
   新版工作台外壳（窄轨边栏 + 顶栏 + 公告 + 页脚）
   ============================================================ */
.shell { display: flex; min-height: 100vh; background: var(--bg); }
.rail {
  width: 74px; flex: none; background: #FDFBF6; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  position: sticky; top: 0; height: 100vh; padding: 12px 0 8px;
}
.rail-logo {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none;
  background: linear-gradient(135deg, #B0402E, #D9A8B8); color: #FDFBF6;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  box-shadow: 0 3px 10px rgba(196, 57, 44, 0.28); margin-bottom: 14px;
}
.rail-nav { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; overflow-y: auto; padding-bottom: 6px; }
.rail-nav::-webkit-scrollbar { width: 0; }
.rail-div { width: 26px; height: 1px; background: var(--border); margin: 7px 0; flex: none; }
.rail-item {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0; font-size: 11px; color: #8A7C68; text-decoration: none;
  background: none; border: none; cursor: pointer; position: relative; transition: color .15s, background .15s;
}
.rail-item i { font-style: normal; font-size: 16px; line-height: 1; }
.rail-item:hover { color: var(--primary); background: #F6F1E6; }
.rail-item.active { color: var(--primary); font-weight: 600; }
.rail-item.active::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2.5px; border-radius: 0 2px 2px 0; background: var(--primary); }
.rail-foot { width: 100%; border-top: 1px solid var(--border); padding-top: 6px; flex: none; }

.page-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tbar {
  height: 46px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: #FDFBF6; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
.tbar-l { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.tbar-brand { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #201A14; cursor: pointer; }
.tbar-pill { border: 1px solid #f2dcbd; background: #fdf5e9; color: #99682A; border-radius: 999px; padding: 3px 11px; font-size: 11.5px; cursor: pointer; }
.tbar-pill:hover { background: #fbeacd; }
.tbar-mid { flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: #201A14; letter-spacing: .3px; }
.tbar-r { display: flex; align-items: center; gap: 4px; min-width: 190px; justify-content: flex-end; }
.tbar-ico { width: 28px; height: 28px; border: none; background: none; border-radius: 6px; color: #8A7C68; font-size: 14px; cursor: pointer; }
.tbar-ico:hover { background: #F6F1E6; color: var(--primary); }
.tbar-ava {
  width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #B0402E, #C98A9E); color: #FDFBF6; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.notice {
  display: flex; align-items: center; gap: 8px; margin: 12px auto 0;
  width: calc(100% - 52px); max-width: 1200px; box-sizing: border-box;
  background: #F0E0E4; border: 1px solid #F2E7EA; color: #A23126;
  border-radius: 6px; padding: 7px 12px; font-size: 12.5px; line-height: 1.6;
}
.notice-dot { width: 6px; height: 6px; border-radius: 50%; background: #B0402E; flex: none; }
.notice-txt { flex: 1; min-width: 0; }
.notice-x { border: none; background: none; color: #C0909C; font-size: 11px; cursor: pointer; flex: none; padding: 0 2px; }
.notice-x:hover { color: #A23126; }

.page { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 18px 26px 36px; box-sizing: border-box; }

/* ===== 工作流执行页铺满屏幕（v20.4.1）===== */
.page.page-wide { max-width: none; }
.wfp.wfp-wide { max-width: none; width: 100%; margin: 0; }
@media (min-width: 981px) {
  .page.wf-full { display: flex; flex-direction: column; }
  .page.wf-full > .wfp.wfp-wide { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .wfp.wfp-wide .wf-exec2 { flex: 1; min-height: 0; }
  .wfp.wfp-wide .wf-exec-l { min-height: 0; overflow-y: auto; }
  .wfp.wfp-wide .wf-exec-r { display: flex; flex-direction: column; min-height: 0; }
  .wfp.wfp-wide .wfe-r-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .wfp.wfp-wide .wf-exec-r .wf-run-out { flex: 1; min-height: 320px; }
  .wfp.wfp-wide .wfe-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 10px; }
}

.site-foot { text-align: center; font-size: 11.5px; color: #B3A48C; padding: 14px 12px 22px; line-height: 1.8; }

/* ===== 创作工具箱（新版卡片墙） ===== */
.tbx-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.tbx-head h1 { font-size: 22px; font-weight: 800; letter-spacing: .5px; color: #201A14; }
.tbx-tab { font-size: 12px; padding: 2px 12px; border-radius: 999px; background: #F6F1E6; color: #8A7C68; cursor: default; }
.tbx-tab.on { background: #F0E0E4; color: #C4392C; font-weight: 600; }
.tbx-sub { font-size: 12px; color: #8A7C68; }

.tbx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.tbx-card {
  position: relative; overflow: hidden; background: #FDFBF6; border-radius: 10px;
  padding: 16px 18px 18px; min-height: 86px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); transition: transform .16s, box-shadow .16s;
  box-sizing: border-box;
}
.tbx-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(32, 26, 20, 0.10); }
.tbx-card-t { font-size: 14.5px; font-weight: 700; color: #201A14; position: relative; z-index: 2; }
.tbx-card-s { font-size: 12px; color: #8A7C68; margin-top: 7px; position: relative; z-index: 2; }
.tbx-card-wm { position: absolute; right: 4px; bottom: -10px; font-size: 56px; line-height: 1; opacity: .07; pointer-events: none; filter: grayscale(1); }
.tbx-new { position: absolute; right: 8px; top: 8px; z-index: 3; font-size: 9.5px; font-weight: 700; color: #FDFBF6; background: #C04A38; border-radius: 4px; padding: 1px 5px; letter-spacing: .5px; }

.tbx-sep { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; }
.tbx-sep::before, .tbx-sep::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #E3DACA, transparent); }
.tbx-sep span { font-size: 12px; color: #b08a4e; background: #fdf7ec; border: 1px solid #f2e4cd; border-radius: 999px; padding: 3px 14px; }
.tbx-adv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tbx-adv .tbx-card { background: linear-gradient(135deg, #fdf9f1, #fbf3e4); }

/* ===== 站长后台 ===== */
.adm-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }
.adm-nav button { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 6px 15px; font-size: 12.5px; color: #574C3E; cursor: pointer; }
.adm-nav button:hover { color: var(--primary); border-color: #EBD5DA; }
.adm-nav button.active { background: var(--primary); border-color: var(--primary); color: #FDFBF6; font-weight: 600; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.adm-stat { background: #FDFBF6; border-radius: 10px; padding: 15px 18px; box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); }
.adm-stat b { display: block; font-size: 23px; font-weight: 700; color: var(--primary-deep); line-height: 1.3; }
.adm-stat span { font-size: 12px; color: var(--muted); }
.adm-card { background: #FDFBF6; border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); margin-bottom: 14px; }
.adm-card h3 { font-size: 14.5px; margin-bottom: 4px; }
.adm-card .adm-d { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.adm-table-wrap { background: #FDFBF6; border-radius: 10px; box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); overflow: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th, .adm-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #F4EEE2; vertical-align: middle; }
.adm-table th { background: #FCFAF3; font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table td.ell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tag { display: inline-block; font-size: 10.5px; border-radius: 4px; padding: 1px 7px; background: #F6F1E6; color: #574C3E; }
.adm-tag.on { background: #EAEFD9; color: #5B7A3E; }
.adm-tag.off { background: #F4EEE2; color: #8A7C68; }
.adm-search { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.adm-search input { flex: 1; min-width: 180px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; outline: none; }
.adm-search input:focus { border-color: var(--primary); }
.adm-empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .rail { width: 62px; }
  .rail-item span { font-size: 10px; }
  .tbar-mid { font-size: 13px; }
  .page { padding: 14px 14px 28px; }
  .notice { width: calc(100% - 28px); }
}

/* ============================================================
   我的作品（新版：标签页 + 文件夹 + 排序 + 视图切换 + 卡片菜单）
   ============================================================ */
.bk-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.bk-tabs { display: flex; background: #F6F1E6; border-radius: 8px; padding: 3px; }
.bk-tab { border: none; background: none; padding: 6px 16px; font-size: 13px; color: #8A7C68; border-radius: 6px; cursor: pointer; }
.bk-tab.on { background: #FDFBF6; color: var(--primary-deep); font-weight: 600; box-shadow: 0 1px 4px rgba(32, 26, 20, 0.08); }
.bk-ops { display: flex; gap: 8px; }
.bk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bk-folders { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 200px; align-items: center; }
.bk-folder { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 4px 13px; font-size: 12px; color: #8A7C68; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bk-folder.on { background: #F0E0E4; color: #C4392C; border-color: #E8CDD4; font-weight: 600; }
/* 20.23.0 —— 星月式文件夹栏：＋ 新建按钮 / 数量角标 / × 删除 */
.bk-folder-add { border: 1px dashed #D8CDB6; background: #FCFAF3; color: #B06048; border-radius: 999px; width: 26px; height: 26px; line-height: 1; font-size: 14px; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.bk-folder-add:hover { border-color: #C4392C; color: #C4392C; background: #F6F1E6; }
.bk-folder .cnt { font-size: 10.5px; color: #B0A48E; background: #F6F1E6; border-radius: 999px; padding: 0 7px; line-height: 16px; }
.bk-folder.on .cnt { background: #E8CDD4; color: #A8372A; }
.bk-folder .fx { font-size: 12px; color: #C9BBA4; line-height: 1; margin-right: -4px; }
.bk-folder .fx:hover { color: #B03A2A; }
/* 20.23.0 —— 移动作品弹窗的文件夹选择列表 */
.bk-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.bk-pick-item { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 5px 14px; font-size: 12.5px; color: #8A7C68; cursor: pointer; }
.bk-pick-item.on { background: #F0E0E4; color: #C4392C; border-color: #E8CDD4; font-weight: 600; }
.bk-right { display: flex; gap: 8px; align-items: center; }
.bk-sort { border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: 12.5px; color: #57503F; background: #FDFBF6; outline: none; }
.bk-views { display: flex; background: #F6F1E6; border-radius: 6px; padding: 2px; }
.bk-vbtn { border: none; background: none; width: 26px; height: 24px; font-size: 13px; color: #8A7C68; cursor: pointer; border-radius: 5px; }
.bk-vbtn.on { background: #FDFBF6; color: var(--primary-deep); box-shadow: 0 1px 3px rgba(32, 26, 20, 0.1); }
.bk-search { border: 1px solid var(--border); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; width: 150px; outline: none; }
.bk-search:focus { border-color: var(--primary); }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.bk-grid.v-compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.bk-grid.v-list { grid-template-columns: 1fr; gap: 8px; }
.bk-card { position: relative; background: #FDFBF6; border-radius: 10px; padding: 16px 18px; cursor: pointer; box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); transition: transform .15s, box-shadow .15s; box-sizing: border-box; }
.bk-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(32, 26, 20, 0.1); }
.bk-card h3 { font-size: 15px; margin: 6px 0 4px; }
.bk-card p { font-size: 12px; color: #8A7C68; margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-card.compact { padding: 12px 14px; }
.bk-card.compact p { display: none; }
.bk-card.compact h3 { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-card.list { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.bk-card.list h3 { margin: 0; font-size: 14px; flex: none; }
.bk-card.list p { display: none; }
.bk-card.list .b-meta { margin-left: auto; margin-bottom: 0; }
.bk-card .genre { display: inline-block; }
/* 20.23.0 —— 置顶改为星月式橙色 TOP 徽标（内联显示，可点击取消） */
.bk-pin { display: inline-flex; align-items: center; background: linear-gradient(135deg, #F2953F, #E77E2C); color: #FFF; font-size: 10px; font-weight: 700; letter-spacing: 1px; border-radius: 6px; padding: 2px 8px 2px 6px; cursor: pointer; box-shadow: 0 2px 6px rgba(231, 126, 44, 0.35); user-select: none; flex: none; margin-bottom: 4px; }
.bk-pin::before { content: "↑"; font-size: 11px; margin-right: 2px; }
.bk-pin:hover { filter: brightness(0.94); }
.bk-card.list .bk-pin { margin-bottom: 0; }
.bk-folder-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; background: #F6F1E6; color: #B06048; border-radius: 4px; padding: 1px 7px; }
.bk-menu { position: absolute; top: 8px; right: 8px; }
.bk-menu-btn { border: none; background: #F6F1E6; color: #8A7C68; border-radius: 5px; width: 24px; height: 22px; font-size: 13px; cursor: pointer; line-height: 1; }
.bk-menu-btn:hover { background: #E3DACA; color: #332B21; }
.bk-menu-list { display: none; position: absolute; right: 0; top: 26px; background: #FDFBF6; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(32, 26, 20, 0.14); min-width: 160px; z-index: 30; overflow: hidden; padding: 4px; }
.bk-menu.open .bk-menu-list { display: block; }
.bk-menu-list button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 8px 12px; font-size: 12.5px; color: #443B2E; cursor: pointer; }
.bk-menu-list button:hover { background: #F6F1E6; }
.bk-menu-list button.danger { color: #B03A2A; }

/* ============================================================
   书籍工作区（三栏：章节目录 | 编辑器 | AI 面板）
   ============================================================ */
.bw-wrap { max-width: 1400px; margin: 0 auto; padding: 16px 22px 30px; }
.bw-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }.bw-back { font-size: 13px; color: var(--muted); text-decoration: none; }
.bw-back:hover { color: var(--primary); }
.bw-book-title { font-size: 19px; font-weight: 800; margin: 0; }
.bw-book-sub { font-size: 12.5px; color: var(--muted); }
.bw-top-tabs { margin-left: auto; display: flex; gap: 4px; background: #F6F1E6; padding: 3px; border-radius: 8px; }
.bw-top-tabs button { border: none; background: none; padding: 5px 15px; font-size: 12.5px; border-radius: 6px; color: #8A7C68; cursor: pointer; }
.bw-top-tabs button.active { background: #FDFBF6; color: var(--primary-deep); font-weight: 600; box-shadow: 0 1px 4px rgba(32, 26, 20, 0.08); }

/* ===== 书籍工作区：应用式固定三栏（对齐星月编辑器） ===== */
.book-app { height: 100vh; overflow: hidden; background: var(--bg); }
.book-app .bw-wrap { max-width: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; }
.book-app .bw-top { flex: none; margin-bottom: 0; padding: 9px 18px; background: #FDFBF6; border-bottom: 1px solid var(--border); }
.book-app #book-body { flex: 1; min-height: 0; }

.bw-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100%; align-items: stretch; }
.bw-layout.ai-on { grid-template-columns: 250px minmax(0, 1fr) 400px; }
.bw-chlist { background: #FDFBF6; border-right: 1px solid var(--border); border-radius: 0; padding: 10px; display: flex; flex-direction: column; min-height: 0; }
.bw-ch-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: #443B2E; padding: 2px 4px 8px; }
.bw-ch-search { border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; font-size: 12px; outline: none; margin-bottom: 8px; }
.bw-ch-items { overflow-y: auto; flex: 1; }
.bw-ch-item { border-radius: 7px; padding: 8px 9px; cursor: pointer; margin-bottom: 2px; position: relative; }
.bw-ch-item:hover { background: #F6F1E6; }
.bw-ch-item.active { background: #F0E0E4; }
.bw-ch-item.active .t { color: var(--primary-deep); font-weight: 600; }
.bw-ch-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.bw-ch-row .t { font-size: 12.5px; color: #443B2E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-ch-row .w { font-size: 10.5px; color: #B3A48C; flex: none; }
.bw-ch-menu { display: none; position: absolute; right: 6px; top: 5px; background: #FDFBF6; border-radius: 5px; box-shadow: 0 2px 10px rgba(32, 26, 20, 0.18); padding: 1px; }
.bw-ch-item:hover .bw-ch-menu { display: flex; gap: 1px; }
.bw-ch-menu button { border: none; background: none; width: 20px; height: 18px; font-size: 11px; color: #8A7C68; cursor: pointer; border-radius: 4px; }
.bw-ch-menu button:hover { background: #F0E0E4; color: #332B21; }
.bw-ch-empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 20px 8px; }

.bw-editor { background: #FDFBF6; padding: 14px 18px; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; border-radius: 0; }
.bw-ed-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; color: var(--muted); text-align: center; }
.bw-ed-top { display: flex; align-items: center; gap: 10px; }
.bw-ed-top .ch-title-input { flex: 1; border: none; font-size: 16px; font-weight: 700; outline: none; background: none; padding: 2px 0; }
.bw-ed-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; padding: 8px 10px; background: #F6F1E6; border-radius: 8px; }
.bw-ai-btn { border: 1px solid #EFE6E9; background: #FDFBF6; color: #C4392C; border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.bw-ai-btn:hover { background: #F0E0E4; border-color: #E8CDD4; }
.bw-ai-btn.on { background: var(--primary); border-color: var(--primary); color: #FDFBF6; font-weight: 600; }
.bw-editor .editor-area { flex: 1; min-height: 420px; }
.bw-ed-foot { text-align: right; font-size: 11.5px; color: #B3A48C; margin-top: 6px; }

.bw-ai { background: #FDFBF6; border-left: 1px solid var(--border); border-radius: 0; overflow: hidden; min-height: 0; display: none; }
.bw-layout.ai-on .bw-ai { display: block; }
.bw-ai-empty { display: flex; align-items: center; justify-content: center; min-height: 300px; text-align: center; color: #b3b9c4; font-size: 12.5px; line-height: 2; }
.bw-ai-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #FDFBF6; z-index: 2; }
.bw-ai-title { font-size: 13.5px; font-weight: 700; color: #332B21; }
.bw-ai-model { font-size: 11px; background: #F6F1E6; color: #B06048; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.bw-ai-close { margin-left: auto; border: none; background: none; color: #8A7C68; font-size: 13px; cursor: pointer; }
.bw-ai-close:hover { color: #332B21; }
.bw-ai-body { padding: 12px; }
.bw-ai-field { margin-bottom: 12px; }
.bw-ai-field label { display: block; font-size: 12px; font-weight: 600; color: #443B2E; margin-bottom: 5px; }
.bw-ai-select { font-size: 12.5px; padding: 6px 8px; }
.bw-ai-input { font-size: 12.5px; min-height: 84px; }
.bw-ai-hint { font-size: 11px; color: #b08a4e; background: #fdf7ec; border-radius: 5px; padding: 4px 8px; margin-top: 5px; line-height: 1.6; }
.bw-ai-ctx { font-size: 11.5px; border: 1px solid var(--border); border-radius: 6px; padding: 2px 4px; margin-left: 4px; }
.bw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bw-chip { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; color: #6B6250; cursor: pointer; }
.bw-chip.on { background: #F0E0E4; border-color: #E8CDD4; color: var(--primary-deep); }
.bw-ai-runrow { display: flex; gap: 8px; margin: 14px 0 6px; }
.bw-ai-run { flex: 1; }
.bw-ai-out-wrap { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 10px; }
.bw-ai-out-head { margin-bottom: 6px; }
.bw-ai-status { font-size: 11.5px; color: var(--primary-deep); display: inline-flex; align-items: center; gap: 5px; }
.bw-ai-out { background: #FCFAF3; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.9; max-height: 340px; overflow-y: auto; white-space: pre-wrap; }
.bw-ai-apply { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ============ 工作流 ============ */
.wf-card { display: flex; flex-direction: column; gap: 6px; }
.wf-meta { display: flex; gap: 10px; font-size: 11px; color: #8A7C68; margin-top: 2px; }
.wf-acts { display: flex; gap: 6px; margin-top: auto; }
/* 20.15.1 工作流广场卡片：顶部标签 + 右上角收藏按钮（对标星月） */
.wf-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.wf-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .3px; color: #8A7C68; background: #F6F1E6; border-radius: 999px; padding: 2px 10px; }
.wf-tag-mine { color: var(--primary, #C4392C); background: #F0E0E4; }
.wf-fav-btn {
  border: 1px solid var(--border, #E3DACA); background: #FDFBF6; border-radius: 999px;
  width: 26px; height: 26px; line-height: 1; font-size: 14px; color: #B09E86; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: color .15s, border-color .15s, background .15s, transform .12s; z-index: 4;
}
.wf-fav-btn:hover { color: var(--primary, #C4392C); border-color: #EBD5DA; transform: scale(1.08); }
.wf-fav-btn.on { color: #FDFBF6; background: var(--primary, #C4392C); border-color: var(--primary, #C4392C); }
/* 20.16.0 工作流授权：卡片右上角锁形按钮（对标星月）+ 勾选框 + 批量条 + 授权弹窗 */
.wf-head-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wf-top-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.wf-check { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border, #E3DACA); background: #FDFBF6; cursor: pointer; flex: none; z-index: 4; }
.wf-check input { margin: 0; cursor: pointer; accent-color: var(--primary, #C4392C); }
.wf-selected { outline: 2px solid var(--primary, #C4392C); outline-offset: -2px; }
.wf-tag-granted { color: #5B7A3E; background: #EAEFD9; }
.wf-lock-btn {
  border: 1px solid var(--border, #E3DACA); background: #FDFBF6; border-radius: 999px;
  width: 28px; height: 28px; line-height: 1; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: color .15s, border-color .15s, background .15s, transform .12s, box-shadow .15s; z-index: 4;
}
.wf-lock-btn svg { display: block; }
.wf-lock-btn:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(32,26,20,.12); }
.wf-lock-btn.is-private { color: #8A7C68; background: #F6F1E6; border-color: #E3DACA; }
.wf-lock-btn.is-public { color: #4F7A2E; background: #EAEFD9; border-color: #BFD6A0; }
.wf-lock-btn.is-granted { color: #A0562B; background: #F6E7D6; border-color: #E8CBAE; }
.wf-mgr-btn {
  border: 1px solid transparent; background: transparent; border-radius: 999px;
  width: 22px; height: 22px; line-height: 1; font-size: 15px; font-weight: 700; color: #A8987E; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: color .15s, background .15s; z-index: 4;
}
.wf-mgr-btn:hover { color: var(--primary, #C4392C); background: #F6F1E6; }
.wf-batch-bar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; color: #574C3E; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(32,26,20,.12); }
.wf-pub-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0 2px; }
.wf-pub-row b { font-size: 13.5px; }
.wf-pub-label { font-size: 12px; color: var(--muted); margin-left: 6px; }
.wf-grant-sep { height: 1px; background: var(--border, #E3DACA); margin: 12px 0; }
.wf-grant-list { display: flex; flex-direction: column; gap: 6px; }
.wf-grant-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; background: #F9F5EC; }
.wf-grant-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wf-grant-dur { color: var(--muted); flex: none; }
.wf-step { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 7px; background: #FCFAF3; }
.wf-step-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: #443B2E; }
.wf-step-x { border: none; background: none; color: #8A7C68; cursor: pointer; font-size: 12px; }
.wf-step-x:hover { color: #B03A2A; }
.wf-model-btn { display: flex; justify-content: space-between; align-items: center; gap: 6px; border: 1.5px dashed var(--border); background: var(--card); border-radius: 8px; padding: 7px 12px; font-size: 12.5px; color: var(--text); cursor: pointer; transition: border-color .15s; }
.wf-model-btn:hover { border-color: var(--primary); border-style: solid; }
.wf-model-btn::after { content: '切换 ⯈'; font-size: 11px; color: var(--muted); }
.wf-model-btn:hover::after { color: var(--primary); }
.wf-run-intro { font-size: 12.5px; color: var(--muted); background: #FCFAF3; border-radius: 7px; padding: 9px 12px; margin: 8px 0 12px; line-height: 1.7; }
.wf-run-step { border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; margin-bottom: 10px; }
.wf-run-step.cur { border-color: #E8CDD4; background: #F6F1E6; }
.wf-run-step.done { background: #FCFAF3; border-color: #E0E6CC; }
.wf-run-step-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #332B21; }
.wf-run-tag { font-size: 10.5px; background: #F6F1E6; color: #574C3E; border-radius: 4px; padding: 1px 7px; font-weight: 400; }
.wf-run-act { display: flex; gap: 8px; align-items: center; margin: 7px 0; }
.wf-run-out { font-size: 12.5px; }

/* ============ 知识卡 ============ */
.kc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.kc-card { background: #FDFBF6; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); display: flex; flex-direction: column; gap: 7px; }
.kc-title { font-size: 13.5px; font-weight: 700; color: #332B21; }
.kc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.kc-tags span { font-size: 10.5px; background: #F6F1E6; color: #574C3E; border-radius: 4px; padding: 1px 7px; }
.kc-body { font-size: 12px; color: #8A7C68; line-height: 1.7; }
.kc-meta { display: flex; gap: 10px; font-size: 11px; color: #8A7C68; }
.kc-view { background: #FCFAF3; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; font-size: 13px; line-height: 1.9; max-height: 50vh; overflow-y: auto; white-space: pre-wrap; }

/* ============ 作品页 & 工作区对标星月补充样式（19.11.6） ============ */
/* 题材筛选 chips */
.bk-genres { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.bk-genre { border: 1px solid var(--border); background: #FDFBF6; color: #8A7C68; border-radius: 999px; padding: 4px 14px; font-size: 12px; cursor: pointer; transition: all .15s; }
.bk-genre:hover { color: var(--primary, #C4392C); border-color: var(--primary, #C4392C); }
.bk-genre.on { background: var(--primary, #C4392C); border-color: var(--primary, #C4392C); color: #FDFBF6; }

/* 新建作品大卡片 */
.bk-card.add-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed #D8CDB6; background: #FCFAF3; min-height: 168px; cursor: pointer; }
.bk-card.add-card:hover { border-color: var(--primary, #C4392C); background: #F6F1E6; transform: none; box-shadow: 0 1px 3px rgba(32, 26, 20, 0.05); }
.bk-card.add-card:focus-visible { outline: 2px solid var(--primary, #C4392C); outline-offset: 2px; }
.bk-card.add-card .add-plus { transition: transform .15s ease; pointer-events: none; }
.bk-card.add-card:hover .add-plus { transform: scale(1.12); }
.add-plus { font-size: 34px; line-height: 1; color: var(--primary, #C4392C); font-weight: 300; }
.add-name { font-size: 13px; color: #574C3E; }
.add-acts { display: flex; gap: 8px; }

/* 卡片信息与底部按钮（对标星月：类型·万字 / 创建于 / 快捷操作） */
.bk-card .b-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: #8A7C68; margin-top: 4px; }
.bk-card .b-meta .b-kind { color: #8A7C68; font-weight: 600; }
.bk-card-acts { display: flex; gap: 6px; margin-top: 10px; border-top: 1px solid #F6F1E6; padding-top: 10px; }
.bk-act { flex: 1; border: none; background: #F6F1E6; color: #574C3E; font-size: 12px; padding: 6px 4px; border-radius: 6px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.bk-act:hover { background: var(--primary, #C4392C); color: #FDFBF6; }
.bk-act.more:hover { background: #574C3E; }

/* 工作区顶栏按钮（修改作品信息 / 时光机） */
.bw-top-ops { display: flex; gap: 8px; }
.bw-top-btn { border: 1px solid var(--border); background: #FDFBF6; color: #574C3E; border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer; transition: all .15s; }
.bw-top-btn:hover { color: var(--primary, #C4392C); border-color: var(--primary, #C4392C); }

/* AI 面板模型下拉 */
.bw-ai-model-sel { border: 1px solid var(--border); border-radius: 999px; background: #F6F1E6; color: #574C3E; font-size: 12px; padding: 4px 8px; max-width: 150px; cursor: pointer; }
.bw-ai-model-sel option { max-width: 260px; }

/* 章节目录：创建时间行 */
.bw-ch-sub { font-size: 10.5px; color: #B3A48C; padding: 0 2px 2px; }
.bw-ch-menu button[title="时光机"] { color: #8A7C68; }

/* 时光机 */
.tm-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.tm-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.tm-info { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.tm-info b { color: #443B2E; font-size: 12.5px; }
.tm-info span { color: #8A7C68; font-size: 11.5px; }
.tm-acts { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.tm-content { margin-top: 8px; background: #FCFAF3; border-radius: 6px; padding: 10px 12px; font-size: 12.5px; line-height: 1.8; color: #574C3E; white-space: pre-wrap; max-height: 180px; overflow-y: auto; }

@media (max-width: 1200px) {
  .bw-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .bw-layout.ai-on { grid-template-columns: 210px minmax(0, 1fr) 340px; }
}
@media (max-width: 940px) {
  .bw-layout, .bw-layout.ai-on { grid-template-columns: 200px minmax(0, 1fr); }
  .bw-ai { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--border); max-height: 60vh; overflow-y: auto; }
  .bw-editor { overflow-y: auto; }
}
@media (max-width: 760px) {
  .bw-layout { grid-template-columns: 1fr; }
  .bw-chlist { border-right: none; border-bottom: 1px solid var(--border); max-height: 34vh; }
}

/* ===== 生成器左栏：提示词分类 chips + 分组列表 ===== */
.gp-folders { display: flex; gap: 6px; flex-wrap: wrap; flex: none; margin: 8px 0; }
.gp-fchip { border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 3px 11px; font-size: 11.5px; color: #8A7C68; cursor: pointer; }
.gp-fchip:hover { border-color: #E8CDD4; color: var(--primary-deep); }
.gp-fchip.on { background: var(--primary); border-color: var(--primary); color: #FDFBF6; font-weight: 600; }
.gp-group-head { display: flex; align-items: center; gap: 6px; padding: 7px 10px 5px; font-size: 11px; font-weight: 700; color: #8A7C68; letter-spacing: .5px; border-top: 1px solid #F6F1E6; }
.gp-group:first-child .gp-group-head { border-top: none; }
.gp-group-head i { font-style: normal; background: #F6F1E6; border-radius: 999px; padding: 0 7px; font-size: 10px; color: #8A7C68; }

/* ===== 工作流全页（对齐星月：信息/步骤/输入参数/执行模式） ===== */
.wfp { max-width: 860px; margin: 0 auto; }
.wfp-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.wfp-top h2 { font-size: 20px; font-weight: 800; margin: 0; }
.wfp-own { font-size: 12px; color: var(--muted); }
.wfp-sec { background: #FDFBF6; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.wfp-sec h3 { font-size: 15px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.wfp-sec-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.wfp-intro { font-size: 13.5px; line-height: 2; color: #443B2E; white-space: pre-wrap; }
.wfp-stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.wfp-switch { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #443B2E; margin-top: 4px; cursor: pointer; }
.wfp-stepbar { display: flex; gap: 8px; flex-wrap: wrap; }
.wfp-stepbtn { border: 1px solid #EFE6E9; background: #FDFBF6; color: var(--primary-deep); border-radius: 8px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; }
.wfp-stepbtn:hover { background: #F0E0E4; }
.wfp-reset { margin-left: auto; border: 1px solid var(--border); background: #FDFBF6; border-radius: 7px; padding: 3px 12px; font-size: 12px; color: var(--muted); cursor: pointer; }
.wfp-reset:hover { color: var(--danger); border-color: #DCAFA4; }
.wfp-mode { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; cursor: pointer; }
.wfp-mode:hover { border-color: #E8CDD4; }
.wfp-mode input { margin-top: 3px; }
.wfp-mode span { color: #443B2E; }
.wfp-runbar { display: flex; justify-content: center; padding: 6px 0 18px; }
.wfp-runbar .btn-primary { min-width: 220px; padding: 11px 0; font-size: 15px; }
.wf-run-step { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #FDFBF6; }
.wf-run-step.cur { border-color: #E8CDD4; box-shadow: 0 2px 8px rgba(196, 57, 44, 0.08); }
.wf-run-step.done { border-color: #E0E6CC; }
.wf-run-step-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; flex-wrap: wrap; }
.wf-run-tag { font-size: 11px; font-weight: 400; background: #F6F1E6; color: #B06048; padding: 2px 8px; border-radius: 999px; }
.wf-run-act { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.wf-run-out { background: #FCFAF3; }

/* ===== 历史记录弹层 ===== */
.gh-list { max-height: 52vh; overflow-y: auto; }
.gh-item { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid #F6F1E6; }
.gh-item:last-child { border-bottom: none; }
.gh-head { flex: 1; min-width: 0; }
.gh-title { display: block; font-size: 13.5px; font-weight: 600; color: #332B21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-meta { display: block; font-size: 11.5px; color: #8A7C68; margin-top: 2px; }
.gh-actions { display: flex; gap: 6px; flex: none; }

/* ===== 通知中心（公告历史） ===== */
.anno-item { border: 1px solid var(--border); border-radius: 9px; padding: 10px 13px; margin-bottom: 8px; }
.anno-item.cur { border-color: #E8CDD4; background: #F6F1E6; }
.anno-txt { font-size: 13px; line-height: 1.9; color: #443B2E; white-space: pre-wrap; }
.anno-time { font-size: 11px; color: #8A7C68; margin-top: 4px; }
.anno-hist-title { font-size: 12px; font-weight: 700; color: #8A7C68; margin: 12px 0 8px; }

/* ============ 备忘录（作品工作区） ============ */
.memo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.memo-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.memo-card.pinned{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.memo-top{display:flex;align-items:center;gap:6px}
.memo-pin{cursor:pointer;font-size:14px;opacity:.7}
.memo-pin:hover{opacity:1}
.memo-title{font-weight:600;font-size:14px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.memo-words{font-size:11px;color:var(--muted);flex-shrink:0}
.memo-content{font-size:12.5px;line-height:1.8;color:var(--text);white-space:pre-wrap;word-break:break-word;max-height:170px;overflow:hidden}
.memo-foot{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:auto}
.memo-acts{display:flex;gap:6px}
select.pc-input-slim{height:34px;border-radius:8px}

/* ============ 模型选择弹窗（对标星月） ============ */
.mp-overlay { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; }
.mp-mask { position: absolute; inset: 0; background: rgba(40, 32, 20, 0.45); backdrop-filter: blur(2px); }
.mp-shell { position: relative; width: min(900px, 94vw); height: min(640px, 88vh); background: var(--card); border-radius: 16px; box-shadow: 0 18px 60px rgba(32, 26, 20, 0.25); display: flex; flex-direction: column; overflow: hidden; }
.mp-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.mp-tabs { display: flex; gap: 6px; }
.mp-tab { font-size: 14px; font-weight: 600; padding: 5px 14px; border-radius: 8px; background: var(--primary); color: #FDFBF6; }
.mp-quick { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; min-width: 200px; }
.mp-qchip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: #FDFBF6; color: var(--text); }
.mp-qchip.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.mp-x { border: none; background: none; font-size: 16px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.mp-x:hover { background: var(--bg); color: var(--text); }
.mp-body { flex: 1; display: flex; min-height: 0; }
.mp-side { width: 168px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 10px 8px; overflow-y: auto; }
.mp-cat { display: flex; justify-content: space-between; align-items: center; width: 100%; border: none; background: none; text-align: left; font-size: 13.5px; color: var(--text); padding: 9px 12px; border-radius: 9px; }
.mp-cat i { font-style: normal; color: var(--muted); font-size: 12px; }
.mp-cat:hover { background: var(--bg); }
.mp-cat.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.mp-cat.on i { color: var(--primary); }
.mp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mp-main-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 14px 18px 8px; gap: 10px; }
.mp-main-t h3 { font-size: 16px; }
.mp-main-t p { font-size: 12px; color: var(--muted); }
.mp-main-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.mp-cards { flex: 1; overflow-y: auto; padding: 6px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.mp-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; cursor: pointer; background: #FDFBF6; }
.mp-card:hover { border-color: var(--accent); }
.mp-card.sel { border-color: var(--primary); box-shadow: 0 0 0 1.5px var(--primary) inset; background: var(--primary-soft); }
.mp-card-top { display: flex; align-items: center; gap: 8px; }
.mp-card-top b { font-size: 14px; }
.mp-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.mp-check { margin-left: auto; color: var(--primary); font-weight: 700; }
.mp-card p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 4px; }
.mp-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; }
.mp-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }
.mp-caps { display: flex; gap: 8px; flex: 1; }
.mp-cap { font-size: 13px; border: 1px solid var(--border); background: #FDFBF6; border-radius: 999px; padding: 7px 14px; color: var(--text); }
.mp-cap:hover { border-color: var(--primary); color: var(--primary); }
.mp-use { border: none; background: linear-gradient(135deg, #B0402E, #C4392C); color: #FDFBF6; border-radius: 10px; padding: 9px 22px; font-size: 14px; font-weight: 600; box-shadow: 0 3px 12px rgba(196, 57, 44, 0.28); }
.mp-use:hover { filter: brightness(1.05); }

/* 能力调节弹层（浮在底栏上方） */
.mp-pop { position: absolute; left: 18px; bottom: 64px; width: 340px; background: #FDFBF6; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(32, 26, 20, 0.18); padding: 14px 16px; z-index: 5; }
.mp-pop-head { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.mp-pop-head em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.mp-pop-head b { margin-left: auto; color: var(--primary); font-size: 13px; }
.mp-qa { font-style: normal; color: var(--muted); cursor: help; }
.mp-auto { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; color: var(--muted); cursor: pointer; }
.mp-auto input { display: none; }
.mp-auto-ui { width: 34px; height: 19px; border-radius: 999px; background: #E3DACA; position: relative; transition: background .15s; }
.mp-auto-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #FDFBF6; transition: left .15s; }
.mp-auto input:checked + .mp-auto-ui { background: var(--primary); }
.mp-auto input:checked + .mp-auto-ui::after { left: 17px; }
.mp-think-cur { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.mp-think-cur b { color: var(--primary); }
.mp-range { width: 100%; accent-color: var(--primary); margin: 4px 0 2px; }
.mp-range:disabled { opacity: .45; }
.mp-ticks { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.mp-info-box { font-size: 12px; color: #A23126; background: var(--primary-soft); border-radius: 8px; padding: 7px 10px; margin: 6px 0; }
.mp-pop-tip { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.gm-model-btn { text-align: left; }
.gm-model-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ============ 全局备忘录弹窗（gm-*） ============ */
.gm-overlay { position: fixed; inset: 0; z-index: 1250; background: rgba(40, 32, 20, 0.45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; }
.gm-win { width: min(860px, 94vw); height: min(600px, 88vh); background: #F2ECDC; border: 1px solid #D9CBAE; border-radius: 16px; box-shadow: 0 18px 60px rgba(32, 26, 20, 0.25); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.gm-overlay.gm-wide .gm-win { width: min(1200px, 96vw); height: 92vh; }
.gm-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.gm-title { font-size: 15px; font-weight: 700; }
.gm-sub { font-size: 12px; color: var(--muted); flex: 1; }
.gm-full, .gm-close { border: none; background: none; color: var(--muted); font-size: 15px; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.gm-full:hover, .gm-close:hover { background: var(--bg); color: var(--text); }
.gm-body { flex: 1; display: flex; min-height: 0; }
.gm-side { width: 235px; flex-shrink: 0; border-right: 1px solid var(--border); background: #ECE3CE; display: flex; flex-direction: column; min-height: 0; }
.gm-side-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.gm-tab { border: 1px solid var(--border); background: #F7F2E7; border-radius: 8px; padding: 4px 10px; font-size: 12px; color: var(--text); cursor: pointer; }
.gm-tab.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.gm-tab:disabled { opacity: .45; cursor: not-allowed; }
.gm-new { margin-left: auto; border: none; background: var(--primary); color: #FDFBF6; border-radius: 8px; width: 26px; height: 26px; font-size: 14px; cursor: pointer; }
.gm-new:hover { filter: brightness(1.05); }
.gm-search { padding: 0 10px 6px; }
.gm-search input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; background: #F7F2E7; color: var(--text); }
.gm-sort { padding: 0 10px 6px; }
.gm-sort select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: 12px; background: #F7F2E7; color: var(--text); }
.gm-list { flex: 1; overflow-y: auto; padding: 4px 6px 10px; }
.gm-empty-list { text-align: center; color: var(--muted); font-size: 12.5px; padding: 28px 0; }
.gm-folder-row { display: flex; align-items: center; gap: 6px; padding: 8px 8px; border-radius: 9px; cursor: pointer; }
.gm-folder-row:hover { background: var(--bg); }
.gm-folder.on .gm-folder-row { background: var(--primary-soft); }
.gm-fold-arrow { font-style: normal; color: var(--muted); font-size: 11px; width: 12px; }
.gm-folder-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-folder-cnt { font-style: normal; font-size: 11px; color: var(--muted); }
.gm-folder-more { color: var(--muted); font-size: 13px; padding: 0 4px; border-radius: 6px; }
.gm-folder-more:hover { background: var(--bg); color: var(--text); }
/* 分组头 / 文件夹行的「＋」：直接在该目录下新建备忘 */
.gm-add-btn {
  border: none; background: none; color: var(--muted); font-size: 13px;
  width: 18px; height: 18px; padding: 0; line-height: 1; flex-shrink: 0;
  border-radius: 5px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.gm-add-btn:hover { background: var(--primary-soft); color: var(--primary); }
/* 双击条目标题后的就地重命名输入框 */
.gm-rename-input {
  flex: 1; min-width: 0; border: 1px solid var(--primary); border-radius: 6px;
  background: #FDFBF6; color: var(--text); font-size: 12.5px; padding: 2px 6px; outline: none;
  font-family: inherit;
}
.gm-folder-items { padding-left: 14px; }
.gm-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.gm-item:hover { background: var(--bg); }
.gm-item.active { background: var(--primary-soft); }
.gm-item-dot { font-style: normal; color: var(--muted); font-size: 12px; width: 14px; text-align: center; }
.gm-item-dot.pin { font-size: 11px; }
.gm-item-title { font-size: 12.5px; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-item.active .gm-item-title { color: var(--primary); font-weight: 600; }
.gm-item-more { color: var(--muted); font-size: 13px; padding: 0 4px; border-radius: 6px; }
.gm-item-more:hover { background: var(--card); color: var(--text); }
.gm-empty-sub { font-size: 11.5px; color: var(--muted); padding: 4px 8px; }
.gm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #F5F0E3; }
.gm-editor-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.gm-ph { font-size: 42px; opacity: .5; }
.gm-empty-t { font-size: 13.5px; color: var(--muted); }
.gm-empty-s { font-size: 12px; color: var(--muted); max-width: 320px; text-align: center; line-height: 1.7; }
.gm-ed-head { display: flex; gap: 8px; padding: 12px 16px 0; align-items: center; }
.gm-ed-folder { border: 1px dashed var(--border); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--primary); background: var(--primary-soft); width: 170px; }
.gm-ed-folder:disabled { color: var(--muted); border-color: transparent; background: var(--bg); }
.gm-ed-pin { border: 1px solid var(--border); background: #F7F2E7; border-radius: 999px; padding: 4px 12px; font-size: 12px; color: var(--text); cursor: pointer; }
.gm-ed-pin.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.gm-ed-pin:disabled { opacity: .45; cursor: not-allowed; }
.gm-ed-title { border: none; outline: none; font-size: 17px; font-weight: 700; color: var(--text); padding: 12px 16px 4px; background: none; }
.gm-ed-content { flex: 1; border: none; outline: none; resize: none; font-size: 13.5px; line-height: 1.9; color: var(--text); padding: 8px 18px; background: none; }
.gm-ed-content::placeholder, .gm-ed-title::placeholder { color: var(--muted); opacity: .6; }
.gm-ed-foot { display: flex; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); }
.gm-ed-info { font-size: 11.5px; color: var(--muted); flex: 1; }
.gm-ed-acts { display: flex; gap: 8px; }
.gm-popmenu { position: fixed; z-index: 1300; background: #F3EDDD; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(32, 26, 20, 0.18); padding: 4px; min-width: 160px; }
.gm-popmenu-item { font-size: 12.5px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--text); }
.gm-popmenu-item:hover { background: var(--bg); }
.gm-popmenu-item.danger { color: #B03A2A; }
/* 备忘录窗口：右下角自由缩放手柄 */
.gm-resize { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; z-index: 6; border-radius: 0 0 15px 0; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(138, 124, 104, 0.45) 4px 5.5px); touch-action: none; user-select: none; }
.gm-resize:hover { background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(196, 57, 44, 0.6) 4px 5.5px); }
.bw-chip-src { font-style: normal; font-size: 9px; color: var(--primary); border: 1px solid var(--primary); border-radius: 999px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; }

/* ============ API 中转站管理页（api-*） ============ */
.api-count { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
.api-st { border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.api-st:hover { border-color: var(--primary); }
.api-st.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.api-st-top { display: flex; align-items: center; gap: 8px; }
.api-st-ico { font-size: 11px; color: var(--muted); font-weight: 700; }
.api-st-top b { font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-st-cur { font-size: 10px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 1px 8px; flex-shrink: 0; }
.api-st-url { font-size: 11.5px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-st-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: 11px; }
.api-ok { color: #5B7A3E; }
.api-off { color: var(--muted); }
.api-models { color: var(--primary); }
.api-note { color: var(--muted); }
.api-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 900px) { .api-lower { grid-template-columns: 1fr; } }
.api-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.api-chip { border: 1.5px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 14px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.api-chip:hover { border-color: var(--primary); }
.api-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.mp-card-ph { opacity: .62; cursor: default; }
.mp-card-ph:hover { border-color: var(--border); }

/* ============ 工作流 v2（对标星月：表单设计器 / 步骤配置 / 两栏运行页） ============ */
.req { color: #B03A2A; font-style: normal; margin-left: 2px; }
.opt-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-weight: 400; margin-left: 6px; }
.wf-mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wf-mode-card { border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); background: var(--card); }
.wf-mode-card input { margin-top: 3px; }
.wf-mode-card.on { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }
.wf-mode-card b { font-size: 13px; color: var(--text); }

/* —— 表单设计器 —— */
.wf-designer { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .wf-designer { grid-template-columns: 1fr; } }
.wf-designer-l, .wf-designer-r { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #FCFAF3; }
.wf-designer-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.wf-designer-head.pv-head { background: linear-gradient(135deg, #A5647A, #C98A9E); color: #FDFBF6; border-radius: 8px 8px 0 0; margin: -12px -12px 10px; padding: 10px 14px; }
.wf-designer-head.pv-head .pv-sub { font-size: 11px; font-weight: 400; opacity: .85; }
.wf-designer-empty { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 13px; border: 1.5px dashed var(--border); border-radius: 8px; }
.wf-designer-empty span { display: block; font-size: 11px; margin-top: 6px; }
.wf-inp-item { border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; margin-bottom: 9px; background: #FDFBF6; display: flex; flex-direction: column; gap: 7px; }
.wf-inp-row1 { display: flex; align-items: center; gap: 7px; }
.wf-inp-idx { width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-deep); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.wf-inp-type { font-size: 11px; color: var(--muted); white-space: nowrap; }
.wf-req { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 3px; white-space: nowrap; cursor: pointer; }
.wf-inp-op { border: none; background: none; cursor: pointer; font-size: 12px; color: #8A7C68; padding: 2px 4px; }
.wf-inp-op:hover { color: var(--primary); }
.wf-inp-op.del:hover { color: #B03A2A; }
.wf-inp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.wf-type-list { display: flex; flex-direction: column; gap: 6px; }
.wf-type-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: var(--card); cursor: pointer; font-size: 13px; color: var(--text); text-align: left; }
.wf-type-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.wf-type-icon { font-size: 17px; }

/* —— 步骤配置子卡片 —— */
.wf-sub-card { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: #FDFBF6; display: flex; flex-direction: column; gap: 8px; }
.wf-sub-card > b { font-size: 12.5px; color: #443B2E; }
.wf-radio-row { display: flex; gap: 8px; }
.wf-radio { flex: 1; border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; cursor: pointer; color: var(--muted); text-align: center; }
.wf-radio.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.wf-radio input { display: none; }
.wf-assoc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-assoc-btn { border: 1.5px solid var(--border); border-radius: 8px; background: var(--card); padding: 7px 12px; font-size: 12px; color: var(--muted); cursor: pointer; transition: all .15s; }
.wf-assoc-btn.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }

/* —— 运行页两栏 —— */
.wf-run-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .wf-run-layout { grid-template-columns: 1fr; } }
.wf-run-left, .wf-run-right { margin-bottom: 0; }
.wfp-intro-banner { background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--text); margin-bottom: 12px; }
.wf-assoc-block { border-top: 1px dashed var(--border); margin-top: 12px; padding-top: 4px; }
.wf-assoc-empty { font-size: 12px; color: var(--muted); }
.wf-assoc-btns { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.wf-run-go { display: flex; gap: 10px; margin-top: 14px; }
.wf-run-go .btn { flex: 1; }
.wf-wait { text-align: center; color: var(--muted); font-size: 12px; padding: 22px 10px; border: 1.5px dashed var(--border); border-radius: 8px; margin-top: 8px; }
.wf-pick-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.wf-pick-item { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.wf-pick-item:hover { border-color: var(--primary); }
.wf-pick-item span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.wf-pick-item i { font-size: 11px; color: var(--muted); font-style: normal; }
.wf-grey-box { border: 1.5px dashed var(--border); border-radius: 9px; padding: 18px 12px; text-align: center; color: var(--muted); font-size: 12px; background: #FCFAF3; }
.wf-mode-warn { background: #fff7e6; border: 1px solid #ffe3ba; color: #8A5F10; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin-bottom: 10px; }
.hint.err { color: #B03A2A; }

/* ============ 工作流执行页（左步骤表单 / 右输出面板） ============ */
.wf-ok-banner { background: #EAEFD9; border: 1px solid #E0E6CC; color: #4A6B34; border-radius: 10px; padding: 9px 14px; font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.wf-exec2 { display: grid; grid-template-columns: 1.08fr 1fr; gap: 14px; align-items: stretch; }
@media (max-width: 980px) { .wf-exec2 { grid-template-columns: 1fr; } }
.wf-exec-l { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.wf-exec-r { background: #F6F1E6; border: 1px solid var(--border); border-radius: 12px; padding: 16px; position: relative; min-height: 320px; }
.wfe-step-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.wfe-step-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #FDFBF6; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; flex: none; }
.wfe-step-tt b { font-size: 16px; display: block; }
.wfe-status { font-size: 11px; color: #8A5F10; font-style: normal; border: 1px solid #ffe3ba; background: #fff7e6; border-radius: 4px; padding: 1px 7px; display: inline-block; margin-top: 3px; }
.wfe-status.ok { color: #4A6B34; border-color: #E0E6CC; background: #EAEFD9; }
.wfe-form { display: flex; flex-direction: column; gap: 13px; }
.wfe-assoc { border-top: 1px dashed var(--border); padding-top: 11px; display: flex; flex-direction: column; gap: 6px; }
.wfe-assoc > b { font-size: 13px; color: var(--text); }
.wfe-r-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.wfe-r-ico { width: 32px; height: 32px; border-radius: 8px; background: #EAEFD9; display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.wfe-r-head b { font-size: 15px; }
.wfe-r-wc { margin-left: auto; font-size: 11px; color: var(--muted); }
.wfe-wait { text-align: center; color: var(--muted); font-size: 12px; padding: 70px 10px; border: 1.5px dashed var(--border); border-radius: 10px; background: var(--card); }
.wfe-wait span { display: block; font-size: 28px; margin-bottom: 10px; }
.wfe-gen { text-align: center; color: var(--primary-deep); font-size: 13px; padding: 70px 10px; border: 1.5px dashed var(--primary); border-radius: 10px; background: var(--primary-soft); }
.wfe-gen.wfe-err { color: #B03A2A; border-color: #DCAFA4; background: #F6E4E0; }
.wfe-fab { position: absolute; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #FDFBF6; border: none; cursor: pointer; font-size: 17px; box-shadow: 0 4px 14px rgba(196, 57, 44, 0.35); }
.wfe-fab:hover { filter: brightness(1.08); }


/* =========================================================
   素页工场 · 宣纸墨梅覆盖层（仅视觉覆盖，无结构改动）
   ========================================================= */
:root { --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, serif; }

/* 宣纸颗粒（极淡，不影响阅读） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: .10; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px;
}

/* 标题与品牌：衬线 + 字距 */
h1, h2, h3, .brand, .stat b { font-family: var(--serif); }
.hero h1, .section-head h2 { letter-spacing: 3px; }
.brand { font-weight: 600; letter-spacing: 2px; }

/* 印章 Logo：替换叶片表情 */
.brand .logo {
  font-size: 0;
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  background: linear-gradient(150deg, #C4392C, #8E2A20);
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(242,236,225,.85), inset 0 0 4px rgba(0,0,0,.25);
  margin-right: 2px;
}
.brand .logo::before {
  content: "素";
  font-size: 15px; font-family: var(--serif); font-weight: 600;
  color: #F7F1E3; line-height: 1;
}

/* 首页大标题：墨色渐变入印泥 */
.hero h1 .grad {
  background: linear-gradient(115deg, #46403A 10%, #6B3230 45%, #C4392C 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.tag { font-family: var(--serif); letter-spacing: 1px; }

/* 纸面不留荧光星点 */
.stars { display: none; }

/* 登录卡：双线描边 */
.auth-card { outline: 1px solid rgba(32,26,20,.07); outline-offset: 5px; }

/* 侧栏激活项：印泥勾线 */
.side-nav a.active { box-shadow: inset 2px 0 0 var(--primary); }

/* 输入框纸面 */
.input, textarea.input, select.input { background: #FCFAF3; }

/* 文章选中色：梅粉 */
::selection { background: rgba(201,138,158,.28); }

/* ===== 素页工场 v19.26：朱红方章图标全面替换叶片 ===== */
/* 左侧栏 Logo：圆改方章 */
.rail-logo {
  border-radius: 8px;
  background: linear-gradient(150deg, #C4392C, #8E2A20);
  font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: 0;
  box-shadow: 0 0 0 2px rgba(242,236,225,.85), inset 0 0 4px rgba(0,0,0,.22);
}
/* 顶栏品牌：小方章 */
.tbar-seal {
  width: 18px; height: 18px; flex: none;
  display: inline-grid; place-items: center;
  background: linear-gradient(150deg, #C4392C, #8E2A20);
  border-radius: 4px;
  box-shadow: 0 0 0 1.5px rgba(242,236,225,.9);
  color: #F7F1E3; font-size: 11px; font-family: var(--serif); font-weight: 600; line-height: 1;
}

/* ===== 备忘录双分组（全局 + 本书，对标星月结构） ===== */
.gm-group { margin-bottom: 8px; }
.gm-group-head {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px 6px; margin-top: 2px;
  border-bottom: 1px dashed var(--border);
}
.gm-group-head b { font-size: 12.5px; color: var(--text); font-family: var(--serif); letter-spacing: .5px; }
.gm-group-head em {
  font-style: normal; font-size: 11px; color: var(--muted);
  background: #F6F1E6; border-radius: 999px; padding: 1px 7px;
}
.gm-group-sub { margin-left: auto; font-size: 10.5px; }
.gm-group-sub.ok { color: #6F7F4A; }
.gm-group-sub.mine { color: var(--muted); }
.gm-book-title {
  font-size: 11.5px; color: var(--muted); padding: 5px 8px 2px;
  font-family: var(--serif); letter-spacing: .5px;
}
/* 编辑区分组切换 */
.gm-ed-scope { display: flex; gap: 6px; padding: 10px 16px 0; }
.gm-scope-chip {
  border: 1px solid var(--border); background: #FDFBF6; color: var(--muted);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.gm-scope-chip.on {
  background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600;
}
.gm-scope-fixed {
  font-size: 11.5px; color: var(--muted); border: 1px dashed var(--border);
  border-radius: 999px; padding: 3px 10px;
}
.gm-main .gm-ed-head { padding-top: 0; }

/* 工作流勾选弹窗 */
.wf-pick-sec {
  font-size: 12px; color: var(--text); font-weight: 600;
  padding: 8px 2px 4px; font-family: var(--serif); letter-spacing: .5px;
}
.wf-pick-list {
  max-height: 320px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 8px; margin: 6px 0 10px; background: #FCFAF3;
}
.wf-pick-list .kb-ch-item { border-bottom: 1px solid rgba(32,26,20,.05); }
.wf-pick-list .kb-ch-item:last-child { border-bottom: none; }

/* 作品备忘卡片：文件夹角标 */
.memo-folder {
  font-style: normal; font-size: 10.5px; color: #99682A;
  background: #F9F3E6; border: 1px solid #EADFC6;
  border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px;
}

/* ===== v19.27.1：AI 内嵌右栏面板（星月式：提示词 + 关联知识库分组 + 选择子弹窗） ===== */
.ap-panel { height: 100%; display: flex; flex-direction: column; background: var(--card); overflow: hidden; }
.ap-head { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--border); flex: none; }
.ap-title { font-size: 14px; font-weight: 700; font-family: var(--serif); color: var(--text); letter-spacing: 1px; }
.ap-head .bw-ai-model-sel { margin-left: auto; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-close { border: none; background: none; color: #8A7C68; font-size: 14px; cursor: pointer; padding: 4px 6px; }
.ap-close:hover { color: var(--primary); }
.ap-body { flex: 1; overflow-y: auto; padding: 12px 12px; min-height: 0; }
.ap-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); flex: none; background: #FDFBF6; }
.ap-foot-note { font-size: 11px; color: var(--muted); }
.ap-run { flex: 1; }
.ap-foot .btn-ghost { flex: 1; }

/* 分节卡片 */
.ap-sec { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #FDFBF6; }
.ap-sec-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #F6F1E6; font-family: var(--serif); font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .5px; border-bottom: 1px solid rgba(32,26,20,.06); }
.ap-sec-head em { font-style: normal; font-weight: 400; font-size: 11px; color: #99682A; background: #F9F3E6; border: 1px solid #EADFC6; border-radius: 999px; padding: 1px 8px; }
.ap-sec-tip { margin-left: auto; font-size: 10.5px; color: var(--muted); font-family: var(--body-font, inherit); font-weight: 400; letter-spacing: 0; }
.ap-f { margin: 8px 0; }
.ap-f label { display: block; font-size: 12px; font-weight: 600; color: #443B2E; margin-bottom: 5px; }
.ap-extra { min-height: 64px; }
.ap-count { font-size: 10.5px; color: var(--muted); float: right; }

/* 全文预览 */
.ap-preview { max-height: 130px; overflow-y: auto; background: #FCFAF3; border: 1px dashed var(--border); margin: 10px 12px; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; color: #574C3E; }

/* 关联分组 */
.ap-grp { border-top: 1px solid rgba(32,26,20,.06); }
.ap-grp:first-of-type { border-top: none; }
.ap-grp-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; user-select: none; }
.ap-grp-head:hover { background: #F9F5EA; }
.ap-grp-head b { font-size: 12.5px; color: var(--text); font-weight: 600; }
.ap-grp-ico { font-size: 13px; }
.ap-grp-arrow { margin-left: auto; color: var(--muted); font-size: 11px; }
.ap-badge { font-size: 10.5px; color: var(--muted); background: #F6F1E6; border-radius: 999px; padding: 1px 8px; }
.ap-badge.on { color: var(--primary); background: #F6EBE9; border: 1px solid #E8CDD4; font-weight: 600; }
.ap-grp-body { padding: 2px 12px 12px; }
.ap-grp-tip { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

/* 模式切换 / 快捷按钮 / 步进 */
.ap-mode { display: flex; gap: 6px; margin: 4px 0 8px; }
.ap-mode-pill { border: 1px solid var(--border); background: #FDFBF6; color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.ap-mode-pill.on { background: var(--primary); border-color: var(--primary); color: #FDFBF6; font-weight: 600; }
.ap-auto-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #443B2E; flex-wrap: wrap; }
.ap-step { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.ap-step button { border: none; background: #F6F1E6; width: 22px; height: 24px; cursor: pointer; color: #574C3E; }
.ap-step input { border: none; width: 52px; height: 24px; text-align: center; font-size: 12px; background: #FDFBF6; }
.ap-mini { font-size: 10.5px; color: var(--muted); }
.ap-quick { display: flex; gap: 6px; margin: 4px 0 6px; flex-wrap: wrap; }
.ap-quick-btn { border: 1px solid var(--border); background: #FDFBF6; color: #443B2E; border-radius: 8px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.ap-quick-btn:hover { background: #F6F1E6; border-color: #D8CBAC; }
.ap-pick-btn { border-color: #E8CDD4; color: var(--primary-deep); background: #FBF4F3; }
.ap-pick-btn:hover { background: #F6EBE9; }
.ap-clear-btn { color: #B06048; border-color: #EADFC6; }

/* 已选胶囊 */
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.ap-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #E8CDD4; background: #F6EBE9; color: var(--primary-deep); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; cursor: pointer; }
.ap-chip i { font-style: normal; color: #B06048; font-size: 10px; }
.ap-chip i:hover { color: var(--primary); }
.ap-none { font-size: 11px; color: var(--muted); }

/* 生成结果视图 */
.ap-result { padding: 4px 2px; }
.ap-out { max-height: none; flex: 1; min-height: 200px; }
.ap-out-head { margin-bottom: 8px; }

/* 选择子弹窗 */
.ap-pick-overlay { position: fixed; inset: 0; z-index: 1400; background: rgba(40,32,20,.5); display: flex; align-items: center; justify-content: center; }
.ap-pick { width: min(640px, 92vw); height: min(560px, 86vh); background: var(--card); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 18px 60px rgba(32,26,20,.38); animation: modalIn .2s ease; }
.ap-pick-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex: none; }
.ap-pick-head b { font-size: 14px; font-family: var(--serif); color: var(--text); }
.ap-pick-count { font-size: 11px; color: var(--primary); background: #F6EBE9; border-radius: 999px; padding: 1px 8px; }
.ap-pick-head button { margin-left: auto; border: none; background: none; color: #8A7C68; cursor: pointer; font-size: 14px; }
.ap-pick-head button:hover { color: var(--primary); }
.ap-pick-tools { display: flex; gap: 6px; padding: 10px 16px; flex: none; }
.ap-pick-search { flex: 1; font-size: 12.5px; padding: 6px 10px; }
.ap-pick-list { flex: 1; overflow-y: auto; border-top: 1px solid rgba(32,26,20,.06); min-height: 0; }
.ap-pk-group { font-size: 11.5px; color: #99682A; font-family: var(--serif); padding: 8px 14px 4px; background: #F9F5EA; letter-spacing: .5px; }
.ap-pk-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; border-bottom: 1px solid rgba(32,26,20,.05); }
.ap-pk-item:hover { background: #F9F5EA; }
.ap-pk-item.on { background: #F6EBE9; }
.ap-pk-box { width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 4px; flex: none; display: grid; place-items: center; font-size: 11px; color: #FDFBF6; }
.ap-pk-item.on .ap-pk-box { background: var(--primary); border-color: var(--primary); }
.ap-pk-title { font-size: 12.5px; color: var(--text); }
.ap-pk-sub { margin-left: auto; font-size: 11px; color: var(--muted); }
.ap-pick-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex: none; justify-content: flex-end; }

/* ===== v19.28：AI 纠错规则清单（星月式） + 审稿去主输入 ===== */
.ap-fix-info { font-size: 11.5px; color: var(--muted); background: #F9F3E6; border: 1px dashed #EADFC6; border-radius: 8px; padding: 6px 10px; margin: 4px 0 8px; }
.ap-fix-info b { color: #99682A; }
.ap-rule { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; background: #FCFAF3; }
.ap-rule.on { border-color: #E8CDD4; background: #FBF6F4; }
.ap-rule-top { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.ap-rule-top input { accent-color: var(--primary); }
.ap-rule-top b { font-size: 12.5px; color: var(--text); }
.ap-rule.on .ap-rule-top b { color: var(--primary-deep); }
.ap-rule-desc { font-size: 11.5px; color: #574C3E; line-height: 1.7; margin: 4px 0 2px 22px; }
.ap-rule-ops { display: flex; gap: 6px; justify-content: flex-end; }
.ap-rule-ops button { border: none; background: none; font-size: 11px; color: #8A7C68; cursor: pointer; padding: 2px 6px; border-radius: 5px; }
.ap-rule-ops button:hover { color: var(--primary-deep); background: #F6F1E6; }
.ap-rule-ops button.danger:hover { color: #B06048; background: #FBF1EC; }
.ap-rule-form { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; margin-top: 10px; background: #FDFBF6; }
.ap-rule-form-t { font-size: 12px; font-weight: 600; color: #443B2E; font-family: var(--serif); margin-bottom: 6px; }
.ap-rule-form .input { font-size: 12px; margin-bottom: 6px; }
.ap-fr-desc { min-height: 56px; }
.ap-rule-form-ops { display: flex; gap: 8px; }

/* ===== v19.29：导出 + 编辑器设置（星月式） ===== */
.ex-field { margin: 10px 0; }
.ex-field > label:first-child { display: block; font-size: 12px; font-weight: 600; color: #443B2E; margin-bottom: 5px; }
.ex-radio, .ex-check { display: inline-flex; align-items: center; gap: 5px; margin: 0 14px 6px 0; font-size: 12.5px; color: #574C3E; cursor: pointer; }
.ex-radio input, .ex-check input { accent-color: var(--primary); }
.ep-grid { display: flex; flex-direction: column; }
.ep-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed rgba(32,26,20,.08); }
.ep-row:last-child { border-bottom: none; }
.ep-l { font-size: 12.5px; color: #443B2E; flex: 1; }
.ep-select { font-size: 12px; padding: 4px 8px; max-width: 170px; }
.ep-pills { display: flex; gap: 6px; }
.ep-row .ap-step input { width: 64px; }
/* AI 面板弹窗形态（⚙ 设置里可选，默认侧边栏） */
.ap-modal-wrap { position: fixed; inset: 0; z-index: 1280; background: rgba(40,32,20,.45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; }
.ap-modal-wrap .ap-panel { width: min(920px, 95vw); height: min(780px, 92vh); border-radius: 16px; box-shadow: 0 18px 60px rgba(32,26,20,.32); }

/* ===== v19.30：右侧抽屉（星月式：设置/导出侧边滑出，无遮罩，正文照常可看可编辑） ===== */
#drawer-root { position: fixed; top: 0; right: 0; bottom: 0; width: 0; z-index: 1290; }
.sd-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 94vw); background: var(--card); border-left: 1px solid var(--border); box-shadow: -14px 0 44px rgba(32,26,20,.16); display: flex; flex-direction: column; transform: translateX(102%); transition: transform .26s ease; }
#drawer-root.open .sd-panel { transform: translateX(0); }
.sd-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border); flex: none; }
.sd-head b { font-size: 15px; font-family: var(--serif); color: var(--text); letter-spacing: 1px; }
.sd-close { margin-left: auto; border: none; background: none; color: #8A7C68; font-size: 14px; cursor: pointer; padding: 4px 6px; }
.sd-close:hover { color: var(--primary); }
.sd-body { flex: 1; overflow-y: auto; padding: 14px 16px; min-height: 0; }
.sd-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex: none; background: #FDFBF6; }
.sd-foot .btn { flex: 1; }
/* 设置分组标题 */
.ep-group { font-size: 12px; font-family: var(--serif); color: #99682A; letter-spacing: 1.5px; margin: 16px 0 2px; padding-bottom: 5px; border-bottom: 1px dashed #EADFC6; }
.ep-group:first-child { margin-top: 0; }
/* 正文主题色色卡 */
.ep-swatches { display: flex; gap: 7px; }
.ep-sw { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); cursor: pointer; padding: 0; }
.ep-sw.on { outline: 2px solid var(--primary); outline-offset: 1.5px; }
/* 护眼模式（全站暖色滤镜） */
.eye-care body { filter: sepia(.22) saturate(.92) brightness(.985); }

/* ============ 编辑工具条 / 查找替换 / 高频词透镜 / 智能排版（19.31.0 对标星月） ============ */
.bw-edit-tools { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.bw-et-btn { border: 1px solid var(--border); background: #FDFBF6; color: #6B6250; border-radius: 7px; padding: 3px 10px; font-size: 12px; cursor: pointer; transition: all .15s; line-height: 1.7; white-space: nowrap; }
.bw-et-btn:hover { color: var(--primary); border-color: var(--primary); background: #FDF6F0; }
.bw-et-btn.on { background: var(--primary); border-color: var(--primary); color: #FDFBF6; font-weight: 600; }
.bw-et-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }

.bw-find-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #FCFAF3; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin: 0 0 8px; }
.bw-find-input { border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px; font-size: 12.5px; outline: none; width: 150px; background: #FDFBF6; font-family: inherit; }
.bw-find-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(196, 57, 44, .1); }
.bw-find-count { font-size: 11.5px; color: var(--muted); min-width: 36px; text-align: center; }
.bw-find-nav, .bw-find-btn { border: 1px solid var(--border); background: #FDFBF6; color: #574C3E; border-radius: 6px; font-size: 12px; padding: 3px 9px; cursor: pointer; }
.bw-find-nav:hover, .bw-find-btn:hover { border-color: var(--primary); color: var(--primary); }
.bw-find-case { font-size: 11.5px; color: #8A7C68; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.bw-find-close { border: none; background: none; color: #8A7C68; font-size: 13px; cursor: pointer; margin-left: auto; padding: 2px 4px; }
.bw-find-close:hover { color: #B03A2A; }

/* 高频词透镜：高亮图层与 textarea 完全对齐 */
.bw-ed-wrap { position: relative; flex: 1; min-height: 420px; display: flex; flex-direction: column; }
.bw-ed-wrap .editor-area { flex: 1; width: 100%; min-height: 420px; position: relative; z-index: 1; }
.bw-lens-layer { position: absolute; border: 0 solid transparent; overflow: hidden; pointer-events: none; z-index: 2; }
.bw-lens-inner { color: transparent; white-space: pre-wrap; word-break: break-word; will-change: transform; }
.bw-lens-inner .bw-sh { background: rgba(255, 200, 0, .42); border-radius: 2px; }
.bw-lens-inner .bw-sh.cur { background: rgba(255, 120, 0, .6); }
.bw-lens-inner .bw-lh { border-radius: 2px; }
/* v20.26.0：选区格式渲染 —— 高亮=红字，加粗=粗体。正文无符号，样式来自章节侧表。
 * 带样式的区间用「与编辑器同色的底块」盖住 textarea 里的原字，再在底块上画红字/粗体。
 * 加粗会改变字宽导致换行错位，所以粗体不用 font-weight，而用 text-shadow 描边模拟（字宽不变）。 */
.bw-lens-inner .bw-fm-hl,
.bw-lens-inner .bw-fm-b { background: #FDFBF6; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.bw-lens-inner .bw-fm-hl { color: #E60000; }
.bw-lens-inner .bw-fm-b { color: #201A14; text-shadow: 0 0 .55px currentColor, 0 0 .55px currentColor, 0 0 .02em currentColor; }
.bw-lens-inner .bw-fm-hl.bw-fm-b { color: #E60000; text-shadow: 0 0 .55px currentColor, 0 0 .55px currentColor, 0 0 .02em currentColor; }

/* 智能排版弹窗 */
.sf-opts { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 12px; }
.sf-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; padding: 5px 8px; border-radius: 6px; }
.sf-opt:hover { background: #F6F1E6; }
.sf-opt input { margin-top: 3px; flex: none; }
.sf-opt b { font-weight: 600; }
.sf-preview-label { font-size: 12px; font-weight: 600; color: #443B2E; margin-bottom: 5px; }
.sf-preview { border: 1px dashed var(--border); border-radius: 8px; background: #FCFAF3; padding: 10px 12px; font-size: 12.5px; line-height: 1.8; max-height: 190px; overflow-y: auto; white-space: pre-wrap; color: #574C3E; }
/* 智能排版：选项按钮（紧跟主按钮的小齿轮） */
.bw-et-btn.bw-et-cfg { padding: 3px 7px; margin-left: -2px; }

/* ============ 章节概要（对标星月：一键生成 / 批量生成） ============ */
.sum-config { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); border-radius: 10px; background: #FCFAF3; padding: 10px 13px; margin: 4px 0 4px; }
.sum-config-t { font-size: 12px; font-weight: 600; color: #99682A; letter-spacing: 1.2px; }
.sum-config-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #574C3E; }
.sum-config-row > span { flex: 1; }
.sum-config-row .btn { flex: none; }

/* 批量生成概要 */
.bs-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.bs-count { margin-left: auto; font-size: 12px; color: var(--primary); font-weight: 600; }
.bs-progress { width: 100%; font-size: 12px; color: #A46A12; background: #FBEBCF; border-radius: 6px; padding: 5px 10px; }
.bs-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 9px; background: #FDFBF6; padding: 6px; }
.bs-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: #443B2E; }
.bs-row:hover { background: #F6F1E6; }
.bs-row input { flex: none; }
.bs-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-w { flex: none; font-size: 11px; color: #B3A48C; min-width: 52px; text-align: right; }
.bs-sum { flex: none; font-size: 10.5px; color: #B06048; background: #F8EDE9; border-radius: 999px; padding: 1px 8px; }
.bs-sum:empty { display: none; }

/* 高频词透镜设置抽屉 */
.lens-tip { font-size: 11.5px; color: #8A7C68; background: #FCFAF3; border-radius: 7px; padding: 8px 11px; line-height: 1.7; margin-bottom: 10px; }
.lens-group { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; background: #FDFBF6; }
.lg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
.lg-name { border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 12.5px; outline: none; width: 128px; background: #FCFAF3; font-family: inherit; }
.lg-name:focus { border-color: var(--primary); }
.lg-color { width: 32px; height: 26px; border: 1px solid var(--border); border-radius: 5px; background: #FCFAF3; padding: 2px; cursor: pointer; flex: none; }
.lg-prev { font-size: 11px; color: #332B21; border-radius: 3px; padding: 1px 6px; white-space: nowrap; }
.lg-on { font-size: 11.5px; color: #574C3E; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.lg-del { margin-left: auto; border: none; background: none; color: #8A7C68; cursor: pointer; font-size: 13px; padding: 2px 4px; }
.lg-del:hover { color: #B03A2A; }
.lg-words { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px; font-size: 12.5px; line-height: 1.8; outline: none; resize: vertical; min-height: 64px; background: #FCFAF3; font-family: inherit; }
.lg-words:focus { border-color: var(--primary); }
.lg-cnt { font-size: 11px; color: #B3A48C; margin-top: 4px; text-align: right; }
.lg-add { width: 100%; border: 1.5px dashed #D8CDB6; background: #FCFAF3; color: #574C3E; border-radius: 9px; padding: 8px; font-size: 12.5px; cursor: pointer; }
.lg-add:hover { border-color: var(--primary); color: var(--primary); }

/* ============ 作品卡片右键菜单 + 站长修改日志（19.32.0） ============ */
.bk-ctx-menu { position: fixed; z-index: 1200; background: #FDFBF6; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 10px 32px rgba(32, 26, 20, .2); padding: 5px; min-width: 208px; animation: modalIn .12s ease; }
.bk-ctx-menu button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 8px 12px; font-size: 12.5px; color: #443B2E; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.bk-ctx-menu button:hover { background: #F0E0E4; color: var(--primary-deep); }
.bk-ctx-menu button:first-child { color: var(--primary-deep); font-weight: 600; }
.bk-ctx-menu button:first-child:hover { background: #F0E0E4; }
.bk-ctx-sep { height: 1px; background: var(--border); margin: 4px 8px; }

/* 修改日志 */
.cl-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cl-tip { flex: 1; font-size: 11.5px; color: #8A7C68; background: #FCFAF3; border-radius: 7px; padding: 8px 11px; line-height: 1.7; }
.cl-list { display: flex; flex-direction: column; gap: 10px; }
.cl-card { border: 1px solid var(--border); border-radius: 10px; background: #FDFBF6; padding: 12px 14px; }
.cl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-head b { font-size: 13.5px; color: #332B21; }
.cl-date { font-size: 11.5px; color: #B3A48C; }
.cl-acts { margin-left: auto; display: flex; gap: 6px; }
.cl-tag { font-size: 11px; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.cl-tag.ok { background: #E3EFD9; color: #2F6B2F; }
.cl-tag.doing { background: #FBEBCF; color: #A46A12; }
.cl-tag.todo { background: #EDE8DE; color: #6B6250; }
.cl-sec { display: flex; gap: 8px; margin-top: 8px; }
.cl-label { flex: none; width: 62px; font-size: 11px; font-weight: 600; color: #B06048; padding-top: 1px; }
.cl-text { font-size: 12.5px; color: #574C3E; line-height: 1.8; white-space: pre-wrap; word-break: break-word; flex: 1; }
.cl-count { text-align: right; font-size: 11.5px; color: #B3A48C; margin-top: 10px; }

/* ============ 提示词作者权益保护（19.33.0） ============ */
.p-tag.lock { background: #F3E4D6; color: #A0562B; border: 1px solid #E4C9AE; }
.wm-hit { border: 1px solid #E4C9AE; background: #FCF6EC; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #574C3E; line-height: 1.8; margin-top: 6px; }
.wm-hit b { color: var(--primary-deep); }
.p-locked { color: #A08A6A; background: #F8F3E8; border: 1px dashed #E0D2B8; border-radius: 7px; padding: 8px 10px; font-size: 12px; }

/* ============ 市场模块（20.0.0） ============ */
.adm-tag.bad { background: #F6E3E0; color: #B0523C; }
.mk-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mk-toolbar .pfilter { margin: 0; }
.mk-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.mk-sorts { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mk-sorts button { border: none; background: #FDFBF6; color: #6B6250; font-size: 12px; padding: 5px 12px; cursor: pointer; }
.mk-sorts button + button { border-left: 1px solid var(--border); }
.mk-sorts button.on { background: var(--primary); color: #fff; font-weight: 600; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 12px; }
.mk-card { border: 1px solid var(--border); border-radius: 11px; background: #FDFBF6; padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; transition: box-shadow .15s ease, transform .15s ease; }
.mk-card:hover { box-shadow: 0 8px 24px rgba(70, 50, 30, .13); transform: translateY(-2px); }
.mk-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.mk-title { font-size: 13.5px; color: #332B21; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.mk-author { font-size: 11.5px; color: #8A7C68; }
.mk-intro { font-size: 12px; color: #574C3E; line-height: 1.7; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mk-foot { display: flex; align-items: center; gap: 8px; border-top: 1px dashed var(--border); padding-top: 9px; }
.mk-price { font-size: 15px; font-weight: 700; color: #C4392C; }
.mk-price.free { color: #5B7A3E; }
.mk-btns { margin-left: auto; display: flex; gap: 5px; }
.mk-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.mk-detail-price { margin-bottom: 8px; }
.mk-detail-price .mk-price { font-size: 20px; }
.mk-detail-line { font-size: 12.5px; color: #574C3E; margin-bottom: 8px; }
.mk-detail-intro { border: 1px solid var(--border); border-radius: 9px; background: #FCFAF3; padding: 12px 14px; font-size: 13px; line-height: 1.9; color: #443B2E; max-height: 46vh; overflow-y: auto; }
.mk-detail-intro p { margin: 0 0 6px; }
.mk-detail-intro img { max-width: 100%; border-radius: 8px; }

/* ============ 市场课程 20.6.0：封面图 + 微信扫码付款 ============ */
.mk-card { padding: 0; overflow: hidden; }
.mk-card.ex-card { padding: 13px 14px; } /* 例文卡不受封面布局影响 */
.mk-card .mk-tags, .mk-card .mk-title, .mk-card .mk-author, .mk-card .mk-intro, .mk-card .mk-foot { margin-left: 13px; margin-right: 14px; }
.mk-card .mk-tags { margin-top: 10px; }
.mk-card .mk-foot { margin-bottom: 12px; }
.mk-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #F3EEE2; }
.mk-cover-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(135deg, #F4EFE3, #E9E0CB); color: #8A7C68; }
.mk-cover-empty span { font-size: 26px; }
.mk-cover-empty b { font-size: 12.5px; }
.mk-cover-detail { width: 100%; max-height: 40vh; object-fit: contain; border-radius: 10px; border: 1px solid var(--border); background: #FCFAF3; margin-bottom: 4px; }
.mk-cover-detail.mk-cover-empty { aspect-ratio: auto; padding: 34px 0; }
.mk-views { margin-left: auto; font-size: 11px; color: #B0A590; }
.mk-author { display: flex; align-items: center; gap: 5px; }
.mk-ava { font-size: 13px; }
.mk-price.pay { border: none; background: #FBEFE8; border-radius: 7px; padding: 2px 8px; cursor: pointer; transition: background .15s ease, transform .15s ease; font-family: inherit; }
.mk-price.pay:hover { background: #F7E0D4; transform: translateY(-1px); }
.mk-pay-ico { font-size: 11px; }
.mk-btn-wechat { background: #38A742; color: #fff; }
.mk-btn-wechat:hover { background: #2F8C38; color: #fff; }
.mk-pay-box { display: flex; flex-direction: column; align-items: center; padding: 6px 0 2px; }
.mk-pay-course { font-size: 14px; font-weight: 600; color: #332B21; text-align: center; }
.mk-pay-course-sub { font-size: 12px; color: #8A7C68; margin: 3px 0 6px; }
.mk-pay-amount { font-size: 26px; font-weight: 800; color: #C4392C; letter-spacing: .5px; }
.mk-pay-qr-wrap { display: flex; flex-direction: column; align-items: center; margin-top: 10px; width: 100%; }
.mk-pay-qr { width: 230px; height: 230px; object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 8px; }
.mk-pay-qr-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #D8CBAF; background: #FCF8EE; }
.mk-pay-qr-empty span { font-size: 30px; }
.mk-pay-qr-empty b { font-size: 13px; color: #574C3E; }
.mk-pay-qr-empty i { font-size: 11px; color: #8A7C68; font-style: normal; text-align: center; padding: 0 14px; line-height: 1.6; }
.mk-pay-tip { margin-top: 8px; font-size: 12px; color: #38A742; font-weight: 600; }
.mk-pay-note { margin-top: 6px; font-size: 12px; color: #574C3E; background: #FCF8EE; border: 1px solid #EDE4CD; border-radius: 8px; padding: 7px 12px; max-width: 320px; text-align: center; line-height: 1.6; }
.mk-pay-hint { margin-top: 10px; font-size: 11.5px; color: #8A7C68; text-align: center; }
/* 封面上传控件（课程编辑 + 站长收款码） */
.mk-cover-up { position: relative; }
.mk-cover-preview { width: 100%; max-height: 200px; object-fit: contain; border-radius: 9px; border: 1px solid var(--border); background: #FCFAF3; display: block; }
.mk-cover-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(51, 43, 33, .72); color: #fff; font-size: 12px; cursor: pointer; }
.mk-cover-x:hover { background: #C4392C; }
.mk-cover-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 2px dashed #D8CBAF; border-radius: 9px; background: #FCF8EE; padding: 22px 14px; cursor: pointer; text-align: center; transition: border-color .15s ease, background .15s ease; }
.mk-cover-add:hover { border-color: var(--primary); background: #FBF4E6; }
.mk-cover-add span { font-size: 24px; }
.mk-cover-add b { font-size: 13px; color: #574C3E; }
.mk-cover-add i { font-size: 11px; color: #8A7C68; font-style: normal; line-height: 1.6; }
.mk-pay-admin-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 6px; }
.mk-pay-admin-qr { position: relative; flex-shrink: 0; }
.mk-pay-admin-qr .mk-pay-qr { width: 170px; height: 170px; }
.mk-pay-admin-qr .mk-cover-add { width: 170px; height: 170px; box-sizing: border-box; padding: 12px 8px; }
.mk-pay-admin-qr .mk-cover-add span { font-size: 20px; }
.mk-pay-admin-qr .mk-cover-add i { display: none; }

/* 提示词使用权限三档（20.0.0） */
.pc-share-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.pc-share-title { font-size: 13px; font-weight: 600; color: #332B21; margin-bottom: 8px; }
.pc-share-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-share-opt { display: flex; flex-direction: column; gap: 3px; border: 1.5px solid var(--border); border-radius: 9px; padding: 9px 11px; cursor: pointer; background: #FDFBF6; transition: border-color .12s ease, background .12s ease; }
.pc-share-opt:hover { border-color: #D9B99A; }
.pc-share-opt:has(input:checked) { border-color: var(--primary); background: #FBF3E6; }
.pc-share-opt input { display: none; }
.pc-share-opt b { font-size: 12.5px; color: #332B21; }
.pc-share-opt span { font-size: 11px; color: #8A7C68; line-height: 1.6; }
@media (max-width: 720px) { .pc-share-opts { grid-template-columns: 1fr; } .mk-right { margin-left: 0; width: 100%; } }

/* ============ ID 批量授权（20.1.0） ============ */
.au-res { border-radius: 9px; padding: 10px 12px; font-size: 12.5px; line-height: 1.8; margin-top: 4px; }
.au-res.ok { background: #EDF3E4; color: #3F5E2B; border: 1px solid #C9DBB4; }
.au-res.bad { background: #F6E3E0; color: #8F3D2E; border: 1px solid #E4C0B8; margin-top: 8px; }
.gm-ucode { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #F1EADC; color: #7A6C54; font-size: 11px; letter-spacing: 1px; }
#au-tabs button { padding: 6px 14px; }

/* 授权管理表格（20.1.0）：7 列加宽弹窗 + 紧凑排版 */
.modal-box:has(.gm-table) { width: min(880px, 94vw); }
.gm-table th, .gm-table td { padding: 8px 10px; font-size: 12.5px; }
.gm-table td.ell { max-width: 300px; }

/* ============ 个人资料弹窗（20.2.0） ============ */
.pf-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pf-top h3 { margin: 0; }
.pf-close { width: 30px; height: 30px; border-radius: 50%; border: none; background: #F3EADC; color: #6B5D49; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.pf-close:hover { background: var(--primary); color: #fff; }
.pf-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.pf-avatar { position: relative; width: 64px; height: 64px; border-radius: 50%; background: #F3EADC; border: 2px solid #E8D9C0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; overflow: visible; }
.pf-avatar:hover { border-color: var(--primary); }
.pf-cam { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pf-idblock { min-width: 0; }
.pf-name-row { display: flex; align-items: center; gap: 6px; }
.pf-name { font-size: 17px; color: #332B21; }
.pf-edit { border: none; background: none; cursor: pointer; font-size: 13px; opacity: .6; padding: 2px 4px; }
.pf-edit:hover { opacity: 1; }
.pf-ucode { font-size: 12px; color: #8A7C68; margin-top: 3px; letter-spacing: .5px; }
.pf-role { display: inline-block; margin-top: 7px; font-size: 11.5px; padding: 3px 10px; border-radius: 20px; background: #EDF3E4; color: #3F5E2B; }
.pf-role.is-admin { background: #FBE9D9; color: #A05A1C; }
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.pf-stat { text-align: center; border: 1px solid var(--border); border-radius: 10px; padding: 10px 4px 8px; background: #FCFAF3; }
.pf-stat b { display: block; font-size: 18px; color: #332B21; }
.pf-stat span { font-size: 11px; color: #8A7C68; }
.pf-meta { font-size: 11.5px; color: #8A7C68; margin-top: 6px; }
.pf-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
#pf-avatar-panel { margin-top: 12px; border: 1px dashed var(--border); border-radius: 10px; padding: 12px; background: #FCFAF3; }
.pf-panel-tip { font-size: 11.5px; color: #8A7C68; margin-bottom: 8px; }
.pf-emoji-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-emoji { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: #FDFBF6; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pf-emoji:hover { border-color: var(--primary); background: #FBF3E6; }
.pf-up-row { display: flex; gap: 8px; margin-top: 10px; }

/* ============ 账号管理页（20.2.0） ============ */
.bl-form { display: flex; gap: 8px; margin: 10px 0 14px; flex-wrap: wrap; }
.bl-form .input { min-width: 0; }
.bl-alert-card { border: 1px solid #E4C0B8; background: #FDF7F5; }
.bl-alert-card h3 { color: #B0523C; }

/* ============ 例文板块（20.5.0，替代拆书） ============ */
.ex-points { display: flex; align-items: center; gap: 24px; padding: 16px 20px; margin-bottom: 18px; flex-wrap: wrap; }
.ex-pt-left { flex: 1; min-width: 220px; }
.ex-pt-num { display: flex; align-items: baseline; gap: 6px; }
.ex-pt-num b { font-size: 30px; color: var(--primary); line-height: 1; }
.ex-pt-num span { font-size: 12.5px; color: var(--muted); }
.ex-pt-bar { height: 8px; border-radius: 6px; background: #F1EADC; margin: 10px 0 6px; overflow: hidden; max-width: 320px; }
.ex-pt-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #D9A441, var(--primary)); transition: width .3s ease; }
.ex-pt-tip { font-size: 12px; color: #8A7C68; }
.ex-pt-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ex-pass { font-size: 12.5px; color: #8A7C68; background: #F6F1E6; border-radius: 20px; padding: 4px 12px; }
.ex-pass.on { color: #5B7A3E; background: #EAEFD9; font-weight: 600; }
.ex-card { cursor: pointer; }
.ex-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-card .p-tag { font-size: 11px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); }
.ex-title { font-size: 15px; margin: 2px 0; line-height: 1.4; }
.ex-author { font-size: 12px; color: #8A7C68; }
.ex-intro { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-card .b-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: #8A7C68; margin-top: 4px; }
.ex-card-acts { display: flex; gap: 8px; margin-top: 4px; }
.ex-read-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #8A7C68; margin: 4px 0 10px; }
.ex-read-meta .p-tag { font-size: 11px; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep); }
.ex-read-intro { font-size: 12.5px; color: var(--muted); background: #FCFAF3; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.ex-read-body { white-space: pre-wrap; font-size: 14px; line-height: 2; max-height: 58vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; background: #FDFBF6; }
.pf-pass { font-size: 12px; color: #8A7C68; background: #F6F1E6; border-radius: 8px; padding: 6px 12px; margin-top: 6px; }
.pf-pass.on { color: #5B7A3E; background: #EAEFD9; font-weight: 600; }

/* ============ 站长后台勾选式角色授权（20.5.3） ============ */
.adm-role-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.adm-chip { border: 1px solid var(--border); background: #FCFAF3; color: #8A7C68; border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer; transition: all .15s ease; line-height: 1.6; }
.adm-chip:hover { border-color: var(--primary); color: var(--primary-deep); }
.adm-chip.on { background: var(--primary-soft); color: var(--primary-deep); border-color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px var(--primary); }
.adm-chip.on::before { content: '✓ '; }

/* ============ 知识卡分享体系（20.5.4，对齐提示词卡） ============ */
.kc-card { position: relative; }
.kc-fav { position: absolute; top: 10px; right: 12px; cursor: pointer; font-size: 15px; color: #C9BCA4; user-select: none; }
.kc-fav.on { color: var(--primary); }
.kc-intro { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.kc-share-opts { display: flex; flex-direction: column; gap: 8px; }
.kc-share-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: all .15s ease; }
.kc-share-opt:hover { border-color: var(--primary); }
.kc-share-opt:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.kc-share-opt input { margin-top: 3px; }
.kc-share-opt span b { display: block; font-size: 13.5px; }
.kc-share-opt span i { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.kcg-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kcg-row span:first-child { flex: 1; }

/* ==================================================================
   v20.7.0 工作流全面对标星月（创建页三步设计器 + 运行页 8 项 + 执行页 3 栏）
   ================================================================== */

/* —— 创建/编辑页：基本信息折叠条 + 左步骤栏 + 右配置面板 —— */
.wfep { display: flex; flex-direction: column; gap: 12px; }
.wfep-basic { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0; overflow: hidden; }
.wfep-basic-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; font-size: 14px; background: #FAF5EA; border-bottom: 1px solid var(--border); }
.wfep-fold { margin-left: auto; background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 2px 10px; font-size: 12px; }
.wfep-fold:hover { border-color: var(--primary); color: var(--primary); }
.wfep-basic-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.wfep-basic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wfep-basic-row { display: grid; grid-template-columns: 1fr 240px; gap: 14px; align-items: start; }
.wfep-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.wfep-count { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.wfep-main { display: grid; grid-template-columns: 232px 1fr; gap: 12px; align-items: start; }
.wfep-side { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px; position: sticky; top: 8px; }
.wfep-item { display: flex; align-items: center; gap: 8px; padding: 9px 8px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: .15s; }
.wfep-item:hover { background: #FAF5EA; }
.wfep-item.on { background: #F0E0E4; border-color: #E0C0C8; }
.wfep-item-ico { width: 26px; height: 26px; flex: none; border-radius: 8px; background: #EFE7D8; color: #8A7C68; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.wfep-item.on .wfep-item-ico { background: var(--primary); color: #FDFBF6; }
.wfep-item-tt { flex: 1; min-width: 0; }
.wfep-item-tt b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfep-item-tt i { font-style: normal; font-size: 11px; color: var(--muted); }
.wfep-item-badge { font-size: 11px; background: #EFE7D8; color: #8A7C68; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.wfep-item-x { border: none; background: none; color: #C0B4A0; font-size: 12px; padding: 0 2px; }
.wfep-item-x:hover { color: var(--danger); }
.wfep-addstep { width: 100%; margin-top: 8px; border: 1px dashed var(--border); background: #FAF5EA; color: #8A7C68; border-radius: 9px; padding: 8px; font-size: 12.5px; }
.wfep-addstep:hover { border-color: var(--primary); color: var(--primary); background: #F0E0E4; }
.wfep-panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; min-height: 420px; overflow: hidden; }
.wfep-panel-head { display: flex; align-items: center; gap: 8px; padding: 11px 16px; background: #FAF5EA; border-bottom: 1px solid var(--border); }
.wfep-panel-head b { font-size: 14px; }
.wfep-ph-ico { width: 24px; height: 24px; border-radius: 7px; background: var(--primary); color: #FDFBF6; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wfep-ph-sub { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.wfep-panel-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.wfep-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wfep-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wfep-var { border: 1px solid #CBD9E8; background: #EFF6FF; color: #2E5C8A; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; }
.wfep-var:hover { background: #DCEAFB; border-color: #93B4D6; }
.wfep-outvars { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.wfep-ovar { display: grid; grid-template-columns: 1fr 2fr 30px; gap: 8px; align-items: center; }
.wfep-preview { margin-top: 8px; background: #FAF5EA; border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; font-size: 13px; line-height: 1.85; white-space: pre-wrap; color: #4A3E30; min-height: 90px; }

/* —— 执行页 3 栏 —— */
.wfx { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 0; }
.wfx-top { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px 12px 0 0; border-bottom: none; }
.wfx-ico-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: #FAF5EA; color: #6B5B45; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.wfx-ico-btn:hover { border-color: var(--primary); color: var(--primary); background: #F0E0E4; }
.wfx-top-tt { min-width: 0; }
.wfx-top-tt b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfx-top-tt i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.wfx-body { display: flex; flex: 1 1 auto; min-height: 0; background: var(--card); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.wfx-side { flex: 0 0 208px; border-right: 1px solid var(--border); overflow-y: auto; padding: 8px; background: #FAF5EA; }
.wfx.side-hidden .wfx-side { display: none; }
.wfx-side-head { font-size: 11.5px; font-weight: 700; color: #8A7C68; letter-spacing: .6px; padding: 4px 6px 8px; }
.wfx-side-list { display: flex; flex-direction: column; gap: 3px; }
.wfx-step { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.wfx-step:hover { background: #F2ECE1; }
.wfx-step.on { background: #F0E0E4; border-color: #E0C0C8; }
.wfx-step-n { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #E5DACA; color: #8A7C68; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.wfx-step.on .wfx-step-n { background: var(--primary); color: #FDFBF6; }
.wfx-step.done .wfx-step-n { background: var(--ok); color: #FDFBF6; }
.wfx-step-tt { flex: 1; min-width: 0; }
.wfx-step-tt b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wfx-step-tt i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.wfx-main { flex: 0 0 46%; overflow-y: auto; padding: 14px 16px; min-width: 0; }
.wfx-out { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: #F6F1E6; position: relative; padding: 0; }
.wfx-gutter { flex: 0 0 5px; background: linear-gradient(90deg, transparent 40%, #E3D8C2 40%, #E3D8C2 60%, transparent 60%); cursor: col-resize; }
.wfx-gutter:hover { background: linear-gradient(90deg, transparent 30%, var(--primary) 30%, var(--primary) 70%, transparent 70%); }
.wfx-main-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.wfx-main-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #FDFBF6; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.wfx-main-head b { font-size: 14.5px; }
.wfx-form { display: flex; flex-direction: column; gap: 12px; }
.wfx-step-intro { background: #EFF6FF; border: 1px solid #CBD9E8; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; color: #2E5C8A; line-height: 1.7; }
.wfx-noinput { background: #FAF5EA; border: 1px dashed var(--border); border-radius: 9px; padding: 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.wfx-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; }
.wfx-foot-info { font-size: 12px; color: var(--muted); }
.wfx-banner { margin: 0; border-radius: 0; border-left: none; border-right: none; }
.wfx-mini-btn { border: 1px solid var(--border); background: var(--card); color: #6B5B45; border-radius: 6px; padding: 1px 9px; font-size: 11.5px; }
.wfx-mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.wfx-out .wfe-r-head { padding: 9px 14px; background: #FAF5EA; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.wfx-out .wfe-r-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 14px; overflow-y: auto; }
.wfx-out .wf-run-out { flex: 1; min-height: 300px; }

@media (max-width: 1100px) {
  .wfep-basic-grid, .wfep-basic-row, .wfep-grid2 { grid-template-columns: 1fr; }
  .wfep-main { grid-template-columns: 1fr; }
  .wfep-side { position: static; }
  .wfx-body { flex-direction: column; }
  .wfx-gutter { display: none; }
  .wfx-side { flex: none; max-height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
  .wfx-main { flex: none; }
  .wfx-out { min-height: 320px; }
}
.wfx-code-tag { display: inline-flex; align-items: center; gap: 2px; border: 1px solid #B9D2EE; background: #EFF6FF; color: #2E5C8A; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-family: ui-monospace, Menlo, monospace; margin: 2px; }
.wfx-code-tag i { font-style: normal; color: #8FB0D6; font-size: 11px; padding-left: 3px; }
.wfx-code-tag:hover { background: #DCEAFB; border-color: #7FA8D4; }
.wfx-code-tag:hover i { color: #C4392C; }
.wfx-steps-fold { background: #FAF5EA; border: 1px solid var(--border); border-radius: 9px; padding: 0; }
.wfx-steps-fold summary { cursor: pointer; padding: 8px 12px; font-size: 12.5px; color: #6B5B45; user-select: none; }
.wfx-steps-fold[open] summary { border-bottom: 1px dashed var(--border); }
.wfx-steps-fold .wfp-stepbar { padding: 10px 12px 4px; }
.wfx-step-note { padding: 4px 12px 8px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.wfx-final { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.wfx-final-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.wfp-assoc-title { font-size: 13px; font-weight: 700; margin: 18px 0 10px; padding: 8px 12px; background: #EFF6FF; border: 1px solid #CBD9E8; border-radius: 9px; color: #2E5C8A; }
.wfx-form .wfe-assoc { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #FDFBF6; }
.wfx-form .wfe-assoc > b { font-size: 13.5px; color: var(--text); }
.wfx-form .wfe-assoc .hint { font-size: 11.5px; color: var(--muted); margin: 3px 0 8px; }

/* v20.7.2 工作流输入框：随字数自动增高 + 回车换行 */
textarea.wf-autofit { resize: none; overflow-y: hidden; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; line-height: 1.7; transition: height .08s ease-out; }

/* ============ v20.8.0 卷分组 / 章节概要 / 选区追问 ============ */
/* 卷分组 */
.bw-vol { margin: 6px 0 2px; }
.bw-vol-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #F7F1E3; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; user-select: none; }
.bw-vol-head:hover { background: #F2EAD5; }
.bw-vol-arrow { font-size: 11px; color: var(--muted); width: 14px; flex: none; }
.bw-vol-title { font-size: 13px; font-weight: 700; color: #6B5B45; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-vol-menu { display: flex; gap: 2px; flex: none; }
.bw-vol-menu button { border: none; background: transparent; cursor: pointer; font-size: 12px; color: var(--muted); padding: 2px 5px; border-radius: 5px; }
.bw-vol-menu button:hover { background: #E8DCC2; color: var(--text); }
.bw-vol-chs { padding: 2px 0 2px 12px; }
.bw-vol-empty { font-size: 12px; color: var(--muted); padding: 6px 8px; }
.vol-pick-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 260px; overflow: auto; }
.vol-pick-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.vol-pick-item:hover { background: #F7F1E3; }

/* 选区追问浮动菜单 */
.sq-menu { position: fixed; z-index: 3200; display: none; flex-direction: column; gap: 2px; background: #FFFDF8; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(80,60,30,.18); padding: 6px; min-width: 132px; }
.sq-menu button { border: none; background: transparent; text-align: left; cursor: pointer; font-size: 13px; padding: 7px 10px; border-radius: 7px; color: var(--text); white-space: nowrap; }
.sq-menu button:hover { background: #F5ECD9; }
.sq-menu button.sq-ask { color: #C4392C; font-weight: 700; }

/* 追问面板 */
.sq-panel { position: fixed; z-index: 3300; right: 18px; bottom: 18px; width: min(480px, calc(100vw - 36px)); max-height: min(640px, calc(100vh - 36px)); display: flex; flex-direction: column; background: #FFFDF8; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 44px rgba(80,60,30,.24); overflow: hidden; }
.sq-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #F7F1E3; }
.sq-head b { font-size: 14px; color: #6B5B45; flex: 1; }
.sq-model { font-size: 12px; color: var(--muted); cursor: pointer; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; background: #FFFDF8; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-model:hover { background: #F2EAD5; }
.sq-close { border: none; background: transparent; cursor: pointer; font-size: 15px; color: var(--muted); padding: 2px 6px; }
.sq-close:hover { color: var(--text); }
.sq-sel { padding: 8px 14px; font-size: 12.5px; color: #8A7C68; background: #FBF7EC; border-bottom: 1px dashed var(--border); max-height: 64px; overflow: auto; line-height: 1.6; }
.sq-body { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.sq-hint { font-size: 12.5px; color: var(--muted); }
.sq-out { white-space: pre-wrap; font-size: 13.5px; line-height: 1.8; background: #FFF; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; max-height: 260px; overflow: auto; }
.sq-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sq-inputrow { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); align-items: flex-end; }
.sq-input { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 13.5px; font-family: inherit; line-height: 1.6; background: #FFF; }
.sq-input:focus { outline: 2px solid #E4C99A; }
.sq-send { border: none; background: #C4392C; color: #FFF; border-radius: 9px; padding: 9px 16px; font-size: 13.5px; cursor: pointer; flex: none; }
.sq-send:hover { background: #A93125; }
.sq-send:disabled { opacity: .5; cursor: default; }
.sq-linkbar { display: flex; align-items: center; gap: 6px; padding: 8px 14px 10px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.sq-link { border: 1px solid var(--border); background: #FFFDF8; border-radius: 999px; font-size: 12px; padding: 4px 10px; cursor: pointer; color: #6B5B45; }
.sq-link:hover { background: #F5ECD9; }
.sq-picked { font-size: 12px; color: #C4392C; margin-left: auto; }

/* 关联选择弹窗 & 询问历史 */
.sq-pick-ov { position: fixed; inset: 0; z-index: 3400; background: rgba(60,45,25,.30); display: flex; align-items: center; justify-content: center; }
.sq-pick { width: min(520px, calc(100vw - 40px)); max-height: min(600px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #FFFDF8; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.sq-pick-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #F7F1E3; }
.sq-pick-head b { flex: 1; font-size: 14px; color: #6B5B45; }
.sq-pick-body { flex: 1; overflow: auto; padding: 10px 16px; }
.sq-pick-grp { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 0 6px; }
.sq-pick-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 13.5px; }
.sq-pick-item:hover { background: #F7F1E3; }
.sq-pick-item em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.sq-pick-empty { font-size: 12.5px; color: var(--muted); padding: 12px 0; text-align: center; }
.sq-pick-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }
.sq-hist-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.sq-hist-q { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.6; }
.sq-hist-q em { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sq-hist-a { font-size: 12.5px; color: #5C5245; line-height: 1.7; margin: 6px 0 8px; white-space: pre-wrap; }

/* ============ v20.8.1 拖拽排序 + 追问大面板 ============ */
.bw-ch-item[draggable="true"] { cursor: grab; }
.bw-ch-item.dragging { opacity: .45; }
.bw-ch-item.drag-over, .bw-vol-head.drag-over { outline: 2px dashed #C4392C; outline-offset: -2px; background: #FBEDE9; }
.bw-vol-chs.drag-over { outline: 2px dashed #C4392C; outline-offset: -2px; border-radius: 8px; }

/* 追问大抽屉（星月式全尺寸对话面板） */
.sq-drawer { position: fixed; z-index: 3300; right: 16px; bottom: 16px; width: min(680px, calc(100vw - 32px)); height: min(78vh, 760px); display: flex; flex-direction: column; background: #FFFDF8; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 56px rgba(80,60,30,.28); overflow: hidden; animation: sqd-in .18s ease-out; }
@keyframes sqd-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.sqd-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(#F7F1E3, #F3EAD6); }
.sqd-head b { font-size: 15px; color: #6B5B45; flex: 1; }
.sqd-hist { border: 1px solid var(--border); background: #FFFDF8; border-radius: 8px; font-size: 13px; padding: 4px 8px; cursor: pointer; }
.sqd-hist:hover { background: #F2EAD5; }
.sqd-sel { padding: 9px 16px; font-size: 12.5px; color: #8A7C68; background: #FBF7EC; border-bottom: 1px dashed var(--border); line-height: 1.7; }
.sqd-sel-tag { display: inline-block; background: #C4392C; color: #FFF; font-size: 11px; border-radius: 999px; padding: 1px 8px; margin-right: 8px; }
.sqd-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: #FFFEFA; }
.sqd-empty { margin: auto; text-align: center; font-size: 13.5px; color: var(--muted); line-height: 2; max-width: 420px; }
.sqd-turn { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #FFF; }
.sqd-q { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; background: #F7F1E3; font-size: 13.5px; }
.sqd-q b { flex: none; color: #C4392C; font-size: 12px; border: 1px solid #E3C4BE; border-radius: 6px; padding: 0 6px; }
.sqd-q span { flex: 1; line-height: 1.7; word-break: break-word; }
.sqd-q em { flex: none; font-style: normal; font-size: 11px; color: var(--muted); }
.sqd-a { display: flex; gap: 10px; padding: 12px 14px; }
.sqd-a b { flex: none; color: #4A6741; font-size: 12px; border: 1px solid #C4D4BC; border-radius: 6px; padding: 0 6px; height: fit-content; }
.sqd-a-txt { flex: 1; font-size: 13.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.sqd-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 16px 6px; border-top: 1px solid var(--border); background: #FBF7EC; }
.sqd-quick-tag { font-size: 11.5px; color: var(--muted); flex: none; }
.sqd-qbtn { border: 1px solid var(--border); background: #FFFDF8; border-radius: 999px; font-size: 12px; padding: 4px 11px; cursor: pointer; color: #6B5B45; }
.sqd-qbtn:hover { background: #F2EAD5; border-color: #C4392C; color: #C4392C; }
.sqd-linkrow { display: flex; align-items: center; gap: 6px; padding: 6px 16px; border-top: 1px dashed var(--border); }
.sqd-linkrow .sq-picked { margin-left: auto; font-size: 12px; color: #C4392C; }
.sqd-inputrow { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); align-items: flex-end; background: #FFFDF8; }
.sqd-sendstyle { flex: none; width: 36px; height: 36px; border: 1px solid var(--border); background: #FFFDF8; border-radius: 9px; cursor: pointer; font-size: 15px; color: #6B5B45; }
.sqd-sendstyle:hover { background: #F2EAD5; }
.sqd-inputrow .sq-input { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; font-family: inherit; line-height: 1.6; background: #FFF; max-height: 110px; }
.sqd-inputrow .sq-input:focus { outline: 2px solid #E4C99A; }

/* ============ v20.8.2 追问面板：模型快捷菜单 / 可拖动 / 快捷提问管理 ============ */
.sqd-model { cursor: pointer; user-select: none; }
.sqd-model:hover { background: #F2EAD5; border-color: #C4392C; color: #C4392C; }
.sqd-mm-wrap { position: absolute; z-index: 20; top: 52px; right: 14px; width: min(420px, calc(100vw - 40px)); background: #FFFDF8; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 36px rgba(80,60,30,.22); padding: 12px; max-height: 70vh; overflow: auto; }
.sqd-mm-sec { margin-bottom: 12px; }
.sqd-mm-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.sqd-mm-auto { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; cursor: pointer; }
.sqd-mm-models { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; }
.sqd-mm-m { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: #FFF; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 13px; text-align: left; }
.sqd-mm-m:hover { background: #F5ECD9; }
.sqd-mm-m.on { border-color: #C4392C; background: #FBEDE9; color: #C4392C; font-weight: 700; }
.sqd-mm-m em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); }
.sqd-mm-opts { display: flex; gap: 5px; flex-wrap: wrap; }
.sqd-mm-o { border: 1px solid var(--border); background: #FFF; border-radius: 999px; font-size: 12px; padding: 4px 11px; cursor: pointer; color: #6B5B45; }
.sqd-mm-o:hover { background: #F5ECD9; }
.sqd-mm-o.on { background: #C4392C; border-color: #C4392C; color: #FFF; }
.sqd-mm-empty { font-size: 12.5px; color: var(--muted); line-height: 1.8; padding: 8px 4px; }
.sqd-mm-foot { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px dashed var(--border); padding-top: 10px; }
/* 快捷提问管理 */
.sq-qm-item { display: flex; gap: 8px; align-items: center; }
.sq-qm-item .sq-qm-input { flex: 1; }
.sqd-qbtn.sqd-qcfg { border-style: dashed; color: var(--muted); }
.sqd-qbtn.sqd-qcfg:hover { color: #C4392C; }
.sq-drawer.dragging { opacity: .96; }
.sqd-mm-keys { display: flex; flex-direction: column; gap: 6px; }
.sqd-mm-key { display: flex; align-items: center; gap: 6px; }
.sqd-mm-key-name { flex: none; width: 96px; font-size: 12px; color: #6B5B45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sqd-mm-key-inp { flex: 1; height: 30px; font-size: 12.5px; padding: 4px 8px; }
.sqd-mm-key-save, .sqd-mm-key-test { flex: none; padding: 4px 9px; font-size: 12px; }


/* 20.9.0 —— 追问面板：已保存密钥的站点状态行（只读，无输入框） */
.sqd-mm-key-ok { align-items: center; }
.sqd-mm-key-ok .sqd-mm-key-status {
  flex: 1;
  text-align: right;
  font-size: 12px;
  color: #1a7f37;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* v20.8.0 后台：操作统计 + 全站数据 */
.adm-action-row { display: grid; grid-template-columns: 160px 1fr 60px; gap: 10px; align-items: center; margin-bottom: 8px; }
.adm-action-cat { font-size: 13px; font-weight: 600; }
.adm-action-bar { height: 12px; background: #EFE7D8; border-radius: 6px; overflow: hidden; }
.adm-action-bar i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.adm-action-num { text-align: right; font-size: 13px; font-weight: 700; color: var(--primary); }
.adm-data-row { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; overflow: hidden; }
.adm-data-row-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #FAF5EA; font-size: 13px; }
.adm-data-row-head b { color: var(--primary); }
.adm-data-body { padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; }
.adm-user-link { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; padding: 0; }
.adm-user-link:hover { text-decoration: underline; }

/* v20.10.4 工作流编辑页：可用变量面板（点击复制/插入） */
.wfep-vars-panel { background: #F4F8FF; border: 1px solid #CBD9E8; border-radius: 10px; padding: 10px 12px; margin: 4px 0; }
.wfep-vars-title { color: #2E5C8A; font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wfep-vars-title span { font-weight: 400; font-size: 11.5px; color: #6B8CB0; }
/* v20.16.4 一键复制全部变量按钮（挂在可用变量标题行右侧） */
.wfep-copyall { margin-left: auto; border: 1px solid #93B4D6; background: #FFF; color: #2563EB; border-radius: 6px; padding: 2px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wfep-copyall:hover { background: #E8F1FF; border-color: #2563EB; }
.wfep-copyall:active { transform: scale(.97); }
.wfep-vars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 10px; }
.wfep-varpill { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.wfep-varcode { border: none; background: #2563EB; color: #FFF; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; border-radius: 6px; padding: 3px 8px; cursor: pointer; white-space: nowrap; }
.wfep-varcode:hover { background: #1D4ED8; }
.wfep-vardesc { background: #FFF; border: 1px solid #D6E2F0; border-radius: 6px; color: #5A6C80; font-size: 11px; padding: 3px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   v20.13.0 —— 「我收藏的提示词」分区
   1) 收藏库卡片更紧凑（约原来 2/3），一屏能看更多条
   2) 右上角收藏按钮做成带底色的胶囊，一眼能点
   3) 收藏库分区头 / 加载更多 / 失效卡片样式
   ============================================================ */

/* —— 收藏库网格：列宽 200px（原来 300px），卡片按比例缩小 —— */
.prompt-list-fav { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }

/* —— 紧凑卡片：内边距、字号、正文高度整体缩到约 2/3 —— */
.prompt-card.p-card-fav { padding: 12px 13px; border-radius: 10px; }
.prompt-card.p-card-fav .p-tags { gap: 4px; margin-bottom: 6px; padding-left: 0; padding-right: 22px; }
.prompt-card.p-card-fav .p-tag { font-size: 10px; padding: 1px 7px; }
.prompt-card.p-card-fav h4 { font-size: 13.5px; margin-bottom: 4px; line-height: 1.45; }
/* 紧凑卡片标题最多两行，超出省略 */
.prompt-card.p-card-fav h4 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-card.p-card-fav .p-author { margin: 5px 0 6px; padding: 3px 9px 3px 4px; font-size: 11px; gap: 6px; }
.prompt-card.p-card-fav .p-author .p-author-ava { width: 19px; height: 19px; font-size: 10.5px; }
.prompt-card.p-card-fav .p-author .p-author-sub { font-size: 10.5px; }
.prompt-card.p-card-fav .p-body.p-intro { font-size: 12px; padding: 6px 8px; max-height: 66px; overflow: hidden; }
.prompt-card.p-card-fav .p-hidden-tip { margin-top: 5px; font-size: 10.5px; padding: 4px 8px; line-height: 1.5; }
.prompt-card.p-card-fav .p-meta { gap: 4px; margin: 5px 0 2px; }
.prompt-card.p-card-fav .p-meta-item { font-size: 9.5px; padding: 1px 5px; }
.prompt-card.p-card-fav .p-meta-hint { font-size: 9.5px; }
.prompt-card.p-card-fav .p-act { gap: 4px; margin-top: 8px; }
.prompt-card.p-card-fav .p-act .btn { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }

/* —— 右上角收藏按钮：胶囊底色，可点感更强 —— */
.prompt-card .p-fav {
  background: #FBF3E2; border: 1px solid #EFE2C8; font-size: 16px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  top: 8px; right: 9px;
}
.prompt-card .p-fav:hover { background: #F6E8CC; border-color: #E4D2AE; color: #D9891F; transform: scale(1.08); }
.prompt-card .p-fav.on { background: #FBF3E2; border-color: #E8A33D; color: #E8A33D; }
/* 紧凑卡片里的收藏按钮跟着缩一点 */
.prompt-card.p-card-fav .p-fav { width: 22px; height: 22px; font-size: 14px; top: 6px; right: 7px; }

/* —— 收藏库分区头 —— */
.p-lib-head-fav h3 { color: #B87A18; }
.p-lib-head-fav h3::before { content: ''; }
.p-lib-head-fav { border-top: 1px dashed var(--border); padding-top: 18px; }
/* 「已收藏」标签页下：只留收藏库，其余分区隐藏 */
.p-lib-hide { display: none !important; }

/* —— 加载更多 —— */
.p-fav-more { display: flex; justify-content: center; margin: 14px 0 4px; }

/* —— 失效收藏卡片（来源取消公开/授权到期/已删除）—— */
.prompt-card.p-card-lost { border-style: dashed; opacity: .82; background: #FBF8F1; }
.prompt-card.p-card-lost .p-lost-tip { background: #F6E4E0; color: #A23126; }

/* ============================================================
   v20.14.0 全宽布局层（fullwidth layer）
   目标：所有板块横向铺满可用宽度，减少纵向滚动。
   策略：整段追加在文件末尾，靠层叠顺序覆盖旧规则；
        仅放宽容器 max-width，不改配色/组件内部结构；
        小屏（<=980px）全部保持原响应式行为，本层不生效。
   ============================================================ */

/* ---- 1. 主内容容器：从 1200px 放开到几乎全宽 ---- */
@media (min-width: 981px) {
  .page { max-width: none; padding-left: 26px; padding-right: 26px; }

  /* 超宽屏（>=1720px）留一点呼吸边，避免文字行长失控 */
  @media (min-width: 1721px) {
    .page { max-width: 1660px; margin: 0 auto; }
  }
}

/* ---- 2. 顶栏与公告：跟随内容铺满 ---- */
@media (min-width: 981px) {
  .notice { max-width: none; width: calc(100% - 52px); }
}

/* ---- 3. 设置 / API 中转站：表单容器加宽 ---- */
@media (min-width: 981px) {
  .settings-wrap { max-width: none; }
  /* api-view.js 内联 max-width:960px，用 !important 盖掉 */
  .settings-wrap[style*="max-width"] { max-width: none !important; }
}

/* ---- 4. 工作流输入/运行外层容器（原 860px）---- */
@media (min-width: 981px) {
  .wfp { max-width: 920px; margin: 0 auto; }
}

/* ---- 5. 生成器工作台弹窗：放宽到 94vw，左右留 3vw ---- */
@media (min-width: 1181px) {
  .modal-box.modal-wide { width: 94vw; }
  .gen-modal { width: 100%; }
}
@media (min-width: 1721px) {
  .modal-box.modal-wide { width: 1660px; }
}

/* ---- 6. 首页落地页（hero / stats / section）适度放宽 ---- */
@media (min-width: 1181px) {
  .stats { max-width: 1240px; }
  .section { max-width: 1280px; }
}

/* ---- 7. 各列表网格：卡片自适应填满，行高更紧凑 ---- */
@media (min-width: 981px) {
  .tbx-grid { gap: 12px; }
  .book-grid, .bk-grid { gap: 12px; }
  .kc-grid { gap: 10px; }
  .mk-grid { gap: 10px; }
  .prompt-list { gap: 12px; }
  .prompt-list-fav { gap: 10px; }
  .api-grid { gap: 10px; }
  .memo-grid { gap: 10px; }
}

/* ---- 8. 双栏工作区并排拉开（减少向下滚动）---- */
@media (min-width: 1441px) {
  .api-lower { grid-template-columns: 1.1fr 1fr; gap: 16px; }
  .wf-designer { grid-template-columns: 1.1fr 1fr; gap: 16px; }
}

/* ---- 10. 右侧抽屉阅读容器（例文阅读等）：适度加宽 ---- */
@media (min-width: 1181px) {
  #modal-root.drawer .modal-box.modal-drawer { width: min(720px, 60vw); }
}

/* ---- 11. 站长后台表格列宽随全宽容器自适应 ---- */
@media (min-width: 1181px) {
  .adm-table td.ell { max-width: 420px; }
}

/* ---- 12. 工作流编辑页两栏拉开（wfep-main 原为 232px+1fr）---- */
@media (min-width: 1441px) {
  .wfep-main { grid-template-columns: 260px 1fr; gap: 16px; }
  .wfep-basic-row { grid-template-columns: 1fr 300px; }
}

/* ---- 13. 长文阅读类容器保持可读行长（不放开）----
   .tool-runner(860px)、mk-detail-intro 弹窗、导出预览等仍按原宽；
   站长后台 adm-table 已是 width:100%，随容器自动铺满。 */
/* hotfix watch test 20261204 */

/* ============================================================
   v20.16.1 提示词卡片统一尺寸层（240px 紧凑小卡版）
   修正（2026-12-04）：上一版 v20.16.0 把收藏库小卡放大成普通大卡，
   方向搞反了。本版按需求统一为小卡：四个分区（我的 / 我收藏的 /
   授权给我的 / 他人公开）全部 240px 网格 + 紧凑字号 + 固定高度，
   作者端与用户端看到的是同一种卡片。回滚删掉本层即可。
   ============================================================ */

/* ---- 1. 四个分区统一 240px 紧凑网格 ---- */
.prompt-list,
.prompt-list-fav { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

/* ---- 2. 卡片：紧凑尺寸 + 固定高度，按钮行钉在底部 ---- */
.prompt-card { display: flex; flex-direction: column; height: 330px; overflow: hidden; padding: 12px 13px; border-radius: 10px; }
.prompt-card .p-act { margin-top: auto; gap: 4px; }

/* ---- 3. 全部卡片一律紧凑字号（原收藏库小卡样式推广到所有分区）---- */
.prompt-card .p-tags { gap: 4px; margin-bottom: 6px; padding-left: 22px; padding-right: 24px; max-height: 38px; overflow: hidden; }
.prompt-card .p-tag { font-size: 10px; padding: 1px 7px; }
.prompt-card h4 { font-size: 13.5px; line-height: 1.45; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.prompt-card .p-author { margin: 5px 0 6px; padding: 3px 9px 3px 4px; font-size: 11px; gap: 6px; }
.prompt-card .p-author .p-author-ava { width: 19px; height: 19px; font-size: 10.5px; }
.prompt-card .p-author .p-author-sub { font-size: 10.5px; }
.prompt-card .p-body.p-intro { font-size: 12px; padding: 6px 8px; line-height: 17px; height: 46px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.prompt-card .p-hidden-tip { margin-top: 5px; font-size: 10.5px; padding: 4px 8px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-card .p-meta { gap: 4px; margin: 5px 0 2px; max-height: 34px; overflow: hidden; }
.prompt-card .p-meta-item { font-size: 9.5px; padding: 1px 5px; }
.prompt-card .p-meta-hint { font-size: 9.5px; }
.prompt-card .p-act .btn { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }
.prompt-card .p-fav { width: 22px; height: 22px; font-size: 14px; top: 6px; right: 7px; }

/* ============ 20.17.0 AI 面板提示词：分类加载 + 星月式（快捷选项/自定义/更多） ============ */
.ap-prompt-tabs { margin-bottom: 6px; }
.ap-prompt-tabs .ap-mode-pill { padding: 3px 10px; font-size: 11.5px; }
.ap-more-pill { border-color: #E8CDD4; color: var(--primary-deep); background: #FBF4F3; }
.ap-more-pill:hover { background: #F6EBE9; }
.ap-custom-ta { min-height: 88px; font-size: 12.5px; }
/* 「更多」全库搜索弹窗 */
.ap-pick-more { width: min(720px, 94vw); }
.ap-pm-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; flex: none; }
.ap-sf { border: 1px solid var(--border); background: #FDFBF6; color: #443B2E; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; cursor: pointer; }
.ap-sf:hover { background: #F6F1E6; border-color: #D8CBAC; }
.ap-sf.on { background: var(--primary); border-color: var(--primary); color: #FDFBF6; font-weight: 600; }
.ap-pm-from { font-style: normal; font-size: 10.5px; color: var(--primary-deep); margin-left: 6px; }
.ap-pick-more .ap-pk-title { display: flex; align-items: center; flex-wrap: wrap; }
.ap-pick-more .ap-pk-sub { margin-left: auto; max-width: 46%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 悬浮面板风格搜索 */
.sq-pick-tools { display: flex; gap: 6px; padding: 10px 14px 4px; }
.sq-pick-tools .ap-pick-search { flex: 1; font-size: 12.5px; padding: 6px 10px; }

/* ============================================================
   v20.20.0 提示词库：星月式紧凑卡片 + 底部悬浮批量条
   配合 js/views.js 的 20.20.0：
   1) 卡片重排为「标题 → 作者·日期·热度 → 两行简介 → 标签 → 操作」，
      去掉固定 330px 高度和层层底色块，高度随内容自适应；
   2) 批量条固定悬浮在屏幕底部中央，滚到任何分区都能就地操作；
   3) 分区标题 / 筛选 / 空状态的间距收紧。
   本层只作用于 .p-lib（提示词库页），不影响其他页面；回滚删掉本层即可。
   ============================================================ */

/* ---- 1. 页面节奏 ---- */
.p-lib { transition: padding-bottom .15s ease; }
.p-lib.p-has-batch { padding-bottom: 76px; }   /* 给底部悬浮条让位，最后一行卡片不被挡住 */
.p-lib .main-head { margin-bottom: 14px; }
.p-lib .pfilter { margin-bottom: 10px; }
.p-lib .pfilter-type { margin-bottom: 8px; }
.p-lib .ptabs { margin-bottom: 10px; }
.p-lib .p-lib-head { margin: 18px 0 10px; flex-wrap: wrap; row-gap: 2px; }
.p-lib .p-lib-head h3 { font-size: 16px; }
.p-lib .p-lib-head-fav { padding-top: 12px; }
.p-lib .empty.p-lib-empty { padding: 2px 2px 4px; font-size: 12.5px; text-align: left; color: #A79A83; }
.p-lib .p-fav-more { margin: 10px 0 2px; }

/* ---- 2. 网格：列宽 250px，一行能放更多张 ---- */
.p-lib .prompt-list,
.p-lib .prompt-list-fav { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

/* ---- 3. 卡片：高度随内容，不再固定 330px ---- */
.p-lib .prompt-card { height: auto; min-height: 0; padding: 11px 12px 10px; border-radius: 10px; }

/* 标题：顶部两行以内，左右给勾选框和收藏星标让位 */
.p-lib .prompt-card h4 {
  font-size: 14px; line-height: 1.4; margin: 0 0 6px; min-height: 0;
  padding: 0 28px 0 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-lib .prompt-card .p-check { top: 9px; left: 10px; display: flex; align-items: center; }
.p-lib .prompt-card .p-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.p-lib .prompt-card .p-fav { top: 7px; right: 8px; }

/* 作者行：头像 + 作者 · 日期 + 热度，一行排开，不套底色胶囊 */
.p-lib .prompt-card .p-author {
  display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 0;
  background: none; border-radius: 0; font-size: 12px; color: var(--muted); min-width: 0;
}
.p-lib .prompt-card .p-author .p-author-ava { width: 20px; height: 20px; font-size: 11px; }
.p-lib .prompt-card .p-author .p-author-name {
  font-weight: 600; color: var(--text); font-size: 12.5px; max-width: 45%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.p-lib .prompt-card .p-author .p-author-sub { font-size: 11.5px; white-space: nowrap; }
.p-lib .prompt-card .p-author .p-author-hot { margin-left: auto; font-size: 11.5px; color: #C96A1B; white-space: nowrap; }

/* 简介：两行省略，纯文字无底色 */
.p-lib .prompt-card .p-body.p-intro {
  font-size: 12.5px; line-height: 1.55; color: #6B5D4A; background: none; padding: 0; margin-bottom: 7px;
  height: auto; max-height: none; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-lib .prompt-card .p-intro-empty { color: #B8AC95; }

/* 标签 / 元信息 / 操作 */
.p-lib .prompt-card .p-tags { gap: 5px; margin: 0 0 5px; padding: 0; max-height: none; overflow: visible; }
.p-lib .prompt-card .p-tag { font-size: 10.5px; padding: 1px 8px; line-height: 1.5; }
.p-lib .prompt-card .p-hidden-tip { margin: 0 0 6px; font-size: 11px; padding: 4px 8px; white-space: normal; }
.p-lib .prompt-card .p-meta { gap: 5px; margin: 0 0 2px; max-height: 40px; }
.p-lib .prompt-card .p-meta-item { font-size: 10px; padding: 1px 5px; }
.p-lib .prompt-card .p-meta-hint { font-size: 10.5px; max-width: 100%; }
.p-lib .prompt-card .p-act { margin-top: auto; padding-top: 7px; gap: 4px; }
.p-lib .prompt-card .p-act .btn { padding: 3px 8px; font-size: 11.5px; border-radius: 7px; }   /* 自己写的 5 个按钮也能排成一行 */

/* ---- 4. 批量条：固定悬浮在屏幕底部中央 ---- */
.p-lib .batch-bar {
  position: fixed; top: auto; left: 50%; bottom: 26px; transform: translateX(-50%);   /* top:auto 盖掉旧规则的 top:0，否则会被上下同时拉伸 */
  z-index: 998; margin: 0; padding: 8px 10px 8px 16px; border-radius: 999px;
  flex-wrap: wrap; justify-content: center; gap: 6px;
  max-width: calc(100vw - 32px);
  background: #FFFDF8; border: 1px solid #E8CDD4;
  box-shadow: 0 12px 32px rgba(110, 60, 30, 0.22);
  color: var(--text); font-size: 12.5px;
  animation: pBatchIn .18s ease-out;
}
.p-lib .batch-bar .batch-count { color: var(--primary-deep); font-weight: 600; white-space: nowrap; margin-right: 4px; }
.p-lib .batch-bar.busy { pointer-events: none; opacity: .6; }
@keyframes pBatchIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) {
  .p-lib .batch-bar { bottom: 14px; border-radius: 16px; justify-content: flex-start; }
}

/* ============ 20.19.0 邀请码门禁：登录页邀请码提示 + 站长后台「邀请码」页 ============ */
.inv-hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.inv-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.inv-stats { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.inv-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; letter-spacing: 1.5px; }
.inv-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.inv-fresh { background: #FFF; border: 1px dashed #D9C9A8; border-radius: 10px; padding: 12px 14px; margin-top: 4px; }
.inv-fresh-title { font-size: 12.5px; color: #574C3E; font-weight: 600; margin-bottom: 10px; }
.inv-fresh-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 8px; background: #FCFAF3; border: 1px solid #F1E8D6; }
.inv-chip .inv-code { font-size: 13.5px; letter-spacing: 1px; }
.adm-table tr.inv-row-fresh td { background: #FFFDF4; }

/* ============ 站长邀请注册抽屉（2026-12-05） ============ */
.invite-hero { background: linear-gradient(135deg, #F7E8DC 0%, #F2E3E4 100%); border: 1px solid #E9D8C4; border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.invite-hero-title { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: .5px; margin-bottom: 6px; }
.invite-hero-sub { font-size: 12.5px; color: #6F6353; line-height: 1.7; }
.invite-hero-sub b { color: var(--primary); }
.invite-list { display: flex; flex-direction: column; gap: 10px; }
.invite-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); text-decoration: none; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.invite-item:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(196, 57, 44, .12); transform: translateY(-1px); }
.invite-no { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.invite-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.invite-name { font-size: 14px; font-weight: 700; color: var(--text); }
.invite-desc { font-size: 12px; color: var(--muted); }
.invite-url { font-size: 11px; color: #A39B8B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-go { flex: none; font-size: 12px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.invite-item:hover .invite-go { text-decoration: underline; }
