/* Quran.tv Hafez — all controls inside one mushaf stage */
:root {
  --tl-ink: #14201c;
  --tl-muted: #5c6b64;
  --tl-paper: #f3efe4;
  --tl-card: #fffdf8;
  --tl-line: #d9d2c2;
  --tl-green: #0b6b56;
  --tl-green-deep: #084d3e;
  --tl-accent: #c4a35a;
  --tl-match: #d7efe4;
  --tl-current: #ffe8a3;
  --tl-err: #b42318;
  --tl-radius: 16px;
  --tl-ui: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --tl-quran: 'UthmaniHafs', 'HafsSmart', 'Amiri Quran', 'Traditional Arabic', serif;
  --tl-page: #f7f1e3;
  --tl-page-edge: #c9b27a;
  --tl-page-inner: #fffdf6;
  --tl-shadow-ink: rgba(20, 32, 28, 0.38);
}

.qtv-hafez[data-theme="dark"] {
  --tl-ink: #e8efe9;
  --tl-muted: #9aaba3;
  --tl-paper: #0b1210;
  --tl-card: #15201c;
  --tl-line: #2a3a33;
  --tl-match: #1e3d32;
  --tl-current: #4a3d18;
  --tl-page: #121a17;
  --tl-page-edge: #3a4a40;
  --tl-page-inner: #15201c;
  --tl-shadow-ink: rgba(0, 0, 0, 0.55);
  --tl-err: #ff8a80;
}

.qtv-hafez[data-theme="light"] {
  --tl-ink: #14201c;
  --tl-muted: #5c6b64;
  --tl-paper: #f3efe4;
  --tl-card: #fffdf8;
  --tl-line: #d9d2c2;
  --tl-page: #f7f1e3;
  --tl-page-edge: #c9b27a;
  --tl-page-inner: #fffdf6;
  --tl-err: #b42318;
}

/* صفحة حافظ: خلفية الثيم حول الصندوق */
body.qtv-hafez-page {
  background: #efe8d8 !important;
}
body.qtv-hafez-page.quran-dark-mode,
html.quran-dark-mode body.qtv-hafez-page {
  background: #0b1210 !important;
  color: #e8efe9;
}

/* إخفاء عنوان صفحة ووردبريس «حافظ» وإزالة فراغه */
body.qtv-hafez-page .entry-header,
body.qtv-hafez-page .page-header,
body.qtv-hafez-page .entry-title,
body.qtv-hafez-page .page-title,
body.qtv-hafez-page h1.entry-title,
body.qtv-hafez-page .entry-content > h1:first-child {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  clip: rect(0 0 0 0) !important;
}

/* إزالة هوامش الثيم بين الهيدر وصندوق الحافظ */
body.qtv-hafez-page #page,
body.qtv-hafez-page #content,
body.qtv-hafez-page #primary,
body.qtv-hafez-page .site-main,
body.qtv-hafez-page .content-area,
body.qtv-hafez-page .site-content,
body.qtv-hafez-page .entry-content,
body.qtv-hafez-page article,
body.qtv-hafez-page .hentry,
body.qtv-hafez-page .post,
body.qtv-hafez-page .page,
body.qtv-hafez-page .ast-container,
body.qtv-hafez-page .ast-separate-container,
body.qtv-hafez-page .site-content-contain,
body.qtv-hafez-page .inside-article {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.qtv-hafez-page .entry-content > *:not(#qtv-hafez-app):not(.qtv-hafez) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
body.qtv-hafez-page #qtv-hafez-app.qtv-hafez {
  margin-top: 0 !important;
}

.qtv-hafez {
  --hf-zoom: 1;
  font-family: var(--tl-ui);
  color: var(--tl-ink);
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
  max-width: 560px;
  margin: 0 auto 0.75rem;
  box-shadow: none !important;
  position: relative;
  display: block;
  min-height: 0;
  padding: 0 !important;
}

/* صندوق واحد فقط: أزرار + قائمة + مصحف */
.tl-stage {
  display: flex !important;
  flex-direction: column !important;
  min-height: 70vh;
  max-height: min(920px, 92dvh);
  background:
    linear-gradient(180deg, rgba(201, 178, 122, 0.18), transparent 48px),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--tl-page) !important;
  border: 1px solid var(--tl-page-edge) !important;
  border-radius: 4px !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 14px 42px rgba(55, 40, 12, 0.16);
  overflow: hidden !important;
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.tl-stage::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 178, 122, 0.45);
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
}

