/* AvoAgent · 工具页样式
 * 加载时机：page slug 在 12 个工具 slug 中
 */

/* === Hero ==================================================== */
.avo-tool-hero {
  padding: var(--avo-s-12) 0 var(--avo-s-8);
  background:
    radial-gradient(circle at 15% 30%, var(--avo-brand-tint) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, var(--avo-brand-soft) 0%, transparent 35%),
    var(--avo-bg);
  border-bottom: 1px solid var(--avo-border);
}
.avo-tool-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--avo-s-8);
  align-items: center;
}
.avo-tool-eyebrow {
  font-family: var(--avo-font-mono);
  font-size: 12px;
  color: var(--avo-text-muted);
  letter-spacing: 0.5px;
  margin-bottom: var(--avo-s-3);
  text-transform: lowercase;
}
.avo-tool-title {
  font-size: var(--avo-fs-3xl);
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: var(--avo-s-2);
}
.avo-tool-name-en {
  font-size: var(--avo-fs-md);
  color: var(--avo-text-muted);
  margin-bottom: var(--avo-s-5);
  font-family: var(--avo-font-mono);
  letter-spacing: -0.2px;
}
.avo-tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.avo-tool-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--avo-text-muted);
}
.avo-tool-meta-pill--brand {
  background: var(--avo-brand-soft);
  border-color: var(--avo-brand);
  color: var(--avo-brand-strong);
}
.avo-tool-meta-pill--warn {
  background: #FBF3DC;
  color: #8B6F1F;
  border-color: var(--avo-warning);
}

/* Hero 右侧余额卡 */
.avo-tool-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 180px;
  padding: var(--avo-s-5) var(--avo-s-6);
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-lg);
  text-decoration: none;
  transition: border-color 150ms, transform 150ms, box-shadow 150ms;
}
.avo-tool-balance:hover {
  border-color: var(--avo-brand);
  transform: translateY(-2px);
  box-shadow: var(--avo-shadow);
}
.avo-tool-balance__label {
  font-family: var(--avo-font-mono);
  font-size: 11px;
  color: var(--avo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.avo-tool-balance__value {
  font-family: var(--avo-font-mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--avo-brand);
  letter-spacing: -1px;
  margin: 6px 0;
  line-height: 1;
}
.avo-tool-balance__cta {
  font-size: 12px;
  color: var(--avo-text-muted);
  font-family: var(--avo-font-mono);
}
.avo-tool-balance--cta .avo-tool-balance__value {
  color: var(--avo-text);
}

@media (max-width: 768px) {
  .avo-tool-hero-inner { grid-template-columns: 1fr; }
  .avo-tool-balance { min-width: 0; }
}

/* === Body 主区域（form + result）============================ */
.avo-tool-body {
  padding: var(--avo-s-10) 0;
  min-height: 60vh;
}

.avo-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--avo-s-6);
  align-items: stretch;
}
@media (max-width: 900px) {
  .avo-tool-grid { grid-template-columns: 1fr; }
}

/* 登录必需 banner */
.avo-tool-login-banner {
  display: flex;
  align-items: center;
  gap: var(--avo-s-3);
  padding: 12px 18px;
  background: var(--avo-brand-tint);
  border: 1px solid var(--avo-brand-soft);
  border-radius: var(--avo-r-md);
  margin-bottom: var(--avo-s-5);
  font-size: 14px;
  color: var(--avo-brand-strong);
  flex-wrap: wrap;
}

/* === Form ==================================================== */
.avo-tool-form {
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-lg);
  padding: var(--avo-s-6);
  display: flex;
  flex-direction: column;
  gap: var(--avo-s-4);
}

.avo-tool-form-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.avo-tool-form-section label {
  font-size: 13px;
  font-weight: 600;
  color: var(--avo-text);
}
.avo-tool-form-section .avo-help {
  font-size: 11px;
  color: var(--avo-text-subtle);
  margin: 0;
}

.avo-tool-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--avo-border-strong);
  border-radius: var(--avo-r-md);
  background: var(--avo-surface);
  font-family: var(--avo-font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--avo-text);
  transition: border-color 150ms, box-shadow 150ms;
}
.avo-tool-input:focus {
  outline: none;
  border-color: var(--avo-brand);
  box-shadow: 0 0 0 3px var(--avo-brand-soft);
}
textarea.avo-tool-input {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}
.avo-tool-input--mono {
  font-family: var(--avo-font-mono);
  font-size: 13px;
  letter-spacing: -0.1px;
}

.avo-tool-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--avo-s-3);
}
@media (max-width: 600px) {
  .avo-tool-form-row { grid-template-columns: 1fr; }
}

