/* /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/hisn/hisn-r8.css */
.kh-hisn{--hisn-green:#073f34;;--hisn-green-2:#125c49;;--hisn-gold:#a27b39;;--hisn-cream:#fffaf1;;--hisn-ink:#173e35;;color:var(--hisn-ink);;background:var(--hisn-cream);;min-height:68vh;;padding:clamp(16px,3vw,28px) 12px 58px;;font-family:Tajawal,system-ui,sans-serif;;line-height:1.75;;}
.kh-hisn *, .kh-hisn *::before,.kh-hisn *::after{box-sizing:border-box;;}
.kh-hisn [hidden]{display:none!important;;}
.kh-hisn .kh-hisn-wrap{max-width:1000px;;margin-inline:auto;;}
.kh-hisn .kh-hisn-kicker{font-size:13px;;letter-spacing:.03em;;color:#e5d5a8;;font-weight:700;;}
.kh-hisn .kh-hisn-hero p{font-size:clamp(14px,2vw,16px);;color:#e4eee9;;margin:2px 0 0;;}
.kh-hisn .kh-hisn-stat{display:flex;;gap:9px;;align-items:center;;flex-wrap:wrap;;margin-top:15px;;}
.kh-hisn .kh-hisn-pill{background:#ffffff16;;border:1px solid #ffffff47;;padding:2px 12px;;border-radius:999px;;font-size:13px;;color:#fff;;}
.kh-hisn .kh-hisn-panel{border:1px solid #e6d9c1;;background:#fff;;border-radius:17px;;padding:clamp(14px,3vw,22px);;margin-top:16px;;box-shadow:0 5px 20px #0b43300b;;}
.kh-hisn .kh-hisn-tools{display:flex;;gap:10px;;align-items:center;;flex-wrap:wrap;;}
.kh-hisn input[type=search]{flex:1;;min-width:220px;;appearance:none;;border:1px solid #c8d9cf;;border-radius:10px;;background:#fff;;color:var(--hisn-ink);;height:46px;;padding:10px 15px;;font:inherit;;font-size:15px;;outline-offset:2px;;}
.kh-hisn input[type=search]:focus{outline:2px solid var(--hisn-gold);;}
.kh-hisn button,.kh-hisn .kh-hisn-linkbtn{display:inline-flex;;align-items:center;;justify-content:center;;gap:6px;;min-height:44px;;padding:9px 14px;;border:1px solid #c9ddd2;;border-radius:10px;;background:#f7fbf8;;color:#125842;;text-align:center;;font:inherit;;font-size:15px;;font-weight:700;;cursor:pointer;;text-decoration:none;;line-height:1.35;;transition:background .15s ease,border-color .15s ease;;}
.kh-hisn button:hover,.kh-hisn .kh-hisn-linkbtn:hover{background:#e8f3ea;;border-color:#a5bead;;}
.kh-hisn button:focus-visible,.kh-hisn .kh-hisn-linkbtn:focus-visible,.kh-hisn a:focus-visible{outline:3px solid var(--hisn-gold);;outline-offset:3px;;}
.kh-hisn button[aria-pressed=true],.kh-hisn button.kh-hisn-mainbtn{background:#0c634e;;color:#fff;;border-color:#0c634e;;}
.kh-hisn button[aria-pressed=true]:hover,.kh-hisn button.kh-hisn-mainbtn:hover{background:#074835;;}
.kh-hisn button:disabled{opacity:.62;;cursor:default;;}
.kh-hisn h2{font-family:Amiri,Tajawal,serif;;font-size:clamp(22px,3vw,27px);;margin:0 0 10px;;color:#0b5745;;line-height:1.4;;}
.kh-hisn .kh-hisn-muted{color:#60776c;;font-size:14px;;}
.kh-hisn .kh-hisn-catcard[aria-current=true]{border:2px solid #9a7d3b;;background:#fdf5e7;;}
.kh-hisn .kh-hisn-section-head{display:flex;;align-items:center;;justify-content:space-between;;gap:10px;;flex-wrap:wrap;;}
.kh-hisn .kh-hisn-items{display:grid;;gap:13px;;margin-top:14px;;}
.kh-hisn .kh-hisn-item{border:1px solid #e5d9c6;;border-radius:13px;;padding:15px;;background:#fffdf9;;}
.kh-hisn .kh-hisn-item-head{display:flex;;align-items:center;;justify-content:space-between;;gap:8px;;flex-wrap:wrap;;margin-bottom:9px;;}
.kh-hisn .kh-hisn-item-index{color:#916f35;;font-size:13px;;font-weight:700;;}
.kh-hisn .kh-hisn-ar{font-family:Amiri,"Traditional Arabic",serif;;font-size:clamp(23px,3vw,29px);;line-height:2.05;;overflow-wrap:anywhere;;white-space:pre-wrap;;color:#173e35;;user-select:text;;}
.kh-hisn .kh-hisn-itembar{display:flex;;gap:8px;;align-items:center;;flex-wrap:wrap;;margin-top:15px;;padding-top:11px;;border-top:1px solid #eee6d7;;}
.kh-hisn .kh-hisn-countbtn{min-width:125px;;}
.kh-hisn .kh-hisn-complete{background:#e4f5eb!important;;border-color:#a8d0b7!important;;color:#0e5e3b!important;;}
.kh-hisn .kh-hisn-notice{border-radius:10px;;background:#f7f2e9;;padding:9px 13px;;color:#605b4e;;font-size:13px;;line-height:1.7;;}
.kh-hisn .kh-hisn-back{margin-bottom:9px;;}
.kh-hisn .kh-hisn-status{min-height:1.2em;;margin-top:10px;;color:#5b6f60;;font-size:14px;;}
.kh-hisn .kh-hisn-end{margin-top:15px;;color:#60776c;;font-size:13px;;line-height:1.9;;}
.kh-hisn .kh-hisn-end a{color:#0d5c45;;text-decoration:underline;;}
@media (max-width:620px){.kh-hisn{padding-inline:10px;;}
.kh-hisn .kh-hisn-panel{padding:13px;;}
.kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(2,minmax(0,1fr));;gap:8px;;}
.kh-hisn .kh-hisn-catcard{min-height:85px;;padding:11px;;}
.kh-hisn .kh-hisn-catname{font-size:14px;;}
.kh-hisn .kh-hisn-itembar button{flex:1;;min-width:0;;}
.kh-hisn .kh-hisn-ar{font-size:25px;;}}
@media (max-width:365px){.kh-hisn .kh-hisn-catgrid{grid-template-columns:1fr;;}}
@media (prefers-reduced-motion:reduce){.kh-hisn button{transition:none;;}}
.kh-hisn .kh-hisn-morebtn{margin-top:12px;;}
.kh-hisn .kh-hisn-catgrid{display:grid;;grid-template-columns:repeat(4,minmax(0,1fr));;gap:12px;;margin-top:12px;;}
.kh-hisn .kh-hisn-catcard:hover{transform:translateY(-2px);;border-color:#bda16b;;box-shadow:0 8px 20px rgba(7,63,52,.08);;}
.kh-hisn .kh-hisn-hero{border-radius:20px;;background:linear-gradient(120deg,#073e32,#11745a);;color:#fff;;padding:clamp(19px,4vw,30px);;border:1px solid #205e50;;box-shadow:0 7px 28px #083b2c13;;padding-block:22px;;}
.kh-hisn .kh-hisn-hero h1{font-family:Amiri,Tajawal,serif;;font-weight:700;;color:#fff;;font-size:clamp(28px,3.6vw,37px);;line-height:1.4;;margin:1px 0 0;;}
@media (max-width:900px){.kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(3,minmax(0,1fr));;}}
@media (max-width:650px){.kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(2,minmax(0,1fr));;gap:9px;;}
.kh-hisn .kh-hisn-catcard{min-height:98px;;padding:12px;;gap:8px;;}
.kh-hisn .kh-hisn-catname{font-size:14px;;}}
@media (max-width:370px){.kh-hisn .kh-hisn-catgrid{grid-template-columns:1fr;;}}
@media (prefers-reduced-motion:reduce){.kh-hisn .kh-hisn-catcard{transition:none;;}
.kh-hisn .kh-hisn-catcard:hover{transform:none;;}}
.kh-hisn .kh-hisn-audioplayer{display:block;;width:100%;;max-width:580px;;margin-top:12px;;accent-color:#0c634e;;border-radius:8px;;}
.kh-hisn .kh-hisn-audioplayer[hidden],.kh-hisn .kh-hisn-audio-error[hidden]{display:none!important;;}
.kh-hisn .kh-hisn-playbtn{background:#f0f5ed;;border-color:#a9c9b6;;}
.kh-hisn .kh-hisn-audio-error{display:block;;color:#9d3925;;font-size:13px;;margin-top:7px;;}
.kh-hisn .kh-hisn-catcard{min-height:108px;;width:100%;;justify-content:space-between;;text-align:right;;padding:18px 16px;;background:#fffdf9;;border:1px solid #e6d9c4;;border-radius:15px;;color:#164737;;position:relative;;display:flex;;align-items:center;;gap:12px;;box-shadow:0 2px 5px rgba(7,63,52,.025);;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;;min-width:0;;overflow:hidden;;}
.kh-hisn .kh-hisn-catcard>.kh-hisn-labels{display:flex;;flex-direction:column;;align-items:flex-start;;gap:2px;;min-width:0;;flex:1;;}
.kh-hisn .kh-hisn-catname{font-size:15px;;line-height:1.45;;font-weight:700;;overflow-wrap:break-word;;display:block;;}
.kh-hisn .kh-hisn-catcount{font-size:12px;;color:#6d8074;;white-space:normal;;display:block;;line-height:1.3;;}
.kh-hisn .kh-hisn-arrow{flex:none;;color:#4d7b69;;font-size:16px;;align-self:center;;}
@media (max-width:650px){.kh-hisn .kh-hisn-catcard{min-height:92px;;}
.kh-hisn .kh-hisn-catname{font-size:14px;;}}
#kh-hisn .kh-hisn-wrap{max-width:1140px;;}
#kh-hisn .kh-hisn-catgrid{display:grid;;grid-template-columns:repeat(4,minmax(0,1fr));;gap:11px;;}
#kh-hisn .kh-hisn-catcard{display:flex;;flex-direction:row;;direction:rtl;;align-items:center;;justify-content:space-between;;text-align:right;;min-height:86px;;gap:12px;;padding:13px 16px;;border:1px solid #e3d6c0;;background:#fffdfa;;border-radius:14px;;box-shadow:0 3px 12px rgb(23 62 53 / .035);;overflow:visible;;}
#kh-hisn .kh-hisn-catcard[aria-current=true]{border-color:#a27b39;;background:#fcf5e8;;box-shadow:inset 0 0 0 1px #a27b39;;}
#kh-hisn .kh-hisn-labels{min-width:0;;flex:1 1 auto;;display:flex;;flex-direction:column;;align-items:flex-start;;justify-content:center;;gap:3px;;text-align:right;;}
#kh-hisn .kh-hisn-catname{font-family:Tajawal,system-ui,sans-serif;;font-weight:700;;font-size:clamp(13px,1.12vw,15px);;line-height:1.52;;color:#144d3c;;white-space:normal;;overflow-wrap:normal;;word-break:normal;;}
#kh-hisn .kh-hisn-catcount{display:block;;white-space:normal;;font:500 12px/1.4 Tajawal,system-ui,sans-serif;;color:#677c70;;}
#kh-hisn .kh-hisn-arrow{display:inline-flex;;flex:0 0 27px;;width:27px;;height:27px;;border-radius:50%;;background:#edf3ec;;color:#125d49;;align-items:center;;justify-content:center;;font-size:17px;;}
#kh-hisn .kh-hisn-catcard:hover{border-color:#bd9d62;;background:#fffbf2;;transform:translateY(-1px);;}
#kh-hisn .kh-hisn-item{background:#fffdf9;;border-radius:16px;;padding:clamp(13px,2.3vw,24px);;scroll-margin-top:92px;;}
#kh-hisn .kh-hisn-item:target{border-color:#a27b39;;}
#kh-hisn .kh-hisn-itembar{gap:8px;;}
#kh-hisn .kh-hisn-itembar button{min-height:42px;;}
#kh-hisn .kh-hisn-audioplayer{width:100%;;max-width:550px;;margin-block:12px 3px;;}
#kh-hisn .kh-hisn-sharebar{display:flex;;flex-wrap:wrap;;gap:8px;;margin-top:11px;;border-top:1px dashed #e6dccb;;padding-top:12px;;}
#kh-hisn .kh-hisn-sharebar button{background:#fffaf0;;color:#164b3a;;border-color:#e2d5ba;;font-size:13px;;padding:8px 12px;;min-height:40px;;}
#kh-hisn .kh-hisn-sharebar button:hover{background:#f4eddd;;border-color:#bba36e;;}
.kh-hisn-share-overlay{position:fixed;;inset:0;;z-index:20000;;background:rgb(7 30 23 / .68);;display:flex;;align-items:center;;justify-content:center;;padding:18px;;direction:rtl;;}
.kh-hisn-share-dialog{width:min(100%,440px);;max-height:95dvh;;overflow:auto;;padding:20px;;border:1px solid #bba77a;;background:#fffbf3;;border-radius:20px;;text-align:center;;font-family:Tajawal,system-ui,sans-serif;;color:#164b3a;;box-shadow:0 20px 65px rgb(0 0 0 / .3);;}
.kh-hisn-share-dialog h3{font-size:22px;;line-height:1.4;;margin:0;;}
.kh-hisn-share-dialog p{font-size:14px;;line-height:1.6;;margin:7px 0 12px;;}
.kh-hisn-qr-canvas{display:block;;width:min(100%,310px);;height:auto;;aspect-ratio:1;;margin:10px auto;;border-radius:8px;;border:1px solid #e5d9bc;;background:#fff;;}
.kh-hisn-share-actions{display:flex;;justify-content:center;;gap:7px;;flex-wrap:wrap;;margin-top:13px;;}
.kh-hisn-share-actions button{min-height:42px;;padding:9px 13px;;background:#135a45;;border:1px solid #135a45;;color:#fff;;border-radius:9px;;font:700 14px Tajawal,system-ui,sans-serif;;cursor:pointer;;}
.kh-hisn-share-actions button:hover{background:#073f34;;}
.kh-hisn-share-actions button:focus-visible{outline:3px solid #a27b39;;outline-offset:3px;;}
@media (max-width:900px){#kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(3,minmax(0,1fr));;}}
@media (max-width:620px){#kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(2,minmax(0,1fr));;gap:9px;;}
#kh-hisn .kh-hisn-catcard{min-height:90px;;padding:12px 10px;;gap:7px;;}
#kh-hisn .kh-hisn-catname{font-size:13px;;}
#kh-hisn .kh-hisn-arrow{width:24px;;height:24px;;flex-basis:24px;;}
#kh-hisn .kh-hisn-sharebar button{flex:1 1 42%;;}}
@media (max-width:360px){#kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(1,minmax(0,1fr));;}}
@media (prefers-reduced-motion:reduce){#kh-hisn .kh-hisn-catcard:hover{transform:none;;}}
#kh-hisn .kh-hisn-hero-r7{--kh-r7-ink:#fff9ec;;position:relative;;isolation:isolate;;overflow:hidden;;display:grid;;grid-template-columns:minmax(0,1fr) minmax(150px,225px);;align-items:center;;gap:clamp(14px,3.4vw,52px);;width:100%;;min-width:0;;min-height:260px;;padding:clamp(22px,4vw,43px) clamp(20px,4vw,50px);;border:1px solid #94753d;;border-radius:clamp(16px,2.5vw,27px);;background:radial-gradient(ellipse at 85% 0%,rgba(52,139,107,.44),transparent 49%),
             radial-gradient(ellipse at 12% 120%,rgba(5,29,24,.7),transparent 60%),
             linear-gradient(124deg,#0f5c4b 0%,#084838 45%,#05382f 100%);;box-shadow:0 13px 30px rgba(4,52,40,.12),inset 0 0 0 1px rgba(246,210,128,.16);;color:var(--kh-r7-ink);;text-align:right;;}
#kh-hisn .kh-hisn-hero-r7::before{content:"";;position:absolute;;inset:9px;;pointer-events:none;;border:1px solid rgba(237,200,124,.23);;border-radius:inherit;;z-index:0;;}
#kh-hisn .kh-hisn-hero-r7::after{content:"";;position:absolute;;pointer-events:none;;inset:0;;z-index:0;;opacity:.14;;background:repeating-linear-gradient(45deg,transparent 0 43px,rgba(238,199,125,.28) 44px,transparent 45px 88px);;mask-image:linear-gradient(90deg,#000,transparent 70%);;}
#kh-hisn .kh-hisn-hero-text,#kh-hisn .kh-hisn-hero-art{position:relative;;z-index:1;;min-width:0;;}
#kh-hisn .kh-hisn-hero-eyebrow{color:#ecd5a1;;font:700 clamp(11px,1.4vw,13px)/1.7 Tajawal,system-ui,sans-serif;;letter-spacing:.04em;;display:flex;;align-items:center;;gap:9px;;}
#kh-hisn .kh-hisn-hero-star{font-size:16px;;color:#efd59a;;}
#kh-hisn .kh-hisn-hero-r7 h1{margin:2px 0 1px;;color:#fffaf0;;font-family:Amiri,Tajawal,serif;;font-size:clamp(33px,4.6vw,51px);;font-weight:700;;line-height:1.6;;text-wrap:balance;;text-shadow:0 2px 8px rgba(0,0,0,.11);;}
#kh-hisn .kh-hisn-hero-r7 .kh-hisn-hero-description{margin:0;;max-width:560px;;color:#e6f0e7;;font:500 clamp(14px,1.6vw,16px)/1.9 Tajawal,system-ui,sans-serif;;text-wrap:pretty;;}
#kh-hisn .kh-hisn-hero-actions{display:flex;;align-items:stretch;;gap:10px;;flex-wrap:wrap;;margin-top:17px;;}
#kh-hisn .kh-hisn-hero-actions a,#kh-hisn .kh-hisn-hero-actions button{display:inline-flex;;align-items:center;;justify-content:center;;gap:8px;;min-height:44px;;min-width:142px;;margin:0;;padding:9px 16px;;border-radius:12px;;box-sizing:border-box;;cursor:pointer;;text-decoration:none;;font:700 14px/1.5 Tajawal,system-ui,sans-serif;;transition:background-color .18s,border-color .18s,transform .18s;;}
#kh-hisn .kh-hisn-hero-actions .kh-hisn-hero-primary{background:#f4dfad;;color:#164737;;border:1px solid #f4dfad;;}
#kh-hisn .kh-hisn-hero-actions .kh-hisn-hero-primary:hover{background:#fff0c9;;transform:translateY(-1px);;}
#kh-hisn .kh-hisn-hero-actions .kh-hisn-hero-secondary{background:rgba(255,255,255,.09);;color:#fff9ed;;border:1px solid rgba(255,244,207,.52);;}
#kh-hisn .kh-hisn-hero-actions .kh-hisn-hero-secondary:hover{background:rgba(255,255,255,.19);;}
#kh-hisn .kh-hisn-hero-actions :is(a,button):focus-visible{outline:3px solid #f9ce79;;outline-offset:4px;;}
#kh-hisn .kh-hisn-hero-r7 .kh-hisn-stat{display:flex;;gap:8px;;flex-wrap:wrap;;margin-top:17px;;}
#kh-hisn .kh-hisn-hero-r7 .kh-hisn-pill{display:inline-flex;;gap:5px;;align-items:center;;border-radius:999px;;padding:3px 12px;;background:rgba(255,255,255,.07);;border:1px solid rgba(255,235,188,.28);;color:#fff9ed;;font:500 13px/1.7 Tajawal,system-ui,sans-serif;;}
#kh-hisn .kh-hisn-hero-r7 .kh-hisn-pill b{color:#f5d798;;font-size:16px;;font-weight:800;;}
#kh-hisn .kh-hisn-hero-art{display:flex;;flex-direction:column;;align-items:center;;justify-content:center;;gap:7px;;user-select:none;;}
#kh-hisn .kh-hisn-hero-medallion{width:min(100%,216px);;aspect-ratio:1;;display:grid;;place-items:center;;border-radius:50%;;background:radial-gradient(circle,rgba(255,238,185,.15),rgba(255,238,185,.02) 72%);;box-shadow:0 0 0 1px rgba(246,220,160,.12),0 0 55px rgba(220,183,100,.075);;}
#kh-hisn .kh-hisn-hero-symbol{width:94%;;height:94%;;display:block;;color:#ead19c;;}
#kh-hisn .kh-hisn-hero-artlabel{color:#e8cf9b;;letter-spacing:.11em;;font:600 12px/1.5 Amiri,Tajawal,serif;;}
@media (max-width:900px){#kh-hisn .kh-hisn-hero-r7{grid-template-columns:minmax(0,1fr) minmax(125px,170px);;gap:12px;;}
#kh-hisn .kh-hisn-hero-medallion{width:min(100%,164px);;}}
@media (max-width:650px){#kh-hisn .kh-hisn-hero-r7{grid-template-columns:minmax(0,1fr);;min-height:0;;padding:23px 20px 21px;;}
#kh-hisn .kh-hisn-hero-art{display:none;;}
#kh-hisn .kh-hisn-hero-r7 h1{font-size:clamp(33px,8.3vw,42px);;line-height:1.5;;margin-top:5px;;}
#kh-hisn .kh-hisn-hero-actions{gap:8px;;margin-top:14px;;}
#kh-hisn .kh-hisn-hero-actions a,#kh-hisn .kh-hisn-hero-actions button{flex:1 1 130px;;min-width:0;;padding-inline:10px;;}
#kh-hisn .kh-hisn-hero-r7 .kh-hisn-stat{margin-top:14px;;}}
@media (max-width:360px){#kh-hisn .kh-hisn-hero-r7{padding:20px 15px 19px;;}
#kh-hisn .kh-hisn-hero-actions a,#kh-hisn .kh-hisn-hero-actions button{font-size:13px;;}
#kh-hisn .kh-hisn-hero-r7 .kh-hisn-pill{padding-inline:9px;;}}
@media (prefers-reduced-motion:reduce){#kh-hisn .kh-hisn-hero-actions a,#kh-hisn .kh-hisn-hero-actions button{transition:none;;transform:none!important;;}}
/* R8 unified fixes: one Hisn stylesheet, accessible controls and responsive cards. */
#kh-hisn{background:#F7F5EF;color:#173E35}
#kh-hisn .kh-hisn-panel{background:#fffdf8;border:1px solid #d8dfd6;border-radius:18px}
#kh-hisn .kh-hisn-hero-r7{min-height:0;padding-block:clamp(18px,3vw,31px)}
#kh-hisn .kh-hisn-catgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#kh-hisn .kh-hisn-catcard{height:100%;box-sizing:border-box;overflow:visible;min-width:0;min-height:90px;box-shadow:0 3px 10px #083b2c0c;border:1px solid #dfdcca;border-radius:14px}
#kh-hisn .kh-hisn-catname{font-weight:800;line-height:1.45;overflow-wrap:break-word;word-break:normal}
#kh-hisn .kh-hisn-catcard[aria-current="true"]{border-color:#a27b39;background:#fff3d5;color:#073f34;box-shadow:0 0 0 2px #eed49e66}
#kh-hisn button[aria-pressed="true"]{color:#fff;background:#0b604c;border-color:#0b604c}
#kh-hisn .kh-hisn-hero-actions a,#kh-hisn .kh-hisn-hero-actions button{min-height:44px;border-radius:12px}
#kh-hisn .kh-hisn-itembar button,#kh-hisn .kh-hisn-sharebar button{min-width:0;white-space:normal}
.kh-hisn-share-dialog{box-sizing:border-box;width:min(100%,430px);background:#fffdf8;border:1px solid #c9a059;max-height:min(92dvh,900px)}
.kh-hisn-qr-canvas{box-sizing:border-box;width:min(100%,260px);height:auto;border:10px solid white;box-shadow:0 0 0 1px #d6ded8;border-radius:12px;image-rendering:pixelated}
.kh-hisn-share-actions button{min-height:44px;background:#0b604c;border:1px solid #0b604c;color:#fff}
#kh-hisn .kh-hisn-item{overflow-wrap:anywhere}
#kh-hisn .kh-hisn-ar{overflow-wrap:break-word}
@media(max-width:920px){#kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){#kh-hisn .kh-hisn-catgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#kh-hisn .kh-hisn-catcard{padding:12px;min-height:87px}#kh-hisn .kh-hisn-tools input{min-width:0;flex:1 1 100%}#kh-hisn .kh-hisn-hero-actions>a,#kh-hisn .kh-hisn-hero-actions>button{flex:1 1 100%}.kh-hisn-share-actions{display:grid;grid-template-columns:1fr 1fr}.kh-hisn-share-actions button:last-child{grid-column:1/-1}}
@media(max-width:360px){#kh-hisn .kh-hisn-catgrid{grid-template-columns:1fr}.kh-hisn-share-actions{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#kh-hisn .kh-hisn-catcard:hover{transform:none!important}}


/* R10.8.2 • Accessible RTL action cards — no extra stylesheet and no global selectors. */
#kh-hisn .kh-hisn-itembar,
#kh-hisn .kh-hisn-sharebar {direction:rtl;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:stretch;}
#kh-hisn .kh-hisn-itembar button,
#kh-hisn .kh-hisn-sharebar button {box-sizing:border-box;width:100%;min-width:0;min-height:48px;margin:0;padding:10px 12px;border-radius:13px;border:1px solid #ccdcd1;background:#f7faf6;color:#0c5140;box-shadow:none;font:700 clamp(14px,1.2vw,16px)/1.4 Tajawal,system-ui,sans-serif;text-align:center;white-space:normal;}
#kh-hisn .kh-hisn-action-button {direction:rtl!important;display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:9px!important;}
#kh-hisn .kh-hisn-action-icon {flex:0 0 20px;width:20px;height:20px;display:block;stroke:currentColor;}
#kh-hisn .kh-hisn-action-label {min-width:0;overflow-wrap:break-word;line-height:1.45;}
#kh-hisn .kh-hisn-itembar .kh-hisn-playbtn {background:#07513f;color:#fff;border-color:#07513f;}
#kh-hisn .kh-hisn-itembar .kh-hisn-countbtn {background:#fff3d7;color:#174739;border-color:#dcc28d;}
#kh-hisn .kh-hisn-itembar .kh-hisn-complete {background:#e3f2e9!important;color:#0c513e!important;border-color:#b7d8c2!important;}
#kh-hisn .kh-hisn-itembar button[aria-pressed="true"] {background:#07513f!important;color:#fff!important;border-color:#07513f!important;}
#kh-hisn .kh-hisn-itembar button:is(:hover,:active),
#kh-hisn .kh-hisn-sharebar button:is(:hover,:active) {filter:brightness(.96);box-shadow:0 3px 10px #073f3415;}
#kh-hisn .kh-hisn-itembar button:focus-visible,
#kh-hisn .kh-hisn-sharebar button:focus-visible {outline:3px solid #bf954c;outline-offset:3px;}
#kh-hisn .kh-hisn-sharebar button {background:#fffaf0;border-color:#e3d4ba;color:#0c5140;font-size:14px;}
#kh-hisn .kh-hisn-item {border-color:#d8dfd6;border-radius:16px;}
#kh-hisn .kh-hisn-item-head {direction:rtl;}
@media(max-width:680px){
 #kh-hisn .kh-hisn-itembar,#kh-hisn .kh-hisn-sharebar {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
 #kh-hisn .kh-hisn-itembar button,#kh-hisn .kh-hisn-sharebar button {min-height:48px;padding:9px 8px;font-size:14px;}
 #kh-hisn .kh-hisn-action-icon {width:19px;height:19px;flex-basis:19px;}
}
@media(max-width:330px){#kh-hisn .kh-hisn-action-button {gap:6px!important;font-size:13px!important;}}
@media(prefers-reduced-motion:reduce){#kh-hisn .kh-hisn-action-button{transition:none!important;}}

