/*
 * 速办标书AI · Visual refresh layer
 * Loaded last (after studio.css / overlay.css).
 *
 * Goal: bring the workspace chrome up to the reference的产品观感
 *  - 64px pure-white command bar + pill quota capsule + filled CTA
 *  - 200px white nav rail with soft tinted active row
 *  - tinted canvas, white cards with 16px radius and airy shadows
 *  - slim, low-contrast, smoothly revealing scrollbars
 *
 * Brand palette is unchanged (azure #188df9 + mint canvas); only surfaces,
 * geometry, rhythm and motion are re-tuned. No business markup is touched.
 */

/* ------------------------------------------------------------------ *
 * 1. Local tokens
 * ------------------------------------------------------------------ */
:root{
  --vr-canvas:#eef6fa;
  --vr-canvas-2:#f4fafc;
  --vr-surface:#ffffff;
  --vr-surface-muted:#f6fbfd;
  --vr-ink:#0d1b26;
  --vr-ink-2:#34444f;
  --vr-muted:#647482;
  --vr-faint:#95a5b0;
  --vr-line:#e4eef3;
  --vr-line-soft:#eef6f9;

  --vr-brand:#188df9;
  --vr-brand-deep:#0f77d6;
  --vr-brand-tint:#e9f5fe;
  --vr-brand-tint-2:#f3fbff;

  --vr-radius-card:16px;
  --vr-radius-inner:12px;
  --vr-radius-control:10px;

  --vr-shadow-card:0 1px 2px rgba(13,42,62,.04),0 10px 26px -18px rgba(13,42,62,.24);
  --vr-shadow-card-hover:0 2px 6px rgba(13,42,62,.06),0 18px 40px -20px rgba(13,42,62,.3);
  --vr-shadow-pop:0 22px 48px -24px rgba(13,42,62,.28),0 4px 12px rgba(13,42,62,.06);
  --vr-shadow-brand:0 8px 20px -10px rgba(24,141,249,.65);

  --vr-ease:cubic-bezier(.2,0,0,1);
  --vr-dur:180ms;

  /* Keep dependent tokens in sync with the refreshed geometry */
  --studio-content-width:1240px;
  --studio-canvas:var(--vr-canvas);
  --studio-surface:var(--vr-surface);
  --studio-line:var(--vr-line);
}

/* ------------------------------------------------------------------ *
 * 2. Page canvas
 * ------------------------------------------------------------------ */
html,
body{
  background:var(--vr-canvas);
}

body{
  color:var(--vr-ink);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Soft brand-lit canvas behind the workspace */
#appView.studio-shell{
  background:
    radial-gradient(920px 320px at 82% -12%,rgba(24,141,249,.10),transparent 68%),
    radial-gradient(680px 280px at 6% -6%,rgba(41,196,183,.075),transparent 70%),
    linear-gradient(180deg,#f3fafd 0%,var(--vr-canvas) 42%,var(--vr-canvas) 100%);
}

/* ------------------------------------------------------------------ *
 * 3. Command bar — 64px, white, hairline divider
 * ------------------------------------------------------------------ */
.cmdbar{
  height:64px;
  padding:0 22px 0 20px;
  gap:16px;
  background:#fff;
  border-bottom:1px solid var(--vr-line);
  box-shadow:none;
}

.cmdbar .brand{
  gap:10px;
  margin-left:-4px;
}
.cmdbar .brand-mark{
  width:34px;
  height:34px;
}
.cmdbar .brand-copy b{
  font-size:19px;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--vr-ink);
}
.cmdbar .brand-copy small{
  margin-top:3px;
  padding:1px 7px;
  border-radius:999px;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-size:9.5px;
  font-weight:600;
  letter-spacing:.14em;
}

/* Document switcher: quiet filled control */
.cmdbar .doc-switch{
  height:40px;
  max-width:400px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:var(--vr-surface-muted);
  color:var(--vr-muted);
  transition:background-color var(--vr-dur) var(--vr-ease),
             border-color var(--vr-dur) var(--vr-ease),
             box-shadow var(--vr-dur) var(--vr-ease);
}
.cmdbar .doc-switch:hover{
  background:#fff;
  border-color:#cfe6f4;
  box-shadow:0 2px 10px -6px rgba(13,42,62,.28);
}
.cmdbar .doc-switch-copy b{
  font-size:13.5px;
  font-weight:600;
  color:var(--vr-ink);
}

/* Right cluster */
.cmdbar .top-right{
  gap:10px;
}
.cmdbar .cmdbar-icon-btn{
  width:38px;
  height:38px;
  border-radius:var(--vr-radius-control);
  color:var(--vr-muted);
  transition:background-color var(--vr-dur) var(--vr-ease),color var(--vr-dur) var(--vr-ease);
}
.cmdbar .cmdbar-icon-btn:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-brand-deep);
}
.cmdbar .msg-badge{
  min-width:17px;
  height:17px;
  border-radius:9px;
  font-size:10px;
  font-weight:600;
  box-shadow:0 0 0 2px #fff;
  transform:translate(2px,-2px);
}

/* Quota capsule: one light pill holding both metrics + the CTA */
.cmdbar .quota-chips{
  display:flex;
  align-items:center;
  gap:18px;
  height:44px;
  padding:0 5px 0 18px;
  border:1px solid #e2f0f7;
  border-radius:999px;
  background:var(--vr-brand-tint-2);
}
.cmdbar .quota-chips .chip{
  height:auto;
  padding:0;
  border:0;
  background:transparent;
  color:var(--vr-muted);
  font-size:12.5px;
  line-height:1.2;
  white-space:nowrap;
}
.cmdbar .quota-chips .chip b{
  margin-left:5px;
  color:var(--vr-ink);
  font-size:13px;
  font-weight:700;
  letter-spacing:-.01em;
}
.cmdbar .recharge-btn{
  height:34px;
  padding:0 18px;
  border:1px solid var(--vr-brand);
  border-radius:999px;
  background:var(--vr-brand);
  color:#fff;
  font-size:13px;
  font-weight:600;
  letter-spacing:.01em;
  box-shadow:var(--vr-shadow-brand);
  transition:background-color var(--vr-dur) var(--vr-ease),
             box-shadow var(--vr-dur) var(--vr-ease),
             transform var(--vr-dur) var(--vr-ease);
}
.cmdbar .recharge-btn:hover{
  background:var(--vr-brand-deep);
  border-color:var(--vr-brand-deep);
  box-shadow:0 10px 22px -10px rgba(15,119,214,.7);
}
.cmdbar .recharge-btn:active{
  transform:translateY(1px);
}

.cmdbar .who{display:none}
.cmdbar .avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  border:0;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-size:12px;
  font-weight:700;
  box-shadow:0 0 0 1px #d8ecf7,0 0 0 3px #fff;
  cursor:pointer;
}
.cmdbar #logoutBtn{
  height:34px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:#fff;
  color:var(--vr-muted);
  font-size:13px;
}
.cmdbar #logoutBtn:hover{
  border-color:#cfe6f4;
  color:var(--vr-brand-deep);
  background:var(--vr-surface-muted);
}

/* ------------------------------------------------------------------ *
 * 4. Nav rail — 200px, white, tinted active row
 * ------------------------------------------------------------------ */
/* Grid geometry must mirror every shell state: studio.css drives the same
   columns through .context-active / .context-expanded / .rail-collapsed /
   .inspector-collapsed, and those selectors out-rank a bare shell rule. */
#appView.studio-shell{
  height:calc(100vh - 64px);
  height:calc(100dvh - 64px);
  grid-template-columns:200px 264px minmax(0,1fr) 288px;
}
#appView.studio-shell.rail-collapsed{
  grid-template-columns:72px 264px minmax(0,1fr) 288px;
}
#appView.studio-shell.context-expanded{
  grid-template-columns:200px 320px minmax(0,1fr) 288px;
}
#appView.studio-shell.rail-collapsed.context-expanded{
  grid-template-columns:72px 320px minmax(0,1fr) 288px;
}
#appView.studio-shell:not(.context-active){
  grid-template-columns:200px minmax(0,1fr) 288px;
}
#appView.studio-shell.rail-collapsed:not(.context-active){
  grid-template-columns:72px minmax(0,1fr) 288px;
}
@media (min-width:1600px){
  #appView.studio-shell.inspector-collapsed{
    grid-template-columns:200px 264px minmax(0,1fr) 0;
  }
  #appView.studio-shell.rail-collapsed.inspector-collapsed{
    grid-template-columns:72px 264px minmax(0,1fr) 0;
  }
  #appView.studio-shell.context-expanded.inspector-collapsed{
    grid-template-columns:200px 320px minmax(0,1fr) 0;
  }
  #appView.studio-shell.rail-collapsed.context-expanded.inspector-collapsed{
    grid-template-columns:72px 320px minmax(0,1fr) 0;
  }
  #appView.studio-shell.inspector-collapsed:not(.context-active){
    grid-template-columns:200px minmax(0,1fr) 0;
  }
  #appView.studio-shell.rail-collapsed.inspector-collapsed:not(.context-active){
    grid-template-columns:72px minmax(0,1fr) 0;
  }
}

.studio-shell .rail{
  padding:12px 10px 0;
  background:#fff;
  border-right:1px solid var(--vr-line);
}
.studio-shell .rail.collapsed{
  width:72px;
  padding-left:8px;
  padding-right:8px;
}
.rail-top{
  padding:0 0 8px;
}
.rail-toggle{
  width:100%;
  height:34px;
  padding:0 10px;
  border:0;
  border-radius:var(--vr-radius-control);
  background:transparent;
  color:var(--vr-faint);
  font-size:12px;
  gap:6px;
  transition:background-color var(--vr-dur) var(--vr-ease),color var(--vr-dur) var(--vr-ease);
}
.rail-toggle:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-muted);
}

.studio-shell .rail-item{
  width:100%;
  height:42px;
  margin:0 0 4px;
  padding:0 12px;
  gap:10px;
  border-radius:var(--vr-radius-control);
  color:var(--vr-ink-2);
  font-size:14px;
  font-weight:400;
  transition:background-color var(--vr-dur) var(--vr-ease),
             color var(--vr-dur) var(--vr-ease),
             box-shadow var(--vr-dur) var(--vr-ease);
}
.studio-shell .rail-item .si{
  width:18px;
  height:18px;
  color:var(--vr-faint);
  transition:color var(--vr-dur) var(--vr-ease);
}
.studio-shell .rail-item:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-ink);
}
.studio-shell .rail-item:hover .si{
  color:var(--vr-brand);
}
.studio-shell .rail-item.active{
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-weight:600;
  box-shadow:inset 0 0 0 1px rgba(24,141,249,.10);
}
.studio-shell .rail-item.active .si{
  color:var(--vr-brand-deep);
}
.studio-shell .rail-sep{
  height:1px;
  margin:10px 10px;
  background:var(--vr-line-soft);
}
.studio-shell .rail-foot{
  margin-top:auto;
  padding:14px 4px 16px;
  border-top:1px solid var(--vr-line-soft);
}
.studio-shell .rail-foot-link{
  display:flex;
  align-items:center;
  height:32px;
  padding:0 10px;
  border-radius:8px;
  color:var(--vr-faint);
  font-size:12.5px;
  transition:background-color var(--vr-dur) var(--vr-ease),color var(--vr-dur) var(--vr-ease);
}
.studio-shell .rail-foot-link:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-ink-2);
}

/* Collapsed rail geometry */
.studio-shell .rail.collapsed .rail-item,
.studio-shell .rail.collapsed .rail-group-toggle,
.studio-shell .rail.collapsed .rail-foot-link,
.studio-shell .rail.collapsed .rail-collapse{
  width:48px;
  margin-left:4px;
  margin-right:4px;
}

/* ------------------------------------------------------------------ *
 * 5. Context pane
 * ------------------------------------------------------------------ */
.studio-shell .context{
  background:#fff;
  border-right:1px solid var(--vr-line);
}
.context-head{
  padding:16px 16px 12px;
  border-bottom:1px solid var(--vr-line-soft);
}
.context-head h2{
  font-size:14px;
  font-weight:650;
  letter-spacing:-.01em;
}
.context-head p{
  margin-top:3px;
  color:var(--vr-faint);
  font-size:11.5px;
}
.context-doc{
  margin:12px 12px 0;
  padding:12px 14px;
  border:1px solid var(--vr-line-soft);
  border-radius:var(--vr-radius-inner);
  background:var(--vr-surface-muted);
}
.context-tabs{
  margin:12px 12px 0;
  padding:3px;
  border:0;
  border-radius:10px;
  background:var(--vr-surface-muted);
}
.context-tab{
  height:30px;
  border-radius:8px;
  font-size:12.5px;
  color:var(--vr-muted);
  transition:background-color var(--vr-dur) var(--vr-ease),color var(--vr-dur) var(--vr-ease),box-shadow var(--vr-dur) var(--vr-ease);
}
.context-tab[aria-pressed="true"]{
  background:#fff;
  color:var(--vr-brand-deep);
  font-weight:600;
  box-shadow:0 1px 3px rgba(13,42,62,.10);
}
.context-tree-tools{
  border-radius:var(--vr-radius-control);
  background:var(--vr-surface-muted);
}

/* ------------------------------------------------------------------ *
 * 6. Stage header
 * ------------------------------------------------------------------ */
.stage-head{
  width:calc(100% - 64px - 2 * var(--stage-gutter, 0px));
  padding:24px 0 0;
}
.stage-head .doc-head{
  align-items:flex-start;
}
.stage-head .view-kicker{
  margin:0 0 6px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.06em;
  color:var(--vr-brand-deep);
}
.stage-head #docTitle{
  font-size:26px;
  line-height:1.24;
  font-weight:700;
  letter-spacing:-.025em;
  color:var(--vr-ink);
}
.stage-head .doc-meta{
  margin-top:8px;
}
.stage-head .doc-meta .tag{
  height:24px;
  padding:0 10px;
  border:1px solid var(--vr-line);
  border-radius:999px;
  background:#fff;
  color:var(--vr-muted);
  font-size:11.5px;
}
.stage-head .doc-actions .btn{
  height:34px;
  border-radius:var(--vr-radius-control);
}

/* Stepper as a floating white card */
.studio-shell .stepper{
  margin:16px 0 0;
  padding:8px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  box-shadow:0 1px 2px rgba(13,42,62,.04);
}
.studio-shell .stepper .step{
  height:40px;
  padding:0 14px;
  border-radius:8px;
  color:var(--vr-muted);
  font-size:13px;
  transition:background-color var(--vr-dur) var(--vr-ease),color var(--vr-dur) var(--vr-ease);
}
.studio-shell .stepper .step:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-ink-2);
}
.studio-shell .stepper .step.active{
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-weight:600;
}
.studio-shell .stepper .step-no{
  width:24px;
  height:24px;
  margin-right:8px;
  border:1px solid var(--vr-line);
  background:#fff;
  color:var(--vr-faint);
  font-size:12px;
  font-weight:600;
}
.studio-shell .stepper .step.active .step-no{
  border-color:var(--vr-brand);
  background:var(--vr-brand);
  color:#fff;
  box-shadow:0 4px 10px -4px rgba(24,141,249,.8);
}
.studio-shell .stepper .step.done .step-no{
  border-color:var(--vr-brand);
  background:var(--vr-brand);
  color:#fff;
}

/* ------------------------------------------------------------------ *
 * 7. Scroll area + cards
 * ------------------------------------------------------------------ */
.stage-scroll{
  padding:22px 32px 48px;
  scrollbar-gutter:stable both-edges;
  scroll-behavior:smooth;
  overscroll-behavior:contain;
}

.studio-shell .stage .panel{
  max-width:var(--studio-content-width,1120px);
  padding:28px 30px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-card);
  background:#fff;
  box-shadow:var(--vr-shadow-card);
}
.studio-shell .stage #panel0{
  border:0;
  background:transparent;
  box-shadow:none;
}

/* Settings card */
.settings-page{
  max-width:var(--studio-content-width,1120px);
  margin:0 auto;
  padding:30px 32px 32px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-card);
  background:#fff;
  box-shadow:var(--vr-shadow-card);
}
.settings-overview{
  margin:0 0 4px;
  border:1px solid var(--vr-line-soft);
  border-radius:var(--vr-radius-inner);
  background:var(--vr-surface-muted);
}
.settings-overview>summary{
  padding:12px 16px;
  font-size:13px;
  font-weight:600;
  color:var(--vr-ink-2);
}
.settings-overview>summary::after{
  content:"展开";
  padding:2px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--vr-line);
  color:var(--vr-brand-deep);
  font-size:11px;
  font-weight:500;
}
.settings-overview[open]>summary::after{content:"收起"}

