.v31-read-toolbar{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:15px auto}.v31-read-toolbar button{background:#09274e;color:#e3f5ff;border:1px solid #67bdfb8c;padding:9px 13px;border-radius:10px;cursor:pointer}.v31-read-toolbar button.is-active{background:#1764ae;border-color:#9ee4ff}.v31-text-reader{display:grid;grid-template-columns:1fr 1fr;gap:5px;width:min(100%,1320px);margin:auto;border-radius:13px;padding:6px;background:linear-gradient(135deg,#3b98f0,#103266,#70d3ff);box-shadow:0 0 48px #3488ef5c}.v31-text-leaf{background:linear-gradient(145deg,#091a3a,#051329);color:#f0f7ff;min-height:min(69dvh,740px);max-height:74dvh;overflow:auto;padding:clamp(22px,4vw,52px);font:var(--reader-size,19px)/1.85 Georgia,serif;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}.v31-text-leaf p{margin:0 0 1.25em}.v31-text-leaf:first-child{border-radius:9px 0 0 9px}.v31-text-leaf:last-child{border-radius:0 9px 9px 0}.v31-text-reader[hidden],.reading-stage[hidden]{display:none!important}@media(max-width:780px){.v31-text-reader{grid-template-columns:1fr}.v31-text-leaf:last-child{display:none}.v31-text-leaf{max-height:72dvh;min-height:50dvh}}
/* V32: the scan and accessible text share the same arrow controls. */
.reading-stage{grid-template-columns:clamp(42px,5vw,65px) minmax(0,1fr) clamp(42px,5vw,65px);align-items:center}
.paper-book[hidden],.v31-text-reader[hidden]{display:none!important}
.reading-stage .v31-text-reader{width:100%;max-width:1320px;min-width:0;grid-column:2;margin:0 auto}
.reading-stage .paper-book{grid-column:2;max-width:100%;width:min(100%,calc(76dvh * 1.414));height:auto;aspect-ratio:1.414;max-height:76dvh;justify-self:center;box-sizing:border-box}
.reading-stage .paper-book .paper-leaf img{object-fit:contain;width:100%;height:100%;background:#f8f8f9}
.reading-stage .paper-book .paper-leaf{background:#f8f8f9}
.reading-stage .v31-text-leaf{min-width:0;min-height:min(65dvh,700px);max-height:76dvh}
.reading-stage .leaf-btn{grid-row:1;z-index:6}
.reading-stage #read-prev{grid-column:1}
.reading-stage #read-next{grid-column:3}
.reading-stage .paper-book,.reading-stage .v31-text-reader{grid-row:1}
.reading-stage .paper-book.is-zoomed{transform:scale(1.08);transform-origin:center;position:relative}
@media (max-width:780px){
 .reading-stage .paper-book{aspect-ratio:.707;max-height:74dvh;max-width:min(100%,520px)}
 .reading-stage .v31-text-reader{grid-template-columns:1fr}
 .reading-stage .v31-text-leaf:last-child{display:none}
 .reading-stage .v31-text-leaf{max-height:72dvh}
}
