/* Ayah Studio v52 — complete miniature Ayah examples and touch-first editor steps. */
/* Full four-word example (112:1), not truncated, condensed or ellipsised. */
#panel-style .v51-view-thumb{
  box-sizing:border-box;min-width:0;width:100%;height:auto;min-height:108px;
  overflow:visible;gap:5px;padding:8px 5px;justify-content:center
}
#panel-style .v51-view-choice{min-width:0;min-height:178px}
#panel-style .v51-thumb-arabic{
  box-sizing:border-box;display:block;max-width:100%;width:100%;min-width:0;
  font-family:"Amiri Quran","Amiri","Noto Naskh Arabic",serif;
  font-size:clamp(10px,1.35vw,14px);font-stretch:normal;font-weight:400;
  line-height:1.65;text-align:center;white-space:normal;overflow:visible;
  overflow-wrap:normal;word-break:normal;text-overflow:clip;direction:rtl;
  unicode-bidi:plaintext
}
#panel-style .v51-thumb-meaning{
  box-sizing:border-box;display:block;max-width:100%;width:100%;
  font-size:clamp(8px,1vw,10px);line-height:1.3;
  white-space:normal;word-break:normal;overflow-wrap:break-word;
  overflow:visible;-webkit-line-clamp:unset;line-clamp:unset;text-align:center
}
#panel-style .v51-view-thumb.v51-audio .v51-wave{flex:none;min-height:22px}
#panel-style .v51-view-thumb.v51-mushaf{border-width:3px}
@media(max-width:640px){
 #panel-style .v51-view-thumb{min-height:107px;height:auto;padding:6px 3px}
 #panel-style .v51-view-choice{min-height:171px}
 #panel-style .v51-thumb-arabic{font-size:11px;line-height:1.6}
 #panel-style .v51-thumb-meaning{font-size:9px}
}
@media(max-width:380px){
 #panel-style .v51-view-thumb{min-height:108px}
 #panel-style .v51-thumb-arabic{font-size:10px}
 #panel-style .v51-thumb-meaning{font-size:8px}
}
/* A horizontally scrollable, four-step navigation shows which step follows,
   while gestures on the active panel switch the actual editor step. */