.settings-block{
  margin:0;
  padding:26px 0;
  border-top:1px solid var(--vr-line-soft);
}
.settings-block:first-of-type{
  border-top:0;
  padding-top:22px;
}
.settings-block-head{
  margin:0 0 16px;
  gap:10px;
}
.settings-block-head h3{
  font-size:16.5px;
  font-weight:650;
  letter-spacing:-.01em;
  line-height:1.4;
}
.settings-block-head p{
  color:var(--vr-muted);
  font-size:12px;
}
.settings-advanced{
  height:26px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid transparent;
  background:transparent;
  color:var(--vr-brand-deep);
  font-size:12px;
  transition:background-color var(--vr-dur) var(--vr-ease),border-color var(--vr-dur) var(--vr-ease);
}
.settings-advanced:hover{
  background:var(--vr-brand-tint);
  border-color:#d9edfb;
}

/* Text input */
.settings-input,
.studio-shell .settings-page input[type="text"],
.studio-shell .settings-page input[type="number"]{
  height:42px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:#fff;
  color:var(--vr-ink);
  font-size:13.5px;
  transition:border-color var(--vr-dur) var(--vr-ease),box-shadow var(--vr-dur) var(--vr-ease),background-color var(--vr-dur) var(--vr-ease);
}
.settings-input:hover{
  background:#fff;
  border-color:#cfe3ee;
}
.settings-input:focus{
  border-color:var(--vr-brand);
  box-shadow:0 0 0 4px rgba(24,141,249,.12);
  outline:none;
}

/* Bid method cards */
.studio-shell .bid-method-card{
  padding:16px 18px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  transition:border-color var(--vr-dur) var(--vr-ease),background-color var(--vr-dur) var(--vr-ease),box-shadow var(--vr-dur) var(--vr-ease),transform var(--vr-dur) var(--vr-ease);
}
.studio-shell .bid-method-card:hover{
  border-color:#cfe3ee;
  background:var(--vr-surface-muted);
  transform:translateY(-1px);
}
.studio-shell .bid-method-card.active{
  border-color:var(--vr-brand);
  background:var(--vr-brand-tint-2);
  box-shadow:0 0 0 1px rgba(24,141,249,.3),0 10px 24px -20px rgba(24,141,249,.9);
}
.studio-shell .bid-method-card b{
  font-size:14px;
  font-weight:600;
}
.studio-shell .bid-method-card small{
  margin-top:3px;
  display:block;
  color:var(--vr-muted);
  font-size:12px;
  line-height:1.55;
}

/* Model / style / layout selection cards */
.studio-shell .model-card,
.studio-shell .style-card,
.studio-shell .layout-card{
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  transition:border-color var(--vr-dur) var(--vr-ease),background-color var(--vr-dur) var(--vr-ease),box-shadow var(--vr-dur) var(--vr-ease),transform var(--vr-dur) var(--vr-ease);
}
.studio-shell .model-card:hover,
.studio-shell .style-card:hover,
.studio-shell .layout-card:hover{
  border-color:#cfe3ee;
  transform:translateY(-2px);
  box-shadow:var(--vr-shadow-card-hover);
}
.studio-shell .model-card.active,
.studio-shell .style-card.active,
.studio-shell .layout-card.active{
  border-color:var(--vr-brand);
  background:var(--vr-brand-tint-2);
  box-shadow:0 0 0 1px rgba(24,141,249,.28);
}
.studio-shell .model-card.active b,
.studio-shell .style-card.active b,
.studio-shell .layout-card.active b{
  color:var(--vr-brand-deep);
}

/* Pill toggles */
.studio-shell .style-pill{
  height:34px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:999px;
  background:#fff;
  color:var(--vr-muted);
  font-size:12.5px;
  transition:border-color var(--vr-dur) var(--vr-ease),background-color var(--vr-dur) var(--vr-ease),color var(--vr-dur) var(--vr-ease);
}
.studio-shell .style-pill:hover{
  border-color:#cfe3ee;
  color:var(--vr-ink-2);
  background:var(--vr-surface-muted);
}
.studio-shell .style-pill.active{
  border-color:var(--vr-brand);
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-weight:600;
}

/* Page range slider: white thumb with brand ring */
.studio-shell .page-track{
  background:#eaf2f7;
}
.studio-shell .page-fill{
  background:linear-gradient(90deg,#37a8ff,var(--vr-brand));
  border-radius:999px;
}
.studio-shell .page-thumb{
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 2px var(--vr-brand),0 4px 12px -2px rgba(24,141,249,.5);
  transition:transform var(--vr-dur) var(--vr-ease),box-shadow var(--vr-dur) var(--vr-ease);
}
.studio-shell .page-thumb:hover{
  transform:scale(1.12);
  box-shadow:0 0 0 2px var(--vr-brand),0 8px 18px -4px rgba(24,141,249,.6);
}
.studio-shell .page-bubble{
  border-radius:8px;
  background:var(--vr-brand);
  box-shadow:0 8px 18px -10px rgba(24,141,249,.9);
}

/* Footer actions */
.studio-shell .wizard-footer{
  width:calc(100% - 64px);
  padding:12px 16px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  box-shadow:0 12px 30px -26px rgba(13,42,62,.5);
}
.studio-shell .step-actions{
  border-top:1px solid var(--vr-line-soft);
}

/* ------------------------------------------------------------------ *
 * 8. Buttons
 * ------------------------------------------------------------------ */
.btn{
  height:36px;
  padding:0 16px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:#fff;
  color:var(--vr-ink-2);
  font-size:13px;
  font-weight:500;
  transition:background-color var(--vr-dur) var(--vr-ease),
             border-color var(--vr-dur) var(--vr-ease),
             color var(--vr-dur) var(--vr-ease),
             box-shadow var(--vr-dur) var(--vr-ease),
             transform var(--vr-dur) var(--vr-ease);
}
.btn:hover{
  border-color:#cfe3ee;
  background:var(--vr-surface-muted);
  color:var(--vr-ink);
}
.btn:active{
  transform:translateY(1px);
}
.btn.primary{
  border-color:var(--vr-brand);
  background:var(--vr-brand);
  color:#fff;
  font-weight:600;
  box-shadow:var(--vr-shadow-brand);
}
.btn.primary:hover{
  border-color:var(--vr-brand-deep);
  background:var(--vr-brand-deep);
  color:#fff;
}
.btn.ghost{
  border-color:transparent;
  background:transparent;
  color:var(--vr-muted);
}
.btn.ghost:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-ink);
}
.btn.sm{
  height:32px;
  padding:0 13px;
  border-radius:9px;
  font-size:12.5px;
}
.btn:focus-visible,
.settings-advanced:focus-visible,
.rail-item:focus-visible,
.step:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(24,141,249,.22);
}

/* Chips / tags elsewhere */
.chip{
  border-radius:999px;
}

/* Wizard footer CTAs: same control language as every other button */
.studio-shell .step-actions-buttons{gap:10px}
.studio-shell .step-prev,
.studio-shell .step-next{
  width:auto;
  min-width:124px;
  height:38px;
  padding:0 22px;
  border-radius:var(--vr-radius-control);
  font-size:13.5px;
  line-height:1;
  box-shadow:none;
}
.studio-shell .step-prev{
  border:1px solid var(--vr-line);
  background:#fff;
  color:var(--vr-ink-2);
}
.studio-shell .step-prev:hover:not(:disabled){
  border-color:#cfe3ee;
  background:var(--vr-surface-muted);
  color:var(--vr-brand-deep);
}
.studio-shell .step-next{
  border:1px solid var(--vr-brand);
  background:var(--vr-brand);
  box-shadow:var(--vr-shadow-brand);
}
.studio-shell .step-next:hover:not(:disabled):not(.disable-next-btn){
  border-color:var(--vr-brand-deep);
  background:var(--vr-brand-deep);
}
.studio-shell .step-prev-ico{
  width:16px;
  height:16px;
}

/* Inspector key/value rows: give labels a stable column so they never
   stack one character per line inside the narrow dock. */
.studio-shell .inspector-kv{
  grid-template-columns:86px minmax(0,1fr);
  gap:7px 12px;
  font-size:11.5px;
}
.studio-shell .inspector-kv b{
  text-align:left;
  font-weight:600;
  color:var(--vr-ink);
  overflow-wrap:anywhere;
}

/* ------------------------------------------------------------------ *
 * 9. Scrollbars — slim, neutral, reveal on hover / scroll
 * ------------------------------------------------------------------ */html,
body{
  overscroll-behavior-y:none;
}

*{
  scrollbar-width:thin;
  scrollbar-color:rgba(100,124,140,.30) transparent;
}

::-webkit-scrollbar{
  width:10px;
  height:10px;
}
::-webkit-scrollbar-track{
  background:transparent;
}
::-webkit-scrollbar-thumb{
  min-height:44px;
  border:3px solid transparent;
  border-radius:999px;
  background:rgba(100,124,140,.34);
  background-clip:padding-box;
  transition:background-color var(--vr-dur) var(--vr-ease);
}
::-webkit-scrollbar-thumb:hover{
  background:rgba(78,102,118,.54);
  background-clip:padding-box;
}
::-webkit-scrollbar-corner{
  background:transparent;
}

/* Scroll-feel class toggled by /studio/scroll-fx.mjs */
.is-scrolling::-webkit-scrollbar-thumb{
  background:rgba(78,102,118,.5);
  background-clip:padding-box;
}
.is-scrolling.scroll-root::-webkit-scrollbar-thumb{
  background:rgba(78,102,118,.5);
}

/* Horizontal rails (stepper, horizontal file lists) stay out of the way */
.studio-shell .stepper::-webkit-scrollbar{
  height:6px;
}

/* ------------------------------------------------------------------ *
 * 10. Inner pages: titles, tabs, tables, empty states
 * ------------------------------------------------------------------ */
.studio-shell .panel-head{
  align-items:flex-start;
  gap:16px;
  margin:0 0 20px;
  padding:0 0 18px;
  border-bottom:1px solid var(--vr-line-soft);
}
.studio-shell .panel-head h2,
.studio-shell .mydocs-head h2{
  margin:0;
  font-size:24px;
  line-height:1.3;
  font-weight:700;
  letter-spacing:-.02em;
  color:var(--vr-ink);
}
.studio-shell .panel-head p,
.studio-shell .mydocs-head p{
  margin:6px 0 0;
  color:var(--vr-muted);
  font-size:13px;
  line-height:1.6;
}
.studio-shell .panel-head .row{gap:8px}
.studio-shell .panel-head .btn.sm{
  height:36px;
  border-radius:var(--vr-radius-control);
  font-size:13px;
}

/* File-picker buttons read as secondary controls, not twin primaries */
.studio-shell .file-btn{
  height:36px;
  padding:0 16px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:#fff;
  color:var(--vr-ink-2);
  font-size:13px;
  font-weight:500;
  cursor:pointer;
  transition:background-color var(--vr-dur) var(--vr-ease),
             border-color var(--vr-dur) var(--vr-ease),
             color var(--vr-dur) var(--vr-ease);
}
.studio-shell .file-btn:hover{
  border-color:#cfe3ee;
  background:var(--vr-surface-muted);
  color:var(--vr-brand-deep);
}
/* Knowledge base uses id-scoped upload rules: keep one primary + one quiet. */
.studio-shell #panel6 .file-btn{
  height:36px;
  padding:0 18px;
  border:1px solid var(--vr-line);
  border-radius:999px;
  background:#fff;
  color:var(--vr-ink-2);
  font-size:13px;
  font-weight:500;
}
.studio-shell #panel6 .file-btn:hover{
  border-color:#cfe3ee;
  background:var(--vr-surface-muted);
  color:var(--vr-brand-deep);
}
.studio-shell #panel6 .panel-head .row > .file-btn:first-child{
  border-color:var(--vr-brand);
  background:var(--vr-brand);
  color:#fff;
  box-shadow:var(--vr-shadow-brand);
}
.studio-shell #panel6 .panel-head .row > .file-btn:first-child:hover{
  border-color:var(--vr-brand-deep);
  background:var(--vr-brand-deep);
  color:#fff;
}

/* Segmented tabs */
.studio-shell .kb-tabs{
  display:inline-flex;
  gap:2px;
  margin:0 0 20px;
  padding:3px;
  border:0;
  border-radius:10px;
  background:var(--vr-surface-muted);
}
.studio-shell .kb-tab{
  height:32px;
  padding:0 14px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--vr-muted);
  font-size:13px;
  font-weight:500;
  transition:background-color var(--vr-dur) var(--vr-ease),
             color var(--vr-dur) var(--vr-ease),
             box-shadow var(--vr-dur) var(--vr-ease);
}
.studio-shell .kb-tab:hover{
  background:#fff;
  color:var(--vr-ink-2);
}
.studio-shell .kb-tab.active{
  background:#fff;
  color:var(--vr-brand-deep);
  font-weight:600;
  box-shadow:0 1px 3px rgba(13,42,62,.10);
}
/* Segmented tabs need no underline indicator from the legacy skin */
.studio-shell .kb-tab.active::after{
  content:none;
  display:none;
}
/* A list that only holds an empty state should not draw a second frame */
.studio-shell .list:has(> .empty-state:not([hidden])){
  border:0;
  border-radius:0;
  background:transparent;
  overflow:visible;
}

/* Section labels inside panels */
.studio-shell .section-title{
  margin:22px 0 10px;
  color:var(--vr-ink);
  font-size:14px;
  font-weight:650;
  letter-spacing:-.01em;
}

/* Data table */
.studio-shell .mydocs-card{
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-card);
  background:#fff;
  box-shadow:var(--vr-shadow-card);
}
.studio-shell .mydocs-table th{
  height:46px;
  padding:0 20px;
  border-bottom:1px solid var(--vr-line-soft);
  background:#f7fbfd;
  color:var(--vr-faint);
  font-size:12px;
  font-weight:600;
  letter-spacing:.02em;
}
.studio-shell .mydocs-table td{
  height:62px;
  padding:0 20px;
  border-bottom:1px solid var(--vr-line-soft);
  color:var(--vr-ink-2);
  font-size:13.5px;
}
.studio-shell .mydocs-table tbody tr,
.studio-shell .mydocs-table tbody tr td{
  transition:background-color var(--vr-dur) var(--vr-ease);
}
.studio-shell .mydocs-table tbody tr:hover td{
  background:#f8fcfe;
}
.studio-shell .mydocs-name{
  font-size:13.5px;
  font-weight:600;
  color:var(--vr-ink);
}
.studio-shell .mydocs-name:hover{color:var(--vr-brand-deep)}
.studio-shell .mydocs-ops .btn{
  height:30px;
  padding:0 12px;
  border-radius:8px;
  font-size:12.5px;
}
.studio-shell .mydocs-ops .btn:last-child:hover{
  border-color:#fecdca;
  background:#fef3f2;
  color:#b42318;
}

/* Skill cards: eight solid buttons would shout; keep a soft-primary hierarchy */
.studio-shell .skill-card{
  padding:18px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  transition:border-color var(--vr-dur) var(--vr-ease),
             box-shadow var(--vr-dur) var(--vr-ease),
             transform var(--vr-dur) var(--vr-ease);
}
.studio-shell .skill-card:hover{
  border-color:#cfe3ee;
  box-shadow:var(--vr-shadow-card-hover);
  transform:translateY(-2px);
}
.studio-shell .skill-card .skill-head b{
  font-size:14.5px;
  font-weight:650;
  color:var(--vr-ink);
}
.studio-shell .skill-card .tag{
  height:20px;
  padding:0 8px;
  border:0;
  border-radius:999px;
  background:var(--vr-surface-muted);
  color:var(--vr-faint);
  font-size:10.5px;
  font-weight:600;
}
.studio-shell .skill-card .btn.xs{
  height:32px;
  padding:0 14px;
  border-radius:8px;
  font-size:12.5px;
}
.studio-shell .skill-card .btn.xs.primary{
  border-color:#cfe8fb;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-weight:600;
  box-shadow:none;
}
.studio-shell .skill-card .btn.xs.primary:hover{
  border-color:var(--vr-brand);
  background:var(--vr-brand);
  color:#fff;
}

/* Inner cards + empty states */
.studio-shell .stage .panel .card{
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  box-shadow:none;
}
.studio-shell .empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding:48px 24px;
  border:1px dashed #d9e8ef;
  border-radius:var(--vr-radius-inner);
  background:#fbfdff;
  color:var(--vr-muted);
  font-size:13px;
  text-align:center;
}
/* The gallery is a CSS multi-column flow, so an empty state would otherwise be
   sliced into one border fragment per column. Keep it whole. */
