/* Final card: settings and scene preview controls are kept out of the visitor UI. */
#video-drag{display:none!important}
#appShell{height:var(--app-vh,100dvh)!important}
body[data-menu-side] #appShell .app-header{padding-left:max(var(--pad),env(safe-area-inset-left))}
#appShell .header-tools{margin-right:0;gap:6px}
#appShell .identity{flex:1;min-width:0}
#appShell .identity>span{min-width:0}
#appShell .identity strong{white-space:normal;overflow-wrap:normal}
#video-stage,#video-stage.media-ready{pointer-events:none!important}
/* Reserve the complete decorative icon box, including its border and padding. */
#appShell :is(.support-symbol,.tile-icon){flex-shrink:0}
#appShell #view .support-symbol{width:38px;height:38px;flex:0 0 38px;display:grid;place-items:center}
.design-7 #appShell :is(.connect-symbol>svg:first-child,.home-secondary>svg:first-child,.support-symbol>svg,.prayer-symbol svg){box-sizing:border-box;width:38px;height:38px;min-width:38px;flex:0 0 38px;padding:7px;display:block}
#appShell #view .connect-card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:32px auto auto;align-items:start;align-content:start;justify-items:stretch;gap:7px;padding:16px;min-width:0;text-align:left}
#appShell #view .connect-symbol{position:static;display:flex;width:100%;height:38px;align-items:center;justify-content:space-between}
#appShell #view .connect-card h2{margin:0;font-size:clamp(18px,2.2vw,21px);line-height:1.25;letter-spacing:-.25px;overflow-wrap:normal}
#appShell #view .link-description{display:block;font-size:14px;line-height:1.4;margin:0}
#appShell #view .support-card{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;padding:18px;min-width:0}
#appShell #view .support-card>span:last-child{min-width:0}
#appShell #view .support-card strong{font-size:15px;line-height:1.3;overflow-wrap:normal}
#appShell #view .support-card small{font-size:14px;line-height:1.4;margin-top:5px}
#appShell #view .home-secondary{display:grid;grid-template-columns:38px minmax(0,1fr) 18px;align-items:center;gap:12px;padding:18px 20px;min-height:80px;text-align:left}
#appShell #view .home-secondary>span{min-width:0}
#appShell #view .home-secondary strong{font-size:16px;line-height:1.35;overflow-wrap:normal}
#appShell #view .home-secondary small{font-size:14px;line-height:1.4}
#appShell #view .home-secondary .arrow{width:18px;height:18px;margin:0}
#appShell #view.screen[data-kind=home]{overflow-y:auto;overflow-x:hidden;padding-bottom:18px}
@media(max-width:649px){
 #appShell #view .home-board{display:flex;flex-direction:column;height:auto;min-height:100%;gap:16px;padding-bottom:4px}
 #appShell #view .connect-grid,#appShell #view .support-grid{gap:10px;align-items:stretch}
 #appShell #view .connect-card{padding:16px;gap:8px}
 #appShell #view .connect-card h2{font-size:18px;min-height:2.5em}
 #appShell #view .support-card{grid-template-columns:32px minmax(0,1fr);gap:8px;padding:16px 13px;min-height:104px}
 #appShell #view .support-symbol{width:32px;height:32px;flex-basis:32px}
 .design-7 #appShell #view .support-symbol>svg{width:32px;height:32px;min-width:32px;flex-basis:32px;padding:5px}
 #appShell #view .home-secondary{padding:17px 18px;gap:10px}
 #appShell #view .home-secondary[data-route=tests] strong{font-size:15px}
 #appShell #view .profile-top{gap:16px}
 #appShell #view .profile-copy h1{font-size:clamp(25px,7vw,35px);line-height:1.06}
 #appShell #view .profile-description{font-size:14px;line-height:1.45}
 #appShell #view .section-label{font-size:14px;margin-bottom:8px}
}
@media(max-width:359px){
 #appShell #view .connect-card{padding:14px}
 #appShell #view .support-grid{grid-template-columns:minmax(0,1fr)}
 #appShell #view .support-card{min-height:76px;padding:16px 20px}
 #appShell .identity strong{font-size:13px}
}