.sidebar .tabs.v52-swipe-tabs{
 display:flex!important;grid-template-columns:none!important;align-items:stretch;
 gap:7px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
 scroll-snap-type:x proximity;scroll-padding-inline:12px;
 -webkit-overflow-scrolling:touch;scrollbar-width:thin;
 padding:9px 14px!important;touch-action:pan-x
}
.sidebar .tabs.v52-swipe-tabs>.tab{
 box-sizing:border-box;flex:0 0 auto;min-width:105px;max-width:150px;
 scroll-snap-align:center;padding:11px 12px;
 border-radius:9px;min-height:44px;white-space:nowrap
}
.sidebar .tabs.v52-swipe-tabs>.tab.active{outline:1px solid var(--gold,#d8b475);outline-offset:-1px}
.sidebar .v52-swipe-guide{
 display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;
 padding:9px 14px;margin:0;border-bottom:1px solid #2c4551;background:#0d2330;
 color:#b4c7c9;font-size:11px;line-height:1.45
}
.sidebar .v52-swipe-guide strong{color:var(--gold,#d8b475);font-size:12px;font-weight:800}
.sidebar .v52-swipe-guide p{margin:0;flex:1 1 150px;min-width:0}
.sidebar .v52-swipe-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.sidebar .v52-step-arrow{
 display:inline-grid;place-items:center;width:37px;height:36px;
 border-radius:8px;border:1px solid #4f6a76;
 background:#1a3642;color:#f5e0bc;font-size:17px;cursor:pointer
}
.sidebar .v52-step-arrow:hover:not(:disabled){background:#284854;border-color:var(--gold,#d8b475)}
.sidebar .v52-step-arrow:focus-visible,.sidebar .tabs.v52-swipe-tabs>.tab:focus-visible{
 outline:3px solid var(--gold,#d8b475);outline-offset:2px
}
.sidebar .v52-step-arrow:disabled{opacity:.38;cursor:not-allowed}
.sidebar .v52-progress{height:3px;background:#25404d;margin:0;position:relative;overflow:hidden}
.sidebar .v52-progress-fill{display:block;height:100%;width:25%;background:var(--gold,#d8b475);transition:width .2s ease}
.sidebar .sidebar-scroll.v52-swipe-surface{
 overscroll-behavior-x:contain;
 touch-action:pan-y;
}
.sidebar .v52-swipe-surface :is(input[type=range],video,audio,canvas,iframe,[data-no-swipe]){
 touch-action:auto;
}
body.ayah-resource-mode .v52-swipe-guide,
body.ayah-resource-mode .v52-progress{display:none!important}
@media(min-width:900px){
 .sidebar .tabs.v52-swipe-tabs>.tab{min-width:97px;max-width:140px}
 .sidebar .v52-swipe-guide p{font-size:11px}
}
@media(max-width:560px){
 .sidebar .tabs.v52-swipe-tabs{gap:6px;padding:8px 11px!important}
 .sidebar .tabs.v52-swipe-tabs>.tab{min-width:110px;padding:11px 9px}
 .sidebar .v52-swipe-guide{padding:8px 11px}
}
@media(prefers-reduced-motion:reduce){
 .sidebar .v52-progress-fill{transition:none}
 .sidebar .tabs.v52-swipe-tabs{scroll-behavior:auto}
}


/* v53 — fixed mobile step dock. Only visible if enabled in editor settings.
   Extra document space prevents the dock obscuring the last form controls. */
.v52-floating-dock{display:none}
@media(max-width:740px){
 body.v52-floating-steps-on:not(.ayah-resource-mode):not(.r48-open) .v52-floating-dock:not([hidden]){
  display:block!important;position:fixed;left:50%;bottom:0;z-index:85;
  width:min(100%,640px);transform:translateX(-50%);
  padding:7px 10px calc(8px + env(safe-area-inset-bottom,0px));
  background:#0c2530;border:1px solid #48606a;border-bottom:0;
  border-radius:14px 14px 0 0;box-shadow:0 -9px 32px #000a;
  color:#f7f3ed;
 }
 body.v52-floating-steps-on:not(.ayah-resource-mode) .app-shell{
  padding-bottom:calc(132px + env(safe-area-inset-bottom,0px));
 }
 body.v52-floating-steps-on:not(.ayah-resource-mode) .sidebar .v52-swipe-guide,
 body.v52-floating-steps-on:not(.ayah-resource-mode) .sidebar .v52-progress{
  display:none;
 }
 body.v52-floating-steps-on:not(.ayah-resource-mode) .a11y-bubble{
  bottom:calc(132px + env(safe-area-inset-bottom,0px));
 }
 body.v52-floating-steps-on:not(.ayah-resource-mode) .a11y-panel{
  bottom:calc(199px + env(safe-area-inset-bottom,0px));
  max-height:calc(100dvh - 219px - env(safe-area-inset-bottom,0px));
 }
 body.v52-floating-steps-on:not(.ayah-resource-mode) .toast-wrap{
  bottom:calc(129px + env(safe-area-inset-bottom,0px));
 }
 .v52-floating-top{display:flex;align-items:center;gap:6px;min-height:43px}
 .v52-floating-status{color:var(--gold,#d8b475);font-size:12px;font-weight:800;white-space:nowrap}
 .v52-floating-hint{flex:1;min-width:0;text-align:right;color:#abc1c5;font-size:10px;line-height:1.2}
 .v52-floating-arrow,.v52-floating-dismiss{
  display:grid;place-items:center;flex:none;min-width:43px;height:43px;
  background:#1a3946;color:#f7e2bd;border:1px solid #4f6872;
  border-radius:10px;font-size:20px;line-height:1;
  -webkit-tap-highlight-color:transparent
 }
 .v52-floating-dismiss{min-width:37px;width:37px;background:#142e3a;color:#bed0d2}
 .v52-floating-arrow:disabled{opacity:.35}
 .v52-floating-track{
  display:flex;gap:6px;align-items:center;overflow-x:auto;overflow-y:hidden;
  padding:4px 1px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;touch-action:pan-x;scroll-snap-type:x proximity
 }
 .v52-floating-track::-webkit-scrollbar{display:none}
 .v52-floating-chip{
  box-sizing:border-box;flex:0 0 auto;min-width:92px;min-height:43px;
  padding:8px 10px;white-space:nowrap;font-size:11px;font-weight:700;
  color:#bad0d4;background:#152e39;border:1px solid #385460;
  border-radius:9px;scroll-snap-align:center
 }
 .v52-floating-chip.active{
  color:#162630;background:var(--gold,#d8b475);
  border-color:var(--gold,#d8b475)
 }
 .v52-floating-progress{height:3px;background:#25404d;border-radius:4px;overflow:hidden}
 .v52-floating-progress>span{
  display:block;height:100%;width:25%;background:var(--gold,#d8b475);
  transition:width .2s ease
 }
 .v52-floating-dock :is(button):focus-visible{
  outline:3px solid var(--gold,#d8b475);outline-offset:2px
 }
}
@media(max-width:390px){
 .v52-floating-hint{display:none}
 .v52-floating-status{margin-right:auto}
}
@media(prefers-reduced-motion:reduce){
 .v52-floating-progress>span{transition:none}
 .v52-floating-track{scroll-behavior:auto}
}


/* v54 — compact step names and unclipped five-column navigation. */
.sidebar .tabs.v52-swipe-tabs{
 display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 gap:5px!important;overflow:visible!important;scroll-snap-type:none!important;
 padding:8px 10px!important;touch-action:pan-y;
}
.sidebar .tabs.v52-swipe-tabs>.tab{
 min-width:0!important;max-width:none!important;width:100%;
 min-height:48px!important;flex-direction:row;justify-content:center;
 padding:9px 3px!important;border-radius:10px;gap:0;
 font-size:clamp(10px,2.6vw,12px);line-height:1.25;
 white-space:nowrap;overflow:visible;text-overflow:clip;
}
.sidebar .tabs.v52-swipe-tabs>.tab.active{background:#223b43;color:var(--gold,#d8b475)}
.v54-top-current{display:none}
@media(max-width:740px){
 .sidebar .v54-top-current{
  display:block;padding:10px 15px 0;margin:0;
  color:var(--gold,#d8b475);font-weight:800;font-size:14px;line-height:1.4;
 }
 .sidebar .tabs.v52-swipe-tabs{gap:4px!important;padding:7px 8px!important}
 body.v52-floating-steps-on:not(.ayah-resource-mode):not(.r48-open) .v52-floating-track{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;overflow:visible!important;scroll-snap-type:none!important;
  padding:3px 0 7px;mask-image:none!important;-webkit-mask-image:none!important;
 }
 body.v52-floating-steps-on:not(.ayah-resource-mode):not(.r48-open) .v52-floating-chip{
  flex:none;min-width:0!important;width:100%;max-width:none;
  display:flex;align-items:center;justify-content:center;
  padding:7px 2px;min-height:43px;font-size:clamp(9px,2.65vw,12px);
  white-space:nowrap;overflow:visible!important;text-overflow:clip!important;
  letter-spacing:-.08px;line-height:1.2;
 }
 .v52-floating-hint{font-size:10px}
}
@media(max-width:360px){
 .sidebar .tabs.v52-swipe-tabs>.tab{font-size:10px}
 body.v52-floating-steps-on:not(.ayah-resource-mode):not(.r48-open) .v52-floating-chip{
  font-size:9px;padding-inline:0;
 }
}

/* v54 — caption content choices now belong INSIDE Visual layouts. */
#panel-style .ev49-group .v54-layout-content{
 min-width:0;margin:15px 0 1px;padding:13px 10px;
 border:1px solid #46616b;border-radius:10px;background:#0e2530;
}
#panel-style .v54-layout-content>.ev49-grid{min-width:0}
#panel-style .v54-word-example{
 box-sizing:border-box;grid-column:1 / -1;min-width:0;margin:3px 0 0;
 border:1px solid #57717b;border-radius:10px;padding:12px 10px;
 background:linear-gradient(135deg,#09232d,#1b3b45);
 overflow:hidden;text-align:center;
}
#panel-style .v54-word-example figcaption{
 color:#ebd5a5;font-size:12px;font-weight:800;margin:0 0 8px;
}
#panel-style .v54-word-line{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
 column-gap:5px;row-gap:8px;direction:rtl;margin:3px auto 10px;
 line-height:1.8;font-family:"Amiri Quran","Amiri","Noto Naskh Arabic",serif;
}
#panel-style .v54-demo-word{
 display:inline-flex;align-items:center;justify-content:center;
 border-radius:7px;padding:3px 6px;color:#dce8e7;
 background:transparent;font-size:clamp(18px,4.5vw,24px);
 animation:v54-word-focus 7.2s steps(1,end) infinite;
}
#panel-style .v54-demo-word:nth-child(1){animation-delay:0s}
#panel-style .v54-demo-word:nth-child(2){animation-delay:-5.4s}
#panel-style .v54-demo-word:nth-child(3){animation-delay:-3.6s}
#panel-style .v54-demo-word:nth-child(4){animation-delay:-1.8s}
#panel-style .v54-word-example small{
 display:block;color:#c5d7d8!important;line-height:1.55;font-size:10px;
}
@keyframes v54-word-focus{
 0%,24.9%{background:#e1bc7a;color:#102832;box-shadow:0 0 0 1px #e1bc7a66}
 25%,100%{background:transparent;color:#dce8e7;box-shadow:none}
}
@media(prefers-reduced-motion:reduce){
 #panel-style .v54-demo-word{animation:none}
 #panel-style .v54-demo-word:first-child{background:#e1bc7a;color:#102832}
}

/* Optional subtitle download: keep a single accessible disclosure. */
#panel-export .ayah-subtitle-download{border:1px solid #59707c;border-radius:12px;margin:14px 0;padding:0 14px}
#panel-export .ayah-subtitle-download summary{min-height:44px;padding:12px 0;cursor:pointer;font-weight:700;line-height:1.4}
#panel-export .ayah-subtitle-body{min-width:0;padding:0 0 12px}
#panel-export .ayah-subtitle-body #srtChoices{margin:4px 0 12px;min-width:0}
#panel-export .ayah-subtitle-body #exportSrt{min-height:44px;white-space:normal}
#panel-export .ayah-subtitle-body .export-card{flex-wrap:wrap;margin-bottom:0}


/* Ayah Studio v55 — one Visual layouts editor with responsive animated examples. */
.v55-hide{display:none!important}
#panel-style .v54-layout-content{
 margin-top:14px;padding:14px 10px 12px;
 background:#0d2732;border-color:#3a5863;
}
#panel-style .v55-caption-lead{
 font-size:12px;line-height:1.5;color:#e6d1a1;margin:0 0 12px;font-weight:700
}
#panel-style .v54-layout-content>.ev49-grid{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px
}
#panel-style .v55-preview-choice{
 box-sizing:border-box;min-width:0;align-items:center;
 display:grid!important;grid-template-columns:21px minmax(0,1fr);
 column-gap:7px;row-gap:7px;align-content:start;
 padding:11px 9px!important;
 background:#15303c;border-radius:12px;
 color:#eef4f0;font-size:12px;line-height:1.35;
 cursor:pointer;min-height:138px
}
#panel-style .v55-preview-choice input{
 position:static!important;grid-column:1;grid-row:1;
 width:18px;height:18px;margin:0;min-height:0;align-self:center
}
#panel-style .v55-mini-demo{
 box-sizing:border-box;grid-column:1 / -1;grid-row:2;
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:3px;min-width:0;width:100%;min-height:84px;
 padding:7px 4px;border:1px solid #496773;border-radius:9px;
 background:linear-gradient(125deg,#071e2a,#1d3e4a);overflow:hidden;
 text-align:center;pointer-events:none
}
#panel-style .v55-demo-line{
 box-sizing:border-box;display:block;max-width:100%;min-width:0;
 white-space:normal;overflow-wrap:break-word;line-height:1.7;
 font-size:clamp(10px,2.9vw,15px);color:#f3e1b8;
 animation:v55-reveal 3.8s ease-in-out infinite
}
#panel-style .v55-mini-arabic .v55-demo-line,
#panel-style .v55-mini-tajweed .v55-demo-words,
#panel-style .v55-mini-follow .v55-demo-words{
 font-family:"Amiri Quran","Amiri","Noto Naskh Arabic",serif;
 font-size:clamp(14px,3.6vw,19px);line-height:1.7
}
#panel-style .v55-mini-meaning .v55-demo-line{
 font-size:clamp(10px,2.7vw,13px);color:#eef0e9;animation:v55-meaning 5s ease-in-out infinite
}
#panel-style .v55-mini-translit .v55-demo-line{
 font-size:clamp(10px,2.6vw,13px);font-style:italic;animation:v55-translit 4.6s ease-in-out infinite
}
#panel-style .v55-mini-demo .v55-demo-label{
 color:#b3cdd1!important;font-size:9px;line-height:1.4;
 display:block;text-align:center;font-weight:500
}
#panel-style .v55-demo-words{
 min-width:0;max-width:100%;display:flex;flex-wrap:wrap;
 align-items:center;justify-content:center;gap:2px;direction:rtl
}
#panel-style .v55-demo-word{
 display:inline-flex;align-items:center;justify-content:center;
 padding:2px 4px;border-radius:5px;
 font-size:inherit;color:#e6e5d9;white-space:nowrap;
 animation:v55-current-word 6s steps(1,end) infinite;
 animation-delay:calc(var(--word-index)*-4.5s)
}
#panel-style .v55-mini-tajweed .v55-demo-word{
 animation:v55-colour-sample 6s ease-in-out infinite;
 animation-delay:calc(var(--word-index)*-.75s)
}
#panel-style .v55-preview-choice:not(:has(input:checked)) .v55-mini-demo{
 filter:saturate(.68);opacity:.8
}
#panel-style .v55-demo-disclaimer{
 grid-column:1 / -1;color:#abc5c6;font-size:11px;line-height:1.6;
 padding:7px 3px;margin:0!important
}
#panel-style .v55-extra-display{
 margin:12px 0 3px;border:1px solid #3a5965;border-radius:9px;
 background:#142e3a;padding:0 11px
}
#panel-style .v55-extra-display>summary{
 font-size:12px;line-height:1.4;font-weight:750;color:#ecd39f;
 padding:13px 2px;cursor:pointer
}
#panel-style .v55-extra-content{padding-bottom:12px}
#panel-style .v55-extra-content .field{margin-top:12px}
#panel-style .v55-reader-inline{
 padding:8px 0 0;margin-top:17px;border-top:1px solid #31515c
}
#panel-style .v55-reader-inline-title{
 color:var(--gold,#d8b475);font-size:15px;line-height:1.4;margin:7px 0 12px
}
#panel-style .v55-reader-inline .ev49-group{
 margin:0;padding:13px 0;border-top:1px solid #284852;
}
#panel-style .v55-reader-inline .ev49-group>h3{
 color:#ebd39f!important;text-transform:none;letter-spacing:0;
 font-size:13px;margin-bottom:12px
}
#panel-style .v55-script-preferences{
 margin-top:10px
}
#panel-export .v55-watch-entry{
 margin:14px 0!important;display:flex;align-items:center;justify-content:space-between;
 gap:10px;flex-wrap:wrap;border:1px solid #526e72;border-radius:12px;
 background:#142f3b;padding:14px
}
#panel-export .v55-watch-entry>div{min-width:0;flex:1 1 175px}
#panel-export .v55-watch-entry strong{display:block;font-size:13px;color:#f4dfb6;margin-bottom:6px}
#panel-export .v55-watch-entry small{display:block;font-size:11px;line-height:1.5;color:#bed1d2}
#panel-export .v55-watch-entry button{min-height:44px}
#panel-export .v55-export-length{max-width:100%;margin:14px 0}
#panel-media .v55-youtube-notice{margin:16px 0!important;line-height:1.6}
@keyframes v55-reveal{
 0%,10%{opacity:.28;transform:translateY(4px)}
 22%,73%{opacity:1;transform:translateY(0)}
 88%,100%{opacity:.32}
}
@keyframes v55-meaning{
 0%,17%{opacity:.25;transform:translateY(4px)}
 27%,76%{opacity:1;transform:translateY(0)}
 90%,100%{opacity:.25}
}
@keyframes v55-translit{
 0%,10%{opacity:.23}
 25%,79%{opacity:1}
 100%{opacity:.23}
}
@keyframes v55-current-word{
 0%,24.9%{background:#dfbb78;color:#092631}
 25%,100%{background:transparent;color:#e6e5d9}
}
@keyframes v55-colour-sample{
 0%,15%{color:#b9e8ba;text-shadow:0 0 5px #5dd99655}
 27%,47%{color:#eed5ab;text-shadow:none}
 57%,73%{color:#e2b9e3;text-shadow:0 0 5px #d48dc344}
 83%,100%{color:#e6e5d9;text-shadow:none}
}
@media(max-width:700px){
 #panel-style .v54-layout-content>.ev49-grid{grid-template-columns:1fr}
 #panel-style .v55-preview-choice{min-height:113px}
 #panel-style .v55-mini-demo{min-height:67px}
 #panel-style .v55-demo-line{font-size:14px}
 #panel-style .v55-mini-arabic .v55-demo-line,
 #panel-style .v55-mini-follow .v55-demo-words,
 #panel-style .v55-mini-tajweed .v55-demo-words{font-size:19px}
}
@media(prefers-reduced-motion:reduce){
 #panel-style .v55-mini-demo :is(.v55-demo-line,.v55-demo-word){
  animation:none!important;transform:none!important;opacity:1!important
 }
 #panel-style .v55-mini-follow .v55-demo-word:first-child{
  color:#102532!important;background:#dfbb78!important
 }
}


/* v56 — remove retired controls, while retaining their state for the renderer. */
#panel-style #ev49-tafsir{display:none!important}
#finalPreviewSection .final-burn-in,
#finalPreviewSection .finish-canvas-wrap{display:none!important}
#panel-export .v56-image-card{
 display:flex;align-items:center;justify-content:space-between;gap:14px;
 flex-wrap:wrap;border:1px solid #476572;background:#13303b;
 border-radius:13px;padding:16px 14px;margin:14px 0 18px
}
#panel-export .v56-image-copy{
 min-width:180px;flex:1 1 210px;display:flex;flex-direction:column;gap:6px
}
#panel-export .v56-image-copy strong{font-size:13px;color:#f3e0bb;line-height:1.4}
#panel-export .v56-image-copy small{font-size:11px;color:#b9cdd3;line-height:1.55}
#panel-export .v56-image-card button{min-height:44px;flex:0 0 auto}
.v56-frame-dialog{
 color:#f2f0e9;font:inherit;position:fixed;inset:0;
 width:min(620px,calc(100vw - 22px));max-width:620px;
 max-height:calc(100dvh - 24px);margin:auto;padding:0;
 border:1px solid #68808a;border-radius:16px;
 background:#0e2731;box-shadow:0 22px 80px #000a;
 overflow:auto;z-index:1200;overscroll-behavior:contain
}
.v56-frame-dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}
.v56-frame-sheet{padding:17px 16px 19px}
.v56-frame-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:0 0 14px}
.v56-frame-head h2{font-size:19px;line-height:1.3;color:#f5dab1;margin:0 0 7px}
.v56-frame-head p{font-size:12px;line-height:1.55;color:#b8ced1;max-width:460px}
#v56-frame-close{flex:none;width:43px;height:43px;border:1px solid #57717b;border-radius:9px;background:#1c3a45;color:#f5e6d6;font-size:24px}
.v56-frame-canvas-wrap{
 display:flex;align-items:center;justify-content:center;
 margin:0 auto 12px;width:100%;min-height:155px;
 padding:10px;background:#071b25;border:1px solid #395560;border-radius:12px;
 overflow:hidden
}
#v56-frame-canvas{
 display:block;width:auto;max-width:100%;
 height:auto;max-height:min(47dvh,420px);object-fit:contain;
 box-shadow:0 5px 18px #0008;border:1px solid #40515c
}
.v56-frame-times{display:flex;align-items:center;justify-content:space-between;
 color:#e9d19d;font-size:12px;font-variant-numeric:tabular-nums;margin:3px 1px 9px}
.v56-frame-slider-label{display:block;color:#dce6e3;font-size:12px;font-weight:750;margin-bottom:12px}
#v56-frame-slider{display:block;width:100%;height:26px;margin:0 0 8px;touch-action:pan-x}
#v56-frame-slider::-webkit-slider-thumb{width:21px;height:21px;box-shadow:0 0 0 4px #e0bc7970}
.v56-frame-nudges{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:9px 0 13px}
.v56-frame-nudges button{
 min-height:43px;padding:9px 10px;border:1px solid #47646e;
 background:#1c3b47;color:#e0eae7;font-size:12px;
 font-weight:750;border-radius:10px
}
.v56-frame-caption{
 padding:10px 11px;border:1px solid #3f5f67;border-radius:8px;
 background:#16343d;color:#e0d7b9;line-height:1.5;
 font-size:11px;min-height:39px;margin:0 0 8px
}
.v56-frame-note{color:#b0c4c8;font-size:10.5px;line-height:1.5;margin:0 0 14px}
.v56-frame-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.v56-frame-actions .btn{min-height:44px}
.v56-frame-dialog :is(button,input):focus-visible{outline:3px solid #e6be7a;outline-offset:2px}
@media(max-width:740px){
 .v56-frame-dialog{
  width:calc(100vw - 14px);max-height:calc(100dvh - 18px);
  border-radius:14px
 }
 .v56-frame-sheet{padding:13px 12px 16px}
 .v56-frame-head h2{font-size:17px}
 #v56-frame-canvas{max-height:37dvh}
 .v56-frame-actions{display:grid;grid-template-columns:1fr 1fr}
 .v56-frame-actions .btn{width:100%;white-space:normal}
 #panel-export .v56-image-card button{width:100%}
}
@media(prefers-reduced-motion:reduce){
 .v56-frame-dialog{scroll-behavior:auto}
}


/* v57 — Design follows format → visual layers → font/text → placement → background. */
#panel-style>.section-heading:first-child{margin:12px 0 11px}
#panel-style>.section-heading h2{font-size:18px;color:var(--gold,#d8b475)}
#panel-style>#aspectPicker{margin-bottom:24px}
#panel-style>#ev49-shell{margin-top:0!important}
#panel-style>#ev49-shell>summary h2{font-size:19px}
#panel-style .v54-layout-content.v57-inline-inclusions{
 border:0!important;border-top:1px solid #36525e!important;
 border-radius:0!important;background:transparent!important;
 margin:16px 0 9px!important;padding:15px 0 0!important;
 box-shadow:none!important
}
#panel-style .v57-inline-inclusions .v55-caption-lead{
 color:#f1dcb7;font-size:14px;font-weight:800;margin:0 0 12px
}
#panel-style .v57-inline-inclusions>.ev49-grid{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px
}
#panel-style .v57-inline-inclusions .v55-preview-choice{
 min-width:0;border:1px solid #496875
}
#panel-style .v51-view-choice{
 box-sizing:border-box;min-height:206px!important;
 display:flex;flex-direction:column;align-items:stretch
}
#panel-style .v51-view-thumb.v57-layer-preview{
 display:flex;flex-direction:column;justify-content:center;align-items:center;
 box-sizing:border-box;width:100%;height:auto!important;min-height:130px;
 max-height:none;overflow:visible;gap:3px;padding:7px 5px;
}
#panel-style .v57-layer-preview [hidden]{display:none!important}
#panel-style .v57-layer-preview .v51-thumb-arabic{
 display:block;direction:rtl;unicode-bidi:plaintext;
 font-family:"Amiri Quran","Amiri","Noto Naskh Arabic",serif;
 font-size:clamp(10px,1.25vw,13px);
 font-weight:500;line-height:1.7;white-space:normal;
 text-align:center;word-break:normal;overflow-wrap:normal;overflow:visible
}
#panel-style .v57-ayah-word{
 display:inline-block;white-space:nowrap;margin:0 2px;
 padding:1px 2px;border-radius:3px
}
#panel-style .v57-thumb-translit{
 display:block;max-width:100%;width:100%;min-width:0;
 font-style:italic;text-align:center;color:#eedac0;
 font-size:clamp(8px,1vw,10px);line-height:1.45;
 white-space:normal;overflow-wrap:break-word
}
#panel-style .v51-view-thumb.v51-mushaf .v57-thumb-translit{color:#594c31}
#panel-style .v51-view-thumb.v57-layer-preview .v51-thumb-meaning{
 display:block;max-width:100%;width:100%;
 font-size:clamp(8px,1vw,10px);line-height:1.35;
 white-space:normal;overflow-wrap:break-word;overflow:visible;text-align:center
}
#panel-style .v57-layer-preview .v57-no-text{display:none}
#panel-style .v57-layer-preview.v57-no-layers .v57-no-text{
 display:block;font-size:10px;text-align:center;line-height:1.4;
 color:#e2cfad;font-weight:700;max-width:100%
}
#panel-style .v51-mushaf.v57-no-layers .v57-no-text{color:#483923}
#panel-style .v57-included{
 display:block;max-width:100%;width:100%;text-align:left;
 color:#d2ddda;font-size:10px;line-height:1.45;
 padding:3px 2px;overflow-wrap:break-word
}
#panel-style .v51-view-choice:has(input:checked) .v57-included{color:#f0ddb7}
#panel-style .v57-follow-highlight{
 animation:v57-word-focus 6s steps(1,end) infinite;
 animation-delay:calc(var(--v57-index) * -1.5s)
}
#panel-style .v57-tajweed-sample:nth-child(4n+1){color:#529fd1}
#panel-style .v57-tajweed-sample:nth-child(4n+2){color:#6bad6a}
#panel-style .v57-tajweed-sample:nth-child(4n+3){color:#d9879c}
#panel-style .v57-tajweed-sample:nth-child(4n){color:#c7a243}
@keyframes v57-word-focus{
 0%,24.9%{background:#e4bc73;box-shadow:0 0 0 1px #e4bc7388;color:#17303c}
 25%,100%{background:transparent;box-shadow:none;color:inherit}
}
#panel-style .v57-design-section{
 margin:20px 0 0;padding:16px 14px;
 border:1px solid #3b5965;border-radius:13px;
 background:#0b2430
}
#panel-style .v57-design-section>.section-heading{margin-bottom:15px}
#panel-style .v57-design-section>.section-heading h2{
 color:var(--gold,#d8b475);font-size:17px;line-height:1.3
}
#panel-style .v57-design-section>.section-heading p{
 color:#b3c9cb;font-size:12px;line-height:1.55
}
#panel-style .v57-design-section>.field-row{
 margin:9px 0;min-width:0
}
#panel-style .v57-design-section>.field{
 margin:12px 0 16px;min-width:0
}
#panel-style .v57-design-section .field .input,
#panel-style .v57-design-section .field select{max-width:100%}
#panel-style .v57-latin-font{
 margin:12px 0 15px;
 padding:12px;border:1px solid #37515d;border-radius:9px;
 background:#112b36
}
#panel-style .v57-typography-preview{
 margin:12px 0;min-width:0
}
#panel-style .v57-design-section .helper{
 font-size:11px;color:#b1c9c9;line-height:1.5;margin:8px 0 13px
}
#panel-style>#resetStyle{
 display:flex;width:100%;margin:18px 0 10px
}
@media(max-width:740px){
 #panel-style .v57-inline-inclusions>.ev49-grid{grid-template-columns:1fr;gap:9px}
 #panel-style .v57-inline-inclusions .v55-preview-choice{
  grid-template-columns:21px minmax(0,1fr);min-height:103px
 }
 #panel-style .v51-view-thumb.v57-layer-preview{min-height:128px}
 #panel-style .v51-view-choice{min-height:208px!important}
 #panel-style .v57-layer-preview .v51-thumb-arabic{font-size:11px}
 #panel-style .v57-thumb-translit{font-size:9px}
 #panel-style .v51-view-thumb.v57-layer-preview .v51-thumb-meaning{font-size:9px}
 #panel-style .v57-design-section{padding:14px 11px}
}
@media(max-width:370px){
 #panel-style .v51-view-choice{min-height:212px!important}
 #panel-style .v57-layer-preview .v51-thumb-arabic{font-size:10px}
 #panel-style .v57-thumb-translit{font-size:8.5px}
 #panel-style .v51-view-thumb.v57-layer-preview .v51-thumb-meaning{font-size:8.5px}
}
@media(prefers-reduced-motion:reduce){
 #panel-style .v57-follow-highlight{animation:none!important}
 #panel-style .v57-follow-highlight:first-child{
  background:#e4bc73;color:#17303c
 }
}


