/* ============ عظيمة — التصميم ============ */
:root {
    --bg: #f8f6ef;
    --surface: #ffffff;
    --surface-2: #f3ecdc;
    --ink: #1c2b26;
    --muted: #6f7b74;
    --primary: #064e3b;
    --primary-2: #0b6b52;
    --on-primary: #fdfaf2;
    --gold: #b8914b;
    --gold-2: #d9bb7a;
    --gold-soft: #f1e6cc;
    --line: #e7dcc4;
    --shadow: 0 1px 2px rgba(6, 40, 30, .05), 0 10px 26px -14px rgba(6, 40, 30, .22);
    --radius: 18px;
    --font: "Noto Naskh Arabic", "Amiri", system-ui, sans-serif;
    --font-serif: "Amiri", "Traditional Arabic", serif;
    --font-quran: "Amiri Quran", "Amiri", "Traditional Arabic", serif;
    --font-callig: "Amiri", "Noto Naskh Arabic", serif;
    --quran-size: 1.75rem;
    --nav-h: 66px;
    --pattern-opacity: .045;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0a1713; --surface: #10221c; --surface-2: #152b24; --ink: #ede6d6; --muted: #9eaca5;
    --primary: #6cc3a6; --primary-2: #8fd5bd; --on-primary: #08140f; --gold: #d9bb7a; --gold-2: #e8d3a2; --gold-soft: #2a291d;
    --line: #20372f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6); --pattern-opacity: .035;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    position: relative;
}
body::before { /* زخرفة إسلامية هادئة */
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--pattern-opacity);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23064e3b' stroke-width='1.2'%3E%3Cpath d='M40 8l9 23 23 9-23 9-9 23-9-23-23-9 23-9z'/%3E%3Crect x='24' y='24' width='32' height='32' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { filter: invert(1); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.4; margin: 0; }
button { font: inherit; color: inherit; }
.icon { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 20px; padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); }

