.evidence-shelf {border-top:1px solid #d8c8b1;margin:25px 0 12px;padding:0 4px;color:#42352e;background:#f8f3e9}
.evidence-shelf > summary {padding:12px 3px;display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;font-weight:600;list-style:none}
.evidence-shelf > summary::before {content:"＋";color:#a14250;font-weight:400}
.evidence-shelf[open] > summary::before {content:"－"}
.evidence-shelf > summary small {margin-left:auto;color:#735f50;font-weight:400}
.evidence-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,215px),1fr));gap:13px;margin:2px 0 18px}
.evidence-grid article {display:flex;flex-direction:column;gap:3px;padding:8px 9px;background:#fffaf0;border:1px solid #d6c7b4;box-shadow:1px 2px 2px #5c413013}
.evidence-grid .evidence-open {display:block;text-align:left;width:100%;min-height:44px;cursor:zoom-in;font:600 14px/1.5 var(--body);color:#48382e}
.evidence-open img {display:block;width:100%;height:124px;object-fit:contain;background:#efe9df;margin-bottom:6px;filter:none}
.evidence-grid small {color:#756352;font:12px/1.5 var(--body)}
.evidence-grid .ev-index-alias{display:block;font-size:11px;overflow-wrap:anywhere}
.evidence-grid .evidence-read,.archive-figure-zoom {width:fit-content;min-height:44px;min-width:44px;color:#914453;text-decoration:underline;text-underline-offset:3px;font:600 13px/1.5 var(--body)}
.evidence-grid .evidence-read {margin-top:auto}
.ac-compare .archive-figure-zoom+.archive-figure-zoom{margin-left:16px}
#archive-viewer {margin:0;inset:0;width:100%;height:100%;max-width:none;max-height:none;padding:0;border:0;color:#f9f2e6;background:#332f2b}
#archive-viewer[open] {display:flex;flex-direction:column}
#archive-viewer::backdrop {background:#332f2b}
.ev-bar {min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:4px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left));background:#faf4e9;color:#42352e;z-index:1}
.ev-group {display:flex;align-items:center;gap:5px}
.ev-bar button {font-size:15px;min-width:44px;min-height:44px;font-weight:600}
.ev-bar :focus-visible {outline:2px solid #9d3e52;outline-offset:0}
.ev-sheet {flex:1;min-height:0;overflow:hidden;position:relative;display:grid;place-items:center;touch-action:none;cursor:grab}
.ev-sheet:active {cursor:grabbing}
.ev-sheet img {width:auto;height:auto;max-width:calc(100% - 18px);max-height:calc(100% - 18px);position:absolute;user-select:none;
  -webkit-user-drag:none;transform-origin:center;filter:none;will-change:transform;pointer-events:none}
.ev-caption {min-height:40px;margin:0;display:flex;align-items:center;justify-content:center;gap:10px;padding:4px 12px max(7px,env(safe-area-inset-bottom));text-align:center;color:#f4eadb;font-size:14px}
.ev-caption small{color:#cebdab;font-size:11px;white-space:nowrap}
.ev-reading {flex:1;min-height:0;overflow:auto;background:#f8f3e9;color:#3e3129;padding:clamp(15px,3.2vw,45px)}
.ev-reading h2 {font:400 clamp(22px,3vw,38px) var(--display);margin-bottom:10px}
.ev-reading .ev-source {font-size:13px;margin:6px 0 12px;color:#705f50}
.ev-table-scroll {overflow:auto;max-height:70dvh;border:1px solid #d5c7b6;overscroll-behavior:contain}
.ev-table-frame{position:relative}
.ev-table-edge{position:absolute;inset:1px 1px 1px auto;width:clamp(22px,4vw,62px);background:linear-gradient(to right,transparent,#f4e9d5e8);pointer-events:none;opacity:0;transition:opacity .25s ease}
.ev-table-frame.has-hint .ev-table-edge{opacity:1}
.ev-table-hint{margin:3px 1px 5px;color:#795b45;font:12px/1.6 var(--body);text-align:right;transition:opacity .25s ease}
.ev-table-hint.is-dismissed{opacity:0}
@media(prefers-reduced-motion:reduce){.ev-table-hint,.ev-table-edge{transition:none}}
:root.is-still :is(.ev-table-hint,.ev-table-edge){transition:none}
.ev-table-scroll table {border-collapse:separate;border-spacing:0;background:#fffaf0;width:max-content;min-width:100%;font-size:14px}
.ev-table-scroll td,.ev-table-scroll th {vertical-align:top;text-align:left;border-bottom:1px solid #e6ddd3;border-right:1px solid #e6ddd3;padding:7px 10px;white-space:pre-wrap;min-width:50px;max-width:380px}
.ev-table-scroll th {position:sticky;top:0;background:#eee4d6;color:#514437;font-weight:650}
.ev-status {display:inline-block;border-radius:12px;padding:1px 7px;background:#e1e8d1;color:#41563f}
.ev-map {max-width:960px}.ev-map ul {margin:5px 0 6px 12px;border-left:1px solid #967f69;padding-left:18px;list-style:none}
.ev-map li {position:relative;margin-block:6px}
.ev-map li::before {content:"";position:absolute;top:16px;left:-18px;width:12px;border-top:1px solid #967f69}
.ev-map summary,.ev-map .ev-leaf{width:fit-content;max-width:100%;border:1px solid #d8c6af;border-radius:5px;background:#fff9ed;padding:6px 12px}
.ev-map summary {cursor:pointer;min-height:44px}
.ev-map .ev-leaf {display:block;min-height:32px}
.ev-folios {display:flex;flex-wrap:wrap;gap:5px 16px}
.ev-folios .evidence-read {display:inline-flex;align-items:baseline;gap:6px;padding:9px 0;min-height:44px;color:#84434b;font-size:14px}
.ev-folios .evidence-read small{color:#766452;font-size:10px;white-space:nowrap}
.ev-original-text {max-width:42em;line-height:1.85;margin-top:1em}
.ev-source-grid table {min-width:0;width:max-content;table-layout:fixed}
.ev-source-grid th,.ev-source-grid td {padding:0;border:0;min-width:0;max-width:none;background:#faf6f0}
.ev-source-grid svg {display:block;max-width:none}
@media(max-width:550px){
 .evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.evidence-open img{height:93px}
 .ev-bar{gap:2px}.ev-bar button{font-size:13px}.ev-group{gap:1px}
 .ev-caption{font-size:12px}.ev-table-scroll td,.ev-table-scroll th{font-size:13px}
}
