.tb-reading-open{overflow:hidden!important}.tb-reader,.tb-reader *{box-sizing:border-box}.tb-reader{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#242724;color:#f4f0e8;font-family:system-ui,-apple-system,sans-serif;overscroll-behavior:contain}.tb-reader[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}.tb-reader::backdrop{background:#242724}.tb-reader [hidden]{display:none!important}.tb-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:calc(16px + env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 16px max(24px,env(safe-area-inset-left));border-bottom:1px solid #ffffff12;z-index:3;background:#242724}.tb-heading{min-width:0}.tb-eyebrow{text-transform:uppercase;font-size:10px;letter-spacing:.17em;color:#b4bcad}.tb-heading h1{font-family:Georgia,serif;font-size:20px;font-weight:400;line-height:1.3;margin:5px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:inherit}.tb-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.tb-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:44px;height:44px;border:1px solid #ffffff26;border-radius:11px;background:#ffffff05;color:inherit;text-decoration:none!important;padding:0 11px;font:inherit;font-size:13px;cursor:pointer}.tb-reader svg{width:21px;height:21px;flex-shrink:0}.tb-button:hover,.tb-button[aria-expanded=true],.tb-button[aria-pressed=true]{background:#ffffff13;border-color:#ffffff4d;color:#fff}.tb-reader :focus-visible{outline:2px solid #c7d5b6;outline-offset:3px}.tb-close{margin-left:6px}.tb-reading{min-height:0;position:relative;display:flex;align-items:center;justify-content:center;padding:24px 68px 16px;background:radial-gradient(ellipse at center,#3d423b,#252824 80%);overflow:hidden}.tb-stage{height:100%;width:100%;display:flex;justify-content:center;align-items:center;gap:0;touch-action:pan-y pinch-zoom}.tb-sheet{position:relative;height:100%;max-height:100%;aspect-ratio:2/3;max-width:50%;background:#fff;box-shadow:0 12px 32px #0005;overflow:hidden;flex:0 1 auto}.tb-sheet img{height:100%;width:100%;object-fit:fill;display:block;user-select:none}.tb-sheet:first-child:not(:only-child){border-radius:2px 0 0 2px}.tb-sheet:last-child:not(:only-child){border-radius:0 2px 2px 0}.tb-sheet[data-side=left]::after{content:"";position:absolute;right:0;top:0;bottom:0;width:14px;background:linear-gradient(90deg,transparent,#00000009);pointer-events:none}.tb-sheet[data-side=right]::after{content:"";position:absolute;left:0;top:0;bottom:0;width:14px;background:linear-gradient(90deg,#00000013,transparent);pointer-events:none}.tb-sheet.tb-blank{background:#f7f5ee}.tb-cover .tb-sheet{max-width:100%;height:auto;max-height:100%;width:auto;object-fit:contain;box-shadow:0 18px 55px #0005}.tb-cover .tb-sheet img{max-height:100%;object-fit:contain}.tb-page-link{position:absolute;border-radius:2px;background:transparent;cursor:pointer;color:inherit}.tb-page-link:hover,.tb-page-link:focus-visible{background:#9da98d33;outline:1px solid #75866e}.tb-turn{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:44px;height:64px;background:#ffffff06;border:1px solid #ffffff18;border-radius:12px;color:#e9ecdf;cursor:pointer;z-index:1}.tb-turn:hover{background:#ffffff18}.tb-turn:disabled{opacity:.15;cursor:default}.tb-prev{left:12px}.tb-next{right:12px}.tb-footer{position:relative;display:flex;gap:20px;align-items:center;justify-content:space-between;padding:14px 26px calc(15px + env(safe-area-inset-bottom));font-size:12px;color:#c4c9be}.tb-position{font-variant-numeric:tabular-nums}.tb-page-form{display:flex;gap:8px;align-items:center}.tb-page-form input{width:55px;border:1px solid #ffffff2a;background:#ffffff09;color:#fff;border-radius:5px;padding:5px;font:inherit;appearance:textfield;-moz-appearance:textfield}.tb-page-form input::-webkit-inner-spin-button{appearance:none}.tb-page-form button{background:transparent;border:0;color:#e8eedf;padding:6px;cursor:pointer}.tb-progress{position:absolute;top:0;left:0;right:0;height:2px;background:#ffffff0a}.tb-progress span{display:block;height:100%;background:#b5c2a4;transition:width .22s ease}.tb-contents{position:absolute;z-index:4;top:calc(91px + env(safe-area-inset-top));right:max(24px,env(safe-area-inset-right));bottom:70px;width:min(440px,calc(100% - 48px));border:1px solid #ffffff28;border-radius:16px;background:#2c302b;box-shadow:0 16px 60px #0008;overflow:auto;overscroll-behavior:contain;padding:12px}.tb-contents-label{font-family:Georgia,serif;font-size:23px;padding:12px 12px 18px}.tb-contents-list a{display:flex;justify-content:space-between;gap:20px;padding:10px 12px;border-radius:7px;text-decoration:none;color:#e6e9df;font-size:13px;line-height:1.45}.tb-contents-list a:hover,.tb-contents-list a[aria-current]{background:#ffffff0c}.tb-contents-list a span:last-child{color:#b4bea8;font-variant-numeric:tabular-nums}.tb-message{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);text-align:center;font-size:13px;padding:10px 18px;border-radius:100px;background:#151914ed;pointer-events:none}.tb-message:empty{display:none}.tb-text{height:100%;max-width:740px;overflow:auto;padding:28px 42px;background:#f9f6ed;color:#282820;border-radius:4px;font-family:Georgia,serif;line-height:1.7;width:100%}.tb-text h2{font:12px system-ui;letter-spacing:.1em;text-transform:uppercase;color:#6a7061}.tb-text p{white-space:pre-line;font-size:18px}.tb-text section+section{margin-top:48px;border-top:1px solid #ddd8ca;padding-top:28px}.tb-copy{position:absolute;z-index:5;right:20px;top:100px;padding:16px;border:1px solid #ffffff38;border-radius:12px;background:#2c302b;width:min(500px,calc(100% - 40px))}.tb-copy label{display:block;margin-bottom:8px;font-size:12px}.tb-copy input{width:100%;padding:10px;background:#1d211c;color:white;border:1px solid #ffffff30;border-radius:6px}.tb-reader a{cursor:pointer}
@media(min-aspect-ratio:17/10) and (min-width:761px){.tb-cover .tb-sheet{height:100%;width:auto}}
@media(max-width:760px){.tb-toolbar{padding:calc(12px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));gap:10px;flex-wrap:wrap}.tb-heading{width:100%;display:flex;align-items:baseline;gap:12px}.tb-eyebrow{display:none}.tb-heading h1{font-size:17px;margin:0}.tb-actions{width:100%;justify-content:space-between;gap:6px}.tb-button{height:41px;min-width:41px;border-radius:9px}.tb-contents-toggle span{font-size:12px}.tb-close{margin-left:auto}.tb-reading{padding:10px 8px 12px}.tb-stage{width:100%;height:100%}.tb-single .tb-sheet{max-width:100%;height:auto;max-height:100%;aspect-ratio:2/3;width:auto;box-shadow:0 8px 25px #0004}.tb-turn{top:auto;bottom:20px;transform:none;width:36px;height:36px;background:#242724bb;border-color:#ffffff40;border-radius:50%;opacity:.7}.tb-prev{left:12px}.tb-next{right:12px}.tb-turn:disabled{opacity:0;pointer-events:none}.tb-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom));gap:10px}.tb-contents{top:calc(104px + env(safe-area-inset-top));right:8px;width:calc(100% - 16px);bottom:60px}.tb-text{padding:20px 23px}.tb-message{bottom:18px;max-width:90%;width:max-content}.tb-copy{top:120px}}
@media(prefers-reduced-motion:reduce){.tb-progress span{transition:none}}

.tb-contents-list a.tb-section{font-weight:700;color:#fff;margin-top:12px;border-top:1px solid #ffffff17;padding-top:14px}.tb-contents-list a:not(.tb-section){padding-left:24px}

/* Curled sheets reuse the resting-page textures, including the gutter. */
.tb-transition-layer{position:absolute;pointer-events:none;z-index:2;isolation:isolate}
.tb-transition-layer .tb-old-spread{position:absolute;inset:0;z-index:0;pointer-events:none}
.tb-curl-ready .tb-old-spread .tb-sheet{box-shadow:none}
.tb-curl-leaf{position:absolute;z-index:2;left:0;top:0;transform-origin:0 0;transform-style:preserve-3d;pointer-events:none}
.tb-curl-strip{position:absolute;left:0;top:0;transform-origin:0 50%;transform-style:preserve-3d;will-change:transform}
.tb-curl-face{position:absolute;inset:0 -.6px 0 0;transform-origin:calc(50% - .3px) 50%;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;background:#fff}
.tb-curl-back{transform:rotateY(180deg)}
.tb-curl-face .tb-sheet{max-width:none!important;max-height:none;border-radius:0!important;box-shadow:none}
.tb-curl-shade{position:absolute;inset:0;background:#181b16;opacity:0;pointer-events:none}
.tb-curl-shadow{position:absolute;z-index:1;background:linear-gradient(90deg,transparent 12%,#0c100d 49%,#0c100d 51%,transparent 88%);filter:blur(14px);opacity:0;pointer-events:none}
.tb-cover-half img{position:absolute;top:0;left:0;width:200%!important;height:100%;object-fit:fill}
.tb-cover-half[data-half=right] img{left:-100%}
.tb-stage[data-turning]{pointer-events:none}
@media(prefers-reduced-motion:reduce){.tb-transition-layer{display:none}}

/* One permanent book shadow and one spine; animated copies never recreate them. */
.tb-reading{isolation:isolate}
.tb-stage{position:relative;z-index:1}
.tb-sheet,.tb-cover .tb-sheet,.tb-single .tb-sheet{box-shadow:none}
.tb-sheet::after{display:none}
.tb-book-shadow{position:absolute;pointer-events:none;box-shadow:0 12px 32px #0005;border-radius:2px;z-index:0}
.tb-gutter{position:absolute;width:28px;background:linear-gradient(90deg,transparent,#00000009 50%,#00000013 50%,transparent);pointer-events:none;z-index:3;transition:opacity .3s ease}
.tb-turn{z-index:4}
@media(prefers-reduced-motion:reduce){.tb-gutter{transition:none}}

@font-face{font-family:TBSelection;src:url('./fonts/EBGaramond.ttf')}@font-face{font-family:TBSelection;src:url('./fonts/EBGaramond-Italic.ttf');font-style:italic}
.tb-text-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2;font-family:TBSelection,Georgia,serif;color:transparent}
.tb-text-layer span{position:absolute;display:inline-block;white-space:pre;color:transparent;transform-origin:0 0;pointer-events:auto;user-select:text;-webkit-user-select:text;cursor:text;min-height:1px}
.tb-text-layer span::selection{background:#dfc66588;color:transparent}.tb-text-layer .tb-picked{color:transparent;text-decoration:underline;text-decoration-color:#a47d2f;text-decoration-thickness:1.5px;text-underline-offset:2px}.tb-text-layer span[data-passage]{cursor:pointer}.tb-text-layer span:focus-visible{background:#d7c66b22;outline:1px solid #927b24;outline-offset:1px}
.tb-page-link{z-index:3}.tb-selecting .tb-text-layer span{cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.tb-selection-tray{position:absolute;left:50%;bottom:75px;transform:translateX(-50%);z-index:8;display:flex;align-items:center;gap:12px;padding:12px 16px;background:#f8f4e9;color:#252c25;border-radius:14px;box-shadow:0 8px 35px #0005;max-width:calc(100% - 24px);flex-wrap:wrap;font-size:13px}
.tb-selection-tray button{border:1px solid #a3aa98;border-radius:8px;background:#fff;color:#243b2d;font:inherit;padding:9px 14px;min-height:40px;cursor:pointer}.tb-selected-count{font-size:12px}.tb-manual-quote{width:100%;height:130px;font:14px/1.4 Georgia,serif}.tb-selecting .tb-select-toggle{background:#d8c889;color:#243325}.tb-contents-group{display:block;width:100%;border:0;border-bottom:1px solid #ffffff18;background:transparent;color:inherit;text-align:left;padding:13px;font:inherit;cursor:pointer}.tb-contents-group:hover,.tb-contents-back:hover{background:#ffffff12}.tb-contents-back{border:1px solid #ffffff36;border-radius:6px;color:inherit;background:transparent;padding:10px 14px;margin:10px 0;font:inherit;cursor:pointer}.tb-contents-group-title{font:22px Georgia,serif;margin:14px 8px}.tb-chapter-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.tb-chapter-grid a{display:flex!important;align-items:center;justify-content:center;padding:12px!important;border:1px solid #ffffff25!important;border-radius:6px;min-height:44px}.tb-chapter-grid a span:last-child{display:none}
@media(max-width:760px){.tb-select-toggle{font-size:12px;padding:0 8px}.tb-selection-tray{bottom:80px;gap:6px;padding:8px 10px}.tb-selected-count{width:100%}.tb-actions{gap:4px}.tb-toolbar{padding-left:12px;padding-right:12px}.tb-heading h1{max-width:130px}.tb-chapter-grid{grid-template-columns:repeat(5,1fr)}}
.tm-media-pane .tb-selection-tray{background:var(--tm-paper);color:var(--tm-text);border:1px solid var(--tm-rule);font-family:var(--tm-ui)}.tm-media-pane .tb-selection-tray button{background:var(--tm-field);color:var(--tm-blue);border-color:var(--tm-rule)}.tm-media-pane .tb-contents-group,.tm-media-pane .tb-contents-back,.tm-media-pane .tb-chapter-grid a{border-color:var(--tm-rule)!important;color:var(--tm-text)}.tm-media-pane .tb-contents-group:hover,.tm-media-pane .tb-contents-back:hover{background:var(--tm-selected)}.tm-media-pane .tb-manual-quote{background:var(--tm-paper);color:var(--tm-text)}
.tb-testament-heading{font:600 13px/1.4 system-ui,sans-serif;letter-spacing:.07em;text-transform:uppercase;margin:22px 12px 7px;color:inherit;opacity:.75}
.tb-flowing-text{display:inline-block;margin:15px 0;text-decoration:underline;color:inherit}

.tb-transition-layer .tb-text-layer{display:none!important}

.tb-footer .tb-selection-tray{position:absolute;inset:0;transform:none;width:auto;max-width:none;box-sizing:border-box;padding:inherit;background:transparent;color:inherit;box-shadow:none;border:0;border-radius:0;display:flex;flex-wrap:nowrap;justify-content:center;gap:14px;font:inherit}
.tb-footer .tb-selection-tray[hidden]{display:none}
.tb-has-selection .tb-footer>.tb-position,.tb-has-selection .tb-footer>.tb-page-form{visibility:hidden;pointer-events:none}
.tb-footer .tb-selection-tray button{flex-shrink:0;min-height:36px;padding:6px 12px;border:0;background:transparent;color:var(--tm-blue,#d9c58a);font:inherit}
.tb-footer .tb-selected-count{min-width:0;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:auto;color:inherit;font:inherit}
.tb-footer .tb-manual-quote:not([hidden]){position:absolute;bottom:calc(100% + 8px);left:12px;right:12px;width:calc(100% - 24px);background:var(--tm-paper,#fff);color:var(--tm-text,#222);border:1px solid #aaa;border-radius:8px;padding:12px}
@media(max-width:760px){.tb-footer .tb-selection-tray{gap:2px}.tb-footer .tb-selection-tray button{padding:5px 9px}}

/* fitPages sizes each sheet from its PDF dimensions and the reading pane.
   A viewport-based 50% limit must not narrow an embedded single page. */
.tb-stage>.tb-sheet{max-width:none;flex:none}

.tb-zoom-surface[data-zoomed="true"]{cursor:grab}.tb-zoom-surface[data-panning="true"]{cursor:grabbing}.tb-zoom-surface[data-zoomed="true"] .tb-text-layer{user-select:none;-webkit-user-select:none}

.tb-contents-label{display:flex;align-items:center;justify-content:space-between;gap:16px}.tb-contents-today{flex:none;border:0;border-radius:7px;background:transparent;color:var(--tm-blue,#007aff);font:500 15px/1.25 system-ui,-apple-system,sans-serif;min-height:36px;padding:6px 9px;cursor:pointer}.tb-contents-today:hover{background:rgba(0,122,255,.08)}.tb-contents-today:active{background:rgba(0,122,255,.14)}

.tb-toolbar-today{width:auto;min-width:0;color:var(--tm-blue,#007aff);font:500 14px/1.25 system-ui,-apple-system,sans-serif;border:0;background:transparent;padding:7px 9px}.tb-toolbar-today:hover{color:var(--tm-blue,#007aff);background:rgba(0,122,255,.08)}@media(max-width:760px){.tb-toolbar-today{display:none!important}}
