/* Project 400 v2.1.9 — digital library, using established Darcis burgundy and ivory. */
.p400-library-intro{padding-top:clamp(2.1rem,4vw,4rem)!important}
.p400-library-head{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin:0 0 1.25rem}
.p400-library-head h2{font-family:Georgia,'Times New Roman',serif;color:#511313;font-size:clamp(2rem,3.4vw,3.2rem);line-height:1.1;margin:.35rem 0 1rem;letter-spacing:-.035em}
.p400-library-head p:not(.eyebrow){font-size:1rem;max-width:640px;line-height:1.65;color:#635b53;margin:0}
.p400-library-head-side{max-width:270px;border-left:1px solid #e5d6c6;display:flex;align-items:center;gap:1rem;padding-left:1.15rem}
.p400-library-head-side .p400-library-mark{font-size:2rem;color:#b38b45}.p400-library-head-side p{font-size:.86rem!important}
.p400-resource-toolbar{display:grid;grid-template-columns:minmax(210px,2.5fr) minmax(155px,1fr) minmax(125px,.6fr) auto;gap:10px;align-items:center;padding:12px;background:white;border:1px solid #e7dace;box-shadow:0 8px 24px #3b19100b;border-radius:15px}
.p400-resource-toolbar label{min-width:0;display:block}.p400-resource-toolbar input,.p400-resource-toolbar select{height:46px;max-width:none!important;width:100%;font:inherit;font-size:.9rem;background:#fff;border:1px solid #d9d9d1;border-radius:8px;padding:0 12px;color:#302321}
.p400-resource-search-button{background:#711b20;color:white;border:0;border-radius:8px;height:46px;white-space:nowrap;padding:0 22px;font-weight:700;cursor:pointer}
.p400-resource-search-button:hover,.p400-resource-search-button:focus-visible{background:#501116}
.p400-resource-pills{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 1.25rem}
.p400-resource-pill{text-decoration:none!important;color:#57292a!important;font-size:.78rem;line-height:1.3;font-weight:700;border:1px solid #e7d9cd;background:white;border-radius:20px;padding:9px 14px;transition:background .14s}
.p400-resource-pill:hover{background:#f6eee3}.p400-resource-pill.is-active{background:#6e1c20!important;color:white!important;border-color:#6e1c20}
.p400-resource-result-heading{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;align-items:center;margin:1.3rem 0 1rem;font-size:.85rem;color:#675d54}
.p400-resource-result-heading strong{font-weight:800;color:#4e1111}
.p400-resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.p400-resource-card{border:1px solid #e9dfd2;background:white;border-radius:14px;box-shadow:0 10px 23px #46190b0b;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.p400-resource-cover{background:#f0e6d6;aspect-ratio:1.56;position:relative;overflow:hidden}
.p400-resource-cover>img{width:100%;height:100%;object-fit:cover;display:block}
.p400-resource-graphic{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:linear-gradient(115deg,#5a1419,#822727 58%,#b18d49);position:relative}
.p400-resource-graphic:before{position:absolute;content:'';width:48%;height:76%;background:linear-gradient(110deg,#fffdf5,#e5d4bd);box-shadow:8px 7px 20px #220a0a55;transform:rotate(-8deg);border-radius:4px}
.p400-resource-graphic-icon{position:relative;z-index:1;color:#7e2523;font-size:3.3rem;line-height:1}
.p400-resource-graphic-label{position:relative;z-index:1;margin-top:12px;font-size:.62rem;letter-spacing:.12em;color:#743b27;font-weight:800}
.p400-resource-cover-flag{position:absolute;bottom:11px;left:11px;color:white;background:#521418eb;padding:6px 9px;font-weight:800;font-size:.69rem;border-radius:6px}
.p400-resource-card-body{padding:17px 18px 19px;display:flex;flex:1;flex-direction:column;gap:8px}
.p400-resource-tag{font-size:.65rem;letter-spacing:.055em;font-weight:800;text-transform:uppercase;align-self:flex-start;background:#f7ebe8;color:#752327;padding:5px 8px;border-radius:6px}
.p400-resource-card h3{color:#4e1111;font:700 1.25rem/1.22 Georgia,'Times New Roman',serif;margin:1px 0 0}
.p400-resource-meta,.p400-resource-issuer{font-size:.79rem;color:#6e6055;margin:0}.p400-resource-issuer{font-weight:700;color:#6b4e43}
.p400-resource-excerpt{font-size:.88rem;line-height:1.54;color:#4f4540;margin:3px 0 8px}
.p400-resource-action{color:#7a1822!important;font-size:.85rem;text-decoration:none!important;font-weight:800;margin-top:auto;padding-top:8px;align-self:flex-start}
.p400-resource-action:hover{text-decoration:underline!important}
.p400-resource-empty{padding:3.6rem 1rem;text-align:center;background:#fff;border:1px dashed #e6d6c5;border-radius:14px}.p400-resource-empty>span{font-size:3rem;color:#b7924b}.p400-resource-empty h3{font:700 1.6rem/1.2 Georgia,serif;color:#4e1111;margin:.5rem auto}.p400-resource-empty p{color:#675c54;max-width:450px;margin:.8rem auto;line-height:1.65}
.p400-resource-pagination{display:flex;gap:8px;justify-content:center;margin-top:2rem}.p400-resource-pagination a{border-radius:7px;border:1px solid #e6d5cc;padding:8px 13px;text-decoration:none;color:#5b1719}.p400-resource-pagination a[aria-current]{background:#5b1719;color:white}
.p400-library-guides{background:#faf7f2!important;border-top:1px solid #e8e0d6;border-bottom:1px solid #e8e0d6}
.p400-trusted-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.p400-trusted-card{display:flex;align-items:center;gap:15px;border:1px solid #e8dfd3;border-radius:12px;background:white;padding:17px 18px;text-decoration:none!important;color:#5b191c!important}
.p400-trusted-card>span:last-child{margin-left:auto;font-size:1.2rem;color:#9a7137}
.p400-trusted-symbol{width:45px;height:45px;flex:none;display:grid;place-items:center;background:#f7eddb;border-radius:10px;color:#6a201f;font-size:1.3rem}
.p400-trusted-content{display:flex;flex-direction:column;gap:5px}.p400-trusted-content strong{font:700 1.05rem Georgia,serif}.p400-trusted-content small{font-size:.75rem;color:#685c50}.p400-trusted-card:hover{border-color:#b99c6b;box-shadow:0 5px 18px #4e111112}
.p400-library-callout{padding:2rem 2.2rem;background:#f8edd2;border:1px solid #eadbb1;border-radius:15px;display:flex;align-items:center;justify-content:space-between;gap:1.5rem}
.p400-library-callout h2{font:700 clamp(1.45rem,2.6vw,2.2rem)/1.12 Georgia,serif;color:#4e1111;margin:.4rem 0}.p400-library-callout p:not(.eyebrow){max-width:570px;margin:0;font-size:.9rem;line-height:1.55;color:#51473d}
.p400-resource-request{background:#7b2425;border-radius:23px;padding:12px 19px;text-decoration:none!important;color:white!important;white-space:nowrap;font-weight:800;font-size:.8rem}
/* Dialog starts hidden; it doesn't load PDF or JS until a visitor asks to read. */
.p400-resource-dialog{padding:0;border:0;border-radius:14px;background:#fdfaf5;color:#271c17;width:min(98vw,1100px);height:min(92vh,950px);max-height:95vh;box-shadow:0 22px 70px #10080872}
.p400-resource-dialog::backdrop{background:#1a1010c9}
.p400-resource-dialog:not([open]){display:none!important}
.p400-reader-head{padding:12px 20px;background:#4e1111;color:white;display:flex;align-items:center;justify-content:space-between;gap:1rem}.p400-reader-head p{font-size:.58rem;letter-spacing:.1em;margin:0 0 4px;color:#d3ae6a;font-weight:800}.p400-reader-head h2{font:700 clamp(1rem,2vw,1.55rem)/1.1 Georgia,serif;color:white;margin:0}
.p400-reader-close{color:white;background:transparent;border:1px solid #ffffff75;border-radius:50%;width:35px;height:35px;font-size:1.5rem;cursor:pointer}
.p400-reader-tools{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:9px 15px;border-bottom:1px solid #e5d7c8;font-size:.77rem}
.p400-reader-tools>div{display:flex;gap:6px;flex-wrap:wrap}.p400-reader-tools button,.p400-reader-tools a{padding:7px 10px;border:1px solid #d4c8bb;border-radius:7px;color:#501518;background:white;font-size:.78rem;cursor:pointer;text-decoration:none!important}
.p400-reader-tools button[disabled]{opacity:.35;cursor:default}.p400-reader-stage{height:min(67vh,680px);display:grid;place-items:center;overflow:auto;background:#dfd9cf;min-height:275px}.p400-reader-book{display:none;max-width:100%;justify-content:center;align-items:center;perspective:1500px;gap:0;margin:14px auto}.p400-reader-book.is-visible{display:flex}.p400-reader-leaf{min-height:180px;min-width:0;max-width:49%;background:white;box-shadow:0 5px 18px #180e0e22;display:grid;place-items:center;overflow:hidden}.p400-reader-leaf canvas{display:block;max-width:100%;height:auto}.p400-reader-leaf.is-empty{display:none}
.p400-reader-book.is-animating .p400-reader-leaf:last-child{transform-origin:left;animation:p400-sheet-turn .34s ease-in-out}
@keyframes p400-sheet-turn{0%{transform:rotateY(0deg)}45%{transform:rotateY(-65deg)}100%{transform:rotateY(0deg)}}
#p400-reader-native{display:none;width:100%;height:100%;border:0;background:#fff}#p400-reader-native.is-visible{display:block}
.p400-reader-note{color:#6c6154;font-size:.73rem;padding:6px 18px 0;margin:0!important}.p400-resource-dialog>p:last-child{margin:.5rem 18px 14px!important}.p400-resource-dialog>p:last-child a{font-size:.81rem;color:#732222}
@media(max-width:940px){.p400-resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.p400-resource-toolbar{grid-template-columns:1fr 1fr}.p400-library-head-side{display:none}}
@media(max-width:620px){.p400-resource-grid,.p400-trusted-grid{grid-template-columns:minmax(0,1fr)}.p400-resource-toolbar{grid-template-columns:minmax(0,1fr)}.p400-resource-toolbar input,.p400-resource-toolbar select,.p400-resource-search-button{width:100%}.p400-library-head{margin-bottom:1rem}.p400-library-callout{display:block;padding:1.35rem}.p400-resource-request{display:inline-block;margin-top:1.1rem}.p400-reader-tools{flex-direction:column;align-items:stretch}.p400-reader-stage{height:65vh}.p400-reader-leaf{max-width:99%}.p400-reader-leaf:first-child{display:none!important}.p400-reader-head{padding:9px 12px}.p400-resource-dialog{width:99vw;max-height:95vh}}
@media(prefers-reduced-motion:reduce){.p400-reader-book.is-animating .p400-reader-leaf:last-child{animation:none!important}}
.p400-resource-single{padding:1.5rem;background:white;border:1px solid #e7dace;border-radius:14px;box-shadow:0 10px 23px #46190b0b}
.p400-resource-single-intro{display:grid;grid-template-columns:minmax(170px,.68fr) minmax(0,1.3fr);gap:2rem;align-items:start}
.p400-resource-single-intro:not(:has(.p400-resource-single-cover)){grid-template-columns:minmax(0,1fr)}
.p400-resource-single-cover{border-radius:10px;width:100%;max-height:470px;object-fit:cover;box-shadow:0 5px 18px #21170a2b}
.p400-resource-single h2{font:700 clamp(1.7rem,3.3vw,2.75rem)/1.12 Georgia,serif;color:#4e1111;margin:.4rem 0 1rem}
.p400-resource-single-description{margin:1rem 0;line-height:1.65}.p400-resource-single-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.8rem;margin-top:1.4rem}
.p400-resource-request.is-outline{color:#641820!important;background:white;border:1px solid #b88b8b}.p400-resource-single-back a{color:#682026;text-decoration:none;font-weight:700}
@media(max-width:620px){.p400-resource-single-intro{grid-template-columns:1fr}.p400-resource-single{padding:1rem}}

.p400-resource-messages{margin-top:2rem;padding:1.5rem;background:#fffdfa;border:1px solid #eadfd1;border-radius:14px}
.p400-resource-messages-head{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:1rem}
.p400-resource-messages-head h3{font:700 1.5rem Georgia,serif;color:#521516;margin:0}
.p400-resource-messages-head a{font-size:.8rem;color:#782326;text-decoration:none;font-weight:800}
.p400-resource-message-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.p400-resource-message{border:1px solid #eddfd3;border-radius:10px;padding:13px;text-decoration:none!important;display:flex;align-items:center;gap:10px;color:#551b1d!important}
.p400-resource-message-icon{font-size:1.1rem;background:#f6ead5;border-radius:8px;width:37px;height:37px;flex:none;display:grid;place-items:center}
.p400-resource-message>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:5px}.p400-resource-message strong{font:700 1rem Georgia,serif}.p400-resource-message small{font-size:.72rem;color:#746a60}
@media(max-width:700px){.p400-resource-message-grid{grid-template-columns:1fr}.p400-resource-messages-head{flex-wrap:wrap}}

/* Project 400 v2.1.10 — simplified publication cards & natural book reader. */
/* Protect previous Framix snapshots from reviving unwanted old search UI and star copy. */
.p400-resource-toolbar,.p400-resource-pills,.p400-library-head-side{display:none!important}
.p400-resource-result-heading{margin:.65rem 0 1.1rem}
.p400-resource-cover-media{height:100%;width:100%;background:linear-gradient(135deg,#faead5,#e0c9a9)}
.p400-resource-cover-media>img{width:100%;height:100%;object-fit:cover;display:block}
.p400-resource-cover-action{position:absolute;z-index:3;bottom:12px;left:12px;display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;height:auto!important;min-height:37px;padding:9px 15px;border-radius:8px;background:#fff9ec;color:#5d171b!important;text-decoration:none!important;font:800 .79rem/1.2 system-ui,sans-serif!important;box-shadow:0 3px 14px #23140e48;transition:transform .15s,background .15s}
.p400-resource-cover-action:hover,.p400-resource-cover-action:focus-visible{background:#fff;transform:translateY(-2px);outline-offset:3px}
.p400-resource-download{display:inline-flex!important;align-items:center;justify-content:center;width:max-content!important;max-width:100%;padding:8px 13px;border:1px solid #caaeb0;border-radius:8px;background:white;color:#722129!important;text-decoration:none!important;font-size:.78rem;font-weight:750;line-height:1.2;margin-top:4px}
.p400-resource-download:hover,.p400-resource-download:focus-visible{background:#f9eeee;border-color:#8e3337}
.p400-resource-card-body{gap:9px}.p400-resource-meta{line-height:1.35}
.p400-cover-pending .p400-resource-graphic-icon{font-size:2.4rem}
.p400-resource-single .p400-resource-graphic{min-height:290px;border-radius:10px}
.p400-resource-single .p400-resource-cover-media{aspect-ratio:3/4;max-width:360px;border-radius:10px;overflow:hidden}
.p400-resource-single .p400-resource-cover-media>img{object-fit:contain}

/* Reader: dark bookstand with soft page shadows, compact toolbar and individual real pages. */
.p400-resource-dialog{box-sizing:border-box;width:min(97vw,1240px);height:min(94dvh,960px);max-height:96dvh;display:flex;flex-direction:column;overflow:hidden;border:1px solid #dfcfc0;background:#f7f1e8;border-radius:14px;box-shadow:0 24px 80px #170b0ad9}
.p400-resource-dialog:not([open]){display:none!important}
.p400-resource-dialog::backdrop{background:#100b0ee0;backdrop-filter:blur(3px)}
.p400-reader-head{flex:none;padding:13px 18px;background:linear-gradient(110deg,#46100e,#6c1c20 65%,#8b3430)}
.p400-reader-head h2{font:700 clamp(1.05rem,2vw,1.65rem)/1.15 Georgia,serif}
.p400-reader-close{min-width:36px;width:36px!important;height:36px!important;flex:none;display:grid!important;place-items:center;padding:0!important;font-size:1.5rem}
.p400-reader-tools{flex:none;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:7px;padding:10px 12px;background:#fffaf3;border-bottom:1px solid #d8cab9}
.p400-reader-tools button,.p400-reader-tools a{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 auto;width:auto!important;max-width:100%;min-height:34px!important;height:auto!important;padding:7px 11px!important;border:1px solid #d8c8ba!important;border-radius:7px;background:#fff;color:#521a1d!important;font:700 .76rem/1.2 system-ui,sans-serif!important;text-decoration:none!important;box-shadow:none!important;white-space:nowrap;cursor:pointer}
.p400-reader-tools button:hover,.p400-reader-tools a:hover{background:#f5e9dc}
.p400-reader-tools button:focus-visible,.p400-reader-tools a:focus-visible{outline:3px solid #b7924b;outline-offset:2px}
#p400-reader-status{font-size:.8rem;font-weight:800;color:#54221d;text-align:center;white-space:nowrap;min-width:93px}
#p400-reader-zoom-label{min-width:36px;text-align:center;font:700 .73rem/1.1 system-ui,sans-serif;color:#6b4c45}
.p400-reader-stage{position:relative;min-height:220px;height:auto;flex:1 1 auto;display:flex;justify-content:center;align-items:center;overflow:auto;background:radial-gradient(ellipse at 50% 38%,#8b7b6b 0%,#5c4c44 46%,#2c2322 100%);isolation:isolate}
.p400-reader-flip-shell{width:100%;height:100%;display:grid;place-items:center;min-height:260px;overflow:hidden;padding:12px 8px;box-sizing:border-box}
#p400-reader-book{display:block;margin:auto;max-width:100%;min-width:0;box-shadow:0 11px 32px #12080627}
.p400-real-page{background:#fffdf7!important;box-shadow:inset 0 0 0 1px #e9e2d8;display:flex;align-items:center;justify-content:center;color:#998f84;font-size:.82rem;overflow:hidden;user-select:none;-webkit-user-select:none}
.p400-real-page img{width:100%;height:100%;object-fit:contain;display:block;background:white;pointer-events:none}
.p400-reader-single{width:100%;height:100%;padding:16px;box-sizing:border-box;overflow:auto;align-items:flex-start;justify-content:center;}
.p400-reader-single:not([hidden]){display:flex}
#p400-reader-single-page{margin:auto;display:flex;align-items:center;justify-content:center;min-height:180px;width:max-content;max-width:none;box-shadow:0 8px 35px #0005;background:white}
#p400-reader-single-page>img{display:block;max-width:none;height:auto;object-fit:contain}
.p400-reader-loading{padding:40px;color:#735f50;font-size:.9rem}
.p400-reader-thumbnails{position:absolute;right:10px;top:10px;bottom:10px;width:min(224px,50%);padding:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-content:start;overflow:auto;background:#fffaf6f5;border:1px solid #ead7c7;border-radius:10px;box-shadow:0 12px 30px #1b080840;z-index:10}
.p400-reader-thumbnails[hidden]{display:none!important}
.p400-reader-thumb{background:#fff;border:1px solid #dcd0c3;border-radius:7px;padding:5px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;color:#4e1111;cursor:pointer}
.p400-reader-thumb.is-selected{outline:2px solid #922b34}.p400-reader-thumb img,.p400-reader-thumb-placeholder{display:block;width:100%;aspect-ratio:.72;object-fit:contain;background:#f0e9de}
.p400-reader-thumb-placeholder{display:grid;place-items:center;color:#926f58;font-size:1.25rem}.p400-reader-thumb small{font-size:.69rem;font-weight:750}
#p400-reader-native{width:100%;height:100%;border:0;background:#fff}
.p400-reader-foot{flex:none;padding:10px 15px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fffaf3;border-top:1px solid #dacdbd;color:#756255;font-size:.72rem;line-height:1.4}
.p400-reader-foot a{font-size:.76rem;color:#722129!important;font-weight:750;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.p400-resource-dialog:fullscreen{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
@media(max-width:720px){
 .p400-reader-head{padding:10px 12px}
 .p400-reader-tools{gap:4px;padding:7px 6px;flex-direction:row;align-items:center}
 .p400-reader-tools button,.p400-reader-tools a{padding:6px 7px!important;min-height:30px!important;font-size:.69rem!important}
 #p400-reader-status{font-size:.72rem;min-width:76px}
 .p400-resource-dialog{width:99vw;height:94dvh}
 .p400-reader-stage{height:auto;min-height:230px}
 .p400-reader-flip-shell{padding:4px;min-height:210px}
 .p400-reader-foot{padding:7px 10px;flex-wrap:wrap;gap:3px}
 .p400-reader-thumbnails{width:min(235px,72vw)}
}
@media(prefers-reduced-motion:reduce){.p400-resource-cover-action{transition:none}}

.p400-resource-single-intro:has(.p400-resource-cover-media),.p400-resource-single-intro:has(.p400-resource-graphic){grid-template-columns:minmax(170px,.68fr) minmax(0,1.3fr)}
@media(max-width:620px){.p400-resource-single-intro:has(.p400-resource-cover-media),.p400-resource-single-intro:has(.p400-resource-graphic){grid-template-columns:1fr}}

/* Project 400 v2.1.11: magazine side controls and accessible local animation. */
.p400-reader-stage{position:relative}
.p400-reader-stage.is-preparing:before{content:"Opening book…";position:absolute;inset:auto 0 40%;text-align:center;color:#fff5e7;font:700 1rem system-ui;z-index:1;pointer-events:none}
.p400-reader-side{position:absolute!important;top:50%;transform:translateY(-50%);z-index:9;display:grid!important;place-items:center;width:45px!important;height:57px!important;min-width:45px!important;padding:0!important;border:1px solid #cfbdb2!important;border-radius:12px!important;background:#fff8f0ef!important;color:#4e1111!important;font:700 2.6rem/1 Georgia,serif!important;box-shadow:0 5px 22px #1b11114d!important;cursor:pointer}
.p400-reader-side-prev{left:12px}.p400-reader-side-next{right:12px}
.p400-reader-side:hover:not(:disabled){background:#fff!important;box-shadow:0 6px 26px #140a0a75!important}
.p400-reader-side:focus-visible{outline:3px solid #d8ae50!important;outline-offset:3px}
.p400-reader-side:disabled{opacity:.25;cursor:default;pointer-events:none}
.p400-reader-side[hidden]{display:none!important}
.p400-reader-flip-shell{padding-inline:62px}
.p400-local-book{position:relative;perspective:1400px;display:grid;place-items:center;overflow:visible}
.p400-local-book .p400-real-page{width:min(100%,490px);height:min(70vh,690px);position:relative;backface-visibility:hidden}
.p400-local-book .p400-local-visible{display:flex}
.p400-local-turn-sheet{position:absolute;inset:0;z-index:5;transform-origin:left center;transform-style:preserve-3d;backface-visibility:hidden;box-shadow:8px 3px 24px #26120d70;pointer-events:none;overflow:hidden}
.p400-local-turn-sheet.turn-back{transform-origin:right center}
.p400-local-turn-sheet.is-turning{animation:p400-page-turn var(--p400-turn-duration,620ms) cubic-bezier(.24,.8,.33,1) both}
.p400-local-turn-sheet.turn-back.is-turning{animation-name:p400-page-turn-back}
.p400-local-turn-content{width:100%;height:100%;background:white}
@keyframes p400-page-turn{0%{transform:rotateY(0deg)}50%{filter:brightness(.86)}100%{transform:rotateY(-170deg);opacity:0}}
@keyframes p400-page-turn-back{0%{transform:rotateY(0deg)}50%{filter:brightness(.86)}100%{transform:rotateY(170deg);opacity:0}}
@media(max-width:680px){.p400-reader-side{width:35px!important;height:47px!important;min-width:35px!important;font-size:2rem!important;border-radius:8px!important}.p400-reader-side-prev{left:3px}.p400-reader-side-next{right:3px}.p400-reader-flip-shell{padding-inline:40px}.p400-local-book .p400-real-page{max-height:65vh}}
@media(prefers-reduced-motion:reduce){.p400-local-turn-sheet.is-turning{animation-duration:80ms}}
#p400-reader-side-prev{left:12px}#p400-reader-side-next{right:12px}
@media(max-width:680px){#p400-reader-side-prev{left:3px}#p400-reader-side-next{right:3px}}

/* v2.1.13: reliably hide inactive reader surfaces; UA [hidden] alone loses to author display rules. */
#p400-reader-flip-shell[hidden],#p400-reader-single[hidden],#p400-reader-thumbnails[hidden],#p400-reader-progress[hidden],#p400-reader-side-prev[hidden],#p400-reader-side-next[hidden]{display:none!important}
.p400-reader-stage{overflow:hidden;min-height:0;align-items:stretch}
#p400-reader-flip-shell{flex:1 1 100%;min-width:0;min-height:0}
#p400-reader-native.is-visible{display:block!important;flex:1 1 100%;width:100%;height:100%;min-width:0;min-height:260px}
#p400-reader-side-prev,#p400-reader-side-next{z-index:30!important;pointer-events:auto;touch-action:manipulation}
#p400-reader-side-prev:disabled,#p400-reader-side-next:disabled{pointer-events:none}
.p400-reader-stage.is-preparing:before{display:none}
.p400-reader-progress{position:absolute;inset:0;z-index:20;display:flex;justify-content:center;align-items:center;pointer-events:none;background:linear-gradient(125deg,#211a19bd,#3e2e29ba);color:#fff8ef}
.p400-reader-progress-content{width:min(370px,calc(100% - 112px));display:flex;flex-direction:column;align-items:center;gap:16px;padding:22px 18px;text-align:center;border-radius:12px;background:#291d1bdc;box-shadow:0 12px 32px #0004;pointer-events:auto}
.p400-reader-progress-content strong{font:700 1.05rem/1.4 system-ui,sans-serif;color:#fff9ec}
.p400-reader-progress-track{width:100%;height:9px;overflow:hidden;border-radius:99px;background:#f9f1e63b}
.p400-reader-progress-fill{width:var(--p400-load,0%);height:100%;border-radius:inherit;background:#e1b96f;transition:width .2s ease-out}
.p400-reader-progress-track.is-indeterminate .p400-reader-progress-fill{width:33%;animation:p400-load-indeterminate 1.5s ease-in-out infinite}
@keyframes p400-load-indeterminate{0%{transform:translateX(-110%)}100%{transform:translateX(310%)}}
#p400-reader-progress-fallback{border:1px solid #fff0d2!important;background:#fff8eb!important;color:#4e1111!important;padding:10px 14px!important;border-radius:8px!important;font:750 .82rem/1.2 system-ui,sans-serif!important;cursor:pointer}
#p400-reader-progress-fallback:focus-visible{outline:3px solid #e1b96f;outline-offset:3px}
.p400-reader-foot-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.p400-reader-foot-actions button{border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;color:#722129!important;font-weight:750;font-size:.76rem;cursor:pointer;padding:4px 2px}
.p400-resource-dialog:fullscreen,.p400-resource-dialog.is-reader-expanded{width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;border-radius:0!important;margin:0!important}
.p400-resource-dialog.is-reader-expanded{position:fixed!important;inset:0!important;z-index:2147483647}
@media(max-width:680px){.p400-reader-progress-content{width:min(310px,calc(100% - 82px));padding:16px 12px}.p400-reader-foot-actions{gap:6px}}
@media(prefers-reduced-motion:reduce){.p400-reader-progress-track.is-indeterminate .p400-reader-progress-fill{animation:none;width:35%}}

/* Respect editor download visibility on toolbar anchors, despite legacy inline-flex !important. */
#p400-reader-download[hidden]{display:none!important}

/* Project 400 v2.1.14: true fit-page magazine (100%=whole page) and compact chrome. */
.p400-reader-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.p400-resource-dialog{height:min(96dvh,1100px)!important;max-height:96dvh!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.p400-reader-head{display:none!important}
.p400-reader-tools{flex:0 0 auto!important;min-width:0;padding:7px 10px!important;justify-content:center!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;min-height:46px;box-sizing:border-box}
.p400-reader-tools button,.p400-reader-tools a{min-height:30px!important;padding:6px 9px!important;line-height:1.18!important}
.p400-reader-tools #p400-reader-status{flex:none!important;min-width:89px;line-height:1.25}
.p400-reader-close{position:sticky!important;right:0!important;flex:0 0 34px!important;min-width:34px!important;width:34px!important;height:34px!important;min-height:34px!important;border:1px solid #b9a59b!important;border-radius:50%!important;background:#fff!important;color:#4e1111!important;box-shadow:0 1px 5px #29100e24!important;z-index:32;margin-left:5px}
.p400-reader-stage{flex:1 1 0!important;min-height:0!important;height:0!important;width:100%!important;overflow:hidden!important}
#p400-reader-flip-shell{height:100%!important;min-height:0!important;width:100%!important;max-height:100%!important;padding:6px 56px!important;overflow:hidden!important;box-sizing:border-box!important;display:grid!important;place-items:center!important}
#p400-reader-flip-shell[hidden]{display:none!important}
#p400-reader-book{min-height:0!important;max-height:100%!important;max-width:100%!important;margin:auto!important;display:grid!important;place-items:center!important;align-content:center!important;box-sizing:border-box!important}
#p400-reader-book.p400-local-book{width:var(--p400-fit-w,auto)!important;height:var(--p400-fit-h,auto)!important}
#p400-reader-book.p400-local-book .p400-real-page{width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;max-width:100%!important;box-sizing:border-box!important}
#p400-reader-book .p400-real-page img{width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important}
.p400-reader-foot{flex:0 0 auto!important;min-height:35px!important;box-sizing:border-box!important;justify-content:center!important;padding:4px 10px!important;gap:5px!important}
.p400-reader-foot-actions{justify-content:center;gap:10px}
.p400-reader-foot-actions a[hidden]{display:none!important}
#p400-reader-single{min-height:0!important;height:100%!important;overflow:auto!important;padding:8px!important;overscroll-behavior:contain;align-items:flex-start;justify-content:flex-start}
#p400-reader-single-page{margin:auto!important;min-height:0!important;flex:0 0 auto!important;box-sizing:content-box!important}
#p400-reader-single-page>img{height:auto!important;max-height:none!important;max-width:none!important;display:block!important}
.p400-reader-side{top:50%!important;}
.p400-reader-orientation-hint{position:absolute;top:9px;left:50%;transform:translateX(-50%);z-index:31;background:#fff9ec;color:#4e1111;border:1px solid #d5b99f;border-radius:8px;padding:9px 14px;text-align:center;max-width:min(95%,370px);font-size:.78rem;box-shadow:0 6px 20px #0004}
.p400-reader-orientation-hint[hidden]{display:none!important}
#p400-reader-landscape{display:none!important}
@media(max-width:760px) and (pointer:coarse){#p400-reader-landscape{display:inline-flex!important}}
@media(max-width:720px){
 .p400-resource-dialog{width:100vw!important;max-height:100dvh!important;height:100dvh!important;border-radius:0!important}
 .p400-reader-tools{justify-content:flex-start!important;gap:4px!important;padding:6px 6px!important}
 .p400-reader-tools button,.p400-reader-tools a{font-size:.68rem!important;min-height:30px!important;padding:5px 7px!important}
 .p400-reader-tools #p400-reader-status{min-width:75px!important;font-size:.68rem!important}
 #p400-reader-flip-shell{padding:5px 37px!important}
 .p400-reader-side{width:31px!important;min-width:31px!important;height:46px!important}
 .p400-reader-side-prev{left:2px!important}.p400-reader-side-next{right:2px!important}
 .p400-reader-foot{padding:4px!important;min-height:32px!important}
}
@media(max-height:410px){.p400-reader-tools{padding-block:3px!important;min-height:37px}.p400-reader-foot{min-height:29px!important}.p400-reader-side{height:35px!important}}
.p400-resource-dialog:fullscreen,.p400-resource-dialog.is-reader-expanded{width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;border-radius:0!important}
/* Keep the close action in the actual top-right corner, without covering navigation. */
.p400-reader-tools{position:relative!important;padding-right:52px!important}
.p400-reader-tools>button.p400-reader-close{font-size:0!important;line-height:0!important;position:absolute!important;right:9px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important;min-height:34px!important;height:34px!important}
@media(max-width:720px){
 .p400-resource-dialog{width:calc(100vw - 2px)!important;max-width:calc(100vw - 2px)!important}
 .p400-reader-tools{flex-wrap:wrap!important;justify-content:center!important;overflow:visible!important;padding:5px 43px 5px 6px!important;gap:4px!important;min-height:0!important}
 .p400-reader-tools button,.p400-reader-tools a{padding:5px 7px!important;min-height:28px!important}
 .p400-reader-tools>button.p400-reader-close{top:6px!important;transform:none!important;right:5px!important}
 #p400-reader-status{min-width:70px!important}
}

@media(pointer:coarse) and (max-height:520px){#p400-reader-landscape{display:inline-flex!important}}

/* Project 400 v2.1.15: stop the oversized, right-offset cover regression.
 * One local engine owns the spread. The book is always centered and each leaf
 * is sized independently from the PDF's decoded page aspect ratio. */
#p400-reader-book.p400-local-book{
 display:flex!important;align-items:center!important;justify-content:center!important;
 flex-wrap:nowrap!important;gap:0!important;overflow:visible!important;
 position:relative!important;min-width:0!important;min-height:0!important;
 width:var(--p400-fit-w,auto)!important;height:var(--p400-fit-h,auto)!important;
 max-width:100%!important;max-height:100%!important;
}
#p400-reader-book.p400-local-book .p400-real-page{
 flex:0 0 auto!important;position:relative!important;
 width:var(--p400-leaf-w,auto)!important;height:var(--p400-leaf-h,auto)!important;
 min-width:0!important;min-height:0!important;max-width:none!important;max-height:100%!important;
 box-sizing:border-box!important;overflow:hidden!important;
}
#p400-reader-book.p400-local-book .p400-real-page img{
 display:block!important;width:100%!important;height:100%!important;
 max-width:100%!important;max-height:100%!important;object-fit:contain!important;
}
#p400-reader-book.p400-local-book .p400-local-turn-content{
 width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;
}
#p400-reader-book.p400-local-book .p400-local-turn-sheet{
 max-width:none!important;max-height:none!important;
}

/* Project 400 v2.1.16 — restore a perceptible real two-sided page flip.
 * Only the transient paper overlay transforms; the fitted book and leaf sizes
 * from v2.1.15 are unchanged, so the cover stays centered and never overflows. */
#p400-reader-book.p400-local-book{perspective:1800px!important;perspective-origin:50% 50%!important}
#p400-reader-book.p400-local-book>.p400-local-turn-sheet{
 position:absolute!important;inset:auto!important;z-index:8!important;
 transform-style:preserve-3d!important;backface-visibility:visible!important;
 box-sizing:border-box!important;pointer-events:none!important;
 width:var(--p400-turn-w,auto);height:var(--p400-turn-h,auto);
 transform:rotateY(0deg);will-change:transform;
 box-shadow:none!important;overflow:visible!important;
}
#p400-reader-book.p400-local-book>.p400-local-turn-sheet.turn-forward{transform-origin:left center!important}
#p400-reader-book.p400-local-book>.p400-local-turn-sheet.turn-back{transform-origin:right center!important}
#p400-reader-book.p400-local-book>.p400-local-turn-sheet.is-turning{
 animation:p400-real-turn-forward var(--p400-turn-duration,730ms) cubic-bezier(.39,.03,.29,.99) forwards!important;
}
#p400-reader-book.p400-local-book>.p400-local-turn-sheet.turn-back.is-turning{
 animation-name:p400-real-turn-back!important;
}
#p400-reader-book.p400-local-book .p400-turn-face{
 position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;
 justify-content:center!important;width:100%!important;height:100%!important;
 overflow:hidden!important;box-sizing:border-box!important;
 border:1px solid #d5cabe;background:#fff!important;
 backface-visibility:hidden!important;-webkit-backface-visibility:hidden!important;
 box-shadow:0 4px 14px #120b0940!important;
}
#p400-reader-book.p400-local-book .p400-turn-face img{
 display:block!important;width:100%!important;height:100%!important;
 object-fit:contain!important;max-width:100%!important;max-height:100%!important;
}
#p400-reader-book.p400-local-book .p400-turn-back{transform:rotateY(180deg)!important}
#p400-reader-book.p400-local-book .p400-turn-face:after{
 content:'';position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(90deg,#0002,transparent 27%,transparent 70%,#0003);
}
#p400-reader-book.p400-local-book .p400-turn-placeholder{font:700 12px/1.4 system-ui,sans-serif;text-align:center;color:#8d8076;padding:12px}
@keyframes p400-real-turn-forward{
 0%{transform:rotateY(0deg)}
 22%{transform:rotateY(-35deg)}
 50%{transform:rotateY(-90deg)}
 78%{transform:rotateY(-145deg)}
 100%{transform:rotateY(-180deg)}
}
@keyframes p400-real-turn-back{
 0%{transform:rotateY(0deg)}
 22%{transform:rotateY(35deg)}
 50%{transform:rotateY(90deg)}
 78%{transform:rotateY(145deg)}
 100%{transform:rotateY(180deg)}
}
@media(prefers-reduced-motion:reduce){
 #p400-reader-book.p400-local-book>.p400-local-turn-sheet.is-turning{animation-duration:100ms!important}
}


/* Project 400 v2.1.17 — authentic v2.1.12 StPageFlip, bounded by fit-page dimensions.
   The custom local fallback retains its independent v2.1.15 styles. */
#p400-reader-book.p400-external-book{
 display:block!important;position:relative!important;
 width:var(--p400-fit-w,auto)!important;height:var(--p400-fit-h,auto)!important;
 min-width:0!important;min-height:0!important;
 max-width:100%!important;max-height:100%!important;
 margin:auto!important;padding:0!important;overflow:visible!important;
 perspective:none!important;transform:none!important;
 box-shadow:none!important;
}
#p400-reader-book.p400-external-book .stf__parent{
 max-height:100%!important;max-width:100%!important;
 margin:0 auto!important;
}
#p400-reader-book.p400-external-book .p400-real-page{
 box-sizing:border-box!important;min-width:0!important;min-height:0!important;
 max-width:none!important;max-height:none!important;
}
#p400-reader-book.p400-external-book .p400-real-page>img{
 width:100%!important;height:100%!important;object-fit:contain!important;
}

/* The book's hard cover occupies its right half. Center only that cover and
   smoothly return the book to full-spread center as it opens. */
#p400-reader-book.p400-external-book{
 transition:transform 480ms ease-out!important;
}
#p400-reader-book.p400-external-book.is-stf-cover{
 transform:translateX(calc(-1 * var(--p400-stf-half,0px)))!important;
}
@media(prefers-reduced-motion:reduce){
 #p400-reader-book.p400-external-book{transition:none!important}
}


/* Project 400 v2.1.18 — real StPageFlip visibility and measured centering.
 * Earlier broad page CSS forced display:flex!important even on pages the
 * original engine had marked display:none. Respect inline vendor visibility.
 * The only transform belongs to the book root, never to .stf__block/pages. */
#p400-reader-book.p400-external-book .p400-real-page[style*="display: none"]{display:none!important}
#p400-reader-book.p400-external-book .p400-real-page[style*="display: block"]{display:block!important}
#p400-reader-book.p400-external-book{
 transition:none!important;
 transform:translate3d(var(--p400-align-x,0px),var(--p400-align-y,0px),0)!important;
}
#p400-reader-book.p400-external-book.is-stf-cover{
 transform:translate3d(calc(var(--p400-align-x,0px) - var(--p400-stf-half,0px)),var(--p400-align-y,0px),0)!important;
}
#p400-reader-book.p400-external-book.p400-awaiting-align{opacity:0!important}
@media(prefers-reduced-motion:reduce){#p400-reader-book.p400-external-book{transition:none!important}}
