/* SALAH modern theme layer. Dark is canonical; light is a deliberate inverse. */
:root,
:root[data-theme="dark"]{
  color-scheme:dark;
  --theme-bg:#000;
  --theme-surface:#000;
  --theme-surface-raised:#0a0a0a;
  --theme-text:#fff;
  --theme-muted:#aaa;
  --theme-faint:#777;
  --theme-rule:rgba(255,255,255,.28);
  --theme-rule-soft:rgba(255,255,255,.13);
  --theme-backdrop:rgba(0,0,0,.88);
  --theme-active-bg:#fff;
  --theme-active-text:#050505;
}

:root[data-theme="light"]{
  color-scheme:light;
  --theme-bg:#fff;
  --theme-surface:#fff;
  --theme-surface-raised:#ecece8;
  --theme-text:#050505;
  --theme-muted:#5f625f;
  --theme-faint:#767976;
  --theme-rule:rgba(5,5,5,.28);
  --theme-rule-soft:rgba(5,5,5,.14);
  --theme-backdrop:rgba(245,245,242,.9);
  --theme-active-bg:#050505;
  --theme-active-text:#fff;

  --ed-black:var(--theme-bg);
  --ed-surface:var(--theme-surface);
  --ed-surface-2:var(--theme-surface-raised);
  --ed-white:var(--theme-text);
  --ed-muted:var(--theme-muted);
  --ed-faint:var(--theme-faint);
  --ed-rule:var(--theme-rule);
  --ed-rule-soft:var(--theme-rule-soft);
  --ed-green:var(--theme-text);
  --ed-green-deep:var(--theme-surface);
  --ed-gold:var(--theme-text);
  --green:var(--theme-text);
  --green2:var(--theme-bg);
  --sage:var(--theme-text);
  --cream:var(--theme-bg);
  --paper:var(--theme-surface);
  --sand:var(--theme-muted);
  --gold:var(--theme-text);
  --charcoal:var(--theme-text);
  --muted:var(--theme-muted);
  --line:var(--theme-rule-soft);
}

html,body,.app-shell{transition:background-color .18s ease,color .18s ease}

/* Settings appearance control */
.theme-choice{
  display:grid!important;
  grid-template-columns:1fr 1fr;
  width:100%;
  padding:0!important;
  border:1px solid var(--ed-rule-soft)!important;
  border-radius:0!important;
  background:transparent!important;
}
.theme-choice .segment{
  min-height:38px;
  border:0!important;
  border-radius:0!important;
}
.theme-choice .segment+.segment{border-left:1px solid var(--ed-rule-soft)!important}

/* The light edition deliberately reverses the editorial system. */
:root[data-theme="light"] html,
:root[data-theme="light"] body,
:root[data-theme="light"] .app-shell,
:root[data-theme="light"] .page,
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .hero-shell,
:root[data-theme="light"] .daily-adhkar-section,
:root[data-theme="light"] .learn-section,
:root[data-theme="light"] .site-footer,
:root[data-theme="light"] .editorial-footer,
:root[data-theme="light"] .mobile-nav{
  background:var(--theme-bg)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
}

:root[data-theme="light"] :is(
  h1,h2,h3,h4,h5,h6,b,strong,label,legend,
  .hero-title,.hero-verse-arabic,.hero-verse-translation,
  .nav-link:hover,.nav-link.active,.prayer-row time,
  .counter-verse-arabic,.daily-adhkar-title,.contextual-title,
  .salah-quran-arabic,.salah-quran-verse,[lang="ar"]
){color:var(--theme-text)!important}

:root[data-theme="light"] :is(
  p,small,.eyebrow,.hero-kicker,.hero-copy,.hero-verse-source,
  .nav-link,.prayer-row b,.launch-card small,
  .daily-adhkar-card p,.daily-adhkar-card small,
  .worship-detail-meta,.worship-detail-subtitle,
  .worship-detail-translit,.worship-detail-english,
  .pg-action,.pg-translit,.pg-english,.pg-quran-status,
  .pg-quran-translit,.pg-quran-english
){color:var(--theme-muted)!important}

