.team-builder{max-width:1180px;margin:0 auto;min-width:0;color:var(--text,#23314a);font-size:14px;scroll-margin-top:20px}
.team-builder *{box-sizing:border-box}.team-builder [hidden]{display:none!important}
.team-builder h2,.team-builder h3,.team-builder p{margin:0}
.team-builder h2{font-size:22px;line-height:1.5;letter-spacing:-.035em}.team-builder h3{font-size:15px;line-height:1.5;letter-spacing:-.02em}
.team-builder button,.team-builder input,.team-builder select{font:inherit}
.team-builder input[type=checkbox]{width:17px;height:17px;min-width:17px;padding:0;margin:0;accent-color:var(--c-pink,#c3457c)}
.team-builder input[type=text],.team-builder input[type=search],.team-builder input[type=number],.team-builder select{max-width:100%;min-width:0;border:1px solid var(--line,#e1e5ed);border-radius:7px;background:#fff;color:var(--text,#23314a);padding:9px 10px;min-height:40px}
.team-builder button:focus-visible,.team-builder input:focus-visible,.team-builder select:focus-visible,.team-confirm-dialog button:focus-visible{outline:2px solid #6387cb;outline-offset:3px}
.team-builder .button{min-height:42px}.team-builder button:disabled{cursor:default;opacity:.55}.team-builder .text-button{font-size:12px;min-height:32px}
.team-help{color:var(--muted,#657287);font-size:12px;line-height:1.8}
.team-rating-badge{display:inline-block;padding:5px 9px;border-radius:5px;background:#f7eaf0;color:#99516f;font-size:11px;font-weight:650}
.team-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 22px}
.team-step{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 9px;border:1px solid #e1e5ed;border-radius:8px;background:#fff;color:#6d7b90;font-size:13px!important;font-weight:600!important;line-height:1.5;text-align:center}
.team-step-number{display:grid;place-items:center;width:23px;height:23px;flex:none;border-radius:50%;background:#eef1f7;font-size:12px}
.team-step-name{min-width:0;word-break:keep-all}
.team-builder .team-step.is-current{color:#a93f70;border-color:#ddb6c9;background:#fcf2f7;opacity:1}.team-step.is-current .team-step-number{background:#c3457c;color:#fff}.team-step.is-complete{cursor:pointer;color:#3266d7}
.team-step-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;flex-wrap:wrap}.team-step-title:focus{outline:none}
.team-heading-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.team-heading-actions .button{font-size:12px;white-space:nowrap}
.team-notice{padding:12px 15px;margin-bottom:16px!important;background:#eef4ff;border:1px solid #dce5f5;border-radius:8px;font-size:12px;line-height:1.8;color:#466182}
.team-builder .team-balance-warning{background:#fff3f6;border-color:#e7baca;color:#a13859}
.team-builder .team-position-guidance{padding:12px 15px;margin:0 0 16px;background:#fff4f8;border:1px solid #f0ccdc;border-left:3px solid #cf4b86;border-radius:8px;color:#b5316b;font-size:14px;line-height:1.75;word-break:keep-all;overflow-wrap:anywhere}
.team-position-guidance>strong,.team-position-guidance>span{display:block}.team-position-guidance>strong{font-weight:700}.team-position-guidance>span{margin-top:4px}.team-position-guidance-count{white-space:nowrap}
.team-selection-toolbar{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:13px}
.team-search{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#657287;max-width:440px;flex:1}.team-search input{width:100%}
.team-selection-count{font-size:14px;white-space:nowrap;padding-bottom:8px}.team-selection-count strong{font-size:28px;color:#a83f71;font-variant-numeric:tabular-nums}.team-selection-count span{color:#657287}
.team-player-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.team-selection-group{margin-top:20px;min-width:0}.team-selection-group-heading{color:#526078}.team-selection-group .team-player-grid{margin-top:10px}.team-selection-group .team-empty{padding:20px 12px}
.team-selection-mercenaries{border-top:1px solid #e1e5ed;padding-top:18px}.team-selection-mercenaries .team-selection-group-heading{color:#876a3d}
.team-player-option{display:flex;align-items:center;gap:12px;min-width:0;padding:15px;border:1px solid #e1e5ed;border-radius:9px;background:#fff;cursor:pointer;min-height:78px}
.team-player-option.is-selected{border-color:#d590b0;background:#fff6fa}.team-player-option.is-disabled{opacity:.55;cursor:default}
.team-player-info{display:flex;flex-direction:column;min-width:0;gap:5px}.team-player-info strong{font-size:14px;font-weight:650;overflow-wrap:anywhere;line-height:1.5}.team-player-info small{font-size:11px;color:#708097;line-height:1.7}
.team-empty{padding:45px 15px;text-align:center;color:#708097}
.team-selected-names{display:flex;flex-wrap:wrap;gap:7px;padding:16px 0 0}
.team-selected-chip{display:inline-flex;align-items:center;gap:7px;max-width:100%;border:1px solid #e0d3df;background:#f9f1f6;color:#824f70;border-radius:6px;padding:7px 10px;font-size:12px!important;cursor:pointer;overflow-wrap:anywhere;text-align:left}
.team-selected-chip>span:not(.team-player-portrait){min-width:0}
.team-player-portrait{flex-shrink:0;border-radius:7px}.team-player-heading,.team-result-person{display:flex;align-items:center;gap:10px;min-width:0;width:100%}
.team-player-heading-text{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.team-role-list{border:1px solid #dfe5ef;border-radius:10px;background:#fff;overflow:clip}
.team-role-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(305px,2.3fr);align-items:center;gap:12px 22px;padding:14px 18px;border-bottom:1px solid #e9edf3;min-width:0;scroll-margin:100px}
.team-role-row:last-child{border-bottom:0}.team-role-row.is-highlighted{box-shadow:inset 3px 0 #396bd2;background:#f6f9ff}.team-role-row.is-group-selected{background:#fff5f9}
.team-role-identity{display:flex;align-items:flex-start;flex-direction:column;gap:4px;min-width:0}.team-role-identity h3{overflow-wrap:anywhere}
.team-role-choices{min-width:0}.team-role-label{display:flex;align-items:center;justify-content:space-between;color:#6a7890;font-size:11px;gap:10px;margin-bottom:5px}
.team-role-label .text-button{min-height:24px;font-size:11px}
.team-position-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.team-position-option{position:relative;border:1px solid #e1e5ed;border-radius:6px;padding:7px 3px;background:#fafbfe;color:#526078;min-height:36px;cursor:pointer;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center}
.team-position-score{font-size:10px;font-variant-numeric:tabular-nums;line-height:1.3}
.team-rating-status{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.team-rating-status .button{font-size:12px}
.team-position-option[aria-pressed=true]{background:#fce7f0;border-color:#c76591;color:#9e3668}
.team-position-option[aria-pressed=false] .position-icon{opacity:.45}
.team-position-check{position:absolute;top:1px;right:3px;font-size:9px;font-weight:800;line-height:1}
.team-position-option .position-label{font-size:12px;gap:4px;white-space:nowrap}.team-position-option .position-icon{width:17px;height:17px}
.team-inline-error{color:#ad3957;font-size:11px;line-height:1.7}.team-role-choices>.team-inline-error{margin-top:5px!important}
.team-mercenary-name{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}.team-mercenary-name>span{font-size:11px;color:#945471;font-weight:600}.team-mercenary-name input{width:100%;min-height:36px!important;font-size:13px!important;font-weight:600!important}
.team-builder fieldset{padding:0;margin:0;border:0;min-width:0}.team-builder legend{font-size:11px;color:#6a7890;margin-bottom:7px;padding:0}
.team-player-scores{grid-column:2}.team-score-grid{display:flex;gap:10px;flex-wrap:wrap}.team-score-grid>label{display:flex;align-items:center;gap:7px;font-size:11px;min-width:0}
.team-builder .team-score-heading{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px}.team-score-heading .text-button{min-height:28px;font-size:11px}
.team-score-grid input.is-edited{border-color:#c76591;background:#fff6fa}.team-score-grid input[aria-invalid=true]{border-color:#bd345a;box-shadow:0 0 0 1px #bd345a}
.team-score-grid input{width:90px;min-height:34px!important;padding:6px 8px!important;font-size:12px!important;font-variant-numeric:tabular-nums}
.team-score-grid .position-label{font-size:11px;gap:4px;white-space:nowrap}
.team-groups{padding:16px 18px;background:#fff;border:1px solid #e1e5ed;border-radius:10px;margin-bottom:16px}
.team-group-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.team-group-heading:has(+.team-group-list){margin-bottom:8px}
.team-group-heading .button{font-size:12px;white-space:nowrap}.team-group-limit{font-size:11px;font-weight:400;color:#6a7890;margin-left:8px;white-space:nowrap}
.team-group-list{display:flex;flex-direction:column;gap:6px}
.team-group-row{display:flex;align-items:center;gap:10px;padding:8px 11px;background:#fcf7fa;border-radius:6px;min-width:0}
.team-group-row>strong{color:#9a4a73;font-size:12px;white-space:nowrap}.team-group-names{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px;line-height:1.7}.team-group-row .text-button{white-space:nowrap}
.team-group-editor{display:flex;flex-direction:column;gap:5px;background:#f6edf3;border:1px solid #e8ccdc;border-radius:7px;padding:12px;margin-top:10px;font-size:12px;line-height:1.8;overflow-wrap:anywhere;color:#925370}
.team-group-check{display:flex;gap:7px;align-items:center;color:#9e4b76;font-size:11px;min-height:28px;cursor:pointer}
.team-group-check:has(input:disabled){opacity:.6;cursor:default}.team-group-check:has(input:focus-visible){outline:2px solid #6387cb;outline-offset:2px}
.team-group-badge{align-self:flex-start;font-size:10px;padding:2px 6px;border-radius:4px;background:#f5e8f0;color:#935072;white-space:nowrap}
.team-group-player:not(label){cursor:default}.team-group-player .team-player-info{flex:1}.team-group-positions{display:flex;gap:5px 9px;flex-wrap:wrap;color:#6a7890}.team-group-positions .position-label{font-size:11px;gap:3px;white-space:nowrap}
.team-readiness{position:sticky;bottom:12px;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 18px;margin-top:16px;background:#fff;border:1px solid #d9e1ed;border-radius:10px;box-shadow:0 5px 22px #29375312}
.team-readiness-copy{display:flex;align-items:flex-start;flex-direction:column;gap:4px;min-width:0;line-height:1.7}
.team-readiness-copy>strong{font-size:13px}.team-readiness-copy>span{font-size:12px;overflow-wrap:anywhere}.team-readiness>.button{min-width:130px;flex-shrink:0}
.team-ready{color:#4b7461}.team-status-warning{color:#a04768}.team-group-editor-actions{display:flex;gap:8px;flex-shrink:0}
.team-step-actions{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:25px;padding-top:22px;border-top:1px solid #dde3ec}.team-step-actions>.button{min-width:140px}.team-back{margin-top:18px}
.team-errors{padding:12px 16px;margin-bottom:16px;background:#fff3f6;border:1px solid #e7baca;border-radius:8px;color:#a13859;font-size:12px;line-height:1.8}
.team-result-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.team-result-tabs{display:flex;gap:7px;flex-wrap:wrap}
.team-builder .team-priority{margin:0 0 20px;padding:14px 16px;border:1px solid var(--line,#e1e5ed);border-radius:12px;background:var(--panel,#fff)}
.team-builder .team-priority legend{padding:0 6px;margin:0;font-size:14px;font-weight:650;color:var(--text,#23314a)}
.team-priority-options{display:flex;flex-wrap:wrap;gap:10px 24px}
.team-priority-choice{min-width:0}.team-priority-choice:has(.team-priority-option-note){flex:1 1 240px}
.team-builder .team-priority-option-note{margin:0 0 0 27px;color:var(--muted,#657287);font-size:12px;font-weight:400;line-height:1.6;word-break:keep-all;overflow-wrap:anywhere}
.team-priority-option{display:flex;align-items:center;gap:9px;min-height:44px;font-size:14px;line-height:1.5;color:var(--text,#23314a);cursor:pointer}
.team-builder .team-priority-option input[type=radio]{appearance:auto;width:18px;height:18px;min-width:18px;min-height:18px;margin:0;padding:0;accent-color:var(--c-pink,#c3457c);flex:none}
.team-priority-option:has(input:checked){font-weight:650}
.team-priority:disabled .team-priority-option{opacity:.55;cursor:default}
.team-builder .team-priority-help{margin:4px 0 0;color:var(--muted,#657287);font-size:12px;line-height:1.6}
.team-top-two-status{display:inline-block;margin-left:12px;font-size:12px;font-weight:500;line-height:1.6}
.team-result-edit-actions{display:flex;gap:8px;flex-wrap:wrap}
.team-roster-export{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 14px}.team-roster-export-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.team-roster-export-status{color:var(--muted,#657287);font-size:12px;line-height:1.6}.team-roster-copy-text{display:block;box-sizing:border-box;width:100%;height:150px;margin-top:18px;resize:vertical;border:1px solid #dce3ed;border-radius:8px;padding:12px;font:12px/1.7 monospace;color:#23314a;background:#f6f8fc}.team-roster-export [hidden]{display:none!important}
.team-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.team-result-side{border:1px solid #dde4ee;border-radius:10px;overflow:hidden;background:#fff;min-width:0}.team-result-side>h3{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:15px 18px;border-bottom:1px solid #e1e6ee}
.team-total{font-variant-numeric:tabular-nums;font-size:13px}.team-result-rating{padding:0 2px 12px;font-size:13px;font-weight:650;font-variant-numeric:tabular-nums}
.team-result-blue>h3{background:#edf3ff;color:#3266d7}.team-result-red>h3{background:#fff0f4;color:#ba4564}
.team-result-player{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px 18px;min-height:95px;border-bottom:1px solid #edf0f5}.team-result-player:last-child{border:0}
.team-result-position{font-size:12px;font-weight:600}.team-result-position .position-icon{width:20px;height:20px}
.team-result-identity{display:flex;flex-direction:column;gap:4px;min-width:0}.team-result-identity>strong{font-size:14px;overflow-wrap:anywhere;line-height:1.6}.team-result-identity>small{font-size:11px;color:#71829a;line-height:1.6}
.team-mercenary-badge{font-size:10px;display:inline-block;margin-left:6px;color:#876a3d;background:#fbf4e8;padding:1px 5px;border-radius:4px;font-weight:500}
.team-group-summary{margin-top:14px;padding:14px 18px;border:1px solid #e1e5ed;background:#fff;border-radius:8px}.team-group-summary p{font-size:12px;line-height:1.9;overflow-wrap:anywhere}.team-group-summary strong{padding-right:12px;color:#985775}
.team-edit-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.team-confirm-dialog{width:min(460px,calc(100vw - 32px));max-width:100%;padding:28px;border:1px solid #e0e5ee;border-radius:14px;background:#fff;color:#23314a;box-shadow:0 20px 70px #1c2f5038}
.team-confirm-dialog::backdrop{background:#18243e70}.team-confirm-dialog h2{font-size:20px;line-height:1.6;letter-spacing:-.03em;margin:0;word-break:keep-all}
.team-confirm-note{font-size:12px;color:#748198;line-height:1.9;margin:16px 0 0;word-break:keep-all}
.team-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:26px}.team-dialog-actions .button{min-height:42px;font-size:13px}
.team-repair-dialog{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}
.team-repair-content{margin-top:18px;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.team-repair-reason{padding:10px 12px;margin:0;background:#fff3f7;border-radius:6px;color:#a13859}
.team-conflict-players{list-style:none;padding:10px 0;margin:0;border-bottom:1px solid #e6eaf0}
.team-conflict-players li{display:flex;justify-content:space-between;gap:10px;padding:3px 0;font-size:12px}
.team-conflict-players strong{font-weight:550}.team-conflict-players span{color:#718098;flex-shrink:0}
.team-repair-help{margin:14px 0;color:#526078;font-size:12px}
.team-repair-options{display:flex;flex-direction:column;gap:8px}
.team-repair-option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e1e5ed;border-radius:8px;background:#f9faff}
.team-repair-option ul{list-style:none;margin:0;padding:0;min-width:0}.team-repair-option strong{font-weight:600}.team-repair-option li+li{margin-top:5px}
.team-repair-option li>span{color:#a13859;white-space:nowrap}.team-repair-option .button{min-height:40px;font-size:12px;white-space:nowrap;flex-shrink:0}
@media(max-width:1200px){
  .team-player-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-role-row{grid-template-columns:minmax(130px,.8fr) minmax(280px,1.6fr);gap:10px 20px}
}
@media(max-width:700px){
  .team-builder h2{font-size:20px}.team-step{font-size:11px!important;gap:4px;padding:10px 4px}.team-step-number{width:20px;height:20px;font-size:11px}.team-steps{gap:5px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-heading-actions{gap:8px}.team-heading-actions .button{min-height:40px}
  .team-player-grid{grid-template-columns:1fr;gap:8px}.team-player-option{min-height:74px;padding:14px}
  .team-selection-toolbar{align-items:stretch;flex-direction:column;gap:10px}.team-search{max-width:none}.team-selection-count{padding:0}
  .team-builder input[type=text],.team-builder input[type=search],.team-builder input[type=number],.team-builder select{font-size:16px!important;min-height:44px!important}
  .team-role-row{grid-template-columns:minmax(0,1fr);padding:14px 12px;gap:10px}.team-role-identity,.team-player-scores{grid-column:1;grid-row:auto}
  .team-role-identity h3{font-size:14px}
  .team-position-option{min-height:44px;padding:4px}.team-position-option .position-label{font-size:11px;flex-direction:column;gap:2px}
  .team-position-options{gap:5px}
  .team-mercenary-name{gap:4px}.team-mercenary-name input{width:100%}.team-score-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.team-score-grid>label{flex-direction:column;align-items:flex-start;gap:5px}.team-score-grid input{width:100%}
  .team-groups{padding:14px 12px}.team-group-heading{align-items:flex-start;flex-direction:column;gap:10px}.team-group-heading .button{min-height:44px}
  .team-group-row{flex-wrap:wrap;gap:5px 10px;padding:8px 10px}.team-group-names{flex-basis:calc(100% - 60px)}.team-group-row .text-button{min-height:36px}
  .team-group-check{min-height:36px}
  .team-readiness{bottom:8px;align-items:stretch;flex-direction:column;gap:10px;padding:12px;margin-top:12px}.team-readiness-copy>strong{font-size:12px}.team-readiness-copy>span{font-size:11px}.team-readiness-copy .text-button{min-height:32px}
  .team-group-editor-actions{justify-content:flex-end}.team-group-editor-actions>.button{flex:1}.team-step-actions{flex-wrap:wrap}.team-step-actions>.button{margin-left:auto}
  .team-result-grid{grid-template-columns:1fr;gap:14px}.team-result-player{grid-template-columns:57px minmax(0,1fr) auto;padding:15px 12px;gap:8px}.team-result-position{font-size:11px;gap:4px}.team-result-position .position-icon{width:17px;height:17px}
  .team-result-player .text-button{min-width:36px;min-height:44px}.team-result-identity>strong{font-size:13px}
  .team-result-person{gap:7px}.team-result-person .team-player-portrait{--champion-size:30px!important}
  .team-result-toolbar .button{font-size:12px}.team-edit-actions .button{font-size:12px;flex:1}
  .team-confirm-dialog{padding:24px 20px}.team-confirm-dialog h2{font-size:19px}
  .team-repair-dialog{padding:20px 16px}.team-repair-option{align-items:stretch;flex-direction:column;gap:10px}.team-repair-option .button{width:100%}
  .team-conflict-players li{flex-direction:column;gap:0;padding:5px 0}.team-repair-dialog .team-dialog-actions{margin-top:18px}
}
.team-result-name{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.team-adjustment-label{font-size:11px;line-height:1.4;font-weight:400;white-space:nowrap}

/* Patch history stays collapsed below the completed recommendation. */
.team-builder .team-logic-details{margin-top:24px;border-top:1px solid var(--line,#e5e8ef);color:var(--muted,#65748a);font-size:14px;min-width:0}
.team-builder .team-logic-details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:14px 0;list-style:none;cursor:pointer;font-size:14px;font-weight:600;line-height:1.5}
.team-logic-details>summary::-webkit-details-marker{display:none}.team-logic-details>summary::after{content:'';width:6px;height:6px;flex-shrink:0;margin-right:4px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .16s ease}
.team-logic-details[open]>summary::after{transform:rotate(225deg)}.team-logic-details>summary:hover{color:#a13264}.team-logic-details>summary:focus-visible{outline:2px solid #a13264;outline-offset:3px;border-radius:4px}
.team-logic-content{display:grid;gap:22px;padding:8px 0 20px;line-height:1.8;overflow-wrap:anywhere}.team-logic-content section{min-width:0}.team-builder .team-logic-content h3{margin:0 0 8px;padding:0;border:0;background:none;font-size:14px;font-weight:650;color:var(--text,#29374f)}.team-logic-content ul{margin:0;padding-left:18px}.team-logic-content li+li{margin-top:8px}.team-logic-content p{margin:0}.team-logic-intro{font-size:13px}
@media(prefers-reduced-motion:reduce){.team-logic-details>summary::after{transition:none}}
