:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-glow: rgba(73, 130, 255, .13);
  --surface: #ffffff;
  --surface-raised: #f0f4fa;
  --surface-sunken: #f8faff;
  --border: #d7e0eb;
  --text: #18243a;
  --muted: #617086;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .12);
  --green: #16803a;
  --amber: #a85d00;
  --danger: #c9362b;
  --shadow: 0 16px 40px rgba(25, 42, 70, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b1220;
    --bg-glow: rgba(53, 111, 210, .17);
    --surface: #121c2d;
    --surface-raised: #1a2940;
    --surface-sunken: #0d1726;
    --border: #293b58;
    --text: #eaf0fb;
    --muted: #9baac0;
    --accent: #7ab8ff;
    --accent-soft: rgba(122, 184, 255, .15);
    --green: #6bdc8b;
    --amber: #f2b84b;
    --danger: #ff8b83;
    --shadow: 0 18px 45px rgba(0, 0, 0, .2);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-glow: rgba(53, 111, 210, .17);
  --surface: #121c2d;
  --surface-raised: #1a2940;
  --surface-sunken: #0d1726;
  --border: #293b58;
  --text: #eaf0fb;
  --muted: #9baac0;
  --accent: #7ab8ff;
  --accent-soft: rgba(122, 184, 255, .15);
  --green: #6bdc8b;
  --amber: #f2b84b;
  --danger: #ff8b83;
  --shadow: 0 18px 45px rgba(0, 0, 0, .2);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: radial-gradient(circle at 12% -5%, var(--bg-glow), transparent 32rem), var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; }
