/* 规则中心 · 专属样式
   所有类名加 rc- 前缀；颜色只用 app.css 顶部已有变量
   新增：--hold / --hold-w（设计稿要求，app.css 暂缺）*/

/* ── 补充 hold token（若 app.css 已有则此处会被覆盖，无副作用）── */
:root {
  --hold: #8A5A12;
  --hold-w: #FBF2E2;
}

/* #view 在 app.css 里是 .body：有 24px 内边距、自身纵向滚动。
   规则中心自带顶栏和内容滚动，挂载期间把这块接管掉；离开页面后节点被重建，样式自动失效。 */
.body:has(> .rc-shell) {
  padding: 0;
  overflow: hidden;
  scrollbar-width: auto;
}

/* ══════════ 外壳 ══════════ */
.rc-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--bg);
}

/* 图标尺寸（app.css 没有 .ic 规则，这里补上；只作用于规则中心） */
.rc-shell .ic,
.rc-drawer .ic,
.rc-draftbar .ic,
.rc-modal .ic {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: -3px;
}
.rc-shell .ic.sm,
.rc-drawer .ic.sm,
.rc-draftbar .ic.sm,
.rc-modal .ic.sm { width: 14px; height: 14px; }
.rc-shell .ic.lg,
.rc-drawer .ic.lg,
.rc-modal .ic.lg { width: 20px; height: 20px; }

.rc-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
}
.rc-topbar h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  margin: 0;
  letter-spacing: .01em;
}
.rc-topbar .rc-lead {
  font-size: 12.5px;
  color: var(--ink-3);
}
.rc-topbar .rc-grow { flex: 1; }

/* 馆别切换器 */
.rc-seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  position: relative;
}
.rc-seg button {
  border: 0;
  background: transparent;
  padding: 5px 15px;
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color var(--t) var(--ease-io);
}
.rc-seg button.rc-on { color: var(--ink); font-weight: 600; }
.rc-seg .rc-pill {
  position: absolute;
  top: 3px; bottom: 3px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.09);
  transition: transform var(--t-slow) var(--ease);
  pointer-events: none;
}

/* ══════════ 主体布局 ══════════ */
.rc-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Rail（左侧导航）── */
.rc-rail {
  width: 196px;
  flex-shrink: 0;
  padding: 16px 10px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rc-rail-sep {
  height: 1px;
  background: var(--line);
  margin: 8px 6px;
}
.rc-rail-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13.5px;
  border: 0;
  background: none;
  text-align: left;
  width: 100%;
  transition: background var(--t-fast) var(--ease-io), color var(--t-fast) var(--ease-io),
              transform var(--t-fast) var(--ease);
}
.rc-rail-item:hover { background: rgba(0,0,0,.045); color: var(--ink); transform: scale(1.02); }
.rc-rail-item:active { transform: scale(.98); }
.rc-rail-item.rc-on { background: #E6E3DD; color: var(--ink); font-weight: 600; }
.rc-rail-cnt {
  margin-left: auto;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rc-rail-cnt.rc-warn { background: var(--warn-w); color: var(--warn); }
.rc-rail-cnt.rc-hold { background: var(--hold-w); color: var(--hold); }
.rc-rail-cnt.rc-run  { background: var(--run-w);  color: var(--run);  }

/* ── 内容区 ── */
.rc-view {
  flex: 1;
  overflow: auto;
  padding: 24px 32px 120px;
  min-width: 0;
  container-type: inline-size;
}

/* ══════════ 入场动效 ══════════ */
@keyframes rc-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.rc-enter {
  animation: rc-rise var(--t-slow) var(--ease) both;
  animation-delay: calc(min(var(--i, 0), 14) * 28ms);
}
@media (prefers-reduced-motion: reduce) {
  .rc-enter { animation: none; opacity: 1; transform: none; }
}

/* ══════════ 通用件 ══════════ */
.rc-page-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.rc-page-head .rc-ico-box {
  width: 40px; height: 40px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex-shrink: 0;
}
.rc-page-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  margin: 0;
  line-height: 1.3;
}
.rc-page-head .rc-sub { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

.rc-block { margin-bottom: 26px; }
.rc-block-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.rc-block-h h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  margin: 0;
}
.rc-block-h .rc-hint { font-size: 12.5px; color: var(--ink-3); }
.rc-block-h .rc-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.rc-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}

