/* 「AI 图片」「AI 视频」两页和对话里的成品卡片。
   版面照金聚诚 ai-image-workspace.css、ai-video-workspace.css：一个外框里左右两栏，中间一条线；左边一节一节往下排，右边是记录网格。
   没照搬的：那边大量 9–10px 的小字（这里最小 12px）和直角卡片（这里跟新万希别的页面一样用圆角）；品牌蓝换成新万希的 --blue。 */
.content:has(.ais-page) { background: var(--page); }
.ais-page { --ais-line: #e6e8ee; --ais-soft: #f4f6f9; padding-top: 20px; color: var(--text); }
.ais-page svg { flex: none; }

/* 页头（新的标题区在文件最后「视觉打磨」那一段：.ais-hero） */
.ais-head-line { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.ais-chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 99px; color: var(--blue-active); background: var(--blue-soft); font-size: 12px; font-weight: 500; }
.ais-chip i, .ais-mode i, .ais-auto i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgb(18 116 165 / 16%); animation: ais-pulse 1.8s ease-in-out infinite; }
@keyframes ais-pulse { 50% { box-shadow: 0 0 0 6px rgb(18 116 165 / 0%); } }
.ais-warning { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--accent-line); border-radius: 14px; background: var(--accent-soft); color: var(--accent-deep); font-size: 13px; }

/* 外框和两栏 */
.ais-studio { display: grid; grid-template-columns: minmax(400px, 452px) minmax(0, 1fr); min-height: 760px; overflow: hidden; border: 1px solid var(--ais-line); border-radius: 20px; background: #fff;
  box-shadow: 0 1px 2px rgb(20 21 28 / 4%), 0 18px 40px -28px rgb(20 21 28 / 22%); }
