@font-face { font-family: "Amiri Quran"; src: url("fonts/AmiriQuran-Regular.ttf") format("truetype"); font-display: swap }
:root {
  color-scheme: light;
  --ink: #1d2925;
  --muted: #59665d;
  --pine: #173c30;
  --pine-dark: #112e25;
  --gold: #dbb984;
  --line: #e4e0d6;
  --paper: #fffcf6;
  --background: #eeece4;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box }
html { scroll-padding: 24px }
body { margin: 0; background: var(--background); color: var(--ink); font: 1rem/1.55 system-ui, sans-serif }
a { color: var(--pine); text-underline-offset: 4px }
:focus-visible { outline: 2px solid #98703e; outline-offset: 4px }
.mast { background: var(--pine-dark); color: #fff9eb; border-bottom: 1px solid #345044 }
.top { max-width: 1280px; margin: auto; padding: 18px 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px }
.brand { display: inline-flex; gap: 12px; align-items: center; font: 1.45rem var(--serif); color: inherit; text-decoration: none }
.brand svg { width: 25px; height: 25px; color: var(--gold); flex: 0 0 auto }
.jump { color: #f0dfc3; font-size: .9rem }
.layout { display: grid; grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); align-items: start; gap: 28px; max-width: 1280px; margin: 34px auto 70px; padding: 0 34px }
.panel { min-width: 0; border-radius: 20px; box-shadow: 0 13px 35px #25291c0d }
.side { background: var(--pine-dark); color: #fcf8ed; position: sticky; top: 24px; overflow: hidden }
.plan-image { height: 118px; background: linear-gradient(0deg, #112e25, transparent 70%), url("cover.webp") 28% 58% / cover }
.plan-body { padding: 4px 22px 24px }
.side h2 { font: 1.75rem/1.15 var(--serif) }
.side .muted { color: #c4d2c8 }
.side .dates { margin: 6px 0 23px; font-size: .88rem }
.stat { display: flex; align-items: baseline; gap: 5px }
.stat strong { font: 2rem var(--serif); color: #fff4df }
.stat span { color: #c4d2c8; font-size: .9rem }
progress { appearance: none; width: 100%; height: 7px; border: 0; border-radius: 10px; background: #355547; margin: 10px 0 14px; color: var(--gold); overflow: hidden }
progress::-webkit-progress-bar { background: #355547 }
progress::-webkit-progress-value { background: var(--gold) }
progress::-moz-progress-bar { background: var(--gold) }
.side label { display: block; font-size: .9rem; font-weight: 650; margin: 20px 0 7px }
.side select, .wide { width: 100% }
.side select, .side .secondary { background-color: #1d4034; border-color: #476254; color: #fff9ed }
.side .secondary:hover:not(:disabled), .side select:hover { border-color: var(--gold) }
.side #day-detail, .side .small { margin-top: 9px }
.reader { background: var(--paper); border: 1px solid #ded9cd }
.intro { border-radius: 20px 20px 0 0; padding: 34px clamp(19px, 5vw, 58px) 25px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #f8f3e7, #fffcf6 76%) }
h1, h2, p { margin: 0 }
h1 { margin: 5px 0 8px; font: 400 clamp(2.9rem, 6vw, 5.1rem)/1 var(--serif); letter-spacing: -.05em; color: var(--pine-dark) }
.eyebrow { color: #78552e; font-weight: 700; font-size: .91rem }
.muted { color: var(--muted) }
.small { font-size: .875rem }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px }
select, button { font: inherit; min-height: 44px; padding: 8px 12px; border: 1px solid #d5d9d0; border-radius: 9px; background: #fffdf8; color: var(--ink); max-width: 100% }
select:hover, button:hover:not(:disabled) { border-color: var(--pine) }
button { cursor: pointer; font-size: .9rem; font-weight: 650 }
button:disabled { opacity: .53; cursor: default }
.plain { border: 0; background: none; color: var(--gold); padding-inline: 0; text-decoration: underline; text-underline-offset: 4px }
.primary { background: var(--pine); color: #fffaf0; border-color: var(--pine) }
.primary:hover:not(:disabled) { background: #235642 }
.actions, .sources, #status { padding-inline: clamp(19px, 5vw, 58px) }
#status:not(:empty) { padding-block: 20px }
.actions { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; align-items: center; position: sticky; bottom: 0; z-index: 1; background: var(--paper); border-block: 1px solid var(--line); padding-block: 12px }
.actions .primary { justify-self: end }
.sources { padding-block: 15px 20px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
[hidden] { display: none !important }
@media (max-width: 850px) {
  .layout { grid-template-columns: minmax(200px, 230px) minmax(0, 1fr); gap: 14px; padding-inline: 16px }
  .top { padding-inline: 16px }
  .actions { grid-template-columns: 1fr 1fr }
  .actions .primary { grid-column: 1 / -1; width: 100% }
}
@media (max-width: 680px) {
  .layout { grid-template-columns: minmax(0, 1fr); margin: 13px auto 32px; padding-inline: 10px }
  .side { grid-row: 2; position: static }
  .panel, .intro { border-radius: 14px }
  .intro { border-radius: 14px 14px 0 0; padding-top: 24px }
  .plan-image { height: 93px }
  .controls { gap: 8px 12px }
  .top { padding-block: 13px }
  .brand { font-size: 1.14rem; gap: 7px }
  .brand svg { width: 21px; height: 21px }
  .actions { position: static }
}


select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2359665d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 15px 15px;
}
.side select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23f0dfc3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.audio-panel {
  display: grid;
  gap: 9px;
  padding: 18px clamp(19px, 5vw, 58px);
  border-bottom: 1px solid var(--line);
}
.audio-panel h2 { font: 1.3rem var(--serif) }
.audio-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px }
.audio-controls label { font-size: .9rem; margin-left: 6px }



.mushaf-reading { background:#202421; color:#f8f6ef; padding:16px 0 15px }
.mushaf-reading #status { text-align:center }
.mushaf-reading #status:empty { display:none }
.word-status { margin:0 12px 9px; text-align:center; color:#c0cbc0 }
.mushaf-scroll { overflow-x:auto; overflow-y:hidden; padding-block:4px }
.ayahs { width:min(100%,720px); margin:auto; padding:0 clamp(8px,2vw,24px); color:inherit }
.ayahs.is-enlarged { width:max(100%,750px) }
.madina-line { font-size:var(--mushaf-size, 27px); line-height:1.75; white-space:nowrap; text-align:center; direction:rtl }
.madina-line.is-justified { display:flex; justify-content:space-between; align-items:baseline }
.madina-line > * { flex:none }
.surah-title { width:max-content; max-width:100%; margin:12px auto 5px; font:1.4rem/1.5 "Amiri Quran",serif; color:#ebe2b9 }
.basmala { text-align:center; font:1.75rem/1.65 "Amiri Quran",serif; color:#f8f6ef }
.word,.verse-marker { display:inline-block; min-height:0; margin:0; padding:0; border:0; background:transparent; color:inherit; font:inherit; border-radius:4px; white-space:pre }
.word:hover,.word.is-speaking { background:#57735c; color:#fff }
.is-current { background:#37523e; color:#fff6cf }
.folio { color:#b9c3ba; text-align:center; margin:8px 0 0; font-size:.9rem }
.fallback .verse-marker { font: .5em/1.3 "Amiri Quran",serif }
.fallback .madina-line { white-space:normal; display:block }
