/* Mushaf leaf design — palette from Global Books / Tafsir Books logos */
:root{
  --lapis:#23275f; --lapis-2:#3f418f; --lapis-3:#5457a8;
  --saffron:#f3c537; --leaf:#d6a624; --paper:#fbfaf7; --ink:#1b1c33; --mute:#6a6c86;
  --mist:#e8e7f1; --rule:#dcdae8; --rose:#e3343c;
  --ar:"Amiri","Geeza Pro",serif; --serif:"Literata",Georgia,serif; --ui:"Onest",system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:400 16px/1.55 var(--ui);padding-bottom:120px}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:focus-visible{outline:3px solid var(--saffron);outline-offset:3px;border-radius:8px}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}

/* ---------- leaf (hero) ---------- */
.leaf{position:relative;overflow:hidden;color:#fff;background:radial-gradient(120% 90% at 50% 0%,#2e3378 0%,var(--lapis) 55%,#1a1d4a 100%);
  border-bottom:6px double var(--leaf)}
.girih{position:absolute;inset:0;width:100%;height:100%;color:var(--saffron);opacity:.09}
.leaf-in{position:relative;max-width:980px;margin:0 auto;padding:30px 20px 34px;text-align:center}
.kicker{margin:0 0 18px;font:500 15px/1.3 var(--serif);color:#d9dbf5;letter-spacing:.01em}
.crown{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:26px}
.pub{display:flex;align-items:center;justify-content:center;width:96px;height:118px;background:var(--paper);border-radius:48px 48px 14px 14px;padding:12px 10px 10px;
  box-shadow:inset 0 0 0 2px var(--leaf),inset 0 0 0 5px var(--paper),inset 0 0 0 6px rgba(214,166,36,.55)}
.pub img{max-width:100%;max-height:100%;display:block}
.cartouche{position:relative;min-height:120px;display:grid;place-items:center}
.cartouche svg{position:absolute;inset:0;width:100%;height:100%}
.c-fill{fill:rgba(63,65,143,.55);stroke:var(--leaf);stroke-width:2}
.c-line{fill:none;stroke:var(--saffron);stroke-width:1;opacity:.75}
.c-dot{fill:var(--saffron)}
.cartouche h1{position:relative;margin:0;padding:10px 70px 18px;font:700 clamp(30px,5.4vw,58px)/1.35 var(--ar);color:var(--saffron);
  text-shadow:0 2px 0 rgba(0,0,0,.25)}
.cartouche h1.multi{font-size:clamp(22px,3.6vw,40px)}
.ayahs{margin:16px auto 0;max-width:62ch;font:500 17px/1.5 var(--serif);color:#eef0ff}
.juz{display:inline-block;margin-left:10px;padding:1px 10px;border:1px solid rgba(243,197,55,.55);border-radius:20px;font:500 13px/1.6 var(--ui);color:var(--saffron);vertical-align:2px}

.pager{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:22px}
.arrow{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;border:1.5px solid rgba(243,197,55,.6);transition:background .2s,transform .2s}
.arrow svg{width:22px;height:22px;fill:none;stroke:var(--saffron);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.arrow:hover{background:rgba(243,197,55,.14);transform:scale(1.05)}
.arrow.off{opacity:.25;pointer-events:none}
.star{position:relative;width:112px;height:112px;margin:0}
.star svg{position:absolute;inset:0;width:100%;height:100%}
.star rect{fill:var(--saffron);stroke:var(--leaf);stroke-width:1.5}
.star circle{fill:var(--lapis);stroke:var(--leaf);stroke-width:2}
.star label{position:absolute;inset:0;display:grid;place-items:center}
.star input{width:76px;background:transparent;border:0;text-align:center;color:#fff;font:600 28px/1 var(--serif);-moz-appearance:textfield;padding:0}
.star input::-webkit-inner-spin-button,.star input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.star input:focus{outline:none}
.star:focus-within circle{stroke:#fff}
.of{margin:8px 0 0;font-size:13px;color:#b9bbe0}
.jump select{margin-top:14px;max-width:100%;font:500 14px var(--ui);color:#fff;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.22);
  border-radius:24px;padding:9px 34px 9px 16px;appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f3c537' stroke-width='1.8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center}
.jump select option{color:var(--ink)}

/* ---------- body ---------- */
.body{max-width:1040px;margin:0 auto;padding:12px 20px 0}
section{margin-top:44px}
.head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-bottom:12px;margin-bottom:22px;border-bottom:1px solid var(--rule)}
.head h2{margin:0;font:600 26px/1.2 var(--serif);color:var(--lapis)}
.head p{margin:0;color:var(--mute);font-size:14px}

.qaris{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:34px 18px}
@media (max-width:900px){.qaris{grid-template-columns:repeat(4,minmax(0,1fr))}}
.qari{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:6px 4px;border-radius:16px}
.ring{--p:0;position:relative;width:118px;height:118px;border-radius:50%;padding:5px;
  background:conic-gradient(var(--saffron) calc(var(--p)*1turn),var(--rule) 0)}
.photo{display:block;width:100%;height:100%;border-radius:50%;overflow:hidden;border:4px solid var(--paper);background:var(--mist)}
.photo img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(.92)}
.mono{display:grid;place-items:center;width:100%;height:100%;font:700 46px/1 var(--serif);color:var(--saffron);
  background:radial-gradient(circle at 50% 35%,var(--lapis-2),var(--lapis))}
.pbtn{position:absolute;right:2px;bottom:4px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--lapis);
  box-shadow:0 0 0 3px var(--paper);transition:transform .2s,background .2s}
.pbtn svg,.lplay svg,.pp svg{width:18px;height:18px;fill:currentColor}
.pbtn{color:#fff}
.qari:hover .pbtn{transform:scale(1.08);background:var(--lapis-2)}
.qname{font:500 15px/1.3 var(--ui);max-width:16ch}
.i-pause{display:none}
.playing .i-play{display:none}.playing .i-pause{display:block}
.qari.active .pbtn{background:var(--leaf);color:var(--lapis)}
.qari.active .qname{color:var(--lapis);font-weight:600}

.langs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px}
.lang{display:flex;align-items:center;gap:16px;padding:14px 4px;border-bottom:1px solid var(--rule);text-align:left;border-radius:0}
.code{flex:none;width:38px;height:38px;border-radius:10px;display:grid;place-items:center;font:600 12px/1 var(--ui);letter-spacing:.04em;color:var(--lapis-2);background:var(--mist)}
.lname{flex:1;min-width:0;display:flex;flex-direction:column}
.lname b{font:600 16px/1.3 var(--ui)}
.lname small{color:var(--mute);font-size:13px}
.lplay{flex:none;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:var(--lapis-2);border:1.5px solid var(--rule);transition:.2s}
.lang:hover .lplay{border-color:var(--lapis-2);background:var(--lapis-2);color:#fff}
.lang.active .code{background:var(--saffron);color:var(--lapis)}
.lang.active .lplay{background:var(--lapis);border-color:var(--lapis);color:var(--saffron)}

.auto{display:inline-flex;align-items:center;gap:10px;margin-top:34px;color:var(--mute);font-size:15px;cursor:pointer}
.auto input{width:20px;height:20px;accent-color:var(--lapis-2)}

.foot{max-width:1040px;margin:56px auto 0;padding:26px 20px;border-top:6px double var(--rule);display:flex;align-items:center;gap:20px;color:var(--mute);font-size:14px}
.pubs{display:flex;gap:14px}
.pubs img{height:62px;width:auto}
.foot p{margin:0}

/* ---------- player ---------- */
.player{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);width:min(760px,calc(100% - 24px));display:flex;align-items:center;gap:14px;
  padding:10px 12px 10px 10px;border-radius:22px;background:var(--lapis);color:#fff;box-shadow:0 18px 40px rgba(23,26,74,.35),inset 0 0 0 1px rgba(243,197,55,.35)}
.pthumb{flex:none;width:48px;height:48px;border-radius:50%;overflow:hidden;background:var(--lapis-2);display:grid;place-items:center;font:600 13px var(--ui);color:var(--saffron);box-shadow:0 0 0 2px var(--leaf)}
.pthumb img{width:100%;height:100%;object-fit:cover}
.pmid{flex:1;min-width:0}
.ptop{display:flex;justify-content:space-between;gap:12px;font-size:14px;margin-bottom:6px}
.ptop b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ptop span{color:#c4c6ea;font-variant-numeric:tabular-nums;flex:none}
#seek{width:100%;accent-color:var(--saffron);margin:0;cursor:pointer}
.pp{flex:none;width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:var(--saffron);color:var(--lapis)}
.pp svg{width:22px;height:22px}

@media (max-width:700px){
  .leaf-in{padding:22px 14px 28px}
  .crown{gap:10px}
  .cartouche{min-height:92px}
  .cartouche h1{padding:6px 26px 12px;font-size:clamp(24px,7.4vw,34px)}
  .cartouche h1.multi{font-size:clamp(18px,5vw,24px);padding:10px 22px 14px}
  .pub{width:58px;height:72px;border-radius:29px 29px 10px 10px;padding:7px 6px 6px}
  .ayahs{font-size:15px}
  .body{padding:0 16px}
  .qaris{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 8px}
  .ring{width:92px;height:92px;padding:4px}
  .pbtn{width:34px;height:34px;right:-2px;bottom:0}
  .qname{font-size:13px}
  .langs{grid-template-columns:1fr}
  .head{flex-direction:column;gap:2px}
  .foot{flex-direction:column;text-align:center}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
/* ---------- compact header ---------- */
.leaf-in{padding:14px 20px 16px;max-width:1080px}
.kicker{margin:0 0 6px;font-size:13px}
.crown{gap:18px}
.pub{width:62px;height:76px;border-radius:31px 31px 10px 10px;padding:8px 7px 6px}
.cartouche{min-height:78px}
.cartouche h1{font-size:clamp(26px,3.8vw,42px);padding:4px 60px 10px;line-height:1.3}
.cartouche h1.multi{font-size:clamp(20px,2.8vw,30px)}
.bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;margin-top:10px}
.bar .ayahs{margin:0;text-align:left;font-size:15px;max-width:none}
.bar .pager{margin:0;gap:12px}
.bar .arrow{width:38px;height:38px}
.bar .arrow svg{width:18px;height:18px}
.bar .star{width:72px;height:72px}
.bar .star input{width:56px;font-size:20px}
.bar .jump{justify-self:end}
.bar .jump select{margin:0;padding:7px 32px 7px 14px;font-size:13px;max-width:260px}
.leaf{border-bottom-width:4px}
@media (max-width:700px){
  .leaf-in{padding:10px 12px 12px}
  .kicker{font-size:12px;margin-bottom:4px}
  .pub{width:48px;height:60px;border-radius:24px 24px 8px 8px;padding:6px 5px 5px}
  .cartouche{min-height:64px}
  .cartouche h1{font-size:clamp(22px,6.6vw,30px);padding:4px 22px 8px}
  .bar{grid-template-columns:1fr auto;gap:8px 10px;margin-top:8px}
  .bar .ayahs{grid-column:1/-1;text-align:center;font-size:13px}
  .bar .star{width:60px;height:60px}
  .bar .star input{font-size:17px;width:48px}
  .bar .arrow{width:34px;height:34px}
  .bar .pager{justify-self:start}
  .bar .jump select{max-width:180px}
}
.cartouche{min-height:84px}
.cartouche h1{padding:12px 60px 10px}
@media (max-width:700px){.cartouche{min-height:70px}.cartouche h1{padding:10px 22px 8px}.bar .star input{font-size:15px;width:44px}}
