/* Noor — same design language as Saria Brain (paper, soft blurred colour field, frosted glass, Thmanyah). */
@font-face { font-family: "Thmanyah Serif Display"; src: url("/assets/fonts/thmanyahserifdisplay-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("/assets/fonts/thmanyahserifdisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/thmanyahsans-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/thmanyahsans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/thmanyahsans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Thmanyah Sans"; src: url("/assets/fonts/thmanyahsans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/assets/fonts/hanken-grotesk-variable.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "QPC BSML"; src: url("/fonts/qpc2/bsml.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Surah Names"; src: url("/fonts/surahs.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "KFGQPC Hafs"; src: url("/fonts/hafs.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Uthman Naskh"; src: url("/fonts/naskh.woff2") format("woff2"); font-display: swap; }

:root {
  --paper: #F6F4F1; --ink: #0b0b0b; --ink-2: #2b2723; --mute: #55514a; --faint: #9a958c; --accent: #2c4357;
  --line: rgba(11,11,11,.08); --line-2: rgba(11,11,11,.16);
  --glass: rgba(255,255,255,.5); --glass-strong: rgba(255,255,255,.8); --glass-edge: rgba(255,255,255,.78); --glass-solid: rgba(252,251,249,.94);
  --blur: blur(18px) saturate(1.6);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 14px 34px -22px rgba(52,58,74,.42);
  --field: radial-gradient(62% 34% at 6% 4%, rgba(170,196,228,.5), transparent 72%),
    radial-gradient(46% 30% at 98% 16%, rgba(120,182,132,.32), transparent 72%),
    radial-gradient(54% 30% at 92% 64%, rgba(214,222,150,.38), transparent 72%),
    radial-gradient(40% 24% at 4% 56%, rgba(249,128,98,.16), transparent 72%),
    radial-gradient(72% 34% at 36% 102%, rgba(184,206,232,.46), transparent 72%), var(--paper);
  --f-ar-display: "Thmanyah Serif Display", "Geeza Pro", "Noto Naskh Arabic", serif;
  --f-ar: "Thmanyah Sans", "Geeza Pro", "Noto Sans Arabic", sans-serif;
  --f-num: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --f-dua: "Uthman Naskh", "KFGQPC Hafs", "Geeza Pro", serif;
  --pad: 16px; --hd-h: 56px; --tb-h: 70px; --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
  --e-std: cubic-bezier(.4,0,.1,1); --e-out: cubic-bezier(.22,1,.36,1);
  --green: #24766f; --green-soft: rgba(120,196,188,.28); --coral: #F95C4B; --pear: #E1E5AC; --mist: #DBE3E9;
  --pin: rgba(240,205,120,.55); --pin-strong: rgba(236,186,72,.75);
  --page: #FBF6EC; --page-ink: #221d16;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
html, body { margin: 0; height: 100%; }
body { color: var(--ink); font: 400 16px/1.6 var(--f-ar); -webkit-font-smoothing: antialiased; overscroll-behavior: none; overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--field); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

/* surfaces */
.glass, .card, .row, .glass-btn, .pill-btn, .seg, .sheet-card, .player, .toast, .chip { background-color: var(--glass-solid); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .card, .row, .glass-btn, .pill-btn, .seg, .player, .chip { background-color: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
}
.glass, .card, .row, .glass-btn, .pill-btn, .player { box-shadow: var(--glass-shadow); border: 1px solid var(--glass-edge); }

/* shell */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 680px; margin: 0 auto; }
.hd { flex: none; height: calc(var(--hd-h) + var(--safe-t)); padding: var(--safe-t) var(--pad) 0; display: flex; align-items: center; gap: 10px; position: relative; z-index: 5; }
.hd .titles { flex: 1; min-width: 0; }
.hd h1 { margin: 0; font: 900 22px/1.1 var(--f-ar-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd .sub { display: flex; align-items: center; gap: 4px; font: 500 12.5px/1.4 var(--f-ar); color: var(--mute); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd .sub .ic { width: 13px; height: 13px; }
.logo { display: block; width: 84px; aspect-ratio: 4708 / 1747; background: var(--ink); -webkit-mask: url("/assets/brand/saria-space-logo.svg") center / contain no-repeat; mask: url("/assets/brand/saria-space-logo.svg") center / contain no-repeat; }
.wordmark { display: block; height: 34px; width: auto; flex: none; padding-inline-end: 10px; margin-inline-end: 2px; border-inline-end: 1px solid var(--line-2); }
.hd h1 { font-size: 19px; }
.glass-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.glass-btn .ic { width: 20px; height: 20px; }
.pill-btn { height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font: 500 14px/1 var(--f-ar); flex: none; }
.pill-btn .ic { width: 18px; height: 18px; }
.pill-btn:disabled { opacity: .4; }
main { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) calc(var(--tb-h) + var(--safe-b) + 34px); animation: view-in .42s var(--e-out) both; }
.view.flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

/* tab bar */
.tb { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 680px; height: calc(var(--tb-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: 1fr 1fr 92px 1fr 1fr; border-top: 1px solid rgba(255,255,255,.9); box-shadow: 0 -10px 30px -24px rgba(52,58,74,.5); background: var(--glass-solid); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .tb { background: rgba(252,251,249,.72); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); } }
.tb-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tb-h); color: var(--mute); font: 500 11px/1.2 var(--f-ar); }
.tb-item .ic { width: 24px; height: 24px; color: var(--faint); transition: color .2s var(--e-std); }
.tb-item::after { content: ""; width: 4px; height: 4px; border-radius: 50%; margin-top: 1px; }
.tb-item[aria-current="page"] { color: var(--ink); }
.tb-item[aria-current="page"] .ic { color: var(--ink); }
.tb-item[aria-current="page"]::after { background: var(--ink); }
.fab-slot { display: grid; place-items: center; height: var(--tb-h); }
.fab { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); transform: translateY(-20px); background: var(--glass-strong); box-shadow: inset 0 1px 0 #fff, 0 0 0 6px rgba(255,255,255,.35), 0 18px 34px -16px rgba(52,58,74,.55); transition: transform .25s var(--e-out); position: relative; }
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: translateY(-20px) scale(.94); }
.fab[aria-current="page"] { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 6px rgba(255,255,255,.35), 0 18px 34px -16px rgba(52,58,74,.55); }
.fab-label { position: absolute; bottom: -18px; font: 500 11px/1 var(--f-ar); color: var(--mute); white-space: nowrap; }
.fab[aria-current="page"] .fab-label { color: var(--ink); }

/* type */
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.sec-h h2 { margin: 0; font: 900 22px/1.15 var(--f-ar-display); }
.sec-h .link { font: 500 14px/1.6 var(--f-ar); color: var(--mute); }
.muted { color: var(--mute); }
.small { font-size: 13px; }

/* cards */
.card { border-radius: 30px; padding: 20px; position: relative; overflow: hidden; }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0; font: 900 21px/1.2 var(--f-ar-display); }
.card p { margin: 6px 0 0; }
.card .k { font: 500 12.5px/1.4 var(--f-ar); color: var(--mute); }
.go { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.78); box-shadow: inset 0 1px 0 #fff, 0 6px 16px -10px rgba(52,58,74,.5); flex: none; }
.go .ic { width: 20px; height: 20px; }
.btn-primary { height: 54px; border-radius: 999px; font: 500 16.5px/1 var(--f-ar); display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--glass-strong); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255,255,255,.9), 0 16px 30px -18px rgba(52,58,74,.55); }
.btn-primary.dark { background: var(--glass-strong); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink), 0 16px 30px -18px rgba(52,58,74,.55); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { height: 44px; padding: 0 14px; border-radius: 999px; font: 500 14px/1 var(--f-ar); color: var(--mute); display: inline-flex; align-items: center; gap: 6px; }
.row { border-radius: 22px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; }
.row + .row { margin-top: 8px; }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font: 500 16px/1.35 var(--f-ar); }
.row .t small { display: block; font: 400 12.5px/1.4 var(--f-ar); color: var(--mute); }
.badge { min-width: 36px; height: 36px; padding: 0 6px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); font: 500 14px/1 var(--f-num); box-shadow: inset 0 1px 0 #fff; flex: none; }
.seg { display: inline-flex; border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { height: 36px; padding: 0 18px; border-radius: 999px; font: 500 14px/1 var(--f-ar); color: var(--mute); border: 1px solid transparent; }
.seg button[aria-pressed="true"] { color: var(--ink); background: var(--glass-strong); border-color: rgba(255,255,255,.9); box-shadow: 0 6px 14px -8px rgba(52,58,74,.45); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; font: 500 12.5px/1 var(--f-ar); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.search { width: 100%; height: 46px; border-radius: 999px; border: 1px solid var(--glass-edge); background: var(--glass-strong); padding: 0 18px; font: 400 15px var(--f-ar); color: var(--ink); outline: none; box-shadow: var(--glass-shadow); }

/* home */
.hero-noor { position: relative; text-align: center; padding: 18px 6px 6px; }
.hero-noor img { position: relative; width: min(60%, 270px); height: auto; display: block; margin: 0 auto; }
.hero-noor .rays { position: absolute; left: 50%; top: -40px; width: 260px; height: 200px; transform: translateX(-50%); pointer-events: none;
  background: conic-gradient(from 160deg at 50% 0%, transparent 0deg, rgba(255,255,255,.75) 8deg, transparent 16deg, transparent 22deg, rgba(255,255,255,.6) 28deg, transparent 36deg, transparent 42deg, rgba(255,246,214,.7) 48deg, transparent 56deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent); filter: blur(4px); opacity: .9; }
.hero-noor .sub { position: relative; margin-top: 4px; font: 400 18px/1.9 "KFGQPC Hafs", var(--f-dua); color: #2b2723; }
.hero-noor .date { position: relative; margin-top: 4px; font: 500 12.5px/1.5 var(--f-ar); color: var(--mute); }
.hello { padding: 10px 2px 4px; }
.hello h2 { margin: 0; font: 900 30px/1.15 var(--f-ar-display); }
.hello .date { margin-top: 6px; font: 500 13.5px/1.5 var(--f-ar); color: var(--mute); }
.next-prayer { display: flex; align-items: center; gap: 14px; }
.next-prayer .when { font: 300 30px/1 var(--f-num); }
.msg { background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.45)); }
.msg .body { margin-top: 10px; font: 500 19px/1.75 var(--f-ar); white-space: pre-line; }
.msg .sig { margin-top: 12px; font: 500 12px/1 var(--f-ar); color: var(--mute); }
.baq-progress { height: 10px; border-radius: 99px; background: rgba(11,11,11,.07); overflow: hidden; margin: 14px 0 8px; }
.baq-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #78c4bc, var(--green)); }
.dots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(11,11,11,.08); display: block; }
.dots i.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dots.juz { gap: 5px; }
.dots.juz i { width: 10px; height: 10px; }
.dots i.done { background: #E9B949; box-shadow: 0 0 0 3px rgba(233,185,73,.25); }
.split { display: flex; align-items: center; gap: 12px; }
.split .grow { flex: 1; min-width: 0; }
.art { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: rgba(255,255,255,.75); box-shadow: inset 0 1px 0 #fff, 0 10px 22px -14px rgba(52,58,74,.5); flex: none; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.sadaqa { background: linear-gradient(135deg, rgba(249,92,75,.10), rgba(255,255,255,.55)); }

/* mushaf */
.player { margin: 4px var(--pad) 8px; border-radius: 24px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; flex: none; }
.player .play { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); color: var(--ink); flex: none; box-shadow: inset 0 0 0 1.5px var(--ink), 0 8px 18px -10px rgba(52,58,74,.5); }
.player .play .ic { width: 20px; height: 20px; }
.player .skip { width: 36px; height: 36px; display: grid; place-items: center; color: var(--mute); flex: none; }
.player .skip .ic { width: 26px; height: 26px; }
.player .info { flex: 1; min-width: 0; }
.player .ttl { font: 500 14px/1.3 var(--f-ar); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .ttl span { color: var(--mute); }
.player input[type=range] { width: 100%; margin: 4px 0 0; accent-color: var(--ink); height: 18px; }
.player .times { display: flex; justify-content: space-between; font: 400 11px/1 var(--f-num); color: var(--mute); }
.player .times .chipx { color: var(--green); font-family: var(--f-ar); font-weight: 500; }
.player .add { flex: 1; display: flex; align-items: center; gap: 12px; text-align: start; padding: 2px; }
.player .add b { display: block; font: 500 15px/1.3 var(--f-ar); }
.player .add small { color: var(--mute); font-size: 12.5px; }
.player.mini { position: fixed; z-index: 19; left: 50%; transform: translateX(-50%); bottom: calc(var(--tb-h) + var(--safe-b) + 10px); width: calc(100% - 2 * var(--pad)); max-width: 640px; margin: 0; padding: 6px 10px; }
.player.mini .play { width: 38px; height: 38px; }
.player.mini .skip, .player.mini input, .player.mini .times { display: none; }

.pager { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pager::-webkit-scrollbar { display: none; }
.mpage { flex: 0 0 100%; width: 100%; height: 100%; overflow-y: auto; scroll-snap-align: start; scroll-snap-stop: always; padding: 2px 10px calc(var(--tb-h) + var(--safe-b) + 24px); position: relative; overscroll-behavior-y: contain; }
.reader .mpage { padding-bottom: calc(var(--safe-b) + 24px); }
.sheetpage { background: var(--page); color: var(--page-ink); border-radius: 26px; padding: 12px 12px 10px; box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -30px rgba(52,58,74,.55); border: 1px solid rgba(255,255,255,.9); position: relative; min-height: calc(100% - 4px); }
.sheetpage::before { content: ""; position: absolute; inset: 6px; border-radius: 21px; border: 1px solid rgba(174,134,56,.30); pointer-events: none; }
.mhead { display: flex; justify-content: space-between; font: 500 11.5px/1 var(--f-ar); color: var(--mute); padding: 6px 10px 10px; }
.mlines { padding: 0 4px; }
.mline { display: flex; justify-content: space-between; align-items: center; white-space: nowrap; height: 1.86em; }
.mline.c { justify-content: center; gap: .22em; }
.mline .w { border-radius: .22em; transition: background-color .2s; cursor: pointer; padding: 0 .02em; }
.mline .w.pin { background: var(--pin); }
.mline .w.flash { animation: wflash 1.8s ease; }
@keyframes wflash { 0%,100% { background: var(--pin); } 25%,60% { background: var(--pin-strong); } }
.mhdr { height: 1.86em; display: grid; place-items: center; position: relative; }
.mhdr .frame { position: absolute; inset: .18em 0; border-radius: .5em; border: 1px solid rgba(174,134,56,.45); background: linear-gradient(90deg, transparent, rgba(120,196,188,.16), transparent); }
.mhdr .nm { position: relative; font-family: "Surah Names"; font-size: 1.5em; line-height: 1; color: var(--green); }
.mbsml { height: 1.86em; display: grid; place-items: center; font-family: "QPC BSML"; }
.mfoot { display: flex; justify-content: center; padding-top: 8px; }
.mfoot span { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(174,134,56,.4); font: 500 12px/1 var(--f-num); color: var(--mute); }
.mload { height: 60vh; display: grid; place-items: center; color: var(--faint); }
.endcard { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 30px 18px; }
.endcard .big { font: 900 30px/1.3 var(--f-ar-display); }

/* adhkar */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat { border-radius: 30px; padding: 18px 16px 16px; min-height: 178px; display: flex; flex-direction: column; text-align: start; position: relative; overflow: hidden; }
.cat .art { width: 58px; height: 58px; font-size: 28px; }
.cat b { margin-top: auto; font: 900 20px/1.2 var(--f-ar-display); }
.cat small { margin-top: 4px; font: 500 12.5px/1.4 var(--f-ar); color: var(--mute); }
.cat .ring { position: absolute; top: 16px; inset-inline-end: 16px; }
.cat.morning { background: linear-gradient(160deg, rgba(225,229,172,.75), rgba(255,255,255,.5)); }
.cat.evening { background: linear-gradient(160deg, rgba(170,196,228,.7), rgba(255,255,255,.5)); }
.cat.duas { background: linear-gradient(160deg, rgba(120,196,188,.45), rgba(255,255,255,.5)); }
.cat.ruqyah { background: linear-gradient(160deg, rgba(249,128,98,.25), rgba(255,255,255,.5)); }

.flow { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; max-width: 680px; margin: 0 auto; padding-top: var(--safe-t); }
.flow::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--field); }
.flow-top { display: flex; align-items: center; gap: 10px; padding: 10px var(--pad); }
.flow-top .titles { flex: 1; min-width: 0; }
.flow-top h1 { margin: 0; font: 900 21px/1.15 var(--f-ar-display); }
.flow-top .sub { font: 500 12.5px/1.4 var(--f-ar); color: var(--mute); }
.prog { height: 6px; margin: 0 var(--pad); border-radius: 99px; background: rgba(11,11,11,.07); overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, #78c4bc, var(--green)); border-radius: 99px; transition: width .35s var(--e-out); }
.dhikr-pager { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.dhikr-pager::-webkit-scrollbar { display: none; }
.dslide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; padding: 14px var(--pad) 0; display: flex; flex-direction: column; }
.dcard { flex: 1; min-height: 0; overflow-y: auto; border-radius: 32px; padding: 22px 20px; display: flex; flex-direction: column; cursor: pointer; user-select: none; -webkit-user-select: none; }
.dcard .txt { margin: auto 0; font: 400 var(--dsize, 24px)/2 var(--f-dua); text-align: center; color: var(--ink); }
.dcard .txt.quran { font-family: "KFGQPC Hafs", var(--f-dua); line-height: 2.1; }
.dcard .note { margin-top: 14px; font: 400 13px/1.7 var(--f-ar); color: var(--mute); text-align: center; }
.dcard .src { margin-top: 10px; font: 500 11.5px/1.4 var(--f-ar); color: var(--faint); text-align: center; }
.dcard.done { opacity: .55; }
.counter-wrap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0 calc(var(--safe-b) + 18px); }
.counter { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); color: var(--ink); font: 300 46px/1 var(--f-num); box-shadow: inset 0 1px 0 #fff, 0 0 0 8px rgba(255,255,255,.45), 0 24px 40px -18px rgba(52,58,74,.6); transition: transform .12s var(--e-std); position: relative; }
.counter:active { transform: scale(.94); }
.counter.ok { color: var(--green); }
.counter svg { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); pointer-events: none; }
.counter-hint { font: 500 13px/1 var(--f-ar); color: var(--mute); }
.flow-nav { display: flex; gap: 10px; align-items: center; }
.finish { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 0 30px; }
.finish .big { font: 900 34px/1.3 var(--f-ar-display); }

/* prayer */
.ptimes { display: grid; gap: 8px; }
.ptime { display: flex; align-items: center; gap: 12px; border-radius: 22px; padding: 14px 16px; }
.ptime .n { flex: 1; font: 500 17px/1.2 var(--f-ar); }
.ptime .t { font: 400 22px/1 var(--f-num); }
.ptime .bell { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); }
.ptime .bell.on { color: var(--ink); background: rgba(255,255,255,.7); }
.ptime.next { background: linear-gradient(135deg, rgba(120,196,188,.35), rgba(255,255,255,.75)); box-shadow: inset 0 0 0 1.5px var(--ink), var(--glass-shadow); }
.ptime.next .n { font-weight: 700; }
.ptime.past { opacity: .6; }
.countdown { font: 300 48px/1 var(--f-num); letter-spacing: -.02em; margin-top: 8px; direction: ltr; text-align: right; }