.qtv-hafez[data-theme="dark"] .tl-stage {
  background:
    linear-gradient(180deg, rgba(11, 107, 86, 0.18), transparent 42px),
    var(--tl-page) !important;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.55);
  border-color: #2f3f38 !important;
}

.qtv-hafez[data-theme="dark"] .tl-stage::before {
  border-color: rgba(125, 206, 180, 0.22);
}

.qtv-hafez[data-theme="light"] .tl-stage {
  background:
    linear-gradient(180deg, rgba(201, 178, 122, 0.18), transparent 48px),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--tl-page) !important;
}

.tl-lang-wrap {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
  position: relative;
  z-index: 1;
}
.tl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.tl-lang {
  max-width: 7.2rem;
  height: 2.15rem;
  border: 0;
  border-radius: 10px;
  padding: 0 0.35rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
}
.tl-lang option {
  color: #14201c;
  background: #fff;
}
.qtv-hafez[data-theme="dark"] .tl-lang {
  background: rgba(0, 0, 0, 0.28);
}
.tl-icon-btn.is-dark {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* شريط التشغيل أعلى الصندوق مع القائمة */
.tl-toolbar {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.3rem;
  padding: 0.35rem 0.45rem;
  background: linear-gradient(120deg, var(--tl-green), var(--tl-green-deep)) !important;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.tl-tb-cluster {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1 1 34%;
  min-width: 0;
}

.tl-tb-half {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1 1 28%;
  min-width: 0;
}
.tl-tb-half .tl-tb-field {
  flex: 1 1 50%;
  min-width: 0;
}
.tl-tb-half .tl-select-tb {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.tl-tb-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
}

.tl-page-label {
  min-width: 2.6rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.7rem;
  color: #fff;
  white-space: nowrap;
}

.tl-select {
  border: 1px solid var(--tl-line);
  border-radius: 8px;
  padding: 0.38rem 0.45rem;
  font: inherit;
  font-size: 0.82rem;
  width: 100%;
  box-sizing: border-box;
  background: var(--tl-card);
  color: var(--tl-ink);
}
.tl-select-sm { max-width: 100%; }

.tl-tb-field {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}
.tl-select-tb {
  height: 2.05rem;
  border: 0;
  border-radius: 9px;
  padding: 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  color: #14201c;
  width: auto;
  max-width: 7.2rem;
  min-width: 0;
}
.tl-tb-surah .tl-select-tb {
  max-width: 8.2rem;
  min-width: 4.8rem;
}
.tl-tb-lang .tl-select-tb,
.tl-tb-level .tl-select-tb {
  max-width: none;
}

.tl-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  flex-shrink: 0;
  height: 2.05rem;
  padding: 0 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  box-sizing: border-box;
}
.tl-zoom-label {
  min-width: 2.1rem;
  text-align: center;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
}
.tl-zoom-btn {
  border: 0;
  background: transparent;
  color: #fff;
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.tl-zoom-btn:hover { background: rgba(255, 255, 255, 0.18); }

.tl-theme-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 8px;
  width: 2.05rem;
  min-width: 2.05rem;
  height: 2.05rem;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}
.tl-theme-btn:hover { background: rgba(255, 255, 255, 0.24); }
.tl-theme-btn.is-dark {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.tl-dock-nav {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  flex: 0 0 auto;
  min-width: 0;
}

.tl-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 9px;
  min-width: 1.85rem;
  height: 2.05rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.tl-nav-btn:hover { background: rgba(255, 255, 255, 0.24); }

.tl-mic-btn {
  border: 0;
  background: #fff;
  color: var(--tl-green-deep);
  border-radius: 11px;
  min-width: 3.6rem;
  height: 2.05rem;
  padding: 0 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}
.tl-mic-btn:hover { filter: brightness(0.97); }
.tl-mic-btn:disabled { opacity: 0.55; cursor: wait; }
.tl-mic-btn.is-live {
  background: var(--tl-err);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.45);
  animation: tl-pulse 1.4s infinite;
}

.tl-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 10px;
  min-width: 2.25rem;
  height: 2.4rem;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}
