/* Rawaq site (task 186) — «سكينة»: one day of prayer, the sky follows the scroll (src/site.js sets the vars). */
:root {
  --g0: #dce2f2; --g1: #eae6f0; --g2: #f6eee6;
  --ink: #1e2140; --sub: #4a4e70; --accent: #5b5fa8; --on-accent: #fff;
  --card: rgba(255, 255, 255, 0.6); --line: rgba(30, 33, 64, 0.14); --night: 0;
  --kufi: 'Reem Kufi', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --sans: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 16px;
}
/* Per-period tokens (DESIGN.md §2). Without JS each section carries its own; with JS the root vars animate. */
.t-dhuhr, html:not(.js) .s[data-p='1'] { --g0: #ddebf3; --g1: #eef2ec; --g2: #f7f1e3; --ink: #14303d; --sub: #46606b; --accent: #2e7a8c; --line: rgba(20, 48, 61, 0.14); }
.t-asr, html:not(.js) .s[data-p='2'], body.page { --g0: #faf2e3; --g1: #f6ead8; --g2: #f2e0cb; --ink: #2a1c10; --sub: #6a5140; --accent: #a8561f; --line: rgba(42, 28, 16, 0.14); }
html:not(.js) .s[data-p='3'] { --g0: #f9e7dc; --g1: #f5ddd5; --g2: #eed6dc; --ink: #2b1218; --sub: #5a2e36; --accent: #9c3b4e; --line: rgba(43, 18, 24, 0.16); }
html:not(.js) .s[data-p='4'] { --g0: #141c3a; --g1: #1c2648; --g2: #253058; --ink: #f1ece2; --sub: #a9afcb; --accent: #d9a95b; --on-accent: #0e1633; --card: rgba(255, 255, 255, 0.08); --line: rgba(241, 236, 226, 0.16); --night: 1; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.7; color: var(--ink);
  background: linear-gradient(180deg, var(--g0), var(--g1) 55%, var(--g2)) fixed; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html.js body.home { background: var(--g1); }
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h2 { font-family: var(--kufi); font-weight: 600; font-size: clamp(30px, 4.6vw, 46px); }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 28px; } }
.accent { color: var(--accent); }

/* ── Sky ── */
.sky { display: none; }
html.js .home .sky {
  display: block; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--g0), var(--g1) 55%, var(--g2));
}
/* Task 192: sun and moon live inside a clip that ends at the horizon's ground line — they set / rise behind it. */
.sunclip { position: absolute; inset: 0 0 calc(max(14vh, 90px) * 0.1625) 0; overflow: hidden; }
.sun { position: absolute; top: 0; left: 0; width: 220px; height: 220px; will-change: transform; transform-origin: center; }
.sun i { position: absolute; inset: 0; border-radius: 50%; }
.sun .hi { background: radial-gradient(circle, #fffbf2 0 13%, #fff9ec 20%, rgba(255, 228, 160, 0.4) 38%, rgba(255, 217, 160, 0) 66%); }
.sun .lo { opacity: 0; background: radial-gradient(circle, #ffe7c0 0 12%, #ffb067 19%, rgba(255, 128, 56, 0.5) 38%, rgba(232, 92, 40, 0) 68%); }
.moon { position: absolute; top: 0; left: 0; width: 76px; height: 76px; will-change: transform; }
.moon::before { content: ''; position: absolute; inset: -70%; border-radius: 50%; opacity: var(--halo, 0); background: radial-gradient(circle, rgba(226, 232, 255, 0.34), rgba(226, 232, 255, 0) 64%); }
.moon svg { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 14px rgba(243, 228, 194, 0.5)); }
.dusk { position: absolute; inset-inline: 0; bottom: 0; height: 48vh; opacity: 0; background: linear-gradient(to top, rgba(255, 138, 72, 0.42), rgba(255, 170, 110, 0.16) 45%, rgba(255, 170, 110, 0)); }
/* Task 194: meteors — a bright head with a soft glow and a tapering tail (rotation + position set per flight). */
.meteor { position: absolute; left: 0; top: 0; height: 2px; opacity: 0; pointer-events: none; transform-origin: 100% 50%; }
.meteor::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(220, 230, 255, 0.35) 55%, rgba(255, 255, 255, 0.95)); clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.meteor::after { content: ''; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.75), 0 0 14px 5px rgba(200, 215, 255, 0.35); }
.cta-moon svg { width: 100%; height: 100%; display: block; }
.stars { position: absolute; inset: 0; }
/* Each star appears at its own point of the night (--t vs --sn); the twinkle is on its own layer. */
.stars i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); opacity: clamp(0, calc((var(--sn, 0) - var(--t)) / 0.25), 1); }
.stars i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #fff8e8; animation: twinkle var(--d) ease-in-out var(--dl) infinite alternate; }
@keyframes twinkle { from { opacity: 0.2; } to { opacity: 1; } }
.horizon { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 14vh; min-height: 90px; color: #0b1230; }
.horizon .hz { opacity: 0.07; }
.horizon .lights { opacity: 0; fill: #ffd27a; filter: drop-shadow(0 0 3px rgba(255, 196, 92, 0.9)); }

/* Period indicator «الفجر ● ○ ○ ○ ○» */
.period {
  position: fixed; z-index: 20; inset-block-end: 14px; inset-inline-start: 14px; display: none; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  font-size: 13px; font-weight: 600; color: var(--ink);
}
html.js .home .period { display: inline-flex; pointer-events: none; transition: opacity 0.3s, transform 0.3s; }
.period.off { opacity: 0; transform: translateY(10px); }
@media (max-width: 720px) {
  .period { inset-block-end: max(10px, env(safe-area-inset-bottom)); inset-inline-start: 10px; height: 28px; padding: 0 10px; gap: 7px; font-size: 12px; }
  .pdots { gap: 4px; }
  .pdots i { width: 6px; height: 6px; border-width: 1.25px; }
}
.pdots { display: inline-flex; gap: 5px; }
.pdots i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--sub); transition: background 0.3s, border-color 0.3s; }
.pdots i.on { background: var(--accent); border-color: var(--accent); }

