/* Prayer Guide — dark luxury Islamic-geometric system */
[hidden] { display: none !important; } /* hidden attr must beat display:flex rules (annBanner/compStage bug class) */
:root {
  --ink: #071f18;          /* deepest field */
  --field: #0b2b21;        /* page ground */
  --surface: #0f3529;      /* raised cards */
  --surface-2: #144233;    /* hover / active surface */
  --line: rgba(214, 178, 94, .18);
  --gold: #d6b25e;
  --gold-bright: #f0d18a;
  --gold-dim: #9c8140;
  --text: #eef3ee;
  --text-dim: #a9bfb2;
  --good: #7fd8a5;
  --danger: #e2836f;
  --r-lg: 22px;
  --r-md: 14px;
  --r-pill: 999px;
  --font-body: "Outfit", -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Amiri", "Scheherazade New", serif;
  --tabbar-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at 50% -10%, #124434 0%, transparent 60%),
    var(--field);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font-family: inherit; font-size: 1rem; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 18px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 30px; width: auto; display: block; filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(0,0,0,.35)); }
.brand-sub { color: var(--gold); font-size: .64rem; letter-spacing: .05em; white-space: nowrap; margin-right: 10px; }
.brand { flex-direction: row; align-items: center; }
.account-btn {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-dim); font-size: .8rem;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 13px; transition: color .2s, border-color .2s;
}
.account-btn:hover { color: var(--gold-bright); border-color: var(--gold-dim); }

/* ---------- views ---------- */
main { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.view { display: none; animation: rise .35s cubic-bezier(.16,1,.3,1); }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.view-title { font-size: 1.55rem; font-weight: 600; margin: 14px 0 4px; }
.view-sub { color: var(--text-dim); font-size: .88rem; margin-bottom: 18px; }
.section-h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 26px 0 10px; }
.muted { color: var(--text-dim); font-size: .88rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #14503c 0%, #0c3125 55%, #0a281e 100%);
  border: 1px solid var(--line);
  margin-top: 6px;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: .10; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23d6b25e' stroke-width='1'%3E%3Cpath d='M36 4 44 28 68 36 44 44 36 68 28 44 4 36 28 28Z'/%3E%3Ccircle cx='36' cy='36' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}
.hero-inner { position: relative; padding: 26px 22px 22px; text-align: center; }
.hero-label {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent); /* legible over the plate art */
}
.hero-prayer { font-size: 2.5rem; font-weight: 700; letter-spacing: .01em; margin: 2px 0 2px; }
.hero-count {
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem; font-weight: 300; color: var(--gold-bright); letter-spacing: .12em;
}
.hero-at { color: var(--text-dim); font-size: .86rem; margin-top: 4px; }
.hero-loc { margin-top: 14px; }
.loc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px;
}
.loc-btn:hover { color: var(--gold-bright); }

/* ---------- pills / buttons ---------- */
.pill {
  background: var(--gold); color: #21190a; font-weight: 600; font-size: .88rem;
  border-radius: var(--r-pill); padding: 11px 20px;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 4px 18px rgba(214, 178, 94, .25);
}
.pill:active { transform: scale(.97); }
.pill.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); box-shadow: none; }
.pill.wide { width: 100%; margin-top: 12px; }
.pill[disabled] { opacity: .5; cursor: default; }
.icon-btn { font-size: 1.3rem; color: var(--gold); padding: 6px 10px; }
.linklike { color: var(--text-dim); font-size: .82rem; text-decoration: underline; margin-top: 12px; display: block; }

.adhan-bar { display: flex; gap: 10px; justify-content: center; margin: 16px 0 4px; flex-wrap: wrap; }