.ais-composer { min-width: 0; border-right: 1px solid var(--ais-line); }
.ais-results { min-width: 0; container-type: inline-size; background: #fafbfc; }
/* 定高的工作台（两页都是）：整块正好放进一屏，左栏中间滚动、底部贴着价格和按钮，右栏的记录自己滚动 */
.ais-studio.fixed { height: clamp(560px, calc(100vh - 262px), 900px); min-height: 0; grid-template-rows: minmax(0, 1fr); }
.ais-studio.fixed > * { min-height: 0; }
.ais-studio.fixed .ais-composer { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.ais-studio.fixed .ais-composer > .ais-scroll:first-child { grid-row: 1 / 3; }
.ais-studio.fixed .ais-scroll, .ais-studio.fixed .ais-results { overflow-y: auto; }
.ais-studio.fixed .ais-results > .ais-panel-title { position: sticky; top: 0; z-index: 2; background: rgb(250 251 252 / 94%); backdrop-filter: blur(8px); }
.ais-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 16px 22px; border-bottom: 1px solid var(--ais-line); }
.ais-panel-title > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ais-panel-title b { font-size: 16px; font-weight: 650; }
.ais-panel-title span { color: var(--text-muted); font-size: 12px; }
.ais-panel-title .ais-total { padding: 1px 9px; border-radius: 99px; color: var(--text-regular); background: var(--fill); font-variant-numeric: tabular-nums; }
.ais-mode { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.ais-mode em { color: var(--blue-active); font-size: 12px; font-style: normal; font-weight: 500; }
.ais-clear { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 32px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--text-muted); font-size: 13px; cursor: pointer; }
.ais-clear svg { width: 16px; height: 16px; }
.ais-clear:hover { color: var(--danger); background: var(--danger-bg); }

/* 左栏的一节 */
.ais-section { padding: 20px 22px; border-bottom: 1px solid var(--ais-line); }
.ais-section:last-child { border-bottom: 0; }
.ais-label { display: block; margin: 0 0 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.ais-section > .ais-seg + .ais-label, .ais-section > .ais-models + .ais-params, .ais-params + .ais-sub { margin-top: 16px; }
.ais-label em { margin-left: 6px; color: var(--text-faint); font-size: 12px; font-style: normal; font-weight: 400; }
.ais-label em.must { color: var(--accent-deep); }
.ais-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ais-label-row .ais-label { margin-bottom: 4px; }
.ais-hint { display: block; margin: 0 0 10px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.ais-label-row .ais-hint { margin: 0; text-align: right; }
.ais-counter { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ais-sub { display: block; margin: 0 0 7px; color: var(--text-regular); font-size: 12px; font-weight: 600; }

/* 提示词 */
.ais-prompt { position: relative; border: 1px solid var(--border-strong); border-radius: 12px; background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.ais-prompt:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(18 116 165 / 12%); }
.ais-prompt textarea { display: block; width: 100%; min-height: 176px; padding: 13px 14px 30px; border: 0; border-radius: 12px; outline: 0; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 14px; line-height: 1.7; }
.ais-prompt textarea::placeholder { color: var(--text-faint); }
.ais-prompt > span { position: absolute; right: 12px; bottom: 8px; color: var(--text-faint); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.ais-prompt.rich textarea { min-height: 150px; padding-bottom: 12px; border-radius: 12px 12px 0 0; }
.ais-prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 4px 12px; border-top: 1px solid var(--ais-line); border-radius: 0 0 12px 12px; background: #fafbfc; color: var(--text-muted); font-size: 12px; }
.ais-prompt-foot > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ais-prompt-foot button { height: 24px; padding: 0 8px; border: 1px solid var(--blue-line); border-radius: 7px; background: var(--blue-tint); color: var(--blue-active); font-size: 12px; font-weight: 600; cursor: pointer; }
.ais-prompt-foot button:hover { background: var(--blue-soft); }

/* 参考图 */
.ais-refs { position: relative; padding: 12px; border: 1px dashed #c3cbd8; border-radius: 12px; background: #fbfcfe; transition: border-color .15s var(--ease), background .15s var(--ease); }
.ais-refs.dragging { border-color: var(--blue); background: var(--blue-tint); box-shadow: 0 0 0 3px rgb(18 116 165 / 10%); }
.ais-drop-overlay { position: absolute; inset: 0; z-index: 2; display: none; place-content: center; gap: 4px; border-radius: 12px; background: rgb(238 250 254 / 94%); color: var(--blue-active); text-align: center; pointer-events: none; }
.ais-drop-overlay span { font-size: 12px; }
.ais-refs.dragging .ais-drop-overlay { display: grid; }
.ais-ref-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
.ais-ref-grid[hidden] { display: none; }
.ais-ref { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 9px; background: var(--fill); }
.ais-ref img { width: 100%; height: 100%; object-fit: cover; }
.ais-ref-order { position: absolute; left: 4px; bottom: 4px; min-width: 18px; padding: 0 5px; border-radius: 6px; color: #fff; background: rgb(20 21 28 / 72%); font-size: 12px; line-height: 18px; text-align: center; }
.ais-ref-remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgb(20 21 28 / 60%); font-size: 14px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; }
.ais-ref:hover .ais-ref-remove, .ais-ref-remove:focus-visible { opacity: 1; }
.ais-ref-remove:hover { background: var(--danger); }
.ais-ref-empty { display: grid; justify-items: center; gap: 4px; padding: 16px 8px 14px; color: var(--text-muted); text-align: center; }
.ais-ref-empty[hidden] { display: none; }
.ais-ref-empty svg { width: 30px; height: 30px; margin-bottom: 4px; color: #9fb0c6; stroke-width: 1.5; }
.ais-ref-empty b { color: var(--text-regular); font-size: 13px; font-weight: 600; }
.ais-ref-empty small { font-size: 12px; }
.ais-ref-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ais-ref-actions span { color: var(--text-faint); font-size: 12px; }
.ais-refs.busy .ais-ref-actions span::after { content: " · 正在上传…"; color: var(--blue); }
.ais-ghost { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 99px; background: #fff; color: var(--text); font-size: 13px; cursor: pointer; }
.ais-ghost svg { width: 15px; height: 15px; }
.ais-ghost:hover { color: var(--blue); border-color: var(--blue-line); background: var(--blue-tint); }

/* 分段选择：比例、清晰度、张数 */
.ais-seg { display: grid; gap: 3px; padding: 4px; border-radius: 12px; background: var(--ais-soft); }
.ais-ratios { grid-template-columns: repeat(3, 1fr); }
.ais-three { grid-template-columns: repeat(3, 1fr); }
.ais-five { grid-template-columns: repeat(5, 1fr); }
.ais-seg button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 4px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer; transition: background .12s var(--ease), color .12s var(--ease); }
.ais-seg button:hover { color: var(--blue); background: rgb(255 255 255 / 70%); }
.ais-seg button.on { color: var(--blue-active); background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgb(16 42 67 / 12%), inset 0 0 0 1px rgb(18 116 165 / 24%); }
.ais-seg i, .ais-choices i { display: block; flex: none; border: 1.5px solid currentColor; border-radius: 2px; }
.ais-ratio-auto { width: 16px; height: 12px; border-style: dashed !important; }
.ais-three button, .ais-five button { flex-direction: column; gap: 1px; min-height: 50px; }
.ais-three b, .ais-five b { font-size: 14px; font-weight: 650; }
.ais-three span, .ais-five span { font-size: 12px; font-weight: 400; opacity: .82; }
.ais-five button { flex-direction: row; align-items: baseline; gap: 3px; min-height: 42px; }

/* 提交 */
.ais-generate { width: 100%; height: 46px; font-size: 15px; font-weight: 600; box-shadow: 0 8px 18px -10px rgb(18 116 165 / 70%); }
.ais-generate:disabled { box-shadow: none; }

/* 右栏：记录网格 */
.ais-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
@container (min-width: 980px) { .ais-grid:not(.two) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 560px) { .ais-grid { grid-template-columns: 1fr; } }
.ais-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--ais-line); border-radius: 14px; background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.ais-card:hover { border-color: #c5d3e2; box-shadow: 0 10px 24px -14px rgb(16 42 67 / 28%); transform: translateY(-1px); }
.ais-visual { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eef1f5; }
.ais-visual.ready { background: #0e1826; }
/* 图铺在定好比例的画布里，不让图自己的尺寸把画布撑高 */
.ais-zoom { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ais-zoom img { width: 100%; height: 100%; object-fit: contain; }
.ais-visual-top { position: absolute; top: 9px; right: 9px; left: 9px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.ais-status, .ais-spec { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; color: #fff; background: rgb(14 24 38 / 72%); backdrop-filter: blur(6px); font-size: 12px; }
.ais-status i { width: 6px; height: 6px; border-radius: 50%; background: #b8c2cf; }
.ais-status.running i { background: #5cc4f0; animation: ais-blink 1.2s ease-in-out infinite; }
.ais-status.succeeded i { background: #42c989; }
.ais-status.failed i { background: #ff6b7a; }
@keyframes ais-blink { 50% { opacity: .35; } }
.ais-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 5px; padding: 34px 18px 14px; color: var(--text-regular); text-align: center; }
.ais-state b { font-size: 14px; font-weight: 600; }
.ais-state small { max-width: 30em; color: #1d2633; font-size: 13px; line-height: 1.5; }
.ais-state.failed > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 3px; border-radius: 50%; color: #fff; background: var(--danger); font-weight: 700; }
.ais-state.dark { color: #e8eef6; }
.ais-state.dark small { color: #e8eef6; }
.ais-spinner { width: 30px; height: 30px; margin-bottom: 4px; border: 3px solid #d7e8f3; border-top-color: var(--blue); border-radius: 50%; animation: ais-spin .8s linear infinite; }
.ais-state.dark .ais-spinner { border-color: rgb(255 255 255 / 18%); border-top-color: #5cc4f0; }
@keyframes ais-spin { to { transform: rotate(360deg); } }
.ais-info { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 12px 14px 10px; }
.ais-info > p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 500; line-height: 1.6; min-height: 3.2em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ais-context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-faint); font-size: 12px; }
.ais-context time { margin-left: auto; font-variant-numeric: tabular-nums; }
.ais-tag { padding: 1px 8px; border-radius: 6px; color: var(--text-muted); background: var(--fill); }
.ais-tag.used { color: var(--blue-active); background: var(--blue-soft); }
.ais-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--row-line); }
.ais-actions button { height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--text-regular); font-size: 12px; cursor: pointer; }
.ais-actions button:hover { color: var(--blue); background: var(--blue-tint); }
.ais-auto { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding-right: 4px; color: var(--text-muted); font-size: 12px; }
.ais-download { display: inline-flex; align-items: center; gap: 5px; height: 32px; margin-left: auto; padding: 0 12px; border-radius: 99px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 500; }
.ais-download svg { width: 14px; height: 14px; }
.ais-download:hover { background: var(--blue-active); }
.ais-empty { grid-column: 1 / -1; display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 560px; border-radius: 14px; color: var(--text-muted); text-align: center;
  background-image: linear-gradient(rgb(16 42 67 / 3.5%) 1px, transparent 1px), linear-gradient(90deg, rgb(16 42 67 / 3.5%) 1px, transparent 1px); background-size: 28px 28px; }
.ais-empty svg { width: 46px; height: 46px; margin-bottom: 6px; color: #a9b8cb; stroke-width: 1.3; }
.ais-empty b { color: var(--text-regular); font-size: 15px; font-weight: 600; }
.ais-empty small { max-width: 26em; font-size: 13px; line-height: 1.6; }
.ais-pager { display: flex; justify-content: center; gap: 5px; padding: 0 20px 20px; }
.ais-pager:empty { display: none; }
.ais-pager button { min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--text-regular); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; }
.ais-pager button:hover:not(:disabled, .on) { background: var(--fill); }
.ais-pager button.on { color: var(--blue-active); border-color: var(--blue-line); background: var(--blue-tint); font-weight: 600; }
.ais-pager button:disabled { color: var(--text-faint); cursor: default; }

/* 视频页：定高的工作台，左右各自滚动，左栏底部贴着价格和按钮 */
.ais-workbench { overflow: hidden; border: 1px solid var(--ais-line); border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(20 21 28 / 4%), 0 18px 40px -28px rgb(20 21 28 / 22%); }
.ais-workbench-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 0 22px; border-bottom: 1px solid var(--ais-line); }
.ais-workbench-top > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ais-workbench-top b { font-size: 15px; font-weight: 650; }
.ais-workbench-top span { color: var(--text-muted); font-size: 12px; }
.ais-meta { display: flex; flex: none; overflow: hidden; border: 1px solid var(--ais-line); border-radius: 99px; background: #fafbfc; }
.ais-meta span { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; color: var(--text-regular); }
.ais-meta span + span { border-left: 1px solid var(--ais-line); }
.ais-workbench .ais-studio { height: clamp(520px, calc(100vh - 322px), 860px); grid-template-columns: minmax(430px, 500px) minmax(0, 1fr); border: 0; border-radius: 0; box-shadow: none; }
.ais-models { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ais-model { position: relative; display: grid; align-content: start; gap: 4px; min-height: 104px; padding: 11px 12px 11px 34px; border: 1px solid var(--border-strong); border-radius: 12px; background: #fff; color: var(--text); text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.ais-model b { font-size: 14px; font-weight: 650; }
.ais-model small { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.ais-model em { margin-top: 2px; color: var(--accent-deep); font-size: 12px; font-style: normal; font-weight: 600; }
.ais-radio { position: absolute; top: 13px; left: 12px; width: 14px; height: 14px; border: 1.5px solid var(--border-deep); border-radius: 50%; }
.ais-model:hover { border-color: var(--blue-line); }
.ais-model.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: linear-gradient(180deg, var(--blue-tint), #fff 70%); }
.ais-model.on .ais-radio { border-color: var(--blue); background: radial-gradient(circle, var(--blue) 0 42%, transparent 46%); }
.ais-params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ais-choices { display: flex; flex-wrap: wrap; gap: 5px; }
.ais-choices button { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 32px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: var(--text-regular); font-size: 12px; cursor: pointer; }
.ais-choices button:hover { color: var(--blue); border-color: var(--blue-line); }
.ais-choices button.on, .ais-resolutions button.on { color: var(--blue-active); border-color: var(--blue); background: var(--blue-tint); font-weight: 600; box-shadow: inset 0 0 0 1px var(--blue); }
.ais-number { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text-muted); font-size: 12px; }
.ais-number input { width: 42px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.ais-number:focus-within { border-color: var(--blue); }
.ais-resolutions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.ais-resolutions button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.ais-resolutions button:hover { border-color: var(--blue-line); }
.ais-resolutions span { display: grid; }
.ais-resolutions b { font-size: 13px; font-weight: 650; }
.ais-resolutions small { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.ais-resolutions em { color: var(--accent-deep); font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap; }
.ais-quote { display: grid; grid-template-columns: minmax(0, 1fr) 176px; align-items: center; gap: 14px; padding: 12px 22px; border-top: 1px solid var(--ais-line); background: rgb(255 255 255 / 97%); box-shadow: 0 -10px 22px -14px rgb(16 42 67 / 18%); }
.ais-quote > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 10px; min-width: 0; }
.ais-quote > div > span { grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; }
.ais-quote b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ais-quote b.bad { color: var(--text-faint); }
.ais-quote small { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ais-quote b.bad + small { color: var(--danger); white-space: normal; }
.ais-breakdown { grid-column: 1 / -1; display: flex; gap: 10px; color: var(--text-faint); font-size: 12px; }
.ais-quote .ais-generate { height: 44px; }
/* 画布固定 16:9（照金聚诚）：竖版成片放在中间、两边留黑，不让它把卡片撑高 */
.ais-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1626; }
.ais-media video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background: #000; object-fit: contain; }
.ais-pill { position: absolute; top: 9px; left: 9px; height: 24px; padding: 0 10px; border-radius: 99px; color: #fff; background: var(--blue); font-size: 12px; font-style: normal; line-height: 24px; pointer-events: none; }
.ais-pill.succeeded { background: var(--success); }
.ais-pill.failed { background: var(--danger); }
.ais-pill.pending { background: #6b7a8d; }
.ais-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ais-tags span { padding: 2px 7px; border-radius: 6px; color: var(--text-muted); background: var(--ais-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.ais-tags .money { color: var(--accent-deep); background: var(--accent-soft); font-weight: 600; }
.ais-guide { margin-top: 16px; border: 1px solid var(--ais-line); border-radius: 16px; background: #fff; }
.ais-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; }
.ais-guide summary::-webkit-details-marker { display: none; }
.ais-guide summary > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ais-guide summary b { font-size: 14px; font-weight: 650; }
.ais-guide summary span { color: var(--text-muted); font-size: 12px; }
.ais-guide-toggle::after { content: "展开查看"; color: var(--blue); }
.ais-guide[open] .ais-guide-toggle::after { content: "收起"; }
.ais-guide-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; padding: 4px 20px 18px; border-top: 1px solid var(--ais-line); }
.ais-guide-body h3 { margin: 14px 0 4px; font-size: 14px; font-weight: 650; }
.ais-guide-body h3 em { margin-left: 8px; padding: 1px 8px; border-radius: 6px; color: var(--blue-active); background: var(--blue-soft); font-size: 12px; font-style: normal; font-weight: 500; }
.ais-guide-body p { margin: 0; color: var(--text-muted); font-size: 13px; }
.ais-guide-body ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-regular); font-size: 13px; line-height: 1.9; }
.ais-guide-note { grid-column: 1 / -1; margin-top: 8px !important; padding-top: 12px; border-top: 1px dashed var(--ais-line); font-size: 12px !important; }

/* 确认框 */
.ais-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; overflow: auto; border: 0; border-radius: 22px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); }
.ais-dialog::backdrop, .ais-lightbox::backdrop { background: rgb(14 20 30 / 46%); backdrop-filter: blur(3px); }
.ais-dialog[open] { animation: ais-pop .18s var(--ease); }
@keyframes ais-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ais-dialog > * { margin: 0 24px; }
.ais-dialog-head { display: flex; align-items: center; gap: 13px; margin-top: 24px; }
.ais-dialog-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.ais-dialog-mark svg { width: 22px; height: 22px; }
.ais-dialog-head div { display: grid; gap: 1px; }
.ais-dialog-head b { font-size: 17px; font-weight: 650; }
.ais-dialog-head span { color: var(--text-muted); font-size: 13px; }
.ais-dialog-task { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--ais-soft, #f4f6f9); }
.ais-dialog-task span { color: var(--text-muted); font-size: 12px; }
.ais-dialog-task b { font-size: 15px; font-weight: 650; }
.ais-dialog-task em { margin-left: auto; padding: 2px 9px; border-radius: 99px; color: var(--blue-active); background: var(--blue-soft); font-size: 12px; font-style: normal; }
.ais-dialog-price { display: grid; gap: 2px; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, var(--accent-soft), #fffaf1); }
.ais-dialog-price span { color: var(--accent-deep); font-size: 12px; }
.ais-dialog-price b { color: var(--ink); font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ais-dialog-price small { color: var(--text-muted); font-size: 12px; }
.ais-dialog-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ais-dialog-facts div { padding: 9px 11px; border: 1px solid var(--row-line); border-radius: 11px; }
.ais-dialog-facts dt { color: var(--text-muted); font-size: 12px; }
.ais-dialog-facts dd { margin: 2px 0 0; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ais-dialog-prompt { margin-top: 14px; }
.ais-dialog-prompt > div { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.ais-dialog-prompt span { color: var(--text-faint); font-size: 12px; }
.ais-dialog-prompt p { max-height: 132px; margin: 0; padding: 10px 12px; overflow: auto; border-radius: 11px; background: var(--fill-soft); color: var(--text-regular); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.ais-dialog-refs { margin-top: 12px; font-size: 13px; }
.ais-dialog-refs div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ais-dialog-refs img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.ais-dialog-warn { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--text-regular); font-size: 13px; }
.ais-dialog-warn i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.ais-dialog-text { margin-top: 16px; color: var(--text-regular); font-size: 14px; line-height: 1.8; }
.ais-dialog footer { display: flex; justify-content: flex-end; gap: 10px; margin: 20px 0 0; padding: 14px 24px; border-top: 1px solid var(--row-line); background: #fafbfc; }
.ais-lightbox { max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; padding: 28px; border: 0; background: transparent; cursor: zoom-out; }
.ais-lightbox[open] { display: grid; place-items: center; }
.ais-lightbox img { max-width: 100%; max-height: calc(100vh - 56px); border-radius: 10px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 60%); }
.ais-lightbox-close { position: fixed; top: 18px; right: 22px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff; background: rgb(255 255 255 / 16%); font-size: 22px; cursor: pointer; }

/* 窄屏：两栏叠成一栏 */
@media (max-width: 1100px) {
  .ais-studio, .ais-studio.fixed, .ais-workbench .ais-studio { grid-template-columns: 1fr; height: auto; }
  .ais-composer { border-right: 0; border-bottom: 1px solid var(--ais-line); }
  .ais-studio.fixed .ais-composer { display: block; }
  .ais-studio.fixed .ais-scroll, .ais-studio.fixed .ais-results { overflow: visible; }
  .ais-studio.fixed .ais-results > .ais-panel-title { position: static; }
  .ais-quote { position: sticky; bottom: 0; z-index: 1; }
  .ais-empty { min-height: 320px; }
  .ais-guide-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ais-page { padding-left: 14px; padding-right: 14px; }
  .ais-dialog-facts, .ais-params, .ais-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ais-quote { grid-template-columns: 1fr; }
  .ais-workbench-top { flex-wrap: wrap; padding: 10px 16px; }
}

/* 对话里助手生成的图片、视频 */
.chat-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; max-width: 640px; margin: 12px 0 4px; }
/* 只有一张图时，卡片按这张图的比例定宽（ai-studio.js 算好写在 --w、--ar 里），不留黑边，图没加载完版面也不跳 */
.chat-media.single.image { display: block; }
.chat-media.single.image .cm-item { width: min(var(--w, 300px), 100%); }
.chat-media.single.image .cm-item.done img { width: 100%; height: auto; max-height: none; aspect-ratio: var(--ar); }
/* 视频卡片也按成片比例定宽（最宽 480、最高 440）：竖版的窄一些 */
.chat-media.video { display: block; }
.chat-media.video .cm-item { width: min(var(--w, 480px), 100%); }
.cm-item { position: relative; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.cm-item.wait, .cm-item.failed { aspect-ratio: 4 / 3; background: #f1f4f8; }
.cm-item.video.wait, .cm-item.video.failed { aspect-ratio: 16 / 9; background: #0b1626; }
.cm-item .ais-state { padding: 16px; }
.cm-item.image img { display: block; width: 100%; max-height: 440px; background: #0e1826; object-fit: contain; }
.cm-item.image a:first-child { display: block; cursor: zoom-in; }
.cm-item video { display: block; width: 100%; aspect-ratio: var(--ar, 16 / 9); background: #000; }
.cm-item figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; color: var(--text-regular); font-size: 13px; }
.cm-item figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-item figcaption a { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--blue); font-size: 13px; }
.cm-item figcaption a:hover { color: var(--blue-active); text-decoration: underline; }
.cm-item figcaption svg { width: 14px; height: 14px; }

/* ===== 2026-11-30 视觉打磨（用户：「AI图片和AI视频的页面也是，弄好看一些。显得高端一点。」）=====
   和素材库同一套：标题区是品牌色图标块加标题加一句话；大卡片 22px 圆角、一层很轻的投影；每一栏内边距 24px，里面的东西左右对齐；
   主按钮用品牌蓝的渐变；成品卡片 16px 圆角，悬停时轻轻抬起。只改观感，功能和结构没动。 */
.ais-page { --ais-line: #e9ebf0; --ais-soft: #f1f3f6; padding-top: 26px; }
/* 标题区 */
.ais-hero { display: flex; align-items: center; gap: 16px; margin: 0 0 24px; }
.ais-hero-icon { flex: none; display: grid; place-items: center; }
.ais-hero-text { min-width: 0; }
.ais-hero .ais-head-line { margin: 0; }
.ais-hero h1 { margin: 0; color: var(--text); font-size: 26px; font-weight: 650; line-height: 1.25; letter-spacing: .01em; }
.ais-hero p { margin: 6px 0 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }
.ais-chip { height: 26px; padding: 0 12px; border: 1px solid var(--blue-line); background: var(--blue-tint); }
.ais-warning { border-radius: 16px; padding: 14px 18px; }
/* 外框 */
.ais-studio, .ais-workbench { border-color: var(--ais-line); border-radius: 22px; box-shadow: 0 1px 2px rgb(20 21 28 / 4%), 0 24px 48px -32px rgb(20 21 28 / 22%); }
.ais-workbench .ais-studio { border-radius: 0; box-shadow: none; }
/* 标题区比原来矮了 28px，定高的工作台跟着长高一点，仍然正好一屏。只在宽屏上生效：窄屏是上下排、不定高（上面 1100px 那一段）。 */
@media (min-width: 1101px) {
  .ais-studio { grid-template-columns: minmax(400px, 448px) minmax(0, 1fr); }
  .ais-workbench .ais-studio { grid-template-columns: minmax(430px, 500px) minmax(0, 1fr); height: clamp(520px, calc(100vh - 298px), 880px); }
  .ais-studio.fixed { height: clamp(560px, calc(100vh - 238px), 920px); }
  .ais-workbench .ais-studio.fixed { height: clamp(520px, calc(100vh - 298px), 880px); }
}
.ais-results { background: #f7f8fa; }
.ais-studio.fixed .ais-results > .ais-panel-title { background: rgb(247 248 250 / 92%); }
/* 每一栏的标题条：同一高度，同一左边 */
.ais-panel-title { min-height: 64px; padding: 0 24px; }
.ais-panel-title b { font-size: 15.5px; letter-spacing: .01em; }
.ais-panel-title .ais-total { padding: 2px 10px; background: #e9edf2; }
.ais-workbench-top { min-height: 60px; padding: 0 24px; }
.ais-meta { background: #f7f8fa; }
/* 左栏 */
.ais-section { padding: 22px 24px; }
.ais-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ais-prompt { border-color: #e1e5eb; border-radius: 14px; background: #fcfcfd; }
.ais-prompt:focus-within { background: #fff; }
.ais-prompt textarea { border-radius: 14px; padding: 14px 16px 30px; }
.ais-prompt.rich textarea { border-radius: 14px 14px 0 0; padding-bottom: 12px; }
.ais-prompt-foot { border-radius: 0 0 14px 14px; padding: 4px 14px; }
.ais-refs { border-color: #d3d9e3; border-radius: 14px; background: #fafbfd; }
.ais-ref { border-radius: 10px; }
.ais-seg { padding: 4px; border-radius: 13px; }
.ais-seg button { border-radius: 10px; }
.ais-seg button.on { box-shadow: 0 1px 3px rgb(16 42 67 / 14%), inset 0 0 0 1px rgb(18 116 165 / 22%); }
.ais-model { border-color: #e1e5eb; border-radius: 14px; }
.ais-choices button, .ais-number { height: 34px; border-color: #e1e5eb; border-radius: 10px; }
.ais-resolutions button { border-color: #e1e5eb; border-radius: 12px; }
.ais-ghost { height: 34px; padding: 0 14px; border-color: #e1e5eb; }
/* 底部的价格和按钮 */
.ais-quote { grid-template-columns: minmax(0, 1fr) 192px; gap: 16px; padding: 14px 24px 16px; }
.ais-quote b { font-size: 24px; }
.ais-generate, .ais-quote .ais-generate { height: 48px; border: 0; border-radius: 14px; color: #fff; font-size: 15px; letter-spacing: .02em;
  background: linear-gradient(180deg, #1784b9 0%, #1274a5 100%); box-shadow: 0 10px 22px -10px rgb(18 116 165 / 62%), inset 0 1px 0 rgb(255 255 255 / 22%); transition: background .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease); }
.ais-generate:hover:not(:disabled) { background: linear-gradient(180deg, #147aad 0%, #106590 100%); box-shadow: 0 12px 26px -10px rgb(18 116 165 / 72%), inset 0 1px 0 rgb(255 255 255 / 22%); }
.ais-generate:active:not(:disabled) { transform: translateY(1px); }
/* 还不能点的时候：浅底深字，看得清是「还没填完」，不是一块发白的色块 */
.ais-generate:disabled { background: #e6edf2; box-shadow: none; color: #7f97a8; cursor: not-allowed; }
/* 右栏：成品 */
.ais-grid { gap: 18px; padding: 24px; }
.ais-card { border-color: var(--ais-line); border-radius: 16px; box-shadow: 0 1px 2px rgb(20 21 28 / 3%); }
.ais-card:hover { border-color: #d5dde8; box-shadow: 0 18px 34px -20px rgb(16 42 67 / 34%); transform: translateY(-2px); }
.ais-visual-top { top: 10px; right: 10px; left: 10px; }
.ais-status, .ais-spec { height: 26px; padding: 0 10px; border: 1px solid rgb(255 255 255 / 16%); background: rgb(14 24 38 / 58%); backdrop-filter: blur(8px); }
.ais-pill { top: 10px; left: 10px; height: 26px; padding: 0 11px; line-height: 26px; box-shadow: 0 4px 10px rgb(14 24 38 / 24%); }
.ais-info { gap: 10px; padding: 14px 16px 12px; }
.ais-info > p { font-size: 13.5px; }
.ais-tag, .ais-tags span { padding: 2px 9px; border-radius: 7px; }
.ais-actions { padding-top: 10px; }
.ais-actions button { height: 34px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; }
.ais-download { height: 34px; padding: 0 14px; font-size: 12.5px; }
.ais-empty { border-radius: 16px; }
.ais-pager { padding: 0 24px 24px; }
.ais-guide { margin-top: 18px; border-color: var(--ais-line); border-radius: 18px; }
.ais-guide summary { padding: 16px 24px; }
.ais-guide-body { padding: 4px 24px 20px; }
@media (max-width: 760px) {
  .ais-page { padding-top: 16px; }
  .ais-hero { gap: 12px; margin-bottom: 14px; }
  .ais-hero h1 { font-size: 21px; }
  .ais-hero p { display: none; }
  .ais-studio, .ais-workbench { border-radius: 18px; }
  .ais-panel-title, .ais-workbench-top { padding: 0 16px; }
  .ais-section { padding: 18px 16px; }
  .ais-quote { padding: 12px 16px 14px; }
  .ais-grid { gap: 14px; padding: 16px; }
}

/* ===== 标题区图标的动效（2026-11-30，用户：「做点高端的、酷炫的 svg，可以加一些 svg 动效」）=====
   图标本身在 ai-studio.js 的 heroTile 里画（素材库也用）：带层次的玻璃质感底 + 分层图形 + 金色星标。这里只管它怎么动：
   光斑慢慢游走、高光每隔几秒扫过一次、星标一明一暗、卡片轻轻浮动、画面上的扫描光、胶片齿孔在走、播放键往外荡光圈；鼠标移上去整块轻轻抬起。
   系统设了「减少动态效果」的，全部静止。 */
.ais-hero-icon, .mv .mv-hero-icon { width: 60px; height: 60px; border-radius: 0; background: none; box-shadow: none;
  filter: drop-shadow(0 12px 18px rgb(18 116 165 / 32%)) drop-shadow(0 2px 4px rgb(10 53 82 / 22%)); transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s ease; }
.ais-hero-icon:hover, .mv .mv-hero-icon:hover { transform: translateY(-2px) scale(1.05) rotate(-3deg); filter: drop-shadow(0 16px 24px rgb(18 116 165 / 40%)) drop-shadow(0 2px 4px rgb(10 53 82 / 22%)); }
/* 全站的 svg 默认带一圈「当前文字色」的描边（给线条图标用的），这里的图形是填色的，先把描边关掉，要描边的各自写在图形上 */
.ha { display: block; width: 100%; height: 100%; overflow: visible; stroke: none; fill: none; }
.ha-blob.v { animation-direction: alternate-reverse; animation-duration: 9s; }
.ha-blob { animation: ha-drift 7s ease-in-out infinite alternate; }
.ha-shine { animation: ha-shine 5.2s cubic-bezier(.4, 0, .2, 1) infinite; }
.ha-star, .ha-float, .ha-ring { transform-box: fill-box; transform-origin: center; }
.ha-star { animation: ha-twinkle 2.6s ease-in-out infinite; }
.ha-star.b { animation-delay: -1.3s; }
.ha-float { animation: ha-float 4.4s ease-in-out infinite alternate; }
.ha-float.b { animation-duration: 5.2s; animation-direction: alternate-reverse; }
.ha-scan { animation: ha-scan 3.4s cubic-bezier(.45, 0, .25, 1) infinite; }
.ha-scan.slow { animation-duration: 6s; animation-delay: 1.2s; opacity: 0; }
.ha-film { animation: ha-film 1.1s linear infinite; }
.ha-ring { animation: ha-ring 2.4s ease-out infinite; }
.ais-hero-icon:hover .ha-shine, .mv .mv-hero-icon:hover .ha-shine { animation-duration: 1.4s; }
@keyframes ha-drift { from { transform: translate(0, 0); } to { transform: translate(-22px, -26px); } }
@keyframes ha-shine { 0%, 55% { transform: translateX(0); } 85%, 100% { transform: translateX(130px); } }
@keyframes ha-twinkle { 0%, 100% { transform: scale(.62) rotate(0deg); opacity: .55; } 50% { transform: scale(1.12) rotate(18deg); opacity: 1; } }
@keyframes ha-float { from { transform: translateY(1px) rotate(-2deg); } to { transform: translateY(-2px) rotate(2deg); } }
@keyframes ha-scan { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 62% { transform: translateX(46px); opacity: 1; } 74%, 100% { transform: translateX(46px); opacity: 0; } }
@keyframes ha-film { to { stroke-dashoffset: -5.1; } }
@keyframes ha-ring { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(1.85); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ha *, .ais-hero-icon, .mv .mv-hero-icon { animation: none !important; transition: none !important; } .ha-scan { opacity: 0; } }
@media (max-width: 760px) { .ais-hero-icon, .mv .mv-hero-icon { width: 48px; height: 48px; } }

/* ===== 2026-11-30 对话归档、定时任务、销售知识库也用同一套标题区（window.xwxHero）；归档页的清单照 Codex「已归档的聊天」的样子 ===== */
.ais-hero-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.ha-drop, .ha-lid { transform-box: fill-box; transform-origin: center; }
.ha-drop { animation: ha-drop 3.6s cubic-bezier(.5, 0, .3, 1) infinite; }
.ha-lid { transform-origin: left center; animation: ha-lid 3.6s ease-in-out infinite; }
.ha-hand { animation: ha-turn 7s linear infinite; }
.ha-hand.slow { animation-duration: 42s; }
.ha-write { animation: ha-write 4.2s ease-in-out infinite; }
@keyframes ha-drop { 0%, 12% { transform: translateY(-3px); opacity: 0; } 30%, 58% { transform: translateY(0); opacity: 1; } 82%, 100% { transform: translateY(13px) scale(.82); opacity: 0; } }
@keyframes ha-lid { 0%, 52%, 100% { transform: rotate(0deg); } 66%, 80% { transform: rotate(-9deg) translateY(-1px); } }
@keyframes ha-turn { to { transform: rotate(360deg); } }
@keyframes ha-write { 0% { stroke-dashoffset: 30; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 30; } }

/* 清单（对话归档、定时任务共用）：一张白卡片，上面搜索和筛选，下面一组一组排；每行左边标题加一行小字，右边是圆角小按钮 */
.xl-page { padding-top: 26px; }
.xl-card { padding: 26px 32px 14px; border: 1px solid #e9ebf0; border-radius: 22px; background: #fff; box-shadow: 0 1px 2px rgb(20 21 28 / 4%), 0 24px 48px -32px rgb(20 21 28 / 22%); }
.xl-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.xl-search { flex: 1; min-width: 220px; max-width: 620px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid #e1e5eb; border-radius: 14px; background: #fff; color: var(--text-faint); transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.xl-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(18 116 165 / 12%); }
.xl-search svg { width: 18px; height: 18px; }
.xl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14.5px; }
.xl-select { height: 44px; padding: 0 38px 0 16px; border: 1px solid #e1e5eb; border-radius: 14px; color: var(--text); font: inherit; font-size: 14.5px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374757c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
.xl-select:focus { border-color: var(--blue); outline: 0; }
.xl-group { margin-bottom: 30px; }
.xl-group[hidden] { display: none; }
.xl-group-head { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding-bottom: 12px; border-bottom: 1px solid #e9ebf0; }
.xl-group-head > svg { width: 20px; height: 20px; color: var(--text-regular); }
.xl-group-head b { color: var(--text); font-size: 15.5px; font-weight: 600; letter-spacing: .01em; }
.xl-count { margin-left: auto; color: var(--text-muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.xl-more { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--text-muted); cursor: pointer; }
.xl-more:hover, .xl-more[aria-expanded="true"] { background: #f1f3f6; color: var(--text); }
.xl-menu { position: absolute; top: 40px; right: 0; z-index: 20; min-width: 200px; padding: 6px; border: 1px solid #e9ebf0; border-radius: 16px; background: #fff; box-shadow: 0 18px 44px rgb(20 21 28 / 16%); }
.xl-menu[hidden] { display: none; }
.xl-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #b3372c; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.xl-menu button:hover { background: #fdf0ef; }
.xl-menu svg { width: 18px; height: 18px; }
.xl-row { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #eef0f4; }
.xl-row[hidden] { display: none; }
.xl-row:last-child { border-bottom: 0; }
.xl-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.xl-main b, .xl-main > a { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 550; line-height: 1.4; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.xl-main > a:hover { color: var(--blue); }
.xl-main small { overflow: hidden; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.xl-main small.wrap { white-space: normal; }
.xl-main small em { font-style: normal; color: var(--text-faint); }
.xl-main small .bad { color: var(--danger); }
.xl-ops { flex: none; display: flex; align-items: center; gap: 8px; }
.xl-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border: 0; border-radius: 11px; background: #f1f3f6; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .16s var(--ease); }
.xl-btn:hover:not(:disabled) { background: #e6e9ee; }
.xl-btn:disabled { opacity: .5; cursor: not-allowed; }
.xl-btn.danger { background: #fdeeed; color: #b3372c; }
.xl-btn.danger:hover:not(:disabled) { background: #fbdedb; }
.xl-btn.primary { height: 44px; padding: 0 22px; border-radius: 99px; color: #fff; background: linear-gradient(180deg, #1784b9 0%, #1274a5 100%); box-shadow: 0 10px 22px -10px rgb(18 116 165 / 62%), inset 0 1px 0 rgb(255 255 255 / 22%); }
.xl-btn.primary:hover { background: linear-gradient(180deg, #147aad 0%, #106590 100%); }
.xl-state { flex: none; height: 26px; padding: 0 10px; border-radius: 99px; background: #f1f3f6; color: var(--text-muted); font-size: 12.5px; font-style: normal; line-height: 26px; }
.xl-state.ok { background: #e6f5ec; color: #1a7f4b; }
.xl-state.warn { background: #fdeeed; color: #b3372c; }
.xl-empty { padding: 56px 0 64px; color: var(--text-muted); font-size: 14px; text-align: center; }
.xl-empty[hidden] { display: none; }
.xl-empty b { display: block; margin-bottom: 6px; color: var(--text); font-size: 16px; font-weight: 600; }
.xl-tips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--text-muted); font-size: 13.5px; }
.xl-tips i { padding: 6px 12px; border-radius: 99px; background: #f4f6f9; color: var(--text-regular); font-style: normal; }
.xl-back { margin: 0 0 16px; }
.xl-back a { color: var(--text-muted); font-size: 13.5px; text-decoration: none; }
.xl-back a:hover { color: var(--blue); }
@media (max-width: 760px) {
  .xl-page { padding-top: 16px; }
  .xl-card { padding: 18px 16px 6px; border-radius: 18px; }
  .xl-tools { margin-bottom: 20px; }
  .xl-select { flex: 1; }
  .xl-row { flex-wrap: wrap; gap: 10px; padding: 14px 0; }
  .xl-main { flex-basis: 100%; }
  .ais-hero-actions { display: none; }
}
/* 这几页的底色和 AI 图片、AI 视频、素材库一样用浅灰，白卡片才立得起来 */
.content:has(.xl-page) { background: var(--page); }

/* ---------- 对话里的出图、出片（2026-12-04 照金聚诚的对话图集补）：占位按比例、页内看大图、视频首帧和播放键、已存进素材库、中途停止（图上不标 AI 生成） ---------- */
.cm-item.wait, .cm-item.failed { aspect-ratio: var(--ar, 4 / 3); }
.cm-item.video.wait, .cm-item.video.failed { aspect-ratio: var(--ar, 16 / 9); }
.chat-media.single.image .cm-item.wait, .chat-media.single.image .cm-item.failed { width: min(var(--w, 300px), 100%); }
.cm-item.wait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgb(255 255 255 / 45%) 50%, transparent 75%); transform: translateX(-100%); animation: cm-shine 2.4s ease-in-out infinite; pointer-events: none; }
.cm-item.video.wait::after { background: linear-gradient(100deg, transparent 25%, rgb(255 255 255 / 7%) 50%, transparent 75%); }
@keyframes cm-shine { to { transform: translateX(100%); } }
.cm-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.cm-video { position: relative; }
.cm-play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: rgb(0 0 0 / 16%); cursor: pointer; }
.cm-play svg { width: 56px; height: 56px; padding: 15px 13px 15px 17px; border-radius: 50%; background: rgb(255 255 255 / 92%); color: #1274a5; fill: currentColor; stroke: none; box-shadow: 0 8px 24px rgb(0 0 0 / 25%); transition: transform .15s; }
.cm-play:hover svg { transform: scale(1.06); }
/* 「已存进素材库」小回执（2026-12-04 晚负责人：「把这个改漂亮点」）：浅蓝底一条，左边 logo 蓝的对勾，件数用细竖线隔开，右边「去看看」，移上去箭头往右走一点。 */
.cm-library { display: inline-flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 5px 12px 5px 5px; border: 1px solid #d3eaf5; border-radius: 12px; background: #f4fbfe;
  color: #1d2129; font-size: 13.5px; line-height: 1; text-decoration: none; transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease); }
.cm-library .cml-ok { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(140deg, #30acd8 0%, #1274a5 100%); color: #fff;
  box-shadow: 0 3px 8px -3px rgb(18 116 165 / 55%); }
.cm-library .cml-ok svg { width: 15px; height: 15px; stroke-width: 2.6; }
.cm-library b { font-weight: 600; }
.cm-library .cml-count { padding-left: 10px; border-left: 1px solid #cfe3ee; color: #2c3a4e; font-size: 13px; font-variant-numeric: tabular-nums; }
.cm-library .cml-go { display: inline-flex; align-items: center; gap: 1px; margin-left: 2px; color: var(--blue); font-weight: 500; }
.cm-library .cml-go svg { width: 14px; height: 14px; stroke-width: 2.2; transition: transform .16s var(--ease); }
.cm-library:hover { border-color: #9fd5ea; background: #ecf8fd; box-shadow: 0 6px 16px -10px rgb(18 116 165 / 45%); }
.cm-library:hover .cml-go svg { transform: translateX(3px); }
.cm-library:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cm-lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgb(10 14 22 / 94%); color: #fff; }
.cm-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cm-lightbox::backdrop { background: rgb(10 14 22 / 60%); }
.cm-lb-bar { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.cm-lb-bar b { font-size: 15px; font-weight: 600; }
.cm-lb-bar em { margin-left: 12px; color: #dfe6ee; font-size: 14px; font-style: normal; font-variant-numeric: tabular-nums; }
.cm-lb-acts { display: flex; align-items: center; gap: 10px; }
.cm-lb-acts a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 99px; background: rgb(255 255 255 / 14%); color: #fff; font-size: 13.5px; text-decoration: none; }
.cm-lb-acts a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cm-lb-acts button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 14%); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.cm-lb-stage { grid-row: 2; display: grid; place-items: center; min-height: 0; padding: 0 76px; }
.cm-lb-stage img, .cm-lb-stage video { max-width: 100%; max-height: calc(100vh - 190px); border-radius: 8px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 60%); }
.cm-lb-nav { position: fixed; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 14%); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.cm-lb-nav.prev { left: 16px; }
.cm-lb-nav.next { right: 16px; }
.cm-lb-nav:hover, .cm-lb-acts a:hover, .cm-lb-acts button:hover { background: rgb(255 255 255 / 24%); }
.cm-lb-thumbs { grid-row: 3; display: flex; justify-content: center; gap: 8px; padding: 12px 20px 18px; overflow-x: auto; }
.cm-lb-thumbs button { flex: none; width: 64px; height: 48px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 6px; background: #000; opacity: .6; cursor: pointer; }
.cm-lb-thumbs button[aria-current="true"] { border-color: #30acd8; opacity: 1; }
.cm-lb-thumbs img, .cm-lb-thumbs video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .cm-lb-stage { padding: 0 12px; } .cm-lb-nav { display: none; } }
@media (prefers-reduced-motion: reduce) { .cm-item.wait::after { animation: none; } }

/* 中途停止（2026-12-04）：生成中的卡片底下一个「停止」，停掉的显示「已停止」（一个方块，不用红色感叹号——不是出错）。 */
.cm-stop { position: absolute; left: 50%; bottom: 12px; z-index: 1; height: 30px; padding: 0 14px; border: 1px solid #dfe3e8; border-radius: 99px; background: #fff; color: #1d2129; font: inherit; font-size: 13px; transform: translateX(-50%); cursor: pointer; }
.cm-stop:hover:not(:disabled) { border-color: #c9ced6; background: #f7f8fa; }
.cm-stop:disabled { opacity: .5; cursor: default; }
.cm-item.video .cm-stop { border-color: rgb(255 255 255 / 25%); background: rgb(255 255 255 / 12%); color: #fff; }
.ais-state.stopped > span { display: block; width: 26px; height: 26px; margin-bottom: 6px; border-radius: 7px; background: #c5ccd5; }
.ais-state.stopped.dark > span { background: rgb(255 255 255 / 30%); }
.ais-state.stopped b { color: #1d2129; }
.ais-state.stopped.dark b { color: #e8eef6; }
.ais-status.cancelled, .ais-pill.cancelled { color: #1d2129; background: #eef0f3; }
