/* elakespual.cn 门户样式：跟随系统深浅色，窄屏自适应，无外部字体与图片。 */
:root {
  color-scheme: dark light;
  --bg: #0b0f16;
  --bg-soft: #121826;
  --card: #151c2b;
  --line: #253048;
  --text: #e8edf7;
  --dim: #93a0b8;
  --accent: #5aa9ff;
  --accent-ink: #04121f;
  --ok: #3ddc97;
  --warn: #ffb86b;
  --err: #ff7a85;
  --radius: 14px;
  --shadow: 0 10px 30px rgb(0 0 0 / 35%);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --line: #d8e0ee;
    --text: #16203a;
    --dim: #5c6b87;
    --accent: #1f6feb;
    --accent-ink: #ffffff;
    --shadow: 0 8px 24px rgb(20 35 70 / 10%);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in oklab, var(--accent) 18%, transparent), transparent), var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------------------------------------------------------------- 顶栏 */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-soft) 82%, transparent);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10;
  padding-top: max(14px, env(safe-area-inset-top));
}
.bar-left, .bar-right { display: flex; align-items: center; gap: 10px; }
.logo { color: var(--accent); font-size: 20px; }
.brand { font-weight: 650; letter-spacing: .2px; }
.who { font-size: 14px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.dim { color: var(--dim); }
.small { font-size: 13.5px; }
.center-text { text-align: center; }

/* ---------------------------------------------------------------- 布局 */
.center { display: grid; place-items: center; padding: 28px 16px 48px; min-height: calc(100dvh - 62px); }
.wrap { max-width: 880px; margin: 0 auto; padding: 22px 16px 56px; display: grid; gap: 18px; }
/* 页脚那行 ICP 备案号要一直贴在页面最底部：整页做纵向 flex，主内容撑开剩余高度。
   （.center 自己带的 min-height 会连同页脚一起把页面顶得比屏幕高、页脚掉到折线下面，所以在 .page 里归零） */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.page > main { flex: 1 0 auto; }
.page > .center { min-height: 0; }
.site-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12.5px; }
.site-foot a { color: var(--dim); }
.site-foot a:hover, .site-foot a:focus-visible { color: var(--accent); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; width: 100%;
}
.login { max-width: 420px; }
.title { font-size: 22px; margin: 0 0 6px; }
.title2 { font-size: 17px; margin: 0 0 4px; }

/* ---------------------------------------------------------------- 表单 */
.field { display: block; margin: 14px 0; }
.label { display: block; font-size: 13.5px; color: var(--dim); margin-bottom: 6px; }
.hint { display: block; font-size: 12.5px; color: var(--dim); margin-top: 5px; }
.input {
  width: 100%; padding: 12px 13px; font: inherit; color: var(--text);
  background: color-mix(in oklab, var(--bg) 70%, var(--card));
  border: 1px solid var(--line); border-radius: 10px;
}
.input:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; font: inherit; font-weight: 600; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text);
}
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.ghost { background: color-mix(in oklab, var(--bg) 60%, var(--card)); }
.btn.small { padding: 6px 11px; font-size: 13.5px; font-weight: 500; }
.btn.block { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.inline { display: inline; }
.stack { display: grid; gap: 8px; margin-top: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 12px 0 18px; }
.form-grid .btn { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- 提示 */
.alert { padding: 11px 13px; border-radius: 10px; margin: 12px 0; font-size: 14.5px; border: 1px solid var(--line); }
.alert.error { border-color: color-mix(in oklab, var(--err) 55%, var(--line)); background: color-mix(in oklab, var(--err) 14%, transparent); }
.alert.notice { border-color: color-mix(in oklab, var(--ok) 45%, var(--line)); background: color-mix(in oklab, var(--ok) 12%, transparent); }

/* ---------------------------------------------------------------- 入口卡片 */
.entries { display: grid; gap: 12px; margin-top: 14px; }
.entry {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  background: color-mix(in oklab, var(--bg) 55%, var(--card));
  transition: transform .12s ease, border-color .12s ease;
}
a.entry:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--accent); }
.entry.off { opacity: .55; }
.entry-icon { font-size: 24px; line-height: 1; }
.entry-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.entry-title { font-weight: 600; }
.entry-desc { font-size: 13.5px; color: var(--dim); }
.entry-go { color: var(--dim); font-size: 22px; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); vertical-align: 1px; }
.tag.on { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 45%, var(--line)); }

