:root{--surface:#fffdf8;--surface-soft:#edf3ee;--border:#dce5df;--accent:#087b53;--ink:#17362c;--muted:#52675d;--cream:#f7f6ee;--paper:#fffdf8;color-scheme:light}
:root[data-theme=dark]{--surface:#182f27;--surface-soft:#203d31;--border:#395647;--accent:#76dfac;--ink:#edf6ef;--muted:#bed0c4;--cream:#10251f;--paper:#182f27;--line:#395647;--green-100:#203d31;color-scheme:dark}
body{background:radial-gradient(ellipse at top right,color-mix(in srgb,var(--accent) 9%,transparent),transparent 60%),var(--cream);color:var(--ink)}
button,input,select{font:inherit}button{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button:disabled{opacity:.65;cursor:wait}
[hidden]{display:none!important}.line-icon{width:26px;height:26px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.glass-card,.service-card,.dialog-card,.ayah-dialog-card,.hisn-dialog-card{background:var(--surface);border:1px solid var(--border);color:var(--ink);border-radius:24px}
.service-grid{gap:12px}.service-card{box-shadow:0 6px 20px #10251f06;min-height:140px}.service-card small{color:var(--muted)}.service-icon{background:var(--surface-soft);color:var(--accent);border-radius:17px}.section-heading h2{letter-spacing:0}.eyebrow.dark,.method-note,.brand span,.field-status,.privacy-note{color:var(--muted)}
dialog{max-height:90dvh;max-width:min(94vw,640px);background:var(--surface);color:var(--ink);border:1px solid var(--border);border-radius:24px;padding:22px}dialog::backdrop{background:#08191080;backdrop-filter:blur(4px)}dialog h2{color:var(--ink)}dialog form{padding:0}.appearance-settings{border:1px solid var(--border);border-radius:16px;padding:14px;margin:18px 0}.appearance-settings legend{padding:0 8px;font-weight:700}
.location-button,.text-button,.back-button,.close-button,#readerToolsOpen{color:var(--accent);background:var(--surface-soft)}input,select{background:var(--surface);color:var(--ink);border-color:var(--border)}.bottom-nav{background:color-mix(in srgb,var(--surface) 94%,transparent);border-color:var(--border)}.bottom-nav button{color:var(--muted)}.bottom-nav button.active{color:var(--accent);background:var(--surface-soft)}
.daily-question{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:17px 20px;margin:18px 0;background:var(--surface);border:1px solid var(--border);border-radius:22px}.daily-question h2{font-size:18px;margin:0 0 6px}.daily-question p{margin:0;color:var(--muted);font-size:14px}.daily-question button{white-space:nowrap}.daily-verse{font-family:"Uthmanic Hafs","Amiri Quran",serif;font-size:25px;line-height:2;text-align:center;padding:14px;border-radius:18px;background:var(--surface-soft)}.small-note{color:var(--muted);font-size:13px;line-height:1.7}
.qibla-dial.is-aligned{color:#14a661!important;border:3px solid #14a661!important;box-shadow:0 0 0 10px #14a66118!important}.qibla-dial.is-aligned #qiblaNeedle{color:#14a661!important}.kaaba-marker{stroke:#d6ad50;stroke-width:1.1}.audio-time-row{display:flex;justify-content:space-between;direction:ltr;font-variant-numeric:tabular-nums}.audio-download-row{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:20px}#audioSeek,#audioProgress{width:100%;accent-color:var(--accent)}#audioDownloadStatus{min-height:2em;color:var(--muted);line-height:1.7}#audioDownloadProgress{width:100%;accent-color:var(--accent)}
:root[data-theme=dark] .prayer-card,:root[data-theme=dark] .prayer-card.active,:root[data-theme=dark] .prayer-time,:root[data-theme=dark] .hisn-category,:root[data-theme=dark] .audio-player,:root[data-theme=dark] .dhikr-card{background:var(--surface);color:var(--ink);border-color:var(--border)}
:root[data-theme=dark] .prayer-card.next{background:#204333}:root[data-theme=dark] .prayer-card h3,:root[data-theme=dark] .prayer-card strong,:root[data-theme=dark] .audio-player h2{color:var(--ink)}:root[data-theme=dark] .qibla-dial{background:#e9e7d5}:root[data-theme=dark] #qiblaAlignment{color:#8cebbd}:root[data-theme=dark] .qibla-actions button{background:var(--surface-soft);color:var(--ink)}
/* The printed mushaf retains its established paper and ink contrast. */
#quranView .mushaf-page,#quranView .mushaf-paper{color:#17362c;color-scheme:light}#quranView .reader-dialog{color:var(--ink)}
.seerah-hero{padding:26px;background:var(--surface-soft);border-radius:24px;margin-bottom:20px}.seerah-hero h1{margin:8px 0}.seerah-tabs{display:flex;gap:8px;margin:20px 0;flex-wrap:wrap}.seerah-tabs button,.place-filter{border:1px solid var(--border);background:var(--surface);color:var(--ink);padding:10px 18px;border-radius:99px}.seerah-tabs button[aria-selected=true],.place-filter[aria-pressed=true]{background:#07553b;color:white;border-color:#07553b}.timeline{list-style:none;margin:0;padding:0 18px 0 0;border-right:2px solid var(--border)}.timeline-item{position:relative;margin:0 0 24px;padding-right:12px}.timeline-item::before{content:'';position:absolute;right:-25px;top:24px;width:12px;height:12px;background:var(--accent);border:4px solid var(--cream);border-radius:50%}.timeline-year{font-size:32px;font-weight:700;color:var(--accent);display:block}.seerah-event{overflow:hidden;background:var(--surface);border:1px solid var(--border);border-radius:22px}.seerah-event img{width:100%;height:180px;object-fit:cover;display:block}.seerah-event-content{padding:18px}.seerah-event h3{margin:0 0 10px;font-size:21px}.seerah-event p{font-size:16px;line-height:1.8;margin:0 0 14px}.seerah-event details{font-size:13px;color:var(--muted)}.seerah-event a{color:var(--accent)}.people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.person-card{text-align:right;padding:22px 16px;border:1px solid var(--border);border-radius:22px;background:var(--surface);color:var(--ink)}.person-card strong{display:block;font-size:18px;margin:10px 0}.person-card small{color:var(--muted)}.person-seal{font-size:25px;color:var(--accent)}.seerah-map{width:100%;height:auto;background:var(--surface-soft);border:1px solid var(--border);border-radius:24px}.seerah-map text{font-family:Tajawal,Tahoma,sans-serif;fill:var(--ink);font-size:15px}.seerah-map .map-place{cursor:pointer}.seerah-map .map-place circle{fill:#07553b;stroke:#d6ad50;stroke-width:3}.seerah-map .map-place:focus{outline:none}.seerah-map .map-place:focus circle{stroke:var(--ink);stroke-width:6}.map-place-list{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}#seerahNotice{min-height:1.7em}#personEvents{padding-right:20px;line-height:2}
@media(max-width:360px){.daily-question{grid-template-columns:1fr}.daily-question button{justify-self:start}.seerah-event-content{padding:14px}.service-card strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
:root[data-theme=dark] body:not(.reading-mode),:root[data-theme=dark] body.reading-mode{background:var(--cream);color:var(--ink)}
:root[data-theme=dark] .app-shell,:root[data-theme=dark] .topbar{background:transparent}
:root[data-theme=dark] h1,:root[data-theme=dark] h2,:root[data-theme=dark] h3,:root[data-theme=dark] .brand strong{color:var(--ink)}
:root[data-theme=dark] #homeView .hero h1{color:white}
:root[data-theme=dark] #homeView .prayer-card{background:var(--surface);border-color:var(--border);color:var(--ink)}
:root[data-theme=dark] #homeView .prayer-card.active{background:var(--surface-soft);border-color:var(--accent)}
:root[data-theme=dark] #homeView .prayer-name,:root[data-theme=dark] #homeView .prayer-card strong{color:var(--ink)}
:root[data-theme=dark] #homeView .prayer-card span,:root[data-theme=dark] #homeView .sunrise-note{color:var(--muted)}
:root[data-theme=dark] .brand span,:root[data-theme=dark] .method-note,:root[data-theme=dark] .service-card small,:root[data-theme=dark] .daily-question p,:root[data-theme=dark] .privacy-note,:root[data-theme=dark] .field-status{color:var(--muted)}
:root[data-theme=dark] #prayerAlertStatus,:root[data-theme=dark] .privacy-note{background:var(--surface-soft)}
:root[data-theme=dark] .dialog-card select,:root[data-theme=dark] .dialog-card input,:root[data-theme=dark] .hisn-tools input,:root[data-theme=dark] .manual-location input{background:var(--surface-soft);color:var(--ink);border-color:var(--border)}
:root[data-theme=dark] .hisn-category-card,:root[data-theme=dark] .hisn-dialog-card,:root[data-theme=dark] .hisn-dialog-list .dhikr-card{background:var(--surface);color:var(--ink);border-color:var(--border)}
:root[data-theme=dark] .hisn-category-icon,:root[data-theme=dark] .audio-emblem{background:var(--surface-soft);color:var(--accent)}
:root[data-theme=dark] .location-settings legend,:root[data-theme=dark] .location-button,:root[data-theme=dark] .text-button{color:var(--accent)}
:root[data-theme=dark] #qiblaDialog{background:var(--surface);color:var(--ink)}
:root[data-theme=dark] #qiblaDialog h2,:root[data-theme=dark] #qiblaAngle{color:var(--ink)}
:root[data-theme=dark] #qiblaStatus{background:var(--surface-soft)}

.service-card.recognition{grid-column:auto}.daily-question button{padding:10px 14px;min-height:44px}.daily-question .daily-excerpt{font-family:"Uthmanic Hafs","Amiri Quran",serif;line-height:1.8;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:var(--ink);margin-top:5px}

:root[data-theme=dark] #homeView .prayer-icon{background:var(--surface-soft);color:var(--accent)}
:root[data-theme=dark] #audioSurahSelect,:root[data-theme=dark] .audio-controls button:not(.primary-button){background:var(--surface-soft);color:var(--ink);border-color:var(--border)}
:root[data-theme=dark] #audioNowPlaying{color:var(--muted)}

.service-card small{opacity:1}:root[data-theme=dark] #qiblaMode,:root[data-theme=dark] #qiblaNorth{color:var(--muted)}
:root[data-theme=dark] .location-notice{background:var(--surface-soft);color:var(--ink)}
