/* Shared typography fit. Presentation only: prayer wording and stored progress are untouched. */
@media screen {
  .prayer-hub :is(h1,h2,h3),.prayer-companion :is(h1,h2,h3){word-break:normal;overflow-wrap:break-word;hyphens:manual;text-wrap:balance}
  .prayer-hub :is(.grid,.detail-top,.about-hero,.wall-layout)>*,.prayer-companion :is(.hero,.reader-layout,.days,.sets)>*{min-width:0}
  :is(.prayer-hub,.prayer-companion) header .brand{min-width:0;max-width:100%;line-height:1.4}
  :is(.prayer-hub,.prayer-companion) header .brand>span{min-width:0;overflow-wrap:break-word;word-break:normal}
  :is(.prayer-hub,.prayer-companion) header .brand small{line-height:1.5;white-space:normal}
  .prayer-hub header>nav[aria-label="Main navigation"]{flex-wrap:wrap;align-items:center}
  .prayer-hub header>nav[aria-label="Main navigation"] a{max-width:100%;white-space:normal;overflow-wrap:break-word;text-align:start;line-height:1.5}
  :is(.prayer-hub,.prayer-companion) header nav.language-toggle{max-width:100%;margin:0;gap:0;align-items:stretch;justify-content:flex-start}
  :is(.prayer-hub,.prayer-companion) header .language-toggle a{min-height:44px;font-size:14px;line-height:1.4;padding:11px 12px;white-space:normal;align-self:stretch;text-align:center}
  .prayer-companion header{flex-wrap:wrap;gap:14px 18px}
  .prayer-companion header .language-toggle{margin-left:auto}
  :is(.prayer-hub,.prayer-companion) :is(.button,.btn,.primary,.secondary){max-width:100%;min-width:0;white-space:normal;overflow-wrap:break-word;line-height:1.5;text-align:center}
  .prayer-hub .actions{align-items:stretch}
  .prayer-hub .card .copy{display:flex;flex-direction:column;min-width:0}
  .prayer-hub .card .copy>:is(.actions,.arrow){margin-top:auto}
  .prayer-hub .card .copy>.actions{padding-top:8px}
  .prayer-hub .card .actions .text-link{display:inline-flex;align-items:center;line-height:1.5}
  :is(.prayer-hub,.prayer-companion) :is(.section-head,.sectionhead,.reader-bar,.reader-top,.reader-controls){flex-wrap:wrap;gap:12px 20px}
  :is(.prayer-hub,.prayer-companion) :is(.section-head,.sectionhead)>div{min-width:0}
  .prayer-companion :is(.section-head,.sectionhead)>span{max-width:100%;white-space:normal;line-height:1.5}
  :is(.prayer-hub,.prayer-companion) :is(.reading,.prayer-text){word-break:normal;overflow-wrap:break-word;text-align:start}
  :is(.prayer-hub,.prayer-companion) :is(.role,.speaker){font-size:12px;line-height:1.6;letter-spacing:.06em;white-space:normal}
  :is(.prayer-hub,.prayer-companion) :is(.source,.fine,.breadcrumbs,.translation-notice,.translation-status){overflow-wrap:anywhere;line-height:1.65}
  :is(.prayer-hub,.prayer-companion) :is(.translation-status strong,.translation-notice summary){font-size:14px;line-height:1.6;letter-spacing:.025em}
  .prayer-companion :is(.day,.day>div,.set-card,.mystery-card>div){min-width:0}
  .prayer-companion .step-btn{font-size:14px;line-height:1.5;white-space:normal;min-height:44px;overflow-wrap:break-word}
  .prayer-companion .today a{white-space:normal;line-height:1.5}
  .prayer-companion :is(.reader-bar,.reader-top) select{font-size:16px;min-width:0;min-height:44px;max-width:100%;text-overflow:ellipsis}
  .prayer-companion .reader-controls :is(button,a){flex:1 1 140px;min-height:44px;font-size:14px}
  @media(max-width:1000px){
    .prayer-companion header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 16px}
    .prayer-companion header>.brand{grid-column:1;grid-row:1}
    .prayer-companion header>:is(.tools,#settings){grid-column:2;grid-row:1}
    .prayer-companion header>nav.language-toggle{grid-column:1/-1;grid-row:2;justify-self:start;margin:0;width:max-content}
  }
  @media(max-width:900px){
    .prayer-hub header{grid-template-columns:minmax(0,1fr) auto;gap:12px 16px}
    .prayer-hub header>.brand{grid-column:1;grid-row:1}
    .prayer-hub header>#size{grid-column:2;grid-row:1;margin:0;justify-self:end}
    .prayer-hub header>nav.language-toggle{grid-column:1/-1;grid-row:2;justify-self:start;width:max-content}
    .prayer-hub header>nav[aria-label="Main navigation"]{grid-column:1/-1;grid-row:3;gap:4px 20px}
  }
  @media(max-width:700px){
    .prayer-companion #steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible}
    .prayer-companion .section-head h2,.prayer-companion .sectionhead h2{font-size:clamp(1.5rem,4.5vw,1.85rem);line-height:1.25}
    :is(.prayer-hub,.prayer-companion) .reader-controls{gap:10px}
  }
  @media(max-width:480px){
    :is(.prayer-hub,.prayer-companion) header nav.language-toggle{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
    :is(.prayer-hub,.prayer-companion) header .language-toggle a{min-width:0;padding:11px 8px}
    .prayer-hub header .brand{font-size:clamp(1rem,4.5vw,1.125rem)}
    .prayer-hub header .brand small{font-size:9px;letter-spacing:.06em}
    .prayer-hub .detail-top h1,.prayer-hub .about-hero h1,.prayer-hub .wall-intro h1{font-size:clamp(1.7rem,6.2vw,2.25rem);line-height:1.2}
    .prayer-hub .section-head{align-items:flex-start}
    .prayer-hub .section-head .text-link{max-width:none;flex:0 1 auto}
    :is(.prayer-hub,.prayer-companion) :is(.translation-notice,.translation-status){padding:16px;max-width:100%}
  }
  @media(max-width:380px){
    :is(.prayer-hub,.prayer-companion) header .language-toggle a{font-size:13px;padding-inline:6px}
    .prayer-hub:lang(fil) .hero h1,.prayer-hub:lang(ceb) .hero h1,.prayer-hub:lang(ilo) .hero h1{font-size:24px;line-height:1.25;overflow-wrap:break-word}
    .prayer-companion .days{grid-template-columns:minmax(0,1fr)}
  }
}