:root[data-theme="light"] :is(
  .panel,.prayer-panel,.focus-panel,.counter-panel,
  .launch-card,.learn-card,
  .timeline-item,.contextual-worship-disclaimer,
  .contextual-madhhab-note,.contextual-friday-note,
  .daily-adhkar-layout,.daily-adhkar-welcome,.daily-adhkar-group,
  .daily-adhkar-card,.daily-adhkar-quick-counter,.daily-adhkar-note,
  .settings-drawer,.prayer-guide,.pg-head,.pg-map>button,
  .pg-note,.pg-step,.pg-pose,.pg-rakaah-tabs,.pg-school-tabs,
  .pg-arabic,.pg-translit,.pg-english,.pg-quran,
  .pg-quran-learning-head,.pg-surah-picker,.pg-surah-picker select,
  .worship-detail-card,.worship-detail-head,.worship-detail-body,
  .worship-detail-recitation,.worship-detail-collection,
  .worship-detail-member,.worship-detail-personal-note,
  .worship-detail-practice,.worship-reading-timer,
  .salah-quran-modal,.salah-quran-panel,.salah-quran-card,
  [class*="quran-modal"],[class*="quran-panel"],[class*="quran-card"]
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule-soft)!important;
  box-shadow:none!important;
}

:root[data-theme="light"] :is(
  .prayer-guide-overlay,.worship-detail-overlay,
  [class*="worship-detail"][class*="overlay"],
  [class*="quran"][class*="overlay"]
){background:var(--theme-backdrop)!important}

:root[data-theme="light"] :is(
  .settings-button,.location-button,.tiny-button,
  .contextual-worship-arrow,.contextual-return-button,
  .counter-button,.counter-presets button,.dhikr-arrow,
  .daily-adhkar-quick-counter,.worship-detail-close,
  .worship-detail-primary-action,.worship-reading-timer-actions button,
  .worship-detail-counter-button,[data-dhikr-reset],
  .salah-quran-close,.salah-quran-play-all,.salah-quran-pause,
  .salah-quran-stop,.salah-quran-ayah-play,
  .salah-quran-reading-session-toggle,.learn-carousel-controls button,
  .pg-memorise,.pg-quran-rate button,.salah-quran-rate button
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule)!important;
  box-shadow:none!important;
  text-shadow:none!important;
}

:root[data-theme="light"] :is(
  .hero-action.primary,.segment.active,.segment[aria-pressed="true"],
  .counter-presets button.active,.salah-quran-rate button.active,
  .pg-map>button.active,.pg-rakaah-tabs button.active,
  .pg-school-tabs button.active,.pg-quran-rate button.active,
  .pg-play-all,.qpc-play,.pg-ayah-play,
  .pg-memorise.is-memorised,.pg-rakah-next
),
:root[data-theme="light"] :is(
  .hero-action.primary,.segment.active,.segment[aria-pressed="true"],
  .counter-presets button.active,.salah-quran-rate button.active,
  .pg-map>button.active,.pg-rakaah-tabs button.active,
  .pg-school-tabs button.active,.pg-quran-rate button.active,
  .pg-play-all,.qpc-play,.pg-ayah-play,
  .pg-memorise.is-memorised,.pg-rakah-next
) *{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
  text-shadow:none!important;
}

:root[data-theme="light"] :is(
  .settings-button,.tiny-button,.contextual-worship-arrow,
  .contextual-return-button,.dhikr-arrow,.worship-detail-close,
  .worship-detail-primary-action,.worship-reading-timer-actions button,
  .salah-quran-close,.salah-quran-play-all,.salah-quran-ayah-play,
  .learn-carousel-controls button
):hover,
:root[data-theme="light"] :is(
  .settings-button,.tiny-button,.contextual-worship-arrow,
  .contextual-return-button,.dhikr-arrow,.worship-detail-close,
  .worship-detail-primary-action,.worship-reading-timer-actions button,
  .salah-quran-close,.salah-quran-play-all,.salah-quran-ayah-play,
  .learn-carousel-controls button
):focus-visible{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}

