.notebook-reader-open{overflow:hidden}
.notebook-reader{width:min(1120px,94vw);height:min(900px,90vh);height:min(900px,90dvh);max-width:94vw;max-height:90dvh;margin:auto;padding:0;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-surface);color:var(--ui-ink);box-shadow:0 20px 80px #0008;overflow:hidden}
.notebook-reader::backdrop{background:rgb(3 15 29 / .75)}
.notebook-reader[open]{display:flex;flex-direction:column}
.notebook-reader__header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.3rem;border-bottom:1px solid var(--ui-border);flex-shrink:0}
.notebook-reader__header h2{font-size:clamp(1.2rem,2vw,1.65rem);margin:0;line-height:1.25}
.notebook-reader__header p{font:400 .8rem/1.5 var(--font-nav);color:var(--ui-muted);margin:.3rem 0 0}
.notebook-reader__close{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border:1px solid var(--ui-border);border-radius:50%;background:var(--ui-bg);color:var(--ui-ink);font:400 1.6rem/1 sans-serif;cursor:pointer}
.notebook-reader__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.65rem;padding:.65rem 1.3rem;flex-shrink:0}
.notebook-reader__toolbar form{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:0;font:400 .8rem/1.5 var(--font-nav)}
.notebook-reader__toolbar input{width:4.5rem;padding:.35rem .4rem;border:1px solid var(--ui-border);border-radius:5px;background:var(--ui-bg);color:var(--ui-ink);font:inherit}
.notebook-reader__toolbar button{padding:.4rem .7rem;border:1px solid var(--ui-accent);border-radius:5px;background:var(--ui-accent);color:var(--ui-on-accent);font:600 .8rem/1.4 var(--font-nav);cursor:pointer}
.notebook-reader__toolbar a{color:var(--ui-accent);font:400 .78rem/1.5 var(--font-nav);text-underline-offset:3px}
.notebook-reader__body{flex:1;min-height:0;background:#525659;position:relative}
.notebook-reader__body iframe{display:block;border:0;width:100%;height:100%;background:#fff;color-scheme:light}
.notebook-reader__pages{height:100%;overflow:auto;overscroll-behavior:contain;padding:8px;background:#525659;color-scheme:light}
.notebook-reader__pages img{display:block;width:100%;max-width:none;height:auto;margin:0 auto;background:#fff}
.notebook-reader__pages p{padding:1rem;background:var(--ui-surface);color:var(--ui-ink)}
.notebook-reader__page-tools{display:flex;align-items:center;gap:.35rem;font:400 .78rem/1.4 var(--font-nav)}
.notebook-reader__toolbar [hidden]{display:none}
.notebook-reader__toolbar button:disabled{opacity:.45;cursor:default}
.notebook-reader__body [hidden]{display:none}
.notebook-reader__hint{flex-shrink:0;padding:.5rem 1.3rem;margin:0;font:400 .74rem/1.5 var(--font-nav);color:var(--ui-muted)}
.notebook-reader__sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:600px){.notebook-reader{width:96vw;max-width:96vw;height:94vh;height:94dvh;max-height:94dvh;border-radius:10px}.notebook-reader__header{padding:.8rem}.notebook-reader__toolbar{padding:.55rem .8rem}.notebook-reader__hint{padding:.4rem .8rem}}