/* v75 — Restore the standalone Qur'an reader and browse interface.
   Only the legacy duplicate verse-library destination remains retired. */
.app-destinations [data-destination="verses"],
[data-open-destination="verses"],
#panel-verses,
#panel-captions .library-shortcut{
 display:none!important;
}


/* v59: the layout chooser stays pinned only while the inclusion choices
   are scrolling. The explanation marks the end of its containing block. */
#panel-style .v59-presentation-region{
 position:relative;
 overflow:visible;
 min-width:0;
}
#panel-style .v59-presentation-sticky{
 position:sticky;
 top:8px;
 z-index:25;
 min-width:0;
 padding:12px 0 13px;
 background:#0b1c27;
 border-bottom:1px solid #3c5762;
 box-shadow:0 8px 18px rgba(4,18,27,.50);
}
#panel-style .v59-presentation-sticky>h3{
 color:var(--gold,#d8b475)!important;
 margin:0 0 14px;
}
#panel-style .v59-presentation-sticky .v51-choice-grid{
 margin:0;
}
#panel-style .v59-presentation-region>.v57-inline-inclusions{
 margin-top:14px!important;
}
#panel-style .v59-presentation-region>.v59-sticky-end{
 display:block;
 clear:both;
 margin:16px 0 18px;
 border-left:3px solid #d6b478;
 padding:12px 13px;
 line-height:1.6;
}
@media(max-width:740px){
 #panel-style .v59-presentation-sticky{
  top:0;
  padding:10px 0 12px;
  box-shadow:0 9px 17px rgba(3,17,24,.78);
 }
 #panel-style .v59-presentation-sticky>h3{
  margin-bottom:10px;
  font-size:12px;
  letter-spacing:.07em;
 }
 #panel-style .v59-presentation-region>.v59-sticky-end{
  margin-bottom:16px;
 }
}
@media(max-height:490px){
 /* On very short screens, prioritise access to the inclusion checkboxes. */
 #panel-style .v59-presentation-sticky{position:static;box-shadow:none}
}