/* reader overlay */
.reader { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; max-width: 680px; margin: 0 auto; padding-top: var(--safe-t); }
.reader::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--field); }

/* sheet + toast */
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(28,30,36,.28); animation: fade .25s; }
.sheet { position: fixed; z-index: 71; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 680px; max-height: calc(100svh - var(--safe-t) - 28px); overflow-y: auto; overscroll-behavior: contain; border-radius: 30px 30px 0 0; padding: 10px var(--pad) calc(22px + var(--safe-b)); background: linear-gradient(rgba(248,247,244,.86), rgba(248,247,244,.86)), var(--field); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); border-top: 1px solid rgba(255,255,255,.9); box-shadow: 0 -20px 50px -30px rgba(52,58,74,.5); animation: up .38s var(--e-out); }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 2px auto 14px; }
.sheet h2 { margin: 0 0 6px; font: 900 24px/1.2 var(--f-ar-display); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { height: 38px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.65); font: 500 14px/1 var(--f-ar); border: 1px solid rgba(255,255,255,.9); }
.opts button[aria-pressed="true"] { background: var(--glass-strong); color: var(--ink); border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.label { font: 500 13px/1.4 var(--f-ar); color: var(--mute); margin: 18px 2px 8px; }
.toast { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(var(--tb-h) + var(--safe-b) + 16px); max-width: calc(100% - 28px); width: max-content; display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 999px; font: 500 14px/1.3 var(--f-ar); box-shadow: var(--glass-shadow), 0 10px 30px -12px rgba(52,58,74,.5); border: 1px solid var(--glass-edge); animation: up .25s var(--e-out); }
.toast button { font-weight: 700; color: var(--green); }
@keyframes up { from { transform: translate(-50%, 30px); opacity: .3; } }
@keyframes fade { from { opacity: 0; } }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--ink); animation: sp 1s linear infinite; margin: 0 auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 10px; color: var(--mute); }

