/* Keep the build fixed while catalogue and management panels scroll. */
#app{grid-template-rows:64px minmax(0,1fr)}
.popular-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding:2px 7px 12px 0;scrollbar-color:#b39b59 #ede7d7;scrollbar-width:thin}
.popular-scroll .cards-grid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:12px;align-content:start}
.popular-scroll .database-card{position:relative;padding:8px 7px 10px;gap:5px}
.popular-scroll .mini-card{width:100%;max-width:185px;flex-shrink:0}
.popular-rank{position:absolute;left:9px;top:8px;font:600 11px 'DM Sans';color:#96804b;z-index:2}
.popular-scroll .card-actions{width:100%;margin-top:auto}.popular-scroll .card-actions button{flex:1;padding:6px 3px;font-size:10px}
.scroll-sheet .content-area{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:7px;scrollbar-color:#b39b59 #ede7d7;scrollbar-width:thin}
.scroll-sheet .facility-list,.scroll-sheet .mastery-list{flex-shrink:0;align-content:start}
.workshop-playstyles .screen-head .actions{gap:5px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.workshop-playstyles .screen-head .manage-styles{font-size:10px;padding:4px 6px}
#setupDialog{height:min(720px,calc(100dvh - 28px));gap:12px}
#setupDialog .setup-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:8px}
#setupDialog .archetype-option{padding:6px;gap:4px}
#setupDialog .archetype-option img{width:31px;height:31px}
#setupDialog .archetype-option b{font-size:21px}
#setupDialog .setup-bottom,#setupDialog .setup-foot,#setupDialog .dialog-head{flex-shrink:0}
@media(max-width:760px){#app{grid-template-rows:86px minmax(0,1fr)}.popular-scroll .cards-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.popular-scroll{padding-right:4px}.popular-scroll .mini-card{max-width:150px}.popular-scroll .card-actions button{font-size:9px;padding:6px 2px}.popular-rank{font-size:9px;left:6px;top:5px}#setupDialog{padding:12px;gap:9px;height:min(740px,calc(100dvh - 20px))}#setupDialog .setup-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:6px}#setupDialog .archetype-option{padding:4px;gap:3px}#setupDialog .archetype-option img{width:26px;height:26px}#setupDialog .archetype-option b{font-size:18px}#setupDialog .archetype-option small{display:none}#setupDialog .setup-bottom{gap:6px}#setupDialog .setup-foot{font-size:8px}.scroll-sheet .mastery-list{grid-template-columns:1fr}}
@media(max-width:760px) and (max-height:650px){#app{grid-template-rows:76px minmax(0,1fr)}#setupDialog .archetype-option img{width:20px;height:20px}#setupDialog .archetype-option b{font-size:16px}#setupDialog .setup-grid{gap:4px}#setupDialog .setup-foot{display:none}}
@media(min-width:761px) and (max-height:500px){#app{grid-template-rows:45px minmax(0,1fr)}#setupDialog .setup-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}#setupDialog .archetype-option img{width:22px;height:22px}#setupDialog .archetype-option b{font-size:17px}#setupDialog .archetype-option small{display:none}}
