/* E-Quran Readers V18 — seven page types / progressive enhancement / Chrome 109+.
   Intentionally scoped: never restyle shared #header, #footer, or main.js UI. */
body.eqr18 {
  --eqr-ink:#153c35; --eqr-ink-2:#22564b; --eqr-muted:#587268;
  --eqr-forest:#124b3f; --eqr-teal:#187263; --eqr-gold:#a27b37;
  --eqr-surface:#ffffff; --eqr-canvas:#f5f8f5; --eqr-tint:#eef5ef;
  --eqr-border:#dae7de; --eqr-shadow:0 10px 30px rgba(21,64,48,.075);
  --eqr-ring:rgba(25,107,86,.24);--eqr-radius:23px;
  margin:0; background:var(--eqr-canvas);color:var(--eqr-ink);
  min-width:0;overflow-x:clip;
}
html[data-theme="dark"] body.eqr18,html.dark body.eqr18,html.night body.eqr18,
body.eqr18[data-theme="dark"] {
  --eqr-ink:#e5f1eb;--eqr-ink-2:#d1e7dd;--eqr-muted:#b4cbc0;
  --eqr-forest:#19705c;--eqr-teal:#299f84;--eqr-gold:#e7bf70;
  --eqr-surface:#17372f;--eqr-canvas:#102b26;--eqr-tint:#21443a;
  --eqr-border:#396255;--eqr-shadow:0 14px 35px rgba(0,0,0,.18);
  --eqr-ring:rgba(132,216,184,.4);
  color-scheme:dark;
}
body.eqr18 :is(.reader-page-v15,.rd17-page,.rs-page,.surah-audio-page,.surah-audio-index,.listen-launcher,.listening-dashboard){
  min-width:0;overflow-wrap:anywhere;
}
body.eqr18 :is(.reader-page-v15,.surah-audio-page,.surah-audio-index,.listen-launcher,.listening-dashboard,.rd17-page){
  width:min(1210px,calc(100% - 36px))!important;max-width:1210px!important;
  margin:0 auto!important;padding-top:16px!important;padding-bottom:52px!important;
  float:none!important;position:relative!important;inset:auto!important;
}
body.eqr18 .rs-page#content{width:min(1180px,calc(100% - 36px))!important;max-width:1180px!important;margin-inline:auto!important;float:none!important;position:relative!important;inset:auto!important;padding-top:16px!important;padding-bottom:56px!important}
body.eqr18 :is(a,button,input,select,summary):focus-visible{outline:3px solid var(--eqr-gold)!important;outline-offset:3px!important}
body.eqr18 :is(button,input,select){font:inherit}
body.eqr18 :is(h1,h2,h3){text-wrap:balance}
body.eqr18 :is(.rs-hero,.rs-player,.rs-section,.readers-hero,.reader-hero,.reader-toolbar,.surah-list-section,.readers-list-section,.reader-related,.rv16-explore,.surah-link-grid,.launcher-card,.dash-grid>article,.dash-panel){box-sizing:border-box;min-width:0}
body.eqr18 [hidden]{display:none!important}
/* Identity masthead: each page gets the same navigation, without replacing the global header. */
body.eqr18 .eqr18-nav{display:grid;grid-template-columns:minmax(0,1fr) repeat(4,minmax(0,auto));align-items:center;gap:8px;
  width:100%;margin:0 0 20px;padding:10px;background:var(--eqr-surface);border:1px solid var(--eqr-border);border-radius:19px;box-shadow:var(--eqr-shadow);direction:rtl}
