/* Phone layouts shared by every page; desktop composition stays intact. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(max-width:767px){
 body{padding-bottom:env(safe-area-inset-bottom,0px)}
 main,footer{text-align:center}
 main :where(section,article,form,div){min-width:0}
 .section,.wide{padding:56px max(20px,env(safe-area-inset-left));width:100%}
 .topbar{height:auto;min-height:32px;padding:7px 12px;text-align:center;justify-content:center}.topbar span{font-size:12px}.topbar>a{display:none}
 .header{width:calc(100% - 24px);height:72px;padding:0 12px;top:max(8px,env(safe-area-inset-top));gap:8px}.header .brand{min-width:0;flex-shrink:1}.header .brand>span{font-size:18px}.header .brand>span>span{font-size:9px}.header .brand img{width:34px;height:38px}.header .nav-actions{gap:4px}.header .icon-button{width:44px;height:44px}.header .button{display:none}.menu-toggle{min-height:44px;min-width:52px;font-size:14px;padding:10px}.header nav{max-height:calc(100dvh - 130px - env(safe-area-inset-top));overscroll-behavior:contain;padding:12px;text-align:center}.nav-group summary{justify-content:center;min-height:48px}.header nav .mega-menu>a{min-height:48px}.mega-menu small{font-size:14px}.mega-menu{max-height:none}
 .hero{margin:0 12px;min-height:0}.hero-copy{width:100%;max-width:none;padding:64px 20px 100px;text-align:center}.hero h1{font-size:clamp(40px,10.5vw,66px);text-wrap:balance}.hero .eyebrow{font-size:12px!important;letter-spacing:1px}.hero-shade{background:linear-gradient(180deg,rgba(9,37,29,.66),rgba(9,37,29,.8) 55%,rgba(9,37,29,.65))}.hero-caption{left:16px;right:16px;bottom:24px;flex-direction:column;align-items:center;gap:6px;font-size:12px;letter-spacing:.6px}.hero-hadith{margin:24px auto}.hero-hadith blockquote{font-size:clamp(11px,3.15vw,22px)}.hero-hadith figcaption{font-size:12px}
 .actions,.social-links,.biography-nav,.imam-pills,.day-filters,.gallery-toolbar,.segmented{justify-content:center}.button{min-height:48px;max-width:100%;white-space:normal;text-align:center;font-size:14px;padding:13px 20px}.text-link{max-width:100%;justify-content:center;text-align:center;font-size:14px;overflow-wrap:anywhere}.icon-button,.ayah-share-button,.reciter-heading .reciter-shuffle{min-width:44px;min-height:44px}
 .quick-links{grid-template-columns:1fr;margin:16px 20px 0;gap:8px;border:0}.quick-links>a,.quick-links>a:first-child{justify-content:center;padding:20px 16px;border:1px solid var(--line);border-radius:22px;background:#f1f6f3}.quick-links .quick-num,.quick-links>a>span:last-child{display:none}.quick-links small{display:block;margin:6px 0 0;font-size:14px}
 .prayer{display:block;padding:52px 16px}.prayer-intro h2{font-size:clamp(36px,9vw,48px);margin-bottom:24px}.prayer-widget{width:100%;margin-inline:auto}
 .welcome,.today-section,.visit,.newsletter,.service-section,.resources,.school-intro,.imam-intro,.contact-feature,.contact-grid,.email-section,.donate-options{grid-template-columns:minmax(0,1fr);gap:28px}
 .section h2,.service-section h2,.newsletter h2,.contact-grid h2,.contact-feature h2{font-size:clamp(36px,9vw,48px);text-wrap:balance}.section-heading{margin-bottom:28px}.welcome-copy p,.visit p,.schedule-source,.page-head>p,.imam-intro p,.policy-intro p,.tool-footnote>p{margin-inline:auto}.welcome-copy .lead{font-size:22px}.today-item,.schedule-item{grid-template-columns:1fr;gap:6px;padding:18px 0}.today-item span,.schedule-item span{font-size:14px}.today-item strong,.schedule-item h3{font-size:16px}.day{display:block}.day h2{margin-bottom:20px}
 .reflection{margin:0 12px;padding:32px 20px}.reflection-top{flex-direction:column;align-items:center;gap:8px;margin-bottom:20px}.reflection-top .eyebrow,.reflection-day{font-size:12px!important}.reflection .arabic,.reflection.long-verse .arabic{font-size:clamp(28px,7.5vw,42px);line-height:2.25;padding:8px 0;min-height:0}.reflection blockquote,.reflection.long-verse blockquote{font-size:clamp(26px,7vw,36px);line-height:1.4}.verse-credit,.verse-credit span:first-child,.reflection .text-link{font-size:14px}.ayah-actions .button{font-size:14px;min-height:48px}.ayah-copy-button{min-height:44px}.ayah-passage{padding-top:44px}.reciter-label{font-size:14px}
 .program-grid{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;gap:18px}.program.feature{grid-row:auto;min-height:410px}.program.feature>img{position:absolute;inset:0}.program-copy{left:22px;right:22px;bottom:28px}.program-copy h3{font-size:42px}.program-copy p{max-width:100%;font-size:16px}.program .circle-arrow{display:none}.text-program{min-height:0;align-items:center;padding:28px 22px}.program-heading-row{flex-direction:column;gap:16px}.text-program h3{font-size:40px}.text-program p{font-size:16px}.text-program .text-link{margin-top:24px;font-size:14px}.imam-program{grid-template-columns:1fr}.imam-program img{height:300px;object-position:50% 30%}.imam-program>div{padding:28px 22px}.imam-program h3{font-size:40px}.imam-program .text-link{font-size:14px}
 .link-row{justify-content:center;padding:22px 14px}.link-row>span:last-child:not(:first-child){display:none}.giving{margin:0 12px;padding:46px 24px;min-height:0}.giving:before{background:rgba(10,37,29,.65)}.giving-caption{position:relative!important;right:auto;bottom:auto;margin-top:30px;font-size:12px}.visit-image img{height:300px}.visit-image>span{left:16px;right:16px;text-align:center;font-size:12px}.visit address{font-size:16px}.newsletter{margin:0 20px 44px;padding:36px 0}.newsletter form{width:100%;margin:auto}.email-line{flex-direction:column}.email-line input{flex:auto}.community-social{width:calc(100% - 40px);margin:0 auto 50px;padding:28px 20px;align-items:center}.community-social>.social-links{justify-content:center}.social-pill{min-height:48px}.footer-top{display:flex;flex-direction:column;gap:16px;margin-bottom:32px}.footer-top p{margin:0}.footer-grid{grid-template-columns:1fr;gap:28px}.footer-grid h3{margin-bottom:8px}.footer-grid a{font-size:14px;padding:8px 0}.footer-grid p{font-size:14px}.footer-bottom{flex-direction:column;align-items:center;gap:12px;padding-bottom:calc(24px + env(safe-area-inset-bottom))}.footer-bottom>span{margin:0}.footer-bottom .social-links{justify-content:center}
 .page-head{padding:36px 20px 40px}.breadcrumb{margin-bottom:26px;font-size:14px;justify-content:center}.page-head h1{font-size:clamp(42px,11vw,62px);text-wrap:balance}.detail-banner{margin:28px 20px 0}.detail-banner img{height:280px}.prose{padding:38px 20px 56px;font-size:16px}.prose :where(ul,ol){list-style-position:inside;padding:0}.notice{border-left:0;border-top:3px solid #5c8671;border-radius:20px;font-size:14px}.school-facts{gap:24px 12px}.school-facts strong{font-size:32px;white-space:normal}.school-facts>.button,.school-facts>.text-link{justify-self:center}.imam-page .imam-intro{width:calc(100% - 40px);margin:28px auto 0}.imam-intro>img,.contact-feature>img{margin-inline:auto}.imam-intro>div{padding:20px 8px}.imam-biography .biography-section{padding:28px 20px}.imam-section-number{position:static;display:block;margin-bottom:12px}.imam-biography .biography-nav{justify-content:center}.imam-biography p{margin-inline:auto}.contact-photo>a{font-size:14px}.form-pair{grid-template-columns:1fr}.policy-intro{display:block}.donate-thanks h2{font-size:clamp(60px,16vw,100px)}
 .dua-layout{grid-template-columns:1fr;gap:24px;padding:32px 20px 56px}.dua-topics{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}.dua-topics a{font-size:14px;min-height:48px;display:grid;place-items:center}.dua-card{padding:28px 20px}.dua-illustration{margin-inline:auto}.dua-meaning{font-size:17px}.dua-arabic{font-size:30px}.resource-grid{grid-template-columns:1fr}.resource-card{align-items:center;padding:28px 22px}.tool-layout,.calendar-layout{grid-template-columns:1fr;gap:24px}.tool-panel,.tool-result{padding:24px 20px}.tool-result{position:static}.tool-result>img{margin-inline:auto}.tool-fields{grid-template-columns:1fr}.tool-field{font-size:16px}.tool-field input,.tool-field select,.select-trigger,.calendar-actions input,.contact-form input,.contact-form textarea,.library-filters input,.library-filters select{font-size:16px;min-height:48px}.tool-field input{text-align:center}.tool-field small,.tool-note{font-size:14px}.tool-result dl>div{flex-direction:column;gap:6px}.weekday-picker{justify-content:center}.weekday-picker legend,.juz-picker legend,.goal-years legend{width:100%;text-align:center}.weekday-picker label{min-height:46px;font-size:14px}.juz-circles{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.juz-circle{min-width:0;min-height:44px}.calendar-actions{justify-content:center}.calendar-toolbar{gap:6px}.calendar-toolbar .icon-button{flex-shrink:0}.calendar-event button{min-height:44px;text-align:center}.plan-table th,.plan-table td{text-align:center;padding:14px 10px}.table-scroll{max-width:100%;overscroll-behavior-x:contain}.tool-footnote{padding-top:24px}.tool-footnote h2{font-size:34px}.tool-footnote .actions{justify-content:center}
 .utility-dialog{max-height:calc(100dvh - 40px - env(safe-area-inset-bottom));padding:24px 20px}.toast{bottom:calc(20px + env(safe-area-inset-bottom))}.gallery-toolbar{flex-wrap:wrap}.recording-meta{justify-content:center}.recording video{width:100%;height:auto;aspect-ratio:16/9}.recording h3{min-height:0}.large-phone{font-size:clamp(20px,6vw,25px)}
}
@media(max-width:359px){.header .brand>span{font-size:16px}.header .brand>span>span{font-size:8px}.header .brand img{width:28px}.header{padding-inline:8px}.juz-circles{grid-template-columns:repeat(4,minmax(0,1fr))}.tool-panel,.tool-result{padding:22px 16px}}