:root[data-theme="light"] :is(
  .topbar,.prayer-panel,.prayer-panel .panel-head,.prayer-row,
  .more-prayers,.launch-card,.focus-panel,.counter-panel,
  .daily-adhkar-section,.learn-section,.editorial-footer,
  .editorial-footer-brand,.editorial-footer-intent,.editorial-footer-words,
  .counter-verse,.timeline-item,.daily-adhkar-card,
  .daily-adhkar-quick-counter,.daily-adhkar-note
){border-color:var(--theme-rule-soft)!important}

:root[data-theme="light"] .prayer-row.next-prayer,
:root[data-theme="light"] .prayer-row.current{
  background:var(--theme-surface)!important;
  box-shadow:inset 0 -2px 0 var(--theme-text)!important;
}
:root[data-theme="light"] .prayer-row.next-prayer b::after{color:var(--theme-text)!important}

/* Fixed-white SVG/raster artwork becomes crisp black; photos remain photographic. */
:root[data-theme="light"] :is(.brand img,.editorial-footer-brand img){filter:invert(1)!important}
:root[data-theme="light"] .launch-card .launcher-icon{filter:invert(1)!important}
:root[data-theme="light"] .daily-adhkar-counter-icon{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
}
:root[data-theme="light"] .daily-adhkar-counter-icon svg{stroke:var(--theme-active-text)!important}
:root[data-theme="light"] .learn-card .art-slot{background:#e7e7e3!important;border-color:var(--theme-rule-soft)!important}

/* Literal-black remnants from the legacy presentation layer. */
:root[data-theme="light"] .hero-scene{
  background:var(--theme-bg)!important;
  background-image:none!important;
}
:root[data-theme="light"] .hero-scene::before{
  background:transparent!important;
  background-image:none!important;
}
:root[data-theme="light"] .hero-scene::after{display:none!important}
:root[data-theme="light"] .prayer-location-search{
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule)!important;
  box-shadow:0 16px 36px rgba(5,5,5,.14)!important;
}
:root[data-theme="light"] :is(.segment,.theme-choice .segment){
  background:var(--theme-surface)!important;
  color:var(--theme-muted)!important;
  border-color:var(--theme-rule-soft)!important;
}
:root[data-theme="light"] :is(.segment,.theme-choice .segment).active,
:root[data-theme="light"] :is(.segment,.theme-choice .segment)[aria-pressed="true"]{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}

/* Native form controls and focus visibility */
:root[data-theme="light"] :is(input,select,textarea){
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule)!important;
}
:root[data-theme="light"] :is(button,a,input,select,textarea):focus-visible{outline-color:var(--theme-text)!important}

@media(prefers-reduced-motion:reduce){html,body,.app-shell{transition:none!important}}