/* v61 — keep Mushaf font preview strictly Arabic-only; retain dormant inputs. */
#panel-style #ev49-preview-translation,
#panel-style #ev49-script-status,
#panel-style .ev49-group .v55-script-preferences,
#panel-style .ev49-group .ev49-controls:has(#ev49-script){
 display:none!important;
}


/* v62 — caption position has been retired. Its settings remain in the DOM
   solely for compatibility with saved edits and the video rendering engine. */
#panel-style .v57-position{display:none!important}
#panel-style #typeSizePreview .type-size-actions .btn{
 min-height:44px;
 touch-action:manipulation;
 cursor:pointer;
 font-weight:750;
}
#panel-style #typeSizePreview .type-size-actions{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:9px;
}
#panel-style #typeSizePreview .type-size-actions .btn:focus-visible{
 outline:3px solid var(--gold,#d8b475);
 outline-offset:2px;
}


/* v63 — simplify recognition controls, but preserve their inputs for AI. */
#panel-captions .recognition-card .word-guide,
#panel-captions .recognition-card .follow-toggle,
#panel-captions .v63-hidden{display:none!important}
#panel-captions .v63-result-before-offline:not(.hidden){
 margin:16px 0 17px;
 padding:16px 13px;
 border:1px solid #d3af70;
 border-radius:12px;
 background:#1c3842;
 box-shadow:0 6px 22px rgba(0,0,0,.14);
}
#panel-captions .v63-result-before-offline:not(.hidden)>strong{
 display:block;margin-bottom:13px;
 color:#f0d59f;font-size:15px;line-height:1.55;
}

