/* ═══════════════════════════════════════════════════════════════
   光合引擎 · 云端版补充样式
   基础样式全部沿用 style.css（与本地工作台同源），这里只加
   云端版独有的：登录门、步骤条、两栏、流水表、码堆。
   ═══════════════════════════════════════════════════════════════ */

.hidden { display: none !important; }

/* ── 登录门 ── */
/* 基础样式里 input 的宽度规则只覆盖了 text/number/textarea/select，没含 password，
   导致密码框只有默认宽度 —— 这里补齐（只在本版补，不动本地工作台那份） */
input[type="password"] {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 11px; font: inherit; font-size: 13.5px; color: var(--text);
  background: #fff; outline: none;
}
input[type="password"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.gate {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 18px;
}
.gate-card { width: 100%; max-width: 400px; padding: 26px 26px 22px; margin: 0; }
.brandline { display: flex; align-items: center; gap: 9px; justify-content: center; }
.brandline img { height: 26px; width: auto; display: block; }
.brandname { font-size: 13.5px; font-weight: 600; letter-spacing: .3px; }
.brandcap { text-align: center; font-size: 11.5px; color: var(--muted); margin: 6px 0 20px; }
.gate-foot { margin-top: 16px; text-align: center; max-width: 400px; }

.gate-card .seg { width: 100%; justify-content: space-between; }
.gate-card .seg button { flex: 1; padding: 6px 8px; font-size: 12.5px; }

/* 示例数据预览的顶部提示条（只在 ?demo=1 时出现） */
.demo-bar {
  background: var(--brand-soft); border: 1px solid #cfe0ff; color: #2c3f63;
  border-radius: 10px; padding: 9px 14px; font-size: 12.5px; margin-bottom: 16px;
}

.btn.wide { display: block; width: 100%; }
.btnlink {
  border: 0; background: transparent; color: var(--brand); font: inherit;
  font-size: 12.5px; padding: 0; cursor: pointer;
}
.btnlink:hover { text-decoration: underline; }
.btnlink.quiet { color: var(--muted); }
.links { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* ── 步骤条（第一次使用：填邮箱 / 收邮件 / 设密码）── */
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.step { flex: 1; text-align: center; }
.step b {
  display: block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%;
  background: #f1f3f6; color: var(--muted); font-size: 12px; margin: 0 auto 6px; font-weight: 600;
}
.step.on b { background: var(--brand); color: #fff; }
.step.done b { background: var(--brand-soft); color: var(--brand); }
.step em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.step.on em { color: var(--text); font-weight: 600; }

/* ── 顶栏的账号条 ── */
.acctbar { display: flex; align-items: center; gap: 10px; }

/* ── 总览的数字卡：略收窄，宽屏能一行放下 5 张（否则第五张孤零零换行）── */
.grid { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }

/* ── 两栏（账号页）── */
/* 两栏等高：右边框体要和左边齐平（阿和 2026-09-22 指出不对齐看着不舒服） */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

/* ── 积分用量说明：常驻可查，但不抢眼（阿和 2026-09-22：不用这么明显）── */
.pts { font-size: 12.5px; }
.pts td { padding: 4px 0; border-bottom: 0; color: var(--muted); }
.pts td:last-child { text-align: right; white-space: nowrap; }
.pts tr:last-child td { border-bottom: 0; }
.pts tbody tr:hover { background: transparent; }

/* ── 积分流水表 ── */
.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th, .ledger td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ledger th { color: var(--muted); font-weight: 500; font-size: 12px; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger td:last-child { text-align: right; }
.minus { color: #d64545; }
.plus { color: var(--ok); }

/* ── 码堆（生成后一片可复制的码）── */
.codepile {
  max-height: 320px; overflow: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px;
}
.codepile .copyline { font-size: 12.5px; text-align: center; padding: 8px; letter-spacing: .4px; }

/* 空态／表格里的次级文字沿用 style.css，不再重复定义 */

/* ═══════════════════════════════════════════════════════════════
   以下是 2026-09-17 补的：把「提示」做成一定看得见的浮层，
   并补上本地工作台有、这份基础样式里没有的几个类。
   起因：原来的 .toast 只是"页面里的一行小字"，页面没插容器就完全不显示
   → 用户点了按钮像"没反应"。提示必须浮在最上层，任何页面都能看见。
   ═══════════════════════════════════════════════════════════════ */

/* ── 提示浮层：固定底部居中，出现即有底色与阴影 ── */
.toastbar {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px);
  z-index: 90; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 0;
  pointer-events: none;
}
.toastbar .toast {
  padding: 10px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5;
  background: #232a35; color: #fff; box-shadow: 0 8px 24px rgba(16, 24, 40, .22);
  opacity: 0; transition: opacity .18s ease, transform .18s ease;
}
.toastbar .toast.on { opacity: 1; transform: translateY(0); }
.toastbar .toast.ok { background: #146c43; }
.toastbar .toast.err { background: #b0322d; }

/* ── 全局错误条：任何未捕获的脚本错误都显示在这里（不许静默失败）── */
.errbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  background: #b0322d; color: #fff; font-size: 13px; line-height: 1.5;
  padding: 10px 16px; display: flex; align-items: flex-start; gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
/* ⚠️ 必须显式写 `[hidden]` 的隐藏：上面的 `display:flex` 会盖掉浏览器对 `hidden` 的默认 display:none，
   结果"空错误条"一直挂在页面顶端挡住内容（2026-09-17 截图自查抓到）。 */
.errbar[hidden] { display: none; }
.errbar b { font-weight: 600; }
.errbar .eb-close {
  margin-left: auto; border: 0; background: rgba(255, 255, 255, .18); color: #fff;
  font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 7px; cursor: pointer; flex: 0 0 auto;
}
.errbar .eb-close:hover { background: rgba(255, 255, 255, .3); }

/* 有错误条时把整页往下让一点，别挡住顶栏 */
body.has-errbar .app, body.has-errbar .gate { padding-top: 44px; }

/* ── 二级筛选：整行下划线 tab（本地工作台同款，这份基础样式里没有）── */
.tabs.flat { gap: 20px; border-bottom: 1px solid var(--line); }

/* 工具条里的筛选组要占满剩余宽度。
   ⚠️ 这原本是写在 HTML 上的行内 `style="flex:1"` —— 行内样式优先级压过了响应式规则，
   于是手机上那条「占满整行」的媒体查询**完全失效**，容器被挤到最窄、按钮只好竖着堆，
   表现是右侧一竖列（阿和 2026-09-29 截图）。行内样式一律挪进这里。 */
.toolbar .tabs.flat { flex: 1; min-width: 0; }

/* 手机端才用的「图标行」和「展开行」（搜索 / 筛选）：桌面端一律不显示 —— 桌面用 .insp-tabs 那排按钮。
   手机上在 @media 里改成 flex / block。 */
.micons, .mrow { display: none; }
.tabs.flat .tab {
  border: 0; background: transparent; border-radius: 0; padding: 8px 0 10px;
  color: var(--muted); font-size: 13px;
}
.tabs.flat .tab:hover { background: transparent; color: var(--text); }
.tabs.flat .tab.active {
  color: var(--text); font-weight: 600; background: transparent; border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--brand);
}
.tabs.flat .tab.dim { opacity: .45; }

/* 新生成 / 刚变更的那一行：短暂高亮 */
tbody tr.fresh { background: #f6f9ff; }
tbody tr.fresh td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* 复盘的分项数字框：一排等宽小框，都不必填 */
.metrics { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 4px; }
.metric { display: flex; flex-direction: column; gap: 4px; flex: 1 1 96px; max-width: 152px; min-width: 88px; }
.metric em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.metric input { width: 100%; }

/* 内容详情里"只读段落"的阅读感：正文要有呼吸 */
.pre { white-space: pre-wrap; }

/* 侧栏导航分组标题（把"创作"与"账号/后台"分开） */
.nav-split { height: 1px; background: var(--line); margin: 10px 12px; }

/* ── 人设问答的对话气泡（建人设卡走问答，不让客户对着空字段发呆）──
   ⚠️ 字号别调小：这是客户要**读进去**的内容（AI 的提问、给的人设草稿），
   2026-09-18 阿和反馈 13.5px "太小、不显眼"，改成 15px 且行距放宽。 */
/* 聊天区：**固定高度、内部滚动**（2026-09-21 阿和：「聊的越多页面越来越长」）。
   卡是自动写入的，对话只是过程记录 —— 所以给它一个高度，长了自己在框里滚，页面不再被撑长。
   配合 app.js 的 CHAT_MAX（只留最近 40 条）+ 「清空对话」按钮，三件一起才治本。 */
.chat {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 14px;
  max-height: 300px; overflow-y: auto;
  padding-right: 4px;   /* 给滚动条留位，气泡不贴边 */
}
.bubble {
  max-width: 82%; padding: 12px 16px; border-radius: 12px;
  font-size: 15px; line-height: 1.8; word-break: break-word;
}
.bubble.assistant { align-self: flex-start; background: #f4f6f9; border: 1px solid var(--line); color: var(--text); }
.bubble.user { align-self: flex-end; background: var(--brand); color: #fff; }
.bubble code { background: rgba(0, 0, 0, .07); padding: 1px 5px; border-radius: 5px; font-size: 13.5px; }
.bubble.user code { background: rgba(255, 255, 255, .22); }
/* 正在思考/正在输出：一直有个转圈 + 实时字数，客户知道"它在干活"，不是死机 */
.bubble.think {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); background: #f8fafc;
}
/* 出错：留在对话里（不是一闪而过的提示），带「重试」 */
.bubble.err { background: #fdf3f3; border-color: #f0c9c9; color: #a33232; align-self: flex-start; }
.bubble.err .anchor { color: #a33232; text-decoration: underline; }
/* 还没开始时的引导话术：比 .hint 大一档，别让人看不清 */
.chat-empty { padding: 2px 2px 0; }
.lead { font-size: 14px; color: #6b7480; line-height: 1.9; }

/* 输入行：输入框吃掉剩余宽度，按钮**永远不换行**（窄窗口也不许把按钮挤到下一行） */
.chatrow { display: flex; gap: 10px; align-items: center; }
.chatrow > input { flex: 1 1 auto; min-width: 0; }
.chatrow > .btn { flex: 0 0 auto; white-space: nowrap; }

.draftcard { background: #fbfcfe; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 14px; }

/* 页脚：备案号的落点。手机上侧栏收成底部导航、看不到侧栏页脚，
   所以「我的账号」页底部也要有一份（法规要求备案号在网站底部可见）。 */
.pagefoot { text-align: center; padding: 6px 0 2px; }

/* 窄屏：两栏与工具条都堆叠，手机上也别挤成一团 */
@media (max-width: 860px) {
  .toolbar { flex-wrap: wrap; gap: 10px; }
  .toolbar .seg.seg-view { flex: 1 1 auto; }
  .toolbar .tabs.flat { flex: 1 1 100%; overflow-x: auto; }
  .metrics { gap: 8px 10px; }
  .metric { min-width: 82px; }
  .bubble { max-width: 92%; }
  .chatrow { flex-wrap: wrap; }
  .chatrow > input { flex: 1 1 100%; }
  .chatrow > .btn { flex: 1 1 100%; }
}

/* ══════════ 手机端适配（2026-09-29 阿和：「手机界面太丑，优化一下」）══════════
   为什么写在 cloud.css 末尾：cloud.css 在 index.html 里排在 style.css **之后**，
   同优先级下后加载的胜出 —— 移动端规则放这儿才能压过上面的桌面规则。
   桌面端（>780px）完全不受影响。

   三处关键改动：
   ① 侧栏 → 底部导航栏。手机是拇指操作，底部可达性最好；而且不再横向挤占空间。
      （原来是「236px 缩成 62px 的小图标条」，但导航项文字没有 span 包裹、
        `.nav-item span{display:none}` 根本没生效 → 文字全挤在 62px 里，这是"丑"的主因）
   ② 表格 → 卡片。5~6 列定宽表在 390px 屏上必然挤成一团，改成一条记录一张卡。
   ③ 输入框字号 ≥16px。iOS 上小于 16px 会在聚焦时**自动放大整页**（画面突然跳一下）。
*/
@media (max-width: 780px) {

  /* ── ① 侧栏变成底部导航栏 ── */
  .app { flex-direction: column; }

  .side {
    position: fixed; z-index: 60;
    left: 0; right: 0; bottom: 0; top: auto;
    width: auto; flex: 0 0 auto; height: auto;
    flex-direction: row; align-items: center;
    border-right: 0; border-top: 1px solid var(--line);
    overflow: visible;
    padding: 4px 6px 4px;
  }
  /* 两条分开写：不支持 env() 的老浏览器忽略第二条，仍保留第一条的上下内边距 */
  .side { padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); }

  .brand, .brand-txt, .side-foot, .nav-split { display: none; }
  .nav { flex-direction: row; flex: 1 1 auto; gap: 2px; }
  .nav-item {
    flex: 1 1 0; min-width: 0;
    flex-direction: column; justify-content: center; gap: 2px;
    min-height: 46px; padding: 6px 2px;
    font-size: 11px; line-height: 1.2; text-align: center;
  }

  /* ── ② 内容区：占满整屏，底部给导航栏让位（含 iPhone 底部安全区）── */
  .main { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding: 14px 14px 0; }
  .topbar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .topbar { align-items: center; flex-wrap: wrap; gap: 6px; }
  .topbar h1 { font-size: 17px; }
  .view { padding: 14px 14px 28px; }

  /* 卡片与统计：一行放不下两张，改单列；内边距收紧 */
  .card { padding: 15px; margin-bottom: 12px; }
  .grid, .grid2 { grid-template-columns: 1fr; gap: 10px; }
  .stat { padding: 13px 15px; }
  .stat .n { font-size: 22px; }

  /* ── ③ 表单控件 16px（防 iOS 聚焦放大整页）+ 触控目标加高 ── */
  input[type="text"], input[type="number"], input[type="password"], input[type="email"],
  textarea, select { font-size: 16px; }
  .btn { padding: 10px 14px; }
  .tab { padding: 8px 14px; }
  .row > * { min-width: 100%; }
  .row > .shrink { min-width: 0; }
  /* 字段名那一列要放得下最长的一个（「常用表达/口头禅」8 个字）——
     78px 会被折成两行（阿和 2026-09-29 截图里就是这样）。 */
  .kv { grid-template-columns: 104px 1fr; gap: 8px 10px; }
  .kv dt { font-size: 12px; }

  /* ── ④ 表格 → 卡片 ── */
  :is(.insp-table, .insp-trash, .works-table, .works-arch), table.ledger { display: block; width: 100%; }
  :is(.insp-table, .insp-trash, .works-table, .works-arch) thead { display: none; }             /* 卡片模式下表头没有意义 */
  table.ledger tr:first-child { display: none; }   /* ledger 的表头是 tbody 的第一行 */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) tbody { display: block; }

  /* ── 列表：细线分隔的「行」，不再"卡里套卡" ──
     布局用 flex + 自动折行：标题类占满整行，次要信息横排（放不下自动折），
     操作按钮占满整行。以前每列各占一行，一条能占掉大半屏。
     四个表列数不同，所以按类名分别指定哪几列占满 —— 一套规则套所有表会错位。
     （运营后台那几张管理表列多信息密，手机上不适合卡片化，维持原样、保持可横滑。） */
  .insp-table tr, .insp-trash tr, .works-table tr, .works-arch tr, table.ledger tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
    background: transparent; border: 0; border-radius: 0;
    padding: 12px 0; margin-bottom: 0;
    border-bottom: 1px solid var(--line);
  }
  .insp-table tr:last-child, .insp-trash tr:last-child, .works-table tr:last-child,
  .works-arch tr:last-child, table.ledger tr:last-child { border-bottom: 0; padding-bottom: 2px; }

  /* 标题那一列占满整行 */
  .insp-table td:nth-child(2), .insp-trash td:nth-child(2),
  .works-table td:nth-child(1), .works-arch td:nth-child(1) { flex: 1 1 100%; }
  /* 灵感库的「爆款逻辑」（已经限一行）也占满整行 */
  .insp-table td:nth-child(3) { flex: 1 1 100%; }
  /* 操作按钮占满整行 —— 否则会和平台/时间挤在一起 */
  .insp-table td:last-child, .insp-trash td:last-child,
  .works-table td:last-child, .works-arch td:last-child { flex: 1 1 100%; margin-top: 2px; }
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td, table.ledger td {
    display: block; width: auto !important;    /* 必须 !important：列宽是行内 style 锁死的 */
    padding: 2px 0 !important; border: 0;
  }
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td:first-child, table.ledger td:first-child { padding-left: 0 !important; }
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td:last-child, table.ledger td:last-child { padding-right: 0 !important; }
  /* 卡片第一格是标题：放大当"卡片名"；长标题允许换行显示全（不再省略号） */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td:first-child .strong { font-size: 14.5px; }
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td.ell, :is(.insp-table, .insp-trash, .works-table, .works-arch) td .ell, :is(.insp-table, .insp-trash, .works-table, .works-arch) td.nowrap {
    white-space: normal; overflow: visible; text-overflow: clip;
  }
  /* 操作按钮：单独一行 */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td:last-child { margin-top: 8px; }
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td:last-child .btn { margin: 0 8px 0 0; }
  tbody tr:hover { background: var(--panel); }     /* 触屏没有 hover，去掉变色避免"粘住" */

  /* 其他容易挤成一条的地方 */
  .seg { overflow-x: auto; }
  .pre { padding: 12px 13px; max-height: none; }
  .bubble { max-width: 92%; }
  /* 提示条要和内容区左右对齐（.view 的边距是 14px） */
  .cardbar { margin-left: 14px; margin-right: 14px; }

  /* ── 工具行：一行搞完 —— 左边「灵感库 / 回收站」，右边两个图标 ──
     阿和 2026-09-29：「可点的东西太多、又散又占地方」＋「搜索做成小放大镜，点一下弹出来」。
     所以平台/类型和搜索**默认都收起**，这一屏只剩 seg + 两个图标。
     另外筛选区不再是独立卡片 —— 它和下面的列表一起装在大卡 .insp-panel 里。 */
  .toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 0; margin-bottom: 0;
    border-bottom: 1px solid var(--line);
  }
  .toolbar .insp-tabs { display: none; }          /* 桌面那排按钮收起，改用图标展开 */
  /* seg 别撑满整行 —— 贴合内容就好，整行更透气（撑满会显得笨重、右边图标也孤立） */
  .toolbar > .seg.seg-view { flex: 0 1 auto; min-width: 0; }

  .micons { display: flex; gap: 2px; flex: 0 0 auto; margin-left: auto; }
  .iconbtn {
    width: 36px; height: 36px; padding: 0; border: 0; background: transparent;
    color: var(--muted); border-radius: 9px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .iconbtn.on { background: var(--brand-soft); color: var(--brand); }

  /* 点图标才出现的两行（平台/类型、搜索）。
     ⚠️ 必须 `flex: 1 1 100%`：`.toolbar` 是 flex 容器（桌面基础样式里就是），
     不占满整行的话这两行会和图标挤在一行、宽度也算不对。 */
  .mrow { flex: 1 1 100%; display: block; padding-top: 12px; }
  .mrow.hidden { display: none; }
  /* 平台 / 类型各一组，用分段控件（跟灵感库/回收站同款）；一组一行，放不下可横滑 */
  .mrow .seg { display: flex; width: 100%; overflow-x: auto; }
  .mrow .seg + .seg { margin-top: 10px; }
  .mrow .seg button { flex: 0 0 auto; }

  /* ── 卡片里的信息分层：一条灵感不要占好几屏 ── */
  /* 长文本（爆款逻辑）只留一行 —— 一条灵感不要占好几屏；想看全就点「写这篇」进创作页 */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td.ell {
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.55;
  }
  /* 触屏上批量多选不顺手，而且复选框会独自占一行、很怪 → 手机上收掉 */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td.pick { display: none; }
  /* 「搜索」来源链接在手机上价值低，收掉减少噪音 */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) td.ref { display: none; }
  /* 紧跟在表格后面的批量操作条：复选框已经隐藏，这些按钮无从下手 → 一起收掉。
     用相邻选择器只选「表格后面那一条」，不碰详情页的「回列表」等其他 .bar。 */
  :is(.insp-table, .insp-trash, .works-table, .works-arch) + .bar { display: none; }

  /* 运营后台的管理表（管理员 / 兑换码 / 租户 / 积分流水）列多、信息密，不做卡片化 ——
     至少让它能**横向滑动**看全，别把字挤成竖排。 */
  #aBox table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #aBox table th, #aBox table td { white-space: nowrap; }

  /* 创作页那几个字段带**行内** max-width:150px（桌面端为了让并排的三个控件别拉太宽）——
     手机上必须占满整行，否则每个只占 150px、右边空一大块。
     只能用 !important 压行内样式。 */
  .row > label.field { max-width: none !important; }

  /* 人设卡的输入行：输入框 + 发送按钮**同一行**。
     860px 那条规则把它们各撑满一整行 —— 手机上那样又占地方、按钮还长得笨重。 */
  .chatrow { flex-wrap: nowrap; gap: 8px; }
  .chatrow > input { flex: 1 1 auto; min-width: 0; }
  .chatrow > .btn { flex: 0 0 auto; }

  /* 人设卡的字段值全是长句，手机上一屏全是字（阿和 2026-09-29：「文字排版看起来太多字了」）——
     字号和行高各收一点，让它轻一些。 */
  .kv dt { font-size: 12px; }
  .kv dd { font-size: 13px; line-height: 1.6; }

  /* 卡片标题允许换行：标题右边常带一句说明（`.tag`），
     挤在一起会把标题本身顶到折行 —— 阿和截图里「让 AI 改一版」被折成了两行。
     说明单独占一行，标题就完整了。 */
  .card h2 { flex-wrap: wrap; }
  .card h2 .tag { flex: 1 1 100%; }

  /* ── 作品项：信息项多，改用**固定区域**排 ──
     自由折行时每条的断开位置都不一样（阿和 2026-09-29：「作品卡里面有点乱」）；
     固定成几行之后，每条结构一致，看着才有秩序：
       行1 选题（标题 + 副标题）
       行2 平台 · 形式
       行3 数据
       行4 时间（左）｜状态（右）
       行5 查看 / 归档 */
  .works-table tr, .works-arch tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  }
  .works-table td.meta { color: var(--muted); font-size: 12px; }
  .works-table td:nth-child(1), .works-table td:nth-child(2), .works-table td:nth-child(3),
  .works-table td:nth-child(6) { grid-column: 1 / -1; }
  .works-table td:nth-child(5) { grid-column: 1 / 2; }                     /* 时间靠左 */
  .works-table td:nth-child(4) { grid-column: 2 / 3; justify-self: end; }  /* 状态下拉靠右 */
  /* 已归档表（选题 / 平台·形式 / 数据 / 时间 / 按钮）：全部竖排即可 */
  .works-arch td:nth-child(2), .works-arch td:nth-child(3),
  .works-arch td:nth-child(4), .works-arch td:nth-child(5) { grid-column: 1 / -1; }
}
