/* 팀 나누기 */
.tm-preview { margin: 0; text-align: center; font-weight: 700; font-size: 14.5px; color: var(--text-2); }
.tm-preview.is-error { color: var(--danger); }
.tm-summary { margin: 0; text-align: center; font-weight: 800; color: var(--text-2); }

.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-items: start; }
.tm-team {
  --c: var(--primary); --ct: #fff;
  border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; min-width: 0;
  border: 2px solid color-mix(in srgb, var(--c) 50%, var(--border)); box-shadow: var(--shadow-sm);
}
.tm-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px;
  background: var(--c); color: var(--ct); font-weight: 900; font-size: 16px;
}
.tm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-count { flex: none; font-size: 13px; font-weight: 800; font-family: var(--font-num); opacity: .92; }
.tm-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; min-height: 56px; }
.tm-member {
  display: flex; align-items: center; gap: 6px; min-width: 0; padding: 7px 10px; border-radius: 10px;
  background: var(--surface-2); font-weight: 700; font-size: 15px;
}
.tm-mname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-member.is-dealt { animation: tm-deal .34s cubic-bezier(.2, 1.3, .4, 1); }
.tm-member.is-captain {
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--c); font-weight: 900;
}
.tm-crown { flex: none; display: inline-block; animation: bb-pop .45s cubic-bezier(.2, 1.4, .4, 1); }

/* 결과 창 요약 */
.tm-sum { display: grid; gap: 6px; text-align: left; margin-top: 8px; }
.tm-sum-row {
  --c: var(--primary);
  display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--c);
}
.tm-sum-name { flex: none; font-weight: 900; color: var(--text); }
.tm-sum-mem { color: var(--text-2); font-size: 14.5px; font-weight: 600; }

@keyframes tm-deal {
  from { opacity: 0; transform: translateY(-26px) scale(.6) rotate(-8deg); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 520px) {
  .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tm-head { padding: 8px 10px; font-size: 15px; }
  .tm-list { padding: 6px; gap: 5px; }
  .tm-member { padding: 6px 8px; font-size: 14px; }
}
