:root{color-scheme:dark;--gold:#cbb17c;--ink:#0b111b;--paper:#f7f4eb}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 48%,#27303b 0,#101823 48%,#0b111b 80%);color:#eee9dc;font:16px/1.5 system-ui,sans-serif;min-height:100vh}a{color:var(--gold)}button,select{font:inherit;min-height:44px;border:1px solid #586071;border-radius:7px;padding:9px 15px;color:#eee9dc;background:#17202e;cursor:pointer}button:disabled{opacity:.4;cursor:default}button:hover:not(:disabled){background:#2e3b4c}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:4px}.gold{background:var(--gold);color:#17120a;border-color:var(--gold)}button.gold:hover:not(:disabled){background:#e6cc96}.reader-header{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 4vw;border-bottom:1px solid #ffffff18;background:#0b111be8}.reader-header p{font-size:10px;letter-spacing:2px;color:var(--gold);margin:0}.reader-header h1{font:22px Georgia,serif;margin:4px 0}.reader-header h1 span{color:#aeb5bd;font:14px system-ui,sans-serif;margin-left:10px}.back,.download{text-decoration:none;font-size:14px;padding:8px 0}main{padding:18px 12px 28px;text-align:center}h2{font:24px Georgia,serif;margin:0 0 5px}#notice{min-height:24px;font-size:13px;color:#b7c0ca;margin:6px 0 12px}.book-stage{display:flex;justify-content:center;align-items:center;min-height:280px;width:100%;max-width:1100px;margin:auto;overflow:hidden;filter:drop-shadow(0 18px 25px #0008)}#book{margin:auto}.book-page{background:var(--paper);color:#373022;overflow:hidden;box-shadow:inset 0 0 12px #725b3520}.book-page:after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 5px 0 12px #00000012}.book-page img{display:block;width:100%;height:100%;object-fit:contain;user-select:none}.page-placeholder{position:absolute;inset:45% 0 auto;font-size:14px;color:#776b54}.book-page img[src]+.page-placeholder{display:none}.controls{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:24px 0 8px}.controls label{font-size:13px;display:flex;align-items:center;gap:8px}.position{margin:8px;color:var(--gold);font-size:13px}.help{color:#a8b1bc;font-size:12px;margin:10px}details{max-width:750px;margin:24px auto 0;text-align:left;color:#bac3cd;font-size:14px}summary{cursor:pointer;width:fit-content;margin:auto}#accessibleText{white-space:pre-wrap;background:#131c28;padding:20px;border-radius:8px;margin-top:12px;line-height:1.8}.fallback{padding:18px;border:1px solid #b69760;max-width:650px;margin:20px auto}.fallback button{margin:0 6px}dialog{width:96vw;height:94dvh;max-width:1400px;max-height:96dvh;border:1px solid #6c6557;padding:0;background:#101823;color:#eee9dc;border-radius:10px}dialog::backdrop{background:#000b}.zoom-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;background:#131c28}.zoom-toolbar label{display:flex;align-items:center;gap:8px}#zoomScroll{overflow:auto;height:calc(100% - 70px);padding:12px}#zoomImage{display:block;max-width:none;width:150%;height:auto;margin:auto}#reader:fullscreen{background:#0b111b;overflow:auto;padding:16px}#reader:fullscreen .book-stage{max-width:1200px}@media(max-width:600px){.reader-header{padding:12px 16px;gap:10px}.reader-header h1{font-size:16px}.reader-header h1 span{display:block;margin:2px 0 0;font-size:12px}.reader-header p{font-size:8px;letter-spacing:1px}.download,.back{font-size:12px}h2{font-size:20px}.controls{gap:8px;margin-top:18px}button,select{padding:8px 12px;font-size:14px}main{padding:15px 8px}.help{max-width:300px;margin:12px auto}.zoom-toolbar{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Mirror the page-turn geometry only; keep the original Urdu page readable. */
body[data-direction="rtl"] .book-stage{transform:scaleX(-1)}
body[data-direction="rtl"] .book-page img,body[data-direction="rtl"] .page-placeholder{transform:scaleX(-1)}
#book:not(.stf__parent){height:360px;overflow:hidden;visibility:hidden}
