/* 远程与主机页样式。公用件（.card / .tbl / .list / .st / .btn / .cols2）在 style.css，这里只补看板里那几样，
   类名统一加 rm- 前缀，免得跟别的页面自己的样式撞上。 */
.remote-page .rm-kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; font-size: 13px; }
.remote-page .rm-kv > span:nth-child(odd) { color: var(--muted); }
.remote-page .rm-kv > span { overflow-wrap: anywhere; }

/* 模型徽章：模型名 + 在哪跑（订阅号 / 远端 API / Codex），跟看板一个样子 */
.remote-page .rm-model { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; background: var(--panel2); max-width: 100%; }
.remote-page .rm-model b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-page .rm-where { font-size: 11px; padding: 0 6px; border-radius: 6px; white-space: nowrap; }
.remote-page .rm-where.sub { background: var(--ok-soft); color: var(--ok); }
.remote-page .rm-where.key { background: var(--remote-soft); color: var(--remote); }
.remote-page .rm-where.codex { background: var(--warn-soft); color: var(--warn); }
.remote-page .rm-where.def { background: var(--chip); color: var(--muted); }
.remote-page .rm-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.remote-page .rm-run { color: var(--accent); font-weight: 600; }

/* 桌面端会话、审计日志长了就自己滚，别把整页顶长 */
.remote-page .rm-scroll { max-height: 380px; overflow: auto; }

/* 对话页顶栏右边：上下文用量（文字 + 细进度条）和「已自动换号」徽标（views/chat.js 的 CtxMeter）。
   宽屏显示「上下文 45% · 9万/20万」，窄屏只显示「45%」，不挤掉返回 / 菜单按钮。 */
.chat-head .ctx-box { position: relative; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; flex: 0 1 auto; min-width: 0; max-width: 46%; }
.ctx-meter { display: grid; gap: 3px; padding: 3px 6px; border-radius: 8px; text-align: right; min-width: 44px; color: var(--muted); }
.ctx-meter:hover { background: var(--chip); }
.ctx-label { font-size: 11.5px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctx-short { display: none; }
.ctx-bar { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ctx-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--ok); transition: width .3s; }
.ctx-meter.warn { color: var(--warn); }
.ctx-meter.warn .ctx-bar > span { background: var(--warn); }
.ctx-meter.bad { color: var(--bad); font-weight: 600; }
.ctx-meter.bad .ctx-bar > span { background: var(--bad); }
.ctx-switch { font-size: 11px; line-height: 1.3; padding: 0 6px; border-radius: 6px; background: var(--remote-soft); color: var(--remote); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ctx-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: min(280px, 80vw); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); text-align: left; white-space: normal; }
/* 对话页顶栏「新开对话（引用这段）」：宽屏带字，窄屏（< 900）只留 ↪+ 图标，title 说明 */
.chat-head .fork-ref-btn { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 0 8px; height: 32px; white-space: nowrap; color: var(--accent); }
.chat-head .fork-ref-btn .ref-ico { font-weight: 700; }
.chat-head .fork-ref-btn .lbl { margin-left: 3px; }
@media (max-width: 899px) {
  .chat-head .fork-ref-btn { padding: 0 6px; }
  .chat-head .fork-ref-btn .lbl { display: none; }
}
@media (max-width: 600px) {
  .ctx-long { display: none; }
  .ctx-short { display: inline; }
  .chat-head .ctx-box { max-width: 38%; }
}

/* 对话列表全量搜索：搜到已归档的标一下（views/sessions.js） */
.pane-list .arch-tag { flex: none; margin: 0 6px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.pane-list .search-note { padding-top: 2px; padding-bottom: 4px; }
