@layer views {


#scriptHeading[contenteditable="true"] {
  cursor: text;
  border-radius: var(--radius-sm);
  outline: 0;
}

#scriptHeading[contenteditable="true"]:focus {
  background: var(--primary-soft);
  box-shadow: 0 0 0 6px var(--primary-soft);
}
.blank-paper {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  background: color-mix(in oklch, var(--surface-2) 62%, transparent);
}
.blank-paper strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 28px;
}
.blank-paper span {
  font-size: 14px;
}
.storyboard-board {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-4);
  padding-top: var(--space-3);
}
.storyboard-toolbar {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) max-content max-content;
  gap: var(--space-3);
  align-items: end;
}
.shot-search {
  min-width: 0;
  display: grid;
  gap: var(--space-1);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.shot-search input {
  height: 42px;
}
/* Ctrl+F 式搜索：输入框 + 计数 + 上/下一个 同排 */
.shot-search-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.shot-search-box input {
  flex: 1;
  min-width: 0;
}
.shot-search-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.shot-search-count {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-text);
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.shot-search-count.is-empty { color: var(--muted); }
.search-nav-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.search-nav-btn:hover:not(:disabled) {
  border-color: color-mix(in oklch, var(--primary) 24%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-text);
}
.search-nav-btn:disabled { opacity: .4; cursor: default; }
.storyboard-toolbar {
  grid-template-columns: minmax(260px, 1fr) max-content;
}
.table-menu-wrap {
  position: relative;
  justify-self: end;
}
.table-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 24;
  width: min(680px, calc(100vw - 48px));
  display: grid;
  gap: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--surface) 98%, transparent);
  box-shadow: var(--shadow-paper);
  padding: var(--space-4);
}
.table-menu-head {
  display: grid;
  gap: 2px;
}
.table-menu-head b {
  color: var(--ink);
  font-size: 14px;
}
.table-menu-head span {
  color: var(--muted);
  font-size: 12px;
}
.shot-column-picker {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.shot-column-picker label {
  min-height: 42px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--surface) 94%, transparent);
  color: var(--muted);
  padding: 0 var(--space-3);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.shot-column-picker label:has(input:checked) {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: color-mix(in oklch, var(--primary) 28%, var(--line));
}
.shot-column-picker label.locked {
  cursor: default;
  opacity: .74;
}
.shot-column-picker input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--primary);
}
.shot-column-picker button {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 var(--space-2);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}
.shot-column-picker button.active {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}
.storyboard-wrap {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--surface) 96%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklch, white 70%, transparent);
}
.storyboard-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.storyboard-table th,
.storyboard-table td {
  border-right: 1px solid color-mix(in oklch, var(--line) 76%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 76%, transparent);
  vertical-align: top;
}
.storyboard-table th:last-child,
.storyboard-table td:last-child {
  border-right: 0;
}
.storyboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 58px;
  background: color-mix(in oklch, var(--surface-2) 96%, white);
  color: var(--muted);
  padding: 14px var(--space-3) 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  user-select: none;
}
.shot-drag-head,
.shot-drag-cell {
  width: 44px;
  min-width: 44px;
}
.shot-action-head,
.shot-actions-cell {
  width: 58px;
  min-width: 58px;
}
.shot-row {
  background: color-mix(in oklch, var(--surface) 98%, transparent);
  transition: background var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}