/* === Result =================================================== */
.avo-tool-result {
  background: var(--avo-bg);
  border: 1px dashed var(--avo-border-strong);
  border-radius: var(--avo-r-lg);
  padding: var(--avo-s-6);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.avo-tool-result-empty {
  color: var(--avo-text-subtle);
  font-size: 14px;
  text-align: center;
  font-family: var(--avo-font-mono);
}

.avo-tool-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--avo-s-3);
  color: var(--avo-text-muted);
}
.avo-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--avo-border);
  border-top-color: var(--avo-brand);
  border-radius: 50%;
  animation: avo-spin 800ms linear infinite;
}
@keyframes avo-spin {
  to { transform: rotate(360deg); }
}

.avo-tool-result-success {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--avo-s-3);
  align-items: stretch;
}
.avo-tool-result-meta {
  font-family: var(--avo-font-mono);
  font-size: 12px;
  color: var(--avo-success);
  background: var(--avo-brand-tint);
  padding: 8px 12px;
  border-radius: var(--avo-r-sm);
  border: 1px solid var(--avo-brand-soft);
}
.avo-tool-output-text {
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  padding: var(--avo-s-4);
  font-family: var(--avo-font-sans);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: -0.2px;
  color: var(--avo-text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}
.avo-tool-output-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--avo-r-md);
  border: 1px solid var(--avo-border);
}
.avo-tool-result-actions {
  display: flex;
  gap: var(--avo-s-2);
  flex-wrap: wrap;
}
/* 多图画廊 — model-skin / virtual-tryon 返回多张时使用 */
.avo-tool-result-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--avo-s-3);
}
.avo-tool-result-gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--avo-s-2);
}
.avo-tool-result-gallery-item figcaption {
  display: flex;
  justify-content: center;
}

.avo-tool-async-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--avo-s-3);
  color: var(--avo-warning);
  font-size: 14px;
}

.avo-tool-error {
  background: #FBE5E3;
  color: #7E2F2A;
  border: 1px solid var(--avo-danger);
  border-radius: var(--avo-r-md);
  padding: 14px 18px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.avo-tool-error-cta {
  margin-left: auto;
}

/* === Footer info =============================================== */
.avo-tool-footer-info {
  background: var(--avo-bg);
  border-top: 1px solid var(--avo-border);
  padding: var(--avo-s-10) 0;
}
.avo-tool-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--avo-s-5);
}
@media (max-width: 768px) {
  .avo-tool-info-grid { grid-template-columns: 1fr; }
}
.avo-tool-info-card {
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-lg);
  padding: var(--avo-s-5);
}
.avo-tool-info-icon {
  width: 44px; height: 44px;
  border-radius: var(--avo-r-md);
  background: var(--avo-brand-soft);
  color: var(--avo-brand-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--avo-s-3);
}
.avo-tool-info-icon svg { width: 22px; height: 22px; }
.avo-tool-meta-pill svg { width: 14px; height: 14px; }
.avo-tool-info-card h3 {
  font-size: var(--avo-fs-md);
  font-weight: 600;
  margin-bottom: var(--avo-s-2);
}
.avo-tool-info-card p {
  font-size: 13px;
  color: var(--avo-text-muted);
  line-height: 1.6;
  margin: 0;
}
.avo-tool-extra-note {
  margin-top: var(--avo-s-5);
  padding: var(--avo-s-4) var(--avo-s-5);
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  font-size: 13px;
  color: var(--avo-text-muted);
}

/* === 图片输入组件 ============================================ */
.avo-image-input {
  border: 1px solid var(--avo-border-strong);
  border-radius: var(--avo-r-md);
  overflow: hidden;
}
.avo-image-input-tabs {
  display: flex;
  background: var(--avo-bg);
  border-bottom: 1px solid var(--avo-border);
}
.avo-image-input-tab {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  font-family: var(--avo-font-mono);
  font-size: 12px;
  color: var(--avo-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 150ms, border-color 150ms;
}
.avo-image-input-tab:hover { color: var(--avo-brand); }
.avo-image-input-tab.is-active {
  color: var(--avo-brand);
  border-bottom-color: var(--avo-brand);
  font-weight: 600;
}
.avo-image-input-pane { display: none; padding: 14px; background: var(--avo-surface); }
.avo-image-input-pane.is-active { display: block; }

.avo-image-dropzone {
  border: 2px dashed var(--avo-border-strong);
  border-radius: var(--avo-r-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  position: relative;
  outline: none;
}
.avo-image-dropzone:hover,
.avo-image-dropzone:focus {
  border-color: var(--avo-brand);
  background: var(--avo-brand-tint);
}
.avo-image-dropzone.is-dragover {
  border-color: var(--avo-brand);
  background: var(--avo-brand-soft);
}
.avo-image-dropzone-icon {
  font-size: 36px;
  margin-bottom: 6px;
  opacity: 0.7;
}
.avo-image-dropzone-empty p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--avo-text-muted);
}
.avo-image-dropzone-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.avo-image-preview-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: var(--avo-r-sm);
  border: 1px solid var(--avo-border);
  object-fit: contain;
}
.avo-image-preview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--avo-text-muted);
}
.avo-image-preview-name { font-size: 11px; }