/* ------------------------------------------------------- DSH 电源卡片 */
.power-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.power-info { min-width: 0; }
.power-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.power-actions .btn[disabled] { cursor: not-allowed; }
.power-badge { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }
.power-badge.on { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 45%, var(--line)); background: color-mix(in oklab, var(--ok) 12%, transparent); }
.power-badge.off { color: var(--dim); border-color: var(--line); background: color-mix(in oklab, var(--dim) 12%, transparent); }
.power-badge.warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 45%, var(--line)); background: color-mix(in oklab, var(--warn) 12%, transparent); }

/* ------------------------------------------------- 卡片头（标题 + 右侧按钮） */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head .title2 { margin: 0; }
.card-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 云盘 */
.cloud-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.cloud-actions .input { flex: 1 1 240px; padding: 9px 12px; font-size: 14px; }
.cloud-actions .input::file-selector-button {
  margin-right: 10px; padding: 7px 12px; font: inherit; cursor: pointer; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  background: color-mix(in oklab, var(--bg) 60%, var(--card));
}
.cloud-progress { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.cloud-progress[hidden] { display: none; }
.cloud-bar {
  flex: 1 1 auto; height: 8px; overflow: hidden; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 70%, var(--card));
}
.cloud-bar > span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s ease; }
.cloud-done { margin: 4px 0 14px; }

/* 多线程开关：勾选项与说明并排，窄屏会自动换行 */
.cloud-options { margin: 6px 0 12px; gap: 12px; }
.cloud-options .check { font-size: 13.5px; }