.studio-shell .image-grid > .empty-state{
  column-span:all;
  break-inside:avoid;
  margin:0;
}
.studio-shell .image-grid:has(> .empty-state:not([hidden])){
  columns:1;
}
.studio-shell .empty-state b{
  color:var(--vr-ink);
  font-size:15px;
  font-weight:650;
}

/* Filters and inline text inputs on inner pages */
.studio-shell .kb-tab-panel input[type="text"],
.studio-shell .kb-tab-panel input[type="search"],
.studio-shell .kb-tab-panel input:not([type]),
.studio-shell #panel9 input[type="text"],
.studio-shell #panel9 input[type="search"],
.studio-shell #panel9 input:not([type]){
  height:38px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:#fff;
  font-size:13px;
}
.studio-shell .kb-tab-panel input:focus,
.studio-shell #panel9 input:focus{
  border-color:var(--vr-brand);
  box-shadow:0 0 0 4px rgba(24,141,249,.12);
  outline:none;
}

/* ------------------------------------------------------------------ *
 * 11. Login / auth screen
 * ------------------------------------------------------------------ */
#authView.auth-wrap{
  /* Full-bleed element so the ambient glow spans the viewport; the inner
     columns keep the 1160px content width. */
  max-width:none;
  min-height:calc(100vh - 64px);
  min-height:calc(100dvh - 64px);
  padding:clamp(40px,7vh,88px) max(32px,calc((100% - 1160px) / 2));
  gap:clamp(40px,5vw,80px);
  align-items:center;
  background:
    radial-gradient(720px 420px at 10% 14%,rgba(24,141,249,.10),transparent 66%),
    radial-gradient(560px 360px at 92% 82%,rgba(34,184,216,.10),transparent 70%);
}
.auth-art h1{
  font-size:clamp(38px,4.4vw,54px);
  line-height:1.12;
  font-weight:750;
  letter-spacing:-.035em;
  color:var(--vr-ink);
}
.auth-art h1 em{
  background:linear-gradient(115deg,#188df9 10%,#22b8d8 90%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.auth-kicker{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 12px;
  margin-bottom:20px;
  border-radius:999px;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-size:12px;
  font-weight:600;
  letter-spacing:.04em;
}
.auth-points{
  gap:12px;
  color:var(--vr-ink-2);
  font-size:13.5px;
}
.auth-card{
  padding:32px;
  border:1px solid var(--vr-line);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--vr-shadow-pop);
}
.auth-card h2{
  font-size:22px;
  font-weight:700;
  letter-spacing:-.02em;
}
.auth-card .muted{
  margin-bottom:20px;
  color:var(--vr-muted);
  font-size:12.5px;
  line-height:1.6;
}
.auth-card label{
  display:block;
  margin-bottom:14px;
  color:var(--vr-ink-2);
  font-size:12.5px;
  font-weight:500;
}
.auth-card input{
  margin-top:6px;
  height:42px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background:#fff;
  font-size:13.5px;
  transition:border-color var(--vr-dur) var(--vr-ease),box-shadow var(--vr-dur) var(--vr-ease);
}
.auth-card input:focus{
  border-color:var(--vr-brand);
  box-shadow:0 0 0 4px rgba(24,141,249,.12);
  outline:none;
}
.auth-card .btn{
  height:42px;
  border-radius:var(--vr-radius-control);
}
.auth-card .btn.demo{
  margin-top:10px;
  border-color:#dceefb;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
  font-weight:600;
}
.auth-card .btn.demo:hover{
  background:#def0fd;
}
@media (max-width:900px){
  #authView.auth-wrap{
    padding:40px 24px;
    gap:32px;
  }
}
@media (max-width:760px){
  #authView.auth-wrap{
    padding:28px 18px;
    min-height:calc(100vh - 58px);
    min-height:calc(100dvh - 58px);
  }
}

/* ------------------------------------------------------------------ *
 * 12. Responsive — mirror the shell breakpoints with new rail width
 * ------------------------------------------------------------------ */
@media (max-width:1599px){
  #appView.studio-shell{grid-template-columns:200px 264px minmax(0,1fr)}
  #appView.studio-shell.rail-collapsed{grid-template-columns:72px 264px minmax(0,1fr)}
  #appView.studio-shell.context-expanded{grid-template-columns:200px 320px minmax(0,1fr)}
  #appView.studio-shell.rail-collapsed.context-expanded{grid-template-columns:72px 320px minmax(0,1fr)}
  #appView.studio-shell:not(.context-active){grid-template-columns:200px minmax(0,1fr)}
  #appView.studio-shell.rail-collapsed:not(.context-active){grid-template-columns:72px minmax(0,1fr)}
  .studio-shell .inspector{
    top:64px;
    height:calc(100vh - 64px);
    height:calc(100dvh - 64px);
  }
}
@media (max-width:1279px){
  #appView.studio-shell,
  #appView.studio-shell.context-expanded,
  #appView.studio-shell:not(.context-active){grid-template-columns:200px minmax(0,1fr)}
  #appView.studio-shell.rail-collapsed,
  #appView.studio-shell.rail-collapsed.context-expanded,
  #appView.studio-shell.rail-collapsed:not(.context-active){grid-template-columns:72px minmax(0,1fr)}
  .studio-shell .context{
    left:200px;
    top:64px;
    height:calc(100vh - 64px);
    height:calc(100dvh - 64px);
  }
  #appView.studio-shell.rail-collapsed .context{
    left:72px;
  }
  .stage-head{
    width:calc(100% - 48px - 2 * var(--stage-gutter,0px));
    padding:18px 0 0;
  }
  .stage-scroll{
    padding:16px 24px 32px;
  }
  .settings-page{
    padding:22px 20px 26px;
  }
  .studio-shell .wizard-footer{
    width:calc(100% - 48px);
  }
}
@media (max-width:760px){
  .cmdbar{
    height:58px;
    padding:0 12px;
    gap:10px;
  }
  .cmdbar .brand-copy small{display:none}
  .cmdbar .quota-chips{
    height:40px;
    gap:12px;
    padding-left:14px;
  }
  .cmdbar .quota-chips .chip:nth-child(2){display:none}
  #appView.studio-shell{
    grid-template-columns:minmax(0,1fr);
    height:calc(100vh - 58px);
    height:calc(100dvh - 58px);
  }
  .studio-shell .rail{
    top:58px;
    width:200px;
    height:calc(100vh - 58px);
    height:calc(100dvh - 58px);
  }
  .studio-shell .context{
    left:200px;
    top:58px;
    height:calc(100vh - 58px);
    height:calc(100dvh - 58px);
    width:min(280px,calc(100vw - 200px));
  }
  #appView.studio-shell.rail-collapsed .context{
    left:72px;
    width:min(280px,calc(100vw - 72px));
  }
  .studio-shell .inspector{
    top:58px;
    height:calc(100vh - 58px);
    height:calc(100dvh - 58px);
  }
  .stage-head{
    width:calc(100% - 32px - 2 * var(--stage-gutter,0px));
    padding:14px 0 0;
  }
  .stage-head #docTitle{font-size:20px}
  .stage-scroll{
    padding:12px 16px 24px;
  }
  .settings-page{
    padding:18px 16px 22px;
    border-radius:14px;
  }
}

/* Honour reduced-motion without flattening the whole UI: drop movement
   (lift/scale) and programmatic smooth scroll, keep colour + opacity feedback. */
@media (prefers-reduced-motion:reduce){
  html,
  .stage-scroll{
    scroll-behavior:auto;
  }
  .studio-shell .bid-method-card:hover,
  .studio-shell .model-card:hover,
  .studio-shell .style-card:hover,
  .studio-shell .layout-card:hover,
  .studio-shell .skill-card:hover,
  .studio-shell .page-thumb:hover{
    transform:none;
  }
}

/* ================================================================== *
 * 13. Writing settings page — two-column layout
 *     Structure ported from 标小信 /dashboard/writing/info:
 *     numbered process rail on the left, settings panel on the right.
 * ================================================================== */
.studio-shell .settings-page{
  max-width:1240px;
  margin:0 auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.wsp-grid{
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);
  gap:28px;
  align-items:start;
}

/* ---- left: process steps ---- */
.wsp-flow{
  display:flex;
  flex-direction:column;
  gap:28px;
  min-width:0;
}
.wsp-step{
  position:relative;
  min-width:0;
  padding-left:46px;
}
.wsp-step::before{
  content:"";
  position:absolute;
  left:15px;
  top:36px;
  bottom:-28px;
  width:2px;
  border-radius:2px;
  background:linear-gradient(180deg,#e2ebf9,#eff5fb);
}
.wsp-step:last-child::before{display:none}
.wsp-step-no{
  position:absolute;
  left:0;
  top:0;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border:1px solid #dbe6f7;
  border-radius:50%;
  background:#fff;
  color:var(--vr-brand-deep);
  font-size:14px;
  font-weight:700;
  box-shadow:0 1px 2px rgba(13,42,62,.05);
}
.wsp-step-title{
  margin:0 0 4px;
  font-size:16.5px;
  font-weight:700;
  line-height:32px;
  letter-spacing:-.012em;
  color:var(--vr-ink);
}
.wsp-step-points{
  list-style:none;
  margin:0 0 16px;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.wsp-step-points li{
  position:relative;
  padding-left:14px;
  color:var(--vr-muted);
  font-size:13px;
  line-height:1.6;
}
.wsp-step-points li::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#c3d4e4;
}

/* blocks inside the left rail are plain sections, not separators */
.wsp-step .settings-block{
  margin:0;
  padding:0;
  border-top:0;
}
.wsp-step .settings-block + .settings-block{
  margin-top:22px;
}
.wsp-step .settings-block-head{
  margin:0 0 12px;
}
.wsp-step .settings-block-head h3{
  font-size:14px;
  font-weight:650;
}
.wsp-step .settings-overview{
  margin:0;
  border:1px solid var(--vr-line-soft);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  box-shadow:0 1px 2px rgba(13,42,62,.04);
}

/* ---- right: settings panel ---- */
.wsp-settings{
  min-width:0;
  padding:22px 24px 24px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-card);
  background:#fff;
  box-shadow:var(--vr-shadow-card);
}
.wsp-settings-head{
  padding:0 0 16px;
  border-bottom:1px solid var(--vr-line-soft);
}
.wsp-settings-head h2{
  margin:0;
  font-size:18px;
  font-weight:700;
  letter-spacing:-.02em;
  color:var(--vr-ink);
}
.wsp-settings-head p{
  margin:5px 0 0;
  color:var(--vr-muted);
  font-size:12.5px;
}
.wsp-settings .settings-block{
  margin:0;
  padding:20px 0;
  border-top:1px solid var(--vr-line-soft);
}
.wsp-settings .settings-block:first-of-type{
  border-top:0;
  padding-top:18px;
}
.wsp-settings .settings-block:last-child{
  padding-bottom:0;
}
.wsp-settings .settings-block-head{
  margin:0 0 12px;
}
.wsp-settings .settings-block-head h3{
  font-size:14.5px;
  font-weight:650;
}

/* Grids must breathe inside a half-width column */
.wsp-flow .model-grid,
.wsp-settings .model-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.wsp-flow .style-card-grid,
.wsp-flow .layout-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.wsp-flow .config-row{
  grid-template-columns:1fr;
  gap:16px;
}
.wsp-settings .bid-method-group{
  grid-template-columns:1fr;
}

/* Footer spans both columns */
.studio-shell .settings-footer.step-actions{
  margin:28px 0 0;
  padding:16px 0 0;
  border-top:1px solid var(--vr-line-soft);
  background:transparent;
}

/* ================================================================== *
 * 14. Inspector removed — the workspace is rail + stage only
 * ================================================================== */
#appView.studio-shell .inspector,
#inspectorToggle{
  display:none !important;
}
#appView.studio-shell{
  grid-template-columns:200px 264px minmax(0,1fr) !important;
}
#appView.studio-shell.rail-collapsed{
  grid-template-columns:72px 264px minmax(0,1fr) !important;
}
#appView.studio-shell.context-expanded{
  grid-template-columns:200px 320px minmax(0,1fr) !important;
}
#appView.studio-shell.rail-collapsed.context-expanded{
  grid-template-columns:72px 320px minmax(0,1fr) !important;
}
#appView.studio-shell:not(.context-active){
  grid-template-columns:200px minmax(0,1fr) !important;
}
#appView.studio-shell.rail-collapsed:not(.context-active){
  grid-template-columns:72px minmax(0,1fr) !important;
}
@media (max-width:1599px){
  #appView.studio-shell,
  #appView.studio-shell.context-expanded{grid-template-columns:200px 264px minmax(0,1fr) !important}
  #appView.studio-shell.rail-collapsed,
  #appView.studio-shell.rail-collapsed.context-expanded{grid-template-columns:72px 264px minmax(0,1fr) !important}
  #appView.studio-shell:not(.context-active){grid-template-columns:200px minmax(0,1fr) !important}
  #appView.studio-shell.rail-collapsed:not(.context-active){grid-template-columns:72px minmax(0,1fr) !important}
}
@media (max-width:1279px){
  #appView.studio-shell,
  #appView.studio-shell.context-expanded,
  #appView.studio-shell:not(.context-active){grid-template-columns:200px minmax(0,1fr) !important}
  #appView.studio-shell.rail-collapsed,
  #appView.studio-shell.rail-collapsed.context-expanded,
  #appView.studio-shell.rail-collapsed:not(.context-active){grid-template-columns:72px minmax(0,1fr) !important}
}
@media (max-width:900px){
  .wsp-grid{grid-template-columns:1fr;gap:22px}
  .wsp-settings{order:-1}
  .wsp-flow .style-card-grid,
  .wsp-flow .layout-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  #appView.studio-shell,
  #appView.studio-shell:not(.context-active){grid-template-columns:minmax(0,1fr) !important}
  .wsp-step{padding-left:40px}
  .wsp-flow .style-card-grid,
  .wsp-flow .layout-grid,
  .wsp-flow .model-grid,
  .wsp-settings .model-grid{grid-template-columns:1fr 1fr}
}

/* ================================================================== *
 * 15. Dialog — motion + skeleton ported from 标小信 (Radix dialog)
 *     overlay fade 150ms, panel fade + zoom 95→100 in 200ms
 * ================================================================== */
html #modalRoot .modal-mask{
  padding:16px;
  background:rgba(15,23,42,.5);
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  animation:vr-mask-in .15s ease both;
}
html #modalRoot .modal{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  width:min(520px,100%);
  max-height:calc(100dvh - 32px);
  overflow:hidden;
  border:1px solid rgba(13,42,62,.08);
  border-radius:12px;
  background:#fff;
  box-shadow:0 26px 64px -24px rgba(13,42,62,.45),0 2px 8px rgba(13,42,62,.06);
  animation:vr-panel-in .2s var(--vr-ease) both;
}
html #modalRoot .modal.wide{
  width:min(1000px,100%);
}
html #modalRoot .modal-head{
  padding:18px 56px 18px 24px;
  border-bottom:1px solid rgba(24,141,249,.12);
}
html #modalRoot .modal-head h3{
  font-size:16px;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--vr-ink);
}
html #modalRoot .modal-close{
  position:absolute;
  top:14px;
  right:14px;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--vr-muted);
  opacity:.75;
  transition:opacity var(--vr-dur) var(--vr-ease),background-color var(--vr-dur) var(--vr-ease);
}
html #modalRoot .modal-close:hover{
  opacity:1;
  background:var(--vr-surface-muted);
  color:var(--vr-ink);
}
html #modalRoot .modal-body{
  padding:20px 24px;
  overflow:auto;
  overscroll-behavior:contain;
}
html #modalRoot .modal-foot{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:14px 24px;
  border-top:1px solid rgba(24,141,249,.12);
  background:#fff;
}
html #modalRoot .modal-foot .btn{
  min-width:88px;
  height:38px;
  border-radius:10px;
  font-weight:600;
}
html #modalRoot.is-closing .modal-mask,
html #modalRoot .modal-mask.modal-mask--leaving{
  animation:vr-mask-out .15s ease both;
}
html #modalRoot.is-closing .modal,
html #modalRoot .modal-mask.modal-mask--leaving .modal{
  animation:vr-panel-out .15s ease both;
}
@keyframes vr-mask-in{from{opacity:0}to{opacity:1}}
@keyframes vr-mask-out{from{opacity:1}to{opacity:0}}
@keyframes vr-panel-in{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
@keyframes vr-panel-out{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}

/* ================================================================== *
 * 16. Scrollbar — matches 标小信 `.custom-scrollbar`
 *     (thin, slate thumb, transparent track, deepens while scrolling)
 * ================================================================== */
::-webkit-scrollbar{
  width:8px;
  height:8px;
}
::-webkit-scrollbar-track{
  background:transparent;
}
::-webkit-scrollbar-thumb{
  min-height:40px;
  border:0;
  border-radius:4px;
  background:#d5dde7;
}
::-webkit-scrollbar-thumb:hover{
  background:#b6c2d1;
}
::-webkit-scrollbar-corner{
  background:transparent;
}
.is-scrolling::-webkit-scrollbar-thumb{
  background:#b6c2d1;
}
*{
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
}

/* Compact selection cards inside the half-width process column */
.wsp-flow .layout-grid{
  gap:10px;
}
.wsp-flow .layout-card{
  min-height:0;
  padding:7px;
  gap:5px;
}
.wsp-flow .layout-preview{
  flex:none;
  height:62px;
}
.wsp-flow .style-card{
  padding:7px;
  gap:5px;
}
.wsp-flow .style-preview{
  height:62px;
  padding:8px;
  gap:3px;
}
.wsp-flow .style-card b,
.wsp-flow .layout-card b{
  font-size:11.5px;
  line-height:1.35;
}

/* Scale labels: 16 stops inside a half column need a tighter type size */
.wsp-settings .page-tick{
  font-size:12px;
  letter-spacing:-.02em;
}
/* Group heads: title + action on one line, hint on its own */
.wsp-settings .settings-block-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:6px 10px;
}
.wsp-settings .settings-block-head h3{
  grid-column:1;
  grid-row:1;
}
.wsp-settings .settings-block-head .settings-counter,
.wsp-settings .settings-block-head .settings-advanced{
  grid-column:2;
  grid-row:1;
  justify-self:end;
  margin:0;
}
.wsp-settings .settings-block-head p{
  grid-column:1 / -1;
  grid-row:2;
}
.wsp-flow .settings-block-head .settings-advanced{
  margin-left:auto;
}

