.scan-history { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #141d28; }
.history-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.history-heading h2 { font-size: 16px; }.history-heading label { display: flex; align-items: center; gap: 6px; }
#scan-count { margin-left: 8px; color: var(--green); font-variant-numeric: tabular-nums; }
.history-help, #history-status, #history-empty, #scan-detail-status { color: var(--muted); font-size: 12px; margin-top: 12px; }
.scan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 0; margin: 16px 0 0; list-style: none; }
.scan-entry { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; white-space: normal; font-weight: 400; }
.scan-entry img { width: 56px; height: 78px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.scan-entry-copy { display: grid; gap: 4px; min-width: 0; }.scan-entry-copy strong { overflow-wrap: anywhere; }
.scan-entry-copy > span { color: var(--muted); font-size: 11px; }
.scan-detail { width: min(840px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 22px; color: inherit; border: 1px solid var(--line); border-radius: 12px; background: #141d28; }
.scan-detail::backdrop { background: #000b; }.scan-detail h2 { overflow-wrap: anywhere; }.scan-detail h3 { font-size: 14px; margin: 0; }
.scan-detail-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; margin-top: 20px; }
.scan-detail figure { margin: 0; }.scan-detail figure img { display: block; width: 100%; height: auto; max-height: 430px; object-fit: contain; }
.scan-detail figcaption { color: var(--muted); font-size: 11px; text-align: center; margin-top: 8px; }
.scan-candidates { margin-top: 12px; display: grid; gap: 8px; }
.scan-candidate { display: grid; grid-template-columns: 18px 56px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.scan-candidate:has(input:checked) { background: #1c302b; border-color: #68a788; }
.scan-candidate input { margin: 0; }.scan-candidate label { display: grid; gap: 6px; cursor: pointer; min-width: 0; }
.scan-candidate strong { font-size: 12px; overflow-wrap: anywhere; }.scan-candidate label span { color: var(--green); font-size: 11px; }
.scan-detail-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
@media(max-width:600px) { .scan-history { padding: 14px; }.scan-list { grid-template-columns: 1fr; }.scan-detail { padding: 16px; }.scan-detail-body { grid-template-columns: 1fr; gap: 20px; }.scan-detail figure img { max-height: 280px; } }
