/* Two complete lineups share the same six-row board. */
body.team-mode.team-compare-mode>main{width:calc(100% - 64px);max-width:1232px}
.team-compare-mode #team-count,.team-compare-mode .team-column-head{display:none}
.team-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex:1;min-width:0;min-height:0;overflow:hidden}
.compare-side{--compare-side-accent:#c69a7d;display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #41493a;border-radius:7px;background:#1b2018;overflow:hidden}
.compare-side[data-side="own"]{--compare-side-accent:#9cbbd0}
.compare-side.is-active{border-color:var(--compare-side-accent)}
.compare-side-header{display:flex;align-items:center;gap:8px;flex:none;min-width:0;height:36px;padding:0 8px;border-bottom:1px solid #394330;background:#242b1e}
.compare-side-header h2{margin:0;color:#cbd4bf;font-size:13px;font-weight:700;line-height:1.3;white-space:nowrap}
.compare-side.is-active .compare-side-header h2{color:#f1e4cc}
.compare-side-count{flex:none;color:#9daa8e;font:11px/1.3 var(--mono);white-space:nowrap}
.compare-side-edit{display:flex;align-items:center;justify-content:center;flex:none;min-height:27px;margin-left:auto;padding:3px 8px;border:1px solid #59694a;border-radius:4px;background:none;color:#b8c8a7;font-size:10px;font-weight:600;line-height:1.3;white-space:nowrap}
.compare-side-edit:hover{border-color:#9aaa83;color:#e5eedb;background:#323e26}
.compare-side-edit[aria-pressed="true"]{border-color:#9b8e68;background:#443d29;color:#f0d8ae}
.compare-side-edit:focus-visible{outline-offset:1px}
.compare-team-list{display:grid;grid-template-rows:repeat(6,minmax(0,1fr));gap:5px;flex:1;min-height:0;min-width:0;padding:5px}
body.team-mode.team-compare-mode .team-comparison .team-row{
  --team-name-size:13px;--team-sprite-size:40px;
  --team-weak-size:10.5px;--team-weak-height:20px;--team-weak-gap:2px;
  --team-secondary-size:9px;--team-secondary-line:11px;--team-secondary-label:48px;
  --team-matchup-gap:2px;
}
.team-comparison .team-row{grid-template-columns:80px minmax(0,1fr) 20px;column-gap:6px;min-height:0;min-width:0;padding:4px;align-content:start;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#677657 transparent;touch-action:pan-y}
.team-comparison .team-row::-webkit-scrollbar{width:3px;height:3px}
.team-comparison .team-row::-webkit-scrollbar-thumb{border-radius:3px;background:#677657}
.team-comparison .team-row::before{inset-block:4px}
.team-comparison .team-pokemon{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-width:0;height:auto;padding:0;text-align:center}
.team-comparison .team-pokemon-copy{max-width:100%}
.team-comparison .team-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-width:100%;overflow:hidden;white-space:normal;line-height:1.2;letter-spacing:0}
.team-comparison .team-form{display:none}
.team-comparison .team-matchups{justify-content:flex-start;min-width:0;min-height:0}
.team-comparison .team-weakness{flex:0 1 auto;width:auto;padding:1px 4px;gap:2px}
.team-comparison .team-weakness .type-icon,.team-comparison .team-weakness .type-full,.team-comparison .team-resistance .type-full{display:none}
.team-comparison .team-weakness .type-short,.team-comparison .team-resistance .type-short{display:inline}
.team-comparison .team-secondary-row{gap:2px}
.team-comparison .team-secondary-types{gap:1px 3px}
.team-comparison .team-resistance{flex:0 1 auto;width:auto;gap:1px}
.team-comparison .team-secondary-label{padding-top:0;letter-spacing:0}
.team-comparison .team-remove{width:20px;min-height:24px;padding:0}
.team-comparison .team-remove .icon,.team-comparison .team-remove svg{width:13px;height:13px}
.team-comparison .team-pokemon:focus-visible,.team-comparison .team-remove:focus-visible{outline-offset:-2px}
.team-comparison .team-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.team-comparison .team-slot-empty{grid-template-columns:25px minmax(0,1fr) 18px;gap:5px;padding:5px;align-content:center}
.team-comparison .team-slot-empty .team-slot-number{padding:0;font-size:20px;text-align:center}
.team-comparison .team-slot-empty .team-slot-label{font-size:10px;line-height:1.6}
.team-comparison .team-slot-empty .team-slot-plus{font-size:18px}
@media(min-width:1200px){
  body.team-mode.team-compare-mode .team-comparison .team-row{
    --team-name-size:15px;--team-sprite-size:46px;
    --team-weak-size:13px;--team-weak-height:24px;
    --team-secondary-size:10.5px;--team-secondary-line:14px;--team-secondary-label:60px;
  }
  .team-comparison .team-weakness .type-full,.team-comparison .team-resistance .type-full{display:inline}
  .team-comparison .team-weakness .type-short,.team-comparison .team-resistance .type-short{display:none}
}
@media(max-width:900px){
  .team-comparison{gap:8px}
  .compare-side-header{height:33px;gap:5px;padding-inline:6px}
  .compare-side-header h2{font-size:12px}
  .compare-side-count{font-size:10px}
  .compare-team-list{gap:4px;padding:4px}
  .team-comparison .team-row{grid-template-columns:66px minmax(0,1fr) 18px;column-gap:5px}
  .team-comparison .team-remove{width:18px}
}
@media(max-width:760px){
  .team-comparison{gap:6px}
  .compare-side-header{height:31px;gap:4px;padding-inline:4px}
  .compare-side-header h2{font-size:10.5px}
  .compare-side-count{font-size:9px}
  .compare-side-edit{min-height:24px;padding:3px 4px;font-size:9px}
  .compare-team-list{gap:3px;padding:3px}
  body.team-mode.team-compare-mode .team-comparison .team-row{
    --team-name-size:11px;--team-sprite-size:26px;
    --team-weak-size:10px;--team-weak-height:18px;--team-weak-gap:1px;
    --team-secondary-size:8.5px;--team-secondary-line:10px;--team-secondary-label:44px;
    --team-matchup-gap:1px;
  }
  .team-comparison .team-row{grid-template-columns:minmax(0,1fr) 18px;grid-template-rows:auto auto;row-gap:1px;column-gap:0;padding:2px;align-items:start}
  .team-comparison .team-pokemon{grid-column:1;grid-row:1;flex-direction:row;justify-content:flex-start;gap:4px;min-height:26px;text-align:left}
  .team-comparison .team-pokemon-copy{min-width:0}
  .team-comparison .team-matchups{grid-column:1/-1;grid-row:2}
  .team-comparison .team-weakness{padding-inline:2px;gap:1px}
  /* Only the first line reserves room for the group label. */
  .team-comparison .team-secondary-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:1px 2px}
  .team-comparison .team-secondary-label{flex:none;margin-right:1px}
  .team-comparison .team-secondary-types{display:contents}
  .team-comparison .team-resistance{flex:0 0 auto}
  .team-comparison .team-remove{grid-column:2;grid-row:1;align-self:start;min-height:26px}
  .team-comparison .team-no-weakness{font-size:9px;line-height:1.4}
  .team-comparison .team-slot-empty{grid-template-columns:20px minmax(0,1fr) 14px;gap:3px;padding:4px}
  .team-comparison .team-slot-empty .team-slot-number{font-size:18px}
  .team-comparison .team-slot-empty .team-slot-label{font-size:9px}
}
@media(max-width:680px){body.team-mode.team-compare-mode>main{width:calc(100% - 24px)}}
@media(max-width:480px){body.team-mode:not(.shared-team-mode) #team-count{display:none}}
@media(max-width:380px){
  body.team-mode.team-compare-mode>main{width:calc(100% - 20px)}
  body.team-mode .team-switch button{padding-inline:5px;font-size:9px}
  body.team-mode .team-toolbar .team-actions{gap:2px}
  body.team-mode .team-toolbar .team-actions .team-back,body.team-mode .team-toolbar .team-actions>.text-button{width:24px;min-width:24px}
  .compare-side-header{gap:3px;padding-inline:3px}
  .compare-side-header h2{font-size:9px}
  .compare-side-count{font-size:8.5px}
  .compare-side-edit{font-size:8px;padding-inline:3px}
}
@media(max-width:760px) and (max-height:620px){
  .compare-side-header{height:27px}
  .compare-side-edit{min-height:22px}
  .compare-team-list{gap:2px;padding:2px}
  body.team-mode.team-compare-mode .team-comparison .team-row{
    --team-name-size:10px;--team-sprite-size:22px;
    --team-weak-size:9.5px;--team-weak-height:14px;
    --team-secondary-size:8px;--team-secondary-line:9px;--team-secondary-label:41px;
  }
  .team-comparison .team-row{row-gap:1px;padding:2px}
  .team-comparison .team-pokemon,.team-comparison .team-remove{min-height:22px}
  .team-comparison .team-remove .icon,.team-comparison .team-remove svg{width:12px;height:12px}
  .team-comparison .team-slot-empty .team-slot-label{font-size:8px}
}