/* Reference geometry: grid-cols-2 + gap-6 (标小信 px-6) */
.wsp-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:24px;
}

/* "或" separator between the two entry cards */
.wsp-or{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:16px 0;
}
.wsp-or::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  height:1px;
  background:var(--vr-line-soft);
}
.wsp-or span{
  position:relative;
  padding:2px 12px;
  border:1px solid var(--vr-line);
  border-radius:999px;
  background:#fff;
  color:var(--vr-faint);
  font-size:12px;
  line-height:1.6;
}

/* Entry action card */
.wsp-action{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:14px 16px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-inner);
  background:#fff;
  text-align:left;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(13,42,62,.04);
  transition:border-color .18s var(--vr-ease),
             box-shadow .18s var(--vr-ease),
             transform .18s var(--vr-ease);
}
.wsp-action:hover{
  border-color:#cfe3ee;
  box-shadow:var(--vr-shadow-card-hover);
  transform:translateY(-1px);
}
.wsp-action-ico{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:none;
  border-radius:10px;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
}
.wsp-action-ico .ico{
  width:18px;
  height:18px;
}
.wsp-action-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.wsp-action-copy b{
  font-size:13.5px;
  font-weight:600;
  color:var(--vr-ink);
}
.wsp-action-copy small{
  font-size:11.5px;
  line-height:1.5;
  color:var(--vr-muted);
}
.wsp-action-arrow{
  margin-left:auto;
  flex:none;
  color:var(--vr-faint);
  transition:color .18s var(--vr-ease);
}
.wsp-action:hover .wsp-action-arrow{
  color:var(--vr-brand);
}

/* ---- right panel fields ---- */
.wsp-field{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.wsp-field + .wsp-field{
  margin-top:24px;
}
.wsp-label{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:14px;
  font-weight:600;
  line-height:1.4;
  color:var(--vr-ink);
}
.wsp-label i{
  color:#e5484d;
  font-style:normal;
  font-weight:600;
}
.wsp-counter{
  margin-left:auto;
  color:var(--vr-faint);
  font-size:12px;
  font-weight:400;
}
.wsp-counter b{
  color:var(--vr-muted);
  font-weight:600;
}
.wsp-help{
  margin:0;
  color:var(--vr-muted);
  font-size:12.5px;
  line-height:1.6;
}
.wsp-tip{
  margin:0;
  color:var(--vr-muted);
  font-size:12px;
  line-height:1.6;
}

/* ---- left: entry cards ---- */
.wsp-entry{
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  padding:14px 16px;
  border:1px solid var(--vr-line);
  border-radius:10px;
  background:#fff;
  text-align:left;
  box-shadow:0 1px 2px rgba(13,42,62,.04);
}
button.wsp-entry{
  cursor:pointer;
  transition:border-color .18s var(--vr-ease),
             box-shadow .18s var(--vr-ease),
             transform .18s var(--vr-ease);
}
button.wsp-entry:hover{
  border-color:#cfe3ee;
  box-shadow:var(--vr-shadow-card-hover);
  transform:translateY(-1px);
}
.wsp-entry.is-static{
  cursor:default;
}
.wsp-entry-ico{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:none;
  border-radius:9px;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
}
.wsp-entry-ico .ico{width:18px;height:18px}
.wsp-entry-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.wsp-entry-copy b{
  font-size:14px;
  font-weight:600;
  color:var(--vr-ink);
}
.wsp-entry-copy small{
  font-size:11.5px;
  line-height:1.55;
  color:var(--vr-muted);
}
.wsp-link{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex:none;
  margin-left:auto;
  height:26px;
  padding:0 10px;
  border:1px solid var(--vr-line);
  border-radius:999px;
  background:#fff;
  color:var(--vr-brand-deep);
  font-size:11.5px;
  cursor:pointer;
  transition:background-color .18s var(--vr-ease),border-color .18s var(--vr-ease);
}
.wsp-link:hover{
  border-color:#cfe3ee;
  background:var(--vr-brand-tint);
}

/* ---- left: dropzone ---- */
.wsp-dropzone{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  width:100%;
  margin-top:12px;
  padding:26px 16px;
  border:1px dashed #c9dceb;
  border-radius:10px;
  background:#fbfdff;
  color:var(--vr-muted);
  cursor:pointer;
  transition:border-color .18s var(--vr-ease),
             background-color .18s var(--vr-ease);
}
.wsp-dropzone:hover{
  border-color:var(--vr-brand);
  background:var(--vr-brand-tint-2);
}
.wsp-dropzone b{
  font-size:13px;
  font-weight:600;
  color:var(--vr-ink-2);
}
.wsp-dropzone small{
  font-size:11.5px;
}
.wsp-dropzone-ico{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid var(--vr-line);
  border-radius:50%;
  background:#fff;
  color:var(--vr-brand);
}
.wsp-dropzone-ico .ico{width:19px;height:19px}

/* ---- right: attachment cards ---- */
.wsp-attach{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.wsp-attach-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:22px 16px;
  border:1px solid var(--vr-line);
  border-radius:10px;
  background:#fff;
  text-align:center;
  cursor:pointer;
  transition:border-color .18s var(--vr-ease),
             background-color .18s var(--vr-ease),
             box-shadow .18s var(--vr-ease);
}
.wsp-attach-card:hover{
  border-color:#cfe3ee;
  background:var(--vr-brand-tint-2);
  box-shadow:0 1px 2px rgba(13,42,62,.05);
}
.wsp-attach-ico{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:50%;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
}
.wsp-attach-ico .ico{width:19px;height:19px}
.wsp-attach-card b{
  font-size:13px;
  font-weight:600;
  color:var(--vr-ink);
}
.wsp-attach-card small{
  font-size:11px;
  line-height:1.5;
  color:var(--vr-muted);
}

/* ---- right: settings section ---- */
.wsp-section{
  margin-top:28px;
  padding-top:22px;
  border-top:1px solid var(--vr-line-soft);
}
.wsp-section-title{
  margin:0 0 16px;
  font-size:16px;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--vr-ink);
}
.studio-shell .style-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.studio-shell .style-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:38px;
  padding:0 14px;
  border:1px solid var(--vr-line);
  border-radius:8px;
  background:#fff;
  color:var(--vr-ink-2);
  font-size:13px;
  font-weight:500;
  transition:border-color .18s var(--vr-ease),
             background-color .18s var(--vr-ease),
             color .18s var(--vr-ease);
}
.studio-shell .style-pill .ico{
  width:15px;
  height:15px;
  color:var(--vr-faint);
}
.studio-shell .style-pill:hover{
  border-color:#cfe3ee;
  background:var(--vr-surface-muted);
}
.studio-shell .style-pill.active{
  border-color:var(--vr-brand);
  background:var(--vr-brand-tint-2);
  color:var(--vr-brand-deep);
  font-weight:600;
}
.studio-shell .style-pill.active .ico{
  color:var(--vr-brand-deep);
}

/* ---- footer: single centered primary (参考页宽 280×48) ---- */
.studio-shell .settings-footer.step-actions{
  margin-top:32px;
}
.studio-shell .settings-footer .step-actions-buttons{
  justify-content:center;
  gap:12px;
}
.studio-shell .settings-footer .step-prev[disabled]{
  display:none;
}
.studio-shell .settings-footer .step-next{
  width:280px;
  height:48px;
  border-radius:10px;
  font-size:15px;
  font-weight:600;
}

/* Attachment pair: force identical geometry regardless of copy length */
.wsp-attach{
  align-items:stretch;
  grid-auto-rows:1fr;
}
.wsp-attach-card{
  height:100%;
  min-height:96px;
  padding:18px 16px;
  gap:6px;
  justify-content:center;
  background:var(--vr-surface-muted);
  border-color:#e6eef4;
}
.wsp-attach-card:hover{
  background:#fff;
  border-color:#cfe3ee;
}
.wsp-attach-ico{
  width:auto;
  height:auto;
  border-radius:0;
  background:transparent;
  color:var(--vr-brand);
}
.wsp-attach-ico .ico{
  width:28px;
  height:28px;
}
.wsp-attach-card b{
  font-size:13.5px;
  font-weight:600;
}
.wsp-attach-card small{
  min-height:32px;
  font-size:11.5px;
}

/* Page field: title + hint share one line, room above for the value bubble */
.wsp-field--pages{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:end;
  column-gap:16px;
  row-gap:0;
}
.wsp-field--pages .wsp-label{
  grid-column:1;
  grid-row:1;
  font-size:15px;
  font-weight:700;
}
.wsp-field--pages .wsp-help{
  grid-column:2;
  grid-row:1;
  justify-self:start;
  font-size:12.5px;
}
.wsp-field--pages .page-range{
  grid-column:1 / -1;
  grid-row:2;
  margin-top:46px;
}

/* Reference input: tinted fill, inner shadow, 44px, radius 8 */
.wsp-settings .settings-input{
  height:44px;
  padding:0 12px;
  border:1px solid #e6eef4;
  border-radius:8px;
  background:var(--vr-surface-muted);
  box-shadow:inset 0 1px 2px rgba(13,42,62,.04);
  font-size:14px;
}
.wsp-settings .settings-input::placeholder{
  color:#9ca3af;
}
.wsp-settings .settings-input:hover{
  border-color:#d3e3ee;
}
.wsp-settings .settings-input:focus{
  border-color:var(--vr-brand);
  background:#fff;
  box-shadow:0 0 0 3px rgba(24,141,249,.14);
}

/* Reference pills: 38px, radius 8, semibold label with leading icon */
.studio-shell .style-pill{
  height:38px;
  padding:0 12px;
  border-radius:8px;
  gap:7px;
  font-size:13.5px;
  font-weight:600;
}
.studio-shell .style-pill.active{
  border-color:var(--vr-brand);
  background:rgba(24,141,249,.06);
  color:var(--vr-brand-deep);
  box-shadow:0 8px 20px -14px rgba(24,141,249,.7);
}

/* Page field header: align the title with the first line of the hint */
.wsp-field--pages{
  align-items:start;
}
.wsp-field--pages .wsp-help{
  padding-top:3px;
}

/* ================================================================== *
 * 17. Settings step — full-bleed canvas (标小信 /writing/info)
 *     Only [data-bid-step="0"]; the other four pipeline screens keep
 *     the centred 1240 column.
 * ================================================================== */
#appView[data-bid-step="0"] .stage-head .doc-head{
  display:none;
}
#appView[data-bid-step="0"] .stage-head{
  width:calc(100% - 48px);
  max-width:1760px;
  padding-top:16px;
}
#appView[data-bid-step="0"] .stage-scroll{
  padding:14px 24px 48px;
}
#appView[data-bid-step="0"] .stage #panel0{
  max-width:1760px;
}
#appView[data-bid-step="0"] .settings-page{
  max-width:1760px;
  margin:0 auto;
}

/* Both columns are white cards, radius/padding matched to the reference */
#appView[data-bid-step="0"] .wsp-flow{
  gap:32px;
  padding:28px 20px;
  border:1px solid rgba(24,141,249,.10);
  border-radius:8px;
  background:#fff;
  box-shadow:0 10px 28px -16px rgba(13,42,62,.22);
}
#appView[data-bid-step="0"] .wsp-settings{
  padding:28px 20px;
  border:1px solid rgba(24,141,249,.10);
  border-radius:8px;
  background:#fff;
  box-shadow:0 10px 28px -16px rgba(13,42,62,.22);
}
/* Inner tiles follow the same 8px language */
#appView[data-bid-step="0"] .wsp-entry,
#appView[data-bid-step="0"] .wsp-attach-card,
#appView[data-bid-step="0"] .wsp-dropzone{
  border-radius:8px;
}
#appView[data-bid-step="0"] .wsp-step-points li{
  font-size:14px;
}
#appView[data-bid-step="0"] .wsp-step-title{
  font-size:20px;
}

/* Reclaim the left gutter so the wide canvas starts flush at the page padding */
#appView[data-bid-step="0"] .stage-scroll{
  scrollbar-gutter:stable;
}

/* ================================================================== *
 * 18. Overlay scrollbar (drawn by /studio/scroll-fx.mjs)
 *     Native thin bars on Windows keep their own track/arrow chrome and
 *     Chromium ignores ::-webkit-scrollbar once scrollbar-width is set,
 *     so the thumb is rendered as a positioned element instead.
 * ================================================================== */
.vr-sb{
  position:fixed;
  width:10px;
  z-index:80;
  display:none;
  opacity:0;
  pointer-events:auto;
  transition:opacity .16s ease;
}
.vr-sb.is-visible{
  opacity:1;
}
.vr-sb-thumb{
  position:absolute;
  left:2px;
  width:6px;
  border-radius:999px;
  background:rgba(100,124,140,.42);
  cursor:grab;
  transition:background-color .16s ease,left .16s ease,width .16s ease;
}
.vr-sb:hover .vr-sb-thumb{
  left:1px;
  width:8px;
  background:rgba(78,102,118,.6);
}
.vr-sb-thumb:active{
  cursor:grabbing;
  background:rgba(78,102,118,.68);
}
.vr-sb-host{
  scrollbar-width:none;
}
.vr-sb-host::-webkit-scrollbar{
  display:none;
}

/* ================================================================== *
 * 19. All five pipeline steps use the full-bleed canvas
 * ================================================================== */
#appView.writing-active .stage-head{
  width:calc(100% - 48px);
  max-width:1760px;
}
#appView.writing-active .stage-scroll{
  padding:14px 24px 48px;
  scrollbar-gutter:stable;
}
#appView.writing-active .stage .panel{
  max-width:1760px;
}

/* Settings step: cards fill the viewport instead of leaving canvas below */
#appView[data-bid-step="0"] .stage-scroll{
  display:flex;
  flex-direction:column;
}
#appView[data-bid-step="0"] #panel0{
  flex:1 0 auto;
  display:flex;
  flex-direction:column;
  width:100%;
}
#appView[data-bid-step="0"] .settings-page{
  flex:1 0 auto;
  display:flex;
  flex-direction:column;
  width:100%;
}
#appView[data-bid-step="0"] .wsp-grid{
  flex:1 0 auto;
  align-items:stretch;
}

/* Illustration pills now live in the 写正文 step of the left column */
.wsp-pill-stack{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.wsp-pill-stack .wsp-label{
  font-size:13.5px;
  font-weight:600;
}
.wsp-pill-stack .style-pills{
  gap:8px;
}

/* Attachment block now lives inside the 读文件 step */
.wsp-step-body > .wsp-field{
  margin-top:22px;
}
/* No dead canvas under the footer on the settings step */
#appView[data-bid-step="0"] .stage-scroll{
  padding-bottom:12px;
}