/* Reset old compact grid placement: labels now follow their own icon row. */
#appShell #view .connect-card>h2,#appShell #view .connect-card>.link-description{grid-column:1;grid-row:auto}
#appShell #view .connect-card .connect-symbol{display:flex;grid-column:1;grid-row:1;height:38px;position:static}
.design-7 #appShell #view .connect-symbol>svg:first-child{box-sizing:border-box;width:38px;height:38px;margin:0;padding:7px;display:block}
#appShell #view .connect-symbol .arrow{display:block}
#appShell #view .link-description{min-height:0;height:auto}
#appShell #view .support-card>span:last-child{grid-column:2;grid-row:1}
#appShell #view .support-symbol{grid-column:1;grid-row:1}
#appShell #view{pointer-events:auto}
/* Home is a single-screen composition; fitting responds to the usable height. */
#appShell #view.screen[data-kind=home]{overflow:hidden;padding:4px 0 6px}
#appShell #view[data-kind=home] .home-board{min-height:0;height:auto;transform:scale(var(--home-fit,1));transform-origin:top center}
@media(max-width:649px) and (orientation:portrait){
 #appShell #view[data-kind=home] .home-board{gap:10px;padding:0}
 #appShell #view[data-kind=home] .personal-intro{padding:0}
 #appShell #view[data-kind=home] .profile-photo{width:clamp(104px,18svh,142px);flex:0 0 clamp(104px,18svh,142px)}
 #appShell #view[data-kind=home] .profile-top{gap:14px}
 #appShell #view[data-kind=home] .profile-copy{padding:0}
 #appShell #view[data-kind=home] .profile-copy h1{font-size:clamp(25px,6.5vw,30px);margin-bottom:6px}
 .design-4 #appShell #view[data-kind=home] #profileName::after{margin-top:6px;line-height:12px;font-size:12px}
 #appShell #view[data-kind=home] .profile-description{font-size:14px;line-height:1.35}
 #appShell #view[data-kind=home] .design-subtitle{font-size:14px;line-height:1.3;min-height:2.6em}
 #appShell #view[data-kind=home] .social-links{margin-top:8px;gap:14px}
 #appShell #view[data-kind=home] .social-button{width:44px;height:44px;min-width:44px;flex:0 0 44px}
 #appShell #view[data-kind=home] :is(.connect-grid,.support-grid){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #appShell #view[data-kind=home] .connect-card{grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto auto;gap:5px 7px;align-content:center;align-items:center;min-height:84px;padding:9px 10px}
 #appShell #view[data-kind=home] .connect-card .connect-symbol{grid-column:1;grid-row:1;width:28px;height:28px}
 .design-7 #appShell #view[data-kind=home] .connect-symbol>svg:first-child{width:28px;height:28px;min-width:28px;flex-basis:28px;padding:4px}
 #appShell #view[data-kind=home] .connect-symbol .arrow{display:none}
 #appShell #view[data-kind=home] .connect-card h2{grid-column:2;grid-row:1;font-size:15px;line-height:1.2;min-height:0}
 #appShell #view[data-kind=home] .connect-card>.link-description{grid-column:1/-1;grid-row:2;font-size:14px;line-height:1.3}
 #appShell #view[data-kind=home] .support-card{min-height:90px;padding:12px 10px;gap:8px}
 #appShell #view[data-kind=home] .support-card strong{font-size:14px;line-height:1.25}
 #appShell #view[data-kind=home] .support-card small{font-size:14px;line-height:1.3;margin-top:4px}
 #appShell #view[data-kind=home] .section-label{font-size:14px;line-height:1.25;margin-bottom:5px}
 #appShell #view[data-kind=home] .secondary-home{gap:8px}
 #appShell #view[data-kind=home] .home-secondary{grid-template-columns:32px minmax(0,1fr) 16px;min-height:64px;padding:10px 12px;gap:9px}
 .design-7 #appShell #view[data-kind=home] .home-secondary>svg:first-child{width:32px;height:32px;min-width:32px;flex-basis:32px;padding:5px}
 #appShell #view[data-kind=home] .home-secondary strong{font-size:14px;line-height:1.25}
 #appShell #view[data-kind=home] .home-secondary small{font-size:14px;line-height:1.3}
}

/* The fitted profile may use the outer margin without cropping its fine frame. */
@media(max-width:649px) and (orientation:portrait){
 #appShell #view.screen[data-kind=home]{overflow:visible}
 #appShell #view[data-kind=home] .profile-photo{width:clamp(104px,18svh,124px);flex-basis:clamp(104px,18svh,124px)}
 #appShell #view[data-kind=home] .profile-top{gap:10px}
}

/* Equal text tracks keep the primary actions balanced despite different title lengths. */
#appShell #view[data-kind=home] .connect-card{grid-template-rows:38px minmax(2.5em,auto) minmax(2.8em,auto)}
#appShell #view[data-kind=home] .connect-card h2{align-self:center;text-wrap:balance}
#appShell #view[data-kind=home] .connect-card>.link-description{text-wrap:balance}
@media(max-width:649px) and (orientation:portrait){
 #appShell #view[data-kind=home] .profile-top{align-items:flex-start}
 #appShell #view[data-kind=home] .profile-photo{margin-top:2px;aspect-ratio:1}
 #appShell #view[data-kind=home] .profile-photo img{object-fit:contain;aspect-ratio:1}
 #appShell #view[data-kind=home] .connect-card{grid-template-rows:minmax(36px,auto) minmax(36px,auto);min-height:96px;gap:4px 7px;align-content:center;padding:9px 10px}
 #appShell #view[data-kind=home] .connect-card h2{font-size:15px;line-height:18px;text-align:left;margin:0;min-height:36px;display:grid;align-content:center}
 #appShell #view[data-kind=home] .connect-card>.link-description{grid-column:2;align-self:start;justify-self:start;text-align:left;font-size:14px;line-height:18px;min-height:36px;margin:0;width:100%;max-width:none}
}

@media(max-width:649px) and (orientation:portrait){#appShell #view[data-kind=home] .connect-card .connect-symbol{grid-row:1/3;align-self:center}}
