/* Tajweed Al Quran — Reader Studio v70
   Single responsive workspace: original Mushaf + sourced study rail + one player.
   This does not alter Academy live-class teacher/student permissions. */
.ap-android-reader{
 --ap-study-sidebar-width:310px;
 --ap-study-gap:18px;
 --ap-study-zoom:1;
 --ap-study-forest:#0b4838;
 --ap-study-gold:#d7b56b;
 --ap-study-paper:#fffdf7;
 display:block;
 min-width:0;
}
.ap-android-reader .ap-reader-head{
 background:linear-gradient(113deg,#0a4135,#11674c)!important;
 border:1px solid #d9c89b4d;
 padding:13px 20px!important;
 min-height:86px;
 border-radius:17px!important;
 box-shadow:0 5px 15px #0b4d3017!important;
}
.ap-android-reader .ap-reader-head strong{
 font-size:23px!important;line-height:1.2!important;
}
.ap-android-reader .ap-head-buttons{align-items:center;gap:7px!important}
.ap-android-reader .ap-reader-head .ap-btn{
 border-radius:10px!important;
 min-height:40px!important;
 font-size:12px!important;
 white-space:nowrap;
}
.ap-android-reader .ap-reader-head .ap-reader-back{
 background:#f8f0dc!important;color:#134b37!important;
 border-color:#f8e6bd!important;
}
.ap-android-reader .ap-reader-selectors{
 margin:11px 0!important;padding:10px 13px!important;
 border:1px solid #dce8da!important;
 border-radius:15px!important;
 box-shadow:0 3px 12px #173f2e08!important;
}
.ap-android-reader .ap-reader-selectors select{
 min-height:42px!important;border-radius:10px!important;
 background:#fbfcf8;
}
.ap-android-reader .ap-study-grid{
 display:grid;grid-template-columns:minmax(0,1fr) var(--ap-study-sidebar-width);
 gap:var(--ap-study-gap);align-items:start;min-width:0;
}
.ap-android-reader .ap-study-center{min-width:0}
.ap-android-reader .ap-reader-region{
 background:#f6f2e8!important;border:1px solid #e1d6b7!important;
 border-radius:15px!important;padding:10px!important;
 box-shadow:0 4px 22px #443b2511!important;
}
.ap-android-reader .ap-reader-region .tr-page{
 background:#fcf8ed!important;border:1px solid #e5dbbe!important;
 border-radius:11px!important;
 height:min(61dvh,660px)!important;
 min-height:360px!important;
 padding:12px!important;
 overflow:auto!important;
 scrollbar-gutter:stable;
 scrollbar-color:#b8c8b2 #f7f2e8;
}
.ap-android-reader .tr-original-vp{
 width:min(calc(100% * var(--ap-study-zoom)),calc(550px * var(--ap-study-zoom)))!important;
 max-width:none!important;
 margin-inline:auto;
}
.ap-android-reader .tr-indo-page{
 max-width:none!important;
 width:calc(100% * var(--ap-study-zoom))!important;
 margin-inline:auto;
}
.ap-android-reader .ap-page-arrows{max-width:none!important}
.ap-android-reader .ap-study-aside{
 min-width:0;box-sizing:border-box;
 position:sticky;top:101px;
 background:#fffefb;border:1px solid #dfdcca;border-radius:18px;
 box-shadow:0 8px 25px #183f2a12;
 display:flex;flex-direction:column;
 min-height:300px;max-height:calc(100dvh - 335px);
 overflow:hidden;color:#204d3d;
}
.ap-study-header{
 display:flex;justify-content:space-between;align-items:center;
 gap:10px;padding:18px 18px 13px;
 border-bottom:1px solid #e8ede2;
 background:linear-gradient(130deg,#f1f8ee,#fffdf7);
}
.ap-study-eyebrow{
 display:block;color:#b58e46;letter-spacing:1.6px;
 font-size:10px;font-weight:800;
}
.ap-study-header h2{
 font-size:17px;line-height:1.25;color:#164f3a;
 margin:5px 0 4px;font-weight:820;
}
.ap-study-header p{font-size:11px;color:#678273;margin:0}
.ap-study-dismiss{
 display:none;border:1px solid #d4e2d5;background:white;
 width:36px;height:36px;border-radius:10px;
 font-size:25px;line-height:1;color:#32614e;
}
.ap-study-tabs{
 padding:10px;
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:6px;background:#fff;
 border-bottom:1px solid #e9ede6;
}
.ap-study-tabs button{
 cursor:pointer;font:750 11px/1.2 inherit;
 font-weight:750;font-size:11px;
 color:#466856;border:1px solid #dce9df;background:#f8fbf7;
 border-radius:9px;min-height:39px;
 padding:6px 3px;
}
.ap-study-tabs button.is-active{
 color:#fff;background:#0b6f4e;border-color:#0b6f4e;
}
.ap-study-content{
 overflow:auto;overflow-wrap:anywhere;
 min-height:165px;
 padding:15px 17px;
 flex:1;scrollbar-color:#c2d2c4 #fafcf7;
}
.ap-study-citation{
 margin:0;border-top:1px solid #e7eee5;padding:10px 17px;
 color:#879587;font-size:10px;line-height:1.5;
 background:#fcfdf9;
}
.ap-translation-choice{display:flex;gap:6px;margin-bottom:12px}
.ap-translation-choice button{
 cursor:pointer;flex:1;border:1px solid #c8dece;background:#fff;
 color:#305b46;border-radius:10px;min-height:36px;font-weight:750;
}
.ap-translation-choice button.on{
 background:#e0f1e3;border-color:#58a477;color:#07503b;
}
.ap-study-verse-ref{
 color:#8d783e;text-transform:uppercase;letter-spacing:.08em;
 font-size:11px;font-weight:850;margin-bottom:11px;
}
.ap-study-text{font-size:13px;line-height:1.9;color:#234735}
.ap-study-text.is-rtl{
 font-family:"Noto Naskh Arabic","Noto Nastaliq Urdu",serif;
 font-size:17px;line-height:2.15;direction:rtl;text-align:right;
}
.ap-study-text p{white-space:pre-wrap;margin:0 0 14px}
.ap-study-text .ap-study-source{
 direction:ltr;text-align:left;font:11px/1.6 inherit;
 background:#f4f8f1;border:1px solid #dbe9d9;
 border-radius:9px;padding:10px;margin-top:14px;
}
.ap-study-source strong,.ap-study-source span,.ap-study-source a{display:block}
.ap-study-source a{color:#096f53;text-decoration:underline}
.ap-study-footnotes{
 font-size:12px;border-left:3px solid #ddc47f;
 padding:7px 10px;background:#fffaed;
 margin-top:10px;white-space:pre-wrap;
}
.ap-study-block-title{
 display:block;color:#0c654c;margin-bottom:7px;
 font-size:13px;
}
.ap-ibn-kathir-link{
 direction:ltr;display:block;text-align:center;font:750 12px/1.5 inherit;
 padding:10px;border:1px solid #d2b66a;background:#fff6dd;
 border-radius:10px;margin-top:13px;color:#5c4b1e;
}
.ap-study-validation{
 font-size:11px;padding:9px 10px;border-radius:10px;
 color:#8a602d;background:#fff4dd;
 border:1px solid #ead5b1;margin-bottom:12px;
}
.ap-study-validation.verified{
 color:#146145;background:#e5f7e9;border-color:#bcddc1;
}
.ap-study-words{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;
 gap:8px;line-height:2.2;margin:12px 0 15px;
}
.ap-study-word{
 font:21px/1.6 "Noto Naskh Arabic","Amiri",serif;
 color:#215543;background:#fffdf6;border:1px solid #e3d9bd;
 border-radius:10px;padding:4px 9px;min-height:43px;
}
.ap-study-word.current{
 background:#e8d394;border-color:#caac62;
 box-shadow:0 0 0 2px #f6e9bb;
}
.ap-study-word:disabled{opacity:.65;cursor:not-allowed}
.ap-study-muted{font-size:11px;color:#7a8c81;line-height:1.65;margin:10px 0}
.ap-study-switch{
 display:flex;align-items:center;justify-content:space-between;
 gap:10px;border-bottom:1px solid #e9eee9;
 padding:10px 0;color:#265942;
}
.ap-study-switch strong{font-size:12px;display:block}
.ap-study-switch small{display:block;color:#84948b;font-size:10px;margin-top:3px;line-height:1.45}
.ap-study-switch input{width:19px;height:19px;accent-color:#0b805b;flex:none}
.ap-study-control{display:grid;gap:8px;font-weight:780;color:#315a44;font-size:12px;margin-top:13px}
.ap-study-control select,.ap-study-control input{min-height:35px;accent-color:#0b805b}
.ap-study-control select{border:1px solid #d3e2d5;border-radius:9px;background:#fff;padding:8px}
.ap-study-control output{display:inline;color:#a77c2b;margin-left:8px}
.ap-study-reset{
 margin-top:14px;padding:9px 13px;background:#f5f8f4;
 border:1px solid #d4e3d7;color:#275842;
 border-radius:9px;font-weight:750;cursor:pointer;
}
.ap-study-content button:focus-visible,.ap-study-tabs button:focus-visible{
 outline:3px solid #e3bd61;outline-offset:1px;
}
@media(min-width:1280px){
 body:has(.ap-android-reader) .content{
  max-width:none!important;
  padding:22px 30px 235px!important;
 }
 .ap-android-reader .ap-bottom-player{
  position:fixed!important;
  z-index:65!important;
  left:292px!important;
  right:calc(var(--ap-study-sidebar-width) + 65px)!important;
  bottom:13px!important;
  width:auto!important;max-width:none!important;
  max-height:min(35dvh,320px)!important;overflow:auto!important;
  background:#fffefb!important;
  border:1px solid #bad7c2!important;
  border-top:3px solid #d6b26c!important;
  border-radius:17px!important;
  padding:11px 16px!important;
  box-shadow:0 7px 30px #0b3f2b35!important;
  gap:6px!important;
 }
 body.ap-quran-focus .ap-android-reader .ap-bottom-player{
  left:30px!important;
  right:calc(var(--ap-study-sidebar-width) + 65px)!important;
 }
 .ap-android-reader .ap-reader-region .tr-page{
  height:clamp(230px,calc(100dvh - 570px),480px)!important;
  min-height:230px!important;
 }
 body.ap-quran-focus .ap-android-reader .ap-reader-region .tr-page{
  height:clamp(260px,calc(100dvh - 480px),530px)!important;
 }
}
@media(min-width:1280px) and (max-width:1450px){
 .ap-android-reader{--ap-study-sidebar-width:280px;--ap-study-gap:14px}
 .ap-android-reader .ap-bottom-player{
  left:288px!important;
  right:calc(var(--ap-study-sidebar-width) + 44px)!important;
 }
}
@media(max-width:1279px){
 .ap-android-reader .ap-study-grid{
  display:block!important;
 }
 .ap-android-reader .ap-study-aside{
  position:fixed!important;
  z-index:88!important;
  top:80px!important;
  right:10px!important;
  bottom:85px!important;
  width:min(355px,calc(100vw - 20px))!important;
  height:auto!important;
  max-height:none!important;
  visibility:hidden;pointer-events:none;
  opacity:0;transform:translateX(105%);
  transition:transform .2s ease,opacity .2s ease;
  box-shadow:0 15px 55px #092c2145!important;
 }
 .ap-android-reader .ap-study-aside.is-open{
  visibility:visible;pointer-events:auto;opacity:1;transform:translateX(0);
 }
 .ap-study-dismiss{display:block}
 .ap-android-reader .ap-reader-region .tr-page{height:clamp(260px,calc(100dvh - 560px),570px)!important;min-height:260px!important}
 .ap-android-reader .ap-bottom-player{
  left:12px!important;right:12px!important;
  bottom:13px!important;max-width:none!important;
  width:auto!important;
 }
 body.ap-quran-focus .ap-android-reader .ap-bottom-player{
  left:12px!important;right:12px!important;
 }
}
@media(max-width:780px){
 .ap-android-reader .ap-reader-head{
  padding:11px 13px!important;
 }
 .ap-android-reader .ap-reader-head strong{font-size:22px!important}
 .ap-android-reader .ap-head-buttons{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
 .ap-android-reader .ap-reader-head .ap-btn{
  font-size:10px!important;min-width:0!important;
  white-space:normal!important;
 }
 .ap-android-reader .ap-reader-selectors{
  padding:10px!important;gap:8px!important;
 }
 .ap-android-reader .ap-study-aside{
  top:73px!important;bottom:calc(75px + env(safe-area-inset-bottom,0px))!important;
 }
 .ap-android-reader .ap-reader-region .tr-page{
  height:min(57dvh,540px)!important;min-height:315px!important;
  padding:6px!important;
 }
 .ap-android-reader .ap-bottom-player{
  position:fixed!important;
  bottom:calc(68px + env(safe-area-inset-bottom,0px))!important;
  max-height:min(42dvh,290px)!important;
  left:7px!important;right:7px!important;
 }
 body:has(.ap-android-reader) .content{
  padding-bottom:calc(280px + env(safe-area-inset-bottom,0px))!important;
 }
}
