:root {
  --bg: #F6F2E9;
  --card: #FFFFFF;
  --ink: #1C2A25;
  --muted: #66746E;
  --line: #E4DED1;
  --green: #0E5E46;
  --green-2: #137A5B;
  --green-soft: #E3F0EA;
  --gold: #B8862B;
  --gold-soft: #F6ECD6;
  --red-soft: #FBE9E4;
  --red: #9C3B25;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 42, 37, .06), 0 4px 14px rgba(28, 42, 37, .05);
  --on-green: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101714; --card: #18221E; --ink: #EEF2EF; --muted: #9AA9A2; --line: #2A3631;
    --green: #3FB68B; --green-2: #5CC9A0; --green-soft: #1B3129; --gold: #E2B55A; --gold-soft: #33291A;
    --red-soft: #3A1F19; --red: #F0A08C; --shadow: none; --on-green: #08201A;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); }
button { font: inherit; color: inherit; cursor: pointer; }
h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 4px 10px; }

.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 0 6px; position: sticky; top: 0; background: var(--bg); z-index: 2;
}
.top h1 { font-size: 18px; margin: 0; font-weight: 650; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top > :first-child { justify-self: start; }
.top > :last-child { justify-self: end; }
.icon-btn .ic { width: 26px; height: 26px; display: block; }
.logo-alif { width: 42px; height: 42px; display: block; color: var(--green); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; font-size: 28px; line-height: 1; display: grid; place-items: center; color: var(--green); }
.icon-btn.ghost { visibility: hidden; }
.logo { width: 44px; height: 44px; display: grid; place-items: center; color: var(--green); }

.lead { font-size: 19px; margin: 12px 4px 4px; }
.list { display: grid; gap: 10px; }
.card {
  display: block; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.card:active { transform: scale(.99); }
.card > span { display: block; }
.card > span + span { margin-top: 2px; }
.card.phrase { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 76px; }
.card.phrase > span + span { margin-top: 0; }
.card .txt > span { display: block; }
.card .ar { font-family: Amiri, "Geeza Pro", serif; font-size: 27px; line-height: 1.75; text-align: right; flex: none; padding-top: 4px; }
.card .name { font-weight: 650; font-size: 18px; }
.card .meta, .card .steps { color: var(--muted); font-size: 15px; }
.ok { color: var(--green); font-weight: 600; }
.muted { color: var(--muted); }
.privacy { color: var(--muted); font-size: 14px; margin: 28px 4px 0; }

.btn {
  display: block; width: 100%; margin: 10px 0 0; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 17px;
}
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.big { padding: 18px; font-size: 19px; border-radius: 16px; }
.btn.small { display: inline-block; width: auto; padding: 9px 14px; font-size: 15px; margin: 0; border-radius: 12px; }
.btn:active { opacity: .85; }

.hero { display: grid; justify-items: center; text-align: center; margin: 8px 0 4px; }
.hero .ar { font-family: Amiri, "Geeza Pro", serif; font-size: 40px; line-height: 1.5; }
.hero .name { font-weight: 650; font-size: 20px; color: var(--green); }

/* counter */
.counter { text-align: center; }
.step-info { margin-top: 6px; font-size: 15px; color: var(--muted); font-weight: 600; }
.ring {
  position: relative; display: grid; place-items: center; width: min(78vw, 300px); aspect-ratio: 1;
  margin: 10px auto 6px; border: 0; background: transparent; padding: 0; border-radius: 50%;
}
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: var(--card); stroke: var(--line); stroke-width: 10; }
.ring .prog { fill: none; stroke: var(--green-2); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .35s ease, stroke .3s; }
.ring.complete .prog { stroke: var(--gold); }
.ring .num { position: relative; font-size: clamp(64px, 22vw, 96px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; margin-top: -8px; }
.ring .of { position: absolute; bottom: 24%; color: var(--muted); font-size: 16px; }
.ring.complete .of { color: var(--gold); font-weight: 650; }
.bump { animation: bump .28s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

.goal-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 4px 0 6px; }
.goal-row > span { color: var(--muted); font-size: 15px; margin-right: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { border: 1px solid var(--line); background: var(--card); padding: 7px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.chip.on { background: var(--green); border-color: var(--green); color: var(--on-green); }

.meter { --lv: 0; display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--green-soft); text-align: left; font-size: 15px; }
.meter.off { background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.meter .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--green-2); opacity: .45; transition: opacity .1s, transform .1s; }
.meter.talking .dot { opacity: 1; transform: scale(1.3); }
.meter.off .dot { background: var(--muted); }
.meter > span:nth-child(2) { flex: 1; }
.meter .bar { flex: none; width: 70px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: calc(var(--lv) * 100%); background: var(--green-2); transition: width .08s linear; }
.meter.off .bar { display: none; }

.tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* setup */
ol.steps { padding-left: 22px; margin: 14px 0; }
ol.steps li { margin: 6px 0; }
.hint { color: var(--muted); font-size: 15px; }
.alert { background: var(--red-soft); color: var(--red); border-radius: 14px; padding: 12px 14px; margin: 14px 0 4px; font-weight: 550; }
.alert.good { background: var(--green-soft); color: var(--green); }
.big-msg { text-align: center; font-size: 24px; font-weight: 650; margin: 28px 0 8px; }
.big-msg.now { color: var(--green); }
.dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.dots span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--green-2); transition: background .2s; }
.dots span.on { background: var(--green-2); }
.try-num { text-align: center; font-size: 72px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }

