/* Reference fidelity override: Surah list and Reader only. No event / scroll / audio scripts. */
#screen-surahs,#screen-reader { --oku-ref-paper:#f0ecdf; --oku-ref-orange:#ec9060; --oku-ref-ink:#191817; background:var(--oku-ref-paper)!important; }
#screen-surahs .page-header,#screen-reader .page-header { width:calc(100% - 24px)!important;max-width:none!important;margin:0 auto!important;padding:16px 0 0!important;box-sizing:border-box!important; }
#screen-surahs .page-hero,#screen-reader .reader-page-heading {
 width:calc(100% - 24px)!important;max-width:none!important;box-sizing:border-box!important;
 min-height:clamp(180px,13.2vw,280px)!important;height:clamp(180px,13.2vw,280px)!important;
 padding:clamp(15px,1.3vw,26px)!important;margin:12px auto 0!important;
 background:var(--oku-ref-orange)!important;border:0!important;border-radius:clamp(18px,1.5vw,32px)!important;
 position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(200px,32%)!important;align-items:center!important;gap:12px!important;
 overflow:hidden!important;isolation:isolate!important;
}
#screen-surahs .page-hero::before,#screen-reader .reader-page-heading::before {
 content:""!important;display:block!important;position:absolute!important;inset:0!important;
 background-image:url('assets/ebru/001.webp')!important;background-repeat:no-repeat!important;
 background-size:72% auto!important;background-position:57% 49%!important;
 opacity:1!important;z-index:-1!important;pointer-events:none!important;
}
#screen-surahs .page-hero > div:first-child,#screen-reader .reader-page-heading > div:first-child{align-self:stretch!important;min-width:0!important;z-index:1!important;display:block!important;}
#screen-surahs .page-hero .page-title,#screen-reader .reader-page-heading .reader-page-title{display:none!important;}
#screen-surahs .oku-surah-hero-copy,#screen-reader .oku-surah-hero-copy {
 display:flex!important;flex-direction:column!important;justify-content:space-between!important;
 height:100%!important;max-width:clamp(220px,24vw,360px)!important;min-height:0!important;gap:0!important;
 padding:0!important;color:#141414!important;
}
#screen-surahs .oku-surah-hero-copy__kicker,#screen-reader .oku-surah-hero-copy__kicker{font-size:clamp(16px,1.53vw,27px)!important;line-height:1!important;font-weight:800!important;letter-spacing:-.025em!important;}
#screen-surahs .oku-surah-hero-copy__desc,#screen-reader .oku-surah-hero-copy__desc{font-size:clamp(9px,.76vw,13px)!important;line-height:1.13!important;font-weight:700!important;max-width:205px!important;margin:7px 0 12px!important;letter-spacing:-.025em!important;}
#screen-surahs .oku-surah-hero-copy__title,#screen-reader .oku-surah-hero-copy__title{font-size:clamp(34px,3.18vw,60px)!important;line-height:.88!important;letter-spacing:-.055em!important;font-weight:850!important;margin:0!important;white-space:nowrap!important;}
#screen-surahs .oku-surah-hero-copy__meta,#screen-reader .oku-surah-hero-copy__meta{font-size:clamp(10px,.85vw,15px)!important;letter-spacing:.07em!important;margin:4px 0 0!important;line-height:1.1!important;}
#screen-surahs .oku-surah-hero-copy__arrow,#screen-reader .oku-surah-hero-copy__arrow{font-size:clamp(30px,3vw,52px)!important;line-height:.7!important;margin:auto 0 0!important;font-weight:300!important;}
#screen-surahs .last-read-card,#screen-reader .reader-page-last-read {
 display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-content:center!important;
 position:relative!important;z-index:2!important;justify-self:end!important;align-self:center!important;
 width:min(100%,clamp(265px,27vw,450px))!important;height:clamp(90px,7vw,144px)!important;min-height:0!important;
 padding:14px clamp(17px,1.6vw,27px)!important;margin:0!important;
 background:#f0ecdf!important;border:1px solid #a9a294!important;border-radius:clamp(16px,1.5vw,26px)!important;
 box-shadow:none!important;gap:3px!important;box-sizing:border-box!important;text-align:right!important;
}
#screen-surahs .last-read-card__copy,#screen-reader .reader-page-last-read .last-read-card__copy,
#screen-surahs .last-read-card__action,#screen-reader .reader-page-last-read .last-read-card__action{display:flex!important;align-items:baseline!important;justify-content:flex-end!important;flex-direction:row!important;gap:12px!important;width:100%!important;}
#screen-surahs .last-read-card .aside-label,#screen-reader .reader-page-last-read .aside-label{font-size:clamp(9px,.67vw,12px)!important;font-weight:600!important;line-height:1!important;letter-spacing:.08em!important;}
#screen-surahs .last-read-card strong,#screen-reader .reader-page-last-read strong{font-size:clamp(22px,1.85vw,37px)!important;font-weight:800!important;line-height:1!important;letter-spacing:-.045em!important;white-space:nowrap!important;}
#screen-surahs .last-read-card__ref,#screen-reader .reader-page-last-read .last-read-card__ref{font-size:clamp(22px,1.85vw,37px)!important;font-weight:800!important;line-height:1!important;}
#screen-surahs .last-read-card button,#screen-reader .reader-page-last-read button{display:inline-flex!important;min-width:0!important;border:0!important;background:transparent!important;padding:0!important;font-size:clamp(10px,.8vw,14px)!important;}
#screen-surahs .oku-surah-page-share{position:absolute!important;right:clamp(15px,1.5vw,28px)!important;top:clamp(10px,.9vw,18px)!important;z-index:5!important;display:flex!important;align-items:center!important;gap:8px!important;border:1px solid #978c79!important;background:#f4eddd!important;border-radius:999px!important;min-height:clamp(30px,2.3vw,42px)!important;padding:5px 13px!important;font-size:clamp(10px,.72vw,13px)!important;color:#191817!important;}
#screen-surahs .page-content--surahs{width:calc(100% - 24px)!important;max-width:none!important;box-sizing:border-box!important;margin:0 auto!important;padding:0!important;}
#screen-surahs .surah-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:clamp(10px,.86vw,17px)!important;padding:clamp(12px,1vw,20px) 0 30px!important;}
#screen-surahs .surah-card{position:relative!important;min-height:clamp(150px,9vw,192px)!important;height:clamp(150px,9vw,192px)!important;overflow:hidden!important;border-radius:clamp(24px,2vw,35px)!important;border:1px solid #817c70!important;background:var(--oku-ref-paper)!important;padding:clamp(16px,1.15vw,23px)!important;box-shadow:none!important;box-sizing:border-box!important;}
#screen-surahs .surah-card__index{position:absolute!important;left:clamp(15px,1.15vw,23px)!important;top:clamp(16px,1.13vw,23px)!important;font-size:clamp(12px,1vw,18px)!important;line-height:1!important;font-weight:600!important;}
#screen-surahs .surah-card__name{position:absolute!important;left:clamp(43px,3.0vw,60px)!important;top:clamp(15px,1.05vw,21px)!important;max-width:59%!important;margin:0!important;font-size:clamp(25px,2.1vw,39px)!important;line-height:1.05!important;letter-spacing:-.05em!important;font-weight:800!important;overflow-wrap:normal!important;word-break:normal!important;}
#screen-surahs .surah-card__name.oku-name-long{font-size:clamp(22px,1.72vw,33px)!important;max-width:64%!important;}
#screen-surahs .surah-card__name.oku-name-very-long{font-size:clamp(18px,1.35vw,27px)!important;max-width:63%!important;line-height:1.05!important;}
#screen-surahs .surah-card__meta{position:absolute!important;right:clamp(14px,1.15vw,23px)!important;top:clamp(15px,1.05vw,21px)!important;margin:0!important;}
#screen-surahs .surah-card__count{display:block!important;font-size:clamp(12px,.93vw,18px)!important;line-height:1!important;font-weight:600!important;letter-spacing:.04em!important;white-space:nowrap!important;}
#screen-surahs .surah-card__count::after,#screen-reader .reader-surah-card__count::after{content:none!important;display:none!important;}
#screen-surahs .surah-card__arrow{position:absolute!important;left:clamp(15px,1.1vw,24px)!important;bottom:clamp(12px,1vw,20px)!important;font-size:clamp(35px,2.8vw,52px)!important;line-height:.75!important;font-weight:300!important;}
#screen-surahs .surah-card .quran-audio-control{position:absolute!important;left:clamp(55px,3.8vw,78px)!important;right:auto!important;bottom:clamp(11px,.9vw,18px)!important;top:auto!important;transform:none!important;z-index:3!important;}
#screen-surahs .surah-card__ebru{position:absolute!important;right:-2px!important;bottom:-5px!important;width:min(48%,270px)!important;height:auto!important;max-height:95%!important;object-fit:contain!important;pointer-events:none!important;}
#screen-surahs .surah-card__open{z-index:1!important;}
#screen-reader .reader-hero--card{width:calc(100% - 24px)!important;max-width:none!important;box-sizing:border-box!important;padding:0!important;margin:12px auto 0!important;background:transparent!important;border:0!important;}
#screen-reader .reader-surah-card{height:clamp(250px,20vw,400px)!important;min-height:0!important;box-sizing:border-box!important;background:#f0ecdf!important;border:1px solid #777166!important;border-radius:clamp(24px,2.1vw,38px)!important;position:relative!important;overflow:hidden!important;padding:clamp(18px,1.4vw,29px)!important;}
#screen-reader .reader-surah-card__index{position:relative!important;top:0!important;left:0!important;font-size:clamp(14px,1.15vw,22px)!important;}
#screen-reader #readerSurahName{font-size:clamp(45px,5.2vw,97px)!important;line-height:.92!important;letter-spacing:-.065em!important;margin:5px 0 0!important;max-width:58%!important;}
#screen-reader .reader-surah-card__meta{position:absolute!important;right:clamp(18px,1.5vw,30px)!important;top:clamp(18px,1.4vw,29px)!important;display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:18px!important;}
#screen-reader .reader-surah-card__count{display:block!important;font-size:clamp(16px,1.35vw,25px)!important;font-weight:600!important;letter-spacing:.05em!important;}
#screen-reader .reader-surah-card__resume{display:none!important;}
#screen-reader .reader-surah-card__ebru{position:absolute!important;right:0!important;bottom:-8px!important;width:min(48%,680px)!important;max-height:94%!important;object-fit:contain!important;}
#screen-reader .reader-surah-card__back{position:absolute!important;left:clamp(18px,1.6vw,32px)!important;bottom:clamp(16px,1.3vw,26px)!important;font-size:clamp(48px,4.4vw,84px)!important;line-height:.8!important;}
#screen-reader .quran-audio-control--reader{display:flex!important;flex-direction:column!important;align-items:flex-end!important;}
#screen-reader .reader-toolbar{width:100%!important;max-width:none!important;box-sizing:border-box!important;padding:0!important;margin:14px 0 0!important;}
#screen-reader .reader-top-actions{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important;}
#screen-reader .reader-top-actions__secondary{margin-left:auto!important;display:flex!important;gap:8px!important;}
#screen-reader .surah-reading-progress{margin:12px 0 0!important;}
#screen-reader .verse-list,#screen-reader .reader-loading,#screen-reader .reader-next-wrap{width:calc(100% - 24px)!important;max-width:none!important;box-sizing:border-box!important;margin-left:auto!important;margin-right:auto!important;padding-left:0!important;padding-right:0!important;}
#screen-reader .verse{background:#f2eee5!important;border:1px solid #b3ad9d!important;border-radius:clamp(22px,2vw,36px)!important;box-sizing:border-box!important;padding:clamp(20px,2vw,36px)!important;}
#screen-reader .verse-arabic,#screen-reader .verse-arabic *,#screen-reader [lang="ar"],#screen-reader [lang="ar"] *{color:#101010!important;text-align:right!important;direction:rtl!important;text-shadow:none!important;}
#screen-reader .verse-arabic{display:block!important;width:100%!important;max-width:none!important;line-height:1.8!important;margin:18px 0 36px auto!important;}
#screen-reader.hide-arabic .verse-arabic{display:none!important;}
@media(max-width:1100px){#screen-surahs .surah-card__name{font-size:clamp(22px,2.5vw,32px)!important;}#screen-surahs .surah-card__name.oku-name-long{font-size:clamp(18px,2.2vw,28px)!important;}}
@media(max-width:780px){#screen-surahs .page-hero,#screen-reader .reader-page-heading{grid-template-columns:minmax(0,1fr)!important;min-height:270px!important;height:auto!important;}
 #screen-surahs .last-read-card,#screen-reader .reader-page-last-read{width:min(100%,290px)!important;justify-self:end!important;align-self:end!important;height:auto!important;min-height:78px!important;}
 #screen-surahs .surah-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 #screen-surahs .surah-card{height:170px!important;min-height:170px!important;}
 #screen-reader .reader-surah-card{height:280px!important;}
 #screen-reader .reader-top-actions__secondary{width:100%!important;justify-content:flex-end!important;}}
@media(max-width:540px){#screen-surahs .surah-grid{grid-template-columns:1fr!important;}#screen-surahs .surah-card{height:150px!important;min-height:150px!important;}#screen-surahs .page-hero,#screen-reader .reader-page-heading{min-height:295px!important;}#screen-reader .reader-surah-card{height:235px!important;}#screen-reader #readerSurahName{font-size:clamp(40px,10vw,62px)!important;}}



/* 2026-11-15 — SAME upper banner for Surah list and Surah detail; desktop + mobile. */
#screen-surahs .page-hero,
#screen-reader .reader-page-heading{
  width:calc(100% - 24px)!important;max-width:none!important;
  height:clamp(290px,18.5vw,365px)!important;
  min-height:clamp(290px,18.5vw,365px)!important;
  padding:clamp(19px,1.5vw,29px)!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(265px,32%)!important;
  column-gap:14px!important;
  align-items:center!important;
  overflow:hidden!important;
  position:relative!important;
  margin:12px auto 0!important;
}
#screen-surahs .page-hero::before,
#screen-reader .reader-page-heading::before{
  background-image:url('assets/ebru/001.webp')!important;
  background-size:72% auto!important;
  background-position:56% 49%!important;
  background-repeat:no-repeat!important;
  border-radius:inherit!important;
}
#screen-surahs .oku-surah-hero-copy,
#screen-reader .oku-surah-hero-copy{
  height:100%!important;
  min-height:0!important;
  max-width:clamp(220px,24vw,350px)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  gap:0!important;
}
#screen-surahs .oku-surah-hero-copy__desc,
#screen-reader .oku-surah-hero-copy__desc{
  max-width:205px!important;
  margin:8px 0 12px!important;
}
#screen-surahs .oku-surah-hero-copy__arrow,
#screen-reader .oku-surah-hero-copy__arrow{
  position:absolute!important;
  left:clamp(20px,1.5vw,30px)!important;
  bottom:clamp(16px,1.5vw,27px)!important;
  margin:0!important;
  padding:0!important;
  font-size:clamp(30px,2.7vw,48px)!important;
  line-height:1!important;
  z-index:4!important;
  height:auto!important;
  overflow:visible!important;
}
#screen-surahs .last-read-card,
#screen-reader .reader-page-last-read{
  justify-self:end!important;
  align-self:center!important;
  width:min(100%,clamp(265px,25vw,420px))!important;
  min-height:100px!important;
  height:auto!important;
  max-height:160px!important;
  padding:15px clamp(16px,1.3vw,26px)!important;
  margin:0!important;
}
#screen-surahs .page-hero .oku-page-share-row,
#screen-reader .reader-page-heading .oku-page-share-row{
  position:absolute!important;
  top:clamp(14px,1.1vw,22px)!important;
  right:clamp(14px,1.2vw,25px)!important;
  left:auto!important;
  bottom:auto!important;
  display:flex!important;
  justify-content:flex-end!important;
  z-index:15!important;
  width:auto!important;
  max-width:calc(100% - 28px)!important;
  padding:0!important;
  margin:0!important;
  transform:none!important;
}
#screen-surahs .page-hero .oku-page-share-button,
#screen-reader .reader-page-heading .oku-page-share-button{
  width:auto!important;
  min-width:0!important;
  min-height:38px!important;
  padding:8px 14px!important;
  display:inline-flex!important;
  border:1px solid #9d9483!important;
  border-radius:999px!important;
  background:#f4eddd!important;
  color:#191817!important;
  font-size:12px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
