@font-face {
  font-family: "USTAZ Uthmani Hafs";
  src: url("assets/fonts/kfgqpc_hafs_v30.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "USTAZ Uthman Taha";
  src: url("assets/fonts/uthman_tn1_ver20.ttf") format("truetype");
  font-display: swap;
}

.digital-quran-panel { overflow: hidden; }
/* Antigravity reader module */
.qr-container { --qr-ink:#24352f; --qr-green:#0f6455; --qr-gold:#bd9a55; color:var(--qr-ink); direction:rtl; }
.qr-rub-marker { color:#947747; font-size:.9em; user-select:none; }
.qr-toolbar, .qr-toolbar-group { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.qr-lang-toggle { display:inline-flex; align-items:center; background:#eaf1ec; border:1px solid #d5e2d9; border-radius:9px; padding:3px; gap:2px; }
.qr-lang-btn { border:0; background:transparent; color:#52695e; font:inherit; font-size:11px; font-weight:800; padding:5px 8px; border-radius:6px; cursor:pointer; line-height:1; transition:all .15s ease; user-select:none; }
.qr-lang-btn:hover { color:#1f3b2f; background:#dfece3; }
.qr-lang-btn.active { background:#0f6455; color:#fff; box-shadow:0 1px 3px #0f645544; }
.qr-toolbar { justify-content:space-between; padding:15px; margin:16px 0 12px; border:1px solid #e4ebe6; border-radius:15px; background:#f8faf8; }
.qr-toolbar-group { gap:8px; }
.qr-control-label { color:#66756d; font-size:12px; font-weight:750; white-space:nowrap; }
.qr-select, .qr-input-num { min-height:39px; padding:7px 10px; border:1px solid #dce5df; border-radius:9px; background:#fff; color:#263831; font:inherit; font-size:13px; }
.qr-select { max-width:min(290px, 42vw); }
.qr-input-num { width:66px; text-align:center; }
.qr-search-input { width:min(210px, 38vw); min-height:36px; padding:6px 10px; border:1px solid #dce5df; border-radius:9px; background:#fff; color:#263831; font:inherit; font-size:12px; }
.qr-btn { min-height:38px; padding:8px 13px; border:1px solid #dae5dd; border-radius:9px; background:#fff; color:#31584a; cursor:pointer; font:inherit; font-size:12px; font-weight:750; transition:background .16s ease,border-color .16s ease,transform .16s ease; }
.qr-btn:hover, .qr-mask-level-btn:hover { border-color:#9cbcac; background:#f2f7f3; }
.qr-btn:active { transform:translateY(1px); }
.qr-btn-sm { min-height:34px; padding:6px 10px; }
.qr-btn-icon { min-width:42px; font-weight:800; }
.qr-btn-gold { border-color:#dfc88e; background:#fbf7ec; color:#745a24; }
.qr-btn-active { background:#0f6455; color:#fff; }
.qr-masking-toolbar { align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:12px 14px; margin-bottom:13px; border:1px solid #eadcb7; border-radius:12px; background:#fffaf0; }
.qr-masking-title { color:#65542f; font-size:13px; font-weight:750; }
.qr-mask-level-btn { min-height:33px; padding:6px 10px; border:1px solid #e6dcc0; border-radius:8px; background:#fff; color:#6e5b2d; cursor:pointer; font:inherit; font-size:11px; }
.qr-mask-level-btn.active { border-color:#b7954b; background:#f4ead0; color:#59451e; }
.qr-surah-header-card { display:flex; align-items:center; justify-content:center; min-height:106px; padding:16px; margin:13px 0; border:1px solid #e8e1cd; border-radius:14px; background:linear-gradient(115deg,#fbfaf4,#f2f6f2); text-align:center; }
.qr-surah-title-wrap { display:flex; align-items:center; flex-direction:column; gap:7px; }
.qr-surah-name { margin:0; color:#28483d; font-family:"USTAZ Uthman Taha","Noto Naskh Arabic",serif; font-size:25px; font-weight:700; }
.qr-surah-meta-tags { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; }
.qr-surah-tag { padding:4px 8px; border-radius:999px; background:#eaf1ec; color:#607268; font-size:10px; }
.qr-basmalah { color:#806735; font-family:"USTAZ Uthmani Hafs","Amiri Quran",serif; font-size:24px; line-height:1.8; }
.qr-mushaf-surface { min-height:220px; padding:22px 26px; border:1px solid #e7eae4; border-radius:15px; background:#fffefa; box-shadow:0 8px 24px #16382c08; }
.qr-passage-container { color:#26352f; direction:rtl; font-family:"USTAZ Uthmani Hafs","Amiri Quran","Noto Naskh Arabic",serif; font-size:var(--qr-font-size,32px); line-height:2.35; text-align:justify; text-align-last:center; }
.qr-ayah-segment { display:inline; }
.qr-word { border-radius:5px; transition:background .18s ease,color .18s ease; }
.qr-word-masked { display:inline-block; min-width:2.3em; margin-inline:2px; background:#e7eee9; color:transparent; text-shadow:0 0 9px #366350; cursor:pointer; user-select:none; }
.qr-word-revealed { border-radius:4px; background:#edf5ef; animation:qr-reveal .28s ease-out; }
.qr-ayah-marker { display:inline-block; padding:0 4px; margin-inline:3px; border-radius:50%; color:#8c7240; cursor:pointer; font-size:.7em; white-space:nowrap; }
.qr-ayah-marker:hover { background:#f2ead5; }
.qr-attribution-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:11px 14px; margin-top:11px; border:1px solid #e8eee9; border-radius:10px; background:#f7f9f6; color:#6b7971; font-size:11px; }
.qr-attribution-info, .qr-attribution-links { display:flex; align-items:center; gap:9px; }
.qr-attribution-shield { color:#b99a5e; font-size:20px; }
.qr-attribution-link { color:#0f6455; font-weight:750; text-decoration:none; }
.qr-attribution-link:hover { text-decoration:underline; }
.qr-loading-state, .qr-error-state { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; min-height:210px; color:#66756d; text-align:center; }
.qr-loading-state small { color:#8a9690; }
.qr-spinner { width:29px; height:29px; border:3px solid #e2eae5; border-top-color:#0f6455; border-radius:50%; animation:qr-spin .8s linear infinite; }
.qr-error-state { color:#855343; }
.qr-error-state p { margin:0; max-width:600px; }
.qr-modal-backdrop { position:fixed; z-index:10000; inset:0; display:flex; align-items:center; justify-content:center; padding:18px; background:#10251fcc; backdrop-filter:blur(4px); }
.qr-modal-backdrop.hidden { display:none; }
.qr-tafsir-modal { display:flex; flex-direction:column; width:min(720px,100%); max-height:min(86vh,820px); overflow:hidden; border:1px solid #e3e9e3; border-radius:18px; background:#fff; box-shadow:0 24px 80px #0d211c55; }
.qr-tafsir-modal-header, .qr-tafsir-modal-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:15px 18px; background:#f7f9f6; }
.qr-tafsir-modal-title { display:flex; align-items:center; flex-wrap:wrap; gap:10px; color:#234b3c; font-weight:800; }
.qr-tafsir-badge { padding:5px 9px; border-radius:999px; background:#e9f1eb; color:#536b5d; font-size:11px; }
.qr-btn-close { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:9px; background:#edf1ed; color:#47574e; cursor:pointer; font-size:22px; }
.qr-tafsir-modal-body { overflow:auto; padding:18px; }
.qr-tafsir-ayah-box { padding:13px 15px; border-inline-start:3px solid #b99a5e; border-radius:9px; background:#fbfaf4; color:#273a31; font-family:"USTAZ Uthmani Hafs","Amiri Quran",serif; font-size:23px; line-height:2; text-align:right; direction:rtl; }
.qr-tafsir-content-wrap { margin-top:17px; }
.qr-tafsir-source-title { margin-bottom:8px; color:#806735; font-size:12px; font-weight:800; }
.qr-tafsir-text { color:#35443c; font-family:"USTAZ Uthman Taha","Noto Naskh Arabic",serif; font-size:19px; line-height:2; direction:rtl; }
.qr-tafsir-quoted-aya { color:#155a48; font-family:"USTAZ Uthmani Hafs","Amiri Quran",serif; }
.qr-tafsir-modal-footer { color:#78847d; font-size:11px; }
@keyframes qr-spin { to { transform:rotate(360deg); } }
@keyframes qr-reveal { from { background:#dac37e; } to { background:#edf5ef; } }
@media (max-width: 760px) {
  .qr-toolbar { align-items:stretch; flex-direction:column; }
  .qr-toolbar-group { width:100%; }
  .qr-select { max-width:none; flex:1; }
  .qr-search-input { width:100%; flex:1 1 140px; }
  .qr-mushaf-surface { padding:16px 12px; }
  .qr-passage-container { line-height:2.15; text-align:right; }
  .qr-surah-header-card { min-height:92px; }
  .qr-surah-name { font-size:22px; }
  .qr-tafsir-modal-footer { align-items:flex-start; flex-direction:column; }
}
