/* Noor-e-Hidayah — phone "app mode": premium, aesthetic, 3D. Desktop is untouched. */
:root{--ap-bg1:#fbf8ef;--ap-bg2:#f0e8d3;--ap-card1:#fffdf8;--ap-card2:#f5eedb;--ap-ink:#1b2f29;--ap-mut:#5a6a63;--ap-g1:#3f8a73;--ap-g2:#123f35;--ap-gold:#b59655;--ap-gold2:#e6d7ad;--ap-line:rgba(181,150,85,.38);--ap-sh:rgba(18,63,53,.3);--ap-dock:rgba(255,253,248,.95)}
html[data-theme="dark"]{--ap-bg1:#1d1910;--ap-bg2:#12100a;--ap-card1:#2b2616;--ap-card2:#201c10;--ap-ink:#e6efed;--ap-mut:#b3c0bb;--ap-gold:#d8bc78;--ap-line:rgba(216,188,120,.32);--ap-sh:rgba(0,0,0,.65);--ap-dock:rgba(34,30,18,.95)}
.app-home,.app-back{display:none}
@media(max-width:760px){
html body{background:linear-gradient(180deg,var(--ap-bg1),var(--ap-bg2)) fixed!important;padding-bottom:calc(118px + env(safe-area-inset-bottom,0px))!important}
.cursor-glow,.scroll-down{display:none!important}
/* top app bar */
html body .noor-navbar{top:0!important;width:100%!important;max-width:none!important;margin:0!important;min-height:60px!important;padding:calc(env(safe-area-inset-top,0px) + 8px) 12px 8px!important;gap:8px!important;border:0!important;border-bottom:1px solid var(--ap-line)!important;border-radius:0 0 26px 26px!important;background:linear-gradient(180deg,var(--ap-card1),var(--ap-bg1))!important;box-shadow:0 14px 30px -16px var(--ap-sh)!important;backdrop-filter:blur(16px)}
html body .noor-brand-copy strong{color:var(--ap-ink)!important;font-size:1.05rem!important}
html body .noor-brand-copy small{color:var(--ap-gold)!important}
html body .noor-start,html body #currentLanguage,html body .language-chevron{display:none!important}
html body .noor-actions{margin-left:auto!important;gap:8px!important}
html body .theme-toggle,html body .language-btn,html body .noor-mobile-btn,html body .app-back{width:42px!important;min-height:42px!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:14px!important;border:1px solid var(--ap-line)!important;background:linear-gradient(145deg,var(--ap-card1),var(--ap-card2))!important;color:var(--ap-g2)!important;box-shadow:0 5px 0 rgba(181,150,85,.28),0 10px 16px -8px var(--ap-sh)!important}
html[data-theme="dark"] body .theme-toggle,html[data-theme="dark"] body .language-btn,html[data-theme="dark"] body .noor-mobile-btn,html[data-theme="dark"] body .app-back{color:var(--ap-gold)!important}
html body .app-back{font-size:26px;line-height:1;cursor:pointer;flex:0 0 auto}
html body .noor-navbar.mobile-open{background:linear-gradient(145deg,#0b4035,#062b25)!important}
html body .noor-navbar.mobile-open .noor-brand-copy strong{color:#fffdf8!important}
/* floating 3D dock */
html body .noor-mobile-nav{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom,0px));padding:14px 6px 8px;border-radius:28px;background:var(--ap-dock);border:1px solid var(--ap-line);box-shadow:0 22px 44px -10px var(--ap-sh),0 2px 0 rgba(255,255,255,.7) inset}
html body .noor-mobile-nav a{color:var(--ap-mut)!important;background:none!important;min-height:50px;transition:transform .2s}
html body .noor-mobile-nav a.is-active{color:var(--ap-g2)!important;transform:translateY(-2px)}
html[data-theme="dark"] body .noor-mobile-nav a.is-active{color:var(--ap-gold)!important}
html body .noor-mobile-nav a.is-active>span{display:grid;place-items:center;width:48px;height:48px;margin-top:-30px;border-radius:50%;color:#fff;font-size:1.3rem;background:radial-gradient(circle at 30% 22%,var(--ap-g1),var(--ap-g2) 70%);box-shadow:0 12px 20px -6px var(--ap-sh),0 0 0 5px var(--ap-dock),0 0 0 6px var(--ap-line),inset 0 2px 0 rgba(255,255,255,.32)}
/* depth for cards and chunky 3D buttons */
.topic-card,.daily-card,.start-card,.dash-panel,.lesson-card,.info-card,.path-card,.feature-card,.content-card,.section-card,.intro-card,.trust-card,.hadith-box,.timeline-item{border-radius:22px!important;box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 18px 34px -16px var(--ap-sh)!important}
.noor-3d-btn,.primary-btn{min-height:54px;border-radius:18px!important;border:1px solid rgba(230,215,173,.5)!important;background:linear-gradient(180deg,var(--ap-g1),var(--ap-g2))!important;color:#fff!important;box-shadow:0 6px 0 #0a2d26,0 18px 26px -10px var(--ap-sh)!important}
:where(.noor-3d-btn,.primary-btn,.secondary-btn,.start-card,.topic-card,.daily-card,.ah-btn,.ah-q,.ah-continue,.hs-tile):active{transform:translateY(3px) scale(.97)!important;transition:transform .08s}
main{animation:apIn .5s ease both}
@keyframes apIn{from{opacity:0;transform:translateY(14px)}}
/* app home (index only) */
.pg-index .hero{display:none!important}
.app-home{display:block;padding:18px 16px 4px}
.ah-greet{margin:0 0 12px;font-size:17px;font-weight:700;color:var(--ap-ink)}
.ah-hero{position:relative;overflow:hidden;padding:26px 22px 22px;border-radius:30px;color:#fffdf8;background:radial-gradient(120% 90% at 85% 0,#2f7a66 0,transparent 55%),linear-gradient(160deg,#0f4a3d,#062b25);border:1px solid rgba(230,215,173,.45);box-shadow:0 2px 0 rgba(255,255,255,.2) inset,0 30px 50px -18px var(--ap-sh)}
.ah-art{position:absolute;right:-10px;top:-6px;width:170px;height:150px;pointer-events:none;opacity:.9}
.ah-art i{position:absolute;font-style:normal}
.ah-moon{right:48px;top:18px;font-size:54px;color:var(--ap-gold2);filter:drop-shadow(0 0 16px rgba(230,215,173,.6))}
.ah-dome{right:0;bottom:0;width:120px;height:64px;border-radius:70px 70px 0 0;background:linear-gradient(180deg,rgba(230,215,173,.28),rgba(230,215,173,.06));box-shadow:-70px 18px 0 -14px rgba(230,215,173,.12)}
.ah-eyebrow{position:relative;margin:0 0 8px;font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--ap-gold2)}
.ah-hero .ah-title{position:relative;margin:0 0 10px;font-family:"Cormorant Garamond",Georgia,serif;font-size:clamp(34px,10vw,44px);line-height:1.05;font-weight:700;color:#fffdf8;max-width:260px}
.ah-hero p:not(.ah-eyebrow){position:relative;margin:0 0 20px;font-size:15.5px;line-height:1.6;color:#d4e0d9}
.ah-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:54px;margin-top:12px;border-radius:18px;font-size:16.5px;font-weight:800;text-decoration:none;color:#fffdf8;border:1.5px solid rgba(230,215,173,.55);background:rgba(255,255,255,.06)}
.ah-btn-main{margin-top:0;color:#0a2d26;border-color:transparent;background:linear-gradient(180deg,#f3e6bd,#d8bc78);box-shadow:0 6px 0 #8a7440,0 16px 24px -8px rgba(0,0,0,.5)}
.ah-head{display:flex;justify-content:space-between;align-items:baseline;margin:26px 2px 12px}
.ah-head h2{margin:0;font-size:20px;font-weight:800;color:var(--ap-ink)}
.ah-head a{font-size:14px;font-weight:700;color:var(--ap-gold);text-decoration:none}
.ah-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;perspective:800px}
.ah-q{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 6px 12px;border-radius:20px;text-decoration:none;font-size:13.5px;font-weight:700;color:var(--ap-ink);border:1px solid var(--ap-line);background:linear-gradient(150deg,var(--ap-card1),var(--ap-card2));box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 14px 24px -12px var(--ap-sh)}
.ah-q b{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;font-size:22px;font-weight:400;color:#fff;background:linear-gradient(145deg,var(--ap-g1),var(--ap-g2));box-shadow:0 8px 14px -6px var(--ap-sh),inset 0 2px 0 rgba(255,255,255,.3)}
.ah-continue{display:block;margin-top:20px;padding:18px 20px;border-radius:24px;text-decoration:none;color:var(--ap-ink);border:1px solid var(--ap-line);background:linear-gradient(150deg,var(--ap-card1),var(--ap-card2));box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 20px 34px -16px var(--ap-sh)}
.ah-continue small{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--ap-gold)}
.ah-continue strong{display:block;margin:4px 0 12px;font-size:20px}
.ah-continue span{display:inline-flex;align-items:center;min-height:42px;padding:0 20px;border-radius:14px;font-weight:800;color:#fff;background:linear-gradient(180deg,var(--ap-g1),var(--ap-g2));box-shadow:0 4px 0 #0a2d26}
}
@media(max-width:760px) and (prefers-reduced-motion:no-preference){@view-transition{navigation:auto}}
@media(prefers-reduced-motion:reduce){main{animation:none!important}}

/* ---- v2: top bar fit fix, Explore sheet, more-page polish ---- */
@media(max-width:760px){
html body .noor-navbar{position:fixed!important;left:0!important;right:0!important;top:0!important;transform:none!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;gap:6px!important}
html body .noor-brand{flex:1 1 auto!important;min-width:0!important;gap:8px!important}
html body .noor-brand-mark{transform:none!important;flex:0 0 38px!important;width:38px!important;height:38px!important}
html body .noor-brand-copy{min-width:0;overflow:hidden}
html body .noor-brand-copy small{display:none!important}
html body .noor-brand-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;font-size:1rem!important}
html body .theme-toggle,html body .language-btn,html body .noor-mobile-btn,html body .app-back{width:40px!important;min-height:40px!important}
html body .noor-actions{gap:6px!important;flex:0 0 auto!important}
.pg-index{padding-top:calc(66px + env(safe-area-inset-top,0px))!important}
.more-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px;padding:4px 2px 12px;scrollbar-width:none;scroll-snap-type:x proximity}
.more-tabs::-webkit-scrollbar{display:none}
.more-tabs>*{flex:0 0 auto;white-space:nowrap;scroll-snap-align:start}
#moreBox>*{border-radius:22px!important;box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 18px 32px -14px var(--ap-sh)!important}
.app-sheet{position:fixed;inset:0;z-index:100001}
.app-sheet[hidden]{display:none}
.as-back{position:absolute;inset:0;background:rgba(6,43,37,.55);backdrop-filter:blur(6px);animation:asFade .25s both}
.as-panel{position:absolute;left:0;right:0;bottom:0;max-height:88dvh;overflow-y:auto;overscroll-behavior:contain;padding:10px 16px calc(24px + env(safe-area-inset-bottom,0px));border-radius:30px 30px 0 0;background:linear-gradient(180deg,var(--ap-card1),var(--ap-bg2));border:1px solid var(--ap-line);box-shadow:0 -24px 60px -10px var(--ap-sh);animation:asUp .45s cubic-bezier(.2,.9,.3,1.15) both;transition:transform .2s}
.as-grip{display:block;width:44px;height:5px;margin:0 auto 12px;border-radius:5px;background:var(--ap-line)}
.as-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.as-head h2{margin:0;font-size:26px;font-weight:800;color:var(--ap-ink)}
.as-x{width:40px;height:40px;border-radius:14px;border:1px solid var(--ap-line);background:var(--ap-card1);color:var(--ap-ink);font-size:17px;cursor:pointer;box-shadow:0 4px 0 rgba(181,150,85,.28)}
.as-sub{margin:0 0 12px;font-size:15px;color:var(--ap-mut)}
.as-search{width:100%;box-sizing:border-box;min-height:46px;margin-bottom:14px;padding:0 16px;border-radius:15px;border:1px solid var(--ap-line);background:var(--ap-card1);color:var(--ap-ink);font-size:16px;outline:0}
.as-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;perspective:900px}
.as-tile{display:flex;flex-direction:column;gap:3px;padding:14px;border-radius:20px;text-decoration:none;color:var(--ap-ink);border:1px solid var(--ap-line);background:linear-gradient(150deg,var(--ap-card1),var(--ap-card2));box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 16px 26px -14px var(--ap-sh);animation:asTile .4s both;animation-delay:calc(var(--i)*28ms + .12s)}
.as-tile:active{transform:translateY(3px) scale(.96)}
.as-tile b{display:grid;place-items:center;width:44px;height:44px;margin-bottom:8px;border-radius:14px;font-size:21px;font-weight:400;color:#fff;background:linear-gradient(145deg,var(--ap-g1),var(--ap-g2));box-shadow:0 8px 14px -6px var(--ap-sh),inset 0 2px 0 rgba(255,255,255,.3)}
.as-tile strong{font-size:16px;line-height:1.25}
.as-tile small{font-size:13px;line-height:1.4;color:var(--ap-mut)}
@keyframes asUp{from{transform:translateY(100%)}}
@keyframes asFade{from{opacity:0}}
@keyframes asTile{from{opacity:0;transform:translateY(16px) scale(.95)}}
}
@media(min-width:761px){.app-sheet{display:none!important}}
