.book-editor{border:1px solid var(--line);border-radius:12px;padding:22px;margin:24px 0}.book-editor [hidden]{display:none!important}.book-editor .book-block{margin:24px 0;padding:20px}.book-editor .button-row{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.book-editor-preview{display:block;max-width:280px;max-height:160px;object-fit:contain;margin:16px 0}.book-editor textarea{white-space:pre-wrap}.book-launch{margin:24px 0}.book-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:#22272e;color:#f5f6f8;overflow:hidden}.book-dialog[open]{display:flex;flex-direction:column}.book-dialog::backdrop{background:#22272e}.book-toolbar,.book-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 24px;flex:0 0 auto}.book-toolbar{border-bottom:1px solid #48505b}.book-toolbar strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book-toolbar>div{display:flex;gap:10px}.book-controls{border-top:1px solid #48505b}.book-controls output{text-align:center;font-size:.9rem}.book-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:20px;gap:2px;overflow:hidden;touch-action:pan-y}.book-page{position:relative;flex:none;background:#fffefb;color:#242424;box-shadow:0 8px 26px #0005;overflow:hidden;box-sizing:border-box;border-radius:3px;font-family:Georgia,'Times New Roman',serif}.book-page-inner{position:absolute;inset:6% 7% 9%;display:flex;flex-direction:column;overflow:hidden}.book-page h3{font-family:system-ui,sans-serif;font-size:1em;line-height:1.35;letter-spacing:normal;margin:0 0 1em;flex:none;overflow-wrap:anywhere}.book-page-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;flex:1;min-height:0;overflow:hidden;margin:0}.book-page img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;flex:1}.book-page-number{position:absolute;bottom:2%;left:0;right:0;text-align:center;font:12px system-ui;color:#626970}.book-measure{position:absolute;visibility:hidden;pointer-events:none;left:-10000px;top:0}.book-sources[hidden]{display:none}.book-stage .book-page{animation:book-appear .16s ease-out}@keyframes book-appear{from{opacity:.6;transform:translateX(5px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.book-stage .book-page{animation:none}}@media(max-width:600px){.book-toolbar,.book-controls{padding:10px;gap:8px}.book-toolbar{flex-wrap:wrap}.book-toolbar strong{width:100%;font-size:.9rem}.book-toolbar>div{margin-left:auto}.book-controls button{padding:8px 10px;font-size:.85rem}.book-stage{padding:10px}.book-editor{padding:14px}.book-editor .book-block{padding:14px}}

/* Discourage ordinary selection/copy only on rendered book pages. */
.book-stage,.book-stage *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.book-stage img{-webkit-user-drag:none}

.book-image-frame{position:relative;display:flex;flex:1;min-height:0;width:100%}
.book-page .book-image-frame>img:not(.book-image-shield){position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.book-page .book-image-shield{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:fill;cursor:default}

.book-launch-actions,.book-speech{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.book-information{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;margin:24px 0}
.book-information p{margin:0 0 4px}.book-information small{color:var(--muted)}
.book-speech{padding:10px 24px;flex:0 0 auto;border-bottom:1px solid #48505b}
.book-speech[hidden]{display:none}.book-speech [role=status]{font-size:.85rem;flex:1;min-width:150px}
.book-dialog.book-preview{visibility:hidden!important;pointer-events:none!important;position:fixed;inset:0;z-index:-1}
@media(max-width:600px){.book-speech{padding:8px 10px;gap:8px}}

.book-page mark.book-spoken{background:#ffe58a;color:inherit;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone;}
