:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f3f3f3;
  --line: #e6e6e6;
  --line-strong: #c9c9c9;
  --text: #111111;
  --muted: #6f6f6f;
  --faint: #9a9a9a;
  --solid: #111111;
  --on-solid: #ffffff;
  --panel: #ffffff;
  --radius: 6px;
  /* 强调色：仅用于「创建新任务」这类核心入口与操作指引红字，其余界面保持黑白 */
  --accent: #d93025;
  --on-accent: #ffffff;
  --accent-soft: #fdeceb;
  /* 骨架尺寸：顶栏内容与 .wrap 共用同一套数值 */
  --shell-max: 1080px;   /* 内容区最大宽度 */
  --shell-pad: 24px;     /* .wrap 左右内边距 */
  --shell-top: 28px;     /* .wrap 上内边距；也用作「收底」页面的下内边距，让上下留白一致 */
  --card-pad: 16px;      /* .card .bd 内边距 */
  --card-border: 1px;    /* .card 边框 */
  /* 内容区缩进「卡片内边距 + 卡片边框」后的内缘位置：
     .page-head 右端按钮（列表页「创建新任务」、详情页「返回列表」）靠它对齐卡片内缘 */
  --shell-inset: calc(var(--shell-pad) + var(--card-pad) + var(--card-border));
  /* 顶栏左右留白 = 上面这个缩进的**一半**：顶栏比内容卡片更宽、更贴屏幕边缘。
     只作用于顶栏，卡片自身的对齐基准（--shell-inset）不变。 */
  --shell-inset-half: calc(var(--shell-inset) / 2);
  /* 登录 / 注册页：窄屏时卡片左右各留这么多空，不贴屏幕边 */
  --auth-gutter: 24px;
}

[data-theme="dark"] {
  --bg: #101010;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --line: #2b2b2b;
  --line-strong: #434343;
  --text: #ededed;
  --muted: #a1a1a1;
  --faint: #7d7d7d;
  --solid: #ededed;
  --on-solid: #101010;
  --panel: #171717;
  --accent: #ff6b5e;
  --on-accent: #200f0d;
  --accent-soft: #2c1a18;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 页面永不左右滚动：overflow-x: clip 只做裁剪、不产生滚动容器（不影响 sticky 顶栏），
     hidden 作为老浏览器兜底；overscroll-behavior-x 关掉横向的「甩动/回弹」 */
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  overscroll-behavior-x: none;
  /* 触摸手势只走纵向（保留双指缩放），横向滑动不再带动页面 */
  touch-action: pan-y pinch-zoom;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; }

/* ---------- layout ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  /* 顶栏左右留白 = --shell-inset 的一半（宽屏时再叠加内容区居中留出空白的一半）：
     顶栏比卡片更宽、更贴屏幕边缘；卡片一侧的对齐基准不受影响。 */
  padding: 0 max(
    var(--shell-inset-half),
    calc((100% - var(--shell-max)) / 4 + var(--shell-inset-half))
  );
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  font-weight: 700;
  letter-spacing: .5px;
  font-size: 15px;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0;
  line-height: 1.2;
}
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }

.wrap { max-width: var(--shell-max); margin: 0 auto; padding: var(--shell-top) var(--shell-pad) 80px; }
.wrap.tight { max-width: 860px; }
/* 以卡片收尾的页面（创建新任务）：卡片下方的留白收到与上方一致，不再拖一大段空白 */
.wrap.wrap-snug { padding-bottom: var(--shell-top); }

/* ---------- typography ---------- */
h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: .2px; }
h2 { font-size: 15px; margin: 0; font-weight: 650; }
h3 { font-size: 13px; margin: 0; font-weight: 650; color: var(--muted); letter-spacing: .4px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 12px;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: background .12s, border-color .12s, opacity .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.btn.primary:hover { background: var(--solid); opacity: .85; }
.btn.danger { border-color: var(--solid); color: var(--solid); }
/* 红色主入口：用于「创建新任务」，以及列表里完成后的「结果下载」（同为行动按钮） */
.btn.accent {
  background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: 600;
}
.btn.accent:hover { background: var(--accent); border-color: var(--accent); opacity: .88; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* 锚点做按钮（如邮箱栏的「一键查看」）：去掉下划线，视觉与 <button> 完全一致 */
a.btn { text-decoration: none; }

/* ---------- inputs ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--solid); }
textarea { resize: vertical; min-height: 88px; }
label.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* ---------- 分段控件（替代下拉框） ---------- */
.seg {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: var(--radius); overflow: hidden; background: var(--panel);
}
.seg button {
  border: none; background: transparent; color: var(--muted);
  padding: 7px 12px; cursor: pointer; font-size: 13px;
  border-right: 1px solid var(--line); white-space: nowrap;
}
.seg button:last-child { border-right: none; }
.seg button:hover { background: var(--surface-2); color: var(--text); }
.seg button.on { background: var(--solid); color: var(--on-solid); font-weight: 600; }
.seg button.on:hover { background: var(--solid); color: var(--on-solid); }
.seg.sm button { padding: 4px 10px; font-size: 12px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel); color: var(--muted);
  padding: 4px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.chip-btn:hover { background: var(--surface-2); color: var(--text); }
.chip-btn.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); font-weight: 600; }
.chip-btn .cnt { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- 主题切换 ---------- */
.theme-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); cursor: pointer; font-size: 15px; line-height: 1;
}
.theme-btn:hover { background: var(--surface-2); }

