@font-face {
  font-family: "Alyamama";
  src: url("/fonts/Alyamama-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alyamama";
  src: url("/fonts/Alyamama-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "qpc-hafs";
  src: url("fonts/UthmanicHafs_V22.ttf") format("truetype");
  font-display: swap;
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  --quran-font-scale: 1;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body.quran-chapter {
  margin: 0;
  background: #f6f2e9;
  color: #151515;
  direction: rtl;
  font-family: "Alyamama", "Traditional Arabic", "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  line-height: 1.9;
}

body.quran-chapter div[align="center"],
body.quran-chapter center {
  width: 100%;
}

body.quran-chapter .quran-reader {
  width: min(100% - 24px, 1080px);
  margin: clamp(18px, 4vw, 48px) auto;
}

body.quran-chapter .quran-reader-ad {
  position: relative;
  width: min(100%, 980px);
  min-height: 96px;
  margin: 18px auto;
  overflow: hidden;
  padding: 12px;
  text-align: center;
  background: #fffaf0;
  border: 1px solid #d9c28a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(67, 49, 15, 0.13);
}

body.quran-chapter .quran-reader-ad::before {
  content: "";
  position: absolute;
  inset-inline: clamp(36px, 10vw, 120px);
  top: 0;
  height: 3px;
  background: #b9913d;
}

body.quran-chapter .quran-reader-ad--top {
  min-height: 74px;
  margin-top: 0;
  margin-bottom: 16px;
  padding-block: 8px;
}

body.quran-chapter .quran-reader-ad--top + .quran-reader {
  margin-top: 0;
}

body.quran-chapter .quran-reader-ad--top + .quran-reader .reader-nav-panel:first-child {
  margin-top: 0;
}

body.quran-chapter .quran-reader:has(+ .quran-reader-ad--bottom) {
  margin-bottom: 0;
}

body.quran-chapter .quran-reader:has(+ .quran-reader-ad--bottom) .reader-nav-panel:last-child {
  margin-bottom: 0;
}

body.quran-chapter .quran-reader-ad--bottom {
  margin-top: 16px;
}

body.quran-chapter .quran-reader-ad ins {
  max-width: 100%;
  min-height: 90px;
}

body.quran-chapter .quran-reader-ad--top ins {
  min-height: 58px;
}

body.quran-chapter .quran-reader-ad iframe {
  max-width: 100% !important;
}

body.quran-chapter .reader-nav-panel {
  position: relative;
  width: min(100%, 980px);
  margin: clamp(14px, 3vw, 32px) auto;
  padding: clamp(16px, 3vw, 28px);
  overflow: hidden;
  background: #fffaf0;
  border: 1px solid #d9c28a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(67, 49, 15, 0.13);
}

body.quran-chapter .reader-nav-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(185, 145, 61, 0.36);
  border-radius: 6px;
  pointer-events: none;
}

body.quran-chapter .reader-nav-panel::after {
  content: "";
  position: absolute;
  inset-inline: clamp(28px, 8vw, 92px);
  top: 0;
  height: 3px;
  background: #b9913d;
  pointer-events: none;
}

body.quran-chapter .reader-nav-panel--bottom {
  margin-top: clamp(20px, 4vw, 40px);
}

body.quran-chapter .reader-nav-panel--bottom::after {
  top: auto;
  bottom: 0;
}

body.quran-chapter .reader-nav-panel--bottom .reader-menu {
  margin-top: clamp(12px, 2.4vw, 20px);
}

body.quran-chapter .reader-menu,
body.quran-chapter .chapter-nav {
  position: relative;
  z-index: 1;
}

body.quran-chapter .reader-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(8px, 2vw, 16px);
}

body.quran-chapter .reader-menu__link,
body.quran-chapter .chapter-nav__link {
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

body.quran-chapter .reader-menu__link {
  min-height: clamp(64px, 8vw, 82px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  color: #173f35;
  background: #fffdf8;
  border: 1px solid #dbc48b;
  border-bottom: 3px solid #b9913d;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 8px 18px rgba(74, 52, 15, 0.08);
  font: 700 clamp(1.1rem, 3vw, 1.5rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1.45;
}

body.quran-chapter .reader-menu__mark {
  color: #b9913d;
  font-size: 0.95em;
}

body.quran-chapter .reader-menu__link:hover,
body.quran-chapter .chapter-nav a:hover .chapter-nav__link {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 14px 24px rgba(49, 39, 14, 0.14);
}

body.quran-chapter .reader-menu__link.is-current {
  color: #fdf7e6;
  background: #164d3f;
  border-color: #b9913d;
}

body.quran-chapter .chapter-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.4vw, 18px);
  margin-top: clamp(12px, 2.4vw, 20px);
}

body.quran-chapter .chapter-nav a {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

body.quran-chapter .chapter-nav__link {
  min-height: clamp(78px, 9vw, 98px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.8vw, 20px);
  color: #fff8e7;
  background: #123e36;
  border: 1px solid #b9913d;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(20, 48, 42, 0.18);
}

body.quran-chapter .chapter-nav__text {
  min-width: 0;
  max-width: calc(100% - 80px);
  display: grid;
  place-items: center;
}

body.quran-chapter .chapter-nav__eyebrow {
  color: #d9bd6d;
  text-align: center;
  font: 700 clamp(0.85rem, 2.4vw, 1rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1.4;
}

body.quran-chapter .chapter-nav__surah {
  min-width: 0;
  text-align: center;
  overflow-wrap: anywhere;
  font: 700 clamp(1.1rem, 3.2vw, 1.45rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1.6;
}

body.quran-chapter .chapter-nav__arrow {
  position: absolute;
  top: 50%;
  right: clamp(18px, 3vw, 30px);
  left: auto;
  transform: translateY(-50%);
  color: #d9bd6d;
  direction: ltr;
  unicode-bidi: isolate;
  font: 700 clamp(2.2rem, 5vw, 3rem) "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  line-height: 1;
  text-align: center;
}

body.quran-chapter .chapter-nav__link--next .chapter-nav__arrow {
  right: auto;
  left: clamp(18px, 3vw, 30px);
}

body.quran-chapter .chapter-nav__link.is-disabled {
  color: #746b58;
  background: #f1eadb;
  border-color: #d6c598;
  border-style: dashed;
  box-shadow: none;
}

body.quran-chapter .chapter-nav__link.is-disabled .chapter-nav__eyebrow,
body.quran-chapter .chapter-nav__link.is-disabled .chapter-nav__arrow {
  color: #9b8350;
}

body.quran-chapter .reader-tools {
  position: relative;
  z-index: 1;
  margin-top: clamp(14px, 2.4vw, 22px);
  display: grid;
  gap: clamp(10px, 2vw, 16px);
}

body.quran-chapter .reader-resume[hidden],
body.quran-chapter .reader-bookmark[hidden] {
  display: none;
}

body.quran-chapter .reader-resume__link,
body.quran-chapter .reader-bookmark__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 12px;
  color: #173f35;
  background: #fffdf8;
  border: 1px dashed #c9a95e;
  border-radius: 8px;
  font: 400 clamp(0.9rem, 2.4vw, 1.05rem) "Alyamama", "Traditional Arabic", serif;
  line-height: 1.5;
}

body.quran-chapter .reader-bookmark__link .bookmark-icon {
  color: #b9913d;
  font-size: 1.15rem;
}

body.quran-chapter .reader-resume__label,
body.quran-chapter .reader-bookmark__label {
  color: #7a6b50;
}

body.quran-chapter .reader-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.quran-chapter .reader-control-group,
body.quran-chapter .reader-jump {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid #e0d0a8;
  border-radius: 999px;
}

body.quran-chapter .reader-control-group button,
body.quran-chapter .reader-jump button {
  min-width: 42px;
  min-height: 30px;
  padding: 4px 10px;
  color: #173f35;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 700 clamp(0.78rem, 2vw, 0.92rem) "Alyamama", Tahoma, Arial, sans-serif;
  line-height: 1.3;
}

body.quran-chapter .reader-control-group button:hover,
body.quran-chapter .reader-control-group button:focus,
body.quran-chapter .reader-jump button:hover,
body.quran-chapter .reader-jump button:focus,
body.quran-chapter .reader-control-group button.is-active {
  color: #fff8e7;
  background: #164d3f;
}

body.quran-chapter .reader-jump label {
  padding-inline: 8px 2px;
  color: #6f6655;
  font: 400 clamp(0.82rem, 2vw, 0.95rem) "Alyamama", Tahoma, Arial, sans-serif;
}

body.quran-chapter .reader-jump input[type="number"] {
  width: 70px;
  min-height: 30px;
  padding: 2px 8px;
  color: #173f35;
  background: #fffdf8;
  border: 1px solid #d8c28a;
  border-radius: 999px;
  text-align: center;
  font: 700 clamp(0.82rem, 2vw, 0.95rem) Tahoma, Arial, sans-serif;
  direction: ltr;
}

body.quran-chapter table[dir="rtl"] {
  width: min(100% - 24px, 980px) !important;
  margin: clamp(12px, 3vw, 34px) auto;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid #dfd2b8;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(70, 54, 25, 0.14);
}

body.quran-chapter td {
  padding-inline: clamp(14px, 4vw, 56px);
}

body.quran-chapter td[bgcolor] {
  padding: clamp(10px, 2.4vw, 18px) clamp(14px, 4vw, 40px);
  background: #138c70 !important;
}

body.quran-chapter td[bgcolor] p {
  margin: 0;
  color: #fff;
  font-family: "qpc-hafs", "Alyamama", "Traditional Arabic", serif;
  font-size: clamp(1rem, 3.6vw, 1.35rem);
  line-height: 1.6;
}

body.quran-chapter td[bgcolor] a {
  color: #fff;
  font-weight: 700;
}

body.quran-chapter ol {
  margin: 0;
  padding-block: clamp(12px, 2vw, 24px);
  padding-inline: 0;
  list-style: none;
}

body.quran-chapter li {
  position: relative;
  list-style: none;
  padding: clamp(10px, 2.8vw, 18px) clamp(0px, 1vw, 8px) clamp(10px, 2.8vw, 18px) clamp(46px, 9vw, 64px);
  border-bottom: 1px solid #eee4cf;
  font-family: "qpc-hafs", "Amiri Quran", "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif !important;
  font-size: calc(clamp(1.55rem, 6.2vw, 2.35rem) * var(--quran-font-scale, 1)) !important;
  line-height: 2.05 !important;
  scroll-margin-top: 18px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.quran-chapter li:focus-visible {
  outline: 3px solid #d9bd6d;
  outline-offset: 3px;
}

body.quran-chapter .ayah-item.is-bookmarked:focus,
body.quran-chapter .ayah-item.is-bookmarked:focus-visible {
  outline: 0;
}

body.quran-chapter .ayah-item.is-bookmarked {
  margin: clamp(4px, 1.4vw, 10px) clamp(-8px, -1vw, -4px);
  padding: clamp(14px, 3vw, 22px) clamp(18px, 4vw, 34px) clamp(14px, 3vw, 22px) clamp(54px, 9vw, 72px);
  color: #102f2a;
  background: #fff7df;
  border: 1px solid #c79b38;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 12px 28px rgba(90, 66, 16, 0.16);
}

body.quran-chapter .ayah-item.is-bookmarked:last-child {
  border-bottom: 1px solid #c79b38;
}

body.quran-chapter .ayah-item.is-bookmarked::before {
  content: "";
  position: absolute;
  inset-inline: clamp(18px, 6vw, 60px);
  top: 0;
  height: 3px;
  background: #b9913d;
}

body.quran-chapter li::marker {
  content: "";
}

body.quran-chapter li:last-child {
  border-bottom: 0;
}

body.quran-chapter .selected-ayah-anchor {
  position: relative;
  top: -18px;
  display: block;
}

body.quran-chapter .selected-ayah {
  position: relative;
  display: block;
  margin: 0;
  padding: clamp(4px, 1vw, 8px) clamp(12px, 3vw, 18px);
  color: #102f2a;
  background: rgba(255, 242, 184, 0.42);
  border: 1px dashed rgba(185, 145, 61, 0.68);
  border-inline-start: 4px solid #b9913d;
  border-radius: 6px;
  box-shadow: none;
}

body.quran-chapter .selected-ayah::before {
  content: none;
}

body.quran-chapter .selected-ayah::after {
  content: none;
}

body.quran-chapter .ayah-item.is-bookmarked .selected-ayah {
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.quran-chapter .ayah-item.is-bookmarked .selected-ayah::before,
body.quran-chapter .ayah-item.is-bookmarked .selected-ayah::after {
  content: none;
}

body.quran-chapter .quran-search-highlight {
  display: inline;
  padding: 0 0.12em;
  color: #102f2a;
  background: #fff2b8;
  border: 1px solid #c79b38;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

body.quran-chapter .ayah-bookmark-button {
  position: absolute;
  z-index: 2;
  top: clamp(16px, 3vw, 26px);
  left: clamp(8px, 2.6vw, 18px);
  width: clamp(32px, 7vw, 40px);
  height: clamp(32px, 7vw, 40px);
  display: inline-grid;
  place-items: center;
  color: #b9913d;
  cursor: pointer;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid rgba(185, 145, 61, 0.32);
  border-radius: 999px;
  opacity: 0.72;
  box-shadow: 0 8px 18px rgba(70, 54, 25, 0.08);
}

body.quran-chapter .ayah-bookmark-button:hover,
body.quran-chapter .ayah-bookmark-button:focus-visible {
  color: #7a5a1d;
  background: #fff0bd;
  border-color: #b9913d;
  opacity: 1;
}

body.quran-chapter .ayah-bookmark-button.is-saved {
  color: #fff8e7;
  background: #b9913d;
  border-color: #b9913d;
  opacity: 1;
}

body.quran-chapter .ayah-bookmark-button.is-saved:hover,
body.quran-chapter .ayah-bookmark-button.is-saved:focus-visible {
  color: #fff8e7;
  background: #9f7930;
  border-color: #9f7930;
}

body.quran-chapter .ayah-bookmark-button .bookmark-icon {
  font-size: clamp(1rem, 3vw, 1.25rem);
}

html[data-reader-theme="sepia"] body.quran-chapter .ayah-bookmark-button {
  color: #9a7428;
  background: rgba(255, 245, 220, 0.86);
  border-color: rgba(185, 145, 61, 0.36);
}

html[data-reader-theme="sepia"] body.quran-chapter .ayah-bookmark-button:hover,
html[data-reader-theme="sepia"] body.quran-chapter .ayah-bookmark-button:focus-visible {
  color: #7a5a1d;
  background: #f1dfb5;
  border-color: #b9913d;
}

html[data-reader-theme="sepia"] body.quran-chapter .ayah-bookmark-button.is-saved {
  color: #fff8e7;
  background: #b9913d;
  border-color: #b9913d;
}

html[data-reader-theme="sepia"] body.quran-chapter .ayah-bookmark-button.is-saved:hover,
html[data-reader-theme="sepia"] body.quran-chapter .ayah-bookmark-button.is-saved:focus-visible {
  color: #fff8e7;
  background: #9f7930;
  border-color: #9f7930;
}

body.quran-chapter .ayah-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
  margin-top: clamp(2px, 0.8vw, 6px);
  font-family: "Alyamama", "Traditional Arabic", "Noto Naskh Arabic", serif;
  font-size: clamp(0.82rem, 2.2vw, 0.98rem);
  line-height: 1.35;
}

body.quran-chapter .ayah-actions a,
body.quran-chapter .ayah-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 3px 10px 4px;
  color: #7a6b50 !important;
  background: transparent;
  border: 1px solid rgba(185, 145, 61, 0.24);
  border-radius: 999px;
  box-shadow: none;
  font-weight: 400;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none !important;
  cursor: pointer;
}

body.quran-chapter .ayah-actions a::before,
body.quran-chapter .ayah-actions button::before {
  content: none;
}

body.quran-chapter .ayah-actions a:hover,
body.quran-chapter .ayah-actions a:focus-visible,
body.quran-chapter .ayah-actions button:hover,
body.quran-chapter .ayah-actions button:focus-visible {
  color: #123e36 !important;
  background: rgba(251, 243, 223, 0.42);
  border-color: rgba(185, 145, 61, 0.42);
  box-shadow: none;
}

body.quran-chapter .ayah-actions button.is-saved {
  color: #123e36 !important;
  background: #fbf3df;
  border-color: rgba(185, 145, 61, 0.5);
  box-shadow: none;
}

body.quran-chapter .reader-toast {
  position: fixed;
  z-index: 20;
  inset-inline: 18px;
  bottom: 18px;
  width: fit-content;
  max-width: min(90vw, 360px);
  margin-inline: auto;
  padding: 8px 14px;
  color: #fff8e7;
  background: #123e36;
  border: 1px solid #b9913d;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(20, 48, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  font: 400 0.95rem "Alyamama", Tahoma, Arial, sans-serif;
}

body.quran-chapter .reader-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.quran-chapter p {
  margin: 0;
}

body.quran-chapter li p,
body.quran-chapter td > p {
  text-align: right !important;
}

body.quran-chapter td > p[align="center"] {
  padding: clamp(16px, 4vw, 28px) 0 0;
  text-align: center !important;
  font-family: "qpc-hafs", "Amiri Quran", "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  font-size: clamp(1.4rem, 5.4vw, 2.1rem);
  line-height: 2;
}

body.quran-chapter td[bgcolor] > p[align="center"] {
  padding: 0;
  font-size: clamp(1rem, 3.6vw, 1.35rem);
  line-height: 1.6;
}

body.quran-chapter font {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

body.quran-chapter a,
body.quran-chapter a:visited,
body.quran-chapter a:hover,
body.quran-chapter a:focus,
body.quran-chapter a:active {
  color: inherit;
  text-decoration: none;
}

body.quran-chapter a * {
  text-decoration: none;
}

body.quran-chapter button {
  max-width: 100%;
  padding: 0 8px;
  white-space: normal;
  font: 700 clamp(0.85rem, 3vw, 1.15rem) "Alyamama", Tahoma, Arial, sans-serif;
  line-height: 1.4;
}

body.quran-chapter img {
  max-width: 100%;
  height: auto;
}

body.quran-chapter .quran-source {
  margin: 24px auto 0;
  padding: 0 16px;
  max-width: 980px;
  color: #6f6655;
  text-align: center;
  font: 400 0.9rem "Alyamama", Tahoma, Arial, sans-serif;
}

html[data-reader-theme="sepia"] body.quran-chapter {
  background: #eadfc9;
  color: #1a1712;
}

html[data-reader-theme="sepia"] body.quran-chapter .reader-nav-panel,
html[data-reader-theme="sepia"] body.quran-chapter .quran-reader-ad,
html[data-reader-theme="sepia"] body.quran-chapter table[dir="rtl"] {
  background: #fff4d8;
  border-color: #c8ab65;
}

html[data-reader-theme="sepia"] body.quran-chapter .reader-control-group,
html[data-reader-theme="sepia"] body.quran-chapter .reader-jump,
html[data-reader-theme="sepia"] body.quran-chapter .reader-resume__link,
html[data-reader-theme="sepia"] body.quran-chapter .reader-bookmark__link {
  background: #fff8e8;
  border-color: #c8ab65;
}

html[data-reader-theme="night"] body.quran-chapter {
  background: #101715;
  color: #f4ead3;
}

html[data-reader-theme="night"] body.quran-chapter .quran-reader-ad,
html[data-reader-theme="night"] body.quran-chapter .reader-nav-panel,
html[data-reader-theme="night"] body.quran-chapter table[dir="rtl"] {
  background: #17231f;
  border-color: #52614f;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

html[data-reader-theme="night"] body.quran-chapter .quran-reader-ad::before,
html[data-reader-theme="night"] body.quran-chapter .reader-nav-panel::after,
html[data-reader-theme="night"] body.quran-chapter .selected-ayah::before {
  background: #c9a95e;
}

html[data-reader-theme="night"] body.quran-chapter .reader-nav-panel::before {
  border-color: rgba(201, 169, 94, 0.26);
}

html[data-reader-theme="night"] body.quran-chapter .reader-menu__link,
html[data-reader-theme="night"] body.quran-chapter .reader-resume__link,
html[data-reader-theme="night"] body.quran-chapter .reader-bookmark__link,
html[data-reader-theme="night"] body.quran-chapter .reader-control-group,
html[data-reader-theme="night"] body.quran-chapter .reader-jump {
  color: #f1e5c9;
  background: #1d2d28;
  border-color: #52614f;
}

html[data-reader-theme="night"] body.quran-chapter .reader-menu__mark,
html[data-reader-theme="night"] body.quran-chapter .reader-resume__label,
html[data-reader-theme="night"] body.quran-chapter .reader-bookmark__label,
html[data-reader-theme="night"] body.quran-chapter .reader-jump label,
html[data-reader-theme="night"] body.quran-chapter .chapter-nav__eyebrow {
  color: #c9a95e;
}

html[data-reader-theme="night"] body.quran-chapter .reader-control-group button,
html[data-reader-theme="night"] body.quran-chapter .reader-jump button {
  color: #f1e5c9;
}

html[data-reader-theme="night"] body.quran-chapter .reader-control-group button:hover,
html[data-reader-theme="night"] body.quran-chapter .reader-control-group button:focus,
html[data-reader-theme="night"] body.quran-chapter .reader-jump button:hover,
html[data-reader-theme="night"] body.quran-chapter .reader-jump button:focus,
html[data-reader-theme="night"] body.quran-chapter .reader-control-group button.is-active,
html[data-reader-theme="night"] body.quran-chapter .chapter-nav__link {
  color: #fff8e7;
  background: #24473d;
}

html[data-reader-theme="night"] body.quran-chapter .reader-jump input[type="number"] {
  color: #f1e5c9;
  background: #111b18;
  border-color: #52614f;
}

html[data-reader-theme="night"] body.quran-chapter td[bgcolor] {
  background: #225548 !important;
}

html[data-reader-theme="night"] body.quran-chapter li {
  border-bottom-color: rgba(201, 169, 94, 0.18);
}

html[data-reader-theme="night"] body.quran-chapter .selected-ayah {
  color: #fff3d5;
  background: rgba(88, 69, 28, 0.38);
  border-color: #c9a95e;
  border-inline-start-color: #c9a95e;
  box-shadow: none;
}

html[data-reader-theme="night"] body.quran-chapter .ayah-item.is-bookmarked {
  color: #fff3d5;
  background: #20342e;
  border-color: #c9a95e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

html[data-reader-theme="night"] body.quran-chapter .ayah-item.is-bookmarked::before {
  background: #c9a95e;
}

html[data-reader-theme="night"] body.quran-chapter .quran-search-highlight {
  color: #fff6dc;
  background: #58451c;
  border-color: #c9a95e;
}

html[data-reader-theme="night"] body.quran-chapter .ayah-actions a,
html[data-reader-theme="night"] body.quran-chapter .ayah-actions button {
  color: #cfc09e !important;
  border-color: rgba(201, 169, 94, 0.28);
}

html[data-reader-theme="night"] body.quran-chapter .ayah-actions a:hover,
html[data-reader-theme="night"] body.quran-chapter .ayah-actions a:focus-visible,
html[data-reader-theme="night"] body.quran-chapter .ayah-actions button:hover,
html[data-reader-theme="night"] body.quran-chapter .ayah-actions button:focus-visible {
  color: #fff8e7 !important;
  background: rgba(36, 71, 61, 0.5);
  border-color: rgba(201, 169, 94, 0.42);
}

html[data-reader-theme="night"] body.quran-chapter .ayah-actions button.is-saved {
  color: #fff8e7 !important;
  background: #24473d;
  border-color: rgba(201, 169, 94, 0.54);
}

html[data-reader-theme="night"] body.quran-chapter .ayah-bookmark-button {
  color: #c9a95e;
  background: rgba(29, 45, 40, 0.86);
  border-color: rgba(201, 169, 94, 0.32);
}

html[data-reader-theme="night"] body.quran-chapter .ayah-bookmark-button:hover,
html[data-reader-theme="night"] body.quran-chapter .ayah-bookmark-button:focus-visible,
html[data-reader-theme="night"] body.quran-chapter .ayah-bookmark-button.is-saved {
  color: #13221d;
  background: #d9bd6d;
  border-color: #d9bd6d;
}

body.quran-chapter.saved-verses-page .quran-reader {
  width: min(100% - 24px, 980px);
}

body.quran-chapter .saved-verses {
  display: grid;
  gap: clamp(12px, 2.4vw, 18px);
}

body.quran-chapter .saved-ayah {
  padding: clamp(14px, 3vw, 22px);
  background: #fffdf8;
  border: 1px solid #dfd2b8;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(70, 54, 25, 0.1);
}

body.quran-chapter .saved-ayah__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
  color: #7a6b50;
  font: 700 clamp(0.95rem, 2.6vw, 1.1rem) "Alyamama", "Traditional Arabic", serif;
}

body.quran-chapter .saved-ayah__header a {
  color: #123e36;
}

body.quran-chapter .saved-ayah__text {
  color: #102f2a;
  text-align: right;
  font-family: "qpc-hafs", "Amiri Quran", "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  font-size: calc(clamp(1.5rem, 5.8vw, 2.25rem) * var(--quran-font-scale, 1));
  line-height: 2.05;
}

body.quran-chapter .saved-ayah__actions {
  margin-top: 10px;
}

body.quran-chapter .saved-verses-empty {
  padding: clamp(18px, 4vw, 30px);
  color: #6f6655;
  text-align: center;
  background: #fffdf8;
  border: 1px dashed #c9a95e;
  border-radius: 8px;
  font: 400 clamp(1rem, 2.8vw, 1.15rem) "Alyamama", "Traditional Arabic", serif;
}

html[data-reader-theme="night"] body.quran-chapter .saved-ayah,
html[data-reader-theme="night"] body.quran-chapter .saved-verses-empty {
  color: #f1e5c9;
  background: #17231f;
  border-color: #52614f;
}

html[data-reader-theme="night"] body.quran-chapter .saved-ayah__header,
html[data-reader-theme="night"] body.quran-chapter .saved-verses-empty {
  color: #cfc09e;
}

html[data-reader-theme="night"] body.quran-chapter .saved-ayah__header a,
html[data-reader-theme="night"] body.quran-chapter .saved-ayah__text {
  color: #fff3d5;
}

@media (min-width: 900px) {
  body.quran-chapter {
    padding-block: 12px;
  }

  body.quran-chapter li {
    font-size: 2rem;
  }
}

@media (max-width: 520px) {
  body.quran-chapter .quran-reader {
    width: 100%;
    margin: 0 auto;
  }

  body.quran-chapter .reader-nav-panel {
    width: 100%;
    margin: 0;
    border-inline: 0;
    border-radius: 0;
    padding: 14px 12px 16px;
  }

  body.quran-chapter .quran-reader-ad {
    width: 100%;
    margin: 12px auto;
    padding: 8px;
    border-inline: 0;
    border-radius: 0;
  }

  body.quran-chapter .quran-reader-ad--top {
    margin-top: 0;
  }

  body.quran-chapter .reader-menu,
  body.quran-chapter .chapter-nav {
    grid-template-columns: 1fr;
  }

  body.quran-chapter .reader-controls {
    align-items: stretch;
  }

  body.quran-chapter .reader-control-group,
  body.quran-chapter .reader-jump {
    width: 100%;
    border-radius: 8px;
  }

  body.quran-chapter .reader-control-group button,
  body.quran-chapter .reader-jump button {
    flex: 1 1 0;
  }

  body.quran-chapter .reader-jump input[type="number"] {
    flex: 0 0 86px;
  }

  body.quran-chapter .reader-menu__link,
  body.quran-chapter .chapter-nav__link {
    min-height: 62px;
  }

  body.quran-chapter table[dir="rtl"] {
    width: 100% !important;
    margin: 0;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.quran-chapter ol {
    padding-inline: 0;
  }
}