/* v63 — watch the original video directly, with transparent DOM captions. */
#v63WatchDialog{
 box-sizing:border-box;position:fixed;inset:0;margin:auto;
 width:min(980px,calc(100vw - 14px));max-width:980px;
 height:min(95dvh,1000px);max-height:95dvh;
 padding:0;border:1px solid #cfad75;border-radius:16px;
 color:#f3eee3;background:#081f2a;box-shadow:0 24px 75px #000b;
 overflow:hidden;z-index:1500;
}
#v63WatchDialog:not([open]){display:none!important}
#v63WatchDialog::backdrop{background:rgba(0,6,10,.9);backdrop-filter:blur(2px)}
#v63WatchDialog .v63-watch-shell{
 box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;
 width:100%;height:100%;min-height:0;overflow:hidden;background:#0a212c
}
#v63WatchDialog .v63-watch-header{
 flex:0 0 auto;display:flex;justify-content:space-between;align-items:flex-start;
 gap:10px;padding:13px 15px;
 border-bottom:1px solid #365663;background:#122e39;
}
#v63WatchDialog .v63-watch-header strong{display:block;font-size:16px;line-height:1.35;color:#f4daa7}
#v63WatchDialog .v63-watch-header small{display:block;color:#b6cfd1;font-size:11px;line-height:1.5;margin-top:5px}
#v63Close{min-height:43px;min-width:64px;flex:none;border:1px solid #5a7481;border-radius:9px;background:#21434e;color:#f4dfc5;font-size:12px;font-weight:750}
#v63WatchDialog .v63-stage{
 position:relative;box-sizing:border-box;
 display:flex;flex-direction:column;
 align-self:center;justify-content:stretch;
 flex:1 1 0;min-height:0;
 height:100%;width:min(100%,540px);
 overflow:hidden;background:var(--v63-bg,#071a24);
 color:var(--v63-text,#f7f3ed);
}
#v63WatchDialog .v63-stage[data-aspect="horizontal"]{width:min(100%,920px);flex-direction:row}
#v63WatchDialog .v63-stage[data-aspect="square"]{width:min(100%,680px)}
#v63WatchDialog .v63-stage[data-aspect="portrait"]{width:min(100%,610px)}
#v63WatchDialog .v63-media-pane{
 position:relative;box-sizing:border-box;flex:0 0 var(--v63-media-ratio,65%);
 min-width:0;min-height:0;overflow:hidden;background:#061620;
 display:flex;align-items:center;justify-content:center;
}
#v63WatchDialog .v63-native-host{
 position:absolute;inset:0;width:100%;height:100%;
 display:flex;align-items:center;justify-content:center;
}
#v63WatchDialog .v63-native-video,
#v63WatchDialog .v63-native-host iframe{
 display:block!important;position:relative!important;inset:auto!important;
 width:100%!important;height:100%!important;
 max-width:100%;max-height:100%;object-fit:contain;
 background:#040e14;opacity:1;visibility:visible;
}
#v63WatchDialog .v63-native-host iframe{border:0}
#v63WatchDialog .v63-native-video.v63-visual-hidden{
 opacity:0!important;pointer-events:none;
}
#v63WatchDialog .v63-native-audio{
 position:absolute;width:1px;height:1px;left:0;top:0;
 opacity:0;pointer-events:none
}
#v63WatchDialog .v63-audio-backdrop{
 display:none;position:absolute;inset:0;
 align-items:center;justify-content:center;
 background:linear-gradient(145deg,#143842,#071a24);
 color:#c7a771;font-family:"Amiri Quran",serif;font-size:72px;
 pointer-events:none
}
#v63WatchDialog .v63-stage[data-mode="audio"] .v63-audio-backdrop{display:flex}
#v63WatchDialog .v63-caption-pane{
 box-sizing:border-box;flex:1 1 0;min-height:0;min-width:0;
 display:flex;align-items:center;justify-content:center;
 overflow:auto;overscroll-behavior:contain;
 background:var(--v63-bg,#071a24);
 padding:13px 16px;scrollbar-width:thin;
}
#v63WatchDialog .v63-caption-inner{
 width:100%;min-width:0;max-height:100%;
 text-align:center;overflow-y:auto;overflow-x:hidden;
 padding:3px 2px;box-sizing:border-box;
 scrollbar-width:thin;
}
#v63WatchDialog .v63-caption-inner>div:empty{display:none!important}
#v63WatchDialog .v63-heading{
 color:var(--v63-gold,#d8b475);font-size:12px;font-weight:800;
 margin:0 auto 11px;line-height:1.5
}
#v63WatchDialog .v63-arabic{
 color:var(--v63-text,#fff7e8);
 font-family:var(--v63-font,"Amiri Quran",serif);
 font-size:var(--v63-ar-size,42px);line-height:1.7;
 text-align:center;direction:rtl;word-break:normal;
 overflow-wrap:normal;white-space:normal;
 margin:0 auto 10px;unicode-bidi:plaintext
}
#v63WatchDialog .v63-translit{
 font-size:var(--v63-tr-size,19px);line-height:1.45;
 font-style:italic;margin:0 auto 8px;overflow-wrap:break-word
}
#v63WatchDialog .v63-translation{
 font-size:var(--v63-en-size,19px);line-height:1.5;
 margin:0 auto 9px;overflow-wrap:break-word
}
#v63WatchDialog .v63-footer{
 color:var(--v63-gold,#d8b475);font-size:11px;line-height:1.4;
 margin:12px 0 0;opacity:.85
}
#v63WatchDialog .v63-stage[data-layout="overlay"]:not([data-mode="audio"]):not([data-mode="mushaf"]) .v63-media-pane{flex:1 1 100%}
#v63WatchDialog .v63-stage[data-layout="overlay"]:not([data-mode="audio"]):not([data-mode="mushaf"]) .v63-caption-pane{
 position:absolute;left:0;right:0;bottom:0;z-index:2;
 flex:none;max-height:65%;min-height:10%;
 padding:15px 18px;
 background:rgba(6,23,31,var(--v63-shade,.7))
}
#v63WatchDialog .v63-stage[data-position="top"][data-layout="overlay"] .v63-caption-pane{bottom:auto;top:0}
#v63WatchDialog .v63-stage[data-position="center"][data-layout="overlay"] .v63-caption-pane{bottom:50%;transform:translateY(50%)}
#v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-caption-pane{
 margin:10px 12px;border:3px double #b49a63;border-radius:11px;
 background:#f0e6cc;color:#3b3121;box-shadow:0 4px 14px #0005;
}
#v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-caption-inner{color:#47371e}
#v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-arabic,
#v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-translit,
#v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-translation{color:#3b3121}
#v63WatchDialog .v63-no-captions{visibility:hidden}
#v63WatchDialog .v63-watch-controls{
 flex:0 0 auto;padding:10px 13px 13px;
 border-top:1px solid #31515f;background:#112e3a;
}
#v63WatchDialog .v63-meta{
 display:flex;justify-content:space-between;align-items:center;gap:8px;
 color:#e5d3af;font-size:12px;font-variant-numeric:tabular-nums;margin-bottom:8px
}
#v63WatchDialog #v63Seek{display:block;width:100%;height:24px;accent-color:#e8c181;margin:5px 0 9px;touch-action:pan-x}
#v63WatchDialog .v63-buttons{
 display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px
}
#v63WatchDialog .v63-buttons button,
#v63WatchDialog .v63-buttons select{
 min-height:42px;border:1px solid #607783;border-radius:9px;
 background:#21424e;color:#f2e6d0;padding:8px 10px;
 font-size:12px;font-weight:750
}
#v63WatchDialog .v63-buttons .v63-play{
 background:#d9b678;color:#112b34;border-color:#e0c08a;min-width:90px
}
#v63WatchDialog .v63-buttons label{
 display:flex;align-items:center;gap:7px;
 color:#e4d9c4;font-size:12px
}
#v63WatchDialog #v63Status{
 min-height:14px;text-align:center;font-size:11px;line-height:1.4;
 color:#b2cfd1;margin:7px 0 0
}
#v63WatchDialog #v63Status[data-type="error"]{color:#f3b6a3}
#v63WatchDialog :is(button,input,select):focus-visible{
 outline:3px solid #e9c889;outline-offset:2px
}
#v63WatchDialog.v63-fullscreen{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0}
#v63WatchDialog .v63-watch-shell:fullscreen{
 background:#081f2a;width:100%;height:100%;max-height:none
}
@media(max-width:740px){
 #v63WatchDialog{width:calc(100vw - 8px);max-height:96dvh;height:96dvh;border-radius:12px}
 #v63WatchDialog .v63-watch-header{padding:10px}
 #v63WatchDialog .v63-watch-header strong{font-size:14px}
 #v63WatchDialog .v63-watch-controls{padding:8px 10px 12px}
 #v63WatchDialog .v63-buttons{gap:5px}
 #v63WatchDialog .v63-buttons button,#v63WatchDialog .v63-buttons select{min-height:40px;padding:6px 8px;font-size:11px}
 #v63WatchDialog .v63-stage .v63-caption-pane{padding:9px 8px}
 #v63WatchDialog .v63-stage .v63-arabic{
  font-size:min(var(--v63-ar-size,42px),32px);
  line-height:1.6
 }
 #v63WatchDialog .v63-stage .v63-translit{font-size:min(var(--v63-tr-size,19px),18px)}
 #v63WatchDialog .v63-stage .v63-translation{font-size:min(var(--v63-en-size,19px),17px)}
 #v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-caption-pane{margin:7px}
 #v63WatchDialog .v63-stage[data-aspect="horizontal"] .v63-caption-pane{padding:7px}
 #v63WatchDialog .v63-stage[data-aspect="horizontal"] .v63-arabic{font-size:min(var(--v63-ar-size,42px),25px)}
}
@media(prefers-reduced-motion:reduce){
 #v63WatchDialog *{scroll-behavior:auto}
}