/* ---------- cards / panels ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.card .hd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card .bd { padding: var(--card-pad); }
.card .bd.tight { padding: 12px var(--card-pad); }

.panel-soft { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }

/* ---------- header strip ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
  /* 右端按钮（列表页「创建新任务」、详情页「返回列表」等）与卡片内缘对齐：
     缩进「卡片内边距 + 卡片边框」，于是这些按钮与卡片右内缘落在同一条竖线上。 */
  padding-right: calc(var(--card-pad) + var(--card-border));
}
/* 列表页页头：标题与「创建新任务」不分开在两端，而是当作一个整体水平居中，中间留白 24px。
   居中时必须去掉上面那个为贴右缘而加的右缩进，否则整组会左偏一半缩进。
   其它页头（详情、通知、后台）保持两端排布，不受影响。 */
.page-head.center {
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding-right: 0;
}
.quota {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 12px; font-size: 13px; color: var(--muted);
  background: var(--surface);
}
.quota b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; background: var(--panel);
}
.stat .n { font-size: 24px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); }
.stat.alert { border-color: var(--solid); background: var(--solid); color: var(--on-solid); }
.stat.alert .l { color: var(--on-solid); opacity: .75; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 12px; border: none; background: none; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--solid); font-weight: 600; }
.tab .cnt { color: var(--faint); font-size: 12px; margin-left: 4px; }

/* ---------- table ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface);
}
table.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: var(--surface); }
table.tbl .rowlink { cursor: pointer; }
.cell-title { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--faint); }
/* 列表里每个任务：上行「任务名 + 小字编号」，下行三列「开始时间 / 状态 / 结果下载」。
   中间列用 1fr auto 1fr —— 左右两列等宽，状态与两侧内容宽窄无关，永远居中；
   右列在未完成时留空但仍占位，因此状态不会左右跳动。 */