/* 离线下载（服务器侧多线程）的任务列表 */
.cloud-jobs { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.cloud-jobs[hidden] { display: none; }
.cloud-job {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in oklab, var(--bg) 55%, var(--card));
}
.cloud-job.is-done { border-color: color-mix(in oklab, #1a9e5f 45%, var(--line)); }
.cloud-job.is-failed { border-color: color-mix(in oklab, #d14343 45%, var(--line)); }
.cloud-job-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cloud-job-name { flex: 1 1 200px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.cloud-job-state { flex: 0 0 auto; }
.cloud-job-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cloud-job-actions[hidden] { display: none; }
/* .btn 自己带 display，[hidden] 会被盖掉：暂停时那个「中断」必须真的消失 */
.cloud-job-line button[hidden] { display: none; }
.cloud-job .cloud-bar { height: 6px; }
.cloud-job .cloud-bar[hidden] { display: none; }

/* --------------------------------- 云盘文件表（仿资源管理器「详细信息」视图） */
.files {
  margin: 12px 0 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in oklab, var(--bg) 55%, var(--card));
}
.files-head, .files-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 168px 88px 186px;
  align-items: center; gap: 10px; padding: 8px 12px;
}
.files-head { border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 72%, var(--card)); }
.files-col {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 13px; color: var(--dim); text-align: left;
}
button.files-col { cursor: pointer; }
button.files-col:hover { color: var(--text); }
.files-col-date, .files-col-size, .files-col-actions { justify-content: flex-end; }
.files-arrow { font-size: 10px; line-height: 1; color: var(--accent); }
.files-body { margin: 0; padding: 0; list-style: none; }
.files-row { border-bottom: 1px solid color-mix(in oklab, var(--line) 55%, transparent); }
.files-row:last-child { border-bottom: 0; }
.files-row:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.files-row.selected { background: color-mix(in oklab, var(--accent) 20%, transparent); }
.files-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.files-name:hover { text-decoration: none; }
.files-icon { flex: none; color: var(--accent); }
.files-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 文件夹里上传的文件：目录部分灰一点，文件名本身照旧醒目 */
.files-dir { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 0 auto; }
.files-cell { font-size: 13.5px; color: var(--dim); text-align: right; white-space: nowrap; }
.files-actions { display: flex; justify-content: flex-end; gap: 8px; }
.files-empty { padding: 14px 12px; }
.btn.danger { color: var(--err); border-color: color-mix(in oklab, var(--err) 45%, var(--line)); }
.btn.danger:hover { background: color-mix(in oklab, var(--err) 14%, transparent); }

/* 收起/展开的容器：用 hidden 属性，配合上面的 [hidden] 显式规则防止被 display 覆盖 */
.collapse-body[hidden] { display: none; }

/* ---------------------------------------------------------------- 面板 */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; }
.mini h3 { margin: 0 0 6px; font-size: 15px; }
.rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-title { font-size: 14.5px; font-weight: 600; }
.steps { padding-left: 20px; margin: 10px 0; }
.steps li { margin: 6px 0; }
.keybox { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: color-mix(in oklab, var(--bg) 60%, var(--card)); }
.keybox code { font-size: 16px; letter-spacing: 1.5px; word-break: break-all; flex: 1; }
.codes { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.codes code { font-size: 16px; letter-spacing: 1px; display: block; padding: 10px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.details { margin: 12px 0; }
.details summary { cursor: pointer; color: var(--dim); font-size: 14px; }
.wrap-code, .wrap { word-break: break-all; font-size: 12.5px; color: var(--dim); }

/* ---------------------------------------------------------------- 待办清单 */
/* 六档紧急程度：红 ≤10 小时、橙 10–24 小时、黄 1–2 天、绿 2–5 天、蓝 5–30 天、白 = 30 天以上或长期。
   每档只定义一个 --tier-dot 变量，行首色条、圆点、筛选项都取它。 */
:root {
  --tier-red: #ff4d4f;
  --tier-orange: #ff9f43;
  --tier-yellow: #ffd83d;
  --tier-green: #37d67a;
  --tier-blue: #4dabf7;
  --tier-white: #dfe6f3;
}
@media (prefers-color-scheme: light) {
  /* 浅色底上「白色」条看不见，白档改用中性灰（含义不变：最不急的一档） */
  :root { --tier-white: #94a1b8; }
}
.tier-red { --tier-dot: var(--tier-red); }
.tier-orange { --tier-dot: var(--tier-orange); }
.tier-yellow { --tier-dot: var(--tier-yellow); }
.tier-green { --tier-dot: var(--tier-green); }
.tier-blue { --tier-dot: var(--tier-blue); }
.tier-white { --tier-dot: var(--tier-white); }
.tier-text { font-weight: 650; }
.tier-text.tier-red { color: var(--tier-red); }
.tier-text.tier-orange { color: var(--tier-orange); }
.tier-text.tier-yellow { color: var(--tier-yellow); }
.tier-text.tier-green { color: var(--tier-green); }
.tier-text.tier-blue { color: var(--tier-blue); }
.tier-text.tier-white { color: var(--dim); }

.todo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.tier-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--text);
}
.tier-chip:hover { text-decoration: none; border-color: color-mix(in oklab, var(--tier-dot) 60%, var(--line)); }
.tier-chip.is-active {
  border-color: var(--tier-dot); font-weight: 650;
  background: color-mix(in oklab, var(--tier-dot) 16%, transparent);
}
.tier-chip b { font-weight: 650; color: var(--dim); }
.tier-chip.is-active b { color: var(--text); }
.tier-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tier-dot); flex: 0 0 auto; }

