:root{color-scheme:light;--ink:#18252b;--muted:#647178;--accent:#a45c35;--line:#d8d8d3;--base:#f5f4f1}
*{box-sizing:border-box}
html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden}
body{font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--base);-webkit-font-smoothing:antialiased}
button{font:inherit}
.viewer{height:100dvh;min-height:360px;display:flex;flex-direction:column;overflow:hidden;background:#f6f4f0}
.viewer-header{height:76px;flex:0 0 76px;display:flex;justify-content:space-between;align-items:center;padding:0 clamp(17px,3vw,46px);background:#fbfaf7;border-bottom:1px solid rgba(31,37,38,.06);z-index:1}
.brand-lockup{display:flex;align-items:center;gap:14px;min-width:0}
.brand-dot{width:13px;height:13px;border:3px solid var(--accent);border-radius:4px;transform:rotate(45deg);flex:none}
.brand-titles{min-width:0}
.catalog-title{font-weight:750;letter-spacing:-.035em;font-size:clamp(16px,1.9vw,24px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.catalog-subtitle{font-size:9px;color:#93938d;letter-spacing:.2em;font-weight:750;margin-top:4px;white-space:nowrap}
.bullet{color:var(--accent);margin:0 4px}
.header-help{font-size:10px;color:#9e8a74;letter-spacing:.17em;font-weight:750;white-space:nowrap}
.sparkle{color:var(--accent);font-size:15px;margin-right:6px}
.stage{position:relative;display:flex;min-height:0;flex:1;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(ellipse 50% 70% at 50% 42%,#fdfbf7 0%,#f6f2ec 52%,#e7e5e1 100%)}
.stage:after{content:"";pointer-events:none;position:absolute;bottom:0;left:14%;right:14%;height:28px;background:radial-gradient(ellipse at center,rgba(23,22,19,.15),transparent 72%);filter:blur(12px)}
.stage-glow{position:absolute;inset:8%;border:1px solid rgba(255,255,255,.22);border-radius:28px;pointer-events:none}
.book-frame{position:relative;width:calc(100% - 38px);height:calc(100% - 38px);display:flex;align-items:center;justify-content:center;z-index:1}
.book{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}
.catalog-page{background:#fff;overflow:hidden;box-shadow:inset 0 0 1px rgba(40,40,40,.25);border:1px solid rgba(30,35,33,.12)}
.catalog-page img{width:100%;height:100%;display:block;object-fit:fill;user-select:none;pointer-events:none;-webkit-user-drag:none}
.catalog-page:first-child{box-shadow:inset -10px 0 20px rgba(0,0,0,.08)}
.loading{font-size:14px;letter-spacing:.03em;color:#777970;z-index:2}
.error{position:absolute;max-width:500px;width:calc(100% - 50px);padding:23px;text-align:center;color:#973d31;background:#fff7f4;border:1px solid #ebc8bf;border-radius:12px;z-index:3;font-size:13px;line-height:1.6}
.viewer-footer{height:80px;flex:0 0 80px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 clamp(17px,3vw,46px);gap:15px;background:#fbfaf7;border-top:1px solid rgba(31,37,38,.07);z-index:2}
.footer-left,.footer-right{font-size:9px;letter-spacing:.17em;color:#a3a09b;font-weight:750;white-space:nowrap}
.footer-right{display:flex;justify-content:flex-end}
.status-icon{color:#ad744e;font-size:18px;vertical-align:-2px;margin-right:3px}
.navigation{display:flex;align-items:center;justify-content:center;gap:18px}
.nav-button{display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #dedbd5;width:42px;height:42px;border-radius:50%;color:#2f393d;cursor:pointer;box-shadow:0 2px 5px rgba(0,0,0,.035);transition:background .15s,transform .15s}
.nav-button:hover:not(:disabled){background:#f0e9e3;transform:translateY(-1px)}
.nav-button:disabled{opacity:.38;cursor:not-allowed}
.nav-button svg,.fullscreen-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}
.page-details{width:156px;text-align:center;display:flex;flex-direction:column;gap:10px;font-size:12px;font-weight:700}
.track{width:100%;height:3px;background:#e5e1dc;border-radius:20px;overflow:hidden}
.track-fill{height:100%;width:0;background:#ad704d;transition:width .25s ease}
.fullscreen-button{background:transparent;color:#6d787b;border:0;display:flex;align-items:center;gap:9px;cursor:pointer;font-size:10px;letter-spacing:.14em;font-weight:750;padding:9px 0 9px 12px}
.fullscreen-button:hover{color:#a45c35}
button:focus-visible{outline:3px solid #c58156;outline-offset:3px}
@media(max-width:700px){.viewer-header{height:68px;flex-basis:68px}.header-help{display:none}.viewer-footer{height:74px;flex-basis:74px;display:flex;justify-content:center;padding:0 10px}.footer-left{display:none}.footer-right{position:absolute;right:10px}.fullscreen-button{padding:10px}.fullscreen-button span{display:none}.navigation{gap:12px}.nav-button{width:39px;height:39px}.page-details{width:137px;font-size:11px}.book-frame{width:calc(100% - 20px);height:calc(100% - 24px)}}
@media(max-height:540px){.viewer-header{height:55px;flex-basis:55px}.viewer-footer{height:60px;flex-basis:60px}.book-frame{height:calc(100% - 10px)}}
