:root {
  color-scheme: light;
  --bg: #eef2f3;
  --surface: #ffffff;
  --surface-2: #f6f8f9;
  --line: #dce4e7;
  --ink: #16242a;
  --muted: #5c727b;
  --soft: #8096a0;
  --case: #176b5d;
  --signal: #2b6cb0;
  --task: #b7791f;
  --review: #b4413c;
  --ingest: #59627a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; border-radius: 8px; background: #176b5d; color: #fff; min-height: 36px; padding: 0 14px; font-weight: 800; cursor: pointer; }
button:hover { background: #0f574b; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
button.ghost:hover { background: var(--surface-2); }
button.danger { color: #b4413c; }
button.text-button { min-height: 28px; padding: 0 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); font-size: 12px; }
button.text-button:hover { background: #edf4f2; color: var(--ink); }

.app-header { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 11px; font-weight: 900; color: var(--case); text-transform: uppercase; letter-spacing: .08em; }
h1 { font-size: 22px; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.metric-pill { border: 1px solid var(--line); background: var(--surface-2); padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--muted); }
.dev-menu { position: relative; }
.dev-menu summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; min-height: 36px; padding: 8px 12px; color: var(--muted); font-size: 12px; font-weight: 850; background: var(--surface); }
.dev-menu summary::-webkit-details-marker { display: none; }
.dev-menu[open] > div { position: absolute; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; min-width: 150px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 36px rgba(16,40,47,.14); z-index: 5; }

.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px minmax(360px, .95fr) minmax(460px, 1.25fr); }
.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.nav { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; min-height: 58px; text-align: left; background: transparent; color: var(--muted); padding: 8px 10px; }
.nav:hover { background: var(--surface-2); }
.nav.active { background: #eef4f2; color: var(--ink); box-shadow: inset 4px 0 0 var(--case); }
.nav[data-view="queue"].active { background: #fff1f0; box-shadow: inset 4px 0 0 var(--review); }
.nav-code { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 900; background: #fff; }
.nav-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-text b { font-size: 14px; }
.nav-text small { font-size: 11px; color: var(--soft); }
.nav-count { min-width: 28px; text-align: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 900; }
.nav-count.alert { background: #fdeceb; border-color: #f2b9b3; color: var(--review); }
.nav-count.alert[data-zero="1"] { background: #fff; border-color: var(--line); color: var(--soft); }

.list-col { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface-2); }
.list-head { padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.list-context { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.list-context h2 { font-size: 17px; line-height: 1.2; }
.list-context p { margin-top: 2px; color: var(--soft); font-size: 12px; font-weight: 750; }
.list-tools { flex: 0 0 auto; display: flex; align-items: end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.list-tools > span { color: var(--muted); font-size: 12px; font-weight: 900; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; background: var(--surface-2); }
.list-tools label { display: grid; gap: 3px; color: var(--soft); font-size: 10px; font-weight: 900; }
.list-tools select { min-height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); padding: 4px 8px; font-size: 12px; font-weight: 800; }
#search { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: var(--surface-2); }
.list-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.funnel { display: grid; grid-template-columns: 1fr 20px 1fr 20px 1fr; align-items: center; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 4px; }
.funnel div { display: grid; gap: 2px; text-align: center; }
.funnel b { font-size: 22px; line-height: 1; }
.funnel span { color: var(--soft); font-size: 11px; font-weight: 850; }
.funnel i { height: 1px; background: var(--line); position: relative; }
.funnel i::after { content: ""; position: absolute; right: -1px; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: rotate(45deg); background: var(--surface); }
.funnel .hot b { color: var(--review); }

.card { display: block; min-height: 88px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #c8d3d7; border-radius: 8px; overflow: hidden; cursor: pointer; }
.case-card { border-left-color: var(--case); }
.work-card.needs-review { border-left-color: var(--review); }
.work-card.subtle { opacity: .72; }
.asset-card { border-left-color: #7c8b93; }
.task-card { border-left-color: #c8d3d7; }
.card:hover { border-color: #b7cbd2; box-shadow: 0 8px 24px rgba(16,40,47,.06); }
.card.selected { border-color: #111; box-shadow: 0 0 0 1px #111 inset; }
.card-main { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-top { display: flex; align-items: flex-start; gap: 8px; }
.card-title { flex: 1; font-weight: 850; line-height: 1.35; font-size: 14px; overflow-wrap: anywhere; }
.card-row, .card-stats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--soft); font-size: 12px; font-weight: 700; }
.evidence-mini { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.evidence-mini span { color: var(--soft); font-size: 11px; font-weight: 900; }
.evidence-mini b { font-weight: 800; }
meter { width: 100%; height: 7px; }

.badge, .chip { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; font-size: 11px; font-weight: 850; line-height: 1.35; padding: 3px 8px; border: 1px solid transparent; }
.chip { border-radius: 6px; color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.b-green { background: #e4f4ec; color: #1c7a4f; border-color: #b8e0c9; }
.b-blue { background: #e6f0fb; color: #2364b8; border-color: #bcd5f1; }
.b-amber { background: #fdf0dc; color: #9a6512; border-color: #f0d6a6; }
.b-red { background: #fdeceb; color: #b4413c; border-color: #f2b9b3; }
.b-purple { background: #efeafa; color: #6a4bb0; border-color: #d6c9f0; }
.b-teal { background: #e1f3f3; color: #1f7a8c; border-color: #b4dee2; }
.b-gray { background: #eef1f2; color: #5a7079; border-color: #d8e0e3; }

.detail-col { min-height: 0; overflow-y: auto; background: var(--surface); }
.detail-empty { height: 100%; display: grid; place-content: center; gap: 10px; text-align: center; color: var(--soft); padding: 28px; }
.empty-title { font-size: 22px; font-weight: 900; color: var(--muted); }
.detail { padding: 22px clamp(18px, 3vw, 34px) 48px; }
.detail-back { background: #fff; color: var(--muted); border: 1px solid var(--line); min-height: 30px; padding: 0 10px; font-size: 12px; margin-bottom: 14px; }
.detail-kind { display: inline-flex; padding: 5px 9px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 950; letter-spacing: .08em; }
.detail-kind.case { background: var(--case); }
.detail-kind.work, .detail-kind.signal { background: var(--review); }
.detail-kind.task { background: var(--task); }
.detail-kind.asset { background: #657782; }
.detail h2 { margin: 10px 0 12px; font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.facts.compact { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 10px 0 0; }
.fact { background: #fff; padding: 10px 12px; }
.fact dt { font-size: 11px; font-weight: 850; color: var(--soft); margin-bottom: 3px; }
.fact dd { margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

.rel-block, .action-panel { margin: 0 0 22px; }
.rel-block h3, .action-panel h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.rel-block h3 span { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: var(--surface-2); }
.body-text { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.65; color: var(--muted); }
.linkline, .task-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 7px; cursor: pointer; background: #fff; }
.linkline:hover, .task-row:hover { background: var(--surface-2); }
.linkline div { min-width: 0; }
.linkline strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.linkline small { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.task-row span:first-child { flex: 1; font-weight: 750; overflow-wrap: anywhere; }

.inline-stack { display: grid; gap: 10px; }
.inline-panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px; display: grid; gap: 10px; }
.signal-inline { border-left: 4px solid #c8d3d7; }
.task-inline { border-left: 4px solid #d6dee1; }
.task-inline.compact { background: var(--surface-2); padding: 10px; }
.inline-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.inline-type { color: var(--soft); font-size: 10px; font-weight: 950; letter-spacing: .08em; margin-bottom: 3px; }
.inline-head h4 { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.inline-badges { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.inline-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.inline-facts div { background: var(--surface-2); padding: 8px 10px; }
.inline-facts dt { font-size: 10px; color: var(--soft); font-weight: 900; margin-bottom: 3px; }
.inline-facts dd { margin: 0; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.inline-body summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 900; margin-bottom: 8px; }
.inline-child { display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.inline-child > p { color: var(--soft); font-size: 12px; font-weight: 900; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0 0 14px; }
.summary-grid div { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 9px 10px; }
.summary-grid b { display: block; font-size: 18px; line-height: 1.1; }
.summary-grid span { display: block; color: var(--soft); font-size: 11px; font-weight: 850; margin-top: 3px; }
.summary-grid .summary-wide { grid-column: span 2; }
.debug-details { margin: -8px 0 18px; }
.inline-panel .debug-details { margin: 0; }
.debug-details summary { cursor: pointer; color: var(--soft); font-size: 12px; font-weight: 900; }
.task-form-wrap { display: grid; gap: 8px; margin-top: 12px; }

.action-panel { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 12px; }
.action-panel summary, .audit-block summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 900; }
.operation-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin: 0 0 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.operation-bar button { min-height: 32px; background: #fff; color: var(--muted); border: 1px solid var(--line); font-size: 12px; }
.operation-bar button:not(:disabled):hover { background: #edf4f2; color: var(--ink); }
.pending-actions, .pending-note { display: inline-flex; align-items: center; min-height: 32px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); color: var(--soft); font-size: 12px; font-weight: 850; padding: 7px 10px; }
.pending-actions { width: 100%; margin: 0 0 18px; }
.decision-panel { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 12px; margin-bottom: 18px; }
.decision-panel h3 { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.decision-choices { display: grid; gap: 10px; }
.decision-choices.is-disabled { opacity: .72; }
.recommendation { display: grid; gap: 6px; border: 1px solid #c9ded8; background: #eef4f2; border-radius: 8px; padding: 12px; }
.recommendation span { color: var(--soft); font-size: 11px; font-weight: 950; }
.recommendation b { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.recommendation small { color: var(--muted); font-size: 12px; font-weight: 750; }
.recommendation button { width: fit-content; background: var(--case); color: #fff; }
.candidate-alt summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 900; padding: 4px 0; }
.evidence-large { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.evidence-large div { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px; }
.evidence-large span { display: block; color: var(--soft); font-size: 11px; font-weight: 900; margin-bottom: 4px; }
.evidence-large b { font-size: 13px; overflow-wrap: anywhere; }
.candidate-list { display: grid; gap: 8px; margin: 0 0 10px; }
.candidate-row { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.candidate-main { display: grid; grid-template-columns: 48px 1fr minmax(80px, 120px) auto; align-items: center; gap: 10px; }
.candidate-main span { color: var(--soft); font-size: 11px; font-weight: 950; }
.candidate-main strong { font-size: 13px; overflow-wrap: anywhere; }
.candidate-main b { color: var(--muted); font-size: 12px; }
.candidate-reasons { display: flex; flex-wrap: wrap; gap: 6px; padding-left: calc(48px + 10px); }
.candidate-actions { --candidate-label-track: 48px; --candidate-grid-gap: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding-left: calc(var(--candidate-label-track) + var(--candidate-grid-gap)); }
.candidate-actions button { min-height: 30px; background: var(--case); color: #fff; font-size: 12px; }
.candidate-preview summary { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 850; }
.candidate-preview div { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 1.6; }
.candidate-preview p + p { margin-top: 7px; }
.timeline { display: grid; gap: 12px; border-left: 1px solid var(--line); padding-left: 18px; margin-left: 6px; }
.timeline::before { content: none; }
.timeline-item { display: block; position: relative; padding: 0 0 4px; min-width: 0; cursor: default; }
.timeline-item[data-type][data-id] { cursor: pointer; }
.timeline-item::before { content: ""; position: absolute; left: -24px; top: 7px; width: 9px; height: 9px; background: #fff; border: 2px solid var(--case); border-radius: 999px; z-index: 1; }
.timeline-item.input::before { border-color: var(--signal); }
.timeline-item.task::before { border-color: var(--task); }
.timeline-item time { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; margin-bottom: 5px; color: var(--soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 900; }
.timeline-item h4 { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.timeline-item p { color: var(--muted); font-size: 12px; font-weight: 750; margin: 3px 0 6px; }
.timeline-item details summary { cursor: pointer; color: var(--soft); font-size: 12px; font-weight: 900; }
.history-disclosure { margin-top: 8px; }
.history-disclosure > summary { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 850; white-space: nowrap; }
.nested-history { display: grid; gap: 10px; border-left: 1px solid var(--line); margin-top: 12px; margin-left: 6px; padding: 2px 0 0 16px; }
.nested-history::before { content: none; }
.nested-history-item { display: block; position: relative; padding: 0 0 2px; min-width: 0; }
.nested-history-item::before { content: ""; position: absolute; left: -22px; top: 7px; width: 9px; height: 9px; border: 2px solid var(--signal); border-radius: 999px; background: #fff; z-index: 1; }
.nested-history-item.task::before { border-color: var(--task); }
.nested-history-item time { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; margin-bottom: 5px; color: var(--soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; font-size: 10px; font-weight: 900; }
.nested-history-item h5 { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.nested-history-item p { color: var(--muted); font-size: 12px; font-weight: 750; margin: 3px 0 6px; }
.nested-history-item details summary { cursor: pointer; color: var(--soft); font-size: 12px; font-weight: 900; }
.task-group { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); margin-bottom: 8px; }
.task-group h4 { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.audit-block { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface-2); }
.audit-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.audit-summary span { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 850; color: var(--muted); }
.audit-block p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 6px 0 0; }
.audit-block time { color: var(--soft); font-weight: 900; margin-right: 6px; }
.chain { display: grid; gap: 7px; }
.muted-block { border: 1px dashed var(--line); border-radius: 8px; padding: 12px; background: var(--surface-2); color: var(--muted); }
.review-panel { border: 1px solid #f2b9b3; background: #fff7f6; border-radius: 8px; padding: 12px; margin-bottom: 16px; display: grid; gap: 12px; }
.review-primary-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-primary-actions button { background: var(--review); }
.review-primary-actions button:hover { background: #963631; }
.review-task-form { display: grid; gap: 8px; }
.review-task-form h3 { margin: 0; color: var(--review); font-size: 14px; }
.review-task-form textarea { width: 100%; border: 1px solid #f2b9b3; border-radius: 8px; background: #fff; min-height: 76px; padding: 8px 10px; resize: vertical; }
.task-form { display: grid; gap: 8px; }
.task-form textarea, .task-form select, .form-card input, .form-card select, .form-card textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 38px; padding: 8px 10px; }
.task-form textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb { display: grid; gap: 6px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.thumb span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 8px 8px; overflow-wrap: anywhere; }

.form-wrap { padding: 16px; }
.form-card { display: grid; gap: 12px; max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.form-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 850; color: var(--muted); }
.empty { color: var(--soft); font-size: 13px; padding: 16px 4px; }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 800; transition: .2s ease; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.queue-guide { display: grid; gap: 6px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.queue-guide b { font-size: 13px; }
.queue-guide span { color: var(--muted); font-size: 12px; font-weight: 750; display: flex; flex-wrap: wrap; gap: 6px; }
.compact-actions { margin: 0 0 10px; }
.legacy-actions[hidden] { display: none; }
.queue-state { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); margin-bottom: 10px; }
.queue-state b { color: var(--case); font-size: 13px; }
.queue-state span { color: var(--muted); font-size: 12px; font-weight: 750; }
.queue-state.warning { border-color: #f0d6a6; background: #fff9ef; }
.queue-state.warning b { color: #9a6512; }
.case-picker-form, .asset-picker-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; margin-bottom: 10px; }
.case-picker-form label, .asset-picker-form label { display: grid; gap: 4px; color: var(--soft); font-size: 11px; font-weight: 900; }
.case-picker-form select, .asset-picker-form select, .asset-search-input { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 6px 8px; font-size: 12px; font-weight: 750; }
.candidate-actions.is-current button[data-action="link-work"] { display: none; }
.candidate-current { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid #b8e0c9; border-radius: 8px; background: #e4f4ec; color: #1c7a4f; padding: 0 10px; font-size: 12px; font-weight: 900; }
.primary-case-actions { margin: -4px 0 12px; }
.body-text.ai-summary { background: #eef4f2; color: var(--ink); border-color: #c9ded8; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 220px 1fr; }
  .detail-col { display: none; }
  body.detail-open .list-col { display: none; }
  body.detail-open .detail-col { display: block; }
}
@media (max-width: 720px) {
  body { overflow: auto; height: auto; min-height: 100vh; }
  .app-header { height: auto; align-items: flex-start; flex-direction: column; }
  .shell { display: block; }
  .rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { min-width: 138px; grid-template-columns: 28px 1fr; }
  .nav-count { display: none; }
  .detail-col { display: none; min-height: 70vh; }
  body.detail-open .list-col { display: none; }
  body.detail-open .detail-col { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .summary-grid .summary-wide { grid-column: span 1; }
  .candidate-main { grid-template-columns: 42px 1fr; }
  .candidate-main meter, .candidate-main b { grid-column: 2; }
  .candidate-reasons, .candidate-actions { padding-left: 0; }
  .case-picker-form, .asset-picker-form { grid-template-columns: 1fr; }
  .recommendation button { width: 100%; }
}