/* 标签 */
.rc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: 500;
}
.rc-tag.ok   { background: var(--ok-w);   color: var(--ok);   }
.rc-tag.run  { background: var(--run-w);  color: var(--run);  }
.rc-tag.warn { background: var(--warn-w); color: var(--warn); }
.rc-tag.hold { background: var(--hold-w); color: var(--hold); }
.rc-tag.mute { background: var(--surface-2); color: var(--ink-2); }
.rc-tag.lock { background: #EFEDE9; color: var(--ink-2); }
.rc-tag.faint { background: transparent; color: var(--ink-3); border: 1px dashed var(--line); }

/* chip */
.rc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.rc-chip button {
  border: 0; background: none; padding: 0;
  cursor: pointer; color: var(--ink-3); display: grid;
  width: 14px; height: 14px; place-items: center;
}
.rc-chip button:hover { color: var(--warn); }
.rc-chip.alias { background: var(--hold-w); border-color: #F1E1C2; color: var(--hold); }

/* 空状态 */
.rc-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  background: var(--surface-3);
}
.rc-empty-row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }

/* 条目图例 + 内联操作 */
.rc-legend {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--ink-3);
  align-items: center;
  margin-left: auto;
}
.rc-legend i {
  display: inline-block;
  width: 10px; height: 5px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: 1px;
}
.rc-inline-actions { display: flex; gap: 8px; margin-top: 8px; }
.rc-stat-pct { font-size: 11.5px; color: var(--ink); font-weight: 600; margin-left: auto; }