/* ---------- times list ---------- */
.times { list-style: none; margin-top: 14px; }
.times li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-md);
}
.times li.now {
  border-color: var(--gold-dim);
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
}
.times li.passed { opacity: .55; }
.t-name { font-weight: 500; flex: 1; }
.t-name .ar { font-family: var(--font-ar); color: var(--gold); margin-left: 8px; font-size: 1.05rem; }
.t-time { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.times li.now .t-time { color: var(--gold-bright); }
.t-check {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.6px solid var(--line); color: transparent; font-size: .9rem;
  display: grid; place-items: center; transition: all .2s;
}
.t-check.done { background: var(--gold); border-color: var(--gold); color: #21190a; }
.sunnah-line { text-align: center; color: var(--text-dim); font-size: .78rem; margin: 14px 0 8px; }
.streak-chip { color: var(--gold); font-weight: 600; }

/* ---------- qibla ---------- */
.cdir { position: absolute; font-size: .8rem; letter-spacing: .1em; color: var(--text-dim); }
.cdir.n { top: 10px; left: 50%; transform: translateX(-50%); color: var(--gold); font-weight: 700; }
.cdir.s { bottom: 10px; left: 50%; transform: translateX(-50%); }
.cdir.e { right: 12px; top: 50%; transform: translateY(-50%); }
.cdir.w { left: 12px; top: 50%; transform: translateY(-50%); }
.ticks { position: absolute; inset: 6px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--gold-dim) 0deg .6deg, transparent .6deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 82%, #000 83%);
          mask: radial-gradient(circle, transparent 82%, #000 83%); opacity: .8; }
.qibla-needle {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform-origin: 50% 50%;
}
.kaaba-dot { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); font-size: 1.15rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.cr-num { font-size: 2.2rem; font-weight: 300; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.cr-unit { color: var(--text-dim); margin-left: 6px; font-size: .85rem; }
.cr-hint { color: var(--text-dim); font-size: .82rem; margin: 8px 0 14px; max-width: 300px; }

/* ---------- guides ---------- */
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guide-card {
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 14px;
  transition: background .2s, transform .15s;
}
.guide-card:hover { background: var(--surface-2); }
.guide-card:active { transform: scale(.98); }
.gc-count { color: var(--gold); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.gc-title { font-weight: 600; font-size: .98rem; margin-top: 3px; }
.info-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.info-chip {
  font-size: .8rem; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 13px;
  transition: color .2s, border-color .2s;
}
.info-chip:hover { color: var(--gold-bright); border-color: var(--gold-dim); }

/* ---------- reader ---------- */
.reader-top { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.reader-title { flex: 1; font-weight: 600; }
.reader-progress { color: var(--gold); font-size: .82rem; font-variant-numeric: tabular-nums; }
.step-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 20px; min-height: 320px;
}
.step-card .st-num { color: var(--gold); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; }
.step-card h3 { font-size: 1.3rem; margin: 4px 0 14px; }
.step-card img { max-width: 130px; height: auto; float: right; margin: 0 0 10px 14px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.st-arabic { font-family: var(--font-ar); font-size: 1.5rem; color: var(--gold-bright); line-height: 1.9; margin-bottom: 6px; direction: rtl; text-align: right; }
.st-translit { color: var(--gold); font-style: italic; margin-bottom: 6px; }
.st-english { color: var(--text); margin-bottom: 12px; }
.st-detail { color: var(--text-dim); font-size: .92rem; line-height: 1.65; }
.reader-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 16px; }
.reader-nav .pill { flex: 1; }
.step-dots { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin: 16px 0; }
.step-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.step-dots i.on { background: var(--gold); }
.info-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; line-height: 1.7; color: var(--text); }

/* ---------- quran ---------- */
.surah-search {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 11px 18px; margin-bottom: 12px;
}
.surah-search:focus { outline: none; border-color: var(--gold-dim); }
.surah-list { display: flex; flex-direction: column; gap: 7px; }
.surah-row {
  display: flex; align-items: center; gap: 13px; text-align: left;
  background: var(--surface); border: 1px solid transparent;
  border-radius: var(--r-md); padding: 11px 14px; transition: background .2s;
}
.surah-row:hover { background: var(--surface-2); }
.surah-row.lastread { border-color: var(--gold-dim); }
.sr-num {
  min-width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--gold); font-size: .8rem; font-variant-numeric: tabular-nums;
}
.sr-names { flex: 1; display: flex; flex-direction: column; }
.sr-en { font-weight: 500; }
.sr-sub { color: var(--text-dim); font-size: .74rem; text-transform: capitalize; }
.sr-ar { font-family: var(--font-ar); color: var(--gold-bright); font-size: 1.2rem; }
.ar { font-family: var(--font-ar); }
.surah-head { text-align: center; margin: 6px 0 18px; }
.sh-ar { font-size: 2rem; color: var(--gold-bright); }
.sh-en { color: var(--text-dim); font-size: .85rem; margin-top: 2px; }
.sh-bism { font-size: 1.4rem; color: var(--gold); margin-top: 14px; }
.ayah-list { display: flex; flex-direction: column; gap: 4px; padding-bottom: 30px; }
.ayah { padding: 14px 12px; border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer; }
.ayah:hover { background: var(--surface); }
.ayah.marked { border-color: var(--gold-dim); background: var(--surface); }
.ay-ar { font-size: 1.45rem; line-height: 2.2; direction: rtl; text-align: right; color: var(--text); }
.ay-num { color: var(--gold); font-size: 1.05rem; }
.ay-en { color: var(--text-dim); font-size: .9rem; line-height: 1.6; margin-top: 8px; }
.pill.small { padding: 7px 14px; font-size: .8rem; }

/* ---------- tasbih ---------- */
.tasbih-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tasbih {
  width: min(64vw, 250px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1a5440, var(--surface) 70%);
  border: 1px solid var(--gold-dim);
  display: grid; place-content: center; gap: 4px;
  transition: transform .1s; user-select: none; -webkit-user-select: none;
}
.tasbih:active { transform: scale(.96); }
.tasbih-count { font-size: 3.4rem; font-weight: 300; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.tasbih-cycle { color: var(--text-dim); font-size: .8rem; }
.tasbih-row { display: flex; gap: 10px; }
.tasbih-dhikr { text-align: center; color: var(--text-dim); font-size: .88rem; line-height: 2.1; }
.tasbih-dhikr .ar { font-family: var(--font-ar); color: var(--gold); font-size: 1.15rem; margin-right: 8px; }

/* ---------- settings / login ---------- */
.set-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .9rem;
}
.set-row:last-child { border-bottom: 0; }
.set-row select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 10px; max-width: 55%;
}
.set-group .pill { margin: 12px 0; }
.set-manual { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 12px; }
.set-manual input {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px;
  width: 100%; min-width: 0; box-sizing: border-box; /* grid children must not overflow the viewport */
}
.set-manual input[type=text], .set-manual .pill { grid-column: 1 / -1; }
.fineprint { color: var(--text-dim); font-size: .76rem; line-height: 1.6; margin: 22px 4px 10px; }

.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px; }
.login-label { display: block; font-size: .8rem; color: var(--text-dim); margin-bottom: 8px; }
.login-card input {
  width: 100%; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px;
  font-size: 1.05rem; letter-spacing: .04em;
}
.login-card input:focus { outline: none; border-color: var(--gold-dim); }
.login-msg { margin-top: 12px; font-size: .84rem; color: var(--text-dim); min-height: 1.2em; }
.login-msg.err { color: var(--danger); }
.login-msg.ok { color: var(--good); }

/* ---------- ask card + daily ayah ---------- */
.ask-card {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
  border: 1px solid var(--gold-dim); border-radius: var(--r-md);
  padding: 13px 16px; margin-top: 14px; transition: transform .15s;
}
.ask-card:active { transform: scale(.985); }
.ask-icon { color: var(--gold); }
.ask-icon svg { width: 30px; height: 30px; }
.ask-text { flex: 1; }
.ask-text b { display: block; font-size: .98rem; }
.ask-text span { color: var(--text-dim); font-size: .78rem; }
.ask-go { color: var(--gold); font-size: 1.2rem; }
.ayah-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin: 14px 0 8px; }
.ac-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.ac-ar { font-family: var(--font-ar); font-size: 1.35rem; line-height: 2.1; direction: rtl; text-align: right; color: var(--gold-bright); }
.ac-en { color: var(--text); font-size: .9rem; line-height: 1.6; margin-top: 8px; }
.ac-ref { color: var(--text-dim); font-size: .76rem; margin-top: 8px; }

