/* Keep the original left controls, visualization and summary hierarchy. */
html .recoil-lab-integrated .rl-columns{grid-template-columns:160px minmax(0,1fr)}
html .recoil-lab-integrated .rl-summary{display:grid;grid-template-columns:90px minmax(0,min(var(--active-width),calc(100% - 204px))) 90px;column-gap:12px;justify-content:center;align-items:center;--active-width:320px;height:auto;min-height:166px;flex-shrink:0}
html .recoil-lab-integrated .rl-summary:has(.rl-summary-card:nth-child(2)){--active-width:652px}
html .recoil-lab-integrated .rl-summary:has(.rl-summary-card:nth-child(3)){--active-width:984px}
html .recoil-lab-integrated .rl-summary:has(.rl-summary-card:nth-child(4)){--active-width:1316px}
@media(min-width:761px){html .recoil-lab-integrated #rl-how-copy{width:min(600px,calc(100vw - 230px));max-height:calc(100dvh - 160px)}}
html .recoil-lab-integrated .rl-summary-active{display:flex;justify-content:center;gap:12px;min-width:0}
html .recoil-lab-integrated .rl-summary-add-left,html .recoil-lab-integrated .rl-summary-add-right{display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:center}
html .recoil-lab-integrated .rl-summary-card{height:166px;min-height:166px}
html .recoil-lab-integrated .rl-summary-heading{height:62px;display:flex;flex-direction:column;gap:5px;padding:5px 8px}
html .recoil-lab-integrated .rl-summary-weapon{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;width:100%;padding:0;border:0;background:transparent;color:var(--text);cursor:pointer}
html .recoil-lab-integrated .rl-summary-controls{display:flex;align-items:center;justify-content:center;gap:4px}
html .recoil-lab-integrated .rl-summary-attachment{width:24px;height:24px;min-height:24px;flex:none;padding:3px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:3px;background:var(--surface-panel)}
html .recoil-lab-integrated .rl-summary-attachment img{width:18px;height:18px;object-fit:contain}
html .recoil-lab-integrated .rl-summary-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px 6px}
html .recoil-lab-integrated .rl-summary-metric{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:22px;text-align:center}
html .recoil-lab-integrated .rl-summary-label{text-align:center}
html .recoil-lab-integrated .rl-summary-empty{display:flex;align-items:center;justify-content:center;border-color:var(--line);background:var(--surface-page)}
html .recoil-lab-integrated .rl-add-build{padding:7px 9px;background:var(--surface-panel);border:1px solid var(--line);border-radius:4px;color:var(--muted);font:700 calc((9px) * var(--desktop-font-scale, 1))/1.2 var(--mono);white-space:nowrap;cursor:pointer}
html .recoil-lab-integrated .rl-add-build:hover{background:var(--surface-raised);color:var(--text)}
html .recoil-lab-integrated .rl-summary-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 8px;padding:8px 0 0;border-top:1px solid var(--line)}
html .recoil-lab-integrated .rl-summary-stat{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
html .recoil-lab-integrated .rl-summary-stat-label{font:600 calc((8px) * var(--desktop-font-scale, 1))/1.2 var(--mono);color:var(--muted);white-space:nowrap}
html .recoil-lab-integrated .rl-summary-stat-value{font:700 calc((10px) * var(--desktop-font-scale, 1))/1.2 var(--mono);color:var(--build-color);white-space:nowrap}
html .recoil-lab-integrated .rl-chart-loading{bottom:178px}
@media(min-width:1101px) and (max-width:1600px){html .recoil-lab-integrated .rl-columns{grid-template-columns:138px minmax(0,1fr)}}
@media(min-width:1101px) and (max-width:1440px){html .recoil-lab-integrated .rl-columns{grid-template-columns:126px minmax(0,1fr)}}
@media(min-width:761px) and (max-width:1100px){html .recoil-lab-integrated .rl-columns{grid-template-columns:160px minmax(0,1fr)}}
@media(max-width:760px){html .recoil-lab-integrated .rl-summary{display:flex;flex-wrap:wrap;height:auto;min-height:0;justify-content:center}
html .recoil-lab-integrated .rl-summary-active{order:-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
html .recoil-lab-integrated .rl-summary-add-left,html .recoil-lab-integrated .rl-summary-add-right{flex-direction:row}
html .recoil-lab-integrated .rl-summary-card{max-width:none}html .recoil-lab-integrated .rl-chart-loading{bottom:0}}

.rl-best-legend{display:none}
@media(min-width:761px){
 .rl-sidebar>.rl-best-legend{display:flex;align-items:center;justify-content:center;gap:5px;flex:none;margin:auto 0 0;font:700 calc((9px) * var(--desktop-font-scale, 1))/1.2 var(--mono);color:var(--muted)}
 .rl-best-legend-check{color:#62cf7e}
}

html .recoil-lab-integrated .rl-summary-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:24px 24px;column-gap:4px;row-gap:3px}
html .recoil-lab-integrated .rl-summary-weapon{grid-column:1/-1;grid-row:1}
html .recoil-lab-integrated .rl-summary-controls{grid-column:1;grid-row:2;justify-content:center;width:auto;gap:3px}
html .recoil-lab-integrated .rl-summary-load{grid-column:2;grid-row:2;justify-self:end;font:700 calc((8px) * var(--desktop-font-scale, 1))/1.2 var(--mono);padding:4px 5px;color:var(--muted);background:var(--surface-panel);border:1px solid var(--line);border-radius:3px;cursor:pointer}
html .recoil-lab-integrated .rl-summary-load:hover{color:var(--text);border-color:var(--build-color)}
@media(max-width:760px){html .recoil-lab-integrated .rl-summary-weapon{grid-column:1;grid-row:1}html .recoil-lab-integrated .rl-summary-load{grid-column:2;grid-row:1}}


@container(max-width:230px){html .recoil-lab-integrated .rl-summary-controls{gap:2px}html .recoil-lab-integrated .rl-summary-attachment{width:18px;height:18px;min-height:18px;padding:2px}html .recoil-lab-integrated .rl-summary-attachment img{width:14px;height:14px}html .recoil-lab-integrated .rl-summary-build{font-size:calc((7px) * var(--desktop-font-scale, 1));padding:2px}html .recoil-lab-integrated .rl-summary-load{font-size:calc((7px) * var(--desktop-font-scale, 1));padding:3px}}
@media(max-width:760px){html .recoil-lab-integrated .rl-summary-controls{grid-column:1/-1;justify-content:center}}

html .recoil-lab-integrated .rl-summary-actions{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:4px;min-width:0}
@media(max-width:760px){html .recoil-lab-integrated .rl-summary-actions{display:contents}html .recoil-lab-integrated .rl-summary-controls{width:100%}}
