/* The Quran owns the viewport. All controls are temporary overlays. */
body.reading-first{overflow:hidden;background:#e7e8dc}
.reading-first .app-header,.reading-first .reader-head,.reading-first .text-credit{display:none!important}
body.reading-first .reading-panel.reading-expanded{position:fixed;inset:0!important;margin:0!important;border:0;border-radius:0;padding:0!important;overflow:hidden;box-shadow:none;background:radial-gradient(ellipse at 50% 43%,#f4f0df 0,#e7e7d9 60%,#dce1d2 100%)}
body.reading-first .reading-panel.reading-expanded.reading-night{background:radial-gradient(ellipse at 50% 40%,#2b4030,#14281e 70%)}
body.reading-first .reading-panel.reading-expanded #mushaf-view{position:absolute;inset:0!important;display:flex;align-items:center;justify-content:center;padding:12px 10px;height:100%;}
.mushaf-spread{display:flex;direction:rtl;align-items:center;justify-content:center;gap:10px;width:100%;height:100%;}
body.reading-first .reading-panel.reading-expanded .mushaf-sheet{flex:0 0 auto;width:min(calc(100vw - 24px),calc((100dvh - 78px) * 1080 / 1714 + 36px));height:auto;max-height:none;margin:0!important;padding:14px 18px 8px;background:#fffdf3;box-shadow:inset 0 0 0 5px #fffdf3,inset 0 0 0 6px #c6b77e,0 14px 45px #26362328;border:1px solid #b5a269;border-radius:2px;transition:width .2s ease}
body.reading-first.two-pages .reading-panel.reading-expanded .mushaf-sheet{width:min(calc((100vw - 44px) / 2),calc((100dvh - 78px) * 1080 / 1714 + 36px));box-shadow:inset 0 0 0 5px #fffdf3,inset 0 0 0 6px #c6b77e,0 8px 28px #2636231f}
body.reading-first .reading-expanded .page-ornament{height:18px;margin-top:3px;line-height:18px;font-size:10px;gap:14px}
body.reading-first .reading-expanded .sheet-corner{font-size:20px;top:2px}
body.reading-first .reading-expanded .mushaf-navigation{position:fixed;top:14px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 130px);margin:0;background:#fffef6f2;border:1px solid #d4ddc8;box-shadow:0 8px 35px #1b3d302b;border-radius:16px;padding:6px 8px;z-index:42;backdrop-filter:blur(18px);transition:opacity .18s,transform .18s}
body.reading-first .fullscreen-exit{top:14px;right:16px;width:42px;height:42px;border-radius:14px;border:1px solid #d4ddc8;background:#fffef6f2;color:#315942;box-shadow:0 5px 20px #1b3d301a;font-size:19px;padding:0;z-index:43}
body.reading-first.player-hidden .reading-expanded .mushaf-navigation{opacity:0;transform:translate(-50%,-15px);pointer-events:none}
body.reading-first .player{bottom:16px;width:calc(100% - 40px);max-width:1160px;background:#fffef7ed;border-color:#d5dfc9;box-shadow:0 12px 50px #17382c30;border-radius:22px;z-index:45}
body.reading-first .player-inner{min-height:90px}
body.reading-first .show-player{left:18px;bottom:18px;width:39px;height:39px;border-radius:50%;border:1px solid #c6d2bc;background:#fcfdf5c9;color:#436548;box-shadow:0 3px 15px #203b1b12;font-size:27px;line-height:1;opacity:.7;z-index:50}
body.reading-first .show-player:hover,body.reading-first .show-player:focus-visible{opacity:1;background:#fffef5}
body.reading-first .verse-action{bottom:118px;z-index:60}body.reading-first.player-hidden .verse-action{bottom:20px}
body.reading-first .quran-text{width:min(1000px,calc(100vw - 40px));height:calc(100dvh - 32px);max-height:none;overflow:auto;margin:16px auto;padding:24px 5%;background:#fffdf3;border-radius:10px;color:#223e2d;box-shadow:0 12px 50px #173b251c}
body.reading-first .quran-text[hidden]{display:none!important}
#reading-drawer{width:min(760px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 50px);padding:0;border:1px solid #d8e0cd;border-radius:22px;background:#f8faf2;color:#244631;box-shadow:0 30px 100px #0c281c40;overflow:hidden;}
#reading-drawer::backdrop{background:#182e2480;backdrop-filter:blur(8px)}
#reading-drawer>header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;background:#f4f6ec;border-bottom:1px solid #e0e6d5}#reading-drawer>header small{font:12px 'Traditional Arabic',serif;color:#9c8c57}#reading-drawer h2{font-size:19px;margin:5px 0 0}#drawer-close{height:36px;width:36px;border:1px solid #dce4d1;background:#fcfdf7;color:#43613f;border-radius:11px}
.drawer-body{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);max-height:calc(100dvh - 155px);overflow:auto;}
#drawer-catalog{min-width:0;padding:16px;border-left:1px solid #e1e6d8}#drawer-settings{padding:23px;min-width:0}#drawer-settings h3{font-size:13px;margin:0 0 12px;color:#6d815b}
#reading-drawer .surah-section{display:flex!important;position:static;max-height:none;min-height:0;height:auto;margin:0;padding:0;border:0;background:transparent;box-shadow:none;border-radius:0;}
#reading-drawer .sidebar-top{display:none}#reading-drawer .surah-grid{max-height:calc(100dvh - 250px);min-height:220px;}#reading-drawer .search-wrap{flex:none}#reading-drawer .surah-card{min-height:56px}
#reading-drawer .settings-menu{position:static;width:auto;padding:0;margin-top:18px;border:0;background:transparent;box-shadow:none;display:flex;gap:16px;}#reading-drawer .reading-settings{position:static}#reading-drawer .settings-title{display:none}#reading-drawer .view-switch{display:flex;width:100%;border-radius:12px;padding:4px}#reading-drawer .view-switch button{flex:1;padding:10px;font-size:12px}#reading-drawer .settings-menu label{font-size:12px;line-height:1.6}#reading-drawer .reading-note{font-size:10px;color:#8a9b7a;line-height:1.8;margin:0;padding-top:12px;border-top:1px solid #e0e6d5}#drawer-about{margin-top:22px;background:none;border:0;color:#8a9a7a;font-size:11px;text-decoration:underline;cursor:pointer}#reading-drawer .font-size-controls:has(button[hidden]){display:none}
@media(max-width:850px){body.reading-first .reading-expanded .mushaf-navigation{top:10px;max-width:calc(100vw - 75px);padding:5px;gap:4px;border-radius:13px}body.reading-first .fullscreen-exit{top:10px;right:10px;width:37px;height:37px;border-radius:12px}body.reading-first .player{bottom:10px;width:calc(100% - 20px)}body.reading-first .player-inner{min-height:140px;display:grid;grid-template-columns:1fr auto}.player-main{display:contents}body.reading-first .verse-action{bottom:165px}body.reading-first.player-hidden .verse-action{bottom:16px}body.reading-first .show-player{left:12px;bottom:12px;width:35px;height:35px}.drawer-body{grid-template-columns:1fr}#reading-drawer{max-height:calc(100dvh - 24px);border-radius:18px}#reading-drawer>header{padding:14px 18px}.drawer-body{max-height:calc(100dvh - 110px)}#drawer-catalog{border-left:0;border-bottom:1px solid #e1e6d8;padding:14px}#reading-drawer .surah-grid{max-height:38dvh;min-height:180px}#drawer-settings{padding:18px}body.reading-first .reading-panel.reading-expanded .mushaf-sheet{padding:12px 14px 7px;width:min(calc(100vw - 16px),calc((100dvh - 72px) * 1080 / 1714 + 28px))}}
@media(prefers-reduced-motion:reduce){body.reading-first *{transition:none!important}}
/* A curved paper mesh with independently shaded front and reverse faces. */
.page-turn-layer{position:fixed;inset:0;z-index:36;pointer-events:none;transform-style:preserve-3d;overflow:hidden}.turn-still{position:absolute;background:#fffdf3}.turn-slice{position:absolute;transform-style:preserve-3d;will-change:transform;pointer-events:none}.turn-face{position:absolute;inset:0;overflow:hidden;background:#fffdf3;backface-visibility:hidden;-webkit-backface-visibility:hidden}.turn-back{transform:rotateY(180deg)}.turn-face:after{content:'';position:absolute;inset:0;z-index:2;background:#193124;opacity:var(--shade,0);pointer-events:none}.page-turn-layer .mushaf-sheet{position:absolute!important;top:0!important;max-width:none!important;max-height:none!important;flex:none!important;box-shadow:none!important;border-radius:2px!important}.page-turn-layer .mushaf-canvas{width:100%!important;height:auto!important;position:relative!important;max-width:none!important;margin:0!important}.page-turn-layer img{width:100%!important;height:auto!important;min-height:0!important}.page-turning .mushaf-spread{pointer-events:none}.mushaf-spread{touch-action:pan-y pinch-zoom}
@media(prefers-reduced-motion:reduce){.page-turn-layer{display:none!important}}
