/* 自动答题系统框架 —— 控制台样式
   零构建、零依赖。响应式：≥900px 左侧栏，<900px 底部 tab 栏。
   颜色走 CSS 变量，跟随系统明暗 + 手动切换。 */

/* ---------------------------------------------------------------- 变量 */
:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --border: #e3e3e3;
  --border-strong: #cfcfcf;
  --text: #151515;
  --text-dim: #676767;
  --text-faint: #9b9b9b;
  --accent: #111111;
  --accent-soft: #ececec;
  --accent-text: #ffffff;
  /* 实心按钮 hover 时的底色。见 .btn-primary:hover 那段注释：
     不能借用 --surface-2，那是浅底，配白字就是白底白字。 */
  --accent-hover: #333333;
  /* 语义色也全是灰。所以「通过 / 警告 / 失败」**不能靠色相区分** ——
     徽章与圆点另有边框/形状线索，见下面的 .badge-* / .dot-*；
     而它们本来也都带着字（「通过」「失败」），那才是主线索。 */
  --ok: #1a1a1a;
  --ok-soft: #ededed;
  --warn: #4d4d4d;
  --warn-soft: #f0f0f0;
  --err: #000000;
  --err-soft: #e6e6e6;
  --err-hover: #333333;
  --info: #6b6b6b;
  --info-soft: #f0f0f0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 12px rgba(0, 0, 0, .05);
  --radius: 10px;
  --radius-sm: 6px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --nav-w: 232px;
}

/* 深色的那一套在下面出现了两次（手动切换 / 跟随系统），**两处必须同步改**。
   纯灰阶在这里是反过来的：浅色主题里 --accent 是近黑，深色里就该是近白，
   否则按钮在深色底上会糊成一片。 */
[data-theme="dark"] {
  --bg: #0e0e0e;
  --surface: #161616;
  --surface-2: #1e1e1e;
  --border: #2b2b2b;
  --border-strong: #3e3e3e;
  --text: #eaeaea;
  --text-dim: #a5a5a5;
  --text-faint: #767676;
  --accent: #f2f2f2;
  --accent-soft: #262626;
  --accent-text: #111111;
  /* 深色里 --accent 是近白，hover 要**变暗**才看得出变化 */
  --accent-hover: #d0d0d0;
  --ok: #f0f0f0;
  --ok-soft: #242424;
  --warn: #c9c9c9;
  --warn-soft: #222222;
  --err: #ffffff;
  --err-soft: #2e2e2e;
  --err-hover: #d0d0d0;
  --info: #9a9a9a;
  --info-soft: #242424;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e; --surface: #161616; --surface-2: #1e1e1e;
    --border: #2b2b2b; --border-strong: #3e3e3e;
    --text: #eaeaea; --text-dim: #a5a5a5; --text-faint: #767676;
    --accent: #f2f2f2; --accent-soft: #262626; --accent-text: #111111;
    --accent-hover: #d0d0d0;
    --ok: #f0f0f0; --ok-soft: #242424;
    --warn: #c9c9c9; --warn-soft: #222222;
    --err: #ffffff; --err-soft: #2e2e2e; --err-hover: #d0d0d0;
    --info: #9a9a9a; --info-soft: #242424;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  }
}

/* ---------------------------------------------------------------- 基础 */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.3; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

p { margin: 0 0 10px; }

code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }

pre {
  margin: 0;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: 420px;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 布局 */
.app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { padding: 4px 10px 16px; }
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { color: var(--text-faint); font-size: 11.5px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; flex: none; }

.sidebar-foot { margin-top: auto; padding: 10px; color: var(--text-faint); font-size: 11.5px; }

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar .spacer { flex: 1; }

.content { padding: 20px; max-width: 1280px; width: 100%; }

/* ---------------------------------------------------------------- 组件 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-pad { padding: 16px; }

.section { margin-bottom: 20px; }
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.section-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.break { word-break: break-word; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.hidden { display: none !important; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: inherit; font-size: 13.5px; font-weight: 550;
  cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
/* 实心按钮 hover 时换的是**自己那点色**，不是 .btn:hover 给的 --surface-2。
   借用浅底会踩一个很隐蔽的坑：.btn:hover 的优先级压过 .btn-primary 的 background，
   但压不过它的 color —— 于是浅底配 `--accent-text`（浅色主题下是白），
   鼠标一放上去，按钮上的字就凭空没了。实心按钮只能配实心色。 */
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover); border-color: var(--accent-hover);
}
/* 用 --accent-text 而不是写死 #fff：深色主题里 --err 是近白，
   写死白字会变成「白底白字」——按钮直接消失。这个变量就是「压在实色上的字」。 */
.btn-danger { background: var(--err); border-color: var(--err); color: var(--accent-text); }
.btn-danger:hover:not(:disabled) {
  background: var(--err-hover); border-color: var(--err-hover);
}
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: 12.5px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-dim); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
}
/* 全灰之后色相不再能区分状态，所以每种状态另给一条**形状**线索：
   通过=实线描边、警告=虚线描边、失败=左侧粗竖条、信息=只靠底色。
   文字标签（「通过」「失败」）才是主线索，这里只是为了让人扫一眼就能分组。 */
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn);
              border-style: dashed; }