/* ══════════ 按钮 ══════════ */
.rc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  font-size: 13.5px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease-io), background var(--t-fast) var(--ease-io);
}
.rc-btn:hover:not(:disabled) { transform: scale(1.02); border-color: var(--ink-3); }
.rc-btn:active:not(:disabled) { transform: scale(.98); }
.rc-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.rc-btn.primary:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(31,30,28,.2); }
.rc-btn.acc { background: var(--acc); border-color: var(--acc); color: #fff; }
.rc-btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.rc-btn.ghost:hover:not(:disabled) { background: rgba(0,0,0,.04); border-color: transparent; }
.rc-btn.sm { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
.rc-btn.danger { color: var(--warn); }
.rc-btn:disabled { opacity: .42; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  .rc-btn:hover:not(:disabled), .rc-btn:active:not(:disabled) { transform: none; }
}

/* ══════════ 设置小块（stepper）══════════ */
.rc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.rc-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.rc-tile .rc-tile-lbl { font-size: 12.5px; color: var(--ink-2); }
.rc-tile .rc-tile-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.rc-tile .rc-tile-val { font-weight: 600; font-size: 16px; margin-top: 6px; }
.rc-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.rc-stepper button {
  width: 32px; height: 32px;
  border: 0; background: var(--surface-3);
  cursor: pointer; font-size: 16px; color: var(--ink-2);
  transition: background var(--t-fast) var(--ease-io);
}
.rc-stepper button:hover { background: var(--surface-2); }
.rc-stepper button:active { transform: scale(.94); }
.rc-stepper output {
  min-width: 44px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  display: inline-block;
}
@keyframes rc-pulse { 0%{transform:scale(1)} 40%{transform:scale(1.25)} 100%{transform:scale(1)} }
.rc-stepper output.bump { animation: rc-pulse .32s var(--ease-back); }
.rc-tile select {
  margin-top: 6px;
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 4px 8px;
}
@media (prefers-reduced-motion: reduce) {
  .rc-stepper output.bump { animation: none; }
  .rc-stepper button:active { transform: none; }
}

/* ══════════ 规则卡 ══════════ */
.rc-rules { display: grid; gap: 8px; }
.rc-rcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-io), box-shadow var(--t) var(--ease),
              transform var(--t) var(--ease);
}
.rc-rcard:hover { border-color: #D7D2CA; box-shadow: 0 2px 10px rgba(31,30,28,.05); transform: scale(1.005); }
.rc-rcard.locked { background: var(--surface-3); cursor: default; }
.rc-rcard.locked:hover { transform: none; }
.rc-rcard.flag-warn { border-color: #EDC5BF; box-shadow: inset 3px 0 0 var(--warn); }
.rc-rcard.flag-hold { border-color: #EBD8B4; box-shadow: inset 3px 0 0 var(--hold); }
.rc-rcard .rc-rcard-text { font-size: 13.5px; line-height: 1.7; }
.rc-rcard .rc-rcard-meta {
  display: flex; gap: 6px; align-items: flex-start;
  flex-wrap: wrap; justify-content: flex-end;
}
.rc-rcard .rc-rcard-more {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 6px 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px dashed var(--line);
}
.rc-rcard .rc-rcard-more .k { color: var(--ink-3); }
.rc-rcard .rc-rcard-more .good::before { content: "正"; color: var(--ok); font-weight: 600; margin-right: 6px; }
.rc-rcard .rc-rcard-more .bad::before  { content: "反"; color: var(--warn); font-weight: 600; margin-right: 6px; }
.rc-rcard textarea {
  width: 100%; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 10px;
  min-height: 64px; resize: vertical; line-height: 1.7;
}
.rc-rgroup { margin-bottom: 18px; }
.rc-rgroup > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2);
  margin-bottom: 8px; font-weight: 600;
}
.rc-rgroup > summary::-webkit-details-marker { display: none; }
.rc-rgroup > summary .chev {
  transition: transform var(--t) var(--ease-back);
}
.rc-rgroup[open] > summary .chev { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) {
  .rc-rgroup > summary .chev { transition: none; }
  .rc-rcard:hover { transform: none; }
}

/* 冲突卡 */
.rc-conf {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.rc-conf.warn { border-color: #EDC5BF; }
.rc-conf.hold { border-color: #EBD8B4; }
.rc-conf.done { border-color: #CFE1D5; background: #FBFDFB; }
.rc-conf.done .rc-conf-title { font-weight: 600; font-size: 13.5px; }
.rc-conf-head { display: flex; align-items: center; gap: 8px; }
.rc-conf-title { font-weight: 600; font-size: 13.5px; flex: 1; }
.rc-conf-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}
.rc-conf-side {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 12.5px;
}
.rc-conf-side .src { font-size: 11.5px; color: var(--ink-3); margin-bottom: 2px; }
.rc-conf-mid { display: grid; place-items: center; color: var(--ink-3); font-size: 12px; }
.rc-conf-places { display: grid; gap: 6px; }
.rc-conf-places > div {
  background: var(--surface-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 12.5px;
}
.rc-conf-places.locked > div { border-style: dashed; color: var(--ink-2); }
.rc-conf-locked-note { font-size: 12px; color: var(--ink-3); background: none; border: 0; padding: 0 0 2px; }
.rc-conf-effect { font-size: 12.5px; color: var(--ink-2); }
.rc-conf-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rc-conf-small { font-size: 12.5px; color: var(--ink-2); }
.rc-grow { flex: 1; }

/* ══════════ 条目卡 ══════════ */
.rc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rc-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0 10px;
  height: 34px;
  width: 230px;
  color: var(--ink-3);
}
.rc-search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.rc-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-fchip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  transition: background var(--t-fast) var(--ease-io), color var(--t-fast) var(--ease-io),
              border-color var(--t-fast) var(--ease-io), transform var(--t-fast) var(--ease);
}
.rc-fchip:hover { transform: scale(1.02); }
.rc-fchip:active { transform: scale(.98); }
.rc-fchip b { font-weight: 600; color: var(--ink-3); }
.rc-fchip.rc-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rc-fchip.rc-on b { color: #CFCAC2; }
@media (prefers-reduced-motion: reduce) {
  .rc-fchip:hover { transform: none; }
  .rc-fchip:active { transform: none; }
}

.rc-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: 13px;
  margin-bottom: 12px;
}
.rc-banner.hold { background: var(--hold-w); color: #6E4A10; border: 1px solid #F0DFBE; }
.rc-banner.run  { background: var(--run-w);  color: #2D5784; border: 1px solid #D5E3F2; }
.rc-banner.mute { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.rc-banner .rc-grow { flex: 1; }

.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 12px;
}
.rc-grid.leaving {
  opacity: 0; transform: translateY(4px);
  transition: opacity 120ms var(--ease-io), transform 120ms var(--ease-io);
}
@media (prefers-reduced-motion: reduce) {
  .rc-grid.leaving { transition: none; }
}

.rc-ecard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 15px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t-fast) var(--ease-io);
}
.rc-ecard:hover { transform: scale(1.02); box-shadow: 0 8px 22px rgba(31,30,28,.08); border-color: #DCD7CF; }
.rc-ecard:active { transform: scale(.98); }
.rc-ecard.off { background: var(--surface-3); opacity: .62; }
.rc-ecard.flag { box-shadow: inset 3px 0 0 var(--warn); }
.rc-ecard header { display: flex; align-items: flex-start; gap: 8px; }
.rc-ecard h4 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 1.35; flex: 1; }
.rc-ecard .rc-cat { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.rc-ecard .rc-meaning { font-size: 12.5px; color: var(--ink-2); line-height: 1.65; margin: 0; }
.rc-ecard .rc-meaning .k { color: var(--ink-3); margin-right: 4px; }
.rc-ecard .rc-points { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 3px 0; }
.rc-ecard .rc-points i { color: var(--ink-3); font-style: normal; margin: 0 3px; }
.rc-ecard .rc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-ecard footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.rc-ecard .rc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
@media (prefers-reduced-motion: reduce) {
  .rc-ecard:hover { transform: none; box-shadow: none; }
  .rc-ecard:active { transform: none; }
}

/* 新建卡 */
.rc-new-card {
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  min-height: 130px;
  background: var(--surface-3);
  transition: border-color var(--t-fast) var(--ease-io), background var(--t-fast) var(--ease-io),
              transform var(--t) var(--ease);
}
.rc-new-card:hover { border-color: var(--ink-3); background: var(--surface); transform: scale(1.02); }
.rc-new-card:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .rc-new-card:hover, .rc-new-card:active { transform: none; }
}

/* 使用统计条 */
.rc-statbar { display: flex; gap: 6px; align-items: center; }
.rc-bar {
  height: 4px; border-radius: 2px; flex: 1;
  background: var(--line); overflow: hidden;
}
.rc-bar-fill { height: 100%; border-radius: 2px; background: var(--ink); transition: width .3s var(--ease); }
.rc-bar-fill.main { background: var(--ok); }
.rc-bar-fill.skel { background: #8FB0D4; }
.rc-stat-num { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ══════════ 抽屉 ══════════ */
.rc-backdrop {
  position: fixed; inset: 0;
  background: rgba(31,30,28,.32);
  z-index: 39;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease-io);
}
.rc-backdrop.open { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  .rc-backdrop { transition: none; }
}

.rc-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 94vw;
  background: var(--surface);
  box-shadow: -12px 0 40px rgba(31,30,28,.14);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease);
  border-left: 1px solid var(--line);
}
.rc-drawer.open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .rc-drawer { transition: none; }
}

.rc-dw-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.rc-dw-head h3 { font-family: var(--serif); font-weight: 500; font-size: 19px; margin: 0; flex: 1; }
.rc-dw-body { flex: 1; overflow: auto; padding: 20px; }
.rc-dw-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.rc-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.rc-field label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.rc-field input, .rc-field textarea {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  background: var(--surface);
  font: inherit;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease-io);
}
.rc-field input:focus, .rc-field textarea:focus { border-color: var(--acc); outline: none; }
.rc-field textarea { resize: vertical; min-height: 72px; line-height: 1.7; }

