/* ds-5850 资产 v3：提示词卡片、紧凑试稿网格、定稿资产与试稿工作区。
   只写 r12av2- 新类；颜色、间距、圆角一律用 r12-system 的语义变量。 */

.r12av2-stage { display: contents; }
.r12av2-ws { min-height: 0; }

.r12av2-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* ── 面板头与顶部轻工具栏 ───────────────────────────────────── */

.r12av2-panel .r12av2-head {
  height: auto;
  min-height: 40px;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 6px 12px;
}

.r12av2-head-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 260px; }
.r12av2-head-copy h2 { white-space: normal; }
.r12av2-head-copy span { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); overflow-wrap: anywhere; }

.r12av2-count { flex: none; color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); font-variant-numeric: tabular-nums; }
.r12av2-head .r12-seg { flex: none; }

.r12av2-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-height: 32px;
  padding: 0 12px 6px;
}

.r12av2-tool-note {
  margin-right: auto;
  min-width: 0;
  color: var(--r12-muted);
  font-size: var(--r12-fs-small);
  line-height: var(--r12-lh-small);
  overflow-wrap: anywhere;
}

.r12av2-report {
  flex: none;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 12px 6px;
  padding: 5px 8px;
  border: 1px solid var(--r12-line);
  border-radius: 8px;
  background: var(--r12-surface-2);
  color: var(--r12-muted);
  font-size: var(--r12-fs-small);
  line-height: var(--r12-lh-small);
  overflow-wrap: anywhere;
}
.r12av2-report-title { color: var(--r12-ink); font-weight: 600; }
.r12av2-report-lines { flex: 1 1 220px; min-width: 0; }
.r12av2-report-close { flex: none; margin-left: auto; }

/* 工作区自己滚动；不再给底部主控预留任何布局高度。 */
.r12av2-panel .r12av2-body {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  padding: 0 10px 10px;
  overflow: auto;
}

.r12av2-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 36px 16px;
  text-align: center;
  color: var(--r12-muted);
}
.r12av2-empty b { color: var(--r12-ink); font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; }
.r12av2-empty span { font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }

/* ── 紧凑试稿网格：默认 3 列，宽屏 4 列 ─────────────────────── */

/* 列数跟着工作区实际宽度走：默认集导航打开时，1440 是 3 列、1728 是 4 列；
   关掉集导航时卡片变宽，网格自动多一列，不会把卡片拉高挤出首屏。 */
.r12av2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.r12av2-card {
  position: relative;
  align-self: start;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface-2);
  color: var(--r12-ink);
  box-shadow: none;
  cursor: pointer;
  transition: border-color var(--r12-dur-2) var(--r12-ease);
}
.r12av2-card:hover { border-color: var(--r12-line-strong); }
.r12av2-card:focus-visible { outline: 2px solid var(--r12-ink); outline-offset: 2px; }

/* 选中只改原有细边框，无外圈发光。 */
.r12av2-card.is-selected,
.r12av2-card.is-selected:hover { border-color: var(--r12-selected-border); box-shadow: none; }
.r12av2-card.is-marked { border-style: dashed; }
.r12av2-card.is-formal { border-color: var(--r12-line-strong); }

.r12av2-media {
  position: relative;
  width: 100%;
  aspect-ratio: 2.1 / 1;
  overflow: hidden;
  border-radius: 9px;
  background: var(--r12-surface-3);
  isolation: isolate;
}
.r12av2-media img.r12av2-main-img { width: 100%; height: 100%; display: block; object-fit: cover; }

.r12av2-empty-media {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px;
  color: var(--r12-muted);
  font-size: var(--r12-fs-small);
  line-height: var(--r12-lh-small);
  text-align: center;
  overflow-wrap: anywhere;
}
.r12av2-empty-media .r12av2-empty-title { color: var(--r12-ink); font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; }

.r12av2-top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 78px 18px 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0));
  color: #fff;
  pointer-events: none;
}
.r12av2-top .r12av2-name { font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; overflow-wrap: anywhere; }
.r12av2-state-chip {
  flex: none;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: var(--r12-r-pill);
  font-size: 11px;
  line-height: 16px;
  color: #fff;
  overflow-wrap: anywhere;
}

