/* === Design System === */
:root {
  /* Colors — OKLCH + HEX fallback */
  --bg-primary: #0d1018;          /* oklch(9% 0.02 250) */
  --bg-secondary: #161a25;        /* oklch(12% 0.025 250) */
  --bg-card: rgba(30, 35, 52, 0.7);
  --bg-card-solid: #1e2334;
  --bg-input: #252a3a;
  --bg-hover: #2a3048;
  --border: #2a3048;
  --border-accent: #4a6cf7;       /* oklch(55% 0.2 260) */
  --text-primary: #e2e5f0;        /* rgba(255,255,255,0.88) */
  --text-secondary: #8b94b0;
  --text-muted: #6b7490;       /* 提亮：oklch(50% 0.03 260) — 提升对比度 ≥ 4.2:1 */
  --accent: #4a6cf7;              /* oklch(55% 0.2 260) */
  --accent-glow: rgba(74, 108, 247, 0.22);
  --accent-hover: #5c7cff;
  --success: #2dd4a0;             /* oklch(72% 0.16 170) */
  --success-bg: rgba(45, 212, 160, 0.1);
  --warning: #f5a623;             /* oklch(72% 0.16 65) */
  --warning-bg: rgba(245, 166, 35, 0.1);
  --error: #f06b6b;               /* oklch(62% 0.18 25) */
  --error-bg: rgba(240, 107, 107, 0.1);
  --pending: #8b94b0;
  --pending-bg: rgba(139, 148, 176, 0.08);

  /* Typography — Plus Jakarta Sans: 几何人文无衬线，辨识度高于 Inter，适合 AI 工具类产品 */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font sizes — rem（支持用户缩放） */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.375rem;   /* 22px */
  --text-2xl:  1.75rem;    /* 28px */

  /* Spacing (4pt grid) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ease-exit:  cubic-bezier(0.4, 0, 1, 1);
  --duration: 200ms;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 单点蓝色光晕装饰 — 去紫色，保持大气感 */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(74, 108, 247, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* === Layout === */
.container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--sp-6);
  padding-top: var(--sp-10);
}

/* === Header === */
.header {
  text-align: center;
  margin-bottom: var(--sp-10);
}

.header h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  /* 单色系渐变：白→蓝，避免紫色渐变反模式 */
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--sp-2);
  line-height: 1.5;
}

/* === Connection Status === */
.connection-status {
  position: fixed;
  top: var(--sp-4);
  right: var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
  z-index: 100;
}

.connection-status.offline {
  opacity: 1;
  transform: translateY(0);
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* === Upload Zone === */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-12) var(--sp-6);
  text-align: center;
  cursor: pointer;
  transition: all 300ms var(--ease);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(74, 108, 247, 0.06);
  box-shadow: var(--shadow-glow);
}

.upload-zone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow), 0 0 0 4px var(--accent-glow);
}

.upload-zone:hover::before, .upload-zone.dragover::before {
  opacity: 1;
}

.upload-zone .icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-3);
  filter: grayscale(0.3);
  line-height: 1;
}

.upload-zone .label {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 500;
}

.upload-zone .label strong {
  color: var(--accent);
}

.upload-zone .hint {
  color: var(--text-muted);
  font-size: var(--text-xs);
  margin-top: var(--sp-2);
  line-height: 1.6;
}

.upload-zone input[type="file"] { display: none; }

/* === Divider === */
.divider-or {
  text-align: center;
  margin: var(--sp-3) 0;
  position: relative;
}

.divider-or::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.divider-or span {
  position: relative;
  background: var(--bg-primary);
  padding: 0 var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === URL Input === */
.url-input-group {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.url-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  min-height: 2.75rem; /* 44px 触控目标 */
}

.url-input::placeholder {
  color: var(--text-muted);
}

.url-input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* 可见 label（sr-only 变种，仅屏幕外但可读） */
.url-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.url-submit {
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-sm);
  min-height: 2.75rem; /* 与 url-input 对齐 */
}

.url-input-group.loading .url-input {
  opacity: 0.6;
  pointer-events: none;
}

.url-input-group.loading .url-submit {
  opacity: 0.6;
  pointer-events: none;
}

/* === Upload Progress === */
.upload-progress {
  display: none;
  margin-bottom: var(--sp-6);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
}

.upload-progress.active { display: block; }

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
}

.upload-progress-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

.upload-progress-pct {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums; /* 数字等宽，百分比跳动不位移 */
}

.upload-progress-bar {
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  /* 单色系：蓝→亮蓝，移除紫色（AI 设计反模式） */
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  transition: width 150ms var(--ease);
}

/* === Result Panel === */
.result-panel {
  display: none;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: slideDown 300ms var(--ease);
}

.result-panel.active { display: block; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  gap: var(--sp-3);
}

.result-header h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.result-header-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.language-tag {
  font-size: var(--text-xs);
  color: var(--accent);
  background: rgba(74, 108, 247, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: var(--sp-1);
  display: inline-block;
  letter-spacing: 0.3px;
}

.result-text {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  line-height: 1.8;
  font-size: var(--text-sm);
  white-space: pre-wrap;
  max-height: 24rem; /* 384px — 固定高度保留页面空间 */
  overflow-y: auto;
  color: var(--text-primary);
  border: 1px solid var(--border);
  /* 长文本行宽控制：中文 35 字符阅读舒适区 */
  word-break: break-word;
}

.result-text::-webkit-scrollbar { width: 6px; }
.result-text::-webkit-scrollbar-track { background: transparent; }
.result-text::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* === Buttons === */
.btn {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform 100ms var(--ease);
  white-space: nowrap;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

/* === 功能5: 语言选择器行 === */
.lang-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.lang-row-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-select {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font);
  padding: var(--sp-2) var(--sp-3);
  min-height: 2.25rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b94b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-3) center;
  padding-right: var(--sp-8);
}