/* theme-lq reserved 84px under the workspace for the legacy fixed footer;
   the footer is static now, so the band was pure dead space that looked
   like the old theme covering the bottom of every step. */
#stage.workspace{
  padding-bottom:0;
}

/* ================================================================== *
 * 20. 正文编写 — same two-card split as the settings page
 *     The panel becomes transparent; the chapter tree and the editor
 *     surface become the two cards.
 * ================================================================== */
#appView[data-bid-step="3"] #panel3{
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
#appView[data-bid-step="3"] #panel3 > .panel-head{
  margin-bottom:20px;
}
#appView[data-bid-step="3"] .write-grid{
  gap:24px;
  align-items:stretch;
}
#appView[data-bid-step="3"] .chapter-pane,
#appView[data-bid-step="3"] .write-main{
  border:1px solid rgba(24,141,249,.10);
  border-radius:8px;
  background:#fff;
  box-shadow:0 10px 28px -16px rgba(13,42,62,.22);
}
#appView[data-bid-step="3"] .chapter-items{
  max-height:calc(100vh - 340px);
}
#appView[data-bid-step="3"] #panel3 > .step-actions{
  margin-top:24px;
  padding-top:16px;
  border-top:1px solid var(--vr-line-soft);
}

/* ================================================================== *
 * 21. Remove the page title block globally; keep only the stepper
 * ================================================================== */
#appView.writing-active .stage-head .doc-head{
  display:none;
}
#appView.writing-active .stage-head{
  padding-top:14px;
}
#appView.writing-active .stepper{
  margin-top:0;
}

/* Docked 文档结构 pane becomes a floating card, like the other panels */
@media (min-width:1280px){
  .studio-shell .context{
    margin:12px;
    height:calc(100% - 24px);
    border:1px solid rgba(24,141,249,.10);
    border-radius:8px;
    box-shadow:0 10px 28px -16px rgba(13,42,62,.22);
  }
  .studio-shell .context .context-head{
    border-radius:8px 8px 0 0;
  }
}

/* ================================================================== *
 * 22. 目录编写 — 文档结构 + 目录主卡 同处一个网格、两张对齐的卡
 *     The context pane now lives inside #panel2, so the shell no longer
 *     reserves a 264px column for it.
 * ================================================================== */
#appView.studio-shell.context-active{grid-template-columns:200px minmax(0,1fr) !important}
#appView.studio-shell.rail-collapsed.context-active{grid-template-columns:72px minmax(0,1fr) !important}
@media (max-width:1599px){
  #appView.studio-shell.context-active{grid-template-columns:200px minmax(0,1fr) !important}
  #appView.studio-shell.rail-collapsed.context-active{grid-template-columns:72px minmax(0,1fr) !important}
}
@media (max-width:1279px){
  #appView.studio-shell.context-active,
  #appView.studio-shell.rail-collapsed.context-active{grid-template-columns:200px minmax(0,1fr) !important}
}

#appView[data-bid-step="2"] #panel2{
  animation:none;
}

@media (min-width:1280px){
  #appView[data-bid-step="2"] .catalog-grid{
    display:grid;
    grid-template-columns:240px minmax(0,1fr);
    gap:24px;
    align-items:stretch;
  }
  #appView[data-bid-step="2"] .catalog-grid > .context{
    margin:0;
    height:auto;
    max-height:none;
    border:1px solid rgba(24,141,249,.10);
    border-radius:8px;
    background:#fff;
    box-shadow:0 10px 28px -16px rgba(13,42,62,.22);
    overflow:auto;
  }
  #appView[data-bid-step="2"] .catalog-grid > .catalog-main{
    min-width:0;
    padding:28px 30px;
    border:1px solid rgba(24,141,249,.10);
    border-radius:8px;
    background:#fff;
    box-shadow:0 10px 28px -16px rgba(13,42,62,.22);
  }
}

/* 最近标书 fold */
.side-docs-fold > summary{
  cursor:pointer;
  list-style:none;
}
.side-docs-fold > summary::-webkit-details-marker{display:none}
.side-docs-fold > summary::after{
  content:"展开";
  float:right;
  color:var(--vr-brand-deep);
  font-size:11px;
}
.side-docs-fold[open] > summary::after{content:"收起"}

/* The panel itself becomes a bare wrapper; the two cards live in .catalog-grid */
#appView[data-bid-step="2"] #panel2{
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}

/* Drawer closed state must clear the rail width as well: left:200 + -110%
   used to leave ~170px of the pane on screen. */
@media (max-width:1279px){
  .studio-shell .context{
    transform:translateX(calc(-100% - 200px));
  }
  .studio-shell .context.open{
    transform:none;
  }
  #appView.studio-shell.rail-collapsed .context{
    transform:translateX(calc(-100% - 72px));
  }
  #appView.studio-shell.rail-collapsed .context.open{
    transform:none;
  }
}

/* ================================================================== *
 * 23. 目录编写：整页固定一屏，表格内部滚动
 * ================================================================== */
@media (min-width:1280px){
  #appView[data-bid-step="2"] .catalog-grid{
    height:calc(100dvh - 162px);
  }
  #appView[data-bid-step="2"] .catalog-grid > .context{
    height:100%;
    max-height:100%;
    overflow:auto;
  }
  #appView[data-bid-step="2"] .catalog-main{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #appView[data-bid-step="2"] .catalog-main > .tree-table{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
  }
  #appView[data-bid-step="2"] .catalog-main > .step-actions{
    flex:0 0 auto;
    margin-top:12px;
    padding-top:12px;
  }
}

/* ================================================================== *
 * 24. 正文编写：标题进卡 + 左卡 240
 * ================================================================== */
#appView[data-bid-step="3"] .write-grid{
  grid-template-columns:240px minmax(0,1fr);
}
#appView[data-bid-step="3"] .write-main{
  display:flex;
  flex-direction:column;
}
#appView[data-bid-step="3"] .write-main > .panel-head{
  margin:0;
  padding:18px 20px 14px;
  border-bottom:1px solid var(--vr-line-soft);
}
#appView[data-bid-step="3"] .write-main > .panel-head h2{
  font-size:18px;
}
#appView[data-bid-step="3"] .write-main > .panel-head p{
  margin-top:4px;
  font-size:12px;
}

/* ================================================================== *
 * 25. 导出交付：内部分区统一卡片语言
 * ================================================================== */
#appView[data-bid-step="5"] .export-layout{
  gap:16px;
}
#appView[data-bid-step="5"] .export-basic,
#appView[data-bid-step="5"] .export-advanced{
  border:1px solid rgba(24,141,249,.10);
  border-radius:8px;
  background:var(--vr-surface-muted);
}
#appView[data-bid-step="5"] .export-basic{
  padding:22px 24px;
}
#appView[data-bid-step="5"] .export-basic-head h3{
  font-size:15px;
  font-weight:650;
}
#appView[data-bid-step="5"] .export-basic-head span{
  font-size:12px;
}
#appView[data-bid-step="5"] .export-basic-grid{
  gap:16px 20px;
  margin-top:16px;
}

/* ================================================================== *
 * 26. 章节筛选命中高亮
 * ================================================================== */
.ctx-hit{
  padding:0 1px;
  border-radius:3px;
  background:#fde68a;
  color:#5a4600;
  font-weight:600;
}

/* exact fit: the grid plus the scroll padding must not overflow */
@media (min-width:1280px){
  #appView[data-bid-step="2"] .catalog-grid{
    height:calc(100dvh - 198px);
  }
}

/* ================================================================== *
 * 27. 目录编写改回完整高度：卡片随内容生长，页面整体滚动
 *     (撤销 23 节的一屏限高，改为页脚吸底解决"点不到下一步")
 * ================================================================== */
@media (min-width:1280px){
  #appView[data-bid-step="2"] .catalog-grid{
    height:auto;
    align-items:stretch;
  }
  #appView[data-bid-step="2"] .catalog-grid > .context{
    height:auto;
    max-height:none;
    overflow:auto;
  }
  #appView[data-bid-step="2"] .catalog-main{
    height:auto;
    display:block;
    overflow:visible;
  }
  #appView[data-bid-step="2"] .catalog-main > .tree-table{
    flex:none;
    min-height:0;
    overflow:visible;
  }
}

/* Sticky wizard footer: always reachable while the long outline scrolls */
#appView[data-bid-step="2"] .catalog-main > .step-actions{
  position:sticky;
  bottom:-1px;
  z-index:6;
  margin:24px -30px -28px;
  padding:14px 30px 18px;
  border-top:1px solid var(--vr-line-soft);
  background:linear-gradient(180deg,rgba(255,255,255,.86),#fff 46%);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
}

/* ================================================================== *
 * 28. 目录编写页脚：悬浮胶囊（sticky，居中，和卡片同款语言）
 *     覆盖 27 节的通栏吸底条
 * ================================================================== */
#appView[data-bid-step="2"] .catalog-main > .step-actions{
  position:sticky;
  bottom:16px;
  z-index:6;
  margin:28px 0 0;
  padding:0;
  border-top:0;
  background:transparent;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  text-align:center;
}
#appView[data-bid-step="2"] .catalog-main > .step-actions > .step-actions-buttons{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:7px 9px;
  border:1px solid rgba(24,141,249,.12);
  border-radius:999px;
  background:rgba(255,255,255,.94);
  box-shadow:0 14px 32px -14px rgba(13,42,62,.34),0 2px 6px rgba(13,42,62,.06);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
#appView[data-bid-step="2"] .catalog-main > .step-actions .step-prev,
#appView[data-bid-step="2"] .catalog-main > .step-actions .step-next{
  height:38px;
  min-width:112px;
  margin:0;
  border-radius:999px;
}

/* 目录编写：前进入口挪到标题栏「版本历史」右侧，底栏不再需要 */
#appView[data-bid-step="2"] .catalog-main > .step-actions{
  display:none;
}

/* ================================================================== *
 * 29. 招标解读：上传解析动画（借鉴链企 lq-hex 跑马灯 + 不定长进度条）
 * ================================================================== */
.hex-load{
  width:16px;
  height:16px;
  margin-right:7px;
  vertical-align:-3px;
}
.hex-load path{
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.hex-load .trk{
  opacity:.22;
}
.hex-load .run{
  stroke-dasharray:26 74;
  animation:hex-run 1s linear infinite;
}
@keyframes hex-run{
  to{stroke-dashoffset:-100}
}

/* Indeterminate bar at the bottom of the parsing card */
.studio-shell .file-progress-card{
  position:relative;
  overflow:hidden;
}
.studio-shell .file-progress-card:not(.done):not(.fail)::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:linear-gradient(90deg,transparent,var(--vr-brand),transparent);
  background-size:38% 100%;
  background-repeat:no-repeat;
  animation:fpc-bar 1.3s ease-in-out infinite;
}
@keyframes fpc-bar{
  0%{background-position:-40% 0}
  100%{background-position:140% 0}
}

/* ================================================================== *
 * 30. 招标解读：文件卡（对齐链企 smart-card）
 * ================================================================== */
#wspParse .file-progress-card{
  margin:16px 0 0;
  padding:0;
  border:1px solid var(--vr-line);
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}
#wspParse .fpc-row{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 20px 12px;
}
#wspParse .fpc-icon{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  flex:none;
  border-radius:6px;
  background:var(--vr-brand-tint);
  color:var(--vr-brand-deep);
}
#wspParse .fpc-icon .ico{width:16px;height:16px}
#wspParse .fpc-info{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  flex:1;
}
#wspParse .fpc-info b{
  font-size:15px;
  font-weight:600;
  color:var(--vr-ink);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#wspParse .fpc-info span{
  font-size:13px;
  color:var(--vr-muted);
}
#wspParse .fpc-state{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:none;
  padding:2px 8px;
  border-radius:6px;
  font-size:12px;
  font-weight:600;
  background:var(--vr-surface-muted);
  color:var(--vr-muted);
}
#wspParse #tenderFileCard.done .fpc-state{background:#eafaec;color:#037835}
#wspParse #tenderFileCard.fail .fpc-state{background:#fdecec;color:#b42318}
#wspParse .fpc-status{
  padding:0 20px 12px;
  font-size:12px;
  color:var(--vr-muted);
}
#wspParse .fpc-bar{
  height:3px;
  margin:0 20px 14px;
  border-radius:999px;
  background:#eef3f8;
  overflow:hidden;
}
#wspParse .fpc-bar i{
  display:block;
  height:100%;
  width:30%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--vr-brand),#59c2ff);
  transform:translateX(-100%);
  animation:fpc-slide 1.4s ease-in-out infinite;
}
#wspParse #tenderFileCard.done .fpc-bar,
#wspParse #tenderFileCard.fail .fpc-bar{display:none}
@keyframes fpc-slide{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(430%)}
}

/* 解析结果两栏：标题 16/600、盒子加高、圆角统一 */
#wspParse .parse-result-editor{
  gap:16px;
  margin:16px 0 0;
}
#wspParse .pr-head{
  display:flex;
  align-items:center;
  gap:3px;
  margin-bottom:10px;
  font-size:16px;
  font-weight:600;
  color:var(--vr-ink);
}
#wspParse .pr-head i{
  color:#de3b3d;
  font-style:normal;
}
#wspParse .pr-box{
  height:400px;
  padding:16px 18px;
  border:1px solid var(--vr-line);
  border-radius:8px;
  background:#fff;
  font-size:13px;
  line-height:1.9;
  color:var(--vr-ink-2);
}
#wspParse .pr-box:focus{
  border-color:var(--vr-brand);
  box-shadow:0 0 0 3px rgba(24,141,249,.12);
}

/* ================================================================== *
 * 31. 解析结果：骨架 → 淡入 → 分段流入
 * ================================================================== */
.parse-skel-status{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  color:var(--vr-muted);
  font-size:12.5px;
}
.sk-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--vr-brand);
  animation:sk-dot 1.1s ease-in-out infinite;
}
@keyframes sk-dot{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.35;transform:scale(.8)}
}
.is-skeleton .pr-box{
  border-color:rgba(24,141,249,.08);
  background:#fbfdff;
}
.sk-line{
  display:block;
  height:10px;
  margin:12px 0;
  border-radius:6px;
  background:linear-gradient(90deg,#eef3f8 25%,#e2ebf5 37%,#eef3f8 63%);
  background-size:400% 100%;
  animation:sk-shimmer 1.4s ease infinite;
}
.sk-line.w58{width:58%}
.sk-line.w64{width:64%}
.sk-line.w68{width:68%}
.sk-line.w74{width:74%}
.sk-line.w80{width:80%}
.sk-line.w82{width:82%}
.sk-line.w86{width:86%}
.sk-line.w90{width:90%}
.sk-line.w92{width:92%}
@keyframes sk-shimmer{
  0%{background-position:100% 0}
  100%{background-position:0 0}
}

/* 两栏淡入上浮 */
.parse-result-editor.is-entering .pr-col{
  animation:pr-rise .36s var(--vr-ease) both;
}
.parse-result-editor.is-entering .pr-col:nth-child(2){
  animation-delay:.08s;
}
@keyframes pr-rise{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:none}
}

/* 流入时的光标 */
.pr-box.is-streaming::after{
  content:"";
  display:inline-block;
  width:2px;
  height:14px;
  margin-left:2px;
  vertical-align:-2px;
  background:var(--vr-brand);
  animation:caret-blink .9s steps(1) infinite;
}
@keyframes caret-blink{
  0%,49%{opacity:1}
  50%,100%{opacity:0}
}

/* 解析失败：骨架内联报错，不再整块替换成红色 alert */
.parse-error{
  padding:20px 0;
  color:#b42318;
  font-size:13px;
  line-height:1.7;
}
.parse-error .muted{
  color:var(--vr-muted);
}

/* ================================================================== *
 * 32. 解析结果在“上传模块下方”过渡呈现，不再整页替换
 * ================================================================== */
#wspParse .br-result{
  margin-top:12px;
  transition:opacity .22s var(--vr-ease), transform .22s var(--vr-ease);
}
#wspParse .br-result.is-entering{
  opacity:0;
  transform:translateY(10px);
}
#wspParse .br-result.is-leaving{
  opacity:0;
  transform:translateY(-6px);
  transition-duration:.12s;
}

/* ================================================================== *
 * 33. 解析模块三态：等待 / 解析中 / 已完成
 * ================================================================== */