/* ---- illustrations (Saria's drawings, public/assets/ill) ---- */
.ill { width: 64px; height: 64px; object-fit: contain; flex: none; display: block; filter: drop-shadow(0 8px 10px rgba(52,58,74,.10)); -webkit-user-drag: none; user-select: none; }
.ill[data-off] { filter: grayscale(1) opacity(.55); }
.card .split > .ill { width: 66px; height: 66px; }
.cat .ill { width: 78px; height: 78px; margin: -4px -4px 0; }
.finish .ill { margin: 0 auto 6px; }
.sec-ill { align-items: center; justify-content: flex-start; gap: 8px; }
.sec-ill .ill { width: 44px; height: 44px; }
/* adhkar page */
.tas-tile { width: 100%; margin-top: 6px; border-radius: 32px; padding: 18px 18px 18px 14px; display: flex; align-items: center; gap: 14px; text-align: start; background: linear-gradient(150deg, rgba(169,201,176,.55), rgba(255,255,255,.55)); }
.tas-tile .ill { width: 118px; height: 118px; }
.tas-tile .t { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tas-tile b { font: 900 28px/1.1 var(--f-ar-display); }
.tas-tile small { font: 500 13px/1.5 var(--f-ar); color: var(--mute); }
.tas-tile .pill { align-self: flex-start; margin-top: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.7); font: 500 12.5px/1.2 var(--f-ar); }
.mm { margin-top: 12px; border-radius: 30px; padding: 16px; display: flex; align-items: center; gap: 12px; background: linear-gradient(110deg, rgba(225,229,172,.55), rgba(255,255,255,.5) 50%, rgba(170,196,228,.5)); }
.mm .ill { width: 80px; height: 80px; }
.mm b { display: block; font: 900 19px/1.2 var(--f-ar-display); }
.mm-btns { display: flex; gap: 8px; margin-top: 10px; }
.mm-btns button { flex: 1; border-radius: 18px; padding: 9px 10px; background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.9); text-align: start; display: flex; flex-direction: column; gap: 2px; }
.mm-btns button span { font: 500 15px/1.2 var(--f-ar); }
.mm-btns button small { font: 500 12px/1.2 var(--f-ar); color: var(--mute); min-height: 14px; }
.mm-btns button.now { background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cat.leave { background: linear-gradient(160deg, rgba(228,222,210,.9), rgba(255,255,255,.5)); }
.cat.sleep { background: linear-gradient(160deg, rgba(170,196,228,.6), rgba(255,255,255,.5)); }
.cat.mine { background: linear-gradient(160deg, rgba(249,128,98,.22), rgba(255,255,255,.5)); }
.dua-prev { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 400 17px/1.8 var(--f-dua) !important; }

/* ---- tasbeeh: Saria's four guided tasbeehs + free counter ---- */
.flow-top > .ill { width: 52px; height: 52px; }
.tsb-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px var(--pad) calc(30px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.tsb-card { border-radius: 30px; padding: 16px 18px 18px; text-align: start; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tsb-card .top { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.tsb-card .cnt, .tsb-card > .cnt { align-self: flex-start; font: 500 12.5px/1.2 var(--f-ar); color: #5b554d; background: rgba(255,255,255,.62); padding: 6px 11px; border-radius: 999px; }
.tsb-card b { font: 400 24px/1.6 var(--f-dua); color: var(--ink); }
.tsb-card .ph { font: 400 15.5px/1.75 var(--f-dua); color: #6f695f; }
.tsb-card .okp { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--green); color: #fff; font: 500 13px var(--f-ar); }
.tsb-card .okp .ic { width: 16px; height: 16px; stroke: #fff; }
.tsb-card.sage, .tsb-run.sage { background: linear-gradient(155deg, rgba(169,201,176,.62), rgba(255,255,255,.5)); }
.tsb-card.pear, .tsb-run.pear { background: linear-gradient(155deg, rgba(225,229,172,.78), rgba(255,255,255,.5)); }
.tsb-card.sky, .tsb-run.sky { background: linear-gradient(155deg, rgba(170,196,228,.62), rgba(255,255,255,.5)); }
.tsb-card.coral, .tsb-run.coral { background: linear-gradient(155deg, rgba(249,128,98,.26), rgba(255,255,255,.5)); }
.tsb-title { text-align: center; font: 400 21px/1.7 var(--f-dua); padding: 2px 28px 0; }
.tsb-steps { display: flex; gap: 6px; padding: 12px var(--pad) 0; }
.tsb-steps span { flex: 1; min-width: 0; border-radius: 16px; padding: 8px 6px 7px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.85); text-align: center; transition: background .2s; }
.tsb-steps b { display: block; font: 400 14px/1.5 var(--f-dua); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsb-steps small { display: block; font: 500 11.5px/1.3 var(--f-ar); color: var(--mute); }
.tsb-steps .now { background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--ink); }
.tsb-steps .ok small { color: var(--green); font-weight: 700; }
.tsb-steps .ok b { color: var(--mute); }
.tsb-pad { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 24px calc(20px + var(--safe-b)); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tsb-phrase { font: 400 32px/1.6 var(--f-dua); text-align: center; min-height: 52px; }
.tsb-phrase.long { font-size: 22px; line-height: 1.85; }
.tsb-ring { position: relative; width: min(220px, 30svh); aspect-ratio: 1; display: grid; place-items: center; }
.tsb-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.tsb-ring svg circle { transition: stroke-dashoffset .2s, opacity .2s; }
.tsb-ring .num { font-size: clamp(56px, 10svh, 82px); font-weight: 300; line-height: 1; text-align: center; }
.tsb-ring .small { text-align: center; margin-top: 6px; }
.tsb-fadl { font: 400 16px/1.95 var(--f-dua); color: #5b554d; text-align: center; max-width: 360px; }
.tsb-card.stone, .tsb-run.stone { background: linear-gradient(155deg, rgba(228,222,210,.95), rgba(255,255,255,.5)); }
.tsb-card.gold, .tsb-run.gold { background: linear-gradient(155deg, rgba(233,185,73,.26), rgba(255,255,255,.5)); }
.long-fadl .tsb-ring { width: min(200px, 24svh); }
.long-fadl .tsb-fadl { font-size: 15px; line-height: 1.85; }
.long-fadl .tsb-pad { gap: 10px; }