/* Deferred prayer guide: override its dynamically-mounted legacy dark layer. */
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  .pg-head,.pg-note,.pg-step,.pg-pose,.pg-rakaah-tabs,.pg-school-tabs,
  .pg-arabic,.pg-translit,.pg-english,.pg-quran,.pg-quran-learning-head,
  .pg-surah-picker,.pg-surah-picker select,.pg-quran-verse,
  .pg-quran-translit,.pg-quran-english
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule-soft)!important;
  box-shadow:none!important;
}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(.pg-pose,.pg-quran-verse){background:var(--theme-surface-raised)!important}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  .pg-back,.pg-close,.pg-map>button,.pg-rakaah-tabs button,
  .pg-school-tabs button,.pg-memorise,.qpc-play,.qpc-pause,
  .qpc-stop,.pg-ayah-play,.pg-quran-rate button
){
  background:var(--theme-surface)!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule)!important;
  box-shadow:none!important;
}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  .pg-map>button.active,.pg-rakaah-tabs button.active,
  .pg-school-tabs button.active,.pg-quran-rate button.active,
  .pg-play-all,.qpc-play:active,.pg-ayah-play:active,
  .pg-memorise.is-memorised,.pg-rakah-next
),
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  .pg-map>button.active,.pg-rakaah-tabs button.active,
  .pg-school-tabs button.active,.pg-quran-rate button.active,
  .pg-play-all,.qpc-play:active,.pg-ayah-play:active,
  .pg-memorise.is-memorised,.pg-rakah-next
) *{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(.pg-note,.pg-action,.pg-translit,.pg-english,.pg-quran-status,.pg-quran-translit,.pg-quran-english){color:var(--theme-muted)!important}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(.pg-step-title span,.pg-map i,.pg-quran-verse small,.pg-quran-arabic small){
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  h1,h2,h3,h4,strong,b,.pg-arabic,.pg-quran-arabic,.pg-quran-verse,
  .pg-back,.pg-close,.pg-memorise
){color:var(--theme-text)!important}
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  .pg-map>button:not(.active),.pg-rakaah-tabs button:not(.active),
  .pg-school-tabs button:not(.active),.pg-quran-rate button:not(.active)
),
html[data-theme="light"] body.prayer-guide-open .prayer-guide :is(
  .pg-map>button:not(.active),.pg-rakaah-tabs button:not(.active),
  .pg-school-tabs button:not(.active),.pg-quran-rate button:not(.active)
) *{color:var(--theme-text)!important}

/* The guide stylesheet is mounted after the theme sheet. Keep these two
   display headings explicit so its compound legacy selector cannot win. */
html[data-theme="light"] body.prayer-guide-open .prayer-guide .pg-head > div > h2,
html[data-theme="light"] body.prayer-guide-open .prayer-guide .pg-step .pg-step-title > h3{
  color:var(--theme-text)!important;
}

/* Dynamically generated adhkar reader internals. */
html[data-theme="light"] body .worship-detail-card :is(
  .worship-detail-meta,.worship-detail-provenance,
  .worship-detail-member-copy,.worship-detail-member-arabic,
  .worship-detail-member-translit,.worship-detail-member-english,
  .worship-detail-action-note,.worship-detail-source
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule-soft)!important;
  box-shadow:none!important;
}
html[data-theme="light"] body .worship-detail-card :is(
  .worship-detail-member-translit,.worship-detail-member-english,
  .worship-detail-action-note,.worship-detail-source
){color:var(--theme-muted)!important}
html[data-theme="light"] body .worship-detail-card :is(
  .worship-detail-badge
){
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
  box-shadow:none!important;
}
html[data-theme="light"] body .worship-detail-card :is(
  .worship-detail-badge
) *{color:var(--theme-active-text)!important}