#wspParse .pr-head{
  display:flex;
  align-items:center;
  gap:8px;
}
#wspParse .pr-title{
  display:inline-flex;
  align-items:center;
  gap:3px;
}
#wspParse .pr-state{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-left:auto;
  padding:2px 9px;
  border-radius:999px;
  background:var(--vr-surface-muted);
  color:var(--vr-faint);
  font-size:11.5px;
  font-weight:600;
  transition:background-color .25s ease,color .25s ease;
}
#wspParse .parse-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  opacity:.55;
}
#wspParse .pr-col[data-state="pending"] .parse-dot{
  animation:sk-dot 1.2s ease-in-out infinite;
}
#wspParse .pr-col[data-state="streaming"] .pr-state{
  background:#f3edff;
  color:#6b4eff;
}
#wspParse .pr-col[data-state="streaming"] .parse-dot{
  animation:sk-dot .9s ease-in-out infinite;
}
#wspParse .pr-col[data-state="done"] .pr-state{
  background:#eafaec;
  color:#037835;
}
#wspParse .pr-col[data-state="done"] .parse-dot{
  animation:none;
  opacity:1;
}
#wspParse .pr-col[data-state="error"] .pr-state{
  background:#fdecec;
  color:#b42318;
}

#wspParse .pr-box{
  transition:background .5s ease,border-color .5s ease;
}
#wspParse .pr-col[data-state="pending"] .pr-box{
  background:linear-gradient(180deg,#ffffff 0%,#fbf9ff 100%);
  border-color:#ece5fa;
}
#wspParse .pr-col[data-state="streaming"] .pr-box{
  background:linear-gradient(180deg,#ffffff 0%,#f4eeff 100%);
  border-color:#e2d6ff;
}
#wspParse .pr-col[data-state="done"] .pr-box{
  background:#fff;
  border-color:var(--vr-line);
}

#wspParse .pr-col .pr-check{
  opacity:0;
  transform:scale(.8);
  transition:opacity .18s ease,transform .18s ease;
}
#wspParse .pr-col[data-state="done"] .pr-check{
  opacity:1;
  transform:none;
}

/* 状态点跟随徽标颜色（避免被 .pr-head i 的必填红星覆盖） */
#wspParse .pr-head .pr-state i,
#wspParse .pr-head .pr-state .parse-dot{
  color:inherit;
}
/* 徽标已表达完成态，隐藏旧的右上角勾，避免与徽标重叠 */
#wspParse .pr-col .pr-check{
  display:none;
}

/* ================================================================== *
 * 34. 页码滑块对齐参考站：热区透明、气泡上浮、动画同步
 * ================================================================== */
#appView .page-range{
  touch-action:none;
}

/* 46px 热区必须是透明的，视觉轨道只由 ::before 提供 */
#appView .page-track{
  background:transparent;
}
#appView .page-track::before{
  background:#e2e8fa;
}

/* 填充 / 手柄 / 气泡 / 箭头统一 200ms，避免"数字跳、气泡追" */
#appView .page-fill{
  transition:width .2s cubic-bezier(0,0,.2,1), background-color .2s ease;
}
#appView .page-thumb{
  transition:left .2s cubic-bezier(0,0,.2,1),
             transform .18s cubic-bezier(.2,0,0,1),
             box-shadow .18s cubic-bezier(.2,0,0,1);
}
#appView .page-bubble{
  top:-28px;
  transition:left .2s cubic-bezier(0,0,.2,1), background-color .2s ease;
}
#appView .page-arrow{
  top:0;
  z-index:3;
  transition:left .2s cubic-bezier(0,0,.2,1), border-color .2s ease;
}

/* ================================================================== *
 * 35. 版式导出页：控件与折叠面板的交互样式
 * ================================================================== */
#panel5 .export-layout{
  gap:14px;
}

/* 下拉：40px 高、10px 圆角、自绘箭头、悬停/聚焦反馈 */
#panel5 select{
  -webkit-appearance:none;
  appearance:none;
  height:40px;
  padding:0 36px 0 12px;
  border:1px solid var(--vr-line);
  border-radius:var(--vr-radius-control);
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23647482' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:14px;
  color:var(--vr-ink);
  font-size:13.5px;
  line-height:1;
  cursor:pointer;
  transition:border-color .16s var(--vr-ease),
             box-shadow .16s var(--vr-ease),
             background-color .16s var(--vr-ease);
}
#panel5 select:hover{
  border-color:#cfe3ee;
  background-color:var(--vr-surface-muted);
}
#panel5 select:focus{
  outline:none;
  border-color:var(--vr-brand);
  background-color:#fff;
  box-shadow:0 0 0 3px rgba(24,141,249,.12);
}

/* 复选框：自绘方形勾选，带悬停底与聚焦环 */
#panel5 .check{
  display:inline-flex;
  align-items:center;
  gap:8px;
  height:32px;
  padding:0 10px;
  border-radius:8px;
  color:var(--vr-ink-2);
  font-size:13px;
  cursor:pointer;
  transition:background-color .16s var(--vr-ease),color .16s var(--vr-ease);
}
#panel5 .check:hover{
  background:var(--vr-surface-muted);
  color:var(--vr-ink);
}
#panel5 .check input[type="checkbox"]{
  -webkit-appearance:none;
  appearance:none;
  width:16px;
  height:16px;
  margin:0;
  flex:none;
  display:grid;
  place-items:center;
  border:1px solid #cfdae3;
  border-radius:4px;
  background:#fff;
  cursor:pointer;
  transition:background-color .16s var(--vr-ease),border-color .16s var(--vr-ease);
}
#panel5 .check input[type="checkbox"]::after{
  content:"";
  width:9px;
  height:5px;
  border:2px solid #fff;
  border-top:0;
  border-right:0;
  transform:rotate(-45deg) scale(0);
  transition:transform .12s var(--vr-ease);
}
#panel5 .check input[type="checkbox"]:hover{
  border-color:var(--vr-brand);
}
#panel5 .check input[type="checkbox"]:checked{
  background:var(--vr-brand);
  border-color:var(--vr-brand);
}
#panel5 .check input[type="checkbox"]:checked::after{
  transform:rotate(-45deg) scale(1);
}
#panel5 .check input[type="checkbox"]:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(24,141,249,.2);
}

/* 高级版式折叠：整行可点、悬停浅底、展开时箭头翻转 */
#panel5 .export-advanced{
  border-radius:8px;
  overflow:hidden;
  transition:border-color .16s var(--vr-ease),box-shadow .16s var(--vr-ease);
}
#panel5 .export-advanced summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:16px 20px;
  font-size:14px;
  font-weight:600;
  color:var(--vr-ink);
  list-style:none;
  cursor:pointer;
  transition:background-color .16s var(--vr-ease);
}
#panel5 .export-advanced summary::-webkit-details-marker{display:none}
#panel5 .export-advanced summary:hover{
  background:var(--vr-surface-muted);
}
#panel5 .export-advanced summary .ico{
  color:var(--vr-faint);
  transition:transform .2s var(--vr-ease),color .16s var(--vr-ease);
}
#panel5 .export-advanced summary:hover .ico{
  color:var(--vr-brand);
}
#panel5 .export-advanced[open] summary{
  border-bottom:1px solid var(--vr-line-soft);
  background:var(--vr-surface-muted);
}
#panel5 .export-advanced[open] summary .ico{
  transform:rotate(180deg);
}
#panel5 .export-advanced .export-grid{
  padding:18px 20px 20px;
}

/* 顶部指标卡：统一卡片语言 */
#panel5 .kpi-grid{
  gap:0;
  border:1px solid rgba(24,141,249,.10);
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}
#panel5 .kpi{
  padding:16px 20px;
  border-left:1px solid var(--vr-line-soft);
  transition:background-color .16s var(--vr-ease);
}
#panel5 .kpi:first-child{
  border-left:0;
}
#panel5 .kpi:hover{
  background:var(--vr-surface-muted);
}
#panel5 .kpi-label{
  color:var(--vr-faint);
  font-size:12px;
}
#panel5 .kpi-value{
  margin-top:6px;
  color:var(--vr-ink);
  font-size:24px;
  font-weight:700;
  letter-spacing:-.02em;
}

/* 复选框宽度受旧规则 padding 影响，这里锁定盒子模型 */
#panel5 .check input[type="checkbox"]{
  box-sizing:border-box;
  padding:0;
  min-width:16px;
  max-width:16px;
}

/* ================================================================== *
 * 36. 高级版式：展开/收起过渡 + 字体下拉交互
 * ================================================================== */
@supports (interpolate-size: allow-keywords){
  :root{
    interpolate-size: allow-keywords;
  }
  #panel5 .export-advanced::details-content{
    block-size:0;
    overflow:hidden;
    opacity:0;
    transition:block-size .3s var(--vr-ease),
               opacity .22s var(--vr-ease),
               content-visibility .3s allow-discrete;
  }
  #panel5 .export-advanced[open]::details-content{
    block-size:auto;
    opacity:1;
  }
}

/* 展开时内容轻微上浮，收起时立即归位 */
@supports not (interpolate-size: allow-keywords){
  #panel5 .export-advanced .export-grid{
    animation:adv-in .22s var(--vr-ease) both;
  }
  @keyframes adv-in{
    from{opacity:0;transform:translateY(-4px)}
    to{opacity:1;transform:none}
  }
}

/* 字体下拉：选中项用对应字体渲染，给即时预览 */
#panel5 #expBodyFont{
  font-weight:500;
  letter-spacing:.02em;
}
#panel5 #expBodyFont option{
  font-size:13.5px;
  padding:6px 8px;
}

/* 高级区里的每个 label 统一垂直节奏 */
#panel5 .export-grid label{
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--vr-muted);
  font-size:12.5px;
}
#panel5 .export-grid .table-density-row{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
}

/* ================================================================== *
 * 37. 自定义下拉：替换 Windows 原生黑色菜单
 *     依赖 Chrome 135+ 的 appearance: base-select
 * ================================================================== */
#panel5 select{
  appearance: base-select;
  -webkit-appearance: base-select;
  background-image: none;          /* 交给 ::picker-icon 画箭头 */
  padding: 0 10px 0 12px;
}
#panel5 select::picker-icon{
  color: var(--vr-faint);
  margin-left: 6px;
  transition: transform .2s var(--vr-ease), color .16s var(--vr-ease);
}
#panel5 select:hover::picker-icon{
  color: var(--vr-brand);
}
#panel5 select:open::picker-icon{
  transform: rotate(180deg);
}

#panel5 select::picker(select){
  appearance: base-select;
  -webkit-appearance: base-select;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--vr-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px -22px rgba(13,42,62,.4), 0 2px 8px rgba(13,42,62,.06);
}

#panel5 select option{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff;
  color: var(--vr-ink);
  font-size: 13.5px;
  line-height: 1.3;
  cursor: pointer;
}
#panel5 select option:hover{
  background: var(--vr-surface-muted);
}
#panel5 select option:checked{
  background: var(--vr-brand-tint);
  color: var(--vr-brand-deep);
  font-weight: 600;
}
/* 选中项不再显示系统勾选图标，用浅色底表达 */
#panel5 select option::checkmark{
  display: none;
}

/* 用我们自己的 chevron 替代 base-select 默认的小三角 */
#panel5 select::picker-icon{
  display: none;
}
#panel5 select{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23647482' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding: 0 36px 0 12px;
}
#panel5 select:hover{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23188df9' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* base-select 会把选中项当作按钮内容渲染，需要显式垂直居中 */
#panel5 select{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 1.2;
}
#panel5 select option{
  display: block;
  padding: 8px 10px;
}

/* 固定向下展开，避免贴到视口边缘时翻到控件上方 */
#panel5 select::picker(select){
  position-area: bottom;
  margin: 6px 0 0;
  padding: 6px;
  overflow: hidden;
  border-radius: 10px;
}
/* 选项与控件文字左对齐，选中态裁进圆角内 */
#panel5 select option{
  margin: 0 0 2px;
  padding: 9px 12px;
  border-radius: 6px;
}
#panel5 select option:last-child{
  margin-bottom: 0;
}

/* 强制弹层锚在控件下方（不同 Chrome 版本取值不同，两个都写上） */
#panel5 select::picker(select){
  position-area: block-end;
}

/* 关键修复：Chrome UA 给 picker 设了 position-try-order: most-block-size，
   会挑"上方/下方谁的可用空间大"，哪怕下方放得下也会翻上去。
   用 position-try 简写重置为 flip-block（首选下方，确实放不下才翻）。 */
#panel5 select::picker(select){
  position-area: block-end;
  position-try: flip-block;
  margin-block-start: 6px;
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
}

/* ================================================================== *
 * 38. 解析模块并入「标书设置」左栏
 *     上传、进度条、解析结果与「招标解读」时期共用同一套动画与状态。
 * ================================================================== */
#wspParse{
  margin-top:2px;
}
#wspParse .parse-choices{
  margin-top:0;
  gap:12px;
}
#wspParse .parse-card{
  min-height:0;
  padding:16px;
  gap:12px;
  border-radius:8px;
}
#wspParse .parse-icon{
  flex-basis:36px;
  width:36px;
  height:36px;
  border-radius:8px;
}
#wspParse .parse-body b{
  font-size:14px;
  line-height:21px;
}
#wspParse .parse-body p{
  font-size:12.5px;
  line-height:1.65;
}
#wspParse .file-btn,
#wspParse #pasteInfoBtn{
  height:32px;
}
#wspParse .parse-body .row{
  flex-wrap:wrap;
  gap:8px;
}
#wspParse #fileHint{
  flex:1 1 100%;
  line-height:1.5;
}
#wspParse #tenderFileCard{
  margin-top:12px;
}
#wspParse .br-result{
  margin-top:14px;
  padding-top:14px;
  border-top:1px dashed var(--vr-line-soft);
}
#wspParse .pr-box{
  height:300px;
}
@media (max-width:900px){
  #wspParse .parse-choices,
  #wspParse .parse-result-editor{
    grid-template-columns:1fr;
  }
}

/* ================================================================== *
 * 39. 解析区按钮 / 状态徽标质感
 * ================================================================== */

/* 主按钮：上传文件 */
#appView #wspParse .file-btn{
  height:36px;
  padding:0 18px;
  border:1px solid #0b7be4;
  border-radius:9px;
  background:linear-gradient(180deg,#46a9ff 0%,#188df9 52%,#0f82ef 100%);
  color:#fff;
  font-size:13px;
  font-weight:600;
  letter-spacing:.01em;
  box-shadow:0 1px 1px rgba(13,42,62,.10),
             0 6px 14px -8px rgba(24,141,249,.75),
             inset 0 1px 0 rgba(255,255,255,.28);
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
#appView #wspParse .file-btn:hover{
  border-color:#0a74da;
  background:linear-gradient(180deg,#55b2ff 0%,#2196ff 52%,#0f82ef 100%);
  box-shadow:0 2px 3px rgba(13,42,62,.10),
             0 10px 20px -10px rgba(24,141,249,.85),
             inset 0 1px 0 rgba(255,255,255,.32);
}
#appView #wspParse .file-btn:active{
  transform:translateY(1px);
  box-shadow:0 1px 2px rgba(13,42,62,.12), inset 0 2px 4px rgba(8,72,150,.25);
}
#appView #wspParse .file-btn:focus-within{
  outline:none;
  box-shadow:0 0 0 3px rgba(24,141,249,.18),
             0 6px 14px -8px rgba(24,141,249,.75);
}

/* 次按钮：填写项目信息 */
#appView #wspParse #pasteInfoBtn{
  height:36px;
  padding:0 18px;
  border:1px solid rgba(24,141,249,.24);
  border-radius:9px;
  background:linear-gradient(180deg,#f7fbff 0%,#eef7ff 100%);
  color:#0f6fd2;
  font-size:13px;
  font-weight:600;
  box-shadow:0 1px 2px rgba(13,42,62,.04), inset 0 1px 0 #fff;
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
#appView #wspParse #pasteInfoBtn:hover{
  border-color:rgba(24,141,249,.40);
  background:linear-gradient(180deg,#f2f9ff 0%,#e6f3ff 100%);
  box-shadow:0 2px 6px -2px rgba(24,141,249,.18), inset 0 1px 0 #fff;
}
#appView #wspParse #pasteInfoBtn:active{
  transform:translateY(1px);
  box-shadow:inset 0 1px 3px rgba(24,141,249,.10);
}
#appView #wspParse #pasteInfoBtn:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(24,141,249,.16), inset 0 1px 0 #fff;
}

/* 文件卡：右侧清除按钮 */
#wspParse .fpc-del{
  width:30px;
  height:30px;
  padding:0;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#9aa6b5;
  cursor:pointer;
  transition:background-color .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}
