/* Stacking scale: notebook decoration and page content stay below the ribbon.
   Navigation and modal UI remain above it; transition ghosts stay with the page. */
:root{--z-border:1;--z-stitch:2;--z-page:4;--z-transition:5;--z-shelf:6;--z-ribbon:10;--z-nav:20;--z-menu:21;--z-overlay:1000}
:root{color-scheme:light;--paper:#f3eee2;--ink:#1b1815;--label:#6b4a1e}*{box-sizing:border-box}html,body{margin:0;min-height:100%;}body{background:#d2c8b6;color:var(--ink);font-family:'EB Garamond',Georgia,serif;display:grid;place-items:center;padding:20px}.notebook{position:relative;width:min(1100px,100%);height:min(850px,calc(100vh - 40px));min-height:0;background:#121212;border-radius:9px 17px 17px 9px;box-shadow:0 18px 45px #29231d55;overflow:hidden}.notebook:before,.page:before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.12;filter:url(#grain);background:#aaa}.notebook:after{content:'';position:absolute;right:26px;top:0;bottom:0;width:13px;background:#080808;box-shadow:2px 0 3px #0008,-1px 0 #333}.spine{position:absolute;left:27px;top:5%;bottom:5%;width:26px;border-left:1px solid #333;border-right:1px solid #080808;background:repeating-linear-gradient(to bottom,transparent 0 16px,#777 17px 18px,transparent 19px 32px);opacity:.6}.page{position:relative;height:100%;background:var(--paper);overflow:hidden;box-shadow:0 3px 9px #0008}.page:before{opacity:.045}.dots{position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#675d4f 0.65px,transparent .8px);background-size:18px 18px;opacity:.16}.page-inner{position:relative;z-index:1;width:min(610px,100%);margin:auto;padding:68px 42px 36px}.eyebrow,.field-label,button,.shelf,.notches{font-family:'IBM Plex Mono',ui-monospace,monospace}.eyebrow,.field-label{color:var(--label);font-size:11px;letter-spacing:.13em;font-weight:500}.eyebrow{margin:0 0 24px}.title{font-weight:400;font-size:clamp(38px,4.2vw,59px);line-height:1.02;letter-spacing:-.025em;margin:0 0 20px}.copy{font-size:20px;line-height:1.38;margin:0;max-width:540px}.divider{display:block;width:82px;height:20px;margin:21px auto;color:var(--label)}.field-label{display:block;letter-spacing:.05em;text-transform:none;margin-bottom:9px}input{display:block;width:100%;border:0;border-bottom:1px solid #524331;background:transparent;border-radius:0;padding:5px 3px 8px;color:var(--ink);font:italic 19px 'EB Garamond',Georgia,serif;outline-offset:5px;transform:rotate(-.3deg)}input::placeholder{color:#65594b;opacity:1}button{margin-top:22px;border:1px solid #29231d;background:#1b1815;color:#f3eee2;padding:13px 19px;font-size:10px;letter-spacing:.08em;cursor:pointer}button:focus-visible,input:focus-visible{outline:2px solid #6b4a1e;outline-offset:3px}.ribbon{position:absolute;z-index:var(--z-ribbon);pointer-events:none;top:0;right:13%;width:32px;height:161px;background:#6c3e2d;clip-path:polygon(0 0,100% 0,100% 100%,50% 89%,0 100%);box-shadow:1px 1px 4px #0005}.notches{display:flex;flex-direction:column;gap:5px;align-items:center;padding-top:12px}.notches i{display:block;width:9px;height:2px;background:#d9b59c88}.notches i.done{width:14px;background:#f3eee2}.shelf{scrollbar-color:#777 #121212;scrollbar-width:thin}.shelf-track{display:flex;align-items:end;gap:9px;min-width:max-content;height:100%;padding:0 4px 9px;border-bottom:1px solid #5b5650}.slot{width:43px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:5px;color:#aaa49a}.book,.empty{width:34px;position:relative}.book{border:1px solid #e5dfd2;color:#f3eee2;display:flex;align-items:center;justify-content:center}.book span{writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;letter-spacing:.03em;white-space:nowrap}.book.one{height:82px}.book.two{height:70px}.book.three{height:92px}.book.one:before{content:'◇◇◇';position:absolute;top:7px;font-size:6px;border-top:1px solid;border-bottom:1px solid;line-height:8px}.book.two:before{content:'';position:absolute;top:0;right:5px;width:5px;height:13px;border:1px solid #e5dfd2;border-top:0;clip-path:polygon(0 0,100% 0,100% 100%,50% 70%,0 100%)}.book.three:before,.book.three:after{content:'';position:absolute;left:2px;right:2px;border-top:1px solid #e5dfd2}.book.three:before{top:7px}.book.three:after{bottom:7px}.empty{height:82px;border:1px dashed #77736c}.letter{font-size:8px;opacity:.65}.cover-decoration{position:absolute;inset:12px 51px 130px 60px;color:#1e1e1e;pointer-events:none;filter:drop-shadow(0 -1px 0 #303030) drop-shadow(0 1px 0 #050505)}.cover-decoration svg{width:100%;height:100%}.draw{stroke-dasharray:800;stroke-dashoffset:0;animation:draw 1.2s cubic-bezier(.16,1,.3,1) both}@keyframes draw{from{stroke-dashoffset:800}to{stroke-dashoffset:0}}.page-frame{position:absolute;inset:22px;color:#493d2d;pointer-events:none;opacity:.76}.page-frame svg{width:100%;height:100%}.corner-hairline{position:absolute;top:20px;left:20px;width:33px;height:33px;border-top:1px solid #9c8a70;border-left:1px solid #9c8a70;opacity:.7}.filters{position:absolute;width:0;height:0;overflow:hidden}@media (prefers-reduced-motion:reduce){.draw{animation:none}}@media(max-width:600px){body{display:block;padding:0;background:#121212}.notebook{width:100%;height:100dvh;min-height:700px;border-radius:0;box-shadow:none}.notebook:after{right:2px;width:5px}.spine{left:2px;width:5px;opacity:.4}.page-inner{padding:63px 27px 28px}.title{font-size:39px}.copy{font-size:18px;line-height:1.3}.eyebrow{font-size:9px;margin-bottom:20px}.divider{margin:14px auto}.ribbon{right:12%;width:25px;height:145px}.notches{gap:4px}.cover-decoration{inset:1px 3px 124px}.page-frame{inset:10px}.page-b .page-inner{padding-left:35px;padding-right:35px}.page-b .title{font-size:36px}}

/* The cover margin carries the deboss; the paper frame occupies its own margin. */
@media (min-width:601px){
  .notebook{}
  .page-inner{padding-top:48px}
}
.ornament-frame{position:absolute;pointer-events:none;z-index:var(--z-border)}
.cover-frame{inset:0 20px 150px 58px;color:#383838;filter:drop-shadow(1px 1px 0 #070707) drop-shadow(-1px -1px 0 #3c3c3c)}
.paper-frame{inset:10px;color:#3a3126;opacity:.6}
.ornament-edge,.ornament-corner{position:absolute;display:block;background:currentColor}
.ornament-edge.top,.ornament-edge.bottom{left:48px;right:48px;height:24px;mask:var(--o-braid) left center / 60px 24px repeat-x}
.ornament-edge.top{top:15px}.ornament-edge.bottom{bottom:15px}
.ornament-edge.left,.ornament-edge.right{top:48px;bottom:48px;width:24px;mask:var(--o-key-vertical) center top / 24px 144px repeat-y}
.ornament-edge.left{left:15px}.ornament-edge.right{right:15px}
.cover-frame .left{display:none}
.ornament-corner{width:48px;height:48px;mask:var(--o-corner) center / contain no-repeat}
.ornament-corner.tl{top:3px;left:3px}.ornament-corner.tr{top:3px;right:3px;transform:scaleX(-1)}
.ornament-corner.bl{bottom:3px;left:3px;transform:scaleY(-1)}.ornament-corner.br{bottom:3px;right:3px;transform:scale(-1)}
.paper-frame .ornament-edge.top{top:4px}.paper-frame .ornament-edge.bottom{bottom:4px}
.paper-frame .ornament-edge.left{left:4px}.paper-frame .ornament-edge.right{right:4px}
.paper-frame .ornament-corner.tl{top:0;left:0}.paper-frame .ornament-corner.tr{top:0;right:0}
.paper-frame .ornament-corner.bl{bottom:0;left:0}.paper-frame .ornament-corner.br{bottom:0;right:0}
.page-b .page-inner{width:min(610px,calc(100% - 100px))}

.shelf-track{gap:0;padding:0 0 5px}
.slot{width:52px;flex:0 0 52px;gap:4px}
.book,.empty{width:43px;flex:none}
.book{background:#1c1a17;border-radius:8px 8px 2px 2px;overflow:hidden}
.book.one{height:120px}.book.two{height:106px}.book.three{height:134px}
.book span{position:absolute;top:27px;bottom:27px;left:0;right:0;display:flex;align-items:center;justify-content:center;font-size:8px;line-height:1;overflow:hidden}
.book.one:before,.book.two:before,.book.three:before,.book.three:after{content:'';position:absolute;left:2px;right:2px;width:auto;height:20px;border:0;border-bottom:1px solid #e5dfd2;clip-path:none;top:2px}
.book.one:before{background:#e5dfd2;mask:var(--o-ugalz) center / 34px 19px no-repeat}
.book.two:before{left:17px;right:auto;width:7px;height:16px;border:1px solid #e5dfd2;border-top:0;clip-path:polygon(0 0,100% 0,100% 100%,50% 70%,0 100%)}
.book.three:before{border-bottom:1px solid #e5dfd2}
.book.three:after{top:auto;bottom:2px;border:0;border-top:1px solid #e5dfd2;background:#e5dfd2;mask:var(--o-key) center / 38px 7px repeat-x}
.book.one:after,.book.two:after{content:'';position:absolute;left:2px;right:2px;bottom:20px;border-top:1px solid #e5dfd2}
.empty{height:134px;border-radius:8px 8px 2px 2px}
@media(max-width:600px){
  .notebook{}
  .cover-frame{inset:0 0 160px 0;opacity:.7}
  .cover-frame .ornament-edge,.cover-frame .ornament-corner{display:none}
  .page-b .page-inner{width:calc(100% - 48px);padding:58px 13px 24px}
  .paper-frame{inset:4px}
  .paper-frame .ornament-edge.top,.paper-frame .ornament-edge.bottom{left:34px;right:34px;height:15px;mask-size:37.5px 15px}
  .paper-frame .ornament-edge.left,.paper-frame .ornament-edge.right{top:34px;bottom:34px;width:15px;mask-size:15px 90px}
  .paper-frame .ornament-corner{width:32px;height:32px}
}

.book{background:linear-gradient(to bottom,transparent 22px,#e5dfd2 22px,#e5dfd2 23px,transparent 23px,transparent calc(100% - 23px),#e5dfd2 calc(100% - 23px),#e5dfd2 calc(100% - 22px),transparent calc(100% - 22px)),#1c1a17}.book span{font-size:7px;top:31px;bottom:31px}

.divider-ink{display:block;width:120px;height:24px;margin:18px auto;background:var(--label);mask:var(--o-divider) center / contain no-repeat;animation:reveal 1.2s cubic-bezier(.16,1,.3,1) both}
.ornament-frame .ornament-edge,.ornament-frame .ornament-corner{animation:reveal 1.4s cubic-bezier(.16,1,.3,1) both}
@keyframes reveal{from{clip-path:inset(0 100% 0 0);opacity:.2}to{clip-path:inset(0 0 0 0);opacity:1}}
@media (prefers-reduced-motion:reduce){.divider-ink,.ornament-frame .ornament-edge,.ornament-frame .ornament-corner{animation:none}}

@media (min-width:601px){
 .cover-frame .ornament-edge.bottom{display:none}
 .cover-frame .ornament-corner.bl,.cover-frame .ornament-corner.br{bottom:-147px}
}
.book.one{height:132px}.book.two{height:112px}.book.three{height:140px}
.book span{top:30px;bottom:26px}
.book.three:after{mask-size:auto 8px;-webkit-mask-size:auto 8px}
/* Live hunt layout and motion */
html,body{min-height:100dvh} .notebook{height:auto;min-height:0;overflow:visible;}.notebook:after{border-radius:0 12px 12px 0}.page{height:auto;min-height:0}.page-inner{padding-bottom:64px}.page-b .page-inner{width:min(610px,calc(100% - 100px))}.section{margin-top:-12px;line-height:1.5}.title-page .copy{margin:0 0 10px}.title-motif{display:block;width:76px;height:38px;background:var(--label);mask:var(--o-ugalz) center/contain no-repeat;margin:0 auto 15px}.corner-hairline{z-index:var(--z-border)}.error{font:12px 'IBM Plex Mono',ui-monospace,monospace;color:#6b4a1e;margin:8px 0 0;min-height:0}.error:empty{display:none}.shelf{overflow-x:auto}.slot .book{height:calc(134px * var(--height) / 100)}.book span{font-size:var(--text-size);text-overflow:ellipsis;white-space:nowrap}.book-ornament{position:absolute;display:block;left:3px;right:3px;top:3px;height:17px}.decor-0 .book-ornament{background:#e5dfd2;mask:var(--o-ugalz) center/contain no-repeat}.decor-1 .book-ornament{top:auto;bottom:5px;height:8px;background:#e5dfd2;mask:var(--o-key) center/auto 8px repeat-x}.decor-2 .book-ornament{left:17px;right:auto;width:7px;height:15px;border:1px solid #e5dfd2;border-top:0;clip-path:polygon(0 0,100% 0,100% 100%,50% 70%,0 100%)}.decor-3 .book-ornament{border-top:1px solid #e5dfd2;border-bottom:1px solid #e5dfd2;height:5px;top:8px}.arriving{animation:spine-in .6s cubic-bezier(.16,1,.3,1) both}.turning{transform-origin:left center;animation:turn .55s cubic-bezier(.16,1,.3,1) both;box-shadow:10px 3px 20px #0006}.entering{animation:enter .55s cubic-bezier(.16,1,.3,1) both}@keyframes enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes spine-in{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}.notebook:not(.first-load) .ornament-frame .ornament-edge,.notebook:not(.first-load) .ornament-frame .ornament-corner,.notebook:not(.first-load) .divider-ink{animation:none}.finale{padding-bottom:50px}.finale>.shelf{display:none}.final-content{position:relative;z-index:1}.shelf-board{display:flex;align-items:end;justify-content:center;gap:4px;min-height:290px;border-bottom:1px solid #b6ac9b;padding:0 0 8px}.shelf-board .slot{width:min(6.5%,58px);flex:1 1 0;height:270px}.shelf-board .book{width:100%;max-width:52px;height:calc(245px * var(--height) / 100);animation:final-in .5s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--index) * .08s)}.shelf-board .book span{font-size:calc(var(--text-size) + 1px);top:33px;bottom:30px}.shelf-board .letter{color:#f3eee2;opacity:1}.shelf-board .slot:last-child .letter{color:#d9b174}@keyframes final-in{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}.bookplate{position:relative;background:var(--paper);border:4px double #6b4a1e;text-align:center;padding:48px 55px;margin:40px auto 0;max-width:650px}.bookplate .eyebrow{margin:0}.bookplate .copy{white-space:pre-wrap}.plate-corner{position:absolute;width:40px;height:40px;background:var(--label);mask:var(--o-corner) center/contain no-repeat}.plate-corner.tl{top:4px;left:4px}.plate-corner.tr{top:4px;right:4px;transform:scaleX(-1)}.plate-corner.bl{bottom:4px;left:4px;transform:scaleY(-1)}.plate-corner.br{bottom:4px;right:4px;transform:scale(-1)}.caption{text-align:center;color:#e5dfd2;font:11px 'IBM Plex Mono',ui-monospace,monospace;letter-spacing:.1em}.actions{text-align:center}.actions button{margin:10px 4px;border-color:#e5dfd2}.actions .reset{border:0;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}#print-view{display:none}.static *, .static *:before,.static *:after{animation:none!important;transition:none!important}@media(prefers-reduced-motion:reduce){.turning{animation:fade-out .2s both}.entering{animation:fade-in .2s both}.arriving,.shelf-board .book{animation:fade-in .2s both;animation-delay:0s}@keyframes fade-out{to{opacity:0}}@keyframes fade-in{from{opacity:0}to{opacity:1}}}
@media(max-width:600px){body{min-height:100dvh}.notebook{min-height:100dvh;height:auto;overflow:hidden}.page{min-height:0}.page-b .page-inner{width:calc(100% - 48px);padding:58px 13px 35px}.page-b .title{font-size:36px}.notebook:after{right:2px}.notebook button{min-height:44px}.finale{padding:20px 10px}.shelf-board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px 3px;min-height:0}.shelf-board .slot{width:100%;height:190px}.shelf-board .book{height:calc(165px * var(--height) / 100);max-width:43px}.shelf-board .book span{font-size:6px;top:29px;bottom:27px}.bookplate{padding:45px 35px;margin-top:30px}.actions button{display:block;margin:10px auto}.ribbon{z-index:var(--z-ribbon)}}
@media print{@page{size:A4 portrait;margin:16mm}body{display:block;background:white;color:black;padding:0}.notebook,.filters,#announcement{display:none!important}#print-view{display:block;font-family:'EB Garamond',Georgia,serif}#print-view h1{font-size:28pt}#print-view ol{columns:2;font-size:13pt;line-height:1.5;padding-left:24px}#print-view li{break-inside:avoid}#print-view p{white-space:pre-wrap}.print-shelf{display:flex;align-items:end;border-bottom:1px solid #111;gap:3px;margin-top:20px}.print-shelf .slot{width:24px;height:90px;flex:0 0 24px;color:black}.print-shelf .book{width:20px;height:calc(75px * var(--height) / 100);background:white!important;border-color:black;color:black;animation:none}.print-shelf .book span{font-size:4px;top:10px;bottom:10px}.print-shelf .book-ornament{display:none}.print-shelf .letter{color:black;opacity:1}*{animation:none!important;transition:none!important}}

.shelf .book span{top:22px;bottom:20px;font-size:min(var(--text-size,7px),6.4px)}
.notebook.finale .ribbon{display:none}

/* Readable book spines and lookup choices. */
@media(min-width:601px){.notebook.finale{padding-bottom:50px}.cover-frame{bottom:210px}}
.shelf-track{padding-bottom:7px}.slot{width:62px;flex-basis:62px}.slot .book,.shelf-board .book{width:56px;max-width:none;height:var(--height);text-decoration:none;display:block;flex:none;overflow:hidden;border-radius:4px 5px 3px 3px}
.book:focus-visible{outline:3px solid #f3eee2;outline-offset:3px;z-index:2}
.book .book-title,.shelf .book .book-title,.shelf-board .book .book-title{position:absolute;top:14px;bottom:50px;left:9px;right:9px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;writing-mode:vertical-rl;transform:none;white-space:normal;overflow:hidden;overflow-wrap:anywhere;text-overflow:ellipsis;color:#f3eee2;font:500 11px/1.15 'EB Garamond',Georgia,serif;letter-spacing:normal}
.book.no-author .book-title{bottom:20px;align-content:center}
.book .book-author,.shelf .book .book-author,.shelf-board .book .book-author{position:absolute;top:auto;bottom:17px;left:9px;right:9px;height:30px;display:block;writing-mode:vertical-rl;transform:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#d9c9a0;font:500 8.5px/1 'IBM Plex Mono',monospace;letter-spacing:.06em;text-transform:uppercase}
.book .book-ornament,.decor-0 .book-ornament,.decor-1 .book-ornament,.decor-2 .book-ornament,.decor-3 .book-ornament{position:absolute;top:auto;bottom:7px;left:20%;right:20%;width:auto;height:7px;border:0;clip-path:none;background:var(--gold);mask:var(--o-ugalz) center/contain no-repeat}
.shelf-board{min-height:220px;overflow-x:auto;justify-content:flex-start}.shelf-board .slot{width:62px;flex:0 0 62px;height:210px}.shelf-board .book{animation:final-in .5s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--index) * .08s)}
#lookup-status{font:12px 'IBM Plex Mono',monospace;color:var(--label)}#lookup-status:empty{display:none}button:disabled{opacity:.5;cursor:wait}#confirmation fieldset{border:0;padding:0;margin:16px 0 0}#confirmation legend{font-size:20px;margin-bottom:10px}.candidate{display:flex;align-items:center;gap:10px;padding:6px;border-bottom:1px solid #c9bda7;cursor:pointer}.candidate input{width:auto;flex:none;transform:none}.candidate strong,.candidate span span{display:block}.candidate strong{font-size:17px}.candidate span span{font:10px/1.4 'IBM Plex Mono',monospace}.cover{width:36px;height:54px;flex:none;position:relative;border:1px solid #a78037;background:#e4d8bf;display:grid;place-items:center;color:#6b4a1e}.cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.text-button{background:none;color:var(--ink);border:0;text-decoration:underline;margin-left:8px}.shelf-list{max-width:780px;margin:32px auto;color:var(--paper)}.shelf-list h2{font-weight:500}.shelf-list ol{list-style:none;padding:0}.shelf-list li{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:10px 0;border-bottom:1px solid #ffffff33}.shelf-list strong,.row-author,.row-isbn,.shelf-list a{display:block}.row-letter,.row-isbn,.shelf-list a{font:11px/1.6 'IBM Plex Mono',monospace}.shelf-list a{color:#f3eee2;text-decoration:underline}.row-isbn{user-select:text}
@media(max-width:600px){.slot{width:54px;flex-basis:54px}.slot .book,.shelf-board .book{width:48px;height:var(--height);max-width:none}.book .book-title,.shelf .book .book-title,.shelf-board .book .book-title{font-size:10px}.shelf-board{display:flex;gap:0;overflow-x:auto}.shelf-board .slot{width:54px;flex:0 0 54px;height:210px}.shelf-list{padding:0 12px}.page-b .page-inner{overflow-wrap:anywhere}}
@media print{.print-shelf{overflow:visible}.print-shelf .slot{width:36px;flex-basis:36px;height:200px}.print-shelf .book{width:32px;height:var(--height);print-color-adjust:exact;-webkit-print-color-adjust:exact}.print-shelf .book .book-title{font-size:10px;color:#000}.print-shelf .book .book-author{font-size:8.5px;color:#000}.print-shelf .book:before,.print-shelf .book:after{border-color:#000}}
/* Title and author occupy separate columns so each has the spine's height. */
.book .book-title,.shelf .book .book-title,.shelf-board .book .book-title{left:17px;right:6px;bottom:19px}
.book .book-author,.shelf .book .book-author,.shelf-board .book .book-author{top:18px;bottom:17px;left:5px;right:auto;width:10px;height:auto}
.book.no-author .book-title{left:9px;right:9px}

/* Paper wastebasket and shelf interactions. */
.bin-area{position:absolute;right:12px;bottom:12px;width:64px;height:70px;z-index:5}
.paper-bin{display:block;width:100%;height:100%;transform-origin:50% 90%;overflow:visible}
.bin-bubble{position:absolute;bottom:76px;right:0;padding:4px 7px;background:#eee3cc;border:1px solid #b8985e;color:#29231d;font:11px 'IBM Plex Mono',monospace;white-space:nowrap;opacity:0;pointer-events:none}
.bin-bubble:after{content:'';position:absolute;right:12px;bottom:-5px;width:7px;height:7px;background:#eee3cc;border-right:1px solid #b8985e;border-bottom:1px solid #b8985e;transform:rotate(45deg)}
.undo-toss{position:absolute;right:70px;bottom:8px;margin:0;padding:5px;color:#e9ddc4;background:#1b1815;border:0;text-decoration:underline;white-space:nowrap;font-size:10px}
.undo-toss[hidden]{display:none}
.slot{position:relative}.toss{position:absolute;z-index:3;top:0;left:50%;transform:translateX(-50%);width:32px;height:32px;min-height:32px;margin:0;padding:7px;border:0;border-radius:50%;background:#1b1815;opacity:0;transition:opacity .18s ease-out}.toss svg{width:100%;height:100%;fill:none;stroke:#d1b16d;stroke-width:1.2}.slot:hover .toss,.slot:focus-within .toss{opacity:1}.book{transform-origin:bottom center;transition:transform .18s ease-out,box-shadow .18s ease-out}.slot:hover .book,.slot:focus-within .book{transform:translateY(-6px) rotate(-2deg);box-shadow:0 8px 12px #0008}
.toss-clone,.toss-ball{position:fixed!important;z-index:100;pointer-events:none;margin:0!important}.toss-ball{width:28px;height:28px}.toss-ball svg{display:block;width:100%;height:100%}
.arriving{animation:spine-arrival .6s ease-out both!important}@keyframes spine-arrival{0%{opacity:0;transform:translateY(-24px)}75%{opacity:1;transform:translateY(2px)}100%{opacity:1;transform:translateY(0)}}
.ribbon.sway{transform-origin:top center;animation:ribbon-sway .7s ease-out}@keyframes ribbon-sway{0%{transform:rotate(-2.5deg)}50%{transform:rotate(1.2deg)}100%{transform:rotate(0)}}
#screen{position:relative}.turning{position:absolute;inset:0;z-index:4;transform-origin:left center;animation:leaf-turn .55s ease-out both;pointer-events:none}.turning:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 20%,#34281744 55%,#fff8e96b 96%);animation:leaf-shade .55s ease-out both}@keyframes leaf-turn{to{transform:scaleX(.05);opacity:.25}}@keyframes leaf-shade{from{transform:translateX(-80%)}to{transform:translateX(80%)}}
@media(hover:none){.toss{width:44px;height:44px;min-height:44px;padding:13px;opacity:.7}}
@media(max-width:600px){.bin-area{width:44px;height:48px;right:7px;bottom:7px}.bin-bubble{bottom:53px}.undo-toss{right:48px}.shelf{width:calc(100% - 54px);margin-bottom:50px}.notebook.finale{padding-bottom:70px}.shelf-board{margin-right:0}}
@media(prefers-reduced-motion:reduce){.slot:hover .book,.slot:focus-within .book{transform:none;box-shadow:none}.book,.toss{transition:none}.arriving{animation:fade-in .15s both!important}.ribbon.sway{animation:none}}
.static .slot:hover .book,.static .slot:focus-within .book{transform:none;box-shadow:none}
@media print{.bin-area,.toss{display:none!important}}
.static .arriving{animation:none!important}

.toss{top:auto;bottom:calc(var(--height) - 12px)}

/* Clue navigation and saved pick details. */
.clue-letter,.shelf-board .clue-letter{margin:0;padding:2px 5px;border:0;background:transparent;color:#d8cbb5;font-size:10px;line-height:1;opacity:.8;min-height:0}
.clue-letter.viewed,.shelf-board .clue-letter.viewed{color:#e3be70;opacity:1;text-decoration:underline;text-decoration-color:#d9b174;text-underline-offset:4px;text-decoration-thickness:2px}
.clue-letter:disabled,.clue-nav button:disabled{cursor:default}
.notches i.viewed{width:16px;background:#e5bd69;box-shadow:0 0 3px #e5bd69}
.pick-card .text-button{margin:0;padding:10px 0;letter-spacing:.03em}
.pick-card{overflow-wrap:anywhere}.pick-details{display:flex;align-items:center;gap:12px}.pick-details strong,.pick-details span span,.pick-details a{display:block}.pick-details a{color:var(--label)}
.turning-back{transform-origin:right center}.turning-back:after{transform:scaleX(-1);animation-name:leaf-shade-back}@keyframes leaf-shade-back{from{transform:translateX(80%) scaleX(-1)}to{transform:translateX(-80%) scaleX(-1)}}
.bookplate .note-paragraph,#print-view .note-paragraph{white-space:normal;overflow-wrap:anywhere}.note-paragraph + .note-paragraph{margin-top:1em}
@media(max-width:600px){.notebook .clue-letter{min-height:32px;min-width:32px}}

/* First-load ornaments grow outward from the middle (not a left-to-right wipe). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes reveal-x { from { clip-path: inset(0 50% 0 50%); opacity: .2 } to { clip-path: inset(0 0 0 0); opacity: 1 } }
  @keyframes reveal-y { from { clip-path: inset(50% 0 50% 0); opacity: .2 } to { clip-path: inset(0 0 0 0); opacity: 1 } }
  @keyframes corner-in { from { opacity: 0; transform: scale(.7) } to { opacity: 1; transform: none } }
  .notebook.first-load .ornament-edge.top, .notebook.first-load .ornament-edge.bottom, .notebook.first-load .divider-ink { animation: reveal-x 1.2s cubic-bezier(.16,1,.3,1) both }
  .notebook.first-load .ornament-edge.left, .notebook.first-load .ornament-edge.right { animation: reveal-y 1.2s cubic-bezier(.16,1,.3,1) .1s both }
  .notebook.first-load .ornament-frame .ornament-corner { animation: corner-in .6s cubic-bezier(.16,1,.3,1) .7s both }
}

/* Center the how-it-works page within the existing paper frame. */
.start-page{display:flex;align-items:center}
.page-b .start-inner{width:min(610px,calc(100% - 100px));padding:48px 24px;text-align:center}
.start-inner .eyebrow{margin:0 0 12px}
.start-inner .title{margin:0}
.start-inner .divider-ink{margin:12px auto}
.start-inner .copy{margin:0 auto}
.start-steps{max-width:430px;margin:22px auto;padding:0;list-style:none;text-align:left;display:grid;gap:12px}
.start-steps li{display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;align-items:start;font-size:19px;line-height:1.25}
.start-number{display:grid;place-items:center;width:27px;height:27px;border:1px solid var(--label);border-radius:50%;color:var(--label);font:16px/1 'EB Garamond',Georgia,serif}
.start-inner .start-closer{max-width:430px;font-size:18px}
.start-inner button{margin-top:20px}
.start-inner .start-status{margin:14px auto 0;font-size:16px}
.start-inner .shelf-list{max-width:430px;margin:24px auto 0;text-align:left}
@media (prefers-reduced-motion:no-preference){
  .start-line{animation:start-enter .45s ease-out both;animation-delay:calc(var(--line) * 60ms)}
  @keyframes start-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
}
@media(max-width:600px){
  .page-b .start-inner{width:calc(100% - 48px);padding:44px 13px}
  .start-steps li{font-size:18px}
}

/* Fallback route ghosts have an inline z-index of 900. Their content belongs
   below the ribbon, even while opacity and transform create stacking contexts. */
body > :is(.page-inner,.library-card,.final-content)[aria-hidden="true"][inert]{z-index:var(--z-transition)!important}

.start-fine{max-width:430px;margin:12px auto 0;font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:11px;line-height:1.55;letter-spacing:.02em;color:#6b5a3a;text-align:center}

/* Clue navigation stays inside the paper frame. */
.clue-nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:6px;margin-top:15px}
.clue-nav button{min-width:44px;min-height:44px;margin:0;padding:8px 5px;border:1px solid #a78037;background:transparent;color:var(--ink);font-size:10px;letter-spacing:.03em}
.clue-nav button:first-child{justify-self:start}.clue-nav button:last-child{justify-self:end}
.clue-nav span{font:10px/1.3 'IBM Plex Mono',monospace;white-space:nowrap;text-align:center}
@media(max-width:600px){.page-b .page-inner:has(.clue-nav){padding-bottom:50px}.clue-nav{gap:4px}.clue-nav button{font-size:9px;letter-spacing:0}}

/* Desktop entry pages fill the remaining viewport and grow for longer content. */
@media (min-width:601px){
  body:has(.notebook.entry-page){display:block;padding:0}
  .notebook.entry-page{min-height:calc(100dvh - var(--nav-h));height:auto;padding:clamp(20px,3dvh,36px) 76px;display:flex;flex-direction:column}
  .entry-page #screen{display:flex;flex:1;flex-direction:column}
  .entry-page #screen>.page,.entry-page #screen>.auth-layer{flex:1;min-height:0}
}

/* The home line follows the envelope and shares its centre. */
.title-page .home-tagline{margin:0 auto 10px;text-align:center}
@media (prefers-reduced-motion:no-preference){html:not(.static) .home-tagline{animation:start-enter .45s ease-out .3s both}}

/* The page and shelf occupy separate rows. The shelf includes room for lifted books. */
.notebook{--shelf-h:clamp(150px, 24dvh, 245px);--shelf-lift-space:16px;padding-top:56px;padding-right:76px;padding-left:90px;display:flex;flex-direction:column;overflow:visible;padding-bottom:15px}
.notebook #screen{display:flex;flex:1 0 auto;flex-direction:column;min-width:0}
.notebook #screen>.page{flex:1 0 auto;height:auto}
.notebook>.shelf{position:relative;z-index:var(--z-shelf);left:auto;right:auto;bottom:auto;flex:0 0 var(--shelf-h);height:var(--shelf-h);width:calc(100% - 12px);margin-top:16px;padding-top:var(--shelf-lift-space);overflow-x:auto;overflow-y:hidden}
@media(max-width:600px){.notebook{padding-top:10px;padding-right:10px;padding-left:10px}.notebook>.shelf{width:calc(100% - 54px);margin-bottom:50px}}

/* Desktop height budget: content can grow, pushing the shelf down naturally. */
@media (min-width:601px){
  body{display:block;padding:0}
  .notebook.finale{margin:0 auto}
  .notebook:not(.entry-page):not(.finale){min-height:calc(100dvh - var(--nav-h));margin:0 auto;padding-top:clamp(24px,4dvh,40px);padding-bottom:10px}
  .notebook:not(.entry-page):not(.finale)>.shelf{margin-top:8px}
  .page-b .page-inner:has(.clue-nav){padding-top:clamp(24px,4dvh,36px);padding-bottom:clamp(20px,3dvh,30px)}
  .page-inner:has(.clue-nav) .eyebrow{margin-bottom:clamp(8px,1.5dvh,14px)}
  .page-inner:has(.clue-nav) .section{margin-top:0}
  .page-inner:has(.clue-nav) .title{font-size:43px;margin-bottom:clamp(10px,1.8dvh,16px)}
  .page-inner:has(.clue-nav) .copy{font-size:20px;line-height:1.3}
  .page-inner:has(.clue-nav) .divider-ink{height:20px;margin:clamp(8px,1.5dvh,14px) auto}
  .page-inner:has(.clue-nav) .field-label{margin-bottom:5px}
  .page-inner:has(.clue-nav) form>button{margin-top:clamp(10px,1.5dvh,14px);padding:10px 19px}
  .page-inner:has(.clue-nav) .clue-nav{margin-top:clamp(8px,1.5dvh,12px)}
  .page-b .start-inner{padding:clamp(20px,3dvh,36px) 24px}
  .start-steps{margin:clamp(10px,2dvh,18px) auto;gap:clamp(5px,1dvh,9px)}
  .start-inner button{margin-top:clamp(10px,2dvh,18px)}
  .start-inner .start-status{margin-top:8px}
}
@media (min-width:601px) and (max-height:800px){
  .page-inner:has(.clue-nav) .title{font-size:34px}
  .page-inner:has(.clue-nav) .copy{font-size:18px;line-height:1.2}
  .page-b .title-page{padding-top:clamp(24px,4dvh,36px);padding-bottom:24px}
  .title-page .birthday-envelope{margin-bottom:12px}
  .page-b .start-inner{padding-top:20px;padding-bottom:20px}
  .start-inner .eyebrow{margin-bottom:6px}
  .start-inner .title{font-size:34px}
  .start-inner .divider-ink{height:16px;margin:6px auto}
  .start-inner .start-intro{font-size:18px;line-height:1.2}
  .start-steps{margin:10px auto;gap:5px}
  .start-steps li{font-size:17px;line-height:1.15}
  .start-inner .start-closer{font-size:17px;line-height:1.2}
  .start-fine{margin-top:8px;line-height:1.35}
}
@media(max-width:600px){.notebook{--shelf-h:245px}}

.eyebrow.home-date{text-align:right}

.title.home-title{text-align:center}

.page-inner > .eyebrow{max-width:calc(100% - 64px);overflow-wrap:anywhere}
.page-inner > .eyebrow.home-date{max-width:none}

/* Center the content within the paper, retaining safe space for the frame.
   Auto margins collapse to zero when content grows beyond the available height. */
.page{display:flex;flex-direction:column;justify-content:center;align-items:center}
.page-inner{flex:0 0 auto;margin:auto;max-width:100%;padding:36px 42px}
.page-b .page-inner{margin:auto;padding:36px 24px}
@media (min-width:601px){
  .page-b .page-inner:has(.clue-nav),.page-b .start-inner,.page-b .title-page{padding:clamp(24px,4dvh,36px) 24px}
}
@media(max-width:600px){
  .page-b .page-inner,.page-b .page-inner:has(.clue-nav),.page-b .start-inner{padding:40px 13px}
}

/* The braid reaches 38px into desktop paper and 23px into mobile paper.
   Keep 28px beyond it, including when content makes the paper grow. */
.page-inner,.page-b .page-inner,.page-b .page-inner:has(.clue-nav),.page-b .start-inner,.page-b .title-page{
  padding-block:clamp(66px,7.4dvh,72px)
}
@media(max-width:600px){
  .page-inner,.page-b .page-inner,.page-b .page-inner:has(.clue-nav),.page-b .start-inner,.page-b .title-page{padding-block:clamp(51px,6dvh,60px)}
}

/* Height budget for the instructions; the shelf and all copy remain in flow. */
.page-b .start-inner{width:min(610px,calc(100% - 100px))}
.start-inner .eyebrow{margin-bottom:clamp(4px,.8dvh,8px)}
.page-b .start-inner .title{font-size:clamp(36px,6.22dvh,56px);line-height:clamp(1em,5.8dvh,1.05em);margin:0}
.start-inner .divider-ink{height:clamp(14px,2dvh,20px);margin:clamp(4px,.8dvh,8px) auto}
.start-inner .start-intro{font-size:clamp(17px,2.2dvh,20px);line-height:clamp(1.2em,2.7dvh,1.35em)}
.start-steps{width:100%;max-width:520px;margin:clamp(6px,1.1dvh,10px) auto;gap:clamp(3px,.6dvh,6px)}
.start-steps li{grid-template-columns:clamp(28px,3.8dvh,34px) minmax(0,1fr);gap:clamp(7px,1.1dvh,10px);font-size:clamp(17px,2.45dvh,22px);line-height:clamp(1.3em,2.8dvh,1.4em)}
.start-number{width:clamp(28px,3.8dvh,34px);height:clamp(28px,3.8dvh,34px)}
.start-inner .start-closer{max-width:520px;font-size:clamp(15px,2dvh,18px);line-height:clamp(1.2em,2.5dvh,1.35em)}
.start-inner .start-fine{max-width:520px;margin:clamp(5px,.8dvh,8px) auto 0;font-size:clamp(10px,1.22dvh,11px);line-height:clamp(1.25em,1.7dvh,1.5em)}
.start-inner button{margin-top:clamp(6px,1.1dvh,10px);min-height:44px}
.start-inner .start-status{margin:clamp(4px,.7dvh,7px) auto 0;font-size:clamp(14px,1.8dvh,16px);line-height:1.2}
@media(max-width:600px){.page-b .start-inner{width:calc(100% - 48px)}}