/* v63 — only verified timed-word cues are highlighted during playback. */
#v63WatchDialog .v63-timed-word{display:inline;white-space:normal;border-radius:4px;padding:1px 2px}
#v63WatchDialog .v63-current-word{background:rgba(230,188,116,.24);color:#f5c77a;text-shadow:0 0 6px rgba(243,197,118,.24)}
#v63WatchDialog .v63-stage[data-mode="mushaf"] .v63-current-word{color:#6d461b;background:rgba(200,148,57,.27);text-shadow:none}

/* Bottom-anchored editor guidance: keep the swipe instruction in view while
   the form scrolls, instead of repeating it above the editing controls. */
.sidebar .sidebar-scroll.v52-swipe-surface{
  flex:1 1 auto;
  min-height:0;
}
.sidebar .v52-swipe-guide{
  position:sticky;
  bottom:0;
  flex-shrink:0;
  z-index:7;
  border-top:1px solid #45606c;
  border-bottom:0;
}
.sidebar .v52-progress{flex-shrink:0}
@media(max-width:740px){
  /* The existing mobile step dock is already fixed to the screen bottom. */
  body.v52-floating-steps-on:not(.ayah-resource-mode):not(.r48-open) .v52-floating-hint{
    display:block!important;
    flex:none;
    width:100%;
    padding:3px 5px 5px;
    margin:0;
    text-align:center;
    color:#b9d0d2;
    font-size:11px;
    line-height:1.35;
    white-space:normal;
  }
  body.v52-floating-steps-on:not(.ayah-resource-mode) .app-shell{
    padding-bottom:calc(164px + env(safe-area-inset-bottom,0px));
  }
  body.v52-floating-steps-on:not(.ayah-resource-mode) .a11y-bubble{
    bottom:calc(164px + env(safe-area-inset-bottom,0px));
  }
  body.v52-floating-steps-on:not(.ayah-resource-mode) .a11y-panel{
    bottom:calc(220px + env(safe-area-inset-bottom,0px));
    max-height:calc(100dvh - 240px - env(safe-area-inset-bottom,0px));
  }
  body.v52-floating-steps-on:not(.ayah-resource-mode) .toast-wrap{
    bottom:calc(160px + env(safe-area-inset-bottom,0px));
  }
  /* If the optional floating step dock is disabled, the original
     previous/next guide still stays fixed at the bottom. */
  body:not(.v52-floating-steps-on):not(.ayah-resource-mode):not(.r48-open) .sidebar .v52-swipe-guide{
    position:fixed;
    left:0;right:0;bottom:0;
    z-index:85;
    padding:9px 12px calc(10px + env(safe-area-inset-bottom,0px));
    border-top:1px solid #45606c;
    background:#0c2530;
    box-shadow:0 -8px 28px #0008;
  }
  body:not(.v52-floating-steps-on):not(.ayah-resource-mode):not(.r48-open) .sidebar .v52-progress{
    display:none;
  }
  body:not(.v52-floating-steps-on):not(.ayah-resource-mode):not(.r48-open) .app-shell{
    padding-bottom:calc(110px + env(safe-area-inset-bottom,0px));
  }
}