/* Final monochrome cleanup for surfaces inherited from the Classic edition. */
html[data-theme] body .daily-adhkar-card-meta small{
  background:transparent!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border:1px solid var(--theme-rule)!important;
  box-shadow:none!important;
}
html[data-theme] body .daily-adhkar-card :is(.daily-adhkar-card-icon,.daily-adhkar-progress span){
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}
:root[data-theme="light"] body :is(
  .daily-adhkar-section,.daily-adhkar-layout,.daily-adhkar-welcome,
  .daily-adhkar-group,.daily-adhkar-group-head,.daily-adhkar-note
){
  background:#fff!important;
  background-image:none!important;
}
:root[data-theme="light"] body :is(
  .daily-adhkar-card,.daily-adhkar-quick-counter,.daily-adhkar-note
){
  background-color:#f5f5f2!important;
  background-image:none!important;
}
:root[data-theme="light"] body .daily-adhkar-card .daily-adhkar-card-icon,
:root[data-theme="light"] body .daily-adhkar-card .daily-adhkar-progress span,
:root[data-theme="light"] body .daily-adhkar-quick-counter .daily-adhkar-counter-icon{
  background:#fff!important;
  background-image:none!important;
  color:#050505!important;
  border-color:var(--theme-rule)!important;
  box-shadow:none!important;
}
:root[data-theme="light"] body .daily-adhkar-card .daily-adhkar-card-icon svg,
:root[data-theme="light"] body .daily-adhkar-quick-counter .daily-adhkar-counter-icon svg{
  color:#050505!important;
  fill:none!important;
  stroke:#050505!important;
}
:root[data-theme="light"] body .daily-adhkar-progress span *{color:#050505!important}

/* A neutral checkbox replaces the old arched progress glyph. */
html[data-theme] body .homepage-progress-mark{
  width:18px!important;
  min-width:18px!important;
  height:18px!important;
  border:1px solid var(--theme-text)!important;
  border-radius:1px!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Adhkar reader: retain only the intentional black/white badge treatment. */
html[data-theme] body .worship-detail-card :is(
  .worship-detail-subtitle,.worship-detail-routine-actions,
  .worship-detail-arabic,.worship-detail-translit,.worship-detail-english,
  .worship-detail-member-count,.worship-detail-member-counter,
  .worship-detail-counter-button,.worship-detail-routine-reset
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule)!important;
  box-shadow:none!important;
}
html[data-theme] body .worship-detail-card :is(
  .worship-detail-subtitle,.worship-detail-translit,
  .worship-detail-english,.worship-detail-action-note
){
  color:var(--theme-muted)!important;
}
html[data-theme] body .worship-detail-card .worship-detail-arabic{
  color:var(--theme-text)!important;
}
html[data-theme] body .worship-detail-card :is(
  .worship-detail-member-count,.worship-detail-member-counter,
  .worship-detail-counter-button,.worship-detail-routine-reset
) *{color:var(--theme-text)!important}

/* Standalone Qur'an reader: remove every cream and green legacy surface. */
html[data-theme] body :is(
  .salah-quran-modal,.salah-quran-card,.salah-quran-body,
  .salah-quran-toolbar,.salah-quran-passage,.salah-quran-ayah,
  .salah-quran-status,.salah-quran-attribution,.salah-quran-player,
  .salah-quran-rate,.salah-quran-reading-session,
  .salah-quran-surah-picker,.salah-quran-surah-picker-toggle
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule-soft)!important;
  box-shadow:none!important;
}
html[data-theme] body :is(
  .salah-quran-transliteration,.salah-quran-english,
  .salah-quran-attribution,.salah-quran-status
){color:var(--theme-muted)!important}
html[data-theme] body .salah-quran-verse-number{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}
html[data-theme] body .salah-quran-rate button.active{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}

/* Closing keeps the pose treatment until the overlay itself is hidden. */
html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
  filter:grayscale(1) brightness(.7) contrast(1.22)!important;
}

