/* ============================================================
   云传 · 界面样式
   ------------------------------------------------------------
   全站唯一的样式来源。所有颜色都走 CSS 变量，明暗两套主题共用
   同一组变量名 —— 模板里不出现任何具体色值。

   方向：精密工具。近黑墨 + 纸白，发丝边框，无投影，短码/版本号/
   体积一律等宽字。配色只有一条规则：主按钮一律墨色，强调色（朱砂）
   只做「标记」—— 印章角点、活动标签下划线、链接、焦点环、最新徽章。

   字体走系统栈，不引 Google Fonts：fonts.googleapis.com 国内直连
   不通，而本仓库的 Tailwind / htmx 本来就是本地化的，为的就是不让
   外网 CDN 故障影响页面。字体不破这个例。
   ============================================================ */

/* ── 主题变量 ─────────────────────────────────────────── */

:root {
  --paper: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f3f2ef;
  --surface-3: #e9e7e2;
  --line: #e6e4df;
  --line-2: #d6d3cc;
  --ink: #17171a;
  --ink-2: #56565e;
  --ink-3: #8a8a93;
  --accent: #c2412a;
  --accent-2: #a63520;
  --accent-soft: #fbefec;
  --accent-line: #f0d6cf;
  --ok: #2f6f4f;
  --ok-soft: #eaf3ee;
  --ok-line: #cfe3d7;
  --warn: #8a6212;
  --warn-soft: #f8f1de;
  --warn-line: #ecdcb5;
  --danger: #b02c14;
  --danger-soft: #fbeae6;
  /* 实心红按钮上的字色：亮色下红够深，用白字 */
  --on-danger: #ffffff;
  --on-ink: #faf9f7;
  --focus: rgba(194, 65, 42, .26);
  --pop: 0 1px 2px rgba(23, 23, 26, .05), 0 12px 30px -12px rgba(23, 23, 26, .18);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* 暗色不是把亮色反过来：面板比页面底更亮而不是更暗，朱砂要提亮才够
   对比度，主按钮反过来变成浅底深字。 */
:root[data-theme="dark"] {
  --paper: #121213;
  --surface: #191919;
  --surface-2: #212122;
  --surface-3: #2a2a2c;
  --line: #2b2b2d;
  --line-2: #3b3b3e;
  --ink: #f1f0ed;
  --ink-2: #a2a19f;
  --ink-3: #6e6d6c;
  --accent: #e2694c;
  --accent-2: #f0836a;
  --accent-soft: #2c1a15;
  --accent-line: #4a2a21;
  --ok: #63a883;
  --ok-soft: #16241d;
  --ok-line: #254238;
  --warn: #c8a253;
  --warn-soft: #2a2314;
  --warn-line: #453a20;
  --danger: #dc5b40;
  --danger-soft: #2d1712;
  /* 暗色下的红是提亮过的，白字只有 3.3:1；换成深字反而有 6:1 */
  --on-danger: #131315;
  --on-ink: #131315;
  --focus: rgba(226, 105, 76, .3);
  --pop: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -12px rgba(0, 0, 0, .7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121213;
    --surface: #191919;
    --surface-2: #212122;
    --surface-3: #2a2a2c;
    --line: #2b2b2d;
    --line-2: #3b3b3e;
    --ink: #f1f0ed;
    --ink-2: #a2a19f;
    --ink-3: #6e6d6c;
    --accent: #e2694c;
    --accent-2: #f0836a;
    --accent-soft: #2c1a15;
    --accent-line: #4a2a21;
    --ok: #63a883;
    --ok-soft: #16241d;
    --ok-line: #254238;
    --warn: #c8a253;
    --warn-soft: #2a2314;
    --warn-line: #453a20;
    --danger: #dc5b40;
    --danger-soft: #2d1712;
    --on-danger: #131315;
    --on-ink: #131315;
    --focus: rgba(226, 105, 76, .3);
    --pop: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -12px rgba(0, 0, 0, .7);
  }
}

/* ── 基础 ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box }
html, body { margin: 0; padding: 0 }

/* ★ 全站尺寸的唯一旋钮 ★
   下面所有字号、控件高度、间距都是 rem，全部按这个基准换算。
   嫌小就调大这一行，别去改各个组件的数值。参考换算（浏览器默认 16px 时）：
       100%    = 16px   偏紧凑
       112.5%  = 18px   ← 当前
       118.75% = 19px   跟改版前的观感基本一致
       125%    = 20px   偏大
   用百分比而不是写死 px，是为了尊重把浏览器默认字号调大过的用户。
   边框、圆角、发丝对齐偏移仍然是 px —— 那些是几何，不该跟着字号变。 */
html {
  font-size: 112.5%;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.65;
  letter-spacing: .01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px }
button, input, textarea, select { font: inherit; letter-spacing: inherit; color: inherit }
svg { display: block; flex-shrink: 0 }
p { margin: 0 }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.005em; line-height: 1.35 }
table { border-collapse: collapse }
img { max-width: 100%; }
::selection { background: var(--accent-soft); color: var(--accent-2) }