.shot-row:hover,
.shot-row.active {
  background: color-mix(in oklch, var(--primary-soft) 52%, var(--surface));
}
/* 搜索高亮已降级：不再整行高亮、也不给所有命中格上色——只突出「当前选中那一处」：单元格底色 + 选中文字。 */
.shot-cell.is-search-current .shot-cell-input {
  background: color-mix(in oklch, #ffd23d 80%, var(--surface));
  box-shadow: inset 0 0 0 1.5px color-mix(in oklch, #e09b00 65%, transparent);
}
/* 当前选中的关键词文字本身：亮黄底 + 深字（浏览器原生选区高亮，聚焦命中单元格时可见） */
.shot-cell-input::selection { background: #ffcf2e; color: #1a1a1a; }
.shot-row.pulse {
  box-shadow: inset 0 0 0 2px color-mix(in oklch, var(--primary) 50%, transparent);
}
.shot-row.dragging {
  opacity: .66;
}
.shot-drag-cell {
  padding: var(--space-2);
  text-align: center;
  background: inherit;
}
.shot-drag {
  height: 104px;
}
.shot-cell {
  height: 132px;
  padding: 0;
  background: inherit;
}
.shot-number {
  display: inline-grid;
  min-width: 34px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-family: var(--font-number);
  font-size: 14px;
  font-weight: 900;
  margin: var(--space-3);
}
.shot-cell-input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: color-mix(in oklch, var(--ink) 84%, var(--paper));
  padding: var(--space-3);
  font-size: 14px;
  line-height: 23px;
  resize: none;
  overflow: auto;
}
textarea.shot-cell-input {
  min-height: 100%;
}
.shot-cell-input:focus {
  border-color: color-mix(in oklch, var(--primary) 34%, var(--line));
  background: var(--surface);
  outline: none;
}
.shot-actions-cell {
  position: relative;
  padding: var(--space-2);
  background: color-mix(in oklch, var(--surface) 98%, transparent);
  text-align: center;
}
.row-menu-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}
.row-menu {
  position: absolute;
  right: var(--space-2);
  top: 46px;
  z-index: 20;
  min-width: 132px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--surface) 98%, transparent);
  box-shadow: var(--shadow-paper);
  padding: var(--space-2);
}
.row-menu button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  padding: 0 var(--space-2);
  font-weight: 850;
}
.row-menu button:hover {
  background: var(--primary-soft);
  color: var(--primary-text);
}
.column-title {
  display: block;
  padding-right: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.column-tools {
  position: absolute;
  right: 18px;
  top: 12px;
}
.column-tools button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}
.column-tools button.active {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}
.column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  z-index: 6;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}
.column-resizer:hover {
  background: color-mix(in oklch, var(--primary) 14%, transparent);
}
.is-pinned {
  position: sticky;
  z-index: 5;
  box-shadow: 1px 0 0 color-mix(in oklch, var(--line) 78%, transparent);
}
thead .is-pinned {
  z-index: 7;
}
.dragging-column {
  opacity: .55;
}
.drag-handle {
  width: 28px;
  min-width: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle, var(--muted) 0 1px, transparent 1.5px) 6px 8px / 8px 8px;
  opacity: .45;
  cursor: grab;
}
.part-index {
  padding-top: 8px;
  color: var(--primary);
  font-family: var(--font-number);
  font-size: 22px;
  font-weight: 900;
}
.part-body {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.part-actions {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: var(--space-2);
  max-width: 190px;
}
.version-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}
.version-status b {
  color: var(--primary-text);
}
.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.progress-list {
  display: grid;
  gap: var(--space-2);
}
.progress-list span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  padding: 0 var(--space-4);
}
.progress-list span.done {
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 850;
}@media (max-width: 1180px) {
  .storyboard-toolbar {
    grid-template-columns: 1fr;
  }
  .shot-column-picker {
    justify-content: flex-start;
  }}
@media (max-width: 760px) {
  .part-actions {
    grid-column: 1 / -1;
    max-width: none;
    justify-content: flex-start;
  }}


/* ===== 2026-06-05: 固定列分层 + 素材输入边界 ===== */
.storyboard-table {
  isolation: isolate;
}
.storyboard-table .is-pinned {
  background: color-mix(in oklch, var(--surface) 98%, white);
  background-clip: padding-box;
  z-index: 10;
  box-shadow: none;
}
.storyboard-table thead .is-pinned {
  z-index: 15;
  background: color-mix(in oklch, var(--surface-2) 98%, white);
}
.storyboard-table .pin-boundary {
  box-shadow: 5px 0 0 -4px color-mix(in oklch, var(--line) 74%, transparent);
}
.storyboard-table .pin-boundary::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: color-mix(in oklch, var(--line) 72%, transparent);
  pointer-events: none;
}
.storyboard-table th[data-column-id][draggable="true"] {
  cursor: grab;
}
.storyboard-table th[data-column-id]:not([draggable="true"]) {
  cursor: default;
}
.column-title {
  padding-right: 16px;
}
/* X1-keep：.column-tools 为未渲染的遗留类（全仓 js/html 零引用），保守保留待走查后清理——非活跃 JS 切换（X1 审查修正原注释） */
.column-tools,
.column-tools button {
  display: none !important;
}
.storyboard-table .dragging-column {
  background: color-mix(in oklch, var(--primary-soft) 72%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--primary) 28%, transparent);
}
.storyboard-table th.dragging-column {
  opacity: .88;
}

