/* Navigation corrections: shared controls stay in normal flow at every width. */
.home-page>.home-header,
.experience-journey>.home-header{
 position:relative;inset:auto;display:grid;grid-template-columns:auto minmax(0,1fr) auto;
 height:auto;min-height:0;gap:16px;padding:16px clamp(16px,4vw,56px);align-items:center;
}
.home-header .brand-home{align-self:center;padding:0;justify-self:start}
.home-header .brand-art{width:180px}
.home-header .home-nav{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 20px}
.home-header .home-nav a{min-height:44px;display:inline-flex;align-items:center;font-size:16px}
.home-utilities,.portal-tools-group,.page-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0}
.home-utilities .language-toggle,.home-header .family-switch{position:static;margin:0}
[data-profile-slot]{display:contents}
.portal-header.portal-header-grouped,
.portal-header.portal-header-grouped:has(.family-switch){
 display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);min-height:0;gap:16px;padding:16px clamp(16px,4vw,56px);
}
.portal-header-grouped>.brand-home{grid-column:2;grid-row:1;justify-self:center}
.portal-header-grouped .brand-art{width:180px}
.portal-nav-group{grid-column:1;grid-row:1;display:flex;gap:8px;flex-wrap:wrap;min-width:0}
.portal-tools-group{grid-column:3;grid-row:1}
.portal-header .family-switch{position:static;grid-area:auto;margin:0;max-width:180px}
.portal-header-grouped .portal-back,.portal-header-grouped .portal-tool{min-height:44px;white-space:normal;font-size:16px;grid-area:auto}
.site-menu{position:relative;flex-shrink:0;text-align:left;color:#fff3d8;z-index:20}
.site-menu summary{list-style:none;cursor:pointer;border:1px solid #bc9c5c;border-radius:22px;padding:10px 14px;min-height:44px;box-sizing:border-box;font-size:16px;line-height:22px;background:#102632}
.site-menu summary::-webkit-details-marker{display:none}
.site-menu summary::after{content:' ▾'}
.site-menu[open] summary::after{content:' ▴'}
.site-menu>nav{position:absolute;right:0;top:calc(100% + 8px);z-index:21;display:flex!important;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:0!important;box-sizing:border-box;width:264px;min-width:0;max-width:calc(100vw - 32px);max-height:60dvh;overflow-y:auto;overscroll-behavior:contain;margin:0;padding:8px;background:#102632;border:1px solid #bc9c5c;border-radius:16px;box-shadow:0 12px 28px #0008}
.site-menu nav a,.site-menu nav button{display:block;text-align:left;min-height:44px;box-sizing:border-box;padding:10px 14px;border:0;background:transparent;color:#fff3d8;font:inherit;font-size:16px;line-height:24px;text-decoration:none;white-space:normal;overflow-wrap:anywhere;min-width:0;flex-shrink:0}
.site-menu nav a:hover,.site-menu nav button:hover{background:#254758;border-radius:10px}
.site-menu :focus-visible,.optional-photo summary:focus-visible{outline:3px solid #ffe099;outline-offset:3px}
.home-page .home-hero,.home-page:has(.family-switch) .home-hero{padding-top:48px;min-height:0;padding-bottom:64px}
#platform .home-hero h1{font-size:clamp(2.5rem,5vw,4.5rem);max-width:15ch;line-height:1.08}
.home-hero-copy>p{font-size:1.15rem;line-height:1.5}
.home-hero-copy .home-written-note{font-size:15px!important;margin-bottom:16px}
.organized-journey{padding-top:22px}
#platform .organized-journey>h1{margin:0 0 8px}
.organized-journey>.selection-greeting{margin:0 0 12px}
.organized-journey>.journey-progress{margin:0 auto 18px}
.organized-journey>.journey-guidance{max-width:650px;margin:12px auto 24px;font-size:16px}
.optional-photo{margin:16px 0;padding:12px;border:1px solid #496371;border-radius:12px}
.optional-photo summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.badge-book-intro{text-align:center;max-width:640px;margin:0 auto 20px}
.badge-book-intro>p{font-size:16px;line-height:1.5;margin:10px 0}
.badge-book-intro .book-hint{font-size:18px;color:#ffe09b}
.badge-book-intro button{min-height:44px}
.badge-book .text-button,.book-toolbar .text-button{font-size:16px;min-height:44px;padding:10px 14px}
.dev-finder{margin:24px 0;max-width:720px}
.dev-finder label{display:block;margin-bottom:8px;font-weight:600}
.dev-finder input{width:100%;box-sizing:border-box;min-height:48px;padding:12px 14px;border:1px solid #758a98;border-radius:12px;background:#102632;color:#fff3d8;font:inherit;font-size:16px}
.dev-finder input::placeholder{color:#c6d5dc}
.dev-collection [hidden]{display:none!important}
.app-header .icon-button,.contact-bar .icon-button{min-width:44px;min-height:44px}
@media(max-width:1100px){
 .home-page>.home-header{grid-template-columns:auto 1fr}
 .home-header .home-nav{grid-column:1/-1;grid-row:2}
 .home-utilities{grid-column:2;grid-row:1}
 .portal-header.portal-header-grouped,.portal-header.portal-header-grouped:has(.family-switch){grid-template-columns:1fr auto}
 .portal-header-grouped>.brand-home{grid-column:1;grid-row:1;justify-self:start}
 .portal-nav-group{grid-column:1;grid-row:2}
 .portal-tools-group{grid-column:2;grid-row:1/3;max-width:420px}
}
@media(max-width:700px){
 /* Anchor to the header when the utility buttons wrap onto separate rows. */
 .portal-header,.app-header,.preview-pages>header{position:relative}
 .site-menu{position:static}
 .site-menu>nav{right:16px}
 .home-page>.home-header,.home-page>.home-header:has(.family-switch),.experience-journey>.home-header{grid-template-columns:1fr;gap:8px;padding:12px 16px;height:auto}
 .home-header .brand-home{justify-self:center;align-self:center}
 .home-header .brand-art{width:140px}
 .home-header .home-nav{display:none}
 .home-utilities{grid-column:1;grid-row:2;justify-content:center}
 .home-utilities .family-switch{max-width:155px;font-size:16px}
 .home-page .home-hero,.home-page:has(.family-switch) .home-hero{padding:24px 20px 40px}
 #platform .home-hero h1{font-size:clamp(2rem,8.8vw,2.65rem);line-height:1.08;max-width:17ch;margin:12px auto 16px}
 .home-hero-copy>.eyebrow{font-size:13px;letter-spacing:.08em}
 .home-hero-copy>p{font-size:17px!important;line-height:1.5;margin-bottom:16px}
 .home-hero-copy .home-written-note{font-size:14px!important;margin-bottom:12px}
 .home-hero-copy .return-greeting{font-size:16px!important;margin-bottom:12px}
 .home-hero-copy .sample-entry-note{font-size:14px!important}
 .home-sample-first .sample-open{font-size:18px;padding:12px 16px;min-height:48px}
 .portal-header.portal-header-grouped,.portal-header.portal-header-grouped:has(.family-switch){grid-template-columns:1fr;gap:8px;padding:12px 16px}
 .portal-header-grouped>.brand-home{grid-column:1;grid-row:1;justify-self:center}
 .portal-header-grouped .brand-art{width:140px}
 .portal-nav-group{grid-column:1;grid-row:2;justify-content:center}
 .portal-tools-group{grid-column:1;grid-row:3;max-width:none;justify-content:center}
 .portal-header-grouped .portal-back,.portal-header-grouped .portal-tool,.portal-header-grouped .language-toggle{font-size:16px;padding:10px 12px}
 .portal-tools-group .family-switch{max-width:145px;font-size:16px}
 .organized-journey{padding:20px 16px 36px}
 #platform .organized-journey>h1{font-size:1.9rem;line-height:1.15}
 .organized-journey>.selection-greeting{font-size:16px;line-height:1.4}
 .organized-journey>.journey-progress{font-size:16px;padding:10px 16px}
 .journey-resume{margin-bottom:16px}
 .journey-resume .chapter-choice{display:grid;grid-template-columns:72px minmax(0,1fr);min-height:0}
 .journey-resume .chapter-visual{width:72px}
 .journey-resume .chapter-portrait{height:110px;min-height:0}
 .journey-resume .chapter-description{padding:14px}
 #platform .journey-resume .chapter-description h2{font-size:1.3rem;margin-bottom:8px}
 .journey-resume .chapter-description .chapter-scripture{font-size:16px;margin-bottom:10px}
 .journey-resume .primary{font-size:16px;min-height:48px;padding:10px 12px}
 .journey-filters{flex-wrap:wrap}
 .journey-filters button{min-height:44px;font-size:16px}
 .places-entry>div{display:grid;grid-template-columns:1fr 1fr}
 .places-entry .secondary{min-height:48px;font-size:16px;white-space:normal}
 #platform .achievements-main>h1{font-size:2rem;margin:16px 0}
 .app-header{padding:8px 10px;min-height:0;gap:6px}
 .app-header .header-actions{gap:6px;flex-wrap:wrap}
 .app-header .contacts-toggle{min-height:44px}
 .app-shell .contact-bar{padding:8px 10px;gap:10px}
 .contact-bar>.avatar{width:48px;height:48px}
 .app-shell .contact-bar h1{font-size:1.4rem;margin-bottom:4px}
 .journey-nav button{min-height:52px;font-size:14px}
}
@media(max-width:380px){
 .portal-tools-group{gap:6px}
 .portal-header-grouped .portal-tool,.portal-header-grouped .language-toggle,.portal-tools-group .site-menu summary{padding:10px;font-size:16px}
 .portal-tools-group [data-profile-slot]+.portal-tool{margin:0}
 .portal-tools-group .family-switch{max-width:135px}
}

@media(max-width:700px){.portal-tools-group>.portal-tool{display:none}}

#platform .home-hero-copy>p{line-height:1.5}

.help-start-actions{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}
.gallery-guide{max-width:720px;margin:0 auto 24px;font-size:16px;line-height:1.6;text-align:center}
@media(max-width:600px){.help-start-actions>a{width:100%;text-align:center}}