#wspParse .fpc-del .ico{width:15px;height:15px}
#wspParse .fpc-del:hover{
  background:#fef3f2;
  border-color:#fee4e2;
  color:#d92d20;
}
#wspParse .fpc-del:active{transform:scale(.94)}
#wspParse .fpc-del:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(240,68,56,.14);
}

/* 文件状态徽标：已上传 / 解析完成 / 解析失败 */
#appView #wspParse .fpc-state{
  height:24px;
  gap:0;
  padding:0 10px;
  border:1px solid rgba(24,141,249,.14);
  border-radius:999px;
  background:linear-gradient(180deg,#f4f9ff,#eaf3ff);
  color:#0f6fd2;
  font-size:12px;
  font-weight:600;
  box-shadow:inset 0 1px 0 #fff;
}
#appView #wspParse .fpc-state i{display:none}
#appView #wspParse #tenderFileCard.done .fpc-state{
  border-color:rgba(18,183,106,.18);
  background:linear-gradient(180deg,#f2fcf6,#e6f8ed);
  color:#0d7a3f;
}
#appView #wspParse #tenderFileCard.fail .fpc-state{
  border-color:rgba(240,68,56,.18);
  background:linear-gradient(180deg,#fff5f4,#feeceb);
  color:#b42318;
}

/* 模块状态徽标：等待 / 解析中 / 已完成 */
#appView #wspParse .pr-state{
  height:22px;
  gap:5px;
  padding:0 9px;
  border:1px solid transparent;
  border-radius:999px;
  background:linear-gradient(180deg,#f8fafc,#eef2f7);
  color:#7a8798;
  font-size:11.5px;
  font-weight:600;
  box-shadow:inset 0 1px 0 #fff;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
}
#appView #wspParse .pr-col[data-state="pending"] .pr-state{
  border-color:rgba(24,141,249,.10);
  background:linear-gradient(180deg,#f8fbff,#eef5ff);
  color:#5b8fc9;
}
#appView #wspParse .pr-col[data-state="streaming"] .pr-state{
  border-color:rgba(107,78,255,.14);
  background:linear-gradient(180deg,#f8f5ff,#efe9ff);
  color:#6b4eff;
}
#appView #wspParse .pr-col[data-state="done"] .pr-state{
  border-color:rgba(18,183,106,.16);
  background:linear-gradient(180deg,#f2fcf6,#e6f8ed);
  color:#0d7a3f;
}
#appView #wspParse .pr-col[data-state="error"] .pr-state{
  border-color:rgba(240,68,56,.16);
  background:linear-gradient(180deg,#fff5f4,#feeceb);
  color:#b42318;
}
/* 已完成不再显示文字前的圆点 */
#appView #wspParse .pr-col[data-state="done"] .parse-dot{display:none}
#appView #wspParse .pr-col[data-state="done"] .pr-state{gap:0}

/* 解析结果右上角「自动填充」 */
#appView #wspParse .br-result-note{
  height:24px;
  padding:0 10px;
  border:1px solid rgba(18,183,106,.16);
  background:linear-gradient(180deg,#f2fcf6,#e6f8ed);
  color:#0d7a3f;
  font-weight:500;
  box-shadow:inset 0 1px 0 #fff;
}

/* ================================================================== *
 * 40. 读文件：未上传用旧版上传区，上传后由解析结果区接管
 * ================================================================== */
.wsp-upload-modules{
  display:flex;
  flex-direction:column;
}
.wsp-upload-modules[hidden],
.wsp-result-modules[hidden]{
  display:none;
}
/* 附件块不再是 step-body 的直接子级，单独补间距 */
.wsp-upload-modules > .wsp-field{
  margin-top:22px;
}
.wsp-result-modules .file-progress-card{
  margin-top:16px;
}
.wsp-dropzone{
  user-select:none;
}

/* ================================================================== *
 * 41. 解析结果编辑框：参考链企 infoFill 的 Markdown 编辑器
 *     - hover：两层蓝色柔光
 *     - focus：rgb(0,82,217) 描边 + 同一柔光
 *     - 正文：Noto Sans 13px / 1.7 / #000
 *     - 内容超高后出现细滚动条
 * ================================================================== */
#appView #wspParse .pr-box{
  font-family:"Noto Sans", Arial, Helvetica, sans-serif;
  font-size:13px;
  line-height:1.7;
  color:#000;
  padding:20px;
  overflow-y:auto;
  overscroll-behavior:contain;
  transition:border-color .18s ease, box-shadow .2s ease, background .5s ease;
}
#appView.writing-active #wspParse .pr-box:hover{
  box-shadow:rgba(238,244,255,.37) 0 0 12px,
             rgba(220,234,255,.8) 0 0 105px inset;
}
#appView.writing-active #wspParse .pr-col[data-state] .pr-box:focus{
  border-color:rgb(0,82,217);
  outline:none;
  box-shadow:rgba(238,244,255,.37) 0 0 12px,
             rgba(220,234,255,.8) 0 0 105px inset;
}

/* 细滚动条：内容超过编辑框高度时才出现 */
#appView #wspParse .pr-box::-webkit-scrollbar{
  width:8px;
  height:8px;
}
#appView #wspParse .pr-box::-webkit-scrollbar-thumb{
  background-color:rgba(136,136,136,.55);
  border-radius:5px;
}
#appView #wspParse .pr-box::-webkit-scrollbar-thumb:hover,
#appView #wspParse .pr-box.is-scrolling::-webkit-scrollbar-thumb{
  background-color:rgba(85,85,85,.72);
}
#appView #wspParse .pr-box::-webkit-scrollbar-track{
  background-color:transparent;
}

/* 正文排版按参考编辑器（H4 13/600、p 13/1.5、列表 13/1.7） */
#appView #wspParse .pr-box p{
  margin:0;
  padding:4px 0;
  line-height:1.5;
  color:#000;
}
#appView #wspParse .pr-box ul,
#appView #wspParse .pr-box ol{
  margin:0;
  padding-left:20px;
}
#appView #wspParse .pr-box li{
  margin:0 0 2px;
  line-height:1.7;
  color:#000;
}
#appView #wspParse .pr-box li:last-child{
  margin-bottom:0;
}
#appView #wspParse .pr-box li b,
#appView #wspParse .pr-box li strong{
  color:#000;
  font-weight:600;
}
#appView #wspParse .pr-box h3,
#appView #wspParse .pr-box h4,
#appView #wspParse .pr-box h5,
#appView #wspParse .pr-box h6{
  font-family:inherit;
  font-size:13px;
  font-weight:600;
  line-height:1.5;
  color:#000;
  margin:0;
  padding:2px 0;
}
#appView #wspParse .pr-box strong{
  color:#000;
  font-weight:700;
}
#appView #wspParse .pr-box .pr-sub{
  font-size:13px;
  font-weight:600;
  line-height:1.5;
  color:#000;
  margin:0;
  padding:2px 0;
}
#appView #wspParse .pr-box .pr-item{
  padding:8px 0;
  border-bottom:1px dashed rgba(224,224,230,.9);
}
#appView #wspParse .pr-box .pr-item b{
  font-size:13px;
  font-weight:600;
  color:#000;
}
#appView #wspParse .pr-box .pr-item p{
  margin:4px 0 0;
  padding:0;
  line-height:1.5;
  color:#000;
}
#appView #wspParse .pr-box .pr-score{
  float:right;
  color:#0052d9;
  font-size:12px;
  font-weight:500;
}

/* ================================================================== *
 * 42. 透亮化改造（仅写作流程）
 *     - 画布：冷紫近白 #F6F7FF + #EDF2FF 外底 + 6% 蓝紫网格
 *     - 强调色：只保留 azure，状态色收回小徽标
 *     - 表面：14px 白卡 + azure/10 边框 + 单层蓝紫柔影
 *     - 左栏内部去掉卡片阴影，收成一个平面
 * ================================================================== */
#appView.studio-shell.writing-active{
  --vr-canvas:#edf1f6;
  --vr-surface-muted:#f5f7fa;
  --vr-ink:#14161a;
  --vr-ink-2:#3a3f4a;
  --vr-muted:#6b7280;
  --vr-faint:#9aa1ae;
  --vr-line:#e5e9ef;
  --vr-line-soft:#eef1f5;
  --vr-radius-card:14px;
  --vr-radius-inner:10px;
  --vr-shadow-card:0 1px 2px rgba(30,48,70,.04),0 10px 28px rgba(30,48,70,.07);
  --vr-shadow-card-hover:0 2px 6px rgba(30,48,70,.05),0 16px 36px rgba(30,48,70,.10);
  --studio-canvas:#f5f7fa;
  --studio-line:#e5e9ef;
  --studio-ink:#14161a;
  --studio-muted:#6b7280;
  color:var(--vr-ink);
  font-size:15px;
  background:#edf1f6;
}
/* 内容区叠一层中性灰蓝近白 + 极淡网格，外底 #EDF1F6 只在页头边缘露出 */
#appView.writing-active .stage-scroll{
  background:
    linear-gradient(180deg,rgba(226,232,239,.55) 0%,rgba(245,247,250,.92) 100%),
    linear-gradient(90deg,rgba(40,60,80,.055) 1px,transparent 1px),
    linear-gradient(180deg,rgba(40,60,80,.055) 1px,transparent 1px),
    #f5f7fa;
  background-size:100% 100%,132px 132px,132px 132px,100% 100%;
}
#appView.writing-active .stage{
  background:transparent;
}

/* 两块大卡：统一白底、14px 圆角、单层中性柔影 */
#appView.writing-active .wsp-flow,
#appView.writing-active .wsp-settings{
  padding:28px 24px;
  border:1px solid rgba(24,141,249,.10);
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 2px rgba(30,48,70,.04),0 10px 28px rgba(30,48,70,.07);
}
@media (min-width:1280px){
  #appView.writing-active .wsp-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:24px;
  }
}
@media (max-width:900px){
  #appView.writing-active .wsp-flow,
  #appView.writing-active .wsp-settings{
    padding:22px 18px;
    border-radius:12px;
  }
}

/* 步骤条：白卡保留，但边框/阴影退到背景里 */
#appView.writing-active .stepper{
  border-color:rgba(24,141,249,.08);
  background:rgba(255,255,255,.94);
  box-shadow:0 1px 2px rgba(30,48,70,.035);
}
#appView.writing-active .stepper .step{
  font-size:13.5px;
}
#appView.writing-active .stepper .step.active{
  background:#e9f3ff;
  color:#0f6fd2;
}

/* 左栏内部：去阴影、去白卡叠白卡，只留淡底 + 细边 */
#appView.writing-active .wsp-entry{
  padding:16px 18px;
  border-color:transparent;
  border-radius:10px;
  background:#f8f9fb;
  box-shadow:none;
}
#appView.writing-active button.wsp-entry:hover{
  border-color:transparent;
  background:#f1f4f8;
  box-shadow:none;
  transform:none;
}
#appView.writing-active .wsp-entry.is-static{
  background:#f8f9fb;
}
#appView.writing-active .wsp-entry-ico{
  width:38px;
  height:38px;
  border-radius:10px;
  background:#e9f3ff;
  color:#0f6fd2;
}
#appView.writing-active .wsp-entry-copy b{
  font-size:15px;
  font-weight:600;
  color:var(--vr-ink);
}
#appView.writing-active .wsp-entry-copy small{
  font-size:12.5px;
  line-height:1.6;
  color:var(--vr-muted);
}
#appView.writing-active .wsp-or{
  margin:18px 0;
}
#appView.writing-active .wsp-or::before{
  background:var(--vr-line-soft);
}
#appView.writing-active .wsp-or span{
  border-color:var(--vr-line-soft);
  background:#fff;
  color:var(--vr-faint);
}

#appView.writing-active .wsp-dropzone{
  margin-top:12px;
  padding:28px 18px;
  border:1px dashed rgba(24,141,249,.25);
  border-radius:12px;
  background:rgba(24,141,249,.02);
}
#appView.writing-active .wsp-dropzone:hover{
  border-color:rgba(24,141,249,.5);
  background:rgba(24,141,249,.05);
}
#appView.writing-active .wsp-dropzone-ico{
  width:42px;
  height:42px;
  border-color:rgba(24,141,249,.12);
  background:#fff;
  color:var(--vr-brand);
}
#appView.writing-active .wsp-dropzone b{
  font-size:14px;
  color:var(--vr-ink);
}
#appView.writing-active .wsp-dropzone small{
  font-size:12.5px;
  color:var(--vr-muted);
}

#appView.writing-active .wsp-upload-modules > .wsp-field{
  margin-top:26px;
}
#appView.writing-active .wsp-label{
  font-size:14.5px;
  font-weight:600;
  color:var(--vr-ink);
}
#appView.writing-active .wsp-attach-card{
  padding:24px 18px;
  border:1px solid transparent;
  border-radius:12px;
  background:#f5f7f9;
  box-shadow:none;
}
#appView.writing-active .wsp-attach-card:hover{
  border-color:rgba(24,141,249,.10);
  background:#eef2f7;
  box-shadow:none;
}
#appView.writing-active .wsp-attach-ico{
  background:#e9f3ff;
  color:#0f6fd2;
}
#appView.writing-active .wsp-attach-card b{
  font-size:14px;
  color:var(--vr-ink);
}
#appView.writing-active .wsp-attach-card small{
  font-size:12px;
  line-height:1.55;
  color:var(--vr-muted);
}

/* 结果区内部：文件卡、编辑框去掉第二层阴影 */
#appView.writing-active #wspParse .file-progress-card{
  border-color:transparent;
  border-radius:12px;
  background:#f8f9fb;
  box-shadow:none;
}
#appView.writing-active #wspParse .fpc-icon{
  border-radius:8px;
  background:#e9f3ff;
  color:#0f6fd2;
}
#appView.writing-active #wspParse .fpc-info b{
  font-size:15px;
  color:var(--vr-ink);
}
#appView.writing-active #wspParse .fpc-info span{
  font-size:12.5px;
  color:var(--vr-muted);
}
#appView.writing-active #wspParse .pr-box{
  background:#fff;
  border-color:rgba(24,141,249,.10);
  box-shadow:none;
}
#appView.writing-active #wspParse .pr-col[data-state="pending"] .pr-box{
  border-color:rgba(24,141,249,.08);
  background:linear-gradient(180deg,#fff 0%,#f8f9fb 100%);
}
#appView.writing-active #wspParse .pr-col[data-state="streaming"] .pr-box{
  border-color:rgba(24,141,249,.18);
  background:linear-gradient(180deg,#fff 0%,#f4f9ff 100%);
}
#appView.writing-active #wspParse .pr-col[data-state="done"] .pr-box{
  border-color:rgba(24,141,249,.10);
  background:#fff;
}

/* 状态色只留在小徽标里：解析中使用 azure，不再用紫色 */
#appView.writing-active #wspParse .pr-col[data-state="pending"] .pr-state{
  border-color:rgba(24,141,249,.10);
  background:linear-gradient(180deg,#f8fbff,#eef5ff);
  color:#66758c;
}
#appView.writing-active #wspParse .pr-col[data-state="streaming"] .pr-state{
  border-color:rgba(24,141,249,.16);
  background:linear-gradient(180deg,#f7fbff,#eaf4ff);
  color:#0f77d6;
}
#appView.writing-active #wspParse .pr-box .pr-score{
  color:var(--vr-brand-deep);
}

/* 右侧设置：选中态由“蓝描边”改为“淡 azure 底”，减少轮廓噪音 */
#appView.writing-active .wsp-field{
  gap:12px;
}
#appView.writing-active .wsp-field + .wsp-field{
  margin-top:28px;
}
#appView.writing-active .wsp-help{
  font-size:13px;
  line-height:1.65;
  color:var(--vr-muted);
}
#appView.writing-active .wsp-tip{
  font-size:12.5px;
  line-height:1.6;
  color:var(--vr-faint);
}
#appView.writing-active .wsp-step-points{
  gap:8px;
}
#appView.writing-active .wsp-step-points li{
  font-size:14.5px;
  line-height:1.65;
  color:var(--vr-muted);
}
#appView.writing-active .wsp-step-title{
  font-size:20px;
  color:var(--vr-ink);
}
#appView.writing-active .settings-input{
  font-size:15px;
}
#appView.writing-active .style-pill{
  height:40px;
  padding:0 14px;
  border-color:transparent;
  border-radius:10px;
  background:#f5f7fa;
  color:#4b5160;
  box-shadow:none;
}
#appView.writing-active .style-pill:hover{
  border-color:transparent;
  background:#edf1f5;
  color:var(--vr-ink-2);
}
#appView.writing-active .style-pill.active{
  border-color:transparent;
  background:#e9f3ff;
  color:#0f6fd2;
  font-weight:600;
}
#appView.writing-active .style-pill .ico{
  color:#8a93a6;
}
#appView.writing-active .style-pill.active .ico{
  color:#0f6fd2;
}