/* ============ شاشة البداية ============ */
.splash {
    position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
    background: #fdfcf8;
    color: var(--primary); text-align: center; transition: opacity .7s ease, visibility .7s; cursor: pointer;
}
.splash::before, .splash::after {
    content: ""; position: absolute; width: 340px; height: 340px; pointer-events: none; opacity: .09;
    display: none;
}
.splash::before { top: -130px; right: -130px; }
.splash::after { bottom: -130px; left: -130px; }
.no-splash .splash { display: none; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash-inner { position: relative; display: grid; justify-items: center; gap: 6px; animation: rise 1s ease both; }
.splash-name {
    font-family: var(--font-callig); font-weight: 700; font-size: clamp(4.2rem, 22vw, 6.5rem); line-height: 1.15; margin: 0;
    background: linear-gradient(180deg, #d9bb7a 0%, #b8914b 55%, #8f6a2c 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 2px 0 rgba(255,255,255,.6));
}
.splash-tag { margin: 0 0 26px; font-size: 1.15rem; color: #2d3b35; }
.splash-mark { width: 150px; height: 150px; margin-bottom: 30px; animation: float 5s ease-in-out infinite; }
.splash-logo { width: 100%; height: 100%; }
.splash-photo { width: 100%; height: 100%; border-radius: 50%; padding: 5px; background: conic-gradient(#d9bb7a, #f4e7c6, #b8914b, #f4e7c6, #d9bb7a); box-shadow: 0 16px 40px -14px rgba(120, 90, 30, .55); }
.splash-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid #fffdf7; }
.splash-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(184,145,75,.25); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.splash-enter { margin-top: 14px; background: none; border: 0; color: var(--muted); font-size: .85rem; cursor: pointer; }
.splash-dedication { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; font-size: .98rem; color: #3b4a43; font-family: var(--font-serif); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-6px) rotate(4deg); } }

/* ============ الأزرار ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; cursor: pointer; transition: transform .15s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn .icon { width: 19px; height: 19px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--primary); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-gold { background: linear-gradient(180deg, #e0c07f, #b8914b); color: #1f1a0e; padding: 0 34px; min-height: 52px; font-size: 1.05rem; box-shadow: 0 10px 24px -10px rgba(214,178,109,.8); }
.icon-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
    border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--primary); cursor: pointer;
}
.icon-btn.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.sm .icon { width: 18px; height: 18px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ============ الهيدر والقوائم ============ */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; min-width: 0; }
.brand-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.brand strong { display: block; font-size: 1.05rem; color: var(--primary); line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.topnav { display: none; gap: 4px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.topnav a:hover { color: var(--primary); }
.topnav a.active { background: var(--primary); color: var(--on-primary); }

.bottomnav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgba(0,0,0,.25);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .76rem; font-weight: 500; position: relative; }
.bottomnav a .icon { width: 24px; height: 24px; }
.bottomnav a.active { color: var(--primary); }
.bottomnav a.active::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); }
.bottomnav a.active .icon { stroke-width: 2.1; }

@media (min-width: 900px) {
    .topnav { display: flex; }
    .bottomnav { display: none; }
    .main { padding-bottom: 40px; }
}

/* ============ عناصر عامة ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { margin-top: 28px; }
.section-title { font-size: 1.1rem; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); border-radius: 2px; }
.page-head { margin: 4px 0 20px; }
.page-head h2 { font-family: var(--font-serif); font-size: 1.9rem; color: var(--primary); }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head.center { text-align: center; padding: 40px 0; }
.page-head.center .btn { margin-top: 16px; }
.source { margin: 0; color: var(--gold); font-size: .9rem; font-weight: 700; }
.hint { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.kicker { margin: 0; color: var(--gold); font-weight: 700; font-size: .9rem; }
.empty { text-align: center; color: var(--muted); padding: 24px; }
.footer { text-align: center; color: var(--muted); font-size: .88rem; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); margin-top: -12px; }
@media (min-width: 900px) { .footer { padding-bottom: 32px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .92rem; cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip.sm { padding: 5px 14px; font-size: .85rem; }

.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--primary)); transition: width .3s; }
.progress.top { margin: 0 0 16px; }

.toast {
    position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); z-index: 60;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    background: var(--ink); color: var(--bg); padding: 10px 20px; border-radius: 999px; font-size: .92rem;
    transition: .25s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ الرئيسية ============ */
.hero { display: grid; gap: 20px; padding: 24px; text-align: center; overflow: hidden; position: relative;
    background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 9%, var(--surface)), var(--surface) 60%); }
.hero-photo { width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; padding: 4px; background: conic-gradient(var(--gold), var(--gold-soft), var(--gold)); }
.hero-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); }
.hero h2 { font-family: var(--font-serif); font-size: clamp(1.45rem, 5vw, 1.9rem); color: var(--primary); margin: 4px 0 6px; }
.hero-dua { margin: 0 0 16px; color: var(--muted); font-family: var(--font-serif); font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (min-width: 680px) {
    .hero { grid-template-columns: auto 1fr; text-align: start; align-items: center; padding: 32px; gap: 28px; }
    .hero-photo { width: 160px; height: 160px; }
    .hero-actions { justify-content: flex-start; }
}

.continue { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-top: 16px; color: var(--primary); }
.continue span { flex: 1; }
.continue small { display: block; color: var(--muted); font-size: .82rem; }
.continue strong { font-size: 1.05rem; }
.chev { color: var(--muted); width: 18px; height: 18px; }

.hadith-card { padding: 20px; margin-bottom: 12px; }
.hadith-text { margin: 0 0 10px; font-family: var(--font-serif); font-size: 1.22rem; line-height: 2; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 680px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .2s; }
.tile:hover { border-color: var(--gold); }
.tile:active { transform: scale(.98); }
.tile .icon { width: 30px; height: 30px; color: var(--gold); margin-bottom: 6px; }
.tile strong { color: var(--primary); }
.tile small { color: var(--muted); font-size: .84rem; }

.verse-card { padding: 26px 20px; text-align: center; background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
.ayah-text { font-family: var(--font-quran); font-size: 1.6rem; line-height: 2.3; margin: 0 0 6px; color: var(--primary); }

.install-box { display: flex; align-items: center; gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
.install-box div { flex: 1; min-width: 200px; }
.install-box p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

/* ============ القرآن ============ */
.searchbar { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 50px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; color: var(--muted); }
.searchbar:focus-within { border-color: var(--primary); }
.searchbar input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); min-width: 0; }
.offline-dl { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; }
.offline-dl > div { flex: 1; }
.offline-dl p { margin: 0; color: var(--muted); font-size: .88rem; }

.surah-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 680px) { .surah-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .surah-list { grid-template-columns: repeat(3, 1fr); } }
.surah-list a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s; }
.surah-list a:hover { border-color: var(--gold); }
.num {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: .9rem; font-weight: 700; color: var(--primary);
    background: var(--gold-soft); clip-path: polygon(50% 0, 64% 14%, 86% 14%, 86% 36%, 100% 50%, 86% 64%, 86% 86%, 64% 86%, 50% 100%, 36% 86%, 14% 86%, 14% 64%, 0 50%, 14% 36%, 14% 14%, 36% 14%);
}
.sname { flex: 1; font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; }
.meta { color: var(--muted); font-size: .82rem; }