.masthead, main, footer { width: calc(100% - 32px); margin: 0 auto; }
/* 顶部只留一条紧凑的题头：标题、导出时间与右侧操作同一行，纵向空间让给记录列表。 */
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0 12px; }
.masthead-head { align-items: baseline; display: flex; flex-wrap: wrap; gap: 3px 14px; min-width: 0; }
h1 { margin: 0; font-size: clamp(1.35rem, 2.2vw, 1.9rem); letter-spacing: -.03em; line-height: 1.15; }
.muted, footer { color: var(--muted); }
#generated-at { margin: 0; font-size: .8rem; }
.masthead-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.theme-switch { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; display: inline-flex; padding: 3px; box-shadow: 0 2px 7px rgba(25, 42, 70, .04); }
.theme-button { background: transparent; border: 0; border-radius: 7px; color: var(--muted); cursor: pointer; font: inherit; font-size: .76rem; padding: 5px 8px; }
.theme-button:hover { color: var(--text); }
.theme-button.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.source-link { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; color: var(--accent); font-size: .86rem; padding: 6px 10px; text-decoration: none; white-space: nowrap; }
.source-link:hover { background: var(--accent-soft); }
.overview { display: grid; gap: 8px; margin: 0 0 12px; }
.overview-group { align-items: center; display: grid; gap: 12px; grid-template-columns: 150px minmax(0, 1fr); }
.overview-group h2 { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .05em; margin: 0; }
.overview-items { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-item { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 3px 12px rgba(25, 42, 70, .035); color: var(--text); cursor: pointer; display: flex; font: inherit; gap: 8px; justify-content: space-between; min-width: 0; padding: 9px 14px; text-align: left; }
.overview-item:hover { background: var(--surface-raised); }
.overview-item.active { background: var(--accent-soft); border-color: var(--accent); }
.overview-item span { font-size: .88rem; font-weight: 650; min-width: 0; }
.overview-item small { color: var(--muted); font-size: .73rem; font-weight: 400; margin-left: 4px; }
.overview-item b { color: var(--accent); font-size: 1.25rem; letter-spacing: -.03em; }
.panel { --sidebar-width: 30%; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(280px, var(--sidebar-width)) 12px minmax(0, 1fr); height: calc(100dvh - 240px); min-height: 480px; overflow: hidden; }
.list-column { display: flex; flex-direction: column; min-height: 480px; min-width: 0; }
.search-toolbar { background: var(--surface); border-bottom: 1px solid var(--border); display: grid; gap: 7px; padding: 12px 14px; }
.search-label { color: var(--muted); font-size: .76rem; font-weight: 700; }
#record-search { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; font-size: .88rem; min-width: 0; padding: 7px 10px; width: 100%; }
.search-input-row { display: flex; gap: 6px; }
.search-help, .search-status { color: var(--muted); font-size: .74rem; line-height: 1.6; margin: 0; }
.search-status:empty { display: none; }
#search-clear, .detail-search button { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 7px; color: var(--accent); cursor: pointer; flex-shrink: 0; font: inherit; font-size: .78rem; padding: 5px 8px; }
.search-scope { display: grid; gap: 5px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.search-scope button { background: transparent; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); cursor: pointer; font: inherit; font-size: .76rem; padding: 4px 7px; }
.search-scope button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.search-advanced { border-top: 1px solid var(--border); color: var(--muted); font-size: .76rem; padding-top: 7px; }
.search-advanced summary { cursor: pointer; font-weight: 700; list-style-position: inside; }
.search-options { align-items: center; display: flex; gap: 8px; margin-top: 8px; }
.search-options label { flex: 1; }
#search-field { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; padding: 4px 6px; }
.search-syntax { line-height: 1.55; margin: 7px 0 0; }
.search-syntax code { background: var(--surface-raised); border-radius: 4px; color: var(--text); padding: 1px 3px; }
.entry-list { flex: 1; min-height: 0; overflow: auto; }
.panel-resizer { cursor: col-resize; outline: none; position: relative; touch-action: none; }
.panel-resizer::before { background: var(--border); bottom: 0; content: ""; left: 50%; position: absolute; top: 0; transform: translateX(-50%); transition: background-color .15s ease, width .15s ease; width: 1px; }
.panel-resizer::after { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 99px; content: ""; height: 42px; left: 50%; opacity: 0; position: absolute; top: 50%; transform: translate(-50%, -50%); transition: opacity .15s ease; width: 4px; }
.panel-resizer:hover::before, .panel-resizer:focus-visible::before, .panel.is-resizing .panel-resizer::before { background: var(--accent); width: 2px; }
.panel-resizer:hover::after, .panel-resizer:focus-visible::after, .panel.is-resizing .panel-resizer::after { opacity: 1; }
.panel.is-resizing, .panel.is-resizing * { cursor: col-resize !important; user-select: none; }
.list-heading { align-items: center; background: var(--surface-sunken); border-bottom: 1px solid var(--border); color: var(--muted); display: flex; font-size: .76rem; font-weight: 700; justify-content: space-between; letter-spacing: .06em; padding: 10px 18px; text-transform: uppercase; }
.list-heading b { background: var(--accent-soft); border-radius: 99px; color: var(--accent); font-size: .74rem; letter-spacing: 0; padding: 1px 7px; }
.entry { appearance: none; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; color: inherit; cursor: pointer; display: block; font: inherit; padding: 12px 18px 12px 15px; text-align: left; transition: background-color .15s ease, border-color .15s ease; width: 100%; }
.entry:hover { background: var(--surface-raised); }
.entry.selected { background: var(--accent-soft); border-left-color: var(--accent); }
.entry time { color: var(--muted); display: block; font-size: .82rem; }
.entry strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-target { color: var(--accent); display: block; font-size: .72rem; font-weight: 700; }
.entry-preview { color: var(--muted); display: block; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-match { color: var(--text); display: block; font-size: .8rem; line-height: 1.65; margin-top: 7px; overflow-wrap: anywhere; }
.match-source { color: var(--muted); display: block; font-size: .7rem; }
mark.search-hit { background: #ffe08a; border-radius: 2px; color: #352300; padding: 0; }
mark.current-hit { background: #ffbd55; outline: 2px solid var(--amber); outline-offset: 2px; }
.detail-search { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding: 8px; position: sticky; top: 0; z-index: 2; }
.detail-search span { color: var(--muted); flex: 1; font-size: .78rem; min-width: 100px; }
.detail-search button:disabled { cursor: default; opacity: .5; }
.load-more { background: var(--surface-sunken); border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .82rem; padding: 12px; width: 100%; }
.load-more:hover { background: var(--accent-soft); }
.detail { min-height: 0; min-width: 0; overflow: auto; overflow-anchor: none; padding: 22px; scrollbar-gutter: stable; }
.detail h2 { margin-top: 0; }
/* 加载只占正文区域：已有标题与省流可读，不用整块遮罩阻挡操作。 */
.analysis-pending { min-height: 168px; }
.loading-dot { background: var(--accent); border-radius: 50%; height: 6px; width: 6px; animation: analysis-pulse 1.4s ease-in-out infinite; }
.analysis-skeleton { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; display: grid; gap: 12px; padding: 24px 22px; }
.analysis-skeleton i { background: var(--border); border-radius: 4px; display: block; height: 9px; width: 95%; animation: analysis-pulse 1.4s ease-in-out infinite; }
.analysis-skeleton i:nth-child(2) { width: 83%; }
.analysis-skeleton i:nth-child(3) { width: 90%; }
.analysis-skeleton i:last-child { width: 58%; }
.analysis-error { align-items: center; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 16px; }
.analysis-retry { background: var(--accent-soft); border: 1px solid var(--border); border-radius: 7px; color: var(--accent); cursor: pointer; font: inherit; font-size: .8rem; padding: 5px 12px; }
.analysis-retry:hover { border-color: var(--accent); }
.entry:focus-visible, .analysis-retry:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
@keyframes analysis-pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .loading-dot, .analysis-skeleton i { animation: none; } }
.detail a { color: var(--accent); }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 15px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.analysis { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; max-height: 50vh; overflow: auto; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.markdown { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; max-height: none; overflow-x: auto; overflow-y: visible; padding: 18px 22px; line-height: 1.68; }
.markdown > :first-child { margin-top: 0; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { margin: 1.4em 0 0.6em; line-height: 1.3; }
.markdown h1 { font-size: 1.5rem; }
.markdown h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.markdown h3 { font-size: 1.1rem; }
.markdown h4 { font-size: 1rem; }
.markdown p { margin: 0.6em 0; }
.markdown ul, .markdown ol { margin: 0.6em 0; padding-left: 1.4em; }
.markdown li { margin: 0.25em 0; }
.markdown a { color: var(--accent); }
.markdown code { background: rgba(110,118,129,.25); border-radius: 4px; padding: .12em .35em; font-size: .88em; }
.markdown pre { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; overflow: auto; }
.markdown pre code { background: none; padding: 0; font-size: .85rem; }
.markdown blockquote { border-left: 3px solid var(--border); margin: 0.8em 0; padding: 0 1em; color: var(--muted); }
.markdown table { border-collapse: collapse; margin: 0.8em 0; width: 100%; font-size: .9rem; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.markdown th { background: var(--surface-raised); }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
.markdown img { max-width: 100%; border-radius: 6px; }
.brief, .analysis-images, .full-analysis { margin-top: 26px; }
.section-heading { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.section-heading h3 { font-size: 1rem; margin: 0; }
.section-heading > span { color: var(--muted); font-size: .8rem; }
.brief { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-radius: 10px; padding: 15px 17px; }
.brief .section-heading { margin-bottom: 5px; }
.brief-content { line-height: 1.6; }
.brief-content > :first-child { margin-top: 0; }
.brief-content > :last-child { margin-bottom: 0; }
.analysis-mode, .image-theme-switch { align-items: center; display: inline-flex; gap: 4px; margin-left: auto; }
.analysis-mode { border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.analysis-mode-button, .image-theme-button, .analysis-download { background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; font: inherit; font-size: .78rem; padding: 5px 8px; text-decoration: none; white-space: nowrap; }
.analysis-mode-button:hover, .image-theme-button:hover, .analysis-download:hover { background: var(--surface-raised); color: var(--text); }
.analysis-mode-button.active, .image-theme-button.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.analysis-download { border-left: 1px solid var(--border); border-radius: 0; color: var(--accent); }
.raw-analysis { margin: 0; max-height: none; }
.analysis-images { border-top: 1px solid var(--border); padding-top: 22px; }
.image-theme-switch { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 8px; margin-left: auto; padding: 3px; }
.image-sheet { display: grid; gap: 15px; }
.image-sheet[hidden] { display: none; }
.image-sheet figure { background: var(--surface-sunken); border: 1px solid var(--border); border-radius: 10px; margin: 0; overflow: hidden; }
.image-sheet a { display: block; line-height: 0; }
.image-sheet img { display: block; height: auto; max-width: 100%; width: 100%; }
.image-sheet figcaption { color: var(--muted); font-size: .76rem; padding: 7px 10px; }
.change { border-left: 3px solid var(--amber); margin: 12px 0; padding: 4px 0 4px 12px; }
/* 清单类变更（模型列表）逐项对照：消失标红、新增标绿，等宽字体方便对名字 */
.change ul.list-change { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; list-style: none; margin: 6px 0 0; padding: 0; }
.change ul.list-change li { overflow-wrap: anywhere; }
.change ul.list-change li.minus { color: var(--danger); }
.change ul.list-change li.plus { color: var(--green); }
.tag { background: var(--accent-soft); border-radius: 99px; color: var(--accent); display: inline-block; font-size: .75rem; margin-right: 6px; padding: 2px 8px; }
/* 指纹表：请求模型名 / 实际模型名 / 指纹 三列，窄屏可横向滚动 */
.table-wrap { overflow-x: auto; }
.detail table.models { border-collapse: collapse; width: 100%; }
.detail table.models th, .detail table.models td { border-bottom: 1px solid var(--border); padding: 8px 14px 8px 0; text-align: left; vertical-align: top; }
.detail table.models th:last-child, .detail table.models td:last-child { padding-right: 0; }
.detail table.models th { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.detail table.models td { overflow-wrap: anywhere; }
.detail table.models td.hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
/* 模型名列不折行：明文对照加进来以后，折行会把 deepseek-v4-pro 这类名字拆得难读；窄屏交给 .table-wrap 横向滚动 */
.detail table.models td:not(.hash) { white-space: nowrap; }
/* 指纹明文对照区：明文用中性底、摘要用强调底，两种值一眼分得开；长明文可在任意位置折行 */
.fp-plain { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.fp-plain li { align-items: baseline; display: flex; flex-wrap: wrap; gap: 8px; line-height: 1.7; overflow-wrap: anywhere; }
.fp-plain code { border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; padding: 2px 6px; }
.fp-plain code.plain { background: var(--surface-sunken); border: 1px solid var(--border); }
.fp-plain code.digest { background: var(--accent-soft); color: var(--accent); }
.fp-plain .equals { color: var(--muted); }
/* 指纹联动：悬停或点击任一处摘要，同一轮里所有同值位置一起点亮；用负外边距抵消内边距，避免布局跳动 */
.fp-digest { border-radius: 4px; cursor: pointer; margin: 0 -2px; padding: 0 2px; transition: background .12s ease, box-shadow .12s ease; }
.fp-digest:hover { background: var(--accent-soft); }
.fp-digest-hit { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
/* 指纹页备注：说明摘要的来历与明文对照的写法，靠细分隔线与正文分开 */
.detail .fp-note { border-top: 1px solid var(--border); font-size: .8rem; line-height: 1.65; margin: 20px 0 0; padding-top: 12px; }
.empty, .error { color: var(--muted); padding: 18px; }
.error { color: var(--danger); }
footer { font-size: .82rem; padding: 14px 0 26px; }
/* 页脚群号：与说明文字同级的小灰字，只用一个间隔点分隔，不抢视线。 */
.footer-note::before { content: "·"; margin: 0 8px; }
/* 说明性文字收进悬浮/聚焦提示：可见部分只留一个词，细节按需展开。 */
.hint { border-bottom: 1px dotted var(--border); cursor: help; position: relative; }
.hint[data-tip]:not([data-tip=""])::after { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); color: var(--text); content: attr(data-tip); font-size: .78rem; font-weight: 400; left: 0; letter-spacing: 0; line-height: 1.5; max-width: min(320px, 74vw); opacity: 0; padding: 8px 10px; pointer-events: none; position: absolute; text-transform: none; top: calc(100% + 6px); transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease; visibility: hidden; white-space: normal; width: max-content; z-index: 5; }
.hint-up[data-tip]:not([data-tip=""])::after { bottom: calc(100% + 6px); top: auto; }
.hint[data-tip]:not([data-tip=""]):hover::after, .hint[data-tip]:not([data-tip=""]):focus-visible::after { opacity: 1; transform: translateY(0); visibility: visible; }
button:focus-visible, a:focus-visible, input:focus-visible, .panel-resizer:focus-visible, .hint:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (max-width: 760px) { .masthead { align-items: stretch; flex-direction: column; gap: 10px; padding-top: 12px; } .masthead-head { display: block; } #generated-at { margin-top: 3px; } .masthead-actions { justify-content: space-between; } .overview-group { align-items: stretch; gap: 4px; grid-template-columns: 1fr; } .overview-items { gap: 6px; } .overview-item { align-items: flex-start; flex-direction: column; gap: 0; padding: 8px 10px; } .overview-item small { display: block; margin-left: 0; } .panel { grid-template-columns: 1fr; height: auto; } .panel-resizer { display: none; } .list-column { height: auto; min-height: 0; } .entry-list { border-bottom: 1px solid var(--border); flex: none; max-height: 38vh; } .detail { min-height: 360px; padding: 18px 16px; } .analysis-mode, .image-theme-switch { margin-left: 0; } }
@media (max-width: 420px) { .masthead, main, footer { width: calc(100% - 24px); } .masthead-actions { align-items: stretch; flex-direction: column; } .theme-switch { justify-content: space-between; } .theme-button { flex: 1; } .source-link { text-align: center; } .overview-item { padding: 7px 8px; } .overview-item span { font-size: .8rem; } .overview-item b { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; } }