/* 目录 / 正文 / 导出：沿用同一套 14px 白卡 + 蓝紫柔影 */
@media (min-width:1280px){
  #appView.writing-active[data-bid-step="2"] .catalog-grid > .context,
  #appView.writing-active[data-bid-step="2"] .catalog-grid > .catalog-main{
    border-color:rgba(24,141,249,.10);
    border-radius:14px;
    box-shadow:var(--vr-shadow-card);
  }
  #appView.writing-active[data-bid-step="2"] .catalog-grid > .context .context-head{
    border-radius:14px 14px 0 0;
  }
}
#appView.writing-active[data-bid-step="3"] .chapter-pane,
#appView.writing-active[data-bid-step="3"] .write-main{
  border-color:rgba(24,141,249,.10);
  border-radius:14px;
  box-shadow:var(--vr-shadow-card);
}
#appView.writing-active[data-bid-step="5"] .export-basic,
#appView.writing-active[data-bid-step="5"] .export-advanced{
  border-color:rgba(24,141,249,.08);
  border-radius:12px;
  background:#f8f9fb;
}

/* 左栏步骤圆点/连接线也换成冷灰蓝，避免残留青绿色 */
#appView.writing-active .wsp-step-no{
  border-color:rgba(24,141,249,.16);
  background:#fff;
  color:#0f6fd2;
  box-shadow:0 1px 2px rgba(30,48,70,.04);
}
#appView.writing-active .wsp-step::before{
  background:linear-gradient(180deg,#e5e9ef,#eef1f5);
}
#appView.writing-active .wsp-step-points li::before{
  background:#c7ccd9;
}

/* ================================================================== *
 * 43. Tooltip：替代浏览器原生 title 黑框
 * ================================================================== */
.vr-tip{
  position:fixed;
  z-index:9999;
  max-width:280px;
  padding:6px 10px;
  border-radius:8px;
  background:#1b2430;
  color:#fff;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:12px;
  line-height:1.5;
  font-weight:500;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
  pointer-events:none;
  box-shadow:0 8px 24px rgba(13,27,38,.18);
  opacity:0;
  visibility:hidden;
  transform:translateY(4px);
  transition:opacity .14s ease, transform .14s ease, visibility .14s;
}
.vr-tip.is-visible{
  opacity:1;
  visibility:visible;
  transform:none;
}
.vr-tip-arrow{
  position:absolute;
  left:var(--tip-arrow-x,50%);
  width:8px;
  height:8px;
  background:#1b2430;
  transform:translateX(-50%) rotate(45deg);
}
.vr-tip:not(.is-below) .vr-tip-arrow{bottom:-4px}
.vr-tip.is-below .vr-tip-arrow{top:-4px}
.vr-tip-text{display:block}

/* 步骤按钮的 .step-tip 同步成同一套深色气泡 */
.studio-shell .step-tip{
  padding:6px 10px;
  border-radius:8px;
  background:#1b2430;
  color:#fff;
  font-size:12.5px;
  line-height:1.5;
  font-weight:500;
  box-shadow:0 8px 24px rgba(13,27,38,.18);
}
.studio-shell .step-tip::after{
  width:8px;
  height:8px;
  bottom:-4px;
  background:#1b2430;
  box-shadow:none;
}
@media (prefers-reduced-motion:reduce){
  .vr-tip{transition:opacity .01s linear, visibility .01s}
}

/* ================================================================== *
 * 44. Toast：白色胶囊 + 细线图标，右下角堆叠（唯一来源）
 * ================================================================== */
html #toastRoot{
  position:fixed;
  top:auto;
  right:24px;
  bottom:24px;
  left:auto;
  z-index:300;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  transform:none;
  pointer-events:none;
}

html #toastRoot .toast{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  box-sizing:border-box;
  width:max-content;
  min-width:0;
  max-width:min(380px,calc(100vw - 32px));
  padding:10px 18px;
  overflow:hidden;
  border:1px solid rgba(226,232,240,.6);
  border-left:none;
  border-radius:999px;
  background:#fff;
  color:#334155;
  font-size:13.5px;
  line-height:1.5;
  text-align:left;
  box-shadow:0 8px 24px -6px rgba(15,23,42,.08),0 2px 6px -2px rgba(15,23,42,.04);
  pointer-events:auto;
  transform-origin:100% 100%;
  animation:toast-in 220ms cubic-bezier(.22,1,.36,1) both;
}

html #toastRoot .toast::before{
  display:none;
}

html #toastRoot .toast-ico{
  display:flex;
  align-items:center;
  flex:none;
  width:auto;
  height:auto;
  margin:0;
  padding:0;
  border-radius:0;
  background:transparent;
  color:#64748b;
}
html #toastRoot .toast-ico svg{
  display:block;
  width:16px;
  height:16px;
  fill:none;
  stroke:#64748b;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

html #toastRoot .toast-msg{
  flex:1 1 auto;
  min-width:0;
  padding-top:0;
  color:inherit;
  font-size:13.5px;
  font-weight:400;
  line-height:1.5;
  overflow-wrap:anywhere;
}

html #toastRoot .toast-close{
  display:grid;
  place-items:center;
  flex:none;
  width:22px;
  height:22px;
  margin:0 0 0 2px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#94a3b8;
  cursor:pointer;
  transition:background-color 140ms ease,color 140ms ease;
  -webkit-tap-highlight-color:transparent;
}
html #toastRoot .toast-close:hover{
  background:#fef2f2;
  color:#ef4444;
}
html #toastRoot .toast-close:focus-visible{
  outline:2px solid #9cc9f4;
  outline-offset:1px;
  color:#ef4444;
}
html #toastRoot .toast-close svg{
  display:block;
  width:14px;
  height:14px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* 柔性语义色：只改变文字和细线图标，保留白胶囊的克制感 */
html #toastRoot .toast[data-tone="success"],
html #toastRoot .toast.toast--success{
  color:#059669;
}
html #toastRoot .toast[data-tone="success"] .toast-ico svg,
html #toastRoot .toast.toast--success .toast-ico svg{
  stroke:#059669;
}
html #toastRoot .toast[data-tone="warning"],
html #toastRoot .toast.toast--warning{
  color:#d97706;
}
html #toastRoot .toast[data-tone="warning"] .toast-ico svg,
html #toastRoot .toast.toast--warning .toast-ico svg{
  stroke:#d97706;
}
html #toastRoot .toast[data-tone="error"],
html #toastRoot .toast.toast--error{
  color:#dc2626;
}
html #toastRoot .toast[data-tone="error"] .toast-ico svg,
html #toastRoot .toast.toast--error .toast-ico svg{
  stroke:#dc2626;
}

html #toastRoot .toast.out{
  animation:toast-out 180ms cubic-bezier(.22,1,.36,1) forwards;
  pointer-events:none;
}

@keyframes toast-in{
  from{opacity:0;transform:translateY(6px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes toast-out{
  from{opacity:1;transform:translateY(0) scale(1)}
  to{opacity:0;transform:translateY(4px) scale(.98)}
}

@media (prefers-reduced-motion:reduce){
  html #toastRoot .toast{
    animation:toast-fade-in 160ms ease both;
  }
  html #toastRoot .toast.out{
    animation:toast-fade-out 140ms ease forwards;
  }
}
@keyframes toast-fade-in{
  from{opacity:0}
  to{opacity:1}
}
@keyframes toast-fade-out{
  from{opacity:1}
  to{opacity:0}
}

@media (max-width:640px){
  html #toastRoot{
    right:16px;
    bottom:16px;
  }
}

/* ================================================================== *
 * 45. 内容型页面：网格画布 + 全宽内容
 *     企业知识库 / 技能市场 / 我的标书 / 私有图库
 * ================================================================== */
#appView[data-bid-step="6"],
#appView[data-bid-step="7"],
#appView[data-bid-step="8"],
#appView[data-bid-step="9"],
#appView[data-bid-step="10"]{
  --vr-ink:#14161a;
  --vr-ink-2:#3a3f4a;
  --vr-muted:#6b7280;
  --vr-faint:#9aa1ae;
  --vr-line:#e5e9ef;
  --vr-line-soft:#eef1f5;
  --studio-ink:#14161a;
  --studio-muted:#6b7280;
  --studio-line:#e5e9ef;
  --studio-content-width:1600px;
  background:
    radial-gradient(760px 380px at 82% -8%,rgba(24,141,249,.10),rgba(0,0,0,0) 70%),
    radial-gradient(600px 320px at 8% 10%,rgba(41,196,183,.055),rgba(0,0,0,0) 70%),
    linear-gradient(180deg,#fff 0%,rgba(255,255,255,0) 180px),
    linear-gradient(90deg,rgba(178,203,255,.20) 1px,rgba(0,0,0,0) 1px),
    linear-gradient(rgba(178,203,255,.20) 1px,rgba(0,0,0,0) 1px),
    #f7f8fb;
  background-size:100% 100%,100% 100%,100% 100%,40px 40px,40px 40px,100% 100%;
}
#appView[data-bid-step="6"] .stage-scroll,
#appView[data-bid-step="7"] .stage-scroll,
#appView[data-bid-step="8"] .stage-scroll,
#appView[data-bid-step="9"] .stage-scroll,
#appView[data-bid-step="10"] .stage-scroll{
  background:transparent;
}
#appView[data-bid-step="6"] #panel6,
#appView[data-bid-step="7"] #panel7,
#appView[data-bid-step="8"] #panel8,
#appView[data-bid-step="9"] #panel9,
#appView[data-bid-step="10"] #panel10{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
#appView[data-bid-step="6"] #panel6 .card,
#appView[data-bid-step="9"] #panel9 .card,
#appView[data-bid-step="7"] #panel7 .skill-card,
#appView[data-bid-step="8"] #panel8 .mydocs-card{
  background:#fff;
  border:1px solid rgba(24,141,249,.10);
  border-radius:14px;
  box-shadow:0 1px 2px rgba(30,48,70,.04),0 10px 28px rgba(30,48,70,.07);
}
/* 技能卡在 1600 容器里保持接近原来的卡片宽度，不缩成窄条 */
#appView[data-bid-step="7"] #panel7 .skill-grid{
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
}

/* ================================================================== *
 * 46. 解析历史记录弹窗
 * ================================================================== */
.parse-history-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:min(54vh,520px);
  padding:2px;
  overflow-y:auto;
}
.parse-history-row{
  display:flex;
  align-items:stretch;
  gap:8px;
}
.parse-history-main{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:12px 14px;
  border:1px solid rgba(24,141,249,.10);
  border-radius:12px;
  background:#fff;
  color:#14161a;
  text-align:left;
  cursor:pointer;
  transition:background-color .16s ease,border-color .16s ease;
}
.parse-history-main:hover{
  border-color:rgba(24,141,249,.22);
  background:#f7f9fd;
}
.parse-history-main:focus-visible{
  outline:2px solid #9cc9f4;
  outline-offset:1px;
}
.parse-history-ico{
  display:grid;
  place-items:center;
  flex:none;
  width:34px;
  height:34px;
  border-radius:9px;
  background:#e9f3ff;
  color:#0f6fd2;
}
.parse-history-ico .ico{width:16px;height:16px}
.parse-history-copy{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.parse-history-copy b{
  font-size:13.5px;
  font-weight:600;
  color:#14161a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.parse-history-copy small{
  font-size:11.5px;
  color:#6b7280;
}
.parse-history-go{
  flex:none;
  margin-left:auto;
  font-size:12px;
  font-weight:600;
  color:#0f6fd2;
}
.parse-history-del{
  display:grid;
  place-items:center;
  flex:none;
  width:40px;
  padding:0;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:#94a3b8;
  cursor:pointer;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.parse-history-del:hover{
  border-color:#fee4e2;
  background:#fef2f2;
  color:#dc2626;
}
.parse-history-del .ico{width:15px;height:15px}

/* ================================================================== *
 * 47. 工作台首页
 * ================================================================== */
#brandHome{cursor:pointer}
#brandHome:focus-visible{
  outline:2px solid #9cc9f4;
  outline-offset:4px;
  border-radius:8px;
}
#appView[data-bid-step="10"] .stage-head{display:none}
#appView[data-bid-step="10"] .stage-scroll{padding:28px 32px 48px}
#appView[data-bid-step="10"] #panel10{
  max-width:1200px;
  padding:0;
}
.home-page{
  max-width:1200px;
  margin:0 auto;
  padding:0;
}
.home-head{padding:2px 2px 4px}
.home-head h1{
  margin:0;
  font-size:30px;
  line-height:1.25;
  font-weight:750;
  letter-spacing:-.02em;
  color:var(--vr-ink,#14161a);
}
.home-head p{
  margin:6px 0 0;
  font-size:13.5px;
  line-height:1.6;
  color:var(--vr-muted,#6b7280);
}
.home-primary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-top:22px;
  padding:22px 24px;
  border:1px solid rgba(24,141,249,.10);
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 2px rgba(30,48,70,.04),0 10px 28px rgba(30,48,70,.07);
}
.home-primary-copy{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}
.home-primary-ico{
  display:grid;
  place-items:center;
  flex:none;
  width:46px;
  height:46px;
  border-radius:12px;
  background:#e9f3ff;
  color:#0f6fd2;
}
.home-primary-ico .ico{width:22px;height:22px}
.home-primary h2{
  margin:0;
  font-size:18px;
  line-height:1.4;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--vr-ink,#14161a);
}
.home-primary p{
  margin:4px 0 0;
  font-size:13px;
  line-height:1.55;
  color:var(--vr-muted,#6b7280);
}
.home-new-btn{
  flex:none;
  height:44px;
  padding:0 24px;
  border-radius:10px;
  font-size:13.5px;
  font-weight:600;
  background:var(--vr-brand,#188df9);
  border-color:var(--vr-brand,#188df9);
  box-shadow:0 6px 14px -8px rgba(24,141,249,.65);
}
.home-new-btn:hover{
  background:#0f82ef;
  border-color:#0f82ef;
}
.home-recent{
  margin-top:20px;
  border:1px solid rgba(24,141,249,.10);
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 2px rgba(30,48,70,.04),0 10px 28px rgba(30,48,70,.07);
  overflow:hidden;
}
.home-recent-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:17px 22px 13px;
  border-bottom:1px solid #eef1f5;
}
.home-recent-head h2{
  margin:0;
  font-size:15px;
  line-height:1.4;
  font-weight:650;
  color:var(--vr-ink,#14161a);
}
.home-more{
  border:0;
  background:transparent;
  color:#0f6fd2;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
  padding:2px 0;
}
.home-more:hover{color:#0b5fba}
.home-recent-list{display:flex;flex-direction:column}
.home-doc{
  display:flex;
  align-items:center;
  gap:16px;
  width:100%;
  padding:15px 22px;
  border:0;
  border-top:1px solid #f1f4f8;
  background:#fff;
  text-align:left;
  cursor:pointer;
  transition:background-color .16s ease;
}
.home-doc:first-child{border-top:0}
.home-doc:hover{background:#f7f9fd}
.home-doc-main{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.home-doc-main b{
  font-size:14px;
  line-height:1.5;
  font-weight:600;
  color:var(--vr-ink,#14161a);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.home-doc-main small{
  font-size:12px;
  line-height:1.5;
  color:var(--vr-muted,#6b7280);
}
.home-doc-go{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex:none;
  font-size:12.5px;
  font-weight:600;
  color:#0f6fd2;
}
.home-doc-go .ico{width:13px;height:13px}
.home-empty{
  padding:34px 22px;
  text-align:center;
  color:var(--vr-muted,#6b7280);
  font-size:13px;
}
.home-empty p{margin:0}
.home-empty-btn{
  margin-top:12px;
  border:0;
  background:transparent;
  color:#0f6fd2;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.home-empty-btn:hover{color:#0b5fba}
@media (max-width:760px){
  #appView[data-bid-step="10"] .stage-scroll{padding:20px 16px 36px}
  .home-head h1{font-size:25px}
  .home-primary{
    flex-direction:column;
    align-items:flex-start;
    gap:18px;
  }
  .home-new-btn{width:100%}
  .home-doc{padding:14px 16px}
  .home-doc-go{font-size:12px}
}
