/* Palette and geometric motif taken from the existing printed mushaf frame.
   The frame, page layout, QCF glyphs and tajweed colors are never overridden. */
@font-face{font-family:DaliloQuestionAmiri;src:url('assets/amiri-arabic-700-normal-D8FrblyB.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
:root{--surface:#fffdf7;--surface-soft:#f2ede3;--border:#d7c6a5;--accent:#142850;--ink:#193351;--muted:#526175;--cream:#faf8f5;--paper:#fffdf7;--gold:#c8963e;--line:#d7c6a5;--green-950:#0c1b33;--green-900:#142850;--green-700:#193351;--green-100:#f2ede3;--ornament: url('assets/ui/mushaf-band-v50.svg');color-scheme:light}
:root[data-theme=dark]{--surface:#142850;--surface-soft:#1a3154;--border:#7d6b47;--accent:#fceabb;--ink:#f8f2e5;--muted:#c6d0dd;--cream:#0c1b33;--paper:#142850;--gold:#e8c373;--line:#7d6b47;--green-950:#0c1b33;--green-900:#fceabb;--green-700:#fceabb;--green-100:#1a3154;color-scheme:dark}
html,body,body:not(.reading-mode),body.reading-mode,:root[data-theme=dark] body:not(.reading-mode),:root[data-theme=dark] body.reading-mode{background:var(--cream);color:var(--ink)}
.app-shell,.topbar,:root[data-theme=dark] .app-shell,:root[data-theme=dark] .topbar{background:var(--surface)}
.topbar{gap:10px;border-bottom:1px solid var(--border)}.brand{margin-inline-end:auto;min-width:0}.brand strong{color:var(--ink)}.theme-toggle{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);color:var(--accent)}.theme-toggle .line-icon{width:22px;height:22px}
.location-button,.text-button,.back-button,.close-button,#readerToolsOpen{background:var(--surface-soft);color:var(--accent);border:1px solid var(--border)}
.glass-card,.service-card,.dialog-card,.ayah-dialog-card,.hisn-dialog-card,.audio-player,.dhikr-card,.hisn-category-card,.person-card,.seerah-event,.card{background-color:var(--surface);border-color:var(--border);color:var(--ink)}
.service-card,.daily-question,.audio-player,.seerah-hero,.seerah-event{background-image:var(--ornament);background-repeat:repeat-x;background-position:top center;background-size:40px 8px}
.service-card{border-top-color:var(--gold);box-shadow:0 6px 20px #0c1b3308}.service-icon,:root[data-theme=dark] .service-icon{background:var(--surface-soft);color:var(--accent);border:1px solid var(--border)}.service-card strong,.service-card small{color:var(--ink)}.service-card small{color:var(--muted)}
.primary-button,.reader-done,.primary{background:#142850;color:#fff8e7;border:1px solid #c8963e}.primary-button:hover,.reader-done:hover,.primary:hover{background:#0c1b33}
:root[data-theme=dark] .primary-button,:root[data-theme=dark] .reader-done,:root[data-theme=dark] .primary{background:#fceabb;color:#0c1b33;border-color:#c8963e}
#homeView .hero{border-color:var(--gold);background-image:linear-gradient(90deg,#0c1b3310,#0c1b33b8),url('assets/mecca-v25.png');box-shadow:0 18px 45px #0c1b3320}
#homeView .prayer-card,:root[data-theme=dark] #homeView .prayer-card{background:var(--surface);border-color:var(--border);color:var(--ink)}
#homeView .prayer-card.active,:root[data-theme=dark] #homeView .prayer-card.active{background:var(--surface-soft);border-color:var(--gold);box-shadow:inset -3px 0 var(--gold),0 7px 22px #0c1b3308}
#homeView .prayer-icon,:root[data-theme=dark] #homeView .prayer-icon{background:var(--surface-soft);color:var(--accent)}
#homeView .active .prayer-icon,:root[data-theme=dark] #homeView .active .prayer-icon{background:#142850;color:#fceabb}
#homeView .prayer-name,#homeView .prayer-card strong,:root[data-theme=dark] #homeView .prayer-name,:root[data-theme=dark] #homeView .prayer-card strong{color:var(--ink)}
#homeView .prayer-card span,#homeView .sunrise-note,.method-note,:root[data-theme=dark] #homeView .prayer-card span,:root[data-theme=dark] #homeView .sunrise-note{color:var(--muted)}
#homeView .prayer-card .prayer-name{color:var(--ink)}#prayerAlertStatus,:root[data-theme=dark] #prayerAlertStatus,.privacy-note,.location-notice{background:var(--surface-soft);color:var(--muted)}
.prayer-bell{color:var(--muted)}.prayer-bell[aria-pressed=true]{background:var(--surface-soft);color:var(--accent)}
.daily-question{border-color:var(--border);padding-top:22px}.daily-question .daily-excerpt,.daily-verse{font-family:DaliloQuestionAmiri,'Amiri Quran',serif;font-weight:700;font-synthesis:none;font-size:22px;line-height:2.1;letter-spacing:0;font-feature-settings:'liga' 1,'calt' 1;overflow:visible;display:block;color:var(--ink)}.daily-verse{font-size:27px}.daily-question .daily-excerpt{-webkit-line-clamp:unset;-webkit-box-orient:unset}.daily-question h2{color:var(--ink)}
.seerah-hero{background-color:var(--surface-soft);border:1px solid var(--border);padding-top:30px}.seerah-tabs button[aria-selected=true],.place-filter[aria-pressed=true]{background:#142850;color:#fff8e7;border-color:#c8963e}
:root[data-theme=dark] .seerah-tabs button[aria-selected=true],:root[data-theme=dark] .place-filter[aria-pressed=true]{background:#fceabb;color:#0c1b33}
.timeline{border-right-color:var(--gold)}.timeline-year{color:var(--accent)}.timeline-item:before{background:var(--gold)}.seerah-event img{margin-top:8px}.seerah-map .map-place circle{fill:#142850;stroke:#c8963e}.seerah-map{background-color:var(--surface-soft)}
.bottom-nav{background:var(--surface);border-top:1px solid var(--gold)}.bottom-nav button.active{background:var(--surface-soft);color:var(--accent)}.audio-emblem,:root[data-theme=dark] .audio-emblem,.hisn-category-icon,:root[data-theme=dark] .hisn-category-icon{background:var(--surface-soft);color:var(--accent);border-color:var(--gold)}
#qiblaDialog,:root[data-theme=dark] #qiblaDialog{background:var(--surface);border-color:var(--gold)}#qiblaDialog h2,#qiblaAngle{color:var(--ink)}#qiblaDialog button,.qibla-actions button{background:var(--surface-soft);color:var(--accent);border-color:var(--border)}#qiblaStatus,:root[data-theme=dark] #qiblaStatus{background:var(--surface-soft);color:var(--ink)}
.qibla-dial,:root[data-theme=dark] .qibla-dial{background:repeating-conic-gradient(from 0deg,#c8963e66 0deg 1deg,transparent 1deg 10deg),radial-gradient(circle,#fffdf7 62%,#f2ede3 63%);border-color:#c8963e;box-shadow:inset 0 0 0 12px #faf8f5,0 18px 35px #0c1b3318}.qibla-markings{border-color:#c8963e77}.qibla-markings span{color:#193351}.qibla-markings span:nth-child(1){color:#83601f}#qiblaNeedle{color:#142850}#qiblaNorth,#qiblaMode{color:var(--muted)}
/* Green indicates compass alignment; review red/gray retains its existing meaning. */
#qiblaAlignment{color:#126a46}:root[data-theme=dark] #qiblaAlignment{color:#8cebbd}
body>main>header,body>main .scope{color:var(--ink)}.word.current{background:var(--surface-soft)}
:root[data-theme=dark] .word.verse-known{color:#c6d0dd;background:#1a3154}
@media(max-width:480px){.topbar{padding-inline:12px;flex-wrap:wrap}.brand{flex:1 1 auto}.brand img{width:40px;height:40px}.brand span{font-size:11px}.location-button{max-width:125px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;padding-inline:10px}.daily-question{grid-template-columns:1fr}.daily-question button{justify-self:start}.daily-question .daily-excerpt{font-size:21px}.brand strong{font-size:16px}}
@media(max-width:360px){.brand span{display:none}.topbar{gap:6px}.brand{gap:6px}.brand img{width:34px;height:34px}.theme-toggle{flex-basis:42px;width:42px;height:44px}.location-button{max-width:100px}.brand strong{font-size:15px}}

:root[data-theme=dark] .daily-question .daily-excerpt{color:var(--ink)}

#locationButton .line-icon{width:16px;height:16px;margin-inline-end:4px}
.hisn-category-card,.hisn-category-card.active,.hisn-dialog-card,.ayah-dialog-card{background:var(--surface);border-color:var(--border)}.hisn-category-card.active{background:var(--surface-soft);border-color:var(--gold)}.hisn-dialog-list .dhikr-card{background:var(--surface);border-color:var(--border)}
.ayah-dialog-text{color:var(--ink);font-family:'Uthmanic Hafs','Amiri Quran',serif}.ayah-dialog-tafseer{background:var(--surface-soft);color:var(--ink)}
.reader-dialog{background:var(--surface);color:var(--ink);border-color:var(--gold)}.reader-dialog details{background:var(--surface-soft);border-color:var(--border)}.reader-dialog a,.lesson-example{color:var(--accent)}
.hisn-tools input,.manual-location input,.dialog-card select,.reader-tools select,.reader-tools input,.audio-player select{background:var(--surface);color:var(--ink);border-color:var(--border)}
.counter-button{background:var(--surface-soft);color:var(--ink)}.counter-button.done{background:#142850;color:#fff8e7}:root[data-theme=dark] .counter-button.done{background:#fceabb;color:#0c1b33}
dialog::backdrop,#qiblaDialog::backdrop{background:#0c1b3380}
