@font-face { font-family: 'Deeni Plex'; src: url('fonts/plex-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Deeni Plex'; src: url('fonts/plex-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Deeni Plex'; src: url('fonts/plex-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Deeni Plex'; src: url('fonts/plex-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Deeni Hafs'; src: url('fonts/uthmanic-hafs.ttf') format('truetype'); font-weight: 400; font-display: swap; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #f4f4f4; }
body {
    font-family: 'Deeni Plex', 'Segoe UI', sans-serif;
    color: #23201f;
    background: #fff;
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
#app { padding: 20px 16px 32px; }
.app-head h1 {
    font-family: 'Deeni Plex', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0b3d2e;
}
.app-sub { font-size: 13px; font-weight: 400; color: #5d5859; margin: 4px 0 16px; }
.app-foot { font-size: 12px; color: #8d888a; text-align: center; margin-top: 28px; line-height: 1.8; }

.tabs { display: flex; gap: 6px; margin: 12px 0 18px; }
.tab {
    flex: 1; font-family: 'Deeni Plex', sans-serif; font-size: 14px; font-weight: 600;
    padding: 10px 0; border-radius: 999px; border: 1px solid #e8e6e7; background: #fff;
    color: #5d5859; cursor: pointer;
}
.tab.is-on { background: #0b3d2e; border-color: #0b3d2e; color: #fff; }

.hero {
    background: linear-gradient(165deg, #0b3d2e 0%, #125f47 55%, #1a7a5b 100%);
    border-radius: 20px; padding: 26px 22px 22px; color: #fff; text-align: center; margin: 4px 0 8px;
}
.hero-place {
    display: inline-block; font-size: 13px; font-weight: 500;
    background: rgba(255,255,255,0.14); border-radius: 999px; padding: 3px 14px; margin-bottom: 14px;
}
.hero-label { font-size: 15px; font-weight: 500; color: #cfe8dd; }
.hero-count {
    font-size: 46px; font-weight: 600; letter-spacing: 0.01em; color: #f4d9a0;
    margin: 6px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.35;
}
.hero-sub { font-size: 15px; font-weight: 600; }
.hero-date { font-size: 13px; font-weight: 400; color: #cfe8dd; margin-top: 12px; }
.hero-date.greg { margin-top: 2px; font-size: 12px; opacity: 0.85; }

.banner {
    display: flex; align-items: center; gap: 10px; background: #fdf3df; border: 1px solid #ecd9ae;
    border-radius: 12px; padding: 10px 14px; margin: 10px 0; font-size: 14px; font-weight: 600; color: #6b5312;
}
.banner span { flex: 1; }
.banner-play { font-family: inherit; font-weight: 600; font-size: 13px; background: #0b3d2e; color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; }
.banner-close { background: none; border: 0; font-size: 20px; color: #6b5312; padding: 0 4px; }

.sec { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 22px 0 10px; }
.sub-sec { font-size: 13px; font-weight: 600; color: #5d5859; margin: 18px 0 8px; }
.caption { font-size: 12.5px; font-weight: 400; color: #8d888a; margin-top: 8px; line-height: 1.75; }
.row { margin-top: 12px; }

.times { border: 1px solid #e8e6e7; border-radius: 14px; overflow: hidden; }
.time-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid #e8e6e7; font-size: 15.5px;
}
.time-row:last-child { border-bottom: 0; }
.time-row.is-next { background: #eaf4f0; }
.time-name { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.badge { font-size: 11px; font-weight: 600; background: #0b3d2e; color: #fff; border-radius: 999px; padding: 2px 10px; }
.time-value { font-weight: 600; font-variant-numeric: tabular-nums; }

.cities { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-family: inherit; font-size: 13px; font-weight: 500; border: 1px solid #e8e6e7; background: #fff;
    color: #23201f; border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.chip.is-on { background: #0b3d2e; border-color: #0b3d2e; color: #fff; font-weight: 600; }

.btn {
    font-family: inherit; font-size: 14px; font-weight: 600; border-radius: 10px; padding: 10px 18px; cursor: pointer; border: 0;
}
.btn.primary { background: #0b3d2e; color: #fff; }
.btn.secondary { background: #fff; color: #0b3d2e; border: 1px solid #c9d8d2; }
.btn.tiny { font-size: 12.5px; padding: 7px 12px; background: #eaf4f0; color: #0b3d2e; border: 1px solid #cfe2da; }

.remind-row { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.switch { width: 48px; height: 28px; border-radius: 999px; border: 0; background: #d8d4d5; position: relative; cursor: pointer; }
.switch.is-on { background: #125f47; }
.switch-dot { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch.is-on .switch-dot { transform: translateX(-20px); }

.ayah { background: #fbf8ef; border: 1px solid #eee3c4; border-radius: 14px; padding: 18px; text-align: center; }
.ayah-text { font-family: 'Deeni Hafs', serif; font-size: 23px; line-height: 2.1; color: #3d3417; margin-bottom: 8px; }
.ayah-ref { font-size: 13px; font-weight: 500; color: #8a7a45; }

.search {
    width: 100%; font-family: inherit; font-size: 15px; padding: 11px 14px; margin: 12px 0;
    border: 1px solid #e8e6e7; border-radius: 12px; outline: none;
}
.search:focus { border-color: #125f47; }
.sura-list { border: 1px solid #e8e6e7; border-radius: 14px; overflow: hidden; }
.sura-row {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
    padding: 11px 14px; background: #fff; border: 0; border-bottom: 1px solid #e8e6e7; cursor: pointer; font-family: inherit;
}
.sura-row:last-child { border-bottom: 0; }
.sura-row:active { background: #f6f8f7; }
.sura-num { flex: 0 0 32px; font-size: 12px; font-weight: 600; color: #125f47; background: #eaf4f0; border-radius: 8px; text-align: center; padding: 4px 0; font-variant-numeric: tabular-nums; }
.sura-row-name { flex: 1; font-size: 15.5px; font-weight: 500; }
.sura-row-count { font-size: 12px; font-weight: 400; color: #5d5859; font-variant-numeric: tabular-nums; }

.sura-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.back { font-family: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; color: #125f47; cursor: pointer; padding: 6px 0; }
.sura-title { flex: 1; min-width: 120px; }
.sura-name { display: block; font-family: 'Deeni Hafs', serif; font-size: 27px; font-weight: 400; }
.sura-meta { font-size: 13px; color: #5d5859; }
.sura-size { display: flex; gap: 6px; }
.sura-size button { font-family: 'Deeni Plex', sans-serif; font-size: 16px; font-weight: 600; width: 40px; height: 40px; border-radius: 10px; border: 1px solid #e8e6e7; background: #fff; cursor: pointer; }
.mushaf { background: #fffdf7; border: 1px solid #efe8d2; border-radius: 14px; padding: 20px 18px; }
.basmala { font-family: 'Deeni Hafs', serif; font-size: 24px; text-align: center; color: #125f47; margin-bottom: 14px; }
.verses { font-family: 'Deeni Hafs', serif; line-height: 2.2; text-align: justify; color: #231f16; }
.verse-no {
    display: inline-block; min-width: 1.8em; height: 1.8em; line-height: 1.8em;
    padding: 0 0.15em; margin: 0 0.2em;
    border: 1px solid #d8bd6e; border-radius: 999px; background: #fffdf3;
    color: #8a6a14; font-family: 'Deeni Plex', sans-serif; font-size: 0.42em;
    font-weight: 600; text-align: center; vertical-align: middle;
    white-space: nowrap; direction: ltr;
}

.quiz-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #5d5859; margin-bottom: 10px; }
.quiz-q { font-size: 18px; font-weight: 600; margin-bottom: 14px; line-height: 1.6; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opt {
    font-family: inherit; font-size: 15px; font-weight: 500; text-align: start;
    padding: 12px 16px; border-radius: 12px; border: 1px solid #e8e6e7; background: #fff; color: #23201f; cursor: pointer;
}
.quiz-opt.is-right { background: #eaf4f0; border-color: #125f47; color: #0b3d2e; font-weight: 600; }
.quiz-opt.is-wrong { background: #fdecec; border-color: #d32f2f; color: #8f1d1d; }
.quiz-done { text-align: center; padding: 10px 0; }
.quiz-big { font-size: 42px; font-weight: 700; color: #0b3d2e; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.quiz-stats { font-weight: 600; color: #125f47; }
.quiz-back { color: #5d5859; font-size: 14px; }

.alerts { border: 1px solid #e8e6e7; border-radius: 14px; overflow: hidden; }
.alert-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e8e6e7; }
.alert-row:last-child { border-bottom: 0; }
.alert-text { flex: 1; }
.alert-label { display: block; font-size: 14.5px; font-weight: 500; }
.alert-hint { display: block; font-size: 11.5px; color: #8d888a; }
.pill { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.pill.is-ok { background: #eaf4f0; color: #0b6b4f; }
.pill.is-bad { background: #fdecec; color: #8f1d1d; }
.steps { padding-inline-start: 18px; font-size: 13.5px; color: #3a3637; line-height: 1.9; }
.steps li { margin-bottom: 2px; }

/* ===== مشغل التلاوة ===== */
.player { display: flex; align-items: center; gap: 10px; background: linear-gradient(140deg, #0b3d2e 0%, #125f47 100%); border-radius: 16px; padding: 10px 12px; margin: 10px 0 6px; box-shadow: 0 6px 16px rgba(11, 61, 46, 0.18); }
.play-btn { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 999px; border: 0; background: linear-gradient(160deg, #e6bb4d 0%, #c9971f 100%); color: #0b3d2e; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22); transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease; }
.play-btn:active { transform: scale(0.93); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.play-btn svg { display: block; }
.player-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player-title { color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.2px; }
.player-sub { color: #c6e2d6; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghost { border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.08); color: #f3f7f5; font-family: inherit; font-size: 12px; font-weight: 600; padding: 8px 11px; border-radius: 11px; cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease; }
.ghost:active { background: rgba(255, 255, 255, 0.18); }
.ghost.is-on { background: #1a7a5b; border-color: #1a7a5b; color: #fff; }
.player-note { background: #fff8e6; border: 1px solid #f0dfae; color: #6b5300; font-size: 12.5px; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }

.reciter-panel { border: 1px solid #e8e6e7; border-radius: 14px; padding: 8px; margin-bottom: 10px; background: #fbfbfb; }
.reciter-row { width: 100%; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e8e6e7; border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; font-family: inherit; font-size: 13.5px; color: #23201f; cursor: pointer; text-align: start; }
.reciter-row:last-of-type { margin-bottom: 4px; }
.reciter-row.is-on { border-color: #125f47; background: #eaf4f0; font-weight: 600; }
.reciter-name { flex: 1; }
.reciter-note { font-size: 11px; color: #8d888a; }
.tick { color: #0b6b4f; font-weight: 700; }

.mushaf .v { padding: 0; }
.mushaf .v.is-playing { background: transparent; box-shadow: none; }

/* ===== اختيار الأذان ===== */
.adhan-list { border: 1px solid #e8e6e7; border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.adhan-row { display: flex; align-items: stretch; border-bottom: 1px solid #e8e6e7; background: #fff; }
.adhan-row:last-child { border-bottom: 0; }
.adhan-row.is-on { background: #eaf4f0; }
.adhan-pick { flex: 1; text-align: start; background: transparent; border: 0; padding: 11px 14px; font-family: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.adhan-name { font-size: 14.5px; font-weight: 600; color: #23201f; }
.adhan-meta { font-size: 11.5px; color: #5d5859; }
.adhan-lic { font-size: 10.5px; color: #8d888a; }
.adhan-play { width: 52px; border: 0; border-inline-start: 1px solid #e8e6e7; background: #fff; color: #0b3d2e; font-size: 15px; cursor: pointer; }
.adhan-row.is-on .adhan-play { background: #eaf4f0; }

.app-ver { font-size: 11.5px; color: #0b6b4f; font-weight: 600; margin: -10px 0 12px; }

/* تلوين الكلمات أثناء التلاوة */
.mushaf .v.done .w, .mushaf .w.done { color: #c9971f; }
.mushaf .v.cur { background: transparent; }
.mushaf .w { transition: color 0.12s ease; }
.mushaf .w.now { background: transparent; box-shadow: none; color: #0b3d2e; font-weight: 700; }

.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gear { border: 1px solid #e8e6e7; background: #fff; color: #0b3d2e; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.gear:active { background: #eaf4f0; }

.set-back { background: transparent; border: 0; color: #0b6b4f; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.set-sec { margin-bottom: 22px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e8e6e7; background: #fff; }
.set-row:last-child { border-bottom: 0; }
.set-list { border: 1px solid #e8e6e7; border-radius: 14px; overflow: hidden; }
.set-label { flex: 1; font-size: 14px; font-weight: 500; }
.set-value { font-size: 12.5px; color: #6b6768; }
.set-btn { border: 1px solid #0b3d2e; background: #fff; color: #0b3d2e; font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 10px; cursor: pointer; }
.set-btn.primary { background: #0b3d2e; color: #fff; }

/* ===== الأحاديث ===== */
.tabs { gap: 4px; }
.tab { font-size: 13px; padding: 9px 0; }
.hd-wrap { padding-bottom: 8px; }
.hd-books { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.hd-chip { font-family: 'Deeni Plex', sans-serif; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid #e8e6e7; background: #fff; color: #5d5859; cursor: pointer; }
.hd-chip.is-on { background: #0b3d2e; border-color: #0b3d2e; color: #fff; }
.hd-searchrow { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.hd-search { flex: 1; font-family: 'Deeni Plex', sans-serif; font-size: 14px; padding: 11px 14px; border-radius: 12px; border: 1px solid #e2e0e1; background: #fff; color: #262324; }
.hd-search:focus { outline: 2px solid #0b3d2e33; border-color: #0b3d2e; }
.hd-clear { font-family: 'Deeni Plex', sans-serif; font-size: 12.5px; padding: 10px 12px; border-radius: 12px; border: 1px solid #e8e6e7; background: #fff; color: #5d5859; cursor: pointer; }
.hd-note { font-size: 12.5px; color: #6b6667; margin: 6px 2px 10px; line-height: 1.7; }
.hd-err { color: #a33; }
.hd-chapters { display: flex; flex-direction: column; gap: 6px; }
.hd-chbtn { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: right; font-family: 'Deeni Plex', sans-serif; font-size: 13.5px; padding: 11px 13px; border-radius: 12px; border: 1px solid #eceaeb; background: #fff; color: #262324; cursor: pointer; }
.hd-chbtn b { font-size: 11.5px; color: #8a8485; font-weight: 600; }
.hd-back { font-family: 'Deeni Plex', sans-serif; font-size: 12.5px; padding: 8px 12px; border-radius: 10px; border: 1px solid #e8e6e7; background: #fff; color: #0b3d2e; cursor: pointer; margin-bottom: 8px; }
.hd-list { display: flex; flex-direction: column; gap: 10px; }
.hd-item { background: #fff; border: 1px solid #eceaeb; border-radius: 14px; padding: 12px 13px; }
.hd-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 11.5px; color: #6b6667; }
.hd-book { background: #f3f7f5; color: #0b3d2e; border-radius: 8px; padding: 3px 8px; font-weight: 600; }
.hd-num { background: #f6f5f5; border-radius: 8px; padding: 3px 8px; }
.hd-text { font-family: 'Uthmanic Hafs', 'Deeni Plex', serif; font-size: 17px; line-height: 2; color: #1f1c1d; margin: 0 0 10px; text-align: right; }
.hd-foot { border-top: 1px dashed #eeecec; padding-top: 8px; }
.hd-grade { font-size: 11.5px; color: #6b6667; }
.hd-more { width: 100%; font-family: 'Deeni Plex', sans-serif; font-size: 13px; padding: 12px; margin-top: 10px; border-radius: 12px; border: 1px solid #0b3d2e; background: #fff; color: #0b3d2e; cursor: pointer; }
.hd-src { font-size: 11px; color: #8a8485; line-height: 1.8; margin: 14px 2px 0; }
