:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #292724;
  background: #f7f6f2;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
.page { min-height: 100vh; padding: 28px 16px 64px; }
.shell { width: min(1280px, 100%); margin: 0 auto; }
.hero { margin-bottom: 20px; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(26px, 4vw, 38px); }
.hero p { margin: 0; color: #6f6a64; max-width: 920px; line-height: 1.7; }
.eyebrow { font-size: 13px; letter-spacing: .05em; color: #7d7468; }
.card { margin-top: 18px; background: #fff; border: 1px solid #e9e5de; border-radius: 14px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,.035); }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.api-card { padding-top: 16px; padding-bottom: 16px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 7px; color: #55504b; }
input, textarea, select { width: 100%; border: 1px solid #d9d4cd; border-radius: 10px; padding: 11px 12px; background: #fff; outline: none; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: #7c746c; box-shadow: 0 0 0 3px rgba(124,116,108,.09); }
input:disabled, textarea:disabled, select:disabled { background: #f7f6f3; color: #5d5954; }
textarea { resize: vertical; }
button { border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; transition: .18s ease; }
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.primary { background: #292725; color: #fff; }
.secondary { background: #6f675f; color: #fff; }
.ghost { background: #efede9; color: #4c4844; }
.danger-ghost { background: #f5eeee; color: #824949; }
.inline-row, .button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-row input { flex: 1; min-width: 280px; }
.button-row { margin-top: 12px; }
.muted { color: #77716a; font-size: 13px; }
.status { margin-top: 8px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 18px; }
.step { background: #ece9e4; border-radius: 999px; padding: 8px 10px; text-align: center; color: #77716a; font-size: 12px; white-space: nowrap; }
.step span { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; background: #d8d3cc; margin-right: 4px; }
.step.active { background: #ded9d1; color: #2c2926; font-weight: 700; }
.step.done { background: #e4eee8; color: #315f43; }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.65; margin: 12px 0; }
.notice.info { background: #eef3f7; color: #38556b; }
.notice.success { background: #edf6ef; color: #2f6741; }
.progress-pill { background: #f0eee9; border-radius: 999px; padding: 7px 12px; font-size: 13px; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.summary-grid > div { background: #faf9f7; border: 1px solid #eeeae4; border-radius: 10px; padding: 12px; }
.summary-grid span { display: block; font-size: 12px; color: #77716a; margin-bottom: 5px; }
.summary-grid strong { font-size: 14px; line-height: 1.6; }
.day-list { display: grid; gap: 14px; }
.day-card { border: 1px solid #e8e4dd; border-radius: 13px; padding: 16px; background: #fff; }
.day-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.day-card-head b { font-size: 16px; }
.version { margin-left: 8px; font-size: 12px; color: #837c74; font-weight: 400; }
.status-badge { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: 12px; }
.status-badge.pending { background: #f3eee5; color: #80652c; }
.status-badge.approved { background: #e6f2e9; color: #2e6b43; }
.strategy-editor-grid, .editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.strategy-editor-grid label:nth-child(n+4), .editor-grid > div:nth-child(4), .editor-grid > div:nth-child(5) { grid-column: 1 / -1; }
.day-review-area { margin-top: 8px; border-top: 1px dashed #e5e0d8; padding-top: 8px; }
.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.day-tab { min-width: 105px; background: #efede9; color: #514c47; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.day-tab small { opacity: .7; }
.day-tab.active { background: #292725; color: #fff; }
.day-tab.approved:not(.active) { background: #e5f0e8; color: #326044; }
.day-tab.pending:not(.active) { background: #f5efe4; color: #765d2f; }
.content-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eeeae4; border-bottom: 1px solid #eeeae4; }
.content-toolbar > div { display: flex; gap: 9px; align-items: center; }
.empty-state { margin-top: 14px; padding: 28px; border: 1px dashed #dcd6ce; border-radius: 12px; text-align: center; color: #807971; background: #fbfaf8; }
.meta-line { margin: 12px 0 2px; }
.review-panel { margin-top: 16px; padding-top: 12px; border-top: 1px solid #eeeae4; }
.final-list { display: grid; gap: 8px; margin-top: 12px; }
.final-item { display: grid; grid-template-columns: 70px 1fr 50px; gap: 12px; align-items: center; padding: 10px 12px; background: #faf9f7; border-radius: 9px; }
.final-item small { color: #837c74; text-align: right; }
.hidden { display: none !important; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(460px, calc(100vw - 32px)); background: #2d2a27; color: #fff; padding: 12px 15px; border-radius: 10px; box-shadow: 0 10px 35px rgba(0,0,0,.16); z-index: 20; line-height: 1.5; }
.toast.error { background: #7d2d2d; }

@media (max-width: 900px) {
  .page { padding: 18px 10px 40px; }
  .steps { overflow-x: auto; display: flex; padding-bottom: 4px; }
  .step { min-width: 145px; }
  .inline-row { align-items: stretch; flex-direction: column; }
  .inline-row input { min-width: 0; }
  .summary-grid, .strategy-editor-grid, .editor-grid { grid-template-columns: 1fr; }
  .strategy-editor-grid label, .editor-grid > div { grid-column: auto !important; }
  .card { padding: 16px; }
  .section-head, .content-toolbar { align-items: stretch; flex-direction: column; }
  .final-item { grid-template-columns: 58px 1fr 42px; }
}

/* v0.4.1 · Kimi stream progress */
.notice.error { background: #f9ecec; color: #7b3030; border: 1px solid #ecd2d2; white-space: pre-wrap; }
.generation-progress { margin: 14px 0; padding: 14px; border: 1px solid #e1ddd6; border-radius: 12px; background: #faf9f7; }
.generation-progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.generation-progress-head > div { display: flex; align-items: center; gap: 10px; }
.generation-progress-head span { color: #77716a; font-size: 12px; }
.generation-progress-head small { color: #8a837b; line-height: 1.5; text-align: right; }
.generation-progress-track { width: 100%; height: 10px; overflow: hidden; border-radius: 999px; background: #e9e5de; }
.generation-progress-bar { width: 0%; height: 100%; border-radius: inherit; background: #6f675f; transition: width .3s ease; position: relative; }
.generation-progress-bar.indeterminate { width: 28%; animation: kimi-indeterminate 1.25s ease-in-out infinite alternate; }
@keyframes kimi-indeterminate { from { margin-left: 0; } to { margin-left: 72%; } }
#kimiProgressDetail { margin-top: 8px; line-height: 1.55; }
@media (max-width: 900px) {
  .generation-progress-head { flex-direction: column; }
  .generation-progress-head small { text-align: left; }
}

/* v0.5.0 workbench */
.workbench-nav{position:sticky;top:0;z-index:20;display:flex;gap:10px;padding:12px;background:rgba(255,255,255,.9);backdrop-filter:blur(8px);border-radius:16px;margin-bottom:16px}
.workbench-nav button{cursor:pointer;transition:.25s transform,.25s box-shadow}
.workbench-nav button:hover{transform:translateY(-2px)}
.workbench-hidden{display:none!important}
.workbench-show{animation:workbenchFade .28s ease}
@keyframes workbenchFade{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:none}}

/* v0.5.1 page workspace */
.workbench-page{min-height:calc(100vh - 160px);}
.workbench-nav{position:sticky;top:12px;box-shadow:0 8px 24px rgba(0,0,0,.05);}
.workbench-nav button.active{background:#292725;color:#fff;}
.workbench-show{animation:pageIn .35s cubic-bezier(.2,.8,.2,1);}
@keyframes pageIn{from{opacity:0;transform:translateY(12px) scale(.995)}to{opacity:1;transform:none}}
@media(max-width:900px){.workbench-nav{overflow-x:auto;flex-wrap:nowrap}.workbench-nav button{white-space:nowrap}.workbench-page{min-height:auto}}


/* v0.5.2 workflow status center */
.workflow-panel{display:flex;gap:10px;align-items:stretch;margin:0 0 16px;padding:14px;background:#fff;border:1px solid #e9e5de;border-radius:16px;box-shadow:0 4px 18px rgba(0,0,0,.03);overflow-x:auto;}
.workflow-title{font-size:13px;font-weight:700;display:flex;align-items:center;white-space:nowrap;color:#55504b;margin-right:8px;}
.workflow-item{display:flex;align-items:center;gap:8px;min-width:150px;padding:10px 12px;border-radius:12px;background:#faf9f7;border:1px solid #eeeae4;transition:.25s ease;}
.workflow-item span{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#ded9d1;font-size:12px;font-weight:700;}
.workflow-item div{display:flex;flex-direction:column;}
.workflow-item small{font-size:12px;color:#77716a;margin-top:2px;}
.workflow-item.active{border-color:#292725;transform:translateY(-2px);}
.workflow-item.active span{background:#292725;color:#fff;}
.workflow-item.done{background:#edf6ef;border-color:#d7eadc;}
.workflow-item.done span{background:#4f7d5d;color:#fff;}
@media(max-width:900px){.workflow-panel{margin-bottom:12px}.workflow-item{min-width:138px}}

/* v0.5.3: true multi-page workflow */
.workbench-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.workbench-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line, #e5e7eb);
  background: rgba(255,255,255,.82);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.workbench-nav a:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.workbench-nav a.active { background: #111827; color: #fff; border-color: #111827; }

.workflow-item { text-decoration: none; color: inherit; }
.workflow-item.current { outline: 2px solid rgba(17,24,39,.16); background: rgba(255,255,255,.92); }
.workflow-item.done span { font-weight: 800; }

.route-page-active { animation: routePageIn .18s ease both; }
/* Each HTML file now ships with the correct workbench section visible on first paint.
 * This animation is opacity-only so page navigation never looks like two panels sliding over each other. */
@keyframes routePageIn {
  from { opacity: .72; }
  to { opacity: 1; }
}

.page-actions { margin-top: 18px; }
.page-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
.page-action-card > div:first-child { display: grid; gap: 4px; }
.page-action-card small { color: #6b7280; }
.page-action-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.route-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #d1d5db;
  font-weight: 700;
  white-space: nowrap;
}
a.route-button.primary { background: #111827; color: #fff; border-color: #111827; }
a.route-button.ghost { background: #fff; color: #111827; }
button.route-button:disabled { opacity: .5; cursor: not-allowed; }

/* Strategy overview page: read-only, Gate controls only appear on Gate 1 page. */
body.page-strategy #strategyDays .day-review-area { display: none !important; }
body.page-strategy #strategyDays input,
body.page-strategy #strategyDays textarea { background: #f8fafc; color: #334155; }

/* Kimi generation page: content can be inspected, but review controls belong to Gate 2. */
body.page-kimi #contentEditor .review-panel { display: none !important; }
body.page-kimi #contentEditor input,
body.page-kimi #contentEditor textarea { background: #f8fafc; color: #334155; }

/* Gate 2 page is review-only; content generation stays on the Kimi page. */
body.page-gate2 #generateContentBtn { display: none !important; }
body.page-gate2 #kimiProgressPanel { display: none !important; }
body.page-gate2 #kimiErrorPanel { display: none !important; }

@media (max-width: 760px) {
  .page-action-card { align-items: stretch; flex-direction: column; }
  .page-action-buttons, .route-button { width: 100%; }
  .workbench-nav { padding-bottom: 4px; }
}

.strategy-day-tabs {
  position: sticky;
  top: 78px;
  z-index: 14;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px 0;
  padding: 10px;
  border: 1px solid #e9e5de;
  border-radius: 14px;
  background: rgba(250,249,247,.94);
  backdrop-filter: blur(8px);
}
.strategy-day-tab {
  flex: 0 0 auto;
  min-width: 92px;
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid #ddd8d0;
  border-radius: 12px;
  background: #fff;
  color: #292725;
  cursor: pointer;
  font-weight: 800;
}
.strategy-day-tab small { font-size: 11px; font-weight: 600; color: #8a837b; }
.strategy-day-tab.active { background: #292725; color: #fff; border-color: #292725; }
.strategy-day-tab.active small { color: rgba(255,255,255,.72); }
.strategy-day-tab.approved:not(.active) { border-color: #b8c6b6; background: #f4f8f3; }

@media (max-width: 760px) {
  .strategy-day-tabs { top: 70px; }
  .strategy-day-tab { min-width: 82px; }
}

/* v0.5.4 · AI runtime stages */
.model-progress { position: relative; overflow: hidden; }
.model-progress.success,
.generation-progress.success { border-color: #bfd2c1; background: #f6faf6; }
.model-progress.failed,
.generation-progress.failed { border-color: #e6c7c7; background: #fff8f8; }
.model-stage-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
#deepseekStageRail { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.model-stage-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e4e0d9;
  border-radius: 10px;
  background: #fff;
  color: #8b847c;
  transition: .22s ease;
}
.model-stage-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eeebe6;
  font-size: 11px;
  font-weight: 700;
}
.model-stage-step small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 650; }
.model-stage-step.active { border-color: #9d958a; background: #f5f2ed; color: #2f2c29; transform: translateY(-1px); }
.model-stage-step.active span { background: #393531; color: #fff; }
.model-stage-step.done { border-color: #c8d7c8; background: #f2f7f2; color: #476047; }
.model-stage-step.done span { background: #637a63; color: #fff; }
.model-stage-step.failed { border-color: #e0bbbb; background: #faeeee; color: #833f3f; }
.model-stage-step.failed span { background: #9a5555; color: #fff; }
.deepseek-progress .generation-progress-bar { background: #4e5968; }
.generation-progress.success .generation-progress-bar { background: #647c65; }
.generation-progress.failed .generation-progress-bar { background: #985858; }
.ai-running .workbench-nav a,
.ai-running .workflow-item,
.ai-running .page-actions a { opacity: .48; cursor: wait; }
.ai-running #analyzeBtn,
.ai-running #generateContentBtn,
.ai-running #reviseContentBtn { cursor: wait; }
@media (max-width: 900px) {
  .model-stage-rail { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .model-stage-step { flex: 0 0 auto; min-width: 86px; }
}

/* v0.5.5: fast navigation feedback + locked-stage protection */
.workbench-nav a,
.workflow-item,
.page-actions a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.workbench-nav a.nav-press,
.workflow-item.nav-press,
.page-actions a.nav-press {
  transform: translateY(0) scale(.985) !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.08) !important;
  transition-duration: .04s !important;
}
.workbench-nav a.nav-current,
.workflow-item.nav-current {
  cursor: default;
}
.workbench-nav a.nav-locked,
.workflow-item.nav-locked,
.page-actions a.nav-locked {
  opacity: .44;
  cursor: not-allowed;
  box-shadow: none;
}
.workbench-nav a.nav-locked:hover,
.workflow-item.nav-locked:hover,
.page-actions a.nav-locked:hover {
  transform: none;
  box-shadow: none;
}
.route-leaving .workbench-nav a:not(.nav-locked),
.route-leaving .workflow-item:not(.nav-locked) {
  transition-duration: .06s;
}

/* v0.6.1 cloud persistence status */
.cloud-sync-status{
  display:flex;align-items:center;gap:8px;margin:-6px 0 14px;padding:9px 12px;
  border:1px solid #e7e2da;border-radius:12px;background:#faf9f7;color:#756f68;
  font-size:12px;line-height:1.4;
}
.cloud-sync-status.synced{background:#f2f8f3;border-color:#dcebdd;color:#41684d;}


/* v0.6.2: route hard-isolation. Each URL renders exactly one workflow stage.
   app.js may update data for other stages, but those sections can never extend the current page. */
body.page-input #strategySection,
body.page-input #kimiSection,
body.page-input #finalSection,
body.page-strategy #inputSection,
body.page-strategy #kimiSection,
body.page-strategy #finalSection,
body.page-gate1 #inputSection,
body.page-gate1 #kimiSection,
body.page-gate1 #finalSection,
body.page-kimi #inputSection,
body.page-kimi #strategySection,
body.page-kimi #finalSection,
body.page-gate2 #inputSection,
body.page-gate2 #strategySection,
body.page-gate2 #finalSection,
body.page-final #inputSection,
body.page-final #strategySection,
body.page-final #kimiSection { display:none !important; }

/* History library */
.history-shell{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:18px;align-items:start}
.history-sidebar,.history-main{background:#fff;border:1px solid #e8e3dc;border-radius:20px;padding:18px;box-shadow:0 8px 24px rgba(37,32,27,.04)}
.history-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.history-toolbar input{flex:1;min-width:190px}
.history-projects{display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 330px);overflow:auto;padding-right:3px}
.history-project{width:100%;text-align:left;border:1px solid #e9e4dd;background:#fbfaf8;border-radius:14px;padding:13px 14px;cursor:pointer;transition:.16s ease}
.history-project:hover{transform:translateY(-1px);border-color:#cfc7bd;background:#fff}
.history-project.active{border-color:#292725;background:#292725;color:#fff}
.history-project b{display:block;font-size:14px;line-height:1.45}
.history-project small{display:block;margin-top:5px;opacity:.7;line-height:1.4}
.history-project-id{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px;opacity:.55;margin-top:5px}
.history-empty{padding:34px 18px;text-align:center;border:1px dashed #d9d1c8;border-radius:16px;color:#8a837b;background:#fcfbf9}
.history-project-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #eee9e3}
.history-project-head h2{margin:0 0 5px;font-size:22px}
.history-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.history-chip{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;background:#f2efea;color:#625c55;font-size:12px}
.history-articles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.history-article{border:1px solid #e8e3dc;background:#fff;border-radius:14px;padding:13px 14px;cursor:pointer;text-align:left;transition:.16s ease}
.history-article:hover{border-color:#bbb2a8;transform:translateY(-1px)}
.history-article.active{border-color:#292725;box-shadow:0 0 0 1px #292725 inset}
.history-article-top{display:flex;justify-content:space-between;gap:10px;align-items:center}
.history-article-title{font-weight:750;margin-top:8px;line-height:1.45}
.history-article small{display:block;color:#8a837b;margin-top:6px}
.history-viewer{border-top:1px solid #eee9e3;padding-top:16px;margin-top:4px}
.history-version-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.history-version-btn{border:1px solid #ded7cf;background:#faf8f5;border-radius:999px;padding:7px 11px;cursor:pointer;font-size:12px}
.history-version-btn.active{background:#292725;color:#fff;border-color:#292725}
.history-content-title{font-size:24px;line-height:1.35;margin:0 0 12px}
.history-field{margin:14px 0}
.history-field-label{font-size:12px;font-weight:750;color:#7b746c;margin-bottom:6px;text-transform:none}
.history-field-value{white-space:pre-wrap;line-height:1.8;color:#302d29;background:#fbfaf8;border:1px solid #eee9e3;border-radius:14px;padding:13px 15px}
.history-list{margin:0;padding-left:20px;line-height:1.8}
.history-tags{display:flex;gap:7px;flex-wrap:wrap}
.history-tag{padding:5px 9px;border-radius:999px;background:#f1eee8;font-size:12px}
.history-status-final{background:#edf6ef;color:#376447}
.history-status-draft{background:#f7f1e6;color:#7a5c2b}
.history-status-approved{background:#edf6ef;color:#376447}
.history-header-actions{display:flex;gap:8px;flex-wrap:wrap}
.history-count{font-size:12px;color:#8a837b;margin:8px 0 0}
@media(max-width:900px){.history-shell{grid-template-columns:1fr}.history-projects{max-height:320px}.history-articles{grid-template-columns:1fr}.history-project-head{flex-direction:column}}


/* v0.6.3 Gate 1 single-day focus review */
.strategy-day-tabs.focus-mode {
  display: block;
}
.gate1-focus-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
}
.gate1-focus-bar > div {
  display: grid;
  gap: 4px;
}
.gate1-focus-bar small {
  color: var(--muted, #6b7280);
}
@media (max-width: 720px) {
  .gate1-focus-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .gate1-focus-bar button {
    width: 100%;
  }
}

/* v0.6.4 · 上游策略变化不再破坏旧正文 */
.strategy-sync-banner {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid rgba(180, 120, 45, .22);
  border-radius: 16px;
  background: rgba(255, 248, 236, .82);
}
.strategy-sync-copy b { display:block; margin-bottom:6px; }
.strategy-sync-copy p { margin:0; line-height:1.7; color:var(--muted); }
.strategy-sync-actions { margin-top:12px; }
.strategy-diff-panel {
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(0,0,0,.08);
}
.strategy-diff-row {
  display:grid;
  grid-template-columns:120px minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.strategy-diff-row:last-child { border-bottom:0; }
.strategy-diff-row > b { font-size:13px; }
.strategy-diff-row > div {
  min-width:0;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.74);
}
.strategy-diff-row small { color:var(--muted); }
.strategy-diff-row p {
  margin:5px 0 0;
  white-space:pre-wrap;
  line-height:1.65;
  word-break:break-word;
}
.day-tab.outdated { box-shadow: inset 0 0 0 1px rgba(180,120,45,.32); }
.day-tab.accepted { box-shadow: inset 0 0 0 1px rgba(64,130,92,.24); }
@media (max-width: 760px) {
  .strategy-diff-row { grid-template-columns:1fr; gap:7px; }
  .strategy-sync-actions { display:grid; grid-template-columns:1fr; }
  .strategy-sync-actions button { width:100%; }
}

/* v0.6.7 flexible content window */
.article-count-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px);
  gap: 16px;
  align-items: center;
  margin: 6px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
.article-count-control input[type="range"] { width: 100%; margin: 0; }
.article-count-meta { display: flex; flex-direction: column; gap: 4px; }
.article-count-meta b { font-size: 20px; }
.article-count-meta span { font-size: 12px; color: var(--muted, #6b7280); line-height: 1.5; }
@media (max-width: 720px) {
  .article-count-control { grid-template-columns: 1fr; gap: 8px; }
}
.publish-window-summary { grid-column: 1 / -1; }
.publish-window-days { display: grid; grid-template-columns: repeat(7, minmax(70px, 1fr)); gap: 8px; margin-top: 8px; }
.publish-day { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border, #e5e7eb); text-align: center; }
.publish-day small { font-size: 11px; }
.publish-day.empty { opacity: .48; background: rgba(0,0,0,.02); }
.publish-day.scheduled { background: rgba(30, 115, 190, .07); border-color: rgba(30, 115, 190, .22); }
@media (max-width: 760px) { .publish-window-days { grid-template-columns: repeat(4, minmax(64px, 1fr)); } }
.strategy-review-summary { grid-column: 1 / -1; padding: 12px 14px; border: 1px solid rgba(70,100,140,.18); border-radius: 12px; background: rgba(245,248,252,.86); }
.strategy-review-summary > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.strategy-review-summary p { margin: 8px 0 0; line-height: 1.65; }
.strategy-review-summary ul { margin: 8px 0 0 18px; padding: 0; }
.strategy-review-summary li { margin: 4px 0; line-height: 1.55; }
.pipeline-hint { margin-top: 10px; font-size: 12px; line-height: 1.65; color: var(--muted, #6b7280); }

/* v0.6.8 · AI collaboration trace */
.ai-collab-panel {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(40, 68, 95, .14);
  border-radius: 16px;
  background: rgba(248, 250, 252, .84);
}
.collab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.collab-head > div:first-child { display:grid; gap:4px; }
.collab-head small { color: var(--muted, #6b7280); line-height:1.5; }
.collab-stages { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-end; }
.collab-stage {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:90px;
  padding:7px 9px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.collab-stage b { font-size:12px; }
.collab-stage small { font-size:11px; }
.collab-stage.done { background:rgba(57,132,88,.07); border-color:rgba(57,132,88,.18); }
.collab-stage.warn { background:rgba(184,126,44,.08); border-color:rgba(184,126,44,.22); }
.collab-stage.skip { opacity:.62; }
.collab-stage.pending { background:rgba(47,94,145,.06); border-color:rgba(47,94,145,.16); }
.collab-details { margin-top:12px; padding-top:10px; border-top:1px solid rgba(0,0,0,.07); }
.collab-details > summary { cursor:pointer; font-weight:600; }
.collab-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.collab-grid section { min-width:0; padding:12px; border-radius:12px; background:rgba(255,255,255,.78); border:1px solid rgba(0,0,0,.06); }
.collab-grid h4 { margin:0 0 8px; font-size:14px; }
.collab-grid h5 { margin:12px 0 6px; font-size:12px; }
.collab-grid p { margin:0 0 8px; line-height:1.65; }
.collab-list { margin:0; padding-left:18px; }
.collab-list li { margin:6px 0; line-height:1.55; }
.collab-list li b { display:block; font-size:12px; }
.collab-list li span { display:block; color:var(--muted,#6b7280); font-size:12px; margin-top:2px; }
.tech-kv { display:grid; grid-template-columns:auto minmax(0,1fr); gap:7px 10px; font-size:12px; }
.tech-kv span { color:var(--muted,#6b7280); }
.tech-kv b { word-break:break-word; }
.review-score { display:inline-flex; margin:2px 0 8px; padding:5px 8px; border-radius:999px; font-size:12px; font-weight:700; }
.review-score.pass { background:rgba(57,132,88,.1); color:#315e42; }
.review-score.revise { background:rgba(184,126,44,.12); color:#805923; }
@media (max-width: 820px) {
  .collab-head { flex-direction:column; }
  .collab-stages { justify-content:flex-start; }
  .collab-grid { grid-template-columns:1fr; }
  .collab-stage { min-width:0; flex:1 1 42%; }
}

/* v0.6.9 · 可拖拽发布排期 */
.schedule-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px}.schedule-backdrop{position:absolute;inset:0;background:rgba(25,31,42,.38);backdrop-filter:blur(2px)}.schedule-dialog{position:relative;width:min(1460px,96vw);max-height:90vh;overflow:auto;background:#fff;border:1px solid #e6e8ec;border-radius:20px;box-shadow:0 24px 80px rgba(19,27,43,.22);padding:20px}.schedule-dialog-head,.schedule-dialog-foot{display:flex;align-items:center;justify-content:space-between;gap:18px}.schedule-dialog-head b{display:block;font-size:20px}.schedule-dialog-head small{display:block;color:#6f7886;margin-top:5px}.schedule-board{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:10px;margin:20px 0}.schedule-day{border:1px solid #e8e5df;background:#faf9f6;border-radius:14px;min-height:260px;padding:10px}.schedule-day-head{display:flex;justify-content:space-between;align-items:center;padding:2px 3px 10px}.schedule-day-head span{font-size:12px;color:#7b756b;background:#eeeae1;border-radius:999px;padding:3px 7px}.schedule-dropzone{min-height:205px;display:flex;flex-direction:column;gap:8px;border-radius:10px}.schedule-card{display:grid;grid-template-columns:16px minmax(0,1fr);gap:7px;background:#fff;border:1px solid #dfe3e8;border-radius:10px;padding:9px;box-shadow:0 2px 8px rgba(22,29,38,.04);cursor:grab}.schedule-card.dragging{opacity:.5;border-style:dashed}.schedule-card-grip{color:#9a9fa8;line-height:1.2}.schedule-card-copy{min-width:0}.schedule-card-copy b,.schedule-card-copy span,.schedule-card-copy small{display:block}.schedule-card-copy span{font-size:12px;margin-top:4px;line-height:1.45;color:#3d4652}.schedule-card-copy small{font-size:11px;color:#8a8175;margin-top:5px}.schedule-day-select{grid-column:1/-1;width:100%;font-size:12px;padding:5px 7px;margin-top:3px}.schedule-dialog-foot{border-top:1px solid #eceef1;padding-top:14px}.schedule-edit-btn{margin-left:10px}.publish-day.multi{box-shadow:inset 0 0 0 1px #d4b779}.article-schedule-chip{display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:3px 8px;border-radius:999px;background:#f3efe6;color:#6f604a;font-size:12px;font-weight:600}
@media(max-width:980px){.schedule-board{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-dialog{width:min(760px,96vw)}}
@media(max-width:560px){.schedule-modal{padding:10px}.schedule-board{grid-template-columns:1fr}.schedule-dialog-head,.schedule-dialog-foot{align-items:flex-start;flex-direction:column}.schedule-dialog-foot .button-row{width:100%}.schedule-dialog-foot .button-row button{flex:1}}
.strategy-review-summary.warning{border-color:#e9c98d;background:#fff9ee}.strategy-review-summary.warning strong{color:#9a5b00}

/* v0.7.0 · flexible schedule display: tabs follow publish order, not storage day. */
.strategy-day-tab { min-width: 126px; }
.strategy-day-tab > span { white-space: nowrap; }
@media (max-width: 760px) { .strategy-day-tab { min-width: 112px; } }

/* v0.7.2 · material upload + manual requirements + reviewer V2 */
.material-input-grid{margin-top:10px}
.input-grid.two-col.material-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.field-help{margin-top:6px;font-size:12px;line-height:1.55;color:#81796f}
.material-upload-wrap{margin-top:12px;display:grid;gap:10px}
.material-dropzone{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border:1px dashed #c9c1b7;border-radius:14px;background:#fbfaf7;cursor:pointer;transition:.18s ease}
.material-dropzone:hover,.material-dropzone.dragging{border-color:#8f867b;background:#f4f1eb;transform:translateY(-1px)}
.material-dropzone div{display:grid;gap:4px}.material-dropzone b{font-size:14px}.material-dropzone span{font-size:12px;color:#81796f}
button.compact{padding:7px 10px;font-size:12px;white-space:nowrap}
.material-upload-status{font-size:12px}.error-text{color:#b42318!important}
.material-asset-list{display:grid;gap:8px}
.material-empty{padding:10px 12px;border-radius:10px;background:#f6f4ef;color:#8a8379;font-size:12px}
.material-item{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid #e3ddd4;border-radius:12px;background:#fff}
.material-item.stored_only{border-color:#e7d3a9;background:#fffdf8}
.material-item-main{min-width:0;display:grid;gap:6px;flex:1}
.material-file-line{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}.material-file-line b{font-size:13px;word-break:break-all}.material-file-line span{font-size:11px;color:#92897f}
.material-item p{margin:0;font-size:12px;line-height:1.65;color:#625c55}.material-item small{color:#8b8379}
.review-issue-list .review-issue{display:grid;gap:4px;padding:9px 10px;border-radius:9px;background:#f8f6f2}
.review-issue.high{border-left:3px solid #b42318}.review-issue.medium{border-left:3px solid #b7791f}.review-issue.low{border-left:3px solid #8a8177}
.review-issue em{font-style:normal;color:#514b45;font-size:12px}.review-issue small{color:#766e66}
.review-dimensions{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:6px;margin:10px 0}
.review-dimensions span{display:grid;gap:2px;padding:7px 8px;background:#f6f4ef;border-radius:8px}.review-dimensions small{font-size:10px;color:#847b72}.review-dimensions b{font-size:14px}
.emoji-review{margin-top:8px;padding:8px 10px;border-radius:8px;background:#fff9e8;font-size:12px;color:#675d4d}
@media(max-width:760px){.input-grid.two-col.material-input-grid{grid-template-columns:1fr}.material-dropzone,.material-item{align-items:stretch;flex-direction:column}.material-dropzone button,.material-item button{align-self:flex-start}}

/* v0.7.5 · reviewer actionable local preview */
.review-replacement{display:grid;gap:5px;margin-top:6px;padding:9px 10px;border-radius:8px;background:#fff;border:1px solid #e4ded4;color:#3f3a35}
.review-replacement b{font-size:11px;color:#7a6f64}
.review-replacement span{white-space:pre-wrap;line-height:1.65;font-size:13px;font-weight:650}
.emoji-examples{display:grid;gap:4px;margin-top:7px;padding-top:7px;border-top:1px dashed #e6d8b3}
.emoji-examples b{font-size:11px;color:#7a6b4d}
.emoji-examples span{font-size:15px;line-height:1.7;color:#3f3a35}

/* v0.7.7 XHS knowledge: keyword hints are secondary metadata, not another form field. */
.strategy-keyword-row {
  margin: 12px 0 2px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .56);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.strategy-keyword-row b { font-size: 12px; }
.strategy-keyword-row span { font-size: 13px; line-height: 1.6; color: #3f453f; }
.strategy-keyword-row small { color: var(--muted, #7a766f); }
.xhs-knowledge-box { display: grid; gap: 8px; }
.xhs-knowledge-box .keyword-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.xhs-knowledge-box .keyword-chips span { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid rgba(17,24,39,.08); font-size: 12px; }

/* Material OCR actions */
.material-item-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
.material-item-actions .ghost.compact{white-space:nowrap}
@media(max-width:760px){.material-item-actions{width:100%;justify-content:stretch}.material-item-actions .ghost.compact{flex:1 1 160px;width:auto}}