/* ── 排版 ─────────────────────────────────────────────── */

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0 }
.num { font-variant-numeric: tabular-nums }
.t-display { font-size: 1.75rem; font-weight: 600; line-height: 1.28; letter-spacing: -.015em }
.t-title { font-size: 1.375rem; font-weight: 600; line-height: 1.32; letter-spacing: -.012em }
.t-h1 { font-size: 1.0625rem; font-weight: 600; line-height: 1.45 }
.t-h2 { font-size: 0.875rem; font-weight: 600; line-height: 1.5 }
.t-body { font-size: 0.875rem; line-height: 1.65 }
.t-sm { font-size: 0.8125rem; line-height: 1.6 }
.t-xs { font-size: 0.75rem; line-height: 1.5 }
.t-eyebrow { font-size: 0.6875rem; line-height: 1.4; letter-spacing: .09em; color: var(--ink-3) }
.c-2 { color: var(--ink-2) }
.c-3 { color: var(--ink-3) }
.c-accent { color: var(--accent) }
.strong { font-weight: 600; color: var(--ink) }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.center { text-align: center }

/* ── 布局 ─────────────────────────────────────────────── */

.row { display: flex; align-items: center; gap: 0.625rem }
.col { display: flex; flex-direction: column }
.grow { flex: 1 1 auto; min-width: 0 }
.spacer { flex: 1 1 auto }
.wrap { flex-wrap: wrap }
.page { max-width: 67.5rem; margin: 0 auto; padding: 1.625rem 1.5rem 3.5rem }
.page-wide { max-width: 73.75rem }
.page-narrow { max-width: 38.75rem }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.125rem }
.crumb { display: flex; align-items: center; gap: 0.4375rem; color: var(--ink-3); font-size: 0.75rem; margin-bottom: 0.4375rem }
.crumb a { color: var(--ink-3) }
.crumb a:hover { color: var(--ink-2); text-decoration: none }

/* ── 顶栏 ─────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 1.625rem;
  height: 3.25rem;
  padding: 0 1.375rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 0.5625rem;
  font-size: 0.875rem; font-weight: 600; letter-spacing: .04em; color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--ink) }
.seal {
  position: relative; width: 1.5625rem; height: 1.5625rem; border-radius: 6px;
  background: var(--ink); color: var(--on-ink);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* 唯一一处「无理由」的朱砂：印章的印泥，也是全站强调色的出处 */
.seal::after {
  content: ""; position: absolute; right: -2px; top: -2px;
  width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}