/* === Before / After slider ================================== */
.avo-baslider {
  position: relative;
  width: 100%;
  border-radius: var(--avo-r-md);
  overflow: hidden;
  border: 1px solid var(--avo-border);
  user-select: none;
  touch-action: none;
}
.avo-baslider-before,
.avo-baslider-after {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.avo-baslider-after-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-right: 2px solid var(--avo-brand);
}
.avo-baslider-after-wrap .avo-baslider-after {
  width: auto;       /* 保持原图绝对位置 */
  max-width: none;
  height: 100%;
}
.avo-baslider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  margin-left: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}
.avo-baslider-handle-bar {
  width: 36px;
  height: 36px;
  background: var(--avo-surface);
  border: 2px solid var(--avo-brand);
  border-radius: 50%;
  box-shadow: var(--avo-shadow);
  position: relative;
}
.avo-baslider-handle-bar::before,
.avo-baslider-handle-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  transform: translateY(-50%);
}
.avo-baslider-handle-bar::before {
  left: 6px;
  border-right-color: var(--avo-brand);
}
.avo-baslider-handle-bar::after {
  right: 6px;
  border-left-color: var(--avo-brand);
}

.avo-baslider-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  font-family: var(--avo-font-mono);
  font-size: 11px;
  border-radius: var(--avo-r-sm);
  background: rgba(26, 43, 35, 0.7);
  color: #fff;
  letter-spacing: 0.5px;
  pointer-events: none;
}
.avo-baslider-label--before { left: 12px; }
.avo-baslider-label--after  { right: 12px; }