.tl-icon-btn:hover { background: rgba(255, 255, 255, 0.24); }

@keyframes tl-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(180, 35, 24, 0); }
}

/* خيارات داخل الصندوق تحت شريط التشغيل */
.tl-opts {
  display: grid !important;
  grid-template-columns: minmax(4.5rem, 0.7fr) 1fr;
  gap: 0.3rem 0.4rem;
  padding: 0.3rem 0.45rem;
  background: transparent !important;
  border-bottom: 1px solid var(--tl-page-edge);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  align-items: end;
}
.tl-opts-actions {
  grid-column: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.qtv-hafez[data-theme="dark"] .tl-opts {
  background: transparent !important;
}

.tl-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--tl-muted);
  min-width: 0;
}
.tl-field-inline span { line-height: 1.2; }

.tl-chip {
  border: 1px solid var(--tl-page-edge);
  background: rgba(11, 107, 86, 0.07);
  color: var(--tl-ink);
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 3.8rem;
  text-align: center;
}
.tl-chip:hover { background: rgba(11, 107, 86, 0.14); }
.tl-chip.is-on {
  background: var(--tl-green);
  color: #fff;
  border-color: var(--tl-green);
}
.qtv-hafez[data-theme="dark"] .tl-chip {
  background: rgba(11, 107, 86, 0.18);
  border-color: #2a3a33;
}

.tl-status-wrap {
  padding: 0.3rem 0.65rem 0.35rem;
  background: transparent !important;
  border-bottom: 1px solid rgba(215, 194, 154, 0.35);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.qtv-hafez[data-theme="dark"] .tl-status-wrap {
  border-bottom-color: #2a3a33;
}
.tl-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  align-items: flex-start;
}
.tl-status {
  margin: 0;
  color: var(--tl-muted);
  font-size: 0.78rem;
  flex: 1;
  line-height: 1.35;
  max-height: 3.2em;
  overflow: auto;
}
.tl-status.is-err { color: var(--tl-err); font-weight: 700; }
.tl-status.is-live { color: var(--tl-green); font-weight: 700; }
.tl-status.is-ok { color: var(--tl-green-deep); font-weight: 700; }
.tl-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(11, 107, 86, 0.1);
  color: var(--tl-green);
  border: 1px solid rgba(11, 107, 86, 0.22);
  flex-shrink: 0;
}
.tl-progress { margin-top: 0.25rem; }
.tl-progress[hidden] { display: none !important; }
.tl-progress-track {
  height: 4px;
  background: var(--tl-line);
  border-radius: 999px;
  overflow: hidden;
}
.tl-progress-track span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--tl-green), #14a07d);
  transition: width 0.25s ease;
}
.tl-progress-text {
  margin-top: 0.12rem;
  font-size: 0.65rem;
  color: var(--tl-muted);
}
.tl-transcript {
  margin: 0.15rem 0 0;
  min-height: 0;
  max-height: 2.4em;
  overflow: auto;
  color: var(--tl-green-deep);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.3;
}
.tl-transcript[hidden] { display: none !important; }
.tl-type-panel { margin-top: 0.3rem; }
.tl-type-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--tl-line);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.95rem;
  background: var(--tl-card);
  color: var(--tl-ink);
}

/* منطقة القرآن داخل نفس الصندوق */
.tl-mushaf {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 14px 22px 28px;
  display: block !important;
  background:
    linear-gradient(90deg, rgba(201, 178, 122, 0.12), transparent 18px),
    linear-gradient(270deg, rgba(201, 178, 122, 0.12), transparent 18px),
    var(--tl-page-inner, var(--tl-page)) !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  position: relative;
  z-index: 1;
}