.nav { display: flex; align-items: center; gap: 0.25rem; height: 3.25rem }
.nav a {
  display: flex; align-items: center; height: 3.25rem; padding: 0 0.6875rem;
  font-size: 0.8125rem; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px /* 压住 1px 边框，不随字号缩放 */;
}
.nav a:hover { color: var(--ink); text-decoration: none }
.nav a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent) }
.topbar-end { display: flex; align-items: center; gap: 0.5rem; margin-left: auto }
.who { display: flex; align-items: center; gap: 0.4375rem; font-size: 0.8125rem; color: var(--ink-2) }
.avatar {
  width: 1.375rem; height: 1.375rem; border-radius: 5px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase;
}
.vr { width: 0.0625rem; height: 1.125rem; background: var(--line); flex-shrink: 0 }

/* ── 按钮 ─────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  height: 2.125rem; padding: 0 0.8125rem;
  border-radius: 6px; border: 1px solid transparent;
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s, opacity .14s;
}
.btn:hover { text-decoration: none }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus) }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: not-allowed; pointer-events: none }
.btn-primary { background: var(--ink); color: var(--on-ink) }
.btn-primary:hover { background: var(--ink); color: var(--on-ink); opacity: .88 }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2) }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3) }
.btn-quiet { background: transparent; color: var(--ink-2); font-weight: 400 }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink) }
.btn-danger { background: transparent; color: var(--ink-2); font-weight: 400 }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger) }
.btn-sm { height: 1.75rem; padding: 0 0.5625rem; font-size: 0.75rem; border-radius: 5px; gap: 0.3125rem }
.btn-lg { height: 2.875rem; padding: 0 1.25rem; font-size: 0.9375rem; border-radius: 7px; gap: 0.5rem }
.btn-block { width: 100% }
.btn-icon { width: 1.875rem; padding: 0; border-radius: 6px }
.btn-icon.btn-sm { width: 1.75rem }

/* ── 表单 ─────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 0.375rem }
.label { font-size: 0.75rem; color: var(--ink-2); font-weight: 600 }
.hint { font-size: 0.75rem; color: var(--ink-3) }
.hint-err { color: var(--danger) }
.input {
  width: 100%; height: 2.25rem; padding: 0 0.6875rem;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px;
  font-size: 0.8125rem; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.input::placeholder { color: var(--ink-3) }
.input:hover { border-color: var(--ink-3) }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus) }
.input-err { border-color: var(--danger) }
.input-err:focus { box-shadow: 0 0 0 3px var(--danger-soft) }
.input-lg { height: 2.875rem; padding: 0 0.875rem; font-size: 0.9375rem; border-radius: 7px }
.input:disabled, .input[readonly] { background: var(--surface-2); color: var(--ink-2) }
.input[readonly] { cursor: text }
textarea.input { height: auto; padding: 0.5625rem 0.6875rem; line-height: 1.65; resize: vertical }
.input-wrap { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0 }
.input-wrap > .input { padding-right: 2.25rem }
.input-wrap > .input-lg { padding-right: 2.75rem }
.eye {
  position: absolute; right: 8px; display: flex; padding: 0.3125rem;
  border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 4px;
}
.eye:hover { color: var(--ink-2); background: var(--surface-2) }
.input-lg + .eye { right: 11px }
.check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.8125rem; color: var(--ink-2) }
.check input { position: absolute; opacity: 0; width: 0; height: 0 }
.check .box {
  width: 0.9375rem; height: 0.9375rem; border-radius: 4px; flex-shrink: 0;
  border: 1px solid var(--line-2); background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.check input:checked + .box { background: var(--ink); border-color: var(--ink); color: var(--on-ink) }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px var(--focus) }

/* ── 面板 ─────────────────────────────────────────────── */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px }
.panel-flush { overflow: hidden }
.panel-head {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.6875rem 1rem;
  border-bottom: 1px solid var(--line); font-size: 0.8125rem; font-weight: 600;
}
.panel-head .c-3 { font-weight: 400 }
.panel-body { padding: 1rem }
.panel-sub { background: var(--surface-2) }

/* ── 表格 ─────────────────────────────────────────────── */

