/* Scoped gallery. The illustration is the actual book frame, not a separate card. */
.eg{margin-top:36px;scroll-margin-top:95px}.eg [hidden]{display:none!important}.eg-stage{max-width:1040px;margin:auto;text-align:center}.eg-cover{display:grid;justify-items:center;gap:8px;margin:auto;width:min(100%,520px);padding:0 18px 20px;border:0;background:transparent;color:inherit;perspective:900px}.eg-cover img{width:100%;height:auto;filter:drop-shadow(0 15px 20px #0009);animation:eg-float 7s ease-in-out infinite}.eg-cover:hover img{filter:drop-shadow(0 15px 24px #ac6dea50)}.eg-cover .btn{min-width:210px}.eg-stage[data-state=opening] .eg-cover img{animation-play-state:paused}@keyframes eg-float{0%,100%{transform:translateY(0) rotate(-.5deg)}50%{transform:translateY(-8px) rotate(.5deg)}}
.eg-open{width:100%;margin:auto}.eg-spread{position:relative;aspect-ratio:4/3;isolation:isolate;perspective:1400px;container-type:inline-size;text-align:center;outline-offset:4px}.eg-book-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:-1;filter:drop-shadow(0 18px 24px #0008);pointer-events:none}.eg-left,.eg-right{position:absolute;top:16.5%;bottom:26%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(5px,1cqw,12px);color:#4a3023;min-width:0;min-height:0}.eg-left{left:14%;width:32%}.eg-right{left:54%;width:30%;overflow:auto;scrollbar-width:thin}.eg-page-label,.eg-credit,.eg-hint{font:600 clamp(10px,1.2cqw,13px)/1.35 system-ui,sans-serif;color:#694b35;letter-spacing:.08em;text-transform:uppercase}.eg-art{display:grid;place-items:center;flex:1;min-height:0;width:100%;padding:5px;border:1px solid #aa8153;border-radius:3px;background:#e9d3af;cursor:zoom-in;box-shadow:0 3px 9px #53341b30}.eg-art img{display:block;width:100%;height:100%;min-height:0;max-height:100%;object-fit:contain;filter:none}.eg-art:hover{border-color:#8556a2}.eg-title{font:400 clamp(19px,3cqw,32px)/1.12 Georgia,serif;color:#50301b;margin:0;overflow-wrap:anywhere}.eg-description{font:400 clamp(13px,1.75cqw,19px)/1.45 Georgia,serif;color:#4b3324;margin:0}.eg-divider{color:#96673c;font-size:20px;line-height:1}.eg-credit{letter-spacing:0;text-transform:none}.eg-turn-leaf{position:absolute;top:7%;bottom:24%;left:50%;width:40%;background:linear-gradient(90deg,#c29d69,#f9e7c2 15%,#f5dfb7 90%,#b98e56);border:1px solid #b28b56;border-radius:5px 12px 12px 5px;visibility:hidden;pointer-events:none;z-index:4;backface-visibility:visible;box-shadow:0 3px 12px #563b3b40}.eg-turn-leaf.eg-backward{left:10%}.eg-controls{display:flex;gap:12px;justify-content:center;align-items:center;flex-wrap:wrap;margin-top:0}.eg-count{min-width:62px;color:var(--gold);font:600 12px system-ui,sans-serif}.eg-indexes{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px auto 0}.eg-index{width:100px;padding:5px;background:#19121f;color:var(--gold);border:1px solid #695179;border-radius:6px;display:grid;gap:4px;justify-items:center;font:600 11px system-ui,sans-serif}.eg-index img{width:100%;height:62px;object-fit:contain}.eg-index[aria-pressed=true]{border-color:#eac17c;box-shadow:0 0 0 1px #eac17c inset}.eg-viewer{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden}.eg-viewer::backdrop{background:#08060cf0;opacity:0;transition:opacity .35s}.eg-viewer.eg-visible::backdrop{opacity:1}.eg-view-stage{position:absolute;inset:0 0 105px;display:grid;place-items:center;padding:18px}.eg-view-frame{position:relative;margin:0;transform-origin:top left}.eg-view-frame img{display:block;width:auto;height:auto;max-width:92vw;max-height:calc(100dvh - 145px);object-fit:contain;filter:none}.eg-view-frame::after{content:'';position:absolute;inset:-5px;border:1px solid #eac17c;pointer-events:none}.eg-view-controls{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;width:min(96%,700px)}.eg-view-title{flex-basis:100%;text-align:center;font:13px system-ui,sans-serif;color:var(--gold);margin-bottom:3px}
@media(max-width:780px){.eg-spread{aspect-ratio:auto;display:grid;gap:0;padding:12px;border:6px solid #855c31;border-radius:16px;background:linear-gradient(90deg,#43235a,#281338,#43235a);box-shadow:0 12px 28px #0007}.eg-book-bg{display:none}.eg-left,.eg-right{position:relative;inset:auto;width:auto;padding:16px;overflow:visible;background:linear-gradient(100deg,#d8bb88,#f6e7c8 12%,#f7e9cf 88%,#d9bc8b);border:1px solid #a68452;gap:12px}.eg-left{border-radius:8px 8px 0 0}.eg-right{border-radius:0 0 8px 8px;min-height:190px}.eg-art{flex:none;height:clamp(180px,65vw,350px)}.eg-title{font-size:26px}.eg-description{font-size:16px}.eg-page-label,.eg-hint,.eg-credit{font-size:11px}.eg-turn-leaf{display:none}.eg-controls{margin-top:16px;gap:8px}.eg-index{width:68px}.eg-index img{height:48px}.eg-cover{max-width:390px}.eg-view-controls .btn{font-size:10px;padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.eg-cover img{animation:none!important}.eg-viewer::backdrop{transition:none!important}}
/* Frame the actual illustration, not the empty space around it. */
.eg-art{background:transparent;border:0;box-shadow:none;padding:0;overflow:hidden}.eg-art img{width:auto;height:auto;max-width:100%;max-height:100%;border:1px solid #aa8153;box-shadow:0 3px 9px #53341b30;box-sizing:border-box}.eg-art:hover img{border-color:#8556a2}.eg-left,.eg-right{bottom:28%}
.eg-art{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr)}
@media(max-width:780px){.eg-left,.eg-right{bottom:auto}.eg-art{height:auto;display:block}.eg-art img{margin:auto;max-height:350px;max-width:100%;width:auto;height:auto}.eg-left{padding:16px 12px}}

/* V19: independent video layers. The art and captions are still live, untouched HTML. */
.eg-cover-visual{position:relative;display:block;width:100%;aspect-ratio:4/3;isolation:isolate}.eg-cover-visual>img{height:100%;object-fit:contain}.eg-idle{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;filter:drop-shadow(0 15px 20px #0009)}.eg-cover.eg-video-ready .eg-idle{opacity:1}.eg-cover.eg-video-ready .eg-cover-visual>img{opacity:0;animation:none}.eg-cover:hover .eg-idle{filter:drop-shadow(0 15px 24px #ac6dea75)}.eg-cover .btn{transition:box-shadow .25s,border-color .25s}.eg-cover:hover .btn{box-shadow:0 0 22px #bc8ef855}.eg-clip{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;visibility:hidden;pointer-events:none;z-index:6}.eg-clip.eg-playing{visibility:visible}.eg-spread.eg-cinematic .eg-book-bg,.eg-spread.eg-cinematic .eg-left,.eg-spread.eg-cinematic .eg-right{visibility:hidden}.eg-spread.eg-cinematic .eg-book-bg{opacity:0}.eg-stage[data-state=opening] .eg-controls,.eg-stage[data-state=opening] .eg-indexes,.eg-stage[data-state=closing] .eg-controls,.eg-stage[data-state=closing] .eg-indexes{visibility:hidden}.eg-index{position:relative;border-radius:5px 5px 12px 12px;min-height:90px;width:118px;padding-bottom:9px}.eg-index::after{content:'';position:absolute;bottom:0;width:54%;height:3px;background:#a37a4a;opacity:.5}.eg-index[aria-pressed=true]::after{background:#eac17c;opacity:1}.eg-index span{text-align:center;line-height:1.25}.eg-index:hover{border-color:#eac17c}.eg-controls button:disabled,.eg-index:disabled{cursor:wait;opacity:.65}.eg-spread:focus-visible{outline:2px solid var(--gold)}
@media(min-width:781px){.eg-stage.eg-hybrid[data-state=closed]{aspect-ratio:4/3;display:grid;place-items:center;position:relative}.eg-stage.eg-hybrid[data-state=closed] .eg-cover{width:55%;padding:0;gap:0;display:block;position:relative}.eg-stage.eg-hybrid[data-state=closed] .eg-cover .btn{position:absolute;top:100%;left:50%;transform:translateX(-50%);white-space:nowrap;margin-top:10px}.eg-stage.eg-hybrid[data-state=closed] .eg-cover:hover .btn{transform:translateX(-50%)}.eg-stage.eg-hybrid[data-state=closed] .eg-open{display:none!important}}
@media(max-width:780px){.eg-clip{display:none}.eg-index{width:calc(25% - 8px);min-width:58px;min-height:76px;font-size:10px}.eg-index img{height:48px}}
@media(prefers-reduced-motion:reduce){.eg-idle,.eg-clip{display:none!important}.eg-cover.eg-video-ready .eg-cover-visual>img{opacity:1!important}.eg-stage.eg-hybrid[data-state=closed]{aspect-ratio:auto;display:block}.eg-stage.eg-hybrid[data-state=closed] .eg-cover{display:grid}.eg-stage.eg-hybrid[data-state=closed] .eg-cover .btn{position:static;transform:none;margin:8px 0 0}}
/* Keep captions and controls inside the decorative frame, clear of the clasp. */
@media(min-width:781px){.eg-left{bottom:31%}.eg-right{width:26.5%;bottom:30%;left:54%;}.eg-description{font-size:clamp(13px,1.6cqw,17px)}.eg-hint{font-size:clamp(9px,1.05cqw,12px)}}
