/* /khalwati-public-assets/fonts/khalwati-fonts-02.css */
/* Khalwati 02 — local font shared with Flutter V123. No external font request. */
@font-face{font-family:'Tajawal';font-style:normal;font-weight:400;font-display:swap;src:url('/khalwati-public-assets/fonts/Tajawal-Regular.woff2') format('woff2')}

/* /khalwati-public-assets/site-v10-recovery.css */
/* Khalwati V10 — cross-site responsive containment and rendering safeguards */
:root{--kh-v10-safe-inline:12px}
html{
  width:100%;
  max-width:100%;
  overflow-x:clip;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:clip;
  overflow-wrap:anywhere;
}
*,*::before,*::after{box-sizing:border-box}
main,header,footer,section,article,aside,nav,form,
.container,.header-inner,.footer-inner,.section-head,.library-shell,.library-tools,
.home-hero-grid,.dashboard-grid,.books-grid,.simple-grid,.detail-grid,.facts,
.audio-grid,.audio-card,.audio-card-main,.audio-card-summary,.audio-inline-player,
.live-r7-shell,.live-r7-hero,.live-r7-stage,.live-r7-info,
.about-story,.about-copy,.about-source-card,.tasawwuf-grid,.tasawwuf-summary{
  min-width:0;
  max-width:100%;
}
img,svg,video,canvas,iframe{
  max-width:100%;
}
img,video{height:auto}
iframe{border:0}
input,select,textarea,button{max-width:100%;font:inherit}
pre,code{max-width:100%}
pre{overflow:auto}
table{max-width:100%}
.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.filters,.audio-category-filters{
  max-width:100%;
}
.book-card,.simple-card,.dash-card,.fact,.community-card,.app-feature{
  min-width:0;
}
@supports not (overflow:clip){
  html,body{overflow-x:hidden}
}
@media(max-width:720px){
  body{min-width:0}
  .container,.live-r7-shell{
    max-width:100%;
  }
  .site-header,.site-footer,main{
    width:100%;
    max-width:100%;
  }
  .header-inner,.footer-inner{
    min-width:0;
  }
  .nav-links,.footer-links{
    max-width:100%;
  }
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* /khalwati-public-assets/site-v11-36-polish.css */
/* Khalwati V11.36 — conservative final polish
   Deliberately does NOT redesign existing pages or PDF reader. */
html{min-width:0}
@supports (overflow:clip){html{overflow-x:clip}}
body{min-width:0}
img,video{max-inline-size:100%}
button,input,select,textarea,a{-webkit-tap-highlight-color:transparent}
:focus-visible{outline:2px solid #0b6758;outline-offset:3px}
@media (prefers-reduced-motion:reduce){
  html:focus-within{scroll-behavior:auto!important}
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* /khalwati-public-assets/library-pearls-v1150.css */
/* Khalwati V11.50 — The Pearls collection. Library page only. */
.library-page-ui3 .library-shell #kh-library-pref{display:none!important}
.library-page-ui3 .library-shell .books-grid>.kh-pearls-feature,
.library-page-ui3 .library-shell .books-grid>.kh-pearls-divider{grid-column:1/-1;min-width:0}
.library-page-ui3 .library-shell .books-grid>.kh-pearls-feature{order:-2}
.library-page-ui3 .library-shell .books-grid>.book-card[data-core-book="1"]{order:-1}
.library-page-ui3 .library-shell .books-grid>.kh-pearls-divider{order:0}
.library-page-ui3 .library-shell .books-grid>.book-card:not([data-core-book="1"]){order:1}
.library-page-ui3 .kh-pearls-feature{background:var(--paper,#fffdf8);border:1px solid var(--line,#e6d6ae);border-inline-start:4px solid var(--gold,#c99a37);border-radius:22px;box-shadow:0 6px 20px rgba(56,41,10,.04);padding:clamp(15px,2.8vw,26px);display:flex;flex-wrap:wrap;align-items:center;gap:16px;direction:rtl;min-width:0}
.library-page-ui3 .kh-pearls-icon{flex:0 0 66px;width:66px;height:66px;border-radius:17px;display:grid;place-items:center;background:#edf4ef;color:var(--green,#07583d);border:1px solid rgba(7,88,61,.09)}
.library-page-ui3 .kh-pearls-icon svg{width:35px;height:35px;stroke-width:1.65}
.library-page-ui3 .kh-pearls-copy{flex:1 1 300px;min-width:0}
.library-page-ui3 .kh-pearls-kicker{display:block;color:#97712b;font-weight:800;font-size:.84rem;line-height:1.5;margin-bottom:3px}
.library-page-ui3 .kh-pearls-copy h2{font-family:inherit;font-size:clamp(1.18rem,2.1vw,1.55rem);line-height:1.45;color:var(--ink,#153d32);margin:0 0 5px;overflow-wrap:anywhere}
.library-page-ui3 .kh-pearls-copy p{font-family:inherit;color:var(--muted,#6e746e);font-size:.94rem;line-height:1.65;margin:0}
.library-page-ui3 .kh-pearls-action{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 19px;border:1px solid var(--green,#07583d);background:var(--green,#07583d);color:#fff;border-radius:14px;font:inherit;font-weight:800;cursor:pointer;transition:background .18s ease,transform .18s ease}
.library-page-ui3 .kh-pearls-action:hover{background:var(--deep,#043c2a);transform:translateY(-1px)}
.library-page-ui3 .kh-pearls-action:focus-visible{outline:3px solid var(--gold,#c99a37);outline-offset:3px}
.library-page-ui3 .kh-pearls-action svg{width:17px;height:17px;transition:transform .2s ease}
.library-page-ui3 .kh-pearls-action[aria-expanded="false"] svg{transform:rotate(180deg)}
.library-page-ui3 .kh-pearls-divider{display:flex;align-items:center;gap:14px;padding:15px 4px 2px;margin-top:4px;border-top:1px solid var(--line,#e6d6ae);color:var(--green,#07583d);font-size:1.13rem;font-weight:800;line-height:1.5}
.library-page-ui3 .kh-pearls-divider small{color:var(--muted,#6e746e);font-size:.78rem;font-weight:600}
/* The original category/search browser keeps ownership of [hidden] and the card data. */
.library-page-ui3 .library-shell:not(.kh-category-focused):not(.kh-pearls-searching) .books-grid.kh-pearls-collapsed>.book-card[data-core-book="1"]{display:none!important}
.library-page-ui3 .library-shell.kh-category-focused .kh-pearls-feature,
.library-page-ui3 .library-shell.kh-category-focused .kh-pearls-divider,
.library-page-ui3 .library-shell.kh-pearls-searching .kh-pearls-feature,
.library-page-ui3 .library-shell.kh-pearls-searching .kh-pearls-divider{display:none!important}
@media(max-width:640px){
  .library-page-ui3 .kh-pearls-feature{gap:11px;padding:15px;border-radius:18px;border-inline-start-width:3px}
  .library-page-ui3 .kh-pearls-icon{flex-basis:52px;width:52px;height:52px;border-radius:13px}
  .library-page-ui3 .kh-pearls-icon svg{width:28px;height:28px}
  .library-page-ui3 .kh-pearls-copy{flex:1 1 calc(100% - 68px)}
  .library-page-ui3 .kh-pearls-copy h2{font-size:clamp(1.05rem,4.5vw,1.25rem)}
  .library-page-ui3 .kh-pearls-copy p{font-size:.87rem}
  .library-page-ui3 .kh-pearls-action{flex:1 1 100%;width:100%;min-height:46px}
  .library-page-ui3 .kh-pearls-divider{font-size:1rem;flex-wrap:wrap;gap:5px 10px}
}
@media(prefers-reduced-motion:reduce){.library-page-ui3 .kh-pearls-action,.library-page-ui3 .kh-pearls-action svg{transition:none!important}}

.library-page-ui3 .kh-pearls-divider[hidden]{display:none!important}

/* /khalwati-public-assets/kh-sawati-v2.css */
/* Compact collection; scoped to the added feature. Uses the site's own tokens. */
.library-shell .kh-sawati-feature{margin:0 0 24px;color:var(--ink,#153d32);font-family:inherit}
.library-shell .kh-sawati-feature[hidden],.library-shell .kh-sawati-feature [hidden]{display:none!important}
.library-shell .kh-sawati-feature-top{display:flex;align-items:center;gap:22px;padding:22px 24px;border:1px solid var(--line,#e6d6ae);border-inline-start:4px solid var(--gold,#c99a37);border-radius:18px;background:var(--paper,#fffdf8);box-shadow:0 6px 20px rgba(56,41,10,.04)}
.library-shell .kh-sawati-cover{flex:0 0 78px;align-self:center}
.library-shell .kh-sawati-cover img{display:block;width:78px;height:104px;object-fit:contain;border-radius:5px;box-shadow:0 5px 12px #043c2a20}
.library-shell .kh-sawati-feature-copy{flex:1;min-width:0}
.library-shell .kh-sawati-eyebrow{display:block;color:#826123;font-size:.78rem;font-weight:700;margin-bottom:4px}
.library-shell .kh-sawati-feature h2{font-size:clamp(1.15rem,2.1vw,1.6rem);color:var(--deep,#043c2a);line-height:1.6;margin:0 0 4px;text-wrap:balance}
.library-shell .kh-sawati-feature-copy p{font-size:.85rem;color:var(--muted,#6e746e);margin:0 0 9px;line-height:1.7}
.library-shell .kh-sawati-count{display:inline-block;font-size:.78rem;font-weight:700;color:var(--green,#07583d);border-radius:999px;background:#07583d0a;padding:3px 10px}
.library-shell .kh-sawati-view-toggle{flex-shrink:0;min-height:46px;max-width:100%;padding:10px 18px;border:1px solid var(--green,#07583d);border-radius:12px;font:inherit;font-size:.88rem;font-weight:700;line-height:1.5;background:var(--green,#07583d);color:#fff;cursor:pointer}
.library-shell .kh-sawati-view-toggle:hover{background:var(--deep,#043c2a)}
.library-shell .kh-sawati-view-toggle:focus-visible,.library-shell .kh-sawati-search input:focus-visible{outline:3px solid var(--gold,#c99a37);outline-offset:3px}
.library-shell .kh-sawati-collection-body{padding-top:24px}
.library-shell .kh-sawati-group-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.library-shell .kh-sawati-group-head h3{font-size:1.12rem;margin:0;color:var(--deep,#043c2a)}
.library-shell .kh-sawati-search{display:grid;gap:5px;font-size:.8rem;color:var(--ink,#153d32);width:min(320px,100%)}
.library-shell .kh-sawati-search input{width:100%;min-width:0;min-height:44px;padding:9px 12px;font:inherit;font-size:.95rem;border:1px solid var(--line,#e6d6ae);border-radius:12px;background:var(--paper,#fffdf8);color:inherit}
.library-shell .kh-sawati-results{font-size:.8rem;color:var(--muted,#6e746e);margin:14px 0}
.library-shell .kh-sawati-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;align-items:stretch}
.library-shell .kh-sawati-grid>.book-card{min-width:0;display:flex;flex-direction:column;height:100%;content-visibility:visible}
.library-shell .kh-sawati-grid .book-cover-wrap{width:min(100%,140px);aspect-ratio:3/4;height:auto;margin-inline:auto;overflow:hidden}
.library-shell .kh-sawati-grid .book-cover-wrap img{display:block;width:100%;height:100%;object-fit:contain}
.library-shell .kh-sawati-grid h3{white-space:normal;overflow-wrap:anywhere}
.library-shell.kh-sawati-open .library-tools,.library-shell.kh-sawati-open .kh-lib-pref,.library-shell.kh-sawati-open .kh-library-search,.library-shell.kh-sawati-open .books-grid,.library-shell.kh-sawati-open #emptyLibrary,.library-shell.kh-sawati-open .kh-category-focus{display:none!important}
@media(max-width:1000px){.library-shell .kh-sawati-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.library-shell .kh-sawati-feature-top{display:grid;grid-template-columns:60px minmax(0,1fr);gap:14px;padding:16px;border-radius:17px}.library-shell .kh-sawati-cover{width:60px}.library-shell .kh-sawati-cover img{width:60px;height:80px}.library-shell .kh-sawati-view-toggle{grid-column:1/-1;width:100%}.library-shell .kh-sawati-eyebrow{font-size:.72rem}.library-shell .kh-sawati-feature-copy p{font-size:.78rem}.library-shell .kh-sawati-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.library-shell .kh-sawati-group-head{align-items:stretch;flex-direction:column;gap:12px}.library-shell .kh-sawati-search{width:100%}.library-shell .kh-sawati-feature{margin-bottom:18px}}

.library-shell.kh-sawati-open .kh-category-status,.library-shell.kh-sawati-open .kh-category-bottom-back{display:none!important}

/* /khalwati-public-assets/library-r4.css */
/* R4: responsive refinement scoped to the library, preserving the site shell. */
.library-shell{--kh-r4-ink:#103e32;--kh-r4-muted:#69756a;--kh-r4-edge:#e7dbc1}
.library-shell .section-head{margin-bottom:22px!important;align-items:center!important}
.library-shell .section-head h1,.library-shell .section-head h2{color:var(--kh-r4-ink);font-size:clamp(1.45rem,2.3vw,1.9rem);line-height:1.5}
.library-shell .section-head p{font-size:.88rem;line-height:1.7;color:var(--kh-r4-muted)}
.library-shell .kh-sawati-feature-top{display:grid!important;grid-template-columns:92px minmax(0,1fr) auto!important;gap:24px!important;padding:24px 28px!important;border:1px solid #d6decd!important;border-inline-start:4px solid #a48036!important;border-radius:22px!important;background:linear-gradient(112deg,#fffdf8 0%,#f6f6ed 65%,#edf2e8 100%)!important;box-shadow:0 8px 24px #123e3208!important;align-items:center!important}
.library-shell .kh-sawati-cover{width:92px!important}
.library-shell .kh-sawati-cover img{width:92px!important;height:122px!important;object-fit:contain!important;border-radius:5px!important;box-shadow:0 8px 14px #133d3224!important}
.library-shell .kh-sawati-eyebrow{font-size:.79rem!important;letter-spacing:0;color:#7b612c!important;margin-bottom:7px!important}
.library-shell .kh-sawati-feature h2{font-size:clamp(1.22rem,2vw,1.7rem)!important;line-height:1.65!important;margin-bottom:6px!important;font-weight:800!important;color:#0a503c!important;overflow-wrap:break-word}
.library-shell .kh-sawati-feature-copy p{font-size:.86rem!important;line-height:1.8!important;color:#677464!important;margin:0!important}
.library-shell .kh-sawati-view-toggle{width:auto!important;min-height:46px!important;padding:11px 20px!important;border:1px solid #08533d!important;border-radius:13px!important;background:linear-gradient(#0c664c,#07553e)!important;box-shadow:0 3px 0 #043d2d!important;font-size:.89rem!important;grid-column:auto!important}
.library-shell .kh-sawati-view-toggle:hover{background:#064c38!important}
.library-shell .kh-library-search{display:block!important;width:min(580px,100%)!important;max-width:none!important;margin:24px 0 16px!important;text-align:start!important}
.library-shell .kh-library-search>span:not(.sr-only){display:block!important;font-size:.82rem!important;font-weight:700!important;margin-bottom:7px!important;color:#536c5c!important}
.library-shell .kh-library-search input{height:auto!important;min-height:48px!important;border:1px solid #d3dcca!important;border-radius:14px!important;padding:10px 15px!important;font-size:16px!important;background:#fffefb!important;color:var(--kh-r4-ink)!important;box-shadow:0 2px 7px #173f3104!important}
.library-shell .kh-library-search input:focus{border-color:#17694e!important;box-shadow:0 0 0 3px #17694e18!important}
.library-shell .library-tools.kh-filters-only{margin-bottom:16px!important}
.library-shell .library-tools.kh-filters-only .filters{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;min-width:0!important}
.library-shell .library-tools.kh-filters-only .filter{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;padding:10px 13px!important;min-height:48px!important;border:1px solid var(--kh-r4-edge)!important;border-radius:13px!important;background:#fffdf8!important;color:var(--kh-r4-ink)!important;text-align:start!important;box-shadow:0 2px 3px #59451403!important;white-space:normal!important}
.library-shell .library-tools.kh-filters-only .filter .kh-filter-label{font-size:.86rem!important;line-height:1.6!important;font-weight:700!important;overflow-wrap:break-word!important}
.library-shell .library-tools.kh-filters-only .filter .kh-filter-count{display:grid!important;place-items:center!important;min-width:25px!important;height:25px!important;padding:0 6px!important;border-radius:9px!important;background:#f1eddf!important;color:#776034!important;font-size:.73rem!important;opacity:1!important}
.library-shell .library-tools.kh-filters-only .filter.active{border-color:#0b6047!important;background:#0b6047!important;color:#fff!important;box-shadow:0 3px 8px #0b604718!important}
.library-shell .library-tools.kh-filters-only .filter.active .kh-filter-count{color:#fff!important;background:#ffffff24!important}
.library-shell .library-tools.kh-filters-only .filter:not(.active):hover{border-color:#b7c8b4!important;background:#f5f7f0!important}
.library-shell .kh-lib-pref{min-height:58px!important;margin:16px 0 22px!important;padding:10px 14px!important;gap:10px!important;grid-template-columns:34px minmax(0,1fr) auto!important;border-radius:14px!important;background:#f6f5ed!important;border:1px solid #e5ddc9!important;box-shadow:none!important}
.library-shell .kh-lib-pref-icon{width:34px!important;height:34px!important;border-radius:10px!important;background:#e8ede0!important;color:#365d45!important}
.library-shell .kh-lib-pref-icon svg{width:19px!important;height:19px!important}
.library-shell .kh-lib-pref-copy strong{font-size:.84rem!important}.library-shell .kh-lib-pref-copy small{font-size:.73rem!important;line-height:1.6!important}
.library-shell .kh-sawati-grid{gap:14px!important}
.library-shell .kh-sawati-group-head h3{font-size:1.05rem!important}
.library-shell .kh-sawati-feature [hidden]{display:none!important}
@media(min-width:1100px){.library-shell .kh-sawati-feature-top{grid-template-columns:100px minmax(0,1fr) auto!important}.library-shell .kh-sawati-cover,.library-shell .kh-sawati-cover img{width:100px!important}.library-shell .kh-sawati-cover img{height:133px!important}}
@media(max-width:900px){.library-shell .library-tools.kh-filters-only .filters{grid-template-columns:repeat(3,minmax(0,1fr))!important}.library-shell .kh-sawati-feature-top{gap:18px!important;padding:20px!important;grid-template-columns:78px minmax(0,1fr) auto!important}.library-shell .kh-sawati-cover,.library-shell .kh-sawati-cover img{width:78px!important}.library-shell .kh-sawati-cover img{height:104px!important}}
@media(max-width:640px){.library-shell .section-head{margin-bottom:16px!important}.library-shell .kh-sawati-feature-top{grid-template-columns:66px minmax(0,1fr)!important;gap:15px!important;padding:18px 15px!important;border-radius:18px!important}.library-shell .kh-sawati-cover,.library-shell .kh-sawati-cover img{width:66px!important}.library-shell .kh-sawati-cover img{height:88px!important}.library-shell .kh-sawati-feature h2{font-size:1.16rem!important;line-height:1.65!important}.library-shell .kh-sawati-eyebrow{font-size:.7rem!important}.library-shell .kh-sawati-feature-copy p{font-size:.74rem!important}.library-shell .kh-sawati-view-toggle{grid-column:1/-1!important;width:100%!important;min-height:46px!important;margin-top:2px!important}.library-shell .kh-library-search{width:100%!important;margin:18px 0 12px!important}.library-shell .library-tools.kh-filters-only .filters{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.library-shell .library-tools.kh-filters-only .filter{min-height:48px!important;padding:9px 10px!important;gap:6px!important;border-radius:12px!important}.library-shell .library-tools.kh-filters-only .filter .kh-filter-label{font-size:.8rem!important;line-height:1.65!important}.library-shell .library-tools.kh-filters-only .filter .kh-filter-count{min-width:23px!important;height:23px!important;font-size:.7rem!important;padding:0 4px!important}.library-shell .kh-lib-pref{padding:11px!important;margin:14px 0 18px!important}.library-shell .kh-lib-pref-copy small{font-size:.7rem!important}.library-shell .kh-sawati-grid{gap:10px!important}}
@media(prefers-reduced-motion:reduce){.library-shell .filter,.library-shell .kh-sawati-view-toggle{transition:none!important}}

/* /khalwati-public-assets/header-compact-r2.css */
/* Khalwati R2: compact one-line RTL desktop header, 2026-10-10.
 * Lower priority links remain in the mobile drawer and/or footer.
 * No changes to content, authentication, or admin.
 */
@media (min-width:1101px) {
  .site-header .header-inner,
  .home-refined .site-header .header-inner {
    min-height:56px!important;
    height:56px!important;
    margin-bottom:5px!important;
    padding-inline:11px!important;
    gap:7px!important;
  }
  .site-header .kh-brand,
  .site-header .brand { gap:7px!important; }
  .site-header .kh-brand-copy strong,
  .site-header .brand strong {font-size:.9rem!important;}
  .site-header .kh-brand-mark {width:35px!important;height:35px!important;flex-basis:35px!important;}
  .site-header .kh-brand img,
  .site-header .brand img,
  .home-refined .site-header .brand img {width:35px!important;height:35px!important;flex-basis:35px!important;}
  .site-header .nav-links,
  .home-refined .site-header .nav-links {
    flex-wrap:nowrap!important;
    justify-content:center!important;
    gap:0!important;
    white-space:nowrap!important;
  }
  /* Secondary pages remain accessible via mobile drawer, footer and page links. */
  .site-header nav.nav-links>a[href="/sections/about.html"],
  .site-header nav.nav-links>a[href="/sections/apps.html"],
  .site-header nav.nav-links>a[href="/sections/contact.html"] {display:none!important;}
  .site-header .nav-links a,
  .home-refined .site-header .nav-links a {
    min-height:36px!important;
    padding-inline:6px!important;
    font-size:.81rem!important;
    border-radius:9px!important;
  }
}
/* At tablet/phone widths the existing navigation drawer remains unchanged. */
@media (max-width:700px) {
  .site-header .header-inner,
  .home-refined .site-header .header-inner {min-height:56px!important;height:56px!important;}
}

/* /khalwati-public-assets/v16/design-r16.css */
/* Khalwati R16 | additive polish only; keep original palette, layout and Arabic typefaces. */
:root { --kh-r16-tap:44px; }
.site-header .nav-links a,
.site-header [aria-label="قائمة الهاتف"] a,
.footer-links a { min-height:var(--kh-r16-tap); align-items:center; }
.site-header .nav-links a { display:inline-flex; font-size:max(13.5px,.86rem); line-height:1.45; }
:where(.home-refined,.library-page-ui3,.audio-page) .book-card h3,
.book-card h3 { font-size:clamp(15px,1.8vw,17px); line-height:1.6; overflow-wrap:break-word; }
.book-card .cat, .book-card .open { font-size:max(13px,.85rem); line-height:1.45; }
.books-grid .book-card .book-cover-wrap img,
.book-card .book-cover-wrap img { object-fit:contain; max-width:100%; }
.home-refined .community-home .community-card { min-height:var(--kh-r16-tap); }
.home-refined .community-home .community-card strong {font-size:clamp(14px,1.8vw,16px);line-height:1.5;}
.audio-page .audio-hero p {font-size:clamp(15px,1.8vw,17px);line-height:1.75;}
.audio-page button, .audio-page .audio-toolbar a, .audio-page .audio-toolbar button { min-height:var(--kh-r16-tap); }
:where(.home-refined,.library-page-ui3,.audio-page) :is(a,button,input,select):focus-visible,
.site-header a:focus-visible, .book-card:focus-visible,
.app button:focus-visible, .reader-drawer button:focus-visible {
  outline:3px solid #ad8530; outline-offset:3px;
}
.kh-r16-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@media (max-width:680px) {
  .home-refined .community-home .community-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .home-refined .community-home .community-card { padding:13px 10px; }
  .home-refined .community-home .community-card strong {font-size:15px;}
  .home-refined .books-grid .book-card h3,
  .library-page-ui3 .books-grid .book-card h3 {font-size:15px;line-height:1.55;}
  .book-card .cat,.book-card .open {font-size:13.5px;}
  .audio-page button {font-size:14px;}
  .app .topbar button,.app .topbar a {min-height:var(--kh-r16-tap);}
  .app .toolbar { overflow-x:auto; overflow-y:hidden; flex-wrap:nowrap; scrollbar-width:thin; padding-bottom:max(6px,env(safe-area-inset-bottom)); }
  .app .toolbar > * {flex-shrink:0;}
  .app .toolbar .tool-button,.app .toolbar .zoom-value,
  .app .toolbar .page-control input {min-height:var(--kh-r16-tap);}
  .app .toolbar #previousButton span,.app .toolbar #nextButton span {font-size:14px;}
  .reader-drawer .panel-action,.reader-drawer .panel-tab {min-height:var(--kh-r16-tap);font-size:14px;}
}
@media (prefers-reduced-motion:reduce) {
  .book-card,.community-card {transition-duration:.01ms!important;animation-duration:.01ms!important;}
}

/* /khalwati-public-assets/v17/design-r17.css */
/* Khalwati R17 | additive layout polish. Same palette, same Tajawal typeface, same components. */
:root{--kh17-green:#07583d;--kh17-deep:#073f34;--kh17-gold:#c99a37;--kh17-line:#e6d6ae;--kh17-paper:#fffdf8;--kh17-cream:#fbf6e9;--kh17-muted:#6e746e;--kh17-tap:44px}

/* 1) Library category filters: 440px-tall 2-column grid on phones -> one swipeable row. */
@media (max-width:680px){
  html body :is(.library-tools.kh-filters-only,.library-tools) .filters{
    display:flex!important;flex-wrap:nowrap!important;grid-template-columns:none!important;
    overflow-x:auto!important;overflow-y:hidden!important;max-width:100%;contain:inline-size;gap:8px!important;padding:2px 2px 10px!important;margin-inline:-4px;
    scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none;
    mask-image:linear-gradient(to left,#000 88%,transparent);-webkit-mask-image:linear-gradient(to left,#000 88%,transparent);
  }
  html body :is(.library-tools.kh-filters-only,.library-tools) .filters::-webkit-scrollbar{display:none}
  html body :is(.library-tools.kh-filters-only,.library-tools) .filters>.filter{
    flex:0 0 auto!important;width:auto!important;min-height:var(--kh17-tap);scroll-snap-align:start;
    display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;padding:0 14px!important;border-radius:999px!important;white-space:nowrap;
  }
  html body :is(.library-tools.kh-filters-only,.library-tools) .filters .kh-filter-label{font-size:14px}
  html body :is(.library-tools.kh-filters-only,.library-tools) .filters .kh-filter-count{font-size:12.5px}
}

/* 2) Book page: comfortable tap targets on breadcrumb links. */
.crumbs a{display:inline-block;padding:10px 2px;margin:-10px 0}
.crumbs{line-height:2}

/* 3) Book page: related books (server-rendered by library-book.php R17). */
.kh17-related{margin-top:28px;padding-top:22px;border-top:1px solid var(--kh17-line)}
.kh17-related-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin:0 0 14px}
.kh17-related-head h2{margin:0;font-size:clamp(18px,2.2vw,22px);color:var(--kh17-deep);line-height:1.5}
.kh17-related-head a{color:var(--kh17-green);font-weight:800;text-decoration:none;white-space:nowrap;min-height:var(--kh17-tap);display:inline-flex;align-items:center}
.kh17-related-head a:hover{text-decoration:underline}
.kh17-related-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.kh17-related-grid a{display:flex;flex-direction:column;height:100%;text-decoration:none;color:var(--kh17-deep);background:var(--kh17-paper);border:1px solid var(--kh17-line);border-radius:18px;padding:10px;transition:transform .15s ease,box-shadow .15s ease}
.kh17-related-grid a:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(7,63,52,.10)}
.kh17-related-grid a:focus-visible{outline:3px solid #ad8530;outline-offset:3px}
.kh17-related-cover{display:block;aspect-ratio:3/4;border-radius:12px;background:#f4ecd9;overflow:hidden}
.kh17-related-cover img{display:block;width:100%;height:100%;object-fit:contain}
.kh17-related-title{display:block;margin-top:10px;font-weight:800;font-size:15px;line-height:1.6;overflow-wrap:anywhere}
.kh17-related-meta{display:block;margin-top:2px;font-size:13px;color:var(--kh17-muted)}
@media (max-width:600px){
  .kh17-related-grid{display:flex;overflow-x:auto;scroll-snap-type:x proximity;gap:12px;padding-bottom:8px;scrollbar-width:thin}
  .kh17-related-grid li{flex:0 0 42%;scroll-snap-align:start}
}
@media (prefers-reduced-motion:reduce){.kh17-related-grid a{transition:none}}

/* 4) Desktop book page: keep the card from floating in empty space on wide screens. */
@media (min-width:1100px){
  .book-detail .detail-grid{align-items:start}
  .book-detail .detail-cover{position:sticky;top:96px}
}

/* 5) Small-text floor on phones (kickers, notes, footer). */
@media (max-width:680px){
  .app-simple-kicker,.app-simple-note,.kh-sawati-eyebrow,.footer-copy{font-size:13px!important}
}

/* /khalwati-public-assets/site-unified-r107.css */
/* Khalwati R10.7 - consolidated, non-destructive site fixes. Base R23 shell remains intact. */
:root{--kh107-green:#064c3b;--kh107-deep:#04382f;--kh107-gold:#c9a059;--kh107-ivory:#F7F5EF;--kh107-border:#d6dfd6}
html body{overflow-x:clip}
html body .kh23-header{isolation:isolate;background:linear-gradient(180deg,#064c3b,#053b31)!important;color:#f7f5ef!important;border-bottom:1px solid #cca45f!important;box-shadow:0 3px 9px rgba(3,55,42,.12)!important}
html body .kh23-header::after{pointer-events:none}
html body .kh23-header .kh23-brand,html body .kh23-header .kh23-brand span{color:#fff8e9!important}
html body .kh23-header .kh23-nav>a,html body .kh23-header .kh23-nav>a.kh107-khatma-link{color:#f6f4e9!important;font-family:Tajawal,system-ui,sans-serif!important;font-weight:750!important;background:transparent!important;border:0!important;box-shadow:none!important;margin:0!important;padding:0 10px!important;border-radius:7px!important;font-size:15px!important;min-height:38px!important;display:inline-flex!important;align-items:center!important;text-decoration:none!important;white-space:nowrap!important}
html body .kh23-header .kh23-nav>a:hover,html body .kh23-header .kh23-nav>a:focus-visible{color:#f7d78e!important;background:#ffffff19!important}
html body .kh23-header .kh23-nav>a[aria-current="page"]{color:#f7d78e!important}
html body .kh23-panel a.kh107-khatma-link{color:#064c3b!important;font-weight:800!important;background:#f6f1e6!important}
html body .kh23-footer{background:linear-gradient(110deg,#04382f,#075440)!important;color:#f7f5ef!important;border-top:2px solid #c9a059!important;box-shadow:none!important}
html body .kh23-footer .kh23-brand,html body .kh23-footer .kh23-foot-links a{color:#fff9e9!important}
html body .kh23-footer .kh23-foot-links a:hover,html body .kh23-footer .kh23-foot-links a[aria-current="page"]{color:#f3d396!important}
html body .kh23-header~.kh23-header{display:none!important} /* fallback if stale script injects duplicates */
/* Compact, consistent banner geometry only on home page. */
body.home-refined .kh104-home-latest,body.home-refined .kh102-promo-pair{box-sizing:border-box!important;width:min(1160px,calc(100% - 32px))!important;max-width:1160px!important;margin-inline:auto!important}
body.home-refined .kh104-home-latest{border:1px solid var(--kh107-gold)!important;border-radius:17px!important;padding:14px 16px!important;margin-block:12px!important;background:#fcfaf4!important;min-height:unset!important;box-shadow:0 2px 12px #08372b0d!important}
body.home-refined .kh104-home-latest .kh104-feed-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
body.home-refined .kh102-promo-pair{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important;gap:14px!important;padding:0!important;margin-block:13px 18px!important;border:0!important;background:transparent!important}
body.home-refined .kh102-promo-pair>article{box-sizing:border-box!important;width:100%!important;min-height:156px!important;padding:16px 18px!important;border:1px solid #c9a059!important;border-radius:17px!important;box-shadow:0 4px 12px #063f3014!important}
body.home-refined .kh102-promo-pair h2{font-size:clamp(1.15rem,2vw,1.5rem)!important;line-height:1.4!important;margin:3px 0 6px!important}
body.home-refined .kh102-promo-pair p{font-size:.89rem!important;line-height:1.5!important;margin:3px 0 9px!important}
body.home-refined .kh102-promo-pair a{min-height:39px!important;box-sizing:border-box!important;border-radius:11px!important;padding:7px 12px!important;font-family:Tajawal,system-ui,sans-serif!important}
body.home-refined .kh104-home-latest .kh104-feed-card{min-width:0!important;min-height:0!important;box-sizing:border-box!important;border-radius:14px!important;padding:12px!important}
body.home-refined .kh104-feed-head{align-items:center!important;gap:12px!important}
body.home-refined .kh104-feed-head h2{font-size:clamp(1.15rem,2.2vw,1.55rem)!important}
/* Khatma list/layout: equal borders, heights only when content permits. */
#kh-main .kh-r95-steps>*{box-sizing:border-box!important;min-width:0!important}
#kh-main .kh-r96-switch-card,#kh-main .kh-r96-choice,#kh-main .kh-r96-side-card,#kh-main .kh-panel{box-sizing:border-box!important;border-width:1px!important;border-style:solid!important}
body .kh104-public-feed .kh104-feed-card,body .kh104-home-latest .kh104-feed-card{box-sizing:border-box!important;border:1px solid #d5e0d8!important;border-radius:14px!important}
/* QR modal: visible white modules and equal padding; drawn from original path in PNG. */
body .kh106-share-dialog{box-sizing:border-box!important;max-width:min(440px,calc(100vw - 24px))!important;width:100%!important;padding:18px!important;border:1px solid var(--kh107-gold)!important;border-radius:18px!important;background:#fffdf8!important;color:#064c3b!important;font-family:Tajawal,system-ui,sans-serif!important}
body .kh106-share-dialog .kh104-big-qr{box-sizing:border-box!important;padding:12px!important;margin:12px auto!important;border-radius:14px!important;background:#fff!important;border:1px solid #d8e4db!important;max-width:100%!important}
body .kh106-share-dialog img.kh106-qr-image{box-sizing:border-box!important;width:212px!important;height:212px!important;max-width:100%!important;object-fit:contain!important;background:#fff!important;border:8px solid white!important;border-radius:8px!important}
body .kh106-share-dialog .kh104-dialog-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
body .kh106-share-dialog .kh104-dialog-actions button{box-sizing:border-box!important;min-width:0!important;padding:10px 7px!important;font:800 .86rem/1.4 Tajawal,system-ui,sans-serif!important;border-radius:10px!important}
@media(max-width:1120px){html body .kh23-header .kh23-nav>a{padding-inline:7px!important}}
@media(max-width:1020px){html body .kh23-header .kh23-nav{display:none!important}}
@media(max-width:850px){body.home-refined .kh104-home-latest .kh104-feed-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}body.home-refined .kh102-promo-pair{grid-template-columns:1fr!important}body.home-refined .kh102-promo-pair>article{min-height:0!important}}
@media(max-width:580px){body.home-refined .kh104-home-latest,body.home-refined .kh102-promo-pair{width:calc(100% - 24px)!important}body.home-refined .kh104-home-latest .kh104-feed-cards{grid-template-columns:1fr!important}body.home-refined .kh104-feed-head{align-items:stretch!important;flex-direction:column!important}body .kh106-share-dialog .kh104-dialog-actions{grid-template-columns:1fr!important}}
@media(prefers-reduced-motion:reduce){html body .kh23-header *{transition:none!important}}

/* R10.8 unified additions: exactly one home khatma banner; accessible nav / social tiles */
body.home-refined .kh108-one-banner{width:min(1160px,calc(100% - 32px));box-sizing:border-box;margin:14px auto 16px;padding:clamp(17px,2.7vw,27px);border:1px solid #c9a059;border-radius:18px;background:linear-gradient(112deg,#075743,#064233);color:#fff9eb;display:flex;gap:20px;align-items:center;justify-content:space-between;min-width:0}
body.home-refined .kh108-one-content{flex:1 1 50%;min-width:0}body.home-refined .kh108-one-banner h2{margin:3px 0 8px;color:#fff9eb;font:700 clamp(1.3rem,2vw,1.75rem)/1.5 Amiri,Tajawal,serif}
body.home-refined .kh108-one-banner p{font:500 clamp(.85rem,1.1vw,.98rem)/1.7 Tajawal,system-ui,sans-serif;color:#e5f1eb;margin:0}
body.home-refined .kh108-one-banner .kh108-kicker{color:#f3d091;font:700 .85rem/1.5 Tajawal,system-ui,sans-serif}
body.home-refined .kh108-one-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;flex:0 1 410px;min-width:0}
body.home-refined .kh108-one-actions a{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;border:1px solid #afc8b5;border-radius:12px;padding:10px 12px;min-height:43px;font:800 .91rem/1.4 Tajawal,system-ui,sans-serif;color:#fff9ed;background:#ffffff16}
body.home-refined .kh108-one-actions a.kh108-primary,body.home-refined .kh108-one-actions a.kh108-google{background:#f3dca6;border-color:#f3dca6;color:#063f33}
body.home-refined .kh108-one-actions a:hover{filter:brightness(1.1);transform:translateY(-1px)}body.home-refined .kh108-one-actions a:focus-visible{outline:3px solid #ffe2a0;outline-offset:3px}
/* Service links are responsive, dark readable text for selected/hover/focus states. */
body.home-refined .community-home .community-grid{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:center;gap:8px 12px;max-width:1100px;margin-inline:auto;overflow:visible!important}
body.home-refined .community-home .community-grid>a.community-card{position:relative;box-sizing:border-box;min-width:150px;flex:1 1 155px;max-width:230px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:10px 12px!important;color:#073f34!important;background:#fffdf7!important;border:1px solid #e5d6b7!important;border-radius:999px!important;white-space:normal;overflow-wrap:break-word;text-align:center;text-decoration:none;font-family:Tajawal,system-ui,sans-serif!important}
body.home-refined .community-home .community-grid>a.community-card strong{color:#073f34!important;font:800 .9rem/1.55 Tajawal,system-ui,sans-serif!important;white-space:normal!important}
body.home-refined .community-home .community-grid>a.community-card:is(:hover,:focus-visible,:active){background:#f1d899!important;border-color:#c9a059!important;color:#073f34!important}
body.home-refined .community-home .community-grid>a.community-card:is(:hover,:focus-visible,:active) strong{color:#073f34!important}
body.home-refined .community-home .community-card .channel-icon{flex:none!important}
body.home-refined .community-home .community-card .channel-arrow{display:none!important}
/* Keep page menu's Khatma item legible on phone and tablet. */
html body .kh23-panel a[href="/khatma.html"],html body .drawer-panel a[href="/khatma.html"]{color:#073f34!important;font:800 1rem/1.5 Tajawal,system-ui,sans-serif!important;display:flex!important;align-items:center;min-height:43px;padding:9px 13px;border-radius:11px;background:#f3ead5!important;text-decoration:none!important}
html body .kh23-panel a[href="/khatma.html"]:focus-visible,html body .drawer-panel a[href="/khatma.html"]:focus-visible{outline:3px solid #c9a059;outline-offset:2px}
@media(max-width:860px){body.home-refined .kh108-one-banner{flex-direction:column;align-items:stretch;gap:13px}body.home-refined .kh108-one-actions{flex:1 1 auto;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){body.home-refined .kh108-one-banner{width:calc(100% - 24px);padding:17px 15px;border-radius:15px}body.home-refined .kh108-one-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.home-refined .kh108-one-actions a{font-size:.84rem;padding:10px 7px}body.home-refined .community-home .community-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}body.home-refined .community-home .community-grid>a.community-card{width:100%;min-width:0;max-width:none;min-height:54px;padding:9px 7px!important}body.home-refined .community-home .community-grid>a.community-card strong{font-size:.86rem!important}}
@media(max-width:340px){body.home-refined .kh108-one-actions{grid-template-columns:1fr}body.home-refined .community-home .community-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){body.home-refined .kh108-one-actions a:hover{transform:none}}


/* R10.8: Khatma / Hisn shared visual tokens; scoped to Khatma to preserve Firebase behavior. */
#kh-main.kh-khatma {--kh108-ivory:#f7f5ef;--kh108-green:#173e35;--kh108-gold:#a27b39;color:var(--kh108-green);background:var(--kh108-ivory)}
#kh-main.kh-khatma .kh-panel{box-sizing:border-box;border-radius:18px;border:1px solid #d9dfd7;box-shadow:0 3px 15px #133f3110}
#kh-main.kh-khatma :is(button,input,select,textarea){font-family:Tajawal,system-ui,sans-serif}
#kh-main.kh-khatma :is(button,a,input,select,textarea):focus-visible{outline:3px solid #c19a4e!important;outline-offset:3px}
#kh-main.kh-khatma .kh-r96-choice-grid{grid-auto-rows:1fr;gap:10px}
#kh-main.kh-khatma .kh-r96-choice{box-sizing:border-box;min-width:0;min-height:95px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:14px 12px!important;border:1px solid #d8dfd6;border-radius:14px;background:#fffdfa;color:#173e35;text-align:right}
#kh-main.kh-khatma .kh-r96-choice b{color:#173e35;white-space:normal;word-break:normal;overflow-wrap:break-word;line-height:1.5}
#kh-main.kh-khatma .kh-r96-choice small{color:#5f7569;white-space:normal;line-height:1.55;overflow-wrap:break-word}
#kh-main.kh-khatma .kh-r96-choice:has(input:checked){border-color:#a27b39;background:#f7efdb;box-shadow:inset 0 0 0 1px #d6bc80,0 2px 6px #143d3410}
#kh-main.kh-khatma .kh-r96-choice:has(input:checked) b{color:#0b4f3b}
#kh-main.kh-khatma .kh-r96-choice:has(input:disabled){cursor:not-allowed;opacity:.62;background:#f3f1ec}
#kh-main.kh-khatma .kh-r96-top-actions :is(button,a){min-height:44px;box-sizing:border-box;white-space:normal;line-height:1.5}
#kh-main.kh-khatma .kh104-feed-card{box-sizing:border-box;min-width:0;max-width:100%;border-radius:14px;border:1px solid #d4dfd6}
#kh-main.kh-khatma .kh104-feed-card :is(button,a){min-height:40px;border-radius:11px}
#kh-main.kh-khatma .kh-r96-services-banner{display:none!important} /* Requested removal of redundant second services banner on Khatma */
@media(max-width:780px){#kh-main.kh-khatma .kh-r96-form-grid{grid-template-columns:minmax(0,1fr)!important}#kh-main.kh-khatma .kh-r96-choice-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}#kh-main.kh-khatma .kh-r96-choice-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:410px){#kh-main.kh-khatma .kh-r96-choice-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}#kh-main.kh-khatma .kh-r96-choice{min-height:88px;padding:10px!important}#kh-main.kh-khatma .kh-r96-choice b{font-size:.94rem}#kh-main.kh-khatma .kh-r96-choice small{font-size:.8rem}}
@media(max-width:320px){#kh-main.kh-khatma .kh-r96-choice-grid-3,#kh-main.kh-khatma .kh-r96-choice-grid-2{grid-template-columns:1fr}}


/* R10.8.2 • Community services: consistent RTL card layout and readable focus/selection. */
body.home-refined .community-home .community-grid {
 direction:rtl;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:1000px;margin-inline:auto;align-items:stretch;justify-content:stretch;
}
body.home-refined .community-home .community-grid>a.community-card {
 direction:rtl;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:11px;
 width:100%;min-width:0;max-width:none;min-height:66px;padding:12px 16px!important;
 border:1px solid #dcc69f!important;border-radius:15px!important;
 background:#fffdf8!important;color:#073f34!important;
 text-align:right!important;box-shadow:0 3px 13px #073f340a;
 font:700 15px/1.5 Tajawal,system-ui,sans-serif!important;
}
body.home-refined .community-home .community-grid>a.community-card .channel-icon {
 flex:0 0 40px!important;width:40px!important;height:40px!important;margin:0!important;
 display:grid!important;place-items:center!important;order:0!important;
 border-radius:12px!important;background:#e5f1e9!important;color:#0c5b46!important;
}
body.home-refined .community-home .community-grid>a.community-card .channel-icon svg {width:21px;height:21px;max-width:21px;max-height:21px;}
body.home-refined .community-home .community-grid>a.community-card strong {
 color:#073f34!important;flex:1 1 auto;text-align:right!important;font:800 clamp(14px,1.35vw,16px)/1.5 Tajawal,system-ui,sans-serif!important;
}
body.home-refined .community-home .community-grid>a.community-card:is(:hover,:active),
body.home-refined .community-home .community-grid>a.community-card[aria-current="page"] {
 background:#f2dfb8!important;border-color:#b58b47!important;color:#073f34!important;
}
body.home-refined .community-home .community-grid>a.community-card:focus-visible {
 outline:3px solid #a27b39!important;outline-offset:3px!important;background:#fff3d8!important;
}
@media(max-width:710px){
 body.home-refined .community-home .community-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
 body.home-refined .community-home .community-grid>a.community-card {min-height:63px;padding:10px 11px!important;gap:8px;border-radius:13px!important;}
 body.home-refined .community-home .community-grid>a.community-card .channel-icon {flex-basis:35px!important;width:35px!important;height:35px!important;border-radius:10px!important;}
 body.home-refined .community-home .community-grid>a.community-card strong {font-size:14px!important;}
}
@media(max-width:350px){body.home-refined .community-home .community-grid {grid-template-columns:1fr;}}

/* /khalwati-public-assets/v23/shell-r23.css */
/* Khalwati R23 — one header + one footer for every public page. Same palette, Tajawal everywhere. */
@font-face{font-family:'Tajawal';font-style:normal;font-weight:500;font-display:swap;src:url('/khalwati-public-assets/v23/tajawal-arabic-500-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'Tajawal';font-style:normal;font-weight:700;font-display:swap;src:url('/khalwati-public-assets/v23/tajawal-arabic-700-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:'Tajawal';font-style:normal;font-weight:800;font-display:swap;src:url('/khalwati-public-assets/v23/tajawal-arabic-800-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}

:root{
  --kh23-green:#07583d;--kh23-deep:#073f34;--kh23-gold:#c99a37;--kh23-gold-soft:rgba(201,154,55,.28);
  --kh23-paper:#fffdf8;--kh23-cream:#fbf6e9;--kh23-ink:#23302b;--kh23-muted:#6b7069;
  --kh23-font:'Tajawal',system-ui,-apple-system,'Segoe UI',Tahoma,sans-serif;--kh23-max:1200px;--kh23-h:64px;
}
html body{font-family:var(--kh23-font)}

/* The old drawers/menus belong to the replaced headers. */
html body #drawer,html body .drawer-backdrop{display:none!important}

/* ---------- header ---------- */
html body .kh23-header{
  position:sticky;top:0;z-index:80;margin:0;padding:env(safe-area-inset-top) 0 0;
  background:rgba(251,246,233,.92);-webkit-backdrop-filter:saturate(1.2) blur(14px);backdrop-filter:saturate(1.2) blur(14px);
  border-bottom:1px solid var(--kh23-gold-soft);font-family:var(--kh23-font);direction:rtl;
}
html body .kh23-bar{
  box-sizing:border-box;max-width:var(--kh23-max);height:var(--kh23-h);margin:0 auto;padding:0 16px;
  display:flex;align-items:center;gap:12px;
}
html body .kh23-brand{display:inline-flex;align-items:center;gap:10px;color:var(--kh23-deep);text-decoration:none;flex:0 1 auto;min-width:0}
html body .kh23-brand img{width:40px;height:40px;border-radius:50%;flex:0 0 40px;box-shadow:0 0 0 1px var(--kh23-gold-soft)}
html body .kh23-brand span{font-weight:800;font-size:17px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

html body .kh23-nav{display:flex;align-items:center;gap:2px;margin-inline-start:auto;flex-wrap:nowrap}
html body .kh23-nav a,html body .kh23-panel a{
  position:relative;display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 12px;border-radius:10px;
  color:var(--kh23-ink);text-decoration:none;font-weight:500;font-size:15px;white-space:nowrap;
  transition:background-color .15s ease,color .15s ease;
}
html body .kh23-nav a:hover{background:rgba(7,88,61,.07);color:var(--kh23-green)}
html body .kh23-nav a[aria-current="page"]{color:var(--kh23-green);font-weight:700}
html body .kh23-nav a[aria-current="page"]::after{content:"";position:absolute;inset-inline:12px;bottom:4px;height:2px;border-radius:2px;background:var(--kh23-gold)}
html body .kh23-live i{width:8px;height:8px;border-radius:50%;background:#c63b2f;box-shadow:0 0 0 0 rgba(198,59,47,.5);animation:kh23-pulse 2.2s infinite}
@keyframes kh23-pulse{0%{box-shadow:0 0 0 0 rgba(198,59,47,.45)}70%{box-shadow:0 0 0 7px rgba(198,59,47,0)}100%{box-shadow:0 0 0 0 rgba(198,59,47,0)}}

/* R25: "مشايخ الطريقة" — gold pill next to the account button */
html body .kh23-sheikhs{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:42px;padding:0 14px;border-radius:999px;text-decoration:none;
  background:linear-gradient(180deg,#f6dfa3,#d9ae4f);color:#3d2b05;font-weight:800;font-size:14.5px;white-space:nowrap;
  border:1px solid #c99a37;box-shadow:0 4px 12px rgba(201,154,55,.28);
}
html body .kh23-sheikhs svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html body .kh23-sheikhs:hover{filter:brightness(1.04)}
html body .kh23-sheikhs[aria-current="page"]{background:var(--kh23-green);color:#fff;border-color:var(--kh23-green);box-shadow:none}
html body .kh23-panel a.kh23-gold{background:linear-gradient(180deg,#f6dfa3,#e3bd66);color:#3d2b05;font-weight:700}
html body .kh23-account,html body .kh23-menu>summary{
  flex:0 0 auto;display:inline-grid;place-items:center;width:42px;height:42px;border-radius:12px;
  border:1px solid var(--kh23-gold-soft);background:var(--kh23-paper);color:var(--kh23-green);cursor:pointer;
}
html body .kh23-account:hover,html body .kh23-menu>summary:hover{border-color:var(--kh23-gold)}
html body .kh23-account[aria-current="page"]{background:var(--kh23-green);color:#fff;border-color:var(--kh23-green)}
html body .kh23-account svg,html body .kh23-menu>summary svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

html body .kh23-menu{position:static;display:none}
html body .kh23-menu>summary{list-style:none}
html body .kh23-menu>summary::-webkit-details-marker{display:none}
html body .kh23-menu[open]>summary{background:var(--kh23-green);color:#fff;border-color:var(--kh23-green)}
html body .kh23-panel{
  position:absolute;inset-inline:0;top:100%;box-sizing:border-box;padding:10px 16px 16px;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;
  background:var(--kh23-paper);border-bottom:1px solid var(--kh23-gold-soft);box-shadow:0 18px 30px rgba(7,63,52,.12);
}
html body .kh23-panel a{min-height:46px;background:var(--kh23-cream);font-size:16px;justify-content:flex-start}
html body .kh23-panel a[aria-current="page"]{background:var(--kh23-green);color:#fff;font-weight:700}
html body .kh23-panel a.kh23-sub{background:transparent;border:1px solid var(--kh23-gold-soft)}

:where(html body) a.kh23-brand:focus-visible,html body .kh23-header a:focus-visible,html body .kh23-menu>summary:focus-visible,html body .kh23-footer a:focus-visible{outline:2px solid var(--kh23-gold);outline-offset:2px}

/* tablets/phones: short brand + account + menu */
@media (max-width:1020px){
  html body .kh23-nav{display:none}
  html body .kh23-sheikhs{margin-inline-start:auto}
  html body .kh23-menu{display:block}
}
@media (max-width:1180px) and (min-width:1021px){html body .kh23-nav a{padding:0 9px;font-size:14.5px}}
@media (max-width:560px){html body .kh23-sheikhs{width:42px;padding:0;justify-content:center}html body .kh23-sheikhs span{display:none}}
@media (max-width:440px){
  html body .kh23-bar{gap:8px;padding:0 12px}
  html body .kh23-brand{gap:8px}
  html body .kh23-brand img{width:36px;height:36px;flex-basis:36px}
  html body .kh23-brand span{font-size:14.5px}
  html body .kh23-account,html body .kh23-menu>summary,html body .kh23-sheikhs{width:40px;height:40px}
}
@media (max-width:380px){
  html body .kh23-brand span{font-size:15px}
  html body .kh23-panel{grid-template-columns:1fr}
}

/* ---------- footer ---------- */
html body .kh23-footer{
  margin:48px 0 0;padding:0 0 env(safe-area-inset-bottom);background:var(--kh23-deep);color:#e9efe9;
  font-family:var(--kh23-font);direction:rtl;border-top:3px solid var(--kh23-gold);
}
html body .kh23-foot{
  box-sizing:border-box;max-width:var(--kh23-max);margin:0 auto;padding:22px 16px;
  display:flex;align-items:center;gap:12px 24px;flex-wrap:wrap;
}
html body .kh23-footer .kh23-brand{color:#fff}
html body .kh23-footer .kh23-brand img{width:32px;height:32px;flex-basis:32px;box-shadow:none}
html body .kh23-footer .kh23-brand span{font-size:15px}
html body .kh23-foot-links{display:flex;flex-wrap:wrap;gap:4px 18px;margin-inline-start:auto}
html body .kh23-foot-links a{color:#e9efe9;text-decoration:none;font-size:14px;min-height:36px;display:inline-flex;align-items:center}
html body .kh23-foot-links a:hover,html body .kh23-foot-links a[aria-current="page"]{color:#f1d38f}
html body .kh23-copy{color:rgba(233,239,233,.7);font-size:13px}
@media (max-width:700px){
  html body .kh23-foot{flex-direction:column;text-align:center;gap:8px;padding:20px 16px}
  html body .kh23-foot-links{margin:0;justify-content:center}
}

/* old footers that some page scripts still create are hidden; the new one is the only footer */
html body .site-footer,html body .v9-footer{display:none!important}

@media (prefers-reduced-motion:reduce){html body .kh23-live i{animation:none}}
@media print{html body .kh23-header,html body .kh23-footer{display:none}}

/* R25: sheikh cards on the entry page open their biography */
html body .v9-sheikh-card{position:relative;cursor:pointer}
html body .kh25-sk-link{position:absolute;inset:0;z-index:2;border-radius:inherit}
html body .kh25-sk-link:focus-visible{outline:2px solid var(--kh23-gold);outline-offset:3px}
html body .v9-sheikh-card:hover{transform:translateY(-2px);transition:transform .18s ease}

/* R28: text for search engines and screen readers only (keeps the design as it is) */
html body .kh28-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* R31: home — "سند الطريقة" banner (under the app banner) */
@font-face{font-family:'Amiri';font-style:normal;font-weight:700;font-display:swap;src:url('/khalwati-public-assets/v25/amiri-arabic-700-normal.woff2') format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
html body .kh31-sanad{padding:0 0 30px}
html body .kh31-card{position:relative;overflow:hidden;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:22px 30px;
  padding:28px 30px;border-radius:26px;text-decoration:none;color:#3d2b05;
  background:radial-gradient(120% 140% at 0% 0%,#fff7dc 0%,#f6e3ae 45%,#e4c172 100%);border:1px solid #c99a37;box-shadow:0 12px 30px rgba(120,84,10,.12)}
html body .kh31-card::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.18;background-image:radial-gradient(circle at 1px 1px,#9a7420 1px,transparent 1.6px);background-size:20px 20px}
html body .kh31-card:hover{box-shadow:0 16px 36px rgba(120,84,10,.2)}
html body .kh31-card:focus-visible{outline:3px solid #07583d;outline-offset:3px}
html body .kh31-copy{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;text-align:right}
html body .kh31-kicker{font-weight:800;font-size:.9rem;color:#8a6116}
html body .kh31-title{font-family:'Amiri',serif;font-weight:700;font-size:clamp(1.55rem,2.8vw,2.15rem);line-height:1.35;color:#073f34}
html body .kh31-text{color:#4b3a12;line-height:1.75;font-size:1rem;max-width:520px}
html body .kh31-btn{margin-top:8px;display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:0 22px;border-radius:999px;background:#07583d;color:#fff;font-weight:800;box-shadow:0 6px 16px rgba(7,63,52,.25)}
html body .kh31-card:hover .kh31-btn{background:#073f34}
html body .kh31-chain{position:relative;width:max-content;max-width:100%;display:flex;align-items:center;gap:8px;direction:rtl}
html body .kh31-chain::before{content:"";position:absolute;inset-inline:18px;top:50%;height:3px;margin-top:-1.5px;background:#a87a22;border-radius:2px;z-index:0}
html body .kh31-b,html body .kh31-p,html body .kh31-dots{position:relative;z-index:1}
html body .kh31-b{display:grid;place-items:center;border-radius:50%;font-family:'Amiri',serif;font-weight:700;line-height:1;box-shadow:0 0 0 3px #fff7dc,0 0 0 5px #c99a37}
html body .kh31-pro{width:64px;height:64px;background:radial-gradient(circle at 50% 40%,#0b6a4c,#073f34 70%);color:#f1d38f;font-size:34px}
html body .kh31-ali{width:50px;height:50px;background:radial-gradient(circle at 50% 40%,#f6dfa3,#c99a37 75%);color:#073f34;font-size:19px}
html body .kh31-dots{display:flex;gap:5px;padding:0 2px}
html body .kh31-dots i{width:9px;height:9px;border-radius:50%;background:#fff7dc;box-shadow:0 0 0 2px #a87a22}
html body .kh31-p{width:54px;height:54px;border-radius:50%;object-fit:cover;background:#073f34;box-shadow:0 0 0 3px #fff7dc,0 0 0 5px #c99a37}
@media (max-width:1100px){html body .kh31-p{width:46px;height:46px}html body .kh31-chain{gap:6px}}
@media (max-width:900px){
  html body .kh31-card{grid-template-columns:1fr;padding:22px}
  html body .kh31-chain{justify-content:flex-start;flex-wrap:nowrap}
}
@media (max-width:560px){
  html body .kh31-card{padding:18px 16px;gap:16px;border-radius:20px}
  html body .kh31-text{font-size:.94rem}
  html body .kh31-pro{width:46px;height:46px;font-size:25px}
  html body .kh31-ali{width:38px;height:38px;font-size:15px}
  html body .kh31-dots{gap:3px}html body .kh31-dots i{width:6px;height:6px}
  html body .kh31-dots i:nth-child(n+3){display:none}
  html body .kh31-p{width:34px;height:34px;box-shadow:0 0 0 2px #fff7dc,0 0 0 3.5px #c99a37}
  html body .kh31-chain{gap:5px}
  html body .kh31-btn{min-height:44px;padding:0 18px}
}
@media (max-width:420px){html body .kh31-p{width:30px;height:30px}html body .kh31-pro{width:42px;height:42px;font-size:23px}html body .kh31-ali{width:34px;height:34px;font-size:14px}html body .kh31-chain{gap:4px}}
@media (max-width:360px){html body .kh31-p{width:26px;height:26px}html body .kh31-pro{width:38px;height:38px;font-size:21px}html body .kh31-dots{display:none}}

/* R31: home service cards — 5 cards, سند الطريقة first */
html body .community-home .community-grid.community-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
html body .community-card.kh31-sanad-card .channel-icon{background:#fbf0d2;color:#8a6116}
html body .community-card.kh31-sanad-card{border-color:#e4c172}
@media (max-width:1100px){html body .community-home .community-grid.community-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media (max-width:640px){
  html body .community-home .community-grid.community-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body .community-home .community-grid .kh31-sanad-card{grid-column:1/-1}
}

/* R33: «قصيدة البردة» card in the library (uses the «سواطع» card look) */
html body .library-shell .kh33-burda{margin-top:14px}
html body .library-shell .kh33-burda a.kh-sawati-view-toggle{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
html body .library-shell .kh33-burda h2 a{color:inherit;text-decoration:none}
html body .library-shell .kh33-burda h2 a:hover{text-decoration:underline;text-underline-offset:6px}
html body .library-shell .kh33-burda .kh-sawati-cover{display:block}

/* R34: home — library sections as tiles, short preview, "show all" in place */
html body .kh34-cats{margin:6px 0 22px}
html body .kh34-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 14px;margin-bottom:14px}
html body .kh34-title{margin:0;font-size:clamp(1.25rem,2.2vw,1.55rem);color:#073f34}
html body .kh34-sub{margin:0;color:#6b7069;font-size:.92rem}
html body .kh34-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
html body .kh34-tile{position:relative;overflow:hidden;display:flex;align-items:center;gap:12px;min-height:84px;padding:14px 16px;border-radius:18px;
  border:1px solid #e6d6ae;background:linear-gradient(160deg,#fffdf8 0%,#fbf3df 100%);color:#073f34;text-align:right;cursor:pointer;
  font:inherit;box-shadow:0 4px 14px rgba(120,84,10,.06);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
html body .kh34-tile::after{content:"";position:absolute;inset-inline-start:-30px;bottom:-30px;width:90px;height:90px;border-radius:50%;
  background:radial-gradient(circle,rgba(201,154,55,.18),transparent 70%);pointer-events:none}
html body .kh34-tile:hover{transform:translateY(-3px);border-color:#c99a37;box-shadow:0 12px 26px rgba(120,84,10,.14)}
html body .kh34-tile:focus-visible{outline:3px solid #c99a37;outline-offset:3px}
html body .kh34-ico{flex:none;display:grid;place-items:center;width:50px;height:50px;border-radius:15px;
  background:radial-gradient(circle at 35% 30%,#0e6b4f,#073f34 75%);color:#f1d38f;box-shadow:inset 0 0 0 1.5px rgba(241,211,143,.45),0 6px 14px rgba(7,63,52,.22)}
html body .kh34-ico svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html body .kh34-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
html body .kh34-tx strong{font-size:1.02rem;line-height:1.35;font-weight:800}
html body .kh34-tx small{font-size:.84rem;color:#8a6116;font-weight:700}
html body .kh34-tile.kh34-all{background:linear-gradient(150deg,#0b5a45,#073f34);border-color:#c99a37;color:#fff}
html body .kh34-tile.kh34-all .kh34-ico{background:linear-gradient(180deg,#f6dfa3,#d9ae4f);color:#3d2b05}
html body .kh34-tile.kh34-all small{color:#f1d38f}
html body .kh34-pv-head{display:none;margin:4px 0 12px}
html body .kh34-pv-title{margin:0;font-size:1.1rem;color:#073f34}
html body .kh34-more{display:flex;justify-content:center;margin:20px 0 6px}
html body .kh34-more-btn{min-height:50px;padding:0 28px;border-radius:999px;border:1px solid #c99a37;background:linear-gradient(180deg,#f6dfa3,#d9ae4f);
  color:#3d2b05;font:inherit;font-weight:800;font-size:1rem;cursor:pointer;box-shadow:0 6px 16px rgba(120,84,10,.18)}
html body .kh34-more-btn:hover{filter:brightness(1.04)}
html.kh34-collapsed body .library-shell .kh-library-search,
html.kh34-collapsed body .library-shell .library-tools,
html.kh34-collapsed body .library-shell #kh-library-pref,
html.kh34-collapsed body .library-shell #kh-category-status{display:none!important}
html.kh34-collapsed body .library-shell .books-grid>.book-card:nth-child(n+9){display:none!important}
html.kh34-collapsed body .kh34-pv-head{display:block}
@media (max-width:1100px){html body .kh34-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:640px){
  html body .kh34-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  html body .kh34-tile{flex-direction:column;justify-content:flex-start;text-align:center;min-height:104px;padding:12px 6px 10px;gap:7px;border-radius:15px}
  html body .kh34-ico{width:42px;height:42px;border-radius:13px}
  html body .kh34-ico svg{width:23px;height:23px}
  html body .kh34-tx{align-items:center}
  html body .kh34-tx strong{font-size:.84rem;line-height:1.3}
  html body .kh34-tx small{font-size:.74rem}
  html.kh34-collapsed body .library-shell .books-grid>.book-card:nth-child(n+7){display:none!important}
}
@media (prefers-reduced-motion:reduce){html body .kh34-tile{transition:none}}
html body a.kh34-tile{text-decoration:none}
html body .kh34-tile.kh34-burda{border-color:#c99a37;background:linear-gradient(160deg,#fff7dc 0%,#f3dfa8 100%)}

/* R35: compact home — slim «سند الطريقة» strip, slim «البردة» row, library sections as small chips */
html body .kh31-sanad{padding:0 0 22px}
html body .kh31-card{gap:10px 22px;padding:16px 24px;border-radius:20px}
html body .kh31-copy{gap:2px}
html body .kh31-kicker{font-size:.8rem}
html body .kh31-title{font-size:clamp(1.2rem,2vw,1.5rem);line-height:1.4}
html body .kh31-btn{margin-top:6px;min-height:36px;padding:0 16px;font-size:.9rem;box-shadow:none}
html body .kh31-pro{width:48px;height:48px;font-size:26px}
html body .kh31-ali{width:38px;height:38px;font-size:15px}
html body .kh31-p{width:40px;height:40px}
html body .kh31-chain{gap:6px}
@media (max-width:900px){
  html body .kh31-card{grid-template-columns:minmax(0,1fr) auto;padding:12px 14px;gap:8px 10px;border-radius:16px}
  html body .kh31-kicker{display:none}
  html body .kh31-copy{grid-column:1;grid-row:1;flex-direction:row;align-items:center;justify-content:space-between;gap:8px;width:100%}
  html body .kh31-title{font-size:1.12rem;line-height:1.35}
  html body .kh31-btn{margin:0;flex:none;min-height:32px;padding:0 12px;font-size:.8rem}
  html body .kh31-chain{grid-column:1/-1;grid-row:2;justify-self:center}
  html body .kh31-pro{width:34px;height:34px;font-size:19px}
  html body .kh31-ali{width:28px;height:28px;font-size:11px}
  html body .kh31-p{width:28px;height:28px;box-shadow:0 0 0 2px #fff7dc,0 0 0 3px #c99a37}
  html body .kh31-dots i{width:5px;height:5px}
}

html body .library-shell .kh33-burda{margin-top:10px}
html body .library-shell .kh33-burda .kh-sawati-feature-top{display:flex!important;flex-direction:row!important;align-items:center!important;gap:14px!important;padding:10px 16px!important;min-height:0!important}
html body .library-shell .kh33-burda .kh-sawati-cover{flex:none;width:52px!important;max-width:52px!important;margin:0!important}
html body .library-shell .kh33-burda .kh-sawati-cover img{width:52px!important;height:auto!important;border-radius:6px}
html body .library-shell .kh33-burda .kh-sawati-feature-copy{flex:1;min-width:0;text-align:right;gap:0!important}
html body .library-shell .kh33-burda .kh-sawati-eyebrow{font-size:.74rem!important;margin:0!important}
html body .library-shell .kh33-burda h2{font-size:1.3rem!important;margin:0!important;line-height:1.5!important}
html body .library-shell .kh33-burda p{font-size:.8rem!important;margin:0!important}
html body .library-shell .kh33-burda a.kh33-burda-go{flex:none;width:auto!important;min-height:36px!important;padding:0 14px!important;font-size:.85rem!important;margin:0!important;border-radius:999px!important}
@media (max-width:560px){
  html body .library-shell .kh33-burda .kh-sawati-feature-top{gap:10px!important;padding:8px 12px!important}
  html body .library-shell .kh33-burda .kh-sawati-cover,html body .library-shell .kh33-burda .kh-sawati-cover img{width:42px!important;max-width:42px!important}
  html body .library-shell .kh33-burda h2{font-size:1.12rem!important}
  html body .library-shell .kh33-burda p{display:none}
  html body .library-shell .kh33-burda a.kh33-burda-go{min-height:32px!important;padding:0 12px!important;font-size:.78rem!important}
}

html body .kh34-cats{margin:14px 0 16px}
html body .kh34-head{margin-bottom:10px}
html body .kh34-title{font-size:1.15rem}
html body .kh34-sub{font-size:.82rem}
html body .kh34-tiles{display:flex!important;flex-wrap:wrap;gap:8px;grid-template-columns:none}
html body .kh34-tile,html body .kh34-tile.kh34-all{flex:none;flex-direction:row!important;align-items:center;gap:7px!important;min-height:38px!important;padding:4px 6px 4px 12px!important;border-radius:999px!important;text-align:right!important;box-shadow:none}
html body .kh34-tile::after{display:none}
html body .kh34-tile:hover{transform:none;box-shadow:0 4px 12px rgba(120,84,10,.12)}
html body .kh34-ico{width:28px!important;height:28px!important;border-radius:50%!important}
html body .kh34-ico svg{width:16px!important;height:16px!important}
html body .kh34-tx{flex-direction:row!important;align-items:center!important;gap:6px!important}
html body .kh34-tx strong{font-size:.88rem!important;white-space:nowrap;line-height:1.2}
html body .kh34-tx small{font-size:.72rem!important;white-space:nowrap;padding:1px 7px;border-radius:999px;background:#fbf0d2}
html body .kh34-tile.kh34-all small{background:rgba(241,211,143,.18)}
@media (max-width:760px){
  html body .kh34-tiles{display:grid!important;grid-auto-flow:column;grid-template-rows:repeat(2,auto);grid-auto-columns:max-content;overflow-x:auto;scrollbar-width:none;
    margin-inline:0;max-width:100%;padding:2px 0 6px;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 24px)}
  html body .kh34-tiles::-webkit-scrollbar{display:none}
  html body .kh34-tile,html body .kh34-tile.kh34-all{min-height:36px!important}
}

/* ===== R41: premium green header + cleaner home blocks (iPhone + desktop) ===== */
html body .kh23-header{background:linear-gradient(180deg,#0a4d3c 0%,#073f34 100%)!important;border-bottom:0!important;box-shadow:0 1px 0 rgba(201,154,55,.55),0 6px 18px rgba(7,63,52,.18)}
html body .kh23-header::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.07;background-image:radial-gradient(circle at 1px 1px,#f1d38f 1px,transparent 1.5px);background-size:18px 18px}
html body .kh23-bar{position:relative;z-index:1}
html body .kh23-brand{color:#fff}
html body .kh23-brand img{width:42px;height:42px;flex-basis:42px;box-shadow:0 0 0 2px rgba(241,211,143,.55),0 3px 10px rgba(0,0,0,.25)}
html body .kh23-brand span{color:#fff;font-size:18px;letter-spacing:.1px}
html body .kh23-nav a{color:#e9f2ec;font-weight:700}
html body .kh23-nav a:hover{background:rgba(255,255,255,.09);color:#fff}
html body .kh23-nav a[aria-current="page"]{color:#f1d38f}
html body .kh23-nav a[aria-current="page"]::after{background:#f1d38f}
html body .kh23-nav .kh23-live i{box-shadow:0 0 0 3px rgba(255,90,90,.18)}
html body .kh23-account,html body .kh23-menu>summary{background:rgba(255,255,255,.07);border-color:rgba(241,211,143,.35);color:#f6e7c1}
html body .kh23-account:hover,html body .kh23-menu>summary:hover{background:rgba(255,255,255,.14);border-color:#f1d38f}
html body .kh23-menu[open]>summary,html body .kh23-account[aria-current="page"]{background:#f1d38f;color:#073f34;border-color:#f1d38f}
html body .kh23-sheikhs{box-shadow:0 4px 14px rgba(0,0,0,.22)}
html body .kh23-sheikhs[aria-current="page"]{background:#f1d38f;color:#073f34;border-color:#f1d38f}
html body .kh23-panel{border-top:1px solid rgba(201,154,55,.4)}
@media (max-width:1020px){
  html body .kh23-bar{height:60px}
  html body .kh23-brand img{width:38px;height:38px;flex-basis:38px}
  html body .kh23-brand span{font-size:15.5px}
}
@media (max-width:420px){html body .kh23-brand span{font-size:14.5px}html body .kh23-bar{gap:7px}}
@media (max-width:360px){html body .kh23-brand span{display:none}}

/* app card: tighter on phones, buttons side by side, picture with soft frame */
html body .app-simple .app-simple-image img{border-radius:18px}
@media (max-width:760px){
  html body .app-simple-card{padding:18px 16px!important;gap:16px!important;border-radius:22px!important}
  html body .app-simple-title-row{gap:12px!important}
  html body .app-simple-logo{width:52px!important;height:52px!important}
  html body .app-simple h2{font-size:clamp(1.35rem,6vw,1.7rem)!important;line-height:1.3!important}
  html body .app-simple-copy>p{font-size:.95rem!important;line-height:1.8!important;margin:8px 0 0!important}
  html body .app-simple-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:14px!important}
  html body .app-simple-actions>a{min-height:46px!important;padding:0 10px!important;font-size:.95rem!important;width:auto!important;justify-content:center!important}
  html body .app-simple-note{display:none!important}
  html body .app-simple-image{border-radius:16px!important;overflow:hidden}
}

/* services: neat icon tiles (5 in a row on phones too) */
html body .community-home .community-grid.community-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important}
html body .community-home .community-card{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:10px!important;min-height:112px!important;padding:16px 8px!important;text-align:center!important;border-radius:18px!important;position:relative}
html body .community-home .community-card .channel-icon{width:52px!important;height:52px!important;border-radius:16px!important;margin:0!important}
html body .community-home .community-card .channel-icon svg{width:26px!important;height:26px!important}
html body .community-home .community-card strong{font-size:.98rem!important;line-height:1.3!important;white-space:normal!important}
html body .community-home .community-card .channel-arrow{display:none!important}
html body .community-home .community-card:hover{transform:translateY(-2px)}
html body .community-home .community-grid .kh31-sanad-card{grid-column:auto!important}
@media (max-width:760px){
  html body .community-home .community-grid.community-grid{gap:8px!important}
  html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{min-height:88px!important;padding:12px 2px 10px!important;gap:7px!important;border-radius:16px!important}
  html body .community-home .community-card .channel-icon{width:44px!important;height:44px!important;border-radius:14px!important}
  html body .community-home .community-card .channel-icon svg{width:22px!important;height:22px!important}
  html body.home-refined .community-home .community-grid .community-card strong,html body .community-home .community-grid .community-card strong{font-size:11.5px!important;font-weight:800!important;line-height:1.35!important;word-break:keep-all!important;overflow-wrap:normal!important;width:100%!important}
}

/* library collections: both as slim rows */
html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-feature-top{display:flex!important;flex-direction:row!important;align-items:center!important;gap:16px!important;padding:14px 18px!important;min-height:0!important}
html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-cover{flex:none;width:78px!important;max-width:78px!important;margin:0!important}
html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-cover img{width:78px!important;height:auto!important}
html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-feature-copy{flex:1;min-width:0;text-align:right}
html body .library-shell .kh-sawati-feature:not(.kh33-burda) h2{font-size:clamp(1.15rem,2.2vw,1.6rem)!important;margin:2px 0!important}
html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-view-toggle{flex:none;width:auto!important;min-height:42px!important;padding:0 18px!important;border-radius:999px!important;margin:0!important;font-size:.9rem!important}
@media (max-width:560px){
  html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-feature-top{display:grid!important;grid-template-columns:62px minmax(0,1fr)!important;gap:8px 12px!important;padding:12px!important}
  html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-cover,html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-cover img{width:62px!important;max-width:62px!important}
  html body .library-shell .kh-sawati-feature:not(.kh33-burda) h2{font-size:1.12rem!important}
  html body .library-shell .kh-sawati-feature:not(.kh33-burda) p{font-size:.78rem!important}
  html body .library-shell .kh-sawati-feature:not(.kh33-burda) .kh-sawati-view-toggle{grid-column:1/-1;min-height:38px!important;width:100%!important;font-size:.85rem!important}
}
/* R41b: desktop services as small pills in one centered row */
@media (min-width:761px){
  html body .community-home .community-grid.community-grid{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:10px!important}
  html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{flex:0 0 auto!important;flex-direction:row!important;min-height:0!important;height:52px!important;padding:0 18px 0 8px!important;gap:10px!important;border-radius:999px!important;width:auto!important}
  html body .community-home .community-grid .community-card .channel-icon{width:36px!important;height:36px!important;border-radius:50%!important}
  html body .community-home .community-grid .community-card .channel-icon svg{width:19px!important;height:19px!important}
  html body.home-refined .community-home .community-grid .community-card strong,html body .community-home .community-grid .community-card strong{font-size:15px!important;white-space:nowrap!important}
}
/* R43: «سند الطريقة» lives in its own strip above, so not again here; centered, smaller icons */
html body .community-home .community-grid .kh31-sanad-card{display:none!important}
html body .community-home .community-home-head{text-align:center!important}
html body .community-home .community-grid.community-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
html body .community-home .community-grid .community-card{justify-content:center!important;text-align:center!important}
html body .community-home .community-grid .community-card .channel-icon{width:30px!important;height:30px!important}
html body .community-home .community-grid .community-card .channel-icon svg{width:16px!important;height:16px!important}
@media (min-width:761px){
  html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{height:46px!important;padding:0 16px 0 8px!important;gap:8px!important}
}
@media (max-width:760px){
  html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{min-height:76px!important}
  html body .community-home .community-grid .community-card .channel-icon{width:34px!important;height:34px!important;border-radius:12px!important}
  html body .community-home .community-grid .community-card .channel-icon svg{width:18px!important;height:18px!important}
}
/* R44: services = one elegant text bar (no icons, no boxes) */
html body .community-home .community-grid.community-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;max-width:760px;margin:0 auto!important;padding:4px!important;border-radius:999px!important;background:#fffdf8!important;border:1px solid rgba(201,154,55,.45)!important;box-shadow:0 6px 18px rgba(120,84,10,.08)!important}
html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;height:46px!important;min-height:0!important;padding:0 8px!important;margin:0!important;border:0!important;border-radius:999px!important;background:transparent!important;box-shadow:none!important;transform:none!important;position:relative!important}
html body .community-home .community-grid .community-card .channel-icon,html body .community-home .community-grid .community-card .channel-arrow{display:none!important}
html body.home-refined .community-home .community-grid .community-card strong,html body .community-home .community-grid .community-card strong{font-size:15px!important;font-weight:800!important;color:#073f34!important;white-space:nowrap!important;width:auto!important;line-height:1.2!important}
html body .community-home .community-grid .community-card:hover{background:#07583d!important}
html body .community-home .community-grid .community-card:hover strong{color:#fff!important}
html body .community-home .community-grid .community-card+.community-card::before{content:"";position:absolute;inset-inline-end:100%;top:13px;bottom:13px;width:1px;background:rgba(201,154,55,.45)}
html body .community-home .community-grid .kh31-sanad-card+.community-card::before{display:none}
@media (max-width:520px){
  html body .community-home .community-grid.community-grid{border-radius:22px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:4px!important}
  html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{height:44px!important;border-radius:18px!important}
  html body.home-refined .community-home .community-grid .community-card strong,html body .community-home .community-grid .community-card strong{font-size:14px!important}
  html body .community-home .community-grid .community-card+.community-card::before{display:none}
}
html body.home-refined .community-home .community-grid a.community-card.kh31-sanad-card,html body .community-home .community-grid a.community-card.kh31-sanad-card{display:none!important}
/* R45: small icons back in the services bar */
html body .community-home .community-grid .community-card .channel-icon{display:inline-grid!important;place-items:center!important;width:26px!important;height:26px!important;min-width:26px!important;border-radius:50%!important;margin:0 0 0 7px!important;padding:0!important;flex:none!important}
html body .community-home .community-grid .community-card .channel-icon svg{width:14px!important;height:14px!important}
html body .community-home .community-grid .community-card:hover .channel-icon{background:rgba(255,255,255,.18)!important;color:#fff!important}
@media (max-width:520px){html body .community-home .community-grid .community-card .channel-icon{width:24px!important;height:24px!important;min-width:24px!important}}

/* R45: the two collections (سواطع + البردة) as twin cards: side by side on desktop, matching slim rows on phones */
html body .library-shell .kh-sawati-feature.kh-sawati-feature{position:relative;box-sizing:border-box;border-radius:20px!important;overflow:hidden;background:linear-gradient(135deg,#fffdf8 0%,#f7efd9 100%)!important;border:1px solid rgba(201,154,55,.45)!important;box-shadow:0 8px 22px rgba(120,84,10,.08)!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature::before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:5px;background:linear-gradient(180deg,#d9ae4f,#07583d)}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-top{display:grid!important;grid-template-columns:76px minmax(0,1fr) auto!important;align-items:center!important;gap:6px 16px!important;padding:16px 20px 16px 18px!important;min-height:0!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover{grid-row:1;width:76px!important;max-width:76px!important;margin:0!important;border-radius:8px;overflow:hidden;box-shadow:0 6px 14px rgba(7,63,52,.25)}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover img{display:block;width:76px!important;height:auto!important;border-radius:0!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-copy{min-width:0;text-align:right;display:flex;flex-direction:column;gap:3px!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-eyebrow{font-size:.78rem!important;color:#8a6116!important;font-weight:800;margin:0!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature h2{font-size:clamp(1.15rem,1.9vw,1.45rem)!important;line-height:1.4!important;margin:0!important;color:#073f34!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature p{display:block!important;font-size:.82rem!important;margin:0!important;color:#6b7069!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-view-toggle,html body .library-shell .kh-sawati-feature.kh-sawati-feature a.kh33-burda-go{grid-column:auto!important;width:auto!important;min-height:40px!important;height:40px;padding:0 16px!important;border-radius:999px!important;margin:0!important;font-size:.88rem!important;white-space:nowrap;box-shadow:0 4px 12px rgba(7,88,61,.22)!important}
@media (min-width:900px){
  html body .library-shell .kh-sawati-feature.kh-sawati-feature{display:inline-block!important;vertical-align:top;width:calc(50% - 9px)!important;margin:14px 0 0!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature+.kh33-burda{margin-inline-start:14px!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature:has(.kh-sawati-collection-body:not([hidden])){display:block!important;width:100%!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-top{grid-template-columns:76px minmax(0,1fr)!important;min-height:150px!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-view-toggle,html body .library-shell .kh-sawati-feature.kh-sawati-feature a.kh33-burda-go{grid-column:2!important;justify-self:start!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover{grid-row:1 / span 2}
}
@media (max-width:560px){
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-top{grid-template-columns:56px minmax(0,1fr)!important;gap:6px 12px!important;padding:12px 14px 12px 12px!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover,html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover img{width:56px!important;max-width:56px!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover{grid-row:1 / span 2}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature h2{font-size:1.08rem!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature p{display:none!important}
  html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-view-toggle,html body .library-shell .kh-sawati-feature.kh-sawati-feature a.kh33-burda-go{grid-column:2!important;justify-self:start!important;height:34px;min-height:34px!important;font-size:.8rem!important;padding:0 14px!important}
}
html body.home-refined .community-home .community-grid .community-card,html body .community-home .community-grid .community-card{direction:rtl!important}html body .community-home .community-grid .community-card .channel-icon{margin:0 0 0 8px!important}
html body .community-home .community-grid .community-card .channel-icon{order:-1!important}html body .community-home .community-grid .community-card strong{order:1!important}
/* R46: home banner «الخلوتية الرملية» */
html body .kh46-banner{padding:18px 0 4px}
html body .kh46-banner-link{display:block;border-radius:20px;overflow:hidden;border:1px solid rgba(201,154,55,.55);box-shadow:0 10px 26px rgba(7,63,52,.18);background:#073f34;aspect-ratio:1400/467}
html body .kh46-banner-link img{display:block;width:100%;height:100%;object-fit:cover}
@media (max-width:760px){html body .kh46-banner{padding:12px 0 0}html body .kh46-banner-link{border-radius:14px}}
@media (min-width:761px){html body .kh46-banner-link{aspect-ratio:4/1}html body .kh46-banner-link img{object-position:50% 50%}}
/* R47: slimmer banner + compact app card */
html body .kh46-banner-link{aspect-ratio:auto!important;height:clamp(120px,15vw,180px)}
html body .kh46-banner-link img{height:100%!important;object-fit:cover!important;object-position:50% 52%!important}
@media (max-width:760px){html body .kh46-banner-link{height:96px}html body .kh46-banner{padding:10px 0 0}}

html body .app-simple .app-simple-card{padding:18px 22px!important;gap:22px!important;align-items:center!important;min-height:0!important}
html body .app-simple .app-simple-note{display:none!important}
html body .app-simple .app-simple-logo{width:48px!important;height:48px!important}
html body .app-simple h2{font-size:clamp(1.25rem,2vw,1.6rem)!important;line-height:1.3!important;margin:0!important}
html body .app-simple .app-simple-copy>p{font-size:.95rem!important;line-height:1.7!important;margin:8px 0 0!important}
html body .app-simple .app-simple-actions{margin-top:14px!important}
html body .app-simple .app-simple-actions>a{min-height:44px!important}
@media (min-width:761px){
  html body .app-simple .app-simple-card{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,400px)!important}
  html body .app-simple .app-simple-image{display:block!important;height:190px!important;border-radius:16px!important;overflow:hidden!important}
  html body .app-simple .app-simple-image img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:50% 40%!important;border-radius:16px!important}
}
@media (max-width:760px){
  html body .app-simple .app-simple-card{padding:14px!important;gap:0!important;border-radius:18px!important}
  html body .app-simple .app-simple-image{display:none!important}
  html body .app-simple .app-simple-kicker{display:none!important}
  html body .app-simple .app-simple-logo{width:42px!important;height:42px!important}
  html body .app-simple h2{font-size:1.2rem!important}
  html body .app-simple .app-simple-copy>p{font-size:.85rem!important;line-height:1.6!important;margin:6px 0 0!important}
  html body .app-simple .app-simple-actions{margin-top:10px!important;gap:8px!important}
  html body .app-simple .app-simple-actions>a{min-height:40px!important;font-size:.88rem!important}
}
@media (min-width:761px){html body .app-simple .container .app-simple-card.app-simple-card{grid-template-columns:minmax(0,1fr) minmax(0,420px)!important}html body .app-simple .app-simple-image{max-width:420px!important;width:100%!important;justify-self:end}}
@media (min-width:761px){html body .app-simple .app-simple-copy{max-width:none!important;width:100%!important}html body .app-simple .app-simple-actions{max-width:440px}}
@media (min-width:761px){html body .app-simple .container .app-simple-card.app-simple-card{grid-template-columns:minmax(0,420px) minmax(0,1fr)!important}html body .app-simple .app-simple-image{justify-self:stretch!important;max-width:none!important}}
@media (min-width:761px){html body .app-simple .app-simple-image{height:205px!important}}
/* R48: app + sanad as one row of two twin cards (desktop and phone) */
html body .kh47-duo{box-sizing:border-box;max-width:1232px;margin:14px auto 0;padding:0 16px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
html body .kh47-duo>section{margin:0!important;padding:0!important;min-width:0}
html body .kh47-duo>section>.container{max-width:none!important;width:auto!important;padding:0!important;margin:0!important;height:100%}
/* app half */
html body .kh47-duo .app-simple .container .app-simple-card.app-simple-card{display:flex!important;flex-direction:column!important;justify-content:center!important;height:100%;box-sizing:border-box;padding:16px 18px!important;gap:0!important;border-radius:20px!important;min-height:0!important}
html body .kh47-duo .app-simple .app-simple-image,html body .kh47-duo .app-simple .app-simple-note{display:none!important}
html body .kh47-duo .app-simple .app-simple-copy{width:100%!important;max-width:none!important}
html body .kh47-duo .app-simple .app-simple-title-row{gap:10px!important;align-items:center!important}
html body .kh47-duo .app-simple .app-simple-logo{width:44px!important;height:44px!important}
html body .kh47-duo .app-simple .app-simple-kicker{font-size:.75rem!important}
html body .kh47-duo .app-simple h2{font-size:clamp(1.05rem,1.7vw,1.35rem)!important;line-height:1.3!important}
html body .kh47-duo .app-simple .app-simple-copy>p{font-size:.85rem!important;line-height:1.6!important;margin:6px 0 0!important}
html body .kh47-duo .app-simple .app-simple-actions{display:flex!important;flex-wrap:wrap;gap:8px!important;margin-top:12px!important;max-width:none!important}
html body .kh47-duo .app-simple .app-simple-actions>a{flex:1 1 0;min-height:40px!important;height:40px;padding:0 12px!important;font-size:.88rem!important;white-space:nowrap}
/* sanad half */
html body .kh47-duo .kh31-sanad .kh31-card{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:10px!important;height:100%;box-sizing:border-box;padding:16px 18px!important;border-radius:20px!important}
html body .kh47-duo .kh31-sanad .kh31-copy{flex-direction:column!important;align-items:flex-start!important;gap:2px!important;width:100%}
html body .kh47-duo .kh31-sanad .kh31-kicker{display:block!important;font-size:.75rem!important}
html body .kh47-duo .kh31-sanad .kh31-title{font-size:clamp(1.05rem,1.7vw,1.35rem)!important}
html body .kh47-duo .kh31-sanad .kh31-btn{order:3;margin-top:8px!important;min-height:40px!important;height:40px;padding:0 16px!important;font-size:.88rem!important}
html body .kh47-duo .kh31-sanad .kh31-chain{align-self:flex-start;max-width:100%;overflow:hidden}
html body .kh47-duo .kh31-sanad .kh31-pro{width:40px!important;height:40px!important;font-size:21px!important}
html body .kh47-duo .kh31-sanad .kh31-ali{width:32px!important;height:32px!important;font-size:12px!important}
html body .kh47-duo .kh31-sanad .kh31-p{width:32px!important;height:32px!important}
/* phones: still one row, two compact cards */
@media (max-width:760px){
  html body .kh47-duo{gap:8px;padding:0 10px;margin-top:10px}
  html body .kh47-duo .app-simple .container .app-simple-card.app-simple-card,html body .kh47-duo .kh31-sanad .kh31-card{padding:12px 10px!important;border-radius:16px!important}
  html body .kh47-duo .app-simple .app-simple-title-row{flex-direction:column!important;align-items:flex-start!important;gap:6px!important}
  html body .kh47-duo .app-simple .app-simple-logo{width:34px!important;height:34px!important}
  html body .kh47-duo .app-simple .app-simple-kicker,html body .kh47-duo .kh31-sanad .kh31-kicker,html body .kh47-duo .app-simple .app-simple-copy>p{display:none!important}
  html body .kh47-duo .app-simple h2,html body .kh47-duo .kh31-sanad .kh31-title{font-size:.98rem!important;line-height:1.35!important}
  html body .kh47-duo .app-simple .app-simple-actions{flex-direction:column!important;gap:6px!important;margin-top:10px!important}
  html body .kh47-duo .app-simple .app-simple-actions>a{flex:none;width:100%!important;height:34px;min-height:34px!important;font-size:.78rem!important;padding:0 8px!important}
  html body .kh47-duo .app-simple .app-simple-actions>a svg{width:15px!important;height:15px!important}
  html body .kh47-duo .kh31-sanad .kh31-card{gap:8px!important}
  html body .kh47-duo .kh31-sanad .kh31-chain{gap:3px!important}
  html body .kh47-duo .kh31-sanad .kh31-pro{width:30px!important;height:30px!important;font-size:16px!important}
  html body .kh47-duo .kh31-sanad .kh31-ali{width:24px!important;height:24px!important;font-size:9px!important}
  html body .kh47-duo .kh31-sanad .kh31-dots{display:none!important}
  html body .kh47-duo .kh31-sanad .kh31-p{width:24px!important;height:24px!important;box-shadow:0 0 0 1.5px #fff7dc,0 0 0 2.5px #c99a37!important}
  html body .kh47-duo .kh31-sanad .kh31-p:nth-of-type(n+4){display:none!important}
  html body .kh47-duo .kh31-sanad .kh31-btn{width:100%;justify-content:center;height:34px;min-height:34px!important;font-size:.78rem!important;padding:0 8px!important;margin-top:4px!important}
}
html body .kh47-duo{max-width:1212px;margin-bottom:18px}
html body .kh47-duo .kh31-sanad .kh31-copy{display:contents!important}
html body .kh47-duo .kh31-sanad .kh31-kicker{order:1}html body .kh47-duo .kh31-sanad .kh31-title{order:2}
html body .kh47-duo .kh31-sanad .kh31-chain{order:3}html body .kh47-duo .kh31-sanad .kh31-btn{order:4;margin-top:4px!important}
@media (max-width:760px){html body .kh47-duo{margin-bottom:6px}}
/* R49: light banner */
html body .kh46-banner-link{background:#fbf6e9!important;border-color:rgba(201,154,55,.6)!important;box-shadow:0 8px 22px rgba(120,84,10,.12)!important}
html body .kh46-banner-link img{object-position:50% 47%!important}
/* R55: services row — compact pills, always centred (wraps to a centred second line on small screens) */
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .container>.community-grid,html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid{display:flex!important;flex-flow:row wrap!important;justify-content:center!important;align-items:center!important;gap:6px!important;width:max-content!important;max-width:100%!important;margin:10px auto 4px!important;padding:6px!important;overflow:visible!important;border:1px solid rgba(201,154,55,.55)!important;border-radius:999px!important;background:#fffdf8!important;box-shadow:0 4px 14px rgba(120,84,10,.07)!important;box-sizing:border-box!important;grid-template-columns:none!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card{flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important;height:36px!important;min-height:36px!important;padding:0 12px 0 14px!important;margin:0!important;gap:7px!important;border:0!important;border-radius:999px!important;background:transparent!important;box-shadow:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card::before,html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card::after{display:none!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card .channel-icon{width:24px!important;height:24px!important;min-width:24px!important;flex:0 0 24px!important;flex-basis:24px!important;border-radius:50%!important;margin:0!important;background:#e8f1ec!important;color:#07583d!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card .channel-icon svg{width:13px!important;height:13px!important;max-width:13px!important;max-height:13px!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card strong{font-weight:800!important;font-size:.86rem!important;line-height:1.3!important;white-space:nowrap!important;color:#073f34!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card .channel-arrow{display:none!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card:is(:hover,:focus-visible){background:#07583d!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card:is(:hover,:focus-visible) strong{color:#fff!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card:is(:hover,:focus-visible) .channel-icon{background:rgba(255,255,255,.18)!important;color:#fff!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card.kh31-sanad-card{display:none!important}
html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-home-head{font-size:clamp(1.05rem,1.8vw,1.3rem)!important;margin:0 auto!important;text-align:center!important}
@media (max-width:620px){html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .container>.community-grid,html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid{border-radius:22px!important;padding:5px!important;gap:4px!important}html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card{height:34px!important;min-height:34px!important;padding:0 10px 0 11px!important}html body:is(.home-refined,.kh55-x,*) section.community-home:is(.kh-hisn-services-r5,.kh55-x,*) .community-grid>a.community-card strong{font-size:.8rem!important}}
/* R55: one compact khatma banner on home: text + 4 small buttons + the latest public khatmas as a slim strip */
html body.home-refined .kh108-one-banner,html body .kh108-one-banner{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"text acts" "feed feed"!important;gap:10px 18px!important;align-items:center!important;width:min(1160px,calc(100% - 32px))!important;margin:12px auto 14px!important;padding:14px 18px!important;border-radius:16px!important}
html body .kh108-one-banner .kh108-one-content{grid-area:text!important;min-width:0!important}
html body .kh108-one-banner .kh108-kicker{font-size:.76rem!important}
html body .kh108-one-banner h2{margin:0 0 3px!important;font-size:clamp(1.12rem,1.7vw,1.38rem)!important;line-height:1.45!important}
html body .kh108-one-banner .kh108-one-content p{font-size:.84rem!important;line-height:1.6!important;opacity:.92}
html body .kh108-one-banner .kh108-one-actions{grid-area:acts!important;display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;gap:7px!important;flex:none!important;max-width:600px!important}
html body .kh108-one-banner .kh108-one-actions a{min-height:34px!important;padding:6px 13px!important;border-radius:999px!important;font-size:.82rem!important;white-space:nowrap!important}
html body .kh108-one-banner .kh55-feed{grid-area:feed!important;display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;padding-top:10px!important;border-top:1px solid rgba(243,220,166,.25)!important}
html body .kh108-one-banner .kh55-feed-label{flex:none!important;color:#f3d091!important;font-weight:800!important;font-size:.78rem!important;line-height:1.4!important;white-space:nowrap!important}
html body .kh108-one-banner .kh55-feed-all{flex:none!important;color:#f3dca6!important;font-weight:800!important;font-size:.78rem!important;line-height:1.4!important;text-decoration:none!important;white-space:nowrap!important}
html body .kh108-one-banner .kh55-feed-all:hover{text-decoration:underline!important}
html body .kh108-one-banner .kh55-feed .kh104-feed-cards{flex:1 1 auto!important;min-width:0!important;display:flex!important;gap:8px!important;overflow:hidden!important;margin:0!important;padding:0!important;grid-template-columns:none!important}
html body .kh108-one-banner .kh55-feed .kh104-feed-empty{margin:0!important;color:#e5f1eb!important;font-weight:600!important;font-size:.78rem!important;line-height:1.5!important}
html body .kh108-one-banner .kh55-feed .kh104-feed-card{position:relative!important;flex:0 1 250px!important;min-width:0!important;display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;grid-template-areas:"icon title" "icon meta" "icon track"!important;column-gap:8px!important;row-gap:1px!important;align-items:center!important;padding:6px 10px!important;margin:0!important;border:1px solid rgba(243,220,166,.32)!important;border-radius:12px!important;background:rgba(255,255,255,.07)!important;box-shadow:none!important;color:#fff9eb!important;min-height:0!important}
html body .kh108-one-banner .kh55-feed .kh104-feed-card:nth-child(n+4){display:none!important}
html body .kh108-one-banner .kh55-feed .kh104-card-heading{display:contents!important}
html body .kh108-one-banner .kh55-feed .kh104-card-icon{grid-area:icon!important;width:28px!important;height:28px!important;border-radius:50%!important;overflow:hidden!important;display:grid!important;place-items:center!important;background:rgba(255,255,255,.12)!important;font-size:15px!important}
html body .kh108-one-banner .kh55-feed .kh104-card-icon img{width:100%!important;height:100%!important;object-fit:cover!important}
html body .kh108-one-banner .kh55-feed .kh104-card-title{grid-area:title!important;min-width:0!important}
html body .kh108-one-banner .kh55-feed .kh104-card-title strong{display:block!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;color:#fff9eb!important;font-weight:800!important;font-size:.8rem!important;line-height:1.45!important}
html body .kh108-one-banner .kh55-feed .kh104-card-title small,html body .kh108-one-banner .kh55-feed .kh104-card-desc{display:none!important}
html body .kh108-one-banner .kh55-feed .kh104-card-meta{grid-area:meta!important;display:flex!important;gap:8px!important;justify-content:flex-start!important;margin:0!important;color:#cfe3d8!important;font-weight:600!important;font-size:.7rem!important;line-height:1.4!important}
html body .kh108-one-banner .kh55-feed .kh104-card-track{grid-area:track!important;height:3px!important;margin:2px 0 0!important;border-radius:3px!important;background:rgba(255,255,255,.16)!important;overflow:hidden!important}
html body .kh108-one-banner .kh55-feed .kh104-card-track>span{display:block!important;height:100%!important;background:#f3d091!important}
html body .kh108-one-banner .kh55-feed .kh104-card-actions{position:static!important;margin:0!important}
html body .kh108-one-banner .kh55-feed .kh104-card-actions a{position:absolute!important;inset:0!important;z-index:1!important;border-radius:12px!important;font-size:0!important;color:transparent!important;background:transparent!important;border:0!important;min-height:0!important;padding:0!important}
html body .kh108-one-banner .kh55-feed .kh104-feed-card:hover{background:rgba(255,255,255,.13)!important}
html body .kh108-one-banner .kh55-feed .kh104-card-actions a:focus-visible{outline:2px solid #f3d091!important;outline-offset:2px!important}
@media (max-width:860px){html body.home-refined .kh108-one-banner,html body .kh108-one-banner{grid-template-columns:1fr!important;grid-template-areas:"text" "acts" "feed"!important;gap:10px!important}html body .kh108-one-banner .kh108-one-actions{justify-content:flex-start!important;max-width:none!important}}
@media (max-width:620px){html body.home-refined .kh108-one-banner,html body .kh108-one-banner{width:calc(100% - 24px)!important;padding:12px 13px!important}html body .kh108-one-banner .kh108-one-content p{display:none!important}html body .kh108-one-banner .kh108-one-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}html body .kh108-one-banner .kh108-one-actions a{justify-content:center!important;padding:6px 8px!important;font-size:.78rem!important}html body .kh108-one-banner .kh55-feed{flex-wrap:wrap!important;gap:7px 10px!important}html body .kh108-one-banner .kh55-feed .kh104-feed-cards{order:3!important;flex:1 1 100%!important;flex-direction:column!important}html body .kh108-one-banner .kh55-feed .kh104-feed-card{flex:none!important}html body .kh108-one-banner .kh55-feed .kh104-feed-card:nth-child(n+3){display:none!important}html body .kh108-one-banner .kh55-feed-all{margin-inline-start:auto!important}}
/* R56: app card + sanad card — lower and tidier on tablets/computers (one compact row each) */
@media (min-width:761px){
html body .kh47-duo{gap:12px!important;margin-top:10px!important;margin-bottom:12px!important;align-items:stretch!important}
html body .kh47-duo .app-simple .container .app-simple-card.app-simple-card{direction:rtl!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-areas:"logo title acts" "logo desc acts"!important;align-items:center!important;column-gap:12px!important;row-gap:2px!important;padding:12px 16px!important;min-height:0!important;height:100%!important;box-sizing:border-box!important}
html body .kh47-duo .app-simple .app-simple-copy,html body .kh47-duo .app-simple .app-simple-title-row{display:contents!important}
html body .kh47-duo .app-simple .app-simple-logo{grid-area:logo!important;width:40px!important;height:40px!important}
html body .kh47-duo .app-simple .app-simple-title-block{grid-area:title!important;min-width:0!important;align-self:end!important}
html body .kh47-duo .app-simple .app-simple-kicker{font-size:.72rem!important}
html body .kh47-duo .app-simple h2{font-size:clamp(1rem,1.5vw,1.18rem)!important;line-height:1.35!important;margin:0!important}
html body .kh47-duo .app-simple .app-simple-copy>p{grid-area:desc!important;align-self:start!important;margin:0!important;font-size:.78rem!important;line-height:1.5!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important}
html body .kh47-duo .app-simple .app-simple-actions{grid-area:acts!important;display:flex!important;flex-direction:column!important;gap:6px!important;margin:0!important;width:150px!important}
html body .kh47-duo .app-simple .app-simple-actions>a{flex:none!important;width:100%!important;height:32px!important;min-height:32px!important;padding:0 10px!important;font-size:.8rem!important;border-radius:999px!important}
html body .kh47-duo .app-simple .app-simple-actions>a svg{width:14px!important;height:14px!important}
html body .kh47-duo .app-simple .app-simple-note,html body .kh47-duo .app-simple .app-simple-image{display:none!important}
html body .kh47-duo .kh31-sanad .kh31-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"kick btn" "title btn" "chain btn"!important;align-items:center!important;column-gap:12px!important;row-gap:3px!important;padding:12px 16px!important;min-height:0!important;height:100%!important;box-sizing:border-box!important}
html body .kh47-duo .kh31-sanad .kh31-kicker{grid-area:kick!important;font-size:.72rem!important}
html body .kh47-duo .kh31-sanad .kh31-title{grid-area:title!important;font-size:clamp(1rem,1.5vw,1.18rem)!important;line-height:1.35!important}
html body .kh47-duo .kh31-sanad .kh31-chain{grid-area:chain!important;margin:2px 0 0!important;gap:4px!important}
html body .kh47-duo .kh31-sanad .kh31-btn{grid-area:btn!important;margin:0!important;height:32px!important;min-height:32px!important;padding:0 14px!important;font-size:.8rem!important;white-space:nowrap!important;border-radius:999px!important}
html body .kh47-duo .kh31-sanad .kh31-pro{width:30px!important;height:30px!important;font-size:16px!important}
html body .kh47-duo .kh31-sanad .kh31-ali{width:26px!important;height:26px!important;font-size:10px!important}
html body .kh47-duo .kh31-sanad .kh31-p{width:26px!important;height:26px!important}
html body .kh47-duo .kh31-sanad .kh31-dots i{width:5px!important;height:5px!important}
}
/* R56: «سواطع أنوار اللآلئ السنية» + «البردة» cards — one low row each: small cover, text, small button */
@media (min-width:761px){
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-top{direction:rtl!important;display:grid!important;grid-template-columns:52px minmax(0,1fr) auto!important;grid-template-rows:auto!important;align-items:center!important;gap:0 14px!important;min-height:0!important;padding:12px 16px!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover{grid-row:auto!important;grid-column:1!important;width:52px!important;height:70px!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-cover img{width:52px!important;height:70px!important;object-fit:cover!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-copy{grid-column:2!important;min-width:0!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-eyebrow{font-size:.72rem!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature h2{font-size:clamp(1rem,1.5vw,1.2rem)!important;line-height:1.4!important;margin:1px 0!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-feature-copy p{font-size:.78rem!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html body .library-shell .kh-sawati-feature.kh-sawati-feature .kh-sawati-view-toggle,html body .library-shell .kh-sawati-feature.kh-sawati-feature a.kh33-burda-go{grid-column:3!important;grid-row:auto!important;justify-self:end!important;align-self:center!important;width:auto!important;height:32px!important;min-height:32px!important;padding:0 14px!important;font-size:.8rem!important;border-radius:999px!important;white-space:nowrap!important;margin:0!important}
}

/* R57 — home promo cards (app / sanad / quran): no half-hidden swipe row on phones.
   Phones: one card per row, full width. Tablets: three equal cards. */
@media (max-width:620px){
html body main #kh1762-promos{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;overflow:visible!important;scroll-snap-type:none!important;width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important}
html body main #kh1762-promos .app-simple-card,html body main #kh1762-promos .kh31-card,html body main #kh1762-promos>.kh17-quran-banner{min-height:0!important;padding:12px 14px!important}
html body main #kh1762-promos .app-simple-actions{flex-wrap:nowrap!important}
html body main #kh1762-promos .app-simple-actions>a{flex:1 1 0!important;min-width:0!important}
html body main #kh1762-promos .kh31-copy,html body main #kh1762-promos .kh17-quran-banner{flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important}
html body main #kh1762-promos .kh31-btn,html body main #kh1762-promos .kh-quran-open{align-self:center!important}
}
@media (min-width:621px) and (max-width:900px){
html body main #kh1762-promos{grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important;scroll-snap-type:none!important}
html body main #kh1762-promos .app-simple-actions{flex-direction:column!important}
}