.tl-page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--tl-ui);
  font-size: 0.78rem;
  color: #7a5a25;
  border-bottom: 1px solid #ead9b7;
  padding: 4px 2px 8px;
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  background: var(--tl-page);
  z-index: 2;
}
.qtv-hafez[data-theme="dark"] .tl-page-meta {
  color: #c4a35a;
  border-bottom-color: #3a4a40;
}

.tl-mushaf-body {
  width: 100%;
}

.tl-loading {
  font-family: var(--tl-ui);
  color: var(--tl-muted);
  text-align: center;
  padding: 2.5rem 1rem;
}

.tl-surah-title {
  margin: 10px auto 8px;
  padding: 5px 22px;
  border: 1px solid #d9bd86;
  border-radius: 999px;
  background: #fff8e7;
  color: #07583d;
  font-family: var(--tl-ui);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  width: fit-content;
  min-width: 160px;
}
.qtv-hafez[data-theme="dark"] .tl-surah-title {
  background: #24332c;
  border-color: #4a5c50;
  color: #b8e0cf;
}
.tl-basmala {
  text-align: center;
  font-family: var(--tl-quran) !important;
  font-size: calc(1.38rem * var(--hf-zoom, 1));
  line-height: 2.2;
  color: #111;
  margin: 2px 0 8px;
}
.qtv-hafez[data-theme="dark"] .tl-basmala { color: #e8efe9; }

.tl-ayahs {
  font-family: var(--tl-quran) !important;
  font-size: calc(1.78rem * var(--hf-zoom, 1));
  line-height: 2.55;
  text-align: justify;
  text-align-last: center;
  direction: rtl;
  word-spacing: 0.1em;
}
.tl-ayahs .tl-word {
  font-family: var(--tl-quran) !important;
}
.tl-ayah {
  display: inline;
  margin: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.tl-ayah-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.42em;
  height: 1.42em;
  margin: 0 0.14em;
  border: 1px solid #b8862d;
  border-radius: 50%;
  font-family: var(--tl-ui);
  font-size: 0.58em;
  color: #6a4a14;
  vertical-align: middle;
  background: #fff8e7;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}
.qtv-hafez[data-theme="dark"] .tl-ayah-num {
  background: #24332c;
  border-color: #c4a35a;
  color: #e2c57a;
  box-shadow: none;
}

.tl-word {
  display: inline;
  padding: 0.02em 0.03em;
  border-radius: 3px;
  transition: color 0.12s ease, background 0.12s ease, opacity 0.12s ease;
  font-family: var(--tl-quran) !important;
}

.qtv-hafez[data-blank="1"] .tl-word:not(.is-matched):not(.is-current) {
  color: transparent !important;
  background: transparent !important;
  border: 0 !important;
  text-shadow: none !important;
  user-select: none;
  -webkit-user-select: none;
}

.qtv-hafez[data-blank="1"] .tl-word.is-current:not(.is-matched) {
  color: transparent !important;
  background: rgba(196, 163, 90, 0.28);
  box-shadow: inset 0 -2px 0 rgba(196, 163, 90, 0.65);
  border-radius: 4px;
}

.qtv-hafez[data-blank="1"] .tl-word.is-current.is-miss:not(.is-matched) {
  color: #e53935 !important;
  background: rgba(176, 48, 48, 0.4);
  box-shadow: inset 0 -2px 0 rgba(176, 48, 48, 0.95);
  animation: tl-miss-pulse 0.9s ease-in-out 2;
}

.qtv-hafez:not([data-blank="1"]) .tl-word.is-current {
  background: var(--tl-current);
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.35);
}

.qtv-hafez:not([data-blank="1"]) .tl-word.is-current.is-miss {
  color: #e53935 !important;
  background: rgba(176, 48, 48, 0.42);
  box-shadow: 0 0 0 1px rgba(176, 48, 48, 0.65);
  animation: tl-miss-pulse 0.9s ease-in-out 2;
}

@keyframes tl-miss-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

.qtv-hafez:not([data-blank="1"]) .tl-word.is-matched {
  animation: none !important;
  color: #07583d !important;
  background: rgba(11, 107, 86, 0.14) !important;
  border-radius: 4px;
  filter: none !important;
  opacity: 1 !important;
}
.qtv-hafez[data-theme="dark"]:not([data-blank="1"]) .tl-word.is-matched {
  color: #b8e0cf !important;
  background: rgba(11, 107, 86, 0.28) !important;
}

.qtv-hafez[data-blank="1"] .tl-word.is-matched {
  background: transparent !important;
  box-shadow: none !important;
  color: #0b6b56 !important;
  animation: none;
  filter: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
.qtv-hafez[data-theme="dark"][data-blank="1"] .tl-word.is-matched {
  color: #7dceb4 !important;
}

/* تغيّر لون الكلمة نفسها فوراً (بدون تظليل بطيء) */
.qtv-hafez[data-blank="1"] .tl-word.is-matched.is-just-revealed {
  animation: hf-color-pop 0.18s ease-out both;
}
.qtv-hafez[data-theme="dark"][data-blank="1"] .tl-word.is-matched.is-just-revealed {
  animation-name: hf-color-pop-dark;
}

@keyframes hf-color-pop {
  0% { color: rgba(11, 107, 86, 0.35); }
  100% { color: #0b6b56; }
}
@keyframes hf-color-pop-dark {
  0% { color: rgba(125, 206, 180, 0.35); }
  100% { color: #7dceb4; }
}

@keyframes tl-reveal {
  0% { color: transparent; opacity: 0.45; }
  100% { color: #0b6b56; opacity: 1; }
}
@keyframes tl-reveal-dark {
  0% { color: transparent; opacity: 0.45; }
  100% { color: #7dceb4; opacity: 1; }
}

.qtv-hafez[data-blank="1"] .tl-ayah-num {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 820px) {
  /* إزالة الفراغ تحت الهيدر + عرض كامل */
  body.qtv-hafez-page #page,
  body.qtv-hafez-page #content,
  body.qtv-hafez-page #primary,
  body.qtv-hafez-page .site-main,
  body.qtv-hafez-page .content-area,
  body.qtv-hafez-page .site-content,
  body.qtv-hafez-page .entry-content,
  body.qtv-hafez-page article,
  body.qtv-hafez-page .hentry,
  body.qtv-hafez-page .post,
  body.qtv-hafez-page .page,
  body.qtv-hafez-page .inside-article,
  body.qtv-hafez-page .site-content-contain {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }
  body.qtv-hafez-page .entry-content > p:empty,
  body.qtv-hafez-page .entry-content > br {
    display: none !important;
  }
  .qtv-hafez {
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .tl-stage {
    width: 100% !important;
    min-height: calc(100svh - 130px) !important;
    height: calc(100svh - 130px) !important;
    max-height: calc(100svh - 110px) !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-sizing: border-box !important;
  }
  .tl-stage::before {
    inset: 2px;
  }
  .tl-ayahs {
    font-size: calc(clamp(0.92rem, 3.5vw, 1.2rem) * var(--hf-zoom, 1)) !important;
    line-height: 1.95 !important;
    word-spacing: 0.04em;
  }
  .tl-basmala { font-size: calc(clamp(0.95rem, 3.6vw, 1.18rem) * var(--hf-zoom, 1)) !important; }
  .tl-surah-title {
    font-size: 0.68rem;
    min-width: 96px;
    padding: 2px 10px;
    margin: 4px auto 3px;
  }
  .tl-toolbar {
    gap: 0.12rem;
    padding: 0.2rem 0.24rem;
    flex-shrink: 0;
    flex-wrap: nowrap !important;
  }
  .tl-tb-cluster {
    gap: 0.1rem;
    flex: 1 1 30%;
    min-width: 0;
  }
  .tl-tb-half {
    gap: 0.1rem;
    flex: 1 1 26%;
    min-width: 0;
  }
  .tl-tb-tools {
    gap: 0.1rem;
    flex: 0 0 auto;
  }
  .tl-select-tb {
    height: 1.7rem;
    font-size: 0.54rem;
    padding: 0 0.14rem;
  }
  .tl-tb-surah .tl-select-tb {
    max-width: 5rem;
    min-width: 0;
  }
  .tl-zoom {
    height: 1.7rem;
    gap: 0.06rem;
    padding: 0 0.08rem;
  }
  .tl-zoom-label {
    min-width: 1.75rem;
    font-size: 0.5rem;
  }
  .tl-zoom-btn {
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.85rem;
  }
  .tl-theme-btn {
    width: 1.7rem;
    min-width: 1.7rem;
    height: 1.7rem;
    font-size: 0.9rem;
  }
  .tl-mic-btn {
    min-width: 2.5rem;
    padding: 0 0.18rem;
    font-size: 0.58rem;
    height: 1.7rem;
  }
  .tl-page-label { min-width: 1.7rem; font-size: 0.5rem; }
  .tl-nav-btn { min-width: 1.3rem; height: 1.7rem; font-size: 0.9rem; }
  .tl-opts {
    grid-template-columns: minmax(3.8rem, 0.55fr) 1fr;
    padding: 0.14rem 0.24rem;
    gap: 0.1rem 0.16rem;
    flex-shrink: 0;
    align-items: end;
  }
  .tl-field-ayah {
    grid-column: auto;
  }
  .tl-field { font-size: 0.5rem; gap: 0.04rem; }
  .tl-select { font-size: 0.62rem; padding: 0.1rem 0.16rem; }
  .tl-chip {
    font-size: 0.54rem;
    padding: 0.12rem 0.26rem;
    min-width: 2.2rem;
  }
  .tl-opts-actions {
    gap: 0.12rem;
    flex-wrap: wrap;
    grid-column: auto;
  }
  .tl-status-wrap {
    padding: 0.1rem 0.32rem 0.12rem;
    flex-shrink: 0;
  }
  .tl-status { font-size: 0.62rem; max-height: 2.2em; }
  .tl-transcript { font-size: 0.72rem; max-height: 2.4em; }
  .tl-badge { font-size: 0.55rem; padding: 0.08rem 0.28rem; }
  .tl-mushaf {
    padding: 4px 8px 8px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }
  .tl-mushaf-body {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  .tl-page-meta { font-size: 0.62rem; padding: 1px 0 3px; margin-bottom: 4px; }
  /* أرقام واضحة قليلاً أكبر من السابق — والزوم يكبرها أكثر */
  .tl-ayah-num {
    min-width: 1.38em !important;
    height: 1.38em !important;
    font-size: 0.56em !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    border-width: 1px !important;
    margin: 0 0.12em !important;
  }
}

@media (max-width: 380px) {
  .tl-opts {
    grid-template-columns: minmax(3.4rem, 0.5fr) 1fr;
  }
  .tl-opts-actions {
    grid-column: auto;
  }
  .tl-ayahs {
    font-size: calc(clamp(0.86rem, 3.3vw, 1.08rem) * var(--hf-zoom, 1)) !important;
    line-height: 1.88 !important;
  }
  .tl-chip {
    font-size: 0.52rem;
    min-width: 2.1rem;
    padding: 0.1rem 0.22rem;
  }
  .tl-ayah-num {
    min-width: 1.35em !important;
    height: 1.35em !important;
    font-size: 0.54em !important;
  }
  .tl-tb-surah .tl-select-tb {
    max-width: 4.4rem;
  }
  .tl-zoom-label {
    min-width: 1.55rem;
    font-size: 0.46rem;
  }
  .tl-stage {
    min-height: calc(100svh - 120px) !important;
    height: calc(100svh - 120px) !important;
    max-height: calc(100svh - 100px) !important;
  }
}