/* done */
.done { text-align: center; padding-top: 30px; }
.done-mark { width: 96px; height: 96px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 52px; display: grid; place-items: center; margin: 0 auto; }
.done h2 { font-size: 26px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 18px 0 4px; }

/* settings */
.opt { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; }
.opt input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green); }
.opt small, .field small { display: block; color: var(--muted); font-size: 14px; }
.field { margin: 10px 0; }
.rows { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row > span:first-child { flex: 1; font-weight: 600; }
.row .ok, .row .muted { font-size: 14px; }
.details { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line); color: var(--muted); font-size: 14px; text-align: left; direction: auto; unicode-bidi: plaintext; word-break: break-word; }
.meter.speech .bar { display: none; }

/* ---------- groups & history ---------- */
.top-actions { display: flex; gap: 2px; }
.card.group > .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card.new-group { border-style: dashed; background: transparent; box-shadow: none; }
.card.new-group .name { color: var(--green); }
.badge { font-size: 13px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.badge.gold, .gold { color: var(--gold); }
.badge.gold { background: var(--gold-soft); }
.minibar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px !important; }
.minibar i { display: block; height: 100%; background: var(--green-2); border-radius: 3px; transition: width .35s ease; }
.linkish { background: none; border: 0; color: var(--green); font-weight: 600; padding: 10px 4px; font-size: 15px; display: block; margin: 6px auto 0; }
.center { text-align: center; }
.ring .num.long { font-size: clamp(48px, 15vw, 72px); }
.my-part { margin: 2px 0 6px; color: var(--muted); font-size: 16px; }
.my-part b { color: var(--ink); }
.invite-banner { display: grid; gap: 6px; text-align: left; background: var(--green-soft); border-radius: 16px; padding: 14px 16px; margin: 8px 0 4px; }
.invite-banner span { font-size: 15px; color: var(--muted); }
.invite-banner .btn { margin-top: 4px; }
.members, .events { display: grid; gap: 8px; text-align: left; }
.member { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.member.me { border-color: var(--green-2); }
.member .who { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.member .who small { color: var(--muted); font-weight: 500; }
.member .cnt { font-weight: 700; font-variant-numeric: tabular-nums; }
.member .cnt small { color: var(--muted); font-weight: 500; }
.member .minibar { grid-column: 1 / -1; margin-top: 4px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); display: inline-block; box-shadow: 0 0 0 3px var(--green-soft); flex: none; }
.event { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 2px 4px; }
.event b { overflow-wrap: anywhere; }
.form .text, .chip-input {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; font-size: 17px;
}
.chip-input { width: 96px; padding: 6px 12px; border-radius: 999px; font-size: 15px; }
.form .text:focus, .chip-input:focus { outline: 2px solid var(--green-2); outline-offset: 1px; }
.join-facts { display: grid; gap: 4px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; }
.btn[disabled] { opacity: .6; }
.btn.danger { color: var(--red); margin: 22px auto 0; display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; display: grid; }
.stat b { font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.row small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.row.tap { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; }
.rows .row.tap:first-child { border-top: 0; }
.row > span:last-child { text-align: right; }
.row .num-s { font-weight: 700; font-variant-numeric: tabular-nums; }
.sessions .day { padding: 10px 14px 4px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-top: 1px solid var(--line); }
.sessions .day:first-child { border-top: 0; }
.sessions .day + .row { border-top: 0; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; transition: all .25s; z-index: 10; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.form .hero { margin-top: 18px; }
.invite-card { display: grid; gap: 8px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 18px 0 4px; }
.invite-card .muted { font-size: 14px; }
.invite-url { font-size: 15px !important; padding: 10px 12px !important; color: var(--muted) !important; background: var(--bg) !important; border: 1px solid var(--line); border-radius: 12px; width: 100%; font: inherit; }
.invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invite-actions .btn { margin: 0; padding: 12px; }

/* ---------- welcome card ---------- */
.welcome {
  text-align: center; margin: 10px 0 6px; padding: 22px 18px 18px; border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 0%, var(--green-soft) 0%, var(--card) 70%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.welcome .verse { font-family: Amiri, "Geeza Pro", serif; font-size: clamp(24px, 7vw, 30px); line-height: 1.9; margin: 0; color: var(--green); }
.welcome .verse-en { margin: 2px 0 0; font-size: 14px; color: var(--muted); font-style: italic; }
.welcome .verse-en span { display: block; font-style: normal; font-size: 12px; letter-spacing: .04em; margin-top: 2px; }
.welcome .beads { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 14px 0 12px; }
.welcome .beads i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-2); opacity: .45; }
.welcome .beads b { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.welcome .intro { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 550; }
.today-pill { margin-top: 14px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: var(--muted); }
.today-pill b { color: var(--ink); }
/* long Arabic on dhikr cards wraps instead of squeezing the name */
.card.phrase .txt { min-width: 0; }
.card.phrase .ar { flex: 0 1 auto; max-width: 58%; }
.card.phrase.long { flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 16px 14px; }
.card.phrase.long .ar { order: -1; max-width: 100%; text-align: center; font-size: 25px; padding-top: 2px; }
.card.phrase.long .txt { text-align: center; }
.hero.long .ar { font-size: clamp(24px, 7.2vw, 30px); line-height: 1.7; }

/* ---------- verse slideshow ---------- */
.welcome .slides { display: grid; }
.welcome .slide { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateX(14px); transition: opacity .6s ease, transform .6s ease; pointer-events: none; display: flex; flex-direction: column; justify-content: center; }
.welcome .slide.on { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .welcome .slide { transition: none; transform: none; } }
.welcome .slides { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.vdots { display: flex; justify-content: center; align-items: center; gap: 2px; margin: 10px 0 10px; }
.vdot { width: 22px; height: 22px; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.vdot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); opacity: .4; transition: all .3s; }
.vdot.on::before { width: 10px; height: 10px; background: var(--gold); opacity: 1; }

/* ---------- all dhikr cards: same centered layout ---------- */
.card.phrase { flex-direction: column; align-items: center; text-align: center; gap: 0; padding: 10px 16px 12px; min-height: 0; }
.card.phrase .ar { order: -1; max-width: 100%; text-align: center; font-size: 26px; line-height: 1.7; padding-top: 2px; flex: none; }
.card.phrase .txt { text-align: center; }
.card.phrase .name { font-size: 17px; }
/* old verse fades out first, then the new one fades in (no overlapping text) */
.welcome .slide { transition: opacity .35s ease, transform .35s ease; }
.welcome .slide.on { transition: opacity .5s ease .35s, transform .5s ease .35s; }

/* ---------- add to home screen ---------- */
.install-card { position: relative; display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px 40px 12px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.install-card img { border-radius: 11px; flex: none; }
.install-card .itext { flex: 1; min-width: 0; display: grid; }
.install-card .itext small { color: var(--muted); font-size: 13px; }
.install-card .btn { flex: none; }
.install-card .ix { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
.guide-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 22px; }
.gstep { display: grid; gap: 12px; justify-items: center; }
.gtext { display: flex; gap: 12px; align-items: flex-start; width: 100%; font-size: 17px; }
.gnum { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.gstep img { width: 100%; max-width: 270px; height: auto; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gstep img.gdone { max-width: 150px; border-radius: 18px; }
.tip { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.tip b { color: var(--ink); }
.row-link { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 12px 0 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 600; text-align: left; }
.row-link span { color: var(--muted); font-size: 20px; }
.alert.readd { margin-top: 12px; font-weight: 500; line-height: 1.45; }
.alert.readd b { display: block; margin-bottom: 4px; }
.alert.readd ol { margin: 8px 0; padding-left: 20px; }
.alert.readd li b { display: inline; }
.gtext small.why { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.gstep img.gwide { max-width: 340px; border-radius: 16px; }
/* iPhone getting ready to listen again */
.meter.resting { background: var(--gold-soft); color: var(--ink); }
.meter.resting .dot { background: var(--gold); opacity: 1; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.6); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .meter.resting .dot { animation: none; } }
.meter.resting { border: 1.5px solid var(--gold); font-weight: 600; font-size: 16px; }
.ring.breath .prog { opacity: .35; }
.ring.breath .breath-label { color: var(--gold); font-weight: 700; animation: breatheText 1.6s ease-in-out infinite; }
@keyframes breatheText { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ring.breath .breath-label { animation: none; } }

/* ---------- tabs & 99 Names ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 8px 0 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 10px; border-radius: 10px; font-weight: 650; font-size: 15px; color: var(--muted); }
.tab.on { background: var(--green); color: var(--on-green); }
.names-intro .intro.small { font-size: 15px; font-weight: 500; margin-top: 10px; color: var(--muted); }
.names-intro .intro.small b { color: var(--ink); }
.name-search { width: 100%; margin: 14px 0 10px; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
.names-list { display: grid; gap: 8px; }
.name-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.name-row[hidden] { display: none; }
.nnum { color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ntxt { min-width: 0; display: grid; }
.ntxt b { font-size: 16px; }
.ntxt small { color: var(--muted); font-size: 13px; }
.nright { display: grid; justify-items: end; }
.nar { font-family: Amiri, "Geeza Pro", serif; font-size: 22px; line-height: 1.6; white-space: nowrap; }
.ncount { font-size: 13px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; margin-top: -4px; }

/* ---------- founder message & contact ---------- */
.founder { position: relative; margin: 14px 0 0; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); box-shadow: var(--shadow); }
.founder-head { display: flex; align-items: center; gap: 8px; padding-right: 30px; font-size: 17px; }
.founder-ic { font-size: 20px; }
.founder p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; }
.founder .btn { margin-top: 14px; }
.founder-dua { text-align: center; font-weight: 600; }
.founder-sign { text-align: right; font-style: italic; color: var(--muted); margin-top: 6px !important; }
.founder .ix { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; }
.founder-link { margin-top: 10px; }
.text.area { min-height: 140px; resize: vertical; line-height: 1.45; font-family: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form.center { text-align: center; padding-top: 30px; }
.thanks { font-size: 26px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 16px 0 4px; }

/* message over the counter: "Take a breath…" / "Go ahead ✓" */
.ring-msg { position: absolute; inset: 14%; border-radius: 50%; display: grid; place-content: center; gap: 4px; text-align: center; padding: 12px;
  opacity: 0; transform: scale(.92); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.ring-msg b { font-size: clamp(22px, 7vw, 28px); line-height: 1.15; }
.ring-msg small { font-size: 14px; opacity: .85; }
.ring.msg .ring-msg { opacity: 1; transform: none; }
.ring.breath .ring-msg { background: var(--gold-soft); color: var(--ink); box-shadow: 0 0 0 3px var(--gold) inset; animation: breatheRing 1.8s ease-in-out infinite; }
.ring.go .ring-msg { background: var(--green); color: var(--on-green); }
.ring.msg .num, .ring.msg .of { opacity: .12; transition: opacity .25s; }
@keyframes breatheRing { 50% { transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .ring.breath .ring-msg { animation: none; } }

/* earbuds tip */
.tip-card { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--green-soft); border: 1px solid var(--line); text-align: left; }
.tip-ic { font-size: 26px; line-height: 1; flex: none; }
.tip-card b { display: block; font-size: 16px; }
.tip-card small { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.ear-hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.privacy a { color: var(--green); }
a.row-link { text-decoration: none; color: inherit; }
.founder-closed { display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 0; padding: 14px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); text-align: left; font-size: 16px; }
.founder-closed b { flex: 1; }
.founder-closed .chev { color: var(--muted); font-size: 22px; line-height: 1; }
.details { white-space: pre-line; }

/* one-line cards that open on tap; × removes them for good */
.mini-card { display: flex; align-items: stretch; margin: 12px 0 0; border-radius: 16px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.mini-card.founder-mini { border-left: 4px solid var(--gold); margin-top: 22px; }
.mini-card.tip { background: var(--green-soft); }
.mini-open { flex: 1; display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: none; border: 0; text-align: left; font-size: 16px; min-width: 0; }
.mini-open b { flex: 1; }
.mini-open .chev { color: var(--muted); font-size: 22px; line-height: 1; }
.mini-x { flex: none; width: 46px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); font-size: 22px; }
.tip-card { position: relative; padding-right: 44px; }
.tip-card .ix { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); font-size: 22px; }
.founder { margin-top: 22px; }

/* app: no double-tap zoom, no text-selection callouts on buttons */
.in-app, .in-app body { touch-action: manipulation; }
.in-app button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ---------- Quran ---------- */
/* KFGQPC Uthmanic Script Hafs: the King Fahd Complex font used in printed Madinah mushafs (free to use, not to modify). */
@font-face { font-family: 'KFGQPC Hafs'; src: url('/fonts/kfgqpc-hafs.woff2') format('woff2'); font-display: block; }
.q-font, .mushaf, .vb .ar, .basmala p, .sh-ar { font-family: 'KFGQPC Hafs', Amiri, 'Geeza Pro', serif; }
.tabs.three { grid-template-columns: 1fr 1fr 1fr; }
.q-continue { margin-top: 14px; border-left: 4px solid var(--green-2); }
.juz-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.juz-chips .chip { padding: 9px 0; text-align: center; }
.reader { --qs: 30px; text-align: left; }
.reader .step-info { text-align: center; }
.q-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 10px; margin: 10px 0 14px; box-shadow: var(--shadow); }
.q-page.read { border-color: var(--green-2); }
.mushaf { font-size: var(--qs); line-height: 2.05; text-align: justify; margin: 4px 0; }
.mushaf .v { -webkit-box-decoration-break: clone; }
.ayah-no { color: var(--green); white-space: nowrap; font-size: .95em; }
.sajda { color: var(--gold); }
.surah-head { text-align: center; padding: 6px 10px 8px; margin: 12px 0 6px; border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: 3px; border-radius: 10px; background: var(--gold-soft); }
.surah-head:first-child { margin-top: 4px; }
.sh-ar { display: block; font-size: calc(var(--qs) * .82); line-height: 1.9; color: var(--ink); }
.surah-head small { display: block; color: var(--muted); font-size: 13px; }
.basmala { text-align: center; margin: 2px 0 4px; }
.basmala p[lang=ar] { font-size: calc(var(--qs) * .92); line-height: 2.1; margin: 0; }
.vb { padding: 8px 0; border-bottom: 1px solid var(--line); }
.vb:last-of-type { border-bottom: 0; }
.vb .ar { font-size: var(--qs); line-height: 2; margin: 0; text-align: right; }
.latin { font-size: max(15px, calc(var(--qs) * .52)); line-height: 1.5; color: var(--green); margin: 2px 0; font-style: italic; text-align: left; }
.latin small { color: var(--muted); font-style: normal; font-size: 12px; }
.basmala .latin { text-align: center; }
.page-no { text-align: center; color: var(--muted); font-size: 20px; margin-top: 4px; }
.q-loading { padding: 60px 0; }
.read-mark { text-align: center; color: var(--green); font-weight: 650; margin: 0 0 10px; }
.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.q-nav .btn[disabled] { opacity: .4; }
.icon-btn.aa { font-size: 18px; font-weight: 700; font-family: Georgia, serif; }
.icon-btn.aa.on { background: var(--green-soft); }
.q-panel { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 6px 0 4px; box-shadow: var(--shadow); }
.q-panel .field small { color: var(--muted); font-size: 13px; }
.q-panel .chips { margin: 6px 0 2px; }
.q-panel .btn.small { justify-self: end; }
.chip[disabled] { opacity: .4; }
.how { margin: 6px 0 4px; padding-left: 22px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.how li + li { margin-top: 4px; }
.khatm { text-align: left; }
.khatm-top { margin: 10px 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; font-size: 18px; }
.khatm-top b { font-size: 26px; color: var(--green); }
.khatm-top .minibar { height: 8px; margin: 8px 0 6px !important; }
.khatm-top small { font-size: 14px; }
.my-khatm { display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--green-soft); }
.my-khatm b { font-size: 18px; }
.my-khatm .btn { margin-top: 6px; }
.my-khatm .alert { margin: 4px 0 0; }
.juz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.juz { display: grid; gap: 1px; text-align: left; padding: 9px 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); min-width: 0; color: var(--ink); }
.juz b { font-size: 15px; }
.juz .jwho { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.juz.free { border-style: dashed; background: transparent; }
.juz.mine { border-color: var(--green-2); background: var(--green-soft); }
.juz.mine .jwho { color: var(--green); font-weight: 650; }
.juz.full .minibar i { background: var(--gold); }
.juz .minibar { margin-top: 6px !important; height: 4px; }
.member .pjuz { grid-column: 1 / -1; font-size: 13px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 20; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); max-height: 80vh; overflow-y: auto; z-index: 21; display: grid; gap: 8px;
  background: var(--bg); border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 30px rgba(0, 0, 0, .2); }
.sheet .btn { margin: 0; }
.sheet .btn.on { border-color: var(--green-2); color: var(--green); }
.sheet-title { font-size: 20px; }
.sheet .muted { font-size: 14px; margin-bottom: 4px; }
.give-label { margin-top: 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- your own dhikr ---------- */
.card.phrase.mine { border-left: 4px solid var(--gold); }
.ar-input { font-family: Amiri, "Geeza Pro", serif; font-size: 26px; line-height: 1.7; text-align: right; }
.teach { display: grid; gap: 8px; margin: 8px 0; padding: 14px 16px; border-radius: 16px; background: var(--green-soft); }
.teach b { color: var(--green); }
.teach-heard { font-family: Amiri, "Geeza Pro", serif; font-size: 24px; line-height: 1.7; text-align: right; min-height: 40px; }
.teach .btn { margin: 0; }
.check { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.check.good { background: var(--green-soft); color: var(--green); }
.check.warn { background: var(--gold-soft); color: var(--ink); }
.check.bad { background: var(--red-soft); color: var(--red); }
.alert.soft { background: var(--gold-soft); color: var(--ink); text-align: center; }
