/* desktop */
@media(min-width:920px){.home-frame{max-width:1090px}.home-hero{height:350px}.hero-main{margin:-28px 23px 0}.home-secondary{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.6fr);gap:25px}.home-verse-panel{margin-top:10px}.hadith-card{flex-basis:calc(50% - 9px)}.qibla-panel{min-height:695px}.qibla-screen{max-width:620px}.main-area{background:#fffdf8}}
@media(max-width:919px){body{background:var(--ivory)}.app-layout{display:block;box-shadow:none}.sidebar{display:none}.page-frame{padding:0 15px 104px}.home-frame{padding:0 0 95px}.home-hero{height:240px;border-radius:0}.home-hero-inner{padding:21px 18px 24px}.home-headline h1{font-size:27px}.home-headline p{font-size:13px}.hero-location strong{font-size:18px}.hero-location small{font-size:12px}.hero-main{margin-top:-17px;padding:12px 13px 0}.next-prayer-card{min-height:103px;border-radius:18px;padding:15px 17px;gap:14px}.next-prayer-card>.icon{width:43px;height:43px}.next-prayer-info .label{font-size:11px}.next-prayer-info h2{font-size:18px}.next-prayer-info strong{font-size:27px}.countdown-box{padding-left:13px;min-width:78px;font-size:11px}.countdown-box strong{font-size:15px}.next-arrow .icon{width:18px}.prayer-strip{margin-top:10px;border-radius:16px;padding:14px 2px}.prayer-strip button span{font-size:11px;margin-bottom:6px}.prayer-strip button small{font-size:11px}.source-note{padding-left:3px}.features-grid{margin:17px 13px 11px;gap:10px}.feature-tile{padding:12px 4px;gap:7px;border-radius:16px}.feature-tile img{width:49px;height:49px}.feature-tile span{font-size:12px}.home-sections{padding:0 13px}.section-head{margin:23px 0 15px}.section-title{font-size:24px}.hadith-card{flex-basis:82%;}.hadith-cover{height:178px}.hadith-inner{padding:13px 17px 9px;margin-top:-27px}.hadith-arabic{font-size:23px;line-height:1.7}.hadith-translation{font-size:15px}.quick-adhkar{gap:9px}.adhkar-quick-card{padding:9px;gap:7px}.adhkar-quick-card img{width:38px;height:38px}.adhkar-quick-card span{font-size:13px}.bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;z-index:20;bottom:0;left:0;right:0;padding:9px max(8px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:#fffcf7f8;box-shadow:0 -3px 17px #0a2f2117;border-top:1px solid #e8e5dc;backdrop-filter:blur(12px)}.bottom-nav button{border:0;background:none;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px;color:#7d8b86;font-size:11px;position:relative;padding:3px 0 0}.bottom-nav button.active{color:#004a3c;font-weight:800}.bottom-nav button.active:before{content:"";height:3px;width:25px;border-radius:10px;position:absolute;top:-8px;background:var(--gold)}.bottom-nav .icon{width:25px;height:25px}.bottom-nav button.active .icon{stroke-width:2.35}.page-header{margin:23px 1px 17px}.page-header h1{font-size:26px}.location-chip{font-size:10px;padding:10px 9px;max-width:154px;overflow:hidden;text-overflow:ellipsis}.location-chip .icon{width:15px}.header-settings{padding:4px}.page-header h1{max-width:140px}.tasbeeh-main{padding-top:3px}.tasbeeh-ornament{width:570px;top:60px;opacity:.4}.counter-ring{width:min(324px,88vw);height:min(324px,88vw)}.dhikr-name{font-size:30px;margin-top:10px}.counter-controls{gap:33px;margin:19px 0}.tasbeeh-options{margin-top:26px}.subhead{font-size:20px}.dhikr-choice{min-height:70px}.qibla-panel{border-radius:30px 30px 24px 24px;min-height:576px;padding:0 12px}.qibla-top-icon{width:51px;height:51px}.compass-shell{width:min(330px,83vw);height:min(330px,83vw)}.needle-shape{height:184px;width:48px}.compass-cardinals{font-size:16px}.compass-cardinals .n{top:20px}.compass-cardinals .s{bottom:20px}.compass-cardinals .w{left:16px}.compass-cardinals .e{right:16px}.bearing-value{font-size:42px;margin-top:16px}.kaaba-bottom{height:100px;margin:8px -12px 0;width:calc(100% + 24px)}.qibla-status{margin-top:11px;padding:12px}.hadith-view .hadith-card{flex-basis:83%}.hadith-view .hadith-cover{height:230px}.hadith-view .hadith-translation{font-size:18px}.hadith-view .hadith-arabic{font-size:26px}}
@media(max-width:360px){.home-hero{height:225px}.home-headline h1{font-size:23px}.countdown-box{min-width:65px;padding-left:7px}.next-prayer-card{padding:13px 10px;gap:9px}.next-prayer-info strong{font-size:23px}.features-grid{gap:6px}.feature-tile{border-radius:13px}.feature-tile img{width:42px;height:42px}.feature-tile span{font-size:11px}.page-header h1{font-size:23px}.location-chip{max-width:133px}.counter-ring{width:86vw;height:86vw}.count-number{font-size:62px}.beads{width:70px;height:55px;top:30px}.counter-center{padding-top:38px}.count-target{font-size:18px}.count-percent{font-size:13px}.counter-controls{gap:20px}.compass-shell{width:83vw;height:83vw}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* V5 visual polish: photographic Hadith cards should never stretch to match uncapped text. */
.hadith-slider{align-items:stretch}.hadith-arabic{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-height:118px}.hadith-ref{display:flex;align-items:center;justify-content:center;gap:4px;line-height:1.4}.hadith-ref .icon{width:12px;height:12px}.source-note .icon{display:inline-block;vertical-align:middle}.source-note a{font-weight:700;color:#477b63}.page-frame .hadith-card{max-height:610px}.home-frame .hadith-card{max-height:445px}.home-frame .hadith-cover{height:178px}.home-frame .hadith-inner{min-height:199px}.home-frame .hadith-translation{font-size:15px;line-height:1.55;flex:1}.home-frame .hadith-arabic{display:block}.dhikr-choice .icon-art{width:57px;height:57px}
@media(max-width:919px){.hadith-view .hadith-card{max-height:605px}.home-frame .hadith-card{max-height:445px}.home-frame .hadith-translation{font-size:15px}}
.beads{width:92px;height:95px;object-fit:contain;object-position:center;top:23px;mix-blend-mode:normal;border-radius:0}
@media(max-width:360px){.beads{width:85px;height:87px;top:17px}}

/* V6 reference refinement: warm ivory, generous breathing room, gold subtleties */
:root { --shadow:0 14px 32px rgba(23,47,35,.065); }
html { background:var(--ivory); }
.home-hero { background-position:center 51%; }
.home-headline h1 {letter-spacing:-1.05px}
.feature-tile, .hadith-card, .dhikr-choice, .adhkar-quick-card { box-shadow:0 8px 24px rgba(45,37,14,.052); }
.hadith-slider {scroll-padding-left:0; -webkit-overflow-scrolling:touch}
.hadith-card .source-badge { box-shadow: 0 3px 9px #5e42151a; }
.hadith-card .hadith-cover {background-position:center 60%}
.counter-ring {transition:transform .14s ease;}
.counter-ring:active {transform:scale(.985)}
.ring-progress {transition:stroke-dashoffset .2s ease}
.qibla-panel {isolation:isolate}
.compass-arrow {transition:transform .14s linear;will-change:transform}
.qibla-live-pill{position:relative;display:inline-flex;align-items:center;gap:7px;margin:7px auto 0;padding:7px 12px;border:1px solid #d8b96d77;border-radius:99px;background:#042d29dd;color:#fff1ce;font-size:11px;font-weight:700}
.qibla-live-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:#cca46b}
.qibla-live-pill[data-quality=absolute]::before{background:#60e8b2;box-shadow:0 0 0 3px #60e8b224}
.qibla-live-pill[data-quality=relative]::before{background:#f2ba61}
.qibla-tip{font-size:12px;line-height:1.6;margin:7px 0 0;color:var(--muted)}
.qibla-start{display:inline-flex;align-items:center;gap:8px;justify-content:center;border-radius:99px;border:1px solid #dccead;background:#f9f1e3;color:#655129;padding:10px 15px;font-weight:700;font-size:12px;cursor:pointer}
.qibla-start:focus-visible{outline:3px solid #d8aa56;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.compass-arrow{transition:none}}
.screen-instruction {font-size:12px; color:var(--muted); line-height:1.6}
.settings-extra-hint {font-size:12px;color:var(--muted); line-height:1.6; padding:10px 2px}
.source-label {display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1.35}
.source-label.estimated {color:#996b34}
.source-label.official {color:#126747}
.ui-select {padding:9px 11px;background:#fffdf7;border:1px solid var(--line);border-radius:10px;min-width:100px;color:var(--ink)}
.setting-row label {display:grid;gap:5px}
.app-layout[data-theme=dark] {--ivory:#102b25;--cream:#1d3930;--ink:#f4f2e8;--muted:#a4b9ac;--line:#325145;--mint:#1e4638;--shadow:0 14px 32px rgba(0,0,0,.19);background:var(--ivory);color:var(--ink)}
.app-layout[data-theme=dark] .main-area,.app-layout[data-theme=dark] .home-sections {background:var(--ivory)}
.app-layout[data-theme=dark] .page-frame,.app-layout[data-theme=dark] .hero-main {background:var(--ivory)}
.app-layout[data-theme=dark] .inline-card,.app-layout[data-theme=dark] .card,.app-layout[data-theme=dark] .hadith-card,.app-layout[data-theme=dark] .adhkar-card,.app-layout[data-theme=dark] .feature-tile,.app-layout[data-theme=dark] .adhkar-quick-card,.app-layout[data-theme=dark] .prayer-strip,.app-layout[data-theme=dark] .dhikr-choice {background:#203a31;border-color:#355047;color:var(--ink)}
.app-layout[data-theme=dark] .hadith-inner,.app-layout[data-theme=dark] .hadith-translation,.app-layout[data-theme=dark] .hadith-arabic,.app-layout[data-theme=dark] .section-title,.app-layout[data-theme=dark] .verse-arabic {color:var(--ink)}
.app-layout[data-theme=dark] .counter-center,.app-layout[data-theme=dark] .dhikr-name {color:#133c33}
.app-layout[data-theme=dark] .tasbeeh-main {background-color:#faf7ed;color:#153a30}
.app-layout[data-theme=dark] .tasbeeh-page .page-header {color:var(--ink)}
.app-layout[data-theme=dark] .qibla-panel {color:white}
.app-layout[data-theme=dark] .button,.app-layout[data-theme=dark] .location-chip,.app-layout[data-theme=dark] .ui-select {background:#244c3c;border-color:#3b6858;color:var(--ink)}
.app-layout[data-theme=dark] .button.primary {background:#0d765b;color:white}
.app-layout[data-theme=dark] .home-frame .hadith-cover:after {background:linear-gradient(transparent,#203a31dd)}
@media(max-width:919px) {
  .home-hero {height:252px}
  .home-hero-inner {padding-top:24px}
  .hero-main {margin-top:-20px; border-radius:29px 29px 0 0}
  .home-frame .hadith-card {flex-basis:81%}
  .home-frame .hadith-cover {height:189px}
  .feature-tile img {width:53px;height:53px}
  .bottom-nav {min-height:68px}
  .app-layout[data-theme=dark] ~ .bottom-nav {background:#123c30f5;border-color:#31594a}
  .app-layout[data-theme=dark] ~ .bottom-nav button {color:#b7c9c0}
  .app-layout[data-theme=dark] ~ .bottom-nav button.active {color:#ffdfa0}
}
@media(max-width:359px) {.home-hero{height:235px}.feature-tile img {width:44px;height:44px}}
