:root{--paper:#eee4ca;--ink:#443d2e;--pine:#405649;--gold:#a77e3c;--line:#9b8e6d;--soft:#6d705b;font-family:Georgia,'Times New Roman',serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a,input{touch-action:manipulation}button,a{color:inherit}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid #52796d;outline-offset:5px}button[hidden],[hidden]{display:none!important}a{text-underline-offset:4px}
body:before{content:'';position:fixed;inset:0;pointer-events:none;z-index:100;opacity:.1;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.5' filter='url(%23n)'/%3E%3C/svg%3E");mix-blend-mode:multiply}
.book-header{position:relative;z-index:10;min-height:112px;display:flex;align-items:center;justify-content:space-between;gap:25px;padding:17px 4%;background:#eee4cafa;border-bottom:1px solid #94825b50}.book-title{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:27px;font-weight:700;white-space:nowrap}.book-title>svg{width:43px;height:43px;color:var(--pine)}.book-title small{display:block;font-size:14px;font-weight:400;color:var(--soft);margin-top:5px;letter-spacing:.02em}
.ring-case{width:330px;padding:10px 17px 6px;border:1px solid #a3936a;border-radius:2px 5px 3px 5px;background:linear-gradient(100deg,#e5d7b6,#f2e7cc,#e1d3ae);box-shadow:inset 0 0 0 3px #f7edd166,2px 4px 0 #a99b7633}.ring-case-caption{display:flex;justify-content:space-between;gap:20px;font-size:14px;color:#726346}.ring-case-caption span:first-child{font-weight:700}.ring-case ol{display:flex;justify-content:space-between;list-style:none;padding:0;margin:7px 0 0;gap:12px}.ring-slot{width:43px;height:36px;display:grid;place-items:center;position:relative;background:radial-gradient(ellipse,#79623d12,transparent 72%)}.ring-slot>svg{width:42px;height:34px;opacity:.23;filter:grayscale(1)}.ring-slot.collected>svg{opacity:1;filter:none;animation:ring-settle .65s ease-out}.ring-slot.collected:after{content:'';position:absolute;right:5px;top:2px;width:3px;height:3px;background:#fff4b8;box-shadow:0 0 5px #ffda85;animation:ring-spark 3s infinite}
.map-page{padding:0 3% 12px}.map-caption{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 1% 12px}.map-caption h1{font-size:clamp(25px,3vw,38px);font-weight:400;margin:0 0 7px}.map-caption p{font-size:16px;color:var(--soft);margin:0;line-height:1.5}.map-zoom{display:flex;align-items:center;gap:6px;flex-shrink:0}.map-zoom button{background:none;border:1px solid #a99b7770;padding:8px 12px;min-height:43px;border-radius:3px;font-size:15px}.map-zoom button:not(#zoom-fit){font-size:22px;min-width:42px}.map-zoom button:disabled{opacity:.35}.map-viewport{height:calc(100svh - 270px);min-height:430px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b4a37c transparent;border:1px solid #a38e5e55;background:#f4ecd7;position:relative;box-shadow:inset 0 0 45px #b39c5b20;cursor:grab;touch-action:pan-x pan-y}.map-viewport.dragging{cursor:grabbing}.map-canvas{position:relative;isolation:isolate;aspect-ratio:3/2;width:1200px;margin:auto;overflow:hidden;flex-shrink:0}.map-art{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:fill;user-select:none;pointer-events:none}.map-route{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.6}.map-route path{fill:none}.route-shadow{stroke:#f0dfb1;stroke-width:9;stroke-linecap:round}.route-dash{stroke:#6b5d36;stroke-width:2.6;stroke-dasharray:3 10;stroke-linecap:round}
.map-place{position:absolute;z-index:3;display:flex;align-items:center;justify-content:center;min-width:64px;min-height:58px;width:12%;height:15%;transform:translate(-50%,-50%);background:none;border:0;padding:0;text-decoration:none;cursor:pointer}.place-label{position:absolute;top:95%;left:50%;transform:translateX(-50%);white-space:nowrap;text-align:center;font-size:clamp(15px,1.6vw,20px);font-weight:700;text-shadow:0 1px 3px #fff6df,0 0 10px #fff4d8}.place-label small{display:block;font-size:12px;font-weight:400;margin-top:4px;color:#645b40}.gollum-place{left:34%;top:49%;width:16%;height:20%}.gollum-place .place-label{color:#364e40}.gollum-place .place-label:after{content:'';display:block;width:70%;height:2px;background:#6c7c50;margin:5px auto 0;transform:rotate(-2deg)}.place-ground{position:absolute;left:20%;right:20%;bottom:3%;height:20%;border:2px dashed #615832;border-radius:50%;animation:map-invitation 2.5s ease-in-out infinite}.map-place:hover .place-label{translate:0 -3px}.map-place:hover .place-ground{background:#f4db8b55}.hobbiton{left:15%;top:75%}.rivendell{left:58%;top:24%}.rohan{left:67%;top:73%}.mordor{left:86%;top:39%}.future-place{opacity:.9}.map-place:focus-visible{border-radius:40%}.map-footer{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:12px 1% 0;min-height:45px}.map-footer p{margin:0;max-width:800px;font-size:15px;line-height:1.5;color:#6e674e}.map-footer button{font-size:15px;flex-shrink:0;border:0;border-bottom:1px solid #9a8556;background:none;padding:5px 0}.map-cloud{position:absolute;width:27%;height:10%;border-radius:50%;filter:blur(15px);pointer-events:none;background:#fff9e4;opacity:.18;animation:cloud-pass 32s ease-in-out infinite alternate;z-index:1}.cloud-one{left:8%;top:10%}.cloud-two{left:65%;top:58%;animation-delay:-17s}.map-birds{position:absolute;left:41%;top:12%;width:10%;height:5%;color:#6a7459;opacity:.7;animation:birds-glide 12s ease-in-out infinite alternate;pointer-events:none}.volcano-smoke{position:absolute;left:86%;top:25%;width:4%;height:12%;pointer-events:none}.volcano-smoke i{position:absolute;bottom:0;left:0;width:80%;height:50%;background:#5b534745;border-radius:45%;filter:blur(5px);animation:smoke-rise 6s linear infinite}.volcano-smoke i:nth-child(2){animation-delay:-2s}.volcano-smoke i:nth-child(3){animation-delay:-4s}
.cave-page{position:relative;isolation:isolate;min-height:calc(100svh - 112px);overflow:hidden;background:#344e4b;padding:35px 4% 65px;color:#f3e9cf;display:grid;grid-template-columns:1fr minmax(390px,520px);align-items:center;gap:40px}.cave-backdrop{position:absolute;inset:0;z-index:-3;background:url('assets/gollum-cave.webp') center/cover no-repeat;transform-origin:30% 60%;animation:cave-arrival 1.6s ease-out both}.cave-page:before{content:'';position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,transparent 30%,#233e3c20 63%,#233e3c44)}.cave-title{position:absolute;left:4%;top:75px;text-shadow:0 2px 10px #1d383b66}.cave-title h1{font-size:clamp(28px,3.5vw,45px);font-weight:400;margin:0 0 8px}.cave-title p{font-size:16px;color:#d6d9b8;margin:0}.back-to-map{position:absolute;left:4%;top:24px;display:flex;align-items:center;gap:9px;text-decoration:none;font-size:17px;z-index:4;text-shadow:0 2px 8px #193334}.back-to-map svg{width:26px;height:26px}.gollum-hit{position:absolute;left:7%;top:37%;width:31%;height:54%;border:0;background:none;cursor:pointer;z-index:1}.gollum-hit span{position:absolute;bottom:1%;left:50%;transform:translateX(-50%);font:20px Georgia,serif;color:#e7ddb8;text-shadow:0 2px 5px #1d3637}.gollum-hit:focus-visible{outline-color:#e5d5a6;border-radius:40%}.gollum-hit:hover span{color:#fff6d9}.speech-paper{grid-column:2;position:relative;z-index:3;color:#443d2d;padding:28px 33px 27px;background:#f1e6c8;border:1px solid #a29166;box-shadow:6px 9px 0 #182f3140,0 20px 55px #132d3938;border-radius:3px 7px 4px 6px;transform:rotate(.35deg);margin:25px 0 0;max-width:520px;width:100%}.speech-paper:before{content:'';position:absolute;left:-19px;top:35%;width:26px;height:28px;transform:rotate(45deg);background:#f1e6c8;border-left:1px solid #a29166;border-bottom:1px solid #a29166}.speech-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:13px}.speech-heading h2{font-size:23px;font-weight:400;margin:0;color:#526047}.speech-heading>span{font-size:14px;color:#8b7e57}.riddle-leaves{display:flex;gap:8px;margin-bottom:20px;min-height:12px}.riddle-leaf{width:19px;height:10px;border:1px solid #8e906c;border-radius:0 90% 0 90%;transform:rotate(-12deg);opacity:.35}.riddle-leaf.solved{background:#7b8c58;opacity:1;animation:leaf-arrive .4s ease both}.riddle-copy{font-size:clamp(23px,2.4vw,30px);line-height:1.42;white-space:pre-line;margin:0 0 26px;font-weight:400;letter-spacing:-.2px}#answer-form label{font-size:14px;display:block;color:#7d7353;margin-bottom:8px}.answer-line{display:flex;gap:9px;align-items:center}.answer-line input{width:0;min-width:0;flex:1;background:#fffcf088;color:#443d2e;border:0;border-bottom:2px solid #a39873;padding:10px 12px;font-size:20px;border-radius:2px}.ink-button{display:inline-block;min-height:44px;padding:12px 20px;border:1px solid #59654d;background:#526650;color:#fff7df;border-radius:4px 6px 3px 5px;text-decoration:none;box-shadow:2px 3px 0 #4a513a30;font-size:17px;text-align:center;white-space:nowrap}.ink-button:hover{background:#415b46}.ink-button:disabled{opacity:.5}.text-button{display:inline-block;border:0;border-bottom:1px solid #a89b75;background:none;color:#786a49;font-size:15px;padding:4px 0;margin:15px 0 0;text-align:left}.hint-copy{font-size:16px;line-height:1.5;color:#77714f;margin:12px 0 0;padding-left:12px;border-left:2px solid #b9b38e}.answer-feedback{min-height:23px;margin:17px 0 0;font-size:17px;line-height:1.5;color:#526649}.answer-feedback.wrong{color:#9d634a}.speech-paper #next-riddle{margin-top:12px}.speech-paper.wrong-answer{animation:paper-disagree .32s ease}.speech-paper.correct-answer{animation:paper-agree .5s ease}#reward-actions>p,#complete-actions>p{font-size:18px;line-height:1.5}.ring-pickup{display:flex;align-items:center;justify-content:center;gap:20px;margin:12px 0 0;padding:10px 0;background:none;border:0;color:#65532d;font-size:20px}.ring-pickup>span:first-child{display:block;width:95px;height:83px;filter:drop-shadow(0 8px 5px #92713d33);animation:precious-turn 3.2s ease-in-out infinite}.ring-pickup svg{width:100%;height:100%}.ring-pickup:hover svg{filter:brightness(1.12)}#complete-actions .ink-button{margin-top:8px}#complete-actions .text-button{display:block;margin-top:18px}.cave-water{position:absolute;left:0;right:0;bottom:0;height:28%;z-index:-1;pointer-events:none;mask-image:linear-gradient(transparent,#000)}.cave-water i{position:absolute;left:18%;bottom:20%;width:21%;height:8%;border:1px solid #cdd8b44f;border-radius:50%;animation:water-ring 5s ease-out infinite}.cave-water i:nth-child(2){left:40%;bottom:8%;animation-delay:-2s;width:30%}.cave-water i:nth-child(3){left:5%;bottom:45%;animation-delay:-3s;width:14%}.cave-mist{position:absolute;left:-15%;bottom:0;width:80%;height:18%;background:radial-gradient(ellipse,#d5e0c91c,transparent 70%);pointer-events:none;z-index:0;animation:cave-mist 15s ease-in-out infinite alternate}.page-turn{position:fixed;inset:0;z-index:200;overflow:hidden;pointer-events:all;perspective:1200px}.page-turn span{position:absolute;inset:0;background:#d8c7a0;box-shadow:inset -50px 0 80px #99865355;transform-origin:left center;animation:page-open .85s cubic-bezier(.4,0,.2,1) both}.noscript{padding:30px}
@keyframes page-open{0%{transform:rotateY(0)}100%{transform:rotateY(-105deg)}}@keyframes map-invitation{50%{opacity:.4;scale:1.08}}@keyframes cloud-pass{to{translate:25% -8%}}@keyframes birds-glide{to{translate:60px -9px}}@keyframes smoke-rise{to{transform:translate(-20px,-100px) scale(1.8);opacity:0}}@keyframes cave-arrival{from{scale:1.045;filter:brightness(.7)}to{scale:1;filter:brightness(1)}}@keyframes water-ring{from{scale:.2;opacity:0}30%{opacity:.7}to{scale:1.5;opacity:0}}@keyframes cave-mist{to{translate:20% 5px}}@keyframes leaf-arrive{from{scale:.3;rotate:40deg}to{scale:1;rotate:0}}@keyframes paper-disagree{25%{translate:-4px}65%{translate:4px}}@keyframes paper-agree{50%{border-color:#69834c;box-shadow:6px 9px 0 #182f3140,0 0 30px #e7d29a50}}@keyframes precious-turn{50%{transform:rotate(-7deg);filter:drop-shadow(0 6px 4px #92713d55)}}@keyframes ring-settle{from{transform:rotate(-60deg) scale(.3)}to{transform:none}}@keyframes ring-spark{50%{opacity:.15}}
@media(max-width:900px){.book-header{padding:14px 3%;gap:15px}.book-title{font-size:23px}.ring-case{width:280px}.map-caption{padding-top:18px}.cave-page{grid-template-columns:1fr minmax(340px,470px);gap:20px}.speech-paper{padding:23px 25px}.riddle-copy{font-size:25px}.gollum-hit{left:2%;width:32%}}
@media(max-width:650px){.book-header{min-height:150px;align-items:flex-start;flex-wrap:wrap;padding:14px 5% 12px;gap:14px}.book-title{font-size:24px;gap:8px}.book-title svg{width:32px;height:32px}.book-title small{font-size:12px}.ring-case{width:100%;padding:7px 12px 4px}.ring-case-caption{font-size:12px}.ring-case ol{justify-content:center;gap:22px;margin-top:4px}.ring-slot{height:29px;width:33px}.ring-slot>svg{height:28px;width:33px}.map-page{padding:0 3% 15px}.map-caption{padding:17px 3% 12px;align-items:flex-start;gap:10px;flex-wrap:wrap}.map-caption h1{font-size:29px}.map-caption p{font-size:15px;max-width:300px}.map-zoom{margin-left:auto}.map-zoom button{min-height:38px;padding:5px 10px;font-size:13px}.map-zoom button:not(#zoom-fit){font-size:20px;min-width:36px}.map-viewport{min-height:400px;height:calc(100svh - 385px)}.map-footer{padding:12px 4px;display:block}.map-footer p{font-size:14px}.map-footer button{margin-top:12px}.place-label{font-size:17px}.place-label small{font-size:12px}.cave-page{min-height:calc(100svh - 150px);display:block;padding:245px 5% 32px;overflow:hidden}.cave-backdrop{background-position:24% top;background-size:auto 640px;background-color:#344e4b}.cave-page:before{background:linear-gradient(transparent 200px,#344e4ba0 460px,#344e4b 640px)}.cave-title{top:65px;left:5%}.cave-title h1{font-size:31px}.cave-title p{font-size:15px}.back-to-map{top:22px;left:5%;font-size:16px}.gollum-hit{left:4%;top:119px;width:42%;height:160px;z-index:2}.gollum-hit span{font-size:17px;bottom:18px}.speech-paper{max-width:500px;margin:0 0 0 auto;padding:23px 24px;transform:rotate(.2deg)}.speech-paper:before{top:-12px;left:35px;border-left:1px solid #a29166;border-top:1px solid #a29166;border-bottom:0}.speech-heading{margin-bottom:10px}.riddle-copy{font-size:25px;line-height:1.4;margin-bottom:22px}.riddle-leaves{margin-bottom:16px}.answer-line{flex-wrap:wrap}.answer-line input{flex-basis:100%;width:100%}.answer-line .ink-button{width:100%;margin-top:5px}.ink-button{font-size:17px}.cave-water{height:40%;opacity:.5}.cave-mist{bottom:30%;width:140%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}.page-turn{display:none!important}}
/* The supplied illustrated map keeps the gift close to its references. */
.map-canvas { aspect-ratio:736 / 1137; }
.map-route { display:none; }
.gollum-place { left:56%;top:58%;width:15%;height:11%; }
.hobbiton { left:15%;top:86%; }
.rivendell { left:18%;top:65%; }
.rohan { left:52%;top:26%; }
.mordor { left:77%;top:12%; }
.volcano-smoke,.map-birds { display:none; }
.map-cloud { opacity:.15; }
.gollum-place { top:47%; }
h1:focus:not(:focus-visible) { outline:none; }
.gollum-hit {left:10%;top:auto;bottom:22%;width:185px;height:225px;filter:drop-shadow(7px 12px 5px #172c2a55);transform:rotate(-3deg);transition:transform .3s;}
.gollum-hit:before {content:'';position:absolute;inset:0;background:url('assets/character-reference.webp') 65% 93% / 490% auto no-repeat;clip-path:polygon(15% 1%,80% 0,98% 21%,95% 83%,82% 98%,15% 96%,2% 79%,4% 20%);border-radius:40% 45% 20% 20%;}
.gollum-hit:hover {transform:rotate(0deg) translateY(-3px);}
.gollum-hit span {bottom:-25px;}
@media(max-width:650px){.gollum-hit{left:6%;top:125px;bottom:auto;width:105px;height:128px;}.gollum-hit span{bottom:-12px}.cave-title{left:5%;top:65px}.cave-page{padding-top:285px}.cave-backdrop{background-position:15% top;}}
.gollum-hit:before {background-position:61% 94%;background-size:556% auto;}