/* ── Header ── */
.top { position: fixed; z-index: 30; inset-inline: 0; top: 0; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.top.scrolled, html:not(.js) .top, body.page .top {
  background: var(--card); border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
/* Task 192: the bar is the sky colour (97%) — sun / moon glows never show through it. */
.top.scrolled, html:not(.js) .top, body.page .top { background: color-mix(in srgb, var(--g0) 97%, transparent); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--kufi); font-size: 24px; font-weight: 600; min-height: 44px; }
.brand svg { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--card); }
.nav .lang { border: 1px solid var(--line); }
@media (max-width: 720px) { .hide-sm { display: none !important; } }

/* ── Sections ── */
.s { position: relative; padding-block: clamp(72px, 10vw, 128px); }
html:not(.js) .s { background: linear-gradient(180deg, var(--g0), var(--g1) 55%, var(--g2)); color: var(--ink); }
.sec-head { max-width: 640px; margin-bottom: 40px; }
.sec-head p { color: var(--sub); margin-top: 12px; font-size: 18px; }

/* Store badge (black, Play mark, our text) */
.badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 18px; min-height: 56px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.55); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.badge:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -16px rgba(0, 0, 0, 0.6); }
.badge .gp { width: 26px; height: 28px; flex: none; }
.badge span { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.badge small { font-size: 11px; letter-spacing: 0.04em; opacity: 0.85; }
.badge b { font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; font-size: 21px; font-weight: 600; direction: ltr; }
.badge.big { padding: 14px 28px 14px 22px; min-height: 66px; }
.badge.big b { font-size: 25px; }

/* ── Hero (Fajr) ── */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 104px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.5fr); align-items: center; gap: 56px; }
.hero h1 { font-family: var(--kufi); font-weight: 600; font-size: clamp(44px, 6vw, 78px); line-height: 1.12; }
.hero h1 span { display: block; white-space: nowrap; }
@media (max-width: 520px) { .hero h1 span { white-space: normal; } }
.hero .sub { color: var(--sub); font-size: clamp(18px, 2vw, 21px); margin: 22px 0 32px; max-width: 520px; }
.note { color: var(--sub); font-size: 14px; margin-top: 16px; }
.hero-phone { display: flex; justify-content: center; perspective: 1400px; }
.tilt { transition: transform 0.4s var(--ease); transform-style: preserve-3d; }
.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 96px; }
  .hero-in { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero .sub { margin-inline: auto; }
}

