.cover{background:linear-gradient(155deg,#152e37,#496963);overflow:hidden}.rain-art{height:100%;min-height:300px;color:#d1b584;font:150px/2 serif;text-align:center;background:repeating-linear-gradient(110deg,transparent 0 21px,#ffffff09 22px 23px)}.cover-words{z-index:1}.cover-words strong{font-size:32px}.reader2-tools{flex-wrap:wrap}#audioTools details{margin:4px 0;padding:9px 14px;border:1px solid #879d9440;border-radius:10px}#audioPanel[open]{max-height:280px;overflow:auto}summary{cursor:pointer}.audio-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}.audio-grid label{display:flex;flex-direction:column;gap:6px;font-size:13px}.audio-grid input[type=checkbox]{width:auto}.audio-grid select{max-width:100%;width:100%}.speaking-block{box-shadow:inset 3px 0 #6f987e}::highlight(spoken){background:#d6e6c7;color:#142c20}#aiDialog{width:min(720px,94vw)}#aiDialog blockquote{max-height:140px;overflow:auto;margin:15px 0;padding:12px;border-left:3px solid #537e72;background:#537e7210;white-space:pre-wrap;font-size:14px}#aiAnswer{white-space:pre-wrap;line-height:1.8;margin:20px 0}#citations button{display:block;text-align:left;margin:8px 0;max-width:100%;white-space:normal}#aiDialog textarea,#dictionary{width:100%;min-height:80px}#aiDialog select,#apiKey{max-width:100%;margin:8px 0}#aiConnection{font-size:13px}#footnoteList section{padding:12px 0;border-bottom:1px solid #8884}#footnoteList p{line-height:1.8}button:disabled{opacity:.45}.inline-actions{flex-wrap:wrap}#speechStatus{font-size:12px;min-height:18px}#content,#content *{user-select:text!important;-webkit-user-select:text!important}@media(max-width:650px){.audio-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reader2-tools button{padding:6px 8px;font-size:12px}#audioPanel[open]{max-height:210px}.reading-toolbar{flex-wrap:wrap}.book-label{min-width:0}dialog{max-height:88dvh}.inline-actions button{font-size:12px}}@media print{.print-message{display:none!important}.prose{display:block!important}}

/* Reader AI: keyboard/viewport-safe dialog; native close releases modality. */
#aiDialog{box-sizing:border-box;max-width:calc(100vw - 16px);max-height:88vh;max-height:88dvh;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}#aiDialog .dialog-head{position:sticky;top:0;background:var(--bg,#f5f0e6);z-index:2}#aiDialog textarea{box-sizing:border-box;font-size:16px}#aiAnswer{overflow-wrap:anywhere}
