@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Amiri:wght@400;700&family=Reem+Kufi:wght@400;600;700&display=swap');

* { margin:0; padding:0; box-sizing:border-box; -webkit-font-smoothing:antialiased; }
button { font-family:inherit; border:none; background:none; cursor:pointer; color:inherit; }
input,select { font-family:inherit; }

:root { --r:24px; }

/* ===== themes ===== */
body[data-theme="light"] {
  --bg: radial-gradient(700px 380px at 15% 0%, rgba(255,205,112,.35), transparent 60%),
        radial-gradient(700px 420px at 95% 12%, rgba(168,230,207,.55), transparent 60%),
        radial-gradient(800px 500px at 0% 70%, rgba(180,206,255,.4), transparent 60%),
        radial-gradient(700px 500px at 100% 95%, rgba(255,196,214,.4), transparent 60%),
        linear-gradient(180deg,#fdf9ef, #f2f8f3 55%, #f4f6fd);
  --ink:#1f4038; --ink2:#4c6b62;
  --card:linear-gradient(150deg,#ffffff,#f3faf6);
  --card-brd:rgba(255,255,255,.95);
  --gold:#c9962a; --gold2:#e8b53e; --gold3:#8a6d1f;
  --accent:#159a76; --accent2:#17b98e;
  --hero:linear-gradient(140deg,#12a37d 0%,#17b98e 45%,#5fd4ae 100%);
  --hero-ink:#fff; --hero-sub:#eafcf4;
  --shadow:rgba(46,94,78,.16);
  --pattern-c:%23159a76;
  --nav-bg:linear-gradient(160deg,#ffffff,#f0f7f3);
  --nav-fade:rgba(248,251,249,0), rgba(248,251,249,.95) 30%;
  --chip:linear-gradient(160deg,#ffffff,#eef5f1);
  --input:#eef5f1;
}
body[data-theme="night"] {
  --bg: radial-gradient(1200px 500px at 50% -120px, rgba(38,120,88,.45), transparent 60%),
        radial-gradient(800px 500px at 90% 110%, rgba(212,175,55,.12), transparent 55%),
        linear-gradient(180deg,#0a241b,#04120d 70%);
  --ink:#f5edd8; --ink2:#9fd8c0;
  --card:linear-gradient(150deg,#16493a 0%,#0d3024 45%,#08221a 100%);
  --card-brd:rgba(212,175,55,.28);
  --gold:#d4af37; --gold2:#f3d67b; --gold3:#f3d67b;
  --accent:#2a8a64; --accent2:#5ec49b;
  --hero:linear-gradient(140deg,#0f5c44 0%,#14785a 50%,#1f9a72 100%);
  --hero-ink:#fff; --hero-sub:#d7f5e8;
  --shadow:rgba(0,0,0,.55);
  --pattern-c:%23d4af37;
  --nav-bg:linear-gradient(160deg,#123c2d,#071c14);
  --nav-fade:rgba(6,20,15,0), rgba(6,20,15,.95) 30%;
  --chip:linear-gradient(160deg,#113b2d,#081f17);
  --input:#0d2a1f;
}
body[data-theme="gold"] {
  --bg: radial-gradient(700px 400px at 20% 0%, rgba(255,220,140,.5), transparent 60%),
        radial-gradient(800px 500px at 90% 100%, rgba(200,150,50,.25), transparent 60%),
        linear-gradient(180deg,#f9efd8,#f3e6c6 60%,#efe0bd);
  --ink:#4a3809; --ink2:#7c5c10;
  --card:linear-gradient(150deg,#fffdf4,#f8efd8);
  --card-brd:rgba(255,250,230,.95);
  --gold:#a8842a; --gold2:#d9ab3a; --gold3:#7c5c10;
  --accent:#b8891f; --accent2:#d9ab3a;
  --hero:linear-gradient(140deg,#c9962a 0%,#e8b53e 50%,#f5d67b 100%);
  --hero-ink:#3f2f08; --hero-sub:#5c430a;
  --shadow:rgba(140,100,20,.2);
  --pattern-c:%23b8891f;
  --nav-bg:linear-gradient(160deg,#fffdf4,#f4ead0);
  --nav-fade:rgba(249,240,220,0), rgba(249,240,220,.95) 30%;
  --chip:linear-gradient(160deg,#fffdf4,#f4ead0);
  --input:#f4ead0;
}
body[data-theme="sky"] {
  --bg: radial-gradient(700px 400px at 15% 0%, rgba(165,220,255,.55), transparent 60%),
        radial-gradient(800px 500px at 100% 100%, rgba(140,190,250,.35), transparent 60%),
        linear-gradient(180deg,#f0f8ff,#e6f2fd 60%,#e2edfb);
  --ink:#16384f; --ink2:#40657f;
  --card:linear-gradient(150deg,#ffffff,#f0f8fe);
  --card-brd:rgba(255,255,255,.95);
  --gold:#c9962a; --gold2:#e8b53e; --gold3:#8a6d1f;
  --accent:#2a7ab0; --accent2:#4a9ad8;
  --hero:linear-gradient(140deg,#2a7ab0 0%,#4a9ad8 50%,#8fc8f0 100%);
  --hero-ink:#fff; --hero-sub:#e3f2fd;
  --shadow:rgba(40,90,130,.18);
  --pattern-c:%232a7ab0;
  --nav-bg:linear-gradient(160deg,#ffffff,#e9f3fb);
  --nav-fade:rgba(240,248,255,0), rgba(240,248,255,.95) 30%;
  --chip:linear-gradient(160deg,#ffffff,#e9f3fb);
  --input:#e9f3fb;
}
body[data-theme="rose"] {
  --bg: radial-gradient(700px 400px at 15% 0%, rgba(255,196,214,.5), transparent 60%),
        radial-gradient(800px 500px at 100% 100%, rgba(250,170,195,.3), transparent 60%),
        linear-gradient(180deg,#fff3f6,#fdeaf0 60%,#fce6ee);
  --ink:#52202f; --ink2:#8a5468;
  --card:linear-gradient(150deg,#ffffff,#fdf2f5);
  --card-brd:rgba(255,255,255,.95);
  --gold:#c9962a; --gold2:#e8b53e; --gold3:#8a6d1f;
  --accent:#c84a6e; --accent2:#e0708f;
  --hero:linear-gradient(140deg,#c84a6e 0%,#e0708f 50%,#f2a5bb 100%);
  --hero-ink:#fff; --hero-sub:#fde8ee;
  --shadow:rgba(140,50,80,.18);
  --pattern-c:%23c84a6e;
  --nav-bg:linear-gradient(160deg,#ffffff,#fbeaef);
  --nav-fade:rgba(255,243,246,0), rgba(255,243,246,.95) 30%;
  --chip:linear-gradient(160deg,#ffffff,#fbeaef);
  --input:#fbeaef;
}
body[data-theme="violet"] {
  --bg: radial-gradient(700px 400px at 15% 0%, rgba(220,198,255,.5), transparent 60%),
        radial-gradient(800px 500px at 100% 100%, rgba(190,160,240,.3), transparent 60%),
        linear-gradient(180deg,#f6f2fd,#efe9fb 60%,#ece5fa);
  --ink:#352456; --ink2:#5f4d85;
  --card:linear-gradient(150deg,#ffffff,#f5f1fc);
  --card-brd:rgba(255,255,255,.95);
  --gold:#c9962a; --gold2:#e8b53e; --gold3:#8a6d1f;
  --accent:#7a55b0; --accent2:#9468d0;
  --hero:linear-gradient(140deg,#6840a0 0%,#9468d0 50%,#c3a5ea 100%);
  --hero-ink:#fff; --hero-sub:#f0e8fc;
  --shadow:rgba(90,60,140,.18);
  --pattern-c:%237a55b0;
  --nav-bg:linear-gradient(160deg,#ffffff,#f0eafb);
  --nav-fade:rgba(246,242,253,0), rgba(246,242,253,.95) 30%;
  --chip:linear-gradient(160deg,#ffffff,#f0eafb);
  --input:#f0eafb;
}

body { font-family:'Cairo',sans-serif; color:var(--ink); background:var(--bg); background-attachment:fixed;
  min-height:100vh; direction:rtl; position:relative; overflow-x:hidden; }
.pattern { position:fixed; inset:0; pointer-events:none; opacity:.05; z-index:0; }
.screen { position:relative; z-index:1; padding:22px 18px 110px; max-width:520px; margin:0 auto; }

/* top bar */
.topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.brand { display:flex; align-items:center; gap:10px; }
.logo { width:44px; height:44px; border-radius:14px;
  background:linear-gradient(145deg,#2fbf8f,#0f8a66);
  box-shadow:0 10px 18px rgba(15,138,102,.35), 0 3px 6px rgba(15,138,102,.25), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -7px 12px rgba(0,60,40,.35);
  display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.7); }
.brand .name { font-family:'Reem Kufi'; font-size:22px; font-weight:700;
  background:linear-gradient(180deg,var(--gold2),var(--gold) 55%,var(--gold3));
  -webkit-background-clip:text; background-clip:text; color:transparent; }
.brand .sub { font-size:9.5px; color:var(--ink2); letter-spacing:.3px; font-weight:600; }
.icon-btn { width:42px; height:42px; border-radius:50%;
  background:var(--chip); border:1px solid var(--card-brd);
  box-shadow:0 8px 16px var(--shadow), inset 0 2px 2px rgba(255,255,255,.6), inset 0 -5px 9px rgba(0,0,0,.06);
  display:flex; align-items:center; justify-content:center; position:relative; }
.icon-btn svg { width:19px; height:19px; stroke:var(--ink2); }
.icon-btn .dot { position:absolute; top:9px; left:11px; width:8px; height:8px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%,#ff8a8a,#e03131); box-shadow:0 0 8px rgba(255,60,60,.8); border:1.5px solid #fff; }

.greet { margin-bottom:16px; }
.greet h1 { font-size:21px; font-weight:800; }
.greet .hijri { font-size:12px; color:var(--gold3); margin-top:2px; font-weight:700; }

/* cards */
.card { border-radius:var(--r); background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 20px 38px var(--shadow), 0 6px 14px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -12px 22px rgba(0,0,0,.05);
  position:relative; }

/* hero */
.hero { padding:20px 20px 18px; margin-bottom:14px; overflow:hidden;
  background:var(--hero); border:1px solid rgba(255,255,255,.6); color:var(--hero-ink);
  box-shadow:0 22px 40px var(--shadow), 0 6px 14px var(--shadow), inset 0 2px 2px rgba(255,255,255,.45), inset 0 -16px 28px rgba(0,0,0,.12); }
.hero::before { content:''; position:absolute; inset:0;
  background:radial-gradient(400px 180px at 85% -30%, rgba(255,235,170,.5), transparent 65%); pointer-events:none; }
.hero .row { display:flex; justify-content:space-between; align-items:center; position:relative; }
.hero .label { font-size:12px; font-weight:700; color:var(--hero-sub); opacity:.95; }
.hero .pname { font-family:'Reem Kufi'; font-size:32px; font-weight:700; margin:2px 0 0; color:var(--hero-ink); text-shadow:0 3px 8px rgba(0,0,0,.18); }
.hero .ptime { font-size:42px; font-weight:900; letter-spacing:1px; text-shadow:0 4px 14px rgba(0,0,0,.2); line-height:1.1; }
.hero .left { font-size:11px; color:var(--hero-sub); opacity:.9; font-weight:600; }
.hero .loc { font-size:10px; color:var(--hero-sub); opacity:.8; margin-top:8px; font-weight:600; position:relative; }
.ring { width:86px; height:86px; border-radius:50%; flex-shrink:0;
  background:conic-gradient(#ffd765 var(--p,0%), rgba(255,255,255,.3) var(--p,0%) 100%);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 22px rgba(0,0,0,.25), inset 0 2px 4px rgba(255,255,255,.4); border:1px solid rgba(255,240,190,.8); }
.ring .inner { width:68px; height:68px; border-radius:50%;
  background:linear-gradient(160deg,rgba(0,60,40,.55),rgba(0,45,30,.7));
  box-shadow:inset 0 3px 8px rgba(0,0,0,.35), inset 0 -1px 2px rgba(255,255,255,.25);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:15px; font-weight:800; color:#ffe9a8; }
.ring .inner span { font-size:9px; font-weight:600; color:#d7f5e8; }

.chips { display:flex; gap:7px; margin:14px 0 16px; }
.chip { flex:1; text-align:center; padding:9px 0 7px; border-radius:14px;
  background:var(--chip); border:1px solid var(--card-brd);
  box-shadow:0 8px 14px var(--shadow), inset 0 2px 2px rgba(255,255,255,.6), inset 0 -5px 9px rgba(0,0,0,.05); }
.chip .n { font-size:10px; color:var(--ink2); font-weight:700; }
.chip .t { font-size:13px; font-weight:800; margin-top:1px; color:var(--ink); }
.chip.now { background:linear-gradient(160deg,#ffe9a8,#f3c64f); border:1px solid rgba(255,240,190,.9);
  box-shadow:0 8px 16px rgba(201,150,42,.35), 0 0 14px rgba(232,181,62,.3), inset 0 2px 2px rgba(255,255,255,.7), inset 0 -5px 9px rgba(160,110,20,.3); }
.chip.now .n { color:#7c5c10; } .chip.now .t { color:#5c430a; }

/* sadaqah banner */
.sadaqah-banner { padding:16px 18px; margin-bottom:18px; display:flex; align-items:center; gap:14px; width:100%; text-align:right;
  background:linear-gradient(140deg,#ffe9a8 0%,#f7cf6b 55%,#eeb94a 100%);
  border:1px solid rgba(255,244,214,.9); border-radius:var(--r);
  box-shadow:0 20px 38px rgba(201,150,42,.3), 0 6px 14px rgba(201,150,42,.18), inset 0 2px 2px rgba(255,255,255,.75), inset 0 -14px 24px rgba(160,110,20,.22); }
.sadaqah-banner .ic { width:52px; height:52px; border-radius:16px; flex-shrink:0;
  background:radial-gradient(circle at 30% 25%,#ffffff,#ffe9a8 60%,#f0c75e);
  box-shadow:0 8px 16px rgba(160,110,20,.35), inset 0 2px 3px #fff, inset 0 -5px 9px rgba(201,150,42,.4);
  display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.8); }
.sadaqah-banner h3 { font-size:15px; font-weight:800; color:#5c430a; text-shadow:0 1px 0 rgba(255,255,255,.5); }
.sadaqah-banner p { font-size:11px; color:#7c5c10; margin-top:2px; font-weight:600; }
.sadaqah-banner .count { font-size:17px; font-weight:900; color:#3f2f08; margin-right:auto; text-align:center; }
.sadaqah-banner .count small { display:block; font-size:9px; font-weight:700; color:#7c5c10; }

.sec { display:flex; align-items:center; gap:8px; margin:4px 2px 12px; }
.sec .bar { width:4px; height:18px; border-radius:2px; background:linear-gradient(180deg,var(--gold2),var(--gold3)); box-shadow:0 2px 6px var(--shadow); }
.sec h2 { font-size:16px; font-weight:800; }
.sec .more { margin-right:auto; font-size:11px; color:var(--accent); font-weight:700; }

.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:18px; }
.tile { border-radius:20px; padding:14px 6px 12px; text-align:center;
  background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 14px 26px var(--shadow), 0 3px 8px var(--shadow), inset 0 2px 2px rgba(255,255,255,.6), inset 0 -10px 18px rgba(0,0,0,.05);
  position:relative; }
.tile .ic { width:46px; height:46px; margin:0 auto 8px; border-radius:15px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 14px rgba(31,64,56,.25), inset 0 2px 3px rgba(255,255,255,.55), inset 0 -5px 8px rgba(0,0,0,.2);
  border:1px solid rgba(255,255,255,.7); }
.tile .ic svg { width:24px; height:24px; }
.tile .t { font-size:11.5px; font-weight:800; color:var(--ink); }
.tile .s { font-size:8.5px; color:var(--ink2); margin-top:1px; font-weight:600; }

.g-em { background:radial-gradient(circle at 30% 25%,#6fe0b8,#18a67e 60%,#0d7a5c); }
.g-gd { background:radial-gradient(circle at 30% 25%,#ffe9a8,#e8b53e 55%,#b8891f); }
.g-bl { background:radial-gradient(circle at 30% 25%,#a5dcff,#4a9ad8 60%,#2a6aa8); }
.g-pu { background:radial-gradient(circle at 30% 25%,#dcc6ff,#9468d0 60%,#6840a0); }
.g-ro { background:radial-gradient(circle at 30% 25%,#ffc4a8,#e0885a 60%,#b05e34); }
.g-sl { background:radial-gradient(circle at 30% 25%,#d8e2ef,#8a9cb4 60%,#5a6c84); }

.aya { padding:18px 20px; text-align:center; }
.aya .q { font-family:'Amiri',serif; font-size:19px; line-height:2; }
.aya .src { font-size:11px; color:var(--gold3); margin-top:6px; font-weight:800; }
.aya .orn { color:var(--gold); font-size:13px; letter-spacing:6px; margin-bottom:4px; }

/* nav */
.nav { position:fixed; bottom:0; right:50%; transform:translateX(50%); width:100%; max-width:520px; padding:10px 14px 16px;
  background:linear-gradient(180deg, var(--nav-fade)); z-index:10; }
.nav .bar { display:flex; justify-content:space-around; align-items:center; border-radius:26px; padding:9px 6px;
  background:var(--nav-bg); border:1px solid var(--card-brd);
  box-shadow:0 18px 36px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -8px 16px rgba(0,0,0,.05); }
.nv { display:flex; flex-direction:column; align-items:center; gap:3px; width:56px; padding:4px 0 2px; border-radius:16px; color:var(--ink2); }
.nv svg { width:21px; height:21px; opacity:.75; }
.nv .t { font-size:9.5px; font-weight:700; }
.nv.on { background:linear-gradient(160deg,#ffe9a8,#f0c75e); border:1px solid rgba(255,240,190,.9);
  box-shadow:0 8px 16px rgba(201,150,42,.35), inset 0 2px 2px rgba(255,255,255,.7), inset 0 -4px 8px rgba(160,110,20,.25);
  margin-top:-18px; padding:9px 0 7px; color:#5c430a; }
.nv.on svg { opacity:1; }

/* generic page */
.page-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.page-title { font-family:'Reem Kufi'; font-size:21px; font-weight:700;
  background:linear-gradient(180deg,var(--gold2),var(--gold) 55%,var(--gold3));
  -webkit-background-clip:text; background-clip:text; color:transparent; }
.back-btn { width:42px; height:42px; border-radius:14px; background:var(--chip); border:1px solid var(--card-brd);
  box-shadow:0 8px 16px var(--shadow), inset 0 2px 2px rgba(255,255,255,.6), inset 0 -5px 9px rgba(0,0,0,.06);
  display:flex; align-items:center; justify-content:center; }
.back-btn svg { width:19px; height:19px; stroke:var(--ink2); }

.list-item { display:flex; align-items:center; gap:12px; width:100%; text-align:right; padding:13px 15px; border-radius:18px; margin-bottom:9px;
  background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 10px 20px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -7px 12px rgba(0,0,0,.04); }
.list-item .num { width:36px; height:36px; border-radius:12px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  font-weight:900; font-size:13px; color:#fff;
  background:radial-gradient(circle at 30% 25%,#6fe0b8,#18a67e 60%,#0d7a5c);
  box-shadow:0 5px 10px rgba(31,64,56,.3), inset 0 2px 3px rgba(255,255,255,.4), inset 0 -4px 7px rgba(0,0,0,.25); }
.list-item .t { font-size:14.5px; font-weight:800; }
.list-item .s { font-size:10.5px; color:var(--ink2); font-weight:600; margin-top:1px; }
.list-item .end { margin-right:auto; }

/* surah reader */
.ayah { font-family:'Amiri',serif; font-size:21px; line-height:2.2; padding:14px 16px; border-radius:18px; margin-bottom:10px;
  background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 8px 16px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5); }
.ayah .an { display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:30px; border-radius:50%;
  font-family:'Cairo'; font-size:12px; font-weight:800; color:#5c430a; margin-left:8px;
  background:linear-gradient(160deg,#ffe9a8,#f0c75e); box-shadow:inset 0 2px 2px rgba(255,255,255,.7), inset 0 -3px 6px rgba(160,110,20,.3); padding:0 6px; }
.basmala { text-align:center; font-family:'Amiri',serif; font-size:24px; padding:18px; color:var(--gold3); }

.player-bar { position:sticky; bottom:92px; z-index:9; display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:20px; margin-bottom:12px;
  background:var(--nav-bg); border:1px solid var(--card-brd);
  box-shadow:0 16px 30px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5); }
.play-btn { width:48px; height:48px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(160deg,var(--accent2),var(--accent));
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 16px var(--shadow), inset 0 2px 3px rgba(255,255,255,.5), inset 0 -5px 9px rgba(0,0,0,.2); }
.play-btn svg { width:20px; height:20px; fill:#fff; }
.player-bar .info { font-size:12px; font-weight:700; }
.player-bar .info .s { font-size:10px; color:var(--ink2); font-weight:600; }

/* sadaqah page */
.ded { text-align:center; padding:24px 20px 20px; margin-bottom:16px; }
.ded .frame { color:var(--gold); font-size:12px; letter-spacing:5px; margin-bottom:10px; }
.ded .dua { font-family:'Amiri',serif; font-size:18.5px; line-height:2.05; }
.ded .who { margin-top:12px; display:inline-block; padding:7px 20px; border-radius:30px;
  font-family:'Reem Kufi'; font-size:15px; font-weight:700; color:#5c430a;
  background:linear-gradient(160deg,#ffe9a8,#f0c75e 55%,#e0ac3a);
  box-shadow:0 8px 18px rgba(201,150,42,.35), inset 0 2px 3px rgba(255,255,255,.8), inset 0 -4px 8px rgba(160,110,20,.3);
  border:1px solid rgba(255,240,190,.9); }

.dhikr-wrap { text-align:center; margin:6px 0 18px; }
.dhikr-btn { width:190px; height:190px; margin:0 auto; border-radius:50%;
  background:conic-gradient(var(--gold2) var(--dp,0%), rgba(125,125,125,.15) var(--dp,0%) 100%);
  padding:10px; box-shadow:0 24px 46px var(--shadow), 0 0 30px rgba(232,181,62,.25);
  border:1px solid rgba(255,240,190,.9); transition:transform .08s; }
.dhikr-btn:active { transform:scale(.96); }
.dhikr-btn .face { width:100%; height:100%; border-radius:50%;
  background:var(--card);
  box-shadow:inset 0 6px 14px rgba(255,255,255,.5), inset 0 -18px 30px rgba(21,154,118,.14);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
.dhikr-btn .word { font-family:'Amiri',serif; font-size:24px; font-weight:700; color:var(--accent); }
.dhikr-btn .num { font-size:34px; font-weight:900; color:var(--gold3); line-height:1; }
.dhikr-btn .of { font-size:10px; color:var(--ink2); font-weight:700; }
.dhikr-hint { font-size:11px; color:var(--ink2); margin-top:12px; font-weight:600; }
.reset-link { margin-top:10px; font-size:11px; font-weight:800; color:var(--accent); text-decoration:underline; }

.stats { display:flex; gap:10px; margin-bottom:16px; }
.stat { flex:1; text-align:center; padding:13px 4px 11px; border-radius:18px;
  background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 12px 22px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -8px 14px rgba(0,0,0,.04); }
.stat .v { font-size:18px; font-weight:900; color:var(--gold3); }
.stat .k { font-size:9.5px; color:var(--ink2); font-weight:700; margin-top:2px; }
.stats .stat:nth-child(2) .v { color:var(--accent); }

.share-btn { display:flex; align-items:center; justify-content:center; gap:10px; width:100%;
  padding:16px; border-radius:20px; margin-top:6px;
  background:linear-gradient(160deg,#ffe9a8,#f0c75e 45%,#dfa93a); color:#4a3809; font-size:15px; font-weight:900;
  box-shadow:0 16px 30px rgba(201,150,42,.35), inset 0 2px 3px rgba(255,255,255,.8), inset 0 -6px 10px rgba(160,110,20,.3);
  border:1px solid rgba(255,240,190,.9); }
.share-btn svg { width:20px; height:20px; }
.share-note { text-align:center; font-size:10.5px; color:var(--ink2); margin-top:10px; font-weight:600; }

/* tasbih */
.tasbih-target { display:flex; gap:8px; justify-content:center; margin-bottom:14px; }
.tg { padding:8px 18px; border-radius:14px; font-size:13px; font-weight:800; background:var(--chip); border:1px solid var(--card-brd); box-shadow:0 6px 12px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5); }
.tg.on { background:linear-gradient(160deg,#ffe9a8,#f0c75e); color:#5c430a; }

/* forms */
.field { margin-bottom:12px; }
.field label { display:block; font-size:12px; font-weight:700; color:var(--ink2); margin-bottom:6px; }
.field input, .field select { width:100%; padding:13px 14px; border-radius:16px; border:1px solid var(--card-brd);
  background:var(--input); color:var(--ink); font-size:15px; font-weight:700; outline:none;
  box-shadow:inset 0 3px 7px rgba(0,0,0,.06), inset 0 -1px 1px rgba(255,255,255,.4); }
.btn { display:block; width:100%; padding:15px; border-radius:18px; font-size:15px; font-weight:900; color:#fff;
  background:linear-gradient(160deg,var(--accent2),var(--accent));
  box-shadow:0 12px 24px var(--shadow), inset 0 2px 3px rgba(255,255,255,.4), inset 0 -6px 10px rgba(0,0,0,.18); }
.result-box { padding:16px; border-radius:18px; text-align:center; font-size:15px; font-weight:800; margin-top:12px;
  background:var(--card); border:1px solid var(--card-brd); box-shadow:0 10px 20px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5); }
.result-box .big { font-size:24px; font-weight:900; color:var(--gold3); margin-top:4px; }

/* asma grid */
.asma-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.asma-cell { text-align:center; padding:14px 4px; border-radius:16px; font-family:'Amiri',serif; font-size:16.5px; font-weight:700;
  background:var(--card); border:1px solid var(--card-brd); box-shadow:0 8px 16px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5); }
.asma-cell small { display:block; font-family:'Cairo'; font-size:9px; color:var(--ink2); margin-top:3px; }

/* themes */
.theme-card { display:flex; align-items:center; gap:14px; width:100%; text-align:right; padding:14px 16px; border-radius:22px; margin-bottom:12px;
  background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 12px 24px var(--shadow), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -8px 14px rgba(0,0,0,.04); }
.theme-card.sel { border:1px solid rgba(232,181,62,.9);
  box-shadow:0 12px 26px rgba(201,150,42,.28), 0 0 18px rgba(232,181,62,.2), inset 0 2px 2px rgba(255,255,255,.5); }
.swatches { display:flex; }
.sw { width:26px; height:26px; border-radius:50%; border:2px solid #fff; margin-left:-9px;
  box-shadow:0 4px 8px rgba(31,64,56,.25), inset 0 2px 2px rgba(255,255,255,.5), inset 0 -3px 5px rgba(0,0,0,.15); }
.theme-card .nm { font-size:15px; font-weight:800; }
.theme-card .ds { font-size:10.5px; color:var(--ink2); font-weight:600; margin-top:1px; }
.check { margin-right:auto; width:30px; height:30px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(160deg,#ffe9a8,#e8b53e);
  box-shadow:0 6px 12px rgba(201,150,42,.4), inset 0 2px 2px rgba(255,255,255,.7), inset 0 -4px 7px rgba(160,110,20,.35); }
.check svg { width:15px; height:15px; }
.radio { margin-right:auto; width:26px; height:26px; border-radius:50%; flex-shrink:0;
  background:var(--chip); box-shadow:inset 0 3px 6px rgba(0,0,0,.12), inset 0 -1px 1px rgba(255,255,255,.4); border:1px solid var(--card-brd); }

/* qibla */
.compass-wrap { text-align:center; padding:22px 0 10px; }
.compass { width:250px; height:250px; margin:0 auto; border-radius:50%; position:relative;
  background:var(--card); border:1px solid var(--card-brd);
  box-shadow:0 24px 46px var(--shadow), inset 0 4px 8px rgba(255,255,255,.5), inset 0 -16px 30px rgba(0,0,0,.08); }
.compass .dial { position:absolute; inset:14px; border-radius:50%;
  background:repeating-conic-gradient(rgba(125,125,125,.25) 0 1deg, transparent 1deg 30deg);
  -webkit-mask:radial-gradient(circle, transparent 58%, #000 59%); mask:radial-gradient(circle, transparent 58%, #000 59%); }
.compass .arrow { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; transition:transform .2s; }
.compass .kaaba { width:64px; height:64px; border-radius:18px; position:absolute; top:26px; right:calc(50% - 32px);
  background:linear-gradient(160deg,#3a3a3a,#111);
  box-shadow:0 10px 20px rgba(0,0,0,.4), inset 0 2px 3px rgba(255,255,255,.25), inset 0 -6px 10px rgba(0,0,0,.6);
  border:2px solid var(--gold2); display:flex; align-items:center; justify-content:center; }
.qibla-deg { text-align:center; font-size:15px; font-weight:800; margin-top:14px; }
.qibla-deg .big { font-size:30px; font-weight:900; color:var(--accent); }

/* makkah */
.makkah-frame { border-radius:var(--r); overflow:hidden; border:1px solid var(--card-brd); box-shadow:0 20px 38px var(--shadow); }
.makkah-frame iframe { width:100%; aspect-ratio:16/9; border:0; display:block; }

.offline-note { padding:16px; text-align:center; font-size:13px; font-weight:700; color:var(--ink2); }

.toast { position:fixed; bottom:100px; right:50%; transform:translateX(50%); z-index:50;
  background:#1f4038; color:#fff; padding:12px 22px; border-radius:16px; font-size:13px; font-weight:700;
  box-shadow:0 16px 30px rgba(0,0,0,.35); opacity:0; transition:opacity .25s; pointer-events:none; max-width:84%; text-align:center; }
.toast.show { opacity:1; }

.loading { text-align:center; padding:30px; color:var(--ink2); font-weight:700; }

/* background style: solid */
body[data-bgstyle="solid"][data-theme="light"] { --bg:#f2f8f3; }
body[data-bgstyle="solid"][data-theme="night"] { --bg:#0a241b; }
body[data-bgstyle="solid"][data-theme="gold"]  { --bg:#f3e6c6; }
body[data-bgstyle="solid"][data-theme="sky"]   { --bg:#e9f3fb; }
body[data-bgstyle="solid"][data-theme="rose"]  { --bg:#fdeaf0; }
body[data-bgstyle="solid"][data-theme="violet"]{ --bg:#efe9fb; }

/* designs */
body[data-design="large"] .grid { grid-template-columns:repeat(2,1fr); }
body[data-design="large"] .tile .ic { width:60px; height:60px; }
body[data-design="large"] .tile { padding:20px 8px 16px; }
body[data-design="list"] .grid { display:flex; flex-direction:column; gap:9px; }
body[data-design="list"] .tile { display:flex; align-items:center; gap:12px; text-align:right; padding:11px 14px; }
body[data-design="list"] .tile .ic { margin:0; width:40px; height:40px; }
body[data-design="compact"] .grid { grid-template-columns:repeat(4,1fr); gap:8px; }
body[data-design="compact"] .tile { padding:10px 4px 8px; }
body[data-design="compact"] .tile .ic { width:36px; height:36px; margin-bottom:5px; }
body[data-design="compact"] .tile .s { display:none; }

.mini.m1 { grid-template-columns:1fr 1fr 1fr; }
.mini.m2 { grid-template-columns:1fr 1fr; }
.mini.m3 { grid-template-columns:1fr; }
.mini.m4 { grid-template-columns:repeat(4,1fr); }

/* fullscreen + safe areas */
html,body { min-height:100dvh; }
.screen { padding:calc(22px + env(safe-area-inset-top)) 18px calc(110px + env(safe-area-inset-bottom)); }
.nav { padding-bottom:calc(16px + env(safe-area-inset-bottom)); }

/* larger default readability */
.ayah { font-size:23px; }
#azItems p { font-size:18.5px !important; }

/* font-size control (per device) */
body[data-font="large"] .ayah { font-size:27px; }
body[data-font="large"] #azItems p { font-size:22px !important; }
body[data-font="large"] .ded .dua { font-size:21px; }
body[data-font="large"] .aya .q { font-size:22px; }
body[data-font="large"] body, body[data-font="large"] { font-size:17px; }
body[data-font="xlarge"] .ayah { font-size:31px; }
body[data-font="xlarge"] #azItems p { font-size:25px !important; }
body[data-font="xlarge"] .ded .dua { font-size:24px; }
body[data-font="xlarge"] .aya .q { font-size:25px; }