/* ── Phone mockup ── */
.device {
  --w: 300px; --bezel: 9px; position: relative; width: var(--w); max-width: 76vw; padding: var(--bezel); border-radius: 48px;
  background: #1a1a1f; container-type: inline-size;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.35),
    0 60px 90px -40px rgba(14, 12, 40, 0.45), 0 24px 44px -24px rgba(14, 12, 40, 0.35);
}
.device::before, .device::after { content: ''; position: absolute; width: 2.5px; border-radius: 2px; background: #2a2a31; }
.device::before { inset-inline-end: -2.5px; top: 24%; height: 68px; }
.device::after { inset-inline-start: -2.5px; top: 19%; height: 40px; box-shadow: 0 54px 0 #2a2a31; }
/* Screen corner = frame radius − bezel. The top strip (the app's own top colour) holds the notch. */
.screen { position: relative; border-radius: calc(48px - var(--bezel)); overflow: hidden; background: var(--top, #f9f0e1); padding-top: 9cqw; isolation: isolate; }
.stack { position: relative; aspect-ratio: 600 / 1275; }
.stack picture, .stack img { display: block; width: 100%; height: 100%; }
.stack img { object-fit: cover; }
.screen::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 34%); }
.island { position: absolute; z-index: 3; top: 2.2cqw; left: 50%; transform: translateX(-50%); width: 30%; height: 6.2cqw; border-radius: 999px; background: #050507; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }

/* ── Pinned phone story (Dhuhr → Asr) ── */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.story-phone { position: sticky; top: calc(50vh - 320px); align-self: start; display: flex; justify-content: center; }
.story-phone .device { --w: 290px; }
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity 0.55s var(--ease); }
.shot.on { opacity: 1; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 76vh; display: flex; align-items: center; }
.step-txt { max-width: 440px; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.step h3 { font-family: var(--kufi); font-weight: 600; font-size: clamp(24px, 3vw, 32px); margin-bottom: 10px; }
.step p { color: var(--sub); font-size: 18px; }
.step-phone { display: none; }
@media (max-width: 959px) {
  .story-grid { display: block; }
  .story-phone { display: none; }
  .step { min-height: 0; display: grid; gap: 28px; justify-items: center; text-align: center; margin-block: 56px; }
  .step-phone { display: flex; }
  .step-phone .device { --w: 270px; }
}
html:not(.js) .story-phone { display: none; }
html:not(.js) .step { min-height: 0; display: grid; grid-template-columns: 1fr auto; gap: 40px; margin-block: 48px; }
html:not(.js) .step-phone { display: flex; }

/* ── Feature grid (Asr) ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); margin-bottom: 16px; }
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--sub); font-size: 15.5px; }
@media (min-width: 640px) {
  .card.wide { grid-column: span 2; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-content: center; }
  .card.wide .ic { grid-row: span 2; width: 60px; height: 60px; border-radius: 18px; }
  .card.wide .ic svg { width: 30px; height: 30px; }
  .card.wide h3 { font-size: 21px; }
}

/* ── Notifications (Maghrib) ── */
.shade { max-width: 460px; margin-inline: auto; }
.notifs { display: flex; flex-direction: column; }
.notif {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 18px 36px -24px rgba(30, 10, 20, 0.45);
}
.notif .tile { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--tc); color: #fff; }
.notif .tile svg { width: 22px; height: 22px; }
.notif .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.notif small { color: var(--sub); font-size: 14px; }
.notif .btn { flex: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--tc); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.2s; }
.alerts .sec-head { margin-inline: auto; text-align: center; }
.s.alerts { padding-bottom: clamp(40px, 5vw, 64px); }
.s.night { padding-top: clamp(40px, 5vw, 64px); }

/* ── Privacy + FAQ (Isha) ── */
.privacy { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 4vw, 44px); margin-bottom: 72px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.privacy .sec-head { margin-bottom: 28px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { text-align: center; padding: 16px 8px; border-radius: 20px; border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--kufi); font-size: clamp(30px, 5vw, 44px); font-weight: 600; color: var(--accent); line-height: 1.2; }
.stat span { color: var(--sub); font-size: 14px; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.faq { max-width: 780px; }
.faq h2 { margin-bottom: 20px; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 18px; padding-block: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.chev { width: 12px; height: 12px; flex: none; border-inline-end: 2px solid var(--accent); border-block-end: 2px solid var(--accent); transform: rotate(45deg); transition: transform 0.3s var(--ease); margin-top: -6px; }
.qa[open] .chev { transform: rotate(225deg); margin-top: 6px; }
.qa .a { overflow: hidden; }
.qa .a p { color: var(--sub); padding-bottom: 20px; }

/* ── Final CTA (Isha) ── */
.cta { padding-top: clamp(150px, 22vh, 250px); padding-bottom: clamp(140px, 18vw, 220px); }
.cta-in { text-align: center; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; }
.cta-moon { width: 96px; height: 96px; filter: drop-shadow(0 0 26px rgba(243, 228, 194, 0.6)); }
html.js .home .cta-moon { display: none; }
.cta-get { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.qr { display: none; margin: 0; }
.qr-code { display: block; width: 108px; height: 108px; border-radius: 12px; }
.qr figcaption { font-size: 12px; color: var(--sub); margin-top: 6px; }
@media (min-width: 900px) and (hover: hover) { .qr { display: block; } }
.cta h2 { font-size: clamp(46px, 8vw, 92px); }
.cta p { color: var(--sub); font-size: 19px; max-width: min(520px, 100%); margin-bottom: 14px; overflow-wrap: anywhere; }

/* ── Footer ── */
.foot { position: relative; padding: 36px 0 84px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--sub); background: var(--card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
html.js .home .foot { color: var(--sub); }
.foot .wrap { display: grid; gap: 12px; justify-items: center; }
.social { display: flex; gap: 8px; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.social svg { width: 22px; height: 22px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.links a, .contact a { color: var(--ink); text-decoration: none; padding: 10px 8px; display: inline-block; }
.links a:hover, .contact a:hover { text-decoration: underline; }

/* ── Legal pages + 404 ── */
.legal { max-width: 780px; padding-top: 112px; padding-bottom: 72px; }
.legal > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.legal h1 { font-family: var(--kufi); font-weight: 600; font-size: clamp(32px, 5vw, 46px); margin: 12px 0 6px; }
.legal .updated { color: var(--sub); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-family: var(--sans); font-weight: 700; font-size: 21px; margin: 34px 0 10px; }
.legal p { margin: 0 0 12px; color: var(--ink); }
.center { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 12px; padding-top: 96px; }
.center h1 { font-family: var(--kufi); font-weight: 500; font-size: 36px; }

/* ── Reveals (JS only; without JS everything is visible) ── */
html.js .rv { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js .rv.drop { transform: translateY(-24px); }
html.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .stars i::after { animation: none; }
  .meteor { display: none; }
  .tilt, .shot, .badge, .chev, .pdots i { transition: none; }
  html.js .rv { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 380px) {
  .badge { padding-inline: 16px 18px; }
  .stats { gap: 8px; }
  .stat span { font-size: 12.5px; }
}

/* ── Task 188: notification shade demo ── */
.k-prayer { --tc: var(--accent); }
.k-habit { --tc: #2e7a5c; }
.k-task { --tc: #b0662b; }
.notif { margin-bottom: 14px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; transition: background 0.35s; }
.notif .tr { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.notif .when { flex: none; font-size: 12px; color: var(--sub); }
.notif .btn:active { transform: scale(0.94); }
.notif .btn .ok { display: none; width: 18px; height: 18px; }
.notif.done { background: color-mix(in srgb, var(--tc) 16%, var(--card)); }
.notif.done .btn { background: var(--tc); color: #fff; border-color: transparent; }
.notif.done .btn .lbl { display: none; }
.notif.done .btn .ok { display: block; animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop { from { transform: scale(0.3); } to { transform: scale(1); } }
html.js .notif { opacity: 0; transform: translateY(-38px) scale(0.95); }
html.js .notif.arrived { opacity: 1; transform: none; transition: transform 0.75s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, background 0.35s; }
.caught-in { display: grid; justify-items: center; gap: 12px; padding: 18px 0 4px; text-align: center; animation: fadeup 0.5s var(--ease); }
.caught-in[hidden] { display: none; }
.caught-in p { font-family: var(--kufi); font-size: 22px; font-weight: 600; }
.replay { font: inherit; font-weight: 600; font-size: 15px; color: var(--accent); background: var(--card); border: 1px solid var(--line); border-radius: 999px; min-height: 44px; padding: 0 22px; cursor: pointer; }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Task 188: living feature cards ── */
.card { position: relative; overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s; }
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
}
.card > * { position: relative; }
@media (hover: hover) {
  .card:hover::before { opacity: 1; }
  .card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 22px 44px -28px color-mix(in srgb, var(--accent) 55%, transparent); }
}
html.js .card .ic path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease) 0.25s; }
html.js .card.in .ic path { stroke-dashoffset: 0; }
.card .ic svg { transform-origin: 50% 50%; }
@media (hover: hover) { .card:hover .ic svg { animation: var(--anim, bob) 0.9s var(--ease); } }
.card.play .ic svg { animation: var(--anim, bob) 0.9s var(--ease); }
.card[data-ic='bell'] { --anim: ring; }
.card[data-ic='bell'] .ic svg { transform-origin: 50% 12%; }
.card[data-ic='moon'] { --anim: rock; }
.card[data-ic='compass'] { --anim: turn; }
.card[data-ic='cycle'] { --anim: spin; }
.card[data-ic='heart'] { --anim: beat; }
.card[data-ic='book'] { --anim: open; }
.card[data-ic='clock'] { --anim: tick; }
@keyframes bob { 40% { transform: translateY(-4px); } 100% { transform: none; } }
@keyframes ring { 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } 100% { transform: none; } }
@keyframes rock { 30% { transform: rotate(-14deg); } 65% { transform: rotate(9deg); } 100% { transform: none; } }
@keyframes turn { 35% { transform: rotate(40deg); } 70% { transform: rotate(-12deg); } 100% { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes beat { 20% { transform: scale(1.2); } 40% { transform: scale(1); } 60% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes open { 40% { transform: scaleX(1.18); } 100% { transform: none; } }
@keyframes tick { 30% { transform: rotate(18deg); } 60% { transform: rotate(-6deg); } 100% { transform: none; } }

/* Live mini widget (styled like the app widget, Asr look) */
.card.wide { gap: 20px; }
.mini {
  justify-self: end; width: 200px; padding: 14px 16px; border-radius: 22px; color: #2a1c10; display: grid; gap: 6px;
  background: linear-gradient(160deg, #faf2e3, #f2e0cb); box-shadow: 0 16px 30px -18px rgba(42, 28, 16, 0.45), inset 0 0 0 1px rgba(42, 28, 16, 0.08);
}
.mini-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #6a5140; }
.mini-top b { font-family: var(--kufi); font-size: 17px; color: #2a1c10; }
.mini-count { font-size: 30px; font-weight: 700; letter-spacing: 0.01em; direction: ltr; text-align: center; font-variant-numeric: tabular-nums; }
.mini-dots { display: flex; justify-content: center; gap: 7px; }
.mini-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #a8561f; }
.mini-dots i.on { background: #a8561f; }
.mini-dots i.nx { box-shadow: 0 0 0 3px rgba(168, 86, 31, 0.18); }
.mini-btn { justify-self: center; font-size: 12px; font-weight: 700; color: #fff; background: #2a1c10; border-radius: 999px; padding: 4px 14px; margin-top: 2px; }
@media (min-width: 640px) {
  .card.wide { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .card.wide .card-txt { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-content: center; }
}
@media (max-width: 639px) { .mini { justify-self: stretch; width: auto; margin-top: 16px; } }

/* ── Task 188: privacy illustration ── */
.privacy { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: center; }
.privacy-art { width: 100%; height: auto; overflow: visible; }
.privacy-art .phone { fill: var(--card); stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 2; }
.privacy-art .phone-in { fill: none; stroke: var(--line); stroke-width: 1.5; }
.privacy-art .cloud { fill: none; stroke: var(--sub); stroke-width: 2; stroke-dasharray: 5 6; opacity: 0.55; }
.privacy-art .glow { fill: #d9a95b; opacity: 0.16; transform-box: fill-box; transform-origin: center; animation: glow 4s ease-in-out infinite; }
.privacy-art .shield { fill: color-mix(in srgb, #d9a95b 22%, transparent); stroke: #d9a95b; stroke-width: 2.2; stroke-linejoin: round; }
.privacy-art .lock { fill: none; stroke: #d9a95b; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.privacy-art .data circle { fill: #f0c97a; filter: drop-shadow(0 0 4px rgba(240, 201, 122, 0.9)); animation: drift 7s ease-in-out infinite alternate; }
.privacy-art .data circle:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
.privacy-art .data circle:nth-child(3) { animation-duration: 6.5s; animation-delay: -4s; }
.privacy-art .data circle:nth-child(4) { animation-duration: 9s; animation-delay: -1s; }
.privacy-art .data circle:nth-child(5) { animation-duration: 7.5s; animation-delay: -3s; }
.privacy-art .data circle:nth-child(6) { animation-duration: 8s; animation-delay: -5s; }
.privacy-art .data circle:nth-child(7) { animation-duration: 6s; animation-delay: -2.5s; }
@keyframes glow { 0%, 70%, 100% { opacity: 0.12; transform: scale(0.92); } 85% { opacity: 0.32; transform: scale(1.08); } }
@keyframes drift { 0% { transform: translate(0, 0); } 33% { transform: translate(8px, -10px); } 66% { transform: translate(-7px, 6px); } 100% { transform: translate(5px, 9px); } }
@media (max-width: 760px) {
  .privacy { grid-template-columns: 1fr; gap: 12px; }
  .privacy-art { order: -1; max-width: 210px; justify-self: center; }
}

/* ── Task 188: centred FAQ ── */
.faq { max-width: 760px; margin-inline: auto; }
.faq h2 { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html.js .notif { opacity: 1; transform: none; }
  html.js .card .ic path { stroke-dashoffset: 0; transition: none; }
  .card:hover .ic svg, .card.play .ic svg, .privacy-art .glow, .privacy-art .data circle, .caught-in, .notif.done .btn .ok { animation: none !important; }
}

/* ── Task 191: «تنافسوا في الخير» ── */
.compete .sec-head { margin-inline: auto; text-align: center; }
.ayah { margin: 22px auto 0; padding: 0; }
.ayah p { font-family: 'Amiri', 'Reem Kufi', serif; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.9; color: var(--ink); }
.ayah cite { display: block; font-style: normal; font-size: 13px; color: var(--sub); margin-top: 2px; }
.board { max-width: 560px; margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 14px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 24px 50px -32px rgba(43, 18, 24, 0.45); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; border: 1px solid var(--line); margin-bottom: 10px; }
.tabs button { font: inherit; font-weight: 600; font-size: 15px; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: background 0.25s, color 0.25s; }
.tabs button[aria-selected='true'] { background: var(--ink); color: var(--g1); }
.pan { list-style: none; margin: 0; padding: 0; }
.pan[hidden] { display: none; }
.mem, .g { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.mem:last-child, .g:last-child { border-bottom: 0; }
.av { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--av); color: #fff; font-weight: 700; font-size: 16px; }
.mi { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ms { display: inline-flex; align-items: center; gap: 4px; color: var(--sub); font-size: 13px; }
.ms svg, .sc svg { width: 15px; height: 15px; color: var(--accent); }
.ms .dot { margin-inline: 4px; }
.cheer { position: relative; font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--accent); cursor: pointer; transition: transform 0.2s, background 0.25s, color 0.25s; }
.cheer:active { transform: scale(0.94); }
.cheer .cc { font-size: 12px; min-width: 20px; height: 20px; border-radius: 999px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cheer.sent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.cheer.sent .cc { background: rgba(255, 255, 255, 0.25); }
.spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #f0a3b4; pointer-events: none; animation: spark 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.spark:nth-child(odd) { background: #f0c97a; }
@keyframes spark { from { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateY(-34px) scale(0.3); opacity: 0; } }
.g .rk { width: 22px; flex: none; text-align: center; font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; }
.g b { flex: 1; }
.g .sc { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g.me { border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, transparent); border-bottom-color: transparent; }
.g.me b { color: var(--accent); }
.g.me.up { animation: meglow 1.6s ease-out 0.5s; }
@keyframes meglow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.board-note { font-size: 13px; color: var(--sub); text-align: center; padding: 10px 8px 4px; }
@media (prefers-reduced-motion: reduce) { .spark, .g.me.up { animation: none; } }

/* ── Task 195: pre-dawn light, birds, 8-stage pill, widget city ── */
.dawn { position: absolute; inset-inline: 0; bottom: 0; height: 42vh; opacity: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(255, 196, 178, 0.42), rgba(246, 206, 214, 0.26) 30%, rgba(196, 210, 240, 0.14) 60%, rgba(196, 210, 240, 0)); }
/* Task 204: birds — compact V seen from below, flap-and-glide driven per frame by site.js; hidden when idle; far layer lighter. */
.flock { position: absolute; inset: 0; pointer-events: none; }
.bird { position: absolute; left: 0; top: 0; width: 38px; height: 26px; margin: -16px 0 0 -19px; visibility: hidden; opacity: 0; will-change: transform, opacity; }
.bird svg { filter: blur(0.3px); }
.bird svg { display: block; width: 100%; height: 100%; overflow: visible; fill: var(--ink); }
.bird.far svg { fill: color-mix(in srgb, var(--ink) 55%, var(--g1)); }
.pname { transition: opacity 0.17s; }
.pname.fade { opacity: 0; }
.pdots { gap: 4px; }
.pdots i { width: 6px; height: 6px; }
@media (max-width: 720px) { .pdots { gap: 3px; } .pdots i { width: 5px; height: 5px; } }
.mini-city { justify-self: center; font-size: 11px; color: #6a5140; margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { .flock, .dawn { display: none; } .bird { display: none; } }

/* Task 198: when the sun passes a phone mockup, a soft copy is drawn above it (screen blend) — never hidden. */
.suntop { position: fixed; inset: 0 0 calc(max(14vh, 90px) * 0.1625) 0; z-index: 5; overflow: hidden; pointer-events: none; mix-blend-mode: screen; display: none; }
html.js .home .suntop { display: block; }
.suntop .sun { opacity: 0; transition: opacity 0.25s; }
@media (prefers-reduced-motion: reduce) { .suntop .sun { transition: none; } }