/* 鼠标拖动列时禁用文本选择，让整列移动更稳定。
   !important 保留：`*` 须强制盖过子元素自带的更高特异性 user-select（输入框等），
   属行为性契约（非视觉），无法以层序等价替代——保留。 */
.column-dragging-active,
.column-dragging-active * {
  user-select: none !important;
}
.storyboard-table th[data-draggable-column="true"] {
  cursor: grab;
}
.column-dragging-active .storyboard-table th[data-draggable-column="true"] {
  cursor: grabbing;
}
.column-dragging-active .storyboard-table [data-column-id] {
  transition: background var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}

/* ===== 2026-06-05: 更窄分镜列 + 固定行操作入口 ===== */
.storyboard-table {
  table-layout: fixed;
}

.storyboard-table th,
.storyboard-table td,
.storyboard-table textarea,
.storyboard-table input {
  min-width: 0;
  box-sizing: border-box;
}

.shot-action-head,
.shot-actions-cell {
  position: sticky;
  right: 0;
  z-index: 12;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  background: color-mix(in oklch, var(--surface) 98%, white);
  box-shadow: -1px 0 0 color-mix(in oklch, var(--line) 74%, transparent);
}

.storyboard-table thead .shot-action-head {
  z-index: 18;
  background: color-mix(in oklch, var(--surface-2) 98%, white);
}

.row-menu-button.active {
  background: var(--primary-soft);
  color: var(--primary-text);
  border-color: color-mix(in oklch, var(--primary) 32%, var(--line));
}

.row-menu {
  top: 8px;
  right: 44px;
}

/* ===== history button + dropdown ===== */

.history-btn-wrap {
  position: relative;
  display: inline-flex;
}

/* .history-toggle / .history-toggle.active 基样式已迁 @layer overrides（X1）：
   本按钮 class="icon-button history-toggle"，需盖 flow 的 .icon-button 基样式
   （36px 圆钮，同特异性 0,1,0 但 flow 是更晚层）——去 !important、靠 overrides 层序取胜。 */
.history-toggle::before {
  --mask: url("data:image/svg+xml,%3Csvg width='24' height='24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E");
  width: 18px;
  height: 18px;
}

.history-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: min(320px, calc(100vw - 40px));
  max-height: 380px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--surface) 98%, transparent);
  box-shadow: 0 12px 48px rgba(20, 54, 39, 0.18);
  padding: var(--space-3);
  animation: dropdown-appear var(--motion-fast) var(--ease-out);
}

.history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.history-head b {
  font-size: 14px;
}