.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 5px solid var(--tier-dot);
  border-radius: 12px; background: color-mix(in oklab, var(--tier-dot) 7%, var(--card));
}
.todo-item[hidden] { display: none; }
.todo-item.is-overdue { background: color-mix(in oklab, var(--tier-red) 15%, var(--card)); }
.todo-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--tier-dot); flex: 0 0 auto; }
.todo-main { flex: 1 1 auto; min-width: 0; }
.todo-detail { margin: 0 0 4px; word-break: break-word; }
.todo-meta { margin: 0; }
.todo-remaining {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text);
}
.todo-item.is-overdue .todo-remaining { color: var(--tier-red); }
.todo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 0 0 auto; }
/* 完成进度：显示（输入框里的数字）和修改（「改」按钮）都摆在「完成 / 删除」左边 */
.todo-progress-form { display: inline-flex; align-items: center; gap: 6px; }
.todo-progress-label { color: var(--dim); font-size: 13px; }
.todo-progress-input {
  width: 88px; padding: 5px 8px; text-align: right;
  font-variant-numeric: tabular-nums; font-weight: 650;
}
.todo-progress-sep { color: var(--dim); font-size: 13px; }
.todo-progress-goal {
  font-weight: 650; color: var(--dim); font-variant-numeric: tabular-nums;
  min-width: 2ch; text-align: right;
}
.todo-progress-hint { color: var(--dim); font-size: 12.5px; }
.todo-progress-hint.is-bad { color: var(--err); }
.todo-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 6px; }
/* 子任务模式：总进度那行 + 「本阶段已完成」小标记 + 创建表单里的模式与阶段字段 */
.todo-total { margin: 2px 0 0; }
.todo-total b { font-variant-numeric: tabular-nums; color: var(--text); }
.todo-stage-badge {
  display: inline-block; margin-left: 2px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ok, #1d8a4e);
  background: color-mix(in oklab, var(--ok, #1d8a4e) 14%, transparent);
}
.todo-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 6px; }
.todo-plan-fields {
  margin: 6px 0 2px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px;
}
.todo-plan-fields[hidden] { display: none; }
.todo-plan-fields .todo-prog { margin: 8px 0 6px; }
.todo-plan-fields .input { width: 150px; }
.todo-plan-fields select.input { width: auto; }
.todo-detail { overflow-wrap: anywhere; }
.todo-prog .input { width: 116px; }
.todo-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.todo-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 6px; }
.todo-when .input { width: auto; }
.todo-when input[type="number"] { width: 108px; }
.todo-span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.todo-part { display: inline-flex; align-items: center; gap: 5px; }
.todo-unit { color: var(--dim); font-size: 13px; }

/* 完成动画（由 /todo.js 加 .is-completing / .is-leaving 触发；脚本不跑时点「完成」就是普通整页提交）：
   整条换成横向流动的彩色渐变（颜色从红绕一圈回到红，首尾同色，所以一圈接一圈看不出接缝），
   原来的文字全部隐藏，只留正中「任务完成」四个大字，停 5 秒后从右到左擦掉（clip-path 从右往左收）。
   动画放完这一行就从清单里移除，服务端那条记录同时已经删掉，页面上不再留完成记录。 */
.is-completing {
  position: relative; overflow: hidden;
  background-image: none; background-color: #202634;
  border-color: transparent;
  clip-path: inset(0 0 0 0 round 12px);
  box-shadow: 0 8px 26px color-mix(in oklab, var(--tier-blue) 45%, transparent);
}
/* 彩带：宽度是整条的两倍，里面装两遍一模一样的彩虹；位移只走一半（正好一整圈），
   一圈结束时画面与开始时完全重合，因此不会出现接缝。走 transform（GPU 合成），
   比每帧重画 background-position 顺得多。 */
