﻿/* 快捷视频：三栏台（编导 / 参考示例 / 任务队列） */
body.quick-video-open .main {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.web-shell.quick-video-open .main {
  padding: 0;
  overflow: hidden;
}

/* 网页端左侧悬浮栏（left 16px + 宽 72px）会盖住左栏。与其它页 main 的 104px 左内边距对齐。 */
@media (min-width: 721px) {
  body.web-shell.quick-video-open .main {
    padding-left: 104px;
  }
}

body.quick-video-open .web-banner-stack:not(:has(> :not([hidden]))) {
  display: none;
}

#view-quick-video.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  animation: none;
}

.qv-page {
  --qv-left-w: 420px;
  --qv-right-w: 220px;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: var(--qv-left-w) 10px minmax(240px, 1fr) 10px var(--qv-right-w);
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  gap: 8px;
  padding: 16px 18px 18px;
  box-sizing: border-box;
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(245, 158, 11, 0.08), transparent 55%),
    radial-gradient(700px 380px at 78% 12%, rgba(96, 165, 250, 0.06), transparent 50%),
    var(--bg-0, #16130f);
}

.qv-split {
  position: relative;
  z-index: 4;
  width: 10px;
  margin: 0 -4px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  align-self: stretch;
}

.qv-split::after {
  content: '';
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.qv-split:hover::after,
body.qv-col-resizing .qv-split.is-active::after {
  background: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

body.qv-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.qv-col-resizing * {
  cursor: col-resize !important;
}

.qv-col {
  min-height: 0;
  min-width: 0;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border, #3a3127);
  border-radius: 14px;
  background: rgba(30, 26, 21, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.qv-col-left {
  padding: 10px 12px 12px;
  gap: 8px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* 素材叠放悬停展开时允许溢出，避免被左栏裁切 */
.qv-col-left:has(.qv-media-stack:hover),
.qv-col-left:has(.qv-media-stack:focus-within) {
  overflow: visible;
  z-index: 5;
}

.qv-col-center {
  padding: 0;
  overflow: hidden;
}

.qv-col-right {
  padding: 12px 12px 10px;
  overflow: hidden;
}

.qv-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.qv-mode-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, #3a3127);
}

.qv-mode-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-mute, #6f6557);
  border-radius: 999px;
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.qv-mode-btn:hover {
  color: var(--text-dim, #a89c87);
}

.qv-mode-btn.is-on {
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber, #f59e0b);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.qv-skill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

.qv-skill-head.has-media-stack {
  overflow: visible;
  z-index: 8;
}

.qv-skill-trigger {
  appearance: none;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(255, 255, 255, 0.03));
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}

.qv-skill-head.is-empty .qv-skill-trigger {
  border-color: var(--border, #3a3127);
  background: rgba(255, 255, 255, 0.03);
}

.qv-skill-head.is-open .qv-skill-trigger,
.qv-skill-trigger:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(255, 255, 255, 0.04));
}

.qv-skill-cover {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-2, #262119);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.qv-skill-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qv-skill-cover.is-empty {
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.35), rgba(255, 255, 255, 0.06));
}

/* 素材叠放：默认扇形叠放，悬停横向展开 */
.qv-media-stack {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 44px;
  z-index: 9;
}

.qv-media-stack-fan {
  position: relative;
  width: 40px;
  height: 40px;
  margin-top: 2px;
}

.qv-media-stack-fan-item {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #1a1510;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform:
    translateX(calc(var(--i) * 5px))
    translateY(calc(var(--i) * -1px))
    rotate(calc(var(--i) * 3deg));
  z-index: calc(var(--i) + 1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.qv-media-stack-fan-item img,
.qv-media-stack-fan-item video,
.qv-media-stack-cell img,
.qv-media-stack-cell video,
.qv-media-float-pop img,
.qv-media-float-pop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}

.qv-media-stack-badge {
  position: absolute;
  right: -6px;
  bottom: -4px;
  z-index: 8;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.qv-media-stack-expand {
  display: none;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 6px;
  padding: 8px;
  max-width: min(360px, 72vw);
  /* 仅横向滚动；放大预览改挂 body fixed，避免 overflow-x 把 overflow-y 算成 auto 裁切 */
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(28, 24, 19, 0.97);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
}

.qv-media-stack:hover,
.qv-media-stack:focus-within {
  width: auto;
  min-width: 52px;
  z-index: 30;
}

.qv-media-stack:hover .qv-media-stack-fan,
.qv-media-stack:focus-within .qv-media-stack-fan {
  opacity: 0;
  pointer-events: none;
}

.qv-media-stack:hover .qv-media-stack-expand,
.qv-media-stack:focus-within .qv-media-stack-expand {
  display: flex;
}

.qv-media-stack-cell {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #15110d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.qv-media-stack-cell > img,
.qv-media-stack-cell > video {
  border-radius: 7px;
}

.qv-media-stack-num {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* 挂 body：悬浮到窗口内，不被素材条滚动区域裁切（对标 maolong） */
.qv-media-float-pop {
  display: none;
  position: fixed;
  z-index: 13050;
  width: 180px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: #0e0b08;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.qv-media-float-pop.is-on {
  display: block;
}

.qv-media-stack-cell:hover {
  border-color: rgba(245, 158, 11, 0.65);
}

.qv-skill-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qv-skill-card-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--text, #f5efe4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-skill-card-desc {
  font-size: 12px;
  color: var(--text-dim, #a89c87);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-skill-chev {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
  background: rgba(255, 255, 255, 0.06);
}

.qv-hero-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 2px;
}

.qv-hero-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 6px 2px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.qv-hero-toggle:hover .qv-hero-q {
  color: var(--amber, #f59e0b);
}

.qv-hero-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #f5efe4);
  margin: 0;
}

.qv-hero-chev {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-mute, #6f6557);
}

.qv-hero-hint,
.qv-hero-picked {
  font-size: 12px;
  color: var(--text-mute, #6f6557);
  padding: 0 2px 2px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-hero-picked {
  color: var(--text-dim, #a89c87);
}

.qv-chips-hint {
  font-size: 11.5px;
  color: var(--text-mute, #6f6557);
  padding: 0 2px 2px;
  line-height: 1.4;
}

.qv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qv-chip {
  appearance: none;
  border: 1px solid var(--border, #3a3127);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
  border-radius: 999px;
  padding: 7px 10px 7px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.qv-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qv-chip-sec {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.4;
}

.qv-chip:hover,
.qv-chip.is-on {
  color: var(--text, #f5efe4);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
}

.qv-chip.is-on .qv-chip-sec {
  background: rgba(245, 158, 11, 0.22);
}

.qv-hero-picked.is-brief {
  margin-top: 4px;
  max-height: 4.5em;
  overflow: auto;
  line-height: 1.45;
  white-space: normal;
}

/* 视频模式对话流：发送后的提示词落在此区 */
.qv-chat-feed {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}

.qv-chat-turn {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qv-chat-bubble {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.qv-chat-bubble.is-user {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.22);
}

.qv-chat-bubble.is-bot {
  background: rgba(0, 0, 0, 0.22);
}

.qv-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
}

.qv-chat-meta > span:first-child {
  font-weight: 650;
  color: var(--text-dim, #a89c87);
}

.qv-chat-meta-acts {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qv-chat-copy,
.qv-chat-quote {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--amber, #f59e0b);
  font-size: 11px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  opacity: 0.85;
}

.qv-chat-copy:hover,
.qv-chat-quote:hover {
  opacity: 1;
  text-decoration: underline;
}

.qv-chat-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text, #f5efe4);
  white-space: pre-wrap;
  word-break: break-word;
  /* 高度随内容撑开，只滚外层对话窗口，避免双重滚动条 */
  max-height: none;
  overflow: visible;
}

.qv-chat-text.is-mention {
  white-space: normal;
}

.qv-chat-text .qv-at-unit {
  margin: 0 1px;
}

.qv-chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim, #a89c87);
}

.qv-chat-status.is-busy {
  color: var(--amber, #f59e0b);
}

.qv-chat-err {
  font-size: 12.5px;
  line-height: 1.5;
  color: #f87171;
}

.qv-chat-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qv-chat-media-toggle {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.qv-chat-media-toggle:hover {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber, #f59e0b);
  background: rgba(245, 158, 11, 0.08);
}

.qv-chat-media-lab {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qv-chat-media-chev {
  flex-shrink: 0;
  font-size: 11px;
  opacity: 0.9;
}

.qv-chat-media-body {
  min-width: 0;
}

.qv-chat-video {
  width: 100%;
  max-height: 240px;
  border-radius: 10px;
  background: #0e0b08;
  display: block;
}

.qv-chat-bot-acts {
  display: flex;
  gap: 6px;
  margin-top: 0;
}

.qv-script-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0 0;
}

.qv-script-scroll {
  flex: 1;
  min-height: 0;
  position: relative;
}

.qv-script-mention {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.qv-script-backdrop,
.qv-script-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: 0;
  padding: 0 2px 0 0;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: auto;
  tab-size: 4;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.qv-script-backdrop {
  pointer-events: none;
  z-index: 0;
  color: var(--text, #f5efe4);
  background: transparent;
}

.qv-script-body {
  z-index: 1;
  resize: none;
  background: transparent;
  color: var(--text, #f5efe4);
  caret-color: var(--amber, #f59e0b);
}

/* 叠字模式下：backdrop 盖在 textarea 上，仅 @缩略图可点放大，其余点击穿透编辑 */
.qv-script-mention.is-mention-synced .qv-script-backdrop {
  z-index: 2;
}

.qv-script-mention.is-mention-synced .qv-script-body {
  z-index: 1;
}

.qv-script-mention.is-mention-synced .qv-at-unit.is-zoom {
  pointer-events: auto;
  z-index: 3;
}

.qv-script-body:focus {
  outline: none;
}

.qv-script-mention.is-mention-synced .qv-script-body {
  color: rgba(245, 239, 228, 0.014);
  -webkit-text-fill-color: rgba(245, 239, 228, 0.014);
}

.qv-script-mention.is-mention-synced .qv-script-body::selection {
  background: rgba(59, 125, 216, 0.45);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.qv-at-unit {
  position: relative;
  display: inline;
  white-space: nowrap;
  vertical-align: baseline;
}

.qv-at-unit.is-zoom {
  cursor: zoom-in;
}

.qv-chat-text .qv-at-unit.is-zoom:hover .qv-at-thumb,
.qv-prompt-mention .qv-at-unit.is-zoom:hover .qv-at-thumb,
.qv-script-mention .qv-at-unit.is-zoom:hover .qv-at-thumb {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.qv-at-ghost {
  opacity: 0;
}

.qv-at-thumb {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 50%;
  height: 1.45em;
  transform: translateY(-50%);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(196, 184, 165, 0.4);
  background: #1a1510;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.qv-at-thumb img,
.qv-at-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}

.qv-at-audio,
.qv-at-miss {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim, #a89c87);
  background: rgba(255, 255, 255, 0.06);
}

.qv-at-unit.is-miss .qv-at-thumb {
  border-style: dashed;
  border-color: rgba(248, 113, 113, 0.45);
}

.qv-forbid {
  flex-shrink: 0;
  border-top: 1px solid var(--border-soft, #2a241c);
  padding-top: 6px;
}

.qv-forbid-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 4px 2px;
  border: none;
  background: transparent;
  color: var(--text, #f5efe4);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.qv-forbid-toggle:hover {
  color: var(--amber, #f59e0b);
}

.qv-forbid-list {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--text-dim, #a89c87);
  font-size: 11.5px;
  line-height: 1.55;
  max-height: 88px;
  overflow: auto;
}

.qv-script-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 2px;
}

.qv-link {
  appearance: none;
  border: none;
  background: transparent;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}

.qv-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.qv-exit-pill {
  appearance: none;
  border: none;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 999px;
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.qv-exit-pill:hover {
  background: rgba(0, 0, 0, 0.88);
}

.qv-composer {
  position: relative;
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 10px;
  min-height: 180px;
  max-height: 88%;
  border-radius: 14px;
  border: 1px solid var(--border, #3a3127);
  background: rgba(38, 33, 25, 0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  box-sizing: border-box;
  overflow: hidden;
}

/* 加号菜单向上弹出时放开裁切，避免选项只露出一条被挡住 */
.qv-composer.is-menu-open {
  overflow: visible;
  z-index: 12;
}

.qv-col-left:has(.qv-composer.is-menu-open) {
  overflow: visible;
  z-index: 6;
}

.qv-composer.is-sized {
  flex-shrink: 0;
}

.qv-composer-resize {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  cursor: row-resize;
  z-index: 3;
  touch-action: none;
}

.qv-composer-resize::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  margin: 3px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: background .15s;
}

.qv-composer-resize:hover::after,
body.qv-composer-resizing .qv-composer-resize::after {
  background: rgba(245, 158, 11, 0.7);
}

body.qv-composer-resizing {
  cursor: row-resize !important;
  user-select: none !important;
}

body.qv-composer-resizing * {
  cursor: row-resize !important;
}

.qv-composer.is-director {
  background: rgba(255, 255, 255, 0.04);
}

.qv-composer.is-busy {
  opacity: 1;
}

.qv-analyze-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px 2px;
}

.qv-analyze-spin,
.qv-send-spin,
.qv-task-spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.25);
  border-top-color: var(--amber, #f59e0b);
  animation: qv-spin 0.75s linear infinite;
  flex-shrink: 0;
}

.qv-send-spin {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
}

.qv-analyze-main {
  flex: 1;
  min-width: 0;
}

.qv-analyze-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.qv-analyze-msg {
  font-size: 12.5px;
  color: var(--text, #f5efe4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-analyze-pct {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber, #f59e0b);
  font-variant-numeric: tabular-nums;
}

.qv-analyze-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.qv-analyze-track > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.25s ease;
}

.qv-send.is-busy {
  opacity: 1;
}

@keyframes qv-spin {
  to { transform: rotate(360deg); }
}

.qv-composer-media {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
  padding-top: 2px;
}

.qv-composer-foot {
  flex-shrink: 0;
}

.qv-media-zoom {
  appearance: none;
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.qv-media-zoom:hover {
  color: var(--text, #f5efe4);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
}

.qv-media-gallery {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 6, 4, 0.72);
  backdrop-filter: blur(6px);
}

.qv-media-gallery-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #2a231a 0%, #1c1712 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.qv-media-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.qv-media-gallery-head strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--text, #f5efe4);
}

.qv-media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow: auto;
}

.qv-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #15110d;
  cursor: zoom-in;
  padding: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.qv-gallery-item[data-qv-gallery-focus]:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.qv-gallery-item.is-audio {
  cursor: default;
}

.qv-gallery-item img,
.qv-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.qv-gallery-item.is-video video {
  background: #000;
}

.qv-gallery-audio {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 36px;
}

.qv-gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  font-size: 11px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.qv-gallery-item .qv-media-x {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0.9;
  cursor: pointer;
  z-index: 2;
}

/* 放大层铺满视口，避免素材少时弹窗很矮导致图片被裁成一条 */
.qv-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12100;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 20px 16px 16px;
  background: rgba(8, 6, 4, 0.92);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.qv-gallery-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 10px 4px 12px;
  flex-shrink: 0;
}

.qv-gallery-lightbox-bar strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--text, #f5efe4);
}

.qv-gallery-lightbox-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
}

.qv-gallery-lightbox-frame {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qv-gallery-lightbox-media {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: #0a0806;
}

.qv-gallery-lightbox-media[src] {
  cursor: default;
}

video.qv-gallery-lightbox-media {
  width: min(100%, 900px);
  max-height: calc(100vh - 120px);
}

.qv-gallery-nav {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #f5efe4);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
}

.qv-gallery-nav:hover:not(:disabled) {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber, #f59e0b);
}

.qv-gallery-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.qv-gallery-lightbox-hint {
  flex-shrink: 0;
  width: min(960px, 100%);
  margin: 0 auto;
  text-align: center;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
  padding: 10px 4px 0;
}

.qv-media-peek {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 20px);
  background: rgba(8, 6, 4, 0.82);
  backdrop-filter: blur(8px);
}

.qv-media-peek-panel {
  width: min(1200px, 96vw);
  height: min(92vh, 960px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #2a231a 0%, #1c1712 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.qv-media-peek-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.qv-media-peek-bar strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--text, #f5efe4);
}

.qv-media-peek-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 8px;
  overflow: hidden;
}

.qv-media-peek-media {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: #0a0806;
}

video.qv-media-peek-media {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.qv-media-peek-hint {
  flex-shrink: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
  padding: 0 16px 12px;
}

.qv-composer.is-dragover,
.qv-opt-panel.is-dragover,
.qv-opt-composer.is-dragover,
.qv-media-gallery-panel.is-dragover {
  outline: 2px dashed rgba(245, 158, 11, 0.65);
  outline-offset: -4px;
}

.qv-composer.is-dragover {
  background: rgba(245, 158, 11, 0.08);
}

.qv-drop-hint {
  font-size: 12px;
  color: var(--amber, #f59e0b);
  text-align: center;
  padding: 4px 0 0;
}

.qv-plus-wrap {
  position: relative;
  z-index: 2;
}

.qv-composer.is-menu-open .qv-plus-wrap {
  z-index: 20;
}

.qv-tile {
  appearance: none;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim, #a89c87);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  transition: border-color .15s, background .15s, color .15s;
}

.qv-tile-plus:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--text, #f5efe4);
  background: rgba(245, 158, 11, 0.1);
}

.qv-plus-ico {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  margin-top: -1px;
}

.qv-tile-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 2;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.qv-add-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border, #3a3127);
  background: rgba(28, 24, 18, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qv-add-menu-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text, #f5efe4);
  text-align: left;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

.qv-add-menu-item:hover {
  background: rgba(245, 158, 11, 0.12);
}

.qv-media-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.qv-media-strip.is-stacked {
  flex-wrap: nowrap;
  gap: 0;
  overflow: visible;
  padding-right: 4px;
}

.qv-media-strip.is-stacked .qv-media-thumb {
  margin-left: -14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform .15s, margin .15s, z-index 0s;
}

.qv-media-strip.is-stacked .qv-media-thumb:first-child {
  margin-left: 0;
}

.qv-media-strip.is-stacked .qv-media-thumb:hover {
  transform: translateY(-3px) scale(1.06);
  z-index: 20 !important;
}

.qv-media-strip.is-stacked .qv-media-thumb:nth-child(1) { z-index: 1; }
.qv-media-strip.is-stacked .qv-media-thumb:nth-child(2) { z-index: 2; }
.qv-media-strip.is-stacked .qv-media-thumb:nth-child(3) { z-index: 3; }
.qv-media-strip.is-stacked .qv-media-thumb:nth-child(4) { z-index: 4; }
.qv-media-strip.is-stacked .qv-media-thumb:nth-child(5) { z-index: 5; }
.qv-media-strip.is-stacked .qv-media-thumb:nth-child(6) { z-index: 6; }

.qv-media-strip.is-stacked .qv-media-x {
  opacity: 0;
}

.qv-media-strip.is-stacked .qv-media-thumb:hover .qv-media-x {
  opacity: 1;
}

.qv-media-more {
  appearance: none;
  flex-shrink: 0;
  height: 36px;
  min-width: 36px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.qv-media-strip.is-stacked .qv-media-more {
  margin-left: 8px;
}

.qv-media-more:hover,
.qv-media-more.is-collapse:hover {
  color: var(--text, #f5efe4);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
}

.qv-media-more.is-collapse {
  min-width: auto;
  font-weight: 500;
}

.qv-media-thumb {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #3a3127);
  background: var(--bg-2, #262119);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.qv-media-thumb.is-zoom {
  cursor: zoom-in;
}

.qv-media-thumb.is-zoom:hover {
  border-color: rgba(245, 158, 11, 0.55);
}

.qv-media-thumb img,
.qv-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qv-media-thumb.is-audio {
  width: 36px;
}

.qv-media-tag {
  position: absolute;
  left: 3px;
  bottom: 3px;
  z-index: 1;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.qv-audio-lab {
  font-size: 16px;
}

.qv-asset-picker {
  position: fixed;
  inset: 0;
  z-index: 14000;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 24px;
}

.qv-asset-picker-panel {
  width: min(720px, 96vw);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border, #3a3127);
  background: var(--bg-1, #1e1a15);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.qv-asset-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.qv-asset-picker-head strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--text, #f5efe4);
}

.qv-asset-picker-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.qv-asset-picker-grid {
  flex: 1;
  min-height: 240px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  align-content: start;
}

.qv-lib-item {
  appearance: none;
  border: 1px solid var(--border, #3a3127);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.qv-lib-item:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.qv-lib-thumb {
  width: 100%;
  aspect-ratio: 1;
  min-height: 96px;
  background: #15110d;
  overflow: hidden;
  flex-shrink: 0;
}

.qv-lib-item img,
.qv-lib-item video,
.qv-lib-thumb img,
.qv-lib-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
  border: 0;
}

.qv-lib-ph {
  width: 100%;
  height: 100%;
  min-height: 96px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.04);
}

.qv-lib-name {
  font-size: 11px;
  padding: 6px 8px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.qv-lib-kind {
  font-size: 10px;
  color: var(--text-mute, #6f6557);
  padding: 0 8px 8px;
}

.qv-media-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.qv-prompt-mention {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.qv-prompt-backdrop,
.qv-prompt-mention .qv-prompt {
  width: 100%;
  flex: 1 1 auto;
  min-height: 64px;
  max-height: none;
  margin: 0;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: 0;
  padding: 4px 2px;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: auto;
  tab-size: 4;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.qv-prompt-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  color: var(--text, #f5efe4);
  background: transparent;
}

.qv-prompt-mention .qv-prompt {
  position: relative;
  z-index: 1;
  resize: none;
  height: auto;
  background: transparent;
  color: var(--text, #f5efe4);
  caret-color: var(--amber, #f59e0b);
}

.qv-prompt-mention.is-mention-synced .qv-prompt-backdrop {
  z-index: 2;
}

.qv-prompt-mention.is-mention-synced .qv-prompt {
  z-index: 1;
  color: rgba(245, 239, 228, 0.014);
  -webkit-text-fill-color: rgba(245, 239, 228, 0.014);
}

.qv-prompt-mention.is-mention-synced .qv-at-unit.is-zoom {
  pointer-events: auto;
  z-index: 3;
}

.qv-prompt-mention.is-mention-synced .qv-prompt::selection {
  background: rgba(59, 125, 216, 0.45);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.qv-composer.is-sized .qv-prompt-mention,
.qv-composer.is-sized .qv-prompt-mention .qv-prompt,
.qv-composer.is-sized .qv-analyze-progress {
  flex: 1 1 auto;
  min-height: 0;
}

.qv-prompt:focus {
  outline: none;
}

.qv-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qv-foot-left,
.qv-foot-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.qv-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim, #a89c87);
  font-size: 11.5px;
}

.qv-lang-wrap {
  position: relative;
  padding-right: 18px;
}

.qv-lang-wrap::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid var(--text-mute, #6f6557);
  transform: translateY(-35%);
  pointer-events: none;
}

.qv-lang-wrap.is-open {
  border-color: rgba(224, 161, 90, 0.45);
  color: var(--text, #f5efe4);
}

.qv-sel-plain {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  padding: 0;
  max-width: 72px;
  cursor: pointer;
}

.qv-lang-btn {
  max-width: none;
  line-height: 1;
}

.qv-lang-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 50;
  min-width: 108px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border, #3a3127);
  background: #1c1812;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
  color-scheme: dark;
}

.qv-lang-menu-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text, #f5efe4);
  text-align: left;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.qv-lang-menu-item:hover {
  background: rgba(224, 161, 90, 0.14);
}

.qv-lang-menu-item.is-on {
  background: rgba(224, 161, 90, 0.22);
  color: #f6d7a2;
  font-weight: 600;
}

.qv-cost {
  font-size: 11.5px;
  color: var(--text-mute, #6f6557);
  white-space: nowrap;
}

.qv-send {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #111;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.qv-send:hover:not(:disabled) {
  background: #000;
  filter: brightness(1.08);
}

.qv-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qv-composer-tools {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
}

.qv-composer-tools.is-locked .qv-sel,
.qv-composer-tools.is-locked select {
  opacity: 0.55;
  cursor: not-allowed;
}

.qv-composer-tools.is-reason-only,
.qv-composer-tools.is-script-tools {
  grid-template-columns: minmax(0, 1fr) auto;
}

.qv-composer-tools.is-render-only {
  grid-template-columns: minmax(0, 1fr) auto;
}

.qv-composer-tools .qv-tool-row {
  grid-column: auto;
  justify-content: flex-end;
}

.qv-tool-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.qv-tool-lab {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 650;
  color: var(--text-mute, #6f6557);
  letter-spacing: 0.04em;
}

.qv-tool-field .qv-sel {
  flex: 1;
  min-width: 0;
}

.qv-tool-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qv-btn-sm {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.qv-sel {
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border, #3a3127);
  background: var(--bg-2, #262119);
  color: var(--text, #f5efe4);
  padding: 0 6px;
  font-size: 11.5px;
  max-width: 100%;
  color-scheme: dark;
}

.qv-sel option,
.qv-sel optgroup {
  background: #1c1812;
  color: #f5efe4;
}

.qv-sel optgroup {
  font-weight: 600;
  color: #e0a15a;
}

.qv-sel-model {
  flex: 1;
  min-width: 0;
}

.qv-sel-compact {
  width: 58px;
  padding: 0 4px;
  flex-shrink: 0;
}

.qv-composer-tools .qv-tool-row .qv-sel-compact {
  width: 54px;
}

.qv-composer-tools .qv-tool-row .qv-sel-res {
  width: 72px;
}

.qv-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 9px;
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.qv-btn.primary {
  background: linear-gradient(135deg, #f0b45a, #e08a1e);
  color: #1a1308;
}

.qv-btn.primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.qv-btn.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qv-btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border, #3a3127);
  color: var(--text-dim, #a89c87);
}

.qv-btn.ghost:hover {
  color: var(--text, #f5efe4);
  border-color: rgba(245, 158, 11, 0.4);
}

.qv-submit {
  margin-left: auto;
  min-width: 120px;
}

.qv-skill-picker {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 98px;
  z-index: 8;
  max-height: min(72vh, 520px);
  border-radius: 16px;
  border: 1px solid var(--border, #3a3127);
  background: rgba(28, 24, 19, 0.98);
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  animation: qv-picker-in .16s ease;
}

@keyframes qv-picker-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.qv-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.qv-picker-head-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qv-picker-head-main strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #f5efe4);
}

.qv-picker-head-main span {
  font-size: 12px;
  color: var(--text-mute, #6f6557);
}

.qv-picker-clear {
  appearance: none;
  border: none;
  background: transparent;
  color: #60a5fa;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  flex-shrink: 0;
}

.qv-picker-clear:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.qv-picker-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border-soft, #2a241c);
  padding-bottom: 2px;
  flex-wrap: nowrap;
}

.qv-picker-cats {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 2px 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.qv-picker-cats::-webkit-scrollbar {
  display: none;
}

.qv-picker-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text-mute, #6f6557);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.qv-picker-search:focus-within {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
}

.qv-picker-search-ico {
  font-size: 14px;
  line-height: 1;
  opacity: 0.8;
}

.qv-picker-search input {
  appearance: none;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text, #f5efe4);
  font-size: 12.5px;
  width: 88px;
  min-width: 0;
  padding: 0;
}

.qv-picker-search input::placeholder {
  color: var(--text-mute, #6f6557);
}

.qv-cat {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-mute, #6f6557);
  border-radius: 0;
  padding: 6px 2px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.qv-cat.is-on {
  color: var(--text, #f5efe4);
  border-bottom-color: var(--amber, #f59e0b);
  background: transparent;
}

.qv-picker-list {
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
  flex: 1;
  align-content: start;
  padding: 2px 0 4px;
}

.qv-skill-opt {
  appearance: none;
  position: relative;
  text-align: left;
  border: 1px solid var(--border, #3a3127);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px 12px 12px 10px;
  cursor: pointer;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 72px;
}

.qv-skill-opt-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--qv-skill-tone, #8a6a45) 35%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.06);
  border: 1px solid color-mix(in srgb, var(--qv-skill-tone, #ffffff) 28%, transparent);
}

.qv-skill-opt-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 14px;
}

.qv-skill-opt strong {
  font-size: 13.5px;
  color: var(--text, #f5efe4);
}

.qv-skill-opt-body > span {
  font-size: 11.5px;
  color: var(--text-dim, #a89c87);
  line-height: 1.4;
}

.qv-skill-opt-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.qv-skill-opt:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.qv-skill-opt.is-on {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.qv-picker-foot {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-mute, #6f6557);
  padding: 2px 0 4px;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  .qv-picker-list {
    grid-template-columns: 1fr;
  }
}

.qv-center-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border-soft, #2a241c);
}

.qv-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-mute, #6f6557);
  padding: 8px 12px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.qv-tab.is-on {
  color: var(--text, #f5efe4);
}

.qv-tab.is-on::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--amber, #f59e0b);
}

.qv-center-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 28px 36px;
}

.qv-center-body.is-preview {
  display: flex;
  flex-direction: column;
  padding: 12px 16px 18px;
  overflow: hidden;
}

.qv-preview-empty {
  max-width: 520px;
  margin: auto;
  text-align: center;
}

.qv-preview-missing > p {
  color: var(--text-dim, #a89c87);
  line-height: 1.55;
}

.qv-preview-missing-title {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-mute, #6f6557);
}

.qv-preview-generating {
  max-width: 520px;
  width: min(100%, 520px);
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 16px;
}

.qv-preview-gen-stage {
  position: relative;
  width: min(220px, 56vw);
  aspect-ratio: 9 / 16;
  max-height: min(42vh, 360px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #12100d;
  display: grid;
  place-items: center;
}

.qv-preview-gen-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
  display: block;
}

.qv-preview-gen-stage .qv-center-illu {
  transform: scale(0.85);
  opacity: 0.85;
}

.qv-preview-gen-spin {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--amber, #f59e0b);
  animation: qv-spin 0.85s linear infinite;
  z-index: 1;
}

.qv-preview-generating h3 {
  margin: 10px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text, #f5efe4);
}

.qv-preview-gen-msg {
  margin: 0;
  min-height: 1.4em;
  color: var(--amber, #f59e0b);
  font-size: 13px;
  line-height: 1.45;
}

.qv-preview-gen-track {
  width: min(280px, 70%);
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.qv-preview-gen-track > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d97706, #f59e0b);
  transition: width 0.35s ease;
}

.qv-preview-gen-pct {
  font-size: 12px;
  font-weight: 650;
  color: var(--text-dim, #a89c87);
}

.qv-preview-gen-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim, #a89c87);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-preview-gen-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-mute, #6f6557);
  line-height: 1.45;
}

.qv-preview-gen-stop {
  margin-top: 14px;
}

.qv-preview-empty h3 {
  margin: 18px 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text, #f5efe4);
}

.qv-preview-empty > p {
  margin: 0;
  color: var(--text-dim, #a89c87);
  font-size: 13.5px;
  line-height: 1.55;
}

.qv-preview-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qv-preview-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qv-preview-tool {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.qv-preview-tool:hover {
  color: var(--text, #f5efe4);
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.qv-preview-tool-ico {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  opacity: 0.9;
}

.qv-preview-tool-ico svg {
  display: block;
}

.qv-preview-stage {
  position: relative;
  flex: 1;
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}

.qv-preview-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(80, 70, 55, 0.35), transparent 70%),
    linear-gradient(180deg, #141210, #0a0908);
  pointer-events: none;
}

.qv-preview-video {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(62vh, 640px);
  min-height: 180px;
  object-fit: contain;
  background: #000;
}

.qv-preview-loading {
  position: relative;
  z-index: 1;
  color: var(--text-mute, #6f6557);
  font-size: 13px;
}

.qv-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12px;
  color: var(--text-mute, #6f6557);
  flex-shrink: 0;
  padding: 0 2px;
}

.qv-preview-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim, #a89c87);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.qv-center-empty {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.qv-center-empty h3 {
  margin: 18px 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text, #f5efe4);
}

.qv-center-empty > p {
  margin: 0 0 22px;
  color: var(--text-dim, #a89c87);
  font-size: 14px;
}

.qv-center-illu {
  width: min(360px, 72%);
  height: 210px;
  margin: 8px auto 0;
  position: relative;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.qv-center-illu::before,
.qv-center-illu::after,
.qv-center-illu {
  border-radius: 18px;
}

.qv-center-illu::before,
.qv-center-illu::after {
  content: '';
  position: absolute;
  inset: 18px 42px;
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(135deg, #5b4632, #2a2118 55%, #1a1510);
  transform: rotate(-8deg) scale(0.92);
  opacity: 0.75;
}

.qv-center-illu::after {
  transform: rotate(8deg) scale(0.92);
  inset: 18px 42px;
  background:
    linear-gradient(200deg, rgba(255, 255, 255, 0.1), transparent 45%),
    linear-gradient(145deg, #6b5340, #32271c 60%, #19140f);
}

.qv-center-illu {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(150deg, #8a6a45 0%, #3d2f22 45%, #17130f 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.qv-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  text-align: left;
  margin-top: 8px;
}

.qv-example-card {
  appearance: none;
  border: 1px solid var(--border, #3a3127);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  color: inherit;
  transition: border-color .15s, background .15s, transform .15s;
}

.qv-example-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-1px);
}

.qv-example-title {
  font-size: 13.5px;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--text, #f5efe4);
}

.qv-example-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim, #a89c87);
}

.qv-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.qv-queue-head h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.qv-queue-head .qv-queue-count {
  font-weight: 500;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.qv-queue-head-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qv-queue-filter {
  position: relative;
}

.qv-queue-filter > .qv-mini.is-on,
.qv-queue-filter.is-active > .qv-mini {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.qv-queue-filter-pop {
  position: fixed;
  z-index: 16000;
  width: min(240px, calc(100vw - 24px));
  max-height: min(320px, 50vh);
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #2a241c 0%, #1c1712 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.qv-queue-filter-pop-head {
  font-size: 11px;
  font-weight: 650;
  color: var(--text-mute, #a89a88);
  padding: 2px 6px 8px;
}

.qv-queue-filter-opts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qv-queue-filter-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text, #f5efe4);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-align: left;
}

.qv-queue-filter-opt em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-mute, #a89a88);
  font-variant-numeric: tabular-nums;
}

.qv-queue-filter-opt:hover,
.qv-queue-filter-opt.is-on {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.qv-queue-filter-opt.is-on {
  color: #fbbf24;
}

.qv-queue-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.qv-task-empty {
  color: var(--text-mute, #6f6557);
  font-size: 12.5px;
  padding: 28px 8px;
  text-align: center;
}

.qv-task-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-soft, #2a241c);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}

.qv-task-item[data-qv-preview]:hover {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.qv-task-item.is-selected {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.qv-task-item.is-running {
  border-color: rgba(96, 165, 250, 0.35);
}

.qv-task-item.is-done {
  border-color: rgba(52, 211, 153, 0.25);
}

.qv-task-item.is-error {
  border-color: rgba(251, 113, 133, 0.35);
}

.qv-task-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2, #262119);
  display: grid;
  place-items: center;
}

.qv-task-thumb img,
.qv-task-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qv-task-thumb.is-doc {
  font-size: 18px;
  opacity: 0.7;
}

.qv-task-thumb.is-draft {
  color: var(--amber, #f59e0b);
  opacity: 0.95;
  font-size: 16px;
}

.qv-task-item.is-draft {
  border-style: dashed;
}

.qv-task-meta {
  min-width: 0;
}

.qv-task-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-task-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
}

.qv-task-st {
  color: var(--text-dim, #a89c87);
}

.qv-task-item.is-running .qv-task-st,
.qv-task-item.is-analyzing .qv-task-st { color: var(--blue, #60a5fa); }
.qv-task-item.is-done .qv-task-st { color: var(--emerald, #34d399); }
.qv-task-item.is-error .qv-task-st { color: var(--rose, #fb7185); }

.qv-task-msg {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-dim, #a89c87);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-task-thumb.is-busy::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.qv-task-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -8px 0 0 -8px;
  z-index: 1;
}

.qv-task-err {
  margin-top: 4px;
  font-size: 11px;
  color: var(--rose, #fb7185);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qv-task-acts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qv-mini {
  appearance: none;
  border: 1px solid var(--border, #3a3127);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim, #a89c87);
  border-radius: 7px;
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
  cursor: pointer;
}

.qv-mini:hover {
  color: var(--text, #f5efe4);
  border-color: rgba(245, 158, 11, 0.4);
}

.qv-mini.danger:hover {
  color: var(--rose, #fb7185);
  border-color: rgba(251, 113, 133, 0.45);
}

@media (max-width: 1180px) {
  .qv-page {
    grid-template-columns: minmax(280px, 1fr) 10px minmax(160px, 240px);
    grid-template-rows: minmax(200px, 0.42fr) minmax(0, 1fr);
  }
  .qv-col-center {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 0;
    height: auto;
  }
  .qv-split[data-qv-split="left"] {
    display: none;
  }
  .qv-col-left {
    grid-column: 1;
    grid-row: 2;
    height: auto;
  }
  .qv-split[data-qv-split="right"] {
    grid-column: 2;
    grid-row: 2;
  }
  .qv-col-right {
    grid-column: 3;
    grid-row: 2;
    height: auto;
  }
}

@media (max-width: 820px) {
  body.quick-video-open .main {
    overflow: auto;
  }
  .qv-page {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
    min-height: 100%;
    overflow: auto;
  }
  .qv-split {
    display: none;
  }
  .qv-col-center,
  .qv-col-left,
  .qv-col-right {
    grid-column: auto;
    grid-row: auto;
    height: auto;
  }
  .qv-col-center { min-height: 260px; }
  .qv-col-right { min-height: 280px; }
  .qv-center-empty h3 { font-size: 24px; }
}

/* 脚本模式 · 优化要求 Agent 弹窗 */
.qv-opt-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 24px 16px;
  backdrop-filter: blur(2px);
}

.qv-opt-panel {
  width: min(860px, calc(100vw - 48px));
  height: min(88vh, 900px);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2a241c 0%, #1a1510 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.qv-opt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.qv-opt-head-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qv-opt-head-main strong {
  font-size: 15px;
  color: var(--text, #f5efe4);
}

.qv-opt-head-main span {
  font-size: 12px;
  color: var(--text-mute, #6f6557);
}

.qv-opt-context {
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 10px;
}

.qv-opt-context-lab {
  font-size: 11px;
  color: var(--text-mute, #6f6557);
  margin-bottom: 4px;
}

.qv-opt-context-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim, #a89c87);
  max-height: 7.5em;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.qv-opt-empty {
  color: var(--text-mute, #6f6557);
}

.qv-opt-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.qv-opt-quick-chip {
  font-size: 11.5px;
  padding: 5px 10px;
}

.qv-opt-feed {
  flex: 1;
  min-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 2px;
  scrollbar-width: thin;
}

.qv-opt-msg {
  max-width: 92%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qv-opt-msg.is-user {
  align-self: flex-end;
}

.qv-opt-msg.is-bot {
  align-self: flex-start;
}

.qv-opt-msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
  font-weight: 600;
}

.qv-opt-msg.is-user .qv-opt-msg-meta {
  justify-content: flex-end;
}

.qv-opt-copy {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--amber, #f59e0b);
  font-size: 11px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  opacity: 0.85;
}

.qv-opt-copy:hover {
  opacity: 1;
  text-decoration: underline;
}

.qv-opt-msg-body {
  font-size: 13px;
  line-height: 1.55;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text, #f5efe4);
  word-break: break-word;
}

.qv-opt-msg.is-user .qv-opt-msg-body {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.qv-opt-msg.is-bot .qv-opt-msg-body {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qv-opt-msg.is-busy .qv-opt-msg-body {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--amber, #f59e0b);
}

.qv-opt-msg-acts {
  display: flex;
  gap: 6px;
  padding-top: 2px;
}

.qv-opt-composer {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.qv-opt-compose-main {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qv-opt-refs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.qv-opt-ref {
  flex: 0 0 auto;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text, #f5efe4);
  font-size: 11px;
  cursor: pointer;
}

.qv-opt-ref img,
.qv-opt-ref video,
.qv-opt-atitem img,
.qv-opt-atitem video {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: #111;
}

.qv-opt-atitem img,
.qv-opt-atitem video {
  width: 36px;
  height: 36px;
}

.qv-opt-ref-audio {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
}

.qv-opt-atmenu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 76px;
  z-index: 4;
  max-height: 200px;
  overflow: auto;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c1814;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.qv-opt-atmenu[hidden] { display: none; }

.qv-opt-atitem {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text, #f5efe4);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.qv-opt-atitem:hover,
.qv-opt-atitem.is-on {
  background: rgba(245, 158, 11, 0.16);
}

.qv-opt-mention {
  position: relative;
  min-height: 72px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.qv-opt-mention:focus-within {
  border-color: rgba(245, 158, 11, 0.4);
}

/* 高亮层与输入框必须同一套盒模型，否则换行错位，下一行会叠字 */
.qv-opt-mention .qv-prompt-backdrop,
.qv-opt-mention .qv-opt-input {
  width: 100%;
  min-height: 72px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  box-sizing: border-box;
  font: inherit;
  font-size: 13.5px;
  line-height: 20px;
  letter-spacing: 0;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: auto;
  tab-size: 4;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.qv-opt-mention .qv-prompt-backdrop {
  visibility: hidden;
}

.qv-opt-mention .qv-opt-input {
  position: relative;
  z-index: 1;
  resize: none;
  background: transparent;
  color: var(--text, #f5efe4);
  caret-color: var(--amber, #f59e0b);
  outline: none;
}

.qv-opt-mention.is-mention-synced .qv-prompt-backdrop {
  visibility: visible;
  z-index: 2;
}

.qv-opt-mention.is-mention-synced .qv-opt-input {
  z-index: 1;
  color: rgba(245, 239, 228, 0.014);
  -webkit-text-fill-color: rgba(245, 239, 228, 0.014);
  caret-color: var(--amber, #f59e0b);
}

.qv-opt-mention.is-mention-synced .qv-opt-input::selection {
  background: rgba(59, 125, 216, 0.45);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.qv-opt-input:disabled {
  opacity: 0.55;
}

/* —— 快捷视频 · 成片剪辑弹窗 —— */
.qv-clip-modal {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 20px);
  background: rgba(8, 6, 4, 0.82);
  backdrop-filter: blur(8px);
}

.qv-clip-panel {
  width: min(1100px, 96vw);
  max-height: min(94vh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #2a231a 0%, #1c1712 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.qv-clip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.qv-clip-head-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qv-clip-head-main strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #f5efe4);
}

.qv-clip-head-sub {
  font-size: 12px;
  color: var(--text-dim, #a89c87);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qv-clip-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  padding: 14px 16px 16px;
  overflow: auto;
  align-items: start;
}

@media (max-width: 860px) {
  .qv-clip-body {
    grid-template-columns: 1fr;
  }
}

.qv-clip-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qv-clip-player-wrap {
  min-width: 0;
}

.qv-clip-video {
  width: 100%;
  max-height: min(48vh, 520px);
  border-radius: 12px;
  background: #0a0806;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.qv-clip-timeline {
  margin-top: 2px;
  padding: 8px 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.qv-clip-timeline.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.qv-clip-timeline-ruler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-mute, #6f6557);
  font-variant-numeric: tabular-nums;
}

.qv-clip-timeline-cur {
  color: var(--text, #f5efe4);
  font-weight: 700;
}

.qv-clip-timeline-track {
  position: relative;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(79, 157, 232, 0.35);
  background: #0d1118;
  touch-action: none;
  user-select: none;
  cursor: pointer;
}

.qv-clip-timeline-film {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  z-index: 1;
}

.qv-clip-timeline-thumb {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border-right: 1px solid rgba(0, 0, 0, 0.35);
}

.qv-clip-timeline-ph {
  flex: 1;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--text-mute, #6f6557);
}

.qv-clip-timeline-dim {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  background: rgba(8, 10, 14, 0.62);
  pointer-events: none;
}

.qv-clip-timeline-dim.is-left { left: 0; }
.qv-clip-timeline-dim.is-right { right: 0; }

.qv-clip-timeline-sel {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  border: 2px solid #4f9de8;
  border-radius: 4px;
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(79, 157, 232, 0.25);
}

.qv-clip-timeline-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  margin-left: -7px;
  z-index: 5;
  border: none;
  padding: 0;
  cursor: ew-resize;
  background: #4f9de8;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.qv-clip-timeline-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  box-shadow: 3px 0 0 rgba(255, 255, 255, 0.55), -3px 0 0 rgba(255, 255, 255, 0.55);
}

.qv-clip-timeline-handle:disabled {
 opacity: 0.4;
 cursor: not-allowed;
}

.qv-clip-timeline-playhead {
 position: absolute;
 top: -4px;
 bottom: -4px;
 width: 14px;
 margin-left: -7px;
 z-index: 6;
 padding: 0;
 border: none;
 border-radius: 3px;
 background: transparent;
 cursor: ew-resize;
 touch-action: none;
}

.qv-clip-timeline-playhead::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #f5d78e;
  box-shadow: 0 0 6px rgba(245, 215, 142, 0.55);
  pointer-events: none;
}

.qv-clip-timeline-playhead::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 2px;
  background: #f5d78e;
  transform: rotate(45deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.qv-clip-timeline-playhead:disabled {
 opacity: 0.4;
 cursor: not-allowed;
}

.qv-clip-timeline-hint {
 margin-top: 6px;
 font-size: 11px;
 color: var(--text-mute, #6f6557);
 line-height: 1.45;
}

.qv-clip-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.qv-clip-panel-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text, #f5efe4);
}

.qv-clip-fields {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

.qv-clip-fields label {
 display: flex;
 flex-direction: column;
 gap: 4px;
 font-size: 12px;
 color: var(--text-dim, #a89c87);
}

.qv-clip-fields input {
 border-radius: 8px;
 border: 1px solid rgba(255, 255, 255, 0.1);
 background: rgba(0, 0, 0, 0.28);
 color: var(--text, #f5efe4);
 font: inherit;
 font-size: 13px;
 padding: 8px 10px;
 outline: none;
}

.qv-clip-fields input:focus {
 border-color: rgba(245, 158, 11, 0.4);
}

.qv-clip-actions {
 display: flex;
 flex-wrap: wrap;
 gap: 8px;
}

.qv-clip-actions .qv-mini.primary {
 background: rgba(245, 158, 11, 0.2);
 border-color: rgba(245, 158, 11, 0.45);
 color: #fbbf24;
}

.qv-clip-msg {
 font-size: 12px;
 color: var(--amber, #f59e0b);
 line-height: 1.4;
}

.qv-clip-applied {
 font-size: 12px;
 color: var(--emerald, #34d399);
 line-height: 1.4;
}

/* —— 字幕/水印擦除台（对标茂隆框选擦除） —— */
.qv-erase-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(8, 6, 4, 0.72);
  backdrop-filter: blur(6px);
}

.qv-erase-panel {
  flex: 1;
  min-width: 0;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-1, #1e1a15);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.qv-erase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.qv-erase-head-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qv-erase-head-main strong {
  font-size: 15px;
}

.qv-erase-head-sub {
  font-size: 12px;
  color: var(--text-mute, #a89a88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qv-erase-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 12px;
  padding: 12px 14px 14px;
}

@media (max-width: 900px) {
  .qv-erase-body {
    grid-template-columns: 1fr;
  }
}

.qv-erase-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qv-erase-player-wrap {
  position: relative;
  flex: 1;
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qv-erase-video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.qv-erase-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  /* 实际宽高/位置由 JS 对齐 object-fit:contain 画面，避免黑边把框选拉宽 */
  cursor: crosshair;
  z-index: 2;
  pointer-events: auto;
  box-sizing: border-box;
}

.qv-erase-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  pointer-events: none;
}

.qv-erase-box.is-ghost {
  border-style: dashed;
  background: rgba(56, 189, 248, 0.12);
}

.qv-erase-box span {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: #0ea5e9;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.qv-erase-hint,
.qv-erase-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-mute, #a89a88);
  line-height: 1.45;
}

.qv-erase-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.qv-erase-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.qv-erase-progress-head strong {
  color: #7dd3fc;
  font-weight: 650;
}

.qv-erase-progress-head span {
  color: var(--text-mute, #a89a88);
  font-variant-numeric: tabular-nums;
}

.qv-erase-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 11px;
}

.qv-erase-step {
  color: rgba(168, 154, 136, 0.75);
}

.qv-erase-step.is-on {
  color: #7dd3fc;
  font-weight: 650;
}

.qv-erase-step.is-done {
  color: #86efac;
}

.qv-erase-step-sep {
  color: rgba(168, 154, 136, 0.45);
}

.qv-erase-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.qv-erase-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #7dd3fc);
  transition: width 0.35s ease;
}

.qv-erase-progress-meta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.qv-erase-progress-meta [data-qv-erase-prog-pct] {
  flex: 0 0 auto;
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.qv-erase-progress-meta [data-qv-erase-prog-detail] {
  color: #fbbf24;
  min-width: 0;
}

.qv-erase-taskid {
  font-size: 11px;
  color: var(--text-mute, #a89a88);
  word-break: break-all;
}

.qv-erase-taskid code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: #cbd5e1;
}

.qv-erase-key-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.qv-erase-key-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qv-erase-key-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute, #a89a88);
}

.qv-erase-key-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: #38bdf8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.qv-erase-key-link:hover {
  color: #7dd3fc;
}

.qv-erase-key-row input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  padding: 8px 10px;
  font-size: 12px;
}

.qv-erase-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.qv-erase-regions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.qv-erase-region {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f5efe4);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.qv-erase-region.is-on,
.qv-erase-region:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

.qv-erase-region span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-mute, #a89a88);
}

.qv-erase-region span:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.qv-erase-empty {
  font-size: 12px;
  color: var(--text-mute, #a89a88);
  line-height: 1.5;
  padding: 8px 0;
}

.qv-erase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.qv-erase-actions .qv-mini.primary {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(14, 165, 233, 0.5);
  color: #7dd3fc;
}

.qv-enhance-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qv-enhance-group.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.qv-enhance-group-title {
  font-size: 12px;
  color: var(--text-mute, #a89a88);
}

.qv-enhance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qv-enhance-chip {
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #f5efe4);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.qv-enhance-chip:hover,
.qv-enhance-chip.is-on {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

.qv-enhance-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
