/* EasyQuran — app styles (PWA, mobile-first) */
@font-face{ font-family:'AlMushaf'; src:url('/fonts/AlMushaf.ttf') format('truetype'); font-display:swap; }
@font-face{ font-family:'MehrNastaliq'; src:url('/fonts/MehrNastaliq.woff') format('woff'), url('/fonts/MehrNastaliq.ttf') format('truetype'); font-display:swap; }

:root{
  --bg:#FBF7EF; --card:#FFFFFF; --ink:#2A2A2A; --muted:#8A8375;
  --green:#1B6B5B; --green-dark:#145447; --green-soft:#E7F1EE; --gold:#C79A3A; --gold-soft:#F6EEDA;
  --line:#EDE7DA; --shadow:0 4px 18px rgba(40,40,40,.06); --radius:16px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:'Nunito',system-ui,'Segoe UI',Roboto,sans-serif; line-height:1.5;
  -webkit-font-smoothing:antialiased; padding-bottom:96px; /* room for the tab bar */
}
body[data-surah]{padding-bottom:196px;} /* tab bar + player bar */
.wrap{max-width:820px; margin:0 auto; padding:0 16px;}

/* ---------- Header ---------- */
header.top{
  background:var(--green-dark); color:#fff; padding:12px 0; position:sticky; top:0; z-index:20;
  box-shadow:0 2px 10px rgba(0,0,0,.18);
}
header.top .wrap{display:flex; align-items:center; gap:10px;}
.logo{font-weight:800; font-size:20px; letter-spacing:-.3px; color:#fff; text-decoration:none;}
.top .spacer{flex:1}
.top a.navlink{color:#DFEAE7; text-decoration:none; font-weight:700; font-size:14px;}

/* ---------- Home hero + surah list ---------- */
.hero{text-align:center; padding:34px 0 10px;}
.hero h1{color:var(--green); font-size:32px; margin:0 0 6px; letter-spacing:-.5px;}
.hero h1 span{color:var(--gold);}
.hero p.tag{color:var(--muted); font-size:16px; margin:0;}
.hero p.tag-ur{font-family:'MehrNastaliq',serif; direction:rtl; font-size:20px; color:var(--muted); margin:10px 0 0; line-height:2;}

.surah-list{margin:26px 0; scroll-margin-top:72px;}
.surah-list-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 2px 14px; flex-wrap:wrap;}
.sl-title{font-size:20px; font-weight:800; color:var(--green); margin:0;}
.surah-jump{display:inline-flex; align-items:center; gap:8px; background:var(--card); border:1px solid var(--line); border-radius:999px; box-shadow:var(--shadow); padding:5px 8px 5px 14px;}
.surah-jump .sj-label{font-weight:800; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px;}
.surah-jump select{font:inherit; font-weight:700; font-size:14px; color:var(--green); border:0; background:transparent; padding:6px 4px; cursor:pointer; max-width:200px;}
/* surah-page jump sits centered under the title */
.shead + .surah-jump{display:flex; margin:6px auto 4px; width:max-content; max-width:92%;}
.scard{
  display:flex; align-items:center; gap:14px; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; margin:12px 0;
  text-decoration:none; color:var(--ink); transition:.15s;
}
.scard:hover{transform:translateY(-1px); border-color:#D8E6E1;}
.scard .snum{
  min-width:44px; height:44px; border-radius:12px; background:var(--green-soft); color:var(--green);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:17px;
}
.scard .sinfo{flex:1}
.scard .sname{font-weight:800; font-size:17px; color:var(--green);}
.scard .smeta{color:var(--muted); font-size:13.5px;}
.scard .sar{font-family:'AlMushaf',serif; font-size:26px; color:#1c1c1c;}
/* Surah has no audio yet (text still being checked) — flagged in red on the home list. */
.scard.no-audio{ border-color:#E4B9B4; border-left:4px solid #C0392B; }
.scard.no-audio:hover{ border-color:#C0392B; }
.scard.no-audio .snum{ background:#F7E3E0; color:#C0392B; }
.scard .audio-flag{ display:inline-block; margin-left:8px; color:#C0392B; font-weight:700; font-size:12px; }
.scard .audio-flag::before{ content:"● "; }
html.theme-dark .scard.no-audio{ border-left-color:#E06B5E; }
html.theme-dark .scard.no-audio .snum{ background:#4A2420; color:#F0A79C; }
html.theme-dark .scard .audio-flag{ color:#F0A79C; }
.coming{
  text-align:center; color:var(--muted); font-size:14px; background:var(--gold-soft);
  border:1px dashed #E3D3A8; border-radius:var(--radius); padding:14px; margin:18px 0;
}

/* ---------- Offline download card ---------- */
.dlcard{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:16px; margin:18px 0;
}
.dlcard .dtitle{font-weight:800; color:var(--green); margin:0 0 4px; font-size:16px;}
.dlcard .dsub{color:var(--muted); font-size:13.5px; margin:0 0 10px;}
.progress{height:10px; background:var(--green-soft); border-radius:999px; overflow:hidden; margin:10px 0; display:none;}
.progress .bar{height:100%; width:0%; background:var(--green); border-radius:999px; transition:width .2s;}

/* ---------- Buttons ---------- */
.btn{
  font:inherit; font-weight:800; border:0; border-radius:12px; padding:11px 18px; cursor:pointer;
  background:var(--green); color:#fff; display:inline-flex; align-items:center; gap:8px;
}
.btn.ghost{background:var(--gold-soft); color:#8a6b1f;}
.btn.small{padding:7px 12px; font-size:13px; border-radius:10px;}
.btn:disabled{opacity:.55; cursor:default;}
.btn:active{transform:translateY(1px);}

/* ---------- Controls panel (surah page) ---------- */
.panel{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:14px; margin:16px 0;
}
.row{display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center;}
.row + .row{margin-top:12px; padding-top:12px; border-top:1px dashed var(--line);}
label.lbl{font-weight:700; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; min-width:64px;}
.pill{
  display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border-radius:999px;
  border:1px solid var(--line); background:#fff; cursor:pointer; user-select:none; font-weight:700; font-size:13.5px;
}
.pill input{accent-color:var(--green); width:15px; height:15px;}
.pill.on{background:var(--green-soft); border-color:#CDE4DD;}
.seg{display:inline-flex; border:1px solid var(--line); border-radius:999px; overflow:hidden; flex-wrap:nowrap;}
.seg button{font:inherit; font-weight:700; font-size:13.5px; border:0; background:#fff; color:var(--muted); padding:7px 13px; cursor:pointer; white-space:nowrap;}
.seg button.active{background:var(--green); color:#fff;}
.seg button[data-lang="ur"]{font-family:'MehrNastaliq',serif; font-size:16px;}

/* ---------- Surah page header ---------- */
.shead{text-align:center; padding:20px 0 4px;}
.shead .sar{font-family:'AlMushaf',serif; font-size:38px; color:var(--green); line-height:1.6;}
.shead h1{font-size:22px; color:var(--ink); margin:2px 0;}
.shead .smeta{color:var(--muted); font-size:14px;}

/* ---------- Content: passages, verses, layers ---------- */
.passage{
  border:1px solid var(--line); border-radius:var(--radius); background:var(--card);
  box-shadow:var(--shadow); margin:16px 0; overflow:hidden; transition:.2s;
}
.passage.speaking{border-color:var(--gold); box-shadow:0 6px 22px rgba(199,154,58,.22);}
.passage-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 14px; background:var(--gold-soft); color:#8a6b1f; font-weight:800; font-size:12px; letter-spacing:.4px; text-transform:uppercase;
}
.passage-head .play-p{cursor:pointer; border:0; background:#fff; color:var(--green); font-weight:800; border-radius:999px; padding:5px 12px; font-size:12px; font-family:inherit;}

.verse{padding:16px; border-top:1px solid var(--line); transition:.2s;}
.verse:first-of-type{border-top:0;}
.verse.speaking{background:#F3F9F6;}
.verse.flash{animation:flashv 1.8s ease;}
@keyframes flashv{0%,100%{background:transparent} 15%,55%{background:var(--gold-soft)}}
/* The exact text being spoken right now — the WORDS change colour (no background, no boxes) */
.txt{transition:color .3s ease;}
.reading .txt{color:#B07D1E;}            /* deep warm gold — stands out on both the cream page and the green easy card */
.passage.speaking{background:#FFFDF6;}   /* soft wash over the whole active group */
.vhead{display:flex; align-items:center; gap:8px; margin-bottom:8px;}
.num{
  display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:26px; padding:0 8px;
  background:var(--green-soft); color:var(--green); font-weight:800; font-size:13px; border-radius:999px;
}
.vspacer{flex:1}
.vbtn{
  border:1px solid var(--line); background:#fff; color:var(--green); font-weight:800; font-family:inherit;
  border-radius:999px; padding:4px 11px; font-size:12px; cursor:pointer;
}
.vbtn:hover{background:var(--green-soft);}

.arabic{font-family:'AlMushaf',serif; font-size:34px; line-height:2.0; text-align:right; direction:rtl; color:#1c1c1c; margin:4px 0 10px;}
.exact{color:var(--muted); font-size:15px; margin:6px 0; padding-left:12px; border-left:3px solid var(--line);}
.exact.ur{font-family:'MehrNastaliq',serif; direction:rtl; text-align:right; border-left:0; border-right:3px solid var(--line); padding-left:0; padding-right:12px; line-height:2.4; font-size:18px;}
.easy{
  background:var(--green-soft); border:1px solid #D8EAE4; border-radius:12px; padding:12px 14px; margin-top:8px;
  font-size:17px; font-weight:600; color:#173f37;
}
.easy.ur{font-family:'MehrNastaliq',serif; direction:rtl; text-align:right; font-size:26px; font-weight:400; line-height:2.7;}
/* Layer badge — a pill that marks the Easy Explanation as explanation, not exact translation */
.cap{
  display:table;                               /* shrink-wraps like a pill but keeps its own line */
  background:var(--green); color:#fff;
  font-size:12.5px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;
  padding:3px 13px; border-radius:999px; margin-bottom:8px;
}
.easy.ur .cap, .ur-cap{
  margin-left:auto; margin-right:0;            /* right-aligned in RTL blocks */
  font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif;
  font-weight:400;                             /* Nastaliq should never be bold */
  font-size:18px; letter-spacing:0; line-height:1.9; padding:2px 15px 6px;
}

/* Bismillah */
.bism{
  text-align:center; background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:16px 16px 14px; margin:16px 0; transition:.2s;
}
.bism.speaking{border-color:var(--gold); box-shadow:0 6px 22px rgba(199,154,58,.22);}
.bism .bism-ar{font-family:'AlMushaf',serif; font-size:32px; direction:rtl; color:var(--green); line-height:1.9;}
.bism .bism-ex{color:var(--muted); font-size:14px; margin-top:4px;}
.bism .bism-ex.ur{font-family:'MehrNastaliq',serif; direction:rtl; font-size:17px; line-height:2.2;}
.bism .bism-ez{color:#173f37; font-weight:600; font-size:16px; margin-top:6px;}
.bism .bism-ez.ur{font-family:'MehrNastaliq',serif; direction:rtl; font-weight:400; font-size:24px; line-height:2.4;}

/* Topics layer */
.intro,.tnote{
  background:var(--gold-soft); border:1px solid #EDDDB4; border-radius:var(--radius);
  padding:14px 16px; margin:16px 0 10px; color:#6b5417; font-size:15.5px; font-weight:600; transition:.2s;
}
.tnote{margin-bottom:-6px; border-bottom-left-radius:6px; border-bottom-right-radius:6px;}
.intro.speaking,.tnote.speaking{border-color:var(--gold); box-shadow:0 6px 22px rgba(199,154,58,.22);}
.intro .cap,.tnote .cap{background:var(--gold); color:#fff;}   /* Topics badge in gold to match its cards */
.intro .ur,.tnote .ur{font-family:'MehrNastaliq',serif; direction:rtl; text-align:right; font-weight:400; font-size:22px; line-height:2.4;}

/* Language visibility: body carries lang-en / lang-ur */
body.lang-en .only-ur{display:none !important;}
body.lang-ur .only-en{display:none !important;}
/* Layer visibility: body carries hide-* classes */
body.hide-ar .arabic, body.hide-ar .bism-ar{display:none !important;}
body.hide-ex .exact, body.hide-ex .bism-ex{display:none !important;}
body.hide-ez .easy, body.hide-ez .bism-ez{display:none !important;}
body.hide-tp .intro, body.hide-tp .tnote{display:none !important;}

/* ---------- Bottom tab bar (app shell) ---------- */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:40;
  background:#fff; border-top:1px solid var(--line);
  padding:6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar .tabs{display:flex; justify-content:space-around; align-items:center;}
.tab{
  display:flex; flex-direction:column; align-items:center; gap:2px;
  color:var(--muted); text-decoration:none; font-size:11.5px; font-weight:700;
  padding:3px 18px; border-radius:12px;
}
.tab svg{width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}
.tab.active{color:var(--green);}

/* Bookmark button on each verse */
.bmark svg{width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; vertical-align:-2px;}
.bmark.on{background:var(--gold-soft); border-color:var(--gold); color:#8a6b1f;}
.bmark.on svg{fill:var(--gold); stroke:var(--gold);}

/* Bookmarks page */
.bm-item{
  display:flex; align-items:center; gap:12px; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--shadow); padding:14px 16px; margin:10px 0;
}
.bm-item a{flex:1; min-width:0; text-decoration:none; color:var(--ink);}
.bm-name{font-weight:800; color:var(--green); font-size:15px;}
.bm-prev{color:var(--muted); font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.bm-prev.ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:16px; line-height:2; white-space:normal;}
.bm-del{border:1px solid var(--line); background:#fff; color:#a33; border-radius:10px; padding:6px 11px; cursor:pointer; font-weight:700; font-family:inherit;}
/* Bookmark name + summary */
.bm-prev.bm-full{white-space:normal; overflow:visible; text-overflow:clip;}
.bm-ref-sub{color:var(--muted); font-size:12px; font-weight:600; margin:1px 0 3px;}
.bm-actions{display:flex; flex-direction:column; gap:6px;}
.bm-edit-btn{border:1px solid var(--line); background:#fff; color:var(--green); border-radius:10px; padding:6px 11px; cursor:pointer; font-weight:700; font-family:inherit; white-space:nowrap;}
.bm-item.bm-edit{flex-direction:column; align-items:stretch; gap:8px;}
.bm-ref{font-weight:800; color:var(--green); font-size:14px;}
.bm-name-in, .bm-note-in{width:100%; box-sizing:border-box; border:1px solid var(--line); border-radius:10px; padding:9px 11px; font-family:inherit; font-size:14px; color:var(--ink); background:#fff;}
.bm-note-in{resize:vertical; line-height:1.5;}
.bm-item.bm-edit.ur .bm-name-in, .bm-item.bm-edit.ur .bm-note-in{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:17px; line-height:2;}
.bm-count{font-size:12px; color:var(--muted);}
.bm-count.bm-ok{color:var(--green); font-weight:700;}
.bm-edit-btns{display:flex; gap:8px;}
.bm-save{border:none; background:var(--green); color:#fff; border-radius:10px; padding:8px 16px; cursor:pointer; font-weight:800; font-family:inherit;}
.bm-cancel{border:1px solid var(--line); background:#fff; color:var(--muted); border-radius:10px; padding:8px 14px; cursor:pointer; font-weight:700; font-family:inherit;}
html.theme-dark .bm-edit-btn, html.theme-dark .bm-name-in, html.theme-dark .bm-note-in, html.theme-dark .bm-cancel{background:var(--card); color:var(--ink);}
/* Home hub tiles — bright colour blocks (Easy Quran / Memorize / Games) */
.home-tiles{ display:flex; flex-direction:column; gap:12px; margin:8px 0 18px; }
.htile{ position:relative; overflow:hidden; display:flex; align-items:center; gap:14px;
  border-radius:20px; padding:16px 17px; text-decoration:none; color:#fff; transition:transform .15s, box-shadow .15s; }
.htile:hover{ transform:translateY(-2px); }
.htile-quran{ background:var(--green); box-shadow:0 8px 20px rgba(27,107,91,.28); }
.htile-mem{ background:var(--gold); box-shadow:0 8px 20px rgba(199,154,58,.28); }
.htile-games{ background:#6B4E9E; box-shadow:0 8px 20px rgba(107,78,158,.28); }
.htile-glow{ position:absolute; right:-22px; top:-22px; width:88px; height:88px; border-radius:50%; background:rgba(255,255,255,.10); }
.htile-ic{ position:relative; flex:0 0 auto; width:54px; height:54px; border-radius:50%;
  background:rgba(255,255,255,.16); display:flex; align-items:center; justify-content:center; }
.htile-txt{ position:relative; flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.htile-t{ font-family:'Newsreader',serif; font-weight:700; font-size:18px; color:#fff; }
.htile-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:21px; }
.htile-s{ color:rgba(255,255,255,.85); font-size:12.5px; line-height:1.4; }
.htile-s .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; font-size:15px; display:block; }
.soon-badge{ display:inline-block; background:#EEE9DD; color:#8A7A4A; font-size:10px; font-weight:800;
  letter-spacing:.4px; text-transform:uppercase; padding:2px 8px; border-radius:999px; vertical-align:middle; margin-left:5px; }
.htile .soon-badge, .hcard .soon-badge{ background:rgba(255,255,255,.22); color:#fff; margin-left:0; }
html.theme-dark .soon-badge{ background:#3a3730; color:#c9bd99; }
/* Big hero tile variant (Easy Quran = the main thing, on top) */
.htile-big{ padding:22px 18px; }
.htile-big .htile-ic{ width:66px; height:66px; }
.htile-big .htile-ic svg{ width:40px; height:40px; }
.htile-big .htile-t{ font-size:23px; }
.htile-big .htile-t .only-ur{ font-size:26px; }
.htile-big .htile-s{ font-size:13.5px; }
.htile-go{ position:relative; flex:0 0 auto; color:rgba(255,255,255,.75); font-size:26px; }
/* "Discover" divider between the hero tile and the section grid */
.dlabel{ display:flex; align-items:center; gap:10px; margin:16px 2px 10px; font-size:11.5px; font-weight:800;
  letter-spacing:.6px; text-transform:uppercase; color:var(--muted); }
.dlabel .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:15px; text-transform:none; letter-spacing:0; }
.dlabel::after{ content:""; flex:1; height:1px; background:var(--line); }
/* Square section cards, two per row */
.hgrid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:0 0 18px; }
.hcard{ position:relative; overflow:hidden; border-radius:20px; padding:18px 10px 16px; color:#fff; text-decoration:none;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; text-align:center;
  min-height:132px; transition:transform .15s; }
.hcard:hover{ transform:translateY(-2px); }
.hcard .hc-ic{ width:52px; height:52px; border-radius:50%; background:rgba(255,255,255,.16);
  display:flex; align-items:center; justify-content:center; }
.hcard .hc-t{ font-family:'Newsreader',serif; font-weight:700; font-size:16px; color:#fff; line-height:1.2; }
.hcard .hc-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:18px; }
.hcard-wide{ grid-column:1 / -1; flex-direction:row; min-height:0; padding:14px 16px; gap:12px; text-align:left; }
.hcard-wide .hc-ic{ width:46px; height:46px; }
.hcard.c-gold{ background:var(--gold); box-shadow:0 8px 20px rgba(199,154,58,.28); }
.hcard.c-plum{ background:#6B4E9E; box-shadow:0 8px 20px rgba(107,78,158,.28); }
.hcard.c-orange{ background:#D97742; box-shadow:0 8px 20px rgba(217,119,66,.28); }
.hcard.c-teal{ background:#2E8C83; box-shadow:0 8px 20px rgba(46,140,131,.28); }
.hcard.c-blue{ background:#4A6FB5; box-shadow:0 8px 20px rgba(74,111,181,.28); }
/* Aqaid section: real item cards + read-only item pages */
.acard{ --acc:#4A6FB5; --acc-soft:#EDF1F9; display:block; position:relative; background:var(--card);
  border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:15px 18px; margin:12px 0;
  text-decoration:none; color:var(--ink); transition:transform .15s, box-shadow .15s, border-color .15s; }
.acard:hover{ transform:translateY(-2px); border-color:var(--acc); box-shadow:0 10px 24px rgba(20,84,71,.12); }
.acard-belief{ display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;
  color:#fff; background:var(--acc); border-radius:999px; padding:3px 11px; margin-bottom:7px; }
.acard-belief .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:13px; text-transform:none; letter-spacing:0; }
.acard-t{ font-family:'Newsreader',serif; font-weight:700; font-size:19px; color:var(--green-dark, #145447); }
.acard-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:21px; }
.acard-s{ color:var(--muted); font-size:13px; margin-top:3px; }
.acard .audio-flag{ display:inline-block; margin-left:8px; color:#C0392B; font-weight:700; font-size:12px; }
.acard .audio-flag::before{ content:"● "; }
.asub{ font-size:14px; color:var(--gold-dk, #9A7420); font-weight:700; margin:2px 0 4px; }
.asub .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:16px; }
/* ---- Quranic Duas (teal accent) ---- */
[data-page="duas"] .acard{ --acc:#2F9E8F; --acc-soft:#E4F4F1; }
.dua-open{ background:#F1FAF8; border:1px solid #CFE8E2;
  border-radius:18px; box-shadow:var(--shadow); padding:17px 19px; margin:14px 0 18px; }
.dua-open-t{ font-family:'Newsreader',serif; font-weight:800; font-size:21px; color:#1E7C6F; margin-bottom:8px; }
.dua-open-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:24px; }
.dua-open-b{ color:var(--ink); font-size:15.5px; line-height:1.75; }
.dua-open-b.ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:18px; direction:rtl; text-align:right; line-height:2.1; }
.translit{ font-style:italic; color:#1E7C6F; font-size:14.5px; margin:2px 0 8px; font-weight:600; }
body.lang-ur .translit{ text-align:right; }
.when-box{ background:#E9F6F3; border:1px solid #BFE3DC; border-radius:14px; padding:13px 16px; margin:16px 0 4px; }
.when-cap{ display:block; font-weight:800; font-size:13.5px; color:#1E7C6F; margin-bottom:5px; }
.when-box .ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:17px; line-height:2; }
.when-cap.ur-cap{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:16px; }
html.theme-dark .when-box{ background:rgba(47,158,143,.12); border-color:rgba(47,158,143,.35); }
html.theme-dark .dua-open{ background:rgba(47,158,143,.10); border-color:rgba(47,158,143,.30); }
/* Per-surah group heading inside a belief item */
.agroup-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:22px 0 10px;
  border-bottom:2px solid var(--gold); padding-bottom:6px; }
.agh-ar{ font-family:'AlMushaf',serif; font-size:22px; color:var(--green-dark, #145447); }
.agh-en{ font-size:12.5px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; color:var(--gold-dk, #9A7420); }
/* A short lead-in sentence between two surah groups */
.alink{ font-size:14.5px; font-style:italic; color:var(--muted); margin:20px 4px 4px; line-height:1.6; }
.alink .ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-style:normal; direction:rtl; text-align:right; font-size:17px; line-height:2.1; }
/* Commentary after a group's ayat — "what it teaches" */
.anote{ background:var(--green-soft); border-radius:14px; padding:13px 15px; margin:10px 0 4px; }
.anote-cap{ display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:var(--green); margin-bottom:6px; }
.anote-cap.ur-cap{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; text-transform:none; letter-spacing:0; font-size:14px; }
.anote .only-en{ font-size:14.5px; line-height:1.65; color:var(--ink); }
.anote .ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:17px; line-height:2.2; color:var(--ink); }
html.theme-dark .anote{ background:#12332B; }
.audio-banner{ background:#F7E3E0; border:1px solid #E4B9B4; border-left:4px solid #C0392B; color:#8a2f24;
  border-radius:12px; padding:10px 14px; margin:12px 0; font-size:13.5px; font-weight:700; }
.audio-banner .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; display:block; text-align:right; font-size:15px; line-height:2; }
html.theme-dark .acard-belief{ background:#232b3d; color:#9db4e4; }
/* Stories: list card + story-item page */
.scard-story{ display:flex; align-items:center; gap:13px; background:var(--card); border:1px solid var(--line);
  border-radius:18px; box-shadow:var(--shadow); padding:14px 16px; margin:12px 0;
  text-decoration:none; color:var(--ink); transition:transform .15s, box-shadow .15s, border-color .15s; }
.scard-story:hover{ transform:translateY(-2px); border-color:#D97742; box-shadow:0 10px 24px rgba(184,90,43,.14); }
.ss-emoji{ font-size:26px; flex:0 0 auto; width:48px; height:48px; border-radius:14px; background:#FBEEE4;
  display:flex; align-items:center; justify-content:center; }
html.theme-dark .ss-emoji{ background:rgba(217,119,66,.16); }
.ss-tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.ss-t{ font-family:'Newsreader',serif; font-weight:700; font-size:17px; color:#B85A2B; }
.ss-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:20px; }
.ss-s{ color:var(--muted); font-size:12.5px; }
.ss-s .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; display:block; font-size:15px; }
.ss-r{ font-size:11.5px; color:var(--gold-dk,#9A7420); font-weight:700; margin-top:2px; }
.ss-r .audio-flag{ margin-left:8px; color:#C0392B; }
.ss-go{ color:#CFC8B8; font-size:22px; flex:0 0 auto; }
.st-kicker{ font-size:11.5px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:#B85A2B; margin:0 0 4px; }
.st-kicker .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; text-transform:none; letter-spacing:0; font-size:14px; }
.st-dialogue{ position:relative; background:#FBF1E8; border:1px solid #F0DFCF; border-radius:16px; padding:16px 18px 16px 44px; margin:14px 0; }
.st-dialogue .st-quote{ position:absolute; left:12px; top:2px; font-family:'Newsreader',serif; font-size:52px; color:#E0A87C; line-height:1; }
.st-dialogue .only-en{ font-size:16px; line-height:1.7; color:#6a4a34; font-style:italic; }
.st-dialogue .ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:18px; line-height:2.3; color:#6a4a34; }
.st-h{ font-family:'Newsreader',serif; font-weight:700; font-size:20px; color:var(--green-dark,#145447); margin:22px 0 8px; }
.st-h .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:22px; }
.st-p{ margin:10px 0; }
.st-p .only-en{ font-size:15.5px; line-height:1.7; color:var(--ink); }
.st-p .ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:18px; line-height:2.3; color:var(--ink); }
.st-illus{ margin:14px 0; }
.st-illus svg{ display:block; border-radius:16px; }
.st-ayahs{ margin:16px 0; }
.st-moral{ background:var(--gold-soft,#F7EED6); border-radius:16px; padding:15px 17px; margin:16px 0 6px; }
.st-moral-cap{ display:inline-block; font-size:11px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:#8A6D1F; margin-bottom:6px; }
.st-moral-cap.ur-cap{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; text-transform:none; letter-spacing:0; font-size:15px; }
.st-moral .only-en{ font-size:15.5px; line-height:1.65; color:#5c4a1e; }
.st-moral .ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:18px; line-height:2.3; color:#5c4a1e; }
html.theme-dark .st-dialogue{ background:#2a2118; border-color:#3d3227; }
html.theme-dark .st-dialogue .only-en, html.theme-dark .st-dialogue .ur{ color:#e6cdb4; }
html.theme-dark .st-moral{ background:#3a3320; }
html.theme-dark .st-moral .only-en, html.theme-dark .st-moral .ur{ color:#e6d4a6; }
html.theme-dark .audio-banner{ background:#3a221f; border-color:#5c332e; color:#f0a79c; }
/* Games page cards */
.game-card{ display:flex; gap:14px; align-items:flex-start; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; margin:12px 0; }
.game-ic{ font-size:26px; flex:0 0 auto; }
.game-body{ flex:1; min-width:0; }
.game-t{ font-weight:800; font-size:16px; color:var(--green); margin-bottom:4px; }
.game-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:18px; }
.game-s{ color:var(--muted); font-size:13.5px; line-height:1.55; }
.game-s.only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:16px; line-height:2; }
/* Text-only surah (audio not generated yet): hide the Listen controls */
body.noaudio .vplay, body.noaudio .xplay, body.noaudio .eplay{ display:none; }
body.noaudio .fcard.listen{ display:none; }
body.noaudio .playerbar .pbtn{ opacity:.35; }
body.noaudio .playerbar .t2{ color:var(--gold); font-weight:700; }
/* Memorizer */
.mz-ar{font-family:'AlMushaf',serif; color:var(--gold); font-size:22px; margin-left:6px;}
.mz-help{color:var(--muted); font-size:14px; margin:2px 0 16px; line-height:1.6;}
.mz-help.only-ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:17px; line-height:2.1;}
.mz-form{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; display:flex; flex-direction:column; gap:8px;}
.mz-lbl{font-weight:800; color:var(--green); font-size:14px; margin-top:8px;}
.mz-lbl.only-ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:16px;}
.mz-sel{border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-family:inherit; font-size:15px; color:var(--ink); background:#fff; width:100%; box-sizing:border-box;}
.mz-sel.sm{width:auto; min-width:64px; flex:0 0 auto;}
.mz-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:14px;}
/* "Which ayat?" — two option boxes side by side (range vs whole surah); exactly one looks selected */
.mz-choice{display:flex; align-items:stretch; gap:8px; flex-wrap:nowrap;}
.mz-range{flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:5px;
  border:1.5px solid var(--line); background:#fff; border-radius:12px; padding:5px 8px;}
.mz-range.active{border-color:var(--green); background:var(--green-soft);}
.mz-range .mz-ft{font-size:12px; color:var(--muted); flex:0 0 auto;}
.mz-range .mz-sel.sm{min-width:0; width:auto; flex:1 1 auto; padding:8px 4px; font-size:14px; border-radius:8px; text-align:center;}
.mz-whole{flex:0 0 auto; border:1.5px solid var(--line); background:#fff; color:var(--muted); border-radius:12px;
  padding:8px 10px; cursor:pointer; font-weight:700; font-family:inherit; font-size:13px; white-space:nowrap;}
.mz-whole.active{border-color:var(--green); background:var(--green-soft); color:var(--green);}
.mz-whole.active::before{content:"✓ ";}
.mz-check.off{opacity:.45;}
.mz-easy-note{font-size:12.5px; font-weight:700; color:#8A6D1F; background:#F7EED6; border-radius:10px; padding:7px 11px; margin-top:6px;}
.mz-easy-note .only-ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; display:block; text-align:right; font-size:14px; line-height:2;}
html.theme-dark .mz-range, html.theme-dark .mz-whole{background:var(--card); color:var(--muted);}
html.theme-dark .mz-range.active{background:#12332B; border-color:#1E4A3E;}
html.theme-dark .mz-whole.active{background:#12332B; color:#7FC5AF; border-color:#1E4A3E;}
html.theme-dark .mz-easy-note{background:#3a3320; color:#d9c17a;}
.mz-seg{display:flex; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff;}
.mz-seg button{flex:1; border:none; background:transparent; color:var(--muted); padding:10px; cursor:pointer; font-weight:700; font-family:inherit; font-size:14px;}
.mz-seg button.active{background:var(--green); color:#fff;}
.mz-step{width:44px; height:44px; border:1px solid var(--line); background:#fff; border-radius:12px; font-size:22px; cursor:pointer; color:var(--green); font-weight:800; line-height:1;}
.mz-num{width:80px; height:44px; text-align:center; border:1px solid var(--line); border-radius:12px; font-family:inherit; font-size:20px; font-weight:800; color:var(--ink); background:#fff;}
.mz-check{display:flex; align-items:center; gap:9px; color:var(--ink); font-size:14px; margin-top:10px; cursor:pointer;}
.mz-check input{width:18px; height:18px;}
.mz-check .only-ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; font-size:16px;}
.mz-start{margin-top:14px; border:none; background:var(--green); color:#fff; border-radius:12px; padding:14px; font-size:17px; font-weight:800; cursor:pointer; font-family:inherit;}
.mz-player{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:22px 18px; text-align:center;}
.mz-round{display:inline-block; background:var(--gold); color:#3a2c05; font-weight:800; font-size:14px; padding:5px 14px; border-radius:999px; margin-bottom:14px;}
.mz-ref{color:var(--green); font-weight:800; font-size:15px; margin-bottom:10px;}
.mz-player .mz-arabic{font-family:'AlMushaf',serif; font-size:30px; line-height:2; color:var(--ink); direction:rtl; margin:6px 0 12px;}
.mz-trans{color:var(--muted); font-size:15px; line-height:1.6; margin-bottom:20px;}
.mz-trans.ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:center; font-size:18px; line-height:2.2;}
.mz-controls{display:flex; gap:10px; justify-content:center;}
.mz-pause, .mz-stop{border:1px solid var(--line); background:#fff; border-radius:12px; padding:11px 20px; font-weight:800; cursor:pointer; font-family:inherit; font-size:15px;}
.mz-pause{color:var(--green);}
.mz-stop{color:#a33;}
html.theme-dark .mz-sel, html.theme-dark .mz-seg, html.theme-dark .mz-step, html.theme-dark .mz-num, html.theme-dark .mz-pause, html.theme-dark .mz-stop{background:var(--card); color:var(--ink);}
.mz-ar, .only-ur{}
.empty{color:var(--muted); text-align:center; padding:34px 12px; font-size:15px;}

/* Settings page */
.dtitle{font-weight:800; color:var(--green); margin:0 0 10px; font-size:16px;}
.about-line{color:var(--muted); font-size:13.5px; margin:6px 0;}
.about-line b{color:var(--ink);}

/* anchor jumps land below the sticky header */
[id^="verse-"]{scroll-margin-top:76px;}

/* ---------- Player bar (fixed above the tab bar) ---------- */
.playerbar{
  position:fixed; left:0; right:0; bottom:calc(58px + env(safe-area-inset-bottom)); z-index:30;
  background:var(--green-dark); color:#fff; padding:10px 0;
  box-shadow:0 -4px 16px rgba(0,0,0,.18);
}
.playerbar .wrap{display:flex; align-items:center; gap:12px;}
.pbtn{
  border:0; background:#fff; color:var(--green-dark); width:44px; height:44px; border-radius:50%;
  font-size:17px; cursor:pointer; font-weight:800; flex-shrink:0; display:flex; align-items:center; justify-content:center;
}
.pbtn.secondary{background:rgba(255,255,255,.15); color:#fff; width:38px; height:38px; font-size:14px;}
.ptitle{flex:1; min-width:0;}
.ptitle .t1{font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ptitle .t2{font-size:12px; color:#BFD6D0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.disclaimer{font-size:12.5px; color:var(--muted); text-align:center; margin:18px 4px 8px;}
footer.site{text-align:center; color:var(--muted); font-size:13px; padding:14px 0 20px;}
footer.site a{color:var(--green);}
@media (max-width:480px){
  .arabic{font-size:29px;}
  .easy.ur{font-size:23px;}
  .hero h1{font-size:27px;}
}

/* ================= Home: search bar, continue card, daily ayah ================= */
.searchbar{
  display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line);
  border-radius:999px; box-shadow:var(--shadow); padding:12px 18px; margin:6px 0 14px;
  color:var(--muted); text-decoration:none; font-weight:600; font-size:14.5px;
}
.searchbar svg{width:18px; height:18px; stroke:var(--green); fill:none; stroke-width:2; stroke-linecap:round;}
/* Continue listening — a slim pill above the tiles, deliberately smaller/lighter than the section tiles */
.continue-bar{
  display:flex; align-items:center; gap:10px; background:var(--green-soft); border:1px solid #CFE3DD;
  border-radius:999px; padding:6px 10px; margin:0 0 14px; text-decoration:none; color:var(--ink);
}
.continue-bar .cc-ic{
  width:30px; height:30px; border-radius:50%; background:var(--green); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:12px; flex:0 0 auto;
}
.continue-bar .cc-tx{ flex:1; min-width:0; display:flex; align-items:baseline; gap:8px; overflow:hidden; white-space:nowrap; }
.continue-bar .cc-t{ font-weight:800; font-size:11px; letter-spacing:.4px; text-transform:uppercase; color:var(--green); flex:0 0 auto; }
.continue-bar .cc-t .only-ur{ font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:14px; text-transform:none; letter-spacing:0; }
.continue-bar .cc-sub{ font-size:13px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; }
.continue-bar .cc-ar{ font-size:20px; color:var(--green); flex:0 0 auto; }
.daily-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:16px; margin:12px 0;
}
.daily-card .dc-label{font-weight:800; font-size:12px; letter-spacing:.5px; text-transform:uppercase; color:var(--gold); margin:0 0 8px;}
.daily-card .dc-arabic{font-family:'AlMushaf',serif; font-size:27px; line-height:1.9; direction:rtl; text-align:right; color:var(--ink); margin-bottom:8px;}
.daily-card .dc-easy{color:var(--muted); font-size:14.5px;}
.daily-card .dc-easy.ur{font-family:'MehrNastaliq',serif; direction:rtl; text-align:right; font-size:17px; line-height:2.2;}
.daily-card .dc-link{display:inline-block; margin-top:10px; color:var(--green); font-weight:800; font-size:13.5px; text-decoration:none;}

/* ================= Search page ================= */
.searchbox{
  display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line);
  border-radius:999px; box-shadow:var(--shadow); padding:4px 18px; margin:10px 0;
}
.searchbox svg{width:18px; height:18px; stroke:var(--green); fill:none; stroke-width:2; stroke-linecap:round; flex-shrink:0;}
.searchbox input{
  flex:1; border:0; outline:0; background:transparent; color:var(--ink);
  font:inherit; font-weight:600; font-size:15px; padding:10px 0;
}
.chips{display:flex; flex-wrap:wrap; gap:8px;}
.chip{
  border:1px solid var(--line); background:var(--card); color:var(--green); font-weight:700; font-size:13.5px;
  border-radius:999px; padding:7px 14px; cursor:pointer; font-family:inherit;
}
.chip.ur{font-family:'MehrNastaliq',serif; font-size:15px;}
.chip.active{background:var(--green); color:#fff; border-color:var(--green);}
.result{
  display:block; background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:14px 16px; margin:10px 0; text-decoration:none; color:var(--ink);
}
.result .r-meta{font-weight:800; color:var(--green); font-size:13px; margin-bottom:4px;}
.result .r-text{font-size:14.5px; color:var(--muted);}
.result .r-text.ur{font-family:'MehrNastaliq',serif; direction:rtl; text-align:right; font-size:17px; line-height:2.2;}
.result .r-text.arb{font-family:'AlMushaf',serif; direction:rtl; text-align:right; font-size:24px; line-height:1.9; color:var(--ink);}
mark{background:var(--gold-soft); color:inherit; border-radius:3px; padding:0 2px;}
.rcount{color:var(--muted); font-size:13px; margin:12px 2px 4px;}

/* ================= About / Support / Settings extras ================= */
.about-para{color:var(--ink); font-size:14.5px; line-height:1.7; margin:6px 0;}
.about-para.ur{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-size:17px; line-height:2.4;}
.quoteline{
  border-left:3px solid var(--gold); padding:8px 14px; margin:14px 0; background:var(--gold-soft);
  border-radius:0 12px 12px 0; color:var(--ink); font-size:14.5px; line-height:1.7; font-style:italic;
}
.quoteline.ur{
  font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; direction:rtl; text-align:right; font-style:normal;
  border-left:0; border-right:3px solid var(--gold); border-radius:12px 0 0 12px; font-size:17px; line-height:2.4;
}
.story-divider{border:0; border-top:1px dashed var(--line); margin:18px 0;}
.morelink{display:block; color:var(--green); font-weight:800; font-size:15px; text-decoration:none; padding:9px 0; border-bottom:1px dashed var(--line);}
.morelink:last-of-type{border-bottom:0;}

/* ================= Logo mark / wordmark (MyEasyQuran) ================= */
.logo{display:inline-flex; align-items:center; gap:9px;}
.logomark{width:32px; height:32px; flex-shrink:0; border-radius:8px; display:block;}
.logo-text{font-family:'Newsreader',Georgia,serif; font-weight:700; font-size:22px; letter-spacing:.1px; color:#FCF8EF;}
.logo-text .lt-my{color:#F2C86A;}
.hero-logo{width:96px; height:96px; border-radius:22px; display:block; margin:0 auto 12px; box-shadow:var(--shadow);}
.hero h1{font-family:'Newsreader',Georgia,serif; font-weight:600; letter-spacing:-.01em;}
.hero h1 .lt-my{color:var(--gold);}
.beta-badge{
  background:var(--gold); color:#3a2c08; font-weight:800; font-size:10px; letter-spacing:1px;
  padding:2px 7px; border-radius:6px; margin-left:8px; align-self:center;
}
/* Always-visible language toggle in the sticky header */
.hlang{display:inline-flex; border:1.5px solid rgba(255,255,255,.4); border-radius:999px; overflow:hidden; flex-shrink:0;}
.hlang button{font:inherit; font-weight:800; font-size:13px; border:0; background:transparent; color:#EAF2EF; padding:5px 13px; cursor:pointer; line-height:1.4;}
.hlang button.active{background:var(--gold); color:#3a2c08;}
.hlang button[data-lang="ur"]{font-family:'MehrNastaliq','Noto Nastaliq Urdu',serif; font-size:15px;}

/* ================= Filter controls (separated groups) ================= */
.lang-bar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
  padding:9px 12px 9px 16px; margin:16px 0 12px;
}
.lb-label{font-weight:800; font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px;}
.lb-ur{font-family:'MehrNastaliq',serif; text-transform:none; font-size:15px; letter-spacing:0;}

.fcard{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow);
  margin:12px 0; overflow:hidden;
}
.fcard.read{border-left:5px solid var(--green);}
.fcard.listen{border-left:5px solid var(--gold);}
.fcard-head{display:flex; align-items:center; gap:10px; padding:12px 14px 10px;}
.fcard-ic{width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.fcard-ic svg{width:18px; height:18px; fill:none; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.fcard.read .fcard-ic{background:var(--green-soft);} .fcard.read .fcard-ic svg{stroke:var(--green);}
.fcard.listen .fcard-ic{background:var(--gold-soft);} .fcard.listen .fcard-ic svg{stroke:#a07c22;}
.fcard-title{flex:1; font-weight:800; font-size:16px; color:var(--ink); line-height:1.15;}
.fcard-sub{display:block; font-weight:600; font-size:12px; color:var(--muted); text-transform:none; letter-spacing:0;}
.fcard-info{
  width:26px; height:26px; border-radius:50%; border:1.5px solid var(--line); background:var(--card);
  color:var(--muted); font-weight:800; font-style:italic; font-family:Georgia,serif; font-size:15px; cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.fcard-info:hover{border-color:var(--green); color:var(--green);}
.fcard-body{display:flex; flex-wrap:wrap; gap:8px; padding:0 14px 14px;}
.fcard.read .pill.on{background:var(--green-soft); border-color:#CDE4DD; color:var(--green);}
.fcard.listen .pill.on{background:var(--gold-soft); border-color:#E7D6A8; color:#8a6b1f;}

/* ================= Info modal ================= */
.modal-overlay{
  position:fixed; inset:0; z-index:60; background:rgba(20,24,22,.5);
  display:flex; align-items:flex-end; justify-content:center; padding:0;
}
.modal-overlay[hidden]{display:none;}
.modal{
  background:var(--card); width:100%; max-width:560px; border-radius:20px 20px 0 0;
  max-height:82vh; overflow-y:auto; box-shadow:0 -8px 30px rgba(0,0,0,.25);
  animation:sheetup .22s ease;
}
@keyframes sheetup{from{transform:translateY(40px); opacity:.4;} to{transform:translateY(0); opacity:1;}}
.modal-head{
  display:flex; align-items:center; justify-content:space-between; padding:16px 18px 12px;
  position:sticky; top:0; background:var(--card); border-bottom:1px solid var(--line); font-size:17px; color:var(--ink);
}
.modal-x{border:0; background:transparent; font-size:26px; line-height:1; color:var(--muted); cursor:pointer; padding:0 4px;}
.modal-body{padding:14px 18px 26px;}
.modal-body p{font-size:14.5px; line-height:1.65; color:var(--ink); margin:9px 0;}
.modal-body hr{border:0; border-top:1px solid var(--line); margin:14px 0;}
.m-badge{display:inline-block; color:#fff; font-weight:800; font-size:12px; padding:2px 10px; border-radius:999px; margin-right:4px;}
.m-badge.read{background:var(--green);}
.m-badge.listen{background:var(--gold); color:#4a3a12;}

@media (min-width:560px){
  .modal-overlay{align-items:center; padding:20px;}
  .modal{border-radius:20px;}
}

/* dark-theme adjustments for the new UI */
html.theme-dark .lang-bar, html.theme-dark .fcard, html.theme-dark .modal{background:var(--card);}
html.theme-dark .fcard-info{background:var(--card);}
html.theme-dark .fcard.read .pill.on{background:#1E2A26;}
html.theme-dark .fcard.listen .pill.on{background:#2A2417; color:#E3B75B;}
html.theme-dark .modal-overlay{background:rgba(0,0,0,.62);}

/* ================= Dark theme ================= */
html.theme-dark{
  --bg:#12161A; --card:#1B2126; --ink:#E7E3D8; --muted:#98A09B;
  --green:#4FB39A; --green-dark:#0E332B; --green-soft:#1E2A26; --gold:#D2A854; --gold-soft:#2A2417;
  --line:#2A3238; --shadow:0 4px 18px rgba(0,0,0,.35);
}
html.theme-dark body{background:var(--bg);}
html.theme-dark header.top{background:#0E332B;}
html.theme-dark .pill, html.theme-dark .seg button, html.theme-dark .vbtn,
html.theme-dark .play-p, html.theme-dark .chip, html.theme-dark .bm-del{background:var(--card); color:var(--muted);}
html.theme-dark .vbtn, html.theme-dark .play-p, html.theme-dark .chip{color:var(--green);}
html.theme-dark .seg button.active{background:var(--green); color:#0E1512;}
html.theme-dark .chip.active{background:var(--green); color:#0E1512;}
html.theme-dark .tabbar{background:#171C21; border-top-color:var(--line);}
html.theme-dark .arabic{color:#EFEAE0;}
html.theme-dark .scard .sar{color:#EFEAE0;}
html.theme-dark .easy{border-color:#2C3B35; color:#C9E2D9;}
html.theme-dark .bism .bism-ez, html.theme-dark .daily-card .dc-arabic{color:#EFEAE0;}
html.theme-dark .verse.speaking{background:#1E2A26;}
html.theme-dark .passage.speaking{background:#20261F;}
html.theme-dark .reading .txt{color:#E3B75B;}
html.theme-dark .intro, html.theme-dark .tnote{color:#D9C08A; border-color:#3A3320;}
html.theme-dark .coming{border-color:#3A3320;}
html.theme-dark .passage-head{color:#D9C08A;}
html.theme-dark .playerbar{background:#0B2A23;}
html.theme-dark .continue-bar{background:#12332B; border-color:#1E4A3E;}
html.theme-dark mark{background:#3A3320;}