.rc-dw-sec { margin-bottom: 18px; }
.rc-dw-sec-h {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}

.rc-chipin {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  background: var(--surface);
  min-height: 38px;
  cursor: text;
}
.rc-chipin:focus-within { border-color: var(--acc); }
.rc-chipin input {
  border: 0; outline: 0; background: transparent;
  min-width: 80px; flex: 1;
  font: inherit; color: var(--ink);
}

/* ── 抽屉内部（按设计稿结构）── */
.rc-dw-grow { flex: 1; min-width: 0; }
.rc-dw-kind { font-size: 12px; color: var(--ink-3); }
.rc-dw-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.rc-dw-sec { margin-bottom: 20px; }
.rc-dw-sec-h {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.rc-dw-sec-hint { font-size: 12px; font-weight: 400; color: var(--ink-3); }

.rc-field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.rc-field .rc-errmsg { display: none; color: var(--warn); font-size: 12px; margin-top: 4px; font-style: normal; }
.rc-field.err input, .rc-field.err textarea { border-color: var(--warn); }
.rc-field.err .rc-errmsg { display: block; }
.rc-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  background: var(--surface);
  font: inherit;
  color: var(--ink);
  min-height: 38px;
}
.rc-field select:focus { border-color: var(--acc); outline: none; }
.rc-field textarea { min-height: 58px; }