.history-head span {
  font-size: 11px;
  color: var(--muted);
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  padding: var(--space-2);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.history-item:hover {
  background: var(--primary-soft);
  color: var(--primary-text);
}

.history-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.history-empty {
  padding: var(--space-3);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.history-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 0;
}

.history-star {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.history-star.on {
  color: var(--primary);
}

.history-star:hover {
  background: color-mix(in oklch, var(--primary) 16%, transparent);
}

.history-item.is-confirmed {
  background: color-mix(in oklch, var(--primary) 8%, transparent);
}

/* ===== 2026-06-14: 处理步骤行 + 通用小号 CSS 加载动画（mini-spinner，吃主品牌绿） ===== */
.progress-list span .step-name { font-style: normal; min-width: 0; }
.progress-list span.doing {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 700;
}
/* 状态文字（含「进行中」）：spinner 贴在文字左侧 —— <b><spinner>进行中</b> */
.progress-list span b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ===== 整体优化：整张表高斯模糊 + 居中 loading（数据原地加载） ===== */
.storyboard-board.is-optimizing,
.storyboard-board.is-optimizing-row { position: relative; }
.storyboard-board.is-optimizing .storyboard-wrap {
  filter: blur(3px);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  transition: filter var(--motion-fast) var(--ease-out);
  min-height: 300px; /* 打开项目时表为空（旧分镜已清），给「加载分镜中…」遮罩留出居中高度，不被压扁 */
}
.optimize-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: start center;
  pointer-events: none;
}
.optimize-card {
  position: sticky;
  top: 96px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(4px);
  color: var(--primary-text);
  font-weight: 800;
  font-size: 14px;
}
.gen-activity {
  position: sticky;
  top: 0;
  z-index: 6;
  /* 提问态等高面板时限高，超出则面板内部滚动——给下方镜头表留出空间，不再盖住/挤掉表 */
  max-height: 46vh;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: color-mix(in oklch, var(--primary-soft) 42%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
}
/* 生成未完成横幅：温和的警示色，「继续生成」一键续生成 */
.gen-incomplete {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warn) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  font-size: 13px;
}
.gen-incomplete-text {
  flex: 1;
  min-width: 0;
  color: var(--text);
}
.gen-incomplete-x {
  border: none;
  background: transparent;
  color: var(--text-muted, #8a8f98);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 4px;
}
.gen-incomplete-x:hover {
  color: var(--text);
}
.gen-act-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-text);
  font-weight: 850;
  font-size: 13px;
}
.gen-act-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.gen-act-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.gen-act-item.is-done { color: var(--muted); }
.gen-act-item.is-active { color: var(--ink); font-weight: 700; }
.gen-act-item.is-error { color: var(--danger-strong); font-weight: 700; }
.gen-act-icon {
  width: 16px;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.gen-act-item.is-done .gen-act-icon { color: var(--primary); font-weight: 900; }
.gen-think { margin-top: 8px; }
.gen-think-toggle {
  border: 0;
  background: transparent;
  padding: 2px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-text);
  cursor: pointer;
}
.gen-think-body {
  margin: 6px 0 0;
  max-height: 160px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}
/* AI 就方向歧义提问：问题 + 可选项按钮（点选 → 带答复续生成，可多轮） */
.gen-ask {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--surface) 92%, transparent);
  border: 1px dashed color-mix(in srgb, var(--primary) 36%, var(--line));
}
.gen-ask-q {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.gen-ask-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gen-ask-opt {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  background: var(--surface);
  color: var(--primary-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.gen-ask-opt:hover {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  transform: translateY(-1px);
}
.gen-ask-custom {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.gen-ask-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
}
.gen-ask-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}
.gen-ask-send {
  flex: none;
  padding: 0 16px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-accent);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.gen-ask-send:hover { background: color-mix(in oklch, var(--primary) 88%, #000); }

/* ===== 正在被 AI 优化（worker 处理中）的行：锁定 + 毛玻璃 + 操作列 spinner =====
   只锁这一行（它正被改写，不能同时编辑）；其余行（含排队等待的）不受影响，可继续编辑。 */
.shot-row.row-optimizing { background: color-mix(in oklch, var(--primary-soft) 40%, var(--surface)); pointer-events: none; }
.shot-row.row-optimizing .shot-cell {
  filter: blur(2.4px);
  opacity: 0.55;
  user-select: none;
  transition: filter var(--motion-fast) var(--ease-out);
}
/* 已提交但还在排队等待的行：更淡背景 + 操作列「排队中」提示；不锁，可继续编辑（worker 轮到时读最新内容） */
.shot-row.row-queued { background: color-mix(in oklch, var(--primary-soft) 16%, var(--surface)); }
.row-queued-hint { display: inline-grid; place-items: center; width: 100%; font-size: 11px; color: var(--muted); white-space: nowrap; }
.row-optimizing-spinner {
  display: inline-grid;
  place-items: center;
  width: 100%;
}
}