/* ---------- chat ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; max-height: 58vh; overflow-y: auto; padding-bottom: 8px; }
.msg { max-width: 85%; padding: 11px 15px; border-radius: 16px; font-size: .92rem; line-height: 1.55; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--gold); color: #21190a; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.wait { color: var(--text-dim); }
.chat-inputrow { display: flex; gap: 8px; margin-top: 12px; position: sticky; bottom: calc(var(--tabbar-h) + 10px); }
.chat-inputrow input { flex: 1; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 12px 16px; }
.chat-inputrow input:focus { outline: none; border-color: var(--gold-dim); }
.send-btn, .mic-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #21190a; font-size: 1.15rem; font-weight: 700; flex-shrink: 0; }
.mic-btn { background: var(--surface); border: 1px solid var(--gold-dim); color: var(--gold); display: grid; place-items: center; }
.mic-btn svg { width: 20px; height: 20px; }
.mic-btn.rec { background: var(--danger); color: #fff; border-color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ---------- duas + names ---------- */
.dua-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 16px; margin-bottom: 10px; }
.dua-when { color: var(--gold); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.dua-ar { font-family: var(--font-ar); font-size: 1.3rem; line-height: 2; direction: rtl; text-align: right; color: var(--gold-bright); }
.dua-tr { color: var(--gold); font-style: italic; font-size: .85rem; margin-top: 6px; }
.dua-en { color: var(--text-dim); font-size: .87rem; margin-top: 4px; line-height: 1.5; }
.names-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.name-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; text-align: center; position: relative; }
.nc-n { position: absolute; top: 8px; left: 10px; color: var(--text-dim); font-size: .66rem; }
.nc-ar { font-family: var(--font-ar); font-size: 1.3rem; color: var(--gold-bright); }
.nc-tr { font-size: .82rem; font-weight: 600; margin-top: 2px; }
.nc-en { color: var(--text-dim); font-size: .74rem; margin-top: 2px; }