.r12av2-status {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  max-width: 46%;
  padding: 1px 6px;
  border: 1px solid var(--r12-line-strong);
  border-radius: var(--r12-r-pill);
  background: color-mix(in srgb, var(--r12-surface) 86%, transparent);
  color: var(--r12-muted);
  font-size: 11px;
  line-height: 16px;
  text-align: right;
  overflow-wrap: anywhere;
}
.r12av2-status.is-accepted { color: var(--r12-ink); border-color: var(--r12-selected-border); }
.r12av2-status.is-running { color: var(--r12-review); border-color: color-mix(in srgb, var(--r12-review) 60%, transparent); }
@keyframes r12av2-job-in {
  from { opacity: .72; }
  to { opacity: 1; }
}
.r12av2-card:has(.r12av2-status.is-running) { animation: r12av2-job-in 480ms var(--r12-ease, ease-out) 1; }
[data-motion="reduced"] .r12av2-card { animation: none; }
.r12av2-status.is-marked { color: var(--r12-error); border-color: color-mix(in srgb, var(--r12-error) 55%, transparent); }
.r12av2-status.is-empty { color: var(--r12-muted); }

.r12av2-zoom {
  position: absolute;
  top: 28px;
  right: 5px;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  background: rgba(0, 0, 0, .52);
  color: #fff;
  cursor: pointer;
}
.r12av2-zoom svg { width: 13px; height: 13px; }
.r12av2-zoom:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 版本小图：贴着底边，超出横向滚动，不撑高卡片。 */
.r12av2-thumbs {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 30px;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.r12av2-thumbs::-webkit-scrollbar { width: 0; height: 0; }

.r12av2-thumb {
  position: relative;
  width: 30px;
  height: 24px;
  flex: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 5px;
  overflow: hidden;
  background: #101013;
  box-shadow: none;
  cursor: pointer;
}
.r12av2-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.r12av2-thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 当前版本只改小图自己的细边框，不加外圈发光。 */
.r12av2-thumb.is-current { border-color: var(--r12-selected-border); box-shadow: none; }

.r12av2-thumb-no {
  position: absolute;
  left: 1px;
  bottom: 1px;
  min-width: 11px;
  height: 11px;
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .66);
  color: #fff;
  font-size: 9px;
  line-height: 11px;
  text-align: center;
}
.r12av2-thumb-check {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #101013;
}
.r12av2-thumb-check svg { width: 8px; height: 8px; }
.r12av2-thumb.is-current .r12av2-thumb-check { display: grid; }

.r12av2-actions {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  overflow: hidden;
}
.r12av2-actions .r12-btn {
  height: 24px;
  max-height: 24px;
  padding: 0 7px;
  border-color: var(--r12-line-strong);
  background: color-mix(in srgb, var(--r12-surface) 86%, transparent);
  color: var(--r12-ink);
  font-size: 11px;
  line-height: 16px;
}
.r12av2-actions .r12-btn:hover { background: var(--r12-surface); }
/* 卡片内覆盖层的焦点圈往里收，避免被 media 的 overflow 裁掉。 */
.r12av2-actions .r12-btn:focus-visible,
.r12av2-thumb:focus-visible,
.r12av2-zoom:focus-visible { outline-offset: -2px; }
.r12av2-actions .r12-btn:disabled,
.r12av2-actions .r12-btn[aria-disabled='true'] {
  border-color: var(--r12-line);
  background: color-mix(in srgb, var(--r12-surface) 70%, transparent);
  color: var(--r12-faint);
  cursor: default;
}

/* ── 提示词卡片 ─────────────────────────────────────────────── */

.r12av2-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.r12av2-prompt-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface-2);
  color: var(--r12-ink);
  cursor: pointer;
  transition: border-color var(--r12-dur-2) var(--r12-ease);
}
.r12av2-prompt-card:hover { border-color: var(--r12-line-strong); }
.r12av2-prompt-card:focus-visible { outline: 2px solid var(--r12-ink); outline-offset: 2px; }

.r12av2-prompt-media {
  position: relative;
  flex: none;
  width: 150px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--r12-surface-3);
}
.r12av2-prompt-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.r12av2-prompt-media.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--r12-line-strong);
  background: repeating-linear-gradient(135deg, var(--r12-surface-3), var(--r12-surface-3) 6px, var(--r12-surface-2) 6px, var(--r12-surface-2) 12px);
}
.r12av2-prompt-empty-text { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }

.r12av2-prompt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.r12av2-prompt-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.r12av2-prompt-title .r12av2-name { font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; overflow-wrap: anywhere; }
.r12av2-prompt-title .r12av2-status { position: static; max-width: none; }

.r12av2-prompt-text {
  margin: 0;
  color: var(--r12-ink);
  font-size: var(--r12-fs-small);
  line-height: var(--r12-lh-small);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.r12av2-prompt-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.r12av2-prompt-hint { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }
.r12av2-prompt-foot .r12-btn { margin-left: auto; }

.r12av2-use { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); overflow-wrap: anywhere; }

/* 大尺寸提示词编辑器：长文完整可读可改。 */
.r12av2-prompt-edit { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.r12av2-prompt-edit-note { margin: 0; color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }
.r12av2-prompt-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 320px;
  height: 44vh;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--r12-line);
  border-radius: 10px;
  background: var(--r12-surface-2);
  color: var(--r12-ink);
  font: inherit;
  font-size: var(--r12-fs-ui);
  line-height: var(--r12-lh-ui);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  resize: none;
  overflow: auto;
}

/* ── 定稿资产 ───────────────────────────────────────────────── */

.r12av2-final-bar .r12av2-tool-note { flex: 1 1 320px; }

.r12av2-final-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.r12av2-final-layout.is-open { grid-template-columns: minmax(0, 1fr) 320px; }

.r12av2-final-groups { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.r12av2-final-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.r12av2-final-group-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.r12av2-final-group-head b { color: var(--r12-ink); font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; }
.r12av2-final-group-head span { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }

.r12av2-final-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.r12av2-final-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface-2);
  color: var(--r12-ink);
}
.r12av2-final-card[role='button'] { cursor: pointer; }
.r12av2-final-card[role='button']:focus-visible { outline: 2px solid var(--r12-ink); outline-offset: 2px; }

/* 多状态只叠卡缘：最多三层，不使用发光。 */
.r12av2-final-char.is-stack-2 { box-shadow: 3px 3px 0 -1px var(--r12-surface-2), 3px 3px 0 0 var(--r12-line); }
.r12av2-final-char.is-stack-3 { box-shadow: 3px 3px 0 -1px var(--r12-surface-2), 3px 3px 0 0 var(--r12-line), 6px 6px 0 -1px var(--r12-surface-2), 6px 6px 0 0 var(--r12-line); }

.r12av2-final-media {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--r12-surface-3);
}
.r12av2-final-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.r12av2-final-media.is-empty { display: flex; align-items: center; justify-content: center; }
.r12av2-final-media .r12av2-empty-title { color: var(--r12-muted); font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; }

.r12av2-final-count,
.r12av2-final-state {
  position: absolute;
  left: 6px;
  top: 6px;
  max-width: calc(100% - 12px);
  padding: 1px 6px;
  border-radius: var(--r12-r-pill);
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  overflow-wrap: anywhere;
}

.r12av2-final-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.r12av2-final-info .r12av2-name { font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; overflow-wrap: anywhere; }
.r12av2-final-info span { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); overflow-wrap: anywhere; }

.r12av2-final-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.r12av2-final-actions .r12-btn { height: 26px; max-height: 26px; padding: 0 8px; font-size: 11px; }

/* 状态分支：在工作区旁边展开。 */
.r12av2-final-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface-2);
}
.r12av2-final-side-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.r12av2-final-side-head h3 { flex: 1; margin: 0; font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; overflow-wrap: anywhere; }
.r12av2-branch-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }

.r12av2-branch { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--r12-line); border-radius: 8px; }
.r12av2-branch.is-accepted { border-color: var(--r12-selected-border); }
.r12av2-branch.is-pending { border-style: dashed; }
.r12av2-branch-media { position: relative; width: 100%; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 6px; background: var(--r12-surface-3); display: flex; align-items: center; justify-content: center; }
.r12av2-branch-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.r12av2-branch-media span { color: var(--r12-muted); font-size: 11px; line-height: 16px; }
.r12av2-branch-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.r12av2-branch-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.r12av2-branch-head b { font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; }
.r12av2-branch-head span { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); overflow-wrap: anywhere; }
.r12av2-branch-note { margin: 0; color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); overflow-wrap: anywhere; }
.r12av2-branch .r12av2-final-actions { margin-top: 2px; }

