@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap');
:root{color-scheme:light;--ink:#322c25;--paper:#faf3df;--red:#ab4235;--serif:'Libre Caslon Text',Georgia,serif;--sans:'DM Sans',Arial,sans-serif}
*{box-sizing:border-box}
body{margin:0;color:var(--ink);background:#dfd3b8;font-family:var(--sans);background-image:radial-gradient(ellipse at 50% 12%,#f5efdfff,transparent 80%);min-height:100svh}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;color:inherit;border:0;background:transparent}
button:disabled{cursor:default;opacity:.4}
button:focus-visible,a:focus-visible,#stage:focus-visible{outline:3px solid #a52e2e;outline-offset:4px}
button[hidden],[hidden]{display:none!important}
header{display:flex;justify-content:space-between;align-items:center;padding:18px 4vw 13px;max-width:1650px;margin:auto}
header .name{font-family:var(--serif);font-size:21px;letter-spacing:-.6px;color:inherit;text-decoration:none}
header nav{display:flex;gap:18px}
header button{font-size:12px;padding:8px 2px}
header button:hover{text-decoration:underline}
main{max-width:1560px;margin:auto;padding:5px 4vw 32px}
.book-shell{position:relative;filter:drop-shadow(0 15px 16px #51452e3a)}
.page-edge{position:absolute;inset:10px -4px -8px 5px;background:repeating-linear-gradient(0deg,#dfd2b4 0 1px,#f6edd8 1px 3px);transform:rotate(.24deg);border-radius:4px}
.book{position:relative;background:var(--paper);padding:17px 18px 0;box-shadow:inset 12px 0 20px -20px #281903,inset -12px 0 20px -20px #281903}
.picture-wrap{position:relative;background:#3c352b;border:1px solid #d6c7a8;overflow:hidden}
#stage{height:min(64vh,800px);min-height:320px;position:relative;overflow:hidden;touch-action:none;cursor:grab;background:#5d4938}
#stage.dragging{cursor:grabbing}
#surface{width:1536px;height:1024px;transform-origin:0 0;position:absolute;will-change:transform}
#photograph{display:block;width:100%;height:100%;object-fit:cover;user-select:none;pointer-events:none}
#marks{width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none}
#marks .found-mark{fill:none;stroke:#fce8a9;stroke-width:5;stroke-linecap:round;filter:drop-shadow(0 1px 1px #4b2615);stroke-dasharray:3 1;opacity:.86}
#marks .hint-region{fill:#fff5c423;stroke:#fff6c8;stroke-width:4;stroke-dasharray:12 9}
#marks .hint-point{fill:#ffe8a24a;stroke:#fff5bc;stroke-width:5}
.zoom-tools{display:flex;gap:1px;position:absolute;bottom:12px;right:12px;background:#f9f0d8e8;box-shadow:0 2px 4px #20180922;border-radius:3px;overflow:hidden}
.zoom-tools button{width:38px;height:38px;font-size:24px;line-height:1}
.zoom-tools button:hover{background:#fff8e9}
#resetView{font-size:25px}
#toast{position:absolute;left:50%;bottom:17px;transform:translateX(-50%);background:#fff5dfef;color:#593c25;border-radius:3px;font-size:12px;padding:8px 14px;opacity:0;pointer-events:none;transition:opacity .15s;white-space:nowrap}
#toast.show{opacity:1}
#ripple{display:none;position:absolute;width:32px;height:32px;border:2px solid #fff5d3;border-radius:50%;pointer-events:none;transform:translate(-50%,-50%);animation:ripple .5s forwards}
@keyframes ripple{from{opacity:1;scale:.5}
to{opacity:0;scale:1.7}
}
.paper-bottom{padding:13px 14px 9px}
.search-row{display:flex;gap:12px;align-items:center;min-height:42px}
.find-caption{display:flex;align-items:baseline;gap:12px;flex:1}
.small-label{text-transform:uppercase;font-size:10px;letter-spacing:2px;color:#8b6450}
.find-caption strong{font-family:var(--serif);font-size:22px;line-height:1.3;font-weight:400}
#hintButton,#accessibleOpen{font-family:var(--serif);font-style:italic;font-size:13px;padding:10px 0 10px 12px;white-space:nowrap}
#hintButton:hover,#accessibleOpen:hover{text-decoration:underline}
.targets{display:flex;gap:7px;overflow-x:auto;padding:12px 2px 11px;scrollbar-width:thin;scrollbar-color:#b9a68a transparent}
.target{flex-shrink:0;font-size:11px;line-height:1.2;min-height:35px;border:1px solid #bdb098;border-radius:2px;padding:8px 12px;background:#fff8e838;transition:background .2s}
.target[aria-pressed=true]{color:#fff9e9;background:#aa4537;border-color:#963a2c}
.target.found:not([aria-pressed=true]){text-decoration:line-through;text-decoration-color:#b74e39;color:#81715e}
.target:hover{border-color:#864832}
footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #cfbea080;padding:4px 0 0;gap:8px}
.instructions{font-family:var(--serif);font-size:10px;font-style:italic;color:#85725d;margin:5px 0}
.instructions span{margin-left:8px}
#pageTabs{display:flex;gap:5px}
#pageTabs button{font-family:var(--serif);font-size:12px;width:33px;height:30px;border-bottom:2px solid transparent;color:#85715a}
#pageTabs button[aria-current=page]{color:#8d342a;border-bottom-color:#a94537}
.paper-dialog{color:var(--ink);background:var(--paper);padding:0;border:1px solid #bbae90;box-shadow:0 20px 70px #190c0660;max-width:1050px;width:calc(100% - 64px);height:calc(100svh - 64px);max-height:calc(100svh - 64px);overflow:hidden}
.paper-dialog::backdrop{background:#271a14c7;backdrop-filter:blur(3px)}
.dialog-top{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px 28px;border-bottom:1px solid #d9caaa;min-height:56px}
.dialog-top span{text-transform:uppercase;font-size:11px;letter-spacing:1.4px}
.dialog-top button{font-size:12px;padding:6px 0}
.reader-scroll,.dialog-scroll{height:calc(100% - 65px);overflow:auto;overscroll-behavior:contain;padding:25px 5% 60px}
.reader-scroll h1,.dialog-scroll h1{font-family:var(--serif);font-size:clamp(26px,5vw,48px);letter-spacing:-1.5px;font-weight:400;margin:0 0 24px}
.reader-scroll{--ab-ink:var(--ink);--ab-muted:#7f6b51;--ab-rule:#d0c0a1;--ab-bg:var(--paper);--ab-accent:#ac4233}
.ab-media{font-family:var(--sans);font-size:15px;line-height:1.65}
.ab-lede{font-size:17px;max-width:730px}
.ab-frame{max-height:70svh}
.back{display:block;font-family:var(--serif);font-style:italic;color:#9a3d30;margin:35px 0 10px;padding:12px 0;border-bottom:1px solid #b68665}
.small-dialog{max-width:680px;height:min(720px,calc(100svh - 64px))}
.contents-intro{font-family:var(--serif);font-style:italic;margin:0 0 20px}
#contentsList{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
#contentsList button{text-align:left;padding:13px 0;font-family:var(--serif);font-size:15px;border-bottom:1px solid #d9c9a4}
#contentsList button.found::after{content:' ✓';color:#a94537}
#aboutTitle{font-size:14px;font-weight:600}
#bio{font-size:18px;line-height:1.6;font-family:var(--serif)}
#contact a{color:#924335;display:inline-block;margin-right:20px;line-height:2}
#endpapers{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
#endpapers button{padding:7px;background:#e9dfc7;box-shadow:2px 3px 4px #42362623;transform:rotate(var(--angle));font-family:var(--serif);font-size:12px}
#endpapers img{display:block;width:100%;aspect-ratio:1;object-fit:cover;margin-bottom:9px}
#loading{position:fixed;z-index:20;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#eee5ce;font-family:var(--serif)}
#loading p{font-size:16px}
#loading progress{appearance:none;width:130px;height:3px;border:0;color:#a44738;background:#d0c0a1}
#loading progress::-webkit-progress-bar{background:#d0c0a1}
#loading progress::-webkit-progress-value{background:#a44738}
.loader-book{display:flex;filter:drop-shadow(0 4px 3px #54442b30)}
.loader-book i{display:block;width:45px;height:60px;background:#f9f3de;border:1px solid #cab996;transform:skewY(-8deg)}
.loader-book i+i{transform:skewY(8deg);border-left:0}
#loadError{max-width:280px;text-align:center}
#retry{text-decoration:underline}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:650px){header{padding:12px 15px 10px}
header .name{font-size:19px}
header nav{gap:13px}
header button{font-size:11px}
main{padding:0 8px 20px}
.book{padding:9px 8px 0}
.paper-bottom{padding:10px 6px 7px}
#stage{height:calc(100svh - 269px);min-height:330px;max-height:700px}
.search-row{gap:8px;align-items:center}
.find-caption{display:block}
.small-label{display:block;font-size:9px;margin-bottom:3px}
.find-caption strong{font-size:20px}
#hintButton{font-size:12px}
.targets{padding-top:9px;gap:6px}
.target{font-size:10px;padding:9px 10px;min-height:36px}
footer{gap:5px}
.instructions{font-size:9px;max-width:175px;line-height:1.6}
.instructions span{display:block;margin:0}
#pageTabs{gap:0}
#pageTabs button{width:29px}
.zoom-tools{right:8px;bottom:8px}
.zoom-tools button{width:35px;height:35px}
.paper-dialog{width:calc(100% - 16px);height:calc(100svh - 16px);max-height:calc(100svh - 16px)}
.dialog-top{padding:13px 18px}
.reader-scroll,.dialog-scroll{padding:23px 6% 45px}
.small-dialog{height:calc(100svh - 16px)}
#contentsList{gap:0 15px}
#contentsList button{font-size:13px}
#endpapers{grid-template-columns:repeat(3,1fr);gap:12px}
#endpapers button{font-size:10px}
.ab-lede{font-size:15px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}


/* Review revision: the photograph is the full bleed of a 3:2 book spread. */
header{max-width:1480px;padding:15px 24px 12px}
main{width:min(calc(100% - 44px),max(880px,calc((100svh - 205px)*1.5)));max-width:1480px;padding:0 0 28px}
.book{padding:0;overflow:hidden;border-radius:2px}
.picture-wrap{border:0;background:var(--paper);isolation:isolate}
#stage{height:auto;min-height:0;max-height:none;aspect-ratio:3/2;background:var(--paper)}
.picture-wrap::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 48.5%,#231a1308 49.5%,#fff4d51c 50%,transparent 51.5%);z-index:1}
.picture-wrap.turning{animation:page-settle .34s ease-out}
@keyframes page-settle{from{filter:brightness(.87);transform:perspective(1400px) rotateY(-1.5deg)}to{filter:brightness(1);transform:perspective(1400px) rotateY(0)}}
.paper-bottom{padding:15px 24px 8px;background:linear-gradient(90deg,#f7ecd3,#fff8e5 49%,#eee0bf 50%,#fff8e5 51%,#f7ecd3)}
.riddle{margin:0 auto 8px;max-width:1020px;font:clamp(16px,1.6vw,20px)/1.7 var(--serif);text-align:center;text-wrap:pretty}
.clue{display:inline;padding:1px 0;line-height:inherit;font:inherit;text-align:inherit;box-decoration-break:clone;text-decoration-thickness:1px;text-underline-offset:4px}
.clue:hover,.clue[aria-pressed=true]{text-decoration:underline;text-decoration-color:#a94736}
.clue.found{color:#8d7558;text-decoration:line-through;text-decoration-color:#af493b}
.search-row{min-height:32px;gap:10px;justify-content:center}
.find-caption{flex:0 1 auto;display:flex;gap:7px;align-items:baseline;min-width:0}
.small-label{font-size:8px;letter-spacing:1.2px;white-space:nowrap}
.find-caption strong{font-family:var(--serif);font-size:12px;font-style:italic;line-height:1.4}
#hintButton,#accessibleOpen{font-size:12px;padding:6px 7px;min-height:32px}
.targets{justify-content:center;gap:12px;padding:4px 0 7px;flex-wrap:wrap;overflow:visible}
.target{border:0;border-bottom:1px solid #cbb895;border-radius:0;background:none!important;min-height:28px;font:11px var(--serif);padding:4px 0}
.target.found{text-decoration:none!important;color:#856044!important}
footer{border:0;justify-content:center;padding:0;gap:12px}
.page-turn{width:44px;height:34px;font-size:19px;line-height:1}
#pageTabs{gap:9px}#pageTabs button{width:32px;height:32px}
.zoom-tools{right:12px;bottom:12px;z-index:2;background:#f9f0d8da;border-radius:0;box-shadow:none}
@media(max-width:650px){
 header{padding:12px 12px 10px}header nav{gap:11px}
 main{width:calc(100% - 16px);padding:0 0 20px}
 .book{padding:0}.paper-bottom{padding:12px 13px 7px}
 #stage{height:auto;min-height:0;max-height:none;aspect-ratio:3/2}
 .riddle{font-size:15px;line-height:1.8;text-align:left;margin-bottom:9px}
 .search-row{flex-wrap:wrap;gap:3px 6px;justify-content:flex-start}
 .find-caption{display:flex;flex:1 1 55%;gap:6px}.small-label{display:inline;margin:0;font-size:8px}
 .find-caption strong{font-size:11px}#hintButton,#accessibleOpen{font-size:11px;padding:6px 4px}
 .targets{justify-content:flex-start;gap:5px 12px}.target{font-size:10px;min-height:30px}
 .zoom-tools{right:7px;bottom:7px}.zoom-tools button{width:33px;height:33px}
 footer{margin-top:3px}#pageTabs{gap:9px}
}

.extra-credit{margin-top:38px;border-top:1px solid #cebc98;padding-top:22px}.extra-credit h2{font:22px var(--serif);font-weight:400;margin:0 0 12px}#extraCredit{display:flex;gap:10px 25px;flex-wrap:wrap}.extra-clue{font:italic 15px/1.5 var(--serif);padding:7px 0;border-bottom:1px solid #b99a6a}.extra-clue:disabled{text-decoration:line-through;opacity:.65}@media(max-width:650px){header{flex-wrap:wrap;gap:3px 12px}header nav{gap:10px;flex-wrap:wrap}.extra-clue{font-size:14px}}