#screen-surahs .oku-surah-page-share,#screen-reader .oku-surah-page-share{display:none!important;}
#screen-surahs .page-hero > .oku-page-share-row:not(.oku-page-share-row--in-surah-banner),
#screen-reader .reader-page-heading > .oku-page-share-row:not(.oku-page-share-row--in-surah-banner){display:none!important;}
/* Preserve the already working grid and reader; only prevent text from escaping. */
#screen-surahs .surah-card__name{max-width:60%!important;overflow-wrap:anywhere!important;}
#screen-surahs .surah-card__name.oku-name-very-long{font-size:clamp(17px,1.32vw,26px)!important;}
#screen-reader .verse-arabic,#screen-reader .verse-arabic *{direction:rtl!important;text-align:right!important;color:#101010!important;}
@media(max-width:780px){
  #screen-surahs .page-hero,#screen-reader .reader-page-heading{
    height:clamp(360px,95vw,440px)!important;
    min-height:clamp(360px,95vw,440px)!important;
    display:block!important;
    padding:22px 20px!important;
    margin-top:12px!important;
  }
  #screen-surahs .page-hero::before,#screen-reader .reader-page-heading::before{
    background-size:105% auto!important;
    background-position:53% 52%!important;
  }
  #screen-surahs .oku-surah-hero-copy,#screen-reader .oku-surah-hero-copy{
    position:relative!important;
    max-width:min(72%,320px)!important;
    height:auto!important;
  }
  #screen-surahs .oku-surah-hero-copy__kicker,#screen-reader .oku-surah-hero-copy__kicker{font-size:20px!important;}
  #screen-surahs .oku-surah-hero-copy__desc,#screen-reader .oku-surah-hero-copy__desc{
    max-width:215px!important;font-size:12px!important;line-height:1.16!important;
    margin:8px 0 12px!important;
  }
  #screen-surahs .oku-surah-hero-copy__title,#screen-reader .oku-surah-hero-copy__title{
    font-size:clamp(38px,7.2vw,53px)!important;
  }
  #screen-surahs .last-read-card,#screen-reader .reader-page-last-read{
    position:absolute!important;left:auto!important;right:15px!important;bottom:17px!important;
    top:auto!important;z-index:5!important;
    width:min(57%,290px)!important;min-height:90px!important;max-height:118px!important;
    padding:12px 15px!important;
  }
  #screen-surahs .page-hero .oku-page-share-row,#screen-reader .reader-page-heading .oku-page-share-row{
    top:14px!important;right:15px!important;
  }
  #screen-surahs .oku-surah-hero-copy__arrow,#screen-reader .oku-surah-hero-copy__arrow{
    left:20px!important;bottom:22px!important;font-size:42px!important;
  }
  #screen-reader .quran-audio-control--reader{transform:translateY(-26px)!important;}
}
@media(max-width:480px){
  #screen-surahs .page-hero,#screen-reader .reader-page-heading{
    height:370px!important;min-height:370px!important;
    padding:20px 16px!important;
  }
  #screen-surahs .oku-surah-hero-copy,#screen-reader .oku-surah-hero-copy{max-width:72%!important;}
  #screen-surahs .oku-surah-hero-copy__desc,#screen-reader .oku-surah-hero-copy__desc{font-size:10px!important;max-width:185px!important;}
  #screen-surahs .oku-surah-hero-copy__title,#screen-reader .oku-surah-hero-copy__title{font-size:38px!important;}
  #screen-surahs .last-read-card,#screen-reader .reader-page-last-read{width:min(60%,240px)!important;}
  #screen-reader .quran-audio-control--reader{transform:translateY(-30px)!important;}
}