/* ---------- companion ---------- */
.comp-stage { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; text-align: center; cursor: pointer; }
.comp-img { width: min(46vw, 230px); margin: 0 auto 14px; border-radius: 16px; display: block; }
.comp-title { font-size: 1.6rem; font-weight: 700; color: var(--gold-bright); }
.comp-ar { font-family: var(--font-ar); font-size: 2.2rem; line-height: 1.9; margin: 18px 0 6px; color: var(--text); }
.comp-translit { color: var(--gold); font-style: italic; font-size: 1.05rem; }
.comp-en { color: var(--text); margin-top: 10px; font-size: 1rem; }
.comp-detail { color: var(--text-dim); font-size: .9rem; line-height: 1.6; margin-top: 16px; max-width: 460px; align-self: center; }
.comp-hint { color: var(--text-dim); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 30px; }

/* ---------- shape + business + admin ---------- */
.shape-form { display: flex; gap: 8px; margin-bottom: 16px; }
.shape-form input { flex: 1; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 12px 16px; }
.idea-row { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px; }
.vote { display: flex; flex-direction: column; align-items: center; color: var(--text-dim); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; min-width: 44px; }
.vote.on { color: #21190a; background: var(--gold); border-color: var(--gold); }
.v-count { font-size: .82rem; font-weight: 700; }
.idea-text { flex: 1; font-size: .92rem; line-height: 1.5; padding-top: 4px; }
.idea-status { color: var(--good); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.biz-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px; }
.biz-card.probono { border-color: var(--gold-dim); }
.biz-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.biz-card p { color: var(--text-dim); font-size: .86rem; line-height: 1.55; margin-bottom: 12px; }
.biz-card textarea, .biz-card input { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin-bottom: 8px; font-family: inherit; }
.admin-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 8px; font-size: .84rem; line-height: 1.55; }