/* Keep the accessibility launcher ABOVE the visible fixed step bar.
   Calculate its clearance from the actual bar height (floating dock ON and
   bottom swipe arrows with the dock OFF), including extra large text. */
@media(max-width:740px){
  body.ayah-editor-nav-visible:not(.ayah-resource-mode):not(.r48-open) .a11y-bubble{
    bottom:calc(var(--ayah-editor-nav-occupied, 164px) + 12px)!important;
  }
  body.ayah-editor-nav-visible:not(.ayah-resource-mode):not(.r48-open) .a11y-panel{
    bottom:calc(var(--ayah-editor-nav-occupied, 164px) + 78px)!important;
    max-height:max(120px,calc(100dvh - var(--ayah-editor-nav-occupied, 164px) - 90px))!important;
  }
  body.ayah-editor-nav-visible:not(.ayah-resource-mode):not(.r48-open) .toast-wrap{
    bottom:calc(var(--ayah-editor-nav-occupied, 164px) + 8px)!important;
  }
}


/* Simple Design progressively reveals QuranClip-style choices while leaving
   all legacy Ayah Studio controls wired in the Full design view. */
#panel-style.ayah-simple-active > :not(#ayahQuickDesign){display:none!important}
#panel-style #ayahQuickDesign{
 box-sizing:border-box;display:block;min-width:0;background:#0f2a36;color:#e7f0f1;
 border:1px solid #4b6c7b;border-radius:16px;padding:15px;margin:0 0 18px;
 box-shadow:0 8px 22px #0002
}
#ayahQuickDesign .ayah-simple-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
#ayahQuickDesign .ayah-simple-header h2{margin:0;color:var(--gold,#d8b475);font-size:20px;line-height:1.3}
#ayahQuickDesign .ayah-simple-header p{margin:5px 0 10px;font-size:12px;color:#c7d7df;line-height:1.5}
#ayahQuickDesign button,#ayahQuickDesign select{
 box-sizing:border-box;min-height:44px;border-radius:10px;border:1px solid #597b89;
 background:#193b4a;color:#f8fafb;padding:9px 12px;font:inherit;font-size:13px;cursor:pointer
}
#ayahQuickDesign button:focus-visible,#ayahQuickDesign select:focus-visible,
#ayahQuickDesign input:focus-visible{outline:3px solid #e3bc75;outline-offset:2px}
#ayahQuickDesign button[aria-pressed="true"]{background:#d9be87;border-color:#eacf9b;color:#122e3b;font-weight:750}
#ayahQuickDesign #ayahSimpleMode{min-width:100px;flex:none;border-color:#d9be87;color:#e7cf9a}
#ayahQuickDesign[data-mode="full"] .ayah-simple-body{display:none}
#ayahQuickDesign .ayah-simple-flow{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}
#ayahQuickDesign .ayah-simple-flow button,#ayahQuickDesign .ayah-simple-flow span{
 min-height:40px;padding:8px 10px;border-radius:9px;font-size:12px
}
#ayahQuickDesign .ayah-simple-flow span{display:grid;place-items:center;border:1px solid #e2c386;color:#f1d9ae;font-weight:700}
#ayahQuickDesign fieldset{border:0;padding:0;margin:15px 0 0;min-width:0}
#ayahQuickDesign legend{display:block;width:100%;padding:0;margin-bottom:8px;font-size:14px;color:#f2e2bf;font-weight:750}
#ayahQuickDesign .ayah-simple-pills{display:flex;flex-wrap:wrap;gap:7px}
#ayahQuickDesign .ayah-simple-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#ayahQuickDesign .ayah-simple-checks label{
 box-sizing:border-box;min-width:0;display:flex;align-items:center;gap:8px;margin:0;padding:10px;
 font-size:13px;line-height:1.35;background:#1a3947;border-radius:10px;border:1px solid #476877;color:#f0f4f4
}
#ayahQuickDesign input[type=checkbox]{width:18px;height:18px;margin:0;flex:none;accent-color:#d9be87}
#ayahQuickDesign .ayah-simple-row{display:grid;gap:8px;margin-top:16px;min-width:0}
#ayahQuickDesign .ayah-simple-row label{font-size:14px;color:#f2e2bf;font-weight:750}
#ayahQuickDesign .ayah-simple-row[hidden]{display:none!important}
#ayahQuickDesign .ayah-simple-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:19px}
#ayahQuickDesign .ayah-simple-actions button:last-child{border-color:#d9be87;background:#d9be87;color:#102934;font-weight:800}
#ayahQuickDesign .ayah-simple-note{margin:8px 0 0;font-size:12px;line-height:1.5;color:#c5d8df}
@media(max-width:420px){
 #panel-style #ayahQuickDesign{padding:12px}
 #ayahQuickDesign .ayah-simple-checks{grid-template-columns:1fr}
 #ayahQuickDesign .ayah-simple-header{flex-wrap:wrap}
 #ayahQuickDesign .ayah-simple-pills button{flex:1 1 105px}
}
@media(prefers-reduced-motion:reduce){#ayahQuickDesign *{scroll-behavior:auto!important}}

/* Opening text is not a timed recited Ayah. It is a distinct, optional
   static title on the preview media layer, matching the export canvas. */
#preview .ayah-intro-bismillah{
 position:absolute;inset:2.4% 8% auto;z-index:15;box-sizing:border-box;
 display:flex;flex-direction:column;align-items:center;justify-content:center;
 gap:4px;min-height:12%;padding:8px 10px;background:rgba(5,20,30,.88);
 color:#f6ebd3;text-align:center;pointer-events:none;max-width:84%;
}
#preview .ayah-intro-bismillah[hidden]{display:none!important}
#preview .ayah-intro-bismillah span{
 display:block;width:100%;font-family:"Amiri Quran","Noto Naskh Arabic",serif;
 font-size:clamp(16px,2.7vw,35px);line-height:1.7;white-space:normal;overflow-wrap:break-word;
}
#preview .ayah-intro-bismillah small{
 display:block;color:#d5dfdd;font:400 clamp(9px,1.2vw,13px)/1.3 sans-serif;direction:ltr;
}
#ayahQuickDesign #ayahSimpleBismillah{flex:none;accent-color:#d9be87}
#ayahQuickDesign label:has(#ayahSimpleBismillah){display:flex;gap:8px;align-items:center;color:#f2e2bf;font-size:14px}