/* table-layout: fixed 是必须的 —— 默认的 auto 会让一个 nowrap 的长单元格
   （比如很长的更新说明）把整张表撑得超出容器，右边几列被推出面板再被
   .panel-flush 的 overflow:hidden 裁掉，操作按钮就点不到了。 */
.tbl { width: 100%; font-size: 0.8125rem; table-layout: fixed }
.tbl th {
  text-align: left; font-size: 0.6875rem; font-weight: 600; color: var(--ink-3); letter-spacing: .05em;
  padding: 0.5rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 0.6875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle }
.tbl tbody tr:last-child td { border-bottom: 0 }
.tbl tbody tr:hover { background: var(--surface-2) }
.tbl .act { display: flex; align-items: center; gap: 0.1875rem; justify-content: flex-end }
/* 固定布局下超宽内容不会撑开列，而是溢出到隔壁 —— 所以 nowrap 的格子
   必须自己截断。不给所有 td 加 overflow:hidden，是为了不裁掉操作列
   按钮的焦点环（box-shadow）。 */
.tbl .nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }

/* ── 文件类型图块 ─────────────────────────────────────── */

.ftile {
  width: 2.125rem; height: 2.125rem; border-radius: 6px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); overflow: hidden;
}
.ftile-lg { width: 2.75rem; height: 2.75rem; border-radius: 8px }
.ftile-xl { width: 4.5rem; height: 4.5rem; border-radius: 16px }
.ftile > img { width: 100%; height: 100%; object-fit: cover; display: block }

/* ── 徽章 / 短码 ──────────────────────────────────────── */

.chip {
  display: inline-flex; align-items: center; gap: 0.25rem; height: 1.25rem; padding: 0 0.375rem;
  border-radius: 4px; border: 1px solid transparent;
  font-size: 0.6875rem; font-weight: 600; white-space: nowrap; line-height: 1;
}
.chip-line { border-color: var(--line-2); color: var(--ink-2); background: var(--surface) }
.chip-fill { background: var(--surface-2); color: var(--ink-2); border-color: var(--line) }
.chip-ink { background: var(--ink); color: var(--on-ink) }
.chip-accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line) }
.chip-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line) }
.chip-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line) }

/* 短码是这个产品的原子 —— 只要它出现，都长这个样子 */
.code {
  display: inline-flex; align-items: center; height: 1.375rem; padding: 0 0.4375rem; gap: 0.0625rem;
  border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 0.75rem; font-family: var(--font-mono);
}
.code .sl { color: var(--ink-3) }

/* ── 标签页 ───────────────────────────────────────────── */

.tabs {
  display: flex; align-items: center; gap: 1.25rem;
  border-bottom: 1px solid var(--line); margin-bottom: 1.125rem;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none }
.tab {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0 0 0.5625rem;
  font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px /* 压住 1px 边框，不随字号缩放 */;
}
.tab:hover { color: var(--ink); text-decoration: none }
.tab.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent) }
.tab .n { font-size: 0.6875rem; color: var(--ink-3); font-variant-numeric: tabular-nums }
.tab.on .n { color: var(--accent) }

/* ── 提示条 ───────────────────────────────────────────── */

.note {
  display: flex; align-items: flex-start; gap: 0.5625rem; padding: 0.625rem 0.8125rem;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2);
  font-size: 0.8125rem; color: var(--ink-2);
}
.note > svg { margin-top: 0.125rem }
.note-err { background: var(--danger-soft); border-color: var(--danger); color: var(--danger) }
.note-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok) }
.note-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn) }
.note a { color: inherit; text-decoration: underline; text-underline-offset: 2px }

/* ── 二维码印章 ───────────────────────────────────────── */