.is-completing::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 200%;
  background-image: linear-gradient(90deg,
    #ff4d4f, #ff9f43, #ffd83d, #37d67a, #4dabf7, #b197fc, #f56ee0,
    #ff4d4f, #ff9f43, #ffd83d, #37d67a, #4dabf7, #b197fc, #f56ee0,
    #ff4d4f);
  animation: todo-complete-flow 3.6s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.is-completing > * { visibility: hidden; }
.is-completing .todo-complete-mark { visibility: visible; }
.todo-complete-mark {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 0 14px; text-align: center;
  color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
  animation: todo-complete-pop 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) both;
}
.todo-complete-word { font-size: 26px; font-weight: 800; letter-spacing: 0.34em; text-indent: 0.34em; }
.todo-complete-quote {
  font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.12em; text-indent: 0.12em;
}
.is-leaving {
  transition: clip-path 0.7s ease-in, opacity 0.7s ease-in;
  clip-path: inset(0 100% 0 0 round 12px);
  opacity: 0;
}
@keyframes todo-complete-flow { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes todo-complete-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* 这里本来有一条 @media (prefers-reduced-motion: reduce)，把彩带流动与「任务完成」的弹跳关掉、
   消失改成淡出。2026-10-10 整条去掉了：Windows 的「显示动画」一关（省电模式、某些远程桌面也会带上），
   用户看到的就是「点了完成，动画又没了」——而这套动画只是 5 秒的彩色渐变，不会让人不适，
   所以**任何情况下都照播**，不再跟随系统动画偏好。 */


@media (max-width: 560px) {
  .bar { padding-inline: 12px; }
  .card { padding: 18px 15px; }
  .center { padding: 16px 12px 40px; }
  .title { font-size: 20px; }
  .row { align-items: flex-start; flex-direction: column; }
  .row .btn, .row form { align-self: flex-start; }
  /* 窄屏收起表头，一行改成上下两段 */
  .files-head { display: none; }
  .files-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .files-name { grid-column: 1 / -1; }
  .files-cell { text-align: left; }
  .files-actions { grid-column: 1 / -1; justify-content: flex-start; }
  /* 待办：窄屏改成上下两段，按钮整行铺开好点 */
  .todo-item { flex-wrap: wrap; }
  /* 操作区本来就换到整行，basis 必须可收缩：写 flex: 0 0 auto 时它的 max-content 会把卡片顶宽、页面横向滚动 */
  .todo-actions { width: 100%; flex: 1 1 100%; min-width: 0; }
  /* 完成进度那一格在窄屏撑满一行，数字框跟着拉长 */
  .todo-progress-form { width: 100%; }
  /* 数字框要给个明确的小宽度：width:auto 时它的内容尺寸是输入框自带的 size（约 177px），
     会经 min-content 一路顶宽卡片、让页面横向滚动；写死 88px 后 flex-grow 照样把它拉满整行 */
  .todo-progress-input { flex: 1 1 auto; width: 88px; min-width: 0; }
  /* 「本阶段」三个字别被挤成一列 */
  .todo-progress-label { white-space: nowrap; }
  .todo-prog { flex-direction: column; align-items: stretch; }
  .todo-plan { align-items: flex-start; }
  .todo-plan-fields .input { width: auto; flex: 1 1 auto; }
  .todo-prog .todo-part { display: flex; width: 100%; gap: 8px; }
  /* 「初始进度」四个字不要被挤成两行 */
  .todo-prog .todo-part .todo-unit { width: auto; white-space: nowrap; }
  .todo-prog .input { flex: 1 1 auto; width: auto; }
  .todo-when { flex-direction: column; align-items: stretch; }
  .todo-when .input, .todo-when input[type="number"] { width: 100%; }
  /* 「几天几小时几分钟」三段在窄屏各占一行，数字框撑满、单位跟在右边 */
  .todo-span { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .todo-part { display: flex; align-items: center; gap: 8px; }
  .todo-part .input { flex: 1 1 auto; width: auto; }
  .todo-part .todo-unit { width: 3em; }
  .todo-chips { gap: 6px; }
  .tier-chip { padding: 5px 10px; font-size: 13px; }
  /* 那行名言比原来的鼓励话长（还带出处），窄屏缩小一点、字距收紧，保证一行放得下 */
  .todo-complete-quote { font-size: 12.5px; letter-spacing: 0.06em; text-indent: 0.06em; }
  .todo-complete-mark { gap: 5px; padding: 0 10px; }
}
