:root{color-scheme:light;font-family:Verdana,Arial,sans-serif;color:#182129;background:#edf0f2}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
a{color:#114974}
.reader-header,.controls,.header-actions,#jump{display:flex;align-items:center;gap:.65rem}
.reader-header{padding:.65rem max(1rem,3vw);min-height:3.8rem;background:#162936;color:#fff;flex-wrap:wrap}
.reader-header a{color:#fff}
.reader-header h1{font-size:clamp(.9rem,2vw,1.2rem);margin:0;flex:1 1 16rem}
.brand{font-size:1.15rem;font-weight:bold;text-decoration:none}
.header-actions{font-size:.82rem;flex-wrap:wrap}
.header-actions a{border:1px solid #a8b6be;border-radius:.4rem;padding:.5rem .65rem;text-decoration:none}
.header-actions a:hover{background:#345366}
.controls{justify-content:center;padding:.65rem .35rem;flex-wrap:wrap}
.controls button,.controls input,.cart-add{font:inherit;border:1px solid #a5b4be;border-radius:.4rem;background:#fff;color:inherit;min-height:2.4rem;padding:.35rem .6rem}
.controls button,.cart-add{cursor:pointer}
.controls button:disabled{cursor:default;opacity:.45}
.controls input{width:4rem}
.controls form{gap:.35rem}
.controls button[aria-pressed=true]{background:#dbeaf4;border-color:#40718f}
:focus-visible{outline:3px solid #ca6200;outline-offset:2px}
#reader-status{margin:.75rem auto;text-align:center}
.reader-search{max-width:75rem;margin:0 auto .8rem;padding:0 .8rem}
.reader-search form,.search-field,.search-summary,.search-actions{display:flex;align-items:center;gap:.5rem}
.reader-search form{justify-content:center;flex-wrap:wrap}
.reader-search label{font-size:.85rem;font-weight:bold}
.search-field{flex:0 1 32rem;min-width:0}
.reader-search input,.reader-search button{font:inherit;border:1px solid #a5b4be;border-radius:.4rem;min-height:2.4rem;padding:.4rem .6rem;background:#fff;color:inherit}
.reader-search input{flex:1;min-width:0;width:100%;font-size:.9rem}
.reader-search button{cursor:pointer;font-size:.85rem}
.reader-search button:disabled{cursor:default;opacity:.45}
.reader-search button[type=submit]{background:#235b78;color:#fff;border-color:#235b78}
#search-results{margin:.5rem auto 0;max-width:60rem;border:1px solid #c5d2dc;border-radius:.45rem;background:#fff;padding:.5rem .75rem}
.search-summary{justify-content:space-between;flex-wrap:wrap}
#search-status{font-size:.85rem;margin:.2rem 0}
.search-actions{margin-left:auto;flex-shrink:0}
#search-snippet{font-size:.82rem;line-height:1.45;color:#324b5c;margin:.4rem 0 .1rem;overflow-wrap:anywhere}
#search-snippet:empty{display:none}
#search-snippet mark{background:#ffdf86;color:#182129;border-radius:2px}
.reader-page.search-match .reader-art{outline:2px solid #ca6200;outline-offset:1px}
.reader-layout{display:flex;align-items:flex-start;justify-content:center;gap:1rem;margin:0 auto;padding:0 .65rem 1rem;max-width:1650px}
#spread{display:flex;justify-content:center;min-width:0;max-width:100%;touch-action:pan-y}
.reader-page{flex:0 1 auto;min-width:0;margin:0;transform-origin:left center}
.reader-art{position:relative;box-shadow:0 3px 18px #172e4430;background:#fff}
.reader-caption{margin:.55rem .35rem 0;color:#324b5c;font-size:.78rem;line-height:1.4;text-align:center}
.reader-page img{display:block;width:auto;max-width:100%;max-height:calc(100dvh - 8rem);height:auto;object-fit:contain}
.reader-art a,.reader-art button{position:absolute;display:block;border:0;padding:0;background:transparent;border-radius:2px;cursor:pointer}
.reader-art a:hover,.reader-art button:hover{background:#2978a429;box-shadow:inset 0 0 0 2px #17618a}
.reader-page.turn-next{animation:next .28s ease-out}
.reader-page.turn-prev{animation:prev .28s ease-out}
@keyframes next{from{transform:perspective(1000px) rotateY(-14deg);opacity:.72}}
@keyframes prev{from{transform:perspective(1000px) rotateY(14deg);opacity:.72}}
#spread.zoomed{display:block;flex:1;touch-action:auto}
#spread.zoomed .reader-page{width:fit-content;margin:0 auto .8rem}
#spread.zoomed img{max-height:none}
#page-products{background:#fff;border:1px solid #d2dce2;border-radius:.5rem;flex:0 0 min(25vw,22rem);max-height:calc(100dvh - 8rem);overflow:auto;padding:.85rem}
#page-products h2{font-size:1rem;margin:0 0 .55rem}
#products{list-style:none;margin:0;padding:0}
#products li{padding:.65rem 0;border-top:1px solid #dce4e9;scroll-margin:.4rem}
#products .product-link{font-size:.84rem;font-weight:bold;line-height:1.4}
#products .product-detail{display:block;font-size:.75rem;margin:.25rem 0;color:#324b5c}
.cart-add{font-size:.8rem;background:#16634f;color:#fff;border-color:#16634f;min-height:2.25rem}
.cart-add:disabled{background:#527267}
.reader-toast:empty{display:none}
.reader-toast{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);z-index:2;width:max-content;max-width:calc(100vw - 1rem);background:#162936;color:#fff;padding:.65rem .8rem;border-radius:.4rem;font-size:.85rem;box-shadow:0 3px 18px #16293666}
.reader-toast a{color:#fff;margin-left:.5rem}
#sections{font:inherit;padding:.35rem .55rem;border:1px solid #a5b4be;border-radius:.4rem;background:#fff;color:inherit;min-height:2.4rem;max-width:min(18rem,90vw)}
@media(max-width:960px){.reader-layout{display:block}#page-products{max-height:none;margin:.8rem auto 0;max-width:42rem}#spread{margin:0 auto}}
@media(max-width:610px){.reader-header h1{flex-basis:70%}.reader-page img{max-height:none}.header-actions{margin-left:auto}.reader-page{max-width:100%}}
@media(prefers-reduced-motion:reduce){.reader-page.turn-next,.reader-page.turn-prev{animation:none}}