/* Prayer guides are mounted late; pin their complete chrome to the active theme. */
html[data-theme] body.prayer-guide-open .prayer-guide,
html[data-theme] body.prayer-guide-open .prayer-guide :is(
  .pg-head,.pg-map>button,.pg-toolbar,.pg-rakaah-tabs,.pg-school-tabs,
  .pg-note,.pg-step,.pg-pose,.pg-arabic,.pg-translit,.pg-english,
  .pg-quran,.pg-quran-learning-head,.pg-quran-verse,
  .pg-surah-picker,.pg-surah-picker select
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule-soft)!important;
  box-shadow:none!important;
}
html[data-theme] body.prayer-guide-open .prayer-guide :is(.pg-pose,.pg-quran-verse){
  background:var(--theme-surface-raised)!important;
}
html[data-theme] body.prayer-guide-open .prayer-guide :is(
  .pg-back,.pg-close,.pg-map>button,.pg-rakaah-tabs button,
  .pg-school-tabs button,.pg-memorise,.pg-quran-rate button
){
  background:var(--theme-surface)!important;
  background-image:none!important;
  color:var(--theme-text)!important;
  border-color:var(--theme-rule)!important;
  box-shadow:none!important;
}
html[data-theme] body.prayer-guide-open .prayer-guide :is(
  .pg-map>button.active,.pg-rakaah-tabs button.active,
  .pg-school-tabs button.active,.pg-quran-rate button.active,
  .pg-play-all,.pg-memorise.is-memorised,.pg-rakah-next
),
html[data-theme] body.prayer-guide-open .prayer-guide :is(
  .pg-map>button.active,.pg-rakaah-tabs button.active,
  .pg-school-tabs button.active,.pg-quran-rate button.active,
  .pg-play-all,.pg-memorise.is-memorised,.pg-rakah-next
) *{
  background:var(--theme-active-bg)!important;
  color:var(--theme-active-text)!important;
  border-color:var(--theme-active-bg)!important;
}
html[data-theme] body.prayer-guide-open .prayer-guide :is(
  .eyebrow,.pg-head small,.pg-map small,.pg-guide-choice,.pg-note,
  .pg-action,.pg-translit,.pg-english,.pg-quran-status,
  .pg-quran-translit,.pg-quran-english
){color:var(--theme-muted)!important}
html[data-theme] body.prayer-guide-open .prayer-guide :is(
  h1,h2,h3,h4,strong,b,.pg-map i,.pg-arabic,.pg-quran-arabic,
  .pg-quran-verse
){color:var(--theme-text)!important}


/* Modern prayer sprites: source artwork is white for dark mode; light mode is its exact inverse. */
html[data-theme="dark"] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
  filter:none!important;
}
html[data-theme="light"] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
  filter:invert(1)!important;
}


/* Modern prayer sprites: size by height so the approved full figures read clearly in the legacy narrow pose slots. */
html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
  inset:8px!important;
  background-size:auto 92%!important;
  background-position:50% 100%!important;
}
@media(max-width:900px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
    inset:7px!important;
    background-size:auto 91%!important;
    background-position:50% 100%!important;
  }
}
@media(max-width:720px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
    inset:6px!important;
    background-size:auto 90%!important;
    background-position:50% 100%!important;
  }
}


/* Prayer sprite proportion correction: widen the desktop pose rail and preserve each full asset. */
@media(min-width:901px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-step{
    grid-template-columns:32px minmax(176px,auto) 1fr!important;
  }
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose{
    width:176px!important;
    flex-basis:176px!important;
  }
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose-sequence{
    max-width:544px!important;
  }
}
html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
  background-size:contain!important;
  background-position:center bottom!important;
}


/* Prayer pose frames: remove legacy vertical void and centre the complete approved artwork. */
@media(min-width:901px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose{
    width:180px!important;
    height:300px!important;
    flex-basis:180px!important;
  }
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose-sequence{
    max-width:556px!important;
  }
}
@media(min-width:721px) and (max-width:900px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose{height:270px!important}
}
@media(max-width:720px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose{height:240px!important}
}
html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose::after{
  background-size:contain!important;
  background-position:center center!important;
}


/* Optical centring for the approved gender-specific prayer artwork. */
html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose[data-guide="female"]::after{
  background-position:calc(50% - 16px) center!important;
}
html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose[data-guide="male"]::after{
  background-position:calc(50% + 12px) center!important;
}
@media(max-width:900px){
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose[data-guide="female"]::after{
    background-position:calc(50% - 10px) center!important;
  }
  html[data-theme] body .prayer-guide-overlay:not([hidden]) .pg-pose[data-guide="male"]::after{
    background-position:calc(50% + 8px) center!important;
  }
}
