/* Left-to-right book navigation. Paper height and the fixed toolbar stay owned by journey.css. */
.book-reader-frame{position:relative;max-width:1200px;margin:auto}
.book-reader-frame.has-genre-tabs{padding:0 114px}
.book-genre-tabs{position:absolute;inset:3px 0 auto;display:grid;grid-template-columns:112px minmax(0,1fr) 112px;height:var(--book-paper-height,780px);pointer-events:none;z-index:9}
.book-genre-rail{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:20px;align-content:start;min-width:0;padding:20px 0;pointer-events:auto}
.book-genre-left{grid-column:1}.book-genre-right{grid-column:3}
.book-genre-tab{display:flex;align-items:center;gap:3px;width:100%;min-width:0;max-width:100%;overflow:hidden;height:20px;min-height:20px;padding:1px 3px;border:1px solid #cbb99b;border-right:0;border-radius:3px 0 0 3px;background:var(--chapter-light,#e8dfca);color:#64543e;font-size:11px;line-height:16px;text-align:left;white-space:nowrap;box-shadow:0 1px 0 #fff8}
.book-genre-right .book-genre-tab{border-right:1px solid #cbb99b;border-left:0;border-radius:0 3px 3px 0}
.genre-tab-label{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis}.genre-tab-count{font-size:9px;font-variant-numeric:tabular-nums;opacity:1;flex:none}
.book-genre-tab:hover{background:#fff6db;color:#514128}.book-genre-tab[aria-current=page]{background:var(--chapter,#856238);color:#fffdf5;font-weight:700;box-shadow:inset 3px 0 #fff7d4}
.book-genre-tab:focus-visible{position:relative;z-index:2;outline:3px solid #936b31;outline-offset:1px}
.book-genre-mobile{display:none}
#book-prev{grid-column:1;grid-row:1;justify-self:start}#book-page-position{grid-column:2;grid-row:1}#book-next-page{grid-column:3;grid-row:1;justify-self:end}
#book-panel .paper-corner{left:auto;right:2px;background:linear-gradient(315deg,#dbcbb1 0 20%,#f3e7cf 21% 43%,transparent 44%);border-radius:8px 0 3px 0}
#library-panel .library-covers{align-items:stretch;column-gap:28px;row-gap:34px;padding-bottom:29px}
#library-panel .shelf-book{position:relative;display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:12px;padding:4px 5px 10px;transition:transform .18s,filter .18s}
#library-panel .shelf-book:after{content:"";position:absolute;left:-14px;right:-14px;bottom:-10px;height:13px;background:linear-gradient(#c7b08c,#b39972 65%,#9f835c);border-top:2px solid #dac6a6;border-radius:1px;box-shadow:0 5px 8px #543d241a;pointer-events:none}
#library-panel .shelf-book .cover-face{flex:1;min-height:290px;border-left:7px solid var(--chapter,#8c7854);border-right:1px solid #d1bca0;border-radius:2px 7px 7px 2px;box-shadow:3px 3px 0 #e5d7bc,5px 5px 0 #cbb999,7px 8px 13px #5742211a}
.shelf-take{font-size:11px;color:#806d50;letter-spacing:.04em}
#library-panel .shelf-book:hover{transform:translateY(-5px)}
#library-panel .shelf-book:focus-visible{outline-offset:7px}
#library-panel .shelf-taking{animation:take-from-shelf .18s ease-in forwards;pointer-events:none;opacity:1}
#library-panel .shelf-taking:after{visibility:hidden}
.book-just-taken{animation:place-book .25s ease-out}
.reader-cover .cover-face{border-left:11px solid var(--chapter,#8c7854);border-right:1px solid #d1bca0;border-radius:2px 7px 7px 2px}
@keyframes take-from-shelf{from{transform:translateY(0) scale(1)}to{transform:translateY(-10px) scale(1.035);filter:drop-shadow(0 8px 8px #65462822)}}
@keyframes place-book{from{opacity:.72;transform:translateY(7px)}to{opacity:1;transform:none}}

/* The book moves; its shelf remains stationary. */
#library-panel .shelf-book:hover{transform:none}#library-panel .shelf-book .cover-face{transition:transform .18s,filter .18s}#library-panel .shelf-book:is(:hover,:focus-visible) .cover-face{transform:translateY(-5px)}#library-panel .shelf-taking{animation:none}#library-panel .shelf-taking .cover-face{animation:take-from-shelf .18s ease-in forwards}#library-panel .shelf-taking:after{visibility:visible}
@media(max-width:900px){
 .book-reader-frame.has-genre-tabs{padding:44px 0 0}.book-genre-tabs{inset:0 0 auto;display:block;height:40px;pointer-events:auto}.book-genre-rail{display:none}.book-genre-mobile{position:relative;display:block;height:40px}
 .book-genre-mobile>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;height:40px;padding:7px 12px;background:#eee5d2;border:1px solid #cebc9d;border-radius:4px;color:#64543e;font-size:12px}.book-genre-mobile>summary:before{content:'＋';font-size:16px}.book-genre-mobile[open]>summary:before{content:'−'}.genre-mobile-current{margin-left:auto;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
 .book-genre-grid{position:absolute;top:44px;left:0;right:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;max-height:360px;overflow:auto;overscroll-behavior:contain;padding:10px;background:#fffaf0;border:1px solid #cbb99b;border-radius:4px;box-shadow:0 8px 20px #46321c33;z-index:40}
 .book-genre-choice{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;min-height:44px;padding:7px;background:var(--chapter-light,#eee5d2);border:1px solid #d2c0a2;color:#64543e;border-radius:3px;font-size:11px;text-align:left}.book-genre-choice[aria-current=page]{background:var(--chapter,#856238);color:#fff}.genre-preparing-note{grid-column:1/-1;font-size:10px;margin:5px 0}.book-genre-choice .genre-tab-label{white-space:normal;overflow-wrap:anywhere}.book-genre-choice .genre-tab-count{font-size:9px}
}
@media(max-width:650px){
 #book-panel .book-spread-open>.book-paper[data-side=left]{border-radius:5px 5px 0 0;border-bottom:4px double #d6c3a3}#book-panel .book-spread-open>.book-paper[data-side=right]{border-radius:0 0 5px 5px;border-bottom:0}
 #library-panel .shelf-book .cover-face{min-height:270px}#library-panel .library-covers{column-gap:20px}#library-panel .shelf-book:after{left:-10px;right:-10px}
}
@media(prefers-reduced-motion:reduce){#library-panel .shelf-book,#library-panel .shelf-book .cover-face{transition:none!important;animation:none!important}#library-panel .shelf-book:is(:hover,:focus-visible) .cover-face{transform:none}.shelf-taking,.book-just-taken{animation:none!important}}

/* Wide desks retain the original full-width paper, with the notes outside it. */
@media(min-width:1480px){.book-reader-frame.has-genre-tabs{padding:0}.book-genre-tabs{left:-114px;right:-114px}}
