/* Illumination: Athkarz's visual language.
   Emerald, ivory and brass; girih tiling as the page's watermark; paper panels with
   brass hairlines in place of shadowed cards; one bold scene at the top of Today. */

/* Brand tokens */
body:not(.dark){--bg:#f5f0e4;--card:#fffdf7;--ink:#18201d;--muted:#5d665f;--accent:#a7804d;--green:#286d57;--line:#e3dac6;--glass:#fffdf7e6;
  --edition-edge:#a7804d42;--edition-shadow:0 1px 0 #a7804d1a,0 8px 20px #10231d0b}
body.evening{--bg:#f1ebdc;--card:#fcf9f0}
body.dark{--bg:#0d1f1a;--card:#14302a;--ink:#f3eedd;--muted:#b9c4b6;--accent:#d5b06c;--green:#7fc4a6;--line:#2c4a40;--glass:#14302aeb;
  --edition-edge:#d5b06c33;--edition-shadow:0 1px 0 #d5b06c14,0 10px 24px #0006}


/* Panels: paper with a brass hairline, not a floating card */
:is(.edition-card,.card,.pair-card,.edition-times,.prayer-log-list,.review-note,.chapter-results,.reading-option-group){border:1px solid var(--edition-edge);box-shadow:var(--edition-shadow)}
.pair-card .pair-top>span,.studio-action>span:first-child{background:none;box-shadow:none;border:1px solid var(--edition-edge);border-radius:50%}
.pair-card .pair-top>span svg{color:var(--accent)}

/* Section headings: a rule that ends in an eight-pointed star, as between surahs */
.app-section-row{align-items:center;gap:14px;margin:30px 2px 14px}
.app-section-row h2{margin:0;flex:none;font-size:22px;letter-spacing:-.03em}
.app-section-row::after{content:"";flex:1;height:13px;background:linear-gradient(var(--edition-edge),var(--edition-edge)) 0 50%/calc(100% - 20px) 1px no-repeat,var(--girih-brass) 100% 50%/13px 13px no-repeat}

/* ---------- Today: sky, skyline and geometry ---------- */
.sky{height:640px;top:-150px}
.sky[data-phase=fajr]{background:linear-gradient(180deg,#141d3a 0,#34406f 30%,#9a6a8c 56%,#f0b089 76%,#f7d2a5 90%)}
.sky[data-phase=morning]{background:linear-gradient(180deg,#3f8fc9 0,#86c1e6 46%,#d6ead9 78%,#f3e7c8 92%)}
.sky[data-phase=dhuhr]{background:linear-gradient(180deg,#1c79c2 0,#63b3e6 48%,#c9e6ec 80%,#eef0dc 94%)}
.sky[data-phase=asr]{background:linear-gradient(180deg,#356f9c 0,#8fb3a6 42%,#ecd08f 74%,#f6dfa9 90%)}
.sky[data-phase=maghrib]{background:linear-gradient(180deg,#1d1c4a 0,#5b2f6b 30%,#c9563f 60%,#f3a252 80%,#f8cf86 92%)}
.sky[data-phase=isha]{background:linear-gradient(180deg,#03080f 0,#081a2a 40%,#0d3328 78%,#12453a 94%)}
/* Lattice of light: a glint travels along the lines of the tiling */
.sky-girih{inset:0;background:linear-gradient(115deg,#fff0 38%,#fff3cfd9 50%,#fff0 62%) 0 0/320% 100%,#ffffff1c;
  -webkit-mask:var(--girih-mask) 0 0/84px 84px,linear-gradient(180deg,#000 0,#000 38%,#0000 70%);-webkit-mask-composite:source-in;
  mask:var(--girih-mask) 0 0/84px 84px,linear-gradient(180deg,#000 0,#000 38%,#0000 70%);mask-composite:intersect;animation:girih-glint 11s linear infinite}
@keyframes girih-glint{from{background-position:120% 0,0 0}to{background-position:-60% 0,0 0}}
.sky-orb.sun,.sky-orb.moon{overflow:visible}
.sky-orb::before{content:"";position:absolute;inset:-78px;background:#ffe9b0;-webkit-mask:var(--rosette) center/contain no-repeat;mask:var(--rosette) center/contain no-repeat;opacity:.5;animation:rosette-turn 90s linear infinite}
.sky-orb.moon::before{inset:-56px;opacity:.28}
@keyframes rosette-turn{to{rotate:360deg}}
.sky-skyline{position:absolute;left:0;bottom:0;width:100%;height:auto;aspect-ratio:400/262;min-height:262px;display:block}
.sky-skyline .far{fill:var(--sky-far)}.sky-skyline .near{fill:var(--sky-near)}
.sky-skyline .lamps{fill:#ffd98a;opacity:var(--lamp);filter:drop-shadow(0 0 3px #ffcf7a)}
.sky[data-phase=fajr]{--sky-near:#161a36;--sky-far:#4a4a78;--lamp:.75}
.sky[data-phase=morning]{--sky-near:#1f5a52;--sky-far:#7fb3b0;--lamp:0}
.sky[data-phase=dhuhr]{--sky-near:#1c5a55;--sky-far:#86bdc4;--lamp:0}
.sky[data-phase=asr]{--sky-near:#2b4a3c;--sky-far:#8aa58f;--lamp:0}
.sky[data-phase=maghrib]{--sky-near:#1c1030;--sky-far:#6b3558;--lamp:.9}
.sky[data-phase=isha]{--sky-near:#030c0a;--sky-far:#0b2a26;--lamp:1}
.sky-fade{height:120px;background:linear-gradient(180deg,#0000,var(--bg) 92%)}
.sky-cloud{display:none}
/* The hero is the sky itself: no photograph, no box */
.edition-hero.cine{background:none;border:0;box-shadow:none;overflow:visible;border-radius:0}
.edition-hero.cine :is(.scene-art,.scene-shade,.scene-depth,.scene-caption){display:none}
.edition-hero.cine .edition-welcome{min-height:236px;padding:6px 4px 20px;align-content:start;color:#fffaf0;text-shadow:0 1px 14px #0009}
.edition-hero.cine .scene-date{font-size:14px;font-weight:600;opacity:.92}
.edition-hero.cine .edition-welcome h2{font:400 21px/1.3 Georgia,serif;letter-spacing:0;margin:2px 0 18px;opacity:.9}
.edition-hero.cine .scene-next small{font-size:15px;color:#fff5dc}
.edition-hero.cine .scene-next strong{font-size:clamp(34px,9.6vw,46px);letter-spacing:-.045em;line-height:1.05;font-weight:650}
.edition-hero.cine .scene-location{margin-top:14px;padding:7px 13px;border-radius:99px;background:#0b241d59;border:1px solid #fff4dc40;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);text-shadow:none}
#view[data-sky] .edition-mast :is(h1,.edition-wordmark){color:#fff8e6}
#view[data-sky] .edition-hero{box-shadow:none}
.dash-bar{justify-content:flex-end;margin:0 2px 10px}
.dash-bar span{display:none}
.dash-bar button{background:#0b241d59;border-color:#fff4dc40;color:#fffaf0;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.edition-times.times-main{margin-top:0}
.edition-times.times-main .is-next{background:linear-gradient(165deg,#286d57,#10231d)}
.edition-times.times-main .is-next::after{border-color:#a7804d}

/* Ayah of the day: sentence-case label, no tracked capitals */
.ayah-day small,.ayah-pop small{letter-spacing:0;text-transform:none;font-size:14px;font-weight:600}
.ayah-day-inner{background:linear-gradient(150deg,#16382e,#10231d);border:1px solid #a7804d55}

/* ---------- Continue reading: the page you are on ---------- */
.studio-cover.spread{min-height:0;padding:0;margin:8px 0 18px;background:none;border:0;box-shadow:none;overflow:visible;border-radius:0;color:var(--ink);isolation:isolate}
.studio-cover.spread::after{content:none}
.spread-page{position:relative;display:block;width:100%;height:232px;padding:0;overflow:hidden;text-align:center;border-radius:6px 20px 20px 6px;border:1px solid #c9b17f;
  background:linear-gradient(90deg,#d9c79c 0,#f3e7c9 3.5%,#fbf4e1 9%,#fdf8ea 100%);box-shadow:inset 0 0 0 7px #fbf4e1,inset 0 0 0 8px #a7804d99,inset 0 0 0 11px #fbf4e1,inset 0 0 0 12px #a7804d55,6px 8px 0 -3px #efe3c6,7px 9px 0 -3px #c9b17f,12px 16px 0 -7px #e9dcbb,13px 17px 0 -7px #c9b17f,0 20px 34px #10231d26;color:#232b22}
[dir=rtl] .spread-page{border-radius:20px 6px 6px 20px}
.spread-band{display:block;margin:21px 30px 6px;padding:3px 0 5px;font:400 19px/1.5 'Athkarz Quran',serif;color:#6f5526;border-block:1px solid #a7804d88;background:linear-gradient(90deg,#a7804d00,#a7804d1f 30%,#a7804d1f 70%,#a7804d00)}
.spread-text{display:block;padding:0 30px;font:400 clamp(19px,5.3vw,23px)/2.12 'Athkarz Quran',serif;text-align:justify;text-align-last:center;-webkit-mask:linear-gradient(180deg,#000 62%,#0000 96%);mask:linear-gradient(180deg,#000 62%,#0000 96%);height:172px;overflow:hidden}
.spread-text i{display:inline-grid;place-items:center;width:1.55em;height:1.55em;border:1px solid #a7804d;border-radius:50%;font:600 .5em/1 -apple-system,'Geeza Pro','Noto Naskh Arabic',sans-serif;color:#6f5526;vertical-align:.34em;font-style:normal}
.spread-folio{position:absolute;bottom:13px;left:50%;translate:-50% 0;min-width:30px;padding:2px 9px;border-radius:99px;border:1px solid #a7804d99;background:#fbf4e1;font:600 12px/1.4 -apple-system,'Geeza Pro',sans-serif;color:#6f5526}
.spread-foot{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:16px 2px 0}
.spread-foot strong{display:block;font-size:17px;letter-spacing:-.02em}
.spread-foot small{display:block;color:var(--muted);font-size:13px;margin-top:1px}
.studio-cover.spread .spread-foot button{min-height:44px;padding:9px 17px;border-radius:13px;font-size:14px;font-weight:650;box-shadow:none}
.studio-cover.spread .spread-foot .primary{background:var(--green);color:#fff;border-color:transparent}
.studio-cover.spread .spread-foot .spread-alt{background:none;color:var(--green);border:1px solid var(--edition-edge)}
body.dark .spread-page{filter:brightness(.92)}

/* ---------- Your routine: one indexed panel, like a contents page ---------- */
.edition-routine{margin:0}
.routine-index{border:1px solid var(--edition-edge);border-radius:20px;background:var(--card);box-shadow:var(--edition-shadow);padding:2px 16px;overflow:hidden}
.routine-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:baseline;column-gap:12px;width:100%;min-height:58px;padding:16px 0 15px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;box-shadow:none;text-align:start;color:var(--ink)}
.routine-row:last-child{border-bottom:0}
.routine-row i{width:15px;height:15px;align-self:center;background:var(--accent);-webkit-mask:var(--girih-mask) center/15px 15px;mask:var(--girih-mask) center/15px 15px}
.routine-row span{font-size:16.5px;font-weight:620;letter-spacing:-.015em}
.routine-row small{font-size:13px;color:var(--muted);text-align:end}

/* ---------- Other screens ---------- */
/* You: three separate number cards become one ledger */
#view[data-screen=You] .grid:has(>.card>.num){display:block;border:1px solid var(--edition-edge);border-radius:20px;background:var(--card);box-shadow:var(--edition-shadow);padding:2px 18px}
#view[data-screen=You] .grid:has(>.card>.num)>.card{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin:0;padding:16px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;box-shadow:none}
#view[data-screen=You] .grid:has(>.card>.num)>.card:last-child{border-bottom:0}
#view[data-screen=You] .grid:has(>.card>.num) small{font-size:15.5px;color:var(--ink);font-weight:600}
#view[data-screen=You] .grid:has(>.card>.num) .num{font:400 30px/1 Georgia,serif;font-variant-numeric:tabular-nums;color:var(--green)}
/* Prayer: quick links read as text links, not three more boxes */
.quick{gap:6px 18px}
.quick button{background:none;border:0;box-shadow:none;padding:6px 0;min-height:40px;color:var(--green);font-weight:650;text-decoration:underline;text-decoration-color:var(--edition-edge);text-underline-offset:5px}
/* Segmented controls: quieter track, brass edge on the selected pane */
.app-segments{border:1px solid var(--edition-edge);box-shadow:none}
.app-segments button.on{box-shadow:0 1px 0 #a7804d33,0 4px 10px #10231d12}
@media(prefers-reduced-motion:reduce){.sky-girih,.sky-orb::before{animation:none}}
/* Skyline stands clear above the prayer times; the ground melts into the page */
.sky-skyline{bottom:58px}
.sky-fade{height:170px;background:linear-gradient(180deg,#0000 0,color-mix(in srgb,var(--bg) 55%,#0000) 34%,var(--bg) 62%)}
.edition-hero.cine .edition-welcome{min-height:262px}

/* ---------- Companion features ---------- */
.scene-hijri{font:400 15px/1.4 Georgia,serif;opacity:.95;margin-top:1px}
.scene-notable{display:inline-block;margin:7px 0 0;padding:4px 11px;border-radius:99px;border:1px solid #fff4dc55;background:#0b241d4d;font-size:12.5px;font-weight:600;text-shadow:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.edition-hero.cine .edition-welcome h2{margin-top:10px}
.friday-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;margin:0 0 12px;padding:13px 14px;border-radius:20px;color:#fff5df;background:linear-gradient(140deg,#286d57,#10231d);border:1px solid #a7804d88;box-shadow:var(--edition-shadow)}
.friday-card strong{display:block;font:400 20px/1.25 Georgia,serif}
.friday-card small{display:block;font-size:12.5px;opacity:.82}
.friday-card button{min-height:42px;padding:8px 13px;border-radius:13px;font-size:13.5px;font-weight:650;background:#f1d294;color:#13392c;border:0;box-shadow:none}
.friday-card button+button{background:none;color:#fff5df;border:1px solid #fff4dc55}
.khatm-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px 14px;margin:0 0 18px;padding:15px 16px;border-radius:20px;background:var(--card);border:1px solid var(--edition-edge);box-shadow:var(--edition-shadow)}
.khatm-card:not(:has(.khatm-ring)){grid-template-columns:1fr}
.khatm-copy strong{display:block;font-size:17px;letter-spacing:-.02em}
.khatm-copy small{display:block;font-size:13.5px;color:var(--muted);line-height:1.45;margin-top:2px}
.khatm-copy .khatm-today{color:var(--green);font-weight:650}
.khatm-ring{width:68px;height:68px}
.khatm-ring circle{fill:none;stroke:var(--line);stroke-width:7;transform:rotate(-90deg);transform-origin:50% 50%}
.khatm-ring .bar{stroke:var(--accent);stroke-linecap:round;transition:stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1)}
.khatm-ring text{font:600 22px/1 Georgia,serif;fill:var(--ink)}
.khatm-actions,.khatm-form{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.khatm-form input{flex:1 1 150px;min-height:46px;margin:0}
.khatm-card button{min-height:46px;padding:9px 16px;border-radius:13px;font-size:14px;font-weight:650;background:none;color:var(--green);border:1px solid var(--edition-edge);box-shadow:none}
.khatm-card button.primary{flex:1 1 auto;background:var(--green);color:#fff;border-color:transparent}
.quran-reader.memorise .ayah-text{filter:blur(9px);opacity:.5;cursor:pointer;transition:filter .35s,opacity .35s}
.quran-reader.memorise .ayah-text.revealed{filter:none;opacity:1}
.studio-tabs button{white-space:nowrap;font-size:12.5px;padding-inline:2px}
.friday-card{grid-template-columns:1fr 1fr;gap:10px 8px;padding:15px 16px 14px}
.friday-card>div{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.friday-card small{opacity:.9;color:#f1d294}

/* ---------- Quick intro ---------- */
.intro-tour{position:fixed;inset:0;z-index:95;display:grid;grid-template-rows:minmax(0,1fr) auto;background:#10231d;color:#fff5df;overflow:hidden}
.tour-skip{position:absolute;z-index:3;top:max(14px,var(--sat));inset-inline-end:16px;min-height:40px;padding:6px 15px;border-radius:99px;border:1px solid #fff4dc40;background:#0b241d80;color:#fffaf0;font-size:14px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.tour-track{position:relative;min-height:0}
.tour-slide{position:absolute;inset:0;display:grid;grid-template-rows:minmax(0,1fr) auto auto;align-content:end;padding:0 26px 6px;opacity:0;translate:40px 0;pointer-events:none;transition:opacity .45s,translate .55s cubic-bezier(.2,.8,.2,1)}
.tour-slide.before{translate:-40px 0}
[dir=rtl] .tour-slide{translate:-40px 0}[dir=rtl] .tour-slide.before{translate:40px 0}
.tour-slide.on,[dir=rtl] .tour-slide.on{opacity:1;translate:0 0;pointer-events:auto}
.tour-slide h2{margin:26px 0 8px;font:500 clamp(28px,7.8vw,36px)/1.1 Georgia,serif;letter-spacing:-.025em;color:#fff8e6}
.tour-slide p{margin:0 0 6px;font-size:16.5px;line-height:1.5;color:#d9d6c4;max-width:24em}
.tour-art{position:relative;display:grid;place-items:center;min-height:0;margin:0 -26px;overflow:hidden}
.intro-tour footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 26px calc(22px + var(--sab))}
.tour-dots{display:flex;gap:7px}
.tour-dots i{width:8px;height:8px;border-radius:9px;background:#fff5df40;transition:width .35s cubic-bezier(.2,.8,.2,1),background .35s}
.tour-dots i.on{width:26px;background:#d5b06c}
.tour-next{min-height:56px;min-width:150px;padding:12px 26px;border:0;border-radius:18px;background:#f1d294;color:#13392c;font-size:17px;font-weight:650;box-shadow:0 12px 26px #0006}
/* 1: the sky */
.sky.tour-sky{position:absolute;inset:0;top:0;left:0;width:100%;height:100%;translate:none;z-index:0}
.tour-sky .sky-skyline{bottom:0}.tour-sky .sky-fade{height:90px;background:linear-gradient(180deg,#0000,#10231d)}
.tour-mark{position:relative;z-index:1;display:grid;justify-items:center;gap:2px;text-shadow:0 2px 18px #0009;margin-top:-18%}
.tour-mark span{font:400 54px/1.3 'Athkarz Quran',serif;color:#ffe9b0}
.tour-mark b{font-size:34px;font-weight:700;letter-spacing:-.06em;color:#fffaf0}.tour-mark b i{color:#d5b06c;font-style:normal}
/* 2: prayers ticking off */
.tour-prayers{display:grid;gap:9px;width:min(84%,330px)}
.tour-prayers span{display:grid;grid-template-columns:30px 1fr 26px;align-items:center;gap:12px;padding:13px 16px;border-radius:17px;background:#fffdf712;border:1px solid #a7804d55;opacity:.35;transition:opacity .5s,background .5s,scale .5s cubic-bezier(.2,1.3,.3,1)}
.tour-prayers svg{width:24px;height:24px;color:#d5b06c}.tour-prayers b{font-size:17px;font-weight:620}
.tour-prayers em{width:24px;height:24px;border-radius:50%;border:1.5px solid #fff5df55}
.tour-slide.on .tour-prayers span{opacity:1;transition-delay:calc(var(--i) * .22s + .25s)}
.tour-slide.on .tour-prayers span:nth-child(-n+3) em{background:#d5b06c;border-color:#d5b06c;transition:background .3s,border-color .3s;transition-delay:calc(var(--i) * .22s + .7s)}
.tour-slide.on .tour-prayers span:nth-child(4){background:linear-gradient(165deg,#286d57,#16382e);scale:1.04;transition-delay:1.5s}
/* 3: the page */
.tour-book{position:relative;width:min(84%,340px);perspective:900px}
.tour-book .spread-page{height:250px;rotate:-2deg;transition:transform .9s cubic-bezier(.2,.8,.2,1);transform:rotateX(18deg) translateY(30px);opacity:.4}
.tour-slide.on .tour-book .spread-page{transform:none;opacity:1}
.tour-corner{position:absolute;right:-1px;bottom:-1px;width:0;height:0;border-radius:6px 0 18px 0;background:linear-gradient(135deg,#fffaf0 0 49%,#d9c79c 50%,#b9a577 56%,#0000 57%);filter:drop-shadow(-4px -4px 6px #0005)}
.tour-slide.on .tour-corner{animation:tour-peel 3.2s 1s ease-in-out infinite}
@keyframes tour-peel{0%,100%{width:0;height:0}45%,60%{width:92px;height:92px}}
/* 4: beads */
.tour-beads .tasbih-stage{width:min(66vw,260px);--r:calc(min(66vw,260px) / 2 - 11px)}
.tour-beads .tasbih-ring{transition:transform .5s cubic-bezier(.2,1.2,.3,1)}
.tour-count{font:500 64px/1 Georgia,serif;color:#fff8e6;font-variant-numeric:tabular-nums}

/* ---------- Setup ---------- */
.setup.setup-lit{background:var(--bg)}
.setup-lit .sig-setup-art{position:relative;overflow:hidden;min-height:248px;height:248px;border-radius:0 0 30px 30px;background:#10231d;display:grid;place-items:center;padding:0}
.sky.setup-sky{position:absolute;inset:0;top:0;left:0;width:100%;height:100%;translate:none;z-index:0}
.setup-sky .sky-skyline{bottom:-34px}.setup-sky .sky-fade{display:none}
.setup-word{position:relative;z-index:1;font:400 clamp(34px,9vw,46px)/1.4 'Athkarz Quran',serif;color:#fff3cf;text-shadow:0 2px 18px #000a;margin-top:-34px}
.setup-brand{position:absolute;z-index:1;top:max(16px,var(--sat));inset-inline-start:20px;font-size:21px;font-weight:700;letter-spacing:-.06em;color:#fffaf0;text-shadow:0 1px 10px #0008}
.setup-brand i{color:#d5b06c;font-style:normal}
.setup-lit .sig-overline{display:none}
.setup-lit .setup-progress{gap:8px;margin-bottom:22px}
.setup-lit .setup-progress i{height:5px;border-radius:9px;background:var(--line)}
.setup-lit .setup-progress i.on{background:linear-gradient(90deg,#a7804d,#d5b06c)}
.setup-lit .setup-inner h2{font:500 clamp(30px,8.4vw,38px)/1.1 Georgia,serif;letter-spacing:-.025em;margin:0 0 6px}
.setup-lit .setup-inner .muted{font-size:16.5px;margin-bottom:22px}
.setup-lit :is(.setup-language button,.setup-option,.setup-secondary){border:1px solid var(--edition-edge);background:var(--card);border-radius:15px;box-shadow:none;min-height:52px;color:var(--ink)}
.setup-lit :is(.setup-language button.selected,.setup-option.selected,.setup-option[aria-pressed=true]){background:var(--green);color:#fff;border-color:transparent}
.setup-lit .sig-setup-actions .primary{min-height:58px;border-radius:18px;background:var(--green);color:#fff;justify-content:center;font-size:17px;box-shadow:0 12px 24px #286d5733}
.setup-lit :is(input,textarea,select){border-color:var(--edition-edge);border-radius:15px;background:var(--card)}


/* ---------- One place per screen ----------
   The surface behind content is plain. Each tab has a single ornament at its top
   edge, drawn from that screen's subject, and nothing repeats as wallpaper. */
main{overflow-x:hidden}
#view{position:relative;isolation:isolate}
#view::before,#view::after{pointer-events:none}

.setup-word{color:#fffaf0;margin-top:-96px;text-shadow:0 2px 16px #000c,0 0 2px #0008}

/* ================= Build 12: photographs, and half the clutter ================= */
/* The app runs under the status bar. Screens with no photo get an emerald cap. */
main{padding-top:max(28px,calc(var(--sat) + 14px))}
body::after{content:"";position:fixed;inset:0 0 auto 0;height:var(--sat);background:#10231d;z-index:45;pointer-events:none}
body::after{transition:opacity .25s}
body:has(#view[data-screen=Home]):not(.is-scrolled)::after,body:has(#view>.app-heading):not(.is-scrolled)::after{opacity:0}

/* Scenery: a photograph per time of day, falling back to the one the app ships */
.sky,.sky[data-phase]{top:-170px;height:660px;background:#10231d}
.sky>i{position:absolute;display:block}
.sky-photo{inset:0;background:center 36%/cover no-repeat;background-image:url(art/today-isha.webp),url(medina-dusk.webp)}
.sky[data-phase=fajr] .sky-photo{background-image:url(art/today-fajr.webp),url(medina-dusk.webp)}
.sky:is([data-phase=morning],[data-phase=dhuhr]) .sky-photo{background-image:url(art/today-day.webp),url(medina-dusk.webp)}
.sky[data-phase=asr] .sky-photo{background-image:url(art/today-asr.webp),url(medina-dusk.webp)}
.sky[data-phase=maghrib] .sky-photo{background-image:url(art/today-maghrib.webp),url(medina-dusk.webp)}
.sky-scrim{inset:0;background:linear-gradient(180deg,#07130fd1 0,#07130f52 30%,#07130f2e 56%,#07130fa6 100%),linear-gradient(90deg,#07130fb8,#07130f00 72%)}
[dir=rtl] .sky-scrim{background:linear-gradient(180deg,#07130fd1 0,#07130f52 30%,#07130f2e 56%,#07130fa6 100%),linear-gradient(270deg,#07130fb8,#07130f00 72%)}
.sky .sky-fade{inset:auto 0 0 0;height:150px;background:linear-gradient(180deg,#0000,var(--bg) 90%)}

/* Today's top says one thing: the next prayer */
.edition-hero.cine .edition-welcome{display:flex;flex-direction:column;align-items:flex-start;min-height:318px;padding:8px 4px 34px}
.edition-hero.cine .edition-welcome h2,.edition-hero.cine .scene-notable{display:none}
.edition-hero.cine .scene-date{font-size:15px;font-weight:600;opacity:.95}
.scene-hijri{font:400 15px/1.4 Georgia,serif;opacity:.9;margin-top:1px}
.edition-hero.cine .scene-next{margin-top:auto}
.edition-hero.cine .scene-next small{font-size:15px;opacity:.92}
.edition-hero.cine .scene-next strong{font-size:clamp(40px,11vw,52px)}
.today-meta{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-4px 6px 14px;min-height:40px;font-size:13.5px;color:var(--muted)}
.today-meta .scene-notable{display:inline;margin:0;padding:0;border:0;background:none;font-size:13.5px;font-weight:500;color:var(--muted);backdrop-filter:none;-webkit-backdrop-filter:none}
.today-meta .scene-location{margin:0 0 0 auto;padding:6px 0;min-height:40px;border:0;border-radius:0;background:none;box-shadow:none;color:var(--green);font-size:13.5px;font-weight:650;text-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;display:inline-flex;align-items:center;gap:5px}
[dir=rtl] .today-meta .scene-location{margin:0 auto 0 0}
.today-meta .scene-location svg{width:15px;height:15px}
.edition-times.times-main small{color:var(--ink);opacity:.7}
.edition-times.times-main .is-past:not(.is-done){opacity:.8}
.dash-bar{justify-content:center;margin:26px 0 4px}
.dash-bar button{background:none;border:1px solid var(--edition-edge);color:var(--green);backdrop-filter:none;-webkit-backdrop-filter:none}

/* Tabs: a short photograph behind the title, different on each */
#view:has(>.app-heading)::before{content:"";position:absolute;z-index:-1;left:50%;translate:-50% 0;top:-150px;width:100vw;height:330px;background:linear-gradient(180deg,#07130fe0 0,#07130f8f 46%,#07130f73 100%),linear-gradient(90deg,#07130fc7,#07130f26 78%),var(--tab-art,none),#10231d;background-size:cover;background-position:center 42%;-webkit-mask:linear-gradient(180deg,#000 58%,#0000 100%);mask:linear-gradient(180deg,#000 58%,#0000 100%)}
#view[data-screen=Worship]{--tab-art:url(art/prayer.webp),url(makkah-dusk.webp)}
#view[data-screen=Stories]{--tab-art:url(art/read.webp),url(quran-cover.webp)}
#view[data-screen=Dhikr]{--tab-art:url(art/dhikr.webp)}
#view[data-screen=You]{--tab-art:url(art/you.webp)}
#view:has(>.app-heading)>.app-heading h2{color:#fff8e6;text-shadow:0 1px 12px #0008}

/* Intro and setup: photograph first, nothing drawn behind the miniatures */
.tour-sky .sky-photo{background-image:url(art/intro.webp),url(medina-dusk.webp);background-position:center 40%}
.tour-sky .sky-scrim{background:linear-gradient(180deg,#07130f66 0,#07130f1f 40%,#10231d 100%)}
.tour-sky .sky-fade{display:none}
.tour-mark{position:absolute;z-index:1;inset:auto auto 26px 26px;margin:0;justify-items:start}
[dir=rtl] .tour-mark{inset:auto 26px 26px auto}
.tour-mark span{font-size:44px}.tour-mark b{font-size:30px}
.setup-sky .sky-fade{display:none}
.setup-sky .sky-scrim{background:linear-gradient(180deg,#07130f99 0,#07130f33 45%,#07130fb3 100%)}
.setup-word{margin-top:0}
.entry2-scene .sky-photo{background-position:center 40%}

/* Tasbih: readable tabs on the dark ground, one ring instead of two */
.tasbih-progress{display:none}
main:has(.tasbih-full) .app-segments{background:#ffffff14;border-color:#fff4dc33}
main:has(.tasbih-full) .app-segments button{color:#e9e3cf}
main:has(.tasbih-full) .app-segments button.on{background:#fffdf7;color:#18201d}
.tasbih-full .tasbih-stars{opacity:.22}
/* The photograph dissolves into whatever the page really is, so there is no seam */
.sky{-webkit-mask:linear-gradient(180deg,#000 74%,#0000 100%);mask:linear-gradient(180deg,#000 74%,#0000 100%)}
.sky .sky-fade{display:none}
.sky.setup-sky{-webkit-mask:none;mask:none}
.today-meta .scene-location{white-space:nowrap;flex:none}
.today-meta .scene-notable{flex:1;min-width:0;line-height:1.35}

/* ================= Build 13: the real artwork ================= */
/* Every photographic header starts at the very top of the phone. */
.sky,.sky[data-phase]{top:calc(-1 * max(28px,var(--sat) + 14px));height:510px;-webkit-mask:linear-gradient(180deg,#000 80%,#0000 100%);mask:linear-gradient(180deg,#000 80%,#0000 100%)}
.sky-photo{background-position:86% 50%}
.sky[data-phase=maghrib] .sky-photo{background-image:url(art/today-maghrib.webp),url(art/today-fajr.webp),url(medina-dusk.webp)}
.sky[data-phase=isha] .sky-photo,.sky-photo{background-image:url(art/today-isha.webp),url(art/today-fajr.webp),url(medina-dusk.webp)}
.sky[data-phase=fajr] .sky-photo{background-image:url(art/today-fajr.webp),url(medina-dusk.webp)}
.sky:is([data-phase=morning],[data-phase=dhuhr]) .sky-photo{background-image:url(art/today-day.webp),url(medina-dusk.webp)}
.sky[data-phase=asr] .sky-photo{background-image:url(art/today-asr.webp),url(medina-dusk.webp)}
/* The sky in these photographs is already clear where the text sits: a light scrim is enough. */
.sky-scrim,[dir=rtl] .sky-scrim{background:linear-gradient(180deg,#07130f8a 0,#07130f24 20%,#07130f00 46%),linear-gradient(90deg,#07130f66,#07130f00 62%)}
.sky:is([data-phase=asr],[data-phase=morning],[data-phase=dhuhr]) .sky-scrim{background:linear-gradient(180deg,#07130f80 0,#07130f2e 22%,#07130f0f 50%),linear-gradient(90deg,#07130f85,#07130f00 66%)}
.edition-hero.cine .edition-welcome{min-height:300px;text-shadow:0 1px 16px #000a,0 0 2px #0006}
#view:has(>.app-heading)::before{top:calc(-1 * max(28px,var(--sat) + 14px));height:270px;background-position:84% 44%;-webkit-mask:linear-gradient(180deg,#000 54%,#0000 100%);mask:linear-gradient(180deg,#000 54%,#0000 100%);background-image:linear-gradient(180deg,#07130f99 0,#07130f33 40%,#07130f4d 100%),linear-gradient(90deg,#07130f99,#07130f00 60%),var(--tab-art,none)}
.tour-sky .sky-photo{background-position:center 34%}
.tour-sky .sky-scrim{background:linear-gradient(180deg,#07130f40 0,#07130f00 30%,#07130f00 62%,#10231d 100%)}
.sky.tour-sky,.sky.setup-sky{top:0;height:100%}
.setup-sky .sky-photo{background-position:88% 74%}
.sky.entry2-scene{top:0;height:500px}
.sky.setup-sky{-webkit-mask:none;mask:none}
/* Framing: the whole mosque stands clear above the prayer times, and the countdown never reaches it */
.sky,.sky[data-phase]{height:484px;-webkit-mask:linear-gradient(180deg,#000 82%,#0000 100%);mask:linear-gradient(180deg,#000 82%,#0000 100%)}
.sky.tour-sky,.sky.setup-sky{height:100%}
.sky.entry2-scene{height:500px}
.sky.setup-sky{-webkit-mask:none;mask:none}
.sky-photo{background-position:100% 40%}
.edition-hero.cine .edition-welcome{min-height:322px}
.edition-hero.cine .scene-next strong{font-size:clamp(33px,9.3vw,42px);letter-spacing:-.04em}
/* The intro has its own photograph, whatever the time of day */
.sky.tour-sky .sky-photo,.sky.tour-sky[data-phase] .sky-photo{background-image:url(art/intro.webp),url(medina-dusk.webp);background-position:center 30%}
/* Tabs sit on a solid track so their labels stay readable over a photograph */
#view:has(>.app-heading)>.app-segments{background:color-mix(in srgb,var(--card) 94%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
#view:has(>.app-heading)>.app-segments button:not(.on){color:var(--ink);opacity:.74}
main:has(.tasbih-full) #view>.app-segments{background:#ffffff14}
main:has(.tasbih-full) #view>.app-segments button:not(.on){color:#e9e3cf;opacity:1}

/* ================= Build 14: brand kit and a continuous intro ================= */
.edition-wordmark.branded .brand-lockup{height:36px}
.tour-mark .brand-lockup{height:46px}
.setup-brand .brand-lockup{height:26px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Picture and words travel at different speeds, so the picture feels further away. */
.intro-tour .tour-slide,.intro-tour[dir=rtl] .tour-slide{opacity:1;translate:none;visibility:hidden;transition:visibility 0s .7s}
.intro-tour .tour-slide.on{visibility:visible;transition:none}
.intro-tour .tour-art{opacity:0;translate:74px 0;scale:1.05;transition:opacity .5s ease-out,translate .78s cubic-bezier(.2,.8,.2,1),scale .78s cubic-bezier(.2,.8,.2,1)}
.intro-tour .tour-slide.before .tour-art{translate:-46px 0;scale:.93}
.intro-tour .tour-slide.on .tour-art{opacity:1;translate:0 0;scale:1}
.intro-tour .tour-slide :is(h2,p){opacity:0;translate:28px 0;transition:opacity .42s ease-out,translate .62s cubic-bezier(.2,.8,.2,1)}
.intro-tour .tour-slide.before :is(h2,p){translate:-28px 0}
.intro-tour .tour-slide.on :is(h2,p){opacity:1;translate:0 0}
.intro-tour .tour-slide.on h2{transition-delay:.14s}.intro-tour .tour-slide.on p{transition-delay:.24s}
.intro-tour[dir=rtl] .tour-art{translate:-74px 0}.intro-tour[dir=rtl] .tour-slide.before .tour-art{translate:46px 0}
.intro-tour[dir=rtl] .tour-slide.on .tour-art{translate:0 0}
/* Screen 1: the photograph pushes in and the lockup settles */
.intro-tour .tour-slide.on .tour-sky .sky-photo{animation:tour-push 9s cubic-bezier(.2,.6,.2,1) both}
@keyframes tour-push{from{scale:1.16}to{scale:1}}
.intro-tour .tour-mark{opacity:0;translate:0 16px;transition:opacity .6s .35s,translate .8s .35s cubic-bezier(.2,.8,.2,1)}
.intro-tour .tour-slide.on .tour-mark{opacity:1;translate:0 0}
.intro-tour footer{animation:tour-foot .6s .5s cubic-bezier(.2,.8,.2,1) both}
@keyframes tour-foot{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
.intro-tour{box-shadow:0 30px 60px #000a}
@media(prefers-reduced-motion:reduce){.intro-tour .tour-art,.intro-tour .tour-slide :is(h2,p),.intro-tour .tour-mark{transition:none}.intro-tour .tour-slide.on .tour-sky .sky-photo,.intro-tour footer{animation:none}}

/* ================= Build 16: first run, one question per screen ================= */
.welcome{position:fixed;inset:0;z-index:96;overflow:hidden;background:#10231D;color:var(--ink);font-size:17px;--wl-ease:cubic-bezier(.2,.8,.2,1)}
.wl-screen{position:absolute;inset:0;display:flex;flex-direction:column;transform:translateY(100%);transition:transform .74s var(--wl-ease);will-change:transform;overflow:hidden}
.wl-screen.on{transform:none}
.wl-screen.past{transform:translateY(-100%)}
.wl-instant .wl-screen,.wl-dragging .wl-screen{transition:none}

/* 1. Hello */
.wl-hello{align-items:center;justify-content:center;color:#F5F0E4;background:#10231D;touch-action:none;text-align:center}
.sky.wl-sky{position:absolute;inset:0;top:0;left:0;width:100%;height:100%;translate:none;z-index:0;-webkit-mask:none;mask:none}
.sky.wl-sky .sky-fade{display:none}
.wl-hello .sky.wl-sky .sky-photo{background-image:url(art/intro.webp),url(medina-dusk.webp);background-position:center 30%}
.wl-hello .sky-scrim{background:linear-gradient(180deg,#10231dcc 0,#10231d99 38%,#10231de6 78%,#10231d 100%)}
.wl-hello .sky.wl-sky{opacity:0}
.wl-mark{position:relative;z-index:1;width:122px;height:122px;color:#F5F0E4;flex:none}
.wl-greet{position:relative;z-index:1;margin:26px 24px 0;min-height:104px;display:grid;place-items:center;opacity:0}
.wl-greet span{display:inline-block;font:400 clamp(46px,13vw,62px)/1.5 'Athkarz Quran',serif;color:#fff8e6;text-shadow:0 2px 24px #000a}
.wl-greet span.wl-latin{font:400 clamp(30px,8.4vw,40px)/1.25 Georgia,'Times New Roman',serif;letter-spacing:-.02em}
.wl-swipe{position:absolute;z-index:1;left:0;right:0;bottom:calc(34px + var(--sab));display:grid;justify-items:center;gap:10px;margin:0 auto;padding:14px;border:0;background:none;box-shadow:none;color:#F5F0E4;font-size:15px;font-weight:600;opacity:0;min-height:0}
.wl-swipe i{width:16px;height:16px;border-left:2px solid currentColor;border-top:2px solid currentColor;rotate:45deg;border-radius:2px;animation:wl-bob 1.8s ease-in-out infinite}
@keyframes wl-bob{0%,100%{translate:0 5px;opacity:.5}50%{translate:0 -5px;opacity:1}}
/* The launch does not cut: the mark is where the splash left it, then lifts as the photograph fades up. */
.wl-arrive .wl-hello .sky.wl-sky{animation:wl-photo 1.6s .35s ease-out forwards}
.wl-arrive .wl-hello .wl-mark{animation:wl-lift 1s .3s var(--wl-ease) both}
.wl-arrive .wl-greet{animation:wl-write 1.5s 1.05s cubic-bezier(.4,0,.2,1) forwards}
.wl-arrive .wl-swipe{animation:wl-fade .8s 2.5s ease-out forwards}
@keyframes wl-photo{to{opacity:1}}
@keyframes wl-lift{from{transform:translateY(64px) scale(1)}to{transform:translateY(0) scale(.72)}}
@keyframes wl-write{from{opacity:1;clip-path:inset(-20% 0 -20% 100%)}to{opacity:1;clip-path:inset(-20% 0 -20% 0)}}
@keyframes wl-fade{to{opacity:1}}

/* 2 to 5. One question each, on paper */
.wl-step{background:var(--bg);padding:max(14px,var(--sat)) 24px calc(26px + var(--sab));overflow-y:auto}
.wl-top{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:8px;min-height:44px;flex:none}
.wl-back{width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;border-radius:50%;border:1px solid var(--edition-edge);background:var(--card);color:var(--ink);box-shadow:none}
.wl-back svg{width:20px;height:20px}
[dir=rtl] .wl-back svg{scale:-1 1}
.wl-dots{display:flex;justify-content:center;gap:7px}
.wl-dots i{width:7px;height:7px;border-radius:9px;background:var(--line);transition:width .4s var(--wl-ease),background .4s}
.wl-dots i.on{width:24px;background:var(--accent)}
.wl-later{min-height:44px;padding:6px 4px;border:0;background:none;box-shadow:none;color:var(--muted);font-size:15px;font-weight:600}
.wl-art{position:relative;flex:1 1 0;min-height:150px;max-height:320px;margin:14px -24px 0;display:grid;place-items:center;overflow:hidden;translate:0 70px;opacity:0;transition:translate .95s var(--wl-ease),opacity .6s .1s}
.wl-screen.on .wl-art{translate:0 0;opacity:1}
.wl-art .spread-page{width:min(78%,300px);height:168px;rotate:-2deg}
.wl-art .spread-text{height:112px;font-size:19px}
.wl-caption{position:absolute;bottom:0;left:24px;right:24px;margin:0;text-align:center;font-size:14px;color:var(--muted)}
.wl-step h1{margin:22px 0 6px;font-size:clamp(30px,8.6vw,38px);line-height:1.08;letter-spacing:-.045em;font-weight:720;outline:0;flex:none}
[dir=rtl] .wl-step h1{letter-spacing:0;line-height:1.3}
.wl-sub{margin:0 0 4px;color:var(--muted);font-size:16px;line-height:1.5;flex:none}
.wl-rows{display:grid;gap:10px;margin-top:16px;flex:none}
.wl-rows button{display:flex;align-items:center;justify-content:space-between;min-height:62px;padding:14px 20px;border-radius:19px;border:1px solid var(--edition-edge);background:var(--card);color:var(--ink);font-size:20px;font-weight:620;box-shadow:none;text-align:start}
.wl-rows button i{width:24px;height:24px;border-radius:50%;border:1.5px solid var(--line);flex:none}
.wl-rows button[aria-checked=true]{border-color:var(--green);box-shadow:0 0 0 1.5px var(--green)}
.wl-rows button[aria-checked=true] i{border-color:var(--green);background:radial-gradient(circle,var(--green) 0 46%,#0000 52%)}
.wl-primary{flex:none;margin-top:18px;min-height:60px;border:0;border-radius:19px;background:var(--green);color:#fff;font-size:18px;font-weight:650;box-shadow:0 12px 24px #286d5733}
.wl-primary:disabled{opacity:.7}
.wl-link{flex:none;align-self:center;margin-top:6px;min-height:46px;padding:8px 12px;border:0;background:none;box-shadow:none;color:var(--green);font-size:16px;font-weight:650}
.wl-city{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:10px}
.wl-city input,.wl-name{min-height:58px;margin:0;padding:12px 18px;border-radius:17px;border:1px solid var(--edition-edge);background:var(--card);font-size:19px}
.wl-city button{min-height:58px;padding:0 20px;border-radius:17px;border:1px solid var(--edition-edge);background:var(--card);color:var(--green);font-weight:650;box-shadow:none}
.wl-name{flex:none;margin-top:16px;width:100%}
.wl-note{flex:none;min-height:22px;margin:8px 2px 0;font-size:14.5px;color:var(--muted)}
.wl-place{border-radius:0;color:#fffaf0}
.wl-place .sky.wl-sky .sky-photo{background-position:88% 62%}
.wl-place .sky-scrim{background:linear-gradient(180deg,#07130f59 0,#07130f00 40%,#07130f99 100%)}
.wl-next{position:absolute;z-index:1;left:24px;right:24px;bottom:18px;display:grid;gap:1px;text-shadow:0 1px 14px #000b}
.wl-next small{font-size:14px;opacity:.92}
.wl-next strong{font-size:clamp(28px,8vw,36px);letter-spacing:-.04em;line-height:1.1}
.wl-beads{background:radial-gradient(ellipse 80% 70% at 50% 50%,#2f6551,#143f33 55%,#10231d 90%);color:#fff5df}
.wl-beads .tasbih-stage{width:min(56vw,210px);--r:calc(min(56vw,210px) / 2 - 11px);margin:0}
.wl-beads .tasbih-ring{transition:transform .6s cubic-bezier(.2,1.2,.3,1)}
.wl-salam{position:relative;z-index:1;max-width:72%;font:400 clamp(19px,5.4vw,25px)/1.3 Georgia,serif;text-align:center;overflow-wrap:anywhere}
.wl-ready{align-items:center;justify-content:center;text-align:center}
.wl-ready .wl-mark{color:var(--green);width:96px;height:96px}
.wl-ready h1{margin-top:18px}
.wl-summary{list-style:none;margin:14px 0 16px;padding:0;display:grid;gap:2px;font-size:18px;font-weight:600}
.wl-summary li{padding:6px 0}
.wl-ready .wl-sub{max-width:20em}
.wl-ready .wl-primary{align-self:stretch;margin-top:26px}
@media(prefers-reduced-motion:reduce){.wl-screen,.wl-art{transition:none}.wl-arrive .wl-hello .sky.wl-sky,.wl-greet,.wl-swipe{animation:none;opacity:1}.wl-arrive .wl-hello .wl-mark{animation:none;transform:scale(.72)}.wl-swipe i{animation:none}}

/* ================= Build 17: every phone, tablet and orientation ================= */
/* 1. Nothing behind the app is ever white. If any device leaves a strip uncovered, it is Evergreen. */
html{background:#10231d!important}
/* 2. Installed iPhone web apps can report a viewport shorter than the screen, leaving a gap at
      the bottom. Size the shell and every full-screen layer from the viewport height, not from
      "bottom: 0". */
html{height:var(--app-h,100dvh)}
body{bottom:auto;height:var(--app-h,100dvh)}
.welcome,.intro-tour,.setup,#intro.entry-splash,.book-stage,.curl-stage,.motion-burst{bottom:auto;height:var(--app-h,100dvh)}
/* 3. Wide screens: the page scroller spans the screen so photographs can reach both edges;
      the content column keeps its comfortable width. */
main{max-width:none}
#view{max-width:var(--edition-width,1000px);margin-inline:auto}
body:has(.tasbih-full){background:#091f19}

/* 4. Photographic headers begin exactly at the top of the screen (measured in illumination.js). */
#view>.sky,#view>.sky[data-phase]{top:calc(-1 * var(--view-top,28px))}
#view:has(>.app-heading)::before{top:calc(-1 * var(--view-top,28px))}

/* 5. Today scales with the width of the phone instead of assuming one size. */
#view[data-screen=Home]{--hero-h:clamp(430px,123vw,640px)}
#view>.sky,#view>.sky[data-phase]{height:var(--hero-h,484px)}
#view[data-screen=Home] .edition-hero.cine .edition-welcome{min-height:calc(var(--hero-h,484px) - 162px)}
@media(min-width:700px){#view[data-screen=Home]{--hero-h:clamp(520px,62vw,700px)}#view>.sky .sky-photo{background-position:100% 62%}}
@media(orientation:landscape) and (max-height:520px){#view[data-screen=Home]{--hero-h:330px}#view>.sky .sky-photo{background-position:100% 66%}}

/* 6. First run: the picture takes the spare height and the controls sit within reach of the thumb,
      on a 4-inch phone and a 6.9-inch one alike. */
.wl-step{padding:max(14px,calc(var(--sat) + 6px)) max(24px,env(safe-area-inset-left)) calc(22px + var(--sab)) max(24px,env(safe-area-inset-right))}
.wl-art{flex:1 1 auto;max-height:none;min-height:124px}
.wl-step>:is(.wl-top,h1,.wl-sub,.wl-rows,.wl-primary,.wl-link,.wl-city,.wl-name,.wl-note,.wl-summary){width:100%;max-width:520px;margin-inline:auto}
.wl-step>.wl-link{width:auto}
.wl-art .spread-page{height:clamp(128px,22vh,200px)}
.wl-art .spread-text{height:clamp(74px,14vh,140px)}
.wl-beads .tasbih-stage{width:min(56vw,34vh,260px);--r:calc(min(56vw,34vh,260px) / 2 - 11px)}
.wl-swipe{bottom:calc(30px + var(--sab))}
.wl-mark{width:clamp(88px,31vw,140px);height:clamp(88px,31vw,140px)}
@media(max-height:700px){.wl-step h1{font-size:28px;margin-top:14px}.wl-rows{gap:8px;margin-top:12px}.wl-rows button{min-height:54px;font-size:18px}.wl-primary{min-height:54px;margin-top:14px}.wl-art{min-height:104px;margin-top:8px}.wl-greet{min-height:84px;margin-top:14px}}
@media(max-height:480px){.wl-art{display:none}.wl-mark{width:72px;height:72px}.wl-greet{min-height:64px;margin-top:6px}.wl-greet span{font-size:38px}.wl-ready .wl-mark{display:none}}
@media(min-width:700px){.wl-art{margin-inline:calc(50% - 50vw)}.wl-hello .wl-greet span{font-size:76px}.wl-hello .wl-greet span.wl-latin{font-size:50px}}
.app-device{margin:2px 0 0;text-align:center;font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}

/* 7. The white bar at the top. The scroller used to begin below the status bar, so the strip
      behind the clock showed the pale page. It now begins at the very top of the screen and pads
      its content down instead, so photographs reach the top edge on every phone. */
main{top:0!important;padding-top:calc(var(--safe-top,0px) + 14px)!important}
/* 8. Narrow phones (320 to 350 points wide) */
/* With three header buttons (search, Qibla, settings) the lockup and buttons step down on every phone under 390 points,
   which covers most Android phones (360 to 384). */
@media(max-width:389px){
  .edition-wordmark.branded .brand-lockup{height:27px}
  .edition-mast .glass-icon{width:40px;height:40px;min-height:40px}
}
.edition-wordmark{min-width:0}
@media(max-width:350px){
  .edition-times.times-main{padding:5px 3px;gap:1px}
  .edition-times.times-main b{font-size:12.5px}
  .edition-times.times-main small{font-size:10.5px;letter-spacing:-.03em;white-space:nowrap}
  .edition-times.times-main svg{width:21px;height:21px}
  .edition-times.times-main button{min-height:84px}
  .today-meta{flex-wrap:wrap;gap:2px 10px}
  .spread-foot{grid-template-columns:1fr 1fr}.spread-foot>div{grid-column:1/-1}
  .tasbih-full .tasbih-stage{width:min(86vw,300px);--r:calc(min(86vw,300px) / 2 - 11px)}
}

/* 9. Header photographs live directly in the scroller, pinned to its top edge. Nothing is
      measured, so nothing can drift on a device with an unusual status bar or text size. */
main{isolation:isolate}
#view,#view[data-screen=Home],#view[data-sky]{position:static;isolation:auto}
main>.sky,main>.sky[data-phase]{position:absolute;z-index:-1;top:0;left:0;width:100%;translate:none;height:clamp(430px,123vw,640px)}
main>.sky[hidden],.tab-art[hidden]{display:none}
#view[data-screen=Home] .edition-hero.cine .edition-welcome{min-height:calc(clamp(430px,123vw,640px) - 164px - var(--safe-top,0px))}
@media(min-width:700px){main>.sky,main>.sky[data-phase]{height:clamp(520px,62vw,700px)}main>.sky .sky-photo{background-position:100% 62%}#view[data-screen=Home] .edition-hero.cine .edition-welcome{min-height:calc(clamp(520px,62vw,700px) - 190px - var(--safe-top,0px))}}
@media(orientation:landscape) and (max-height:520px){main>.sky,main>.sky[data-phase]{height:330px}main>.sky .sky-photo{background-position:100% 66%}#view[data-screen=Home] .edition-hero.cine .edition-welcome{min-height:150px}}
#view:has(>.app-heading)::before{content:none}
.tab-art{position:absolute;z-index:-1;top:0;left:0;width:100%;height:calc(210px + var(--safe-top,0px));pointer-events:none;background:linear-gradient(180deg,#07130f99 0,#07130f33 40%,#07130f4d 100%),linear-gradient(90deg,#07130f99,#07130f00 60%),var(--tab-art,none),#10231d;background-size:cover;background-position:84% 44%;-webkit-mask:linear-gradient(180deg,#000 54%,#0000 100%);mask:linear-gradient(180deg,#000 54%,#0000 100%)}
.tab-art[data-screen=Worship]{--tab-art:url(art/prayer.webp),url(makkah-dusk.webp)}
.tab-art[data-screen=Stories]{--tab-art:url(art/read.webp),url(quran-cover.webp)}
.tab-art[data-screen=Dhikr]{--tab-art:url(art/dhikr.webp)}
.tab-art[data-screen=You]{--tab-art:url(art/you.webp)}
/* The tasbih scene spans the screen exactly, whatever the side padding is on this device. */
.tasbih-scene.tasbih-full{margin-inline:calc(50% - 50vw);width:100vw;max-width:100vw}

/* 10. Phone on its side: the wide-screen greeting size must not win on a short screen. */
@media(max-height:480px){.wl-hello{justify-content:flex-start;padding-top:calc(var(--safe-top,0px) + 20px)}.wl-hello .wl-mark{width:60px;height:60px}.wl-hello .wl-greet{min-height:60px;margin-top:4px}.wl-hello .wl-greet span{font-size:38px}.wl-hello .wl-greet span.wl-latin{font-size:28px}.wl-swipe{bottom:calc(6px + var(--sab));gap:6px;padding:8px;font-size:14px}}

/* 11. Reader bars (Mushaf and surah reader). The scroller already clears the status bar, so the bar must not add
   the notch height a second time. A page-coloured backing keeps the text from running through the title. */
.mushaf-chrome{top:0!important}
body:has(.mushaf-chrome) main,body:has(.mushaf-chrome) #view,.mushaf-view,.quran-reader,.mushaf-chrome{background-color:var(--page-bg,inherit)}
/*band*/.mushaf-chrome::before{content:"";position:absolute;z-index:-1;inset:-14px calc(-1 * max(clamp(16px,4.5vw,42px),env(safe-area-inset-left),env(safe-area-inset-right))) -10px;background:inherit;-webkit-mask:linear-gradient(#000 78%,#0000);mask:linear-gradient(#000 78%,#0000);pointer-events:none}
/* 12. Qada planner: the browser's built-in dialog max-width left a strip down one side. */
@media(max-width:720px){.estimate-dialog{max-width:none;width:100%;height:var(--app-h,100dvh);max-height:none}}
/* 13. The ayah card tilts in before it is revealed; keep that tilt from widening the page. */
.ayah-day{overflow-x:clip}
.mushaf-view .mushaf-chrome::before{inset-inline:calc(-1 * clamp(12px,3.6vw,35px))}
/* 14. Sheets and pop-ups size from the real screen height, so they cannot grow past a short screen. */
.reading-sheet{max-height:calc(var(--app-h,100dvh) - var(--safe-top,0px) - 40px)}
.ayah-finder{max-height:calc(var(--app-h,100dvh) - var(--sat,0px) - var(--sab,0px) - 24px)}
/* 15. Pale full-screen layers get the same dark strip behind the clock, so the white status text stays readable. */
@media(max-width:720px){.estimate-dialog::before{content:"";position:absolute;z-index:3;inset:0 0 auto;height:var(--safe-top,0px);background:#10231d;pointer-events:none}}
.welcome::after{content:"";position:absolute;z-index:20;inset:0 0 auto;height:var(--sat,0px);background:#10231d;pointer-events:none;opacity:0;transition:opacity .35s}
.welcome:has(.wl-step.on)::after{opacity:1}
/* 16. iPhone home-screen app reported shorter than the screen (see fit-height.js). The page is made the true height
   in entry-paint.js; if "pinned to the bottom" still lands short, bottom bars and sheets move down by the difference. */
html[data-fit=shift] :is(.mushaf-dock,#studio-mini,.adhan-fallback,.mushaf-selection,.reading-sheet,#prayerDialog){translate:0 var(--fix-b,0px)}
html[data-fit=shift] dialog::backdrop{bottom:-90px}
/* 17. Newer iOS tints the status bar (and the text colour in it) from the body's background colour. A cream body
   gave a pale haze with black text over the top of the app. The body is now Evergreen for iOS to sample, and the
   page colour is painted by a layer just above it, so nothing looks different. */
html[data-entry=app] body{--page-bg:var(--entry-surface,#f1f0e9);background-color:#10231d!important}
html[data-entry=app] body:has(.mushaf-view[data-paper=day]){--page-bg:#f7f7f3}
html[data-entry=app] body.dark:has(.mushaf-view[data-paper=day]){--page-bg:#171d19}
html[data-entry=app] body::before{content:"";position:absolute;inset:0;z-index:-1;background-color:var(--page-bg);background-image:inherit;pointer-events:none}
/* 18. The line that says which prayer-time calculation is in use. */
.method-line{margin:6px 0 0;font-size:13px;line-height:1.4;color:color-mix(in srgb,var(--ink) 62%,transparent)}
/* 19. App feel (feel.js). Press: whatever a finger lands on dips at once and springs back on release. */
:where(button,a,summary,[role=button],[role=tab],[role=option],[onclick],label){transition:scale .34s cubic-bezier(.3,1.45,.5,1),filter .3s ease}
.pressing{scale:var(--press,.96)!important;filter:brightness(.93)!important;transition:scale .08s ease-out,filter .08s ease-out!important}
body.dark .pressing{filter:brightness(1.18)!important}
/* The outgoing screen is a copy that only animates away: nothing in it moves on its own or takes a tap. */
main.feel-ghost{z-index:2;contain:layout paint;will-change:transform,opacity}
main.feel-ghost *,.feel-leaving,.feel-leaving *{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.pressing{scale:1!important}}
/* 20. "Update when I travel" switch in Prayer, Times. */
.follow-row{display:flex;align-items:flex-start;gap:12px;margin:14px 0 4px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);border-radius:16px;cursor:pointer}
.follow-row input{flex:none;margin-top:2px}
.follow-row span{display:grid;gap:2px;min-width:0}
.follow-row b{font-size:15px;font-weight:650}
.follow-row small{font-size:13px;line-height:1.4;color:color-mix(in srgb,var(--ink) 62%,transparent)}
/* 21. What's new card: one sheet, the mark on Evergreen, five plain lines. */
dialog.whats-new{width:min(100% - 28px,440px);max-width:none;max-height:calc(var(--app-h,100dvh) - var(--sat,0px) - var(--sab,0px) - 40px);padding:0;border:0;border-radius:28px;overflow:hidden;background:#F5F0E4;color:#18201D;box-shadow:0 30px 80px #0009}
dialog.whats-new[open]{display:flex;flex-direction:column}
dialog.whats-new::backdrop{background:#10231dcc;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.wn-head{display:flex;align-items:center;gap:14px;padding:22px 22px 20px;background:#10231D;color:#F5F0E4}
.wn-head img{width:38px;height:38px;flex:none}
.wn-head h2{margin:0;font:650 22px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:-.02em;color:#F5F0E4}
.whats-new[dir=rtl] .wn-head h2{font:400 26px/1.4 'Athkarz Quran',serif;letter-spacing:0}
.wn-list{list-style:none;margin:0;padding:6px 22px 4px;overflow-y:auto;counter-reset:none}
.wn-list li{display:grid;gap:3px;padding:14px 0;border-bottom:1px solid #a7804d33}
.wn-list li:last-child{border-bottom:0}
.wn-list b{font-size:16px;font-weight:650;color:#18201D}
.wn-list span{font-size:14.5px;line-height:1.5;color:#18201dbf}
.whats-new .wn-done{flex:none;margin:8px 22px calc(18px + 0px);min-height:54px;border:0;border-radius:18px;background:#286D57;color:#F5F0E4;font-size:17px;font-weight:650}
/* 22. Header photographs fade out gradually on every page instead of ending on a line. */
.tab-art{height:calc(250px + var(--safe-top,0px));-webkit-mask:linear-gradient(180deg,#000 0,#000 32%,rgba(0,0,0,.74) 50%,rgba(0,0,0,.38) 70%,rgba(0,0,0,.12) 87%,#0000 100%);mask:linear-gradient(180deg,#000 0,#000 32%,rgba(0,0,0,.74) 50%,rgba(0,0,0,.38) 70%,rgba(0,0,0,.12) 87%,#0000 100%)}
/* The Dhikr counter scene began with a hard line across the photo: the page behind it is now the scene's own edge
   colour and the scene fades in from the top, so the photograph runs into it. */
html[data-entry=app] body:has(.tasbih-full){--page-bg:#091f19}
.tasbih-scene.tasbih-full{background:none}
.tasbih-scene.tasbih-full::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 90% 60% at 50% 48%,#3a6f57,#143f33 46%,#091f19 78%);-webkit-mask:linear-gradient(180deg,#0000 0,rgba(0,0,0,.5) 80px,#000 170px);mask:linear-gradient(180deg,#0000 0,rgba(0,0,0,.5) 80px,#000 170px)}
/* 23. Qibla: one instrument on a dark face. */
.qibla-open svg{width:23px;height:23px}
dialog.qibla-screen{inset:0;width:100vw;max-width:none;height:var(--app-h,100dvh);max-height:none;margin:0;border:0;padding:calc(var(--sat,0px) + 10px) 20px calc(var(--sab,0px) + 22px);box-sizing:border-box;overflow:hidden;color:#F5F0E4;background:radial-gradient(ellipse 120% 70% at 50% 44%,#1d4a3c 0,#10231D 62%,#0a1813 100%);transition:background-color .5s}
dialog.qibla-screen[open]{display:flex;flex-direction:column;align-items:center}
dialog.qibla-screen::backdrop{background:#0a1813}
.q-head{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;width:100%;text-align:center;flex:none}
.q-head h2{margin:0;font:650 20px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#F5F0E4}
.qibla-screen[dir=rtl] .q-head h2{font:400 26px/1.3 'Athkarz Quran',serif}
.q-head p{margin:2px 0 0;font-size:14px;color:#f5f0e4a6;min-height:1.3em}
.qibla-screen .q-close{width:44px;height:44px;min-height:0;padding:0;border:1px solid #f5f0e426;border-radius:50%;background:#f5f0e414;color:#F5F0E4;display:grid;place-items:center}
.q-close svg{width:20px;height:20px}
.q-stage{position:relative;flex:1 1 auto;min-height:0;width:100%;display:grid;place-items:center}
.q-dial{width:min(84vw,calc(var(--app-h,100dvh) * .48),440px);height:auto;aspect-ratio:1;will-change:rotate;overflow:visible}
.q-ring{fill:none;stroke:#f5f0e41f;stroke-width:1.5;transition:stroke .4s}
.q-ticks line{stroke:#f5f0e447;stroke-width:1.2;stroke-linecap:round}
.q-ticks .q-mid{stroke:#f5f0e480}.q-ticks .q-major{stroke:#F5F0E4;stroke-width:2}
.q-letters text{fill:#f5f0e4b3;font:600 17px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;text-anchor:middle}
.q-letters .q-north{fill:#d9b36c}
.q-beam{stroke:#d9b36c;stroke-width:1.4;stroke-dasharray:2 6;opacity:.55}
.q-cube{fill:#0a0f0d;stroke:#d9b36c;stroke-width:1.6}.q-band{stroke:#d9b36c;stroke-width:2.4}
.q-notch{position:absolute;top:calc(50% - min(84vw,calc(var(--app-h,100dvh) * .48),440px) / 2 - 18px);left:50%;translate:-50% 0;width:0;height:0;border-inline:9px solid transparent;border-top:13px solid #F5F0E4;transition:border-top-color .4s}
.q-centre{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:2px;pointer-events:none}
.q-centre strong{font:500 clamp(46px,15vw,72px)/1 Georgia,'Times New Roman',serif;letter-spacing:-.02em;color:#F5F0E4;font-variant-numeric:tabular-nums}
.q-centre small{font-size:13px;color:#f5f0e48c}
.q-status{flex:none;margin:6px 0 0;font:650 22px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;text-align:center;font-variant-numeric:tabular-nums;color:#F5F0E4;transition:color .4s}
.q-hint{flex:none;margin:6px 0 0;font-size:14px;text-align:center;color:#f5f0e4a6;max-width:30ch}
.q-facts{flex:none;margin:10px 0 0;font-size:14px;color:#f5f0e48c;text-align:center;min-height:1.4em}
.qibla-screen :is(.q-start,.q-locate){flex:none;margin-top:16px;min-height:52px;padding:0 26px;border:0;border-radius:18px;background:#F5F0E4;color:#10231D;font-size:16px;font-weight:650}
.qibla-screen.is-aligned{background-color:#1d4a3c}
.is-aligned .q-ring{stroke:#d9b36c;stroke-width:3;filter:drop-shadow(0 0 14px #d9b36c99)}
.is-aligned .q-notch{border-top-color:#d9b36c}
.is-aligned .q-status{color:#e9c98a}
.is-aligned .q-beam{opacity:1;stroke-dasharray:none;stroke-width:2}
.is-aligned .q-cube{filter:drop-shadow(0 0 10px #d9b36c)}
@media(max-height:560px){.q-facts{display:none}.q-status{font-size:19px}}
/* 24. No rubber-band at the top or bottom of a screen: pulling down used to drag the page, photo included, away
   from the top edge. If a phone bounces anyway, what shows above the photo is Evergreen, not the pale page. */
main{overscroll-behavior-y:none}
main:is(:has(>.tab-art:not([hidden])),:has(>.sky:not([hidden])))::before{content:"";position:absolute;z-index:-1;left:0;right:0;top:-700px;height:700px;background:#10231d;pointer-events:none}