.seal-card {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 0.6875rem;
  padding: 0.875rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
/* 这里原本有一个朱砂角标（贴右上角的直角标记），已移除。
   它是纯装饰，不承载信息，而且靠伪元素去精确覆盖卡片的 1px 边框
   本身就很脆 —— 圆角、box-sizing、亚像素取整任何一环偏一点就会浮出来。
   朱砂在这些页面上已经有别的落点（固定地址徽章、「当前」徽章、链接），
   不缺这一处。要是以后想加回来，做成离边框 6px 的内嵌标记，
   别再去贴边。 */
/* 二维码本身永远是白底黑块 —— 暗色下给它一块白纸，既保证可扫，
   也正好是「盖在纸上的印」这个意思 */
.qr-img { display: block; background: #fff; border-radius: 4px; padding: 0.3125rem }

/* ── 上传投放区 ───────────────────────────────────────── */

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 0.3125rem;
  padding: 2.375rem 1.5rem; border: 1px dashed var(--line-2); border-radius: 8px;
  background: var(--surface); text-align: center; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.drop:hover, .drop.on { border-color: var(--accent); background: var(--accent-soft) }
.drop.on { border-style: solid }

/* ── 进度条 ───────────────────────────────────────────── */

.bar { height: 0.25rem; border-radius: 2px; background: var(--surface-3); overflow: hidden }
.bar > i { display: block; height: 100%; border-radius: 2px; background: var(--ink); transition: width .2s }

/* ── 空态 ─────────────────────────────────────────────── */

.empty { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; padding: 3.5rem 1.5rem; text-align: center }
.empty .ico {
  width: 2.75rem; height: 2.75rem; border-radius: 9px; margin-bottom: 0.375rem;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--ink-3);
}

/* ── 登录 / 注册 / 找回密码 等认证页 ──────────────────── */

.auth { display: flex; min-height: 100vh }
.auth-brand {
  width: 52%; flex-shrink: 0; position: relative; overflow: hidden;
  background: #17171a; color: #faf9f7;
  padding: 3.5rem 3.25rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
/* 原来这里是三个模糊光斑 + 两个旋转圆环 + 四张飘浮的 emoji 卡片。
   换成一张不动的发丝网格，加载即完成。 */
.auth-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(250, 249, 247, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 249, 247, .055) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 42%, #000 12%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 78% 42%, #000 12%, transparent 72%);
}
.auth-brand > * { position: relative }
.auth-brand .seal { background: #faf9f7; color: #17171a }
.auth-brand .seal::after { background: #c2412a; box-shadow: 0 0 0 2px #17171a }
.auth-brand h1 { font-size: 1.9375rem; line-height: 1.35; letter-spacing: -.015em }
.auth-lead { margin-top: 0.8125rem; font-size: 0.875rem; line-height: 1.75; color: rgba(250, 249, 247, .6) }
.auth-foot { font-size: 0.6875rem; color: rgba(250, 249, 247, .32); letter-spacing: .05em }
.auth-pts { display: flex; flex-direction: column; gap: 0.9375rem; margin-top: 1.875rem }
.auth-pt { display: flex; gap: 0.6875rem; align-items: flex-start; font-size: 0.8125rem; line-height: 1.6; color: rgba(250, 249, 247, .72) }
.auth-pt .k {
  width: 1.1875rem; height: 1.1875rem; border-radius: 5px; flex-shrink: 0; margin-top: 0.125rem;
  background: rgba(250, 249, 247, .1); color: #faf9f7;
  display: flex; align-items: center; justify-content: center;
}
.flow { display: flex; align-items: center; gap: 0.75rem; margin-top: 2.125rem }
.flow-node {
  display: flex; flex-direction: column; align-items: center; gap: 0.4375rem; min-width: 78px;
  padding: 0.8125rem 0.6875rem; border: 1px solid rgba(250, 249, 247, .14); border-radius: 9px;
  background: rgba(250, 249, 247, .045);
}
.flow-node .t { font-size: 0.6875rem; color: rgba(250, 249, 247, .62); letter-spacing: .02em }
.flow-node.on { border-color: #c2412a; background: rgba(194, 65, 42, .12) }
.flow-node.on .t { color: #e2694c }
.flow-arrow { color: rgba(250, 249, 247, .28) }
.auth-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3.5rem 2.75rem }
.auth-box { width: 100%; max-width: 21.25rem }
.auth-mark { display: none; flex-direction: column; align-items: center; gap: 0.625rem; margin-bottom: 1.625rem }

/* ── 公开下载页 ───────────────────────────────────────── */

.dl { max-width: 26.875rem; margin: 0 auto; padding: 2.125rem 1.375rem 3rem; display: flex; flex-direction: column }
.dl-head { display: flex; flex-direction: column; align-items: center; gap: 0.625rem; text-align: center }
.dl-name { font-size: 1.4375rem; font-weight: 600; letter-spacing: -.012em; line-height: 1.3 }
.dl-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 0.5625rem;
  color: var(--ink-3); font-size: 0.75rem;
}
.dl-meta i { font-style: normal; color: var(--line-2) }
.dl-cta { height: 3.25rem; font-size: 1rem; border-radius: 8px }
.dl-sec { margin-top: 1.625rem; padding-top: 1.375rem; border-top: 1px solid var(--line) }
.dl-sec-t { font-size: 0.6875rem; letter-spacing: .09em; color: var(--ink-3); margin-bottom: 0.6875rem }
.dl-desc { font-size: 0.875rem; line-height: 1.75; color: var(--ink-2); white-space: pre-line }
.ver { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.8125rem 0; border-bottom: 1px solid var(--line) }
.ver:last-of-type { border-bottom: 0 }
.ver-extra { display: none }

/* ── htmx ─────────────────────────────────────────────── */

.htmx-indicator { display: none }
.htmx-request .htmx-indicator { display: inline-flex }
.htmx-request.htmx-indicator { display: inline-flex }
.spin { animation: spin .7s linear infinite }
@keyframes spin { to { transform: rotate(360deg) } }

/* Edge 自带的密码小眼睛藏掉，统一用脚本注入的那一个（Chrome 没有原生眼睛） */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none }

/* ── 窄屏 ─────────────────────────────────────────────── */

@media (max-width: 860px) {
  .auth-brand { display: none }
  .auth-form { padding: 2.5rem 1.375rem }
  .auth-mark { display: flex }
}

@media (max-width: 760px) {
  .page { padding: 1.25rem 1rem 2.75rem }
  .phead { flex-direction: column; align-items: stretch; gap: 0.875rem }
  .phead .btn { align-self: flex-start }
  .t-display { font-size: 1.5rem }
  .topbar { gap: 0.875rem; padding: 0 0.875rem }
  .who span:not(.avatar) { display: none }

  /* 表格在窄屏转卡片 —— 原来是整张表横向滚动 */
  .tbl-r thead { display: none }
  .tbl-r, .tbl-r tbody, .tbl-r tr, .tbl-r td { display: block; width: 100% }
  .tbl-r tr { padding: 0.8125rem 0.875rem; border-bottom: 1px solid var(--line) }
  .tbl-r tbody tr:last-child { border-bottom: 0 }
  .tbl-r td {
    border: 0; padding: 0.1875rem 0;
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  }
  .tbl-r td::before {
    content: attr(data-l); color: var(--ink-3); font-size: 0.75rem; flex-shrink: 0;
  }
  .tbl-r td.cell-main { display: block; padding: 0 0 0.5625rem }
  .tbl-r td.cell-main::before { content: none }
  .tbl-r td.cell-act {
    padding-top: 0.625rem; margin-top: 0.4375rem; border-top: 1px solid var(--line);
  }
  .tbl-r td.cell-act::before { content: none }
  .tbl-r .act { justify-content: flex-start; width: 100%; flex-wrap: wrap }
}

@media (max-width: 520px) {
  .dl { padding: 1.625rem 1.125rem 2.5rem }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr) !important }
}

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

