/* Publication reader: the magazine is the focal point, without a surrounding frame. */
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;font-family:Inter,system-ui,sans-serif}
body{overflow:hidden;color:var(--book-text,#f4f8fc);background:var(--book-bg,#142337)}
body[data-book-theme]{background:radial-gradient(ellipse at 50% 42%,color-mix(in srgb,var(--book-glow) 30%,var(--book-bg)),var(--book-bg) 85%)}
body[data-book-theme=sandstone]{--book-bg:#eee8dd;--book-glow:#fffdf7;--book-surface:#f8f5ee;--book-text:#26362f;--book-muted:#58695e;--book-border:#aaa99c;--book-accent:#254c3f;--book-accent-text:#fff;--book-hover:#e3dccd}
body[data-book-theme=midnight]{--book-bg:#19232c;--book-glow:#34424b;--book-surface:#26343e;--book-accent:#d6ded5;--book-accent-text:#203028;--book-hover:#394a55}
body[data-book-theme=forest]{--book-bg:#1d2d28;--book-glow:#405249;--book-surface:#2d4037;--book-accent:#dedec6;--book-accent-text:#21392d;--book-hover:#43554a}
body[data-book-theme=ocean]{--book-bg:#192b34;--book-glow:#3b535d;--book-surface:#293f49;--book-accent:#d4e0df;--book-accent-text:#223a40;--book-hover:#405963}
body[data-book-theme=plum]{--book-bg:#302833;--book-glow:#574a55;--book-surface:#443946;--book-accent:#e5d8d7;--book-accent-text:#3f303b;--book-hover:#5d4d60}
.book-view{display:flex;flex-direction:column;width:100%;height:100dvh;min-height:0}
.book-view:is(:fullscreen,.is-expanded){position:fixed;z-index:1000;inset:0;width:100vw;height:100dvh;overflow:hidden;background:var(--book-bg,#19232c)}
.book-header{display:flex;align-items:center;gap:18px;flex-shrink:0;min-height:64px;padding:10px clamp(16px,3vw,44px);border-bottom:1px solid color-mix(in srgb,var(--book-text,#fff) 10%,transparent)}
.book-header strong{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:400 clamp(17px,1.8vw,24px)/1.3 Georgia,serif;letter-spacing:-.025em}
.book-header-actions{display:flex;align-items:center;gap:8px;flex:none}
.book-language{display:flex;align-items:center;min-width:0}
.book-header select,.book-header button{height:40px;min-height:40px;border:1px solid color-mix(in srgb,var(--book-text) 18%,transparent);border-radius:6px;background:transparent;color:var(--book-text);font:500 12px/1.2 Inter,system-ui,sans-serif}
.book-header select{min-width:122px;padding:8px 34px 8px 12px;cursor:pointer}
.book-header button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;cursor:pointer}
.book-header button:hover:not(:disabled){background:var(--book-hover)}
.book-header button[hidden]{display:none}.book-header button:disabled{opacity:.5;cursor:wait}
.book-header button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.book-header a.book-brand{display:inline-flex;align-items:center;justify-content:center;order:3;flex:none;text-decoration:none;color:var(--book-text)}
.book-brand-logo{display:grid;place-items:center;width:30px;height:30px;border:1px solid color-mix(in srgb,var(--book-text) 24%,transparent);border-radius:8px;background:transparent;color:var(--book-text);font:700 24px/1 Georgia,serif;letter-spacing:-2px;padding-inline-end:2px}
.book-header a.book-brand:hover .book-brand-logo{background:var(--book-hover)}
.book-wrap{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;min-height:0;min-width:0;padding:24px clamp(12px,3vw,48px) 16px}
.book-view .book-stage{position:relative;flex:1;width:min(100%,1400px);height:auto;min-height:100px;min-width:0;--page-turn-size:44px;--page-turn-inset:0px;--page-turn-page-gap:24px;--page-turn-gutter:68px}
.book-view .book,.book-view:is(:fullscreen,.is-expanded) .book{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;padding:8px var(--page-turn-gutter);border:0;border-radius:0;background:transparent;box-shadow:none;cursor:zoom-in;perspective:1200px}
.book-spread{position:relative;display:flex;align-items:center;justify-content:center;width:var(--fit-width,100%);height:var(--fit-height,100%);min-width:0;min-height:0;direction:ltr;filter:drop-shadow(0 16px 22px #0003)}
.book-spread img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;background:#f7f3eb;border:0;box-shadow:0 1px 2px #0002;backface-visibility:hidden}
.book-spread img[hidden]{display:none}.book-spread.double img{width:50%}
.book-spread.double::after{content:"";position:absolute;z-index:1;inset:0 auto 0 50%;width:16px;transform:translateX(-50%);pointer-events:none;background:linear-gradient(90deg,transparent,#0002 48%,#0003 51%,transparent);mix-blend-mode:multiply}
.book-edge{position:absolute;z-index:2;top:50%;transform:translateY(-50%);transition:background .2s,border-color .2s}
body[data-book-theme] .book-view button.page-turn-button{--page-turn-bg:transparent;--page-turn-border:color-mix(in srgb,var(--book-text) 22%,transparent);--page-turn-color:var(--book-text);--page-turn-hover:var(--book-hover);width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;box-shadow:none}
body[data-book-theme] .book-view button.page-turn-button:disabled{background:transparent;border-color:transparent;color:var(--book-muted);opacity:.3}
.page-turn-button svg{width:20px;height:20px;stroke-width:1.5}
.book-view .book.is-zoomed{display:block;overflow:auto;padding:0;cursor:zoom-out}.book.is-zoomed .book-spread{width:200%;height:200%;padding:20px}
.book-controls{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;gap:28px;min-height:64px;margin:0;padding:8px clamp(16px,3vw,44px) 12px;border-top:1px solid color-mix(in srgb,var(--book-text) 10%,transparent);background:transparent;font-size:12px}
.book-nav{display:flex;align-items:center;justify-content:center;gap:12px;direction:ltr}
body[data-book-theme] .book-controls select{height:36px;min-width:54px;padding:6px 28px 6px 12px;border:1px solid color-mix(in srgb,var(--book-text) 18%,transparent);border-radius:6px;background:transparent;color:var(--book-text);font:500 12px/1.2 Inter,system-ui,sans-serif;cursor:pointer}
.book-controls span{min-width:66px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums;color:var(--book-muted)}
body[data-book-theme] .book-controls #book-fullscreen{min-height:40px;padding:8px 14px;border:1px solid color-mix(in srgb,var(--book-text) 18%,transparent);border-radius:6px;background:transparent;color:var(--book-text);font:500 12px/1.2 Inter,system-ui,sans-serif;cursor:pointer}
body[data-book-theme] .book-controls #book-fullscreen:hover{background:var(--book-hover)}
.book-header :is(button,select,a):focus-visible,.book-controls :is(button,select):focus-visible,.book:focus-visible{outline:2px solid var(--book-accent);outline-offset:4px}
.book-share-status{flex-shrink:0;font-size:12px;text-align:center;color:var(--book-muted)}.book-share-status:not(:empty){padding:6px 12px}
#book-share-link{align-self:center;flex-shrink:0;width:min(90%,480px);margin:6px 12px;padding:10px;border:1px solid var(--book-border);border-radius:6px;background:var(--book-surface);color:var(--book-text)}
body[data-book-embedded] .book-header :is(strong,.book-brand){display:none}body[data-book-embedded] .book-header{justify-content:flex-end;border-bottom:0}
.book-ad{display:none}
@media(max-width:650px){
 .book-header{min-height:54px;padding:7px 12px;gap:10px}.book-header strong{font-size:17px}.book-header-actions{gap:6px}
 .book-header select{min-width:100px;padding-inline-start:8px;font-size:11px}.book-header #book-share{width:40px;padding:0}.book-header #book-share-label{display:none}
 .book-brand-logo{width:26px;height:26px;font-size:21px}.book-wrap{padding:16px 12px 12px}
 .book-view .book-stage{--page-turn-gutter:0px}.book-view .book{padding:4px 0}body[data-book-theme] .book-view button.book-edge{display:none}
 .book-controls{gap:14px;min-height:60px;padding:6px 10px 10px}.book-nav{gap:6px}.book-controls span{min-width:48px;font-size:11px}
 body[data-book-theme] .book-controls #book-fullscreen{font-size:11px;padding:8px 10px}
 .book-spread{filter:drop-shadow(0 8px 14px #0003)}
}
@media(max-height:500px){.book-header{min-height:48px;padding-block:4px}.book-wrap{padding-block:8px}.book-controls{min-height:52px;padding-block:4px}}
@media(prefers-reduced-motion:reduce){.book-edge{transition:none}}

/* Existing optional release badge styling. */
.viewer-alpha-badge{position:fixed;inset-inline-end:12px;inset-block-end:12px;z-index:1000;display:inline-flex;align-items:center;padding:4px 8px;border:1px solid #b57b15;border-radius:5px;background:#ffdd8b;color:#182333;font:800 11px/1.2 ui-sans-serif,system-ui,sans-serif;letter-spacing:.4px;pointer-events:none;box-shadow:0 1px 4px #0002}

/* Dropdown carets follow the publication surface, including light readers. */
.book-header select,.book-controls select{color-scheme:dark}
body[data-book-theme=sandstone] :is(.book-header,.book-controls) select{color-scheme:light;--vt-select-caret:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2326362f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}
.book-header option,.book-controls option{background:var(--book-surface);color:var(--book-text)}

@media(max-width:650px){
 .book-controls{gap:8px}
 body[data-book-theme] .book-controls #book-fullscreen{width:44px;min-width:44px;height:44px;padding:0;font-size:0;gap:0;display:inline-flex;align-items:center;justify-content:center}
 #book-fullscreen .button-icon{display:none}
 #book-fullscreen::before{content:"";display:block;width:18px;height:18px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
}

/* A shallow masthead and a small floating navigator leave the publication room. */
.book-header{min-height:44px;padding:5px clamp(12px,2vw,28px);gap:12px}.book-header strong{font-size:18px}.book-header-actions{gap:6px}
.book-header select,.book-header button{height:30px;min-height:30px;border-radius:5px;padding-block:5px;font-size:11px}
.book-header select{min-width:116px}.book-header button{padding-inline:9px}
.book-header #book-fullscreen{width:30px;min-width:30px;padding:0;font-size:0;gap:0}
#book-fullscreen .button-icon{display:none}
#book-fullscreen::before{content:"";display:block;width:15px;height:15px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.book-brand-logo{width:26px;height:26px;font-size:21px;border-radius:6px}
.book-wrap{padding:20px clamp(16px,3vw,48px) 64px}
.book-controls{position:absolute;z-index:5;bottom:12px;left:50%;transform:translateX(-50%);min-height:36px;padding:2px 8px;margin:0;border:1px solid color-mix(in srgb,var(--book-text) 12%,transparent);border-radius:6px;background:var(--book-surface);box-shadow:0 2px 8px #0001}
.book-nav{gap:8px}.book-controls span{font-size:10px;min-width:56px}
body[data-book-theme] .book-controls select{height:28px;min-height:28px;font-size:11px;border:0;background:transparent}
body[data-book-theme] .book-controls button.page-turn-button{width:30px;height:30px;min-width:30px;min-height:30px;border:0;border-radius:4px}
.book-controls .page-turn-button svg{width:17px;height:17px}
.book-spread{isolation:isolate;filter:drop-shadow(0 18px 24px #0004);box-shadow:1px 1px #f9f5e9,2px 2px #c5bfb0,3px 3px #fffaf0,4px 4px #bab4a5,5px 5px #f5f0e4,6px 6px #aaa598;border-radius:2px}
.book-spread img:first-child{border-radius:2px 0 0 2px}.book-spread img:last-child{border-radius:0 2px 2px 0}
.book-spread.double::after{width:32px;background:linear-gradient(90deg,transparent,#493f2f12 18%,#271f1945 48%,#fff5df44 52%,#30261c22 66%,transparent)}
/* Perspective belongs to the spread, so both faces share the same spine. */
.book-view .book-spread{perspective:1800px;isolation:auto;filter:none;box-shadow:0 14px 28px #0003,1px 1px #f9f5e9,2px 2px #c5bfb0,3px 3px #fffaf0}
.book-turn-leaf{position:absolute;z-index:6;inset-block:0;pointer-events:none}
.book-turn-leaf.is-folding{left:0;width:50%;background:#faf7f0;transform-style:preserve-3d;will-change:transform}
.book-turn-leaf.is-single-fold{width:100%;transform-origin:left center}
.book-turn-face,.book-turn-stationary{position:absolute;inset-block:0;width:100%;height:100%;background:#faf7f0}
.book-turn-face{inset-inline:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.book-turn-face img,.book-turn-stationary img,.book-turn-flat img{width:100%!important;height:100%;border-radius:0}.book-turn-face img{backface-visibility:visible}
.book-turn-front{transform:translateZ(.3px)}
.book-turn-back{transform:rotateY(180deg) translateZ(.3px)}
.book-turn-face::after,.book-turn-stationary::after{content:"";position:absolute;inset:0;pointer-events:none;background:var(--page-shading,transparent);mix-blend-mode:multiply}
.book-turn-shading{position:absolute;inset:0;opacity:0;pointer-events:none;background:linear-gradient(90deg,#241b1448,transparent 34%,#fff5 72%,#241b1414);mix-blend-mode:multiply}
.book-turn-back .book-turn-shading{background:linear-gradient(90deg,#241b1414,#fff4 26%,transparent 66%,#241b1452)}
.book-turn-stationary{z-index:3;width:50%;pointer-events:none}
.book-turn-leaf.is-dissolving{inset:0;display:flex;overflow:hidden}
.book-turn-flat{flex:1;min-width:0;height:100%}
@media(max-width:650px){
 .book-header{min-height:42px;padding:5px 10px;gap:6px}.book-header strong{display:none}.book-header-actions{flex:1;justify-content:flex-end;gap:6px}
 .book-header select{min-width:100px;font-size:10px}.book-header #book-share{width:30px;min-width:30px;padding:0}.book-header button svg{width:15px;height:15px}
 .book-wrap{padding:14px 12px 58px}.book-controls{bottom:10px;padding:2px 6px;min-height:34px}.book-nav{gap:6px}
 .book-controls span{min-width:50px;font-size:10px}.book-spread{filter:drop-shadow(0 10px 16px #0003);box-shadow:1px 1px #f9f5e9,2px 2px #bdb7a9,3px 3px #fff8eb}
}
@media(prefers-reduced-motion:reduce){body:not([data-book-motion=on]) .book-turn-leaf{display:none}}

.book-header #book-motion{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.book-header #book-motion::before{width:12px;height:12px;margin:0}.book-header #book-motion[aria-pressed=false]{opacity:.8}@media(max-width:650px){.book-header #book-motion{width:30px;min-width:30px;justify-content:center;padding:0}.book-header #book-motion-label{display:none}}

/* The same gutter follows each printed side throughout the turn. A single
   spread-level stripe used to hide behind the stationary/turning overlays,
   then abruptly appear only when those overlays were removed. */
.book-view .book-spread{--book-left-shading:linear-gradient(90deg,transparent calc(100% - 18px),#30251a08 calc(100% - 12px),#241c1628 calc(100% - 2px),#241c1630);--book-right-shading:linear-gradient(90deg,#fff9e830,#30251a18 4px,transparent 18px)}
.book-view .book-spread.double::before,.book-view .book-spread.double::after{content:"";position:absolute;z-index:1;inset:0 auto 0 0;width:50%;transform:none;pointer-events:none;mix-blend-mode:multiply;background:var(--book-left-shading)}
.book-view .book-spread.double::after{left:50%;background:var(--book-right-shading)}
.book-turn-face[data-page-side=left],.book-turn-stationary[data-page-side=left]{--page-shading:var(--book-left-shading)}
.book-turn-face[data-page-side=right],.book-turn-stationary[data-page-side=right]{--page-shading:var(--book-right-shading)}

/* Keep animation state readable in embedded and phone readers too. */
.book-header #book-motion[aria-pressed=false]{opacity:1;border-color:var(--book-accent);background:var(--book-hover)}
@media(max-width:650px){
 .book-header .book-header-actions{flex-wrap:wrap;justify-content:center}
 .book-header #book-motion{width:auto;min-width:44px;min-height:44px;padding:8px 10px}
 .book-header #book-motion-label{display:inline}
 .book-header :is(button,select){min-height:44px}
 .book-header #book-fullscreen,.book-header #book-share{width:44px;min-width:44px}
}
@media(max-width:650px){
 .book-header .book-brand{display:none}
 .book-header .book-header-actions{display:grid;grid-template-columns:minmax(0,1fr) 44px minmax(90px,1.15fr) 44px;width:100%;gap:5px}
 .book-header #book-motion{min-width:0;white-space:normal;line-height:1.2;padding-inline:5px}
 .book-header #book-language{width:100%;min-width:0;max-width:100%;padding-inline-start:7px;padding-inline-end:25px}
 .book-view .book-controls :is(button.page-turn-button,select){min-height:44px;min-width:44px}
}

.book-stat-consent{position:fixed;z-index:1000;inset:auto 1rem 1rem;max-width:40rem;margin:auto;padding:1rem 1.2rem;background:#fff;color:#203343;border:1px solid #c5d1d9;border-radius:.7rem;box-shadow:0 8px 30px #0003}.book-stat-consent p{margin:0 0 .75rem;line-height:1.45}.book-stat-consent div{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}.book-stat-consent button,.book-stat-consent a{font:inherit;min-height:44px;padding:.5rem .8rem;border:1px solid #54777e;border-radius:.4rem;color:#173f3b;background:#f6f9f7;cursor:pointer}.book-stat-consent button:first-child{background:#185847;color:white}.book-stat-consent a{display:inline-flex;align-items:center}
/* Compact, accessible language picker and consistently sized reader controls. */
.book-view .book-header-actions>button,.book-view .book-header .book-brand-logo{height:44px;min-height:44px;box-sizing:border-box}
.book-view .book-header .book-brand-logo{width:44px}
.book-view .book-header .book-language{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:52px;height:44px;border:1px solid color-mix(in srgb,var(--book-text) 24%,transparent);border-radius:6px;background:var(--book-surface,#24323c);box-sizing:border-box}
.book-view .book-header .book-language::before{content:attr(data-flag);font:24px/1 system-ui;pointer-events:none}
.book-view .book-header .book-language:focus-within{outline:3px solid #f3bd62;outline-offset:2px}
.book-view .book-header .book-language select{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;padding:0;opacity:0;cursor:pointer}
.book-view .book-header .book-language option{color:#17242c;background:#fff}
.book-view .book-header .book-language-enhanced::before{position:absolute;z-index:1}
.book-view .book-header .book-language-enhanced>select{display:none}
.book-view .book-header .book-language-trigger{position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;background:transparent;z-index:2}
.book-view .book-header .book-language-menu{position:absolute;z-index:100;inset-inline-end:0;top:calc(100% + 8px);width:max-content;min-width:210px;max-width:min(280px,90vw);padding:6px;border:1px solid #c8d5d1;border-radius:10px;background:#fff;box-shadow:0 12px 30px #0004}
.book-view .book-header .book-language-menu[hidden]{display:none}
.book-view .book-header .book-language-menu button{width:100%;height:auto;min-height:44px;padding:10px 12px;justify-content:flex-start;gap:12px;border:0;border-radius:6px;background:#fff;color:#182b2b;text-align:start;font:500 14px/1.35 system-ui}
.book-view .book-header .book-language-menu button:hover,.book-view .book-header .book-language-menu button:focus-visible{background:#e5f1ea;color:#173e30;outline:2px solid #2a6a52}
.book-language-menu button span{font-size:20px;line-height:1}
.book-view .book-header .book-language-menu button{display:flex;white-space:normal}
@media(max-width:600px){.book-view .book-header .book-language-menu{inset-inline-start:0;inset-inline-end:auto;min-width:210px;max-width:min(210px,80vw)}}
@media(max-width:360px){.book-view .book-header .book-language-menu{transform:translateX(-18px)}}
