/* 按风格区分的规则（issue 917 P1）：变量换值表达不了的差别写在这里——哪些标题用哪款字体（第 2 步）、
   线的粗细、选中的样子、输入框和弹窗的版式（第 3 步）。排在所有样式表最后加载。
   每条选择器都必须以 :is(html, body)[data-style="…"][data-theme] 开头（tests/test_style_tokens_917.py 守着）：
   这样「经典」一条都匹配不到；两个属性一起写，权重才压得过 style.css 里 body[data-cc-embedded] 开头的规则。
   字体文件的声明在 fonts-paper.css / fonts-kohaku.css（自动生成），只有选了对应风格的页面才加载；这里引用到的字体名
   在没加载 / 还没下完时落到后面的系统字体。字体栈里不放中易宋体和通用 serif（Windows 上会抢在自带字体前面）。 */

/* ───────── 纸墨：标题思源宋体（里面的英文也用它，同样张）；品牌字、模型名、水印用 EB Garamond ───────── */
:is(html, body)[data-style="paper"][data-theme] {
  --skin-ui: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --skin-display: "Koi Serif", var(--skin-ui);
  --skin-latin: "Koi Garamond", "Koi Serif", var(--skin-ui);
  --skin-lift: rgba(60, 45, 20, 0.5);   /* 输入框、弹窗底下那一抹投影 */
}
:is(html, body)[data-style="paper"][data-theme][data-theme="dark"] { --skin-lift: rgba(0, 0, 0, 0.7); }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces > header span { font-family: var(--skin-latin); font-weight: 500; letter-spacing: -0.005em; }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces > header span b { font-style: italic; font-weight: 500; margin-right: 0.12em; }   /* 斜体的 i 往右倒，不留空就贴到 C 上 */
:is(html, body)[data-style="paper"][data-theme] #cc-conv-title,
:is(html, body)[data-style="paper"][data-theme] .modal-header h3,
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces li.active .cc-ws-body > div:first-child { font-family: var(--skin-display); font-weight: 600; }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces li.active .cc-ws-body > div:first-child { font-size: var(--fs-lead); }
:is(html, body)[data-style="paper"][data-theme] #cc-files > header > span { font-family: var(--skin-display); font-weight: 600; font-size: var(--fs-heading-lg); color: var(--text-primary); }
:is(html, body)[data-style="paper"][data-theme] #cc-model-btn { font-family: var(--skin-latin); font-size: var(--fs-lead); }
:is(html, body)[data-style="paper"][data-theme] #cc-conversation::after {
  font-family: var(--skin-latin); font-style: italic; font-weight: 500; letter-spacing: -0.02em;
  color: var(--accent); opacity: 0.12; transform: none; right: 30px;
  line-height: 0.86; bottom: calc(var(--cc-dock-h, 118px) + 2px);   /* 坐在输入区上沿：输入框写高了水印跟着上移，不被盖住 */
}

