/* Dialog chrome; the book's shared preview/export page styles live in book.js. */
.book-dialog{width:min(1180px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid #b9c4bf40;border-radius:10px;background:#14242c;color:#f0eadb;box-shadow:0 20px 100px #0009;font:14px/1.6 Arial,sans-serif;overflow:auto}
.book-dialog::backdrop{background:#041018d9;backdrop-filter:blur(6px)}
.book-dialog-heading{display:flex;gap:24px;justify-content:space-between;align-items:flex-start;padding:30px 32px 24px;border-bottom:1px solid #b5c8ce28}
.book-dialog-heading h2{font:italic 300 42px/1.1 'Newsreader',Georgia,serif;letter-spacing:-.03em;color:#efddba;margin:12px 0 7px}
.book-dialog-heading p{margin:0;color:#bac7ca;font-size:12px}
.book-dialog-heading .book-eyebrow{font:9px/1.6 'IBM Plex Mono',monospace;letter-spacing:.13em;color:#c4caba}
.book-dialog-heading .book-access-summary{max-width:620px;margin-top:13px;color:#d4dace;line-height:1.7}
.book-dialog-heading #book-sample{min-height:44px;margin-top:15px;padding:10px 17px;border:1px solid #e8d2a8;border-radius:4px;background:#e9ddc3;color:#1b2a30;font:13px Arial,sans-serif;cursor:pointer}
.book-dialog-heading #book-sample-note{font-size:10px;line-height:1.7;margin-top:8px;color:#b9c8ca}
.book-dialog button,.book-dialog input,.book-dialog select{font-family:Arial,sans-serif}
.book-dialog .book-close{flex:0 0 42px;width:42px;height:42px;background:none;border:1px solid #c3d0cf44;border-radius:50%;color:#e4ded0;font-size:26px;cursor:pointer}
.book-workspace{display:grid;grid-template-columns:240px minmax(0,1fr);gap:28px;padding:28px 32px 32px}
.book-controls{min-width:0;display:flex;flex-direction:column;align-items:stretch}
.book-controls>label{display:block;color:#e3e3d6;font-size:11px;margin:0 0 7px}
.book-controls>label span{color:#a7b9bd}
.book-controls input,.book-controls select{background:#0e1b24;color:#eee6d3;border:1px solid #becfcd4d;border-radius:4px;font-size:13px;line-height:1.5;min-height:44px;padding:10px 11px;width:100%;min-width:0;margin:0 0 18px}
.book-controls input::placeholder{color:#8ea1a6}
.book-cover-save{margin:0 0 22px;padding:15px 0;border-top:1px solid #b6c5c530;border-bottom:1px solid #b6c5c530}
.book-cover-save button{min-height:44px;padding:9px 14px;border:1px solid #d8c29c88;border-radius:4px;background:#243c43;color:#f1dfbc;font-size:12px;cursor:pointer}
.book-cover-save #book-discard-cover{margin:8px 0 0 6px;background:none;border-color:#b2c2c244;color:#c4d2d2;font-size:11px}
.book-controls #book-design-status{font-size:11px;line-height:1.7;color:#d7dfd0;margin:10px 0 0}
.book-controls #book-design-status.book-error{color:#ffd0b9}
.book-design-scope{font-size:10px;line-height:1.8;color:#acbec1;margin:9px 0 0}
#book-design-conflict{margin-top:14px;padding:12px;background:#382d27;border:1px solid #d9b88d55;border-radius:4px}
#book-conflict-cover{font-size:12px;line-height:1.6;color:#f0ddc7;overflow-wrap:anywhere;margin:0 0 12px}
#book-design-conflict>div{display:flex;flex-wrap:wrap;gap:8px}
#book-design-conflict button{font-size:11px;background:#302c28;padding:8px 10px;text-align:left}
.book-local-note{color:#b9c8ca;font-size:11px;line-height:1.8;margin:2px 0 20px}
.book-controls #book-download{min-height:46px;border:1px solid #c5c8b366;border-radius:4px;background:#0d1e26;color:#e5dcc3;padding:11px 15px;font-size:12px;cursor:pointer}
.book-controls .book-key-note{font-size:10px;line-height:1.8;color:#b9c8ca;margin:12px 0 6px}
.book-controls .book-about{min-height:42px;text-align:left;padding:8px 0;background:none;border:0;color:#e5d7b8;font-size:11px;cursor:pointer}
.book-dialog #book-status{font-size:11px;line-height:1.8;color:#d4dfd4;margin:12px 0 0;overflow-wrap:anywhere}
.book-dialog #book-status:empty{display:none}.book-dialog #book-status.book-error{color:#ffd0b9}
.book-preview-region{min-width:0;padding:18px;background:#0b1820;border:1px solid #a6bec627;border-radius:6px}
.book-preview-heading{color:#bdc8c8;font-size:10px;margin-bottom:18px;line-height:1.5}
.book-preview-heading>span{font:9px/1.6 'IBM Plex Mono',monospace;letter-spacing:.14em;color:#d9cfb9}
.book-preview-heading p{margin:6px 0 0}
.book-personalize{display:none;min-height:44px;padding:9px 0 0;border:0;background:none;color:#ead6ad;font-size:12px;text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.book-preview-switch{display:none}
.book-preview-switch button{min-height:38px;padding:7px 16px;background:none;border:1px solid #b6c5c549;color:#cbd8d5;font-size:11px;cursor:pointer}
.book-preview-switch button:first-child{border-radius:4px 0 0 4px}.book-preview-switch button:last-child{border-left:0;border-radius:0 4px 4px 0}
.book-preview-switch button[aria-pressed="true"]{background:#e2d4b4;color:#1d3036;border-color:#e2d4b4}
.book-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.book-preview-sheet{position:relative;width:100%;overflow:hidden;box-shadow:0 4px 14px #0005}
.book-preview-sheet .tbook-page{transform-origin:top left}
.book-format-note{font-size:10px;line-height:1.7;color:#a5b8bd;margin:16px 0 0}
.book-readable{display:none;margin-top:18px;border-top:1px solid #b6c5c535;padding-top:8px}
.book-readable summary{min-height:44px;padding:10px 0;color:#ead6ad;font-size:13px;cursor:pointer}
.book-readable-note{font-size:11px;line-height:1.7;color:#b2c1c5;margin:3px 0 18px}
.book-readable-entry{margin-top:20px}.book-readable-entry:first-child{margin-top:0}
.book-readable-date{font-size:12px;line-height:1.5;color:#c4c8ba;margin:0 0 7px}
.book-readable-text{font:16px/1.65 Georgia,'Times New Roman',serif;color:#f0e8d8;overflow-wrap:anywhere;margin:0;unicode-bidi:plaintext}
.book-dialog #book-empty{font:italic 25px/1.4 'Newsreader',Georgia,serif;color:#d6ceb9;margin:35px 12px;max-width:340px}
.book-dialog #book-empty p{margin:0 0 20px}
.book-dialog #book-write{min-height:44px;padding:10px 14px;border:1px solid #e8d2a8;border-radius:4px;background:#e9ddc3;color:#1b2a30;font:13px Arial,sans-serif;cursor:pointer}
.book-dialog :is(input,select,button,summary):focus-visible{outline:2px solid #f4d795;outline-offset:4px}
.book-dialog button:disabled{opacity:.55;cursor:wait}
@media(max-width:800px){.book-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.book-dialog-heading{padding:24px}.book-workspace{padding:24px;grid-template-columns:200px minmax(0,1fr);gap:18px}.book-preview{grid-template-columns:1fr}.book-preview-region{padding:14px}.book-preview-sheet{max-width:420px;margin:auto}}
@media(max-width:590px){.book-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:7px}.book-dialog-heading{padding:22px 18px 18px}.book-dialog-heading h2{font-size:37px}.book-dialog-heading .book-eyebrow{font-size:8px}.book-workspace{padding:20px 18px;display:flex;flex-direction:column;gap:24px}.book-personalize,.book-readable:not([hidden]){display:block}.book-preview{grid-template-columns:1fr;gap:16px}.book-preview-sheet{max-width:300px}.book-preview-switch{display:flex;margin:0 0 15px}.book-preview[data-side="cover"] .book-preview-sheet:nth-child(2),.book-preview[data-side="inside"] .book-preview-sheet:first-child{display:none}.book-controls .book-key-note{font-size:11px}.book-dialog-heading p{font-size:11px}}
