/* tools-slides.css — /tools/slides 本地切片工具页（C3）。
   2026-10-21 视觉改版：参考稿的紧凑顶栏 / 居中 Hero / 大拖放区 / 三列特性条 /
   最近任务列表。深色风格与 entry.css 一致；无内联样式（CSP style-src 'self'）。
   状态同时用文字标签表达，不以颜色为唯一状态信号。 */

:root {
  --bg: #161616;
  --card: #1e1e1e;
  --card-edge: #2c2c2c;
  --text: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.16);
  --danger: #ff5a5f;
  --danger-soft: rgba(255, 90, 95, 0.14);
  --warn: #d9a441;
  --warn-soft: rgba(217, 164, 65, 0.14);
  --ok: #4cc38a;
  --ok-soft: rgba(76, 195, 138, 0.14);
  --focus-ring: 2px solid #7fb8ff;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -48px;
  z-index: 10; padding: 8px 14px;
  background: var(--accent); color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 120ms ease;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------- topbar -- */

.topbar {
  border-bottom: 1px solid var(--card-edge);
  background: linear-gradient(180deg, #1a1a1a, #171717);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 0;
  color: var(--text); text-decoration: none;
}
.brand .site-logo {
  width: 30px; height: 30px; flex: none;
  border-radius: 8px;
}
.brand-name {
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-sep {
  width: 1px; height: 20px; flex: none;
  background: var(--card-edge);
}
.brand-page {
  color: var(--muted); font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-nav {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap; margin-left: auto;
}
.topbar-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 14px;
  white-space: nowrap;
}
.topbar-link:hover { color: var(--text); background: #242424; }
.topbar-support {
  color: #f3c68c;
  background: rgba(243, 198, 140, 0.08);
  border: 1px solid rgba(243, 198, 140, 0.28);
  margin-left: 6px;
}
.topbar-support:hover { color: #ffe0b7; background: rgba(243, 198, 140, 0.16); }
.topbar-icon { flex: none; }

/* 语言切换：地球图标用 CSS mask（i18n 运行时会用 textContent 重写按钮
   文本，因此图标不能是按钮的子节点）。 */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 44px; min-height: 36px; padding: 6px 9px;
  background: transparent; color: var(--muted);
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.lang-toggle::before {
  content: "";
  width: 16px; height: 16px; flex: none;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.6 2.8 2.4 15.2 0 18M12 3c-2.6 2.8-2.4 15.2 0 18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.6 2.8 2.4 15.2 0 18M12 3c-2.6 2.8-2.4 15.2 0 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lang-toggle:hover { color: var(--text); background: #242424; }

/* -------------------------------------------------------------- page -- */

main {
  max-width: 1200px; margin: 0 auto;
  padding: 30px 24px 64px;
  display: flex; flex-direction: column; gap: 22px;
}

.hero { text-align: center; padding: 16px 0 2px; }
.hero h1 {
  margin: 0;
  font-size: 40px; line-height: 1.2; letter-spacing: -0.01em;
}
.hero-subtitle {
  max-width: 720px; margin: 12px auto 0;
  color: var(--muted); font-size: 16px; line-height: 1.6;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 12px;
  padding: 20px 24px;
}
.card > h2 { margin: 0 0 12px; font-size: 18px; }

/* 摘要与结果面板：统一垂直节奏（标题/网格/说明/按钮之间 14px） */
#summary-section,
#result-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#summary-section > *,
#result-section > * {
  margin-top: 0;
  margin-bottom: 0;
}
#result-section #save-status:empty { display: none; }

/* 本地与隐私：并入「完全本地处理」列，作为小号折叠说明 */
.privacy {
  margin-top: 7px;
  background: transparent;
  border: 0; border-radius: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
details.privacy > summary {
  cursor: pointer;
  color: var(--muted);
  overflow-wrap: anywhere;
}
details.privacy > summary:hover { color: var(--text); }
details.privacy > summary::marker { color: var(--muted); }
details.privacy > h3 { margin: 10px 0 6px; font-size: 13px; color: var(--text); }
.privacy-list { margin: 0; padding-left: 18px; color: var(--muted); }
.privacy-list li + li { margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { font-weight: 600; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------ drop zone / picker -- */

/* U2：大拖放区为主入口；file input 视觉隐藏（clip 方式，不用 display:none）。
   P3-16：两个 input 另加 tabindex="-1"，Tab 顺序只经过两个选择按钮（按钮
   打开选择器）。 */
.visually-hidden-input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.drop-zone {
  border: 2px dashed #3c3c3c;
  border-radius: 16px;
  background: #1b1b1b;
  padding: 46px 24px 26px;
  text-align: center;
  cursor: default;
  transition: border-color 120ms ease, background 120ms ease;
}
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop-zone:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}
.drop-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  margin-bottom: 20px;
  border: 1px solid #333; border-radius: 22px;
  background: #242424;
  color: #d6d6d6;
}
.drop-icon svg { width: 42px; height: 42px; }
.drop-zone .drop-title {
  margin: 0;
  font-size: 24px; line-height: 1.3; font-weight: 700;
  letter-spacing: -0.01em;
}
.drop-zone .drop-alt {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}
/* 两个独立选择入口；外框只表示拖放区，鼠标反馈只在按钮上。 */
.drop-actions {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  margin: 22px auto 0;
}
/* 需要 .btn.btn-pick 的双类特异性：.btn 的 display:inline-block 在本文件
   后面声明，单类选择器会把 inline-flex 覆盖掉（图标随基线错位）。 */
.btn.btn-pick {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-width: 200px; min-height: 48px;
  padding: 0 26px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 180ms ease, background-color 160ms ease,
    border-color 160ms ease, box-shadow 180ms ease;
}
.btn-pick .btn-icon { width: 20px; height: 20px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .btn.btn-pick:not(:disabled):hover {
    transform: translateY(-3px) scale(1.025);
    background: #363636;
    border-color: #707070;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  }
  .btn.btn-pick.btn-primary:not(:disabled):hover {
    background: #168cff;
    border-color: #65b4ff;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
  }
}
.btn.btn-pick.btn-primary:not(:disabled):active,
.btn.btn-pick.btn-secondary:not(:disabled):active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.drop-support {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.drop-guidance {
  margin: 6px 0 0;
  color: #858585;
  font-size: 12.5px;
  line-height: 1.6;
}
#input-message { margin: 10px 0 0; }
#input-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  background: #1a1a1a;
  font-size: 12.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------- feature strip -- */

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 12px;
}
.feature {
  display: flex; gap: 14px;
  min-width: 0;
  padding: 22px 24px;
}
.feature + .feature { border-left: 1px solid var(--card-edge); }
.feature-icon { flex: none; color: #cfcfcf; padding-top: 1px; }
.feature-copy { min-width: 0; }
.feature-title { margin: 0; font-size: 15px; font-weight: 700; }
.feature-desc { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* 展开完整支持列表时，特性条改为单列：清单占满整行，避免三列布局被
   一列的长文撑出大面积留白（不支持 :has 的浏览器退回中列内展示）。 */
.feature-strip:has(.support-list[open]),
.feature-strip:has(#privacy-details[open]) { grid-template-columns: 1fr; }
.feature-strip:has(.support-list[open]) .feature + .feature,
.feature-strip:has(#privacy-details[open]) .feature + .feature {
  border-left: 0;
  border-top: 1px solid var(--card-edge);
}

.support-list { margin-top: 8px; }
.support-list > summary {
  display: inline-block;
  padding: 2px 0;
  cursor: pointer;
  color: var(--accent);
  font-size: 13.5px; font-weight: 600;
  list-style: none;
}
.support-list > summary::-webkit-details-marker { display: none; }
.support-list > summary:hover { text-decoration: underline; }
.support-list[open] > summary { margin-bottom: 2px; }

/* -------------------------------------------- stages / config / run -- */

/* U2：准备阶段标题行（标题 + 取消准备按钮同行） */
.stage-head {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  align-items: center; justify-content: space-between;
}
.stage-head h2 { margin: 0; font-size: 18px; }

.output-summary {
  margin: 12px 0 4px;
  font-size: 15px;
}
.output-summary-label {
  display: inline-block;
  color: var(--muted);
  margin-right: 8px;
}
#quality-fieldset { margin: 10px 0 4px; }
#quality-conflict { margin: 10px 0 0; }

/* U2：「更多选项」折叠容器与内部小节（缩进 + 细边框，不是整卡） */
.more-options { margin: 14px 0 4px; }
.more-options > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 2px;
}
.more-options > summary::marker { color: var(--accent); }
.more-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.more-card {
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  padding: 14px 16px;
  background: #1a1a1a;
}
.more-card > h3 { margin: 0 0 10px; font-size: 15px; }

input[type="file"] {
  color: var(--text);
  background: #232323;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  padding: 10px 12px;
  max-width: 480px;
}
input[type="file"]::file-selector-button {
  background: var(--accent); color: #fff; border: 0;
  border-radius: 6px; padding: 7px 14px; margin-right: 12px;
  font: inherit; cursor: pointer;
}

/* the hidden attribute must win over component display rules */
[hidden] { display: none !important; }

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 18px;
  font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
  color: var(--text);
  background: #2a2a2a;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: #2a2a2a; border-color: #3a3a3a; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] {
  opacity: 0.55; cursor: not-allowed;
  outline: 2px solid transparent;
}
.run-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.progress {
  position: relative;
  height: 14px;
  background: #262626;
  border: 1px solid #383838;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 180ms ease;
}
/* NEW-a：完成态直接落 100% —— 不让 180ms 过渡在复核/截图时停在中间值 */
.progress.progress-done .progress-bar { transition: none; }
/* U1：无量化信息的阶段（排队/服务端接收/校验/重试等待）——不定态活动指示 */
.progress.indeterminate .progress-bar {
  width: 30%;
  animation: tools-progress-slide 1.2s ease-in-out infinite;
}
@keyframes tools-progress-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}
@media (prefers-reduced-motion: reduce) {
  .progress.indeterminate .progress-bar { animation: none; }
}
.progress-bytes, .stage-status { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.stage-status { font-size: 14px; }
/* 转换卡的任务名（与任务行同一 folderName||name 规则） */
.run-job { margin: 0 0 6px; color: var(--text); font-size: 13.5px; font-weight: 600; }

.probe-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
}
.probe-grid dt { color: var(--muted); }
.probe-grid dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .probe-grid { grid-template-columns: 1fr; gap: 2px; }
  .probe-grid dd { margin-bottom: 8px; }
}

.radio-row { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.radio-option { display: flex; gap: 10px; align-items: flex-start; }
.radio-option input[type="radio"] {
  width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent);
  flex: none;
}
/* NEW-b：锁定（disabled）后原生 radio 会被浏览器画成灰点，已选项看不出
   选中。禁用态改用自绘圆环/圆点：选中项保持强调色，未选项为中性灰。 */
.radio-option input[type="radio"]:disabled {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #555;
  border-radius: 50%;
  background: transparent;
  opacity: 1;
}
.radio-option input[type="radio"]:disabled:checked {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 4.5px, transparent 5px);
}
.radio-option input[type="radio"]:disabled:not(:checked) { opacity: 0.6; }
.radio-option input[type="radio"]:disabled + label { cursor: not-allowed; }
.radio-option input[type="radio"]:disabled:not(:checked) + label { opacity: 0.7; }
.radio-option label { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.opt-title { font-weight: 600; }
.opt-desc { color: var(--muted); font-size: 13px; }

.error-panel {
  margin: 0; padding: 12px 16px;
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.error-panel::before { content: "✖ "; }
.status-panel { margin: 0; color: var(--muted); }
.warn-panel {
  margin: 10px 0 0; padding: 10px 14px;
  border: 1px solid var(--warn);
  background: var(--warn-soft);
  border-radius: 8px;
}
.warn-panel::before { content: "⚠ "; }

/* ---- MRXS 同名数据文件夹协助（先选 .mrxs → 提示补选同名文件夹）---------
   非错误的中性面板：正文走 aria-live 状态区，主按钮聚焦；动作左对齐，窄屏
   纵向堆叠。 */
.companion-section { display: flex; flex-direction: column; gap: 10px; }
.companion-section .status-panel { color: var(--text); }
.companion-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 4px;
}

/* --------------------------------------------------------- job list -- */

.jobs-list { display: flex; flex-direction: column; }
details.card > summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}
details.card > summary::marker { color: var(--muted); }
details.card > .hint { margin: 10px 0 4px; }
.jobs-summary {
  display: flex; align-items: center; gap: 10px;
  list-style: none;
}
.jobs-summary::-webkit-details-marker { display: none; }
.jobs-icon { flex: none; color: var(--muted); }
/* 自绘折叠箭头（summary 用 flex 后原生 marker 会被隐藏） */
.jobs-summary::after {
  content: "";
  width: 8px; height: 8px;
  margin-left: auto;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 120ms ease;
}
#jobs-details[open] .jobs-summary::after { transform: rotate(-135deg); }

.job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--card-edge);
}
.job-main { min-width: 0; }
.job-name { margin: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.job-meta { margin: 3px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.job-state {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  border: 1px solid #3f3f3f;
  background: #232323;
  color: var(--muted);
  white-space: nowrap;
}
.job-state::before {
  content: "";
  width: 7px; height: 7px; flex: none;
  border-radius: 50%;
  background: currentColor;
}
.job-state[data-tone="ok"] { border-color: var(--ok); background: var(--ok-soft); color: #8fe0b3; }
.job-state[data-tone="warn"] { border-color: var(--warn); background: var(--warn-soft); color: #eac57a; }
.job-state[data-tone="err"] { border-color: var(--danger); background: var(--danger-soft); color: #ff9296; }
.job-state[data-tone="run"] { border-color: var(--accent); background: var(--accent-soft); color: #8cc4ff; }
.job-details { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.job-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: flex-end;
}
.job-actions .btn { padding: 6px 14px; font-size: 13.5px; }
/* 列表里的删除是次要动作：静音危险样式，避免整行被红色主导 */
.job-actions .btn-danger {
  background: transparent;
  border-color: rgba(255, 90, 95, 0.45);
  color: #ff9296;
}
.job-actions .btn-danger:hover { background: var(--danger-soft); }

/* 复核（390px 任务行按钮压住状态徽章；768px 三列挤压名称逐字换行）：
   ≤768px 任务行改单列纵排（名称/摘要 → 状态 → 操作）——状态徽章完整
   可读，按钮按需换行，各行不重叠、不超出面板 */
@media (max-width: 768px) {
  .job-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .job-main, .job-status-cell, .job-actions { grid-column: 1; }
  .job-status-cell { justify-self: start; }
  .job-actions { justify-self: start; }
}
/* P3-17 / P2-10：不可点击的行内状态（运行中 / 产物已被清理）——与按钮
   同尺寸但明确不是动作 */
.job-action-status {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 8px;
  border: 1px dashed #3a3a3a;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.job-action-status.err { border-color: rgba(255, 90, 95, 0.45); color: #ff9296; }
.jobs-empty { color: var(--muted); margin: 0; }

/* ----------------------------------------------------------- dialog -- */

dialog {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 20px 22px;
  max-width: 560px;
  width: calc(100vw - 48px);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.dialog-form h2 { margin: 0 0 10px; font-size: 17px; }
.dialog-form p { margin: 0 0 16px; color: var(--muted); white-space: pre-wrap; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---- 保存到我的项目（移交工作台上传）-------------------------------- */
#save-project-dialog { min-width: min(30rem, 92vw); }
.saveproj-file { margin: 0 0 10px; color: var(--text); font-weight: 600; }
.saveproj-status { margin: 0 0 10px; color: var(--muted); }
.saveproj-line {
  margin: 0 0 10px;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 0;
  flex-wrap: wrap;
  min-width: 0;
}
.saveproj-line strong {
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
}
.saveproj-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.saveproj-field span { color: var(--muted); font-size: 13px; }
.saveproj-field .select,
.saveproj-field .input {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 8px 10px;
}
.saveproj-error {
  margin: 0 0 10px;
  color: var(--danger);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.footer {
  border-top: 1px solid var(--card-edge);
  margin-top: 20px;
}
.footer-note {
  max-width: 1200px; margin: 0 auto;
  padding: 18px 24px;
  color: var(--muted); font-size: 13px;
}
.footer-note p { margin: 0; }
/* 页脚支持入口：独立的暖色提示区与按钮。 */
.footer-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 18px;
  padding: 20px 24px;
  border: 1px solid rgba(243, 198, 140, 0.3);
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(243, 198, 140, 0.09), rgba(243, 198, 140, 0.03));
  color: var(--text);
  font-size: 15px;
}
.footer-support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid #f3c68c;
  border-radius: 8px;
  background: #f3c68c;
  color: #271d11;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.footer-support-link:hover { background: #ffdaaa; border-color: #ffdaaa; }
.footer-support-link svg { flex: none; }
.footer-support-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* 可见焦点（键盘操作；不以颜色区分状态） */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.brand:focus-visible,
.topbar-link:focus-visible,
.support-list > summary:focus-visible,
.lang-toggle:focus-visible { outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, input[type="file"]:focus-visible { outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
  .btn.btn-pick { transform: none !important; }
}

/* ------------------------------------------------------- responsive -- */

@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; padding: 12px 16px; gap: 8px 12px; }
  .brand-sep, .brand-page { display: none; }
  .topbar-nav { gap: 2px; }
  .topbar-link { padding: 6px 8px; }
}

@media (max-width: 640px) {
  main { padding: 22px 16px 48px; gap: 16px; }
  .hero { padding-top: 8px; }
  .hero h1 { font-size: 30px; }
  .hero-subtitle { font-size: 14.5px; }
  .card { padding: 16px; }

  .feature-strip { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--card-edge); }
  .feature { padding: 18px 16px; }

}

@media (max-width: 480px) {
  .topbar-nav { width: 100%; justify-content: space-between; }
  .topbar-link { padding: 7px 6px; gap: 4px; font-size: 13px; }
  .topbar-support { margin-left: 0; }
  .lang-toggle { padding: 6px 4px; gap: 4px; }
  .footer-support { flex-direction: column; align-items: stretch; padding: 18px; }
  .drop-zone { padding: 34px 16px 22px; }
  .drop-zone .drop-title { font-size: 20px; }
  .drop-zone .drop-alt { font-size: 14px; }
  .drop-actions { flex-direction: column; align-items: stretch; }
  .btn-pick { width: 100%; }
}

@media (max-width: 400px) {
  .run-actions { flex-direction: column; align-items: stretch; }
  .run-actions .btn { width: 100%; }
}

/* C4 上传接入：结果面板上传块 + 任务行上传状态（文字为主，色调仅辅助） */
.upload-block { margin-top: 14px; }
.job-upload-state { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.job-upload-state[data-upload-state] { min-height: 1em; }
.job-upload-state.ok { color: var(--ok); }
.job-upload-state.err { color: var(--danger); }
.job-upload-state.run { color: var(--accent); }
.job-upload-state a { color: var(--accent); }

/* 2026-10-20：无保存 API 时禁用新转换入口（guard 在 prepareSource/
   onFilePicked/onFolderPicked/onDirectoryDropped；既有任务查看/删除照常） */
.drop-zone-disabled { opacity: 0.55; cursor: not-allowed; }
/* 禁用态拖入不再高亮（旧规则引用了未定义的 --hover） */
.drop-zone-disabled.dragover { border-color: #3c3c3c; background: #1b1b1b; }
/* 忙态（准备/转换/任务列表续跑）：拖放区不显示「可接收」的视觉，但保留
   drop 处理器给出「正在转换中」的说明（P1-4 / P2-6） */
.drop-zone-busy { cursor: progress; }
.drop-zone-busy.dragover { border-color: #3c3c3c; background: #1b1b1b; }