.lang-select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.lang-select option {
  background: var(--bg-card-solid);
  color: var(--text-primary);
}

/* === 功能6: 搜索框 === */
.search-row {
  margin-bottom: var(--sp-3);
}

.search-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font);
  outline: none;
  min-height: 2.75rem;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Chrome 隐藏搜索框自带 x 按钮（由用户自行清空）*/
.search-input::-webkit-search-cancel-button { display: none; }

/* 搜索激活时搜索框轻微高亮 */
.search-input:not(:placeholder-shown) {
  border-color: var(--text-muted);
}

/* === 功能4: 导出按钮 === */
.btn-export {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.3px;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease),
              border-color var(--duration) var(--ease), transform 100ms var(--ease);
  white-space: nowrap;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.btn-export:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-export:active { transform: scale(0.97); }

.btn-export:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === Section Label === */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding-top: var(--sp-2);
}

/* === Task List === */
.task-list {
  list-style: none;
}

.task-item {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  animation: fadeIn 300ms var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.task-item:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.task-info { flex: 1; min-width: 0; }

.task-name {
  font-weight: 500;
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.task-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* 错误信息单行截断，避免卡片高度爆炸 */
  max-width: 100%;
  font-variant-numeric: tabular-nums; /* 时间戳数字等宽对齐 */
}

/* 偏差#2修复: URL 来源标签 — 与 language-tag 风格一致 */
.source-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74, 108, 247, 0.1);
  padding: 0.05rem 0.35rem;
  border-radius: var(--radius-sm);
  vertical-align: middle;
  line-height: 1.6;
}

.task-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-shrink: 0;
  margin-left: var(--sp-3);
}

/* === Status Badges === */
.task-status {
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
}

.status-pending {
  background: var(--pending-bg);
  color: var(--pending);
}

.status-processing {
  background: var(--warning-bg);
  color: var(--warning);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-done {
  background: var(--success-bg);
  color: var(--success);
  cursor: pointer;
}

.status-done:hover {
  /* 用 Token 而非硬编码 rgba：与 success-bg 保持语义一致 */
  background: rgba(45, 212, 160, 0.2);
}

.status-done:focus-visible {
  outline: 2px solid var(--success);
  outline-offset: 2px;
}

.status-error {
  background: var(--error-bg);
  color: var(--error);
  cursor: pointer;
}

.status-error:hover {
  background: rgba(240, 107, 107, 0.2);
}

.status-error:focus-visible {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}

/* === 功能1: 重试按钮 === */
.btn-retry {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--warning);
  font-size: var(--text-base);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
  opacity: 0;
  line-height: 1;
  min-width: 2rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-item:hover .btn-retry {
  opacity: 1;
}

.btn-retry:hover {
  color: var(--warning);
  background: var(--warning-bg);
}

.btn-retry:focus-visible {
  outline: 2px solid var(--warning);
  outline-offset: 2px;
  opacity: 1;
}

/* === Delete Button === */
.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
  opacity: 0;
  line-height: 1;
  min-width: 2rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-item:hover .btn-delete {
  opacity: 1;
}

.btn-delete:hover {
  color: var(--error);
  background: var(--error-bg);
}

.btn-delete:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  opacity: 1;
}

/* === Empty State === */
.empty-hint {
  text-align: center;
  color: var(--text-muted);
  padding: var(--sp-10) var(--sp-6);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.empty-hint .empty-icon {
  font-size: 2.25rem;
  margin-bottom: var(--sp-3);
  filter: grayscale(0.5);
  opacity: 0.5;
}

.empty-hint .empty-cta {
  margin-top: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--accent);
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%) translateY(1.25rem);
  background: var(--bg-card-solid);
  color: var(--text-primary);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 250ms var(--ease-enter), transform 250ms var(--ease-enter);
  z-index: 500;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--error); color: var(--error); }

/* 撤销 Toast — 可交互 */
.toast-undo {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.toast-undo-btn {
  background: none;
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.125rem var(--sp-2);
  cursor: pointer;
  font-family: var(--font);
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
  white-space: nowrap;
}

.toast-undo-btn:hover {
  border-color: var(--text-primary);
  color: var(--accent);
}

/* === Responsive — mobile-first min-width === */
@media (max-width: 640px) {
  .container {
    padding: var(--sp-4);
    padding-top: var(--sp-6);
  }

  .header h1 { font-size: var(--text-xl); }

  .upload-zone {
    padding: var(--sp-8) var(--sp-4);
    border-radius: var(--radius-lg);
  }

  .task-item {
    padding: var(--sp-3) var(--sp-4);
  }

  /* 移动端删除/重试按钮始终可见（无悬停） */
  .task-item .btn-delete,
  .task-item .btn-retry {
    opacity: 1;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .result-header-actions .btn,
  .result-header-actions .btn-export {
    flex: 1;
    min-width: calc(50% - var(--sp-1));
  }

  .lang-row {
    flex-wrap: wrap;
  }

  .lang-select {
    min-width: 0;
  }
}

/* === 无障碍：减弱动效 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
