@font-face{font-family:AmiriQuran;src:url('/fonts/amiri-quran.ttf') format('truetype');font-display:swap}
@font-face{font-family:Manrope;src:url('/fonts/manrope.ttf') format('truetype');font-display:swap;font-weight:200 800}
:root{--bg:#f6f5f0;--paper:#fffefa;--panel:#eeeee6;--ink:#243c34;--muted:#7e8980;--green:#123f36;--green-light:#e5ede5;--gold:#b08d51;--line:#e4e5dc;--arabic:38px;--translation:17px;--shadow:0 12px 38px #203c3010;color-scheme:light;font-family:Manrope,Arial,sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.6}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}a{color:var(--green)}button,a,input,select{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold)}button{color:inherit}svg{width:20px;height:20px;vertical-align:middle;flex-shrink:0}button{border:0;background:none}a{text-underline-offset:3px}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:600}input,select{color:var(--ink);background:var(--paper)}[hidden]{display:none!important}.skip-link{position:fixed;top:-60px;left:20px;z-index:100;background:var(--paper);padding:12px}.skip-link:focus{top:10px}.boot{height:100vh;display:flex;gap:12px;flex-direction:column;align-items:center;justify-content:center}.loading-wheel{width:30px;height:30px;border:2px solid var(--line);border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.sidebar{width:270px;position:fixed;inset:0 auto 0 0;z-index:30;display:flex;flex-direction:column;background:var(--paper);border-right:1px solid var(--line)}.brand{display:flex;gap:13px;align-items:center;padding:28px 26px;border-bottom:1px solid var(--line);height:98px;text-decoration:none}.brand img{width:42px;height:42px;border-radius:12px}.brand strong{font-family:Georgia,serif;font-weight:500;font-size:23px;letter-spacing:-.8px}.brand small{display:block;color:var(--muted);font-size:10px;letter-spacing:2px;text-transform:uppercase;margin-top:1px}.side-top{padding:25px 20px 14px}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:10px;font-weight:700;color:var(--muted)}.side-tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);margin-top:11px}.side-tab{flex:1;padding:11px 5px;color:var(--muted);font-size:12px;border-bottom:2px solid transparent}.side-tab.active{color:var(--green);border-bottom-color:var(--green);font-weight:700}.side-search{display:flex;gap:9px;align-items:center;background:var(--bg);border:1px solid var(--line);padding:9px 11px;border-radius:8px;margin-top:16px;color:var(--muted)}.side-search svg{width:16px}.side-search input{width:100%;border:0;background:none;font-size:12px;outline:0}.side-list{overflow:auto;padding:0 10px 20px;flex:1;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.chapter-link{display:flex;text-align:left;align-items:center;gap:13px;border-radius:8px;padding:12px 13px;width:100%;margin:3px 0;position:relative}.chapter-link:hover{background:var(--bg)}.chapter-link.active{background:var(--green-light);color:var(--green)}.chapter-num{font-size:10px;min-width:28px;height:28px;border:1px solid var(--line);display:grid;place-items:center;transform:rotate(45deg);border-radius:5px;color:var(--muted)}.chapter-num span{transform:rotate(-45deg)}.chapter-link.active .chapter-num{border-color:#aac1af;color:var(--green)}.chapter-link strong{font-weight:600;font-size:13px;display:block}.chapter-link small{display:block;font-size:10px;color:var(--muted);margin-top:2px}.chapter-link .active-dot{width:5px;height:5px;margin-left:auto;border-radius:50%;background:var(--green)}.side-bottom{border-top:1px solid var(--line);padding:16px 25px;color:var(--muted);font-size:11px;display:flex;align-items:center;gap:9px}.side-bottom svg{width:15px;color:var(--gold)}
.workspace{margin-left:270px;min-height:100vh;padding-bottom:108px}.topbar{height:98px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;gap:24px}.nav{display:flex;gap:30px;height:100%;align-items:center}.nav-button{display:flex;align-items:center;gap:9px;height:100%;font-size:12px;color:var(--muted);position:relative}.nav-button.active{color:var(--green);font-weight:700}.nav-button.active:after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--green)}.nav-button svg{width:17px}.top-actions{display:flex;gap:9px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:37px;height:37px;border:1px solid var(--line);border-radius:50%;background:var(--paper)}.icon-button:hover{background:var(--green-light)}.mobile-menu{display:none}.main{max-width:1290px;margin:0 auto;padding:35px 42px 25px}.welcome-row{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:25px}.welcome-row h1{font-size:27px;letter-spacing:-.9px;margin:4px 0 3px;font-weight:500}.welcome-row p{font-size:12px;color:var(--muted)}.continue-button{display:flex;align-items:center;gap:10px;text-align:left;font-size:11px;background:var(--paper);border:1px solid var(--line);padding:10px 15px;border-radius:10px}.continue-button svg{color:var(--gold);width:17px}.continue-button strong{display:block;font-size:12px;color:var(--green)}
.global-search{display:flex;gap:13px;align-items:center;border:1px solid var(--line);background:var(--paper);border-radius:11px;padding:13px 16px;margin-bottom:28px}.global-search>svg{color:var(--muted);width:19px}.global-search input{width:100%;border:0;background:none;outline:none;font-size:13px}.key-hint{border:1px solid var(--line);border-radius:4px;color:var(--muted);padding:1px 7px;font-size:10px;white-space:nowrap}.search-submit{background:var(--green);color:#fff;border-radius:7px;padding:7px 14px;font-size:11px}.chapter-banner{position:relative;overflow:hidden;background:var(--green);color:#eff3e9;border-radius:12px;padding:27px 32px;display:flex;justify-content:space-between;align-items:center;gap:25px;min-height:152px}.chapter-banner:after{content:'';position:absolute;width:230px;height:230px;border:1px solid #ffffff0c;transform:rotate(45deg);right:60px;top:-105px;box-shadow:0 0 0 26px #ffffff04,0 0 0 52px #ffffff03;pointer-events:none}.banner-label{font-size:9px;text-transform:uppercase;letter-spacing:2px;color:#bbc9b5;display:flex;align-items:center;gap:8px}.banner-label svg{width:13px}.chapter-banner h2{font-family:Georgia,serif;font-size:34px;font-weight:400;letter-spacing:-.5px;margin:5px 0}.banner-meta{font-size:11px;color:#bacbbf;display:flex;gap:12px;align-items:center}.banner-meta i{width:3px;height:3px;border-radius:50%;background:#92a997}.banner-arabic{font-family:AmiriQuran,'Times New Roman',serif;font-size:42px;line-height:2;color:#e9dfc3;padding:0 3px;z-index:1}.reader-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 0}.toolbar-left,.toolbar-right{display:flex;gap:8px;align-items:center}.pill{display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 13px;border:1px solid var(--line);border-radius:7px;background:var(--paper);font-size:11px;white-space:nowrap}.pill svg{width:14px;height:14px}.pill.primary{background:var(--green);border-color:var(--green);color:white}.pill.active{background:var(--green-light);border-color:#aec4b3;color:var(--green)}.view-toggle{display:flex;background:var(--panel);border-radius:7px;padding:3px}.view-toggle button{border-radius:5px;padding:5px 10px;font-size:10px;color:var(--muted)}.view-toggle button.active{background:var(--paper);box-shadow:0 1px 3px #243c3410;color:var(--green)}.jump-label{font-size:10px;color:var(--muted);display:flex;align-items:center;gap:8px}.jump-label select{border:1px solid var(--line);padding:5px 8px;border-radius:5px;max-width:67px;font-size:11px}.reading-head{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-bottom:0;background:var(--panel);border-radius:10px 10px 0 0;font-size:10px;color:var(--muted);padding:12px 22px;gap:50px}.reading-head>span{display:flex;align-items:center;gap:7px}.reading-head>span:last-child{justify-content:space-between}.reading-head svg{width:12px;height:12px}.source-tag{font-size:9px;font-weight:500;letter-spacing:.3px;color:var(--gold)}.verses{border:1px solid var(--line);border-radius:0 0 10px 10px;overflow:hidden;background:var(--paper)}.verse{position:relative;border-bottom:1px solid var(--line);padding:23px 23px 17px;scroll-margin-top:20px;transition:background .2s}.verse:last-child{border-bottom:0}.verse.is-playing{background:#f1f5eb;box-shadow:inset 3px 0 var(--green)}.verse.is-highlighted{animation:highlight 2s ease}.verse-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:3px}.verse-reference{font-size:10px;letter-spacing:.5px;color:var(--gold);font-weight:600}.verse-tools{display:flex;gap:5px}.small-icon{border-radius:5px;width:27px;height:27px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted)}.small-icon:hover,.small-icon.saved{color:var(--green);background:var(--green-light)}.small-icon svg{width:14px;height:14px}.verse-content{display:grid;grid-template-columns:1fr 1fr;gap:46px;align-items:center}.arabic-text{font-family:AmiriQuran,'Times New Roman',serif;font-size:var(--arabic);line-height:2.2;text-align:right;direction:rtl;font-weight:400;color:var(--ink);overflow-wrap:break-word;padding:7px 0 13px}.arabic-word{display:inline;padding:0;color:inherit;font:inherit;line-height:inherit;border-radius:4px}.arabic-word:hover{background:#e7ecdf;color:var(--green)}.verse-mark{font-family:AmiriQuran,serif;font-size:.7em;color:var(--gold);white-space:nowrap;padding-inline-start:7px}.translation-text{font-size:var(--translation);line-height:1.95;font-weight:400;color:#4d5a50;padding:7px 0 13px}.verse-bottom{display:flex;justify-content:flex-end;gap:13px}.text-button{font-size:10px;color:var(--muted);display:inline-flex;gap:5px;align-items:center;padding:3px}.text-button svg{width:12px;height:12px}.text-button:hover{color:var(--green)}.text-button.playing{color:var(--green);font-weight:700}.arabic-only .verse-content{grid-template-columns:1fr}.arabic-only .translation-text{display:none}.arabic-only .reading-head{grid-template-columns:1fr}.arabic-only .reading-head>span:last-child{display:none}.arabic-only .arabic-text{font-size:calc(var(--arabic) + 4px)}
.reader-end{display:flex;justify-content:space-between;align-items:center;padding:25px 0;border-bottom:1px solid var(--line);gap:12px}.reader-end p{font-size:11px;color:var(--muted)}.dedication{text-align:center;max-width:670px;margin:29px auto 15px;padding:0 15px}.dedication svg{width:16px;height:16px;color:var(--gold);margin-bottom:8px}.dedication p{font-size:11px;line-height:1.9;color:var(--muted)}.dedication strong{font-weight:600;color:var(--ink)}.footer-links{display:flex;justify-content:center;gap:18px;font-size:10px;color:var(--muted);margin:16px 0 6px}.footer-links button{font-size:10px;color:inherit}
.player{position:fixed;bottom:0;left:270px;right:0;background:var(--paper);z-index:40;border-top:1px solid var(--line);box-shadow:0 -6px 30px #243c3405;padding:15px 31px max(15px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:25px;min-height:88px}.player-info{display:flex;align-items:center;gap:12px;min-width:178px}.player-symbol{width:43px;height:43px;border:1px solid var(--line);border-radius:9px;background:var(--bg);display:grid;place-items:center;color:var(--green)}.player-info strong{font-size:12px;font-weight:600;display:block}.player-info small{font-size:9px;color:var(--muted);display:block;margin-top:3px}.player-controls{display:flex;align-items:center;gap:10px}.player-controls button{display:grid;place-items:center;color:var(--muted);padding:5px}.player-controls svg{width:16px;height:16px}.play-button{width:40px;height:40px;border-radius:50%;background:var(--green)!important;color:white!important}.play-button svg{width:17px;height:17px}.player-progress{flex:1;min-width:60px}.player-progress input{width:100%;accent-color:var(--green);height:3px;cursor:pointer;margin:0;display:block}.player-time{display:flex;justify-content:space-between;font-size:9px;color:var(--muted);margin-top:8px;font-variant-numeric:tabular-nums}.player-options{display:flex;gap:9px;align-items:center}.player-options select{font-size:10px;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:8px;max-width:145px}.repeat.active{color:var(--green);background:var(--green-light)}
.section-title{font-family:Georgia,serif;font-size:34px;font-weight:400;margin:5px 0 8px}.section-intro{color:var(--muted);font-size:13px;line-height:1.9;max-width:650px;margin-bottom:26px}.result-summary{font-size:12px;color:var(--muted);margin:0 0 18px}.results-list{display:grid;gap:12px}.result-card{background:var(--paper);border:1px solid var(--line);padding:20px;border-radius:10px}.result-card .result-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;margin-bottom:10px;color:var(--green)}.result-card p{font-size:15px;line-height:1.9;color:var(--ink)}.result-card .result-arabic{font-family:AmiriQuran,serif;direction:rtl;text-align:right;font-size:29px;line-height:2.1;margin-bottom:12px}.empty-state{padding:50px 20px;text-align:center;color:var(--muted);background:var(--paper);border:1px dashed var(--line);border-radius:10px}.empty-state svg{width:34px;height:34px;color:var(--gold);margin-bottom:12px}.empty-state h3{font-size:18px;color:var(--ink);margin-bottom:8px}.empty-state p{font-size:12px}.dictionary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.dictionary-card{text-align:left;border:1px solid var(--line);background:var(--paper);border-radius:12px;padding:23px;position:relative;transition:transform .15s,border-color .15s}.dictionary-card:hover{transform:translateY(-3px);border-color:var(--gold)}.dictionary-card h3{font-family:Georgia,serif;font-size:25px;font-weight:400;margin:9px 0}.dictionary-card .entry-index{font-size:9px;color:var(--gold);letter-spacing:1px}.dictionary-card p{font-size:12px;color:var(--muted);line-height:1.9}.dictionary-card .entry-footer{font-size:9px;color:var(--gold);display:flex;align-items:center;justify-content:space-between;margin-top:22px}.dictionary-card svg{width:15px;height:15px}.notice{border-left:2px solid var(--gold);background:var(--panel);padding:15px 18px;border-radius:0 8px 8px 0;font-size:12px;line-height:1.85;color:var(--muted);margin:22px 0}.entry-quote{background:var(--paper);padding:28px;border:1px solid var(--line);border-radius:10px;margin:20px 0}.entry-quote blockquote{margin:0 0 15px;font-family:Georgia,serif;font-size:24px;line-height:1.6}.entry-quote cite{font-size:11px;font-style:normal;color:var(--muted)}.source-cards{display:grid;grid-template-columns:1fr 1fr;gap:17px}.source-card{background:var(--paper);border:1px solid var(--line);border-radius:11px;padding:24px}.source-card h3{font-size:17px;margin:9px 0 12px}.source-card p{font-size:12px;color:var(--muted);line-height:1.9}.source-card a{display:inline-flex;align-items:center;gap:6px;font-size:11px;margin-top:18px}.source-card a svg{width:13px;height:13px}.source-card .eyebrow{color:var(--gold)}.about-block{padding:27px;background:var(--green);color:#dbe5d9;border-radius:12px;margin-top:23px}.about-block h3{font-family:Georgia,serif;font-size:24px;font-weight:400;margin-bottom:10px}.about-block p{font-size:12px;line-height:1.9}.settings-dialog{border:1px solid var(--line);border-radius:16px;padding:0;background:var(--paper);color:var(--ink);max-width:460px;width:calc(100% - 32px);box-shadow:var(--shadow)}.settings-dialog::backdrop{background:#182e2466;backdrop-filter:blur(3px)}.dialog-header{padding:22px 25px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.dialog-header h2{font-size:19px;font-weight:500}.dialog-body{padding:24px}.setting-group{margin-bottom:24px}.setting-group:last-child{margin-bottom:0}.setting-group label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:12px}.setting-group input[type=range]{width:100%;accent-color:var(--green)}.setting-group p{font-size:10px;color:var(--muted);margin-top:10px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:15px}.settings-row input{accent-color:var(--green)}#toast{position:fixed;bottom:108px;left:calc(50% + 135px);transform:translate(-50%,15px);background:var(--green);color:white;padding:11px 18px;border-radius:9px;font-size:12px;z-index:100;opacity:0;pointer-events:none;transition:all .2s;max-width:calc(100% - 35px);text-align:center;box-shadow:var(--shadow)}#toast.visible{opacity:1;transform:translate(-50%,0)}.mobile-shade{display:none}.load-more{display:block;margin:22px auto 0}.inline-error{color:#9d4535;font-size:12px;padding:15px}.error-panel{margin:40px auto;max-width:600px;padding:30px;border:1px solid var(--line);border-radius:14px;background:var(--paper)}@keyframes highlight{0%,35%{background:#f1ecd7}100%{background:var(--paper)}}
body.dark{--bg:#121d19;--paper:#192720;--panel:#203027;--ink:#e3e9db;--muted:#9ba99c;--green:#bdd5b8;--green-light:#304333;--line:#344236;--gold:#d1b274;color-scheme:dark}body.dark .chapter-banner,body.dark .about-block{background:#213e31}body.dark .pill.primary,body.dark .play-button,body.dark .search-submit,body.dark #toast{color:#153524!important}body.dark .translation-text{color:#d0d9cb}body.dark .verse.is-playing{background:#273b2b}body.dark .arabic-word:hover{background:#304333}
@media(min-width:1600px){.main{padding-top:42px}.verse{padding-top:25px;padding-bottom:20px}}
@media(max-width:1250px){.sidebar{width:235px}.workspace{margin-left:235px}.player{left:235px;padding-left:22px;padding-right:22px;gap:17px}.topbar{padding:0 28px}.main{padding:28px}.brand{padding-left:20px}.brand strong{font-size:21px}.player-info{min-width:142px}.player-symbol{display:none}.nav{gap:23px}.verse-content{gap:32px}.banner-arabic{font-size:37px}.player-options select{max-width:125px}#toast{left:calc(50% + 117px)}}
@media(max-width:1000px){.sidebar{width:212px}.workspace{margin-left:212px}.player{left:212px;gap:14px}.main{padding:26px 22px}.topbar{padding:0 22px}.brand{padding:20px 16px;gap:9px}.brand strong{font-size:19px}.brand img{width:36px;height:36px}.brand small{font-size:8px}.side-top{padding-left:14px;padding-right:14px}.chapter-link{padding:11px 9px}.nav{gap:20px}.topbar .icon-button{width:33px;height:33px}.verse-content{grid-template-columns:1fr;gap:1px}.arabic-text{padding-top:0;padding-bottom:0}.translation-text{padding-top:7px}.reading-head{display:flex;justify-content:space-between;gap:10px}.reading-head .source-tag{display:none}.welcome-row h1{font-size:24px}.welcome-row p{font-size:11px}.continue-button{padding:9px 11px}.continue-button span>span{display:none}.chapter-banner{padding:23px}.chapter-banner h2{font-size:30px}.chapter-banner .banner-arabic{font-size:33px}.player-options select{max-width:103px;font-size:9px}.player-info{min-width:120px}.player-info small{font-size:8px}.dictionary-grid{grid-template-columns:1fr 1fr}.source-cards{grid-template-columns:1fr}.source-card{padding:22px}.view-toggle{display:none}#toast{left:calc(50% + 106px)}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);width:275px;transition:transform .2s;z-index:60}.sidebar.open{transform:translateX(0)}.mobile-shade.visible{display:block;position:fixed;inset:0;z-index:55;background:#142b2470}.workspace{margin-left:0;padding-bottom:138px}.mobile-menu{display:inline-flex}.topbar{height:66px;padding:0 18px;gap:12px}.nav{gap:22px;flex:1;justify-content:center}.nav-button{font-size:11px;gap:6px}.nav-button svg{width:16px}.top-actions{gap:7px}.top-actions #theme-toggle{display:none}.top-actions .icon-button{width:31px;height:31px}.main{padding:24px 18px 16px}.welcome-row{margin-bottom:20px}.welcome-row h1{font-size:25px}.welcome-row .eyebrow{font-size:8px;letter-spacing:1.5px}.welcome-row p{font-size:10px}.continue-button{border-radius:8px;padding:8px;gap:7px;font-size:8px}.continue-button strong{font-size:10px}.continue-button svg{width:15px}.global-search{padding:10px 12px;gap:9px;margin-bottom:20px;border-radius:9px}.global-search input{font-size:11px}.key-hint{display:none}.search-submit{padding:5px 11px;font-size:10px}.chapter-banner{min-height:136px;padding:20px}.chapter-banner h2{font-size:29px}.banner-label{font-size:8px;letter-spacing:1.5px}.banner-meta{font-size:9px;gap:9px}.chapter-banner .banner-arabic{font-size:29px}.reader-toolbar{padding:14px 0;gap:8px}.pill{padding:7px 9px;font-size:10px;gap:5px}.toolbar-left,.toolbar-right{gap:6px}.jump-label{font-size:9px;gap:5px}.jump-label select{padding:4px}.reading-head{padding:11px 17px;font-size:9px}.verse{padding:18px 17px 14px}.verse-content{gap:0}.arabic-text{font-size:calc(var(--arabic) - 3px);line-height:2.2}.translation-text{font-size:calc(var(--translation) - 1px);line-height:1.95}.verse-reference{font-size:9px}.verse-head{margin-bottom:4px}.verse-bottom{gap:15px;margin-top:5px}.verse-tools{gap:3px}.verse-tools button{width:28px;height:28px}.reader-end{padding:20px 0}.reader-end p{display:none}.dedication{margin-top:23px;padding:0 5px}.dedication p{font-size:10px}.player{left:0;display:grid;grid-template-columns:1fr auto;gap:10px 14px;padding:12px 18px max(13px,env(safe-area-inset-bottom));min-height:116px}.player-info{grid-column:1;grid-row:1;min-width:0}.player-info strong{font-size:11px}.player-info small{font-size:9px}.player-controls{grid-column:2;grid-row:1;gap:9px}.player-progress{grid-column:1;grid-row:2;align-self:center}.player-options{grid-column:2;grid-row:2;justify-content:flex-end}.player-options select{max-width:118px;padding:5px 7px;font-size:9px}.player-options .icon-button{width:27px;height:27px}.player-options .icon-button svg{width:13px;height:13px}.play-button{width:35px;height:35px}.player-time{margin-top:5px;font-size:8px}.player-controls button:not(.play-button){padding:3px}.player-controls svg{width:15px;height:15px}.section-title{font-size:30px}.section-intro{font-size:12px}.dictionary-grid{gap:10px}.dictionary-card{padding:17px}.dictionary-card h3{font-size:23px}.dictionary-card p{font-size:11px}.dictionary-card .entry-footer{font-size:8px;margin-top:16px}.entry-quote{padding:22px}.entry-quote blockquote{font-size:21px}.result-card{padding:17px}.result-card p{font-size:14px}.source-card h3{font-size:16px}.source-card p{font-size:11px}#toast{left:50%;bottom:136px;font-size:11px}.side-bottom{padding-bottom:max(18px,env(safe-area-inset-bottom))}}
@media(max-width:370px){.main{padding-left:12px;padding-right:12px}.nav{gap:12px}.topbar{padding:0 12px}.chapter-banner{padding:16px}.chapter-banner .banner-arabic{font-size:25px}.chapter-banner h2{font-size:26px}.continue-button{display:none}.toolbar-right .pill{display:none}.dictionary-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Searchable, alphabetic dictionary */
.dictionary-tools{margin:0 0 20px}.dictionary-search{display:flex;align-items:center;gap:12px;padding:14px 17px;background:var(--paper);border:1px solid var(--line);border-radius:10px}.dictionary-search svg{color:var(--gold)}.dictionary-search:focus-within{border-color:var(--gold)}.dictionary-search input{width:100%;min-width:0;border:0;outline:none;background:transparent;font-size:13px}.dictionary-help{font-size:11px;color:var(--muted);margin:8px 2px 16px}.dictionary-letters{display:flex;flex-wrap:wrap;gap:6px}.letter-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;border:1px solid var(--line);border-radius:7px;background:var(--paper);font-size:12px;padding:6px 10px}.letter-button.active{background:var(--green);border-color:var(--green);color:#fff}.letter-button:hover:not(.active){border-color:var(--gold)}.dictionary-card{display:flex;flex-direction:column;align-items:flex-start}.dictionary-card .entry-footer{width:100%;margin-top:auto;padding-top:22px}.dictionary-card p{padding-bottom:0}.dictionary-arabic{font-family:AmiriQuran,serif;font-size:21px;line-height:1.9;color:var(--gold);margin:-6px 0 9px}.dictionary-card h3{overflow-wrap:anywhere}.dictionary-grid .dictionary-card{min-width:0}.dictionary-tools+ .result-summary{margin-top:0}
@media(max-width:760px){.dictionary-search{padding:12px}.dictionary-search input{font-size:12px}.dictionary-help{font-size:10px;line-height:1.8}.dictionary-letters{gap:5px}.letter-button{min-width:34px;min-height:36px;font-size:11px;padding:6px 8px}.dictionary-card .entry-footer{padding-top:17px}.dictionary-arabic{font-size:20px}.dictionary-card .entry-index{font-size:8px}.dictionary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.dictionary-grid{grid-template-columns:1fr}.dictionary-card{padding:20px}.dictionary-card h3{font-size:25px}.dictionary-card p{font-size:12px}.dictionary-card .entry-footer{font-size:9px}}

/* Complete written-form concordance and published lexical sources */
.dictionary-view-tabs{display:flex;align-items:center;gap:5px;background:var(--panel);border-radius:9px;padding:4px;width:max-content;max-width:100%;margin:0 0 27px}.dictionary-view-tabs button{min-height:40px;padding:8px 17px;border-radius:6px;font-size:12px;color:var(--muted)}.dictionary-view-tabs button.active{background:var(--paper);color:var(--green);box-shadow:0 1px 4px #243c3412;font-weight:600}.word-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 24px;max-width:680px}.word-stats>div{display:flex;flex-direction:column;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:17px 19px}.word-stats strong{font-size:23px;font-weight:500;color:var(--green)}.word-stats span{font-size:11px;color:var(--muted);margin-top:2px}.word-source-status{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--muted);padding:12px 15px;background:var(--panel);border-radius:8px;margin:0 0 20px;line-height:1.8}.word-source-error{border:1px solid var(--line)}.word-source-status .text-button{font-size:12px;min-height:36px;color:var(--green)}.word-sort-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:8px 0 15px}.word-sort-row .dictionary-help{margin:0;max-width:530px}.word-sort-row label,.word-occurrence-heading>label{display:flex;align-items:center;gap:9px;white-space:nowrap;font-size:11px;color:var(--muted)}.word-sort-row select,.word-occurrence-heading select{border:1px solid var(--line);border-radius:7px;min-height:39px;padding:7px 10px;font-size:11px;max-width:250px}.word-letters .letter-button[lang="ar"]{font-family:AmiriQuran,serif;font-size:22px;padding:0 10px;min-height:42px;min-width:40px}.word-card{min-height:226px}.word-card-arabic{font-family:AmiriQuran,serif;font-size:34px;line-height:2.2;display:block;width:100%;text-align:right;margin:6px 0 8px;color:var(--green);overflow-wrap:anywhere}.dictionary-card .word-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line;font-size:12px;line-height:1.85;margin-bottom:16px}.word-card-counts{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-top:auto}.word-card .entry-footer{padding-top:13px!important;margin-top:10px!important;border-top:1px solid var(--line)}.word-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin:25px 0 8px}.word-pagination>span{color:var(--muted);font-size:12px}.word-pagination .pill{min-height:40px;min-width:90px}.word-index-note{margin-top:30px}.word-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:24px 0 3px}.word-detail-arabic{font-family:AmiriQuran,serif;font-size:53px;font-weight:400;line-height:2.2;color:var(--green);text-align:left;overflow-wrap:anywhere;scroll-margin-top:20px}.word-detail-totals{display:flex;flex-direction:column;align-items:flex-end;gap:5px;color:var(--muted);font-size:12px;flex-shrink:0}.word-detail-totals strong{font-size:21px;color:var(--green);font-weight:500}.word-meanings{margin-top:28px}.word-meanings h2,.word-occurrences h2{font-size:19px;font-weight:600}.word-source-quote{margin:15px 0;padding:22px}.word-source-quote h3{font-family:AmiriQuran,serif;font-size:33px;line-height:2;color:var(--gold);text-align:left;font-weight:400;margin:0 0 8px}.word-source-quote blockquote{white-space:pre-wrap;font-family:Manrope,Arial,sans-serif;font-size:15px;line-height:1.95;margin-bottom:14px}.word-source-quote cite{display:block;line-height:1.9}.word-glosses{margin:0;padding:0;list-style:none;display:grid;gap:9px}.word-glosses li{background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:14px 18px}.word-glosses li>q{display:block;white-space:pre-wrap;font-size:14px;line-height:1.9}.word-glosses li>span{display:block;font-size:11px;color:var(--muted);margin-top:5px}.word-meanings>[data-action]{margin-top:10px;min-height:40px;font-size:12px;color:var(--green)}.word-occurrences{margin-top:38px}.word-occurrence-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:22px}.word-occurrence-heading .dictionary-help{margin-top:7px}.word-occurrence-heading>label{flex-direction:column;align-items:flex-start;gap:6px}.word-reference{display:inline-block;font-size:10px;font-weight:400;color:var(--gold);margin-inline-start:5px}.result-card .word-position-note{font-size:11px;color:var(--muted);line-height:1.8;margin:0 0 10px}.result-card .word-verse-arabic{font-size:var(--arabic);line-height:2.25;white-space:pre-wrap;overflow-wrap:break-word;margin:5px 0 21px}.word-highlight{background:#ece2bc;color:inherit;border-radius:5px;padding:0;box-decoration-break:clone;-webkit-box-decoration-break:clone}.word-context-label{font-size:9px;letter-spacing:.7px;color:var(--gold);font-weight:600;display:block;line-height:1.8}.word-context-gloss{padding:14px 16px;background:var(--panel);border-radius:8px;margin:0 0 20px}.word-context-gloss p{font-size:13px;line-height:1.9;margin-top:6px}.word-context-gloss q{white-space:pre-wrap}.word-context-gloss a,.word-gloss-positions{font-size:11px;color:var(--muted)}.word-full-meal{border-top:1px solid var(--line);padding-top:15px}.word-full-meal>p{font-size:var(--translation);line-height:1.95;margin-top:7px;white-space:pre-wrap}#word-occurrences-title,#word-count{scroll-margin-top:20px}body.dark .word-highlight{background:#5b5432}body.dark .word-letters .letter-button.active{color:var(--bg)}
@media(max-width:1000px){.word-sort-row{align-items:flex-start;flex-direction:column;gap:10px}.word-occurrence-heading{flex-direction:column;gap:4px}.word-occurrence-heading>label{flex-direction:row;align-items:center;margin:0 0 18px}.word-card-arabic{font-size:32px}.word-source-quote{padding:20px}}
@media(max-width:760px){.dictionary-view-tabs{margin-bottom:23px}.dictionary-view-tabs button{font-size:11px;padding:8px 13px}.word-stats{gap:7px}.word-stats>div{padding:12px 11px}.word-stats strong{font-size:21px}.word-stats span{font-size:10px}.word-sort-row label{width:100%;justify-content:space-between}.word-card{min-height:210px}.word-card-arabic{font-size:32px}.word-detail-heading{align-items:flex-start;gap:12px}.word-detail-arabic{font-size:45px;line-height:2.1}.word-detail-totals{margin-top:25px;font-size:10px;max-width:45%;text-align:right;white-space:normal}.word-detail-totals strong{font-size:18px}.word-source-quote blockquote{font-size:14px}.word-source-quote{padding:18px}.word-meanings h2,.word-occurrences h2{font-size:17px}.word-pagination{gap:12px}.word-pagination .pill{min-width:80px}.word-pagination>span{font-size:11px}.word-occurrence-heading>label{width:100%;justify-content:space-between;font-size:10px}.word-occurrence-heading select{max-width:70%;font-size:10px}.word-verse-card .result-heading{align-items:flex-start}.word-verse-card .result-heading>.text-button{white-space:nowrap;min-height:30px}.result-card .word-verse-arabic{font-size:calc(var(--arabic) - 3px);line-height:2.2}.word-full-meal>p{font-size:calc(var(--translation) - 1px)}.word-context-gloss{padding:12px}.word-context-label{font-size:8px}.word-glosses li{padding:12px 14px}}
@media(max-width:420px){.word-card{min-height:0}.word-card-arabic{font-size:36px}.dictionary-card .word-preview{font-size:12px}.word-detail-heading{flex-direction:column;gap:0}.word-detail-totals{margin-top:0;max-width:100%;align-items:flex-start;text-align:left;margin-bottom:12px}.word-detail-totals strong{font-size:18px}.word-detail-totals span{font-size:11px}.word-detail-arabic{font-size:48px}.word-stats strong{font-size:19px}.word-stats>div{padding:11px 9px}.word-stats span{font-size:9px}}

.word-phrase-scope{display:block;font-size:12px;line-height:1.9;color:var(--muted);margin-top:6px}.word-phrase-scope [lang="ar"]{font-family:AmiriQuran,serif;font-size:22px;color:var(--ink)}.word-preview-source{display:block;font-size:9px;color:var(--muted);margin-bottom:5px}

/* Explicit, resumable offline download settings. */
#settings-dialog{max-width:540px;max-height:calc(100dvh - 36px);overflow:auto;overscroll-behavior:contain}#settings-dialog>.dialog-header{position:sticky;top:0;z-index:1;background:var(--paper)}.offline-settings{border-top:1px solid var(--line);padding-top:24px;margin-top:25px}.offline-heading{display:flex;gap:12px;align-items:center;margin-bottom:15px}.offline-heading h3{font-size:18px;font-weight:600;scroll-margin-top:90px}.offline-heading p{font-size:11px;line-height:1.8;color:var(--muted);margin-top:2px}.offline-symbol{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;color:var(--green);background:var(--green-light);border-radius:11px}.offline-symbol svg{width:21px;height:21px}.offline-intro{font-size:12px;line-height:1.9;color:var(--muted);margin-bottom:15px}.offline-intro strong{font-weight:600;color:var(--ink)}.offline-status{font-size:12px;font-weight:600;line-height:1.8;padding:13px 15px;border:1px solid var(--line);border-radius:9px;background:var(--panel);margin-bottom:15px}.offline-status.is-ready{background:var(--green-light);border-color:#aac1af;color:var(--green)}.offline-details{display:grid;gap:8px;font-size:11px;line-height:1.8;margin:0 0 16px}.offline-details>div{display:flex;justify-content:space-between;gap:16px}.offline-details dt{color:var(--muted)}.offline-details dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}.offline-progress{display:block;width:100%;height:8px;border:0;border-radius:8px;overflow:hidden;background:var(--panel);accent-color:var(--green);margin-bottom:11px}.offline-progress::-webkit-progress-bar{background:var(--panel);border-radius:8px}.offline-progress::-webkit-progress-value{background:var(--green);border-radius:8px}.offline-progress::-moz-progress-bar{background:var(--green);border-radius:8px}.offline-size-note,.offline-help{font-size:10px;line-height:1.9;color:var(--muted);margin-top:12px}.offline-error{padding:12px 14px;border:1px solid #ba6c5c;border-radius:8px;background:#f6e9e4;color:#843e31;font-size:12px;line-height:1.8;margin:14px 0;overflow-wrap:anywhere}.offline-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:18px 0 13px}.offline-actions .pill{min-height:42px;font-size:12px;justify-content:center;gap:8px}.offline-actions .primary{width:100%}.offline-actions .text-button{min-height:38px;font-size:11px;padding:5px 0;color:var(--green)}.offline-actions [data-action="offline-refresh"]{margin-left:auto}.offline-remove-row{margin-top:17px;padding-top:12px;border-top:1px solid var(--line)}.offline-remove-row>.text-button{font-size:11px;min-height:38px;padding:5px 0;color:var(--muted)}.offline-remove-confirmation{padding:13px 14px;background:var(--panel);border:1px solid var(--line);border-radius:8px;margin-top:8px}.offline-remove-confirmation p{font-size:11px;line-height:1.9;color:var(--ink)}.offline-remove-confirmation>div{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.offline-remove-confirmation .pill{min-height:38px;font-size:11px}body.dark .offline-error{background:#3a2824;color:#edb2a3;border-color:#875b50}
@media(max-width:420px){#settings-dialog{width:calc(100% - 22px);max-height:calc(100dvh - 24px)}#settings-dialog>.dialog-header{padding:18px 20px}#settings-dialog>.dialog-body{padding:20px}.offline-details>div{gap:10px}.offline-details dt{max-width:58%}.offline-heading h3{font-size:17px}.offline-intro{font-size:11px}.offline-actions .pill{font-size:11px;min-height:44px}.offline-size-note,.offline-help{font-size:10px}}

/* The whole ayah/language follows the current recording; words use published timestamps only. */
.player-current{display:block;text-align:left;max-width:100%;color:inherit;border-radius:4px}.player-current:hover strong{text-decoration:underline;text-underline-offset:3px}.player-current:focus-visible{outline:2px solid var(--green);outline-offset:4px}.verse-location{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.verse-playback-status{display:inline-flex;align-items:center;gap:5px;color:var(--green);background:var(--green-light);border:1px solid #adc3ad;border-radius:5px;padding:3px 7px;font-size:9px;font-weight:600;line-height:1.5;letter-spacing:0}.verse-playback-status::before{content:'';width:5px;height:5px;flex-shrink:0;border-radius:50%;background:currentColor}.verse.is-current{box-shadow:inset 4px 0 var(--green)}.verse.is-playing{background:#f2f5ec}.verse.is-paused .verse-playback-status::before{border-radius:0;background:linear-gradient(to right,currentColor 0 35%,transparent 35% 65%,currentColor 65%)}.verse .is-audio-active{border-radius:7px;transition:background .2s,box-shadow .2s}.verse.is-playing .is-audio-active{background:#e6eddf;box-shadow:0 0 0 7px #e6eddf}.verse.is-loading .is-audio-active,.verse.is-paused .is-audio-active{box-shadow:0 0 0 1px var(--line)}.verse.is-playing .translation-text.is-audio-active{color:var(--ink)}.verse .arabic-word.is-spoken,.verse .arabic-word.is-spoken:hover{background:#e5cb78;color:#272d1d;box-shadow:0 0 0 3px #e5cb78;position:relative;z-index:1}.verse-bottom .text-button.playing{background:var(--green-light);border-radius:5px;padding:3px 7px}.verse-bottom .text-button.playing svg{stroke-width:2.3}body.dark .verse.is-playing .is-audio-active{background:#334a34;box-shadow:0 0 0 7px #334a34}body.dark .verse-playback-status{border-color:#61775d}body.dark .verse .arabic-word.is-spoken,body.dark .verse .arabic-word.is-spoken:hover{background:#dfc578;color:#18261c;box-shadow:0 0 0 3px #dfc578}
@media(max-width:760px){.verse-location{gap:6px}.verse-playback-status{font-size:8px;padding:3px 5px}.verse.is-playing .is-audio-active{box-shadow:0 0 0 5px #e6eddf}body.dark .verse.is-playing .is-audio-active{box-shadow:0 0 0 5px #334a34}.player-current strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.verse-head{align-items:flex-start}.verse-tools{flex-shrink:0}}
@media(prefers-reduced-motion:reduce){.verse,.verse .is-audio-active{transition:none}}
.translation-word{display:inline;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}.verse .translation-word.is-spoken{background:#e5cb78;color:#272d1d;box-shadow:0 0 0 2px #e5cb78}body.dark .verse .translation-word.is-spoken{background:#dfc578;color:#18261c;box-shadow:0 0 0 2px #dfc578}

.listening-resume-card{display:flex;align-items:center;gap:14px;border:1px solid #ccb779;background:#f3edda;padding:17px 20px;border-radius:10px;margin:0 0 22px}.listening-resume-card>svg{width:24px;height:24px;flex-shrink:0;color:var(--gold)}.listening-resume-card>div{flex:1;min-width:0}.listening-resume-card strong{display:block;font-size:14px;font-weight:600;color:var(--ink)}.listening-resume-card p{font-size:11px;line-height:1.8;color:var(--ink);margin-top:4px}.listening-resume-card small{display:block;font-size:10px;line-height:1.8;color:var(--muted);margin-top:2px}.listening-resume-card .pill{min-height:42px;flex-shrink:0}.last-listened{display:inline-block;font-size:9px;font-weight:600;color:#806326;background:#f2e8c9;border:1px solid #d5c181;border-radius:5px;padding:3px 7px;line-height:1.5}body.dark .listening-resume-card{background:#332f20;border-color:#75643c}body.dark .last-listened{background:#453c23;color:#e6cd88;border-color:#75643c}@media(max-width:760px){.listening-resume-card{padding:14px;gap:10px;flex-wrap:wrap}.listening-resume-card strong{font-size:13px}.listening-resume-card p{font-size:10px}.listening-resume-card>svg{width:20px;height:20px}.listening-resume-card .pill{width:100%}.last-listened{font-size:8px;padding:3px 5px}}

/* Keep source notes outside the timed text and hide the complete meal column in Arabic-only view. */
.translation-block{min-width:0}.arabic-only .translation-block{display:none}


/* Public iPhone/iPad download link; native clients keep their existing reader layout. */
.app-store-download{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-top:12px;padding:10px 14px;border:1px solid var(--green);border-radius:9px;background:var(--green);color:var(--paper);font-size:12px;font-weight:600;line-height:1.3;text-decoration:none;white-space:nowrap}.app-store-download:hover{filter:brightness(.96);text-decoration:none}.app-store-download:focus-visible{outline:2px solid var(--gold);outline-offset:3px}


/* Share the prepared app introduction through WhatsApp; sending remains the visitor's choice. */
.store-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.store-actions .app-store-download{margin-top:0}.whatsapp-share{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid var(--green);border-radius:9px;background:var(--paper);color:var(--green);font-size:12px;font-weight:600;line-height:1.3;text-decoration:none;white-space:nowrap}.whatsapp-share:hover{background:var(--green-light);text-decoration:none}.whatsapp-share:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
