/* ============================================================
   拾景工作台 popup —— 基础样式与旧节点兼容层
   token 与网页端同源：墨黑基底 / 橙=动作 / 香槟金=等级 / 得意黑标题
   动效不变：入场淡入 / hover 变亮 / 按下缩放 / 设置齿轮 hover 转
   ============================================================ */

/* 得意黑子集（1016 字/124KB，来源三页 html + popup/gallery/options.js 全部文案） */
@font-face {
  font-family: 'Smiley Sans';
  src: url("fonts/SmileySans-ext.woff2") format("woff2");
  font-display: swap;
}

/* 共用 token：与网页端 style.css 同一套色板 */
:root {
  --ink: #0C0C0E;                          /* 底 */
  --panel: #151518;                        /* 主面板/功能钮 */
  --panel2: #1B1B1F;                       /* 次面板/弹窗/输入件 */
  --inset: #0F0F11;                        /* 日志凹槽 */
  --ivory: #EFEBE3;                        /* 主文字 */
  --stone: #8E8A82;                        /* 次文字 */
  --faint: #5C594F;                        /* 弱文字/等待态 */
  --brand: #F76B1C;                        /* 橙=动作 */
  --gold: #C8A35F;                         /* 香槟金=等级(MAX) */
  --ok: #8FB573;                           /* 完成 */
  --bad: #D2695E;                          /* 失败 */
  --skip: #D8B36C;                         /* 跳过 */
  --hairline: rgba(239, 235, 227, 0.08);   /* 发丝边 */
  --disp: 'Smiley Sans', -apple-system, 'PingFang SC', sans-serif;   /* 标题字 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100vh; }
body {
  min-width: 280px;
  font-family: -apple-system, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  color: var(--ivory);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* 旧 light 主题装饰层全部隐藏 */
.bg-canvas, .bg-orb { display: none; }

/* === 主面板 === */
.glass-panel {
  position: relative;
  margin: 8px;
  padding: 16px 14px 14px;
  border-radius: 18px;
  background: var(--panel);
  height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px var(--hairline),
    0 12px 32px rgba(0, 0, 0, 0.35);

  /* 入场动画：纯 fade + 微缩放，0.28s spring */
  animation: pop-in 0.28s cubic-bezier(0.32, 0.72, 0, 1) both;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* === 标题（得意黑 400，单字重防伪加粗） === */
h1.title {
  font-family: var(--disp);
  font-size: 17px;
  font-weight: 400;
  text-align: left;
  margin-bottom: 14px;
  margin-right: 32px;
  color: var(--ivory);
  letter-spacing: 0.03em;
  padding: 0 2px;
  line-height: 1.3;
}
/* v3.2.79: 标题副标（2026-11-08 老板改为：节省人力成本，爆发自然流量） */
h1.title .subtitle {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--stone);
  margin-top: 3px;
  letter-spacing: 0.05em;
}

/* 构建标识（2026-09-01）：比副标题再淡一档，自成一行，不跟副标题抢视线。
   ⚠ 必须显式给字号/字重——不给会继承 h1 的大字，把面板顶整个撑变形。
   空内容时 :empty 收掉外边距，等于完全不占位（老包没有 version_name 也不会多出空行）。 */
h1.title .build-id {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: var(--stone);
  opacity: .55;
  margin-top: 2px;
  letter-spacing: 0.03em;
}
h1.title .build-id:empty { display: none; }

/* === Section 标题 === */
.section-label {
  font-family: var(--disp);
  font-size: 10px;
  font-weight: 400;
  color: var(--stone);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding: 0 2px;
}
.section-label.max-label { color: var(--gold); }
.section-label .max-badge {
  display: inline-block;
  padding: 1px 5px;
  margin-left: 4px;
  font-size: 8px;
  font-weight: 700;
  color: #241B0E;
  background: linear-gradient(135deg, #D8B36C, #C8A35F);
  border-radius: 4px;
  letter-spacing: 0.06em;
  vertical-align: 1px;
}

/* === 按钮组容器 === */
.btn-group {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  grid-auto-rows: 1fr;   /* 一致性:同组行高对齐(无副标按钮不再矮一截) */
}
.btn-group-2 { grid-template-columns: 1fr 1fr; }
.btn-group-3 { grid-template-columns: 1fr 1fr 1fr; }
.btn-group-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* === 按钮基底 .glass-pill（面板同底+发丝边，hover 只亮边框，同网页芯片规则） === */
.glass-pill {
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  padding: 11px 6px;
  border-radius: 11px;
  font-family: var(--disp);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s cubic-bezier(0.32, 0.72, 0, 1);
}
.glass-pill:hover { border-color: rgba(239, 235, 227, 0.16); }
.glass-pill:active {
  transform: scale(0.96);
  background: var(--panel2);
  border-color: rgba(239, 235, 227, 0.2);
  transition-duration: 0.06s;
}
.glass-pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* 副标题（白底图 / 搜推图文 的"按尺寸""主图前 5 张" + 挂机模式 hint） */
/* 用 popup.html 里写死的 has-title / has-badge 标记，不用 :has()：Chrome 105 以下的旧内核（国产浏览器兼容模式）不认 :has()，
   标题和副标会挤成一行、「自定义」竖栏跑位（2026-11-05 顾客截图）。新加带副标/角标的按钮记得补标记，popup_old_kernel_layout.test.js 会查 */
.btn.glass-pill.has-title,
.btn-primary.has-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.btn-primary .btn-mode-hint {
  font-size: 10px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  max-width: 100%;
}

/* 挂机模式正在跑：橙描边空心 + 脉动呼吸 + 高亮副标 */
.btn-primary.task-mode-running {
  background: var(--panel2);
  color: #ff9a5c;
  animation: taskModePulse 1.6s ease-in-out infinite;
}
.btn-primary.task-mode-running .btn-mode-hint {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}
.btn-primary.task-mode-running:disabled {
  opacity: 1;  /* 覆盖 .ink-glass:disabled 的 opacity:0.4，保持高亮 */
}
@keyframes taskModePulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(247, 107, 28, 0.55), 0 0 0 0 rgba(247, 107, 28, 0.45); }
  50%      { box-shadow: inset 0 0 0 1px rgba(247, 107, 28, 0.55), 0 0 0 6px rgba(247, 107, 28, 0); }
}
.btn-title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-align: center;
}
/* 副标回系统字：9-10px 小字用得意黑难读，正文字保证可读性 */
.btn-mode-hint {
  font-family: -apple-system, 'PingFang SC', sans-serif;
  letter-spacing: 0;
  font-size: 9px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  max-width: 100%;
}

/* （Pro 紫调已删：v3.2.34 退役后是死代码，popup.js 零引用） */

/* === 旧强调色兼容层（金=状态，橙=动作，互不混用） === */
.max-btn {
  background: rgba(200, 163, 95, 0.08);
  border-color: rgba(200, 163, 95, 0.35);
}
.max-btn:hover { background: rgba(200, 163, 95, 0.14); border-color: rgba(200, 163, 95, 0.5); }
.max-btn:active { background: rgba(200, 163, 95, 0.2); }
.max-btn .btn-mode-hint { color: rgba(216, 179, 108, 0.8); }
.max-btn.locked {
  opacity: 0.45;
  cursor: not-allowed;
  position: relative;
}
.max-btn.locked::after {
  content: '🔒';
  position: absolute;
  top: 4px; right: 6px;
  font-size: 9px;
}
.max-btn.locked:hover { background: rgba(200, 163, 95, 0.08); transform: none; }

/* === 搜推图文「✎ 自定义」角标 + 自定义ID输入弹层 === */
/* 角标贴搜推图文按钮右上角：点它=进自定义模式（只填指定ID）；点按钮主体=照常自动 */
.glass-pill.has-badge { position: relative; }

/* 「推荐」角标（链接裂变按钮用）：纯装饰、不拦截点击，几何与 soutui-custom-badge 对齐。
   双端统一：改网页 gal-badge 同款——橙 15% 底 + 40% 描边 + 橙字（金只留给等级） */
.glass-pill.has-reco-badge { position: relative; }
.reco-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  line-height: 1;
  font-weight: 600;
  font-family: -apple-system, 'PingFang SC', sans-serif;
  padding: 2px 5px;
  border-radius: 8px;
  color: #ff8a4c;
  background: rgba(247, 107, 28, 0.15);
  border: 1px solid rgba(247, 107, 28, 0.4);
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 3;
}
/* 自定义角标：同 reco-badge 一套橙角标语言；悬停提亮+微放大表达"可点" */
.soutui-custom-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  line-height: 1;
  font-weight: 600;
  font-family: -apple-system, 'PingFang SC', sans-serif;
  padding: 2.5px 6px;
  border-radius: 8px;
  color: #ff8a4c;
  background: rgba(247, 107, 28, 0.15);
  border: 1px solid rgba(247, 107, 28, 0.4);
  cursor: pointer;
  z-index: 3;
  transition: background 0.15s ease, transform 0.12s ease;
}
.soutui-custom-badge:hover { background: rgba(247, 107, 28, 0.28); transform: scale(1.05); }
.max-btn.locked .soutui-custom-badge { display: none; }  /* 兼容 locked 状态时不显示角标 */