/* ───────── 红白：标题思源黑体特粗（里面的英文也用它，同样张）；品牌字、模型名、水印用 Bricolage Grotesque ───────── */
:is(html, body)[data-style="kohaku"][data-theme] {
  --skin-ui: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --skin-display: "Koi Sans Heavy", var(--skin-ui);
  --skin-latin: "Koi Grotesque", "Koi Sans Heavy", var(--skin-ui);
  --skin-lift: rgba(16, 16, 18, 0.12);   /* 弹窗、菜单的硬边投影 */
}
:is(html, body)[data-style="kohaku"][data-theme][data-theme="dark"] { --skin-lift: rgba(255, 255, 255, 0.14); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces > header span { font-family: var(--skin-latin); font-weight: 800; letter-spacing: -0.03em; font-stretch: 85%; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces > header span b { font-weight: 800; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-title,
:is(html, body)[data-style="kohaku"][data-theme] .modal-header h3,
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active .cc-ws-body > div:first-child { font-family: var(--skin-display); font-weight: 900; letter-spacing: -0.02em; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-files > header > span { font-family: var(--skin-display); font-weight: 900; font-size: var(--fs-heading-lg); color: var(--text-primary); letter-spacing: -0.015em; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-model-btn { font-family: var(--skin-latin); font-weight: 700; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conversation::after {
  font-family: var(--skin-latin); font-weight: 800; font-stretch: 80%; letter-spacing: -0.06em;
  color: var(--accent); opacity: 0.1; transform: none; right: 30px;
  line-height: 0.8; bottom: calc(var(--cc-dock-h, 118px) + 2px);
}

/* ═════════ 第 3 步：变量换值表达不了的版式差别 ═════════
   功能页（设置、用户管理等）里很多样式是 app.js 写在元素上的行内样式，样式表要盖过它只能用 !important——
   所以下面带 !important 的都是在盖行内样式；那些元素在 app.js 里各有一个 fp-* 类名（function page），行内样式原样留给经典用。
   --cc-dock-h 是输入区实际占的高度（cc.js trackDockHeight）。 */

/* ───────── 纸墨：细线、底线式输入、标题放大 ───────── */
/* 左栏 */
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces { border-right: 1px solid var(--border); }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces > header { height: auto; flex-shrink: 0; padding: 26px 22px 18px; align-items: baseline; }
:is(html, body)[data-style="paper"][data-theme] #cc-new-ws { background: none; color: var(--text-secondary); border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; box-shadow: none; padding: 5px 0; font-weight: 400; font-size: 13px; }
:is(html, body)[data-style="paper"][data-theme] #cc-new-ws:hover { background: none; color: var(--text-primary); border-bottom-color: var(--text-primary); transform: none; box-shadow: none; filter: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-ws-search,
:is(html, body)[data-style="paper"][data-theme] #cc-file-search { margin: 0 22px 8px; width: auto; background-color: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding-left: 26px; background-position: 2px center; box-shadow: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-ws-search:focus,
:is(html, body)[data-style="paper"][data-theme] #cc-file-search:focus { border-bottom-color: var(--accent); box-shadow: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces li.cc-ws-group { letter-spacing: .22em; font-size: 12px; padding: 18px 16px 6px; }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces li .cc-ws-body { padding-left: 26px; }
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces li.active { background: var(--surface-raised); box-shadow: 0 1px 0 var(--border); }
/* 小红块的底边落在空间名的基线上（名字 16px 宋体、行内基线在行顶下 23 + 7 = 30px 处；改名字的字号 / 行高要跟着改） */
:is(html, body)[data-style="paper"][data-theme] #cc-workspaces li.active::before { left: 11px; top: 23px; bottom: auto; width: 7px; height: 7px; border-radius: 1px; background: var(--accent); }
:is(html, body)[data-style="paper"][data-theme] .cc-func-drawer { margin: 0; padding: 8px 12px 10px; border-top: 1px solid var(--border); }
/* 对话顶栏 */
:is(html, body)[data-style="paper"][data-theme] #cc-conv-header { position: relative; height: auto; flex-shrink: 0; padding: 24px 40px 16px; align-items: flex-end; border-bottom-color: transparent; }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-header::after { content: ""; position: absolute; left: 40px; right: 40px; bottom: 0; height: 1px; background: var(--border); }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-title { font-size: var(--fs-title); line-height: 1.2; letter-spacing: .01em; }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-header > button,
:is(html, body)[data-style="paper"][data-theme] #cc-conv-header .tool-drawer > .btn-icon { border-color: transparent; background: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-header > button:hover,
:is(html, body)[data-style="paper"][data-theme] #cc-conv-header .tool-drawer > .btn-icon:hover { background: var(--bg-tertiary); }
/* 标题后面的「空闲 / 忙碌」（这两个节点只有纸墨 / 红白下才有，cc.js _renderConvTitle）。名字太长时省略的是名字，状态留着。
   裁切交给名字那一格：标题自己不裁（否则 p / y / g 的下半截被行框裁掉），名字那格上下各让出 0.2em 再裁——这个数是按现在这两款自带标题字体量的，换标题字体要重新看一眼 */
:is(html, body)[data-style="paper"][data-theme] #cc-conv-title { display: grid; grid-template-columns: minmax(0, max-content) max-content; justify-content: start; align-items: baseline; column-gap: 14px; overflow: visible; min-width: 0; }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-name { overflow: hidden; text-overflow: ellipsis; padding: .2em 0; margin: -.2em 0; }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-status { font: 400 13px var(--skin-ui); letter-spacing: 0; color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: 2px; border-radius: 50%; background: var(--style-ok); }
:is(html, body)[data-style="paper"][data-theme] #cc-conv-status[data-state="busy"]::before { background: var(--accent); }
/* 消息与输入区 */
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-msg.user { border-radius: var(--radius-sm); padding: 12px 18px; }
/* 日期分隔线：每天第一句提问上方，居中、两边各一条细线（cc.js _syncDaySeps） */
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-day-sep { display: flex; align-items: center; gap: 16px; margin: 30px 0 20px; font-family: var(--skin-display); font-size: 13px; letter-spacing: .12em; color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-day-sep::before,
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-day-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-day-sep:first-child { margin-top: 6px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-day-sep + .cc-msg.user { margin-top: 0; }
:is(html, body)[data-style="paper"][data-theme] #cc-input-bar { border-top: 0; }
:is(html, body)[data-style="paper"][data-theme] .cc-composer { background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 14px 14px 10px 18px; box-shadow: 0 10px 24px -18px var(--skin-lift); }
:is(html, body)[data-style="paper"][data-theme] .cc-composer:focus-within { border-color: var(--text-secondary); box-shadow: 0 10px 24px -18px var(--skin-lift); }
:is(html, body)[data-style="paper"][data-theme] #cc-model-btn { background: none; border: 0; border-left: 1px solid var(--border); border-radius: 0; padding: 4px 12px; margin-left: 4px; }
:is(html, body)[data-style="paper"][data-theme] #cc-send { box-shadow: none; width: 38px; height: 38px; }
:is(html, body)[data-style="paper"][data-theme] .cc-meter-bar { height: 2px; }
:is(html, body)[data-style="paper"][data-theme] .cc-meter-fill { background: var(--text-secondary); }
/* 文件栏 */
:is(html, body)[data-style="paper"][data-theme] #cc-files { border-left: 1px solid var(--border); }
:is(html, body)[data-style="paper"][data-theme] #cc-files > header { height: auto; flex-shrink: 0; padding: 28px 22px 14px; align-items: baseline; }
:is(html, body)[data-style="paper"][data-theme] #cc-files > header button { background: none; border: 0; padding: 0 0 0 12px; font-size: 13px; color: var(--text-secondary); }
:is(html, body)[data-style="paper"][data-theme] #cc-files > header button:hover { background: none; border: 0; color: var(--text-primary); }
:is(html, body)[data-style="paper"][data-theme] #cc-new-folder-btn svg { position: relative; top: 3px; }   /* 图标本来坐在文字基线上，比旁边「＋文件」的字高 2.5px；这里没有边框遮着，往下挪到和字同一条中线（数是按截图里的笔画上下沿量的） */
:is(html, body)[data-style="paper"][data-theme] #cc-file-tree { padding: 4px 12px 12px; }
/* 弹窗与功能页 */
:is(html, body)[data-style="paper"][data-theme] .modal,
:is(html, body)[data-style="paper"][data-theme] .cc-modal-panel { border: 1px solid var(--border-strong); box-shadow: 0 30px 60px -40px var(--skin-lift); background: var(--surface-canvas); }
:is(html, body)[data-style="paper"][data-theme] .cc-modal-panel > header { padding: 22px 24px 12px; background: none; font-family: var(--skin-display); font-weight: 600; font-size: var(--fs-heading-lg); }
:is(html, body)[data-style="paper"][data-theme] .cc-modal-note { padding: 12px 24px; }
:is(html, body)[data-style="paper"][data-theme] .modal-header { padding: 28px 32px 16px; align-items: flex-end; }
:is(html, body)[data-style="paper"][data-theme] .modal-header h3 { font-size: var(--fs-title); line-height: 1.2; }
:is(html, body)[data-style="paper"][data-theme] .modal-body { padding: 14px 32px 28px; }
:is(html, body)[data-style="paper"][data-theme] .modal-body .setting-group > label,
:is(html, body)[data-style="paper"][data-theme] .modal-body .fp-label,
:is(html, body)[data-style="paper"][data-theme] .modal-body summary { font-size: 12px !important; letter-spacing: .2em; color: var(--text-muted) !important; font-weight: 400 !important; }
:is(html, body)[data-style="paper"][data-theme] .modal-body .setting-group > label,
:is(html, body)[data-style="paper"][data-theme] .modal-body .fp-label { margin-bottom: 8px !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-row { padding: 14px 0 !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-row span { white-space: nowrap; }
:is(html, body)[data-style="paper"][data-theme] .fp-name,
:is(html, body)[data-style="paper"][data-theme] .deleted-user-row strong,
:is(html, body)[data-style="paper"][data-theme] .pet-token-row strong { font-family: var(--skin-latin); font-size: 20px; font-weight: 500; line-height: 1.1; }
:is(html, body)[data-style="paper"][data-theme] .fp-badge-admin { background: none !important; color: var(--accent) !important; padding: 0 !important; font-size: 12px !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-badge-warn { background: none !important; color: var(--style-warn) !important; border: 1px solid var(--style-warn); border-radius: var(--radius-xs) !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-btn { background: var(--surface-raised) !important; border-color: var(--border-strong) !important; padding: 4px 8px !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-btn:hover { color: var(--text-primary) !important; border-color: var(--text-secondary) !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-btn-danger,
:is(html, body)[data-style="paper"][data-theme] .pet-token-revoke { background: none !important; color: var(--accent) !important; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent) !important; padding: 4px 8px !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-btn-danger:hover,
:is(html, body)[data-style="paper"][data-theme] .pet-token-revoke:hover { border-color: var(--accent) !important; }
:is(html, body)[data-style="paper"][data-theme] .fp-btn-primary,
:is(html, body)[data-style="paper"][data-theme] .modal .fm-btn-accent,
:is(html, body)[data-style="paper"][data-theme] .cc-modal-panel .cc-trial-new button,
:is(html, body)[data-style="paper"][data-theme] .cc-modal-panel .cc-recycle-restore { background: var(--text-primary) !important; color: var(--surface-canvas) !important; border-color: var(--text-primary) !important; }
/* 提醒事项就地改的「取消」是次要按钮，别跟着上面那条画成实心（issue 981） */
:is(html, body)[data-style="paper"][data-theme] .cc-modal-panel .cc-trial-new button.cc-rem-cancel,
:is(html, body)[data-style="kohaku"][data-theme] .cc-modal-panel .cc-trial-new button.cc-rem-cancel { background: transparent !important; color: var(--text-secondary, var(--muted)) !important; border: 1px solid var(--border) !important; font-weight: 400; }
:is(html, body)[data-style="paper"][data-theme] .modal-body input:not([type="file"]):not([type="checkbox"]):not([type="radio"]) { border: 0 !important; border-bottom: 1px solid var(--border-strong) !important; background: transparent !important; border-radius: 0 !important; padding-left: 0 !important; }
:is(html, body)[data-style="paper"][data-theme] .modal-body input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):focus { border-bottom-color: var(--accent) !important; box-shadow: none !important; }
:is(html, body)[data-style="paper"][data-theme] .tool-drawer-menu { border: 1px solid var(--border-strong); box-shadow: 0 18px 30px -22px var(--skin-lift); }
@media (max-width: 768px) {
  :is(html, body)[data-style="paper"][data-theme] #cc-conv-header { padding: 12px 16px; align-items: center; }
  :is(html, body)[data-style="paper"][data-theme] #cc-conv-header::after { left: 16px; right: 16px; }
  :is(html, body)[data-style="paper"][data-theme] #cc-conv-title { font-size: 22px; column-gap: 10px; }
  :is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-day-sep { margin: 22px 0 16px; gap: 12px; }
  :is(html, body)[data-style="paper"][data-theme] .modal-header { padding: 22px 20px 14px; }
  :is(html, body)[data-style="paper"][data-theme] .modal-body { padding: 10px 20px 24px; }
}

/* ───────── 红白：黑色粗线、直角、选中整行反黑 ───────── */
/* 左栏 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces { border-right: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces > header { height: 76px; box-sizing: border-box; flex-shrink: 0; padding: 0 18px; border-bottom: 1.5px solid var(--border-strong); align-items: center; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-new-ws { background: var(--text-primary); color: var(--surface-canvas); border: 0; font-weight: 700; box-shadow: none; padding: 8px 12px; font-size: 13px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-new-ws:hover { background: var(--accent); color: var(--style-on-accent); transform: none; box-shadow: none; filter: none; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-ws-search,
:is(html, body)[data-style="kohaku"][data-theme] #cc-file-search { margin: 14px 18px 4px; width: auto; border: 1px solid var(--border); background-color: var(--surface-raised); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-ws-search:focus,
:is(html, body)[data-style="kohaku"][data-theme] #cc-file-search:focus { border-color: var(--border-strong); box-shadow: none; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces ul { padding: 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li { margin: 0; padding: 0; border-top: 1px solid var(--border); border-radius: 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.cc-ws-group { border-top: 0; font-weight: 700; color: var(--text-primary); padding: 18px 18px 8px; font-size: 12px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li .cc-ws-body { padding: 10px 18px 10px 34px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li .cc-ws-body > div:first-child { font-weight: 500; color: var(--text-primary); }
/* 反黑的那一行：底色换成字色，里面每样东西各自定色（名字、时间、删除钮），深色模式下自然变成白底黑字 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active,
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active:hover { background: var(--text-primary); border-color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active + li { border-top-color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active .cc-ws-body > div:first-child { color: var(--surface-canvas); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active .meta { color: color-mix(in srgb, var(--surface-canvas) 68%, var(--text-primary)); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active .cc-ws-del { color: var(--surface-canvas); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active .cc-ws-del:hover { color: var(--accent); background: none; }
/* 「忙碌」的三个点（issue 929）：纸墨沿用圆点，红白是三个小方块；红白选中行是反黑底，点用亮一档的红 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li .cc-ws-busy i { width: 6px; height: 6px; border-radius: 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active .cc-ws-busy i { background: #ff5a3c; }
@media (hover: hover) and (pointer: fine) {
  :is(html, body)[data-style="paper"][data-theme] #cc-workspaces li .cc-ws-busy { right: 16px; }
  :is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li .cc-ws-busy { right: 18px; }
  :is(html, body)[data-style="kohaku"][data-theme][data-cc-embedded] #cc-workspaces li.system.cc-busy .cc-ws-body { padding-right: 50px; }
}
:is(html, body)[data-style="kohaku"][data-theme] #cc-workspaces li.active::before { left: 16px; top: 18px; bottom: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-func-drawer { margin: 0; padding: 8px 12px; border-top: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-func-btn { font-weight: 700; color: var(--text-primary); }
/* 对话顶栏：三栏栏头同高，三条粗线连成一条 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-header { height: 76px; box-sizing: border-box; flex-shrink: 0; padding: 0 32px; align-items: center; border-bottom: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-title { font-size: var(--fs-title); line-height: 1.15; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-header > button,
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-header .tool-drawer > .btn-icon { width: 38px; height: 38px; border: 1px solid var(--border-strong); background: none; color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-header > button:hover,
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-header .tool-drawer > .btn-icon:hover { background: var(--text-primary); color: var(--surface-canvas); }
/* 标题后面的「空闲 / 忙碌」：写法同纸墨 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-title { display: grid; grid-template-columns: minmax(0, max-content) max-content; justify-content: start; align-items: baseline; column-gap: 14px; overflow: visible; min-width: 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-name { overflow: hidden; text-overflow: ellipsis; padding: .2em 0; margin: -.2em 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-status { font: 500 13px var(--skin-ui); letter-spacing: 0; color: var(--text-muted); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--style-ok); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-conv-status[data-state="busy"]::before { background: var(--accent); }
/* 消息与输入区（用户气泡的浅灰底圆角是原有规则，这里只调内边距） */
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-msg.user { padding: 12px 16px; }
/* 日期分隔线：每天第一句提问上方，左对齐的一行小字（cc.js _syncDaySeps） */
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-day-sep { margin: 30px 0 14px; font-family: var(--skin-latin); font-size: var(--fs-tiny); font-weight: 700; color: var(--text-muted); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-day-sep:first-child { margin-top: 6px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-day-sep + .cc-msg.user { margin-top: 0; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-run-drawer-head { padding: 8px 12px; border: 1px solid var(--border-strong); background: none; font-weight: 700; color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-input-bar { border-top: 0; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-composer { background: var(--surface-raised); border: 1.5px solid var(--border-strong); box-shadow: none; padding: 14px 12px 10px 16px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-composer:focus-within { border-color: var(--border-strong); box-shadow: 4px 4px 0 var(--accent-glow); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-model-btn { background: none; border: 1px solid var(--border); padding: 6px 10px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-send { box-shadow: none; width: 40px; height: 40px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-meter-fill { background: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-meter-text { color: var(--text-primary); font-weight: 700; }
/* 文件栏 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-files { border-left: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-files > header { height: 76px; box-sizing: border-box; flex-shrink: 0; padding: 0 18px; border-bottom: 1.5px solid var(--border-strong); align-items: center; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-files > header button { background: none; border: 1px solid var(--border-strong); font-weight: 700; color: var(--text-primary); padding: 5px 9px; height: 30px; }   /* 定高：图标那个原来比两个文字按钮高 1px，三个方框上下沿对不齐（手机上另有 min-height 38px，照旧） */
:is(html, body)[data-style="kohaku"][data-theme] #cc-files > header button:hover { background: var(--text-primary); color: var(--surface-canvas); border-color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-new-folder-btn svg { position: relative; top: 2px; }   /* 同上：和旁边两个按钮里的字同一条中线 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-file-sortbar { margin: 0 18px 8px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-file-tree { padding: 0; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-file { padding: 9px 18px; border-top: 1px solid var(--border); border-radius: 0; font-weight: 500; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-file-crumb { padding: 8px 18px 10px; font-weight: 700; color: var(--text-primary); }
/* 弹窗与功能页 */
:is(html, body)[data-style="kohaku"][data-theme] .modal,
:is(html, body)[data-style="kohaku"][data-theme] .cc-modal-panel { border: 1.5px solid var(--border-strong); box-shadow: 10px 10px 0 var(--skin-lift); background: var(--surface-canvas); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-modal-panel > header { padding: 18px 20px 14px; background: none; border-bottom: 1.5px solid var(--border-strong); font-family: var(--skin-display); font-weight: 900; font-size: var(--fs-heading-lg); letter-spacing: -0.015em; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-modal-note { padding: 12px 20px; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-header { padding: 24px 28px 18px; border-bottom: 1.5px solid var(--border-strong); align-items: flex-end; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-header h3 { font-size: var(--fs-title); line-height: 1.15; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-body { padding: 16px 28px 26px; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-body .setting-group > label,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body .fp-label,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body summary { font-size: 13px !important; font-weight: 800 !important; color: var(--text-primary) !important; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-body .setting-group > label,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body .fp-label { margin-bottom: 8px !important; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-body .setting-group > label::before,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body .fp-label::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 9px; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-section { border-top: 1.5px solid var(--border-strong) !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-row span { white-space: nowrap; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-name,
:is(html, body)[data-style="kohaku"][data-theme] .deleted-user-row strong,
:is(html, body)[data-style="kohaku"][data-theme] .pet-token-row strong { font-family: var(--skin-latin); font-size: 18px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-badge-admin { background: var(--text-primary) !important; color: var(--surface-canvas) !important; font-weight: 700; padding: 2px 8px !important; font-size: 12px !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-badge-warn { background: none !important; color: var(--text-primary) !important; border: 1px solid var(--border-strong); font-weight: 700; padding: 1px 7px !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-btn { background: var(--surface-raised) !important; border-color: var(--border) !important; color: var(--text-primary) !important; font-weight: 500; padding: 4px 8px !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-btn:hover { border-color: var(--border-strong) !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-btn-danger,
:is(html, body)[data-style="kohaku"][data-theme] .pet-token-revoke { background: none !important; color: var(--accent) !important; border: 1px solid var(--accent) !important; font-weight: 700; padding: 4px 8px !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-btn-danger:hover,
:is(html, body)[data-style="kohaku"][data-theme] .pet-token-revoke:hover { background: var(--accent) !important; color: var(--style-on-accent) !important; }
:is(html, body)[data-style="kohaku"][data-theme] .fp-btn-primary,
:is(html, body)[data-style="kohaku"][data-theme] .modal .fm-btn-accent,
:is(html, body)[data-style="kohaku"][data-theme] .cc-modal-panel .cc-trial-new button,
:is(html, body)[data-style="kohaku"][data-theme] .cc-modal-panel .cc-recycle-restore { background: var(--text-primary) !important; color: var(--surface-canvas) !important; border-color: var(--text-primary) !important; font-weight: 700; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-body input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
:is(html, body)[data-style="kohaku"][data-theme] .modal-body select,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body textarea { border: 1px solid var(--border-strong) !important; background-color: var(--surface-raised) !important; }
:is(html, body)[data-style="kohaku"][data-theme] .modal-body input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):focus,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body select:focus,
:is(html, body)[data-style="kohaku"][data-theme] .modal-body textarea:focus { border-color: var(--accent) !important; box-shadow: none !important; }
:is(html, body)[data-style="kohaku"][data-theme] .tool-drawer-menu { border: 1.5px solid var(--border-strong); box-shadow: 6px 6px 0 var(--skin-lift); }
@media (max-width: 768px) {
  :is(html, body)[data-style="kohaku"][data-theme] #cc-conv-header { height: auto; padding: 12px 16px; }
  :is(html, body)[data-style="kohaku"][data-theme] #cc-conv-title { font-size: 24px; column-gap: 10px; }
  :is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-day-sep { margin: 22px 0 12px; }
  :is(html, body)[data-style="kohaku"][data-theme] .modal,
  :is(html, body)[data-style="kohaku"][data-theme] .cc-modal-panel { box-shadow: none; }
  :is(html, body)[data-style="kohaku"][data-theme] .modal-header { padding: 20px 20px 16px; }
  :is(html, body)[data-style="kohaku"][data-theme] .modal-body { padding: 12px 20px 24px; }
}
@media (max-width: 768px) {
  :is(html, body)[data-style="paper"][data-theme] #cc-conversation::after,
  :is(html, body)[data-style="kohaku"][data-theme] #cc-conversation::after { font-size: 120px; right: 18px; }
}

/* ───────── 登录页（第 4 步起没登录也跟着这台设备的风格走）：品牌字、卡片、输入框、按钮跟主页里同类元素一个写法 ───────── */
:is(html, body)[data-style="paper"][data-theme] .login-card { background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: 0 30px 60px -40px var(--skin-lift); }
:is(html, body)[data-style="paper"][data-theme] .login-card h1 { font-family: var(--skin-latin); font-weight: 500; letter-spacing: -0.005em; }
:is(html, body)[data-style="paper"][data-theme] .login-card h1 span { font-style: italic; font-weight: 500; }
:is(html, body)[data-style="paper"][data-theme] .login-subtitle { font-size: var(--fs-tiny); letter-spacing: .22em; }
:is(html, body)[data-style="paper"][data-theme] .login-form input { border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: transparent; padding-left: 2px; padding-right: 2px; }
:is(html, body)[data-style="paper"][data-theme] .login-form input:focus { border-bottom-color: var(--accent); box-shadow: none; }
:is(html, body)[data-style="paper"][data-theme] .login-form button { background: var(--text-primary); color: var(--surface-canvas); border-radius: var(--radius-sm); box-shadow: none; }
:is(html, body)[data-style="paper"][data-theme] .login-form button:hover:not(:disabled) { box-shadow: none; transform: none; filter: none; background: var(--accent); }
:is(html, body)[data-style="paper"][data-theme] .login-screen::after { font-family: var(--skin-latin); font-style: italic; font-weight: 500; letter-spacing: -0.02em; opacity: 0.12; transform: none; right: 30px; bottom: -40px; }
:is(html, body)[data-style="kohaku"][data-theme] .login-card { background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: 0; box-shadow: 10px 10px 0 var(--skin-lift); }
:is(html, body)[data-style="kohaku"][data-theme] .login-card h1 { font-family: var(--skin-latin); font-weight: 800; letter-spacing: -0.03em; font-stretch: 85%; }
:is(html, body)[data-style="kohaku"][data-theme] .login-subtitle { font-size: var(--fs-tiny); font-weight: 700; }
:is(html, body)[data-style="kohaku"][data-theme] .login-form input { border: 1px solid var(--border-strong); background: var(--surface-raised); }
:is(html, body)[data-style="kohaku"][data-theme] .login-form input:focus { border-color: var(--accent); box-shadow: none; }
:is(html, body)[data-style="kohaku"][data-theme] .login-form button { background: var(--text-primary); color: var(--surface-canvas); box-shadow: none; font-weight: 800; }
:is(html, body)[data-style="kohaku"][data-theme] .login-form button:hover:not(:disabled) { background: var(--accent); box-shadow: none; transform: none; filter: none; }
:is(html, body)[data-style="kohaku"][data-theme] .login-screen::after { font-family: var(--skin-latin); font-weight: 800; font-stretch: 80%; letter-spacing: -0.06em; opacity: 0.1; transform: none; right: 30px; bottom: -34px; }

/* ───────── 对话内容（P2）：回复正文、工作过程、附件与交付文件、引用、地图卡、「新会话」分隔线 ─────────
   .cc-classic-only 是 cc.js 给表情符号和装饰字包的小节点（_classicOnly）：这两套风格下不显示，换成下面各自的小标记（出错是三角图标，用 mask 画、颜色跟文字走）。
   带 !important 的几条在盖「新会话」那一行的行内样式（行内样式留给经典，同功能页的做法）。 */
:is(html, body)[data-style="paper"][data-theme] .cc-classic-only { display: none; }
/* 纸墨 · 回复正文 */
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant :is(h1, h2, h3) { font-family: var(--skin-display); font-weight: 600; color: var(--text-primary); letter-spacing: .01em; line-height: 1.35; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant h1 { font-size: 25px; margin: 30px 0 14px; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant h2 { font-size: 21px; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant h3 { font-size: 17px; margin: 22px 0 6px; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant > :is(h1, h2, h3):first-child { margin-top: 6px; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant ul > li::marker { color: var(--accent); }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant ul ul > li::marker { color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant ol > li::marker { font-family: var(--skin-latin); font-size: 1.08em; color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant table { border-collapse: collapse; width: fit-content; border-bottom: 1px solid var(--border-strong); font-size: 14px; margin: 14px 0 22px; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant :is(th, td) { border: 0; border-bottom: 1px solid var(--border); padding: 9px 26px 9px 0; text-align: left; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant th { background: none; font-weight: 400; font-size: 12px; letter-spacing: .14em; color: var(--text-muted); border-bottom: 1px solid var(--border-strong); padding-top: 4px; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant tr:last-child td { border-bottom: 0; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant pre { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant :not(pre) > code { background: var(--bg-tertiary); color: var(--text-primary); border-radius: 2px; }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant blockquote { border-left: 1px solid var(--accent); padding: 2px 0 2px 18px; margin: 18px 0; color: var(--text-secondary); }
:is(html, body)[data-style="paper"][data-theme] .cc-msg.assistant hr { width: 72px; margin: 26px auto; border-top-color: var(--border-strong); }
/* 纸墨 · 工作过程：一行宋体小字，出错只在后面标一个线条三角 + 次数（admin 11-14：不要「N 处出错」几个字，换成图标）；工具步骤是浅底细线框，工具名是朱砂色小标签 */
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-run-drawer-head { padding: 6px 0; gap: 8px; border-color: transparent; font-family: var(--skin-display); font-size: 13px; letter-spacing: .1em; color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-run-drawer-head:hover { color: var(--text-primary); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages :is(.cc-run-caret, .cc-tool-caret, .cc-travel-map-caret) { font-size: 8px; width: 10px; color: var(--accent); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-run-drawer.is-running .cc-run-drawer-title::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 2px; animation: cc-ws-busy 1.6s ease-in-out infinite; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-err-count { margin-left: 14px; color: var(--danger); font-family: var(--skin-latin); font-size: 14px; letter-spacing: 0; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-err-count::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-run-drawer-body { margin: 4px 0 0 4px; padding-left: 20px; border-left: 1px solid var(--border); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-run-drawer + .cc-msg.assistant { margin-top: 18px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-group-head { border-left: 0; padding: 3px 0; gap: 8px; font-size: 12px; letter-spacing: .04em; color: var(--text-muted); background: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-group-head:hover { color: var(--text-primary); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-group-body { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-step { padding: 10px 14px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-step + .cc-tool-step { border-top: 1px solid var(--border); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-step-cmd { color: var(--text-primary); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-name { white-space: normal; font-family: var(--skin-latin); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-step pre { color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-tool-step pre.cc-tool-output.error { color: var(--danger); border-left: 1px solid var(--danger); padding-left: 10px; }
/* 纸墨 · 附件、交付文件、引用、地图卡 */
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-msg-imgs img { border: 1px solid var(--border-strong); border-radius: var(--radius-xs); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-file-card { background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-xs); padding: 9px 14px 9px 12px; gap: 10px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-file-card:hover { border-color: var(--accent); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-file-card .cc-attach-ficon { color: var(--accent); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-file-card-sub { letter-spacing: .06em; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-deliver { margin-top: 18px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-deliver:not(.cc-deliver-summary)::before { content: "交付文件"; display: block; margin-bottom: 10px; font-family: var(--skin-display); font-size: 13px; letter-spacing: .14em; color: var(--text-muted); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-quote-bar { border-left: 1px solid var(--accent); padding-left: 12px; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-quote-bar-role { font-family: var(--skin-display); font-weight: 400; letter-spacing: .12em; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-travel-map { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-raised); }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-travel-map-head { padding: 10px 14px; gap: 8px; background: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-travel-map-title { font-family: var(--skin-display); font-weight: 600; font-size: 15px; letter-spacing: .06em; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-travel-map-canvas:not(:has(*)) { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
/* 纸墨 ·「新会话」分隔线：和日期分隔线同款，两边细线、中间小字。节点里的字（—— 新会话开始 ——）不动，
   这里把它的字号压成 0、另画「新会话」三个字；两段细线是背景，中间留出字的位置（字宽固定，所以写死 40px） */
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-msg.cc-session-sep { display: flex; align-items: center; justify-content: center; max-width: none; margin: 34px 0 22px !important; padding: 0; font-size: 0 !important;
  background: linear-gradient(var(--border), var(--border)) left center / calc(50% - 40px) 1px no-repeat, linear-gradient(var(--border), var(--border)) right center / calc(50% - 40px) 1px no-repeat; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-msg.cc-session-sep::before { display: none; }
:is(html, body)[data-style="paper"][data-theme] #cc-messages > .cc-msg.cc-session-sep::after { content: "新会话"; font-family: var(--skin-display); font-style: normal; font-size: 13px; line-height: 1.6; letter-spacing: .12em; margin-right: -.12em; color: var(--text-muted); }

:is(html, body)[data-style="kohaku"][data-theme] .cc-classic-only { display: none; }
/* 红白 · 回复正文 */
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant :is(h1, h2, h3) { font-family: var(--skin-display); font-weight: 900; color: var(--text-primary); letter-spacing: -0.015em; line-height: 1.3; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant h1 { font-size: 27px; margin: 30px 0 14px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant h2 { font-size: 21px; margin: 32px 0 10px; padding-top: 12px; border-top: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant h3 { font-size: 17px; margin: 22px 0 6px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--accent); vertical-align: 1px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant > :is(h1, h2, h3):first-child { margin-top: 6px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant ul { list-style: square; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant ul > li::marker { color: var(--accent); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant ul ul > li::marker { color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant ol > li::marker { font-family: var(--skin-latin); font-weight: 800; color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant table { border-collapse: collapse; width: fit-content; border-top: 1.5px solid var(--border-strong); border-bottom: 1.5px solid var(--border-strong); font-size: 14px; margin: 14px 0 22px; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant :is(th, td) { border: 0; border-bottom: 1px solid var(--border); padding: 9px 26px 9px 0; text-align: left; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant th { background: none; font-weight: 800; color: var(--text-primary); border-bottom: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant tr:last-child td { border-bottom: 0; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant pre { background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 0; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant :not(pre) > code { background: none; border: 1px solid var(--border); border-radius: 0; color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant blockquote { border-left: 3px solid var(--text-primary); padding: 2px 0 2px 14px; margin: 18px 0; color: var(--text-primary); font-weight: 500; }
:is(html, body)[data-style="kohaku"][data-theme] .cc-msg.assistant hr { border-top: 1.5px solid var(--border-strong); }
/* 红白 · 工作过程：黑线框的一行（上面已有），出错不再整行变红；工具名是黑底白字的小标签，出错那一步的标签转红 */
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-msg.cc-run-drawer.has-error .cc-run-drawer-head { border-color: var(--border-strong); color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-run-drawer-head { gap: 8px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages :is(.cc-run-caret, .cc-tool-caret, .cc-travel-map-caret) { font-size: 8px; width: 10px; color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-run-drawer.is-running .cc-run-drawer-title::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--accent); animation: cc-ws-busy 1.6s ease-in-out infinite; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-err-count { margin-left: 14px; color: var(--accent); font-family: var(--skin-latin); font-weight: 800; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-err-count::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2 23 21H1ZM10.8 9h2.4v6h-2.4ZM10.8 16.4h2.4v2.4h-2.4Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2 23 21H1ZM10.8 9h2.4v6h-2.4ZM10.8 16.4h2.4v2.4h-2.4Z'/%3E%3C/svg%3E") center / contain no-repeat; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-run-drawer-body { margin: 8px 0 0 0; padding-left: 14px; border-left: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-run-drawer + .cc-msg.assistant { margin-top: 18px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-group-head { border-left: 0; padding: 3px 0; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); background: none; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-group-head:hover { color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-group-body { background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-step { padding: 10px 14px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-step + .cc-tool-step { border-top: 1px solid var(--border); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-step-cmd { color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-name { white-space: normal; font-family: var(--skin-latin); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--surface-canvas); background: var(--text-primary); padding: 1px 6px; margin-right: 3px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-step.error .cc-tool-name { background: var(--accent); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-step pre { color: var(--text-muted); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-tool-step pre.cc-tool-output.error { color: var(--accent); border-left: 3px solid var(--accent); padding-left: 10px; }
/* 红白 · 附件、交付文件、地图卡：黑线直角框，文件卡悬停整张反黑（同左栏选中行） */
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-msg-imgs img { border: 1px solid var(--border-strong); border-radius: 0; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-file-card { background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: 0; padding: 9px 14px 9px 12px; gap: 10px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-file-card-name { font-weight: 700; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-file-card .cc-attach-ficon { color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-file-card:hover { background: var(--text-primary); border-color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-file-card:hover :is(.cc-file-card-name, .cc-file-card-sub, .cc-file-card-path, .cc-attach-ficon) { color: var(--surface-canvas); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-deliver { margin-top: 18px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-deliver:not(.cc-deliver-summary)::before { content: "交付文件"; display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; color: var(--text-primary); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-travel-map { border: 1.5px solid var(--border-strong); border-radius: 0; background: var(--surface-raised); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-travel-map-head { padding: 10px 14px; gap: 8px; background: none; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-travel-map-title { font-family: var(--skin-display); font-weight: 900; font-size: 15px; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-travel-map-body { border-top: 1.5px solid var(--border-strong); }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-travel-map-canvas:not(:has(*)) { display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 13px; }
/* 红白 ·「新会话」分隔线：左边一行粗体小字，后面一条黑线（画法同纸墨：原来的字压成 0，线是背景） */
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-msg.cc-session-sep { display: flex; align-items: center; justify-content: flex-start; max-width: none; margin: 34px 0 22px !important; padding: 0; font-size: 0 !important;
  background: linear-gradient(var(--border-strong), var(--border-strong)) right center / calc(100% - 52px) 1.5px no-repeat; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-msg.cc-session-sep::before { display: none; }
:is(html, body)[data-style="kohaku"][data-theme] #cc-messages > .cc-msg.cc-session-sep::after { content: "新会话"; font-style: normal; font-size: 12px; line-height: 1.6; font-weight: 800; color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) {
  :is(html, body)[data-style="paper"][data-theme] #cc-messages .cc-run-drawer.is-running .cc-run-drawer-title::before,
  :is(html, body)[data-style="kohaku"][data-theme] #cc-messages .cc-run-drawer.is-running .cc-run-drawer-title::before { animation: none; }
}
