.book-dialog { border:0; border-radius:18px; padding:24px; width:min(880px,calc(100vw - 24px)); max-height:90dvh; overflow:auto; color:#04284d; background:#f4f8fa; box-shadow:0 20px 80px #00162c66; }
.book-dialog::backdrop { background:#001327ba; }
.book-dialog [hidden] { display:none !important; }
.book-dialog button { cursor:pointer; border:1px solid #b6cad5; border-radius:24px; padding:10px 16px; background:white; color:#04284d; }
.book-dialog button:disabled { cursor:default; opacity:.4; }
.book-dialog button:focus-visible,.book-stage:focus-visible { outline:3px solid #129aca; outline-offset:4px; }
.book-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.book-dialog h2 { font-size:20px; line-height:1.5; margin:0; }
.book-view-controls,.book-rotate-controls,.book-page-controls { display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin:20px 0 0; align-items:center; }
.book-dialog [aria-pressed="true"] { color:white; background:#00468c; border-color:#00468c; }
.book-stage { display:grid; place-items:center; min-height:360px; perspective:1000px; touch-action:none; cursor:grab; user-select:none; overflow:hidden; padding:35px; }
.book-stage:active { cursor:grabbing; }
.book-model { --book-ratio:.625; position:relative; width:clamp(140px,34vw,230px); aspect-ratio:var(--book-ratio); transform-style:preserve-3d; }
.book-face { position:absolute; inset:0; backface-visibility:hidden; }
.book-front { transform:translateZ(14px); background:white; box-shadow:0 0 1px #173045; }
.book-cover { width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.book-back { transform:rotateY(180deg) translateZ(14px); background:#183853; }
.book-spine { width:28px; left:auto; right:-14px; transform:rotateY(90deg); background:#24455f; color:white; writing-mode:vertical-rl; text-align:center; padding:16px 4px; font-size:12px; overflow:hidden; }
.book-edge { width:28px; left:-14px; right:auto; transform:rotateY(-90deg); background:repeating-linear-gradient(90deg,#eee8db 0 2px,#fffef8 2px 4px); }
.book-help,.book-material-note { text-align:center; font-size:13px; line-height:1.7; margin:8px 0; }
.book-material-note { color:#556b7b; }
.book-pages-view { margin-top:24px; }
.book-pages-empty { text-align:center; padding:60px 16px; line-height:1.8; }
.book-spread { display:flex; justify-content:center; align-items:flex-start; gap:2px; }
.book-spread img { display:block; width:50%; height:auto; max-height:58dvh; object-fit:contain; background:white; }
.book-page-status { font-size:14px; }
@media(max-width:599px) { .book-dialog { padding:18px 12px; } .book-dialog h2 { font-size:17px; } .book-stage { min-height:310px; padding:30px 15px; } }

.book-spine,.book-back { background-size:100% 100%; background-repeat:no-repeat; }
.book-spread-viewport { overflow:auto; max-height:62dvh; }
.book-spread-viewport.is-zoomed .book-spread { width:1200px; }
.book-spread-viewport.is-zoomed img { max-height:none; }
.book-spread { box-shadow:0 4px 20px #04284d18; }
.book-page-controls { flex-direction:row-reverse; }

.book-page-controls .book-page-status { flex-basis:100%; text-align:center; order:2; }
.book-page-controls [data-page-zoom] { order:1; }
@media(max-width:599px) { .book-model { width:180px; } .book-page-controls button { padding:9px 12px; font-size:13px; } }
