/* Manahel al-Huda: shared-PWA mobile app directory for page 17.
 * Desktop retains the original WordPress homepage and editorial H1.
 * Scoped design tokens and class names prevent collisions with Quran/readers.
 */
.manahel-pwa-home { display: none; }

@media (max-width: 1024px) {
  html:has(body.page-id-17.manahel-istikhara-app-mode) {
    background: #f4f7fb;
    overflow-x: clip;
  }
  body.page-id-17.manahel-istikhara-app-mode {
    padding-top: calc(4.35rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)) !important;
    background:
      radial-gradient(ellipse at 2% 8%, #e4edfa 0%, transparent 48%),
      radial-gradient(ellipse at 98% 56%, #eef2fb 0%, transparent 48%),
      #f4f7fb !important;
  }
  body.page-id-17 .wp-block-post-content > :not(.manahel-pwa-home) {
    display: none !important;
  }
  body.page-id-17 .wp-block-post-content {
    box-sizing: border-box !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body.page-id-17.manahel-istikhara-app-mode .entry-content {
    box-sizing: border-box !important;
    width: min(calc(100% - 22px), 46rem) !important;
    max-width: 46rem !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  body.page-id-17.manahel-istikhara-app-mode .wp-site-blocks,
  body.page-id-17.manahel-istikhara-app-mode .wp-site-blocks > main,
  body.page-id-17.manahel-istikhara-app-mode .wp-site-blocks > main > .wp-block-group {
    min-width: 0;
    max-width: none !important;
  }
  body.page-id-17.manahel-istikhara-app-mode .wp-site-blocks > main {
    padding: 0 !important;
    margin: 0 !important;
  }
  body.page-id-17.manahel-istikhara-app-mode .wp-block-post-title {
    display: none !important;
  }

  .manahel-pwa-home {
    --mh-ink: #16324f;
    --mh-deep: #10325d;
    --mh-soft: #64748b;
    display: block;
    position: relative;
    margin: 0 auto;
    width: 100%;
    padding: 0 0 1.1rem;
    box-sizing: border-box;
    direction: rtl;
    color: var(--mh-ink);
    font-family: var(--wp--preset--font-family--iransansx-fanum, inherit);
    isolation: isolate;
  }
  .manahel-pwa-home *,
  .manahel-pwa-home *::before,
  .manahel-pwa-home *::after { box-sizing: border-box; }
  .manahel-pwa-home :is(h2,h3,p) { margin: 0 !important; padding: 0; }
  .manahel-pwa-home a { text-decoration: none !important; }
  .manahel-pwa-home a:focus-visible,
  .manahel-pwa-home button:focus-visible { outline: 3px solid #b18d53; outline-offset: 3px; }
  .manahel-pwa-home svg { display: block; flex: 0 0 auto; }

  /* The opening brand identity is intentionally prominent before services. */
  .manahel-pwa-home__identity {
    position: relative;
    text-align: center;
    overflow: hidden;
    background:
      radial-gradient(circle at 95% 8%, rgba(233,204,149,.38), transparent 34%),
      radial-gradient(circle at 4% 100%, rgba(117,169,225,.17), transparent 48%),
      #fff;
    border: 1px solid #dae5f1;
    border-radius: 1.45rem;
    padding: 1.12rem .9rem 1.18rem;
    box-shadow: 0 8px 28px rgba(21,54,91,.055);
  }
  .manahel-pwa-home__identity::before,
  .manahel-pwa-home__identity::after {
    content: '';
    position: absolute;
    height: 104px;
    width: 104px;
    border: 1px solid rgba(191,162,99,.24);
    border-radius: 33px;
    transform: rotate(45deg);
    pointer-events: none;
  }
  .manahel-pwa-home__identity::before { top: -64px; left: -58px; }
  .manahel-pwa-home__identity::after { bottom: -69px; right: -62px; }
  .manahel-pwa-home__identity-glow {
    pointer-events: none;
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(204,179,127,.12);
    border-radius: 1.1rem;
  }
  .manahel-pwa-home__logo {
    display: grid;
    place-items: center;
    margin: 0 auto .48rem;
    height: 64px;
    width: 64px;
    background: #fff;
    padding: 5px;
    border-radius: 20px;
    border: 1px solid #f1e6ca;
    box-shadow: 0 7px 20px rgba(16,50,93,.1);
  }
  .manahel-pwa-home__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
  }
  .manahel-pwa-home__eyebrow {
    display: block;
    color: #8c713e;
    font-size: .73rem;
    letter-spacing: .005em;
    font-weight: 800;
  }
  .manahel-pwa-home__identity h2 {
    color: #113867;
    font-size: clamp(1.78rem, 7.5vw, 2.52rem);
    line-height: 1.42;
    font-weight: 950;
    letter-spacing: -.025em;
    margin: .1rem 0 .22rem !important;
  }
  .manahel-pwa-home__identity > p.manahel-pwa-home__slogan {
    display: block !important;
    box-sizing: border-box;
    width: min(100%, 34ch) !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-inline: 0 !important;
    direction: rtl;
    text-align: center !important;
    text-align-last: center !important;
    font-size: clamp(.85rem, 3.3vw, 1.02rem) !important;
    line-height: 1.9 !important;
    font-weight: 750;
    color: #395779;
  }
  .manahel-pwa-home__identity-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 17px;
    margin: .34rem auto .35rem;
  }
  .manahel-pwa-home__identity-rule::before,
  .manahel-pwa-home__identity-rule::after {
    content: '';
    height: 1px;
    flex: 1;
    background: #d8c49e;
  }
  .manahel-pwa-home__identity-rule span {
    width: 7px;
    height: 7px;
    background: #b99555;
    margin: 0 7px;
    border-radius: 2px;
    transform: rotate(45deg);
  }
  .manahel-pwa-home__intro {
    font-size: .77rem !important;
    line-height: 1.8 !important;
    color: #667991;
  }

  /* Istikhara is the single unmistakable primary action. */
  .manahel-pwa-home__feature {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: .7rem;
    min-height: 194px;
    width: 100%;
    margin-top: .8rem;
    padding: 1.05rem 1.18rem 1.1rem;
    color: white !important;
    background: linear-gradient(115deg, #0e315a 0%, #194d87 58%, #24679e 100%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 1.32rem;
    box-shadow: 0 14px 31px rgba(17,58,109,.19);
    -webkit-tap-highlight-color: transparent;
  }
  .manahel-pwa-home__feature::before,
  .manahel-pwa-home__feature::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
  }
  .manahel-pwa-home__feature::before {
    width: 190px;
    height: 190px;
    top: -100px;
    left: -70px;
    border: 1px solid rgba(255,239,203,.2);
    box-shadow: 0 0 0 20px rgba(255,255,255,.025), 0 0 0 48px rgba(255,255,255,.025);
  }
  .manahel-pwa-home__feature::after {
    width: 230px;
    height: 230px;
    bottom: -175px;
    right: -55px;
    border: 1px solid rgba(255,255,255,.12);
    background: radial-gradient(circle,rgba(80,156,230,.22),transparent 72%);
  }
  .manahel-pwa-home__feature-top,
  .manahel-pwa-home__feature-bottom,
  .manahel-pwa-home__feature-copy { position: relative; z-index: 1; }
  .manahel-pwa-home__feature-top { display: flex; justify-content: space-between; align-items: flex-start; }
  .manahel-pwa-home__feature-badge {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    color: #fff4d9;
    border: 1px solid rgba(239,205,141,.4);
    background: rgba(230,186,106,.13);
    padding: .22rem .7rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
  }
  .manahel-pwa-home__feature-badge > span { color: #f7d58d; }
  .manahel-pwa-home__feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: #f4d8a0;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.23);
    border-radius: 15px;
    box-shadow: 0 5px 14px rgba(0,0,0,.1);
  }
  .manahel-pwa-home__feature-icon svg { width: 28px; height: 28px; }
  .manahel-pwa-home__feature-copy { display: flex; flex-direction: column; gap: .17rem; text-align: right; }
  .manahel-pwa-home__feature-copy strong { color: #fff; font-size: clamp(1.65rem, 6.5vw, 2.1rem); font-weight: 900; line-height: 1.35; }
  .manahel-pwa-home__feature-copy > span { max-width: 36ch; color: #e2edfb; font-size: .89rem; line-height: 1.8; font-weight: 550; }
  .manahel-pwa-home__feature-bottom {
    display: flex;
    gap: .6rem;
    align-items: center;
    justify-content: space-between;
    color: #183f68;
    background: #fff;
    border-radius: .82rem;
    padding: .68rem .8rem;
    font-size: .9rem;
    line-height: 1.5;
    font-weight: 900;
    margin-top: .25rem;
  }
  .manahel-pwa-home__feature-arrow {
    display: grid;
    place-items: center;
    background: #e8f1fb;
    color: #174a80;
    border-radius: .57rem;
    width: 32px;
    height: 32px;
  }
  .manahel-pwa-home__feature-arrow svg { width: 19px; height: 19px; }

  .manahel-pwa-home__section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding: .15rem .2rem 0;
    margin: 1.25rem 0 .7rem;
  }
  .manahel-pwa-home__section-kicker { display: block; font-size: .7rem; font-weight: 750; color: #9b7b47; margin-bottom: .14rem; }
  .manahel-pwa-home__section-head h3 {
    font-size: clamp(1.15rem, 4.5vw, 1.45rem);
    font-weight: 950;
    line-height: 1.5;
    color: #123a67;
  }
  .manahel-pwa-home__section-mark { font-size: .7rem; color: #c7af82; letter-spacing: 2px; margin-bottom: .4rem; }

  /* Spacious native-app-style service tiles; always two columns on phones. */
  .manahel-pwa-home__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
  }
  .manahel-pwa-home__card {
    --mh-accent: #215b9b;
    --mh-chip: #eaf2fc;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: flex-start;
    min-width: 0;
    min-height: 180px;
    gap: .42rem;
    padding: 1rem .85rem .78rem;
    border-radius: 1.16rem;
    border: 1px solid #e0e8f2;
    background: #fff;
    color: #163658 !important;
    box-shadow: 0 6px 16px rgba(18,57,96,.04);
    -webkit-tap-highlight-color: transparent;
  }
  .manahel-pwa-home__card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: .18rem;
    flex: 0 0 auto;
    border-radius: 15px;
    background: var(--mh-chip);
    color: var(--mh-accent);
  }
  .manahel-pwa-home__card-icon svg { width: 25px; height: 25px; stroke-width: 1.65; }
  .manahel-pwa-home__card-icon img { width: 29px; height: 29px; object-fit: contain; border-radius: 6px; }
  .manahel-pwa-home__card strong {
    display: block;
    color: #16395c;
    font-size: clamp(.91rem, 3.5vw, 1.12rem);
    line-height: 1.55;
    font-weight: 900;
    text-align: right;
  }
  .manahel-pwa-home__card-description {
    display: block;
    min-height: 2.8em;
    color: #69798a;
    font-size: clamp(.72rem, 2.7vw, .81rem);
    line-height: 1.7;
    text-align: right;
  }
  .manahel-pwa-home__card-more {
    display: grid;
    place-items: center;
    position: absolute;
    bottom: .67rem;
    left: .72rem;
    width: 25px;
    height: 25px;
    border-radius: 8px;
    color: var(--mh-accent);
    background: var(--mh-chip);
  }
  .manahel-pwa-home__card-more svg { width: 16px; height: 16px; }
  .manahel-pwa-home__card--green { --mh-accent: #2f7765; --mh-chip: #e7f4ed; }
  .manahel-pwa-home__card--teal { --mh-accent: #207b7b; --mh-chip: #e4f5f4; }
  .manahel-pwa-home__card--amber { --mh-accent: #997031; --mh-chip: #fff4df; }
  .manahel-pwa-home__card--purple { --mh-accent: #6e5698; --mh-chip: #f1eafa; }
  .manahel-pwa-home__card--rose { --mh-accent: #a05873; --mh-chip: #fcecf2; }
  .manahel-pwa-home__card--slate { --mh-accent: #516d88; --mh-chip: #eaf0f6; }
  .manahel-pwa-home__card--channel { --mh-accent: #b17b25; --mh-chip: #fff6e8; }
  .manahel-pwa-home__card:active, .manahel-pwa-home__feature:active { transform: scale(.99); }
  @media (hover:hover) {
    .manahel-pwa-home__card, .manahel-pwa-home__feature { transition: transform .18s ease, box-shadow .18s ease; }
    .manahel-pwa-home__card:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(18,57,96,.10); }
    .manahel-pwa-home__feature:hover { transform: translateY(-2px); box-shadow: 0 18px 35px rgba(17,58,109,.26); }
  }

  .manahel-pwa-home__closing {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .68rem .8rem;
    align-items: start;
    margin-top: 1rem;
    border: 1px solid #e8deca;
    background: linear-gradient(135deg, #fffdf8, #f9f5ec);
    border-radius: 1.1rem;
    padding: .98rem .93rem;
  }
  .manahel-pwa-home__closing-symbol {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    background: #f3e7ce;
    border-radius: 12px;
    color: #9e7a3b;
    font-size: 19px;
  }
  .manahel-pwa-home__closing strong { display: block; font-size: .89rem; line-height: 1.6; color: #624d2d; }
  .manahel-pwa-home__closing p { font-size: .75rem !important; line-height: 1.85 !important; color: #736651; margin-top: .2rem !important; }
  .manahel-pwa-home__closing-actions { display: flex; gap: .48rem; grid-column: 1 / -1; }
  .manahel-pwa-home__closing-actions a,
  .manahel-pwa-home__closing-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    border-radius: .7rem;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.5;
    padding: .4rem .3rem;
    cursor: pointer;
  }
  .manahel-pwa-home__closing-actions a { color: #fff; background: #16477a; border: 1px solid #16477a; }
  .manahel-pwa-home__closing-actions button { color: #16477a; background: #fff; border: 1px solid #cad9e6; }
  .manahel-pwa-home__closing-actions button svg { height: 18px; width: 18px; }
  .manahel-pwa-home__closing-actions button small { font-size: inherit; font-weight: inherit; line-height: inherit; }
  .manahel-pwa-home__closing-actions button:disabled { opacity: .62; cursor: default; }
  .manahel-pwa-home__footnote { color: #8290a0; font-size: .72rem !important; text-align: center; margin: 1rem 0 0 !important; }

  /* The shared fixed dock sits above native OS navigation with safe-area room. */
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-bottom-nav {
    z-index: 99980;
  }
}

@media (min-width: 630px) and (max-width: 1024px) {
  .manahel-pwa-home__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .manahel-pwa-home__card { min-height: 180px; padding-inline: 1rem; }
  .manahel-pwa-home__identity { padding-block: 1.6rem; }
  .manahel-pwa-home__feature { min-height: 195px; }
}

@media (max-width: 359px) {
  body.page-id-17.manahel-istikhara-app-mode .entry-content {
    width: calc(100% - 14px) !important;
  }
  .manahel-pwa-home__identity { padding-inline: .55rem; }
  .manahel-pwa-home__card { min-height: 185px; padding-inline: .65rem; }
  .manahel-pwa-home__grid { gap: .46rem; }
  .manahel-pwa-home__card-description { font-size: .7rem; }
}


/* All home-page content remains in its card/section, but is centered within it.
   The app order, column structure, touch areas and overall card locations stay intact. */
@media (max-width: 1024px) {
  .manahel-pwa-home,
  .manahel-pwa-home__identity,
  .manahel-pwa-home__section-head,
  .manahel-pwa-home__feature,
  .manahel-pwa-home__card,
  .manahel-pwa-home__closing,
  .manahel-pwa-home__footnote { text-align: center !important; text-align-last: center !important; }

  .manahel-pwa-home__feature-top {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
  }
  .manahel-pwa-home__feature-copy {
    align-items: center;
    text-align: center !important;
  }
  .manahel-pwa-home__feature-copy > span {
    margin-inline: auto;
    text-align: center !important;
  }
  .manahel-pwa-home__feature-bottom {
    justify-content: center;
    gap: .65rem;
    text-align: center !important;
  }
  .manahel-pwa-home__section-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  .manahel-pwa-home__section-head > div,
  .manahel-pwa-home__section-kicker { text-align: center !important; width: 100%; }
  .manahel-pwa-home__section-mark { margin: 0 auto .12rem; }
  .manahel-pwa-home__card {
    align-items: center;
    padding-bottom: 2.85rem;
  }
  .manahel-pwa-home__card-icon { margin-inline: auto; }
  .manahel-pwa-home__card strong,
  .manahel-pwa-home__card-description {
    width: 100%;
    text-align: center !important;
    text-align-last: center !important;
  }
  .manahel-pwa-home__card-more {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .manahel-pwa-home__closing {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-items: center;
  }
  .manahel-pwa-home__closing-symbol { margin-inline: auto; }
  .manahel-pwa-home__closing > div:not(.manahel-pwa-home__closing-actions),
  .manahel-pwa-home__closing strong,
  .manahel-pwa-home__closing p { text-align: center !important; }
  .manahel-pwa-home__closing-actions {
    grid-column: 1;
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .manahel-pwa-home__card, .manahel-pwa-home__feature { transition: none !important; }
}

/* 2026 PWA home — reference-inspired compact, mobile-first application design.
   Only page 17 in app mode. Desktop/site SEO markup remain unchanged. */
@media (max-width:1024px) {
  html:has(body.page-id-17.manahel-istikhara-app-mode) {
    background:#f0f5fc;
  }
  body.page-id-17.manahel-istikhara-app-mode {
    padding-top:calc(116px + env(safe-area-inset-top,0px)) !important;
    padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)) !important;
    background:#f0f5fc !important;
  }
  body.page-id-17.manahel-istikhara-app-mode .entry-content {
    width:min(calc(100% - 20px),46rem) !important;
    max-width:46rem !important;
  }
  /* Large but non-sticky brand header, already attached to the shared PWA shell. */
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar {
    position:absolute !important;
    inset:calc(8px + env(safe-area-inset-top,0px)) 10px auto 10px !important;
    min-height:96px;
    padding:13px 18px !important;
    border-radius:25px !important;
    background:linear-gradient(112deg,#1155ab 2%,#1f63c3 57%,#0e4d9e 100%) !important;
    box-shadow:0 5px 13px rgba(22,70,125,.13);
  }
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar::before {
    content:"";
    position:absolute;
    inset:0 auto 0 10%;
    width:52%;
    opacity:.12;
    pointer-events:none;
    background:
      radial-gradient(ellipse 18px 31px at 39% 85%,#fff 98%,transparent 100%),
      radial-gradient(ellipse 30px 50px at 58% 90%,#fff 98%,transparent 100%),
      linear-gradient(to top,#fff 0 25%,transparent 25%),
      linear-gradient(to right,transparent 17%,#fff 18% 20%,transparent 21% 68%,#fff 69% 71%,transparent 72%);
    mask-image:linear-gradient(to top,black,transparent 95%);
  }
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar__brand {
    position:relative;
    z-index:1;
    min-height:66px;
    width:auto;
    max-width:calc(100% - 65px);
    justify-content:flex-start;
  }
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar__logo {
    width:clamp(145px,48vw,205px);
    max-height:61px;
    height:auto;
    object-fit:contain;
    background:none;
    box-shadow:none;
  }
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar__help.manahel-pwa-appbar__apps {
    z-index:2;
    left:16px;
    width:46px;
    height:46px;
    border-radius:16px;
    background:rgba(255,255,255,.13);
    border:1px solid rgba(255,255,255,.28);
    box-shadow:inset 0 1px rgba(255,255,255,.14);
  }
  /* A hamburger on the home page; the shared apps dialog remains fully functional. */
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar__apps svg {
    display:none;
  }
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-appbar__apps::before {
    content:"";
    display:block;
    width:22px;
    height:16px;
    border-top:2.5px solid #fff;
    border-bottom:2.5px solid #fff;
    background:linear-gradient(#fff,#fff) center/100% 2.5px no-repeat;
    border-radius:1px;
  }
  .manahel-pwa-home {
    padding:0 0 8px !important;
    text-align:right !important;
    text-align-last:right !important;
    color:#133b75;
  }
  /* White greeting banner and pale blue dome illustration. */
  .manahel-pwa-home__identity {
    display:flex;
    position:relative;
    align-items:center;
    justify-content:flex-start;
    text-align:right !important;
    text-align-last:right !important;
    isolation:isolate;
    width:100%;
    min-height:100px;
    padding:15px 18px 15px 39% !important;
    background:linear-gradient(100deg,#e9f3fc 0%,#fff 58%,#fff 100%) !important;
    border:0 !important;
    border-radius:22px !important;
    box-shadow:0 4px 13px rgba(17,57,115,.045) !important;
    overflow:hidden;
  }
  .manahel-pwa-home__identity::before,
  .manahel-pwa-home__identity::after,
  .manahel-pwa-home__identity-glow,
  .manahel-pwa-home__logo,
  .manahel-pwa-home__identity-rule { display:none !important; }
  .manahel-pwa-home__identity-art {
    position:absolute;
    z-index:-1;
    left:0;
    bottom:-5px;
    width:50%;
    height:108%;
    display:flex;
    align-items:flex-end;
    justify-content:flex-start;
    pointer-events:none;
    opacity:.88;
    mask-image:linear-gradient(to right,black 62%,transparent);
  }
  .manahel-pwa-home__identity-art svg {
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:bottom left;
  }
  .manahel-pwa-home__identity-content { width:100%; min-width:0; }
  .manahel-pwa-home__identity h2 {
    font-size:clamp(1.04rem,4.5vw,1.47rem) !important;
    line-height:1.55 !important;
    color:#092f69;
    font-weight:950;
    letter-spacing:0;
    text-align:right !important;
    text-align-last:right !important;
    margin:0 0 4px !important;
  }
  .manahel-pwa-home__identity p {
    display:block !important;
    font-size:clamp(.77rem,3vw,.98rem) !important;
    line-height:1.65 !important;
    color:#536a8f !important;
    text-align:right !important;
    text-align-last:right !important;
    margin:0 !important;
  }
  /* The primary istikhara card, with an illustrated lantern to its left. */
  .manahel-pwa-home__feature {
    display:flex !important;
    position:relative;
    flex-direction:column;
    gap:0 !important;
    align-items:stretch;
    justify-content:flex-start;
    overflow:hidden;
    width:100%;
    min-height:225px !important;
    padding:16px 17px 15px !important;
    margin:10px 0 0 !important;
    background:linear-gradient(115deg,#0d3978 0%,#0e4a9a 48%,#1468c8 100%) !important;
    color:white !important;
    border:0 !important;
    border-radius:22px !important;
    box-shadow:0 7px 17px rgba(5,54,119,.12) !important;
    text-align:right !important;
    text-align-last:right !important;
  }
  .manahel-pwa-home__feature::before {
    width:62% !important;
    height:120% !important;
    top:-20% !important;
    left:-20% !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:radial-gradient(ellipse at 20% 70%,rgba(62,143,217,.35),transparent 63%) !important;
  }
  .manahel-pwa-home__feature::after {
    width:100%;
    height:100%;
    inset:0;
    border:0;
    border-radius:0;
    background:
      radial-gradient(circle at 45% 19%,#ffdb8d 0 1.5px,transparent 2px),
      radial-gradient(circle at 57% 39%,#ffdb8d 0 1.5px,transparent 2px),
      radial-gradient(circle at 18% 37%,#ffe8b6 0 1px,transparent 2px);
    opacity:.75;
  }
  .manahel-pwa-home__feature-art {
    position:absolute;
    z-index:0;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    left:-2%;
    bottom:24px;
    width:47%;
    height:95%;
    pointer-events:none;
    opacity:.96;
  }
  .manahel-pwa-home__feature-art svg { width:100%; height:100%; }
  .manahel-pwa-home__feature-top {
    display:flex;
    justify-content:flex-start !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
    gap:8px !important;
    margin-right:0;
    margin-left:auto;
    max-width:100%;
  }
  .manahel-pwa-home__feature-badge {
    order:2;
    font-size:.75rem;
    font-weight:750;
    border:1px solid rgba(255,255,255,.16);
    color:#eff7ff;
    background:rgba(255,255,255,.12);
    border-radius:25px;
    padding:6px 12px;
  }
  .manahel-pwa-home__feature-icon {
    order:1;
    width:39px;
    height:39px;
    border-radius:50%;
    box-shadow:none;
  }
  .manahel-pwa-home__feature-icon svg { width:25px; height:25px; }
  .manahel-pwa-home__feature-copy {
    display:flex;
    align-items:flex-start !important;
    gap:6px !important;
    max-width:68%;
    padding-top:18px;
    margin:0 0 0 auto;
    text-align:right !important;
    text-align-last:right !important;
  }
  .manahel-pwa-home__feature-copy strong {
    color:white !important;
    font-size:clamp(2rem,8vw,2.8rem);
    font-weight:950;
    line-height:1.25;
    text-align:right;
  }
  .manahel-pwa-home__feature-copy > span {
    color:#e7f0ff;
    font-size:clamp(.8rem,3.2vw,1.02rem);
    line-height:1.9;
    text-align:right !important;
    text-align-last:right !important;
    margin:0 !important;
    max-width:100%;
  }
  .manahel-pwa-home__feature-bottom {
    display:flex;
    align-items:center;
    justify-content:center !important;
    flex-direction:row;
    gap:10px;
    min-height:47px;
    width:72%;
    margin:14px 0 0 auto !important;
    padding:7px 11px !important;
    background:#fff;
    color:#1556ab;
    border-radius:14px;
    font-size:clamp(.91rem,3.5vw,1.1rem);
    box-shadow:0 2px 6px rgba(0,0,0,.05);
  }
  .manahel-pwa-home__feature-arrow {
    width:29px; height:29px;
    border-radius:50%;
    background:#eaf3ff;
    order:1;
  }
  /* One compact, four-column services directory on normal phones. */
  .manahel-pwa-home__grid {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:7px !important;
    margin:9px 0 0 !important;
    scroll-margin-top:15px;
  }
  .manahel-pwa-home__card {
    display:flex;
    flex-direction:column;
    align-items:center !important;
    justify-content:flex-start;
    gap:5px !important;
    width:100%;
    min-width:0;
    min-height:118px !important;
    padding:11px 4px 10px !important;
    border-radius:16px !important;
    border:1px solid rgba(229,236,246,.65) !important;
    background:#fff !important;
    box-shadow:0 3px 12px rgba(12,62,131,.045) !important;
    text-align:center !important;
    text-align-last:center !important;
  }
  .manahel-pwa-home__card-icon {
    display:grid;
    place-items:center;
    flex:0 0 auto;
    width:46px; height:46px;
    margin:0 0 1px !important;
    border-radius:50%;
    background:var(--mh-chip);
    color:var(--mh-accent);
  }
  .manahel-pwa-home__card-icon svg { width:25px; height:25px; }
  .manahel-pwa-home__card-icon img { width:28px;height:28px; }
  .manahel-pwa-home__card strong {
    min-height:1.6em;
    width:100%;
    margin:0 !important;
    font-size:clamp(.65rem,2.65vw,.87rem) !important;
    line-height:1.55;
    color:#10386c;
    font-weight:950;
    text-align:center !important;
    text-align-last:center !important;
    overflow-wrap:anywhere;
  }
  .manahel-pwa-home__card-description {
    display:block;
    min-height:0;
    width:100%;
    margin:0 !important;
    font-size:clamp(.58rem,2.28vw,.73rem) !important;
    line-height:1.65;
    color:#8190a7;
    text-align:center !important;
    text-align-last:center !important;
  }
  .manahel-pwa-home__card-more { display:none !important; }
  .manahel-pwa-home__card--teal { --mh-accent:#118988; --mh-chip:#e2f7f5; }
  .manahel-pwa-home__card--blue { --mh-accent:#1f63c3; --mh-chip:#eaf3fe; }
  .manahel-pwa-home__card--green { --mh-accent:#12805b; --mh-chip:#e8f7ef; }
  .manahel-pwa-home__card--amber { --mh-accent:#b77917; --mh-chip:#fff3df; }
  .manahel-pwa-home__card--slate { --mh-accent:#1b63af; --mh-chip:#e9f2ff; }
  .manahel-pwa-home__card--channel { --mh-accent:#e08014; --mh-chip:#fff1de; }
  .manahel-pwa-home__card--purple { --mh-accent:#6747b5; --mh-chip:#f2edff; }
  .manahel-pwa-home__card--rose { --mh-accent:#b83a7c; --mh-chip:#fff0f7; }
  /* Installation reminder, deliberately using the existing PWA install behavior. */
  .manahel-pwa-home__closing {
    display:grid !important;
    grid-template-columns:45px minmax(0,1fr) auto !important;
    align-items:center !important;
    justify-items:stretch !important;
    gap:9px !important;
    padding:12px 13px !important;
    min-height:73px;
    margin:12px 0 0 !important;
    border-radius:16px !important;
    border:1px solid rgba(234,222,200,.75) !important;
    background:linear-gradient(115deg,#fff4e2,#fffaf0) !important;
    text-align:right !important;
    text-align-last:right !important;
  }
  .manahel-pwa-home__closing-symbol {
    display:grid;
    place-items:center;
    height:43px; width:43px;
    padding:0;
    margin:0 !important;
    border-radius:14px;
    border:1px solid #fff;
    background:rgba(255,255,255,.45);
    color:#185aad;
  }
  .manahel-pwa-home__closing-symbol svg { width:25px; height:25px; }
  .manahel-pwa-home__closing-copy,
  .manahel-pwa-home__closing-copy :is(strong,p) {
    margin:0 !important;
    text-align:right !important;
    text-align-last:right !important;
    min-width:0;
  }
  .manahel-pwa-home__closing-copy strong {
    display:block;
    color:#182a40;
    font-size:clamp(.72rem,2.8vw,.91rem);
    font-weight:950;
    line-height:1.5;
  }
  .manahel-pwa-home__closing-copy p {
    margin-top:4px !important;
    font-size:clamp(.61rem,2.25vw,.77rem) !important;
    line-height:1.6 !important;
    color:#76859a;
  }
  .manahel-pwa-home__closing-actions {
    display:flex !important;
    grid-column:auto !important;
    width:auto !important;
    margin:0 !important;
  }
  .manahel-pwa-home__closing-actions button {
    display:flex;
    align-items:center;
    gap:6px;
    justify-content:center;
    width:auto;
    min-width:80px;
    min-height:44px;
    padding:8px 10px;
    border:0;
    border-radius:12px;
    background:#1F63C3;
    color:#fff;
    font-size:clamp(.68rem,2.4vw,.86rem);
    font-weight:850;
    white-space:nowrap;
    box-shadow:none;
  }
  .manahel-pwa-home__closing-actions button svg { width:17px;height:17px; }
  .manahel-pwa-home__footnote { margin:9px 0 0 !important; text-align:center !important; text-align-last:center !important; font-size:.7rem !important; }
  .manahel-pwa-home__footnote a { color:#6f87a5; text-decoration:underline !important; }
  /* Keep the working shared navigation but match the reference's airy white dock. */
  body.page-id-17.manahel-istikhara-app-mode .manahel-pwa-bottom-nav {
    background:#fff;
    border:1px solid #edf1f7;
    border-radius:21px 21px 0 0;
    box-shadow:0 -5px 22px rgba(21,63,112,.08);
  }
}
@media (max-width:359px) {
  .manahel-pwa-home__grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:4px !important; }
  .manahel-pwa-home__card { padding:9px 2px !important; }
  .manahel-pwa-home__card strong { font-size:.63rem !important; }
  .manahel-pwa-home__card-description { font-size:.55rem !important; }
  .manahel-pwa-home__card-icon { width:39px; height:39px; }
  .manahel-pwa-home__identity { padding-right:12px !important; }
  .manahel-pwa-home__feature-copy { max-width:72%; }
  .manahel-pwa-home__closing { grid-template-columns:36px minmax(0,1fr) auto !important;gap:5px !important;padding:10px 8px !important; }
  .manahel-pwa-home__closing-symbol { width:36px;height:40px; }
  .manahel-pwa-home__closing-actions button { min-width:72px; padding-inline:6px; }
}
@media (min-width:630px) and (max-width:1024px) {
  .manahel-pwa-home__card { min-height:145px !important; padding:18px 10px !important; }
  .manahel-pwa-home__feature { min-height:256px !important; }
  .manahel-pwa-home__identity { min-height:120px; }
}
@media (prefers-reduced-motion:reduce) {
  .manahel-pwa-home__card, .manahel-pwa-home__feature { transition:none !important; }
}