/* 四步 */
.rc-steps4 { display: grid; gap: 10px; }
.rc-step4 { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.rc-step4 .rc-field { margin: 0; }
.rc-step-no {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  margin-top: 22px;
}
.rc-step-no.rc-done { background: var(--ok); }

/* 有序列表（拍法 / 故事点） */
.rc-olist { display: grid; gap: 6px; }
.rc-orow {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: center;
  animation: rc-rise var(--t) var(--ease) both;
}
.rc-orow .rc-orow-n { font-size: 12px; color: var(--ink-3); text-align: right; }
.rc-orow input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 9px;
  background: var(--surface);
  font: inherit;
  color: var(--ink);
}
.rc-orow button {
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); border-radius: 6px;
  height: 28px;
  display: grid; place-items: center;
}
.rc-orow button:hover { background: var(--surface-2); color: var(--warn); }
@media (prefers-reduced-motion: reduce) { .rc-orow { animation: none; } }

/* 适用馆 */
.rc-venue-checks { display: flex; gap: 16px; flex-wrap: wrap; }
.rc-venue-checks label { display: flex; gap: 6px; align-items: center; cursor: pointer; font-size: 13.5px; }
.rc-venue-checks input { accent-color: var(--acc); width: 16px; height: 16px; }

/* 诊断面板 */
.rc-diag-panel { padding: 12px 14px; }
.rc-diag-scope { font-size: 11.5px; color: var(--ink-3); margin-bottom: 8px; }
.rc-bar-lg { height: 5px; margin-bottom: 6px; }
.rc-stat-num-block { display: block; margin-bottom: 6px; white-space: normal; }
.rc-diag-tagline { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-dots { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.rc-dot {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
}
.rc-dot.raw { background: var(--ink); color: #fff; border-color: var(--ink); }
.rc-dot.skel { background: #DCE7F3; color: #2D5784; border-color: #C7D8EB; }
.rc-dot.rec { background: var(--surface-2); color: var(--ink-2); }

/* 给模型看的样子 */
details.rc-plain > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
details.rc-plain > summary::-webkit-details-marker { display: none; }
details.rc-plain > summary .ic { transition: transform var(--t) var(--ease-back); }
details.rc-plain[open] > summary .ic { transform: rotate(90deg); }
.rc-code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--ink);
  color: #E6E2DB;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  white-space: pre-wrap;
  line-height: 1.7;
  margin-top: 8px;
  word-break: break-word;
}
.rc-code-note { color: #9A948B; }

/* 开关（交付页）*/
.rc-switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rc-sw {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  transition: border-color var(--t-fast) var(--ease-io), transform var(--t-fast) var(--ease);
}
.rc-sw:hover { transform: scale(1.02); }
.rc-sw:active { transform: scale(.98); }
.rc-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rc-sw .rc-knob {
  width: 30px; height: 18px;
  border-radius: 9px;
  background: #D9D5CE;
  position: relative;
  flex-shrink: 0;
  transition: background var(--t) var(--ease-io);
}
.rc-sw .rc-knob::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform var(--t) var(--ease-back);
}
.rc-sw input:checked + .rc-knob { background: var(--acc); }
.rc-sw input:checked + .rc-knob::after { transform: translateX(12px); }
.rc-sw input:focus-visible + .rc-knob { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .rc-sw:hover, .rc-sw:active { transform: none; }
  details.rc-plain > summary .ic { transition: none; }
}

/* ══════════ 草稿条（浮动胶囊）══════════ */
.rc-draftbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #EDEBE7;
  box-shadow: 0 10px 30px rgba(31,30,28,.25);
  font-size: 13px;
  max-width: calc(100vw - 32px);
  transition: background var(--t-slow) var(--ease-io), color var(--t-slow) var(--ease-io),
              box-shadow var(--t-slow) var(--ease-io), opacity var(--t) var(--ease),
              transform var(--t) var(--ease);
}
/* 无草稿时：浅色小胶囊，只说明「与线上一致」*/
.rc-draftbar.clean {
  background: var(--surface);
  color: var(--ink-3);
  box-shadow: 0 2px 10px rgba(31,30,28,.06);
  border: 1px solid var(--line);
  padding: 7px 16px;
}
.rc-draftbar .rc-btn { min-height: 30px; padding: 4px 12px; font-size: 12.5px; }
.rc-draftbar .rc-btn.ghost { color: #D8D3CB; }
.rc-draftbar .rc-btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.rc-draftbar .rc-btn.primary { background: #fff; border-color: #fff; color: var(--ink); }
.rc-draftbar .rc-n { font-weight: 700; }
.rc-draftbar .rc-n.rc-bump { animation: rc-pulse .36s var(--ease-back); }
.rc-draftbar.clean { padding: 8px 16px; }
@media (max-width: 900px) {
  .rc-draftbar { left: 16px; right: 16px; transform: none; max-width: none;
    justify-content: space-between; border-radius: var(--r-lg); padding: 8px 12px; gap: 8px; }
  .rc-draftbar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-draftbar { transition: none; }
}

/* ══════════ 发布弹窗 ══════════ */
.rc-modal {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(31,30,28,.32);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t) var(--ease-io);
}
.rc-modal.open { opacity: 1; pointer-events: auto; }
.rc-modal-box {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  width: 560px; max-width: 92vw;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 30px 60px rgba(31,30,28,.25);
  transform: translateY(10px) scale(.98);
  transition: transform var(--t-slow) var(--ease);
}
.rc-modal.open .rc-modal-box { transform: none; }
.rc-modal-box .rc-banner { margin-top: 4px; }
.rc-modal-box h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 20px; margin: 0 0 10px;
}
.rc-modal-box p { color: var(--ink-2); font-size: 13.5px; margin: 0 0 20px; line-height: 1.7; }
.rc-modal-foot { display: flex; gap: 8px; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) {
  .rc-modal { transition: none; }
  .rc-modal-box { transition: none; transform: none; }
}

/* ══════════ 试跑页 ══════════ */
.rc-crumb {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rc-crumb button {
  background: none; border: 0; padding: 0;
  color: var(--ink-3); cursor: pointer;
  transition: color var(--t-fast) var(--ease-io);
}
.rc-crumb button:hover { color: var(--ink); }

.rc-small { font-size: 12.5px; }
.rc-muted { color: var(--ink-3); }
.rc-warn-text { color: var(--warn); display: inline-flex; align-items: center; gap: 6px; }

/* 本次改动 */
.rc-changes { display: grid; gap: 6px; }
.rc-change {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  animation: rc-rise var(--t) var(--ease) both;
}
.rc-change .rc-where { color: var(--ink-3); white-space: nowrap; }
.rc-change .rc-what { flex: 1; color: var(--ink-2); word-break: break-word; }
@media (prefers-reduced-motion: reduce) { .rc-change { animation: none; } }

/* 两栏 */
.rc-trial-wrap { container-type: inline-size; }
.rc-trial {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.rc-trial .block-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }

.rc-persona {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform var(--t) var(--ease), border-color var(--t-fast) var(--ease-io),
              box-shadow var(--t) var(--ease);
}
.rc-persona:hover { transform: scale(1.02); }
.rc-persona:active { transform: scale(.98); }
.rc-persona.rc-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.rc-persona .rc-persona-nm {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rc-persona .rc-meta { font-size: 12px; color: var(--ink-3); }
.rc-persona ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.rc-persona ul li { margin: 2px 0; }
@media (prefers-reduced-motion: reduce) {
  .rc-persona:hover, .rc-persona:active { transform: none; }
}

/* 自己写一个 */
.rc-custom-form { margin: 10px 0 12px; }
.rc-custom-form .rc-field { margin-bottom: 10px; }
.rc-custom-form select {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  background: var(--surface);
  font: inherit;
  color: var(--ink);
  min-height: 36px;
}
.rc-custom-form select:focus { border-color: var(--acc); outline: none; }
.rc-custom-foot { display: flex; gap: 8px; justify-content: flex-end; }

/* 成本提示 */
.rc-cost {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.rc-cost-foot {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 10px;
  padding-left: 2px;
}

/* 进度 */
.rc-progress { display: grid; gap: 8px; padding: 6px 0; }
.rc-pstep {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-3);
  transition: color var(--t) var(--ease-io);
}
.rc-pstep .rc-b {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background var(--t) var(--ease-io), border-color var(--t) var(--ease-io);
}
.rc-pstep.rc-run { color: var(--run); }
.rc-pstep.rc-run .rc-b {
  border-color: var(--run);
  border-top-color: transparent;
  animation: rc-spin .8s linear infinite;
}
.rc-pstep.rc-done { color: var(--ink); }
.rc-pstep.rc-done .rc-b { background: var(--ok); border-color: var(--ok); color: #fff; }
@keyframes rc-spin { to { transform: rotate(360deg); } }

.rc-trial-progress {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
  font-size: 13.5px;
}

/* 候选对比 */
.rc-cmp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.rc-cmp-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  min-width: 0;
}
.rc-cmp-col.rc-draft { border-color: #C7D8EB; }
.rc-cmp-col h4 {
  margin: 0 0 4px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rc-cmp-src { font-size: 11.5px; color: var(--ink-3); margin-bottom: 8px; }
.rc-cmp-empty { font-size: 12.5px; color: var(--ink-3); padding: 8px 0; line-height: 1.7; }
.rc-cand-grp { font-size: 12px; color: var(--ink-3); margin: 10px 0 6px; }
.rc-cand-none { font-size: 12px; color: var(--ink-3); padding-bottom: 4px; }
.rc-cand {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  margin-bottom: 6px;
  font-size: 13px;
  background: var(--surface-3);
  animation: rc-rise var(--t) var(--ease) both;
}
.rc-cand .rc-cand-nm { flex: 1; min-width: 0; }
.rc-cand .rc-cand-nm small { display: block; color: var(--ink-3); font-size: 11.5px; }
.rc-cand.new { border-color: #CFE1D5; background: var(--ok-w); }
.rc-cand.chg { border-color: #D5E3F2; background: var(--run-w); }
.rc-cand.gone { opacity: .55; text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .rc-cand { animation: none; } }

.rc-why-h { margin: 0 0 6px; font-size: 13px; font-family: inherit; font-weight: 600; }
.rc-why-line { padding: 3px 0; color: var(--ink-2); }

/* 发布行 */
.rc-publish-row { display: flex; align-items: center; gap: 14px; }

@container (max-width: 860px) {
  .rc-trial { grid-template-columns: minmax(0, 1fr); }
  .rc-trial-left { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: start; }
  .rc-trial-left > .rc-block-h,
  .rc-trial-left > .rc-btn,
  .rc-trial-left > .rc-small,
  .rc-trial-left > .rc-custom-form,
  .rc-trial-left > .rc-empty { grid-column: 1 / -1; }
  .rc-trial-left .rc-persona { margin-bottom: 0; }
}
@container (max-width: 560px) {
  .rc-cmp { grid-template-columns: minmax(0, 1fr); }
  .rc-trial-left { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .rc-pstep.rc-run .rc-b { animation: none; border-color: var(--run); }
  .rc-persona:hover, .rc-persona:active { transform: none; }
}

/* ══════════ 历史版本 ══════════ */
.rc-hist-list { display: flex; flex-direction: column; gap: 10px; }
.rc-hist-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.rc-hist-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rc-hist-head .rc-ver { font-weight: 600; font-size: 14px; }
.rc-hist-head .rc-meta { font-size: 12.5px; color: var(--ink-3); }
.rc-hist-head .rc-right { margin-left: auto; }
.rc-hist-changes { display: flex; flex-direction: column; gap: 4px; }
.rc-hist-change { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; }
.rc-hist-change .rc-where { color: var(--ink-3); white-space: nowrap; }
.del { color: var(--warn); text-decoration: line-through; }
.add { color: var(--ok); }

/* ══════════ 总览 ══════════ */
.rc-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
.rc-ov-main { min-width: 0; }
.rc-ov-side { display: grid; gap: 14px; }
.rc-ov-side h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 健康条 */
.rc-health {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.rc-hbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--r);
  border: 1px solid;
  cursor: pointer;
  font-size: 13px;
  background: var(--surface);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.rc-hbtn:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(31,30,28,.06); }
.rc-hbtn:active { transform: scale(.98); }
.rc-hbtn.rc-warn { border-color: #EDC5BF; color: var(--warn); }
.rc-hbtn.rc-hold { border-color: #EBD8B4; color: var(--hold); }
.rc-hbtn b { font-size: 16px; }

/* 诊断口径 */
.rc-scope {
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

/* 分区卡 */
.rc-objs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.rc-obj {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 178px;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t-fast) var(--ease-io);
}
.rc-obj:hover { transform: scale(1.02); box-shadow: 0 10px 26px rgba(31,30,28,.08); border-color: #DCD7CF; }
.rc-obj:active { transform: scale(.98); }
.rc-obj-top { display: flex; align-items: center; gap: 10px; }
.rc-obj-top .rc-ico-box {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex-shrink: 0;
}
.rc-obj-top .ic.muted { color: var(--ink-3); margin-left: auto; }
.rc-obj h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 17px; flex: 1; }
.rc-big { font-size: 26px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.rc-big small { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.rc-obj-lines { font-size: 12.5px; color: var(--ink-2); display: grid; gap: 2px; }
.rc-obj-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }

/* 最近改动 */
.rc-hist-row {
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.rc-hist-row:first-of-type { border-top: 0; padding-top: 0; }
.rc-hist-row .rc-who { color: var(--ink-3); }
.rc-diffline { display: block; color: var(--ink-2); margin-top: 3px; }

/* 诊断建议 */
.rc-todo {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  cursor: pointer;
}
.rc-todo:first-of-type { border-top: 0; padding-top: 0; }
.rc-todo:hover .rc-t { color: var(--ink); text-decoration: underline; }
.rc-todo .rc-t { color: var(--ink-2); }

.rc-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--run);
  cursor: pointer;
  font-size: inherit;
}
.rc-link:hover { text-decoration: underline; }

@container (max-width: 1080px) {
  .rc-overview { grid-template-columns: minmax(0, 1fr); }
  .rc-ov-side { grid-template-columns: 1fr 1fr; }
}
@container (max-width: 640px) {
  .rc-ov-side { grid-template-columns: 1fr; }
}

/* 零数据提示（试跑诊断等复用）*/
.rc-zero-data { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.7; }

/* ══════════ 响应式：900px 以下 rail 变顶部横向 ══════════ */
@media (max-width: 900px) {
  .rc-body { flex-direction: column; min-width: 0; }
  .rc-rail {
    width: 100%;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    gap: 4px;
    flex-shrink: 0;
    /* 横向滚动条细而浅，不占高度 */
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .rc-rail::-webkit-scrollbar { height: 3px; }
  .rc-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
  .rc-rail-sep { display: none; }
  .rc-rail-item { flex-shrink: 0; padding: 6px 12px; white-space: nowrap; width: auto; }
  .rc-rail-cnt { margin-left: 4px; }
  .rc-view { padding: 16px 16px 120px; }
  .rc-topbar { padding: 12px 16px 10px; gap: 10px; flex-wrap: wrap; }
  .rc-conf-vs { grid-template-columns: 1fr; }
  .rc-conf-mid { padding: 2px 0; }
  .rc-drawer { width: 100%; max-width: 100%; border-left: 0; }
}

/* 390px：不横滚 */
@media (max-width: 640px) {
  .rc-topbar { flex-direction: column; align-items: flex-start; }
  .rc-topbar .rc-grow { display: none; }
  .rc-topbar h1 { font-size: 19px; }
  .rc-topbar .rc-lead { font-size: 12px; }
  .rc-seg { align-self: flex-start; }
  .rc-seg button { padding: 5px 12px; font-size: 12.5px; }
  .rc-view { padding: 14px 14px 120px; }
  .rc-grid { grid-template-columns: 1fr; }
  .rc-tiles { grid-template-columns: 1fr; }
  .rc-ov-grid { grid-template-columns: 1fr 1fr; }
  .rc-block-h { flex-wrap: wrap; }
  .rc-toolbar { flex-direction: column; align-items: stretch; }
  .rc-search { width: 100%; }
  .rc-trial-progress { flex-wrap: wrap; }
  .rc-draftbar { left: 12px; right: 12px; transform: none; max-width: none;
    justify-content: space-between; border-radius: var(--r-lg); padding: 8px 12px; gap: 8px; }
  .rc-draftbar .rc-draft-list { display: none; }
}

/* 参考图：编辑条目时给故事线/特色版绑图库资产 */
.rc-refgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rc-refcell { position: relative; aspect-ratio: 3 / 4; border: 1px dashed var(--line); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; background: var(--surface-2); color: var(--ink-3); overflow: hidden; }
.rc-refcell:hover { border-color: var(--acc); color: var(--acc); }
.rc-refcell.has { border-style: solid; background: var(--surface); }
.rc-refcell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rc-refcell em { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 11px;
  padding: 3px 6px; background: rgba(31,30,28,.55); color: #fff; text-align: center; }
.rc-refcell:not(.has) em { position: static; background: none; color: inherit; }
.rc-refx { position: absolute; top: 4px; right: 4px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(31,30,28,.62); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rc-refx:hover { background: var(--warn); }

/* 图库选图弹窗 */
.rc-libdlg { border: 0; padding: 0; border-radius: 14px; width: min(860px, 92vw); max-height: 82vh;
  box-shadow: 0 24px 60px rgba(28,24,20,.22); }
.rc-libdlg::backdrop { background: rgba(28,24,20,.42); }
.rc-libhd { display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 10px; position: sticky; top: 0;
  background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1; }
.rc-libdlg > p { margin: 10px 20px 0; }
.rc-libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 14px 20px 20px; }
.rc-libitem { border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--surface-2); display: flex; flex-direction: column; }
.rc-libitem:hover { border-color: var(--acc); }
.rc-libitem img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.rc-libitem em { font-style: normal; font-size: 11px; padding: 4px 6px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
