/* Every notebook view is ink on the same physical spread. */
.book-shade{position:fixed;inset:0;z-index:20;background:#10151bf0;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow:hidden}
.investigation-book{width:min(960px,calc(100vw - 16px),calc((100svh - 16px)*4/3));height:auto;aspect-ratio:4/3;flex:none}
.book-left,.book-right{top:22%;height:52%;font-size:clamp(14px,1.35vw,17px);line-height:1.8;color:#3e3b32;overscroll-behavior:contain;overflow-x:hidden;overflow-wrap:anywhere;touch-action:pan-y pinch-zoom}
.book-left h2,.book-right h2{font-size:clamp(16px,1.7vw,20px);line-height:1.5;font-weight:400;margin:0 0 14px;color:#37392f}
.book-tools{position:absolute;left:10%;right:12%;top:10%;min-height:44px;height:auto;justify-content:flex-start;gap:6px 15px;flex-wrap:nowrap}
.book-tabs{display:flex;align-items:center;gap:4px 15px;min-width:0}
.book-tools button{font-size:clamp(14px,1.3vw,16px);color:#5b5747;min-width:44px;min-height:44px;padding:6px 0;white-space:nowrap;touch-action:manipulation}
.book-tools button:hover,.book-page-actions button:hover{color:#704529}
.book-tools [aria-current=page]{color:#334b5b;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
.book-tools .book-close{margin-left:auto}
.book-page-actions{position:absolute;bottom:14%;left:10%;right:12%;min-height:44px;display:flex;justify-content:flex-end;align-items:center;gap:12px}
.book-page-actions button,.book-page-actions .action{background:none;border:0;box-shadow:none;font-size:clamp(14px,1.3vw,16px);color:#414739;min-width:44px;min-height:44px;padding:7px 0;line-height:1.5;text-align:right;text-decoration:underline;text-underline-offset:4px;touch-action:manipulation}
.book-page-actions button:disabled{opacity:.45}
.book-empty,.book-result,.book-appointment{font-size:inherit;line-height:1.8;white-space:pre-line;margin:10px 0 20px;color:inherit}
.book-note p{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere}.book-note h3{font-size:inherit;line-height:1.6}
.book-result{color:#674a31}.book-appointment{padding:0;transform:rotate(-.3deg)}
.book-claims,.book-support{display:flex;flex-direction:column;gap:10px}.book-support{gap:5px}
.book-claim{position:relative;font:inherit;line-height:1.8;text-align:left;min-height:44px;padding:7px 0 7px 22px;color:#474438;overflow-wrap:anywhere}
.book-claim:before{content:'○';position:absolute;left:0;top:7px;color:#716b58}
.book-claim.marked:before{content:'✓';color:#314c60}.book-claim.marked{color:#314c60;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#617385}
.book-claim:hover,.book-support-entry:hover{color:#704529}
.book-claim:disabled,.book-support-entry:disabled{opacity:1;cursor:default}
.book-support-entry{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:10px;min-height:54px;padding:2px 0;font:inherit;font-size:clamp(14px,1.2vw,16px);text-align:left;color:#494537}
.book-support-entry .clue-photo{width:48px;height:48px;object-fit:contain;transform:rotate(-2deg)}
.book-support-entry.marked span{color:#314c60;text-decoration:underline;text-underline-offset:4px}.book-support-entry.marked span:before{content:'✓ ';color:#314c60}
.book-timeline{height:auto;min-height:190px;display:flex;flex-direction:column;gap:3px;margin:0}
.book-timeline:before{left:6px;right:auto;top:20px;bottom:22px;height:auto;width:1px;background:#978f75}
.book-timeline .timeline-pin{position:relative;top:auto;transform:none;min-height:48px;min-width:0;width:100%;max-width:none;flex-direction:row;justify-content:flex-start;gap:6px;color:#494438}
.book-timeline .timeline-pin:before{font-size:10px;color:#76664b;min-width:12px}
.book-timeline .timeline-tick{font:14px monospace;margin:0 5px 0 0}.book-timeline .timeline-label{font-size:14px;line-height:1.6;text-align:left}
.book-timeline .timeline-pin.active{color:#874b31}
.book-event-bank{flex-direction:column;align-items:flex-start;gap:3px}
.book-event-bank .timeline-event{color:#474438;font:inherit;min-height:44px;padding:6px 0}.book-event-bank .timeline-event.marked{color:#874b31}.book-event-bank .timeline-event.placed{opacity:.55;text-decoration:line-through}
.investigation-book button:focus-visible{outline:1px dotted #6a634d;outline-offset:2px}
.book-stage-label{position:absolute;left:10%;width:78%;top:17%;margin:0;color:#726b58;font-size:14px;line-height:1.5}
.book-stage-turn{position:absolute;top:43%;width:44px;height:44px;padding:11px;border:0;background:none;color:#716952;cursor:pointer;touch-action:manipulation}
.book-stage-previous{left:0}.book-stage-next{right:0}
.book-stage-turn .thick-back-arrow,.book-leaf-turn .thick-back-arrow{width:22px;height:22px;display:block}
.book-stage-next .thick-back-arrow,.book-leaf-right .thick-back-arrow{transform:rotate(180deg)}
.book-stage-turn:hover,.book-leaf-turn:hover{color:#704529}.book-stage-turn:active .thick-back-arrow,.book-leaf-turn:active .thick-back-arrow{opacity:.6}
.book-leaf-tools{display:none}.book-leaf-tools[hidden],.legacy-book .book-left[hidden],.legacy-book .book-right[hidden]{display:none}

/* The early notebook has its own chrome; campaign spreads retain their layout. */
.legacy-book .book-tools{top:9%;height:44px;gap:0;padding-right:62px}
.legacy-book .book-tabs{width:100%;height:44px;gap:10px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#8e8466 transparent;touch-action:pan-x}
.legacy-book .book-tabs button{flex:0 0 auto}
.legacy-book .book-close{position:absolute;right:0;top:0;min-width:54px;margin:0;text-align:right}
.legacy-book .book-stage-label{top:calc(9% + 48px)}
.legacy-book .book-left,.legacy-book .book-right{top:calc(9% + 80px);bottom:calc(14% + 56px);height:auto}
.legacy-book .book-evidence{gap:18px 12px}
.legacy-book .book-entry{font-size:14px;line-height:1.65;min-height:44px}
.legacy-book .book-note p{font:inherit}
.legacy-book .book-page-actions{bottom:14%}

@media(max-width:640px) and (orientation:portrait){
  /* Crop one leaf from the existing spread at its original image proportions. */
  .investigation-book.legacy-book{width:100%;height:calc(100svh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));aspect-ratio:auto;background-size:auto 100%;background-repeat:no-repeat;background-position:10% 50%}
  .investigation-book.legacy-book[data-leaf=right]{background-position:90% 50%}
  .legacy-book .book-tools{left:12%;right:12%;top:9%}
  .legacy-book .book-tools button{font-size:14px;min-width:44px;min-height:44px}
  .legacy-book .book-tabs{gap:8px}
  .legacy-book .book-stage-label{left:12%;width:76%;top:calc(9% + 48px);font-size:14px}
  .legacy-book .book-left,.legacy-book .book-right{left:12%;width:76%;top:calc(9% + 80px);bottom:calc(14% + 100px);height:auto;font-size:16px;line-height:1.8;padding-right:4px}
  .legacy-book :is(.book-left,.book-right) h2{font-size:18px;line-height:1.5;margin-bottom:16px}
  .legacy-book .book-evidence{grid-template-columns:1fr;gap:12px}
  .legacy-book .book-entry{display:grid;grid-template-columns:68px minmax(0,1fr);align-items:center;gap:12px;min-height:88px;padding:4px 0;font-size:16px;line-height:1.6;text-align:left;transform:none}
  .legacy-book .book-entry .clue-photo{width:68px;height:80px;max-height:80px;max-width:68px;object-fit:contain;margin:0;transform:rotate(-2deg)}
  .legacy-book .book-note .clue-photo{width:100%;max-height:none;object-fit:contain}
  .legacy-book .book-note h3,.legacy-book .book-note p{font:inherit;line-height:1.8}
  .legacy-book .book-claim{min-height:52px;padding:8px 0 8px 22px;font-size:16px}
  .legacy-book .book-support-entry{grid-template-columns:48px minmax(0,1fr);min-height:56px;gap:10px;font-size:16px}
  .legacy-book .book-page-actions{left:12%;right:12%;bottom:calc(14% + 48px);min-height:44px;gap:16px;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
  .legacy-book .book-page-actions button,.legacy-book .book-page-actions .action{flex:0 0 auto;font-size:14px;min-width:44px;min-height:44px;white-space:nowrap;text-align:left}
  .legacy-book .book-leaf-tools{position:absolute;left:24%;right:24%;bottom:14%;min-height:44px;display:flex;justify-content:center;align-items:center;gap:10px;color:#514a3a}
  .legacy-book .book-leaf-tools[hidden]{display:none}
  .legacy-book .book-leaf-turn{width:44px;min-width:44px;height:44px;min-height:44px;padding:11px;background:none;border:0;box-shadow:none;color:inherit;touch-action:manipulation}
  .legacy-book .book-leaf-turn:disabled{opacity:.35;cursor:default}
  .legacy-book .book-leaf-label{font-size:14px;min-width:38px;text-align:center;white-space:nowrap}
  .legacy-book .book-stage-turn{top:auto;bottom:14%}
  .legacy-book .book-stage-previous{left:2%}.legacy-book .book-stage-next{right:2%}
}
