
.team-builder { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.tb-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.tb-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.tb-format { display: flex; flex-direction: column; gap: .25rem; }
.tb-format-cap { font-size: .72rem; color: var(--muted); }
.tb-format-select {
  font: inherit; padding: .4rem .6rem; border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  background: var(--surface); color: var(--text);
}
.tb-hint { font-size: .8rem; color: var(--text-soft); margin: 0 0 1rem; }
.tb-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; align-items: start; }
@media (max-width: 760px) { .tb-slots { grid-template-columns: repeat(2, 1fr); } }
.tb-slot { min-width: 0; }
.tb-crop {
  position: relative;
  aspect-ratio: var(--tb-aspect, 312 / 512);
  overflow: hidden; border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 1px 4px color-mix(in oklab, var(--ink) 12%, transparent);
}
.tb-crop-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tb-slot-add {
  width: 100%;
  aspect-ratio: var(--tb-aspect, 312 / 512);
  border: 2px dashed color-mix(in oklab, var(--ink) 25%, transparent);
  border-radius: 10px; background: var(--surface-2);
  color: var(--text-soft); font: inherit; cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.tb-slot-add:hover { border-color: var(--accent); color: var(--text); }
.tb-slot-clear {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: color-mix(in oklab, var(--ink) 55%, transparent); color: #fff;
  font-size: 1rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.tb-slot-clear:hover { background: var(--accent); }
.tb-slot-label {
  margin-top: .35rem; font-size: .72rem; line-height: 1.2;
  text-align: center; color: var(--text-soft);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