/* ── 试稿工作区弹窗 ─────────────────────────────────────────── */

.r12av2-ws-dialog {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .9fr);
  gap: 14px;
  padding: 4px 0 10px;
  align-items: start;
}
.r12av2-ws-media { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.r12av2-ws-stage {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--r12-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.r12av2-ws-stage img { width: 100%; height: 100%; display: block; object-fit: contain; }
.r12av2-ws-stage.is-empty { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); border: 1px dashed var(--r12-line-strong); box-sizing: border-box; }

.r12av2-ws-versions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.r12av2-ws-version {
  position: relative;
  width: 64px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--r12-line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--r12-surface-3);
  box-shadow: none;
  cursor: pointer;
}
.r12av2-ws-version img { width: 100%; height: 100%; display: block; object-fit: cover; }
.r12av2-ws-version.is-current { border-color: var(--r12-selected-border); box-shadow: none; }
.r12av2-ws-version.is-accepted::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--r12-ink); border-radius: 6px; pointer-events: none; }
.r12av2-ws-version:focus-visible { outline: 2px solid var(--r12-ink); outline-offset: 2px; }
.r12av2-ws-version-no { position: absolute; left: 2px; bottom: 2px; padding: 0 3px; border-radius: 3px; background: rgba(0, 0, 0, .66); color: #fff; font-size: 9px; line-height: 12px; }
.r12av2-ws-version-tag { position: absolute; right: 2px; top: 2px; padding: 0 3px; border-radius: 3px; background: var(--r12-ink); color: var(--r12-bg); font-size: 9px; line-height: 12px; }
.r12av2-ws-none { color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }

.r12av2-ws-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.r12av2-ws-row { display: flex; align-items: center; gap: 8px; }
.r12av2-ws-row > span { flex: 1; color: var(--r12-ink); font-size: var(--r12-fs-ui); line-height: var(--r12-lh-ui); font-weight: 600; }

.r12av2-ws-prompt {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--r12-line);
  border-radius: 8px;
  background: var(--r12-surface-2);
  color: var(--r12-ink);
  font-size: var(--r12-fs-small);
  line-height: var(--r12-lh-small);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.r12av2-ws-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); }
.r12av2-ws-meta .r12-btn { margin-left: auto; }
.r12av2-ws-meta span { overflow-wrap: anywhere; }

.r12av2-ws-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.r12av2-ws-actions .r12av2-generate { flex: 1 1 180px; }

.r12av2-ws-status {
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--r12-line);
  border-radius: 8px;
  background: var(--r12-surface-2);
  color: var(--r12-ink);
  font-size: var(--r12-fs-small);
  line-height: var(--r12-lh-small);
  overflow-wrap: anywhere;
}
.r12av2-ws-note { margin: 0; color: var(--r12-muted); font-size: var(--r12-fs-small); line-height: var(--r12-lh-small); overflow-wrap: anywhere; }

.r12av2-lb-info { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── 宽度与窗口高度适配：只调列数和间距，不压扁卡片 ─────────── */

@media (min-width: 1600px) {
  .r12av2-prompt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .r12av2-final-layout.is-open { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .r12av2-prompt-grid { grid-template-columns: minmax(0, 1fr); }
  .r12av2-ws-dialog { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .r12av2-grid,
  .r12av2-final-grid { grid-template-columns: minmax(0, 1fr); }
  .r12av2-prompt-card { flex-wrap: wrap; }
  .r12av2-prompt-media { width: 132px; }
}

/* 短窗口：卡片尺寸不变，正常滚动；只收一点间距。 */
@media (max-height: 700px) {
  .r12av2-panel .r12av2-body { padding: 0 8px 8px; }
  .r12av2-grid, .r12av2-final-grid { gap: 6px; }
  .r12av2-toolbar { min-height: 30px; padding-bottom: 4px; }
}

/* 减少动态：本模块没有循环动效，只保留状态切换时的边框过渡。 */
:root[data-motion='reduced'] .r12av2-card,
:root[data-motion='reduced'] .r12av2-prompt-card { transition: none; }