/* ── 图标尺寸 ─────────────────────────────────────────── */
/* 图标本体在 layout.html 里定义（{{template "ico_x" "i-14"}}），
   这里只管尺寸，描边与颜色都跟随 currentColor。 */

.i { width: 1rem; height: 1rem; flex-shrink: 0 }
.i-11 { width: 0.6875rem; height: 0.6875rem }
.i-12 { width: 0.75rem; height: 0.75rem }
.i-13 { width: 0.8125rem; height: 0.8125rem }
.i-14 { width: 0.875rem; height: 0.875rem }
.i-15 { width: 0.9375rem; height: 0.9375rem }
.i-16 { width: 1rem; height: 1rem }
.i-17 { width: 1.0625rem; height: 1.0625rem }
.i-18 { width: 1.125rem; height: 1.125rem }
.i-19 { width: 1.1875rem; height: 1.1875rem }
.i-20 { width: 1.25rem; height: 1.25rem }
.i-21 { width: 1.3125rem; height: 1.3125rem }
.i-22 { width: 1.375rem; height: 1.375rem }

/* ── 栅格 ─────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start }
@media (max-width: 880px) { .grid-side { grid-template-columns: minmax(0, 1fr) } }

.is-copied { color: var(--ok) }

/* 只读链接框：等宽、可点选、超长省略 */
.urlbox {
  display: flex; align-items: center; height: 2.25rem; padding: 0 0.6875rem;
  flex: 1 1 auto; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.urlbox-accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent) }