.task-meta {
  /* minmax(0, 1fr)：两侧轨道可以收缩到 0，内容再长也不会把整行顶出容器（页面不会横向溢出） */
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 12px; margin-top: 10px;
}
.task-meta > * { min-width: 0; }
.task-meta .tm-time {
  text-align: left; font-size: 12px; color: var(--faint); white-space: nowrap;
}
.task-meta .tm-status {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.task-meta .tm-result { display: flex; align-items: center; justify-content: flex-end; }
/* 时间后面的小字后缀（「开始」），无前缀标签 */
.task-meta .tm-k { color: var(--faint); font-size: 12px; margin-left: 4px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- status chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 2px 9px; font-size: 12px; background: var(--panel); color: var(--text);
  white-space: nowrap;
}
.chip .ic { font-size: 11px; line-height: 1; }
.chip.s-draft { border-style: dashed; color: var(--muted); }
.chip.s-queued { background: var(--surface-2); }
.chip.s-processing { border-color: var(--solid); }
.chip.s-awaiting_supplement { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.chip.s-completed { border-color: var(--solid); font-weight: 600; }
.chip.s-cancelled { color: var(--faint); border-color: var(--line); }

.flag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; border: 1px solid var(--solid); border-radius: 4px;
  padding: 1px 6px; background: var(--solid); color: var(--on-solid);
}
.flag.soft { background: var(--panel); color: var(--solid); }

/* ---------- file list ---------- */
.files { display: flex; flex-direction: column; gap: 0; }
.file {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.file:last-child { border-bottom: none; }
.file .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .meta { font-size: 12px; color: var(--faint); white-space: nowrap; }
.file .ops { display: flex; gap: 6px; }

/* ---------- timeline ---------- */
.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.tl-item:last-child { border-bottom: none; }
.tl-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--solid); margin-top: 8px; flex: none; }
.tl-item .dot.light { background: var(--line-strong); }
.tl-item .tx { flex: 1; }
.tl-item .tm { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* ---------- notifications ---------- */
.notif {
  display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.notif:hover { background: var(--surface); }
.notif.unread { background: var(--surface); }
.notif .bd2 { flex: 1; min-width: 0; }
.notif .t { font-weight: 600; font-size: 13px; }
.notif .d { font-size: 12px; color: var(--muted); }
.notif .tm { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* ---------- drawer ---------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 40; display: flex; justify-content: flex-end;
}
.drawer {
  width: min(720px, 100%); background: var(--panel); height: 100%;
  overflow-y: auto; border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.drawer .dh {
  position: sticky; top: 0; background: var(--panel); z-index: 2;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.drawer .db { padding: 18px 20px 40px; }

/* ---------- modal ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--panel); border-radius: var(--radius); width: min(460px, 100%);
  border: 1px solid var(--line);
}
.modal .mh { padding: 16px 20px 0; font-weight: 650; }
.modal .mb { padding: 12px 20px; }
.modal .mf { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- auth ---------- */
/* 登录 / 注册页：整列水平居中，且**左右留空** ——
   max-width 取「380px」与「可用宽度 - 左右各一份 --auth-gutter」的较小者，
   宽屏时卡片仍是 380px，窄屏时自动让出两侧空隙、不贴屏幕边。 */
.auth-box {
  max-width: min(380px, calc(100% - 2 * var(--auth-gutter)));
  margin: 8vh auto 0;
}
/* 顶部品牌名与副标题居中，与下方卡片共用同一条中轴 */
.auth-box .logo, .auth-box .sub { text-align: center; }
.auth-box .logo { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
/* 副标题（「请在电脑浏览器中使用本平台」）：保持灰色弱化，不用红字 */
.auth-box .sub { color: var(--muted); font-size: 13px; margin: 4px 0 22px; }
.auth-box .card { padding: 4px 0; }

.auth-links {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 10px; margin-top: 14px; font-size: 13px; line-height: 1.4;
}
.field-note { font-style: normal; color: var(--faint); font-size: 12px; }
.lnk {
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
  font-size: 13px;
}
.lnk:hover { color: var(--text); }

.or-line {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
  color: var(--faint); font-size: 12px;
}
.or-line::before, .or-line::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.btn.oauth { width: 100%; padding: 10px 14px; }
.btn.oauth .wx-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 4px; background: #07c160; color: #fff;
  font-size: 11px; line-height: 1;
}

a.link { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
a.link:hover { color: var(--solid); }

/* ---------- 创建任务：任务选择（单选小卡片，替代下拉框） ---------- */
/* 卡片宽度随文字（任务名保持单行），横向排满容器就自动换行——不固定列数、不出现横向滚动 */
.type-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 100%;
}
/* 强行另起一行：占满整行宽度的 0 高占位，把后面的卡挤到下一行（卡本身仍是文字宽度）。
   上下负 margin 抵消 flex 的 8px 间距，换行处的行距仍保持 8px。 */
.type-brk { flex-basis: 100%; height: 0; margin: -4px 0; }
.type-card {
  display: flex; flex-direction: column;
  flex: 0 1 auto; min-width: 0; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); overflow: hidden;
}
.type-pick {
  width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--text);
  padding: 10px 12px; font-size: 13px; line-height: 1.5;
  cursor: pointer;
  /* 任务名不换行，卡片宽度由文字长度决定 */
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.type-pick:hover { background: var(--surface-2); }
.type-pick.on { background: var(--solid); color: var(--on-solid); font-weight: 600; }
.type-pick.on:hover { background: var(--solid); }
/* 卡片底部直接显示的一行细节说明（只有部分任务有），不再弹窗 */
.type-detail {
  border-top: 1px solid var(--line);
  background: var(--surface); color: var(--muted);
  padding: 5px 12px; font-size: 12px; line-height: 1.5;
}
/* 内测中未上线：灰掉且不可选（按钮带 disabled，点不出选中效果） */
.type-card.off { background: var(--surface); }
.type-card.off .type-pick { color: var(--faint); cursor: not-allowed; font-weight: 400; }
.type-card.off .type-pick:hover { background: transparent; }
.type-card.off .type-detail { color: var(--faint); }

/* 卡片末尾的邮件提示行（邮件附件 / 邮件回复，只展示不输入） */
.mail-row { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.mail-row-h { font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* ---------- 创建任务：操作指引（红色编号步骤） ---------- */
.guide { display: flex; flex-direction: column; gap: 8px; }
.guide-row {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  color: var(--accent); line-height: 1.8;
}
.guide-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-cards { margin: 2px 0 8px 22px; }
/* 行内按钮（一键写信 / 提交任务）：与红字同排，不参与挤压换行 */
.guide-row .btn { flex: none; }
/* 「第一步」行右端的「返回列表」：靠这个占位把按钮推到卡片内缘右侧。
   这一行用 flex-start，让按钮盒子的顶边与第一步文字盒子的顶边严格齐平
   （默认的 baseline 对齐会让按钮低 2px）。 */
.guide-spacer { flex: 1 1 auto; }
/* nowrap 是关键：默认 wrap 在窄窗口（约 <322px）会把按钮挤到第二行，
   而撑开右侧的占位留在第一行，按钮就跑到左边去了 —— 宽度一变就失准。
   锁定单行后，文字自己去折行，按钮始终钉在这一行的最右端。 */
.guide-row.head { align-items: flex-start; flex-wrap: nowrap; }
/* 单独占一行的内容块：第一步下方的项目名称输入框、第三步下方的附件提示 */
.guide-sub { color: var(--accent); line-height: 1.8; }
.guide-sub + .guide-row { margin-top: 2px; }
/* 项目名称输入框：独占一行，宽度适中、不占满整行（原 420px 的 75% = 315px） */
.guide-sub .guide-input { display: block; width: 100%; max-width: 315px; font-size: 13px; }
.guide-row b { font-weight: 700; }
.guide-row .faint { color: var(--faint); }
.guide-row .btn.sm { padding: 2px 8px; font-size: 12px; vertical-align: baseline; }

/* ---------- 说明弹窗：内容可含图片、表格，超出内部滚动 ---------- */
.modal.wide { width: min(760px, 100%); }
.modal .mb.rich {
  max-height: 60vh; overflow: auto;
  font-size: 13px; line-height: 1.7;
}
.modal .mb.rich img { max-width: 100%; height: auto; border-radius: 4px; }
.modal .mb.rich table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.modal .mb.rich th,
.modal .mb.rich td { border: 1px solid var(--line); padding: 6px 8px; font-size: 13px; }
.modal .mb.rich th { background: var(--surface); text-align: left; }
.modal .mb.rich ul, .modal .mb.rich ol { padding-left: 20px; margin: 6px 0; }

/* 字段标签行：左侧标题 + 右侧小按钮（复制等） */
.field > span.lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field > span.lbl-row > span { font-size: 12px; color: var(--muted); }

/* ---------- 登录页：字段下方的小字与选项行 ---------- */
.field-hint { margin-top: 6px; font-size: 12px; color: var(--faint); }
/* 登录表单顶部引导语（「新用户请点击上方「注册」」）：红字 */
.form-note { margin: -8px 0 14px; font-size: 12px; color: var(--accent); }
/* 邮箱栏上方的「一键查看自己的默认邮箱」按钮：单独一行，位于「邮箱」标签之前 */
.field-act { margin: 0 0 10px; }
.mode-row {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 10px; margin: -4px 0 16px; font-size: 13px;
}

/* ---------- misc ---------- */
.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; color: var(--faint);
}
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--solid);
  background: var(--surface); border-radius: 4px; padding: 10px 14px; font-size: 13px;
}
.notice.warn { border-left-color: var(--solid); background: var(--solid); color: var(--on-solid); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
.spinner { color: var(--faint); padding: 40px; text-align: center; }

#toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast-item {
  background: var(--solid); color: var(--on-solid); padding: 9px 16px; border-radius: var(--radius);
  font-size: 13px; max-width: 86vw; box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.toast-item.err { background: var(--panel); color: var(--text); border: 1px solid var(--solid); }
.toast-detail {
  margin-top: 4px; font-size: 11px; opacity: .62; line-height: 1.5;
  border-top: 1px dashed rgba(128,128,128,.5); padding-top: 4px;
}

/* ---------- 已归档文件：卡片列表，长路径独占整行 ---------- */
.arch-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.arch-item:first-child { padding-top: 4px; }
.arch-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.arch-main { flex: 1; min-width: 0; }
.arch-ops { flex: none; display: flex; gap: 6px; }
.arch-line1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.arch-name { font-weight: 500; word-break: break-all; }
.arch-line2 { margin-top: 2px; font-size: 12px; color: var(--muted); word-break: break-all; }
.arch-path {
  display: inline-block; max-width: 100%; margin-top: 6px;
  font-size: 12px; color: var(--faint); line-height: 1.5;
  word-break: break-all; cursor: pointer;
  border-bottom: 1px dashed var(--line-strong);
}
.arch-path:hover { color: var(--text); }

/* 任务卡片是 flex 自动换行，不再需要按屏宽降列 */
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .wrap { padding: 20px 14px 60px; }
  .seg { flex-wrap: wrap; }
  /* 登录 / 注册页的左右留空与 .wrap 的窄屏内边距一致 */
  .auth-box { --auth-gutter: 14px; }
  /* 输入框字号不低于 16px：移动端聚焦时浏览器不会自动放大，
     页面也就不会出现「点一下输入框就被拽偏」的情况 */
  input[type=text], input[type=email], input[type=password], textarea, select,
  .guide-sub .guide-input { font-size: 16px; }
}
@media (max-width: 560px) {
  .arch-item { flex-direction: column; gap: 10px; }
  .arch-ops { width: 100%; }
}