/* ---------- menu grid ---------- */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.menu-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 12px; font-size: .9rem; font-weight: 500; text-align: left; color: var(--text);
  transition: background .2s;
}
.menu-item:hover { background: var(--surface-2); color: var(--gold-bright); }

/* ---------- home dashboard + toggle + back fab ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 4px; }
.dash-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 4px 10px; font-size: .64rem; color: var(--text-dim); letter-spacing: .02em;
  transition: background .2s, color .2s;
}
.dash-item:hover { background: var(--surface-2); color: var(--gold-bright); }
.dash-item:active { transform: scale(.95); }
.di-icon { width: 26px; height: 26px; color: var(--gold); }
.di-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.toggle-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--gold-dim); border-radius: var(--r-pill);
  padding: 10px 16px; font-size: .85rem; color: var(--text-dim); font-weight: 600;
  transition: all .25s;
}
.tp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-dim); transition: all .25s; }
.toggle-pill.on { background: var(--gold); color: #21190a; border-color: var(--gold); box-shadow: 0 4px 18px rgba(214,178,94,.3); }
.toggle-pill.on .tp-dot { background: #0b3d2e; }
.back-fab {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 14px; z-index: 120;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--gold-dim); color: var(--gold);
  font-size: 1.2rem; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.back-fab[hidden] { display: none; }
.nav-back {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--gold-dim); color: var(--gold);
  font-size: 1.15rem; margin-right: 4px;
}
.nav-back[hidden] { display: none; }
.nav-title { flex: 1; text-align: center; color: var(--gold); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

/* ---------- ayah card nav + quran language + per-ayah play ---------- */
.ac-top, .ac-foot { display: flex; align-items: center; justify-content: space-between; }
.ac-nav { display: flex; gap: 6px; }
.ac-arrow { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); color: var(--gold); font-size: 1.1rem; line-height: 1; }
.ac-arrow:hover { border-color: var(--gold-dim); }
.ac-foot { margin-top: 8px; }
.quran-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.quran-bar .surah-search { margin-bottom: 0; flex: 1; }
.lang-select { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0 14px; }
.ayah { position: relative; padding-right: 46px; }
.ay-play {
  position: absolute; right: 8px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--gold-dim); color: var(--gold); font-size: .7rem;
}
.ayah.playing { border-color: var(--gold); background: var(--surface-2); }
.ayah.playing .ay-ar { color: var(--gold-bright); }
.ay-en.rtl { direction: rtl; text-align: right; font-size: 1.02rem; }

/* ---------- voice picker ---------- */
.voice-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; margin-bottom: 9px; }
.voice-row.sel { border-color: var(--gold); }
.vr-info { flex: 1; font-size: .92rem; }
.vr-note { display: block; color: var(--text-dim); font-size: .72rem; }

/* ---------- chat chips ---------- */
.chat-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chat-chips .chip { border: 1px solid var(--gold-dim); color: var(--gold); border-radius: var(--r-pill); padding: 8px 13px; font-size: .78rem; }
.chat-chips[hidden] { display: none; }

