@font-face {
  font-family: "Uthmanic Hafs";
  src: url("/assets/UthmanicHafs1Ver18.ttf") format("truetype");
  font-display: swap;
}
.reader .reader-shell {
  grid-template-columns: 218px minmax(0, 1fr);
  overflow: visible;
  background: #f4efe3;
}
.reader .surah-sidebar { background: #fffdf8; border-radius: 0 20px 20px 0; }
.reader .reading-pane { padding: 24px 26px 30px; }
.reader .reading-toolbar { padding-bottom: 16px; }
.reader .reading-toolbar h3 { font-size: 27px; }
.reader .reading-toolbar .kicker { color: #8a6b3b; }
.reader .reader-audio { border-bottom: 0; padding: 12px 0 15px; }
.mushaf-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: #5c513b;
  font-size: 13px;
}
.mushaf-navigation > span { font-weight: 700; text-align: center; }
.mushaf-nav-button {
  border: 1px solid #d7c7a6;
  background: #fffcf5;
  color: #604e32;
  border-radius: 11px;
  padding: 8px 11px;
  transition: background .18s ease, border-color .18s ease;
}
.mushaf-nav-button:hover:not(:disabled) { background: #eaf3ec; border-color: #8db7a5; }
.mushaf-nav-button:disabled { opacity: .45; cursor: default; }
.mushaf-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  direction: rtl;
  align-items: stretch;
}
.mushaf-spread[aria-busy="true"] { opacity: .62; }
.mushaf-page {
  min-width: 0;
  min-height: 670px;
  padding: 10px;
  background: #e5d3ad url("/assets/mushaf-pattern.svg") repeat;
  border: 1px solid #bea778;
  box-shadow: 0 12px 24px #67532a18;
}
.mushaf-page-inner {
  height: 100%;
  min-height: 648px;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 12px;
  background: #fffcf4;
  border: 2px solid #aa8f5b;
  outline: 2px solid #e9dcc2;
  outline-offset: -7px;
}
.mushaf-page-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #976743;
  font-family: "Uthmanic Hafs", Amiri, serif;
  font-size: 17px;
  border-bottom: 1px solid #d9c8a3;
  padding-bottom: 9px;
  min-height: 38px;
}
.mushaf-page-head strong { font-weight: 400; text-align: left; }
.mushaf-page-text {
  flex: 1;
  padding-top: 17px;
  color: #24221d;
  font-family: "Uthmanic Hafs", Amiri, serif;
  font-size: var(--page-font, 25px);
  line-height: 2.05;
  text-align: justify;
  text-align-last: center;
  overflow-wrap: normal;
}
.mushaf-sura-title {
  width: min(100%, 270px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  margin: 1px auto 13px;
  padding: 3px 12px;
  border: 1px solid #ad8c51;
  border-radius: 100px;
  color: #634f2f;
  background: #f8f1df;
  font-size: 21px;
  text-align: center;
}
.mushaf-sura-title span { font-family: Amiri, serif; color: #a68448; font-size: 14px; }
.mushaf-ayah {
  border-radius: 7px;
  padding: 1px 3px 3px;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mushaf-ayah:hover,
.mushaf-ayah:focus-visible {
  color: #074c41;
  background: #dceee8;
  outline: none;
  box-shadow: 0 0 0 2px #80baa677;
}
.mushaf-ayah.playing { color: #064b40; background: #c9e9dd; box-shadow: 0 0 0 2px #6ba99688; }
.mushaf-verse-number {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-inline: 3px;
  border: 1px solid #aa8a57;
  border-radius: 50%;
  color: #8c6836;
  background: #fbf5e9;
  font-family: Amiri, serif;
  font-size: 14px;
  line-height: 1;
  vertical-align: middle;
}
.mushaf-page-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-top: 14px;
  border-top: 1px solid #d9c8a3;
  color: #976743;
  font-family: "Uthmanic Hafs", Amiri, serif;
  font-size: 16px;
}
.mushaf-page-foot span[aria-hidden] { font-size: 13px; }
@media (max-width: 1050px) {
  .reader .reader-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .reader .reading-pane { padding-inline: 14px; }
  .mushaf-page-inner { padding-inline: 11px; }
  .mushaf-page-text { font-size: min(var(--page-font, 22px), 22px); }
}
@media (max-width: 800px) {
  .reader .reader-shell { display: block; }
  .reader .surah-sidebar { border-radius: 20px 20px 0 0; border-left: 0; border-bottom: 1px solid #e4dccb; padding: 12px; }
  .reader .surah-list { display: flex; max-height: 85px; overflow-x: auto; overflow-y: hidden; }
  .reader .surah-option { min-width: 150px; }
  .reader .reading-pane { padding: 16px; }
}
@media (max-width: 650px) {
  .reader .reading-toolbar { align-items: flex-start; gap: 10px; }
  .reader .reading-toolbar h3 { font-size: 24px; }
  .reader .toolbar-controls { flex-wrap: wrap; justify-content: end; }
  .reader .reader-audio { flex-wrap: wrap; }
  .reader .reader-audio audio { width: 100%; }
  .mushaf-spread { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .mushaf-page { min-height: 0; }
  .mushaf-page-inner { min-height: 0; padding: 17px 14px 8px; }
  .mushaf-page-text { font-size: clamp(20px, var(--page-font, 25px), 25px); line-height: 1.9; }
  .mushaf-navigation { font-size: 11px; gap: 5px; }
  .mushaf-nav-button { padding: 7px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .mushaf-ayah, .mushaf-nav-button { transition: none; } }
.mushaf-opening { color: #6f8779; font-size: .79em; }
