/* Shared sizing, without concealing overflowing content. */
html{-webkit-text-size-adjust:100%;scroll-padding-bottom:150px}
main,.screen,fieldset{min-width:0}
fieldset{max-width:100%}
main{padding-bottom:calc(140px + env(safe-area-inset-bottom))}
.screen{overflow-wrap:anywhere}
.screen img{max-width:100%}
.screen input,.screen textarea,.screen select{min-width:0;max-width:100%;font-size:16px!important}
.heading,.actions,.profile-actions,.connection-actions,.campaign-prize,.featured-campaign p{flex-wrap:wrap}
.heading>div,.profile-actions>*,.campaign-owner>span,.creator-profile-header>div,.connection-person>div,.request-person>div,.idea-card-person>div{min-width:0}
.screen button{max-width:100%}
.screen .inline-icon,.screen .soft-icon,.screen .avatar{flex-shrink:0}
.screen a,.screen h1,.screen h2,.screen h3,.screen p,.screen strong{overflow-wrap:anywhere}
.bottom-navigation{box-sizing:border-box;width:min(530px,calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)))}
.bottom-navigation button{flex:1 1 0;min-width:0;min-height:54px}
.screen :is(button,input,textarea,select,a){scroll-margin-block:24px calc(150px + env(safe-area-inset-bottom))}
@media(hover:none){button:hover{transform:none}.screen{animation:none}}
@media(max-width:700px){
 main{width:100%;padding:12px max(16px,env(safe-area-inset-right)) calc(140px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
 .sidebar{padding-top:max(24px,env(safe-area-inset-top));padding-bottom:24px}
 .sidebar>.brand{max-width:100%;justify-content:center}
 .heading{gap:16px;align-items:flex-start}
 .heading>.create-campaign-button{white-space:normal}
 .creator-card .person-open{gap:12px;padding:20px 64px 20px 16px!important}
 .creator-card .avatar{width:48px;height:48px;flex-basis:48px}
 .person-copy small{align-items:flex-start!important}.person-copy .dot{margin-top:6px}
 .profile-actions{gap:12px}.profile-actions button{flex:1 1 100px}
 .campaign-key-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .campaign-key-facts>div:last-child{grid-column:1/-1}
 .campaign-key-facts strong{font-size:18px}
 .home-challenge-foot>.dark{flex:1 1 160px!important}
 .home-challenge-foot{gap:16px}.featured-campaign h2{font-size:22px!important}
 .admin-row-copy{min-width:0;flex:1 1 140px}.admin-row .actions{flex-wrap:wrap}
 .auth-paper{padding:24px 20px}.funding-lines>span{gap:16px}
 .entry-order>div{gap:16px;flex-wrap:wrap}
 .toast{max-width:calc(100% - 32px);bottom:calc(112px + env(safe-area-inset-bottom));white-space:normal}
}
@media(max-width:360px){
 :root{--space-card:16px;--type-page:26px;--type-section:21px;--type-card:19px}
 .bottom-navigation{width:calc(100% - 16px);padding-inline:4px}
 .bottom-navigation button{font-size:10px!important}
 .creator-card .person-open{padding-left:14px!important;gap:10px}
 .creator-card .avatar{width:42px;height:42px;flex-basis:42px}
 .creator-connect{right:10px}.auth-paper{padding:20px 16px}
}

/* Reserve thumbnail space and preserve portrait proportions. */
.challenge-card-cover,.collab-card-cover,.profile-post-cover{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;object-position:center;border-radius:12px;flex-shrink:0;background:#eeede7}
.campaign-detail-cover{display:block;width:100%;height:auto;aspect-ratio:16/9;max-height:360px;object-fit:cover;border-radius:20px;margin:20px 0 28px;background:#eeede7}
.campaign-upload-preview{display:block;width:100%;max-width:360px!important;aspect-ratio:16/9;object-fit:cover;border-radius:12px;margin-top:16px}
.profile-post-cover{margin-bottom:20px}.idea-card-open{height:auto;min-height:0}.idea-card-heading{width:100%}
.avatar,.member-photo{aspect-ratio:1;object-fit:cover;object-position:center;border-radius:50%}
.featured-campaign>img{object-position:center;height:100%;min-height:260px;aspect-ratio:4/3}
.collab-detail-paper .post-image{display:block;width:100%;height:auto;max-height:none;object-fit:contain}
.idea-card-foot{flex-wrap:wrap}.idea-card-person{min-width:0}
@media(max-width:700px){.featured-campaign>img{height:auto;min-height:0;aspect-ratio:16/9}.campaign-detail-cover{margin:16px 0 24px}.challenge-card-cover,.collab-card-cover{max-height:220px}}

/* Compact collaboration preview: small work thumbnail beside the idea. */
#collabBoard{align-items:start}
#collabBoard .idea-card-open{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-content:start;padding:18px!important;min-height:0;flex:none}
#collabBoard .idea-card-open.has-cover{grid-template-columns:minmax(0,1fr) 88px;column-gap:16px}
#collabBoard .collab-card-cover{grid-column:2;grid-row:1/3;width:88px;height:88px;aspect-ratio:1;object-fit:cover;border-radius:12px;align-self:center}
#collabBoard .idea-card-heading{grid-column:1;grid-row:1;margin:0;gap:8px}
#collabBoard .idea-card-heading h3{font-size:17px!important;line-height:1.4!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#collabBoard .idea-card-person{grid-column:1;grid-row:2;margin:0;gap:10px}
#collabBoard .idea-card-person .avatar{width:32px;height:32px;flex-basis:32px}
#collabBoard .idea-card-person strong{font-size:13px!important}
#collabBoard .idea-card-person small{font-size:12px}
#collabBoard .idea-card-foot{padding:0 18px 16px!important;gap:10px}
#collabBoard .idea-card-foot button{padding:9px 12px;font-size:12px!important}
.profile-photo-editor{display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px 18px;align-items:center;padding:24px;background:white;box-shadow:var(--card-shadow);border-radius:20px;margin-bottom:24px}
.profile-photo-editor>label{grid-column:1/-1;font-size:16px!important;font-weight:600;margin:0!important}
.profile-photo-editor #member-photo-preview{grid-column:1;grid-row:2/4;width:80px;height:80px;margin:0;border-radius:50%;object-fit:cover}
.profile-photo-editor #member-photo{grid-column:2;width:100%;min-width:0;padding:10px!important;font-size:14px!important;background:#f2f1ed!important;box-shadow:none!important}
.profile-photo-editor #member-photo::file-selector-button{padding:10px 12px;margin-right:10px;border:0;border-radius:10px;background:#e7efcf;color:#242420;font:inherit;cursor:pointer}
.profile-photo-editor #removePhoto{grid-column:2;justify-self:start;padding:0;min-height:44px;background:transparent}
.profile-photo-editor>small{grid-column:1/-1}
.profile-photo-editor:has(#member-photo-preview[hidden]){grid-template-columns:minmax(0,1fr)}
.profile-photo-editor:has(#member-photo-preview[hidden]) #member-photo{grid-column:1}
.profile-photo-editor:has(#member-photo-preview[hidden]) #removePhoto{display:none}
.member-photo-change{display:block;margin-top:8px;padding:8px 0;min-height:44px;text-decoration:underline;text-underline-offset:4px}
@media(max-width:700px){.profile-photo-editor{padding:20px;grid-template-columns:64px minmax(0,1fr);gap:12px}.profile-photo-editor #member-photo-preview{width:64px;height:64px}.profile-photo-editor #member-photo{grid-column:1/-1;grid-row:4}.profile-photo-editor #removePhoto{grid-row:2/4}.profile-photo-editor>small{grid-row:5}}
@media(max-width:360px){#collabBoard .idea-card-open.has-cover{grid-template-columns:minmax(0,1fr) 64px;column-gap:12px}#collabBoard .collab-card-cover{width:64px;height:72px}#collabBoard .idea-card-heading h3{font-size:16px!important}}
.demo-intro{padding:24px 0 4px}.demo-intro>small{display:block;margin-bottom:16px}.demo-intro p{margin-top:16px;color:var(--muted);max-width:520px}
.settings-panel{padding:24px;border-radius:20px;background:white;box-shadow:var(--card-shadow);margin-top:24px}.settings-panel h2{margin-bottom:16px}.settings-panel p{color:var(--muted);margin:12px 0}.settings-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.settings-panel .member-toggle{margin:0}.settings-panel input[type=checkbox]{width:22px;height:22px;flex-shrink:0}.settings-panel button:disabled{opacity:.5;cursor:not-allowed}#resetDemoForm{margin-top:24px}#resetDemoForm label{display:block;margin-bottom:12px}@media(max-width:700px){.settings-panel{padding:20px}.settings-actions button{flex:1 1 160px}}