.badge-err { background: var(--err-soft); color: var(--err); border-color: transparent;
             border-left: 3px solid var(--err); border-radius: var(--radius-sm); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-off { opacity: .6; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.dot-ok { background: var(--ok); }
.dot-warn { background: transparent; box-shadow: inset 0 0 0 2px var(--warn); }
/* 实心 + 外圈：与实心的 dot-ok 一眼能分开，又不依赖颜色。
   outline 不吃布局，也不会被父元素的 overflow 裁掉。 */
.dot-err { background: var(--err); outline: 2px solid var(--err); outline-offset: 1px; }
.dot-idle { background: var(--text-faint); }
.dot-run { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }

/* 能力胶囊 */
.caps { display: flex; flex-wrap: wrap; gap: 4px; }
.cap {
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: var(--mono);
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.cap-on { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); font-weight: 600; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: 12.5px; }
.field .hint { color: var(--text-faint); font-size: 11.5px; }
.field .req { color: var(--err); }

/* 布尔项：整个「方框 + 文字」是一行 44px 的可点区域。
   裸 checkbox 只有 13px 见方，在触屏上基本点不中 —— 点不中就等于这个设置不存在。
   min-height: 0 是必需的：不加的话上面的 input 规则会把它撑成整行高。 */
.field .check {
  display: flex; align-items: center; gap: 9px;
  min-height: 44px; cursor: pointer;
}
.field .check input[type="checkbox"] {
  width: 18px; height: 18px; min-height: 0; flex: none; margin: 0;
  accent-color: var(--accent); cursor: pointer;
}

/* search 也是单行文本框。漏掉它的后果不只是 21px 太矮：
   它会退回浏览器默认外观，在整页统一控件里显得像没写完。 */
input[type="text"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
}
textarea { min-height: 72px; font-family: var(--mono); font-size: 12.5px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select { cursor: pointer; }


/* 表格 —— 窄屏自动变卡片 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 600; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }

/* 日志 */
.log {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  padding: 8px 0;
  overflow-y: auto;
  max-height: 460px;
  min-height: 160px;
}
.log-line { display: flex; gap: 8px; padding: 2px 12px; }
.log-line:hover { background: var(--surface); }
.log-seq { color: var(--text-faint); flex: none; min-width: 34px; text-align: right; }
.log-msg { white-space: pre-wrap; word-break: break-word; min-width: 0; }
.log-info .log-msg { color: var(--text-dim); }
.log-warning .log-msg { color: var(--warn); }
.log-error .log-msg { color: var(--err); }
.log-status .log-msg { font-weight: 700; }
.log-progress .log-msg { color: var(--info); }

/* 进度条 */
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .25s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); margin-bottom: 4px; }

/* 空状态 */
.empty { padding: 40px 20px; text-align: center; color: var(--text-faint); }
.empty h3 { color: var(--text-dim); margin-bottom: 6px; }

/* 提示条 */
.note {
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 12.5px; border: 1px solid transparent;
}
.note-info { background: var(--info-soft); color: var(--text); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.note-warn { background: var(--warn-soft); color: var(--text); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.note-err { background: var(--err-soft); color: var(--text); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.note-ok { background: var(--ok-soft); color: var(--text); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }

/* Toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast {
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); font-size: 13px;
  animation: slideIn .18s ease;
}
.toast-err { border-color: var(--err); }
.toast-ok { border-color: var(--ok); }
@keyframes slideIn { from { transform: translateY(6px); opacity: 0 } to { transform: none; opacity: 1 } }

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 200;
}
.modal-box { max-width: 480px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; }
.modal-head { justify-content: space-between; align-items: center; gap: 8px; }
.modal-head h2 { margin: 0; }
.modal-body { overflow: auto; margin: 10px 0 0; min-height: 0; }

/* 单选行（账号选择、模型选择）。整行 44px 可点 —— 触屏上点不中就等于没有这个选项。 */
.pick-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit;
}
.pick-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pick-row.on { border-color: var(--accent); background: var(--accent-soft); }
.pick-row .pick-main { flex: 1; min-width: 0; }
.pick-row .pick-sub { font-size: 11.5px; color: var(--text-faint); }
.pick-list { display: flex; flex-direction: column; gap: 6px; }

/* 题目 / 结果 */
.q { padding: 12px 0; border-bottom: 1px solid var(--border); }
.q:last-child { border-bottom: none; }
.q-stem { font-weight: 550; margin-bottom: 6px; }
.opts { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.opt { font-size: 12.5px; color: var(--text-dim); }
.opt-on { color: var(--ok); font-weight: 600; }
.answer { font-family: var(--mono); font-size: 12px; color: var(--ok); }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-v { font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat-k { font-size: 11.5px; color: var(--text-faint); }

.meter { display: flex; gap: 16px; flex-wrap: wrap; }

/* 代码块 / 详情折叠 */
details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface-2); }
details summary { cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--text-dim); }
details[open] summary { margin-bottom: 8px; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    height: auto; flex-direction: row; justify-content: space-around;
    border-right: none; border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 50;
    gap: 0;
  }
  .brand, .sidebar-foot { display: none; }
  .nav-item {
    flex-direction: column; gap: 2px; padding: 6px 4px;
    font-size: 10.5px; min-height: 48px; justify-content: center; text-align: center;
  }
  .nav-item .ico { width: auto; font-size: 17px; }
  .main { padding-bottom: 68px; }
  .content { padding: 14px; }
  .topbar { padding: 10px 14px; }
  .grid-cards { grid-template-columns: 1fr; }

  /* 表格转卡片：每个 td 前面的 data-label 变成行内标签 */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; padding: 6px 10px; background: var(--surface); }
  .table td { border: none; padding: 3px 0; }
  .table td[data-label]::before {
    content: attr(data-label) "：";
    color: var(--text-faint); font-size: 11px; font-weight: 600;
    display: inline-block; min-width: 64px;
  }
  .log { max-height: 300px; }
  /* 触摸目标 ≥44px（含 .btn-sm —— 手指不会因为是「小按钮」就变小）。
     选择器要和基础规则写得一样具体，否则 input[type="number"] 会把 min-height 又压回 38px。
     min-width 是给「只有一个 emoji 的按钮」准备的（主题切换），光有高度也点不中。 */
  .btn, .btn-sm { min-height: 44px; min-width: 44px; }
  input[type="text"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
    min-height: 44px;
  }
}