body.eqr18 .eqr18-nav__brand{display:flex;align-items:center;gap:9px;color:var(--eqr-ink)!important;text-decoration:none!important;font-weight:850;font-size:.99rem;min-width:0;padding-inline:8px}
body.eqr18 .eqr18-nav__mark{display:grid;place-items:center;width:39px;height:39px;flex-shrink:0;border-radius:13px;background:linear-gradient(145deg,#186956,#123d33);color:#fff}
body.eqr18 .eqr18-nav svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
body.eqr18 .eqr18-nav__item{display:flex;align-items:center;justify-content:center;gap:8px;min-height:43px;white-space:nowrap;text-decoration:none!important;padding:8px 12px;border-radius:12px;border:1px solid transparent;font-size:.83rem;font-weight:750;color:var(--eqr-ink-2)!important;transition:background .15s ease,transform .15s ease}
body.eqr18 .eqr18-nav__item:hover{background:var(--eqr-tint);transform:translateY(-1px)}
body.eqr18 .eqr18-nav__item[aria-current="page"]{background:var(--eqr-tint);color:var(--eqr-ink)!important;border-color:var(--eqr-border);box-shadow:inset 0 -2px 0 var(--eqr-gold)}
/* Rebuilt hero system: same scale, clean text layout, shared premium surfaces. */
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero){position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(125deg,#114b3c 0%,#1b7160 78%,#27715e 100%)!important;border:1px solid #316f5f!important;border-radius:var(--eqr-radius)!important;box-shadow:0 14px 40px rgba(16,63,47,.15)!important;color:#f9f9f1!important;margin-bottom:18px!important;padding:clamp(18px,3.2vw,38px)!important}
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero):before{content:"";position:absolute;width:260px;height:260px;inset:auto auto -160px -65px;background:radial-gradient(circle,rgba(238,199,117,.22),transparent 69%);pointer-events:none;z-index:-1}
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) :is(h1,h2,p,.reader-narration,.rs-chips span,.rs-lead,.readers-intro,.reader-lead){color:#fff!important}
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) h1{font-size:clamp(1.4rem,3.2vw,2.75rem)!important;line-height:1.34!important;letter-spacing:0!important;margin:6px 0 12px!important;max-width:820px}
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) :is(.readers-intro,.reader-lead,.rs-lead){font-size:clamp(.9rem,1.35vw,1.04rem)!important;line-height:1.95!important;max-width:750px;opacity:.91}
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) :is(.readers-breadcrumb,.rs-breadcrumb) a{color:#f0e1b6!important}
body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) :is(.readers-eyebrow,.rs-eyebrow){color:#e8c988!important;font-weight:850}
body.eqr18 .readers-breadcrumb,body.eqr18 .rs-breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:.78rem!important;line-height:1.6;margin-bottom:17px}
body.eqr18 .rs-breadcrumb{padding:5px 2px;color:var(--eqr-muted)}
body.eqr18 .rs-breadcrumb a{color:var(--eqr-forest)!important;text-decoration:none}
body.eqr18 .reader-hero-grid,body.eqr18 .readers-hero__grid{gap:clamp(14px,3vw,44px)!important;align-items:center!important}
body.eqr18 .reader-hero-card{background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,255,255,.23)!important;border-radius:20px!important;color:#fff!important;padding:18px!important;box-shadow:none!important}
body.eqr18 .reader-hero-card :is(strong,span,a){color:#fff!important}
body.eqr18 .reader-hero-card a{border:1px solid rgba(255,255,255,.35)!important;background:rgba(255,255,255,.1)!important;border-radius:11px!important}
body.eqr18 .reader-hero-card img,body.eqr18 .rs-avatar{object-fit:cover;border:3px solid rgba(255,255,255,.5)!important;background:#f0f2e7!important;box-shadow:0 6px 22px rgba(0,0,0,.15)}
body.eqr18 .rs-hero{display:grid!important;grid-template-columns:170px minmax(0,1fr)!important;gap:clamp(18px,4vw,48px)!important;align-items:center!important}
body.eqr18 .rs-avatar{width:150px!important;height:150px!important;border-radius:28px!important}
body.eqr18 .rs-chips{gap:7px!important;display:flex!important;flex-wrap:wrap!important}
body.eqr18 .rs-chips span{background:rgba(255,255,255,.13)!important;border:1px solid rgba(255,255,255,.35)!important;border-radius:100px!important;padding:5px 12px!important}
body.eqr18 :is(.rs-hero-actions,.hero-actions){gap:9px!important;align-items:stretch;flex-wrap:wrap}
body.eqr18 :is(.rs-hero-actions,.hero-actions) :is(button,a){min-height:44px;font-weight:800;border-radius:11px!important;box-shadow:none!important}
body.eqr18 .rs-hero-actions .rs-btn:not(.rs-primary){background:rgba(255,255,255,.12)!important;color:#fff!important;border-color:rgba(255,255,255,.42)!important}
body.eqr18 .rs-hero-actions .rs-primary,body.eqr18 .reader-hero .btn-primary{background:#ecd49b!important;color:#20392f!important;border-color:#ecd49b!important}
/* A visible, distinct context card below the hero on every page. */
body.eqr18 .eqr18-context{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 18px;padding:16px 19px;background:var(--eqr-surface);border:1px solid var(--eqr-border);border-inline-start:4px solid var(--eqr-gold);border-radius:16px;box-shadow:var(--eqr-shadow)}
body.eqr18 .eqr18-context__copy{min-width:0}
body.eqr18 .eqr18-context__label{display:block;color:var(--eqr-gold);font-weight:850;font-size:.77rem;margin-bottom:5px}
body.eqr18 .eqr18-context__title{margin:0;font-size:clamp(.98rem,1.7vw,1.22rem);line-height:1.5;color:var(--eqr-ink)!important}
body.eqr18 .eqr18-context__desc{margin:4px 0 0;font-size:.81rem;line-height:1.7;color:var(--eqr-muted)}
body.eqr18 .eqr18-context__actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
body.eqr18 .eqr18-context__actions>a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border-radius:10px;font-size:.78rem;font-weight:800;border:1px solid var(--eqr-border);background:var(--eqr-tint);color:var(--eqr-ink)!important;text-decoration:none!important;white-space:nowrap}
body.eqr18 .eqr18-context__actions>a:first-child{background:var(--eqr-forest);color:#fff!important;border-color:var(--eqr-forest)}
body.eqr18 .eqr18-context__actions>a:hover{filter:brightness(.95)}
/* Complete section restyling, not restricted to the landing page. */
body.eqr18 :is(.rs-player,.rs-section,.reader-toolbar,.surah-list-section,.readers-list-section,.reader-related,.rv16-explore,.surah-link-grid,.launcher-card,.dash-grid>article,.dash-panel,.readers-tools,.readers-list,.rd17-featured,.rd17-search-panel){background:var(--eqr-surface)!important;border:1px solid var(--eqr-border)!important;border-radius:19px!important;box-shadow:var(--eqr-shadow)!important;color:var(--eqr-ink)!important;margin-bottom:18px!important;padding:clamp(14px,2.3vw,25px)!important}
body.eqr18 :is(.rs-player,.reader-toolbar,.readers-tools){border-top:3px solid var(--eqr-teal)!important}
body.eqr18 :is(.rs-section,.surah-list-section,.readers-list-section,.surah-link-grid){border-top:2px solid var(--eqr-gold)!important}
body.eqr18 :is(.rs-player,.rs-section,.reader-toolbar,.surah-list-section,.readers-list-section,.reader-related,.rv16-explore,.surah-link-grid,.launcher-card,.dash-panel) :is(h2,h3){color:var(--eqr-ink)!important;line-height:1.5}
body.eqr18 :is(.rs-section,.reader-related,.rv16-explore,.surah-link-grid) h2{font-size:clamp(1.05rem,2vw,1.35rem)!important;margin-top:0}
body.eqr18 :is(.rs-player,.rs-section,.reader-toolbar,.surah-list-section,.readers-list-section,.reader-related,.rv16-explore,.surah-link-grid,.launcher-card,.dash-grid>article,.dash-panel) p{color:var(--eqr-muted);line-height:1.9}
body.eqr18 :is(.rs-player,.rs-section) :is(input[type="range"],input[type="search"],select),
body.eqr18 :is(.reader-toolbar,.readers-tools,.rv16-surah-tools,.launcher-card) :is(input,select){accent-color:var(--eqr-teal);max-width:100%;min-width:0;color:var(--eqr-ink);background:var(--eqr-surface);border:1px solid var(--eqr-border)!important;border-radius:11px!important}
body.eqr18 :is(.rs-player,.reader-toolbar,.readers-tools,.rv16-surah-tools,.launcher-card) label{color:var(--eqr-ink)}
body.eqr18 .rs-player-head{gap:9px;align-items:center}
body.eqr18 .rs-main-controls{gap:10px!important;grid-template-columns:repeat(2,minmax(0,1fr)) 1.35fr repeat(2,minmax(0,1fr))!important}
body.eqr18 .rs-main-controls button{min-height:50px!important;border-radius:13px!important;font-size:.82rem!important;background:var(--eqr-tint)!important;color:var(--eqr-ink)!important;border:1px solid var(--eqr-border)!important}
body.eqr18 .rs-main-controls .rs-play{background:var(--eqr-forest)!important;color:#fff!important;border-color:var(--eqr-forest)!important;font-size:1rem!important}
body.eqr18 .rs-main-controls button:hover{filter:brightness(.94)}
body.eqr18 .rs-progress{align-items:center;gap:12px}
body.eqr18 .rs-progress input{accent-color:var(--eqr-teal)}
body.eqr18 .rs-control-grid{gap:10px!important}
body.eqr18 .rs-control-grid label{padding:11px!important;border:1px solid var(--eqr-border)!important;border-radius:12px;background:var(--eqr-tint)!important}
body.eqr18 :is(.rs-tools,.rs-mini-grid,.rs-surah-list){gap:9px!important}
body.eqr18 :is(.rs-tools a,.rs-mini-grid a,.rs-surah-link,.rs-prev-next a,.rv16-explore a,.surah-link-grid a){background:var(--eqr-tint)!important;color:var(--eqr-ink)!important;border:1px solid var(--eqr-border)!important;border-radius:12px!important;box-shadow:none!important;text-decoration:none!important;min-width:0;transition:background .15s,transform .15s}
body.eqr18 :is(.rs-tools a,.rs-mini-grid a,.rs-surah-link,.rs-prev-next a,.rv16-explore a,.surah-link-grid a):hover{background:var(--eqr-surface)!important;transform:translateY(-1px);border-color:var(--eqr-gold)!important}
body.eqr18 .rs-surah-link.is-current{border:2px solid var(--eqr-gold)!important;background:var(--eqr-surface)!important;font-weight:850}
body.eqr18 .rs-section-head>a{color:var(--eqr-ink)!important;background:var(--eqr-tint)!important;border:1px solid var(--eqr-border)!important}
body.eqr18 .rs-download{background:#edd39a!important;color:#24392d!important;border-color:#e9c879!important}
body.eqr18 :is(.rs-player button,.rs-section button,.reader-toolbar button,.reader-toolbar select,.reader-page-v15 button,.launcher-card button,.rv16-surah-tools button){min-height:42px;border-radius:11px!important}
body.eqr18 .rs-advanced-launcher,.eqr18 .rs-more{margin-top:14px}
body.eqr18 .rs-advanced-open{background:var(--eqr-tint)!important;border:1px solid var(--eqr-border)!important;color:var(--eqr-ink)!important;border-radius:14px!important}
body.eqr18 .rs-advanced-open :is(strong,small),body.eqr18 .rs-more summary{color:var(--eqr-ink)!important}
body.eqr18 .rs-more{border-color:var(--eqr-border);background:var(--eqr-surface)}
body.eqr18 .rs-hero .rs-image-note{color:#f0e9d7!important}
body.eqr18 .rs-about{margin-bottom:22px}
body.eqr18 .reader-hero-card .rs-old-reader-avatar{display:flex;justify-content:center;flex-direction:column}
body.eqr18 .reader-hero-card .rs-old-reader-avatar img{height:92px!important;width:92px!important;border-radius:25px!important}
body.eqr18 .readers-hero__aside{max-width:420px}
body.eqr18 .readers-stats{border-radius:13px!important}
/* Category pages have their own heading and search tools. */
body.eqr18 .surah-audio-page .readers-hero,body.eqr18 .surah-audio-index .readers-hero{min-height:0!important}
body.eqr18 .surah-audio-page .readers-hero :is(h1,p),body.eqr18 .surah-audio-index .readers-hero :is(h1,p){max-width:850px}
body.eqr18 .surah-audio-page .readers-list-section,.eqr18 .surah-audio-index .surah-link-grid{padding:clamp(14px,2vw,23px)!important}
body.eqr18 .surah-audio-page .readers-table-wrap{overflow-x:auto;max-width:100%}
body.eqr18 .surah-audio-page .readers-list-section .reader-listen-now{background:var(--eqr-forest)!important;color:#fff!important;border-radius:10px!important}
body.eqr18 .surah-audio-page .readers-list-section :is(table,td,th){color:var(--eqr-ink)}
body.eqr18 .surah-audio-index .surah-link-grid :is(ol,ul){gap:9px!important}
body.eqr18 .rv16-surah-tools{background:var(--eqr-surface)!important;padding:15px!important;border-radius:17px!important;border:1px solid var(--eqr-border)!important;margin-bottom:16px!important;box-shadow:var(--eqr-shadow)}
body.eqr18 .launcher-card form :is(label,select){max-width:100%}
body.eqr18 .dash-grid{gap:14px!important}
body.eqr18 .dash-grid>article{padding:17px!important;margin:0!important}
body.eqr18 .listening-dashboard .dash-grid>article :is(h2,h3){font-size:1.1rem;color:var(--eqr-ink)}
body.eqr18 .privacy-note{color:var(--eqr-muted)}
/* Landing: existing V17.1 semantic cards and searching preserved, new unified visual system. */
body.eqr18 .rd17-page .eqr18-nav{margin:0 0 18px}
body.eqr18 .rd17-page .rd17-hero{background:linear-gradient(125deg,#134b3f,#28745e)!important;border-radius:24px!important}
body.eqr18 .rd17-page .rd17-grid .rd17-reader{background:var(--eqr-surface)!important;border-color:var(--eqr-border)!important;box-shadow:var(--eqr-shadow)!important}
body.eqr18 .rd17-page .rd17-grid .rd17-reader:hover{border-color:var(--eqr-gold)!important}
/* Keyboard-first on-page jumping, kept lightweight and separate from existing audio JS. */
body.eqr18 .eqr18-jump{position:fixed;bottom:24px;inset-inline-start:18px;z-index:18;display:none;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--eqr-forest);color:#fff;border:1px solid var(--eqr-border);box-shadow:var(--eqr-shadow);cursor:pointer}
body.eqr18 .eqr18-jump[data-visible="true"]{display:grid}
body.eqr18 .eqr18-jump svg{width:19px;height:19px;stroke:currentColor;stroke-width:2;fill:none}
/* Clear accessible media styling, retains all existing player behaviour. */
body.eqr18 audio{max-width:100%}
body.eqr18 :is(.qap,.qap-sheet,.qap-mini){max-width:100vw;box-sizing:border-box}
body.eqr18 :is(.qap button,.qap select,.qap input){accent-color:var(--eqr-teal)}
body.eqr18 :is(.qap,.rs-advanced-player){z-index:1000}
/* Compact mobile: no side whites, no clipped controls, touch-first buttons. */
@media(max-width:920px){
  body.eqr18 .eqr18-nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:8px}
  body.eqr18 .eqr18-nav__brand{grid-column:1/-1;padding:3px 9px 7px;border-bottom:1px solid var(--eqr-border);margin-bottom:3px}
  body.eqr18 .eqr18-nav__item{padding:7px 3px;gap:5px;font-size:.79rem;min-height:43px}
  body.eqr18 .eqr18-context{display:grid;gap:11px}
  body.eqr18 .eqr18-context__actions{justify-content:flex-start}
  body.eqr18 .rs-hero{grid-template-columns:108px minmax(0,1fr)!important}
  body.eqr18 .rs-avatar{width:102px!important;height:102px!important;border-radius:19px!important}
}
@media(max-width:600px){
  body.eqr18 :is(.reader-page-v15,.surah-audio-page,.surah-audio-index,.listen-launcher,.listening-dashboard,.rd17-page),body.eqr18 .rs-page#content{width:calc(100% - 20px)!important;padding-top:8px!important}
  body.eqr18 .eqr18-nav{border-radius:15px;margin-bottom:11px!important}
  body.eqr18 .eqr18-nav__brand{font-size:.88rem}
  body.eqr18 .eqr18-nav__mark{height:34px;width:34px}
  body.eqr18 .eqr18-nav__item{font-size:.72rem;flex-direction:column;gap:1px;min-height:55px;white-space:normal;text-align:center}
  body.eqr18 .eqr18-nav svg{width:18px;height:18px}
  body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero){border-radius:18px!important;padding:17px 14px!important;margin-bottom:12px!important}
  body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) h1{font-size:1.4rem!important;line-height:1.48!important}
  body.eqr18 :is(.readers-hero,.reader-hero,.rs-hero) :is(.readers-intro,.reader-lead,.rs-lead){font-size:.84rem!important;line-height:1.8!important}
  body.eqr18 .rs-hero{grid-template-columns:1fr!important;gap:10px!important}
  body.eqr18 .rs-avatar-wrap{display:flex;align-items:center;gap:8px}
  body.eqr18 .rs-avatar{width:70px!important;height:70px!important;border-radius:16px!important}
  body.eqr18 .rs-image-note{font-size:.7rem!important}
  body.eqr18 .reader-hero-grid{grid-template-columns:1fr!important}
  body.eqr18 .reader-hero-card{display:none!important}
  body.eqr18 .eqr18-context{padding:13px;border-radius:13px}
  body.eqr18 .eqr18-context__title{font-size:.99rem}
  body.eqr18 .eqr18-context__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body.eqr18 .eqr18-context__actions>a{font-size:.7rem;text-align:center;white-space:normal;min-height:41px;padding:7px 5px}
  body.eqr18 :is(.rs-player,.rs-section,.reader-toolbar,.surah-list-section,.readers-list-section,.reader-related,.rv16-explore,.surah-link-grid,.launcher-card,.dash-grid>article,.dash-panel,.readers-tools){margin-bottom:12px!important;padding:12px!important;border-radius:15px!important}
  body.eqr18 .rs-main-controls{gap:5px!important;grid-template-columns:repeat(5,minmax(0,1fr))!important}
  body.eqr18 .rs-main-controls button{padding:6px 2px!important;min-height:45px!important;font-size:.68rem!important;word-break:normal}
  body.eqr18 .rs-main-controls .rs-play{font-size:.75rem!important}
  body.eqr18 .rs-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.eqr18 .rs-tools,body.eqr18 .rs-mini-grid,body.eqr18 .rs-surah-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.eqr18 .rs-prev-next{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.eqr18 .rs-prev-next a{font-size:.73rem!important;padding:9px!important}
  body.eqr18 .rs-download-row{display:flex;gap:8px;flex-wrap:wrap}
  body.eqr18 .eqr18-jump{inset-inline-start:9px;bottom:14px;width:40px;height:40px}
}
@media(max-width:360px){body.eqr18 .eqr18-nav__item{font-size:.65rem}body.eqr18 .rs-player-head h2{font-size:1.08rem}body.eqr18 .rs-progress{gap:5px}body.eqr18 .rs-control-grid label{padding:7px!important}}
@media(prefers-reduced-motion:reduce){body.eqr18 *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
