/* Portal do membro: largura estável, rolagem vertical e cabeçalho acessível. */
html{max-width:100%;scroll-padding-top:100px}
body{width:100%;max-width:100%;overflow-x:clip}
header{position:sticky;top:0;z-index:50;padding-top:max(10px,env(safe-area-inset-top));padding-bottom:10px}
.header-inner,.member-brand,.member-brand>div,main,.card,.item{min-width:0;max-width:100%}
img,video,canvas,svg{max-width:100%}
#memberLibrary{min-width:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:14px}
#memberLibrary .item{margin:0;overflow:hidden;white-space:normal}
#memberLibrary img,.library-cover img,img.library-cover{display:block;width:100%;height:230px;object-fit:contain;object-position:center;background:#eef3fa;border-radius:9px;padding:8px}
@media(max-width:850px){
 main{width:100%;max-width:100%}
 .grid,.member-metrics,.member-worship-grid{min-width:0}
 nav{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
 .member-calendar,.member-worship-panel{min-width:0}
 #memberLibrary img,.library-cover img,img.library-cover{height:210px}
 input,select,textarea{font-size:16px}
}
@media(max-width:560px){
 header .header-inner{flex-direction:row;align-items:center;gap:8px}
 .member-brand img{width:40px;height:40px;flex:none}
 .member-brand h1{font-size:1.05rem;line-height:1.2}
 .member-brand p:not(.eyebrow){display:none}
 header #refresh{flex:none;padding:8px;min-height:44px;font-size:.8rem}
 #memberLibrary{grid-template-columns:minmax(0,1fr)}
 #memberLibrary img,.library-cover img,img.library-cover{height:190px}
 .card{overflow-wrap:anywhere}
}
/* Capa da biblioteca com proporção de livro sem cortar a arte original. */
#memberLibrary .member-library-cover{display:block;width:min(100%,180px);height:240px;max-width:100%;object-fit:contain;object-position:center;margin:0 auto 12px;padding:5px;border-radius:10px;background:#eef3fa}
@media(max-width:560px){#memberLibrary .member-library-cover{width:min(100%,150px);height:200px}}
