/* The app presentation belongs to phone and tablet viewports. */
@media (max-width: 1024px) {
.manahel-pwa-install {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 99990;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  max-width: 44rem;
  margin-inline: auto;
  padding: 0.875rem 1rem;
  color: #263442;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dbe5f0;
  border-radius: 1rem;
  box-shadow: 0 0.75rem 2.5rem rgba(14, 49, 95, 0.18);
  font-family: inherit;
  box-sizing: border-box;
}

/* Keep the browser install prompt clear of the app navigation. */
body.manahel-istikhara-app-mode .manahel-pwa-install {
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

.manahel-pwa-install[hidden],
.manahel-pwa-guide[hidden],
[data-manahel-pwa-app-chrome][hidden] {
  display: none !important;
}

.manahel-pwa-install__icon {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.8rem;
  object-fit: cover;
}

.manahel-pwa-install__body {
  min-width: 0;
}

.manahel-pwa-install__title,
.manahel-pwa-install__text {
  display: block;
}

.manahel-pwa-install__title {
  margin-bottom: 0.15rem;
  color: #0e315f;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.6;
}

.manahel-pwa-install__text {
  color: #5e6975;
  font-size: 0.82rem;
  line-height: 1.7;
}

.manahel-pwa-install__button {
  min-height: 2.7rem;
  padding: 0.55rem 1rem;
  color: #fff;
  background: #14407f;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.manahel-pwa-install__button:hover,
.manahel-pwa-install__button:focus-visible {
  background: #0e315f;
}

.manahel-pwa-install__button:focus-visible,
.manahel-pwa-install__close:focus-visible {
  outline: 0.2rem solid rgba(20, 64, 127, 0.25);
  outline-offset: 0.15rem;
}

.manahel-pwa-install__button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.manahel-pwa-install__close {
  position: absolute;
  top: -0.55rem;
  left: -0.35rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  padding: 0;
  color: #5e6975;
  background: #fff;
  border: 1px solid #dbe5f0;
  border-radius: 50%;
  box-shadow: 0 0.2rem 0.65rem rgba(14, 49, 95, 0.12);
  font-family: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* App shell */
body.manahel-istikhara-app-mode {
  --manahel-app-primary: #14407f;
  --manahel-app-primary-dark: #0e315f;
  --manahel-app-surface: #ffffff;
  --manahel-app-bg: #f4f7fb;
  --manahel-app-border: #dce6f1;
  --manahel-app-muted: #667482;
  margin: 0 !important;
  padding: calc(4.75rem + env(safe-area-inset-top)) 0 calc(5.8rem + env(safe-area-inset-bottom)) !important;
  background: var(--manahel-app-bg) !important;
  overscroll-behavior-y: contain;
}

body.manahel-istikhara-app-mode #wpadminbar,
body.manahel-istikhara-app-mode > .wp-site-blocks > .manahel-header,
body.manahel-istikhara-app-mode > .wp-site-blocks > .manahel-footer,
body.manahel-istikhara-app-mode > .wp-site-blocks > header.wp-block-template-part,
body.manahel-istikhara-app-mode > .wp-site-blocks > footer.wp-block-template-part {
  display: none !important;
}

html:has(body.manahel-istikhara-app-mode) {
  margin-top: 0 !important;
  background: #f4f7fb;
}

body.manahel-istikhara-app-mode main#wp--skip-link--target {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.manahel-istikhara-app-mode main#wp--skip-link--target > .wp-block-group {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.manahel-istikhara-app-mode main .wp-block-post-featured-image {
  display: none !important;
}

body.manahel-istikhara-app-mode .entry-content {
  width: min(100% - 1rem, 34rem) !important;
  max-width: 34rem !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Keep the existing support shortcode visible; hide only the known web sections. */
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .entry-content > .wp-block-separator,
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .entry-content > .manahel-istikhara-seobox,
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .entry-content > .manahel-istikhara-faq,
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .entry-content > .wp-block-comments {
  display: none !important;
}

/* Give the pillar one narrow mobile gutter; avoid stacking theme and content padding. */
@media (max-width: 767px) {
  body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .wp-block-group:has(> .entry-content) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    padding-inline: 0 !important;
  }
}
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .entry-content {
  box-sizing: border-box;
  width: min(calc(100% - 16px), 34rem) !important;
  max-width: 34rem !important;
  padding: 0 !important;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-istikhara-action {
  padding: 0 !important;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support {
  margin: 1rem 0 !important;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__header {
  padding: 1rem 12px;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__grid {
  grid-template-columns: minmax(0, 1fr);
  padding: 8px;
  gap: 12px;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__payment-column {
  order: 1;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__info-column {
  order: 2;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__payment-card,
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__info-card {
  height: auto;
  padding: 10px;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__gateway {
  padding: 8px;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__gateway input:not([type="hidden"]),
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__gateway textarea,
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-main-support__gateway select {
  min-width: 0;
  min-height: 44px;
  font-size: 16px !important;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .manahel-pwa-appbar__help {
  width: 44px;
  height: 44px;
}

/* Keep Draft controls clear of the fixed app navigation. */
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing #wpvibe-preview-banner {
  position: static !important;
  box-sizing: border-box;
  width: auto !important;
  margin: 1rem 12px 0;
  padding: 8px 12px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-landing #wpvibe-preview-banner .wpvibe-info {
  flex-basis: 100%;
  text-align: center;
}

.manahel-pwa-appbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 99980;
  min-height: calc(4.25rem + env(safe-area-inset-top));
  padding: calc(0.55rem + env(safe-area-inset-top)) max(0.85rem, env(safe-area-inset-right)) 0.55rem max(0.85rem, env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dce6f1;
  box-shadow: 0 0.2rem 1.2rem rgba(20, 64, 127, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-sizing: border-box;
}

.manahel-pwa-appbar__brand {
  display: flex;
  width: min(100%, 32rem);
  min-height: 3.1rem;
  align-items: center;
  gap: 0.65rem;
  margin: 0 auto;
  padding-left: 3rem;
  color: #0e315f;
  text-decoration: none;
}

.manahel-pwa-appbar__logo {
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
  border-radius: 0.8rem;
  box-shadow: 0 0.2rem 0.65rem rgba(14, 49, 95, 0.14);
  object-fit: cover;
}

.manahel-pwa-appbar__brand strong,
.manahel-pwa-appbar__brand small {
  display: block;
}

.manahel-pwa-appbar__brand strong {
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.45;
}

.manahel-pwa-appbar__brand small {
  margin-top: 0.05rem;
  color: #667482;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
}

.manahel-pwa-appbar__status-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.2rem;
  background: #1f9d62;
  border-radius: 50%;
  box-shadow: 0 0 0 0.18rem rgba(31, 157, 98, 0.12);
  vertical-align: 0.02rem;
}

.manahel-pwa-appbar__help {
  position: absolute;
  top: calc(0.95rem + env(safe-area-inset-top));
  left: max(0.9rem, env(safe-area-inset-left));
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  padding: 0;
  color: #14407f;
  background: #edf4fc;
  border: 1px solid #d3e1f0;
  border-radius: 50%;
  font: 900 1rem/1 inherit;
  cursor: pointer;
}
.manahel-pwa-appbar__eitaa {
  width: 44px;
  height: 44px;
  background: #fffaf0;
  border-color: #e8cd85;
  text-decoration: none;
  animation: manahel-eitaa-glow 3.2s ease-in-out infinite;
}
.manahel-pwa-appbar__eitaa img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.manahel-pwa-appbar__eitaa:focus-visible {
  outline: 3px solid #a57a34;
  outline-offset: 3px;
}
@keyframes manahel-eitaa-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(215, 170, 53, .17); }
  50% { box-shadow: 0 0 0 5px rgba(215, 170, 53, .25); }
}
@media (prefers-reduced-motion: reduce) {
  .manahel-pwa-appbar__eitaa { animation: none; }
}

.manahel-pwa-bottom-nav {
  position: fixed;
  right: 0.7rem;
  bottom: max(0.65rem, env(safe-area-inset-bottom));
  left: 0.7rem;
  z-index: 99980;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 1.4rem), 32rem);
  min-height: 4.45rem;
  margin-inline: auto;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #dce6f1;
  border-radius: 1.35rem;
  box-shadow: 0 0.7rem 2rem rgba(14, 49, 95, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.manahel-pwa-bottom-nav__item {
  display: flex;
  min-width: 0;
  min-height: 3.65rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  margin: 0;
  padding: 0.25rem;
  color: #708090;
  background: transparent;
  border: 0;
  border-radius: 1rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.manahel-pwa-bottom-nav__item span {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
}

.manahel-pwa-bottom-nav__item small {
  font-size: 0.7rem;
  font-weight: 800;
}

.manahel-pwa-bottom-nav__item.is-active {
  color: #14407f;
  background: #edf4fc;
}

/* Landing screen inside the installed app */
body.manahel-istikhara-app-mode .manahel-istikhara-action {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 1rem !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action::before {
  display: none !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__header {
  margin: 0 0 0.85rem !important;
  padding: 1.15rem 1rem !important;
  background:
    radial-gradient(circle at 100% 0, rgba(237, 244, 252, 0.98), transparent 42%),
    #ffffff;
  border: 1px solid #dce6f1;
  border-radius: 1.35rem;
  box-shadow: 0 0.4rem 1.2rem rgba(20, 64, 127, 0.06);
  text-align: right !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__title {
  margin: 0 !important;
  color: #0e315f !important;
  font-size: clamp(1.45rem, 7vw, 1.9rem) !important;
  font-weight: 950 !important;
  line-height: 1.45 !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__eyebrow {
  display: inline-flex;
  margin: 0.35rem 0 0 !important;
  padding: 0.2rem 0.55rem;
  color: #9a671c !important;
  background: #fff8e9;
  border: 1px solid #f0ddb0;
  border-radius: 999px;
  font-size: 0.72rem !important;
  line-height: 1.5 !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__intro {
  margin: 0.7rem 0 0 !important;
  color: #667482 !important;
  font-size: 0.84rem !important;
  line-height: 1.8 !important;
  text-align: right !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__steps {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.55rem !important;
  margin: 0 !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__step {
  min-height: 0 !important;
  padding: 0.8rem 3.45rem 0.8rem 0.85rem !important;
  background: #ffffff !important;
  border: 1px solid #dce6f1 !important;
  border-radius: 1rem !important;
  box-shadow: none !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__step-number {
  top: 50% !important;
  right: 0.9rem !important;
  width: 2rem !important;
  height: 2rem !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: translateY(-50%);
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__visual {
  display: none !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__step-body {
  margin: 0 !important;
  text-align: right !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__step-title {
  margin: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
  text-align: right !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__step-text {
  margin-top: 0.1rem !important;
  color: #667482 !important;
  font-size: 0.76rem !important;
  line-height: 1.65 !important;
  text-align: right !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__prayer {
  margin: 0.75rem 0 0 !important;
  padding: 0.9rem !important;
  border-radius: 1rem !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__prayer-title {
  margin-bottom: 0.35rem !important;
  font-size: 0.83rem !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__prayer-text {
  font-size: clamp(1.05rem, 5vw, 1.28rem) !important;
  line-height: 1.95 !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__submit {
  position: static;
  z-index: 20;
  margin: 0.85rem 0 0 !important;
  padding: 0.45rem;
  background: rgba(244, 247, 251, 0.92);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__form {
  width: 100% !important;
  max-width: none !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__button {
  min-height: 3.65rem !important;
  border-radius: 1rem !important;
  box-shadow: 0 0.65rem 1.5rem rgba(20, 64, 127, 0.22) !important;
  font-size: 1rem !important;
}

body.manahel-istikhara-app-mode .manahel-istikhara-action__help {
  margin-top: 0.4rem !important;
  font-size: 0.68rem !important;
}

/* Result screen keeps its useful result content but removes website chrome. */
body.manahel-istikhara-app-mode.manahel-istikhara-app-result > .wp-site-blocks > .manahel-header,
body.manahel-istikhara-app-mode.manahel-istikhara-app-result > .wp-site-blocks > footer.manahel-footer,
body.manahel-istikhara-app-mode.manahel-istikhara-app-result .wp-block-comments.wp-block-comments-query-loop,
body.manahel-istikhara-app-mode.manahel-istikhara-app-result nav.wp-block-breadcrumbs,
body.manahel-istikhara-app-mode.manahel-istikhara-app-result .is-style-manahel-card-quran-hero:has(> nav.wp-block-breadcrumbs) {
  display: none !important;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-result .entry-content {
  padding: 0.75rem !important;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-result .entry-content > * {
  max-width: 100% !important;
}


/* Narrow result screens: one outer gutter, with no nested content gutter. */
@media (max-width: 767px) {
  body.manahel-istikhara-app-mode.manahel-istikhara-app-result > .wp-site-blocks > .wp-block-group:has(> .entry-content) {
    --wp--style--root--padding-left: 12px;
    --wp--style--root--padding-right: 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    padding-inline: 12px !important;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .entry-content {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .wp-block-post-title {
    margin-inline: 0 !important;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .is-style-manahel-card-quran-hero {
    padding: 12px;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__support-header {
    padding: 1rem 12px;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__support-grid {
    padding: 8px;
    gap: 12px;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__payment-card,
  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__info-card {
    padding: 10px;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__gateway {
    padding: 8px;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__gateway input:not([type="hidden"]),
  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__gateway textarea,
  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-istikhara-utility__gateway select {
    min-width: 0;
    min-height: 44px;
    font-size: 16px !important;
  }

  body.manahel-istikhara-app-mode.manahel-istikhara-app-result .manahel-pwa-appbar__help {
    width: 44px;
    height: 44px;
  }

}

/* Retain the preview controls without covering the app navigation. */
body.manahel-istikhara-app-mode.manahel-istikhara-app-result #wpvibe-preview-banner {
  position: static !important;
  box-sizing: border-box;
  width: auto !important;
  margin: 1rem 12px 0;
  padding: 8px 12px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

body.manahel-istikhara-app-mode.manahel-istikhara-app-result #wpvibe-preview-banner .wpvibe-info {
  flex-basis: 100%;
  text-align: center;
}

/* Template 302 has no main wrapper; keep its featured image out of App Mode. */
body.manahel-istikhara-app-mode.manahel-istikhara-app-result .is-style-manahel-card-quran-hero .wp-block-post-featured-image {
  display: none !important;
}

/* Bottom-sheet help */
.manahel-pwa-guide {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.manahel-pwa-guide__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: rgba(9, 27, 51, 0.46);
  border: 0;
  backdrop-filter: blur(2px);
}

.manahel-pwa-guide__sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: 0.7rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  color: #263442;
  background: #ffffff;
  border-radius: 1.6rem 1.6rem 0 0;
  box-shadow: 0 -0.8rem 2.5rem rgba(9, 27, 51, 0.16);
}

.manahel-pwa-guide__handle {
  width: 2.8rem;
  height: 0.28rem;
  margin: 0 auto 0.8rem;
  background: #d6dee8;
  border-radius: 999px;
}

.manahel-pwa-guide__sheet h2 {
  margin: 0 0 0.65rem;
  color: #0e315f;
  font-size: 1.1rem;
}

.manahel-pwa-guide__sheet ol {
  margin: 0;
  padding-right: 1.25rem;
}

.manahel-pwa-guide__sheet li,
.manahel-pwa-guide__sheet p {
  color: #586775;
  font-size: 0.86rem;
  line-height: 1.9;
}

.manahel-pwa-guide__sheet p {
  margin: 0.7rem 0;
  padding: 0.65rem 0.75rem;
  background: #fff8e9;
  border: 1px solid #efdeb7;
  border-radius: 0.8rem;
}

.manahel-pwa-guide__close {
  width: 100%;
  min-height: 3rem;
  color: #ffffff;
  background: #14407f;
  border: 0;
  border-radius: 0.9rem;
  font-family: inherit;
  font-weight: 900;
}

body.manahel-pwa-guide-open {
  overflow: hidden !important;
}

@media (max-width: 620px) {
  .manahel-pwa-install {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.8rem;
  }

  .manahel-pwa-install__button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (min-width: 700px) {
  body.manahel-istikhara-app-mode .manahel-istikhara-action {
    padding-top: 1.25rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manahel-pwa-install,
  .manahel-pwa-install__button {
    scroll-behavior: auto;
    transition: none;
  }
}

/* Four-action PWA navigation, including browser visits before installation. */
body.manahel-istikhara-app-landing,
body.manahel-istikhara-app-result {
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)) !important;
}
.manahel-pwa-bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  box-sizing: border-box;
  direction: rtl;
  font-family: var(--wp--preset--font-family--iransansx-fanum, inherit);
}
.manahel-pwa-bottom-nav__item { color: #14407f; gap: .3rem; }
.manahel-pwa-bottom-nav__item small { font-size: .72rem; line-height: 1.6; text-align: center; }
.manahel-pwa-bottom-nav__item svg { flex-shrink: 0; }
.manahel-pwa-bottom-nav__item:hover,
.manahel-pwa-bottom-nav__item:focus-visible { background: #edf4fc; }
.manahel-pwa-bottom-nav__item:focus-visible,
.manahel-pwa-apps a:focus-visible,
.manahel-pwa-apps button:focus-visible { outline: 3px solid #b28b43; outline-offset: 2px; }
.manahel-pwa-bottom-nav__item:disabled { color: #507364; cursor: default; }
.manahel-pwa-install { bottom: calc(5.8rem + env(safe-area-inset-bottom, 0px)); max-height: 65dvh; overflow-y: auto; }
.manahel-main-support,
.manahel-istikhara-utility__support { scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px)); }
.manahel-pwa-apps:not([open]) { display: none !important; }
.manahel-pwa-apps[open] {
  position: fixed; inset: 0; z-index: 100010;
  box-sizing: border-box; display: block; width: 100%; max-width: 100%;
  height: 100%; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: calc(1rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  overflow-y: auto; overscroll-behavior: contain; border: 0;
  color: #163354; background: #f4f7fb;
  font-family: var(--wp--preset--font-family--iransansx-fanum, inherit);
}
.manahel-pwa-apps::backdrop { background: rgba(9, 27, 51, .5); }
.manahel-pwa-apps__header,
.manahel-pwa-apps__list { width: min(100%, 36rem); margin: 0 auto; box-sizing: border-box; }
.manahel-pwa-apps__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.5rem; }
.manahel-pwa-apps__header small { font-size: .78rem; color: #65768a; }
.manahel-pwa-apps__header h2 { margin: .3rem 0 0; font-size: clamp(1.15rem, 5vw, 1.6rem); color: #14407f; }
.manahel-pwa-apps__close { min-height: 44px; flex-shrink: 0; padding: .65rem .85rem; border: 1px solid #d3e1f0; border-radius: 12px; color: #14407f; background: #fff; font: inherit; cursor: pointer; }
.manahel-pwa-apps__list { display: grid; gap: .75rem; }
.manahel-pwa-apps__link { display: flex; align-items: center; gap: .85rem; padding: 1rem; border: 1px solid #dce6f1; border-radius: 18px; background: #fff; color: #163354; text-decoration: none; min-height: 76px; box-sizing: border-box; }
.manahel-pwa-apps__link > span:nth-child(2) { flex: 1; }
.manahel-pwa-apps__link strong { display: block; font-size: 1rem; line-height: 1.8; }
.manahel-pwa-apps__link small { display: block; font-size: .78rem; color: #65768a; }
.manahel-pwa-apps__number { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; flex-shrink: 0; background: #edf4fc; color: #14407f; border-radius: 14px; font-size: 1.1rem; font-weight: 800; }
body.manahel-pwa-apps-open { overflow: hidden !important; }



/* Edge-to-edge navigation and compact support. */
.manahel-pwa-bottom-nav {
  left:0; right:0; bottom:0; width:100%; max-width:none; margin:0;
  border-radius:0; border-width:1px 0 0;
  padding:.25rem max(.25rem, env(safe-area-inset-right)) calc(.25rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-left));
}
#manahel-pwa-support-page[open] { padding-top:calc(.5rem + env(safe-area-inset-top)); padding-bottom:calc(.5rem + env(safe-area-inset-bottom)); }
#manahel-pwa-support-page .manahel-pwa-apps__header { max-width:30rem; padding:0 0 .5rem; }
#manahel-pwa-support-page .manahel-pwa-apps__header small { display:none; }
#manahel-pwa-support-page .manahel-pwa-apps__header h2 { font-size:1.15rem; margin:0; }
#manahel-pwa-support-page .manahel-pwa-support-page__intro { font-size:.85rem; line-height:1.65; margin:0 0 .6rem; }
#manahel-pwa-support-page .manahel-main-support__grid { gap:.55rem; }
#manahel-pwa-support-page .manahel-main-support__payment-card,
#manahel-pwa-support-page .manahel-main-support__info-card { padding:.65rem; border-radius:12px; }
#manahel-pwa-support-page .manahel-main-support__column-title { font-size:1rem; margin:0 0 .3rem; }
#manahel-pwa-support-page form { margin:.35rem 0 0!important; padding:0!important; border:0!important; box-shadow:none!important; }
#manahel-pwa-support-page .manahel-main-support__card-area { margin:0; padding:0; }
#manahel-pwa-support-page .manahel-main-support__card-label { font-size:.8rem; margin:0 0 .25rem; }
#manahel-pwa-support-page .manahel-main-support__card-button { padding:.4rem; gap:.15rem; }
#manahel-pwa-support-page .manahel-main-support__card-number { font-size:1.25rem; line-height:1.5; }
#manahel-pwa-support-page .manahel-main-support__card-owner,
#manahel-pwa-support-page .manahel-main-support__copy-message { font-size:.72rem; line-height:1.5; }
#manahel-pwa-support-page .manahel-pwa-support-page__note { font-size:.7rem; margin:.4rem 0 0; }
.manahel-support-optional { margin:.25rem 0 .4rem; }
.manahel-support-optional summary { cursor:pointer; min-height:32px; line-height:32px; font-size:.78rem; color:#52677e; }

/* Minimal support screen; the existing payment form is moved, never duplicated. */
.manahel-pwa-support-page__content { max-width:30rem; margin:0 auto; }
.manahel-pwa-support-page__intro { line-height:1.9; margin:0 0 1.25rem; }
.manahel-pwa-support-page__note { color:#64748b; font-size:.8rem; text-align:center; }
#manahel-pwa-support-page .manahel-main-support,
#manahel-pwa-support-page .manahel-istikhara-utility__support { margin:0; padding:0; border:0; background:transparent; box-shadow:none; color:#163354; }
#manahel-pwa-support-page .manahel-main-support__header,
#manahel-pwa-support-page .manahel-main-support__payment-icon,
#manahel-pwa-support-page .manahel-main-support__method-label,
#manahel-pwa-support-page .manahel-main-support__payment-description,
#manahel-pwa-support-page .manahel-main-support__info-card > h3,
#manahel-pwa-support-page .manahel-main-support__description,
#manahel-pwa-support-page .manahel-main-support__highlight { display:none; }
#manahel-pwa-support-page .manahel-main-support__grid { display:grid; grid-template-columns:1fr; gap:.55rem; }
#manahel-pwa-support-page .manahel-main-support__payment-card,
#manahel-pwa-support-page .manahel-main-support__info-card { padding:.65rem; border:1px solid #dce5ef; border-radius:12px; box-shadow:none; background:#fff; color:#163354; }
#manahel-pwa-support-page form { width:100%; max-width:100%!important; margin:.35rem 0 0!important; }
#manahel-pwa-support-page form > div:first-child { color:#163354!important; text-align:right!important; }
#manahel-pwa-support-page input { box-sizing:border-box; min-width:0; min-height:44px; font-family:inherit!important; font-size:.9rem!important; }
#manahel-pwa-support-page button { font-family:inherit; }
#manahel-pwa-support-page button[type="submit"] { min-height:48px; border-radius:12px!important; font-size:1rem!important; background:#14407f!important; }


/* Voluntary support: clear choices with no preselected amount. */
.manahel-support-invitation {
  box-sizing:border-box; max-width:38rem; margin:1rem auto;
  padding:1rem; border:1px solid #e2d6bc; border-radius:16px;
  background:#fcfaf5; color:#243b53; text-align:center;
  font-family:var(--wp--preset--font-family--iransansx-fanum,inherit);
}
.manahel-support-invitation strong { display:block; font-size:1rem; color:#15395e; text-align:center; }
.manahel-support-invitation p { font-size:.83rem; line-height:1.8; margin:.35rem 0 .75rem; text-align:center; }
.manahel-support-invitation button {
  display:inline-flex; align-items:center; justify-content:center;
  width:auto; max-width:100%; min-height:44px; padding:.55rem 1.1rem;
  border:1px solid #cbb781; border-radius:999px;
  background:#fffdf7; color:#14407f;
  font-family:inherit; font-size:.88rem!important; font-weight:800;
  line-height:1.4!important; box-shadow:none; cursor:pointer;
  animation:manahel-support-glow 2.4s ease-in-out infinite;
}
.manahel-support-invitation button:hover {
  background:#fff5dd; border-color:#b69650;
}
@keyframes manahel-support-glow {
  0%,100% { box-shadow:0 0 0 0 rgba(217,170,57,0); background:#fffdf7; }
  50% { box-shadow:0 0 0 4px rgba(217,170,57,.25); background:#fff1c8; }
}
@media(prefers-reduced-motion:reduce) {
  .manahel-support-invitation button { animation:none; }
}
.manahel-support-amounts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.4rem; margin:0 0 .45rem; }
.manahel-support-amounts button {
  flex:1; min-width:0; min-height:44px; padding:.3rem;
  border:1px solid #c5d4e5; border-radius:9px; background:#f5f8fc;
  color:#14407f; font:inherit; font-size:.8rem; cursor:pointer;
}
.manahel-support-amounts button[aria-pressed="true"] { background:#14407f; color:#fff; border-color:#14407f; }
#manahel-pwa-support-page form > div { color:#163354!important; }
.manahel-support-amounts button:focus-visible,.manahel-support-invitation button:focus-visible {
  outline:3px solid #a57a34; outline-offset:2px;
}
@media(max-width:600px) { .manahel-support-invitation { margin:1rem .75rem; } }


/* Clear amount feedback and accessible optional fields. */
.manahel-support-caption { margin:0 0 .35rem; color:#15395e; font-size:.82rem; font-weight:700; line-height:1.6; }
.manahel-support-selection { margin:.2rem 0 .35rem; color:#596b7e; font-size:.78rem; min-height:1.6em; line-height:1.6; }
.manahel-support-selection.is-selected { color:#14407f; font-weight:700; }
.manahel-support-amounts button[aria-pressed="true"] { box-shadow:inset 0 0 0 2px #14407f,0 0 0 2px #d3e0ef; font-weight:800; }
.manahel-support-field { display:block; margin:.35rem 0; }
.manahel-support-field > span { display:block; font-size:.76rem; color:#52677b; margin-bottom:.2rem; }
#manahel-pwa-support-page input { font-size:16px!important; }
#manahel-pwa-support-page input[name="manahel_amount_toman"] { font-weight:800!important; border:2px solid #9ab6d6!important; background:#fff!important; }
#manahel-pwa-support-page input[name="manahel_amount_toman"]::placeholder { color:#14407f; font-weight:800; opacity:1; }
#manahel-pwa-support-page form > div[style*="font-weight:bold"] { display:none; }
@media(prefers-reduced-motion:reduce) {
 .manahel-pwa-apps,.manahel-pwa-bottom-nav__item,.manahel-pwa-apps__link { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}


/* Six services, with two editorial feature cards. */
#manahel-pwa-apps .manahel-apps-showcase { max-width:42rem; gap:.75rem; }
#manahel-pwa-apps .manahel-app-card {
  align-items:flex-start; gap:.85rem; padding:1rem;
  background:#fff; border:1px solid #dfe7ef; border-radius:18px;
  text-decoration:none; box-sizing:border-box; min-width:0;
}
#manahel-pwa-apps .manahel-app-card__icon {
  display:grid; place-items:center; flex:0 0 48px; width:48px; height:48px;
  border-radius:14px; background:#edf3fa; color:#14407f;
}
#manahel-pwa-apps .manahel-app-card__body { flex:1; min-width:0; }
#manahel-pwa-apps .manahel-app-card strong { font-size:1.05rem; line-height:1.5; }
#manahel-pwa-apps .manahel-app-card small { font-size:.8rem; line-height:1.85; margin-top:.35rem; }
#manahel-pwa-apps .manahel-app-card__eyebrow { display:block; font-size:.72rem; margin-bottom:.2rem; }
#manahel-pwa-apps .manahel-app-card__action { display:block; margin-top:.7rem; font-size:.78rem; font-weight:700; color:#14407f; }
#manahel-pwa-apps .manahel-app-card__action > span { margin-right:.3rem; }
#manahel-pwa-apps .manahel-app-card--featured { padding:1.15rem; min-height:170px; }
#manahel-pwa-apps .manahel-app-card--hamnoor { background:linear-gradient(135deg,#123b55,#165c61); border-color:#165c61; }
#manahel-pwa-apps .manahel-app-card--dhikra { background:linear-gradient(135deg,#203b64,#344b75); border-color:#344b75; }
#manahel-pwa-apps .manahel-app-card--featured strong { font-size:1.5rem; color:#fff; }
#manahel-pwa-apps .manahel-app-card--featured small { color:#f0f5fc; }
#manahel-pwa-apps .manahel-app-card--featured .manahel-app-card__eyebrow { color:#f1d9a8; }
#manahel-pwa-apps .manahel-app-card--featured .manahel-app-card__icon { background:#ffffff16; color:#f1d9a8; border:1px solid #ffffff30; }
#manahel-pwa-apps .manahel-app-card--featured .manahel-app-card__action { color:white; }
#manahel-pwa-apps .manahel-app-card--shop .manahel-app-card__icon { background:#fff5e6; color:#855c24; }
#manahel-pwa-apps .manahel-app-card--prayer .manahel-app-card__icon { background:#ecf5ef; color:#276448; }
#manahel-pwa-apps .manahel-app-card--courses .manahel-app-card__icon { background:#f3eef8; color:#674c81; }
@media(min-width:640px) {
 #manahel-pwa-apps .manahel-apps-showcase { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #manahel-pwa-apps .manahel-pwa-apps__header { width:min(100%,42rem); }
}
@media(hover:hover) { #manahel-pwa-apps .manahel-app-card:hover { outline:2px solid #b58d49; outline-offset:2px; } }


/* Keep both support methods visible on short landscape screens. */
@media(min-width:640px) and (max-height:600px) {
 #manahel-pwa-support-page .manahel-pwa-support-page__content,
 #manahel-pwa-support-page .manahel-pwa-apps__header { max-width:50rem; }
 #manahel-pwa-support-page .manahel-main-support__grid {
   grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); align-items:start;
 }
 #manahel-pwa-support-page .manahel-pwa-support-page__intro { margin-bottom:.35rem; }
}
/* Text may expand for accessibility without being clipped. */
.manahel-pwa-bottom-nav__item small { overflow-wrap:anywhere; }
.manahel-pwa-apps__header h2 { overflow-wrap:anywhere; }
.manahel-pwa-apps__close { touch-action:manipulation; }
#manahel-pwa-support-page .manahel-support-amounts button { touch-action:manipulation; }


/* Result and pillar support share a compact panel, independent of outer CSS variables. */
#manahel-pwa-support-page .manahel-istikhara-utility__support {
 --manahel-istikhara-utility-primary:#14407f;
 --manahel-istikhara-utility-primary-dark:#103568;
 --manahel-istikhara-utility-text:#163354;
 --manahel-istikhara-utility-muted:#52677b;
 --manahel-istikhara-utility-border:#dce5ef;
 --manahel-istikhara-utility-white:#fff;
}
#manahel-pwa-support-page .manahel-istikhara-utility__support::before { display:none; }
#manahel-pwa-support-page .manahel-main-support__grid { padding:0!important; gap:.55rem!important; }
#manahel-pwa-support-page .manahel-main-support__payment-card,
#manahel-pwa-support-page .manahel-main-support__info-card { min-height:0; gap:0; padding:.65rem!important; }
#manahel-pwa-support-page .manahel-main-support__gateway { margin:0!important; padding:0!important; background:transparent!important; border:0!important; box-shadow:none!important; }
#manahel-pwa-support-page .manahel-main-support__card-button {
 display:flex; flex-direction:column; align-items:center; justify-content:center;
 width:100%; margin:0; padding:.4rem!important; border-radius:12px;
 color:#15395e; background:#f5f8fc; gap:.15rem!important;
}
#manahel-pwa-support-page .manahel-main-support__card-number { direction:ltr; font-size:1.25rem!important; line-height:1.5!important; letter-spacing:0!important; }
#manahel-pwa-support-page .manahel-main-support__card-owner,
#manahel-pwa-support-page .manahel-main-support__copy-message { margin:0!important; font-size:.72rem!important; line-height:1.5!important; color:#52677b; }
#manahel-pwa-support-page .manahel-main-support__column-title { margin:0 0 .3rem!important; font-size:1rem!important; line-height:1.6!important; }
#manahel-pwa-support-page input:not([type="hidden"]) { min-height:44px!important; padding:.45rem .6rem!important; margin-bottom:.3rem!important; }
#manahel-pwa-support-page input[type="hidden"] { display:none!important; }
.manahel-support-amounts button[type="button"] {
 width:100%!important; min-height:44px!important; margin:0!important; padding:.3rem!important;
 color:#14407f!important; background:#f5f8fc!important; border:1px solid #c5d4e5!important;
 border-radius:9px!important; box-shadow:none!important; font-size:.8rem!important; line-height:1.5!important;
}
.manahel-support-amounts button[type="button"][aria-pressed="true"] {
 color:#fff!important; background:#14407f!important; border-color:#14407f!important;
 box-shadow:0 0 0 2px #d3e0ef!important;
}

/* Refined PWA presentation: calm navy, warm gold, and readable mobile rhythm. */
body.manahel-istikhara-app-mode {
  --manahel-app-ink:#15395e;
  --manahel-app-muted:#556779;
  --manahel-app-gold:#a57a34;
  background:#f5f7fa!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action {
  max-width:42rem!important; margin-inline:auto!important;
  padding:1rem .85rem!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__header {
  padding:1.15rem!important; border:1px solid #e0e6ed;
  border-top:3px solid #b49153; border-radius:18px;
  background:linear-gradient(135deg,#fff 65%,#edf3f8);
  box-shadow:0 5px 20px #17395708;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__title {
  color:var(--manahel-app-ink)!important; letter-spacing:0;
  font-size:clamp(1.45rem,6vw,1.85rem)!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__intro {
  color:var(--manahel-app-muted)!important; font-size:.9rem!important; line-height:1.85!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__steps { gap:.5rem!important; }
body.manahel-istikhara-app-mode .manahel-istikhara-action__step {
  padding:.75rem 3.5rem .75rem .8rem!important;
  border-color:#e0e6ed!important; border-radius:14px!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__step-number {
  background:#edf3f9!important; color:#14407f!important; font-weight:800;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__step-text {
  color:var(--manahel-app-muted)!important; font-size:.8rem!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__prayer {
  background:#fcf9f2!important; border:1px solid #e9dfc9!important;
  border-radius:16px!important; padding:.85rem 1rem!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__prayer-text {
  color:#293c4a!important; font-size:clamp(1.12rem,4.8vw,1.35rem)!important; line-height:1.95!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__button {
  background:#14407f!important; color:white!important;
  border:1px solid #14407f!important; min-height:54px!important;
  box-shadow:0 6px 16px #14407f26!important;
}
body.manahel-istikhara-app-mode .manahel-istikhara-action__help {
  color:#52677b!important; font-size:.76rem!important; line-height:1.75;
}
.manahel-pwa-bottom-nav {
  background:#fff; border-top-color:#dce5ee;
  box-shadow:0 -4px 20px #15395e0d;
}
.manahel-pwa-bottom-nav__item {
  border-radius:10px; min-height:3.65rem; gap:.2rem;
  -webkit-tap-highlight-color:transparent;
}
.manahel-pwa-bottom-nav__item small { font-size:clamp(.66rem,2.7vw,.78rem); line-height:1.5; }
.manahel-pwa-bottom-nav__item:active { background:#e8f0fa; }
.manahel-pwa-apps__header { gap:.7rem; }
.manahel-pwa-apps__link {
  border-radius:14px; min-height:72px; padding:.8rem .9rem;
  border-color:#e0e7ef; box-shadow:0 2px 8px #15395e04;
}
.manahel-pwa-apps__link strong { color:#15395e; font-size:.95rem; }
.manahel-pwa-apps__link small { color:#52677b; }
.manahel-pwa-apps__number { border-radius:12px; background:#edf3f9; color:#14407f; }
.manahel-pwa-apps__link:active { background:#edf3f9; }
#manahel-pwa-support-page .manahel-main-support__card-button {
  background:#f5f8fc; border:1px dashed #b5c8de; box-shadow:none;
}
#manahel-pwa-support-page input:focus-visible {
  outline:2px solid #14407f; outline-offset:2px;
}
.manahel-support-optional summary:focus-visible,
.manahel-pwa-apps__close:focus-visible,
body.manahel-istikhara-app-mode .manahel-istikhara-action__button:focus-visible {
  outline:3px solid #a57a34!important; outline-offset:3px;
}
@media(hover:hover) {
  .manahel-pwa-apps__link:hover { border-color:#b3c8dd; background:#f8fbff; }
  body.manahel-istikhara-app-mode .manahel-istikhara-action__button:hover { background:#103568!important; }
}
@media(prefers-reduced-motion:no-preference) {
  .manahel-pwa-bottom-nav__item,.manahel-pwa-apps__link { transition:background-color .15s ease,border-color .15s ease; }
  .manahel-pwa-apps[open] { animation:manahel-panel-in .16s ease-out; }
  @keyframes manahel-panel-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
}
@media(max-width:359px) {
  .manahel-pwa-bottom-nav__item small { font-size:.64rem; }
  .manahel-pwa-apps[open] { padding-inline:.75rem; }
  #manahel-pwa-support-page .manahel-pwa-support-page__intro { font-size:.8rem; }
}

/* Text paragraphs align on both edges while headings keep their own alignment. */
body.manahel-istikhara-app-mode .entry-content p,
body.manahel-istikhara-app-mode .manahel-istikhara-utility p {
  text-align: justify !important;
  text-align-last: auto;
}

/* Keep the first card close to the fixed app bar. */
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing {
  padding-top: calc(4.25rem + env(safe-area-inset-top)) !important;
}
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .wp-site-blocks > .wp-block-group,
body.manahel-istikhara-app-mode.manahel-istikhara-app-landing .entry-content {
  margin-top: 0 !important;
}
}

@media (min-width: 1025px) {
  .manahel-pwa-appbar,
  .manahel-pwa-bottom-nav,
  .manahel-pwa-guide,
  .manahel-pwa-install,
  .manahel-pwa-apps,
  .manahel-support-invitation {
    display: none !important;
  }
}

