@font-face{font-family:Jost;src:url('./jost.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
:root{--paper:#f6f6f6;--red:#bd0000;--ink:#3a3a3a;--quiet:#fff}
*{box-sizing:border-box}
html{margin:0;background:#1d211c;scrollbar-width:none}
html::-webkit-scrollbar{display:none}
body.sfe-book-preview{margin:0;background:transparent;color:var(--ink);font-family:Jost,Arial,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior-y:none}
body.is-interactive{height:var(--scroll-height,5500svh)}
.street-background{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:#1d211c}
.street-background img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.street-background::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#0a100d1f 0%,#0a100d08 38%,#0a100d12 65%,#0a100d80 100%)}
#book-preview{position:relative;z-index:1}
.return-link{position:fixed;left:max(32px,env(safe-area-inset-left));top:max(28px,env(safe-area-inset-top));z-index:10;display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:10px 18px 10px 13px;border:1px solid var(--red);border-radius:40px;color:#fff;background:var(--red);font-size:14px;font-weight:400;text-decoration:none;transition:background .2s,border-color .2s}
.return-link:hover{background:#9d0000;border-color:#9d0000}
.return-link svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:2px solid var(--red);outline-offset:5px}
.book-stage{position:fixed;inset:0;overflow:hidden;opacity:0;transition:opacity .65s ease}
.is-interactive .book-stage{opacity:1}
.book-stage canvas{display:block;width:100%;height:100%;touch-action:pan-y pinch-zoom}
.book-stage canvas:focus-visible{outline-offset:-7px}
.readable-pages{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.readable-page{position:absolute;left:0;top:0;transform-origin:0 0;pointer-events:none}
.readable-page[hidden]{display:none}
.readable-page img{display:block;width:100%;height:100%;pointer-events:none}
.readable-page::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0002,transparent 3%);pointer-events:none}
.readable-page.left::after{background:linear-gradient(270deg,#0002,transparent 3%)}
.scroll-hint{position:fixed;z-index:5;bottom:max(27px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:12px;color:var(--quiet);font-size:13px;letter-spacing:.025em;white-space:nowrap;pointer-events:none;text-shadow:0 1px 8px #000b}
.scroll-instruction{display:flex;align-items:center;flex-direction:column;gap:12px}
.shop-link{display:inline-flex;align-items:center;justify-content:center;min-width:132px;min-height:46px;padding:10px 26px;border:1px solid var(--red);border-radius:40px;background:var(--red);color:#fff;font-size:15px;font-weight:500;text-decoration:none;text-shadow:none;pointer-events:auto;touch-action:manipulation;box-shadow:0 4px 20px #0002;transition:background .2s,border-color .2s;animation:shop-appear .28s ease-out both}
.shop-link:hover{background:#9d0000;border-color:#9d0000}
.shop-link:focus-visible{outline-color:#fff}
.shop-link[hidden],.scroll-instruction[hidden]{display:none}
@keyframes shop-appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.progress-track{display:block;width:76px;height:1px;background:#ffffff50;overflow:hidden}
.progress-track span{display:block;width:100%;height:100%;background:#fff;transform:scaleX(0);transform-origin:left}
.book-fallback{padding:90px 24px 100px;max-width:1150px;margin:auto}
.book-fallback figure{margin:0;min-height:calc(100svh - 100px);display:flex;justify-content:center;align-items:center}
.book-fallback img{max-width:100%;height:auto;display:block}
.book-fallback .fallback-cover img{width:min(48vw,420px);box-shadow:10px 20px 38px #0002}
.book-fallback .fallback-spread img{width:50%;box-shadow:0 16px 25px #0001}
.is-interactive .book-fallback{display:none}
.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}
@media(max-width:600px){.return-link{left:18px;top:max(18px,env(safe-area-inset-top));font-size:13px;padding:8px 14px 8px 10px;gap:7px}.scroll-hint{bottom:max(24px,env(safe-area-inset-bottom));font-size:12px}.book-fallback{padding-left:12px;padding-right:12px}.book-fallback .fallback-cover img{width:65vw}}
/* Portrait crop follows the reference: the man in yellow sits near the left
   edge, with the street extending into the center. Always use the original JPG. */
@media(max-width:900px) and (orientation:portrait){.street-background img{object-position:36.5% 50%}}
@media(max-width:900px) and (orientation:portrait) and (min-aspect-ratio:3/5){.street-background img{object-position:40% 50%}}
@media(max-width:900px) and (orientation:portrait) and (max-aspect-ratio:9/20){.street-background img{object-position:35.5% 50%}}
@media(prefers-reduced-motion:reduce){.book-stage,.return-link,.shop-link{transition:none;animation:none}}

/* The first visible book is the fully rendered 3D cover. The static pages
   remain available without JavaScript or if the interactive preview fails. */
.preview-loading{display:none;position:fixed;inset:0;z-index:1;align-items:center;justify-content:center;color:#fff;font-size:15px;text-shadow:0 1px 8px #000b}
.sfe-preview-loading .preview-loading{display:flex}
.sfe-preview-loading .book-fallback,.sfe-preview-loading .scroll-hint{display:none}
