:root {
  --ink: #1d1b19;
  --ink-2: #2a2622;
  --ink-3: #3a342e;
  --on-ink: #f1ece4;
  --on-ink-muted: #a69d92;
  --paper: #f3efe7;
  --card: #fffdf9;
  --raised: #f8f4ec;
  --line: #e4ddd0;
  --line-strong: #cfc6b6;
  --text: #2b2622;
  --muted: #776d63;
  --faint: #a1978b;
  --red: #c83a2e;
  --red-deep: #a82e24;
  --red-soft: #f7e3df;
  --gold: #b07a22;
  --gold-soft: #f6ead2;
  --green: #3c7d5e;
  --green-soft: #e1efe7;
  --canvas: #12100e;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 6px 18px rgba(40, 30, 20, .07);
  --shadow-lift: 0 2px 4px rgba(40, 30, 20, .08), 0 14px 32px rgba(40, 30, 20, .14);
  --ui: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --book: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --brush: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--text); font: 14px/1.65 var(--ui); -webkit-font-smoothing: antialiased; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
#app.fixed { height: 100dvh; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
img { display: block; }
kbd { font: 11px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--card); color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); white-space: nowrap; text-decoration: none; transition: border-color .15s, background .15s, color .15s, transform .1s, box-shadow .15s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.btn.ok:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); border-color: #e2b4ad; }
.btn.danger:hover { background: var(--red-soft); }
.btn.active { box-shadow: inset 0 0 0 1px currentColor; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raised); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.small { height: 30px; padding: 0 11px; font-size: 13px; }
.btn.large { height: 46px; padding: 0 26px; font-size: 16px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* 顶栏 */
.topbar { display: flex; align-items: stretch; gap: 24px; height: 58px; padding: 0 24px; background: var(--ink); color: var(--on-ink); flex: none; position: relative; z-index: 5; box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-ink); text-decoration: none; cursor: pointer; }
.seal { width: 34px; height: 34px; display: grid; place-items: center; background: var(--red); color: #fff; border-radius: 3px; font: 600 20px/1 var(--brush); box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgba(255, 255, 255, .55); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font: 600 18px/1.2 var(--brush); letter-spacing: .14em; }
.brand-name small { font: italic 10px/1.2 Georgia, serif; color: var(--on-ink-muted); letter-spacing: .06em; }
.nav { display: flex; align-items: stretch; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 6px; padding: 0 16px; color: var(--on-ink-muted); border-top: 3px solid transparent; transition: background .15s, color .15s; }
.nav button:hover:not([disabled]) { color: #fff; background: var(--ink-3); }
.nav button.on { color: #fff; background: var(--red); border-top-color: #e8806f; }
.nav button[disabled] { opacity: .35; cursor: not-allowed; }
.nav .short { display: none; }
.nav .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.spacer { flex: 1; }
.task-name { align-self: center; color: var(--on-ink-muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.task-name b { color: var(--on-ink); font-weight: 500; }

/* 阶段步骤条 */
.rail { display: flex; align-items: center; gap: 0; padding: 12px 24px 14px; background: var(--ink-2); color: var(--on-ink-muted); flex: none; overflow-x: auto; border-bottom: 1px solid #000; }
.rail-step { flex: 1; min-width: 120px; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; align-items: center; position: relative; padding-right: 14px; }
.rail-step::after { content: ""; position: absolute; left: 38px; right: 14px; top: 50%; height: 1px; background: var(--ink-3); z-index: 0; display: none; }
.rail-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--ink-3); font: 600 14px/1 var(--brush); color: var(--on-ink-muted); background: var(--ink); grid-row: span 2; position: relative; z-index: 1; }
.rail-step b { font-weight: 600; font-size: 14px; color: var(--on-ink-muted); line-height: 1.25; }
.rail-step span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.rail-link { flex: 0 0 28px; height: 1px; background: var(--ink-3); margin-right: 14px; }
.rail-link.done { background: var(--red); }
.rail-step.done .rail-dot { background: var(--red); border-color: var(--red); color: #fff; }
.rail-step.done b { color: var(--on-ink); }
.rail-step.now .rail-dot { border-color: #e8806f; color: #fff; animation: ring 1.6s ease-out infinite; }
.rail-step.now b { color: #fff; }
.rail-step.wait .rail-dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.rail-step.wait b { color: #f3d79f; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(232, 128, 111, .55); } 100% { box-shadow: 0 0 0 10px rgba(232, 128, 111, 0); } }
@keyframes pulse { 50% { opacity: .35; } }

.banner { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--red-soft); color: var(--red-deep); border-bottom: 1px solid #ebc4bd; }
.banner button { margin-left: auto; color: var(--red-deep); text-decoration: underline; }

/* 首页 */
.hero { position: relative; min-height: 520px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 72px 24px 64px; background: var(--canvas); color: #fff; overflow: hidden; isolation: isolate; }
.hero-scatter { position: absolute; inset: -40px; z-index: -2; }
.hero-scatter img { position: absolute; opacity: .5; filter: sepia(.35) brightness(.9) contrast(1.05); transition: transform 1.2s cubic-bezier(.22, .9, .3, 1); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(18, 16, 14, .82) 0%, rgba(18, 16, 14, .62) 55%, rgba(18, 16, 14, .35) 100%), linear-gradient(180deg, rgba(18, 16, 14, .3), rgba(18, 16, 14, .75)); }
.hero-inner { width: min(760px, 100%); text-align: center; }
.hero h1 { font: 300 46px/1.3 var(--ui); letter-spacing: .12em; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.hero h1 em { font-style: normal; font-family: var(--brush); font-weight: 600; color: #f3c7b5; }
.hero .lead { margin: 14px auto 0; max-width: 36em; color: rgba(255, 255, 255, .78); font-size: 16px; }
.drop { margin: 34px auto 0; display: flex; align-items: stretch; gap: 0; background: rgba(255, 253, 249, .97); color: var(--text); border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .15s, transform .15s; text-align: left; }
.drop.over { outline-color: #f3c7b5; transform: scale(1.015); }
.drop-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.drop-pick svg { width: 30px; height: 30px; color: var(--red); flex: none; }
.drop-pick b { display: block; font-weight: 600; }
.drop-pick small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop .btn.primary { height: auto; border-radius: 0 4px 4px 0; padding: 0 28px; font-size: 16px; }
.hero-alt { margin-top: 16px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.hero-alt button { color: #f3c7b5; text-decoration: underline; text-underline-offset: 3px; }
.hero-alt button:hover { color: #fff; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.chips span { padding: 2px 10px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); font-size: 12px; }

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink-2); color: var(--on-ink); }
.stats-band div { padding: 26px 16px; text-align: center; border-right: 1px solid var(--ink-3); }
.stats-band div:last-child { border-right: 0; }
.stats-band b { font: 300 40px/1 var(--ui); letter-spacing: .02em; }
.stats-band span { margin-left: 6px; color: var(--on-ink-muted); font-size: 14px; }

.section { padding: 64px 24px; }
.section.alt { background: var(--card); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font: 400 30px/1.3 var(--ui); letter-spacing: .14em; }
.section-title h2::after { content: ""; display: block; width: 40px; height: 3px; background: var(--red); margin: 14px auto 0; }
.section-title p { color: var(--muted); margin-top: 12px; }
.flow-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; counter-reset: flow; }
.flow-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 22px 16px 18px; box-shadow: var(--shadow); text-align: center; transition: transform .2s, box-shadow .2s; }
.flow-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.flow-card i { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; background: var(--red-soft); color: var(--red); font: 600 22px/1 var(--brush); font-style: normal; }
.flow-card b { display: block; font-size: 16px; font-weight: 600; letter-spacing: .1em; }
.flow-card span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.flow-card small { display: block; margin-top: 10px; font: 11px/1.4 var(--mono); color: var(--faint); }
.flow-card:not(:last-child)::after { content: "›"; position: absolute; right: -12px; top: 38px; color: var(--line-strong); font-size: 22px; z-index: 1; }

.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.task-card { display: flex; flex-direction: column; text-align: left; background: var(--card); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.task-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.task-cover { position: relative; height: 210px; background: var(--canvas); overflow: hidden; }
.task-cover img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .5s; }
.task-card:hover .task-cover img { transform: scale(1.05); }
.task-cover .empty-cover { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-ink-muted); font-family: var(--brush); font-size: 40px; opacity: .4; }
.task-cover figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .82)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--muted); font-size: 13px; }
.task-meta .status { margin-left: auto; }
.more-row { text-align: center; margin-top: 28px; }

.status { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; background: var(--raised); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.running { background: var(--red-soft); color: var(--red); }
.status.running::before { animation: pulse 1.2s infinite; }
.status.waiting, .status.pending { background: var(--gold-soft); color: var(--gold); }
.status.done, .status.accepted { background: var(--green-soft); color: var(--green); }
.status.failed, .status.rejected { background: var(--red-soft); color: var(--red); }

.footer { background: var(--ink); color: var(--on-ink-muted); padding: 40px 24px 28px; font-size: 13px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { margin: 0 0 12px; color: var(--on-ink); font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.footer p { line-height: 1.9; }
.footer ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer-bottom { max-width: 1180px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--ink-3); text-align: center; font-size: 12px; }

/* 工作台 */
.work { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px minmax(0, 1fr) 420px; grid-template-rows: minmax(0, 1fr); }
.side { border-right: 1px solid var(--line); overflow: auto; background: var(--paper); display: flex; flex-direction: column; }
.side-scroll { flex: 1; padding: 16px 14px; }
.inspector { border-left: 1px solid var(--line); overflow: auto; background: var(--card); }
.progress-card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 14px; box-shadow: var(--shadow); margin-bottom: 18px; }
.progress-card .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.progress-card b { font-size: 15px; font-weight: 600; }
.progress-card .row span { color: var(--muted); font-size: 13px; }
.meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 10px 0 4px; display: flex; }
.meter i { display: block; height: 100%; background: var(--green); transition: width .4s; }
.meter i.bad { background: var(--red); }
.progress-card .btn { width: 100%; margin-top: 10px; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.section-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.section-label em { font-style: normal; color: var(--faint); font-weight: 400; margin-left: 4px; }
.group-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; width: 100%; padding: 8px; border-radius: 4px; background: var(--card); border: 1px solid var(--line); text-align: left; margin-bottom: 8px; position: relative; transition: border-color .15s, box-shadow .15s, transform .15s; }
.group-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.group-card.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow); }
.group-card .thumb { display: block; width: 76px; height: 76px; background: var(--canvas); border-radius: 3px; padding: 4px; }
.crop { display: block; width: 100%; height: 100%; }
.more-rows { width: 100%; margin-top: 2px; }
.group-tabs { display: none; }
.group-tab { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 230px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--ink-3); background: var(--ink); color: var(--on-ink-muted); font-size: 13px; }
.group-tab i { font: 600 14px/1 var(--brush); font-style: normal; color: var(--on-ink-muted); }
.group-tab b { font: 500 13px/1 var(--book); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.group-tab.on { border-color: var(--red); background: var(--red); color: #fff; }
.group-tab.on i { color: #fff; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.dot.accepted { background: #6cc196; }
.dot.rejected { background: #e8806f; }
.pill { flex: none; white-space: nowrap; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(18, 16, 14, .72); border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .78); font-size: 12px; backdrop-filter: blur(6px); }
.pill:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }
.group-card .gc-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.group-card b { font-family: var(--book); font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-card small { color: var(--muted); font-size: 12px; }
.group-card .no { position: absolute; left: 4px; top: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 2px; background: rgba(0, 0, 0, .6); color: #fff; font: 11px/18px var(--mono); text-align: center; }
.side-section { margin-top: 22px; }
.review-row { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; padding: 7px; text-align: left; border-radius: 4px; border: 1px solid var(--line); background: var(--card); margin-bottom: 6px; transition: border-color .15s, box-shadow .15s; }
.review-row:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.review-row img { width: 44px; height: 44px; object-fit: contain; background: var(--canvas); border-radius: 3px; padding: 2px; }
.review-row span { min-width: 0; font-size: 12px; color: var(--muted); }
.review-row span b { display: block; color: var(--text); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; padding: 0 6px; border-radius: 2px; font-size: 11px; line-height: 17px; background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.green { background: var(--green-soft); color: var(--green); }
.mini-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mini-wall img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--canvas); border-radius: 3px; padding: 3px; }
.side-foot { position: sticky; bottom: 0; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.side-foot .btn { width: 100%; }
.side-foot p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; font-size: 12px; color: var(--faint); }
.note-line { font-size: 12px; color: var(--muted); padding: 6px 2px; border-top: 1px dashed var(--line); }

.bench { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2a241f 0, var(--canvas) 70%); touch-action: none; cursor: grab; user-select: none; min-height: 360px; }
.bench.dragging { cursor: grabbing; }
.board { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.piece { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform .9s cubic-bezier(.22, .9, .3, 1), opacity .3s, filter .2s; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .7)); -webkit-user-drag: none; pointer-events: none; }
.bench.settled .piece { filter: none; }
.layer { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .35s; }
.layer.on { opacity: 1; }
.overlay { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.ghost { font-family: var(--brush); fill: #ff8a6a; fill-opacity: .8; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.ghost-cell { fill: rgba(255, 122, 92, .07); stroke: rgba(255, 138, 106, .6); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.hit { fill: transparent; pointer-events: all; cursor: pointer; }
.locator { fill: rgba(255, 210, 120, .12); stroke: #ffd278; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.locator.pinned { fill: rgba(255, 210, 120, .22); stroke-width: 3; }
.seam { position: absolute; left: 0; top: 0; pointer-events: none; filter: drop-shadow(0 0 2px rgba(255, 120, 80, .95)) drop-shadow(0 0 6px rgba(255, 90, 60, .55)); transition: opacity .3s; }
.piece-tag { pointer-events: all; cursor: pointer; }
.piece-tag rect { fill: rgba(18, 16, 14, .78); stroke: rgba(255, 255, 255, .35); vector-effect: non-scaling-stroke; transition: fill .15s; }
.piece-tag text { fill: #f1ece4; font-family: var(--mono); text-anchor: middle; dominant-baseline: central; }
.piece-tag:hover rect { fill: var(--red); stroke: transparent; }
.board.focus .piece:not(.hot) { opacity: .22; }
.board.focus .seam, .board.focus .ghost, .board.focus .ghost-cell { opacity: .15; }
.board .piece.hot { filter: drop-shadow(0 0 12px rgba(255, 210, 120, .5)); }
.board.glide { transition: transform .45s cubic-bezier(.22, .9, .3, 1); }
.bench.scrubbing .piece { transition: none; }
.bench.scrubbing .overlay, .bench.scrubbing .seam { opacity: 0; }
.toggle.mix { gap: 8px; font-family: var(--book); }
.toggle.mix input { width: 110px; accent-color: var(--red); }
.seam-card { position: absolute; left: 14px; top: 64px; z-index: 2; width: min(276px, calc(100% - 28px)); max-height: calc(100% - 110px); overflow-y: auto; padding: 12px 14px 14px; border-radius: 6px; background: rgba(255, 253, 249, .97); color: var(--text); box-shadow: 0 12px 32px rgba(0, 0, 0, .45); cursor: default; }
.seam-card.closed { width: auto; max-height: none; height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seam-card.closed b { color: var(--green); font-family: var(--mono); }
.seam-card.low.closed b, .seam-card.low .sc-score strong { color: var(--gold); }
.sc-head { display: flex; align-items: center; gap: 8px; }
.sc-head > b { flex: 1; font: 600 14px/1.4 var(--book); letter-spacing: .1em; }
.sc-links { display: inline-flex; gap: 4px; }
.sc-links button { padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sc-links button.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.sc-close { width: 24px; height: 24px; border-radius: 4px; color: var(--muted); font-size: 16px; }
.sc-close:hover { background: var(--raised); color: var(--text); }
.sc-score { display: flex; align-items: center; gap: 12px; margin: 8px 0 8px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.sc-score strong { font: 600 34px/1 var(--book); color: var(--green); }
.sc-score strong small { margin-left: 1px; font-size: 14px; }
.sc-score span { min-width: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.sc-score em { display: block; font-style: normal; font-family: var(--mono); color: var(--text); }
.sc-bars .ev-row { grid-template-columns: 56px minmax(0, 1fr) 42px 12px; }
.sc-bars .ev-text { margin-top: 8px; font-size: 12px; }
.sc-sub { margin: 12px 0 6px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.sc-spots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.spot-btn { aspect-ratio: 1; padding: 0; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); background: var(--canvas); }
.spot-btn:hover { outline: 2px solid var(--red); outline-offset: 1px; }
.spot { display: block; width: 100%; height: 100%; }
.bench-tools { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.bench-tools > * { pointer-events: auto; }
.bench-title { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: rgba(255, 255, 255, .55); font: 15px/1.4 var(--book); letter-spacing: .1em; pointer-events: none; white-space: nowrap; }
.segmented { display: inline-flex; border-radius: 4px; background: rgba(29, 27, 25, .88); border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; backdrop-filter: blur(6px); }
.segmented button { height: 34px; padding: 0 15px; color: var(--on-ink-muted); border-right: 1px solid rgba(255, 255, 255, .08); }
.segmented button:last-child { border-right: 0; }
.segmented button:hover { color: #fff; }
.segmented button.on { background: var(--red); color: #fff; font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 4px; background: rgba(29, 27, 25, .88); color: var(--on-ink-muted); cursor: pointer; backdrop-filter: blur(6px); }
.toggle input { accent-color: var(--red); margin: 0; }
.zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; border-radius: 4px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); }
.zoom button { width: 36px; height: 34px; background: rgba(29, 27, 25, .88); color: var(--on-ink); font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.zoom button:last-child { border-bottom: 0; }
.zoom button:hover { background: var(--red); }
.bench-hint { position: absolute; left: 14px; bottom: 16px; color: rgba(255, 255, 255, .4); font-size: 12px; pointer-events: none; }

/* 运行中 */
.running { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: minmax(0, 1fr); }
.wall-wrap { overflow: auto; padding: 24px; }
.run-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.run-head h2 { font: 400 22px/1.3 var(--ui); letter-spacing: .08em; }
.run-head p { color: var(--muted); font-size: 13px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.wall-item { display: flex; flex-direction: column; background: var(--card); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); animation: rise .35s ease both; text-align: left; transition: transform .2s, box-shadow .2s; }
.wall-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.wall-item .pic { position: relative; background: var(--canvas); height: 130px; }
.wall-item img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.wall-item .pic .badge { position: absolute; right: 6px; top: 6px; }
.wall-item b { display: block; font-size: 12px; font-weight: 500; padding: 8px 10px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wall-item small { display: block; color: var(--muted); padding: 0 10px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--book); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.wall-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.wall-bar .segmented { background: var(--card); border-color: var(--line); }
.wall-bar .segmented button { color: var(--muted); border-color: var(--line); }
.wall-bar .segmented button.on { color: #fff; }
.log { border-left: 1px solid var(--line); background: var(--card); overflow: auto; padding: 18px 16px; }
.log-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; animation: rise .2s ease both; }
.agent-seal { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 3px; font: 600 14px/1 var(--brush); font-style: normal; color: #fff; background: var(--muted); }
.agent-seal.perception { background: #5b6f8a; }
.agent-seal.screening { background: #7b6a4f; }
.agent-seal.assembly { background: #3c7d5e; }
.agent-seal.restoration { background: #8a5b7a; }
.agent-seal.semantic { background: #b07a22; }
.agent-seal.review { background: #4f6a6a; }
.agent-seal.supervisor { background: var(--red); }
.agent-seal.expert { background: var(--ink); }
.log-row span { color: var(--text); overflow-wrap: anywhere; }
.log-row span small { display: block; color: var(--faint); font-size: 11px; }
.log-row.backtrack span, .log-row.recheck span { color: var(--gold); }
.log-row.error span { color: var(--red); }
.log-row.supervise span { color: var(--red-deep); }
.log-row.verdict span { font-weight: 500; }

/* 检查器 */
.ins-head { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--raised), var(--card)); }
.ins-kicker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ins-head h2 { font: 600 24px/1.35 var(--book); letter-spacing: .04em; }
.ins-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.decide .btn { height: 40px; }
.note { width: 100%; margin-top: 8px; min-height: 54px; resize: vertical; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 7px 9px; }
.tabs { display: flex; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.tabs button { height: 44px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--red); border-color: var(--red); }
.pane { padding: 18px 20px 30px; }
.tentative { border: 1px solid #ecd6aa; background: var(--gold-soft); border-radius: 4px; padding: 12px 14px; color: #7a5413; }
.tentative b { display: block; margin-bottom: 4px; }
.ocr-line { font-family: var(--book); padding: 4px 0; border-bottom: 1px dashed var(--line); }
.scroll { writing-mode: vertical-rl; direction: ltr; font-family: var(--brush); font-size: 22px; line-height: 1.55; letter-spacing: .08em; max-height: 360px; max-width: 100%; overflow-x: auto; padding: 16px 12px; background: #f6efdf; background-image: repeating-linear-gradient(90deg, transparent 0 calc(1.55em - 1px), rgba(176, 122, 34, .22) calc(1.55em - 1px) 1.55em); border: 1px solid #e6d8b8; border-radius: 3px; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; color: #2b2015; box-shadow: inset 0 0 30px rgba(176, 122, 34, .12); }
.scroll-col { display: block; white-space: nowrap; }
.ch { cursor: pointer; border-radius: 3px; transition: background .1s, box-shadow .1s; }
.ch.picked { background: rgba(255, 196, 92, .45); box-shadow: 0 0 0 2px #e0a33a; }
.ch:hover { background: rgba(200, 58, 46, .14); }
.ch.inferred { color: var(--red); }
.ch.unread { color: var(--gold); }
.ch.blank { visibility: hidden; }
.ch.variant { text-decoration: underline wavy var(--gold); text-underline-offset: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--text); vertical-align: 1px; }
.legend .l-unread::before { background: var(--gold); }
.legend .l-inferred::before { background: var(--red); }
.legend .l-variant::before { background: none; border-bottom: 2px wavy var(--gold); border-radius: 0; }
.sub { font-weight: 600; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; letter-spacing: .06em; }
.sub::before { content: ""; width: 3px; height: 14px; background: var(--red); border-radius: 1px; }
.quote { padding: 12px 0; border-top: 1px solid var(--line); }
.quote blockquote { margin: 0 0 6px; padding-left: 10px; border-left: 2px solid var(--line-strong); font-family: var(--book); color: var(--muted); }
.term { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 7px 0; font-size: 13px; border-top: 1px solid var(--line); }
.term b { font-family: var(--book); font-weight: 600; }
.term span { color: var(--muted); }
.notice { font-size: 12px; color: var(--muted); margin-top: 10px; }
.link-card { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.link-card.llm { border-left: 3px solid var(--red); }
.link-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.link-title b { font-weight: 600; font-size: 13px; }
.score { font-family: var(--mono); color: var(--green); font-weight: 600; }
.reason { margin-top: 6px; font-size: 13px; color: var(--muted); }
.ledger { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.ledger div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); padding: 2px 0; }
.ledger code { font-family: var(--mono); color: var(--faint); }
.ledger .old { text-decoration: line-through; opacity: .6; }
.ledger .ledger-note { font-size: 12px; color: var(--muted); margin: 0 0 6px; padding-left: 10px; border-left: 2px solid var(--red); }
.llm-tag { color: var(--red); }
.link-actions { display: flex; gap: 6px; margin-top: 10px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.metrics div { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; background: var(--raised); }
.metrics b { display: block; font: 300 22px/1.2 var(--ui); }
.metrics span { font-size: 12px; color: var(--muted); }

/* 普通页面 */
.page-hero { background: var(--ink-2); color: var(--on-ink); padding: 34px 24px 30px; }
.page-hero .section-inner > h2 { font: 400 28px/1.3 var(--ui); letter-spacing: .12em; }
.page-hero p { color: var(--on-ink-muted); margin-top: 6px; }
.page-hero .section-inner { max-width: 1132px; }
.page { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; }
.big-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 28px; }
.big-metrics div { background: var(--card); border-radius: 4px; padding: 16px; box-shadow: var(--shadow); border-top: 3px solid var(--line-strong); }
.big-metrics div.hot { border-top-color: var(--red); }
.big-metrics b { display: block; font: 300 30px/1.1 var(--ui); }
.big-metrics span { font-size: 12px; color: var(--muted); }
.panel { background: var(--card); border-radius: 4px; box-shadow: var(--shadow); padding: 4px 18px 10px; margin-bottom: 24px; }
.skill-table { width: 100%; border-collapse: collapse; }
.skill-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 12px 12px 10px 0; border-bottom: 1px solid var(--line-strong); }
.skill-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.skill-table tr:last-child td { border-bottom: 0; }
.skill-table code { font-family: var(--mono); color: var(--muted); font-size: 12px; }
.agent-flow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 30px; }
.agent-flow div { background: var(--card); border-radius: 4px; padding: 14px 12px; box-shadow: var(--shadow); text-align: center; }
.agent-flow .agent-seal { margin: 0 auto 8px; width: 36px; height: 36px; font-size: 18px; }
.agent-flow b { display: block; font-weight: 600; }
.agent-flow span { display: block; font-size: 12px; color: var(--muted); }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.skill-card { background: var(--card); border-radius: 4px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--line-strong); }
.skill-card.llm { border-top-color: var(--red); }
.skill-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.skill-card header b { font-size: 15px; font-weight: 600; }
.skill-card header code { font: 11px var(--mono); color: var(--faint); }
.skill-card > code { font: 12px var(--mono); color: var(--red-deep); }
.skill-card p { color: var(--muted); font-size: 13px; flex: 1; }
.skill-card footer { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 20px; }
.empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 24px; background: var(--paper); }
.empty-box { max-width: 360px; }
.empty-box i { display: block; font: 600 48px/1 var(--brush); font-style: normal; color: var(--line-strong); margin-bottom: 12px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(18, 16, 14, .78); display: grid; place-items: center; padding: 24px; z-index: 20; animation: fade .15s ease; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.modal-box { width: min(980px, 100%); max-height: 92dvh; overflow: auto; background: var(--card); border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font: 600 18px/1.3 var(--book); }
.modal-head .count { margin-left: auto; color: var(--muted); font-size: 13px; }
.modal-head .close { width: 32px; height: 32px; border-radius: 4px; color: var(--muted); font-size: 20px; }
.modal-head .close:hover { background: var(--raised); color: var(--text); }
.modal-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 16px 20px; }
.modal-pieces { display: grid; gap: 10px; align-content: start; }
.modal-pieces figure { margin: 0; background: var(--canvas); border-radius: 4px; padding: 8px; }
.modal-pieces img { width: 100%; height: 120px; object-fit: contain; }
.modal-pieces figcaption { color: var(--on-ink-muted); font-size: 12px; margin-top: 4px; text-align: center; }
.modal-pair { position: relative; height: 420px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2a241f 0, var(--canvas) 70%); border-radius: 4px; }
.modal-pair .cap { position: absolute; left: 10px; top: 8px; color: rgba(255, 255, 255, .5); font-size: 12px; }
.modal-info { padding: 0 20px 4px; }
.modal-info .reason { margin: 0 0 6px; }
.modal-actions { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--raised); flex-wrap: wrap; }
.modal-actions .keys { margin: 0; }

@media (max-width: 1280px) {
  .work { grid-template-columns: 250px minmax(0, 1fr) 360px; }
  .flow-cards { grid-template-columns: repeat(3, 1fr); }
  .flow-card:nth-child(3)::after { display: none; }
  .agent-flow { grid-template-columns: repeat(4, 1fr); }
}
.eval-export { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--red); letter-spacing: 0; }
.eval-funnel { padding: 16px 18px; display: grid; gap: 14px; }
.eval-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.eval-head span { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.eval-bar { height: 10px; background: var(--raised); border-radius: 5px; overflow: hidden; margin: 6px 0 4px; }
.eval-bar i { display: block; height: 100%; background: var(--red); border-radius: 5px; }
.eval-step:first-child .eval-bar i { background: var(--line-strong); }
.eval-step:last-child .eval-bar i { background: var(--green); }
.eval-step p { margin: 0; font-size: 12px; color: var(--muted); }
.eval-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; margin-bottom: 24px; }
.eval-cards div { background: var(--card); border-radius: 4px; padding: 14px 16px; box-shadow: var(--shadow); }
.eval-cards span { font-size: 12px; color: var(--muted); }
.eval-cards b { display: block; font: 300 28px/1.2 var(--ui); margin: 2px 0; }
.eval-cards p { margin: 0; font-size: 12px; color: var(--faint); }
.eval-groups { padding: 14px 18px; }
.eval-legend { display: flex; gap: 8px; margin-bottom: 10px; }
.eval-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eval-chip { padding: 2px 10px; border-radius: 12px; font-size: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--faint); }
.eval-chip.done { background: var(--green-soft); color: var(--green); border-color: transparent; }
.eval-chip.part { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.eval-chip.reach { background: var(--card); color: var(--red); border-color: var(--red-soft); }
.eval-legend .eval-chip { font-size: 11px; }


@media (max-width: 1080px) {
  #app.fixed { height: auto; overflow: visible; }
  .work { grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto auto; }
  .inspector { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .bench { height: 62dvh; }
  .side { max-height: 62dvh; }
  .running { grid-template-columns: 1fr; }
  .log { border-left: 0; border-top: 1px solid var(--line); max-height: 360px; }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { gap: 8px; padding: 0 10px; height: 52px; }
  .brand-name { display: none; }
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav button { flex: none; padding: 0 10px; white-space: nowrap; }
  .nav .long { display: none; }
  .nav .short { display: inline; }
  .task-name { display: none; }
  .rail { padding: 9px 12px; overflow: hidden; }
  .rail-step { flex: none; min-width: 0; padding-right: 0; grid-template-columns: 26px auto; column-gap: 8px; }
  .rail-dot { width: 26px; height: 26px; font-size: 13px; }
  .rail-link { flex: 1 1 6px; min-width: 6px; margin: 0 6px; }
  .rail-step:not(.now):not(.wait) > b, .rail-step:not(.now):not(.wait) > span:last-child { display: none; }
  .rail-step.done:last-child > b, .rail-step.done:last-child > span:last-child { display: block; }
  .rail-step > span:last-child { max-width: 46vw; }
  .hero { min-height: 0; padding: 48px 16px 40px; }
  .hero h1 { font-size: 28px; letter-spacing: .06em; }
  .drop { flex-direction: column; }
  .drop .btn.primary { height: 46px; border-radius: 0 0 4px 4px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stats-band div:nth-child(2) { border-right: 0; }
  .stats-band div { border-bottom: 1px solid var(--ink-3); }
  .stats-band b { font-size: 30px; }
  .section { padding: 44px 16px; }
  .section-title h2 { font-size: 24px; }
  .flow-cards { grid-template-columns: repeat(2, 1fr); }
  .flow-card::after { display: none; }
  .task-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .work { grid-template-columns: 1fr; }
  .group-tabs { display: flex; gap: 8px; order: 0; overflow-x: auto; scrollbar-width: none; padding: 10px 12px; background: var(--ink-2); border-bottom: 1px solid #000; }
  .bench { order: 1; height: 58dvh; }
  .inspector { order: 2; }
  .side { order: 3; max-height: none; border-right: 0; border-top: 1px solid var(--line); }
  .bench-hint { display: none; }
  .strip-pic .crop { height: 232px; }
  .agent-flow { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 0; }
  .modal-box { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-pieces { grid-template-columns: 1fr 1fr; }
  .modal-pair { height: 320px; }
  .skill-table th:nth-child(3), .skill-table td:nth-child(3) { display: none; }
}
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; background: rgba(29, 27, 25, .82); color: var(--on-ink); white-space: nowrap; }
.tag.green { background: var(--green); color: #fff; }
.tag.gold { background: var(--gold); color: #fff; }
.tag.red { background: var(--red); color: #fff; }
.tag.gray { background: #8b8178; color: #fff; }
.frag-hero { padding-bottom: 0; }
.hero-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 24px; border-top: 1px solid var(--ink-3); }
.hero-stats div { padding: 16px 0 18px; text-align: center; border-right: 1px solid var(--ink-3); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats b { display: block; font: 400 32px/1.1 var(--book); color: #fff; }
.hero-stats div:nth-child(3) b { color: #7fc39f; }
.hero-stats div:nth-child(4) b { color: #e2b25a; }
.hero-stats span { color: var(--on-ink-muted); font-size: 12px; letter-spacing: .12em; }
.frag-tools { position: sticky; top: 0; z-index: 5; background: rgba(243, 239, 231, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.frag-tools-inner { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; gap: 10px; align-items: center; }
.frag-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: none; }
.frag-chips::-webkit-scrollbar { display: none; }
.frag-chips button { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-strong); background: var(--card); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.frag-chips button small { font-size: 11px; color: var(--faint); }
.frag-chips button:hover { border-color: var(--muted); color: var(--text); }
.frag-chips button.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.frag-chips button.on small { color: rgba(255, 255, 255, .8); }
.frag-select, .frag-search { height: 34px; border: 1px solid var(--line-strong); border-radius: 4px; background-color: var(--card); padding: 0 10px; font: inherit; color: var(--text); min-width: 0; }
.frag-select { max-width: 240px; }
.frag-search { flex: 1; padding-left: 32px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1978b' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") 10px center / 16px no-repeat; }
.section-title.left { text-align: left; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 8px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-title.left h2 { font: 400 24px/1.3 var(--book); letter-spacing: .12em; position: relative; padding-left: 14px; }
.section-title.left h2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; background: var(--red); }
.section-title.left h2::after { display: none; }
.section-title.left p { color: var(--muted); font-size: 13px; margin: 0; }
.strips { display: grid; gap: 22px; margin-bottom: 44px; }
.strip { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #ebe6dc; border-radius: 2px; overflow: hidden; box-shadow: var(--shadow); animation: rise .35s ease both; }
.strip.flip .strip-pic { order: 2; }
.strip-pic { position: relative; background: var(--canvas) radial-gradient(circle at 50% 45%, #2a2420, var(--canvas) 70%); min-height: 340px; display: grid; place-items: center; padding: 22px; overflow: hidden; }
.strip-pic img, .strip-pic .crop { max-width: 100%; max-height: 360px; object-fit: contain; transition: transform .4s; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); }
.strip-pic .crop { width: 100%; height: 300px; }
.strip-pic:hover img, .strip-pic:hover .crop { transform: scale(1.04); }
.strip-no { position: absolute; left: 16px; top: 12px; font: 400 44px/1 var(--brush); color: rgba(255, 255, 255, .16); }
.strip-text { padding: 32px 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.strip-text h3 { font: 600 28px/1.3 var(--book); letter-spacing: .06em; margin-top: 4px; }
.strip-sub { color: var(--red); font-weight: 600; letter-spacing: .04em; }
.strip-src { color: var(--muted); font-size: 13px; }
.strip-passage { font: 16px/1.9 var(--book); color: var(--text); margin-top: 4px; letter-spacing: .08em; border-left: 2px solid var(--line-strong); padding-left: 12px; }
.strip-passage.muted { color: var(--muted); font: 14px/1.7 var(--ui); letter-spacing: 0; }
.strip-members { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.strip-members button { width: 70px; text-align: center; }
.strip-members img { width: 70px; height: 70px; object-fit: contain; background: var(--canvas); border-radius: 3px; padding: 4px; transition: box-shadow .15s; }
.strip-members button:hover img { box-shadow: 0 0 0 2px var(--red); }
.strip-members small { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-text .btn { margin-top: auto; }
.frag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.frag-card { display: flex; flex-direction: column; background: var(--card); border-radius: 2px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, box-shadow .2s; animation: rise .35s ease both; min-width: 0; }
.frag-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.frag-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.frag-pic { position: relative; height: 230px; background: var(--canvas) radial-gradient(circle at 50% 40%, #2a2420, var(--canvas) 72%); }
.frag-pic img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform .35s; }
.frag-card:hover .frag-pic img { transform: scale(1.05); }
.frag-pic .tag { position: absolute; left: 10px; top: 10px; }
.frag-title { background: var(--ink); color: var(--on-ink); text-align: center; padding: 9px 12px; font: 500 15px/1.4 var(--book); letter-spacing: .1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frag-info { padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.frag-where { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frag-where i { font-style: normal; font-size: 11px; font-weight: 600; color: var(--red); border: 1px solid #e2b4ad; padding: 0 5px; border-radius: 2px; line-height: 18px; margin-right: 8px; display: inline-block; }
.frag-where.weak { color: var(--muted); font-weight: 400; }
.frag-ocr { font: 15px/1.7 var(--book); color: var(--muted); letter-spacing: .06em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.frag-feat { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.frag-feat span { display: inline-flex; align-items: center; gap: 5px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch-line { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.frag-info footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; font-size: 12px; color: var(--muted); }
.frag-info .more { display: inline-grid; place-items: center; width: 30px; height: 22px; background: #9b4a35; color: #fff; border-radius: 2px; font-weight: 700; line-height: 1; padding-bottom: 6px; flex: none; }
.drawer-mask { position: fixed; inset: 0; z-index: 15; background: rgba(18, 16, 14, .6); animation: fade .15s ease; display: flex; justify-content: flex-end; }
.drawer { width: min(560px, 100%); height: 100%; background: var(--paper); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .35); animation: slide .22s ease; }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.drawer-head { display: flex; align-items: center; gap: 4px; padding: 12px 14px 12px 20px; background: var(--ink); color: var(--on-ink); }
.drawer-head > div { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.drawer-head h3 { font: 500 20px/1.3 var(--book); letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head .count { color: var(--on-ink-muted); font-size: 12px; margin-right: 6px; white-space: nowrap; }
.drawer-head .close { width: 34px; height: 34px; border-radius: 4px; color: var(--on-ink-muted); font-size: 22px; line-height: 1; flex: none; }
.drawer-head .close:hover { background: var(--ink-3); color: #fff; }
.drawer-body { flex: 1; overflow: auto; padding: 0 20px 32px; }
.drawer-pic { margin: 0 -20px; height: 42dvh; min-height: 240px; background: var(--canvas) radial-gradient(circle at 50% 40%, #2a2420, var(--canvas) 72%); padding: 18px; }
.drawer-pic img { width: 100%; height: 100%; object-fit: contain; }
.drawer-group { display: flex; align-items: center; gap: 10px; width: calc(100% + 40px); margin: 0 -20px; padding: 12px 20px; background: var(--green); color: #fff; text-align: left; }
.drawer-group span { flex: 1; opacity: .85; font-size: 13px; }
.drawer-group svg { width: 18px; height: 18px; }
.drawer-ocr { font: 18px/1.9 var(--book); letter-spacing: .1em; background: var(--card); border: 1px solid var(--line); padding: 12px 14px; border-radius: 2px; word-break: break-all; }
.facts { display: grid; grid-template-columns: 76px minmax(0, 1fr); margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 2px; }
.facts dt, .facts dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.facts dt { color: var(--muted); background: var(--raised); }
.facts dt:nth-last-child(2), .facts dd:last-child { border-bottom: 0; }
.partners { display: grid; gap: 8px; }
.partner { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 2px; text-align: left; width: 100%; }
.partner img { width: 52px; height: 52px; object-fit: contain; background: var(--canvas); border-radius: 2px; padding: 3px; }
.partner b { display: block; font-weight: 600; font-size: 13px; }
.partner small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partner svg { width: 16px; height: 16px; color: var(--red); }
.partner.live { border-color: #e3c98f; cursor: pointer; }
.partner.live:hover { box-shadow: var(--shadow); border-color: var(--gold); }
.partner-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 2px; }
.partner-wrap.live { border-color: #e3c98f; }
.partner-wrap.open { box-shadow: var(--shadow); }
.partner-wrap .partner { border: 0; background: none; cursor: pointer; grid-template-columns: 52px minmax(0, 1fr) auto 20px; }
.partner-wrap .partner:hover { background: var(--raised); }
.partner .chev { color: var(--faint); font-size: 18px; text-align: center; }
.ev-panel { padding: 4px 14px 12px; border-top: 1px dashed var(--line); }
.ev-panel h5 { margin: 12px 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .08em; }
.ev-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 52px 14px; align-items: center; gap: 8px; font-size: 12px; padding: 2px 0; }
.ev-label { color: var(--text); }
.ev-track { position: relative; height: 6px; background: var(--raised); border-radius: 3px; box-shadow: inset 0 0 0 1px var(--line); }
.ev-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #b9ad9c; }
.ev-row.ok .ev-track i { background: var(--green); }
.ev-row.bad .ev-track i { background: var(--red); }
.ev-track em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.ev-value { text-align: right; font-family: var(--mono); color: var(--muted); }
.ev-mark { font-weight: 700; text-align: center; }
.ev-row.ok .ev-mark { color: var(--green); }
.ev-row.bad .ev-mark { color: var(--red); }
.ev-note { grid-column: 2 / -1; color: var(--faint); font-size: 11px; margin-top: -2px; }
.ev-text { font-size: 13px; padding-left: 10px; border-left: 3px solid var(--line-strong); }
.ev-text.ok { border-color: var(--green); color: var(--green); }
.ev-text.bad { border-color: var(--red); color: var(--red); }
.ev-text.na { color: var(--muted); }
.ev-verdict { margin-top: 10px; font-size: 12px; color: var(--muted); background: var(--raised); padding: 6px 10px; border-radius: 2px; }
.ev-verdict b { color: var(--text); }
.ev-verdict.llm { border-left: 3px solid var(--gold); }
.ev-judge { margin: 0 14px 12px; }
@media (max-width: 1080px) {
  .frag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-text { padding: 24px; }
}
@media (max-width: 760px) {
  .frag-hero { padding: 22px 16px 0; }
  .frag-hero .section-inner > h2 { font-size: 24px; }
  .frag-hero p { font-size: 13px; }
  .hero-stats { margin-top: 14px; }
  .hero-stats div { padding: 12px 0 14px; }
  .hero-stats b { font-size: 22px; }
  .hero-stats span { font-size: 11px; letter-spacing: .04em; }
  .frag-tools-inner { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .frag-chips { margin: 0 -12px; padding: 0 12px; width: calc(100% + 24px); }
  .frag-select { flex: 1; max-width: none; }
  .frag-search { flex: 1 1 100%; }
  .page:has(#frag-body) { padding: 20px 12px 40px; }
  .section-title.left h2 { font-size: 20px; }
  .strip { grid-template-columns: 1fr; }
  .strip.flip .strip-pic { order: 0; }
  .strip-pic { min-height: 0; height: 260px; padding: 14px; }
  .strip-pic img { max-height: 232px; }
  .strip-text { padding: 18px 16px 20px; }
  .strip-text h3 { font-size: 22px; }
  .strip-text .btn { width: 100%; margin-top: 8px; }
  .frag-grid { gap: 10px; }
  .frag-pic { height: 150px; }
  .frag-pic img { padding: 10px; }
  .frag-title { font-size: 13px; padding: 6px 8px; letter-spacing: .04em; }
  .frag-info { padding: 9px 10px; gap: 5px; }
  .frag-where { font-size: 12px; }
  .frag-where i { display: none; }
  .frag-ocr { font-size: 13px; -webkit-line-clamp: 1; }
  .frag-feat span:nth-child(2) { display: none; }
  .frag-info .more { display: none; }
  .drawer-pic { height: 38dvh; }
  .partner { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .partner img { width: 44px; height: 44px; }
  .partner svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.legend.top { margin: 0 0 10px; }
.why { margin-top: 12px; padding: 10px 14px; border: 1px solid #ecd6aa; border-radius: 4px; background: var(--gold-soft); color: #7a5413; font-size: 13px; }
.why b { display: block; margin-bottom: 4px; }
.why ul { margin: 0; padding-left: 18px; }
.why li { margin: 2px 0; }
.why em { font-style: normal; font-weight: 700; font-family: var(--mono); }
.ins-head .why p { margin-top: 6px; color: #7a5413; font-size: 12px; }

.ch.quoted { background: rgba(60, 125, 94, .16); }
.sub em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--faint); letter-spacing: 0; }
.source-card { border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px; background: var(--raised); padding: 10px 14px; font-size: 13px; }
.src-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); }
.src-row:first-child { border-top: 0; }
.src-key { color: var(--muted); font-size: 12px; letter-spacing: .06em; padding-top: 1px; }
.src-row small { display: block; color: var(--faint); font-size: 12px; margin-top: 1px; }
.src-row a, .cite a, .term-ref { color: var(--red); text-decoration: none; margin-left: 6px; white-space: nowrap; }
.src-row a:hover, .cite a:hover, .term-ref:hover { text-decoration: underline; }
.src-row .muted { color: var(--muted); }
.src-hits { margin: 2px 0 4px 74px; font-size: 12px; color: var(--muted); }
.src-hits summary { cursor: pointer; }
.src-hits div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.src-hits code { font-family: var(--book); background: var(--card); border: 1px solid var(--line); border-radius: 2px; padding: 0 5px; color: var(--text); }
.provenance { font-size: 12px; color: var(--muted); background: var(--raised); border-radius: 2px; padding: 6px 10px; margin-bottom: 4px; }
.quote blockquote { cursor: pointer; transition: border-color .15s, color .15s; }
.quote blockquote:hover, .quote.on blockquote { border-left-color: var(--green); color: var(--text); }
.cite { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 12px; color: var(--faint); }
.cite a { margin-left: 0; font-family: var(--mono); }
.basis { padding: 0 6px; border-radius: 2px; line-height: 18px; font-weight: 600; }
.basis.ok { background: var(--green-soft); color: var(--green); }
.basis.part { background: var(--gold-soft); color: var(--gold); }
.basis.na { background: var(--red-soft); color: var(--red); }
.basis-bar { display: inline-flex; width: 64px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line); }
.basis-bar i { display: block; flex-basis: 0; }
.b-seen { background: var(--text); }
.b-unread { background: var(--gold); }
.b-inferred { background: var(--red); opacity: .7; }
.term-ref { font-size: 12px; font-family: var(--mono); }

.review-page { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr) 340px; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--paper); }
.rv-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.rv-title { flex: 1; min-width: 0; }
.rv-title h2 { font: 600 18px/1.3 var(--book); }
.rv-title p { margin-top: 2px; font-size: 12px; color: var(--muted); }
.rv-progress { display: grid; gap: 4px; min-width: 210px; font-size: 13px; color: var(--muted); }
.rv-progress b { color: var(--text); font-size: 17px; }
.rv-progress small { font-size: 11px; color: var(--faint); }
.rv-meter { display: flex; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rv-meter i { display: block; height: 100%; transition: width .2s; }
.rv-meter i.ok { background: var(--green); }
.rv-meter i.bad { background: var(--red); }
.rv-meter i.na { background: var(--faint); }
.rv-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rv-sort select { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--card); font: inherit; color: var(--text); }
.rv-queue { overflow: auto; padding: 10px; border-right: 1px solid var(--line); }
.rq-row { display: grid; grid-template-columns: 18px 38px 38px minmax(0, 1fr) auto; gap: 6px; align-items: center; width: 100%; margin-bottom: 6px; padding: 6px; text-align: left; border: 1px solid var(--line); border-radius: 4px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.rq-row:hover { border-color: var(--gold); }
.rq-row.on { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red), var(--shadow); }
.rq-row.local { border-style: dashed; border-color: var(--line-strong); }
.rq-row.on.local { border-color: var(--red); }
.rq-no { font: normal 11px var(--mono); color: var(--faint); text-align: center; }
.rq-row img { width: 38px; height: 38px; padding: 2px; object-fit: contain; border-radius: 3px; background: var(--canvas); }
.rq-text { min-width: 0; font-size: 11px; color: var(--muted); }
.rq-text b { display: block; overflow: hidden; font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.rq-text .badge { margin-left: 4px; font-style: normal; }
.rq-tag { padding: 0 5px; border-radius: 2px; font-size: 11px; line-height: 18px; white-space: nowrap; }
.rq-tag.ok { background: var(--green-soft); color: var(--green); }
.rq-tag.bad { background: var(--red-soft); color: var(--red); }
.rq-tag.na { background: var(--raised); color: var(--muted); border: 1px solid var(--line); }
.rv-stage { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px; }
.rv-stage.cols { grid-template-columns: minmax(200px, .62fr) minmax(0, 1fr); }
.rv-stage.cols .rv-strip { grid-row: 1 / 3; }
.rv-stage.rows { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); grid-template-rows: minmax(0, .9fr) minmax(0, 1fr); }
.rv-stage.rows .rv-strip { grid-column: 1 / 3; }
.rv-stage.plain > .notice { align-self: center; justify-self: center; }
.rv-strip { border-color: var(--gold); }
.rv-strip.open { box-shadow: 0 0 0 1px var(--gold); }
.rv-gap { display: flex; align-items: center; gap: 6px; margin-left: auto; white-space: nowrap; color: var(--on-ink); }
.rv-gap input { width: 96px; accent-color: var(--gold); }
.join { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--raised); }
.join-lines { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.join-lines i { display: inline-block; width: 10px; height: 6px; margin-right: 6px; vertical-align: middle; }
.join-lines i.a, .join-text .a { background: var(--red); }
.join-lines i.b { background: var(--ink-3); }
.join-text { margin: 8px 0 6px; font: 17px/2 var(--book); letter-spacing: 1px; word-break: break-all; }
.join-text .a { background: none; color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.join-text .b { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink-3); }
.join-text .gap { color: var(--faint); background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(161, 151, 139, .16) 4px 6px); }
.join-text .skip { padding: 0 4px; font: 12px var(--ui); color: var(--muted); letter-spacing: 0; }
.join-verdict { font-size: 13px; line-height: 1.7; }
.join-verdict.warn { color: var(--red); }
.join-cite { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
.join-cite a { color: var(--red); text-decoration: none; }
.join-cite small { color: var(--faint); }
.rv-cell { min-width: 0; min-height: 0; margin: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #000; border-radius: 6px; background: var(--canvas); }
.rv-cell figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px; font-size: 12px; color: var(--on-ink-muted); background: var(--ink-2); }
.rv-cell figcaption b { color: var(--on-ink); font-weight: 600; }
.rv-cell svg { flex: 1; min-height: 0; width: 100%; display: block; }
.rv-cell svg.pickable { cursor: crosshair; }
.rv-cell.rv-zoom { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.rv-spots { display: flex; gap: 2px; margin-left: auto; }
.rv-spots button { padding: 1px 8px; white-space: nowrap; border-radius: 3px; font-size: 12px; color: var(--on-ink-muted); }
.rv-spots button:hover { color: var(--on-ink); }
.rv-spots button.on { background: var(--red); color: #fff; }
.rv-hint { margin-left: auto; font-size: 11px; }
.rv-toggle { white-space: nowrap; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.rv-info { overflow: auto; padding: 16px 18px; border-left: 1px solid var(--line); background: var(--card); }
.rv-score { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rv-score span { display: block; font-size: 12px; color: var(--muted); }
.rv-score b { font: 600 42px/1.1 var(--book); color: var(--green); }
.rv-score b small { margin-left: 2px; font-size: 16px; }
.rv-score.low b { color: var(--gold); }
.rv-score em { display: block; font-size: 12px; font-style: normal; color: var(--muted); }
.rv-flag { margin-bottom: 10px; padding: 8px 10px; border-radius: 4px; background: var(--gold-soft); color: var(--gold); font-size: 13px; }
.rv-flag b { margin-right: 8px; }
.rv-reason { margin-bottom: 10px; font-size: 13px; }
.rv-reason b { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rv-reason p { line-height: 1.7; }
.rv-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--card); border-top: 1px solid var(--line); }
.rv-bar .spacer { flex: 1; }
.rv-bar .keys { display: flex; gap: 14px; margin-left: 8px; font-size: 12px; color: var(--muted); }
.rv-bar .keys kbd { margin-right: 2px; }
.rv-bar .btn { height: 40px; }
.rv-bar .btn kbd { margin-left: 4px; background: transparent; color: inherit; border-color: currentColor; opacity: .7; }
.rv-bar .btn.chosen { outline: 2px solid var(--text); outline-offset: 2px; }
.rv-count { min-width: 84px; font-size: 13px; text-align: center; color: var(--muted); }
.rv-mine { font-size: 12px; color: var(--gold); }
.toast { position: fixed; left: 50%; bottom: 84px; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: 13px; box-shadow: var(--shadow-lift); transform: translateX(-50%); animation: toast-in .18s ease-out; }
.toast button { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #ffb4a8; }
.toast kbd { background: transparent; color: var(--on-ink-muted); border-color: var(--ink-3); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.volume { margin-bottom: 14px; }
.vol-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.vol-head b { font: 600 14px var(--book); color: var(--text); }
.vol-track { position: relative; height: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--raised); }
.vol-mark { position: absolute; top: 0; bottom: 0; }
.vol-mark.a { top: 3px; bottom: 50%; background: var(--red); border-radius: 1px; }
.vol-mark.b { top: 50%; bottom: 3px; background: var(--ink-3); border-radius: 1px; }
.vol-mark.loose { width: 1px; background: var(--line-strong); }
.vol-keys { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.vol-keys i { display: inline-block; width: 10px; height: 6px; margin-right: 4px; vertical-align: middle; }
.vol-keys i.a { background: var(--red); }
.vol-keys i.b { background: var(--ink-3); }
.vol-keys i.loose { width: 2px; height: 10px; background: var(--line-strong); }
.vol-note { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.vol-note.warn { color: var(--red); }

.report { flex: 1; padding: 0 24px 60px; background: var(--paper); }
.rp-tools { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; max-width: 960px; margin: 0 auto; padding: 12px 0; background: var(--paper); }
.rp-sheet { max-width: 960px; margin: 0 auto; padding: 48px 56px 40px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }
.rp-cover { display: flex; align-items: center; gap: 22px; padding-bottom: 26px; border-bottom: 3px double var(--line-strong); }
.rp-seal { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border: 3px solid var(--red); border-radius: 6px; color: var(--red); font: 600 36px/1 var(--brush); transform: rotate(-4deg); }
.rp-cover small { font-size: 13px; letter-spacing: .3em; color: var(--red); }
.rp-cover h1 { margin: 2px 0 4px; font: 600 26px/1.35 var(--book); }
.rp-cover p { font-size: 12px; color: var(--muted); }
.rp-stats { display: grid; grid-template-columns: repeat(6, 1fr); margin: 22px 0 10px; border: 1px solid var(--line); border-radius: 4px; }
.rp-stats div { padding: 12px 10px; text-align: center; border-left: 1px solid var(--line); }
.rp-stats div:first-child { border-left: 0; }
.rp-stats b { display: block; font: 600 22px/1.2 var(--book); }
.rp-stats span { font-size: 11px; color: var(--muted); }
.rp-note { margin: 8px 0; font-size: 13px; color: var(--muted); }
.rp-group { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.rp-group h2 { display: flex; align-items: center; gap: 12px; font: 600 21px/1.3 var(--book); }
.rp-group h2 > i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font: normal 15px/1 var(--book); }
.rp-group h2 > em { font: normal 13px var(--ui); color: var(--muted); }
.rp-stamp { margin-left: auto; padding: 2px 10px; border: 2px solid currentColor; border-radius: 3px; font: 600 15px/1.4 var(--brush); letter-spacing: .2em; transform: rotate(-3deg); }
.rp-stamp.accepted { color: var(--red); }
.rp-stamp.rejected { color: var(--muted); }
.rp-stamp.pending { color: var(--gold); }
.rp-meta { margin: 4px 0 16px 44px; font-size: 12px; color: var(--muted); }
.rp-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.rp-figure { margin: 0; padding: 10px; border-radius: 4px; background: var(--canvas); }
.rp-figure img { width: 100%; max-height: 460px; object-fit: contain; }
.rp-figure figcaption { margin-top: 8px; font-size: 11px; color: var(--on-ink-muted); text-align: center; }
.rp-group h3 { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 6px; padding-left: 8px; border-left: 3px solid var(--red); font: 600 14px/1.4 var(--ui); }
.rp-group h3 em { font-weight: 400; font-style: normal; font-size: 11px; color: var(--faint); }
.rp-facts h3:first-child { margin-top: 0; }
.rp-facts p { font-size: 13px; line-height: 1.7; }
.rp-facts a, .rp-quote a { color: var(--red); text-decoration: none; }
.rp-link { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 8px; align-items: center; margin-bottom: 4px; font-size: 12px; }
.rp-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rp-bar b { display: block; height: 100%; background: var(--green); }
.rp-link em { font-style: normal; text-align: right; color: var(--muted); }
.rp-counts { color: var(--muted); font-size: 12px !important; }
.rp-expert { padding: 8px 10px; border-radius: 4px; background: var(--gold-soft); }
.rp-text { font: 17px/2.1 var(--book); letter-spacing: 2px; word-break: break-all; text-align: justify; }
.rc.unread { color: var(--gold); }
.rc.inferred { color: var(--red); opacity: .75; }
.rc.variant { text-decoration: underline wavy var(--gold); text-underline-offset: 5px; }
.rp-quote { margin-bottom: 12px; padding: 10px 14px; border-radius: 4px; background: var(--raised); }
.rp-quote blockquote { margin: 0 0 4px; font: 16px/1.8 var(--book); color: var(--text); }
.rp-quote p { font-size: 13px; line-height: 1.75; }
.rp-quote small { display: block; margin-top: 4px; font-size: 11px; color: var(--faint); }
.rp-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.rp-wall figure { margin: 0; }
.rp-wall img { width: 100%; height: 96px; object-fit: contain; padding: 4px; border-radius: 3px; background: var(--canvas); }
.rp-wall figcaption { margin-top: 3px; font-size: 11px; text-align: center; }
.rp-wall small { display: block; color: var(--muted); }
.rp-foot { margin-top: 36px; padding-top: 14px; border-top: 3px double var(--line-strong); font-size: 11px; line-height: 1.8; color: var(--muted); }
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body { background: #fff; }
  #app { display: block; }
  .topbar, .rail, .rp-tools, .banner, .toast { display: none !important; }
  .report { padding: 0; background: #fff; }
  .rp-sheet { max-width: none; padding: 0; border: 0; box-shadow: none; }
  .rp-group { break-before: page; border-top: 0; margin-top: 0; }
  .rp-body, .rp-quote, .rp-figure { break-inside: avoid; }
  .rp-figure { background: #fff; border: 1px solid var(--line); }
  .rp-figure figcaption { color: var(--muted); }
  a { color: inherit !important; }
}

.lane-panel { padding: 14px 18px 16px; }
.lane-summary { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.lane-summary b { color: var(--text); font-size: 15px; }
.lane-wrap { display: grid; grid-template-columns: 76px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lane-labels { background: #f3ede3; border-right: 1px solid var(--line); }
.lane-labels div { display: flex; align-items: center; gap: 7px; padding: 0 8px; font-size: 12px; color: var(--text); }
.lane-labels .agent-seal { width: 20px; height: 20px; font-size: 11px; }
.lane-scroll { overflow-x: auto; }
.lane-svg { display: block; }
.lane-node { cursor: pointer; }
.lane-node:hover circle, .lane-node:hover rect:not([fill=transparent]), .lane-node:hover path { filter: brightness(1.15) drop-shadow(0 0 2px rgba(0,0,0,.25)); }
.lane-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.lane-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; font-style: normal; }
.lg.pill { width: 18px; height: 9px; border-radius: 5px; background: #5b6f8a; }
.lg.dot { width: 8px; height: 8px; border-radius: 50%; background: #3c7d5e; }
.lg.sq { width: 9px; height: 9px; border-radius: 2px; background: #b07a22; }
.lg.dia { width: 9px; height: 9px; background: #b07a22; transform: rotate(45deg); }
.lg.ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #b07a22; }
.lane-hint { margin: 12px 0 0; font-size: 12px; color: var(--faint); }
.lane-detail { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px; background: #fffdf9; font-size: 13px; animation: rise .15s ease both; }
.lane-detail header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lane-detail header .agent-seal { width: 22px; height: 22px; font-size: 12px; }
.lane-detail header small { color: var(--faint); }
.lane-detail header .btn { margin-left: auto; }
.lane-detail p { margin: 4px 0; }
.lane-meta { color: var(--gold); }
.lane-msgs { margin: 4px 0; padding-left: 18px; columns: 2; column-gap: 28px; }
.lane-msgs li { break-inside: avoid; margin: 2px 0; }
.lane-msgs .more { color: var(--faint); list-style: none; }
.lane-pair { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lane-pair img { width: 44px; height: 44px; object-fit: contain; background: #f3ede3; border-radius: 3px; }
.lane-pair span { display: grid; gap: 2px; }
.lane-pair small { color: var(--muted); }
.lane-pair .btn { margin-left: auto; }
.log-fold { padding: 10px 18px; }
.log-fold summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }

.rv-score.wait b { color: var(--gold); }
.rv-warn { margin-right: 6px; font-style: normal; font-size: 24px; vertical-align: 8px; color: var(--gold); }
.review-page ~ .toast { left: 12px; bottom: 76px; max-width: 236px; flex-wrap: wrap; gap: 6px 12px; transform: none; animation: rise .18s ease-out; }

.ev-concl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 4px; }
.ev-concl span { display: grid; gap: 2px; padding: 6px 8px; border-radius: 3px; border: 1px solid var(--line); background: var(--raised); font-size: 13px; font-weight: 600; color: var(--muted); }
.ev-concl small { font-size: 11px; font-weight: 400; color: var(--faint); }
.ev-concl .ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.ev-concl .mid { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.ev-concl .bad { color: var(--red); border-color: #e2b4ad; background: var(--red-soft); }
.ev-more { margin-top: 8px; }
.ev-more summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 4px 0; }
.ev-more summary:hover { color: var(--text); }

.rq-row { grid-template-columns: 18px 38px 38px minmax(0, 1fr); }
.rq-text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; word-break: break-all; line-height: 1.35; }
.rq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; }
.rq-score { font-family: var(--mono); color: var(--gold); }
.rq-score.warn { color: var(--red); }
.rq-text .badge { margin-left: 0; }
.rq-filter { position: sticky; top: -10px; z-index: 1; display: flex; gap: 4px; margin: -10px -10px 8px; padding: 8px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.rq-filter button { flex: 1; padding: 4px 0; border: 1px solid var(--line); border-radius: 3px; background: var(--card); font-size: 12px; color: var(--muted); }
.rq-filter button small { margin-left: 3px; font-family: var(--mono); color: var(--faint); }
.rq-filter button.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }

.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(29, 27, 25, .45); animation: rise .15s ease-out; }
.sheet { width: min(640px, calc(100vw - 48px)); max-height: calc(100vh - 96px); display: flex; flex-direction: column; background: var(--card); border-radius: 6px; box-shadow: var(--shadow-lift); }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.sheet h3 { margin: 0; font: 600 20px/1.3 var(--book); }
.submit-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 0 20px 12px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.submit-sum span { padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.submit-sum .ok { background: var(--green-soft); color: var(--green); }
.submit-sum .bad { background: var(--red-soft); color: var(--red); }
.submit-sum .na { background: var(--raised); color: var(--muted); }
.submit-list { overflow: auto; padding: 8px 20px; }
.submit-row { display: grid; grid-template-columns: 40px 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.submit-row img { width: 40px; height: 40px; padding: 2px; object-fit: contain; background: var(--canvas); border-radius: 3px; }
.submit-name { display: grid; text-align: left; font-size: 13px; color: var(--text); word-break: break-all; }
.submit-name:hover { color: var(--red); }
.submit-name small { color: var(--faint); font-size: 11px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.seg button { padding: 4px 9px; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on.ok { background: var(--green); color: #fff; }
.seg button.on.bad { background: var(--red); color: #fff; }
.seg button.on.na { background: var(--muted); color: #fff; }
.seg .drop { color: var(--faint); }
.seg .drop:hover { color: var(--red); }
.sheet footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }

.skel { display: grid; gap: 9px; padding: 10px 0; }
.skel i, .skel-block { display: block; height: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--raised) 0%, #efe7db 40%, var(--raised) 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel-block { height: auto; min-height: 120px; border-radius: 4px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.rv-mini { margin-left: 6px; padding: 1px 8px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 3px; font-size: 11px; color: var(--on-ink-muted); white-space: nowrap; }
.rv-mini:hover:not([disabled]) { color: #fff; border-color: rgba(255, 255, 255, .6); }
.rv-mini.on { border-color: #ff8a73; color: #ffb4a8; }
.rv-mini[disabled] { opacity: .4; }
.rv-stage.manual { grid-template-rows: minmax(0, 1fr); }
.mn-cell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.mn-svg { width: 100%; height: 100%; min-height: 0; touch-action: none; background: radial-gradient(ellipse at 50% 40%, #2a241f 0, var(--canvas) 70%); }
.mn-svg .mn-b { cursor: grab; }
.mn-svg.dragging .mn-b { cursor: grabbing; }
.mn-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: var(--ink-2); color: var(--on-ink-muted); font-size: 12px; }
.mn-tools .spacer { flex: 1; }
.mn-tools .btn kbd { margin-left: 4px; }
.mn-rot { display: flex; align-items: center; gap: 6px; }
.mn-rot input { width: 160px; accent-color: var(--red); }
.mn-info { font-family: var(--mono); color: var(--on-ink); }
.mn-note { margin: 0; padding: 6px 10px 8px; background: var(--ink-2); color: var(--on-ink-muted); font-size: 12px; border-top: 1px solid var(--ink-3); }
.mn-note.still { color: #f0c27a; }
.keys-help { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-size: inherit; }
.keys-help:hover { color: var(--red); }
.help-sheet { width: min(760px, calc(100vw - 48px)); }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; overflow: auto; padding: 4px 20px 18px; }
.help-grid h4 { margin: 12px 0 6px; font-size: 13px; color: var(--red); letter-spacing: .06em; }
.help-grid dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; margin: 0; font-size: 13px; }
.help-grid dt { display: flex; gap: 4px; white-space: nowrap; }
.help-grid dd { margin: 0; color: var(--muted); }