/* ---------- guide card thumbnails ---------- */
.guide-card { position: relative; overflow: hidden; }
.gc-thumb { position: absolute; right: 6px; bottom: 4px; width: 52px; opacity: .85; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.guide-card.inprog { border-color: var(--gold-dim); }

/* ---------- announcements + install + ramadan + goal ---------- */
.ann-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, #3a2c0c, var(--surface));
  border: 1px solid var(--gold); border-radius: var(--r-md);
  padding: 0 10px 0 14px; margin-top: 10px; font-size: .86rem; line-height: 1;
  height: 38px; overflow: hidden;            /* HARD: one line, never taller */
}
.ann-track { flex: 1; min-width: 0; overflow: hidden; position: relative; height: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ann-run { position: absolute; top: 0; left: 0; height: 100%; display: inline-flex; align-items: center;
  white-space: nowrap; color: var(--text); text-decoration: none;
  animation: ann-scroll var(--ann-dur, 18s) linear infinite; }
/* the text is rendered twice with a gap; scrolling exactly half the run makes a seamless
   loop, and the first copy sits at x=0 so the bar is never empty (Aamir 2026-08-28) */
.ann-run .ann-copy { padding-right: 64px; }
.ann-run.ann-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.ann-run:hover, .ann-banner:hover .ann-run { animation-play-state: paused; }
@keyframes ann-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ann-run { animation: none; position: static; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; line-height: 38px; } .ann-run .ann-copy + .ann-copy { display: none; } }
.ann-mark { color: var(--gold); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; font-weight: 700; }
.ann-x { color: var(--text-dim); font-size: 1.2rem; margin-left: auto; padding: 0 4px; }
.install-row { margin: 14px 0 4px; }
.a2hs-step { padding: 9px 0; font-size: .92rem; line-height: 1.6; color: var(--text); border-bottom: 1px solid rgba(255,255,255,.06); }
.a2hs-step b { color: var(--gold-bright); }
.a2hs-ico { display: inline-block; border: 1px solid var(--gold-dim); border-radius: 6px; padding: 0 7px; color: var(--gold); }
.ram-hero { text-align: center; padding: 26px 0 18px; }
.ram-big { font-size: 3rem; font-weight: 300; color: var(--gold-bright); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.ram-label { color: var(--gold); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin: 4px 0; }
.ram-sub { color: var(--text-dim); font-size: .84rem; margin-top: 6px; }
.ram-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 18px 0; }
.ram-day { text-align: center; padding: 9px 0; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text-dim); font-size: .84rem; font-variant-numeric: tabular-nums; }
.ram-day.past { opacity: .45; }
.ram-day.today { background: var(--gold); color: #21190a; font-weight: 700; border-color: var(--gold); }
.goal-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.goal-bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 10px 0; }
.goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }
.makkah-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px; }

/* ---------- daily cards + tools ---------- */
.shukr-row { display: flex; gap: 8px; margin-top: 4px; }
.shukr-row input { flex: 1; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.shukr-row input:focus { outline: none; border-color: var(--gold-dim); }
.shukr-text { font-style: italic; color: var(--gold-bright); font-size: .95rem; line-height: 1.5; }
.ayah-card.shukr { border-color: var(--gold-dim); }
.zform label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: .86rem; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,.05); }
.zform label:last-of-type { border-bottom: 0; }
.zform input { width: 130px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; text-align: right; }
.zform .pill { margin: 12px 0; }
.zr-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .9rem; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,.05); }
.zr-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.zr-row.due b { color: var(--gold-bright); font-size: 1.05rem; }
.zr-row.ok span { color: var(--good); }
.conv-out { margin-top: 14px; text-align: center; font-size: 1.05rem; color: var(--gold-bright); min-height: 1.4em; }
.pillar-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.pillar-head b { font-size: 1.05rem; }
.pillar-head .ar { color: var(--gold-bright); font-size: 1.2rem; }

