/* WebHatim V6 – mobile-first overflow protection, player and app updates. */
html{max-width:100%;overflow-x:clip;-webkit-text-size-adjust:100%}
body{max-width:100%;min-width:0;overflow-x:clip}
*,*::before,*::after{box-sizing:border-box}
.container,.modern-page,.home-content,.reader-layout,.content-layout,.main-column,.site-sidebar,.admin-main,.panel,.admin-grid-2,.form-grid,.footer,.hero,.hero-inner,.hero-copy,.reader-toolbar,.header-row,.nav-links,.reader-controls,.wh5-footer-grid{min-width:0;max-width:100%}
img,video,canvas,iframe,svg{max-width:100%}
img{height:auto}
input,select,textarea,button{min-width:0;max-width:100%}
.table-scroll,.pdf-canvas-frame{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
pre,code{overflow-wrap:anywhere}
.wh5-footer-editorial,.wh5-footer-editorial *, .wh6-safe-rich, .wh6-safe-rich *{overflow-wrap:anywhere;word-break:normal}
.wh6-project-block{display:flex;flex-direction:column;gap:5px;padding:14px 15px;margin:4px 0 12px;border-radius:13px;background:linear-gradient(110deg,rgba(239,207,136,.18),rgba(255,255,255,.06));border:1px solid rgba(255,218,148,.25)}
.wh6-project-block span{font-size:10px;text-transform:uppercase;letter-spacing:1.6px;color:#eecb93;font-weight:800}
.wh6-project-block strong,.wh6-project-block a{font-size:18px;line-height:1.35;color:#fff3cc;font-weight:850;overflow-wrap:anywhere}
.wh6-social-row{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;padding:17px 0 22px!important;color:var(--wh5-footer-color,#e9f7ef);border-top:1px solid rgba(255,255,255,.12)}
.wh6-social-row span{font-weight:850;color:#f0cd88}
.wh6-social-row a{border-radius:24px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.16);padding:7px 13px;font-size:12px;font-weight:650;transition:background .18s}
.wh6-social-row a:hover{background:rgba(255,255,255,.2)}
.wh6-splash-project{margin-top:12px!important;font-weight:850!important;font-size:17px!important;color:#fff3ca!important}
.wh6-splash-dev{margin-top:6px!important;font-size:12px!important;color:#f1dbb0!important}
.wh6-player{position:fixed;left:50%;transform:translateX(-50%);bottom:12px;z-index:2400;width:min(810px,calc(100vw - 28px));padding:12px 16px;background:linear-gradient(118deg,#083e36,#0e6553);color:#f9f4e6;border:1px solid rgba(242,214,160,.46);border-radius:19px;box-shadow:0 18px 55px rgba(0,20,15,.4);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px 15px}
.wh6-player-content{min-width:0;display:flex;flex-direction:column}.wh6-player-note{font-size:10px;color:#f3d59e;letter-spacing:1px;font-weight:850}.wh6-player-content strong{font-size:15px;line-height:1.4}.wh6-player-content small{font-size:11px;color:#cce9dd;white-space:normal}
.wh6-player-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.wh6-player-actions button{color:#fdf4e3;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.13);padding:8px 10px;border-radius:9px;font-size:12px;font-weight:800;white-space:nowrap}
.wh6-player-actions button:hover{background:rgba(255,255,255,.24)}.wh6-player-actions button:focus-visible{outline:3px solid #f6ce7e}
.wh6-player-meter{grid-column:1/-1;display:flex;align-items:center;gap:11px;font-size:11px;font-variant-numeric:tabular-nums}.wh6-player-meter input{flex:1;accent-color:#f3d391;max-width:none}
.wh6-updater,.wh6-modal{position:fixed;inset:0;z-index:99990;display:grid;place-items:center;background:rgba(4,24,19,.82);backdrop-filter:blur(14px);padding:max(15px,env(safe-area-inset-top)) 14px max(15px,env(safe-area-inset-bottom))}
.wh6-updater-card,.wh6-modal-panel{width:min(470px,100%);max-height:min(86dvh,790px);overflow:auto;background:#fff;color:#173e33;border-radius:22px;box-shadow:0 21px 100px rgba(0,0,0,.35);padding:26px;text-align:center}
.wh6-updater-card img{width:100px;height:100px;object-fit:cover;border-radius:24px;box-shadow:0 9px 30px rgba(6,49,37,.18);display:block;margin:4px auto 22px}
.wh6-updater-card h2{font-size:clamp(21px,5vw,27px);color:#0b5143;line-height:1.3}.wh6-updater-card p{font-size:14px;line-height:1.6}
.wh6-progress{height:9px;border-radius:99px;overflow:hidden;background:#e8efe9;margin:23px 0}.wh6-progress>span{display:block;height:100%;width:0;background:linear-gradient(90deg,#b59c5c,#0b7059);transition:width .4s ease}
#wh6UpdateFinish{padding:12px 22px;border:0;border-radius:12px;background:#0c5b49;color:white;font-weight:850}
.wh6-modal{z-index:99995;background:rgba(3,16,14,.72)}.wh6-modal-panel{text-align:left;position:relative}.wh6-modal-panel .eyebrow{margin-bottom:9px}.wh6-modal-panel h2{font-size:23px}.wh6-modal-close{position:absolute;top:15px;right:16px;background:#eff4f1;border:0;border-radius:12px;width:37px;height:37px;font-size:25px;color:#0b5b49}
#wh6ReleaseText{text-align:left;line-height:1.75;overflow-wrap:anywhere;margin:20px 0}#wh6ReleaseText img{max-width:100%;height:auto}
.wh6-release-record{margin:18px 0}.wh6-release-record h2 small{color:#658b7a;font-size:13px}.wh6-release-article{margin:16px auto;max-width:900px}
/* Browser-specific touch highlight must not stain the logo; visible keyboard focus is kept. */
a.brand,a.admin-logo,.login-brand,.wh4-site-logo,.wh4-site-logo:active{background:transparent!important;-webkit-tap-highlight-color:transparent!important}
a.brand:active,a.brand:hover,a.brand:focus:not(:focus-visible){background:transparent!important;box-shadow:none!important}
a.brand:focus-visible{outline:2px solid #cda358;outline-offset:4px}
/* Only the update manager controls the obsolete V4 toast (old handlers removed). */
@media(max-width:1050px){.nav-links{gap:12px}.header-row{gap:14px}.nav-links a{font-size:12px}.container{padding-left:clamp(12px,3vw,26px);padding-right:clamp(12px,3vw,26px)}}
@media(max-width:880px){.nav-links{display:none}.hero-inner{min-height:0;overflow:hidden}.hero-copy{width:100%;max-width:100%;padding:46px 0 36px}.hero-art{max-width:46vw;opacity:.14;right:-12vw;bottom:0;pointer-events:none}.content-layout,.admin-grid-2{grid-template-columns:minmax(0,1fr)}.site-sidebar{width:100%;max-width:100%}}
@media(max-width:700px){
 .site-header{height:auto;min-height:65px}.header-row{min-height:65px;height:auto;gap:8px;flex-wrap:nowrap}
 .brand{flex:1;min-width:0;overflow:hidden;white-space:normal;gap:8px}.brand>span{min-width:0}.brand strong{font-size:15px}.brand small{font-size:9px;line-height:1.25}.wh4-site-logo{width:39px!important;height:39px!important;flex:0 0 auto}
 .nav-action{font-size:11px;padding:7px 9px;white-space:nowrap}.hamburger{flex:none;display:block;padding:4px 8px}
 .hero,.hero-inner{max-width:100vw;overflow:clip}.hero-copy{padding:38px 0 34px!important}.hero h1{font-size:clamp(29px,8vw,39px);letter-spacing:-.9px;overflow-wrap:anywhere}.hero p{font-size:13px;line-height:1.75}.hero-actions{display:flex;flex-direction:column;align-items:stretch;gap:9px}.hero-actions .btn{width:100%;white-space:normal;text-align:center;padding:12px 13px}.hero-trust{display:flex;gap:11px;flex-wrap:wrap;margin-top:23px;font-size:10px}.hero-art{display:none!important}
 .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stat-card{padding:14px 10px}.stat-card strong{font-size:22px}.stat-card span{font-size:10px}
 .feature-grid,.surah-grid,.news-grid,.member-stats{grid-template-columns:minmax(0,1fr)!important}.section-heading{gap:9px;flex-wrap:wrap}.section-heading h2{font-size:23px}
 .wh5-footer-grid{grid-template-columns:minmax(0,1fr)!important;gap:24px}.wh5-footer-bottom{flex-wrap:wrap;gap:12px}
 .reader-toolbar,.reader-tool-right,.reader-controls{flex-wrap:wrap;max-width:100%}.reader-toolbar>*{min-width:0}.reader-layout{grid-template-columns:minmax(0,1fr)!important}.verse{max-width:100%;overflow-wrap:anywhere}.arabic-verse{overflow-wrap:anywhere}
 .admin-wrap,.admin-main,.panel{min-width:0;max-width:100%}.admin-top{flex-wrap:wrap}.form-grid{grid-template-columns:minmax(0,1fr)!important}.panel{padding:clamp(12px,3.2vw,22px)}
 .wh6-player{bottom:calc(57px + env(safe-area-inset-bottom,0px));border-radius:16px;padding:10px;grid-template-columns:1fr;max-height:45dvh;overflow-y:auto}
 .wh6-player-actions{justify-content:space-between}.wh6-player-actions button{flex:1 1 auto;padding:9px 7px;font-size:11px}.wh6-player-content strong{font-size:13px}.wh6-player-content small{font-size:10px}
 .wh6-social-row{gap:8px;padding:12px 0}.wh6-social-row a{font-size:11px;padding:6px 10px}
 .wh6-modal-panel,.wh6-updater-card{padding:22px 16px}.wh5-splash-center{width:100%;max-width:100%}.wh5-splash-ring{width:min(39vw,148px);height:min(39vw,148px)}
 .wh4-push-control{right:9px;max-width:calc(100vw - 18px);bottom:calc(135px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:380px){.brand small{display:none}.nav-action{font-size:10px;padding:6px}.brand strong{font-size:14px}.wh4-site-logo{width:34px!important;height:34px!important}}
@media(prefers-reduced-motion:reduce){.wh6-progress>span{transition:none}.wh6-updater,.wh6-modal{backdrop-filter:none}}

.wh6-dev-label{display:block;font-size:10px;font-weight:800;letter-spacing:.8px;color:#e7c98c;margin-bottom:6px}

.wh6-splash-project a,.wh6-splash-dev a{color:inherit;text-decoration:underline;text-decoration-color:#d4b77b; text-underline-offset:3px}

@media(max-width:700px){body.wh6-audio-playing .assistant-fab,body.wh6-audio-playing .wh4-push-control{display:none!important}}