/* === Bounding box overlay (element detection)================ */
.avo-bbox-overlay {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  overflow: hidden;
  background: var(--avo-bg);
}
.avo-bbox-img {
  display: block;
  max-width: 100%;
  height: auto;
}
.avo-bbox {
  position: absolute;
  border: 2px solid var(--avo-danger);
  background: rgba(184, 69, 63, 0.1);
  pointer-events: none;
}
.avo-bbox-label {
  position: absolute;
  top: -2px;
  left: -2px;
  transform: translateY(-100%);
  padding: 2px 6px;
  background: var(--avo-danger);
  color: #fff;
  font-family: var(--avo-font-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  border-radius: 3px 3px 3px 0;
}

.avo-bbox--text          { border-color: #B8453F; background: rgba(184, 69, 63, 0.1); }
.avo-bbox--text .avo-bbox-label          { background: #B8453F; }

.avo-bbox--logo          { border-color: #4A7C59; background: rgba(74, 124, 89, 0.1); }
.avo-bbox--logo .avo-bbox-label          { background: #4A7C59; }

.avo-bbox--watermark     { border-color: #C8A560; background: rgba(200, 165, 96, 0.15); }
.avo-bbox--watermark .avo-bbox-label     { background: #C8A560; }

.avo-bbox--textblock     { border-color: #4A7787; background: rgba(74, 119, 135, 0.1); }
.avo-bbox--textblock .avo-bbox-label     { background: #4A7787; }

/* === History 页历史表 ====================================== */
.avo-history-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  align-items: center;
}
.avo-history-filter select,
.avo-history-filter input[type=text] {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid var(--avo-border-strong);
  border-radius: var(--avo-r-sm);
}
.avo-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.avo-history-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--avo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  background: var(--avo-bg);
  border-bottom: 1px solid var(--avo-border);
}
.avo-history-table td {
  padding: 12px;
  border-bottom: 1px solid var(--avo-border);
  vertical-align: top;
}
.avo-history-table tbody tr:hover td { background: var(--avo-bg); }
.avo-history-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--avo-font-mono);
  font-size: 11px;
}
.avo-history-status--success { background: var(--avo-brand-soft); color: var(--avo-brand-strong); }
.avo-history-status--failed  { background: #FBE5E3; color: #7E2F2A; }
.avo-history-status--async   { background: #FBF3DC; color: #8B6F1F; }
.avo-history-status--pending { background: var(--avo-bg); color: var(--avo-text-muted); }

/* === Element Detection 结果卡片（v1.7.0 替代 bbox overlay） === */
.avo-detect-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--avo-s-2);
  margin-bottom: var(--avo-s-3);
}
.avo-detect-stat {
  background: var(--avo-bg);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  padding: var(--avo-s-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.avo-detect-stat-num {
  font-family: var(--avo-font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--avo-text);
}
.avo-detect-stat-label {
  font-size: 11px;
  color: var(--avo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.avo-detect-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--avo-s-2);
  margin-top: var(--avo-s-3);
}
.avo-detect-card {
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  padding: var(--avo-s-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--avo-surface);
}
.avo-detect-card--has   { border-color: #C8A560; background: #FBF3DC; }
.avo-detect-card--clear { border-color: var(--avo-brand-soft); background: var(--avo-brand-tint); }
.avo-detect-card-icon {
  font-size: 18px;
  font-weight: 700;
}
.avo-detect-card--has   .avo-detect-card-icon { color: #8B6F1F; }
.avo-detect-card--clear .avo-detect-card-icon { color: var(--avo-brand-strong); }
.avo-detect-card-label {
  font-size: 13px;
  color: var(--avo-text);
}
.avo-detect-card-state {
  font-family: var(--avo-font-mono);
  font-size: 11px;
  color: var(--avo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.avo-detect-ocr {
  margin-top: var(--avo-s-3);
  background: var(--avo-bg);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  padding: var(--avo-s-3);
}
.avo-detect-ocr h4 {
  margin: 0 0 var(--avo-s-2);
  font-size: 13px;
  color: var(--avo-text-muted);
}
.avo-detect-ocr ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}
.avo-detect-ocr li { line-height: 1.6; }
.avo-detect-raw { margin-top: var(--avo-s-2); }

/* === Optional details / 折叠区（title-generator / description-generator） === */
.avo-tool-form-details {
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  padding: var(--avo-s-2) var(--avo-s-3);
  background: var(--avo-bg);
}
.avo-tool-form-details > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--avo-brand);
  padding: 6px 0;
  list-style: none;
}
.avo-tool-form-details > summary::-webkit-details-marker { display: none; }
.avo-tool-form-details > summary::before { content: '▸ '; }
.avo-tool-form-details[open] > summary::before { content: '▾ '; }
.avo-tool-form-details[open] {
  padding-bottom: var(--avo-s-3);
}

/* === Upload uploading 状态 === */
.avo-image-dropzone-uploading {
  padding: var(--avo-s-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--avo-s-2);
  color: var(--avo-text-muted);
  font-size: 13px;
}

/* === Size preset chips（smart-crop / cutout 共用） === */
.avo-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.avo-presets__label {
  font-family: var(--avo-font-mono);
  font-size: 11px;
  color: var(--avo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.avo-preset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--avo-font-sans);
  font-size: 12px;
  padding: 5px 11px;
  background: var(--avo-bg);
  border: 1px solid var(--avo-border);
  border-radius: 999px;
  color: var(--avo-text);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.avo-preset:hover { border-color: var(--avo-brand); }
.avo-preset.is-active {
  border-color: var(--avo-brand);
  background: var(--avo-brand-tint);
  color: var(--avo-brand-strong);
}
.avo-preset__dim {
  font-family: var(--avo-font-mono);
  font-size: 10px;
  color: var(--avo-text-muted);
  padding: 0 2px;
}
.avo-preset--marketplace { background: #FBF3DC; border-color: #ECDFC0; color: #8B6F1F; }
.avo-preset--marketplace:hover { border-color: #C8A560; }
.avo-preset--social { background: var(--avo-brand-tint); border-color: var(--avo-brand-soft); color: var(--avo-brand-strong); }
.avo-preset--generic { /* default */ }

/* === Mode toggle（text-translation single vs line-by-line） === */
.avo-tool-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--avo-s-2);
}
@media (max-width: 600px) {
  .avo-tool-mode-toggle { grid-template-columns: 1fr; }
}
.avo-tool-mode-toggle .avo-radio {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: var(--avo-s-3);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  cursor: pointer;
  background: var(--avo-surface);
  transition: border-color 120ms, background 120ms;
}
.avo-tool-mode-toggle .avo-radio:hover { border-color: var(--avo-brand-soft); }
.avo-tool-mode-toggle .avo-radio:has(input:checked) {
  border-color: var(--avo-brand);
  background: var(--avo-brand-tint);
}
.avo-tool-mode-toggle .avo-radio .avo-help {
  font-size: 11px;
  color: var(--avo-text-muted);
  margin-top: 2px;
}

/* === 文本结果卡片化（text-translation list / title-generator / description-generator 多条候选） === */
.avo-tool-text-list {
  display: flex;
  flex-direction: column;
  gap: var(--avo-s-2);
}
.avo-tool-text-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--avo-s-3);
  align-items: start;
  padding: var(--avo-s-3);
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
}
.avo-tool-text-item-num {
  font-family: var(--avo-font-mono);
  font-size: 11px;
  color: var(--avo-text-muted);
  background: var(--avo-bg);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 2px;
}
.avo-tool-text-item-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--avo-text);
  white-space: pre-wrap;
  word-break: break-word;
}
.avo-tool-run-again {
  align-self: flex-start;
  margin-top: var(--avo-s-2);
}

/* === Batch mode（v1.8.0 smart-crop 批量样板） === */
.avo-batch-section { padding-top: 0; padding-bottom: var(--avo-s-12); }
.avo-batch-details {
  background: var(--avo-surface);
  border: 1px solid var(--avo-border);
  padding: var(--avo-s-3) var(--avo-s-5);
}
.avo-batch-details > summary {
  font-weight: 600;
  font-size: 15px;
  color: var(--avo-brand-strong);
}

.avo-batch-uploader { margin-top: 8px; }
.avo-batch-dropzone {
  border: 2px dashed var(--avo-border-strong);
  border-radius: var(--avo-r-md);
  padding: var(--avo-s-5);
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
  outline: none;
}
.avo-batch-dropzone:focus,
.avo-batch-dropzone.is-dragover {
  border-color: var(--avo-brand);
  background: var(--avo-brand-tint);
}
.avo-batch-dropzone-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--avo-s-2);
  color: var(--avo-text-muted);
}
.avo-batch-dropzone-text p { margin: 0; font-size: 14px; }

.avo-batch-queue {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.avo-batch-item {
  display: grid;
  grid-template-columns: 40px 1fr auto auto auto;
  gap: var(--avo-s-3);
  align-items: center;
  padding: 6px 10px;
  background: var(--avo-bg);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-sm);
  font-size: 13px;
}
.avo-batch-item--uploading,
.avo-batch-item--processing { border-color: var(--avo-brand-soft); background: var(--avo-brand-tint); }
.avo-batch-item--awaiting   { border-color: #C8A560; background: #FBF3DC; }
.avo-batch-item--awaiting .avo-batch-status { color: #8B6F1F; }
.avo-batch-item--done       { border-color: #C7E0CE; background: #F0F8F2; }
.avo-batch-item--failed     { border-color: #F4C4BF; background: #FBE5E3; }
.avo-batch-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: var(--avo-r-sm);
  border: 1px solid var(--avo-border);
}
.avo-batch-name {
  font-family: var(--avo-font-mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--avo-text);
}
.avo-batch-status {
  font-family: var(--avo-font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--avo-surface);
  color: var(--avo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.avo-batch-item--done    .avo-batch-status { color: var(--avo-success); }
.avo-batch-item--failed  .avo-batch-status { color: var(--avo-danger); }
.avo-batch-err {
  font-size: 11px;
  color: var(--avo-danger);
  font-family: var(--avo-font-mono);
}
.avo-batch-remove {
  border: none;
  background: transparent;
  color: var(--avo-text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.avo-batch-remove:hover { color: var(--avo-danger); }

.avo-batch-controls {
  display: flex;
  align-items: center;
  gap: var(--avo-s-3);
  flex-wrap: wrap;
}
.avo-batch-cost {
  font-family: var(--avo-font-mono);
  font-size: 12px;
  color: var(--avo-text-muted);
}

.avo-batch-result { margin-top: 16px; }

/* === CSV batch（title/description generator） === */
.avo-csv-uploader {
  display: flex;
  align-items: center;
  gap: var(--avo-s-3);
  flex-wrap: wrap;
}
.avo-csv-file-label {
  cursor: pointer;
}
.avo-csv-sample {
  background: var(--avo-bg);
  border: 1px solid var(--avo-border);
  border-radius: var(--avo-r-md);
  padding: 6px 12px;
}
.avo-csv-sample > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--avo-text-muted);
  list-style: none;
}
.avo-csv-sample > summary::before { content: '▸ '; }
.avo-csv-sample[open] > summary::before { content: '▾ '; }
.avo-csv-progress {
  margin-top: 8px;
  font-family: var(--avo-font-mono);
  font-size: 12px;
  color: var(--avo-text-muted);
  min-height: 18px;
}
.avo-csv-progress--error { color: var(--avo-warning); }
.avo-csv-download { margin-top: 8px; }
.avo-csv-result { margin-top: 16px; }