/* 自定义ID输入弹层 */
.soutui-custom-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.soutui-custom-modal {
  width: 280px;
  max-width: 86vw;
  box-sizing: border-box;
  background: var(--panel2);
  border: 1px solid rgba(239, 235, 227, 0.12);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: var(--ivory);
}
.soutui-custom-modal h3 { margin: 0 0 4px; font-family: var(--disp); font-size: 15px; font-weight: 400; letter-spacing: 0.03em; }
/* 自定义商品：同一个面板内切换日期和 ID，复刻图区域不跟着切换。 */
.scm-product-modal { max-height: 90vh; overflow-y: auto; }
.scm-product-filter { border: 0; padding: 0; margin: 8px 0; min-width: 0; }
.scm-product-filter legend { font-size: 12px; margin-bottom: 6px; }
.scm-product-kind { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.scm-product-kind label { cursor: pointer; }
.scm-product-kind input { position: absolute; opacity: 0; width: 0; height: 0; }
.scm-product-kind span { display: inline-block; padding: 5px 8px; border: 1px solid rgba(239,235,227,.22); border-radius: 8px; font-size: 11px; }
.scm-product-kind input:checked + span { border-color: var(--brand); color: var(--brand); background: rgba(247,107,28,.1); }
.scm-product-kind input:focus-visible + span { outline: 1px solid var(--brand); outline-offset: 2px; }
.scm-product-filter:disabled { opacity: .65; }
.scm-date-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; margin-bottom: 8px; }
.scm-date-today { padding: 3px 9px; border: 1px solid rgba(239,235,227,.22); border-radius: 6px; background: transparent; color: var(--ivory); font: inherit; font-size: 11px; cursor: pointer; }
.scm-date-range { position: relative; }
.scm-date-range input { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 26px 9px 8px; background: var(--panel2); color: var(--ivory); border: 1px solid rgba(239,235,227,.22); border-radius: 6px; font: inherit; font-size: 11px; cursor: pointer; }
.scm-range-icon { position: absolute; top: 8px; right: 8px; pointer-events: none; color: var(--ivory); }
.scm-date-range input:focus { outline: 1px solid var(--brand); }
.scm-date-hint { margin: 8px 0 0; font-size: 11px; color: rgba(255,255,255,.5); }
/* 日历与面板使用相同颜色；范围中间的日期保持可辨认。 */
.scm-range-calendar { background: #1b1b1e; border: 1px solid #444; box-shadow: 0 8px 24px #0009; }
.scm-range-calendar .flatpickr-month, .scm-range-calendar .flatpickr-current-month, .scm-range-calendar .flatpickr-weekday, .scm-range-calendar .flatpickr-day { color: #efebe3; }
.scm-range-calendar .flatpickr-prev-month svg, .scm-range-calendar .flatpickr-next-month svg { fill: #efebe3; }
.scm-range-calendar .flatpickr-monthDropdown-months, .scm-range-calendar .flatpickr-monthDropdown-months option { background: #1b1b1e; }
.scm-range-calendar .flatpickr-day.prevMonthDay, .scm-range-calendar .flatpickr-day.nextMonthDay { color: #777; }
.scm-range-calendar .flatpickr-day:hover, .scm-range-calendar .flatpickr-day.inRange { background: #3d291e; border-color: #3d291e; }
.scm-range-calendar .flatpickr-day.inRange { box-shadow: -5px 0 0 #3d291e, 5px 0 0 #3d291e; }
.scm-range-calendar .flatpickr-day.selected, .scm-range-calendar .flatpickr-day.startRange, .scm-range-calendar .flatpickr-day.endRange { color: #fff; background: #ff741d; border-color: #ff741d; }
.scm-range-calendar .flatpickr-day.startRange + .endRange:not(:nth-child(7n+1)) { box-shadow: -10px 0 0 #ff741d; }
.scm-selection-error { font-size: 11px; color: #ff8a4c; white-space: normal; }
.scm-selection-error:not(:empty) { margin: 8px 0; }
.soutui-custom-modal .scm-sub {
  margin: 0 0 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}
.soutui-custom-modal textarea {
  width: 100%;
  box-sizing: border-box;
  height: 120px;
  resize: vertical;
  background: var(--inset);
  border: 1px solid rgba(239, 235, 227, 0.15);
  border-radius: 8px;
  color: var(--ivory);
  font-family: -apple-system, 'PingFang SC', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px;
  outline: none;
}
.soutui-custom-modal textarea:focus { border-color: rgba(247, 107, 28, 0.55); }
.soutui-custom-modal .scm-count {
  margin: 6px 0 12px;
  font-size: 11px;
  color: var(--stone);
}
/* 搜推图文自定义：标题行下面紧跟色块，12px 底距会把它俩拆散（2026-08-11）。
   只给带 tight 的那一个收紧，别动共用的 .scm-count——搜推视频/光合两个弹窗还在用它。 */
.soutui-custom-modal .scm-count.scm-count-tight { margin: 6px 0 0; }
/* 识别到的商品ID 色块区。弹窗只有 280px 宽、13 位 ID 一行放得下 2 个，
   40 个就是 20 行——必须封顶高度 + 内部滚动，否则按钮被顶出屏幕。 */
.soutui-custom-modal .scm-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 0;
  max-height: 104px;
  overflow-y: auto;
}
.soutui-custom-modal .scm-ids::-webkit-scrollbar { width: 6px; }
.soutui-custom-modal .scm-ids::-webkit-scrollbar-thumb {
  background: rgba(239, 235, 227, 0.16);
  border-radius: 3px;
}
.soutui-custom-modal .scm-chip {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
  background: rgba(143, 181, 115, 0.14);   /* --ok 的淡底，别另造一套绿 */
  border: 1px solid rgba(143, 181, 115, 0.32);
  color: var(--ok);
}
.soutui-custom-modal .scm-chip-more {
  background: transparent;
  border: 1px dashed rgba(239, 235, 227, 0.2);
  color: var(--stone);
}
.soutui-custom-modal .scm-ignored {
  margin: 8px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--faint);
}
.soutui-custom-modal .scm-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.soutui-custom-modal .scm-count-row .scm-count { margin: 0; }
.soutui-custom-modal .scm-bulk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--stone);
  font-size: 11px;
}
.soutui-custom-modal .scm-bulk-input,
.soutui-custom-modal .scm-row-input {
  width: 40px;
  box-sizing: border-box;
  padding: 4px 2px 4px 5px;
  background: var(--inset);
  border: 1px solid rgba(239, 235, 227, 0.15);
  border-radius: 6px;
  color: var(--ivory);
  font: inherit;
  outline: none;
}
.soutui-custom-modal .scm-bulk-input:focus,
.soutui-custom-modal .scm-row-input:focus { border-color: rgba(247, 107, 28, 0.55); }
.soutui-custom-modal .scm-bulk-apply {
  padding: 4px 6px;
  border: 1px solid rgba(247, 107, 28, 0.35);
  border-radius: 6px;
  background: rgba(247, 107, 28, 0.12);
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}
.soutui-custom-modal .scm-list {
  max-height: 168px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.soutui-custom-modal .scm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid rgba(239, 235, 227, 0.1);
  border-radius: 8px;
  background: rgba(239, 235, 227, 0.04);
}
.soutui-custom-modal .scm-pid {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ivory);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.soutui-custom-modal .scm-row-input { flex: 0 0 40px; }
.soutui-custom-modal .scm-unit {
  color: var(--stone);
  font-size: 11px;
}
.soutui-custom-modal .scm-row-del {
  padding: 2px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.soutui-custom-modal .scm-row-del:hover { color: var(--brand); }
.soutui-custom-modal .scm-total {
  margin: 8px 0 10px;
  color: var(--brand);
  font-size: 12px;
  text-align: right;
}
.soutui-custom-modal .scm-actions { display: flex; gap: 8px; }
.soutui-custom-modal .scm-btn {
  flex: 1;
  padding: 9px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.soutui-custom-modal .scm-start { background: var(--brand); color: #fff; }
.soutui-custom-modal .scm-start:hover { background: #ff7d33; }
.soutui-custom-modal .scm-start:disabled { opacity: 0.4; cursor: not-allowed; }
.soutui-custom-modal .scm-cancel { background: rgba(239, 235, 227, 0.08); color: var(--ivory); }
.soutui-custom-modal .scm-cancel:hover { background: rgba(239, 235, 227, 0.14); }
/* 光合两步弹窗的「选一个」按钮：主标题(图文/视频、按时间/按ID)独占一行加粗，
   引擎名·扣点/说明做副标题，整块左对齐——两行居中的文本块不好扫。
   叠在 .scm-btn.scm-start 之上，只覆盖排版，橙底/hover/disabled 全复用。 */
.soutui-custom-modal .scm-pick { text-align: left; padding: 10px 12px; border-radius: 10px; }
.soutui-custom-modal .scm-pick-t { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.soutui-custom-modal .scm-pick-s { display: block; font-size: 11px; font-weight: 400; margin-top: 3px; line-height: 1.35; color: rgba(255, 255, 255, 0.82); }
/* 「清理无效素材」是删东西的红按钮，副标题说的就是「要删什么」——比普通副标题更大更亮，别弱化。 */
.soutui-custom-modal .scm-menu-clean .scm-pick-s { font-size: 12px; color: rgba(255, 255, 255, 0.95); }
/* 清理无效素材·条件表单（2026-09-14 条件可调；老板点名「排版乱」后改两列对齐）：
   左列标签定宽 60px，右列控件全从同一条竖线起；数字框同宽、每行同高 26px；字号一律 12。
   ⚠ 数字框要写 flex-basis：上面 .scm-row-input 基础规则是 flex:0 0 40px，光改 width 在 flex 行里压不住它。 */
/* 点名框和色块展开后允许整窗滚动，保证小视口里也能点到底部按钮。 */
.soutui-custom-modal.scm-clean-modal { max-height: calc(100vh - 32px); overflow-y: auto; }
/* ID 区和上架时间区跟着右列走：左列标签定宽 60px，都从条件行控件那条竖线起（老板 09-14 立的两列对齐规矩）。 */
.soutui-custom-modal .scm-clean-ids-wrap, .soutui-custom-modal .scm-clean-shelf-wrap, .soutui-custom-modal .scm-clean-tag-wrap { margin-left: 60px; }
.soutui-custom-modal .scm-clean-tag-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--ivory); }
.soutui-custom-modal .scm-clean-tag-wrap[hidden], .soutui-custom-modal .scm-clean-days-hint[hidden] { display: none; }
.soutui-custom-modal .scm-clean-tag-wrap .scm-date-hint { margin: 2px 0 0; }
.soutui-custom-modal .scm-clean-days-hint { margin: -4px 0 0 60px; }
.soutui-custom-modal .scm-clean-form { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.soutui-custom-modal .scm-clean-row { display: flex; align-items: center; min-height: 26px; font-size: 12px; color: var(--ivory); }
.soutui-custom-modal .scm-clean-k { flex: 0 0 60px; color: rgba(239, 235, 227, 0.75); }
.soutui-custom-modal .scm-clean-v { display: flex; align-items: center; gap: 6px; }
.soutui-custom-modal .scm-clean-v .scm-row-input { flex: 0 0 56px; width: 56px; height: 26px; padding: 0 4px 0 8px; font-size: 12px; }
.soutui-custom-modal .scm-clean-v .scm-unit { font-size: 12px; }
.soutui-custom-modal .scm-clean-chk { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; cursor: pointer; }
.soutui-custom-modal .scm-clean-chk input { margin: 0; width: 14px; height: 14px; accent-color: var(--brand); }
/* 老板 2026-09-23：第三项会把选项文字挤成两行；只让范围控件整项换行，不扩大共用弹层。 */
.soutui-custom-modal .scm-clean-scope { flex-wrap: wrap; }
.soutui-custom-modal .scm-clean-scope .scm-clean-chk { flex-shrink: 0; }
.soutui-custom-modal .scm-clean-v .scm-row-input:disabled { opacity: 0.4; cursor: not-allowed; }
/* 校验错误贴在按钮上方；空着不占高（同 .mv-err 的做法） */
.soutui-custom-modal .scm-clean-err { margin: 0 0 8px; }
.soutui-custom-modal .scm-clean-err:empty { display: none; }
.soutui-custom-modal .scm-clean-dry { background: rgba(239, 235, 227, 0.08); color: var(--ivory); }
.soutui-custom-modal .scm-clean-dry:hover { background: rgba(239, 235, 227, 0.14); }
/* F88 板块选择框（2026-08-26）：两个按钮都是 .scm-start 橙底，光靠颜色分不出「上次选的是哪个」，
   加一圈象牙白内描边做参考提示——只是提示，不代表默认动作，不点按钮什么都不会跑。 */
.soutui-custom-modal .f88-sec-last { box-shadow: 0 0 0 2px rgba(239, 235, 227, 0.85) inset; }
/* 主图视频弹窗：解析行/提示行留出固定高度，避免内容一变整个弹窗跳动 */
.soutui-custom-modal .mv-parse { min-height: 14px; }
.soutui-custom-modal .mv-hint { min-height: 14px; }
/* 开跑失败：贴着按钮 + 危险色（.scm-danger 已是 #FF6B5A/6.1:1）。空着不占高，免得平时弹窗虚胖。 */
.soutui-custom-modal .mv-err { margin: 0 0 6px; }
.soutui-custom-modal .mv-err:empty { display: none; }
/* 提示词两行：润色回的词常有 20+ 字，单行看不全＝白润。
   ⚠ 必须写 height 不能只写 min-height —— 上面 .soutui-custom-modal textarea 基础规则是
   **固定 height:120px**（给上面那个多行 ID 框用的），min-height 压不住它，会把两颗按钮
   顶出弹窗可视区（渲染出来才看见的，改这条前先看图）。
   54px = 2 行(12px×1.5=36) + 上下 padding 16 + 边框 2。 */
.soutui-custom-modal textarea.mv-prompt { height: 54px; min-height: 54px; resize: none; }
/* ✦ AI 润色按钮必须显式上色：.scm-btn 只写了排版没写 background/color，单挂它会掉进浏览器默认按钮皮
   （实测 rgb(239,239,239) 白底黑字）——白底压 #1B1B1F 弹窗比橙色主按钮还抢眼，主次当场反过来。
   本仓其他地方的 .scm-btn 都配着 .scm-start / .scm-cancel，这是第一个裸用的。
   配色沿用弹窗里已有的「小号次要动作」款式 .scm-bulk-apply（橙描边幽灵按钮），不另造一套。 */
.soutui-custom-modal .mv-polish {
  background: rgba(247, 107, 28, 0.12);
  color: var(--brand);
  border: 1px solid rgba(247, 107, 28, 0.35);
}
.soutui-custom-modal .mv-polish:hover { background: rgba(247, 107, 28, 0.2); }
.soutui-custom-modal .mv-polish:disabled { opacity: 0.5; cursor: not-allowed; }
/* ⚠ 教训（2026-08-26 老板截图报的，按钮已于 08-28 拆除，教训留着）：
   `.scm-btn .scm-pick` 裸用时，.scm-btn 只写排版不写 background/color，会掉进浏览器
   默认按钮皮（浅灰底）；而 .scm-pick-s 的颜色写死是白 82%（为橙底/深底设计的）
   → 浅灰底压白字，副标题当场消失。
   **加任何带 .scm-pick-s 的按钮，必须同时给按钮显式上色，两者是一对**（照抄上面 .mv-polish）。*/
/* 清理确认框的判据清单：原来 inline 写死 color:#444，压在深色弹窗 #1B1B1F 上对比度只有 1.76:1
   （可读线 4.5:1）——这几条是顾客决定删不删的唯一依据，却是全框最看不清的字。象牙白 75% = 8.6:1。 */
.soutui-custom-modal .scm-cond { margin: 8px 0 12px 18px; font-size: 13px; line-height: 1.7; color: rgba(239, 235, 227, 0.75); }
/* 危险警告：#c0392b 在深色底上只有 3.2:1（红按钮当色块用没问题，当文字读就偏暗）。亮红 6.1:1。 */
.soutui-custom-modal .scm-danger { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #FF6B5A; line-height: 1.5; }

/* === Primary 挂机模式 / 重置记录 / 素材管理页 === */
/* v3.2.60：挂机模式副标（如「运行中 · 1/3：搜推视频」「9 个模块 · 每天 09:00」）可能比较长，给它最宽。
   v4.0.x：右侧拆成「重置记录」+「素材管理页」两个窄按钮并排（3fr / 1fr / 1fr）。 */
.primary-btn-group {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

/* v4.0.x：重置记录改窄按钮，与素材管理页并排（描边款——破坏性动作，克制提示，点击逻辑不变仍是全量重置） */
.btn-reset-ghost {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: 1px solid rgba(239, 235, 227, 0.14);
  color: var(--stone);
  border-radius: 11px;
  font-family: var(--disp);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.2;
  padding: 8px 2px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s cubic-bezier(0.32, 0.72, 0, 1);
}
.btn-reset-ghost .reset-ic { font-size: 15px; line-height: 1; }
.btn-reset-ghost:hover {
  background: rgba(239, 235, 227, 0.05);
  border-color: rgba(239, 235, 227, 0.28);
  color: var(--ivory);
}
.btn-reset-ghost:active {
  transform: scale(0.96);
  background: rgba(239, 235, 227, 0.08);
}

/* 窄版素材管理页：字号缩小、两行「素材／管理页」 */
.btn-nav-narrow {
  font-size: 11px;
  line-height: 1.2;
  padding: 8px 2px;
}

.ink-glass {
  width: 100%;
  padding: 12px 0;
  background: var(--brand);   /* 橙=动作：主键实底品牌橙白字（金让位给等级） */
  color: #fff;
  border: none;
  border-radius: 11px;
  font-family: var(--disp);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition:
    background 0.18s ease,
    transform 0.12s cubic-bezier(0.32, 0.72, 0, 1);
}
.ink-glass:hover { background: #ff7d33; }
.ink-glass .btn-mode-hint { color: rgba(255, 255, 255, 0.78); }   /* 橙底主键副标用浅白字 */
.ink-glass-secondary .btn-mode-hint { color: rgba(255, 255, 255, 0.55); }   /* 次级面板底仍用浅字 */
.ink-glass:active {
  transform: scale(0.985);
  background: #e05f12;
  transition-duration: 0.06s;
}
.ink-glass:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  background: var(--brand);
}

/* Secondary 进入素材管理页 */
.ink-glass-secondary {
  background: var(--panel2);
  color: var(--ivory);
  font-weight: 400;
  font-size: 12px;
}
.ink-glass-secondary:hover { background: #232328; }
.ink-glass-secondary:active {
  background: #26262b;
  transform: scale(0.985);
}

/* === 工具栏：重置已处理记录 === */
.tools-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.btn-link {
  background: transparent;
  border: none;
  color: var(--stone);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.18s ease;
}
.btn-link:hover { color: var(--ivory); }
.btn-link:active { color: var(--stone); }

/* === 状态面板 === */
.status-panel,
.glass-inset {
  background: var(--panel2);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 8px;
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline);
  flex-shrink: 0; /* v3.2.42: 跟 controlGroup 一起防止被 overflow:hidden 剪掉 */
}

.status-text {
  font-size: 12px;
  color: var(--ivory);
  font-weight: 500;
}
.status-text a {
  color: #ff8a4c;
  text-decoration: none;
}
.status-text a:hover { text-decoration: underline; }

.progress-text {
  color: var(--stone);
  font-size: 11px;
  margin-top: 2px;
}
.stats-text {
  color: var(--ok);
  font-size: 11px;
  margin-top: 2px;
  font-weight: 500;
}
/* 统计行塞的是报错时穿红（lastError / 连续失败超阈值 / msg.error）。
   ⚠ 只能靠 setStats 一处开关，散着 toggle 必然粘住不清 —— 见 popup.js setStats */
.stats-text.stats-bad { color: var(--bad); }

/* === 暂停 / 停止按钮 === */
/* v3.2.42: flex-shrink:0 防止 popup 高度紧张时被 overflow:hidden 剪掉 */
.control-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.btn-control-pause,
.btn-control-stop {
  padding: 9px 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.12s cubic-bezier(0.32, 0.72, 0, 1);
}
.btn-control-pause {
  background: var(--panel2);
  color: var(--ivory);
}
.btn-control-pause:hover { background: #232328; }
.btn-control-pause:active { transform: scale(0.97); background: #26262b; }

.btn-control-stop {
  background: rgba(210, 105, 94, 0.18);
  color: #e0857a;
}
.btn-control-stop:hover { background: rgba(210, 105, 94, 0.28); }
.btn-control-stop:active { transform: scale(0.97); background: rgba(210, 105, 94, 0.38); }

/* === 日志区域 === */
.log-area {
  background: var(--inset);
  color: rgba(239, 235, 227, 0.78);
  border-radius: 11px;
  padding: 10px 12px;
  /* 2026-08-28：原来是 'SF Mono'，它【没有中文字形】，中文会静默回落到系统字体，
     于是中英基线和字宽全对不齐。正文改走系统中文字体，只有时间戳留等宽（见 .lg-t）。 */
  font-family: -apple-system, 'SF Pro Text', 'PingFang SC', 'Helvetica Neue', sans-serif;
  font-size: 11px;
  line-height: 1.6;
  flex: 1 1 0;
  min-height: 60px; /* v3.2.42: 140→60,给 controlGroup 让出空间避免暂停按钮被剪 */
  overflow-y: auto;
  display: none;
  border: 1px solid var(--hairline);
}
.log-area.active { display: block; }
/* 滚到底时给吸底的「复制日志」留出空位。
   ⚠ 不能用 padding-bottom：闲置态日志壳会被功能区压成 0 高，而 padding 仍把盒子撑起来
     （border-box 下最小高 = padding 之和），日志区就溢出壳、按钮浮到行上面。
     伪元素只增加【可滚内容】高度，不增加盒子最小高度 —— 实测溢出 41px → 21px（回到改动前）。*/
.log-area.active::after { content: ''; display: block; height: 22px; }

/* === 日志行三段式（2026-08-28）：时间戳 / 模块前缀 / 正文 ===
   左边 2px 色条编码语义 —— 顾客扫一眼就知道哪几行是错的，不用逐行读 emoji。
   ⚠ 颜色一律走色板 token：写死十六进制就会像撞码日志那样飘出 antd 红。 */
.lg { display: flex; gap: 6px; padding: 1px 0 1px 6px; border-left: 2px solid transparent; }
.lg-t {                                   /* 时间戳：降到弱色、保持等宽，左边缘才不会跳 */
  flex: none; color: var(--faint);
  font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
  font-variant-numeric: tabular-nums;
}
.lg-p { flex: none; color: var(--faint); }   /* 模块前缀：降灰不删——信息还在，只是不再抢眼 */
.lg-m { flex: 1; min-width: 0; color: rgba(239, 235, 227, 0.80); }
.lg-ok   { border-left-color: var(--ok); }    .lg-ok   .lg-m { color: #A8C88E; }
.lg-bad  { border-left-color: var(--bad); }   .lg-bad  .lg-m { color: #E0857A; }
.lg-warn { border-left-color: var(--skip); }  .lg-warn .lg-m { color: var(--skip); }
.lg-run  { border-left-color: var(--brand); } .lg-run  .lg-m { color: var(--ivory); }
.lg-dim  .lg-m { color: var(--faint); }
/* 恢复历史的分隔线：不要色条也不要三段式，整行居中 */
.lg-plain { display: block; border-left: none; padding-left: 0; text-align: center;
  opacity: .55; margin: 6px 0; }

.log-area::-webkit-scrollbar { width: 3px; }
.log-area::-webkit-scrollbar-thumb {
  background: rgba(239, 235, 227, 0.18);
  border-radius: 2px;
}

/* === AI 视频「进度日志」分栏 + 逐商品进度面板（仅 AI 视频显示） === */
/* 页签双端统一：得意黑 + 象牙白底线（同网页 mod-tab 规则），不再走蓝色块 */
.log-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.log-tab {
  flex: 1; padding: 6px 0 7px; font-size: 11px; cursor: pointer;
  color: var(--stone);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-family: var(--disp);
  letter-spacing: 0.06em;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.log-tab.active { color: var(--ivory); background: transparent; border-bottom-color: var(--ivory); }

.func-toggle {
  padding: 7px 0; font-size: 11px; cursor: pointer; text-align: center;
  color: var(--stone);
  background: var(--panel2);
  border: 1px solid var(--hairline);
  border-radius: 8px; margin-bottom: 8px;
}
.func-toggle:hover { color: var(--ivory); background: #232328; }
/* 2026-08-04 顾客真机死局的物理保底：功能按钮区必须可压缩 + 自己滚。
   面板是 .glass-panel{height:calc(100vh-16px)} 的 flex 列、body 又是 overflow:hidden，
   而 #funcArea 在 DOM 里排在 statusPanel/controlGroup 【前面】。flex 项默认 min-height:auto
   = 它压不动 → 窗口一矮，被挤出屏幕的必然是后面的「停止/暂停」，用户按钮全灰还够不着出口
   （statusPanel/controlGroup 那两行 flex-shrink:0 救不了：溢出是压不动的兄弟节点造成的）。
   给它 min-height:0 + 自己的滚动条：宁可按钮区滚，控制键永远在。
   安全性：funcArea 内没有任何绝对定位的浮层（角标 soutui-custom-badge/reco-badge 都在按钮盒内，
   弹窗一律 document.body.appendChild），加 overflow 不会剪掉东西。 */
#funcArea { min-height: 0; overflow-y: auto; }
#funcArea.collapsed { display: none; }
.progress-panel {
  background: var(--inset); border-radius: 11px; padding: 8px 10px;
  font-size: 11px; line-height: 1.5; flex: 1 1 0; min-height: 60px;
  overflow-y: auto; border: 1px solid var(--hairline);
}
.progress-panel::-webkit-scrollbar { width: 3px; }
.progress-panel::-webkit-scrollbar-thumb { background: rgba(239, 235, 227, 0.18); border-radius: 2px; }
.pp-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 4px 2px; border-bottom: 0.5px solid rgba(239, 235, 227, 0.05);
}
.pp-row:last-child { border-bottom: none; }
.pp-ids { color: rgba(239, 235, 227, 0.72); font-family: 'SF Mono', ui-monospace, 'Menlo', monospace; font-size: 10px; }
.pp-ids .pp-task { color: var(--faint); }
.pp-status { white-space: nowrap; font-size: 11px; }
/* 状态四色去 antd 化：进行=橙 完成=绿 失败=红 跳过=琥珀（与网页语义色同源） */
.pp-status.processing, .pp-status.generating { color: var(--brand); }
.pp-status.published { color: var(--ok); }
.pp-status.failed { color: var(--bad); }
.pp-status.skipped { color: var(--skip); }
.pp-empty { color: var(--faint); text-align: center; padding: 16px 0; }
/* 香蕉 AI 生图逐商品多阶段进度表 */
.progress-panel { overflow-x: auto; }
.bpp-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.bpp-table th { color: var(--stone); font-weight: 500; text-align: left; padding: 4px 5px; border-bottom: 1px solid rgba(239, 235, 227, 0.14); white-space: nowrap; }
.bpp-table td { padding: 4px 5px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.bpp-id { color: rgba(239, 235, 227, 0.85); font-family: 'SF Mono', ui-monospace, 'Menlo', monospace; }
/* 进度表格子限宽：失败原因太长会把整表撑出横滚(td 是 nowrap)。全文见 td.title 悬停。 */
.bpp-cell-inner { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpp-cell.bpp-wait { color: var(--faint); }
.bpp-cell.bpp-doing { color: var(--brand); }
.bpp-cell.bpp-done { color: var(--ok); }
.bpp-cell.bpp-fail { color: var(--bad); }
.bpp-cell.bpp-partial { color: var(--skip); }
.bpp-cell.bpp-skip { color: var(--skip); }   /* 2026-08-28 补：跳过≠失败也≠没开始，之前没这个 class，只能借红或灰 */
.f88-progress-summary {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(239, 235, 227, 0.12);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  white-space: normal;
  line-height: 1.6;
}
.f88-kmt-fee { margin-top: 3px; max-width: 170px; white-space: normal; color: var(--stone); font: 10px/1.5 system-ui, sans-serif; }
.f88-progress-table th,
.f88-progress-table td { padding: 6px 7px; }
.f88-progress-table .bpp-cell { font-variant-numeric: tabular-nums; }

/* === 右上角设置齿轮 === */
/* v3.2.61：放大 + 加底色提升存在感（24px / 16px → 36px / 22px，加常驻浅底） */
.settings-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 11px;
  background: var(--panel2);
  color: var(--stone);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition:
    color 0.18s ease,
    transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
    background 0.18s ease;
}
.settings-corner:hover {
  color: var(--ivory);
  transform: rotate(60deg);
  background: #26262b;
}
.settings-corner:active {
  transform: rotate(60deg) scale(0.95);
  background: #2a2a30;
}

/* === 平台余额胶囊（右上角齿轮左边）=== */
/* 香蕉AI生图扣平台账户点数；这里实时显余额，也是「有没有打通」的指示灯 */
.balance-pill {
  position: absolute;
  top: 14px;
  right: 54px;            /* 齿轮 right:12 宽36 → 左边留 6px 间隙 */
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(247, 107, 28, 0.4);
  border-radius: 16px;
  background: rgba(247, 107, 28, 0.12);
  color: #ff9a5c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.12s ease;
}
.balance-pill:hover { background: rgba(247, 107, 28, 0.2); }
.balance-pill:active { transform: scale(0.95); }
.balance-pill.noauth {   /* 未登录：橙色高亮提示去登录（=没打通） */
  border-color: rgba(247, 107, 28, 0.6);
  background: rgba(247, 107, 28, 0.16);
  color: #ff8a4c;
}
.balance-pill.lowbal {   /* 余额为0/不足：偏红警示 */
  border-color: rgba(240, 90, 90, 0.6);
  background: rgba(240, 90, 90, 0.16);
  color: #ff7a7a;
}

/* 光合日计数胶囊(.guanghe-pill/.gh-cap)整族已于 2026-08-07 随胶囊一并删除，无残留引用 */

/* === 账户状态胶囊：任务额度 | 本机服务 ===
   两侧分别展示可用额度与本机能力状态；旧类名仅用于兼容现有脚本查询。
   ⚠ 不用 :has()——兼容旧版 Chromium；只剩一半时由 popup.js 添加 .solo。 */
.acct-pill {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(239, 235, 227, 0.14);
}
.acct-pill .balance-pill,
.acct-pill .max-state-pill { height: auto; border: 0; border-radius: 0; }
.acct-pill .balance-pill { gap: 3px; padding: 0 8px; }
.acct-pill .balance-pill:active,
.acct-pill .max-state-pill:active { transform: none; filter: brightness(0.9); }
.balance-pill .bp-label { margin-right: 2px; }
.balance-pill.noauth .bp-label { display: none; }   /* 未登录时整半只写「登录」 */
.max-state-pill {
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #D8B36C;
  background: rgba(200, 163, 95, 0.10);
  transition: background 0.18s ease, filter 0.12s ease;
}
.acct-pill .max-state-pill { border-left: 1px solid rgba(239, 235, 227, 0.14); }
.acct-pill.solo .max-state-pill { border-left: 0; }
.max-state-pill:hover { filter: brightness(1.15); }
.max-state-pill .mx-b {
  display: inline-block;
  padding: 1px 5px;
  font-family: var(--disp);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #241B0E;
  background: linear-gradient(135deg, #D8B36C, #C8A35F);
  border-radius: 4px;
}
.max-state-pill.off { background: transparent; color: var(--stone); }                    /* 待检查：弱化显示 */
.max-state-pill.soon { background: rgba(216, 179, 108, 0.20); color: #f0d397; }          /* 7 天内到期 */
.max-state-pill.expired { background: rgba(210, 105, 94, 0.16); color: #e58a80; }        /* 已到期 */
/* 放不下就自动收（popup.js fitAcctPill 实际量过再打级别，不按固定宽度猜——余额位数、「小窗」按钮、
   副标题长短都会变）：绝不压左边的标题文字，也绝不把下面的功能按钮挤动。
   fit-1 去掉「积分」两个字 → fit-2 再去掉 MAX 金标（靠金/红颜色认）→ fit-3 只留积分那一半 */
.acct-pill.fit-1 .bp-label,
.acct-pill.fit-2 .bp-label,
.acct-pill.fit-3 .bp-label { display: none; }
.acct-pill.fit-2 .max-state-pill .mx-b { display: none; }
.acct-pill.fit-3 .max-state-pill { display: none !important; }

/* 旧状态弹层账户行兼容样式：分别展示额度与本机能力 */
.upgrade-modal .um-acct { border: 1px solid var(--hairline); border-radius: 12px; margin: 0 0 12px; overflow: hidden; }
.upgrade-modal .um-acct-row { display: flex; align-items: center; gap: 8px; padding: 9px 11px; font-size: 12px; line-height: 1.3; }
.upgrade-modal .um-acct-row + .um-acct-row { border-top: 1px solid var(--hairline); }
.upgrade-modal .um-acct-row .k { flex: 0 0 52px; color: var(--stone); display: inline-flex; align-items: center; }
.upgrade-modal .um-acct-row .v { font-weight: 700; color: var(--ivory); white-space: nowrap; }
.upgrade-modal .um-acct-row .s { margin-left: auto; font-size: 11px; color: var(--stone); text-align: right; }
.upgrade-modal .um-acct-row.ok .s { color: var(--ok); }
.upgrade-modal .um-acct-row.no .v,
.upgrade-modal .um-acct-row.no .s { color: #e58a80; }

/* === 右上角动作区：更新 / 余额 / 齿轮 横排（flex 自适应，不写死偏移，余额胶囊宽度变化也不飘） === */
.corner-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* 容器接管定位：取消两个子按钮原来的 absolute 偏移，改走 flex 排布 */
.corner-actions .settings-corner,
.corner-actions .balance-pill {
  position: static;
  top: auto;
  right: auto;
}

/* === 有新版小按钮（默认隐藏，检测到新版才显示；橙色，跟品牌一致） === */
.update-pill {
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(247, 107, 28, 0.6);
  border-radius: 16px;
  background: rgba(247, 107, 28, 0.15);
  color: #ff8a4c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
}
.update-pill:hover { background: rgba(247, 107, 28, 0.24); border-color: rgba(247, 107, 28, 0.8); }
.update-pill:active { transform: scale(0.95); }
/* 「有新版」前的脉冲小橙点（方案3：轻轻呼吸，吸引注意但不吵） */
.update-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff7a33;
  flex: 0 0 auto;
  animation: update-dot-pulse 1.9s ease-out infinite;
}
@keyframes update-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 122, 51, 0.55); }
  70%  { box-shadow: 0 0 0 5px rgba(255, 122, 51, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 51, 0); }
}

/* 点「有新版」下载后的一行重载指引 */
.update-hint {
  margin: 2px 0 6px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}
.update-hint code {
  font-family: ui-monospace, Menlo, monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 0 4px;
  border-radius: 4px;
}

/* === 「有新版」hover 更新日志面板(自绘;有日志数据才启用) === */
.update-panel {
  position: absolute;
  top: 48px;
  right: 12px;
  z-index: 30;
  width: min(300px, calc(100vw - 44px));
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(247, 107, 28, 0.35);
  background: rgba(15, 15, 17, 0.97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}
.update-panel .up-header { font-weight: 600; color: #ff8a4c; }
.update-panel .up-entry { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.update-panel .up-ver { font-weight: 600; color: rgba(255, 255, 255, 0.92); }
.update-panel .up-date { color: rgba(255, 255, 255, 0.45); font-weight: 400; margin-left: 6px; }
.update-panel .up-note { color: rgba(255, 255, 255, 0.75); }
.update-panel .up-more { margin-top: 6px; color: rgba(255, 255, 255, 0.45); }

/* === 余额不足横幅（香蕉批次开跑前限量提示）=== */
.recharge-banner {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(247, 107, 28, 0.14);
  border: 1px solid rgba(247, 107, 28, 0.4);
  color: #ffd9bf;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.recharge-banner-btn {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 12px;
  border: none;
  border-radius: 8px;
  background: #f76b1c;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.recharge-banner-btn:hover { background: #ff7d33; }
.recharge-banner-btn:active { transform: scale(0.96); }

/* ============================================================
   弹窗 modals —— 状态提示与同意书兼容层
   深色版本，背景遮罩黑色加重
   ============================================================ */
.upgrade-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in 0.18s ease;
}
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* v3.2.70 hover popover 模式:透明遮罩 + 仅 modal 卡片可交互 */
.upgrade-modal-bg.upgrade-popover-bg {
  background: transparent;
  pointer-events: none;
  /* 卡片自身仍可点击/hover */
}
.upgrade-modal-bg.upgrade-popover-bg .upgrade-modal {
  pointer-events: auto;
}

.upgrade-modal {
  background: var(--panel2);
  padding: 18px 16px 16px;
  border-radius: 18px;
  width: min(316px, calc(100vw - 24px));
  text-align: left;
  position: relative;
  border: 1px solid var(--hairline);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: var(--ivory);
}
/* 旧状态弹层布局兼容：功能标签、两颗同级主钮、次要操作与右上关闭按钮 */
.upgrade-modal .um-x { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: none; border-radius: 8px;
  background: rgba(239,235,227,.06); color: var(--stone); font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit; }
.upgrade-modal .um-x:hover { background: rgba(239,235,227,.12); color: var(--ivory); }
.upgrade-modal .um-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-right: 30px; }
.upgrade-modal h3 { font-family: var(--disp); font-size: 18px; font-weight: 400; letter-spacing: 0.03em; margin: 0; line-height: 1.2; color: var(--ivory); }
.upgrade-modal .um-badge { display: inline-block; padding: 2px 6px; font-size: 9px; font-weight: 700; letter-spacing: .06em;
  color: #241B0E; background: linear-gradient(135deg, #D8B36C, #C8A35F); border-radius: 4px; }
.upgrade-modal .um-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding: 0; }
.upgrade-modal .um-feats li { font-size: 11px; line-height: 1; letter-spacing: 0; color: var(--ivory); padding: 6px 6px; border-radius: 999px;
  border: 1px solid var(--hairline); background: rgba(239,235,227,.04); }
.upgrade-modal .um-actions { display: flex; gap: 8px; }
.upgrade-modal .um-actions > button { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; border: none; border-radius: 10px; cursor: pointer; font-family: inherit; line-height: 1.2; }
.upgrade-modal .um-actions b { font-size: 13px; font-weight: 600; }
.upgrade-modal .um-actions small { font-size: 10px; font-weight: 400; opacity: .9; white-space: normal; text-align: center; }
.upgrade-modal .um-actions small code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 10px; }
.upgrade-modal .um-copy { display: inline-block; margin-left: 2px; padding: 0 1px; border-bottom: 1px solid currentColor; font-weight: 600; cursor: pointer; }
.upgrade-modal .um-buy { background: var(--brand); color: #fff; }
.upgrade-modal .um-buy:hover { background: #ff7d33; }
.upgrade-modal .um-trial-btn { position: relative; background: linear-gradient(135deg, #D8B36C, #C8A35F); color: #241B0E; }
.upgrade-modal .um-trial-btn:hover { background: linear-gradient(135deg, #E2BF7C, #D2AD68); }
/* 旧版悬浮媒体弹层兼容样式；当前界面不展示该节点 */
.upgrade-modal .trial-qr-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) scale(0.9);
  width: 200px;
  height: 200px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  background: #fff;
  padding: 6px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 10000;
}
.upgrade-modal .um-trial-btn:hover .trial-qr-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.upgrade-modal .um-activate { display: block; width: 100%; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--hairline); border-radius: 10px;
  background: transparent; color: var(--ivory); font-size: 12px; cursor: pointer; font-family: inherit; }
.upgrade-modal .um-activate:hover { border-color: rgba(239,235,227,.22); background: rgba(239,235,227,.04); }

/* ============================================================
   光合自动发布区 (Chunk 6)
   ============================================================ */
.guanghe-section {
  margin-top: 4px;
  margin-bottom: 12px;
  padding: 10px;
  background: var(--ink);
  border-radius: 11px;
  border: 1px solid var(--hairline);
}

/* v3.1.8：上架日期 row 嵌入按钮内，再缩小避免换行 */
.guanghe-btn-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.guanghe-btn-date-row .guanghe-radio {
  font-size: 9px;
  gap: 2px;
}
.guanghe-btn-date-row input[type="radio"] {
  width: 10px;
  height: 10px;
  margin: 0;
}
.guanghe-date-label {
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.guanghe-radio {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
}
.guanghe-radio input[type="radio"] {
  cursor: pointer;
  accent-color: var(--brand);
}

.guanghe-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  cursor: pointer;  /* 提示整框可点 */
}
.guanghe-date-range:has(input:disabled) {
  cursor: not-allowed;
}
.guanghe-date-sep {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  flex-shrink: 0;
}

.guanghe-date-input {
  background: var(--panel2);
  border: 1px solid rgba(239, 235, 227, 0.12);
  color: var(--ivory);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: inherit;
  font-size: 11px;
  flex: 1;
  min-width: 0;
  cursor: pointer;  /* 提示点了弹日历 */
  caret-color: transparent;  /* 隐藏闪烁光标 */
}
.guanghe-date-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.guanghe-candidate-list {
  max-height: 200px;
  overflow-y: auto;
  margin: 8px 0;
  padding: 6px;
  background: var(--panel2);
  border-radius: 6px;
  border: 1px solid var(--hairline);
}
.guanghe-candidate-list::-webkit-scrollbar { width: 3px; }
.guanghe-candidate-list::-webkit-scrollbar-thumb {
  background: rgba(239, 235, 227, 0.18);
  border-radius: 2px;
}

.guanghe-candidate-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}
.guanghe-candidate-item input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--brand);
  flex: 0 0 auto;
}
.guanghe-candidate-item span {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.guanghe-candidate-item .reason {
  flex: 0 0 auto;
  color: #ff9f0a;
  font-size: 10px;
}
.guanghe-candidate-item.disabled {
  opacity: 0.45;
}
.guanghe-candidate-item.guanghe-select-all {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(6px);
}

.guanghe-progress {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--panel2);
  border-radius: 6px;
  font-size: 11px;
  color: rgba(239, 235, 227, 0.85);
  border: 1px solid var(--hairline);
  line-height: 1.45;
}

/* 首次启动告警 banner（v1.1 减伤策略） */
.guanghe-warning-banner {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(255, 159, 10, 0.12);
  border: 0.5px solid rgba(255, 159, 10, 0.35);
  border-radius: 8px;
  font-size: 11px;
  color: rgba(255, 220, 180, 0.92);
  line-height: 1.55;
}
.guanghe-warning-banner .warning-title {
  font-weight: 600;
  color: #ff9f0a;
  margin-bottom: 6px;
  display: block;
}
.guanghe-warning-banner ul {
  margin: 4px 0 8px 16px;
  padding: 0;
}
.guanghe-warning-banner li {
  list-style: disc;
  margin-bottom: 2px;
}
.guanghe-warning-banner .warning-ack-btn {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: none;
  border-radius: 6px;
  background: rgba(255, 159, 10, 0.22);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease;
}
.guanghe-warning-banner .warning-ack-btn:hover {
  background: rgba(255, 159, 10, 0.36);
}
.guanghe-warning-banner .warning-ack-btn:active {
  transform: scale(0.985);
}



/* === 日志角落「复制日志」小胶囊：仅日志页签选中时出现，吸右上角不随内容滚走 === */
.log-wrap {
  position: relative;
  flex: 1 1 0;          /* 修复:包壳切断了 glass-panel→log-area 的 flex 链,日志只剩半截(2026-07-02) */
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.log-wrap .log-area { flex: 1 1 0; min-height: 0; }
.log-wrap .progress-panel { flex: 1 1 0; min-height: 0; }   /* 进度日志与常规日志共用拉满区(2026-07-02:原在壳外,切进度时壳空占位顶不上去) */
.log-copy-btn {
  display: none;
  position: absolute;
  /* 2026-08-28：原来吸顶(top:6px)，会永远盖住日志区【可见的第一行】右半截（渲染实证）。
     改吸底 + .log-area 底部留白 30px —— 两边都不压字。 */
  bottom: 8px;
  right: 10px;
  z-index: 2;
  padding: 3px 9px;
  font-family: inherit;
  font-size: 11px;
  color: var(--stone);
  background: var(--panel2);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.log-copy-btn:hover { background: #26262b; color: var(--ivory); }
#logArea.active:not([style*="none"]) ~ .log-copy-btn { display: block; }   /* 只在常规日志视图显示;切进度日志(logArea被置none)即隐藏 */


/* === 小窗胶囊（2026-08-05）：角落常驻，任务跑起来功能区折叠也照样在。
   ⚠ 不复用 .settings-corner —— 那个 hover 会旋转 60°（齿轮专属动效），
   带文字的按钮转起来很怪。进小窗后加 .active 高亮，让顾客看得出当前状态。 === */
.miniwin-pill {
  height: 36px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--panel2);
  color: var(--stone);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.miniwin-pill:hover { color: var(--ivory); background: #26262b; }
.miniwin-pill:active { transform: scale(0.96); }
.miniwin-pill.active {
  color: #ff8a4c;
  border-color: rgba(247, 107, 28, 0.55);
  background: rgba(247, 107, 28, 0.12);
}

/* === 「有新版」通栏（2026-08-05）：原来是右上角一颗小胶囊，顾客常看不见。
   横幅醒目得多，也把角落腾了出来。族系跟 .recharge-banner 一致，颜色沿用更新橙。 === */
.update-banner {
  width: 100%;
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(247, 107, 28, 0.5);
  background: rgba(247, 107, 28, 0.14);
  color: #ff8a4c;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, border-color .15s;
}
.update-banner:hover { background: rgba(247, 107, 28, 0.2); border-color: rgba(247, 107, 28, 0.7); }
.update-banner:active { transform: scale(0.995); }
.update-banner .ub-text { flex: 1; }
.update-banner .ub-go {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(247, 107, 28, 0.9);
  color: #1A0F06;
  font-size: 11.5px;
  font-weight: 600;
}
/* 悬停的更新日志面板原来挂在右上角胶囊下面；触发源搬到标题下方了，面板跟着落到横幅底下 */
.update-panel { left: 14px; right: 14px; width: auto; }   /* top 由 _showUpdatePanel 按横幅实际位置算 */

/* 复刻模式弹层（2026-09-15）：复刻图行 + 报价行 */
.soutui-custom-modal .scm-rep-label { margin: 10px 0 6px; font-size: 12px; color: rgba(239, 235, 227, 0.75); }
.soutui-custom-modal .scm-rep-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 156px; overflow-y: auto; }
.soutui-custom-modal .scm-rep-cell { width: 48px; height: 48px; border-radius: 8px; position: relative; overflow: hidden; box-sizing: border-box; background: #0F0F11; border: 1px solid rgba(239, 235, 227, 0.14); }
.soutui-custom-modal .scm-rep-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soutui-custom-modal .scm-rep-cell button { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; line-height: 14px; text-align: center; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; font-size: 12px; padding: 0; }
.soutui-custom-modal .scm-rep-add { border: 1.5px dashed rgba(239, 235, 227, 0.25); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #aaa; }
.soutui-custom-modal .scm-rep-quote { margin: 8px 0 4px; font-size: 12px; color: var(--brand); }
/* 复刻部位单选（2026-10-01）：药丸式——原生圆点在深色弹层里突兀（老板 10-01「太丑」）。input 藏起来留着 change 事件与键盘可达，span 当药丸 */
.soutui-custom-modal .scm-rep-kind { display: flex; flex-wrap: wrap; gap: 5px; margin: 3px 0 6px; }
.soutui-custom-modal .scm-rep-kind label { position: relative; cursor: pointer; }
.soutui-custom-modal .scm-rep-kind input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
/* 尺寸对齐上面的商品 ID 色块（10.5px / 1px 6px）：老板 10-01 嫌第一版 12px + 4px 12px「字号和按钮太大」 */
.soutui-custom-modal .scm-rep-kind span { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; line-height: 1.5; border: 1px solid rgba(239, 235, 227, 0.22); color: rgba(239, 235, 227, 0.75); background: rgba(255, 255, 255, 0.03); transition: border-color .12s, color .12s; }
.soutui-custom-modal .scm-rep-kind label:hover span { border-color: rgba(239, 235, 227, 0.45); }
.soutui-custom-modal .scm-rep-kind input:checked + span { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.soutui-custom-modal .scm-rep-kind input:focus-visible + span { outline: 1px solid var(--brand); outline-offset: 1px; }
.soutui-custom-modal .scm-rep-kind-tip { display: block; font-weight: normal; opacity: 0.6; margin-top: 2px; }   /* 独占一行：窄弹层里跟在标题后会把词折断 */

/* 场景已保存是终态；展示待确认文字必须完整可见，不裁成等待。 */
.bpp-cell.bpp-saved { color: var(--stone); }
.bpp-cell.bpp-saved .bpp-cell-inner { max-width: 160px; white-space: normal; line-height: 1.5; overflow-wrap: anywhere; }

/* 失败 ID 与常规、进度日志共用内容区，底部为独立导出按钮留位。 */
.log-wrap { padding-bottom: 34px; }
#btnCopyLog { right: 100px; bottom: 8px; padding: 3px 8px; line-height: 1.3; border-radius: 5px; }
.log-export-btn { display: none; position: absolute; bottom: 8px; right: 10px; padding: 3px 8px; border: 1px solid var(--brand); border-radius: 5px; background: var(--brand); color: #171717; font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.3; cursor: pointer; }
.log-export-btn:hover { filter: brightness(1.1); }
#logArea.active ~ .log-export-btn, #progressPanel:not([style*="none"]) ~ .log-export-btn, #failedIdPanel:not([hidden]) ~ .log-export-btn, #logArea.active ~ #btnCopyLog, #progressPanel:not([style*="none"]) ~ #btnCopyLog, #failedIdPanel:not([hidden]) ~ #btnCopyLog { display: block; }
.failed-id-panel { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; background: rgba(15,15,17,.75); color: var(--ivory); border: 1px solid var(--hairline); border-radius: 11px; padding: 12px; }
.failed-id-panel[hidden] { display: none; }
.failed-id-head { display: flex; gap: 8px; align-items: center; }
.failed-id-head { justify-content: space-between; font-size: 12px; }
.failed-id-head span { color: var(--stone); font-size: 10px; }
.failed-id-list { flex: 1 1 0; overflow-y: auto; min-height: 0; margin: 8px 0; user-select: text; }
.failed-id-row { padding: 9px 0; border-bottom: 1px solid var(--hairline); overflow-wrap: anywhere; font-size: 12px; }
.failed-id-row div, .failed-id-note { color: var(--stone); font-size: 11px; }
.failed-id-note { margin-top: 6px; }

.failed-id-note:empty { display: none; }

/* 快麦通面板，不改变原面板布局 */
.f88-kmt-panel { position: absolute; inset: 12px; z-index: 20; padding: 14px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; overflow: hidden; }
.f88-kmt-panel[hidden] { display: none; }
.f88-kmt-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-shrink: 0; }
.f88-kmt-heading h2 { font-size: 14px; font-weight: 600; }
.f88-kmt-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.f88-kmt-panel .f88-kmt-body p { margin: 6px 0; font-size: 11px; line-height: 1.4; }
.f88-kmt-prompt-heading { font-size: 12px; margin-top: 6px; }
.f88-kmt-prompt-heading span { color: var(--stone); font-size: 10px; margin-left: 6px; }
.f88-kmt-prompt-set { margin-top: 6px; }
.f88-kmt-prompt-set[hidden] { display: none; }
.f88-kmt-tabs { display: flex; gap: 6px; margin-top: 10px; }
.f88-kmt-tabs button { flex: 1; padding: 9px 4px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--panel2); color: var(--stone); font: inherit; cursor: pointer; }
.f88-kmt-tabs button[aria-selected="true"], .f88-kmt-tabs button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: white; }
.f88-kmt-tabs button[hidden] { display: none; }
.f88-kmt-publish-heading { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.f88-kmt-publish-heading select, .f88-kmt-select { background: var(--panel2); border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 16px; color: var(--fg, var(--ivory)); font: inherit; }
.f88-kmt-shops { display: grid; gap: 6px; margin-bottom: 16px; }
.f88-kmt-panel .f88-kmt-shops label { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--panel2); font-size: 12px; }
.f88-kmt-shops select { flex: 1; min-width: 0; padding: 7px; border: 1px solid var(--hairline); border-radius: 6px; background: var(--panel2); color: var(--ivory); font: inherit; }
.f88-kmt-shops .f88-kmt-shop-slot { color: var(--brand); white-space: nowrap; }
.f88-kmt-panel #f88KmtIds { min-height: 160px; line-height: 1.6; }
.f88-kmt-panel .f88-kmt-prompt-set textarea { min-height: 160px; margin: 3px 0 0; padding: 10px; font: inherit; font-size: 12px; line-height: 1.6; }
.f88-kmt-panel p { color: var(--stone); line-height: 1.6; margin: 10px 0; font-size: 12px; }
.f88-kmt-panel textarea { width: 100%; box-sizing: border-box; margin: 6px 0; padding: 10px; background: var(--inset); color: var(--ivory); border: 1px solid var(--hairline); border-radius: 8px; resize: vertical; min-height: 80px; }
.f88-kmt-panel button { border: 1px solid var(--hairline); border-radius: 7px; padding: 8px 10px; background: var(--panel2); color: var(--ivory); cursor: pointer; }
.f88-kmt-panel button:disabled { opacity: .4; cursor: default; }
.f88-kmt-panel label { display: block; font-size: 12px; line-height: 1.6; }
.f88-kmt-id-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.f88-kmt-panel #f88KmtOpenPlatform { padding: 5px 8px; font-size: 11px; }
.f88-kmt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.f88-kmt-panel > .f88-kmt-actions { flex-shrink: 0; margin-bottom: 0; }
.f88-kmt-panel button[hidden] { display: none; }
#f88KmtStart { flex: 1; background: var(--brand); color: var(--ink); font-weight: 600; }
#f88KmtQuote:empty { display: none; }
#f88KmtState { white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; font: inherit; }

/* 快麦通开跑后进入公共日志区，复用同一组操作按钮。 */
.f88-kmt-controls:not(.f88-kmt-controllable) > #btnPause, .f88-kmt-controls:not(.f88-kmt-controllable) > #btnStop { display: none; }
.f88-kmt-controls.f88-kmt-active .f88-kmt-actions { display: none; }
.f88-kmt-controls .f88-kmt-actions { grid-column: 1 / -1; flex: 1; padding: 0; border: 0; }
.f88-kmt-config-link { float: right; border: 0; background: transparent; color: var(--accent, #ff781f); cursor: pointer; font-size: 12px; }

/* ============================================================
   2026-11-03 画面与动效升级（老板从 4 版效果图里选「1 发丝顶光」）
   ⚠ 只加覆盖规则：颜色 / 渐变 / 阴影 / 过渡 / 伪元素 / 动画。
     不碰 padding、grid、字号、文案（老板原话：排版一个不动）。唯一例外是
     带「自定义」角标的两个按钮左右各留 22px——角标改成右侧竖栏后标题才能
     继续待在按钮正中、和邻居一条中线。
   借鉴方向：Linear / Vercel 深色面板——靠「顶边 1px 高光 + 发丝边 + 亮度小台阶」
   分层，不靠大阴影；橙=动作、金=状态两种强调色不变。
   ============================================================ */

/* --- 共用交互细节 --- */
.glass-pill, .ink-glass, .btn-reset-ghost, .balance-pill, .miniwin-pill, .settings-corner, .log-tab {
  position: relative; overflow: hidden; isolation: isolate;
}
.glass-pill:focus-visible, .ink-glass:focus-visible, .btn-reset-ghost:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px rgba(255, 138, 76, 0.7);
}
/* 打开时按钮依次淡入（每个错开 40ms）；挂机运行态的主键有自己的呼吸动画，不抢
   ⚠ 填充模式只能用 backwards，不能用 both/forwards：both 会把关键帧末尾的 opacity:1 永久钉在按钮上，
     动画值压过普通样式，:disabled{opacity:.35}/.max-btn.locked{opacity:.45} 全失效 —— 任务跑着时按钮
     照样亮着、鼠标却是🚫（2026-11-04 老板真机 5.4.218）。backwards 只管延迟期的起始态，播完就还给普通样式。 */
.btn-group .btn { animation: qn-in 0.55s cubic-bezier(0.32, 0.72, 0, 1) backwards; }
.btn-group .btn:nth-child(1) { animation-delay: 0.04s; }
.btn-group .btn:nth-child(2) { animation-delay: 0.08s; }
.btn-group .btn:nth-child(3) { animation-delay: 0.12s; }
.btn-group .btn:nth-child(4) { animation-delay: 0.16s; }
.btn-group .btn:nth-child(5) { animation-delay: 0.2s; }
.btn-group .btn:nth-child(6) { animation-delay: 0.24s; }
.btn-group .btn:nth-child(7) { animation-delay: 0.28s; }
.primary-btn-group > *:not(.task-mode-running) { animation: qn-in 0.55s cubic-bezier(0.32, 0.72, 0, 1) 0.32s backwards; }
@keyframes qn-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* 日志页签：下划线滑动切换，代替生硬的 border 跳变 */
.log-tab { transition: color 0.18s; }
.log-tab::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 1px; background: var(--ivory);
  transform: scaleX(0); transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}
.log-tab.active { border-bottom-color: transparent; }
.log-tab.active::after { transform: scaleX(1); }
/* 日志行从左滑入 */
.lg { animation: qn-log 0.35s ease both; }
@keyframes qn-log { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.balance-pill, .miniwin-pill, .settings-corner { transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s; }
.miniwin-pill:hover, .settings-corner:hover { border-color: rgba(239, 235, 227, 0.22); }

/* --- 1 发丝顶光：按钮 ---
   ⚠ 投影只能贴身：#funcArea 是 overflow-y:auto 的滚动容器，会把四周露出的投影裁成直边
     （真实 Chrome 里主键橙色光晕被切过一次），外投影范围别超过按钮间距 6px。 */
.glass-pill {
  background: linear-gradient(180deg, rgba(239, 235, 227, 0.05), rgba(239, 235, 227, 0.012)), var(--panel2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.14s cubic-bezier(0.32, 0.72, 0, 1);
}
.glass-pill:hover {
  border-color: rgba(239, 235, 227, 0.2); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.glass-pill:active {
  transform: translateY(0) scale(0.97);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.glass-pill:disabled { transform: none; box-shadow: none; }
.max-btn {
  background: linear-gradient(180deg, rgba(200, 163, 95, 0.12), rgba(200, 163, 95, 0.03)), var(--panel2);
  border-color: rgba(200, 163, 95, 0.32);
  box-shadow: inset 0 1px 0 rgba(216, 179, 108, 0.18), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.max-btn:hover {
  border-color: rgba(216, 179, 108, 0.6);
  box-shadow: inset 0 1px 0 rgba(216, 179, 108, 0.28), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.max-btn.locked, .max-btn.locked:hover { transform: none; box-shadow: none; }
/* 主键：橙色渐变 + 顶光 + 投影；挂机运行态保留原来的空心呼吸样式 */
.ink-glass:not(.task-mode-running) {
  background: linear-gradient(180deg, #FF7D33, #E8600F);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.18s, transform 0.14s cubic-bezier(0.32, 0.72, 0, 1), background 0.18s;
}
.ink-glass:not(.task-mode-running):hover {
  background: linear-gradient(180deg, #FF8A47, #F06A18); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.ink-glass:not(.task-mode-running):active {
  transform: scale(0.97);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.ink-glass:disabled { transform: none; }
.ink-glass-secondary, .ink-glass-secondary:not(.task-mode-running) {
  background: linear-gradient(180deg, rgba(239, 235, 227, 0.05), rgba(239, 235, 227, 0.012)), var(--panel2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ink-glass-secondary:hover, .ink-glass-secondary:not(.task-mode-running):hover {
  background: linear-gradient(180deg, rgba(239, 235, 227, 0.08), rgba(239, 235, 227, 0.02)), var(--panel2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.btn-reset-ghost:hover { border-color: rgba(239, 235, 227, 0.2); transform: translateY(-1px); }
.glass-panel { background: linear-gradient(180deg, rgba(239, 235, 227, 0.03), rgba(239, 235, 227, 0) 30%), var(--panel); }

/* --- 「自定义」角标：右侧 19px 竖栏，三个字竖排；按钮左右各留 22px，标题仍在正中 --- */
.glass-pill.has-badge { padding-left: 22px; padding-right: 22px; }
.soutui-custom-badge {
  top: 0; right: 0; bottom: 0; width: 19px; padding: 0;
  border: 0; border-left: 1px solid rgba(255, 138, 76, 0.28); border-radius: 0 10px 10px 0;
  background: rgba(247, 107, 28, 0.07);
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 8px; line-height: 1; letter-spacing: 1px; white-space: nowrap;
  color: rgba(255, 160, 106, 0.85);
  transition: background 0.18s, color 0.18s;
}
.soutui-custom-badge:hover { background: rgba(247, 107, 28, 0.22); color: #ffb080; transform: none; }

/* --- 「有新版」提示：退成副标题下面的一行小字（老板选「一行小字 + 悬停看日志」）。
       文案、位置、点击、悬停弹日志的逻辑全不动，只改皮肤。 --- */
.update-banner {
  margin: -8px 0 12px; padding: 0 2px; border: 0; border-radius: 0; background: transparent;
  color: var(--stone); font-size: 9.5px; letter-spacing: 0.03em; gap: 6px;
  animation: qn-in 0.5s cubic-bezier(0.32, 0.72, 0, 1) backwards;
}
.update-banner:hover { background: transparent; border-color: transparent; color: var(--mid, #BDB8AE); }
.update-banner:active { transform: none; }
.update-banner .ub-text { color: inherit; flex: none; }
.update-banner .ub-go {
  background: transparent; color: var(--stone); padding: 0; font-size: 9.5px; font-weight: 400;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(239, 235, 227, 0.25);
}
.update-banner:hover .ub-go { color: #ff8a4c; text-decoration-color: currentColor; }
.update-dot { width: 5px; height: 5px; }
/* 悬停弹出的更新日志面板：同 1 方案发丝顶光 */
.update-panel {
  border-color: var(--hairline);
  background: linear-gradient(180deg, rgba(239, 235, 227, 0.04), rgba(239, 235, 227, 0) 40%), #17171B;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 48px rgba(0, 0, 0, 0.55);
  color: #BDB8AE; animation: qn-in 0.3s cubic-bezier(0.32, 0.72, 0, 1) backwards;
}
.update-panel .up-header { font-family: var(--disp); font-weight: 400; letter-spacing: 0.08em; font-size: 11px; color: var(--stone); }
.update-panel .up-entry { border-top-color: var(--hairline); }
.update-panel .up-ver { font-family: var(--disp); font-weight: 400; color: var(--ivory); }
.update-panel .up-entry:first-of-type .up-ver { color: #ff8a4c; }
.update-panel .up-date { color: var(--faint); }
.update-panel .up-note { color: #BDB8AE; }
.update-panel .up-more { color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .btn-group .btn, .primary-btn-group > *, .lg, .update-banner, .update-panel { animation: none; }
  .glass-pill, .ink-glass, .log-tab::after { transition: none; }
}

/* 买家秀紧凑布局：胶囊、缩略图、底部按钮沿用搜推；只在本弹层覆盖布局。 */
.buyer-show-modal { width: 376px; max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box; max-width: calc(100vw - 24px); min-width: 0; padding: 14px; }
.buyer-show-modal .scm-pick-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buyer-show-modal textarea { display: block; box-sizing: border-box; width: 100%; min-width: 0; height: 68px; min-height: 68px; padding: 6px 8px; resize: vertical; }
.buyer-show-form { display: flex; flex-direction: column; overflow: hidden; }
.buyer-show-form > h3, .buyer-show-form > .bs-subtitle, .buyer-show-form > .bs-footer { flex-shrink: 0; }
.buyer-show-form .scm-sub { font-size: 12px; margin: 4px 0 0; }
.buyer-show-form .bs-subtitle { margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buyer-show-form .bs-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
.buyer-show-form .bs-setting { min-width: 0; flex-shrink: 0; }
.buyer-show-form .scm-rep-label { display: block; font-size: 12px; margin: 0 0 4px; }
.buyer-show-form .bs-inline { display: flex; align-items: center; gap: 4px; min-width: 0; }
.buyer-show-form .bs-inline > .scm-rep-label { flex-shrink: 0; margin: 0; }
.buyer-show-form .bs-options-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.buyer-show-form .scm-rep-kind { margin: 0; }
.buyer-show-form .scm-rep-kind label { display: inline-flex; }
/* span 直接复用 scm-rep-kind；按钮只消除原生外框，并补与 radio 相同的选中/聚焦态。 */
.buyer-show-form .scm-rep-kind button { padding: 0; border: 0; border-radius: 999px; background: transparent; font: inherit; line-height: 0; cursor: pointer; }
.buyer-show-form .scm-rep-kind button:hover span { border-color: rgba(239, 235, 227, 0.45); }
.buyer-show-form .scm-rep-kind button[aria-pressed="true"] span,
.buyer-show-form .scm-rep-kind button[aria-selected="true"] span { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.buyer-show-form .scm-rep-kind button:focus-visible { outline: 1px solid var(--brand); outline-offset: 1px; }
.buyer-show-form .scm-rep-kind button:disabled { opacity: 0.5; cursor: not-allowed; }
.buyer-show-form .bs-stepper { display: inline-flex; align-items: center; height: 21px; box-sizing: border-box; border: 1px solid rgba(239, 235, 227, 0.22); border-radius: 999px; background: rgba(255, 255, 255, 0.03); }
.buyer-show-form .bs-stepper button, .buyer-show-form .bs-count { box-sizing: border-box; height: 19px; padding: 0; border: 0; background: transparent; color: inherit; text-align: center; font: inherit; font-size: 12px; line-height: 19px; }
.buyer-show-form .bs-stepper button { width: 22px; border-radius: 999px; cursor: pointer; }
.buyer-show-form .bs-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.buyer-show-form .bs-stepper button:focus-visible, .buyer-show-form .bs-count:focus-visible { outline: 1px solid var(--brand); }
.buyer-show-form .bs-count { width: 26px; appearance: textfield; -moz-appearance: textfield; }
.buyer-show-form .bs-count::-webkit-inner-spin-button, .buyer-show-form .bs-count::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buyer-show-form .bs-prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.buyer-show-form .bs-prompt-heading > span { color: var(--stone); font-size: 11px; font-weight: normal; }
.buyer-show-form .bs-prompt-tabs { margin-bottom: 4px; }
.buyer-show-form .bs-prompt-tabs span { position: relative; min-width: 13px; text-align: center; }
.buyer-show-form .bs-has-prompt span::after { content: ''; position: absolute; width: 4px; height: 4px; right: 3px; top: 3px; border-radius: 50%; background: currentColor; }
.buyer-show-form .bs-prompt-set[hidden] { display: none; }
.buyer-show-form .bs-recognized.scm-count-tight { margin: 4px 0 0; }
.buyer-show-form .bs-chips { flex-wrap: nowrap; overflow: hidden; max-height: none; margin-top: 4px; }
.buyer-show-form .bs-chips .scm-chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.buyer-show-form .bs-chips .scm-chip-more { flex-shrink: 0; }
.buyer-show-form .bs-ignored { margin-top: 4px; }
.buyer-show-form .bs-chips:empty, .buyer-show-form .bs-ignored:empty, .buyer-show-form .bs-error:empty { display: none; }
.buyer-show-form .scm-rep-tip { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buyer-show-form .bs-ref-quote { margin: 4px 0 0; font-size: 12px; color: var(--stone); }
.buyer-show-form .bs-footer { padding-top: 8px; }
.buyer-show-form .bs-quote { margin: 0; white-space: nowrap; }
.buyer-show-form .bs-footer .scm-actions { margin-top: 8px; }
.soutui-custom-modal .scm-rep-index { position: absolute; top: 2px; left: 2px; padding: 0 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 10px; line-height: 14px; pointer-events: none; }

/* 买家秀固定六格（商品 ID + 五阶段），长原因只在 ID 下截断；不影响其它模式。 */
.buyer-show-progress-table { table-layout: fixed; }
.buyer-show-progress-table th:first-child { width: 26%; }
.buyer-show-progress-table th, .buyer-show-progress-table td { padding-inline: 2px; }
.buyer-show-progress-table .bpp-id { overflow: hidden; text-overflow: ellipsis; }
.buyer-show-progress-table .bpp-id > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 计数格（⚠ 3/4 待确认1）在 400px 侧边栏只有约 60px：允许在空格处换行，不截成省略号（11-08 老板截图）。 */
.buyer-show-progress-table .bpp-cell-inner { max-width: none; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.buyer-show-progress-table .buyer-show-failure { font-size: 10px; color: var(--bad); margin-top: 2px; font-weight: 400; }

/* 待审核入口在窄面板也完整换行。 */
.bs-review-entry { display: block; width: 100%; margin: 6px 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; color: var(--brand); border: 1px solid var(--brand); background: var(--panel2); border-radius: 8px; padding: 8px; cursor: pointer; }