.reader-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.reader-title { flex: 1; text-align: center; min-width: 0; }
.reader-title h2 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--primary); }
.reader-title small { color: var(--muted); }

.mushaf { padding: 22px 18px 28px; }
@media (min-width: 680px) { .mushaf { padding: 32px 40px 40px; } }
.surah-banner { margin: 0 auto 10px; max-width: 360px; text-align: center; padding: 10px; border: 1.5px solid var(--gold); border-radius: 12px; position: relative; background: var(--gold-soft); }
.surah-banner::before, .surah-banner::after { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; background: var(--gold); transform: translateY(-50%) rotate(45deg); }
.surah-banner::before { right: -6px; } .surah-banner::after { left: -6px; }
.surah-banner span { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.basmala { text-align: center; font-family: var(--font-quran); font-size: 1.7rem; margin: 14px 0 6px; color: var(--primary); }
.ayat { font-family: var(--font-quran); font-size: var(--quran-size); line-height: 2.35; text-align: justify; text-align-last: center; word-spacing: 2px; }
.ayah { cursor: pointer; border-radius: 6px; transition: background .2s; }
.ayah.mark { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.ayah-num {
    display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; margin: 0 4px; padding: 0 2px;
    font-family: var(--font); font-size: .55em; font-weight: 700; color: var(--gold); vertical-align: middle; line-height: 1;
    border: 1.5px solid var(--gold); border-radius: 50%;
}
.surah-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.loading { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.loading span:nth-child(2) { animation-delay: .2s; } .loading span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.error-box { text-align: center; font-family: var(--font); font-size: 1rem; color: var(--muted); padding: 24px 0; line-height: 1.8; }

/* ============ الأذكار ============ */
.cat-list { display: grid; gap: 12px; }
@media (min-width: 680px) { .cat-list { grid-template-columns: repeat(2, 1fr); } }
.cat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.cat-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--gold-soft); color: var(--gold); flex: none; }
.cat-icon .icon { width: 26px; height: 26px; }
.cat-body { flex: 1; }
.cat-body strong { display: block; color: var(--primary); font-size: 1.08rem; }
.cat-body strong small { color: var(--gold); font-size: .8rem; margin-inline-start: 6px; }
.cat-body > small { color: var(--muted); font-size: .85rem; }
.cat-featured { border-color: var(--gold); background: linear-gradient(160deg, var(--gold-soft), var(--surface) 70%); }
@media (min-width: 680px) { .cat-featured { grid-column: 1 / -1; } }

.dhikr-list { display: grid; gap: 12px; }
.dhikr { padding: 20px; cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform .12s, opacity .3s, border-color .2s; }
.dhikr:active { transform: scale(.985); }
.dhikr-text { margin: 0; font-family: var(--font-serif); font-size: 1.28rem; line-height: 2.05; }
.dhikr .note { margin: 10px 0 0; font-size: .88rem; color: var(--muted); border-inline-start: 3px solid var(--gold-soft); padding-inline-start: 10px; }
.dhikr-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.counter { display: inline-flex; align-items: baseline; gap: 6px; color: var(--primary); }
.counter b { font-size: 1.4rem; }
.counter small { color: var(--muted); }
.done-mark { display: none; color: var(--primary); font-weight: 700; }
.dhikr.done { opacity: .55; border-color: var(--primary); }
.dhikr.done .counter { display: none; }
.dhikr.done .done-mark { display: inline; }
.dhikr.pulse { animation: pulse .25s; }
@keyframes pulse { 50% { transform: scale(.98); } }
.all-done { text-align: center; padding: 26px; margin-top: 16px; border-color: var(--gold); }
.all-done strong { font-family: var(--font-serif); font-size: 1.5rem; color: var(--primary); }
.all-done p { margin: 4px 0 14px; color: var(--muted); }

/* ============ المسبحة ============ */
.tasbeeh { padding: 26px 20px; text-align: center; display: grid; justify-items: center; gap: 16px; margin-top: 8px; }
.t-phrase { margin: 0; font-family: var(--font-serif); font-size: 1.7rem; color: var(--primary); font-weight: 700; min-height: 1.6em; }
.t-ring { position: relative; width: min(260px, 72vw); aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; cursor: pointer;
    background: radial-gradient(circle at 50% 40%, var(--surface), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
    display: grid; place-items: center; touch-action: manipulation; transition: transform .1s; }
.t-ring:active { transform: scale(.97); }
.t-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.t-ring circle { fill: none; stroke-width: 6; }
.t-ring .track { stroke: var(--line); }
.t-ring .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .25s; }
.t-count { font-size: clamp(3.2rem, 16vw, 4.4rem); font-weight: 700; color: var(--primary); line-height: 1; margin-top: -10px; }
.t-target { position: absolute; bottom: 26%; color: var(--muted); font-size: .9rem; }
.t-targets { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.t-stats { display: flex; gap: 22px; color: var(--muted); font-size: .92rem; }
.t-stats b { color: var(--primary); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============ إضافات: اليوم والتذكيرات ============ */
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .88rem; }
.icon.sm { width: 16px; height: 16px; }
.center-text { text-align: center; margin-top: 16px; }
.today { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-top: 16px; flex-wrap: wrap; }
.today-date small { display: block; color: var(--muted); font-size: .82rem; }
.today-date strong { font-family: var(--font-serif); font-size: 1.2rem; color: var(--primary); }
.today-prayer { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; background: var(--gold-soft); color: var(--primary); }
.today-prayer .icon { color: var(--gold); }
.today-prayer small { display: block; font-size: .75rem; color: var(--muted); line-height: 1.2; }
.today-prayer strong { font-size: 1rem; }
.reminder { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-top: 12px; border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.reminder > div { flex: 1; }
.reminder strong { color: var(--primary); }
.reminder p { margin: 0; font-size: .88rem; color: var(--muted); }
.reminder .dot { width: 10px; height: 10px; flex: none; transform: rotate(45deg); background: var(--gold); border-radius: 2px; }

/* ============ مواقيت الصلاة ============ */
.next-prayer { display: grid; justify-items: center; gap: 2px; padding: 22px; text-align: center;
    background: linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000)); color: #f7f0df; border: 0; }
:root[data-theme="dark"] .next-prayer { color: #0c1a18; }
.next-prayer small { opacity: .8; }
.next-prayer strong { font-family: var(--font-serif); font-size: 2rem; line-height: 1.3; }
.np-count { font-size: 2.2rem; font-weight: 700; letter-spacing: 2px; direction: ltr; font-variant-numeric: tabular-nums; }
.np-place { font-size: .88rem; opacity: .85; }
.loc-row { display: flex; gap: 10px; margin: 14px 0; }
.select { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.times { list-style: none; margin: 0; padding: 6px 0; }
.times li { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.times li:last-child { border-bottom: 0; }
.times li span { font-weight: 500; }
.times li b { font-size: 1.1rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.times li[data-key="sunrise"] { color: var(--muted); }
.times li.next { background: var(--gold-soft); }
.times li.next span::after { content: " · القادمة"; color: var(--gold); font-size: .8rem; }
.settings { margin-top: 12px; padding: 4px 18px; }
.settings summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--primary); }
.settings label { display: grid; gap: 6px; margin-bottom: 12px; font-size: .9rem; color: var(--muted); }
.qibla-card { display: grid; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.compass { width: 230px; height: 230px; border-radius: 50%; padding: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.compass::before { content: ""; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); border: 9px solid transparent; border-top: 14px solid var(--gold); }
.compass.aligned { box-shadow: inset 0 0 0 3px var(--primary); }
.dial { width: 100%; height: 100%; border-radius: 50%; position: relative; background: var(--surface); border: 1px solid var(--line); transition: transform .15s linear; }
.dial > span { position: absolute; font-weight: 700; color: var(--muted); font-size: .9rem; }
.dial .n { top: 8px; left: 50%; transform: translateX(-50%); color: #c0392b; }
.dial .s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.dial .e { right: 10px; top: 50%; transform: translateY(-50%); }
.dial .w { left: 10px; top: 50%; transform: translateY(-50%); }
.needle { position: absolute; inset: 0; transition: transform .4s; }
.needle::before { content: ""; position: absolute; left: 50%; top: 22%; bottom: 50%; width: 4px; margin-left: -2px; background: var(--primary); border-radius: 4px; }
.needle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--gold); }
.kaaba { position: absolute; left: 50%; top: 9%; width: 26px; height: 26px; margin-left: -13px; background: #1d1d1d; border-radius: 4px; box-shadow: inset 0 6px 0 -2px var(--gold); }
.qibla-deg { margin: 0; color: var(--muted); }
.qibla-deg b { font-size: 1.6rem; color: var(--primary); }

/* ============ الختمة ============ */
.khatma-head { display: flex; align-items: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.kh-ring { position: relative; width: 120px; height: 120px; flex: none; }
.kh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.kh-ring circle { fill: none; stroke-width: 9; }
.kh-ring .track { stroke: var(--surface-2); }
.kh-ring .bar { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .4s; }
.kh-ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.kh-ring b { font-size: 2rem; color: var(--primary); }
.kh-ring small { color: var(--muted); }
.kh-info { flex: 1; min-width: 200px; }
.kh-info strong { color: var(--primary); font-size: 1.1rem; }
.kh-info p { margin: 2px 0 12px; color: var(--muted); }
.kh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.juz-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
@media (min-width: 680px) { .juz-list { grid-template-columns: repeat(2, 1fr); } }
.juz-list li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.juz-list a { flex: 1; min-width: 0; }
.juz-list strong { display: block; color: var(--primary); }
.juz-list small { color: var(--muted); font-size: .82rem; }
.juz-check { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: none; color: transparent; display: grid; place-items: center; cursor: pointer; }
.juz-list li.done { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.juz-list li.done .juz-check { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ============ أسماء الله الحسنى ============ */
.names-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 680px) { .names-grid { grid-template-columns: repeat(5, 1fr); } }
.names-grid li { position: relative; display: grid; place-items: center; min-height: 82px; padding: 14px 6px 10px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.names-grid strong { font-family: var(--font-serif); font-size: 1.3rem; color: var(--primary); line-height: 1.4; }
.nnum { position: absolute; top: 6px; right: 8px; font-size: .7rem; color: var(--gold); font-weight: 700; }

/* ============ البحث والتفسير ============ */
.search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.search-row .searchbar { flex: 1; margin: 0; min-width: 0; }
.search-row .btn { flex: none; }
.quick-links { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px 4px; }
.quick-links::-webkit-scrollbar { display: none; }
.qs-results { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.qs-results a { display: block; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.qs-text { margin: 0 0 4px; font-family: var(--font-quran); font-size: 1.35rem; line-height: 2.1; }
.qs-results small { color: var(--gold); font-weight: 700; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.35); }
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 80; max-height: 78vh; overflow-y: auto;
    background: var(--surface); border-radius: 22px 22px 0 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px -10px rgba(0,0,0,.35); transform: translateY(105%); transition: transform .28s ease; }
@media (min-width: 900px) { .sheet { max-width: 640px; margin: 0 auto; } }
.sheet.open { transform: none; }
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head strong { color: var(--primary); }
.sheet-ayah { font-family: var(--font-quran); font-size: 1.55rem; line-height: 2.2; margin: 10px 0; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-actions .chip { display: inline-flex; align-items: center; gap: 6px; }
.sheet-sub { margin: 18px 0 4px; color: var(--gold); font-size: .95rem; }
.sheet-tafsir { margin: 0; font-family: var(--font-serif); font-size: 1.12rem; line-height: 2; color: var(--ink); }

/* ============ البطاقات ============ */
.cards-layout { display: grid; gap: 18px; }
@media (min-width: 900px) { .cards-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.card-editor { padding: 18px; display: grid; gap: 8px; }
.field-label { font-weight: 700; color: var(--primary); font-size: .92rem; margin-top: 6px; }
.preset-list { display: grid; gap: 8px; }
.preset { text-align: start; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-serif); font-size: 1rem; line-height: 1.7; cursor: pointer; }
.preset.active { border-color: var(--gold); background: var(--gold-soft); }
.card-editor textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.8; resize: vertical; }
.card-preview { display: grid; gap: 14px; justify-items: center; }
.card-preview canvas { width: 100%; max-width: 420px; height: auto; border-radius: 16px; box-shadow: var(--shadow); }

/* ============ QR ============ */
.qr-card { max-width: 420px; margin: 0 auto; padding: 28px 24px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.qr-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.qr-card h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--primary); }
.qr-box { padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); margin: 8px 0; min-width: 244px; min-height: 244px; display: grid; place-items: center; }
.qr-box img, .qr-box canvas { display: block; }
.qr-cta { margin: 0; font-weight: 700; color: var(--primary); }
.qr-sub { margin: 0; color: var(--muted); font-size: .9rem; }
.qr-url { margin: 0; color: var(--gold); font-size: .85rem; direction: ltr; }

@media print {
    .topbar, .bottomnav, .footer, .no-print, .splash, .toast { display: none !important; }
    body { background: #fff; }
    body::before { display: none; }
    .main { padding: 0; }
    .qr-card { box-shadow: none; border: 2px solid #a9823f; margin-top: 20mm; }
}

.reciter-line { text-align: center; color: var(--muted); font-size: .85rem; margin: -8px 0 12px; }

/* التلاوة بدون إنترنت */
.reciter-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; text-align: center; color: var(--muted); font-size: .85rem; margin: -6px 0 14px; }
.reciter-line .chip { display: inline-flex; align-items: center; gap: 6px; }
.reciter-line .chip.active { background: var(--gold-soft); border-color: var(--gold); color: var(--primary); }
.saved-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; }
.saved-dot.on { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }

.dhikr-tools { display: inline-flex; align-items: center; gap: 10px; }

/* =====================================================
   عظيمة — مطابق للتصميم المرسل
   ===================================================== */
body::before { display: none; }
body {
    background:
        var(--bg);
    background-attachment: fixed;
}
:root[data-theme="dark"] body { background: var(--bg); }
body::after { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: var(--bg); opacity: .93; }

/* شاشة البداية */
.splash-name { font-size: clamp(4.6rem, 24vw, 7rem); line-height: 1.3; }
.splash-tag { color: #2e3b35; font-size: 1.25rem; margin-bottom: 34px; }
.splash-mark { width: 168px; height: 168px; animation: none; }
.splash-photo {
    padding: 6px; background: #fff;
    box-shadow: 0 0 0 2px #c9a45c, 0 0 0 7px #fff, 0 0 0 8.5px rgba(201,164,92,.55), 0 18px 40px -16px rgba(120,90,30,.55);
}
.splash-photo img { border: 0; }
.splash-spinner { margin-top: 18px; width: 30px; height: 30px; border-width: 3px; border-color: rgba(184,145,75,.18); border-top-color: var(--gold); border-right-color: var(--gold); }
.splash-dedication { font-family: var(--font); font-size: .95rem; color: #3a4640; }
:root[data-theme="dark"] .splash, :root[data-theme="dark"] .splash-tag, :root[data-theme="dark"] .splash-dedication { }

/* الشريط العلوي الأخضر */
.appbar {
    position: sticky; top: 0; z-index: 25; padding-top: env(safe-area-inset-top);
    background: linear-gradient(115deg, #064e3b 0%, #075c46 55%, #0a6a51 70%, #064e3b 100%);
    color: #f3e2b4;
}
.appbar::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(120deg, transparent 40%, rgba(217,187,122,.18) 55%, transparent 70%);
}
.appbar-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.appbar-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: #e7cf98; cursor: pointer; }
.appbar-btn .icon { width: 26px; height: 26px; stroke-width: 1.8; }
.appbar-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; color: #f6ead0; }
.page-home .appbar-title { visibility: hidden; }
.topbar { display: none; }

/* القائمة الجانبية */
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(4, 30, 22, .45); }
.drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 80; width: min(310px, 84vw); overflow-y: auto;
    background: var(--surface); box-shadow: 10px 0 40px -10px rgba(0,0,0,.35);
    transform: translateX(-105%); transition: transform .28s ease; display: flex; flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: calc(22px + env(safe-area-inset-top)) 18px 18px; background: linear-gradient(160deg, #064e3b, #0a6a51); color: #fdfaf2; }
.drawer-photo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px #d9bb7a; background: #fff; }
.drawer-head strong { display: block; font-family: var(--font-callig); font-size: 1.7rem; color: #e9d29c; line-height: 1.2; }
.drawer-head small { color: rgba(253,250,242,.8); font-size: .82rem; }
.drawer-nav { display: grid; padding: 8px; }
.drawer-nav a, .drawer-row { display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-radius: 12px; color: var(--ink); font-weight: 500; background: none; border: 0; width: 100%; text-align: start; cursor: pointer; }
.drawer-nav a .icon, .drawer-row .icon { color: var(--gold); }
.drawer-nav a.active { background: var(--gold-soft); color: var(--primary); }
.drawer-foot { margin-top: auto; padding: 8px; border-top: 1px solid var(--line); }

/* العنوان الدعائي */
.page-home .main { padding-top: 0; }
.home-hero {
    position: relative; margin: 0 -16px 8px; padding: 34px 20px 20px; text-align: center; background: none; box-shadow: none; overflow: visible; border-radius: 0; color: inherit;
}
.home-hero::before {
    content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 44px; z-index: -1;
    background: linear-gradient(115deg, #064e3b, #075c46 60%, #064e3b);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    box-shadow: 0 3px 0 #d9bb7a, 0 5px 0 #fff, 0 6.5px 0 rgba(201,164,92,.6);
}
.home-hero::after { display: none; }
.hero-title { font-family: var(--font-callig); font-size: clamp(2.4rem, 11vw, 3.1rem); font-weight: 700; color: var(--primary); line-height: 1.5; margin-top: 18px; }
.hero-sub { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; color: #2a3832; }
:root[data-theme="dark"] .hero-sub { color: var(--ink); }
@media (min-width: 900px) { .home-hero { margin: 0 0 8px; } }

/* البطاقات */
.dash { display: grid; gap: 14px; }
@media (min-width: 900px) { .dash { grid-template-columns: 1fr 1fr; align-items: start; } .memory-card { grid-row: span 2; } }
.dash-card {
    background: var(--surface); border: 1.5px solid #e2cf9f; border-radius: 16px; padding: 16px 16px 14px;
    box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 8px 20px -16px rgba(80,60,20,.45); position: relative; margin: 0;
}
.dash-card::before { display: none; }
.dash-head { display: flex; align-items: center; gap: 12px; }
.dash-text { flex: 1; min-width: 0; }
.dash-head h3 { font-size: 1.12rem; font-weight: 700; color: var(--primary); line-height: 1.4; }
.dash-head p { margin: 2px 0 0; color: #3b4741; font-size: .95rem; line-height: 1.5; }
:root[data-theme="dark"] .dash-head p { color: var(--muted); }
.dash-icon {
    width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #0b6b52, #064e3b 70%); color: #e9d29c;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d9bb7a, 0 6px 14px -6px rgba(6,78,59,.7);
}
.dash-icon .icon { width: 28px; height: 28px; stroke-width: 1.6; }
.dash-icon.sm { width: 44px; height: 44px; }
.dash-icon.sm .icon { width: 22px; height: 22px; }
.dash-icon.gold { width: 44px; height: 44px; background: var(--gold-soft); color: var(--gold); box-shadow: none; }

.wird-progress { height: 8px; margin: 18px 0 0; border-radius: 99px; background: #ece7da; overflow: hidden; }
:root[data-theme="dark"] .wird-progress { background: var(--surface-2); }
.wird-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #0b6b52, #064e3b); transition: width .4s; }
.dash-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-direction: row-reverse; }
.dash-meta { color: var(--muted); font-size: .8rem; }

.pill-gold {
    display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 20px; border-radius: 10px; border: 0; cursor: pointer;
    background: linear-gradient(180deg, #d6b778 0%, #b8914b 100%); color: #fff; font-weight: 700; font-size: .95rem;
    box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 6px 14px -8px rgba(140,100,30,.9);
}
.pill-gold:active { transform: scale(.97); }
.pill-gold.wide { width: 100%; margin-top: 10px; }

.dua-list { list-style: none; margin: 10px 0 0; padding: 0; }
.dua-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 2px; border: 0; font-family: var(--font); font-size: 1rem; color: #26332d; }
:root[data-theme="dark"] .dua-list a { color: var(--ink); }
.dua-text { flex: 1; }
.play-dot { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid #c9a45c; color: #b8914b; }
.play-dot .icon { width: 11px; height: 11px; fill: currentColor; margin-left: 2px; }

.salawat-body { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.s-info { flex: 1; min-width: 0; display: grid; justify-items: start; gap: 0; }
.s-info small { color: #33403a; font-family: var(--font); font-size: .95rem; }
:root[data-theme="dark"] .s-info small { color: var(--muted); }
.s-total { font-family: var(--font-serif); font-size: clamp(2.6rem, 13vw, 3.3rem); font-weight: 700; color: var(--primary); line-height: 1.2; }
.s-ring { position: relative; width: 116px; height: 116px; flex: none; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; touch-action: manipulation; transition: transform .1s; }
.s-ring:active, .s-ring.pulse { transform: scale(.96); }
.s-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.s-ring circle { fill: none; }
.s-ring .bar { stroke-linecap: round; transition: stroke-dashoffset .25s; }
.s-ring-label { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1.15; text-align: center; }
.s-ring-label small { color: var(--muted); font-size: .78rem; }
.s-ring-label b { color: var(--primary); }
.s-ring circle { stroke-width: 11; }
.s-ring .track { stroke: #ece7da; }
:root[data-theme="dark"] .s-ring .track { stroke: var(--surface-2); }
.s-ring .bar { stroke: #c9a45c; }
.s-ring-label b { font-size: 1.25rem; }

/* الذكرى: الفيديو */
.memory-video { margin-top: 12px; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1.5px #e2cf9f; }
.memory-video video { display: block; width: 100%; max-height: 70vh; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.memory-photo { margin-top: 12px; width: 100%; border-radius: 14px; }
.memory-dua { margin: 12px 0 0; text-align: center; font-family: var(--font-serif); font-size: 1.05rem; color: var(--gold); line-height: 1.8; }

.install-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.install-box div { flex: 1; min-width: 200px; }
.install-box p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }

/* الشريط السفلي */
.bottomnav { background: var(--surface); border-top: 1px solid #ecdfbf; }
.bottomnav a.active { color: var(--primary); }
.bottomnav a.active::before { background: #c9a45c; }

/* عناصر عامة بلمسات الهوية */
.dhikr-title { margin: 0 0 6px; font-size: 1rem; color: var(--gold); }
.page-head h2 { font-family: var(--font-serif); color: var(--primary); }
.section-title::before { background: #c9a45c; }
.tile .icon { color: var(--gold); }
.card { border-color: #eadfc5; }

/* التذكيرات */
.rem-master, .rem-list { padding: 6px 16px; margin-bottom: 14px; }
.rem-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rem-row:last-child { border-bottom: 0; }
.rem-text { flex: 1; min-width: 0; }
.rem-text strong { display: block; color: var(--primary); }
.rem-text small { color: var(--muted); font-size: .86rem; line-height: 2.1; }
.rem-next { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--gold-soft); color: var(--primary); font-size: .9rem; }
.rem-btns { padding: 4px 0 12px; }
.rem-list.off { opacity: .55; }
.select.inline { display: inline-block; width: auto; height: 32px; padding: 0 8px; border-radius: 8px; font-size: .85rem; }
.time-input { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; }
.rem-notes { margin: 0 0 12px; padding-inline-start: 20px; color: var(--muted); font-size: .9rem; line-height: 1.9; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { right: 23px; }
.notify-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--gold-soft); border: 1px solid #e2cf9f; color: var(--primary); }

/* تحسينات المقاسات */
html, body { overflow-x: clip; }
.pill-gold { white-space: nowrap; }
.dash-foot .dash-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) {
    .dash-foot .dash-meta { display: none; }
    .dash-icon { width: 48px; height: 48px; }
    .s-ring { width: 100px; height: 100px; }
    .hero-title { font-size: 2.2rem; }
}
@media (min-width: 900px) {
    .home-hero::before { left: calc(50% - 50vw); right: calc(50% - 50vw); }
}

/* زر الوضع الداكن/الفاتح في الهيدر */
.appbar-group { display: flex; align-items: center; gap: 2px; }
.theme-btn .i-sun { display: none; }
.theme-btn.is-dark .i-sun { display: block; }
.theme-btn.is-dark .i-moon { display: none; }
.theme-btn .icon { width: 23px; height: 23px; }

/* ============ الخطوط والهيدر النهائي ============ */
body { font-size: 16.5px; line-height: 1.85; }
.splash-name { font-family: "Amiri", serif; font-weight: 700; font-size: clamp(4.4rem, 23vw, 6.6rem); line-height: 1.45; letter-spacing: 0; }
.hero-title { font-family: "Amiri", serif; font-weight: 700; font-size: clamp(2.3rem, 10.5vw, 3rem); line-height: 1.6; }
.hero-sub, .memory-dua, .dua-list a, .dhikr-text, .hadith-text { font-family: "Amiri", serif; }
.dua-list a { font-size: 1.08rem; }
.dash-head h3 { font-family: "Amiri", serif; font-size: 1.28rem; }
.s-total { font-family: "Amiri", serif; }
.pill-gold, .bottomnav a, .appbar, .btn, .chip { font-family: var(--font); }

.appbar-inner { height: 58px; }
.appbar-brand { display: flex; align-items: center; gap: 10px; color: #f3e2b4; }
.appbar-brand span { font-family: "Amiri", serif; font-weight: 700; font-size: 1.45rem; line-height: 1; }
.appbar-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #d9bb7a; }
.page-home .appbar-brand { visibility: visible; }
@media (max-width: 359px) { .appbar-brand span { font-size: 1.2rem; } }

/* صفحة المزيد */
.more-list { padding: 4px 14px; }
.more-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: start; cursor: pointer; font: inherit; }
.more-row:last-child { border-bottom: 0; }
.more-text { flex: 1; min-width: 0; }
.more-text strong { display: block; color: var(--primary); font-weight: 700; }
.more-text small { color: var(--muted); font-size: .86rem; }