/* Two verified translations share the existing caption stack; long passages
   remain scrollable in the DOM and paginated by the export canvas. */
#ayahQuickDesign .ayah-secondary-field{min-width:0}
#ayahQuickDesign .ayah-secondary-field >label:not(.ayah-secondary-toggle){display:block;margin:9px 0 7px;font-size:13px;color:#f0e4c8}
#ayahQuickDesign #ayahSecondaryEdition{width:100%;max-width:100%}
#ayahQuickDesign .ayah-secondary-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
#ayahQuickDesign .ayah-secondary-actions button{flex:1 1 120px}
#ayahQuickDesign .ayah-secondary-toggle{display:flex;align-items:center;gap:9px;margin:12px 0 0;font-size:13px}
#ayahQuickDesign .ayah-secondary-excerpt{
 overflow-wrap:anywhere;white-space:pre-line;padding:12px;margin:10px 0 0;
 border:1px solid #597b89;border-radius:10px;background:#09202c;color:#eef3f4;font-size:13px;line-height:1.6
}
#ayahQuickDesign #ayahSecondaryStatus[data-error="true"]{color:#ffd4bd}
#previewSecondaryLabel{color:var(--caption-gold,#dec492);font-size:10px;font-weight:700;letter-spacing:.02em;line-height:1.4;text-transform:uppercase}
#previewSecondaryTranslation{font-size:var(--translation-font,19px);line-height:1.48;max-width:100%;overflow-wrap:anywhere;unicode-bidi:plaintext}
#previewSecondaryLabel[hidden],#previewSecondaryTranslation[hidden],
#previewSecondaryLabel.hidden,#previewSecondaryTranslation.hidden{display:none!important}
#preview .caption-texts:has(#previewSecondaryTranslation:not(.hidden)){
 min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin
}
@media(max-width:480px){#ayahQuickDesign .ayah-secondary-actions button{flex:1 1 100%}}