@media (max-width: 400px) {
  .content { padding: 10px; }
  .card-pad { padding: 12px; }
}

/* 答题流程的步骤卡片 */
.step-card { position: relative; }
.step-off { opacity: .6; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: none; margin-right: 8px;
  border-radius: 50%; background: var(--accent); color: var(--accent-text);
  font-size: 11.5px; font-weight: 700;
}
.step-off .step-no { background: var(--border-strong); }
.step-body { margin-top: 8px; }

/* 「选一条继续」的条目：整行可点，触屏上有 44px 落点 */
.pick-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  min-height: 44px; padding: 8px 11px; text-align: left;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; cursor: pointer;
}
.pick-item:hover { background: var(--surface-2); }
.pick-item.pick-on { border-color: var(--accent); background: var(--accent-soft, var(--surface-2)); }
.pick-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 登录闸门：盖住整个控制台。后端没设 AA_TOKEN 时根本不会出现。 */
.login-wrap {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: var(--bg);
}
.login-card { width: 100%; max-width: 380px; }
.login-card .field { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- 客户端向导
   「开始」这条路的样式。目标是舒适：一步一屏、按钮够大、要点的地方够好点。 */

.btn-lg { min-height: 52px; padding: 0 28px; font-size: 15.5px; font-weight: 600; border-radius: 12px; }

.wiz-hero { text-align: center; padding: 36px 20px; }
.wiz-hero-ico { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.wiz-hero h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.wiz-hero p { margin: 0 auto 20px; max-width: 30em; }
.wiz-title { margin: 0 0 10px; font-size: 16px; }

/* 步骤条：只告诉用户"走到哪了"，不抢注意力 */
.wiz-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.wiz-step { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
            background: var(--surface-2); border: 1px solid var(--border); color: var(--text-faint); }
.wiz-step .wiz-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--border-strong);
                     color: var(--text); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.wiz-step .wiz-label { font-size: 12px; }
.wiz-step.wiz-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.wiz-step.wiz-on .wiz-dot { background: var(--accent); color: var(--accent-text); }
.wiz-step.wiz-done { color: var(--ok); }
.wiz-step.wiz-done .wiz-dot { background: var(--ok); color: var(--surface); }

/* 平台卡片：整块可点 */
.plat-card { display: block; width: 100%; text-align: left; cursor: pointer;
             background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
             padding: 14px; color: inherit; font: inherit; text-decoration: none; }
.plat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.plat-card strong { font-size: 14.5px; }
.plat-card p { margin: 8px 0; }

/* 文章行：整行可点，勾选区域远大于 44px */
.art-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
           background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
           padding: 13px 14px; min-height: 44px; }
.art-row:hover { border-color: var(--border-strong); }
.art-row.art-on { border-color: var(--accent); background: var(--accent-soft); }
.art-row input[type="checkbox"] { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.art-main { min-width: 0; flex: 1; }
.art-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }

/* 底部动作条：列表很长时「开始答题」也不该需要滚到底才能按到 */
.wiz-foot { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); margin-top: 6px; }

/* 批量进度 */
.wiz-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.wiz-bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }

.batch-row { display: flex; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.batch-row:last-child { border-bottom: none; }
.batch-ico { width: 20px; text-align: center; font-weight: 700; flex: none; }
.batch-title { font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-ok .batch-ico { color: var(--ok); }
.batch-err .batch-ico { color: var(--err); }
.batch-running .batch-ico { color: var(--accent); }
.batch-wait { opacity: .55; }
.err-text { color: var(--err); }

@media (max-width: 900px) {
  .wiz-hero { padding: 26px 16px; }
  .wiz-hero-ico { font-size: 38px; }
  .wiz-foot { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .wiz-step .wiz-label { display: none; }
  .wiz-step { padding: 6px 8px; }
}