/* ---------- how-it-works + a2hs animation ---------- */
.hiw-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; margin-bottom: 14px; }
.hiw-card h3 { font-size: 1.02rem; margin-bottom: 12px; color: var(--gold-bright); }
.hiw-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.hiw-step { display: flex; gap: 11px; align-items: flex-start; font-size: .88rem; line-height: 1.55; color: var(--text-dim); }
.hiw-step b { min-width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #21190a; display: grid; place-items: center; font-size: .8rem; flex-shrink: 0; margin-top: 1px; }
.hiw-step span { color: var(--text); }
.a2hs-demo { display: flex; justify-content: center; margin: 6px 0 14px; }
.ad-phone { position: relative; width: 130px; height: 240px; border: 3px solid var(--gold-dim); border-radius: 22px; background: var(--surface-2); overflow: hidden; }
.ad-screen { position: absolute; inset: 10px 10px 34px; border-radius: 12px; background: var(--field); display: grid; place-items: center; }
.ad-appicon { width: 34px; height: 34px; border-radius: 9px; background: var(--gold); color: #21190a; display: grid; place-items: center; font-weight: 700; opacity: 0; animation: adIcon 6s infinite; }
.ad-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: var(--surface); display: grid; place-items: center; }
.ad-share { color: var(--gold); font-size: 1rem; animation: adShare 6s infinite; display: inline-block; }
.ad-sheet { position: absolute; left: 6px; right: 6px; bottom: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 0 0; padding: 8px; transform: translateY(120%); animation: adSheet 6s infinite; }
.ad-row { height: 16px; border-radius: 6px; background: var(--surface-2); margin-bottom: 6px; font-size: .56rem; color: var(--text-dim); display: flex; align-items: center; padding: 0 8px; }
.ad-row.hot { color: #21190a; background: var(--gold); font-weight: 700; animation: adHot 6s infinite; }
@keyframes adShare { 0%,18% { transform: scale(1); } 8% { transform: scale(1.5); } 30%,100% { transform: scale(1); } }
@keyframes adSheet { 0%,14% { transform: translateY(120%); } 24%,60% { transform: translateY(0); } 72%,100% { transform: translateY(120%); } }
@keyframes adHot { 0%,32% { filter: brightness(1); } 42%,52% { filter: brightness(1.35); } 62%,100% { filter: brightness(1); } }
@keyframes adIcon { 0%,64% { opacity: 0; transform: scale(.4); } 74%,92% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ad-share, .ad-sheet, .ad-row.hot, .ad-appicon { animation: none; } .ad-sheet { transform: translateY(0); } .ad-appicon { opacity: 1; } }

/* ---------- listening mode + adhan overlay ---------- */
.beta-tag { font-size: .6em; background: var(--gold); color: #21190a; border-radius: 6px; padding: 2px 8px; vertical-align: middle; letter-spacing: .08em; }
.listen-stage { text-align: center; margin-top: 14px; }
.listen-hint { color: var(--text-dim); font-size: .84rem; margin: 14px auto; max-width: 340px; line-height: 1.55; }
.listen-heard { font-family: var(--font-ar); color: var(--text-dim); font-size: 1.1rem; min-height: 1.6em; direction: rtl; }
.listen-result { background: var(--surface); border: 1px solid var(--gold-dim); border-radius: var(--r-lg); padding: 18px; margin-top: 16px; text-align: right; }
.listen-result .ac-en { text-align: left; }
.listen-result .ac-ref { text-align: left; }
#listenBtn.rec { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.adhan-overlay[hidden] { display: none; }
.adhan-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(4, 18, 14, .88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ao-card { background: var(--surface); border: 1px solid var(--gold-dim); border-radius: var(--r-lg); padding: 22px 20px; max-width: 420px; max-height: 84vh; overflow-y: auto; }
.ao-head { font-family: var(--font-ar), Georgia, serif; color: var(--gold); font-size: 1rem; letter-spacing: .06em; margin-bottom: 14px; text-align: center; }
.ao-phrase { border-bottom: 1px solid rgba(255,255,255,.06); padding: 10px 0; }
.ao-phrase:last-of-type { border-bottom: 0; }
.ao-ar { font-family: var(--font-ar); font-size: 1.25rem; color: var(--gold-bright); direction: rtl; text-align: right; }
.ao-tr { color: var(--gold); font-style: italic; font-size: .82rem; }
.ao-en { color: var(--text-dim); font-size: .82rem; }
.ao-card .pill { width: 100%; margin-top: 14px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(7, 31, 24, .92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: stretch;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-dim); font-size: .66rem; letter-spacing: .04em;
  transition: color .2s;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tab.active { color: var(--gold-bright); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--gold-dim); border-radius: var(--r-pill);
  padding: 11px 20px; font-size: .86rem; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 400; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 700px) {
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-prayer { font-size: 3rem; }
}
