.team-workspace {
  display: grid;
  gap: 20px;
}
.team-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.team-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 24px;
}
.team-summary > div {
  display: grid;
  gap: 6px;
  border-inline-start: 3px solid var(--accent);
  padding-inline-start: 16px;
}
.team-summary strong {
  font-size: 2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.team-summary span {
  color: var(--muted);
  font-size: 0.85rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 16px;
}
.team-member {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.team-member-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.team-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 800;
}
.team-member h2,
.team-member p {
  margin: 0;
}
.team-email {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  text-align: start;
}
.team-member button {
  margin-top: auto;
}
.team-history {
  padding: 24px;
  min-width: 0;
}
.team-history ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.team-history li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  min-width: 0;
}
.team-history li > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.team-history time {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
}
.team-history p {
  margin: 6px 0;
}
.team-editor {
  width: min(640px, 96vw);
}
.team-editor fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  min-width: 0;
}
.team-role-guide {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
}
.history-pager {
  min-width: 0;
}
.history-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.history-controls button {
  min-height: 44px;
}
@media (max-width: 640px) {
  .team-summary {
    gap: 12px;
    padding: 18px 12px;
  }
  .team-summary > div {
    padding-inline-start: 8px;
  }
  .team-summary span {
    font-size: 0.72rem;
  }
  .team-summary strong {
    font-size: 1.5rem;
  }
  .team-history li {
    flex-direction: column;
    gap: 8px;
  }
  .team-editor .dialog-actions button {
    flex: 1 1 auto;
  }
}