/* hidden 属性必须能压过 .row / .col / .note 这些 display:flex —— 
   UA 样式表里 [hidden]{display:none} 的优先级比类选择器低。 */
[hidden] { display: none !important }

/* ── 行内表单（管理后台「新建用户」） ─────────────────── */
/* 单独一个类，不要用 .grid-side + 行内 style 覆盖 ——
   行内样式会压过媒体查询，窄屏就塌不下来。 */
.form-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}
@media (max-width: 760px) {
  .form-inline { grid-template-columns: minmax(0, 1fr) }
  .form-inline .btn { justify-self: stretch }
  /* 窄屏顶栏放不下，隐藏文字标识，保留印章 */
  .brand span:not(.seal) { display: none }
  .topbar { gap: 0.625rem }
}

/* 复选框里的 input 是视觉隐藏的，必须锚在 label 上，别飘到别处 */
.check { position: relative }

/* ── 删除确认对话框 ───────────────────────────────────── */
/* 用原生 <dialog> + showModal()：焦点陷阱、Esc 关闭、点不穿、
   top-layer 层级全部由浏览器负责，比自己拿 div 拼可访问性更好。 */

.dlg {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--pop);
}
.dlg::backdrop { background: rgba(8, 8, 10, .46) }
.dlg[open] { animation: dlg-in .14s ease-out }
@keyframes dlg-in {
  from { opacity: 0; transform: translateY(-6px) scale(.99) }
  to { opacity: 1; transform: none }
}
.dlg-body { display: flex; flex-direction: column; gap: 0.875rem; padding: 1.25rem }
.dlg-head { display: flex; gap: 0.75rem; align-items: flex-start }
.dlg-ico {
  width: 2.125rem; height: 2.125rem; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger-soft); color: var(--danger);
}
.dlg-obj {
  display: flex; flex-direction: column; gap: 0.0625rem;
  padding: 0.625rem 0.75rem; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.dlg-foot { display: flex; justify-content: flex-end; gap: 0.5625rem; margin-top: 0.125rem }

/* 全站唯一一个实心红按钮。破例的理由：这是不可撤销动作的最终确认，
   对话框里没有别的强调色跟它抢，「主按钮一律墨色」在这里反而会让
   删除和取消长得一样重。 */
.btn-danger-solid { background: var(--danger); color: var(--on-danger) }
.btn-danger-solid:hover { background: var(--danger); color: var(--on-danger); opacity: .88 }

@media (max-width: 520px) {
  .dlg-foot { flex-direction: column-reverse }
  .dlg-foot .btn { width: 100%; height: 2.5rem }
}
