#totals>.disarray.de-inline{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:10px;width:auto;min-width:260px;min-height:44px;height:auto;margin:0;padding:8px 13px;white-space:normal}
#totals>.de-inline>span{display:flex;align-items:center;gap:9px;max-width:none;width:auto;font-size:14px;font-weight:700;white-space:nowrap}
#totals>.de-inline b{font-size:26px;font-weight:800;color:#b4dfff;line-height:1.1}
#totals>.de-inline>span:last-child b{color:#ffd19a}#totals>.de-inline>.de-divider{color:#81636a;font-weight:400}
#rosterExportDialog{width:min(850px,calc(100vw - 24px));box-sizing:border-box}
.roster-export-times,.roster-export-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.roster-export-times label{display:flex;align-items:center;gap:6px;min-height:40px;padding:6px 10px;border:1px solid #79574f;border-radius:6px}
#rosterExportText{box-sizing:border-box;width:100%;height:45dvh;min-height:180px;padding:12px;resize:vertical;white-space:pre;overflow:auto;font:15px/1.7 'Consolas','Microsoft JhengHei',monospace}
#rosterExportStatus{min-height:24px;font-size:14px;overflow-wrap:anywhere}.roster-export-actions{margin-top:12px;justify-content:flex-end}
#exportRoster{margin-right:6px}
/* Desktop formation only: distribute remaining real viewport height among ten rows. */
@media(min-width:1100px) and (min-height:650px){
 body[data-roster-view=true]{height:100dvh;min-height:0;display:flex;flex-direction:column}
 body[data-roster-view=true]>header{flex:0 0 clamp(96px,13dvh,190px);height:clamp(96px,13dvh,190px);min-height:0;padding-block:5px}
 body[data-roster-view=true] .brand{height:100%;width:clamp(300px,25vw,660px);display:flex;align-items:center}
 body[data-roster-view=true] .brand img{height:100%;max-height:100%;width:100%;object-fit:contain}
 body[data-roster-view=true] .header-right{gap:6px;padding-top:3px}
 body[data-roster-view=true]>main{width:100%;max-width:none;margin:0;flex:1;min-height:0;display:flex;flex-direction:column;padding:0 clamp(14px,1.5vw,42px) 8px}
 body[data-roster-view=true] #formationTabs{flex:0 0 auto;min-height:42px;height:auto;padding:3px 0}
 body[data-roster-view=true] #tabs{flex:0 0 auto;min-height:44px;height:auto;flex-wrap:wrap;padding:2px 0;gap:3px}
 body[data-roster-view=true] #tabs button{padding:7px clamp(5px,.6vw,16px);font-size:clamp(12px,.8vw,20px);min-width:0;gap:5px}
 body[data-roster-view=true] #totals{flex:0 0 auto;gap:7px;margin:7px 0 3px;flex-wrap:wrap}
 body[data-roster-view=true] #totals>.total{height:clamp(40px,4.4dvh,64px);padding:4px 10px}
 body[data-roster-view=true] #totals>.disarray{min-height:40px;height:clamp(40px,4.4dvh,64px)}
 body[data-roster-view=true] .toolbar{flex:0 0 auto;min-height:40px;margin:5px 0 7px;gap:8px}
 body[data-roster-view=true] .toolbar button{min-height:32px;padding:6px 10px}
 body[data-roster-view=true] #duplicateNotice{flex:0 0 auto;margin-top:0}
 body[data-roster-view=true] #roster{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 body[data-roster-view=true] #roster>.table{min-height:0;display:grid;grid-template-rows:clamp(25px,2.8dvh,38px) repeat(10,minmax(0,1fr))}
 body[data-roster-view=true] #roster .row{height:auto!important;min-height:0;padding:0 8px;gap:6px;grid-template-columns:2em 2.3em minmax(0,.9fr) minmax(0,1fr) minmax(0,1.3fr)}
 body[data-roster-view=true] #roster .row.head{height:auto!important;font-size:clamp(12px,.75vw,20px)}
 body[data-roster-view=true] #roster .row input{min-height:0;height:80%;max-height:54px;min-width:0;font-size:clamp(13px,.85vw,23px);padding:3px 6px}
 body[data-roster-view=true] #roster .weapon-button{height:100%;min-height:0;min-width:0;padding:0;overflow:hidden}
 body[data-roster-view=true] #roster .weapon-button img{width:clamp(28px,3.7dvh,62px);height:clamp(28px,3.7dvh,62px);max-height:92%;object-fit:contain;flex-shrink:0}
 body[data-roster-view=true] #roster .weapon-button>span{min-width:0;font-size:clamp(12px,.8vw,22px);overflow-wrap:anywhere;line-height:1.15}
 body[data-roster-view=true] #roster .role-button{height:100%;min-height:0;padding:0}
 body[data-roster-view=true] #roster .role{width:clamp(23px,2.8dvh,40px);height:clamp(23px,2.8dvh,40px)}
 body[data-roster-view=true] #roster .role svg{width:90%;height:90%}
}
@media(max-width:760px){#totals>.disarray.de-inline{grid-column:1/-1;width:100%;min-width:0;flex-wrap:wrap;gap:6px;padding:10px}#totals>.de-inline>span{font-size:14px}#totals>.de-inline b{font-size:25px}.roster-export-times button,.roster-export-actions button{min-height:44px}#rosterExportText{font-size:14px}}
#accessDialog .access-language{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;margin:0 0 14px}
#accessDialog .access-language label{font-size:12px;color:#c6afa9}#accessDialog .access-language select{max-width:100%;min-height:40px;padding:6px 10px;font-size:14px;background:#211a22;border:1px solid #805849;border-radius:6px}
@media(max-width:600px){#accessDialog .access-language{margin-bottom:10px}#accessDialog .access-language select{font-size:16px;min-height:44px}}
